Merge "Revert "Delay coming out of doze until keyguard dismissed""
diff --git a/Android.bp b/Android.bp
index 6cb1e5c..b4a630f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -113,6 +113,7 @@
"core/java/android/content/IOnPrimaryClipChangedListener.aidl",
"core/java/android/content/IRestrictionsManager.aidl",
"core/java/android/content/ISyncAdapter.aidl",
+ "core/java/android/content/ISyncAdapterUnsyncableAccountCallback.aidl",
"core/java/android/content/ISyncContext.aidl",
"core/java/android/content/ISyncServiceAdapter.aidl",
"core/java/android/content/ISyncStatusObserver.aidl",
@@ -178,6 +179,8 @@
"core/java/android/hardware/location/IContextHubClientCallback.aidl",
"core/java/android/hardware/location/IContextHubService.aidl",
"core/java/android/hardware/location/IContextHubTransactionCallback.aidl",
+ "core/java/android/hardware/radio/IAnnouncementListener.aidl",
+ "core/java/android/hardware/radio/ICloseHandle.aidl",
"core/java/android/hardware/radio/IRadioService.aidl",
"core/java/android/hardware/radio/ITuner.aidl",
"core/java/android/hardware/radio/ITunerCallback.aidl",
@@ -209,6 +212,11 @@
"core/java/android/nfc/INfcUnlockHandler.aidl",
"core/java/android/nfc/INfcDta.aidl",
"core/java/android/nfc/ITagRemovedCallback.aidl",
+ "core/java/android/se/omapi/ISecureElementService.aidl",
+ "core/java/android/se/omapi/ISecureElementListener.aidl",
+ "core/java/android/se/omapi/ISecureElementChannel.aidl",
+ "core/java/android/se/omapi/ISecureElementReader.aidl",
+ "core/java/android/se/omapi/ISecureElementSession.aidl",
"core/java/android/os/IBatteryPropertiesListener.aidl",
"core/java/android/os/IBatteryPropertiesRegistrar.aidl",
"core/java/android/os/ICancellationSignal.aidl",
@@ -241,6 +249,7 @@
"core/java/android/os/storage/IStorageEventListener.aidl",
"core/java/android/os/storage/IStorageShutdownObserver.aidl",
"core/java/android/os/storage/IObbActionListener.aidl",
+ "core/java/android/security/IConfirmationPromptCallback.aidl",
"core/java/android/security/IKeystoreService.aidl",
"core/java/android/security/keymaster/IKeyAttestationApplicationIdProvider.aidl",
"core/java/android/service/autofill/IAutoFillService.aidl",
@@ -328,6 +337,8 @@
"core/java/android/view/IPinnedStackController.aidl",
"core/java/android/view/IPinnedStackListener.aidl",
"core/java/android/view/IRemoteAnimationRunner.aidl",
+ "core/java/android/view/IRecentsAnimationController.aidl",
+ "core/java/android/view/IRecentsAnimationRunner.aidl",
"core/java/android/view/IRemoteAnimationFinishedCallback.aidl",
"core/java/android/view/IRotationWatcher.aidl",
"core/java/android/view/IWallpaperVisibilityListener.aidl",
@@ -408,9 +419,9 @@
"location/java/android/location/IGpsGeofenceHardware.aidl",
"location/java/android/location/INetInitiatedListener.aidl",
"location/java/com/android/internal/location/ILocationProvider.aidl",
- "media/java/android/media/IAudioService.aidl",
"media/java/android/media/IAudioFocusDispatcher.aidl",
"media/java/android/media/IAudioRoutesObserver.aidl",
+ "media/java/android/media/IAudioService.aidl",
"media/java/android/media/IMediaHTTPConnection.aidl",
"media/java/android/media/IMediaHTTPService.aidl",
"media/java/android/media/IMediaResourceMonitor.aidl",
@@ -418,9 +429,8 @@
"media/java/android/media/IMediaRouterService.aidl",
"media/java/android/media/IMediaScannerListener.aidl",
"media/java/android/media/IMediaScannerService.aidl",
- "media/java/android/media/IMediaSession2.aidl",
- "media/java/android/media/IMediaSession2Callback.aidl",
"media/java/android/media/IPlaybackConfigDispatcher.aidl",
+ "media/java/android/media/ISessionTokensListener.aidl",
":libaudioclient_aidl",
"media/java/android/media/IRecordingConfigDispatcher.aidl",
"media/java/android/media/IRemoteDisplayCallback.aidl",
@@ -471,8 +481,8 @@
"telecomm/java/com/android/internal/telecom/IInCallService.aidl",
"telecomm/java/com/android/internal/telecom/ITelecomService.aidl",
"telecomm/java/com/android/internal/telecom/RemoteServiceCallback.aidl",
- "telephony/java/android/telephony/data/IDataService.aidl",
- "telephony/java/android/telephony/data/IDataServiceCallback.aidl",
+ "telephony/java/android/telephony/data/IDataService.aidl",
+ "telephony/java/android/telephony/data/IDataServiceCallback.aidl",
"telephony/java/android/telephony/ims/internal/aidl/IImsCallSessionListener.aidl",
"telephony/java/android/telephony/ims/internal/aidl/IImsCapabilityCallback.aidl",
"telephony/java/android/telephony/ims/internal/aidl/IImsConfig.aidl",
@@ -482,13 +492,14 @@
"telephony/java/android/telephony/ims/internal/aidl/IImsRcsFeature.aidl",
"telephony/java/android/telephony/ims/internal/aidl/IImsServiceController.aidl",
"telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl",
- "telephony/java/android/telephony/ims/internal/aidl/IImsSmsListener.aidl",
- "telephony/java/android/telephony/mbms/IMbmsDownloadSessionCallback.aidl",
+ "telephony/java/android/telephony/mbms/IMbmsDownloadSessionCallback.aidl",
"telephony/java/android/telephony/mbms/IMbmsStreamingSessionCallback.aidl",
"telephony/java/android/telephony/mbms/IDownloadStateCallback.aidl",
"telephony/java/android/telephony/mbms/IStreamingServiceCallback.aidl",
"telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl",
"telephony/java/android/telephony/mbms/vendor/IMbmsStreamingService.aidl",
+ "telephony/java/android/telephony/INetworkService.aidl",
+ "telephony/java/android/telephony/INetworkServiceCallback.aidl",
"telephony/java/com/android/ims/internal/IImsCallSession.aidl",
"telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl",
"telephony/java/com/android/ims/internal/IImsConfig.aidl",
@@ -590,6 +601,7 @@
"core/java/android/speech/tts/EventLogTags.logtags",
"core/java/android/net/EventLogTags.logtags",
"core/java/android/webkit/EventLogTags.logtags",
+ "core/java/com/android/internal/app/EventLogTags.logtags",
"core/java/com/android/internal/logging/EventLogTags.logtags",
"core/java/com/android/server/DropboxLogTags.logtags",
"core/java/org/chromium/arc/EventLogTags.logtags",
@@ -631,6 +643,13 @@
],
},
+ exclude_srcs: [
+ // See comment on framework-atb-backward-compatibility module below
+ "core/java/android/content/pm/AndroidTestBaseUpdater.java",
+ // See comment on framework-oahl-backward-compatibility module below
+ "core/java/android/content/pm/OrgApacheHttpLegacyUpdater.java",
+ ],
+
no_framework_libs: true,
libs: [
"conscrypt",
@@ -656,7 +675,9 @@
],
// Loaded with System.loadLibrary by android.view.textclassifier
- required: ["libtextclassifier"],
+ required: [
+ "libtextclassifier",
+ "libmedia2_jni",],
javac_shard_size: 150,
@@ -666,6 +687,30 @@
],
}
+// A temporary build target that is conditionally included on the bootclasspath if
+// org.apache.http.legacy library has been removed and which provides support for
+// maintaining backwards compatibility for APKs that target pre-P and depend on
+// org.apache.http.legacy classes. This is used iff REMOVE_OAHL_FROM_BCP=true is
+// specified on the build command line.
+java_library {
+ name: "framework-oahl-backward-compatibility",
+ srcs: [
+ "core/java/android/content/pm/OrgApacheHttpLegacyUpdater.java",
+ ],
+}
+
+// A temporary build target that is conditionally included on the bootclasspath if
+// android.test.base library has been removed and which provides support for
+// maintaining backwards compatibility for APKs that target pre-P and depend on
+// android.test.base classes. This is used iff REMOVE_ATB_FROM_BCP=true is
+// specified on the build command line.
+java_library {
+ name: "framework-atb-backward-compatibility",
+ srcs: [
+ "core/java/android/content/pm/AndroidTestBaseUpdater.java",
+ ],
+}
+
genrule {
name: "framework-statslog-gen",
tools: ["stats-log-api-gen"],
@@ -806,7 +851,9 @@
srcs: [
"core/java/android/os/HidlSupport.java",
+ "core/java/android/annotation/IntDef.java",
"core/java/android/annotation/NonNull.java",
+ "core/java/android/annotation/SystemApi.java",
"core/java/android/os/HwBinder.java",
"core/java/android/os/HwBlob.java",
"core/java/android/os/HwParcel.java",
diff --git a/Android.mk b/Android.mk
index 2254008..35b5f92 100644
--- a/Android.mk
+++ b/Android.mk
@@ -823,6 +823,38 @@
$(call all-proto-files-under, libs/incident/proto/android/os)
include $(BUILD_STATIC_JAVA_LIBRARY)
+# ==== hiddenapi lists =======================================
+
+# Copy blacklist and dark greylist over into the build folder.
+# This is for ART buildbots which need to mock these lists and have alternative
+# rules for building them. Other rules in the build system should depend on the
+# files in the build folder.
+
+$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-blacklist.txt,\
+ $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)))
+$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-dark-greylist.txt,\
+ $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)))
+
+# Generate light greylist as private API minus (blacklist plus dark greylist).
+
+$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
+$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): BLACKLIST := $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)
+$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): DARK_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
+$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
+ $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) \
+ $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
+ if [ ! -z "`comm -12 <(sort $(BLACKLIST)) <(sort $(DARK_GREYLIST))`" ]; then \
+ echo "There should be no overlap between $(BLACKLIST) and $(DARK_GREYLIST)" 1>&2; \
+ exit 1; \
+ elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST))`" ]; then \
+ echo "$(BLACKLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
+ exit 2; \
+ elif [ ! -z "`comm -13 <(sort $(PRIVATE_API)) <(sort $(DARK_GREYLIST))`" ]; then \
+ echo "$(DARK_GREYLIST) must be a subset of $(PRIVATE_API)" 1>&2; \
+ exit 3; \
+ fi
+ comm -23 <(sort $(PRIVATE_API)) <(sort $(BLACKLIST) $(DARK_GREYLIST)) > $@
+
# Include subdirectory makefiles
# ============================================================
diff --git a/apct-tests/perftests/core/src/android/text/MeasuredTextMemoryUsageTest.java b/apct-tests/perftests/core/src/android/text/MeasuredTextMemoryUsageTest.java
new file mode 100644
index 0000000..fc6302e
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/text/MeasuredTextMemoryUsageTest.java
@@ -0,0 +1,132 @@
+/*
+ * 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.text;
+
+import static android.text.TextDirectionHeuristics.LTR;
+
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+
+import android.support.test.filters.LargeTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.support.test.InstrumentationRegistry;
+import android.content.res.ColorStateList;
+import android.graphics.Canvas;
+import android.graphics.Typeface;
+import android.text.Layout;
+import android.text.style.TextAppearanceSpan;
+import android.view.DisplayListCanvas;
+import android.view.RenderNode;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.nio.CharBuffer;
+import java.util.Random;
+
+@LargeTest
+@RunWith(AndroidJUnit4.class)
+public class MeasuredTextMemoryUsageTest {
+ private static final int WORD_LENGTH = 9; // Random word has 9 characters.
+ private static final boolean NO_STYLE_TEXT = false;
+
+ private static TextPaint PAINT = new TextPaint();
+
+ private static int TRIAL_COUNT = 100;
+
+ public MeasuredTextMemoryUsageTest() {}
+
+ private TextPerfUtils mTextUtil = new TextPerfUtils();
+
+ @Before
+ public void setUp() {
+ mTextUtil.resetRandom(0 /* seed */);
+ }
+
+ private void reportMemoryUsage(int memoryUsage, String key) {
+ Bundle status = new Bundle();
+ status.putInt(key + "_median", memoryUsage);
+ InstrumentationRegistry.getInstrumentation().sendStatus(Activity.RESULT_OK, status);
+ }
+
+ private int median(int[] values) {
+ return values.length % 2 == 0 ?
+ (values[values.length / 2] + values[values.length / 2 - 1]) / 2:
+ values[values.length / 2];
+ }
+
+ @Test
+ public void testMemoryUsage_NoHyphenation() {
+ int[] memories = new int[TRIAL_COUNT];
+ // Report median of randomly generated MeasuredText.
+ for (int i = 0; i < TRIAL_COUNT; ++i) {
+ memories[i] = new MeasuredText.Builder(
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
+ .build().getMemoryUsage();
+ }
+ reportMemoryUsage(median(memories), "MemoryUsage_NoHyphenation");
+ }
+
+ @Test
+ public void testMemoryUsage_Hyphenation() {
+ int[] memories = new int[TRIAL_COUNT];
+ // Report median of randomly generated MeasuredText.
+ for (int i = 0; i < TRIAL_COUNT; ++i) {
+ memories[i] = new MeasuredText.Builder(
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL)
+ .build().getMemoryUsage();
+ }
+ reportMemoryUsage(median(memories), "MemoryUsage_Hyphenation");
+ }
+
+ @Test
+ public void testMemoryUsage_NoHyphenation_WidthOnly() {
+ int[] memories = new int[TRIAL_COUNT];
+ // Report median of randomly generated MeasuredText.
+ for (int i = 0; i < TRIAL_COUNT; ++i) {
+ memories[i] = new MeasuredText.Builder(
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
+ .build(false /* width only */).getMemoryUsage();
+ }
+ reportMemoryUsage(median(memories), "MemoryUsage_NoHyphenation_WidthOnly");
+ }
+
+ @Test
+ public void testMemoryUsage_Hyphenatation_WidthOnly() {
+ int[] memories = new int[TRIAL_COUNT];
+ // Report median of randomly generated MeasuredText.
+ for (int i = 0; i < TRIAL_COUNT; ++i) {
+ memories[i] = new MeasuredText.Builder(
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL)
+ .build(false /* width only */).getMemoryUsage();
+ }
+ reportMemoryUsage(median(memories), "MemoryUsage_Hyphenation_WidthOnly");
+ }
+}
diff --git a/apct-tests/perftests/core/src/android/text/MeasuredTextPerfTest.java b/apct-tests/perftests/core/src/android/text/MeasuredTextPerfTest.java
new file mode 100644
index 0000000..98f2bd5
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/text/MeasuredTextPerfTest.java
@@ -0,0 +1,185 @@
+/*
+ * 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.text;
+
+import static android.text.TextDirectionHeuristics.LTR;
+
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+
+import android.support.test.filters.LargeTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import android.content.res.ColorStateList;
+import android.graphics.Canvas;
+import android.graphics.Typeface;
+import android.text.Layout;
+import android.text.style.TextAppearanceSpan;
+import android.view.DisplayListCanvas;
+import android.view.RenderNode;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.nio.CharBuffer;
+import java.util.Random;
+
+@LargeTest
+@RunWith(AndroidJUnit4.class)
+public class MeasuredTextPerfTest {
+ private static final int WORD_LENGTH = 9; // Random word has 9 characters.
+ private static final int WORDS_IN_LINE = 8; // Roughly, 8 words in a line.
+ private static final boolean NO_STYLE_TEXT = false;
+ private static final boolean STYLE_TEXT = true;
+
+ private static TextPaint PAINT = new TextPaint();
+ private static final int TEXT_WIDTH = WORDS_IN_LINE * WORD_LENGTH * (int) PAINT.getTextSize();
+
+ public MeasuredTextPerfTest() {}
+
+ @Rule
+ public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
+
+ private TextPerfUtils mTextUtil = new TextPerfUtils();
+
+ @Before
+ public void setUp() {
+ mTextUtil.resetRandom(0 /* seed */);
+ }
+
+ @Test
+ public void testCreate_NoStyled_Hyphenation() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ state.pauseTiming();
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
+ state.resumeTiming();
+
+ new MeasuredText.Builder(text, PAINT)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL)
+ .build(true /* do full layout */);
+ }
+ }
+
+ @Test
+ public void testCreate_NoStyled_NoHyphenation() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ state.pauseTiming();
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
+ state.resumeTiming();
+
+ new MeasuredText.Builder(text, PAINT)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
+ .build(true /* do full layout */);
+ }
+ }
+
+ @Test
+ public void testCreate_NoStyled_Hyphenation_WidthOnly() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ state.pauseTiming();
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
+ state.resumeTiming();
+
+ new MeasuredText.Builder(text, PAINT)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL)
+ .build(false /* width only */);
+ }
+ }
+
+ @Test
+ public void testCreate_NoStyled_NoHyphenation_WidthOnly() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ state.pauseTiming();
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
+ state.resumeTiming();
+
+ new MeasuredText.Builder(text, PAINT)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
+ .build(false /* width only */);
+ }
+ }
+
+ @Test
+ public void testCreate_Styled_Hyphenation() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ state.pauseTiming();
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT);
+ state.resumeTiming();
+
+ new MeasuredText.Builder(text, PAINT)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL)
+ .build(true /* do full layout */);
+ }
+ }
+
+ @Test
+ public void testCreate_Styled_NoHyphenation() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ state.pauseTiming();
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT);
+ state.resumeTiming();
+
+ new MeasuredText.Builder(text, PAINT)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
+ .build(true /* do full layout */);
+ }
+ }
+
+ @Test
+ public void testCreate_Styled_Hyphenation_WidthOnly() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ state.pauseTiming();
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT);
+ state.resumeTiming();
+
+ new MeasuredText.Builder(text, PAINT)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL)
+ .build(false /* width only */);
+ }
+ }
+
+ @Test
+ public void testCreate_Styled_NoHyphenation_WidthOnly() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ state.pauseTiming();
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT);
+ state.resumeTiming();
+
+ new MeasuredText.Builder(text, PAINT)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
+ .build(false /* width only */);
+ }
+ }
+}
diff --git a/apct-tests/perftests/core/src/android/text/StaticLayoutPerfTest.java b/apct-tests/perftests/core/src/android/text/StaticLayoutPerfTest.java
index 682885b..bab2a85 100644
--- a/apct-tests/perftests/core/src/android/text/StaticLayoutPerfTest.java
+++ b/apct-tests/perftests/core/src/android/text/StaticLayoutPerfTest.java
@@ -43,74 +43,30 @@
@LargeTest
@RunWith(AndroidJUnit4.class)
public class StaticLayoutPerfTest {
+ private static final int WORD_LENGTH = 9; // Random word has 9 characters.
+ private static final int WORDS_IN_LINE = 8; // Roughly, 8 words in a line.
+ private static final boolean NO_STYLE_TEXT = false;
+ private static final boolean STYLE_TEXT = true;
+
+ private static TextPaint PAINT = new TextPaint();
+ private static final int TEXT_WIDTH = WORDS_IN_LINE * WORD_LENGTH * (int) PAINT.getTextSize();
public StaticLayoutPerfTest() {}
@Rule
public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
- private static final int WORD_LENGTH = 9; // Random word has 9 characters.
- private static final int WORDS_IN_LINE = 8; // Roughly, 8 words in a line.
- private static final int PARA_LENGTH = 500; // Number of characters in a paragraph.
-
- private static final boolean NO_STYLE_TEXT = false;
- private static final boolean STYLE_TEXT = true;
-
- private Random mRandom;
-
- private static final String ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
- private static final int ALPHABET_LENGTH = ALPHABET.length();
-
- private static final ColorStateList TEXT_COLOR = ColorStateList.valueOf(0x00000000);
- private static final String[] FAMILIES = { "sans-serif", "serif", "monospace" };
- private static final int[] STYLES = {
- Typeface.NORMAL, Typeface.BOLD, Typeface.ITALIC, Typeface.BOLD_ITALIC
- };
-
- private final char[] mBuffer = new char[PARA_LENGTH];
-
- private static TextPaint PAINT = new TextPaint();
- private static final int TEXT_WIDTH = WORDS_IN_LINE * WORD_LENGTH * (int) PAINT.getTextSize();
-
- private CharSequence generateRandomParagraph(int wordLen, boolean applyRandomStyle) {
- for (int i = 0; i < PARA_LENGTH; i++) {
- if (i % (wordLen + 1) == wordLen) {
- mBuffer[i] = ' ';
- } else {
- mBuffer[i] = ALPHABET.charAt(mRandom.nextInt(ALPHABET_LENGTH));
- }
- }
-
- CharSequence cs = CharBuffer.wrap(mBuffer);
- if (!applyRandomStyle) {
- return cs;
- }
-
- SpannableStringBuilder ssb = new SpannableStringBuilder(cs);
- for (int i = 0; i < ssb.length(); i += WORD_LENGTH) {
- final int spanStart = i;
- final int spanEnd = (i + WORD_LENGTH) > ssb.length() ? ssb.length() : i + WORD_LENGTH;
-
- final TextAppearanceSpan span = new TextAppearanceSpan(
- FAMILIES[mRandom.nextInt(FAMILIES.length)],
- STYLES[mRandom.nextInt(STYLES.length)],
- 24 + mRandom.nextInt(32), // text size. min 24 max 56
- TEXT_COLOR, TEXT_COLOR);
-
- ssb.setSpan(span, spanStart, spanEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
- }
- return ssb;
- }
+ private TextPerfUtils mTextUtil = new TextPerfUtils();
@Before
public void setUp() {
- mRandom = new Random(0);
+ mTextUtil.resetRandom(0 /* seed */);
}
@Test
public void testCreate_FixedText_NoStyle_Greedy_NoHyphenation() {
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
- final CharSequence text = generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
while (state.keepRunning()) {
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH)
.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
@@ -124,7 +80,7 @@
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
while (state.keepRunning()) {
state.pauseTiming();
- final CharSequence text = generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
state.resumeTiming();
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH)
@@ -139,7 +95,7 @@
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
while (state.keepRunning()) {
state.pauseTiming();
- final CharSequence text = generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
state.resumeTiming();
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH)
@@ -154,7 +110,7 @@
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
while (state.keepRunning()) {
state.pauseTiming();
- final CharSequence text = generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
state.resumeTiming();
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH)
@@ -169,7 +125,7 @@
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
while (state.keepRunning()) {
state.pauseTiming();
- final CharSequence text = generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
state.resumeTiming();
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH)
@@ -184,7 +140,7 @@
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
while (state.keepRunning()) {
state.pauseTiming();
- final CharSequence text = generateRandomParagraph(WORD_LENGTH, STYLE_TEXT);
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT);
state.resumeTiming();
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH)
@@ -200,7 +156,7 @@
while (state.keepRunning()) {
state.pauseTiming();
final MeasuredText text = new MeasuredText.Builder(
- generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT)
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT)
.setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)
.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
.build();
@@ -219,7 +175,7 @@
while (state.keepRunning()) {
state.pauseTiming();
final MeasuredText text = new MeasuredText.Builder(
- generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT)
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT)
.setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)
.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL)
.build();
@@ -238,7 +194,7 @@
while (state.keepRunning()) {
state.pauseTiming();
final MeasuredText text = new MeasuredText.Builder(
- generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT)
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT)
.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED)
.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
.build();
@@ -257,7 +213,7 @@
while (state.keepRunning()) {
state.pauseTiming();
final MeasuredText text = new MeasuredText.Builder(
- generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT)
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT)
.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED)
.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL)
.build();
@@ -276,7 +232,7 @@
while (state.keepRunning()) {
state.pauseTiming();
final MeasuredText text = new MeasuredText.Builder(
- generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT)
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT)
.setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)
.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
.build();
@@ -292,7 +248,7 @@
@Test
public void testDraw_FixedText_NoStyled() {
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
- final CharSequence text = generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
final RenderNode node = RenderNode.create("benchmark", null);
while (state.keepRunning()) {
state.pauseTiming();
@@ -311,7 +267,7 @@
final RenderNode node = RenderNode.create("benchmark", null);
while (state.keepRunning()) {
state.pauseTiming();
- final CharSequence text = generateRandomParagraph(WORD_LENGTH, STYLE_TEXT);
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT);
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
final DisplayListCanvas c = node.start(1200, 200);
@@ -327,7 +283,7 @@
final RenderNode node = RenderNode.create("benchmark", null);
while (state.keepRunning()) {
state.pauseTiming();
- final CharSequence text = generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
final DisplayListCanvas c = node.start(1200, 200);
@@ -343,7 +299,7 @@
final RenderNode node = RenderNode.create("benchmark", null);
while (state.keepRunning()) {
state.pauseTiming();
- final CharSequence text = generateRandomParagraph(WORD_LENGTH, STYLE_TEXT);
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT);
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
final DisplayListCanvas c = node.start(1200, 200);
@@ -360,7 +316,7 @@
final RenderNode node = RenderNode.create("benchmark", null);
while (state.keepRunning()) {
state.pauseTiming();
- final CharSequence text = generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
final DisplayListCanvas c = node.start(1200, 200);
@@ -378,7 +334,7 @@
while (state.keepRunning()) {
state.pauseTiming();
final MeasuredText text = new MeasuredText.Builder(
- generateRandomParagraph(WORD_LENGTH, STYLE_TEXT), PAINT).build();
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT), PAINT).build();
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
final DisplayListCanvas c = node.start(1200, 200);
@@ -395,7 +351,7 @@
while (state.keepRunning()) {
state.pauseTiming();
final MeasuredText text = new MeasuredText.Builder(
- generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT).build();
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT).build();
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
final DisplayListCanvas c = node.start(1200, 200);
@@ -412,7 +368,7 @@
while (state.keepRunning()) {
state.pauseTiming();
final MeasuredText text = new MeasuredText.Builder(
- generateRandomParagraph(WORD_LENGTH, STYLE_TEXT), PAINT).build();
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT), PAINT).build();
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
final DisplayListCanvas c = node.start(1200, 200);
@@ -430,7 +386,7 @@
while (state.keepRunning()) {
state.pauseTiming();
final MeasuredText text = new MeasuredText.Builder(
- generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT).build();
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT).build();
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
final DisplayListCanvas c = node.start(1200, 200);
diff --git a/apct-tests/perftests/core/src/android/text/TextPerfUtils.java b/apct-tests/perftests/core/src/android/text/TextPerfUtils.java
new file mode 100644
index 0000000..dccb34b
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/text/TextPerfUtils.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 android.text;
+
+import static android.text.TextDirectionHeuristics.LTR;
+
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+
+import android.support.test.filters.LargeTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import android.content.res.ColorStateList;
+import android.graphics.Canvas;
+import android.graphics.Typeface;
+import android.text.Layout;
+import android.text.style.TextAppearanceSpan;
+import android.view.DisplayListCanvas;
+import android.view.RenderNode;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.nio.CharBuffer;
+import java.util.Random;
+
+public class TextPerfUtils {
+
+ private static final int PARA_LENGTH = 500; // Number of characters in a paragraph.
+
+ private Random mRandom = new Random(0);
+
+ private static final String ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+ private static final int ALPHABET_LENGTH = ALPHABET.length();
+
+ private static final ColorStateList TEXT_COLOR = ColorStateList.valueOf(0x00000000);
+ private static final String[] FAMILIES = { "sans-serif", "serif", "monospace" };
+ private static final int[] STYLES = {
+ Typeface.NORMAL, Typeface.BOLD, Typeface.ITALIC, Typeface.BOLD_ITALIC
+ };
+
+ private final char[] mBuffer = new char[PARA_LENGTH];
+
+ public void resetRandom(long seed) {
+ mRandom = new Random(seed);
+ }
+
+ public CharSequence nextRandomParagraph(int wordLen, boolean applyRandomStyle) {
+ for (int i = 0; i < PARA_LENGTH; i++) {
+ if (i % (wordLen + 1) == wordLen) {
+ mBuffer[i] = ' ';
+ } else {
+ mBuffer[i] = ALPHABET.charAt(mRandom.nextInt(ALPHABET_LENGTH));
+ }
+ }
+
+ CharSequence cs = CharBuffer.wrap(mBuffer);
+ if (!applyRandomStyle) {
+ return cs;
+ }
+
+ SpannableStringBuilder ssb = new SpannableStringBuilder(cs);
+ for (int i = 0; i < ssb.length(); i += wordLen) {
+ final int spanStart = i;
+ final int spanEnd = (i + wordLen) > ssb.length() ? ssb.length() : i + wordLen;
+
+ final TextAppearanceSpan span = new TextAppearanceSpan(
+ FAMILIES[mRandom.nextInt(FAMILIES.length)],
+ STYLES[mRandom.nextInt(STYLES.length)],
+ 24 + mRandom.nextInt(32), // text size. min 24 max 56
+ TEXT_COLOR, TEXT_COLOR);
+
+ ssb.setSpan(span, spanStart, spanEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
+ }
+ return ssb;
+ }
+}
diff --git a/api/current.txt b/api/current.txt
index ef8fec2..800412b 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -6,6 +6,7 @@
public static final class Manifest.permission {
ctor public Manifest.permission();
+ field public static final java.lang.String ACCEPT_HANDOVER = "android.permission.ACCEPT_HANDOVER";
field public static final java.lang.String ACCESS_CHECKIN_PROPERTIES = "android.permission.ACCESS_CHECKIN_PROPERTIES";
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";
@@ -93,6 +94,7 @@
field public static final java.lang.String MOUNT_FORMAT_FILESYSTEMS = "android.permission.MOUNT_FORMAT_FILESYSTEMS";
field public static final java.lang.String MOUNT_UNMOUNT_FILESYSTEMS = "android.permission.MOUNT_UNMOUNT_FILESYSTEMS";
field public static final java.lang.String NFC = "android.permission.NFC";
+ field public static final java.lang.String NFC_TRANSACTION_EVENT = "android.permission.NFC_TRANSACTION_EVENT";
field public static final java.lang.String PACKAGE_USAGE_STATS = "android.permission.PACKAGE_USAGE_STATS";
field public static final deprecated java.lang.String PERSISTENT_ACTIVITY = "android.permission.PERSISTENT_ACTIVITY";
field public static final java.lang.String PROCESS_OUTGOING_CALLS = "android.permission.PROCESS_OUTGOING_CALLS";
@@ -1809,6 +1811,7 @@
public static final class R.id {
ctor public R.id();
field public static final int accessibilityActionContextClick = 16908348; // 0x102003c
+ field public static final int accessibilityActionHideTooltip = 16908357; // 0x1020045
field public static final int accessibilityActionMoveWindow = 16908354; // 0x1020042
field public static final int accessibilityActionScrollDown = 16908346; // 0x102003a
field public static final int accessibilityActionScrollLeft = 16908345; // 0x1020039
@@ -1817,6 +1820,7 @@
field public static final int accessibilityActionScrollUp = 16908344; // 0x1020038
field public static final int accessibilityActionSetProgress = 16908349; // 0x102003d
field public static final int accessibilityActionShowOnScreen = 16908342; // 0x1020036
+ field public static final int accessibilityActionShowTooltip = 16908356; // 0x1020044
field public static final int addToDictionary = 16908330; // 0x102002a
field public static final int autofill = 16908355; // 0x1020043
field public static final int background = 16908288; // 0x1020000
@@ -1899,6 +1903,7 @@
field public static final int decelerate_cubic = 17563651; // 0x10c0003
field public static final int decelerate_quad = 17563649; // 0x10c0001
field public static final int decelerate_quint = 17563653; // 0x10c0005
+ field public static final int fast_out_extra_slow_in = 17563674; // 0x10c001a
field public static final int fast_out_linear_in = 17563663; // 0x10c000f
field public static final int fast_out_slow_in = 17563661; // 0x10c000d
field public static final int linear = 17563659; // 0x10c000b
@@ -3764,6 +3769,7 @@
method public final void requestShowKeyboardShortcuts();
method public deprecated boolean requestVisibleBehind(boolean);
method public final boolean requestWindowFeature(int);
+ method public final <T extends android.view.View> T requireViewById(int);
method public final void runOnUiThread(java.lang.Runnable);
method public void setActionBar(android.widget.Toolbar);
method public void setContentTransitionManager(android.transition.TransitionManager);
@@ -4458,6 +4464,7 @@
method public void openOptionsMenu();
method public void registerForContextMenu(android.view.View);
method public final boolean requestWindowFeature(int);
+ method public final <T extends android.view.View> T requireViewById(int);
method public void setCancelMessage(android.os.Message);
method public void setCancelable(boolean);
method public void setCanceledOnTouchOutside(boolean);
@@ -5221,6 +5228,7 @@
field public static final java.lang.String EXTRA_PROGRESS = "android.progress";
field public static final java.lang.String EXTRA_PROGRESS_INDETERMINATE = "android.progressIndeterminate";
field public static final java.lang.String EXTRA_PROGRESS_MAX = "android.progressMax";
+ field public static final java.lang.String EXTRA_REMOTE_INPUT_DRAFT = "android.remoteInputDraft";
field public static final java.lang.String EXTRA_REMOTE_INPUT_HISTORY = "android.remoteInputHistory";
field public static final deprecated java.lang.String EXTRA_SELF_DISPLAY_NAME = "android.selfDisplayName";
field public static final java.lang.String EXTRA_SHOW_CHRONOMETER = "android.showChronometer";
@@ -5693,6 +5701,7 @@
method public final void setInterruptionFilter(int);
method public void setNotificationPolicy(android.app.NotificationManager.Policy);
method public boolean updateAutomaticZenRule(java.lang.String, android.app.AutomaticZenRule);
+ field public static final java.lang.String ACTION_APP_BLOCK_STATE_CHANGED = "android.app.action.APP_BLOCK_STATE_CHANGED";
field public static final java.lang.String ACTION_INTERRUPTION_FILTER_CHANGED = "android.app.action.INTERRUPTION_FILTER_CHANGED";
field public static final java.lang.String ACTION_NOTIFICATION_CHANNEL_BLOCK_STATE_CHANGED = "android.app.action.NOTIFICATION_CHANNEL_BLOCK_STATE_CHANGED";
field public static final java.lang.String ACTION_NOTIFICATION_CHANNEL_GROUP_BLOCK_STATE_CHANGED = "android.app.action.NOTIFICATION_CHANNEL_GROUP_BLOCK_STATE_CHANGED";
@@ -6344,6 +6353,7 @@
method public void onReceive(android.content.Context, android.content.Intent);
method public void onSecurityLogsAvailable(android.content.Context, android.content.Intent);
method public void onSystemUpdatePending(android.content.Context, android.content.Intent, long);
+ method public void onTransferAffiliatedProfileOwnershipComplete(android.content.Context, android.os.UserHandle);
method public void onTransferOwnershipComplete(android.content.Context, android.os.PersistableBundle);
method public void onUserAdded(android.content.Context, android.content.Intent, android.os.UserHandle);
method public void onUserRemoved(android.content.Context, android.content.Intent, android.os.UserHandle);
@@ -6365,7 +6375,7 @@
field public static final java.lang.String DEVICE_ADMIN_META_DATA = "android.app.device_admin";
field public static final java.lang.String EXTRA_DISABLE_WARNING = "android.app.extra.DISABLE_WARNING";
field public static final java.lang.String EXTRA_LOCK_TASK_PACKAGE = "android.app.extra.LOCK_TASK_PACKAGE";
- field public static final java.lang.String EXTRA_TRANSFER_OWNER_ADMIN_EXTRAS_BUNDLE = "android.app.extra.TRANSFER_OWNER_ADMIN_EXTRAS_BUNDLE";
+ field public static final java.lang.String EXTRA_TRANSFER_OWNERSHIP_ADMIN_EXTRAS_BUNDLE = "android.app.extra.TRANSFER_OWNERSHIP_ADMIN_EXTRAS_BUNDLE";
field public static final java.lang.String SUPPORT_TRANSFER_OWNERSHIP_META_DATA = "android.app.support_transfer_ownership";
}
@@ -6377,10 +6387,11 @@
public class DevicePolicyManager {
method public void addCrossProfileIntentFilter(android.content.ComponentName, android.content.IntentFilter, int);
method public boolean addCrossProfileWidgetProvider(android.content.ComponentName, java.lang.String);
+ method public int addOverrideApn(android.content.ComponentName, android.telephony.data.ApnSetting);
method public void addPersistentPreferredActivity(android.content.ComponentName, android.content.IntentFilter, android.content.ComponentName);
method public void addUserRestriction(android.content.ComponentName, java.lang.String);
method public boolean bindDeviceAdminServiceAsUser(android.content.ComponentName, android.content.Intent, android.content.ServiceConnection, int, android.os.UserHandle);
- method public boolean clearApplicationUserData(android.content.ComponentName, java.lang.String, java.util.concurrent.Executor, android.app.admin.DevicePolicyManager.OnClearApplicationUserDataListener);
+ method public void clearApplicationUserData(android.content.ComponentName, java.lang.String, java.util.concurrent.Executor, android.app.admin.DevicePolicyManager.OnClearApplicationUserDataListener);
method public void clearCrossProfileIntentFilters(android.content.ComponentName);
method public deprecated void clearDeviceOwnerApp(java.lang.String);
method public void clearPackagePersistentPreferredActivities(android.content.ComponentName, java.lang.String);
@@ -6423,6 +6434,7 @@
method public java.util.List<java.lang.String> getMeteredDataDisabled(android.content.ComponentName);
method public int getOrganizationColor(android.content.ComponentName);
method public java.lang.CharSequence getOrganizationName(android.content.ComponentName);
+ method public java.util.List<android.telephony.data.ApnSetting> getOverrideApns(android.content.ComponentName);
method public android.app.admin.DevicePolicyManager getParentProfileInstance(android.content.ComponentName);
method public java.lang.String getPasswordBlacklistName(android.content.ComponentName);
method public long getPasswordExpiration(android.content.ComponentName);
@@ -6451,6 +6463,7 @@
method public boolean getStorageEncryption(android.content.ComponentName);
method public int getStorageEncryptionStatus();
method public android.app.admin.SystemUpdatePolicy getSystemUpdatePolicy();
+ method public android.os.PersistableBundle getTransferOwnershipBundle();
method public java.util.List<android.os.PersistableBundle> getTrustAgentConfiguration(android.content.ComponentName, android.content.ComponentName);
method public android.os.Bundle getUserRestrictions(android.content.ComponentName);
method public java.lang.String getWifiMacAddress(android.content.ComponentName);
@@ -6474,6 +6487,7 @@
method public boolean isManagedProfile(android.content.ComponentName);
method public boolean isMasterVolumeMuted(android.content.ComponentName);
method public boolean isNetworkLoggingEnabled(android.content.ComponentName);
+ method public boolean isOverrideApnEnabled(android.content.ComponentName);
method public boolean isPackageSuspended(android.content.ComponentName, java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
method public boolean isPrintingEnabled();
method public boolean isProfileOwnerApp(java.lang.String);
@@ -6489,6 +6503,7 @@
method public void removeActiveAdmin(android.content.ComponentName);
method public boolean removeCrossProfileWidgetProvider(android.content.ComponentName, java.lang.String);
method public boolean removeKeyPair(android.content.ComponentName, java.lang.String);
+ method public boolean removeOverrideApn(android.content.ComponentName, int);
method public boolean removeUser(android.content.ComponentName, android.os.UserHandle);
method public boolean requestBugreport(android.content.ComponentName);
method public boolean resetPassword(java.lang.String, int);
@@ -6529,6 +6544,7 @@
method public void setNetworkLoggingEnabled(android.content.ComponentName, boolean);
method public void setOrganizationColor(android.content.ComponentName, int);
method public void setOrganizationName(android.content.ComponentName, java.lang.CharSequence);
+ method public void setOverrideApnsEnabled(android.content.ComponentName, boolean);
method public java.lang.String[] setPackagesSuspended(android.content.ComponentName, java.lang.String[], boolean);
method public boolean setPasswordBlacklist(android.content.ComponentName, java.lang.String, java.util.List<java.lang.String>);
method public void setPasswordExpirationTimeout(android.content.ComponentName, long);
@@ -6573,6 +6589,7 @@
method public void transferOwnership(android.content.ComponentName, android.content.ComponentName, android.os.PersistableBundle);
method public void uninstallAllUserCaCerts(android.content.ComponentName);
method public void uninstallCaCert(android.content.ComponentName, byte[]);
+ method public boolean updateOverrideApn(android.content.ComponentName, int, android.telephony.data.ApnSetting);
method public void wipeData(int);
method public void wipeDataWithReason(int, java.lang.CharSequence);
field public static final java.lang.String ACTION_ADD_DEVICE_ADMIN = "android.app.action.ADD_DEVICE_ADMIN";
@@ -6707,20 +6724,46 @@
public class SecurityLog {
ctor public SecurityLog();
+ field public static final int LEVEL_ERROR = 3; // 0x3
+ field public static final int LEVEL_INFO = 1; // 0x1
+ field public static final int LEVEL_WARNING = 2; // 0x2
field public static final int TAG_ADB_SHELL_CMD = 210002; // 0x33452
field public static final int TAG_ADB_SHELL_INTERACTIVE = 210001; // 0x33451
field public static final int TAG_APP_PROCESS_START = 210005; // 0x33455
+ field public static final int TAG_CERT_AUTHORITY_INSTALLED = 210029; // 0x3346d
+ field public static final int TAG_CERT_AUTHORITY_REMOVED = 210030; // 0x3346e
+ field public static final int TAG_KEYGUARD_DISABLED_FEATURES_SET = 210021; // 0x33465
field public static final int TAG_KEYGUARD_DISMISSED = 210006; // 0x33456
field public static final int TAG_KEYGUARD_DISMISS_AUTH_ATTEMPT = 210007; // 0x33457
field public static final int TAG_KEYGUARD_SECURED = 210008; // 0x33458
+ field public static final int TAG_KEY_DESTRUCTION = 210026; // 0x3346a
+ field public static final int TAG_KEY_GENERATED = 210024; // 0x33468
+ field public static final int TAG_KEY_IMPORT = 210025; // 0x33469
+ field public static final int TAG_LOGGING_STARTED = 210011; // 0x3345b
+ field public static final int TAG_LOGGING_STOPPED = 210012; // 0x3345c
+ field public static final int TAG_LOG_BUFFER_SIZE_CRITICAL = 210015; // 0x3345f
+ field public static final int TAG_MAX_PASSWORD_ATTEMPTS_SET = 210020; // 0x33464
+ field public static final int TAG_MAX_SCREEN_LOCK_TIMEOUT_SET = 210019; // 0x33463
+ field public static final int TAG_MEDIA_MOUNT = 210013; // 0x3345d
+ field public static final int TAG_MEDIA_UNMOUNT = 210014; // 0x3345e
+ field public static final int TAG_OS_SHUTDOWN = 210010; // 0x3345a
+ field public static final int TAG_OS_STARTUP = 210009; // 0x33459
+ field public static final int TAG_PASSWORD_COMPLEXITY_SET = 210017; // 0x33461
+ field public static final int TAG_PASSWORD_EXPIRATION_SET = 210016; // 0x33460
+ field public static final int TAG_PASSWORD_HISTORY_LENGTH_SET = 210018; // 0x33462
+ field public static final int TAG_REMOTE_LOCK = 210022; // 0x33466
field public static final int TAG_SYNC_RECV_FILE = 210003; // 0x33453
field public static final int TAG_SYNC_SEND_FILE = 210004; // 0x33454
+ field public static final int TAG_USER_RESTRICTION_ADDED = 210027; // 0x3346b
+ field public static final int TAG_USER_RESTRICTION_REMOVED = 210028; // 0x3346c
+ field public static final int TAG_WIPE_FAILURE = 210023; // 0x33467
}
public static final class SecurityLog.SecurityEvent implements android.os.Parcelable {
method public int describeContents();
method public java.lang.Object getData();
method public long getId();
+ method public int getLogLevel();
method public int getTag();
method public long getTimeNanos();
method public void writeToParcel(android.os.Parcel, int);
@@ -6743,9 +6786,11 @@
method public static android.app.admin.SystemUpdatePolicy createPostponeInstallPolicy();
method public static android.app.admin.SystemUpdatePolicy createWindowedInstallPolicy(int, int);
method public int describeContents();
+ method public java.util.List<android.util.Pair<java.lang.Integer, java.lang.Integer>> getFreezePeriods();
method public int getInstallWindowEnd();
method public int getInstallWindowStart();
method public int getPolicyType();
+ method public android.app.admin.SystemUpdatePolicy setFreezePeriods(java.util.List<android.util.Pair<java.lang.Integer, java.lang.Integer>>);
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.app.admin.SystemUpdatePolicy> CREATOR;
field public static final int TYPE_INSTALL_AUTOMATIC = 1; // 0x1
@@ -6753,6 +6798,18 @@
field public static final int TYPE_POSTPONE = 3; // 0x3
}
+ public static final class SystemUpdatePolicy.ValidationFailedException extends java.lang.IllegalArgumentException implements android.os.Parcelable {
+ method public int describeContents();
+ method public int getErrorCode();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.app.admin.SystemUpdatePolicy.ValidationFailedException> CREATOR;
+ field public static final int ERROR_COMBINED_FREEZE_PERIOD_TOO_CLOSE = 5; // 0x5
+ field public static final int ERROR_COMBINED_FREEZE_PERIOD_TOO_LONG = 4; // 0x4
+ field public static final int ERROR_DUPLICATE_OR_OVERLAP = 1; // 0x1
+ field public static final int ERROR_NEW_FREEZE_PERIOD_TOO_CLOSE = 3; // 0x3
+ field public static final int ERROR_NEW_FREEZE_PERIOD_TOO_LONG = 2; // 0x2
+ }
+
}
package android.app.assist {
@@ -6878,6 +6935,8 @@
method public void onRestore(android.app.backup.BackupDataInput, long, android.os.ParcelFileDescriptor) throws java.io.IOException;
method public void onRestoreFile(android.os.ParcelFileDescriptor, long, java.io.File, int, long, long) throws java.io.IOException;
method public void onRestoreFinished();
+ field public static final int FLAG_CLIENT_SIDE_ENCRYPTION_ENABLED = 1; // 0x1
+ field public static final int FLAG_DEVICE_TO_DEVICE_TRANSFER = 2; // 0x2
field public static final int TYPE_DIRECTORY = 2; // 0x2
field public static final int TYPE_FILE = 1; // 0x1
}
@@ -6905,6 +6964,7 @@
public class BackupDataOutput {
method public long getQuota();
+ method public int getTransportFlags();
method public int writeEntityData(byte[], int) throws java.io.IOException;
method public int writeEntityHeader(java.lang.String, int) throws java.io.IOException;
}
@@ -6919,7 +6979,7 @@
ctor public BackupManager(android.content.Context);
method public void dataChanged();
method public static void dataChanged(java.lang.String);
- method public int requestRestore(android.app.backup.RestoreObserver);
+ method public deprecated int requestRestore(android.app.backup.RestoreObserver);
}
public class FileBackupHelper implements android.app.backup.BackupHelper {
@@ -6930,6 +6990,7 @@
public class FullBackupDataOutput {
method public long getQuota();
+ method public int getTransportFlags();
}
public abstract class RestoreObserver {
@@ -7100,6 +7161,7 @@
method public android.net.Uri getUri();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.app.slice.Slice> CREATOR;
+ field public static final java.lang.String EXTRA_SLIDER_VALUE = "android.app.slice.extra.SLIDER_VALUE";
field public static final java.lang.String EXTRA_TOGGLE_STATE = "android.app.slice.extra.TOGGLE_STATE";
field public static final java.lang.String HINT_ACTIONS = "actions";
field public static final java.lang.String HINT_CALLER_NEEDED = "caller_needed";
@@ -7107,7 +7169,6 @@
field public static final java.lang.String HINT_LARGE = "large";
field public static final java.lang.String HINT_LIST = "list";
field public static final java.lang.String HINT_LIST_ITEM = "list_item";
- field public static final java.lang.String HINT_MAX = "max";
field public static final java.lang.String HINT_NO_TINT = "no_tint";
field public static final java.lang.String HINT_PARTIAL = "partial";
field public static final java.lang.String HINT_SEE_MORE = "see_more";
@@ -7117,11 +7178,13 @@
field public static final java.lang.String HINT_TITLE = "title";
field public static final java.lang.String SUBTYPE_COLOR = "color";
field public static final java.lang.String SUBTYPE_CONTENT_DESCRIPTION = "content_description";
+ field public static final java.lang.String SUBTYPE_MAX = "max";
field public static final java.lang.String SUBTYPE_MESSAGE = "message";
field public static final java.lang.String SUBTYPE_PRIORITY = "priority";
field public static final java.lang.String SUBTYPE_SLIDER = "slider";
field public static final java.lang.String SUBTYPE_SOURCE = "source";
field public static final java.lang.String SUBTYPE_TOGGLE = "toggle";
+ field public static final java.lang.String SUBTYPE_VALUE = "value";
}
public static class Slice.Builder {
@@ -8747,6 +8810,7 @@
method public void onSecurityException(android.accounts.Account, android.os.Bundle, java.lang.String, android.content.SyncResult);
method public void onSyncCanceled();
method public void onSyncCanceled(java.lang.Thread);
+ method public boolean onUnsyncableAccount();
field public static final deprecated int LOG_SYNC_DETAILS = 2743; // 0xab7
}
@@ -9979,6 +10043,7 @@
field public static final int FLAG_ACTIVITY_FORWARD_RESULT = 33554432; // 0x2000000
field public static final int FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY = 1048576; // 0x100000
field public static final int FLAG_ACTIVITY_LAUNCH_ADJACENT = 4096; // 0x1000
+ field public static final int FLAG_ACTIVITY_MATCH_EXTERNAL = 2048; // 0x800
field public static final int FLAG_ACTIVITY_MULTIPLE_TASK = 134217728; // 0x8000000
field public static final int FLAG_ACTIVITY_NEW_DOCUMENT = 524288; // 0x80000
field public static final int FLAG_ACTIVITY_NEW_TASK = 268435456; // 0x10000000
@@ -11126,6 +11191,7 @@
field public static final java.lang.String FEATURE_BLUETOOTH_LE = "android.hardware.bluetooth_le";
field public static final java.lang.String FEATURE_CAMERA = "android.hardware.camera";
field public static final java.lang.String FEATURE_CAMERA_ANY = "android.hardware.camera.any";
+ field public static final java.lang.String FEATURE_CAMERA_AR = "android.hardware.camera.ar";
field public static final java.lang.String FEATURE_CAMERA_AUTOFOCUS = "android.hardware.camera.autofocus";
field public static final java.lang.String FEATURE_CAMERA_CAPABILITY_MANUAL_POST_PROCESSING = "android.hardware.camera.capability.manual_post_processing";
field public static final java.lang.String FEATURE_CAMERA_CAPABILITY_MANUAL_SENSOR = "android.hardware.camera.capability.manual_sensor";
@@ -11185,6 +11251,7 @@
field public static final java.lang.String FEATURE_SENSOR_STEP_DETECTOR = "android.hardware.sensor.stepdetector";
field public static final java.lang.String FEATURE_SIP = "android.software.sip";
field public static final java.lang.String FEATURE_SIP_VOIP = "android.software.sip.voip";
+ field public static final java.lang.String FEATURE_STRONGBOX_KEYSTORE = "android.hardware.strongbox_keystore";
field public static final java.lang.String FEATURE_TELEPHONY = "android.hardware.telephony";
field public static final java.lang.String FEATURE_TELEPHONY_CDMA = "android.hardware.telephony.cdma";
field public static final java.lang.String FEATURE_TELEPHONY_GSM = "android.hardware.telephony.gsm";
@@ -13547,6 +13614,7 @@
public static class ImageDecoder.ImageInfo {
method public java.lang.String getMimeType();
method public android.util.Size getSize();
+ method public boolean isAnimated();
}
public static class ImageDecoder.IncompleteException extends java.io.IOException {
@@ -14417,6 +14485,22 @@
method public void onAnimationStart(android.graphics.drawable.Drawable);
}
+ public class AnimatedImageDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Animatable2 {
+ ctor public AnimatedImageDrawable();
+ method public void clearAnimationCallbacks();
+ method public void draw(android.graphics.Canvas);
+ method public int getOpacity();
+ method public boolean isRunning();
+ method public void registerAnimationCallback(android.graphics.drawable.Animatable2.AnimationCallback);
+ method public void setAlpha(int);
+ method public void setColorFilter(android.graphics.ColorFilter);
+ method public void setLoopCount(int);
+ method public void start();
+ method public void stop();
+ method public boolean unregisterAnimationCallback(android.graphics.drawable.Animatable2.AnimationCallback);
+ field public static final int LOOP_INFINITE = -1; // 0xffffffff
+ }
+
public class AnimatedStateListDrawable extends android.graphics.drawable.StateListDrawable {
ctor public AnimatedStateListDrawable();
method public void addState(int[], android.graphics.drawable.Drawable, int);
@@ -16209,6 +16293,7 @@
public final class TotalCaptureResult extends android.hardware.camera2.CaptureResult {
method public java.util.List<android.hardware.camera2.CaptureResult> getPartialResults();
+ method public <T> T getPhysicalCameraKey(android.hardware.camera2.CaptureResult.Key<T>, java.lang.String);
}
}
@@ -22078,6 +22163,7 @@
method public int getChannelConfiguration();
method public int getChannelCount();
method public android.media.AudioFormat getFormat();
+ method public android.os.PersistableBundle getMetrics();
method public static int getMinBufferSize(int, int, int);
method public int getNotificationMarkerPosition();
method public int getPositionNotificationPeriod();
@@ -22126,6 +22212,14 @@
method public android.media.AudioRecord.Builder setBufferSizeInBytes(int) throws java.lang.IllegalArgumentException;
}
+ public static final class AudioRecord.MetricsConstants {
+ field public static final java.lang.String CHANNELS = "android.media.audiorecord.channels";
+ field public static final java.lang.String ENCODING = "android.media.audiorecord.encoding";
+ field public static final java.lang.String LATENCY = "android.media.audiorecord.latency";
+ field public static final java.lang.String SAMPLERATE = "android.media.audiorecord.samplerate";
+ field public static final java.lang.String SOURCE = "android.media.audiorecord.source";
+ }
+
public static abstract interface AudioRecord.OnRecordPositionUpdateListener {
method public abstract void onMarkerReached(android.media.AudioRecord);
method public abstract void onPeriodicNotification(android.media.AudioRecord);
@@ -22185,6 +22279,7 @@
method public int getChannelCount();
method public android.media.AudioFormat getFormat();
method public static float getMaxVolume();
+ method public android.os.PersistableBundle getMetrics();
method public static int getMinBufferSize(int, int, int);
method public static float getMinVolume();
method protected deprecated int getNativeFrameCount();
@@ -22265,6 +22360,14 @@
method public android.media.AudioTrack.Builder setTransferMode(int) throws java.lang.IllegalArgumentException;
}
+ public static final class AudioTrack.MetricsConstants {
+ field public static final java.lang.String CHANNELMASK = "android.media.audiorecord.channelmask";
+ field public static final java.lang.String CONTENTTYPE = "android.media.audiotrack.type";
+ field public static final java.lang.String SAMPLERATE = "android.media.audiorecord.samplerate";
+ field public static final java.lang.String STREAMTYPE = "android.media.audiotrack.streamtype";
+ field public static final java.lang.String USAGE = "android.media.audiotrack.usage";
+ }
+
public static abstract interface AudioTrack.OnPlaybackPositionUpdateListener {
method public abstract void onMarkerReached(android.media.AudioTrack);
method public abstract void onPeriodicNotification(android.media.AudioTrack);
@@ -22333,6 +22436,40 @@
field public static final int QUALITY_MEDIUM = 1; // 0x1
}
+ public final class DataSourceDesc {
+ method public long getEndPosition();
+ method public java.io.FileDescriptor getFileDescriptor();
+ method public long getFileDescriptorLength();
+ method public long getFileDescriptorOffset();
+ method public long getId();
+ method public android.media.Media2DataSource getMedia2DataSource();
+ method public long getStartPosition();
+ method public int getType();
+ method public android.net.Uri getUri();
+ method public android.content.Context getUriContext();
+ method public java.util.List<java.net.HttpCookie> getUriCookies();
+ method public java.util.Map<java.lang.String, java.lang.String> getUriHeaders();
+ field public static final long LONG_MAX = 576460752303423487L; // 0x7ffffffffffffffL
+ field public static final int TYPE_CALLBACK = 1; // 0x1
+ field public static final int TYPE_FD = 2; // 0x2
+ field public static final int TYPE_NONE = 0; // 0x0
+ field public static final int TYPE_URI = 3; // 0x3
+ }
+
+ public static class DataSourceDesc.Builder {
+ ctor public DataSourceDesc.Builder();
+ ctor public DataSourceDesc.Builder(android.media.DataSourceDesc);
+ method public android.media.DataSourceDesc build();
+ method public android.media.DataSourceDesc.Builder setDataSource(android.media.Media2DataSource);
+ method public android.media.DataSourceDesc.Builder setDataSource(java.io.FileDescriptor);
+ method public android.media.DataSourceDesc.Builder setDataSource(java.io.FileDescriptor, long, long);
+ method public android.media.DataSourceDesc.Builder setDataSource(android.content.Context, android.net.Uri);
+ method public android.media.DataSourceDesc.Builder setDataSource(android.content.Context, android.net.Uri, java.util.Map<java.lang.String, java.lang.String>, java.util.List<java.net.HttpCookie>);
+ method public android.media.DataSourceDesc.Builder setEndPosition(long);
+ method public android.media.DataSourceDesc.Builder setId(long);
+ method public android.media.DataSourceDesc.Builder setStartPosition(long);
+ }
+
public final class DeniedByServerException extends android.media.MediaDrmException {
ctor public DeniedByServerException(java.lang.String);
}
@@ -22609,6 +22746,12 @@
method public abstract void onJetUserIdUpdate(android.media.JetPlayer, int, int);
}
+ public abstract class Media2DataSource implements java.io.Closeable {
+ ctor public Media2DataSource();
+ method public abstract long getSize() throws java.io.IOException;
+ method public abstract int readAt(long, byte[], int, int) throws java.io.IOException;
+ }
+
public class MediaActionSound {
ctor public MediaActionSound();
method public void load(int);
@@ -23063,6 +23206,7 @@
public static final class MediaCodecInfo.EncoderCapabilities {
method public android.util.Range<java.lang.Integer> getComplexityRange();
+ method public android.util.Range<java.lang.Integer> getQualityRange();
method public boolean isBitrateModeSupported(int);
field public static final int BITRATE_MODE_CBR = 2; // 0x2
field public static final int BITRATE_MODE_CQ = 0; // 0x0
@@ -23167,11 +23311,13 @@
method public android.media.MediaDrm.KeyRequest getKeyRequest(byte[], byte[], java.lang.String, int, java.util.HashMap<java.lang.String, java.lang.String>) throws android.media.NotProvisionedException;
method public int getMaxHdcpLevel();
method public int getMaxSessionCount();
+ method public android.os.PersistableBundle getMetrics();
method public int getOpenSessionCount();
method public byte[] getPropertyByteArray(java.lang.String);
method public java.lang.String getPropertyString(java.lang.String);
method public android.media.MediaDrm.ProvisionRequest getProvisionRequest();
method public byte[] getSecureStop(byte[]);
+ method public java.util.List<byte[]> getSecureStopIds();
method public java.util.List<byte[]> getSecureStops();
method public int getSecurityLevel(byte[]);
method public static final boolean isCryptoSchemeSupported(java.util.UUID);
@@ -23181,9 +23327,11 @@
method public void provideProvisionResponse(byte[]) throws android.media.DeniedByServerException;
method public java.util.HashMap<java.lang.String, java.lang.String> queryKeyStatus(byte[]);
method public deprecated void release();
- method public void releaseAllSecureStops();
+ method public deprecated void releaseAllSecureStops();
method public void releaseSecureStops(byte[]);
+ method public void removeAllSecureStops();
method public void removeKeys(byte[]);
+ method public void removeSecureStop(byte[]);
method public void restoreKeys(byte[], byte[]);
method public void setOnEventListener(android.media.MediaDrm.OnEventListener);
method public void setOnExpirationUpdateListener(android.media.MediaDrm.OnExpirationUpdateListener, android.os.Handler);
@@ -23234,8 +23382,10 @@
method public java.lang.String getDefaultUrl();
method public int getRequestType();
field public static final int REQUEST_TYPE_INITIAL = 0; // 0x0
+ field public static final int REQUEST_TYPE_NONE = 3; // 0x3
field public static final int REQUEST_TYPE_RELEASE = 2; // 0x2
field public static final int REQUEST_TYPE_RENEWAL = 1; // 0x1
+ field public static final int REQUEST_TYPE_UPDATE = 4; // 0x4
}
public static final class MediaDrm.KeyStatus {
@@ -23252,6 +23402,44 @@
method public java.lang.String getDiagnosticInfo();
}
+ public static final class MediaDrm.MetricsConstants {
+ field public static final java.lang.String CLOSE_SESSION_ERROR_COUNT = "drm.mediadrm.close_session.error.count";
+ field public static final java.lang.String CLOSE_SESSION_ERROR_LIST = "drm.mediadrm.close_session.error.list";
+ field public static final java.lang.String CLOSE_SESSION_OK_COUNT = "drm.mediadrm.close_session.ok.count";
+ field public static final java.lang.String EVENT_KEY_EXPIRED_COUNT = "drm.mediadrm.event.KEY_EXPIRED.count";
+ field public static final java.lang.String EVENT_KEY_NEEDED_COUNT = "drm.mediadrm.event.KEY_NEEDED.count";
+ field public static final java.lang.String EVENT_PROVISION_REQUIRED_COUNT = "drm.mediadrm.event.PROVISION_REQUIRED.count";
+ field public static final java.lang.String EVENT_SESSION_RECLAIMED_COUNT = "drm.mediadrm.event.SESSION_RECLAIMED.count";
+ field public static final java.lang.String EVENT_VENDOR_DEFINED_COUNT = "drm.mediadrm.event.VENDOR_DEFINED.count";
+ field public static final java.lang.String GET_DEVICE_UNIQUE_ID_ERROR_COUNT = "drm.mediadrm.get_device_unique_id.error.count";
+ field public static final java.lang.String GET_DEVICE_UNIQUE_ID_ERROR_LIST = "drm.mediadrm.get_device_unique_id.error.list";
+ field public static final java.lang.String GET_DEVICE_UNIQUE_ID_OK_COUNT = "drm.mediadrm.get_device_unique_id.ok.count";
+ field public static final java.lang.String GET_KEY_REQUEST_ERROR_COUNT = "drm.mediadrm.get_key_request.error.count";
+ field public static final java.lang.String GET_KEY_REQUEST_ERROR_LIST = "drm.mediadrm.get_key_request.error.list";
+ field public static final java.lang.String GET_KEY_REQUEST_OK_COUNT = "drm.mediadrm.get_key_request.ok.count";
+ field public static final java.lang.String GET_KEY_REQUEST_OK_TIME_MICROS = "drm.mediadrm.get_key_request.ok.average_time_micros";
+ field public static final java.lang.String GET_PROVISION_REQUEST_ERROR_COUNT = "drm.mediadrm.get_provision_request.error.count";
+ field public static final java.lang.String GET_PROVISION_REQUEST_ERROR_LIST = "drm.mediadrm.get_provision_request.error.list";
+ field public static final java.lang.String GET_PROVISION_REQUEST_OK_COUNT = "drm.mediadrm.get_provision_request.ok.count";
+ field public static final java.lang.String KEY_STATUS_EXPIRED_COUNT = "drm.mediadrm.key_status.EXPIRED.count";
+ field public static final java.lang.String KEY_STATUS_INTERNAL_ERROR_COUNT = "drm.mediadrm.key_status.INTERNAL_ERROR.count";
+ field public static final java.lang.String KEY_STATUS_OUTPUT_NOT_ALLOWED_COUNT = "drm.mediadrm.key_status_change.OUTPUT_NOT_ALLOWED.count";
+ field public static final java.lang.String KEY_STATUS_PENDING_COUNT = "drm.mediadrm.key_status_change.PENDING.count";
+ field public static final java.lang.String KEY_STATUS_USABLE_COUNT = "drm.mediadrm.key_status_change.USABLE.count";
+ field public static final java.lang.String OPEN_SESSION_ERROR_COUNT = "drm.mediadrm.open_session.error.count";
+ field public static final java.lang.String OPEN_SESSION_ERROR_LIST = "drm.mediadrm.open_session.error.list";
+ field public static final java.lang.String OPEN_SESSION_OK_COUNT = "drm.mediadrm.open_session.ok.count";
+ field public static final java.lang.String PROVIDE_KEY_RESPONSE_ERROR_COUNT = "drm.mediadrm.provide_key_response.error.count";
+ field public static final java.lang.String PROVIDE_KEY_RESPONSE_ERROR_LIST = "drm.mediadrm.provide_key_response.error.list";
+ field public static final java.lang.String PROVIDE_KEY_RESPONSE_OK_COUNT = "drm.mediadrm.provide_key_response.ok.count";
+ field public static final java.lang.String PROVIDE_KEY_RESPONSE_OK_TIME_MICROS = "drm.mediadrm.provide_key_response.ok.average_time_micros";
+ field public static final java.lang.String PROVIDE_PROVISION_RESPONSE_ERROR_COUNT = "drm.mediadrm.provide_provision_response.error.count";
+ field public static final java.lang.String PROVIDE_PROVISION_RESPONSE_ERROR_LIST = "drm.mediadrm.provide_provision_response.error.list";
+ field public static final java.lang.String PROVIDE_PROVISION_RESPONSE_OK_COUNT = "drm.mediadrm.provide_provision_response.ok.count";
+ field public static final java.lang.String SESSION_END_TIMES_MS = "drm.mediadrm.session_end_times_ms";
+ field public static final java.lang.String SESSION_START_TIMES_MS = "drm.mediadrm.session_start_times_ms";
+ }
+
public static abstract interface MediaDrm.OnEventListener {
method public abstract void onEvent(android.media.MediaDrm, byte[], int, int, byte[]);
}
@@ -23291,6 +23479,7 @@
method public java.util.Map<java.util.UUID, byte[]> getPsshInfo();
method public boolean getSampleCryptoInfo(android.media.MediaCodec.CryptoInfo);
method public int getSampleFlags();
+ method public long getSampleSize();
method public long getSampleTime();
method public int getSampleTrackIndex();
method public final int getTrackCount();
@@ -23403,6 +23592,7 @@
field public static final java.lang.String KEY_PRIORITY = "priority";
field public static final java.lang.String KEY_PROFILE = "profile";
field public static final java.lang.String KEY_PUSH_BLANK_BUFFERS_ON_STOP = "push-blank-buffers-on-shutdown";
+ field public static final java.lang.String KEY_QUALITY = "quality";
field public static final java.lang.String KEY_REPEAT_PREVIOUS_FRAME_AFTER = "repeat-previous-frame-after";
field public static final java.lang.String KEY_ROTATION = "rotation-degrees";
field public static final java.lang.String KEY_SAMPLE_RATE = "sample-rate";
@@ -23803,6 +23993,169 @@
field public static final int MEDIA_TRACK_TYPE_VIDEO = 1; // 0x1
}
+ public abstract class MediaPlayer2 implements android.media.AudioRouting java.lang.AutoCloseable {
+ method public abstract void addPlaylistItem(int, android.media.DataSourceDesc);
+ method public abstract void attachAuxEffect(int);
+ method public abstract void clearPendingCommands();
+ method public abstract void close();
+ method public static final android.media.MediaPlayer2 create();
+ method public abstract void deselectTrack(int);
+ method public abstract android.media.DataSourceDesc editPlaylistItem(int, android.media.DataSourceDesc);
+ method public abstract int getAudioSessionId();
+ method public abstract android.media.DataSourceDesc getCurrentDataSource();
+ method public abstract int getCurrentPlaylistItemIndex();
+ method public abstract int getCurrentPosition();
+ method public abstract android.media.MediaPlayer2.DrmInfo getDrmInfo();
+ method public abstract java.lang.String getDrmPropertyString(java.lang.String) throws android.media.MediaPlayer2.NoDrmSchemeException;
+ method public abstract int getDuration();
+ method public abstract android.media.MediaDrm.KeyRequest getKeyRequest(byte[], byte[], java.lang.String, int, java.util.Map<java.lang.String, java.lang.String>) throws android.media.MediaPlayer2.NoDrmSchemeException;
+ method public abstract int getLoopingMode();
+ method public abstract android.os.PersistableBundle getMetrics();
+ method public abstract android.media.PlaybackParams getPlaybackParams();
+ method public abstract java.util.List<android.media.DataSourceDesc> getPlaylist();
+ method public abstract int getSelectedTrack(int);
+ method public abstract android.media.SyncParams getSyncParams();
+ method public abstract android.media.MediaTimestamp getTimestamp();
+ method public abstract java.util.List<android.media.MediaPlayer2.TrackInfo> getTrackInfo();
+ method public abstract int getVideoHeight();
+ method public abstract int getVideoWidth();
+ method public abstract boolean isPlaying();
+ method public abstract void movePlaylistItem(int, int);
+ method public abstract void pause();
+ method public abstract void play();
+ method public abstract void prepareAsync();
+ method public abstract void prepareDrm(java.util.UUID) throws android.media.MediaPlayer2.ProvisioningNetworkErrorException, android.media.MediaPlayer2.ProvisioningServerErrorException, android.media.ResourceBusyException, android.media.UnsupportedSchemeException;
+ method public abstract byte[] provideKeyResponse(byte[], byte[]) throws android.media.DeniedByServerException, android.media.MediaPlayer2.NoDrmSchemeException;
+ method public abstract void registerDrmEventCallback(java.util.concurrent.Executor, android.media.MediaPlayer2.DrmEventCallback);
+ method public abstract void registerEventCallback(java.util.concurrent.Executor, android.media.MediaPlayer2.EventCallback);
+ method public abstract void releaseDrm() throws android.media.MediaPlayer2.NoDrmSchemeException;
+ method public abstract android.media.DataSourceDesc removePlaylistItem(int);
+ method public abstract void reset();
+ method public abstract void restoreKeys(byte[]) throws android.media.MediaPlayer2.NoDrmSchemeException;
+ method public abstract void seekTo(long, int);
+ method public abstract void selectTrack(int);
+ method public abstract void setAudioAttributes(android.media.AudioAttributes);
+ method public abstract void setAudioSessionId(int);
+ method public abstract void setAuxEffectSendLevel(float);
+ method public abstract void setCurrentPlaylistItem(int);
+ method public abstract void setDataSource(android.media.DataSourceDesc) throws java.io.IOException;
+ method public abstract void setDrmPropertyString(java.lang.String, java.lang.String) throws android.media.MediaPlayer2.NoDrmSchemeException;
+ method public abstract void setLoopingMode(int);
+ method public abstract void setNextPlaylistItem(int);
+ method public abstract void setOnDrmConfigHelper(android.media.MediaPlayer2.OnDrmConfigHelper);
+ method public abstract void setPlaybackParams(android.media.PlaybackParams);
+ method public abstract void setPlaylist(java.util.List<android.media.DataSourceDesc>, int) throws java.io.IOException;
+ method public abstract void setSurface(android.view.Surface);
+ method public abstract void setSyncParams(android.media.SyncParams);
+ method public abstract void setVolume(float, float);
+ method public abstract void unregisterDrmEventCallback(android.media.MediaPlayer2.DrmEventCallback);
+ method public abstract void unregisterEventCallback(android.media.MediaPlayer2.EventCallback);
+ field public static final int LOOPING_MODE_FULL = 1; // 0x1
+ field public static final int LOOPING_MODE_NONE = 0; // 0x0
+ field public static final int LOOPING_MODE_SHUFFLE = 3; // 0x3
+ field public static final int LOOPING_MODE_SINGLE = 2; // 0x2
+ field public static final int MEDIA_ERROR_IO = -1004; // 0xfffffc14
+ field public static final int MEDIA_ERROR_MALFORMED = -1007; // 0xfffffc11
+ field public static final int MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK = 200; // 0xc8
+ field public static final int MEDIA_ERROR_TIMED_OUT = -110; // 0xffffff92
+ field public static final int MEDIA_ERROR_UNKNOWN = 1; // 0x1
+ field public static final int MEDIA_ERROR_UNSUPPORTED = -1010; // 0xfffffc0e
+ field public static final int MEDIA_INFO_AUDIO_NOT_PLAYING = 804; // 0x324
+ field public static final int MEDIA_INFO_AUDIO_RENDERING_START = 4; // 0x4
+ field public static final int MEDIA_INFO_BAD_INTERLEAVING = 800; // 0x320
+ field public static final int MEDIA_INFO_BUFFERING_END = 702; // 0x2be
+ field public static final int MEDIA_INFO_BUFFERING_START = 701; // 0x2bd
+ field public static final int MEDIA_INFO_COMPLETE_CALL_PAUSE = 102; // 0x66
+ field public static final int MEDIA_INFO_COMPLETE_CALL_PLAY = 101; // 0x65
+ field public static final int MEDIA_INFO_COMPLETE_CALL_SEEK = 103; // 0x67
+ field public static final int MEDIA_INFO_METADATA_UPDATE = 802; // 0x322
+ field public static final int MEDIA_INFO_NOT_SEEKABLE = 801; // 0x321
+ field public static final int MEDIA_INFO_PLAYBACK_COMPLETE = 5; // 0x5
+ field public static final int MEDIA_INFO_PLAYLIST_END = 6; // 0x6
+ field public static final int MEDIA_INFO_PREPARED = 100; // 0x64
+ field public static final int MEDIA_INFO_STARTED_AS_NEXT = 2; // 0x2
+ field public static final int MEDIA_INFO_SUBTITLE_TIMED_OUT = 902; // 0x386
+ field public static final int MEDIA_INFO_UNKNOWN = 1; // 0x1
+ field public static final int MEDIA_INFO_UNSUPPORTED_SUBTITLE = 901; // 0x385
+ field public static final int MEDIA_INFO_VIDEO_NOT_PLAYING = 805; // 0x325
+ field public static final int MEDIA_INFO_VIDEO_RENDERING_START = 3; // 0x3
+ field public static final int MEDIA_INFO_VIDEO_TRACK_LAGGING = 700; // 0x2bc
+ field public static final int PREPARE_DRM_STATUS_PREPARATION_ERROR = 3; // 0x3
+ field public static final int PREPARE_DRM_STATUS_PROVISIONING_NETWORK_ERROR = 1; // 0x1
+ field public static final int PREPARE_DRM_STATUS_PROVISIONING_SERVER_ERROR = 2; // 0x2
+ field public static final int PREPARE_DRM_STATUS_SUCCESS = 0; // 0x0
+ field public static final int SEEK_CLOSEST = 3; // 0x3
+ field public static final int SEEK_CLOSEST_SYNC = 2; // 0x2
+ field public static final int SEEK_NEXT_SYNC = 1; // 0x1
+ field public static final int SEEK_PREVIOUS_SYNC = 0; // 0x0
+ field public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT = 1; // 0x1
+ }
+
+ public static abstract class MediaPlayer2.DrmEventCallback {
+ ctor public MediaPlayer2.DrmEventCallback();
+ method public void onDrmInfo(android.media.MediaPlayer2, android.media.MediaPlayer2.DrmInfo);
+ method public void onDrmPrepared(android.media.MediaPlayer2, int);
+ }
+
+ public static abstract class MediaPlayer2.DrmInfo {
+ ctor public MediaPlayer2.DrmInfo();
+ method public abstract java.util.Map<java.util.UUID, byte[]> getPssh();
+ method public abstract java.util.List<java.util.UUID> getSupportedSchemes();
+ }
+
+ public static abstract class MediaPlayer2.EventCallback {
+ ctor public MediaPlayer2.EventCallback();
+ method public void onBufferingUpdate(android.media.MediaPlayer2, long, int);
+ method public void onError(android.media.MediaPlayer2, long, int, int);
+ method public void onInfo(android.media.MediaPlayer2, long, int, int);
+ method public void onTimedMetaDataAvailable(android.media.MediaPlayer2, long, android.media.TimedMetaData);
+ method public void onVideoSizeChanged(android.media.MediaPlayer2, long, int, int);
+ }
+
+ public static final class MediaPlayer2.MetricsConstants {
+ field public static final java.lang.String CODEC_AUDIO = "android.media.mediaplayer.audio.codec";
+ field public static final java.lang.String CODEC_VIDEO = "android.media.mediaplayer.video.codec";
+ field public static final java.lang.String DURATION = "android.media.mediaplayer.durationMs";
+ field public static final java.lang.String ERRORS = "android.media.mediaplayer.err";
+ field public static final java.lang.String ERROR_CODE = "android.media.mediaplayer.errcode";
+ field public static final java.lang.String FRAMES = "android.media.mediaplayer.frames";
+ field public static final java.lang.String FRAMES_DROPPED = "android.media.mediaplayer.dropped";
+ field public static final java.lang.String HEIGHT = "android.media.mediaplayer.height";
+ field public static final java.lang.String MIME_TYPE_AUDIO = "android.media.mediaplayer.audio.mime";
+ field public static final java.lang.String MIME_TYPE_VIDEO = "android.media.mediaplayer.video.mime";
+ field public static final java.lang.String PLAYING = "android.media.mediaplayer.playingMs";
+ field public static final java.lang.String WIDTH = "android.media.mediaplayer.width";
+ }
+
+ public static abstract class MediaPlayer2.NoDrmSchemeException extends android.media.MediaDrmException {
+ ctor protected MediaPlayer2.NoDrmSchemeException(java.lang.String);
+ }
+
+ public static abstract interface MediaPlayer2.OnDrmConfigHelper {
+ method public abstract void onDrmConfig(android.media.MediaPlayer2);
+ }
+
+ public static abstract class MediaPlayer2.ProvisioningNetworkErrorException extends android.media.MediaDrmException {
+ ctor protected MediaPlayer2.ProvisioningNetworkErrorException(java.lang.String);
+ }
+
+ public static abstract class MediaPlayer2.ProvisioningServerErrorException extends android.media.MediaDrmException {
+ ctor protected MediaPlayer2.ProvisioningServerErrorException(java.lang.String);
+ }
+
+ public static abstract class MediaPlayer2.TrackInfo {
+ ctor public MediaPlayer2.TrackInfo();
+ method public abstract android.media.MediaFormat getFormat();
+ method public abstract java.lang.String getLanguage();
+ method public abstract int getTrackType();
+ method public abstract java.lang.String toString();
+ field public static final int MEDIA_TRACK_TYPE_AUDIO = 2; // 0x2
+ field public static final int MEDIA_TRACK_TYPE_METADATA = 5; // 0x5
+ field public static final int MEDIA_TRACK_TYPE_SUBTITLE = 4; // 0x4
+ field public static final int MEDIA_TRACK_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int MEDIA_TRACK_TYPE_VIDEO = 1; // 0x1
+ }
+
public class MediaRecorder implements android.media.AudioRouting {
ctor public MediaRecorder();
method public void addOnRoutingChangedListener(android.media.AudioRouting.OnRoutingChangedListener, android.os.Handler);
@@ -27369,14 +27722,14 @@
field public java.lang.String providerFriendlyName;
field public long[] roamingConsortiumIds;
field public int status;
- field public java.lang.String[] wepKeys;
- field public int wepTxKeyIndex;
+ field public deprecated java.lang.String[] wepKeys;
+ field public deprecated int wepTxKeyIndex;
}
public static class WifiConfiguration.AuthAlgorithm {
field public static final int LEAP = 2; // 0x2
field public static final int OPEN = 0; // 0x0
- field public static final int SHARED = 1; // 0x1
+ field public static final deprecated int SHARED = 1; // 0x1
field public static final java.lang.String[] strings;
field public static final java.lang.String varName = "auth_alg";
}
@@ -27384,8 +27737,8 @@
public static class WifiConfiguration.GroupCipher {
field public static final int CCMP = 3; // 0x3
field public static final int TKIP = 2; // 0x2
- field public static final int WEP104 = 1; // 0x1
- field public static final int WEP40 = 0; // 0x0
+ field public static final deprecated int WEP104 = 1; // 0x1
+ field public static final deprecated int WEP40 = 0; // 0x0
field public static final java.lang.String[] strings;
field public static final java.lang.String varName = "group";
}
@@ -27394,7 +27747,7 @@
field public static final int IEEE8021X = 3; // 0x3
field public static final int NONE = 0; // 0x0
field public static final int WPA_EAP = 2; // 0x2
- field public static final int WPA_PSK = 1; // 0x1
+ field public static final deprecated int WPA_PSK = 1; // 0x1
field public static final java.lang.String[] strings;
field public static final java.lang.String varName = "key_mgmt";
}
@@ -27402,14 +27755,14 @@
public static class WifiConfiguration.PairwiseCipher {
field public static final int CCMP = 2; // 0x2
field public static final int NONE = 0; // 0x0
- field public static final int TKIP = 1; // 0x1
+ field public static final deprecated int TKIP = 1; // 0x1
field public static final java.lang.String[] strings;
field public static final java.lang.String varName = "pairwise";
}
public static class WifiConfiguration.Protocol {
field public static final int RSN = 1; // 0x1
- field public static final int WPA = 0; // 0x0
+ field public static final deprecated int WPA = 0; // 0x0
field public static final java.lang.String[] strings;
field public static final java.lang.String varName = "proto";
}
@@ -35924,6 +36277,7 @@
field public static final java.lang.String ACTION_SETTINGS = "android.settings.SETTINGS";
field public static final java.lang.String ACTION_SHOW_REGULATORY_INFO = "android.settings.SHOW_REGULATORY_INFO";
field public static final java.lang.String ACTION_SOUND_SETTINGS = "android.settings.SOUND_SETTINGS";
+ field public static final java.lang.String ACTION_STORAGE_VOLUME_ACCESS_SETTINGS = "android.settings.STORAGE_VOLUME_ACCESS_SETTINGS";
field public static final java.lang.String ACTION_SYNC_SETTINGS = "android.settings.SYNC_SETTINGS";
field public static final java.lang.String ACTION_USAGE_ACCESS_SETTINGS = "android.settings.USAGE_ACCESS_SETTINGS";
field public static final java.lang.String ACTION_USER_DICTIONARY_SETTINGS = "android.settings.USER_DICTIONARY_SETTINGS";
@@ -36229,6 +36583,18 @@
field public static final deprecated java.lang.String WINDOW_ANIMATION_SCALE = "window_animation_scale";
}
+ public class SettingsSlicesContract {
+ field public static final java.lang.String AUTHORITY = "android.settings.slices";
+ field public static final android.net.Uri BASE_URI;
+ field public static final java.lang.String KEY_AIRPLANE_MODE = "airplane_mode";
+ field public static final java.lang.String KEY_BATTERY_SAVER = "battery_saver";
+ field public static final java.lang.String KEY_BLUETOOTH = "bluetooth";
+ field public static final java.lang.String KEY_LOCATION = "location";
+ field public static final java.lang.String KEY_WIFI = "wifi";
+ field public static final java.lang.String PATH_SETTING_ACTION = "action";
+ field public static final java.lang.String PATH_SETTING_INTENT = "intent";
+ }
+
public class SyncStateContract {
ctor public SyncStateContract();
}
@@ -36475,6 +36841,7 @@
field public static final int RESULT_SMS_HANDLED = 1; // 0x1
field public static final int RESULT_SMS_OUT_OF_MEMORY = 3; // 0x3
field public static final int RESULT_SMS_UNSUPPORTED = 4; // 0x4
+ field public static final java.lang.String SECRET_CODE_ACTION = "android.provider.Telephony.SECRET_CODE";
field public static final java.lang.String SIM_FULL_ACTION = "android.provider.Telephony.SIM_FULL";
field public static final java.lang.String SMS_CB_RECEIVED_ACTION = "android.provider.Telephony.SMS_CB_RECEIVED";
field public static final java.lang.String SMS_DELIVER_ACTION = "android.provider.Telephony.SMS_DELIVER";
@@ -37765,6 +38132,59 @@
}
+package android.se.omapi {
+
+ public class Channel {
+ method public void close();
+ method public byte[] getSelectResponse();
+ method public android.se.omapi.Session getSession();
+ method public boolean isBasicChannel();
+ method public boolean isClosed();
+ method public boolean selectNext() throws java.io.IOException;
+ method public byte[] transmit(byte[]) throws java.io.IOException;
+ }
+
+ public abstract interface ISecureElementListener implements android.os.IInterface {
+ method public abstract void serviceConnected() throws android.os.RemoteException;
+ }
+
+ public static abstract class ISecureElementListener.Stub extends android.os.Binder implements android.se.omapi.ISecureElementListener {
+ ctor public ISecureElementListener.Stub();
+ method public android.os.IBinder asBinder();
+ method public static android.se.omapi.ISecureElementListener asInterface(android.os.IBinder);
+ method public boolean onTransact(int, android.os.Parcel, android.os.Parcel, int) throws android.os.RemoteException;
+ }
+
+ public class Reader {
+ method public void closeSessions();
+ method public java.lang.String getName();
+ method public android.se.omapi.SEService getSEService();
+ method public boolean isSecureElementPresent();
+ method public android.se.omapi.Session openSession() throws java.io.IOException;
+ }
+
+ public class SEService {
+ ctor public SEService(android.content.Context, android.se.omapi.ISecureElementListener);
+ method public android.se.omapi.Reader[] getReaders();
+ method public java.lang.String getVersion();
+ method public boolean isConnected();
+ method public void shutdown();
+ }
+
+ public class Session {
+ method public void close();
+ method public void closeChannels();
+ method public byte[] getATR();
+ method public android.se.omapi.Reader getReader();
+ method public boolean isClosed();
+ method public android.se.omapi.Channel openBasicChannel(byte[], byte) throws java.io.IOException;
+ method public android.se.omapi.Channel openBasicChannel(byte[]) throws java.io.IOException;
+ method public android.se.omapi.Channel openLogicalChannel(byte[], byte) throws java.io.IOException;
+ method public android.se.omapi.Channel openLogicalChannel(byte[]) throws java.io.IOException;
+ }
+
+}
+
package android.security {
public final class AttestedKeyPair {
@@ -37878,6 +38298,7 @@
method public boolean isInvalidatedByBiometricEnrollment();
method public boolean isRandomizedEncryptionRequired();
method public boolean isStrongBoxBacked();
+ method public boolean isTrustedUserPresenceRequired();
method public boolean isUserAuthenticationRequired();
method public boolean isUserAuthenticationValidWhileOnBody();
}
@@ -37903,6 +38324,7 @@
method public android.security.keystore.KeyGenParameterSpec.Builder setKeyValidityStart(java.util.Date);
method public android.security.keystore.KeyGenParameterSpec.Builder setRandomizedEncryptionRequired(boolean);
method public android.security.keystore.KeyGenParameterSpec.Builder setSignaturePaddings(java.lang.String...);
+ method public android.security.keystore.KeyGenParameterSpec.Builder setTrustedUserPresenceRequired(boolean);
method public android.security.keystore.KeyGenParameterSpec.Builder setUserAuthenticationRequired(boolean);
method public android.security.keystore.KeyGenParameterSpec.Builder setUserAuthenticationValidWhileOnBody(boolean);
method public android.security.keystore.KeyGenParameterSpec.Builder setUserAuthenticationValidityDurationSeconds(int);
@@ -37923,6 +38345,7 @@
method public int getUserAuthenticationValidityDurationSeconds();
method public boolean isInsideSecureHardware();
method public boolean isInvalidatedByBiometricEnrollment();
+ method public boolean isTrustedUserPresenceRequired();
method public boolean isUserAuthenticationRequired();
method public boolean isUserAuthenticationRequirementEnforcedBySecureHardware();
method public boolean isUserAuthenticationValidWhileOnBody();
@@ -38014,7 +38437,6 @@
}
public class StrongBoxUnavailableException extends java.security.ProviderException {
- ctor public StrongBoxUnavailableException();
}
public class UserNotAuthenticatedException extends java.security.InvalidKeyException {
@@ -38023,6 +38445,12 @@
ctor public UserNotAuthenticatedException(java.lang.String, java.lang.Throwable);
}
+ public class UserPresenceUnavailableException extends java.security.InvalidAlgorithmParameterException {
+ ctor public UserPresenceUnavailableException();
+ ctor public UserPresenceUnavailableException(java.lang.String);
+ ctor public UserPresenceUnavailableException(java.lang.String, java.lang.Throwable);
+ }
+
public class WrappedKeyEntry implements java.security.KeyStore.Entry {
ctor public WrappedKeyEntry(byte[], java.lang.String, java.lang.String, java.security.spec.AlgorithmParameterSpec);
method public java.security.spec.AlgorithmParameterSpec getAlgorithmParameterSpec();
@@ -38444,6 +38872,7 @@
method public void onWindowFocusChanged(boolean);
method public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback);
method public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback, int);
+ method public final <T extends android.view.View> T requireViewById(int);
method public void setContentView(int);
method public void setContentView(android.view.View);
method public void setContentView(android.view.View, android.view.ViewGroup.LayoutParams);
@@ -39259,11 +39688,6 @@
field public final int errno;
}
- public class Int32Ref {
- ctor public Int32Ref(int);
- field public int value;
- }
-
public class Int64Ref {
ctor public Int64Ref(long);
field public long value;
@@ -39363,7 +39787,6 @@
method public static int umask(int);
method public static android.system.StructUtsname uname();
method public static void unsetenv(java.lang.String) throws android.system.ErrnoException;
- method public static int waitpid(int, android.system.Int32Ref, int) throws android.system.ErrnoException;
method public static int write(java.io.FileDescriptor, java.nio.ByteBuffer) throws android.system.ErrnoException, java.io.InterruptedIOException;
method public static int write(java.io.FileDescriptor, byte[], int, int) throws android.system.ErrnoException, java.io.InterruptedIOException;
method public static int writev(java.io.FileDescriptor, java.lang.Object[], int[], int[]) throws android.system.ErrnoException, java.io.InterruptedIOException;
@@ -40188,6 +40611,7 @@
method public void onCallEvent(java.lang.String, android.os.Bundle);
method public void onDisconnect();
method public void onExtrasChanged(android.os.Bundle);
+ method public void onHandoverComplete();
method public void onHold();
method public void onPlayDtmfTone(char);
method public void onPostDialContinue(boolean);
@@ -40679,6 +41103,7 @@
field public static final deprecated java.lang.String ACTION_INCOMING_CALL = "android.telecom.action.INCOMING_CALL";
field public static final java.lang.String ACTION_PHONE_ACCOUNT_REGISTERED = "android.telecom.action.PHONE_ACCOUNT_REGISTERED";
field public static final java.lang.String ACTION_PHONE_ACCOUNT_UNREGISTERED = "android.telecom.action.PHONE_ACCOUNT_UNREGISTERED";
+ field public static final java.lang.String ACTION_SHOW_ASSISTED_DIALING_SETTINGS = "android.telecom.action.SHOW_ASSISTED_DIALING_SETTINGS";
field public static final java.lang.String ACTION_SHOW_CALL_ACCESSIBILITY_SETTINGS = "android.telecom.action.SHOW_CALL_ACCESSIBILITY_SETTINGS";
field public static final java.lang.String ACTION_SHOW_CALL_SETTINGS = "android.telecom.action.SHOW_CALL_SETTINGS";
field public static final java.lang.String ACTION_SHOW_MISSED_CALLS_NOTIFICATION = "android.telecom.action.SHOW_MISSED_CALLS_NOTIFICATION";
@@ -40775,6 +41200,7 @@
field public static final int EUTRAN = 3; // 0x3
field public static final int GERAN = 1; // 0x1
field public static final int IWLAN = 5; // 0x5
+ field public static final int UNKNOWN = 0; // 0x0
field public static final int UTRAN = 2; // 0x2
}
@@ -40879,6 +41305,8 @@
method public void notifyConfigChangedForSubId(int);
field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
field public static final int DATA_CYCLE_THRESHOLD_DISABLED = -2; // 0xfffffffe
+ field public static final java.lang.String EXTRA_SLOT_INDEX = "android.telephony.extra.SLOT_INDEX";
+ field public static final java.lang.String EXTRA_SUBSCRIPTION_INDEX = "android.telephony.extra.SUBSCRIPTION_INDEX";
field public static final java.lang.String KEY_ADDITIONAL_CALL_SETTING_BOOL = "additional_call_setting_bool";
field public static final java.lang.String KEY_ALLOW_ADDING_APNS_BOOL = "allow_adding_apns_bool";
field public static final java.lang.String KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL = "allow_add_call_during_video_call";
@@ -41061,6 +41489,7 @@
}
public final class CellIdentityLte extends android.telephony.CellIdentity {
+ method public int getBandwidth();
method public int getCi();
method public int getEarfcn();
method public deprecated int getMcc();
@@ -41104,8 +41533,13 @@
public abstract class CellInfo implements android.os.Parcelable {
method public int describeContents();
+ method public int getCellConnectionStatus();
method public long getTimeStamp();
method public boolean isRegistered();
+ field public static final int CONNECTION_NONE = 0; // 0x0
+ field public static final int CONNECTION_PRIMARY_SERVING = 1; // 0x1
+ field public static final int CONNECTION_SECONDARY_SERVING = 2; // 0x2
+ field public static final int CONNECTION_UNKNOWN = 2147483647; // 0x7fffffff
field public static final android.os.Parcelable.Creator<android.telephony.CellInfo> CREATOR;
}
@@ -41418,6 +41852,9 @@
ctor public ServiceState(android.os.Parcel);
method protected void copyFrom(android.telephony.ServiceState);
method public int describeContents();
+ method public int[] getCellBandwidths();
+ method public int getChannelNumber();
+ method public int getDuplexMode();
method public boolean getIsManualSelection();
method public int getNetworkId();
method public java.lang.String getOperatorAlphaLong();
@@ -41434,6 +41871,9 @@
method public void setStateOutOfService();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.ServiceState> CREATOR;
+ field public static final int DUPLEX_MODE_FDD = 1; // 0x1
+ field public static final int DUPLEX_MODE_TDD = 2; // 0x2
+ field public static final int DUPLEX_MODE_UNKNOWN = 0; // 0x0
field public static final int STATE_EMERGENCY_ONLY = 2; // 0x2
field public static final int STATE_IN_SERVICE = 0; // 0x0
field public static final int STATE_OUT_OF_SERVICE = 1; // 0x1
@@ -43471,13 +43911,19 @@
public class QuoteSpan implements android.text.style.LeadingMarginSpan android.text.ParcelableSpan {
ctor public QuoteSpan();
ctor public QuoteSpan(int);
+ ctor public QuoteSpan(int, int, int);
ctor public QuoteSpan(android.os.Parcel);
method public int describeContents();
method public void drawLeadingMargin(android.graphics.Canvas, android.graphics.Paint, int, int, int, int, int, java.lang.CharSequence, int, int, boolean, android.text.Layout);
method public int getColor();
+ method public int getGapWidth();
method public int getLeadingMargin(boolean);
method public int getSpanTypeId();
+ method public int getStripeWidth();
method public void writeToParcel(android.os.Parcel, int);
+ field public static final int STANDARD_COLOR = -16776961; // 0xff0000ff
+ field public static final int STANDARD_GAP_WIDTH_PX = 2; // 0x2
+ field public static final int STANDARD_STRIPE_WIDTH_PX = 2; // 0x2
}
public class RelativeSizeSpan extends android.text.style.MetricAffectingSpan implements android.text.ParcelableSpan {
@@ -44656,42 +45102,42 @@
method public void previousMonth();
}
- public final class MutableBoolean {
+ public final deprecated class MutableBoolean {
ctor public MutableBoolean(boolean);
field public boolean value;
}
- public final class MutableByte {
+ public final deprecated class MutableByte {
ctor public MutableByte(byte);
field public byte value;
}
- public final class MutableChar {
+ public final deprecated class MutableChar {
ctor public MutableChar(char);
field public char value;
}
- public final class MutableDouble {
+ public final deprecated class MutableDouble {
ctor public MutableDouble(double);
field public double value;
}
- public final class MutableFloat {
+ public final deprecated class MutableFloat {
ctor public MutableFloat(float);
field public float value;
}
- public final class MutableInt {
+ public final deprecated class MutableInt {
ctor public MutableInt(int);
field public int value;
}
- public final class MutableLong {
+ public final deprecated class MutableLong {
ctor public MutableLong(long);
field public long value;
}
- public final class MutableShort {
+ public final deprecated class MutableShort {
ctor public MutableShort(short);
field public short value;
}
@@ -46931,6 +47377,7 @@
method public boolean requestRectangleOnScreen(android.graphics.Rect);
method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean);
method public final void requestUnbufferedDispatch(android.view.MotionEvent);
+ method public final <T extends android.view.View> T requireViewById(int);
method public static int resolveSize(int, int);
method public static int resolveSizeAndState(int, int, int);
method public boolean restoreDefaultFocus();
@@ -47966,6 +48413,7 @@
method public abstract boolean performPanelShortcut(int, int, android.view.KeyEvent, int);
method public final void removeOnFrameMetricsAvailableListener(android.view.Window.OnFrameMetricsAvailableListener);
method public boolean requestFeature(int);
+ method public final <T extends android.view.View> T requireViewById(int);
method public abstract void restoreHierarchyState(android.os.Bundle);
method public abstract android.os.Bundle saveHierarchyState();
method public void setAllowEnterTransitionOverlap(boolean);
@@ -48464,6 +48912,7 @@
method public java.lang.CharSequence getText();
method public int getTextSelectionEnd();
method public int getTextSelectionStart();
+ method public java.lang.CharSequence getTooltipText();
method public android.view.accessibility.AccessibilityNodeInfo getTraversalAfter();
method public android.view.accessibility.AccessibilityNodeInfo getTraversalBefore();
method public java.lang.String getViewIdResourceName();
@@ -48551,6 +49000,7 @@
method public void setSource(android.view.View, int);
method public void setText(java.lang.CharSequence);
method public void setTextSelection(int, int);
+ method public void setTooltipText(java.lang.CharSequence);
method public void setTraversalAfter(android.view.View);
method public void setTraversalAfter(android.view.View, int);
method public void setTraversalBefore(android.view.View);
@@ -48620,6 +49070,7 @@
field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_DISMISS;
field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_EXPAND;
field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_FOCUS;
+ field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_HIDE_TOOLTIP;
field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_LONG_CLICK;
field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_MOVE_WINDOW;
field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_NEXT_AT_MOVEMENT_GRANULARITY;
@@ -48639,6 +49090,7 @@
field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SET_SELECTION;
field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SET_TEXT;
field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SHOW_ON_SCREEN;
+ field public static final android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction ACTION_SHOW_TOOLTIP;
}
public static final class AccessibilityNodeInfo.CollectionInfo {
@@ -49357,6 +49809,7 @@
method public abstract boolean performEditorAction(int);
method public abstract boolean performPrivateCommand(java.lang.String, android.os.Bundle);
method public abstract boolean reportFullscreenMode(boolean);
+ method public default void reportLanguageHint(android.os.LocaleList);
method public abstract boolean requestCursorUpdates(int);
method public abstract boolean sendKeyEvent(android.view.KeyEvent);
method public abstract boolean setComposingRegion(int, int);
@@ -49598,7 +50051,9 @@
ctor public TextClassification.Options();
method public int describeContents();
method public android.os.LocaleList getDefaultLocales();
+ method public java.util.Calendar getReferenceTime();
method public android.view.textclassifier.TextClassification.Options setDefaultLocales(android.os.LocaleList);
+ method public android.view.textclassifier.TextClassification.Options setReferenceTime(java.util.Calendar);
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.view.textclassifier.TextClassification.Options> CREATOR;
}
@@ -49623,7 +50078,10 @@
field public static final int ENTITY_PRESET_NONE = 1; // 0x1
field public static final android.view.textclassifier.TextClassifier NO_OP;
field public static final java.lang.String TYPE_ADDRESS = "address";
+ field public static final java.lang.String TYPE_DATE = "date";
+ field public static final java.lang.String TYPE_DATE_TIME = "datetime";
field public static final java.lang.String TYPE_EMAIL = "email";
+ field public static final java.lang.String TYPE_FLIGHT_NUMBER = "flight";
field public static final java.lang.String TYPE_OTHER = "other";
field public static final java.lang.String TYPE_PHONE = "phone";
field public static final java.lang.String TYPE_UNKNOWN = "";
@@ -50385,6 +50843,7 @@
method public android.graphics.Bitmap getFavicon();
method public android.webkit.WebView.HitTestResult getHitTestResult();
method public deprecated java.lang.String[] getHttpAuthUsernamePassword(java.lang.String, java.lang.String);
+ method public android.os.Looper getLooper();
method public java.lang.String getOriginalUrl();
method public int getProgress();
method public boolean getRendererPriorityWaivedWhenNotVisible();
diff --git a/api/removed.txt b/api/removed.txt
index 77088e5..2aab223 100644
--- a/api/removed.txt
+++ b/api/removed.txt
@@ -265,7 +265,6 @@
method public android.graphics.drawable.Drawable getBadgedDrawableForUser(android.graphics.drawable.Drawable, android.os.UserHandle, android.graphics.Rect, int);
method public android.graphics.drawable.Drawable getBadgedIconForUser(android.graphics.drawable.Drawable, android.os.UserHandle);
method public java.lang.CharSequence getBadgedLabelForUser(java.lang.CharSequence, android.os.UserHandle);
- method public deprecated boolean trySetQuietModeEnabled(boolean, android.os.UserHandle);
}
}
diff --git a/api/system-current.txt b/api/system-current.txt
index 0a66d4a..396ff1a 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -253,6 +253,7 @@
public class AppOpsManager {
method public static java.lang.String[] getOpStrs();
method public void setUidMode(java.lang.String, int, int);
+ field public static final java.lang.String OPSTR_ACCEPT_HANDOVER = "android:accept_handover";
field public static final java.lang.String OPSTR_ACCESS_NOTIFICATIONS = "android:access_notifications";
field public static final java.lang.String OPSTR_ACTIVATE_VPN = "android:activate_vpn";
field public static final java.lang.String OPSTR_ASSIST_SCREENSHOT = "android:assist_screenshot";
@@ -309,8 +310,10 @@
ctor public InstantAppResolverService();
method public final void attachBaseContext(android.content.Context);
method public final android.os.IBinder onBind(android.content.Intent);
- method public void onGetInstantAppIntentFilter(int[], java.lang.String, android.app.InstantAppResolverService.InstantAppResolutionCallback);
- method public void onGetInstantAppResolveInfo(int[], java.lang.String, android.app.InstantAppResolverService.InstantAppResolutionCallback);
+ method public deprecated void onGetInstantAppIntentFilter(int[], java.lang.String, android.app.InstantAppResolverService.InstantAppResolutionCallback);
+ method public void onGetInstantAppIntentFilter(android.content.Intent, int[], java.lang.String, android.app.InstantAppResolverService.InstantAppResolutionCallback);
+ method public deprecated void onGetInstantAppResolveInfo(int[], java.lang.String, android.app.InstantAppResolverService.InstantAppResolutionCallback);
+ method public void onGetInstantAppResolveInfo(android.content.Intent, int[], java.lang.String, android.app.InstantAppResolverService.InstantAppResolutionCallback);
}
public static final class InstantAppResolverService.InstantAppResolutionCallback {
@@ -354,6 +357,20 @@
method public org.json.JSONObject toJson() throws org.json.JSONException;
}
+ public final class StatsManager {
+ method public boolean addConfiguration(long, byte[], java.lang.String, java.lang.String);
+ method public byte[] getData(long);
+ method public byte[] getMetadata();
+ method public boolean removeConfiguration(long);
+ method public boolean setBroadcastSubscriber(long, long, android.app.PendingIntent);
+ field public static final java.lang.String ACTION_STATSD_STARTED = "android.app.action.STATSD_STARTED";
+ field public static final java.lang.String EXTRA_STATS_CONFIG_KEY = "android.app.extra.STATS_CONFIG_KEY";
+ field public static final java.lang.String EXTRA_STATS_CONFIG_UID = "android.app.extra.STATS_CONFIG_UID";
+ field public static final java.lang.String EXTRA_STATS_DIMENSIONS_VALUE = "android.app.extra.STATS_DIMENSIONS_VALUE";
+ field public static final java.lang.String EXTRA_STATS_SUBSCRIPTION_ID = "android.app.extra.STATS_SUBSCRIPTION_ID";
+ field public static final java.lang.String EXTRA_STATS_SUBSCRIPTION_RULE_ID = "android.app.extra.STATS_SUBSCRIPTION_RULE_ID";
+ }
+
public class VrManager {
method public void setAndBindVrCompositor(android.content.ComponentName);
method public void setPersistentVrModeEnabled(boolean);
@@ -382,7 +399,6 @@
method public java.lang.CharSequence getDeviceOwnerOrganizationName();
method public java.util.List<java.lang.String> getPermittedAccessibilityServices(int);
method public java.util.List<java.lang.String> getPermittedInputMethodsForCurrentUser();
- method public java.lang.CharSequence getPrintingDisabledReason();
method public android.content.ComponentName getProfileOwner() throws java.lang.IllegalArgumentException;
method public java.lang.String getProfileOwnerNameAsUser(int) throws java.lang.IllegalArgumentException;
method public int getUserProvisioningState();
@@ -437,7 +453,7 @@
method public java.lang.String[] listAllTransports();
method public int requestBackup(java.lang.String[], android.app.backup.BackupObserver);
method public int requestBackup(java.lang.String[], android.app.backup.BackupObserver, android.app.backup.BackupManagerMonitor, int);
- method public int requestRestore(android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor);
+ method public deprecated int requestRestore(android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor);
method public deprecated java.lang.String selectBackupTransport(java.lang.String);
method public void selectBackupTransport(android.content.ComponentName, android.app.backup.SelectBackupTransportCallback);
method public void setAutoRestore(boolean);
@@ -514,6 +530,7 @@
field public static final int LOG_EVENT_ID_SIGNATURE_MISMATCH = 29; // 0x1d
field public static final int LOG_EVENT_ID_SYSTEM_APP_NO_AGENT = 38; // 0x26
field public static final int LOG_EVENT_ID_TRANSPORT_IS_NULL = 50; // 0x32
+ field public static final int LOG_EVENT_ID_TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED = 51; // 0x33
field public static final int LOG_EVENT_ID_UNKNOWN_VERSION = 44; // 0x2c
field public static final int LOG_EVENT_ID_VERSIONS_MATCH = 35; // 0x23
field public static final int LOG_EVENT_ID_VERSION_OF_BACKUP_OLDER = 36; // 0x24
@@ -555,6 +572,7 @@
method public long getCurrentRestoreSet();
method public int getNextFullRestoreDataChunk(android.os.ParcelFileDescriptor);
method public int getRestoreData(android.os.ParcelFileDescriptor);
+ method public int getTransportFlags();
method public int initializeDevice();
method public boolean isAppEligibleForBackup(android.content.pm.PackageInfo, boolean);
method public java.lang.String name();
@@ -570,9 +588,12 @@
method public java.lang.String transportDirName();
field public static final int AGENT_ERROR = -1003; // 0xfffffc15
field public static final int AGENT_UNKNOWN = -1004; // 0xfffffc14
+ field public static final int FLAG_INCREMENTAL = 2; // 0x2
+ field public static final int FLAG_NON_INCREMENTAL = 4; // 0x4
field public static final int FLAG_USER_INITIATED = 1; // 0x1
field public static final int NO_MORE_DATA = -1; // 0xffffffff
field public static final int TRANSPORT_ERROR = -1000; // 0xfffffc18
+ field public static final int TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED = -1006; // 0xfffffc12
field public static final int TRANSPORT_NOT_INITIALIZED = -1001; // 0xfffffc17
field public static final int TRANSPORT_OK = 0; // 0x0
field public static final int TRANSPORT_PACKAGE_REJECTED = -1002; // 0xfffffc16
@@ -762,6 +783,7 @@
field public static final java.lang.String NETWORK_SCORE_SERVICE = "network_score";
field public static final java.lang.String OEM_LOCK_SERVICE = "oem_lock";
field public static final java.lang.String PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block";
+ field public static final java.lang.String SECURE_ELEMENT_SERVICE = "secure_element";
field public static final java.lang.String STATS_MANAGER = "stats";
field public static final java.lang.String SYSTEM_UPDATE_SERVICE = "system_update";
field public static final java.lang.String VR_SERVICE = "vrmanager";
@@ -800,12 +822,14 @@
field public static final java.lang.String ACTION_VOICE_ASSIST = "android.intent.action.VOICE_ASSIST";
field public static final java.lang.String CATEGORY_LEANBACK_SETTINGS = "android.intent.category.LEANBACK_SETTINGS";
field public static final java.lang.String EXTRA_FORCE_FACTORY_RESET = "android.intent.extra.FORCE_FACTORY_RESET";
+ field public static final java.lang.String EXTRA_INSTANT_APP_BUNDLES = "android.intent.extra.INSTANT_APP_BUNDLES";
field public static final java.lang.String EXTRA_ORIGINATING_UID = "android.intent.extra.ORIGINATING_UID";
field public static final java.lang.String EXTRA_PACKAGES = "android.intent.extra.PACKAGES";
field public static final java.lang.String EXTRA_PERMISSION_NAME = "android.intent.extra.PERMISSION_NAME";
field public static final java.lang.String EXTRA_REASON = "android.intent.extra.REASON";
field public static final java.lang.String EXTRA_REMOTE_CALLBACK = "android.intent.extra.REMOTE_CALLBACK";
field public static final java.lang.String EXTRA_RESULT_NEEDED = "android.intent.extra.RESULT_NEEDED";
+ field public static final java.lang.String EXTRA_UNKNOWN_INSTANT_APP = "android.intent.extra.UNKNOWN_INSTANT_APP";
}
public class IntentFilter implements android.os.Parcelable {
@@ -848,6 +872,7 @@
ctor public InstantAppResolveInfo(android.content.pm.InstantAppResolveInfo.InstantAppDigest, java.lang.String, java.util.List<android.content.pm.InstantAppIntentFilter>, int);
ctor public InstantAppResolveInfo(android.content.pm.InstantAppResolveInfo.InstantAppDigest, java.lang.String, java.util.List<android.content.pm.InstantAppIntentFilter>, long, android.os.Bundle);
ctor public InstantAppResolveInfo(java.lang.String, java.lang.String, java.util.List<android.content.pm.InstantAppIntentFilter>);
+ ctor public InstantAppResolveInfo(android.os.Bundle);
method public int describeContents();
method public byte[] getDigestBytes();
method public int getDigestPrefix();
@@ -856,6 +881,7 @@
method public long getLongVersionCode();
method public java.lang.String getPackageName();
method public deprecated int getVersionCode();
+ method public boolean shouldLetInstallerDecide();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.content.pm.InstantAppResolveInfo> CREATOR;
}
@@ -867,6 +893,7 @@
method public int[] getDigestPrefix();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.content.pm.InstantAppResolveInfo.InstantAppDigest> CREATOR;
+ field public static final android.content.pm.InstantAppResolveInfo.InstantAppDigest UNDEFINED;
}
public final class IntentFilterVerificationInfo implements android.os.Parcelable {
@@ -1025,8 +1052,10 @@
package android.content.pm.dex {
public class ArtManager {
- method public boolean isRuntimeProfilingEnabled();
- method public void snapshotRuntimeProfile(java.lang.String, java.lang.String, android.content.pm.dex.ArtManager.SnapshotRuntimeProfileCallback, android.os.Handler);
+ method public boolean isRuntimeProfilingEnabled(int);
+ method public void snapshotRuntimeProfile(int, java.lang.String, java.lang.String, java.util.concurrent.Executor, android.content.pm.dex.ArtManager.SnapshotRuntimeProfileCallback);
+ field public static final int PROFILE_APPS = 0; // 0x0
+ field public static final int PROFILE_BOOT_IMAGE = 1; // 0x1
field public static final int SNAPSHOT_FAILED_CODE_PATH_NOT_FOUND = 1; // 0x1
field public static final int SNAPSHOT_FAILED_INTERNAL_ERROR = 2; // 0x2
field public static final int SNAPSHOT_FAILED_PACKAGE_NOT_FOUND = 0; // 0x0
@@ -1738,6 +1767,27 @@
package android.hardware.radio {
+ public final class Announcement implements android.os.Parcelable {
+ method public int describeContents();
+ method public android.hardware.radio.ProgramSelector getSelector();
+ method public int getType();
+ method public java.util.Map<java.lang.String, java.lang.String> getVendorInfo();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.hardware.radio.Announcement> CREATOR;
+ field public static final int TYPE_EMERGENCY = 1; // 0x1
+ field public static final int TYPE_EVENT = 6; // 0x6
+ field public static final int TYPE_MISC = 8; // 0x8
+ field public static final int TYPE_NEWS = 5; // 0x5
+ field public static final int TYPE_SPORT = 7; // 0x7
+ field public static final int TYPE_TRAFFIC = 3; // 0x3
+ field public static final int TYPE_WARNING = 2; // 0x2
+ field public static final int TYPE_WEATHER = 4; // 0x4
+ }
+
+ public static abstract interface Announcement.OnListUpdatedListener {
+ method public abstract void onListUpdated(java.util.Collection<android.hardware.radio.Announcement>);
+ }
+
public final class ProgramList implements java.lang.AutoCloseable {
method public void addOnCompleteListener(java.util.concurrent.Executor, android.hardware.radio.ProgramList.OnCompleteListener);
method public void addOnCompleteListener(android.hardware.radio.ProgramList.OnCompleteListener);
@@ -1782,6 +1832,7 @@
method public deprecated int getProgramType();
method public android.hardware.radio.ProgramSelector.Identifier[] getSecondaryIds();
method public deprecated long[] getVendorIds();
+ method public android.hardware.radio.ProgramSelector withSecondaryPreferred(android.hardware.radio.ProgramSelector.Identifier);
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.hardware.radio.ProgramSelector> CREATOR;
field public static final int IDENTIFIER_TYPE_AMFM_FREQUENCY = 1; // 0x1
@@ -1832,8 +1883,11 @@
}
public class RadioManager {
+ method public void addAnnouncementListener(java.util.Set<java.lang.Integer>, android.hardware.radio.Announcement.OnListUpdatedListener);
+ method public void addAnnouncementListener(java.util.concurrent.Executor, java.util.Set<java.lang.Integer>, android.hardware.radio.Announcement.OnListUpdatedListener);
method public int listModules(java.util.List<android.hardware.radio.RadioManager.ModuleProperties>);
method public android.hardware.radio.RadioTuner openTuner(int, android.hardware.radio.RadioManager.BandConfig, boolean, android.hardware.radio.RadioTuner.Callback, android.os.Handler);
+ method public void removeAnnouncementListener(android.hardware.radio.Announcement.OnListUpdatedListener);
field public static final int BAND_AM = 0; // 0x0
field public static final int BAND_AM_HD = 3; // 0x3
field public static final int BAND_FM = 1; // 0x1
@@ -1963,12 +2017,15 @@
public static class RadioManager.ProgramInfo implements android.os.Parcelable {
method public int describeContents();
method public deprecated int getChannel();
+ method public android.hardware.radio.ProgramSelector.Identifier getLogicallyTunedTo();
method public android.hardware.radio.RadioMetadata getMetadata();
+ method public android.hardware.radio.ProgramSelector.Identifier getPhysicallyTunedTo();
+ method public java.util.Collection<android.hardware.radio.ProgramSelector.Identifier> getRelatedContent();
method public android.hardware.radio.ProgramSelector getSelector();
method public int getSignalStrength();
method public deprecated int getSubChannel();
method public java.util.Map<java.lang.String, java.lang.String> getVendorInfo();
- method public boolean isDigital();
+ method public deprecated boolean isDigital();
method public boolean isLive();
method public boolean isMuted();
method public boolean isStereo();
@@ -2028,21 +2085,21 @@
method public abstract int cancel();
method public abstract void cancelAnnouncement();
method public abstract void close();
- method public abstract int getConfiguration(android.hardware.radio.RadioManager.BandConfig[]);
+ method public abstract deprecated int getConfiguration(android.hardware.radio.RadioManager.BandConfig[]);
method public android.hardware.radio.ProgramList getDynamicProgramList(android.hardware.radio.ProgramList.Filter);
method public abstract boolean getMute();
method public java.util.Map<java.lang.String, java.lang.String> getParameters(java.util.List<java.lang.String>);
- method public abstract int getProgramInformation(android.hardware.radio.RadioManager.ProgramInfo[]);
+ method public abstract deprecated int getProgramInformation(android.hardware.radio.RadioManager.ProgramInfo[]);
method public abstract deprecated java.util.List<android.hardware.radio.RadioManager.ProgramInfo> getProgramList(java.util.Map<java.lang.String, java.lang.String>);
method public abstract boolean hasControl();
method public abstract deprecated boolean isAnalogForced();
- method public abstract boolean isAntennaConnected();
+ method public abstract deprecated boolean isAntennaConnected();
method public boolean isConfigFlagSet(int);
method public boolean isConfigFlagSupported(int);
method public abstract int scan(int, boolean);
method public abstract deprecated void setAnalogForced(boolean);
method public void setConfigFlag(int, boolean);
- method public abstract int setConfiguration(android.hardware.radio.RadioManager.BandConfig);
+ method public abstract deprecated int setConfiguration(android.hardware.radio.RadioManager.BandConfig);
method public abstract int setMute(boolean);
method public java.util.Map<java.lang.String, java.lang.String> setParameters(java.util.Map<java.lang.String, java.lang.String>);
method public abstract boolean startBackgroundScan();
@@ -2051,13 +2108,13 @@
method public abstract void tune(android.hardware.radio.ProgramSelector);
field public static final int DIRECTION_DOWN = 1; // 0x1
field public static final int DIRECTION_UP = 0; // 0x0
- field public static final int ERROR_BACKGROUND_SCAN_FAILED = 6; // 0x6
- field public static final int ERROR_BACKGROUND_SCAN_UNAVAILABLE = 5; // 0x5
- field public static final int ERROR_CANCELLED = 2; // 0x2
- field public static final int ERROR_CONFIG = 4; // 0x4
- field public static final int ERROR_HARDWARE_FAILURE = 0; // 0x0
- field public static final int ERROR_SCAN_TIMEOUT = 3; // 0x3
- field public static final int ERROR_SERVER_DIED = 1; // 0x1
+ field public static final deprecated int ERROR_BACKGROUND_SCAN_FAILED = 6; // 0x6
+ field public static final deprecated int ERROR_BACKGROUND_SCAN_UNAVAILABLE = 5; // 0x5
+ field public static final deprecated int ERROR_CANCELLED = 2; // 0x2
+ field public static final deprecated int ERROR_CONFIG = 4; // 0x4
+ field public static final deprecated int ERROR_HARDWARE_FAILURE = 0; // 0x0
+ field public static final deprecated int ERROR_SCAN_TIMEOUT = 3; // 0x3
+ field public static final deprecated int ERROR_SERVER_DIED = 1; // 0x1
}
public static abstract class RadioTuner.Callback {
@@ -2065,15 +2122,16 @@
method public void onAntennaState(boolean);
method public void onBackgroundScanAvailabilityChange(boolean);
method public void onBackgroundScanComplete();
- method public void onConfigurationChanged(android.hardware.radio.RadioManager.BandConfig);
+ method public deprecated void onConfigurationChanged(android.hardware.radio.RadioManager.BandConfig);
method public void onControlChanged(boolean);
method public void onEmergencyAnnouncement(boolean);
- method public void onError(int);
+ method public deprecated void onError(int);
method public deprecated void onMetadataChanged(android.hardware.radio.RadioMetadata);
method public void onParametersUpdated(java.util.Map<java.lang.String, java.lang.String>);
method public void onProgramInfoChanged(android.hardware.radio.RadioManager.ProgramInfo);
method public void onProgramListChanged();
method public void onTrafficAnnouncement(boolean);
+ method public void onTuneFailed(int, android.hardware.radio.ProgramSelector);
}
}
@@ -2545,12 +2603,17 @@
method public void onStatusChange();
}
+ public static abstract class AudioPolicy.AudioPolicyVolumeCallback {
+ method public void onVolumeAdjustment(int);
+ }
+
public static class AudioPolicy.Builder {
ctor public AudioPolicy.Builder(android.content.Context);
method public android.media.audiopolicy.AudioPolicy.Builder addMix(android.media.audiopolicy.AudioMix) throws java.lang.IllegalArgumentException;
method public android.media.audiopolicy.AudioPolicy build();
method public void setAudioPolicyFocusListener(android.media.audiopolicy.AudioPolicy.AudioPolicyFocusListener);
method public void setAudioPolicyStatusListener(android.media.audiopolicy.AudioPolicy.AudioPolicyStatusListener);
+ method public android.media.audiopolicy.AudioPolicy.Builder setAudioPolicyVolumeCallback(android.media.audiopolicy.AudioPolicy.AudioPolicyVolumeCallback);
method public android.media.audiopolicy.AudioPolicy.Builder setIsAudioFocusPolicy(boolean);
method public android.media.audiopolicy.AudioPolicy.Builder setLooper(android.os.Looper) throws java.lang.IllegalArgumentException;
}
@@ -2880,9 +2943,23 @@
method public java.lang.String getInterfaceName();
}
+ public final class IpSecTransform implements java.lang.AutoCloseable {
+ method public void startNattKeepalive(android.net.IpSecTransform.NattKeepaliveCallback, int, android.os.Handler) throws java.io.IOException;
+ method public void stopNattKeepalive();
+ }
+
public static class IpSecTransform.Builder {
method public android.net.IpSecTransform buildTunnelModeTransform(java.net.InetAddress, android.net.IpSecManager.SecurityParameterIndex) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException;
- method public android.net.IpSecTransform.Builder setNattKeepalive(int);
+ }
+
+ public static class IpSecTransform.NattKeepaliveCallback {
+ ctor public IpSecTransform.NattKeepaliveCallback();
+ method public void onError(int);
+ method public void onStarted();
+ method public void onStopped();
+ field public static final int ERROR_HARDWARE_ERROR = 3; // 0x3
+ field public static final int ERROR_HARDWARE_UNSUPPORTED = 2; // 0x2
+ field public static final int ERROR_INVALID_NETWORK = 1; // 0x1
}
public class NetworkKey implements android.os.Parcelable {
@@ -3456,6 +3533,132 @@
field public static final java.lang.String ACTION_UPDATE_SMS_SHORT_CODES = "android.intent.action.UPDATE_SMS_SHORT_CODES";
}
+ public class HidlSupport {
+ method public static boolean deepEquals(java.lang.Object, java.lang.Object);
+ method public static int deepHashCode(java.lang.Object);
+ method public static int getPidIfSharable();
+ method public static boolean interfacesEqual(android.os.IHwInterface, java.lang.Object);
+ }
+
+ public abstract class HwBinder implements android.os.IHwBinder {
+ method public static final void configureRpcThreadpool(long, boolean);
+ method public static void enableInstrumentation();
+ method public static final android.os.IHwBinder getService(java.lang.String, java.lang.String) throws java.util.NoSuchElementException, android.os.RemoteException;
+ method public static final android.os.IHwBinder getService(java.lang.String, java.lang.String, boolean) throws java.util.NoSuchElementException, android.os.RemoteException;
+ method public static final void joinRpcThreadpool();
+ method public final void transact(int, android.os.HwParcel, android.os.HwParcel, int) throws android.os.RemoteException;
+ }
+
+ public class HwBlob {
+ ctor public HwBlob(int);
+ method public final void copyToBoolArray(long, boolean[], int);
+ method public final void copyToDoubleArray(long, double[], int);
+ method public final void copyToFloatArray(long, float[], int);
+ method public final void copyToInt16Array(long, short[], int);
+ method public final void copyToInt32Array(long, int[], int);
+ method public final void copyToInt64Array(long, long[], int);
+ method public final void copyToInt8Array(long, byte[], int);
+ method public final boolean getBool(long);
+ method public final double getDouble(long);
+ method public final float getFloat(long);
+ method public final short getInt16(long);
+ method public final int getInt32(long);
+ method public final long getInt64(long);
+ method public final byte getInt8(long);
+ method public final java.lang.String getString(long);
+ method public final long handle();
+ method public final void putBlob(long, android.os.HwBlob);
+ method public final void putBool(long, boolean);
+ method public final void putBoolArray(long, boolean[]);
+ method public final void putDouble(long, double);
+ method public final void putDoubleArray(long, double[]);
+ method public final void putFloat(long, float);
+ method public final void putFloatArray(long, float[]);
+ method public final void putInt16(long, short);
+ method public final void putInt16Array(long, short[]);
+ method public final void putInt32(long, int);
+ method public final void putInt32Array(long, int[]);
+ method public final void putInt64(long, long);
+ 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 putString(long, java.lang.String);
+ method public static java.lang.Boolean[] wrapArray(boolean[]);
+ method public static java.lang.Long[] wrapArray(long[]);
+ method public static java.lang.Byte[] wrapArray(byte[]);
+ method public static java.lang.Short[] wrapArray(short[]);
+ method public static java.lang.Integer[] wrapArray(int[]);
+ method public static java.lang.Float[] wrapArray(float[]);
+ method public static java.lang.Double[] wrapArray(double[]);
+ }
+
+ public class HwParcel {
+ ctor public HwParcel();
+ method public final void enforceInterface(java.lang.String);
+ method public final boolean readBool();
+ method public final java.util.ArrayList<java.lang.Boolean> readBoolVector();
+ method public final android.os.HwBlob readBuffer(long);
+ 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 float readFloat();
+ method public final java.util.ArrayList<java.lang.Float> readFloatVector();
+ method public final short readInt16();
+ method public final java.util.ArrayList<java.lang.Short> readInt16Vector();
+ method public final int readInt32();
+ method public final java.util.ArrayList<java.lang.Integer> readInt32Vector();
+ method public final long readInt64();
+ 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 java.lang.String readString();
+ method public final java.util.ArrayList<java.lang.String> readStringVector();
+ method public final android.os.IHwBinder readStrongBinder();
+ method public final void release();
+ method public final void releaseTemporaryStorage();
+ method public final void send();
+ method public final void verifySuccess();
+ method public final void writeBool(boolean);
+ method public final void writeBoolVector(java.util.ArrayList<java.lang.Boolean>);
+ method public final void writeBuffer(android.os.HwBlob);
+ method public final void writeDouble(double);
+ method public final void writeDoubleVector(java.util.ArrayList<java.lang.Double>);
+ method public final void writeFloat(float);
+ method public final void writeFloatVector(java.util.ArrayList<java.lang.Float>);
+ method public final void writeInt16(short);
+ method public final void writeInt16Vector(java.util.ArrayList<java.lang.Short>);
+ method public final void writeInt32(int);
+ method public final void writeInt32Vector(java.util.ArrayList<java.lang.Integer>);
+ method public final void writeInt64(long);
+ method public final void writeInt64Vector(java.util.ArrayList<java.lang.Long>);
+ 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 writeStatus(int);
+ method public final void writeString(java.lang.String);
+ method public final void writeStringVector(java.util.ArrayList<java.lang.String>);
+ method public final void writeStrongBinder(android.os.IHwBinder);
+ field public static final int STATUS_SUCCESS = 0; // 0x0
+ }
+
+ public static abstract class HwParcel.Status implements java.lang.annotation.Annotation {
+ }
+
+ public abstract interface IHwBinder {
+ method public abstract boolean linkToDeath(android.os.IHwBinder.DeathRecipient, long);
+ method public abstract android.os.IHwInterface queryLocalInterface(java.lang.String);
+ method public abstract void transact(int, android.os.HwParcel, android.os.HwParcel, int) throws android.os.RemoteException;
+ method public abstract boolean unlinkToDeath(android.os.IHwBinder.DeathRecipient);
+ }
+
+ public static abstract interface IHwBinder.DeathRecipient {
+ method public abstract void serviceDied(long);
+ }
+
+ public abstract interface IHwInterface {
+ method public abstract android.os.IHwBinder asBinder();
+ }
+
public class IncidentManager {
method public void reportIncident(android.os.IncidentReportArgs);
method public void reportIncident(java.lang.String, byte[]);
@@ -3510,6 +3713,27 @@
method public abstract void onResult(android.os.Bundle);
}
+ public final class StatsDimensionsValue implements android.os.Parcelable {
+ method public int describeContents();
+ method public boolean getBooleanValue();
+ method public int getField();
+ method public float getFloatValue();
+ method public int getIntValue();
+ method public long getLongValue();
+ method public java.lang.String getStringValue();
+ method public java.util.List<android.os.StatsDimensionsValue> getTupleValueList();
+ method public int getValueType();
+ method public boolean isValueType(int);
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final int BOOLEAN_VALUE_TYPE = 5; // 0x5
+ field public static final android.os.Parcelable.Creator<android.os.StatsDimensionsValue> CREATOR;
+ field public static final int FLOAT_VALUE_TYPE = 6; // 0x6
+ field public static final int INT_VALUE_TYPE = 3; // 0x3
+ field public static final int LONG_VALUE_TYPE = 4; // 0x4
+ field public static final int STRING_VALUE_TYPE = 2; // 0x2
+ field public static final int TUPLE_VALUE_TYPE = 7; // 0x7
+ }
+
public class SystemProperties {
method public static java.lang.String get(java.lang.String);
method public static java.lang.String get(java.lang.String, java.lang.String);
@@ -3622,6 +3846,20 @@
public static abstract class UserManager.UserRestrictionSource implements java.lang.annotation.Annotation {
}
+ public class WorkSource implements android.os.Parcelable {
+ method public android.os.WorkSource.WorkChain createWorkChain();
+ }
+
+ public static final class WorkSource.WorkChain implements android.os.Parcelable {
+ ctor public WorkSource.WorkChain();
+ method public android.os.WorkSource.WorkChain addNode(int, java.lang.String);
+ method public int describeContents();
+ method public java.lang.String getAttributionTag();
+ method public int getAttributionUid();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.os.WorkSource.WorkChain> CREATOR;
+ }
+
}
package android.os.storage {
@@ -3903,6 +4141,120 @@
}
+package android.security.keystore.recovery {
+
+ public class DecryptionFailedException extends java.security.GeneralSecurityException {
+ ctor public DecryptionFailedException(java.lang.String);
+ }
+
+ public class InternalRecoveryServiceException extends java.security.GeneralSecurityException {
+ ctor public InternalRecoveryServiceException(java.lang.String);
+ ctor public InternalRecoveryServiceException(java.lang.String, java.lang.Throwable);
+ }
+
+ public final class KeyChainProtectionParams implements android.os.Parcelable {
+ method public void clearSecret();
+ method public int describeContents();
+ method public android.security.keystore.recovery.KeyDerivationParams getKeyDerivationParams();
+ method public int getLockScreenUiFormat();
+ method public byte[] getSecret();
+ method public int getUserSecretType();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.security.keystore.recovery.KeyChainProtectionParams> CREATOR;
+ field public static final int TYPE_CUSTOM_PASSWORD = 101; // 0x65
+ field public static final int TYPE_LOCKSCREEN = 100; // 0x64
+ field public static final int UI_FORMAT_PASSWORD = 2; // 0x2
+ field public static final int UI_FORMAT_PATTERN = 3; // 0x3
+ field public static final int UI_FORMAT_PIN = 1; // 0x1
+ }
+
+ public static class KeyChainProtectionParams.Builder {
+ ctor public KeyChainProtectionParams.Builder();
+ method public android.security.keystore.recovery.KeyChainProtectionParams build();
+ method public android.security.keystore.recovery.KeyChainProtectionParams.Builder setKeyDerivationParams(android.security.keystore.recovery.KeyDerivationParams);
+ method public android.security.keystore.recovery.KeyChainProtectionParams.Builder setLockScreenUiFormat(int);
+ method public android.security.keystore.recovery.KeyChainProtectionParams.Builder setSecret(byte[]);
+ method public android.security.keystore.recovery.KeyChainProtectionParams.Builder setUserSecretType(int);
+ }
+
+ public final class KeyChainSnapshot implements android.os.Parcelable {
+ method public int describeContents();
+ method public long getCounterId();
+ method public byte[] getEncryptedRecoveryKeyBlob();
+ method public java.util.List<android.security.keystore.recovery.KeyChainProtectionParams> getKeyChainProtectionParams();
+ method public int getMaxAttempts();
+ method public byte[] getServerParams();
+ method public int getSnapshotVersion();
+ method public byte[] getTrustedHardwarePublicKey();
+ method public java.util.List<android.security.keystore.recovery.WrappedApplicationKey> getWrappedApplicationKeys();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.security.keystore.recovery.KeyChainSnapshot> CREATOR;
+ }
+
+ public final class KeyDerivationParams implements android.os.Parcelable {
+ method public static android.security.keystore.recovery.KeyDerivationParams createSha256Params(byte[]);
+ method public int describeContents();
+ method public int getAlgorithm();
+ method public byte[] getSalt();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final int ALGORITHM_SHA256 = 1; // 0x1
+ field public static final android.os.Parcelable.Creator<android.security.keystore.recovery.KeyDerivationParams> CREATOR;
+ }
+
+ public class LockScreenRequiredException extends java.security.GeneralSecurityException {
+ ctor public LockScreenRequiredException(java.lang.String);
+ }
+
+ public class RecoveryController {
+ method public byte[] generateAndStoreKey(java.lang.String, byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException;
+ method public java.util.List<java.lang.String> getAliases(java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException;
+ method public static android.security.keystore.recovery.RecoveryController getInstance(android.content.Context);
+ method public int[] getPendingRecoverySecretTypes() throws android.security.keystore.recovery.InternalRecoveryServiceException;
+ method public android.security.keystore.recovery.KeyChainSnapshot getRecoveryData() throws android.security.keystore.recovery.InternalRecoveryServiceException;
+ method public int[] getRecoverySecretTypes() throws android.security.keystore.recovery.InternalRecoveryServiceException;
+ method public int getRecoveryStatus(java.lang.String, java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException;
+ method public void initRecoveryService(java.lang.String, byte[]) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
+ method public void recoverySecretAvailable(android.security.keystore.recovery.KeyChainProtectionParams) throws android.security.keystore.recovery.InternalRecoveryServiceException;
+ method public void removeKey(java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException;
+ method public void setRecoverySecretTypes(int[]) throws android.security.keystore.recovery.InternalRecoveryServiceException;
+ method public void setRecoveryStatus(java.lang.String, java.lang.String, int) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.content.pm.PackageManager.NameNotFoundException;
+ method public void setServerParams(byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException;
+ method public void setSnapshotCreatedPendingIntent(android.app.PendingIntent) throws android.security.keystore.recovery.InternalRecoveryServiceException;
+ field public static final int RECOVERY_STATUS_MISSING_ACCOUNT = 2; // 0x2
+ field public static final int RECOVERY_STATUS_PERMANENT_FAILURE = 3; // 0x3
+ field public static final int RECOVERY_STATUS_SYNCED = 0; // 0x0
+ field public static final int RECOVERY_STATUS_SYNC_IN_PROGRESS = 1; // 0x1
+ }
+
+ public class RecoverySession implements java.lang.AutoCloseable {
+ method public void close();
+ method public java.util.Map<java.lang.String, byte[]> recoverKeys(byte[], java.util.List<android.security.keystore.recovery.WrappedApplicationKey>) throws android.security.keystore.recovery.DecryptionFailedException, android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.SessionExpiredException;
+ method public byte[] start(byte[], byte[], byte[], java.util.List<android.security.keystore.recovery.KeyChainProtectionParams>) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
+ }
+
+ public class SessionExpiredException extends java.security.GeneralSecurityException {
+ ctor public SessionExpiredException(java.lang.String);
+ }
+
+ public final class WrappedApplicationKey implements android.os.Parcelable {
+ method public int describeContents();
+ method public byte[] getAccount();
+ method public java.lang.String getAlias();
+ method public byte[] getEncryptedKeyMaterial();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.security.keystore.recovery.WrappedApplicationKey> CREATOR;
+ }
+
+ public static class WrappedApplicationKey.Builder {
+ ctor public WrappedApplicationKey.Builder();
+ method public android.security.keystore.recovery.WrappedApplicationKey build();
+ method public android.security.keystore.recovery.WrappedApplicationKey.Builder setAccount(byte[]);
+ method public android.security.keystore.recovery.WrappedApplicationKey.Builder setAlias(java.lang.String);
+ method public android.security.keystore.recovery.WrappedApplicationKey.Builder setEncryptedKeyMaterial(byte[]);
+ }
+
+}
+
package android.service.autofill {
public abstract class AutofillFieldClassificationService extends android.app.Service {
@@ -4415,9 +4767,86 @@
field public static final java.lang.String MBMS_STREAMING_SERVICE_ACTION = "android.telephony.action.EmbmsStreaming";
}
+ public class NetworkRegistrationState implements android.os.Parcelable {
+ ctor public NetworkRegistrationState(int, int, int, int, int, boolean, int[], android.telephony.CellIdentity);
+ ctor protected NetworkRegistrationState(android.os.Parcel);
+ method public int describeContents();
+ method public int getAccessNetworkTechnology();
+ method public int[] getAvailableServices();
+ method public android.telephony.CellIdentity getCellIdentity();
+ method public int getDomain();
+ method public int getReasonForDenial();
+ method public int getRegState();
+ method public int getTransportType();
+ method public boolean isEmergencyEnabled();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.telephony.NetworkRegistrationState> CREATOR;
+ field public static final int DOMAIN_CS = 1; // 0x1
+ field public static final int DOMAIN_PS = 2; // 0x2
+ field public static final int REG_STATE_DENIED = 3; // 0x3
+ field public static final int REG_STATE_HOME = 1; // 0x1
+ field public static final int REG_STATE_NOT_REG_NOT_SEARCHING = 0; // 0x0
+ field public static final int REG_STATE_NOT_REG_SEARCHING = 2; // 0x2
+ field public static final int REG_STATE_ROAMING = 5; // 0x5
+ field public static final int REG_STATE_UNKNOWN = 4; // 0x4
+ field public static final int SERVICE_TYPE_DATA = 2; // 0x2
+ field public static final int SERVICE_TYPE_EMERGENCY = 5; // 0x5
+ field public static final int SERVICE_TYPE_SMS = 3; // 0x3
+ field public static final int SERVICE_TYPE_VIDEO = 4; // 0x4
+ field public static final int SERVICE_TYPE_VOICE = 1; // 0x1
+ }
+
+ public abstract class NetworkService extends android.app.Service {
+ method protected abstract android.telephony.NetworkService.NetworkServiceProvider createNetworkServiceProvider(int);
+ field public static final java.lang.String NETWORK_SERVICE_EXTRA_SLOT_ID = "android.telephony.extra.SLOT_ID";
+ field public static final java.lang.String NETWORK_SERVICE_INTERFACE = "android.telephony.NetworkService";
+ }
+
+ public class NetworkService.NetworkServiceProvider {
+ ctor public NetworkService.NetworkServiceProvider(int);
+ method public void getNetworkRegistrationState(int, android.telephony.NetworkServiceCallback);
+ method public final int getSlotId();
+ method public final void notifyNetworkRegistrationStateChanged();
+ method protected void onDestroy();
+ }
+
+ public class NetworkServiceCallback {
+ method public void onGetNetworkRegistrationStateComplete(int, android.telephony.NetworkRegistrationState);
+ field public static final int RESULT_ERROR_BUSY = 3; // 0x3
+ field public static final int RESULT_ERROR_FAILED = 5; // 0x5
+ field public static final int RESULT_ERROR_ILLEGAL_STATE = 4; // 0x4
+ field public static final int RESULT_ERROR_INVALID_ARG = 2; // 0x2
+ field public static final int RESULT_ERROR_UNSUPPORTED = 1; // 0x1
+ field public static final int RESULT_SUCCESS = 0; // 0x0
+ }
+
+ public class ServiceState implements android.os.Parcelable {
+ method public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStates();
+ method public java.util.List<android.telephony.NetworkRegistrationState> getNetworkRegistrationStates(int);
+ method public android.telephony.NetworkRegistrationState getNetworkRegistrationStates(int, int);
+ }
+
public final class SmsManager {
method public void sendMultipartTextMessageWithoutPersisting(java.lang.String, java.lang.String, java.util.List<java.lang.String>, java.util.List<android.app.PendingIntent>, java.util.List<android.app.PendingIntent>);
method public void sendTextMessageWithoutPersisting(java.lang.String, java.lang.String, java.lang.String, android.app.PendingIntent, android.app.PendingIntent);
+ field public static final int RESULT_CANCELLED = 23; // 0x17
+ field public static final int RESULT_ENCODING_ERROR = 18; // 0x12
+ field public static final int RESULT_ERROR_FDN_CHECK_FAILURE = 6; // 0x6
+ field public static final int RESULT_ERROR_NONE = 0; // 0x0
+ field public static final int RESULT_INTERNAL_ERROR = 21; // 0x15
+ field public static final int RESULT_INVALID_ARGUMENTS = 11; // 0xb
+ field public static final int RESULT_INVALID_SMSC_ADDRESS = 19; // 0x13
+ field public static final int RESULT_INVALID_SMS_FORMAT = 14; // 0xe
+ field public static final int RESULT_INVALID_STATE = 12; // 0xc
+ field public static final int RESULT_MODEM_ERROR = 16; // 0x10
+ field public static final int RESULT_NETWORK_ERROR = 17; // 0x11
+ field public static final int RESULT_NETWORK_REJECT = 10; // 0xa
+ field public static final int RESULT_NO_MEMORY = 13; // 0xd
+ field public static final int RESULT_NO_RESOURCES = 22; // 0x16
+ field public static final int RESULT_OPERATION_NOT_ALLOWED = 20; // 0x14
+ field public static final int RESULT_RADIO_NOT_AVAILABLE = 9; // 0x9
+ field public static final int RESULT_REQUEST_NOT_SUPPORTED = 24; // 0x18
+ field public static final int RESULT_SYSTEM_ERROR = 15; // 0xf
}
public class SubscriptionManager {
@@ -4508,6 +4937,7 @@
method public int getSimApplicationState();
method public int getSimCardState();
method public java.util.List<android.telephony.TelephonyHistogram> getTelephonyHistograms();
+ method public android.telephony.UiccSlotInfo[] getUiccSlotsInfo();
method public android.os.Bundle getVisualVoicemailSettings();
method public int getVoiceActivationState();
method public boolean handlePinMmi(java.lang.String);
@@ -4534,6 +4964,7 @@
method public int[] supplyPinReportResult(java.lang.String);
method public boolean supplyPuk(java.lang.String, java.lang.String);
method public int[] supplyPukReportResult(java.lang.String, java.lang.String);
+ method public boolean switchSlots(int[]);
method public void toggleRadioOnOff();
method public void updateServiceLocation();
field public static final java.lang.String ACTION_SIM_APPLICATION_STATE_CHANGED = "android.telephony.action.SIM_APPLICATION_STATE_CHANGED";
@@ -4555,6 +4986,25 @@
field public static final int SIM_STATE_PRESENT = 11; // 0xb
}
+ public class UiccSlotInfo implements android.os.Parcelable {
+ ctor public UiccSlotInfo(boolean, boolean, java.lang.String, int);
+ method public int describeContents();
+ method public java.lang.String getCardId();
+ method public int getCardStateInfo();
+ method public boolean getIsActive();
+ method public boolean getIsEuicc();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final int CARD_STATE_INFO_ABSENT = 1; // 0x1
+ field public static final int CARD_STATE_INFO_ERROR = 3; // 0x3
+ field public static final int CARD_STATE_INFO_PRESENT = 2; // 0x2
+ field public static final int CARD_STATE_INFO_RESTRICTED = 4; // 0x4
+ field public static final android.os.Parcelable.Creator<android.telephony.UiccSlotInfo> CREATOR;
+ field public final java.lang.String cardId;
+ field public final int cardStateInfo;
+ field public final boolean isActive;
+ field public final boolean isEuicc;
+ }
+
public abstract class VisualVoicemailService extends android.app.Service {
method public static final void sendVisualVoicemailSms(android.content.Context, android.telecom.PhoneAccountHandle, java.lang.String, short, java.lang.String, android.app.PendingIntent);
method public static final void setSmsFilterSettings(android.content.Context, android.telecom.PhoneAccountHandle, android.telephony.VisualVoicemailSmsFilterSettings);
@@ -4657,6 +5107,30 @@
}
+package android.telephony.ims.internal.stub {
+
+ public class SmsImplBase {
+ ctor public SmsImplBase();
+ method public void acknowledgeSms(int, int, int);
+ method public void acknowledgeSmsReport(int, int, int);
+ method public java.lang.String getSmsFormat();
+ method public void onReady();
+ method public final void onSendSmsResult(int, int, int, int) throws java.lang.RuntimeException;
+ method public final void onSmsReceived(int, java.lang.String, byte[]) throws java.lang.RuntimeException;
+ method public final void onSmsStatusReportReceived(int, int, java.lang.String, byte[]) throws java.lang.RuntimeException;
+ method public void sendSms(int, int, java.lang.String, java.lang.String, boolean, byte[]);
+ field public static final int DELIVER_STATUS_ERROR = 2; // 0x2
+ field public static final int DELIVER_STATUS_OK = 1; // 0x1
+ field public static final int SEND_STATUS_ERROR = 2; // 0x2
+ field public static final int SEND_STATUS_ERROR_FALLBACK = 4; // 0x4
+ field public static final int SEND_STATUS_ERROR_RETRY = 3; // 0x3
+ field public static final int SEND_STATUS_OK = 1; // 0x1
+ field public static final int STATUS_REPORT_STATUS_ERROR = 2; // 0x2
+ field public static final int STATUS_REPORT_STATUS_OK = 1; // 0x1
+ }
+
+}
+
package android.telephony.mbms {
public final class DownloadRequest implements android.os.Parcelable {
@@ -4758,24 +5232,10 @@
method public int getUid();
}
- public final class StatsManager {
- method public boolean addConfiguration(java.lang.String, byte[], java.lang.String, java.lang.String);
- method public boolean addConfiguration(long, byte[], java.lang.String, java.lang.String);
- method public byte[] getData(java.lang.String);
- method public byte[] getData(long);
- method public byte[] getMetadata();
- method public boolean removeConfiguration(java.lang.String);
- method public boolean removeConfiguration(long);
- }
-
}
package android.view {
- public abstract class Window {
- method public void setDisableWallpaperTouchEvents(boolean);
- }
-
public abstract interface WindowManager implements android.view.ViewManager {
method public abstract android.graphics.Region getCurrentImeTouchRegion();
}
@@ -5201,7 +5661,7 @@
field public final java.lang.String description;
field public final boolean isFallback;
field public final java.lang.String packageName;
- field public final java.lang.String[] signatures;
+ field public final android.content.pm.Signature[] signatures;
}
public final class WebViewUpdateService {
diff --git a/api/test-current.txt b/api/test-current.txt
index acc819e..4e8f904 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -48,6 +48,7 @@
public class AppOpsManager {
method public static java.lang.String[] getOpStrs();
method public void setMode(int, int, java.lang.String, int);
+ field public static final java.lang.String OPSTR_ACCEPT_HANDOVER = "android:accept_handover";
field public static final java.lang.String OPSTR_ACCESS_NOTIFICATIONS = "android:access_notifications";
field public static final java.lang.String OPSTR_ACTIVATE_VPN = "android:activate_vpn";
field public static final java.lang.String OPSTR_ASSIST_SCREENSHOT = "android:assist_screenshot";
@@ -521,6 +522,7 @@
}
public static final class Settings.Global extends android.provider.Settings.NameValueTable {
+ field public static final java.lang.String LOCATION_GLOBAL_KILL_SWITCH = "location_global_kill_switch";
field public static final java.lang.String LOW_POWER_MODE = "low_power";
field public static final java.lang.String USE_OPEN_WIFI_PACKAGE = "use_open_wifi_package";
}
@@ -1035,6 +1037,10 @@
package android.widget {
+ public abstract class AbsListView extends android.widget.AdapterView implements android.widget.Filter.FilterListener android.text.TextWatcher android.view.ViewTreeObserver.OnGlobalLayoutListener android.view.ViewTreeObserver.OnTouchModeChangeListener {
+ method public final boolean shouldDrawSelector();
+ }
+
public class CalendarView extends android.widget.FrameLayout {
method public boolean getBoundsForDate(long, android.graphics.Rect);
}
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index d1af71d..54785ca 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -66,9 +66,12 @@
namespace android {
static const char OEM_BOOTANIMATION_FILE[] = "/oem/media/bootanimation.zip";
+static const char PRODUCT_BOOTANIMATION_FILE[] = "/product/media/bootanimation.zip";
static const char SYSTEM_BOOTANIMATION_FILE[] = "/system/media/bootanimation.zip";
+static const char PRODUCT_ENCRYPTED_BOOTANIMATION_FILE[] = "/product/media/bootanimation-encrypted.zip";
static const char SYSTEM_ENCRYPTED_BOOTANIMATION_FILE[] = "/system/media/bootanimation-encrypted.zip";
static const char OEM_SHUTDOWNANIMATION_FILE[] = "/oem/media/shutdownanimation.zip";
+static const char PRODUCT_SHUTDOWNANIMATION_FILE[] = "/product/media/shutdownanimation.zip";
static const char SYSTEM_SHUTDOWNANIMATION_FILE[] = "/system/media/shutdownanimation.zip";
static const char SYSTEM_DATA_DIR_PATH[] = "/data/system";
@@ -308,14 +311,20 @@
bool encryptedAnimation = atoi(decrypt) != 0 ||
!strcmp("trigger_restart_min_framework", decrypt);
- if (!mShuttingDown && encryptedAnimation &&
- (access(SYSTEM_ENCRYPTED_BOOTANIMATION_FILE, R_OK) == 0)) {
- mZipFileName = SYSTEM_ENCRYPTED_BOOTANIMATION_FILE;
- return NO_ERROR;
+ if (!mShuttingDown && encryptedAnimation) {
+ static const char* encryptedBootFiles[] =
+ {PRODUCT_ENCRYPTED_BOOTANIMATION_FILE, SYSTEM_ENCRYPTED_BOOTANIMATION_FILE};
+ for (const char* f : encryptedBootFiles) {
+ if (access(f, R_OK) == 0) {
+ mZipFileName = f;
+ return NO_ERROR;
+ }
+ }
}
- static const char* bootFiles[] = {OEM_BOOTANIMATION_FILE, SYSTEM_BOOTANIMATION_FILE};
+ static const char* bootFiles[] =
+ {PRODUCT_BOOTANIMATION_FILE, OEM_BOOTANIMATION_FILE, SYSTEM_BOOTANIMATION_FILE};
static const char* shutdownFiles[] =
- {OEM_SHUTDOWNANIMATION_FILE, SYSTEM_SHUTDOWNANIMATION_FILE};
+ {PRODUCT_SHUTDOWNANIMATION_FILE, OEM_SHUTDOWNANIMATION_FILE, SYSTEM_SHUTDOWNANIMATION_FILE};
for (const char* f : (!mShuttingDown ? bootFiles : shutdownFiles)) {
if (access(f, R_OK) == 0) {
diff --git a/cmds/bootanimation/FORMAT.md b/cmds/bootanimation/FORMAT.md
index 9ea6fea..5946515 100644
--- a/cmds/bootanimation/FORMAT.md
+++ b/cmds/bootanimation/FORMAT.md
@@ -30,7 +30,7 @@
It is followed by a number of rows of the form:
- TYPE COUNT PAUSE PATH [#RGBHEX CLOCK]
+ TYPE COUNT PAUSE PATH [#RGBHEX [CLOCK1 [CLOCK2]]]
* **TYPE:** a single char indicating what type of animation segment this is:
+ `p` -- this part will play unless interrupted by the end of the boot
@@ -39,11 +39,38 @@
* **PAUSE:** number of FRAMES to delay after this part ends
* **PATH:** directory in which to find the frames for this part (e.g. `part0`)
* **RGBHEX:** _(OPTIONAL)_ a background color, specified as `#RRGGBB`
- * **CLOCK:** _(OPTIONAL)_ the y-coordinate at which to draw the current time (for watches)
+ * **CLOCK1, CLOCK2:** _(OPTIONAL)_ the coordinates at which to draw the current time (for watches):
+ + If only `CLOCK1` is provided it is the y-coordinate of the clock and the x-coordinate
+ defaults to `c`
+ + If both `CLOCK1` and `CLOCK2` are provided then `CLOCK1` is the x-coordinate and `CLOCK2` is
+ the y-coodinate
+ + Values can be either a positive integer, a negative integer, or `c`
+ - `c` -- will centre the text
+ - `n` -- will position the text n pixels from the start; left edge for x-axis, bottom edge
+ for y-axis
+ - `-n` -- will position the text n pixels from the end; right edge for x-axis, top edge
+ for y-axis
+ - Examples:
+ * `-24` or `c -24` will position the text 24 pixels from the top of the screen,
+ centred horizontally
+ * `16 c` will position the text 16 pixels from the left of the screen, centred
+ vertically
+ * `-32 32` will position the text such that the bottom right corner is 32 pixels above
+ and 32 pixels left of the edges of the screen
There is also a special TYPE, `$SYSTEM`, that loads `/system/media/bootanimation.zip`
and plays that.
+## clock_font.png
+
+The file used to draw the time on top of the boot animation. The font format is as follows:
+ * The file specifies glyphs for the ascii characters 32-127 (0x20-0x7F), both regular weight and
+ bold weight.
+ * The image is divided into a grid of characters
+ * There are 16 columns and 6 rows
+ * Each row is divided in half: regular weight glyphs on the top half, bold glyphs on the bottom
+ * For a NxM image each character glyph will be N/16 pixels wide and M/(12*2) pixels high
+
## loading and playing frames
Each part is scanned and loaded directly from the zip archive. Within a part directory, every file
diff --git a/cmds/dpm/src/com/android/commands/dpm/Dpm.java b/cmds/dpm/src/com/android/commands/dpm/Dpm.java
index 3ac70d6..47581e1 100644
--- a/cmds/dpm/src/com/android/commands/dpm/Dpm.java
+++ b/cmds/dpm/src/com/android/commands/dpm/Dpm.java
@@ -45,6 +45,7 @@
private static final String COMMAND_SET_DEVICE_OWNER = "set-device-owner";
private static final String COMMAND_SET_PROFILE_OWNER = "set-profile-owner";
private static final String COMMAND_REMOVE_ACTIVE_ADMIN = "remove-active-admin";
+ private static final String COMMAND_CLEAR_FREEZE_PERIOD_RECORD = "clear-freeze-period-record";
private IDevicePolicyManager mDevicePolicyManager;
private int mUserId = UserHandle.USER_SYSTEM;
@@ -75,7 +76,11 @@
"\n" +
"dpm remove-active-admin: Disables an active admin, the admin must have declared" +
" android:testOnly in the application in its manifest. This will also remove" +
- " device and profile owners\n");
+ " device and profile owners\n" +
+ "\n" +
+ "dpm " + COMMAND_CLEAR_FREEZE_PERIOD_RECORD + ": clears framework-maintained " +
+ "record of past freeze periods that the device went through. For use during " +
+ "feature development to prevent triggering restriction on setting freeze periods");
}
@Override
@@ -101,6 +106,9 @@
case COMMAND_REMOVE_ACTIVE_ADMIN:
runRemoveActiveAdmin();
break;
+ case COMMAND_CLEAR_FREEZE_PERIOD_RECORD:
+ runClearFreezePeriodRecord();
+ break;
default:
throw new IllegalArgumentException ("unknown command '" + command + "'");
}
@@ -190,6 +198,11 @@
+ mComponent.toShortString() + " for user " + mUserId);
}
+ private void runClearFreezePeriodRecord() throws RemoteException {
+ mDevicePolicyManager.clearSystemUpdatePolicyFreezePeriodRecord();
+ System.out.println("Success");
+ }
+
private ComponentName parseComponentName(String component) {
ComponentName cn = ComponentName.unflattenFromString(component);
if (cn == null) {
diff --git a/cmds/incident/main.cpp b/cmds/incident/main.cpp
index 519852d..cdec6a0 100644
--- a/cmds/incident/main.cpp
+++ b/cmds/incident/main.cpp
@@ -148,9 +148,19 @@
static int
get_dest(const char* arg)
{
- if (strcmp(arg, "LOCAL") == 0) return 0;
- if (strcmp(arg, "EXPLICIT") == 0) return 1;
- if (strcmp(arg, "AUTOMATIC") == 0) return 2;
+ if (strcmp(arg, "L") == 0
+ || strcmp(arg, "LOCAL") == 0) {
+ return DEST_LOCAL;
+ }
+ if (strcmp(arg, "E") == 0
+ || strcmp(arg, "EXPLICIT") == 0) {
+ return DEST_EXPLICIT;
+ }
+ if (strcmp(arg, "A") == 0
+ || strcmp(arg, "AUTO") == 0
+ || strcmp(arg, "AUTOMATIC") == 0) {
+ return DEST_AUTOMATIC;
+ }
return -1; // return the default value
}
diff --git a/cmds/incidentd/src/Privacy.cpp b/cmds/incidentd/src/Privacy.cpp
index 5db2239..44adaec 100644
--- a/cmds/incidentd/src/Privacy.cpp
+++ b/cmds/incidentd/src/Privacy.cpp
@@ -67,8 +67,14 @@
PrivacySpec new_spec_from_args(int dest)
{
- if (dest < 0) return PrivacySpec();
- return PrivacySpec(dest);
+ switch (dest) {
+ case android::os::DEST_AUTOMATIC:
+ case android::os::DEST_EXPLICIT:
+ case android::os::DEST_LOCAL:
+ return PrivacySpec(dest);
+ default:
+ return PrivacySpec();
+ }
}
PrivacySpec get_default_dropbox_spec() { return PrivacySpec(android::os::DEST_AUTOMATIC); }
\ No newline at end of file
diff --git a/cmds/statsd/Android.mk b/cmds/statsd/Android.mk
index a7daa3f..eabbb96 100644
--- a/cmds/statsd/Android.mk
+++ b/cmds/statsd/Android.mk
@@ -62,6 +62,7 @@
src/storage/StorageManager.cpp \
src/StatsLogProcessor.cpp \
src/StatsService.cpp \
+ src/subscriber/SubscriberReporter.cpp \
src/HashableDimensionKey.cpp \
src/guardrail/MemoryLeakTrackUtil.cpp \
src/guardrail/StatsdStats.cpp
@@ -221,6 +222,44 @@
include $(BUILD_STATIC_JAVA_LIBRARY)
+##############################
+# statsd micro benchmark
+##############################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := statsd_benchmark
+
+LOCAL_SRC_FILES := $(statsd_common_src) \
+ benchmark/main.cpp \
+ benchmark/hello_world_benchmark.cpp \
+ benchmark/log_event_benchmark.cpp
+
+LOCAL_C_INCLUDES := $(statsd_common_c_includes)
+
+LOCAL_CFLAGS := -Wall \
+ -Werror \
+ -Wno-unused-parameter \
+ -Wno-unused-variable \
+ -Wno-unused-function \
+
+# Bug: http://b/29823425 Disable -Wvarargs for Clang update to r271374
+LOCAL_CFLAGS += -Wno-varargs
+
+LOCAL_AIDL_INCLUDES := $(statsd_common_aidl_includes)
+
+LOCAL_STATIC_LIBRARIES := \
+ $(statsd_common_static_libraries)
+
+LOCAL_SHARED_LIBRARIES := $(statsd_common_shared_libraries) \
+ libgtest_prod
+
+LOCAL_PROTOC_OPTIMIZE_TYPE := lite
+
+LOCAL_MODULE_TAGS := eng tests
+
+include $(BUILD_NATIVE_BENCHMARK)
+
+
statsd_common_src:=
statsd_common_aidl_includes:=
statsd_common_c_includes:=
@@ -228,6 +267,4 @@
statsd_common_shared_libraries:=
-##############################
-
include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/cmds/statsd/benchmark/hello_world_benchmark.cpp b/cmds/statsd/benchmark/hello_world_benchmark.cpp
new file mode 100644
index 0000000..c732d39
--- /dev/null
+++ b/cmds/statsd/benchmark/hello_world_benchmark.cpp
@@ -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.
+ */
+#include "benchmark/benchmark.h"
+
+static void BM_StringCreation(benchmark::State& state) {
+ while (state.KeepRunning()) std::string empty_string;
+}
+// Register the function as a benchmark
+BENCHMARK(BM_StringCreation);
+
+// Define another benchmark
+static void BM_StringCopy(benchmark::State& state) {
+ std::string x = "hello";
+ while (state.KeepRunning()) std::string copy(x);
+}
+BENCHMARK(BM_StringCopy);
diff --git a/cmds/statsd/benchmark/log_event_benchmark.cpp b/cmds/statsd/benchmark/log_event_benchmark.cpp
new file mode 100644
index 0000000..43addc2
--- /dev/null
+++ b/cmds/statsd/benchmark/log_event_benchmark.cpp
@@ -0,0 +1,74 @@
+/*
+ * 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 <vector>
+#include "benchmark/benchmark.h"
+#include "logd/LogEvent.h"
+
+namespace android {
+namespace os {
+namespace statsd {
+
+using std::vector;
+
+/* Special markers for android_log_list_element type */
+static const char EVENT_TYPE_LIST_STOP = '\n'; /* declare end of list */
+static const char EVENT_TYPE_UNKNOWN = '?'; /* protocol error */
+
+static const char EVENT_TYPE_INT = 0;
+static const char EVENT_TYPE_LONG = 1;
+static const char EVENT_TYPE_STRING = 2;
+static const char EVENT_TYPE_LIST = 3;
+static const char EVENT_TYPE_FLOAT = 4;
+
+static const int kLogMsgHeaderSize = 28;
+
+static void write4Bytes(int val, vector<char>* buffer) {
+ buffer->push_back(static_cast<char>(val));
+ buffer->push_back(static_cast<char>((val >> 8) & 0xFF));
+ buffer->push_back(static_cast<char>((val >> 16) & 0xFF));
+ buffer->push_back(static_cast<char>((val >> 24) & 0xFF));
+}
+
+static void getSimpleLogMsgData(log_msg* msg) {
+ vector<char> buffer;
+ // stats_log tag id
+ write4Bytes(1937006964, &buffer);
+ buffer.push_back(EVENT_TYPE_LIST);
+ buffer.push_back(2); // field counts;
+ buffer.push_back(EVENT_TYPE_INT);
+ write4Bytes(10 /* atom id */, &buffer);
+ buffer.push_back(EVENT_TYPE_INT);
+ write4Bytes(99 /* a value to log*/, &buffer);
+ buffer.push_back(EVENT_TYPE_LIST_STOP);
+
+ msg->entry_v1.len = buffer.size();
+ msg->entry.hdr_size = kLogMsgHeaderSize;
+ msg->entry_v1.sec = time(nullptr);
+ std::copy(buffer.begin(), buffer.end(), msg->buf + kLogMsgHeaderSize);
+}
+
+static void BM_LogEventCreation(benchmark::State& state) {
+ log_msg msg;
+ getSimpleLogMsgData(&msg);
+ while (state.KeepRunning()) {
+ benchmark::DoNotOptimize(LogEvent(msg));
+ }
+}
+BENCHMARK(BM_LogEventCreation);
+
+} // namespace statsd
+} // namespace os
+} // namespace android
diff --git a/core/proto/android/os/batterymanager.proto b/cmds/statsd/benchmark/main.cpp
similarity index 64%
copy from core/proto/android/os/batterymanager.proto
copy to cmds/statsd/benchmark/main.cpp
index 669bf2d..08921f3 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/cmds/statsd/benchmark/main.cpp
@@ -1,5 +1,5 @@
/*
- * 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,16 +14,6 @@
* limitations under the License.
*/
-syntax = "proto2";
-package android.os;
+#include <benchmark/benchmark.h>
-option java_multiple_files = true;
-
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
-}
+BENCHMARK_MAIN();
diff --git a/cmds/statsd/src/StatsLogProcessor.cpp b/cmds/statsd/src/StatsLogProcessor.cpp
index 7a7a2f6..3e71b53 100644
--- a/cmds/statsd/src/StatsLogProcessor.cpp
+++ b/cmds/statsd/src/StatsLogProcessor.cpp
@@ -92,10 +92,20 @@
void StatsLogProcessor::mapIsolatedUidToHostUidIfNecessaryLocked(LogEvent* event) const {
std::vector<Field> uidFields;
- findFields(
- event->getFieldValueMap(),
- buildAttributionUidFieldMatcher(event->GetTagId(), Position::ANY),
- &uidFields);
+ if (android::util::kAtomsWithAttributionChain.find(event->GetTagId()) !=
+ android::util::kAtomsWithAttributionChain.end()) {
+ findFields(
+ event->getFieldValueMap(),
+ buildAttributionUidFieldMatcher(event->GetTagId(), Position::ANY),
+ &uidFields);
+ } else if (android::util::kAtomsWithUidField.find(event->GetTagId()) !=
+ android::util::kAtomsWithUidField.end()) {
+ findFields(
+ event->getFieldValueMap(),
+ buildSimpleAtomFieldMatcher(event->GetTagId(), 1 /* uid is always the 1st field. */),
+ &uidFields);
+ }
+
for (size_t i = 0; i < uidFields.size(); ++i) {
DimensionsValue* value = event->findFieldValueOrNull(uidFields[i]);
if (value != nullptr && value->value_case() == DimensionsValue::ValueCase::kValueInt) {
@@ -127,15 +137,17 @@
StatsdStats::getInstance().noteAtomLogged(
event->GetTagId(), event->GetTimestampNs() / NS_PER_SEC);
- if (mMetricsManagers.empty()) {
- return;
- }
-
// Hard-coded logic to update the isolated uid's in the uid-map.
// The field numbers need to be currently updated by hand with atoms.proto
if (event->GetTagId() == android::util::ISOLATED_UID_CHANGED) {
onIsolatedUidChangedEventLocked(*event);
- } else {
+ }
+
+ if (mMetricsManagers.empty()) {
+ return;
+ }
+
+ if (event->GetTagId() != android::util::ISOLATED_UID_CHANGED) {
// Map the isolated uid to host uid if necessary.
mapIsolatedUidToHostUidIfNecessaryLocked(event);
}
@@ -184,6 +196,14 @@
return it->second->byteSize();
}
+void StatsLogProcessor::dumpStates(FILE* out, bool verbose) {
+ std::lock_guard<std::mutex> lock(mMetricsMutex);
+ fprintf(out, "MetricsManager count: %lu\n", (unsigned long)mMetricsManagers.size());
+ for (auto metricsManager : mMetricsManagers) {
+ metricsManager.second->dumpStates(out, verbose);
+ }
+}
+
void StatsLogProcessor::onDumpReport(const ConfigKey& key, const uint64_t& dumpTimeStampNs,
ConfigMetricsReportList* report) {
std::lock_guard<std::mutex> lock(mMetricsMutex);
@@ -201,6 +221,10 @@
void StatsLogProcessor::onDumpReport(const ConfigKey& key, vector<uint8_t>* outData) {
std::lock_guard<std::mutex> lock(mMetricsMutex);
+ onDumpReportLocked(key, outData);
+}
+
+void StatsLogProcessor::onDumpReportLocked(const ConfigKey& key, vector<uint8_t>* outData) {
auto it = mMetricsManagers.find(key);
if (it == mMetricsManagers.end()) {
ALOGW("Config source %s does not exist", key.ToString().c_str());
@@ -240,7 +264,7 @@
// Then, check stats-data directory to see there's any file containing
// ConfigMetricsReport from previous shutdowns to concatenate to reports.
- StorageManager::appendConfigMetricsReport(STATS_DATA_DIR, proto);
+ StorageManager::appendConfigMetricsReport(proto);
if (outData != nullptr) {
outData->clear();
@@ -309,10 +333,10 @@
for (auto& pair : mMetricsManagers) {
const ConfigKey& key = pair.first;
vector<uint8_t> data;
- onDumpReport(key, &data);
+ onDumpReportLocked(key, &data);
// TODO: Add a guardrail to prevent accumulation of file on disk.
- string file_name = StringPrintf("%s/%d-%lld-%ld", STATS_DATA_DIR, key.GetUid(),
- (long long)key.GetId(), time(nullptr));
+ string file_name = StringPrintf("%s/%ld_%d_%lld", STATS_DATA_DIR, time(nullptr),
+ key.GetUid(), (long long)key.GetId());
StorageManager::writeFile(file_name.c_str(), &data[0], data.size());
}
}
diff --git a/cmds/statsd/src/StatsLogProcessor.h b/cmds/statsd/src/StatsLogProcessor.h
index 301e3a5..c19ff63 100644
--- a/cmds/statsd/src/StatsLogProcessor.h
+++ b/cmds/statsd/src/StatsLogProcessor.h
@@ -61,6 +61,8 @@
return mUidMap;
}
+ void dumpStates(FILE* out, bool verbose);
+
private:
mutable mutex mMetricsMutex;
@@ -75,6 +77,8 @@
sp<AnomalyMonitor> mAnomalyMonitor;
+ void onDumpReportLocked(const ConfigKey& key, vector<uint8_t>* outData);
+
/* Check if we should send a broadcast if approaching memory limits and if we're over, we
* actually delete the data. */
void flushIfNecessaryLocked(uint64_t timestampNs, const ConfigKey& key,
diff --git a/cmds/statsd/src/StatsService.cpp b/cmds/statsd/src/StatsService.cpp
index ba628b8..f545bb0 100644
--- a/cmds/statsd/src/StatsService.cpp
+++ b/cmds/statsd/src/StatsService.cpp
@@ -24,6 +24,7 @@
#include "guardrail/MemoryLeakTrackUtil.h"
#include "guardrail/StatsdStats.h"
#include "storage/StorageManager.h"
+#include "subscriber/SubscriberReporter.h"
#include <android-base/file.h>
#include <binder/IPCThreadState.h>
@@ -67,6 +68,7 @@
void CompanionDeathRecipient::binderDied(const wp<IBinder>& who) {
ALOGW("statscompanion service died");
mAnomalyMonitor->setStatsCompanionService(nullptr);
+ SubscriberReporter::getInstance().setStatsCompanionService(nullptr);
}
// ======================================================================
@@ -173,8 +175,13 @@
return NO_MEMORY; // the fd is already open
}
+ bool verbose = false;
+ if (args.size() > 0 && !args[0].compare(String16("-v"))) {
+ verbose = true;
+ }
+
// TODO: Proto format for incident reports
- dump_impl(out);
+ dump_impl(out, verbose);
fclose(out);
return NO_ERROR;
@@ -183,9 +190,9 @@
/**
* Write debugging data about statsd in text format.
*/
-void StatsService::dump_impl(FILE* out) {
- mConfigManager->Dump(out);
+void StatsService::dump_impl(FILE* out, bool verbose) {
StatsdStats::getInstance().dumpStats(out);
+ mProcessor->dumpStates(out, verbose);
}
/**
@@ -380,6 +387,8 @@
"The config can only be set for other UIDs on eng or userdebug "
"builds.\n");
}
+ } else if (argCount == 2 && args[1] == "remove") {
+ good = true;
}
if (!good) {
@@ -681,6 +690,7 @@
VLOG("StatsService::statsCompanionReady linking to statsCompanion.");
IInterface::asBinder(statsCompanion)->linkToDeath(new CompanionDeathRecipient(mAnomalyMonitor));
mAnomalyMonitor->setStatsCompanionService(statsCompanion);
+ SubscriberReporter::getInstance().setStatsCompanionService(statsCompanion);
return Status::ok();
}
@@ -743,7 +753,9 @@
Status StatsService::removeConfiguration(int64_t key, bool* success) {
IPCThreadState* ipc = IPCThreadState::self();
if (checkCallingPermission(String16(kPermissionDump))) {
- mConfigManager->RemoveConfig(ConfigKey(ipc->getCallingUid(), key));
+ ConfigKey configKey(ipc->getCallingUid(), key);
+ mConfigManager->RemoveConfig(configKey);
+ SubscriberReporter::getInstance().removeConfig(configKey);
*success = true;
return Status::ok();
} else {
@@ -752,6 +764,42 @@
}
}
+Status StatsService::setBroadcastSubscriber(int64_t configId,
+ int64_t subscriberId,
+ const sp<android::IBinder>& intentSender,
+ bool* success) {
+ VLOG("StatsService::setBroadcastSubscriber called.");
+ IPCThreadState* ipc = IPCThreadState::self();
+ if (checkCallingPermission(String16(kPermissionDump))) {
+ ConfigKey configKey(ipc->getCallingUid(), configId);
+ SubscriberReporter::getInstance()
+ .setBroadcastSubscriber(configKey, subscriberId, intentSender);
+ *success = true;
+ return Status::ok();
+ } else {
+ *success = false;
+ return Status::fromExceptionCode(binder::Status::EX_SECURITY);
+ }
+}
+
+Status StatsService::unsetBroadcastSubscriber(int64_t configId,
+ int64_t subscriberId,
+ bool* success) {
+ VLOG("StatsService::unsetBroadcastSubscriber called.");
+ IPCThreadState* ipc = IPCThreadState::self();
+ if (checkCallingPermission(String16(kPermissionDump))) {
+ ConfigKey configKey(ipc->getCallingUid(), configId);
+ SubscriberReporter::getInstance()
+ .unsetBroadcastSubscriber(configKey, subscriberId);
+ *success = true;
+ return Status::ok();
+ } else {
+ *success = false;
+ return Status::fromExceptionCode(binder::Status::EX_SECURITY);
+ }
+}
+
+
void StatsService::binderDied(const wp <IBinder>& who) {
}
diff --git a/cmds/statsd/src/StatsService.h b/cmds/statsd/src/StatsService.h
index 8d29970..be20893 100644
--- a/cmds/statsd/src/StatsService.h
+++ b/cmds/statsd/src/StatsService.h
@@ -99,6 +99,21 @@
*/
virtual Status removeConfiguration(int64_t key, bool* success) override;
+ /**
+ * Binder call to associate the given config's subscriberId with the given intentSender.
+ * intentSender must be convertible into an IntentSender (in Java) using IntentSender(IBinder).
+ */
+ virtual Status setBroadcastSubscriber(int64_t configId,
+ int64_t subscriberId,
+ const sp<android::IBinder>& intentSender,
+ bool* success) override;
+
+ /**
+ * Binder call to unassociate the given config's subscriberId with any intentSender.
+ */
+ virtual Status unsetBroadcastSubscriber(int64_t configId, int64_t subscriberId,
+ bool* success) override;
+
// TODO: public for testing since statsd doesn't run when system starts. Change to private
// later.
/** Inform statsCompanion that statsd is ready. */
@@ -125,7 +140,7 @@
/**
* Text output of dumpsys.
*/
- void dump_impl(FILE* out);
+ void dump_impl(FILE* out, bool verbose);
/**
* Print usage information for the commands
diff --git a/cmds/statsd/src/anomaly/AnomalyTracker.cpp b/cmds/statsd/src/anomaly/AnomalyTracker.cpp
index e34aed3..ded6c4c 100644
--- a/cmds/statsd/src/anomaly/AnomalyTracker.cpp
+++ b/cmds/statsd/src/anomaly/AnomalyTracker.cpp
@@ -21,6 +21,7 @@
#include "external/Perfetto.h"
#include "guardrail/StatsdStats.h"
#include "frameworks/base/libs/incident/proto/android/os/header.pb.h"
+#include "subscriber/SubscriberReporter.h"
#include <android/os/IIncidentManager.h>
#include <android/os/IncidentReportArgs.h>
@@ -233,6 +234,7 @@
}
std::set<int> incidentdSections;
+
for (const Subscription& subscription : mSubscriptions) {
switch (subscription.subscriber_information_case()) {
case Subscription::SubscriberInformationCase::kIncidentdDetails:
@@ -243,6 +245,10 @@
case Subscription::SubscriberInformationCase::kPerfettoDetails:
CollectPerfettoTraceAndUploadToDropbox(subscription.perfetto_details());
break;
+ case Subscription::SubscriberInformationCase::kBroadcastSubscriberDetails:
+ SubscriberReporter::getInstance()
+ .alertBroadcastSubscriber(mConfigKey, subscription, key);
+ break;
default:
break;
}
diff --git a/cmds/statsd/src/anomaly/DurationAnomalyTracker.h b/cmds/statsd/src/anomaly/DurationAnomalyTracker.h
index de7093d..33e55ab 100644
--- a/cmds/statsd/src/anomaly/DurationAnomalyTracker.h
+++ b/cmds/statsd/src/anomaly/DurationAnomalyTracker.h
@@ -51,10 +51,8 @@
// Declares an anomaly for each alarm in firedAlarms that belongs to this DurationAnomalyTracker
// and removes it from firedAlarms.
- // TODO: This will actually be called from a different thread, so make it thread-safe!
- // This means that almost every function in DurationAnomalyTracker needs to be locked.
- // But this should be done at the level of StatsLogProcessor, which needs to lock
- // mMetricsMangers anyway.
+ // Note that this will generally be called from a different thread from the other functions;
+ // the caller is responsible for thread safety.
void informAlarmsFired(const uint64_t& timestampNs,
unordered_set<sp<const AnomalyAlarm>, SpHash<AnomalyAlarm>>& firedAlarms) override;
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 7f0ebb4..b32af02 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -21,7 +21,11 @@
option java_package = "com.android.os";
option java_outer_classname = "AtomsProto";
-import "frameworks/base/core/proto/android/app/activitymanager.proto";
+import "frameworks/base/core/proto/android/app/enums.proto";
+import "frameworks/base/core/proto/android/os/enums.proto";
+import "frameworks/base/core/proto/android/server/enums.proto";
+import "frameworks/base/core/proto/android/telephony/enums.proto";
+import "frameworks/base/core/proto/android/view/enums.proto";
/**
* The master atom class. This message defines all of the available
@@ -44,7 +48,7 @@
BleUnoptimizedScanStateChanged ble_unoptimized_scan_state_changed = 3;
BleScanResultReceived ble_scan_result_received = 4;
SensorStateChanged sensor_state_changed = 5;
- GpsScanStateChanged gps_scan_state_changed = 6; // TODO: untested
+ GpsScanStateChanged gps_scan_state_changed = 6;
SyncStateChanged sync_state_changed = 7;
ScheduledJobStateChanged scheduled_job_state_changed = 8;
ScreenBrightnessChanged screen_brightness_changed = 9;
@@ -84,33 +88,36 @@
AppStartChanged app_start_changed = 48;
AppStartCancelChanged app_start_cancel_changed = 49;
AppStartFullyDrawnChanged app_start_fully_drawn_changed = 50;
- LmkEventOccurred lmk_event_occurred = 51;
+ LmkKillOccurred lmk_kill_occurred = 51;
PictureInPictureStateChanged picture_in_picture_state_changed = 52;
WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53;
+ LmkStateChanged lmk_state_changed = 54;
+ AppStartMemoryStateCaptured app_start_memory_state_captured = 55;
// TODO: Reorder the numbering so that the most frequent occur events occur in the first 15.
}
// Pulled events will start at field 10000.
+ // Next: 10019
oneof pulled {
WifiBytesTransfer wifi_bytes_transfer = 10000;
WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001;
MobileBytesTransfer mobile_bytes_transfer = 10002;
MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003;
+ BluetoothBytesTransfer bluetooth_bytes_transfer = 10006;
KernelWakelock kernel_wakelock = 10004;
SubsystemSleepState subsystem_sleep_state = 10005;
- // 10006 and 10007 are free to use.
CpuTimePerFreq cpu_time_per_freq = 10008;
CpuTimePerUid cpu_time_per_uid = 10009;
CpuTimePerUidFreq cpu_time_per_uid_freq = 10010;
WifiActivityEnergyInfo wifi_activity_energy_info = 10011;
ModemActivityInfo modem_activity_info = 10012;
- MemoryStat memory_stat = 10013;
- CpuSuspendTime cpu_suspend_time = 10014;
- CpuIdleTime cpu_idle_time = 10015;
+ BluetoothActivityInfo bluetooth_activity_info = 10007;
+ ProcessMemoryState process_memory_state = 10013;
+ SystemElapsedRealtime system_elapsed_realtime = 10014;
+ SystemUptime system_uptime = 10015;
CpuActiveTime cpu_active_time = 10016;
CpuClusterTime cpu_cluster_time = 10017;
DiskSpace disk_space = 10018;
- SystemUptime system_uptime = 10019;
}
}
@@ -162,18 +169,8 @@
* frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
*/
message ScreenStateChanged {
- // TODO: Use the real screen state.
- enum State {
- STATE_UNKNOWN = 0;
- STATE_OFF = 1;
- STATE_ON = 2;
- STATE_DOZE = 3;
- STATE_DOZE_SUSPEND = 4;
- STATE_VR = 5;
- STATE_ON_SUSPEND = 6;
- }
- // New screen state.
- optional State display_state = 1;
+ // New screen state, from frameworks/base/core/proto/android/view/enums.proto.
+ optional android.view.DisplayStateEnum state = 1;
}
/**
@@ -185,9 +182,8 @@
message UidProcessStateChanged {
optional int32 uid = 1; // TODO: should be a string tagged w/ uid annotation
- // The state.
- // TODO: Use the real (mapped) process states.
- optional android.app.ProcessState state = 2;
+ // The state, from frameworks/base/core/proto/android/app/enums.proto.
+ optional android.app.ProcessStateEnum state = 2;
}
/**
@@ -197,7 +193,6 @@
* frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java
*/
message ProcessLifeCycleStateChanged {
- // TODO: Use the real (mapped) process states.
optional int32 uid = 1; // TODO: should be a string tagged w/ uid annotation
// TODO: What is this?
@@ -413,13 +408,9 @@
message WakelockStateChanged {
repeated AttributionNode attribution_node = 1;
- // Type of wakelock.
- enum Type {
- PARTIAL = 0;
- FULL = 1;
- WINDOW = 2;
- }
- optional Type type = 2;
+ // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock.
+ // From frameworks/base/core/proto/android/os/enums.proto.
+ optional android.os.WakeLockLevelEnum level = 2;
// The wakelock tag (Called tag in the Java API, sometimes name elsewhere).
optional string tag = 3;
@@ -476,13 +467,7 @@
* frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
*/
message DeviceIdleModeStateChanged {
- // TODO: Use the enum matching BatteryStats.DEVICE_IDLE_MODE_.
- enum State {
- DEVICE_IDLE_MODE_OFF = 0;
- DEVICE_IDLE_MODE_LIGHT = 1;
- DEVICE_IDLE_MODE_DEEP = 2;
- }
- optional State state = 1;
+ optional android.server.DeviceIdleModeEnum state = 1;
}
@@ -493,13 +478,7 @@
* frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
*/
message DeviceIdlingModeStateChanged {
- // TODO: Use the enum matching BatteryStats.DEVICE_IDLE_MODE_.
- enum State {
- DEVICE_IDLE_MODE_OFF = 0;
- DEVICE_IDLE_MODE_LIGHT = 1;
- DEVICE_IDLE_MODE_DEEP = 2;
- }
- optional State state = 1;
+ optional android.server.DeviceIdleModeEnum state = 1;
}
/**
@@ -531,15 +510,8 @@
* frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
*/
message ChargingStateChanged {
- // TODO: Link directly to BatteryManager.java's constants (via a proto).
- enum State {
- BATTERY_STATUS_UNKNOWN = 1;
- BATTERY_STATUS_CHARGING = 2;
- BATTERY_STATUS_DISCHARGING = 3;
- BATTERY_STATUS_NOT_CHARGING = 4;
- BATTERY_STATUS_FULL = 5;
- }
- optional State charging_state = 1;
+ // State of the battery, from frameworks/base/core/proto/android/os/enums.proto.
+ optional android.os.BatteryStatusEnum state = 1;
}
/**
@@ -549,18 +521,8 @@
* frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
*/
message PluggedStateChanged {
- // TODO: Link directly to BatteryManager.java's constants (via a proto).
- enum State {
- // Note that NONE is not in BatteryManager.java's constants.
- BATTERY_PLUGGED_NONE = 0;
- // Power source is an AC charger.
- BATTERY_PLUGGED_AC = 1;
- // Power source is a USB port.
- BATTERY_PLUGGED_USB = 2;
- // Power source is wireless.
- BATTERY_PLUGGED_WIRELESS = 4;
- }
- optional State plugged_state = 1;
+ // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto.
+ optional android.os.BatteryPluggedStateEnum state = 1;
}
/**
@@ -614,13 +576,8 @@
// TODO: Add attribution instead of uid?
optional int32 uid = 1;
- // TODO: Reference telephony/java/android/telephony/DataConnectionRealTimeInfo.java states.
- enum PowerState {
- DC_POWER_STATE_LOW = 1;
- DC_POWER_STATE_MEDIUM = 2;
- DC_POWER_STATE_HIGH = 3;
- }
- optional PowerState power_state = 2;
+ // Power state, from frameworks/base/core/proto/android/telephony/enums.proto.
+ optional android.telephony.DataConnectionPowerStateEnum state = 2;
}
/**
@@ -634,13 +591,8 @@
// TODO: Add attribution instead of uid?
optional int32 uid = 1;
- // TODO: Reference telephony/java/android/telephony/DataConnectionRealTimeInfo.java states.
- enum PowerState {
- DC_POWER_STATE_LOW = 1;
- DC_POWER_STATE_MEDIUM = 2;
- DC_POWER_STATE_HIGH = 3;
- }
- optional PowerState power_state = 2;
+ // Power state, from frameworks/base/core/proto/android/telephony/enums.proto.
+ optional android.telephony.DataConnectionPowerStateEnum state = 2;
}
/**
@@ -680,15 +632,8 @@
* frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
*/
message WifiSignalStrengthChanged {
- // TODO: Reference the actual telephony/java/android/telephony/SignalStrength.java states.
- enum SignalStrength {
- SIGNAL_STRENGTH_NONE_OR_UNKNOWN = 0;
- SIGNAL_STRENGTH_POOR = 1;
- SIGNAL_STRENGTH_MODERATE = 2;
- SIGNAL_STRENGTH_GOOD = 3;
- SIGNAL_STRENGTH_GREAT = 4;
- }
- optional SignalStrength signal_strength = 1;
+ // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto.
+ optional android.telephony.SignalStrengthEnum signal_strength = 1;
}
/**
@@ -730,15 +675,8 @@
* frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java
*/
message PhoneSignalStrengthChanged {
- // TODO: Reference the actual telephony/java/android/telephony/SignalStrength.java states.
- enum SignalStrength {
- SIGNAL_STRENGTH_NONE_OR_UNKNOWN = 0;
- SIGNAL_STRENGTH_POOR = 1;
- SIGNAL_STRENGTH_MODERATE = 2;
- SIGNAL_STRENGTH_GOOD = 3;
- SIGNAL_STRENGTH_GREAT = 4;
- }
- optional SignalStrength signal_strength = 1;
+ // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto.
+ optional android.telephony.SignalStrengthEnum signal_strength = 1;
}
/**
@@ -891,15 +829,7 @@
// Device uptime when activity started.
optional int64 activity_start_msec = 7;
- // TODO: Update android/app/ActivityManagerInternal.java constants to depend on our proto enum.
- enum TransitionReason {
- APP_START_TRANSITION_REASON_UNKNOWN = 0;
- SPLASH_SCREEN = 1;
- WINDOWS_DRAWN = 2;
- TIMEOUT = 3;
- SNAPSHOT = 4;
- }
- optional TransitionReason reason = 8;
+ optional android.app.AppTransitionReasonEnum reason = 8;
optional int32 transition_delay_msec = 9;
// -1 if not set.
@@ -1061,6 +991,20 @@
}
/**
+ * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller.
+ *
+ * Pulled from:
+ * StatsCompanionService
+ */
+message BluetoothBytesTransfer {
+ optional int32 uid = 1;
+
+ optional int64 rx_bytes = 2;
+
+ optional int64 tx_bytes = 3;
+}
+
+/**
* Pulls the kernel wakelock durations. This atom is adapted from
* android/internal/os/KernelWakelockStats.java
*
@@ -1230,62 +1174,147 @@
optional uint64 energy_used = 10;
}
-/*
- * Logs the memory stats for a process
+/**
+ * Pulls Bluetooth Activity Energy Info
+ * Note: BluetoothBytesTransfer is pulled at the same time from the controller.
*/
-message MemoryStat {
- // The uid if available. -1 means not available.
- optional int32 uid = 1;
-
- // The app package name.
- optional string pkg_name = 2;
-
- // # of page-faults
- optional int64 pgfault = 3;
-
- // # of major page-faults
- optional int64 pgmajfault = 4;
-
- // RSS+CACHE(+SWAP)
- optional int64 usage_in_bytes = 5;
+message BluetoothActivityInfo {
+ // timestamp(wall clock) of record creation
+ optional uint64 timestamp_ms = 1;
+ // bluetooth stack state
+ optional int32 bluetooth_stack_state = 2;
+ // tx time in ms
+ optional uint64 controller_tx_time_ms = 3;
+ // rx time in ms
+ optional uint64 controller_rx_time_ms = 4;
+ // idle time in ms
+ optional uint64 controller_idle_time_ms = 5;
+ // product of current(mA), voltage(V) and time(ms)
+ optional uint64 energy_used = 6;
}
/*
- * Logs the event when LMKD kills a process to reduce memory pressure
+ * Logs the memory stats for an app on startup.
* Logged from:
- * system/core/lmkd/lmkd.c
+ * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
*/
-message LmkEventOccurred {
+message AppStartMemoryStateCaptured {
// The uid if available. -1 means not available.
optional int32 uid = 1;
- // The app package name.
- optional string pkg_name = 2;
+ // The process name.
+ optional string process_name = 2;
+
+ // The activity name.
+ optional string activity_name = 3;
+
+ // # of page-faults
+ optional int64 pgfault = 4;
+
+ // # of major page-faults
+ optional int64 pgmajfault = 5;
+
+ // RSS
+ optional int64 rss_in_bytes = 6;
+
+ // CACHE
+ optional int64 cache_in_bytes = 7;
+
+ // SWAP
+ optional int64 swap_in_bytes = 8;
+}
+
+/*
+ * Logs the memory stats for a process.
+ */
+message ProcessMemoryState {
+ // The uid if available. -1 means not available.
+ optional int32 uid = 1;
+
+ // The process name.
+ optional string process_name = 2;
// oom adj score.
optional int32 oom_score = 3;
- // Used as start/stop boundaries for the event
+ // # of page-faults
+ optional int64 pgfault = 4;
+
+ // # of major page-faults
+ optional int64 pgmajfault = 5;
+
+ // RSS
+ optional int64 rss_in_bytes = 6;
+
+ // CACHE
+ optional int64 cache_in_bytes = 7;
+
+ // SWAP
+ optional int64 swap_in_bytes = 8;
+}
+
+/*
+ * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries
+ * for LMK event.
+ * Logged from:
+ * system/core/lmkd/lmkd.c
+ */
+message LmkStateChanged {
enum State {
UNKNOWN = 0;
START = 1;
- END = 2;
+ STOP = 2;
}
- optional State state = 4;
+ optional State state = 1;
}
/*
- * Cpu syspend time for cpu power calculation.
+ * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure.
+ * Logged from:
+ * system/core/lmkd/lmkd.c
*/
-message CpuSuspendTime {
- optional uint64 time = 1;
+message LmkKillOccurred {
+ // The uid if available. -1 means not available.
+ optional int32 uid = 1;
+
+ // The process name.
+ optional string process_name = 2;
+
+ // oom adj score.
+ optional int32 oom_score = 3;
+
+ // # of page-faults
+ optional int64 pgfault = 4;
+
+ // # of major page-faults
+ optional int64 pgmajfault = 5;
+
+ // RSS
+ optional int64 rss_in_bytes = 6;
+
+ // CACHE
+ optional int64 cache_in_bytes = 7;
+
+ // SWAP
+ optional int64 swap_in_bytes = 8;
}
/*
- * Cpu idle time for cpu power calculation.
+ * Elapsed real time from SystemClock.
*/
-message CpuIdleTime {
- optional uint64 time = 1;
+message SystemElapsedRealtime {
+ optional uint64 time_ms = 1;
+}
+
+/*
+ * Up time from SystemClock.
+ */
+message SystemUptime {
+ // Milliseconds since the system was booted.
+ // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting
+ // for external input).
+ // It is not affected by clock scaling, idle, or other power saving mechanisms.
+ optional uint64 uptime_ms = 1;
}
/*
@@ -1329,14 +1358,3 @@
// available bytes in download cache or temp directories
optional uint64 temp_available_bytes = 3;
}
-
-/*
- * Pulls system up time.
- */
-message SystemUptime {
- // Milliseconds since the system was booted.
- // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting
- // for external input).
- // It is not affected by clock scaling, idle, or other power saving mechanisms.
- optional uint64 uptime_ms = 1;
-}
diff --git a/cmds/statsd/src/condition/CombinationConditionTracker.cpp b/cmds/statsd/src/condition/CombinationConditionTracker.cpp
index afa26f6..ea6586c 100644
--- a/cmds/statsd/src/condition/CombinationConditionTracker.cpp
+++ b/cmds/statsd/src/condition/CombinationConditionTracker.cpp
@@ -154,7 +154,7 @@
}
}
nonSlicedConditionCache[mIndex] = ConditionState::kUnknown;
- ALOGD("CombinationPredicate %lld sliced may changed? %d", (long long)mConditionId,
+ VLOG("CombinationPredicate %lld sliced may changed? %d", (long long)mConditionId,
conditionChangedCache[mIndex] == true);
}
}
diff --git a/cmds/statsd/src/config/ConfigManager.cpp b/cmds/statsd/src/config/ConfigManager.cpp
index 42994b5..61eeee3 100644
--- a/cmds/statsd/src/config/ConfigManager.cpp
+++ b/cmds/statsd/src/config/ConfigManager.cpp
@@ -101,8 +101,8 @@
}
void ConfigManager::remove_saved_configs(const ConfigKey& key) {
- string prefix = StringPrintf("%d-%lld", key.GetUid(), (long long)key.GetId());
- StorageManager::deletePrefixedFiles(STATS_SERVICE_DIR, prefix.c_str());
+ string suffix = StringPrintf("%d-%lld", key.GetUid(), (long long)key.GetId());
+ StorageManager::deleteSuffixedFiles(STATS_SERVICE_DIR, suffix.c_str());
}
void ConfigManager::RemoveConfigs(int uid) {
@@ -111,6 +111,7 @@
for (auto it = mConfigs.begin(); it != mConfigs.end();) {
// Remove from map
if (it->GetUid() == uid) {
+ remove_saved_configs(*it);
removed.push_back(*it);
mConfigReceivers.erase(*it);
it = mConfigs.erase(it);
@@ -185,8 +186,8 @@
remove_saved_configs(key);
// Then we save the latest config.
- string file_name = StringPrintf("%s/%d-%lld-%ld", STATS_SERVICE_DIR, key.GetUid(),
- (long long)key.GetId(), time(nullptr));
+ string file_name = StringPrintf("%s/%ld_%d_%lld", STATS_SERVICE_DIR, time(nullptr),
+ key.GetUid(), (long long)key.GetId());
const int numBytes = config.ByteSize();
vector<uint8_t> buffer(numBytes);
config.SerializeToArray(&buffer[0], numBytes);
diff --git a/cmds/statsd/src/external/Perfetto.cpp b/cmds/statsd/src/external/Perfetto.cpp
index f7b33e7..1d8a968 100644
--- a/cmds/statsd/src/external/Perfetto.cpp
+++ b/cmds/statsd/src/external/Perfetto.cpp
@@ -20,6 +20,7 @@
#include <android-base/unique_fd.h>
#include <errno.h>
+#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
@@ -65,11 +66,26 @@
// Replace stdin with |readPipe| so the main process can write into it.
if (dup2(readPipe.get(), STDIN_FILENO) < 0) _exit(1);
+ readPipe.reset();
+
+ // Replace stdout/stderr with /dev/null and close any other file
+ // descriptor. This is to avoid SELinux complaining about perfetto
+ // trying to access files accidentally left open by statsd (i.e. files
+ // that have been opened without the O_CLOEXEC flag).
+ int devNullFd = open("/dev/null", O_RDWR | O_CLOEXEC);
+ if (dup2(devNullFd, STDOUT_FILENO) < 0) _exit(2);
+ if (dup2(devNullFd, STDERR_FILENO) < 0) _exit(3);
+ close(devNullFd);
+ for (int i = 0; i < 1024; i++) {
+ if (i != STDIN_FILENO && i != STDOUT_FILENO && i != STDERR_FILENO) close(i);
+ }
+
execl("/system/bin/perfetto", "perfetto", "--background", "--config", "-", "--dropbox",
kDropboxTag, nullptr);
- // execl() doesn't return in case of success, if we get here something failed.
- _exit(1);
+ // execl() doesn't return in case of success, if we get here something
+ // failed.
+ _exit(4);
}
// Main process.
@@ -93,8 +109,8 @@
return false;
}
- // This does NOT wait for the full duration of the trace. It just waits until the process
- // has read the config from stdin and detached.
+ // This does NOT wait for the full duration of the trace. It just waits until
+ // the process has read the config from stdin and detached.
int childStatus = 0;
waitpid(pid, &childStatus, 0);
if (!WIFEXITED(childStatus) || WEXITSTATUS(childStatus) != 0) {
diff --git a/cmds/statsd/src/external/StatsPullerManagerImpl.cpp b/cmds/statsd/src/external/StatsPullerManagerImpl.cpp
index e06ae48..148c9ae 100644
--- a/cmds/statsd/src/external/StatsPullerManagerImpl.cpp
+++ b/cmds/statsd/src/external/StatsPullerManagerImpl.cpp
@@ -64,12 +64,20 @@
mPullers.insert({android::util::CPU_TIME_PER_FREQ, make_shared<StatsCompanionServicePuller>(android::util::CPU_TIME_PER_FREQ)});
mPullers.insert({android::util::CPU_TIME_PER_UID, make_shared<CpuTimePerUidPuller>()});
mPullers.insert({android::util::CPU_TIME_PER_UID_FREQ, make_shared<CpuTimePerUidFreqPuller>()});
- mPullers.insert({android::util::CPU_SUSPEND_TIME, make_shared<StatsCompanionServicePuller>(android::util::CPU_SUSPEND_TIME)});
- mPullers.insert({android::util::CPU_IDLE_TIME, make_shared<StatsCompanionServicePuller>(android::util::CPU_IDLE_TIME)});
- mPullers.insert({android::util::DISK_SPACE,
- make_shared<StatsCompanionServicePuller>(android::util::DISK_SPACE)});
+ mPullers.insert(
+ {android::util::SYSTEM_ELAPSED_REALTIME,
+ make_shared<StatsCompanionServicePuller>(android::util::SYSTEM_ELAPSED_REALTIME)});
mPullers.insert({android::util::SYSTEM_UPTIME,
make_shared<StatsCompanionServicePuller>(android::util::SYSTEM_UPTIME)});
+ mPullers.insert({android::util::DISK_SPACE,
+ make_shared<StatsCompanionServicePuller>(android::util::DISK_SPACE)});
+ mPullers.insert(
+ {android::util::BLUETOOTH_ACTIVITY_INFO,
+ make_shared<StatsCompanionServicePuller>(android::util::BLUETOOTH_ACTIVITY_INFO)});
+
+ mPullers.insert(
+ {android::util::BLUETOOTH_BYTES_TRANSFER,
+ make_shared<StatsCompanionServicePuller>(android::util::BLUETOOTH_BYTES_TRANSFER)});
mPullers.insert(
{android::util::WIFI_ACTIVITY_ENERGY_INFO,
make_shared<StatsCompanionServicePuller>(android::util::WIFI_ACTIVITY_ENERGY_INFO)});
diff --git a/cmds/statsd/src/guardrail/StatsdStats.cpp b/cmds/statsd/src/guardrail/StatsdStats.cpp
index 63bde7d..77f5456 100644
--- a/cmds/statsd/src/guardrail/StatsdStats.cpp
+++ b/cmds/statsd/src/guardrail/StatsdStats.cpp
@@ -45,6 +45,8 @@
const int FIELD_ID_ATOM_STATS = 7;
const int FIELD_ID_UIDMAP_STATS = 8;
const int FIELD_ID_ANOMALY_ALARM_STATS = 9;
+const int FIELD_ID_PULLED_ATOM_STATS = 10;
+const int FIELD_ID_LOGGER_ERROR_STATS = 11;
const int FIELD_ID_MATCHER_STATS_NAME = 1;
const int FIELD_ID_MATCHER_STATS_COUNT = 2;
@@ -60,6 +62,9 @@
const int FIELD_ID_ANOMALY_ALARMS_REGISTERED = 1;
+const int FIELD_ID_LOGGER_STATS_TIME = 1;
+const int FIELD_ID_LOGGER_STATS_ERROR_CODE = 2;
+
std::map<int, long> StatsdStats::kPullerCooldownMap = {
{android::util::KERNEL_WAKELOCK, 1},
{android::util::WIFI_BYTES_TRANSFER, 1},
@@ -282,6 +287,15 @@
mPushedAtomStats[atomId]++;
}
+void StatsdStats::noteLoggerError(int error) {
+ lock_guard<std::mutex> lock(mLock);
+ // grows strictly one at a time. so it won't > kMaxLoggerErrors
+ if (mLoggerErrors.size() == kMaxLoggerErrors) {
+ mLoggerErrors.pop_front();
+ }
+ mLoggerErrors.push_back(std::make_pair(time(nullptr), error));
+}
+
void StatsdStats::reset() {
lock_guard<std::mutex> lock(mLock);
resetInternalLocked();
@@ -297,6 +311,7 @@
mAlertStats.clear();
mAnomalyAlarmRegisteredStats = 0;
mMatcherStats.clear();
+ mLoggerErrors.clear();
for (auto& config : mConfigStats) {
config.second.clear_broadcast_sent_time_sec();
config.second.clear_data_drop_time_sec();
@@ -465,6 +480,14 @@
"lost=%d\n",
mUidMapStats.bytes_used(), mUidMapStats.snapshots(), mUidMapStats.changes(),
mUidMapStats.dropped_snapshots(), mUidMapStats.dropped_changes());
+
+ for (const auto& error : mLoggerErrors) {
+ time_t error_time = error.first;
+ struct tm* error_tm = localtime(&error_time);
+ char buffer[80];
+ strftime(buffer, sizeof(buffer), "%Y-%m-%d %I:%M%p\n", error_tm);
+ fprintf(out, "Logger error %d at %s\n", error.second, buffer);
+ }
}
void StatsdStats::dumpStats(std::vector<uint8_t>* output, bool reset) {
@@ -526,6 +549,14 @@
mUidMapStats.SerializeToArray(&buffer[0], numBytes);
proto.write(FIELD_TYPE_MESSAGE | FIELD_ID_UIDMAP_STATS, &buffer[0], buffer.size());
+ for (const auto& error : mLoggerErrors) {
+ long long token = proto.start(FIELD_TYPE_MESSAGE | FIELD_ID_LOGGER_ERROR_STATS |
+ FIELD_COUNT_REPEATED);
+ proto.write(FIELD_TYPE_INT32 | FIELD_ID_LOGGER_STATS_TIME, error.first);
+ proto.write(FIELD_TYPE_INT32 | FIELD_ID_LOGGER_STATS_ERROR_CODE, error.second);
+ proto.end(token);
+ }
+
output->clear();
size_t bufferSize = proto.size();
output->resize(bufferSize);
diff --git a/cmds/statsd/src/guardrail/StatsdStats.h b/cmds/statsd/src/guardrail/StatsdStats.h
index 9178daa4..1f4bfa6 100644
--- a/cmds/statsd/src/guardrail/StatsdStats.h
+++ b/cmds/statsd/src/guardrail/StatsdStats.h
@@ -49,6 +49,8 @@
// The max number of old config stats we keep.
const static int kMaxIceBoxSize = 20;
+ const static int kMaxLoggerErrors = 10;
+
const static int kMaxTimestampCount = 20;
const static int kMaxLogSourceCount = 50;
@@ -74,6 +76,15 @@
// Default cooldown time for a puller
static const long kDefaultPullerCooldown = 1;
+ // Maximum age (30 days) that files on disk can exist in seconds.
+ static const int kMaxAgeSecond = 60 * 60 * 24 * 30;
+
+ // Maximum number of files (1000) that can be in stats directory on disk.
+ static const int kMaxFileNumber = 1000;
+
+ // Maximum size of all files that can be written to stats directory on disk.
+ static const int kMaxFileSize = 50 * 1024 * 1024;
+
/**
* Report a new config has been received and report the static stats about the config.
*
@@ -176,6 +187,11 @@
void notePullFromCache(int pullAtomId);
/**
+ * Records statsd met an error while reading from logd.
+ */
+ void noteLoggerError(int error);
+
+ /**
* Reset the historical stats. Including all stats in icebox, and the tracked stats about
* metrics, matchers, and atoms. The active configs will be kept and StatsdStats will continue
* to collect stats after reset() has been called.
@@ -237,6 +253,9 @@
// Maps PullAtomId to its stats. The size is capped by the puller atom counts.
std::map<int, PulledAtomStats> mPulledAtomStats;
+ // Logd errors. Size capped by kMaxLoggerErrors.
+ std::list<const std::pair<int, int>> mLoggerErrors;
+
// Stores the number of times statsd modified the anomaly alarm registered with
// StatsCompanionService.
int mAnomalyAlarmRegisteredStats = 0;
diff --git a/cmds/statsd/src/logd/LogEvent.cpp b/cmds/statsd/src/logd/LogEvent.cpp
index 34fa3c4..1ca793c 100644
--- a/cmds/statsd/src/logd/LogEvent.cpp
+++ b/cmds/statsd/src/logd/LogEvent.cpp
@@ -42,6 +42,7 @@
mLogUid = msg.entry_v4.uid;
init(mContext);
if (mContext) {
+ // android_log_destroy will set mContext to NULL
android_log_destroy(&mContext);
}
}
@@ -64,12 +65,17 @@
mContext = create_android_log_parser(buffer, len);
init(mContext);
// destroy the context to save memory.
- android_log_destroy(&mContext);
+ if (mContext) {
+ // android_log_destroy will set mContext to NULL
+ android_log_destroy(&mContext);
+ }
}
}
LogEvent::~LogEvent() {
if (mContext) {
+ // This is for the case when LogEvent is created using the test interface
+ // but init() isn't called.
android_log_destroy(&mContext);
}
}
diff --git a/cmds/statsd/src/logd/LogEvent.h b/cmds/statsd/src/logd/LogEvent.h
index fdfa32e..5a4efd4 100644
--- a/cmds/statsd/src/logd/LogEvent.h
+++ b/cmds/statsd/src/logd/LogEvent.h
@@ -58,14 +58,14 @@
/**
* Get the timestamp associated with this event.
*/
- uint64_t GetTimestampNs() const { return mTimestampNs; }
+ inline uint64_t GetTimestampNs() const { return mTimestampNs; }
/**
* Get the tag for this event.
*/
- int GetTagId() const { return mTagId; }
+ inline int GetTagId() const { return mTagId; }
- uint32_t GetUid() const {
+ inline uint32_t GetUid() const {
return mLogUid;
}
@@ -156,7 +156,7 @@
// This field is used when statsD wants to create log event object and write fields to it. After
// calling init() function, this object would be destroyed to save memory usage.
// When the log event is created from log msg, this field is never initiated.
- android_log_context mContext;
+ android_log_context mContext = NULL;
uint64_t mTimestampNs;
diff --git a/cmds/statsd/src/logd/LogReader.cpp b/cmds/statsd/src/logd/LogReader.cpp
index 5d43ef3..0fe896b 100644
--- a/cmds/statsd/src/logd/LogReader.cpp
+++ b/cmds/statsd/src/logd/LogReader.cpp
@@ -16,10 +16,11 @@
#include "logd/LogReader.h"
-#include <utils/Errors.h>
+#include "guardrail/StatsdStats.h"
#include <time.h>
#include <unistd.h>
+#include <utils/Errors.h>
using namespace android;
using namespace std;
@@ -92,16 +93,15 @@
// Read forever
if (eventLogger) {
-
+ log_msg msg;
while (true) {
- log_msg msg;
-
// 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;
}
diff --git a/cmds/statsd/src/metrics/CountMetricProducer.cpp b/cmds/statsd/src/metrics/CountMetricProducer.cpp
index ef27210..0455f6a 100644
--- a/cmds/statsd/src/metrics/CountMetricProducer.cpp
+++ b/cmds/statsd/src/metrics/CountMetricProducer.cpp
@@ -112,6 +112,9 @@
void CountMetricProducer::onDumpReportLocked(const uint64_t dumpTimeNs,
ProtoOutputStream* protoOutput) {
flushIfNeededLocked(dumpTimeNs);
+ if (mPastBuckets.empty()) {
+ return;
+ }
protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)mMetricId);
protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_REPORT_NANOS, (long long)mStartTimeNs);
diff --git a/cmds/statsd/src/metrics/CountMetricProducer.h b/cmds/statsd/src/metrics/CountMetricProducer.h
index 16fc7ee..061b7a3 100644
--- a/cmds/statsd/src/metrics/CountMetricProducer.h
+++ b/cmds/statsd/src/metrics/CountMetricProducer.h
@@ -68,6 +68,8 @@
// Internal function to calculate the current used bytes.
size_t byteSizeLocked() const override;
+ void dumpStatesLocked(FILE* out, bool verbose) const override{};
+
// Util function to flush the old packet.
void flushIfNeededLocked(const uint64_t& newEventTime);
diff --git a/cmds/statsd/src/metrics/DurationMetricProducer.cpp b/cmds/statsd/src/metrics/DurationMetricProducer.cpp
index 58dd464..bfab9e6 100644
--- a/cmds/statsd/src/metrics/DurationMetricProducer.cpp
+++ b/cmds/statsd/src/metrics/DurationMetricProducer.cpp
@@ -168,6 +168,9 @@
void DurationMetricProducer::onDumpReportLocked(const uint64_t dumpTimeNs,
ProtoOutputStream* protoOutput) {
flushIfNeededLocked(dumpTimeNs);
+ if (mPastBuckets.empty()) {
+ return;
+ }
protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)mMetricId);
protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_REPORT_NANOS, (long long)mStartTimeNs);
@@ -230,6 +233,21 @@
mCurrentBucketNum += numBucketsForward;
}
+void DurationMetricProducer::dumpStatesLocked(FILE* out, bool verbose) const {
+ if (mCurrentSlicedDuration.size() == 0) {
+ return;
+ }
+
+ fprintf(out, "DurationMetric %lld dimension size %lu\n", (long long)mMetricId,
+ (unsigned long)mCurrentSlicedDuration.size());
+ if (verbose) {
+ for (const auto& slice : mCurrentSlicedDuration) {
+ fprintf(out, "\t%s\n", slice.first.c_str());
+ slice.second->dumpStates(out, verbose);
+ }
+ }
+}
+
bool DurationMetricProducer::hitGuardRailLocked(const HashableDimensionKey& newKey) {
// the key is not new, we are good.
if (mCurrentSlicedDuration.find(newKey) != mCurrentSlicedDuration.end()) {
diff --git a/cmds/statsd/src/metrics/DurationMetricProducer.h b/cmds/statsd/src/metrics/DurationMetricProducer.h
index e06b9a1..d8cab92 100644
--- a/cmds/statsd/src/metrics/DurationMetricProducer.h
+++ b/cmds/statsd/src/metrics/DurationMetricProducer.h
@@ -68,6 +68,8 @@
// Internal function to calculate the current used bytes.
size_t byteSizeLocked() const override;
+ void dumpStatesLocked(FILE* out, bool verbose) const override;
+
// Util function to flush the old packet.
void flushIfNeededLocked(const uint64_t& eventTime);
diff --git a/cmds/statsd/src/metrics/EventMetricProducer.cpp b/cmds/statsd/src/metrics/EventMetricProducer.cpp
index 821d8ea..25c86d0 100644
--- a/cmds/statsd/src/metrics/EventMetricProducer.cpp
+++ b/cmds/statsd/src/metrics/EventMetricProducer.cpp
@@ -102,6 +102,9 @@
void EventMetricProducer::onDumpReportLocked(const uint64_t dumpTimeNs,
ProtoOutputStream* protoOutput) {
+ if (mProto->size() <= 0) {
+ return;
+ }
protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)mMetricId);
protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_REPORT_NANOS, (long long)mStartTimeNs);
protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_END_REPORT_NANOS, (long long)dumpTimeNs);
diff --git a/cmds/statsd/src/metrics/EventMetricProducer.h b/cmds/statsd/src/metrics/EventMetricProducer.h
index a57b07d..9da0dd0 100644
--- a/cmds/statsd/src/metrics/EventMetricProducer.h
+++ b/cmds/statsd/src/metrics/EventMetricProducer.h
@@ -62,6 +62,8 @@
// Internal function to calculate the current used bytes.
size_t byteSizeLocked() const override;
+ void dumpStatesLocked(FILE* out, bool verbose) const override{};
+
// Maps to a EventMetricDataWrapper. Storing atom events in ProtoOutputStream
// is more space efficient than storing LogEvent.
std::unique_ptr<android::util::ProtoOutputStream> mProto;
diff --git a/cmds/statsd/src/metrics/GaugeMetricProducer.cpp b/cmds/statsd/src/metrics/GaugeMetricProducer.cpp
index 17305e3..24dc5b0 100644
--- a/cmds/statsd/src/metrics/GaugeMetricProducer.cpp
+++ b/cmds/statsd/src/metrics/GaugeMetricProducer.cpp
@@ -125,6 +125,9 @@
VLOG("gauge metric %lld report now...", (long long)mMetricId);
flushIfNeededLocked(dumpTimeNs);
+ if (mPastBuckets.empty()) {
+ return;
+ }
protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)mMetricId);
protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_REPORT_NANOS, (long long)mStartTimeNs);
diff --git a/cmds/statsd/src/metrics/GaugeMetricProducer.h b/cmds/statsd/src/metrics/GaugeMetricProducer.h
index f267e98..1895edf 100644
--- a/cmds/statsd/src/metrics/GaugeMetricProducer.h
+++ b/cmds/statsd/src/metrics/GaugeMetricProducer.h
@@ -83,6 +83,8 @@
// Internal function to calculate the current used bytes.
size_t byteSizeLocked() const override;
+ void dumpStatesLocked(FILE* out, bool verbose) const override{};
+
// Util function to flush the old packet.
void flushIfNeededLocked(const uint64_t& eventTime);
diff --git a/cmds/statsd/src/metrics/MetricProducer.h b/cmds/statsd/src/metrics/MetricProducer.h
index 3779c44..6f33073 100644
--- a/cmds/statsd/src/metrics/MetricProducer.h
+++ b/cmds/statsd/src/metrics/MetricProducer.h
@@ -96,6 +96,11 @@
return onDumpReportLocked(dumpTimeNs, report);
}
+ void dumpStates(FILE* out, bool verbose) const {
+ std::lock_guard<std::mutex> lock(mMutex);
+ dumpStatesLocked(out, verbose);
+ }
+
// Returns the memory in bytes currently used to store this metric's data. Does not change
// state.
size_t byteSize() const {
@@ -128,6 +133,7 @@
android::util::ProtoOutputStream* protoOutput) = 0;
virtual void onDumpReportLocked(const uint64_t dumpTimeNs, StatsLogReport* report) = 0;
virtual size_t byteSizeLocked() const = 0;
+ virtual void dumpStatesLocked(FILE* out, bool verbose) const = 0;
const int64_t mMetricId;
diff --git a/cmds/statsd/src/metrics/MetricsManager.cpp b/cmds/statsd/src/metrics/MetricsManager.cpp
index f929517..d0737de 100644
--- a/cmds/statsd/src/metrics/MetricsManager.cpp
+++ b/cmds/statsd/src/metrics/MetricsManager.cpp
@@ -154,6 +154,20 @@
}
}
+void MetricsManager::dumpStates(FILE* out, bool verbose) {
+ fprintf(out, "ConfigKey %s, allowed source:", mConfigKey.ToString().c_str());
+ {
+ std::lock_guard<std::mutex> lock(mAllowedLogSourcesMutex);
+ for (const auto& source : mAllowedLogSources) {
+ fprintf(out, "%d ", source);
+ }
+ }
+ fprintf(out, "\n");
+ for (const auto& producer : mAllMetricProducers) {
+ producer->dumpStates(out, verbose);
+ }
+}
+
void MetricsManager::onDumpReport(ProtoOutputStream* protoOutput) {
VLOG("=========================Metric Reports Start==========================");
uint64_t dumpTimeStampNs = time(nullptr) * NS_PER_SEC;
diff --git a/cmds/statsd/src/metrics/MetricsManager.h b/cmds/statsd/src/metrics/MetricsManager.h
index a0239fc..9cdbafc 100644
--- a/cmds/statsd/src/metrics/MetricsManager.h
+++ b/cmds/statsd/src/metrics/MetricsManager.h
@@ -61,6 +61,8 @@
return !mAllowedPkg.empty();
}
+ void dumpStates(FILE* out, bool verbose);
+
// Config source owner can call onDumpReport() to get all the metrics collected.
virtual void onDumpReport(android::util::ProtoOutputStream* protoOutput);
virtual void onDumpReport(const uint64_t& dumpTimeStampNs, ConfigMetricsReport* report);
@@ -68,7 +70,6 @@
// Computes the total byte size of all metrics managed by a single config source.
// Does not change the state.
virtual size_t byteSize();
-
private:
const ConfigKey mConfigKey;
diff --git a/cmds/statsd/src/metrics/ValueMetricProducer.cpp b/cmds/statsd/src/metrics/ValueMetricProducer.cpp
index e985873..ae0c673 100644
--- a/cmds/statsd/src/metrics/ValueMetricProducer.cpp
+++ b/cmds/statsd/src/metrics/ValueMetricProducer.cpp
@@ -138,6 +138,9 @@
ProtoOutputStream* protoOutput) {
VLOG("metric %lld dump report now...", (long long)mMetricId);
flushIfNeededLocked(dumpTimeNs);
+ if (mPastBuckets.empty()) {
+ return;
+ }
protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)mMetricId);
protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_REPORT_NANOS, (long long)mStartTimeNs);
long long protoToken = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_ID_VALUE_METRICS);
diff --git a/cmds/statsd/src/metrics/ValueMetricProducer.h b/cmds/statsd/src/metrics/ValueMetricProducer.h
index 3e7032d..9f750cf 100644
--- a/cmds/statsd/src/metrics/ValueMetricProducer.h
+++ b/cmds/statsd/src/metrics/ValueMetricProducer.h
@@ -67,6 +67,8 @@
// Internal function to calculate the current used bytes.
size_t byteSizeLocked() const override;
+ void dumpStatesLocked(FILE* out, bool verbose) const override{};
+
// Util function to flush the old packet.
void flushIfNeededLocked(const uint64_t& eventTime);
diff --git a/cmds/statsd/src/metrics/duration_helper/DurationTracker.h b/cmds/statsd/src/metrics/duration_helper/DurationTracker.h
index 371460e..c2d2cea 100644
--- a/cmds/statsd/src/metrics/duration_helper/DurationTracker.h
+++ b/cmds/statsd/src/metrics/duration_helper/DurationTracker.h
@@ -97,6 +97,8 @@
// Predict the anomaly timestamp given the current status.
virtual int64_t predictAnomalyTimestampNs(const DurationAnomalyTracker& anomalyTracker,
const uint64_t currentTimestamp) const = 0;
+ // Dump internal states for debugging
+ virtual void dumpStates(FILE* out, bool verbose) const = 0;
protected:
// Starts the anomaly alarm.
diff --git a/cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.cpp b/cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.cpp
index 0c99391..412a0c9 100644
--- a/cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.cpp
+++ b/cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.cpp
@@ -291,6 +291,11 @@
return currentTimestamp;
}
+void MaxDurationTracker::dumpStates(FILE* out, bool verbose) const {
+ fprintf(out, "\t\t sub-durations %lu\n", (unsigned long)mInfos.size());
+ fprintf(out, "\t\t current duration %lld\n", (long long)mDuration);
+}
+
} // namespace statsd
} // namespace os
} // namespace android
diff --git a/cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.h b/cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.h
index 5d3c158..e988ebc 100644
--- a/cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.h
+++ b/cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.h
@@ -48,6 +48,7 @@
int64_t predictAnomalyTimestampNs(const DurationAnomalyTracker& anomalyTracker,
const uint64_t currentTimestamp) const override;
+ void dumpStates(FILE* out, bool verbose) const override;
private:
std::map<HashableDimensionKey, DurationInfo> mInfos;
diff --git a/cmds/statsd/src/metrics/duration_helper/OringDurationTracker.cpp b/cmds/statsd/src/metrics/duration_helper/OringDurationTracker.cpp
index 6bf4228..75d7c08 100644
--- a/cmds/statsd/src/metrics/duration_helper/OringDurationTracker.cpp
+++ b/cmds/statsd/src/metrics/duration_helper/OringDurationTracker.cpp
@@ -314,6 +314,12 @@
return eventTimestampNs + thresholdNs;
}
+void OringDurationTracker::dumpStates(FILE* out, bool verbose) const {
+ fprintf(out, "\t\t started count %lu\n", (unsigned long)mStarted.size());
+ fprintf(out, "\t\t paused count %lu\n", (unsigned long)mPaused.size());
+ fprintf(out, "\t\t current duration %lld\n", (long long)mDuration);
+}
+
} // namespace statsd
} // namespace os
} // namespace android
diff --git a/cmds/statsd/src/metrics/duration_helper/OringDurationTracker.h b/cmds/statsd/src/metrics/duration_helper/OringDurationTracker.h
index 638b7ad..1b74ed1 100644
--- a/cmds/statsd/src/metrics/duration_helper/OringDurationTracker.h
+++ b/cmds/statsd/src/metrics/duration_helper/OringDurationTracker.h
@@ -48,6 +48,7 @@
int64_t predictAnomalyTimestampNs(const DurationAnomalyTracker& anomalyTracker,
const uint64_t currentTimestamp) const override;
+ void dumpStates(FILE* out, bool verbose) const override;
private:
// We don't need to keep track of individual durations. The information that's needed is:
diff --git a/cmds/statsd/src/packages/UidMap.cpp b/cmds/statsd/src/packages/UidMap.cpp
index eefb7dc..91279661 100644
--- a/cmds/statsd/src/packages/UidMap.cpp
+++ b/cmds/statsd/src/packages/UidMap.cpp
@@ -281,20 +281,10 @@
void UidMap::clearOutput() {
mOutput.Clear();
- // Re-initialize the initial state for the outputs. This results in extra data being uploaded
- // but helps ensure we can re-construct the UID->app name, versionCode mapping in server.
- auto snapshot = mOutput.add_snapshots();
- for (auto it : mMap) {
- auto t = snapshot->add_package_info();
- t->set_name(it.second.packageName);
- t->set_version(it.second.versionCode);
- t->set_uid(it.first);
- }
-
// Also update the guardrail trackers.
StatsdStats::getInstance().setUidMapChanges(0);
StatsdStats::getInstance().setUidMapSnapshots(1);
- mBytesUsed = snapshot->ByteSize();
+ mBytesUsed = 0;
StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed);
}
@@ -348,6 +338,19 @@
++it_deltas;
}
}
+
+ if (mOutput.snapshots_size() == 0) {
+ // Produce another snapshot. This results in extra data being uploaded but helps
+ // ensure we can re-construct the UID->app name, versionCode mapping in server.
+ auto snapshot = mOutput.add_snapshots();
+ snapshot->set_timestamp_nanos(timestamp);
+ for (auto it : mMap) {
+ auto t = snapshot->add_package_info();
+ t->set_name(it.second.packageName);
+ t->set_version(it.second.versionCode);
+ t->set_uid(it.first);
+ }
+ }
}
mBytesUsed = mOutput.ByteSize(); // Compute actual size after potential deletions.
StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed);
diff --git a/cmds/statsd/src/stats_log.proto b/cmds/statsd/src/stats_log.proto
index f73c4a5..a4ccbd4 100644
--- a/cmds/statsd/src/stats_log.proto
+++ b/cmds/statsd/src/stats_log.proto
@@ -262,4 +262,10 @@
optional int64 min_pull_interval_sec = 4;
}
repeated PulledAtomStats pulled_atom_stats = 10;
+
+ message LoggerErrorStats {
+ optional int32 logger_disconnection_sec = 1;
+ optional int32 error_code = 2;
+ }
+ repeated LoggerErrorStats logger_error_stats = 11;
}
\ No newline at end of file
diff --git a/cmds/statsd/src/storage/StorageManager.cpp b/cmds/statsd/src/storage/StorageManager.cpp
index 1d75e20..00d8658 100644
--- a/cmds/statsd/src/storage/StorageManager.cpp
+++ b/cmds/statsd/src/storage/StorageManager.cpp
@@ -17,11 +17,15 @@
#define DEBUG true // STOPSHIP if true
#include "Log.h"
-#include "storage/StorageManager.h"
#include "android-base/stringprintf.h"
+#include "guardrail/StatsdStats.h"
+#include "storage/StorageManager.h"
#include <android-base/file.h>
#include <dirent.h>
+#include <private/android_filesystem_config.h>
+#include <fstream>
+#include <iostream>
namespace android {
namespace os {
@@ -31,6 +35,7 @@
using android::util::FIELD_TYPE_MESSAGE;
using std::map;
+#define STATS_DATA_DIR "/data/misc/stats-data"
#define STATS_SERVICE_DIR "/data/misc/stats-service"
// for ConfigMetricsReportList
@@ -39,12 +44,37 @@
using android::base::StringPrintf;
using std::unique_ptr;
+// Returns array of int64_t which contains timestamp in seconds, uid, and
+// configID.
+static void parseFileName(char* name, int64_t* result) {
+ int index = 0;
+ char* substr = strtok(name, "_");
+ while (substr != nullptr && index < 3) {
+ result[index] = StrToInt64(substr);
+ index++;
+ substr = strtok(nullptr, "_");
+ }
+ // When index ends before hitting 3, file name is corrupted. We
+ // intentionally put -1 at index 0 to indicate the error to caller.
+ // TODO: consider removing files with unexpected name format.
+ if (index < 3) {
+ result[0] = -1;
+ }
+}
+
+static string getFilePath(const char* path, int64_t timestamp, int64_t uid, int64_t configID) {
+ return StringPrintf("%s/%lld_%d_%lld", path, (long long)timestamp, (int)uid,
+ (long long)configID);
+}
+
void StorageManager::writeFile(const char* file, const void* buffer, int numBytes) {
int fd = open(file, O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR);
if (fd == -1) {
VLOG("Attempt to access %s but failed", file);
return;
}
+ trimToFit(STATS_SERVICE_DIR);
+ trimToFit(STATS_DATA_DIR);
int result = write(fd, buffer, numBytes);
if (result == numBytes) {
@@ -52,6 +82,12 @@
} else {
VLOG("Failed to write %s", file);
}
+
+ result = fchown(fd, AID_STATSD, AID_STATSD);
+ if (result) {
+ VLOG("Failed to chown %s to statsd", file);
+ }
+
close(fd);
}
@@ -78,7 +114,7 @@
}
}
-void StorageManager::deletePrefixedFiles(const char* path, const char* prefix) {
+void StorageManager::deleteSuffixedFiles(const char* path, const char* suffix) {
unique_ptr<DIR, decltype(&closedir)> dir(opendir(path), closedir);
if (dir == NULL) {
VLOG("Directory does not exist: %s", path);
@@ -88,10 +124,14 @@
dirent* de;
while ((de = readdir(dir.get()))) {
char* name = de->d_name;
- if (name[0] == '.' || strncmp(name, prefix, strlen(prefix)) != 0) {
+ if (name[0] == '.') {
continue;
}
- deleteFile(StringPrintf("%s/%s", path, name).c_str());
+ size_t nameLen = strlen(name);
+ size_t suffixLen = strlen(suffix);
+ if (suffixLen <= nameLen && strncmp(name + nameLen - suffixLen, suffix, suffixLen) == 0) {
+ deleteFile(StringPrintf("%s/%s", path, name).c_str());
+ }
}
}
@@ -109,30 +149,20 @@
if (name[0] == '.') continue;
VLOG("file %s", name);
- int index = 0;
- int uid = 0;
- int64_t configID = 0;
- char* substr = strtok(name, "-");
- // Timestamp lives at index 2 but we skip parsing it as it's not needed.
- while (substr != nullptr && index < 2) {
- if (index == 0) {
- uid = atoi(substr);
- } else if (index == 1) {
- configID = StrToInt64(substr);
- }
- index++;
- substr = strtok(nullptr, "-");
- }
- if (index < 2) continue;
+ int64_t result[3];
+ parseFileName(name, result);
+ if (result[0] == -1) continue;
+ int64_t uid = result[1];
+ int64_t configID = result[2];
- sendBroadcast(ConfigKey(uid, configID));
+ sendBroadcast(ConfigKey((int)uid, configID));
}
}
-void StorageManager::appendConfigMetricsReport(const char* path, ProtoOutputStream& proto) {
- unique_ptr<DIR, decltype(&closedir)> dir(opendir(path), closedir);
+void StorageManager::appendConfigMetricsReport(ProtoOutputStream& proto) {
+ unique_ptr<DIR, decltype(&closedir)> dir(opendir(STATS_DATA_DIR), closedir);
if (dir == NULL) {
- VLOG("Path %s does not exist", path);
+ VLOG("Path %s does not exist", STATS_DATA_DIR);
return;
}
@@ -142,25 +172,13 @@
if (name[0] == '.') continue;
VLOG("file %s", name);
- int index = 0;
- int uid = 0;
- int64_t configID = 0;
- int64_t timestamp = 0;
- char* substr = strtok(name, "-");
- while (substr != nullptr && index < 3) {
- if (index == 0) {
- uid = atoi(substr);
- } else if (index == 1) {
- configID = StrToInt64(substr);
- } else if (index == 2) {
- timestamp = atoi(substr);
- }
- index++;
- substr = strtok(nullptr, "-");
- }
- if (index < 3) continue;
- string file_name = StringPrintf("%s/%d-%lld-%lld", STATS_SERVICE_DIR, uid,
- (long long)configID, (long long)timestamp);
+ int64_t result[3];
+ parseFileName(name, result);
+ if (result[0] == -1) continue;
+ int64_t timestamp = result[0];
+ int64_t uid = result[1];
+ int64_t configID = result[2];
+ string file_name = getFilePath(STATS_DATA_DIR, timestamp, uid, configID);
int fd = open(file_name.c_str(), O_RDONLY | O_CLOEXEC);
if (fd != -1) {
string content;
@@ -182,6 +200,7 @@
VLOG("no default config on disk");
return;
}
+ trimToFit(STATS_SERVICE_DIR);
dirent* de;
while ((de = readdir(dir.get()))) {
@@ -189,26 +208,13 @@
if (name[0] == '.') continue;
VLOG("file %s", name);
- int index = 0;
- int uid = 0;
- int64_t configID = 0;
- int64_t timestamp = 0;
- char* substr = strtok(name, "-");
- while (substr != nullptr && index < 3) {
- if (index == 0) {
- uid = atoi(substr);
- } else if (index == 1) {
- configID = StrToInt64(substr);
- } else if (index == 2) {
- timestamp = atoi(substr);
- }
- index++;
- substr = strtok(nullptr, "-");
- }
- if (index < 3) continue;
-
- string file_name = StringPrintf("%s/%d-%lld-%lld", STATS_SERVICE_DIR, uid,
- (long long)configID, (long long)timestamp);
+ int64_t result[3];
+ parseFileName(name, result);
+ if (result[0] == -1) continue;
+ int64_t timestamp = result[0];
+ int64_t uid = result[1];
+ int64_t configID = result[2];
+ string file_name = getFilePath(STATS_SERVICE_DIR, timestamp, uid, configID);
int fd = open(file_name.c_str(), O_RDONLY | O_CLOEXEC);
if (fd != -1) {
string content;
@@ -216,7 +222,7 @@
StatsdConfig config;
if (config.ParseFromString(content)) {
configsMap[ConfigKey(uid, configID)] = config;
- VLOG("map key uid=%d|configID=%lld", uid, (long long)configID);
+ VLOG("map key uid=%lld|configID=%lld", (long long)uid, (long long)configID);
}
}
close(fd);
@@ -224,6 +230,67 @@
}
}
+void StorageManager::trimToFit(const char* path) {
+ unique_ptr<DIR, decltype(&closedir)> dir(opendir(path), closedir);
+ if (dir == NULL) {
+ VLOG("Path %s does not exist", path);
+ return;
+ }
+ dirent* de;
+ int totalFileSize = 0;
+ vector<string> fileNames;
+ while ((de = readdir(dir.get()))) {
+ char* name = de->d_name;
+ if (name[0] == '.') continue;
+
+ int64_t result[3];
+ parseFileName(name, result);
+ if (result[0] == -1) continue;
+ int64_t timestamp = result[0];
+ int64_t uid = result[1];
+ int64_t configID = result[2];
+ string file_name = getFilePath(path, timestamp, uid, configID);
+
+ // Check for timestamp and delete if it's too old.
+ long fileAge = time(nullptr) - timestamp;
+ if (fileAge > StatsdStats::kMaxAgeSecond) {
+ deleteFile(file_name.c_str());
+ }
+
+ fileNames.push_back(file_name);
+ ifstream file(file_name.c_str(), ifstream::in | ifstream::binary);
+ if (file.is_open()) {
+ file.seekg(0, ios::end);
+ int fileSize = file.tellg();
+ file.close();
+ totalFileSize += fileSize;
+ }
+ }
+
+ if (fileNames.size() > StatsdStats::kMaxFileNumber ||
+ totalFileSize > StatsdStats::kMaxFileSize) {
+ // Reverse sort to effectively remove from the back (oldest entries).
+ // This will sort files in reverse-chronological order.
+ sort(fileNames.begin(), fileNames.end(), std::greater<std::string>());
+ }
+
+ // Start removing files from oldest to be under the limit.
+ while (fileNames.size() > 0 && (fileNames.size() > StatsdStats::kMaxFileNumber ||
+ totalFileSize > StatsdStats::kMaxFileSize)) {
+ string file_name = fileNames.at(fileNames.size() - 1);
+ ifstream file(file_name.c_str(), ifstream::in | ifstream::binary);
+ if (file.is_open()) {
+ file.seekg(0, ios::end);
+ int fileSize = file.tellg();
+ file.close();
+ totalFileSize -= fileSize;
+ }
+
+ deleteFile(file_name.c_str());
+ fileNames.pop_back();
+ }
+}
+
} // namespace statsd
} // namespace os
} // namespace android
diff --git a/cmds/statsd/src/storage/StorageManager.h b/cmds/statsd/src/storage/StorageManager.h
index caf5b8b..d319674 100644
--- a/cmds/statsd/src/storage/StorageManager.h
+++ b/cmds/statsd/src/storage/StorageManager.h
@@ -47,9 +47,9 @@
static void deleteAllFiles(const char* path);
/**
- * Deletes all files whose name matches with a provided prefix.
+ * Deletes all files whose name matches with a provided suffix.
*/
- static void deletePrefixedFiles(const char* path, const char* prefix);
+ static void deleteSuffixedFiles(const char* path, const char* suffix);
/**
* Send broadcasts to relevant receiver for each data stored on disk.
@@ -61,12 +61,18 @@
* Appends ConfigMetricsReport found on disk to the specific proto and
* delete it.
*/
- static void appendConfigMetricsReport(const char* path, ProtoOutputStream& proto);
+ static void appendConfigMetricsReport(ProtoOutputStream& proto);
/**
* Call to load the saved configs from disk.
*/
static void readConfigFromDisk(std::map<ConfigKey, StatsdConfig>& configsMap);
+
+ /**
+ * Trims files in the provided directory to limit the total size, number of
+ * files, accumulation of outdated files.
+ */
+ static void trimToFit(const char* dir);
};
} // namespace statsd
diff --git a/cmds/statsd/src/subscriber/SubscriberReporter.cpp b/cmds/statsd/src/subscriber/SubscriberReporter.cpp
new file mode 100644
index 0000000..f912e4b
--- /dev/null
+++ b/cmds/statsd/src/subscriber/SubscriberReporter.cpp
@@ -0,0 +1,147 @@
+/*
+ * 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 DEBUG false // STOPSHIP if true
+#include "Log.h"
+
+#include "SubscriberReporter.h"
+
+using android::IBinder;
+using std::lock_guard;
+using std::unordered_map;
+
+namespace android {
+namespace os {
+namespace statsd {
+
+void SubscriberReporter::setBroadcastSubscriber(const ConfigKey& configKey,
+ int64_t subscriberId,
+ const sp<IBinder>& intentSender) {
+ VLOG("SubscriberReporter::setBroadcastSubscriber called.");
+ lock_guard<std::mutex> lock(mLock);
+ mIntentMap[configKey][subscriberId] = intentSender;
+}
+
+void SubscriberReporter::unsetBroadcastSubscriber(const ConfigKey& configKey,
+ int64_t subscriberId) {
+ VLOG("SubscriberReporter::unsetBroadcastSubscriber called.");
+ lock_guard<std::mutex> lock(mLock);
+ auto subscriberMapIt = mIntentMap.find(configKey);
+ if (subscriberMapIt != mIntentMap.end()) {
+ subscriberMapIt->second.erase(subscriberId);
+ if (subscriberMapIt->second.empty()) {
+ mIntentMap.erase(configKey);
+ }
+ }
+}
+
+void SubscriberReporter::removeConfig(const ConfigKey& configKey) {
+ VLOG("SubscriberReporter::removeConfig called.");
+ lock_guard<std::mutex> lock(mLock);
+ mIntentMap.erase(configKey);
+}
+
+void SubscriberReporter::alertBroadcastSubscriber(const ConfigKey& configKey,
+ const Subscription& subscription,
+ const HashableDimensionKey& dimKey) const {
+ // Reminder about ids:
+ // subscription id - name of the Subscription (that ties the Alert to the broadcast)
+ // subscription rule_id - the name of the Alert (that triggers the broadcast)
+ // subscriber_id - name of the PendingIntent to use to send the broadcast
+ // config uid - the uid that uploaded the config (and therefore gave the PendingIntent,
+ // although the intent may be to broadcast to a different uid)
+ // config id - the name of this config (for this particular uid)
+
+ VLOG("SubscriberReporter::alertBroadcastSubscriber called.");
+ lock_guard<std::mutex> lock(mLock);
+
+ if (!subscription.has_broadcast_subscriber_details()
+ || !subscription.broadcast_subscriber_details().has_subscriber_id()) {
+ ALOGE("Broadcast subscriber does not have an id.");
+ return;
+ }
+ int64_t subscriberId = subscription.broadcast_subscriber_details().subscriber_id();
+
+ auto it1 = mIntentMap.find(configKey);
+ if (it1 == mIntentMap.end()) {
+ ALOGW("Cannot inform subscriber for missing config key %s ", configKey.ToString().c_str());
+ return;
+ }
+ auto it2 = it1->second.find(subscriberId);
+ if (it2 == it1->second.end()) {
+ ALOGW("Cannot inform subscriber of config %s for missing subscriberId %lld ",
+ configKey.ToString().c_str(), (long long)subscriberId);
+ return;
+ }
+ sendBroadcastLocked(it2->second, configKey, subscription, dimKey);
+}
+
+void SubscriberReporter::sendBroadcastLocked(const sp<IBinder>& intentSender,
+ const ConfigKey& configKey,
+ const Subscription& subscription,
+ const HashableDimensionKey& dimKey) const {
+ VLOG("SubscriberReporter::sendBroadcastLocked called.");
+ if (mStatsCompanionService == nullptr) {
+ ALOGW("Failed to send subscriber broadcast: could not access StatsCompanionService.");
+ return;
+ }
+ mStatsCompanionService->sendSubscriberBroadcast(intentSender,
+ configKey.GetUid(),
+ configKey.GetId(),
+ subscription.id(),
+ subscription.rule_id(),
+ protoToStatsDimensionsValue(dimKey));
+}
+
+StatsDimensionsValue SubscriberReporter::protoToStatsDimensionsValue(
+ const HashableDimensionKey& dimKey) {
+ return protoToStatsDimensionsValue(dimKey.getDimensionsValue());
+}
+
+StatsDimensionsValue SubscriberReporter::protoToStatsDimensionsValue(
+ const DimensionsValue& protoDimsVal) {
+ int32_t field = protoDimsVal.field();
+
+ switch (protoDimsVal.value_case()) {
+ case DimensionsValue::ValueCase::kValueStr:
+ return StatsDimensionsValue(field, String16(protoDimsVal.value_str().c_str()));
+ case DimensionsValue::ValueCase::kValueInt:
+ return StatsDimensionsValue(field, static_cast<int32_t>(protoDimsVal.value_int()));
+ case DimensionsValue::ValueCase::kValueLong:
+ return StatsDimensionsValue(field, static_cast<int64_t>(protoDimsVal.value_long()));
+ case DimensionsValue::ValueCase::kValueBool:
+ return StatsDimensionsValue(field, static_cast<bool>(protoDimsVal.value_bool()));
+ case DimensionsValue::ValueCase::kValueFloat:
+ return StatsDimensionsValue(field, static_cast<float>(protoDimsVal.value_float()));
+ case DimensionsValue::ValueCase::kValueTuple:
+ {
+ int sz = protoDimsVal.value_tuple().dimensions_value_size();
+ std::vector<StatsDimensionsValue> sdvVec(sz);
+ for (int i = 0; i < sz; i++) {
+ sdvVec[i] = protoToStatsDimensionsValue(
+ protoDimsVal.value_tuple().dimensions_value(i));
+ }
+ return StatsDimensionsValue(field, sdvVec);
+ }
+ default:
+ ALOGW("protoToStatsDimensionsValue failed: illegal type.");
+ return StatsDimensionsValue();
+ }
+}
+
+} // namespace statsd
+} // namespace os
+} // namespace android
diff --git a/cmds/statsd/src/subscriber/SubscriberReporter.h b/cmds/statsd/src/subscriber/SubscriberReporter.h
new file mode 100644
index 0000000..5bb458a
--- /dev/null
+++ b/cmds/statsd/src/subscriber/SubscriberReporter.h
@@ -0,0 +1,117 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#include <android/os/IStatsCompanionService.h>
+#include <utils/RefBase.h>
+
+#include "config/ConfigKey.h"
+#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h" // subscription
+#include "frameworks/base/cmds/statsd/src/stats_log.pb.h" // DimensionsValue
+#include "android/os/StatsDimensionsValue.h"
+#include "HashableDimensionKey.h"
+
+#include <mutex>
+#include <unordered_map>
+
+namespace android {
+namespace os {
+namespace statsd {
+
+// Reports information to subscribers.
+// Single instance shared across the process. All methods are thread safe.
+class SubscriberReporter {
+public:
+ /** Get (singleton) instance of SubscriberReporter. */
+ static SubscriberReporter& getInstance() {
+ static SubscriberReporter subscriberReporter;
+ return subscriberReporter;
+ }
+
+ ~SubscriberReporter(){};
+ SubscriberReporter(SubscriberReporter const&) = delete;
+ void operator=(SubscriberReporter const&) = delete;
+
+ /**
+ * Tells SubscriberReporter what IStatsCompanionService to use.
+ * May be nullptr, but SubscriberReporter will not send broadcasts for any calls
+ * to alertBroadcastSubscriber that occur while nullptr.
+ */
+ void setStatsCompanionService(sp<IStatsCompanionService> statsCompanionService) {
+ std::lock_guard<std::mutex> lock(mLock);
+ sp<IStatsCompanionService> tmpForLock = mStatsCompanionService;
+ mStatsCompanionService = statsCompanionService;
+ }
+
+ /**
+ * Stores the given intentSender, associating it with the given (configKey, subscriberId) pair.
+ * intentSender must be convertible into an IntentSender (in Java) using IntentSender(IBinder).
+ */
+ void setBroadcastSubscriber(const ConfigKey& configKey,
+ int64_t subscriberId,
+ const sp<android::IBinder>& intentSender);
+
+ /**
+ * Erases any intentSender information from the given (configKey, subscriberId) pair.
+ */
+ void unsetBroadcastSubscriber(const ConfigKey& configKey, int64_t subscriberId);
+
+ /** Remove all information stored by SubscriberReporter about the given config. */
+ void removeConfig(const ConfigKey& configKey);
+
+ /**
+ * Sends a broadcast via the intentSender previously stored for the
+ * given (configKey, subscriberId) pair by setBroadcastSubscriber.
+ * Information about the subscriber, as well as information extracted from the dimKey, is sent.
+ */
+ void alertBroadcastSubscriber(const ConfigKey& configKey,
+ const Subscription& subscription,
+ const HashableDimensionKey& dimKey) const;
+
+private:
+ SubscriberReporter() {};
+
+ mutable std::mutex mLock;
+
+ /** Binder interface for communicating with StatsCompanionService. */
+ sp<IStatsCompanionService> mStatsCompanionService = nullptr;
+
+ /** Maps <ConfigKey, SubscriberId> -> IBinder (which represents an IIntentSender). */
+ std::unordered_map<ConfigKey,
+ std::unordered_map<int64_t, sp<android::IBinder>>> mIntentMap;
+
+ /**
+ * Sends a broadcast via the given intentSender (using mStatsCompanionService), along
+ * with the information in the other parameters.
+ */
+ void sendBroadcastLocked(const sp<android::IBinder>& intentSender,
+ const ConfigKey& configKey,
+ const Subscription& subscription,
+ const HashableDimensionKey& dimKey) const;
+
+ /** Converts a stats_log.proto DimensionsValue to a StatsDimensionsValue. */
+ static StatsDimensionsValue protoToStatsDimensionsValue(
+ const DimensionsValue& protoDimsVal);
+
+ /** Converts a HashableDimensionKey to a StatsDimensionsValue. */
+ static StatsDimensionsValue protoToStatsDimensionsValue(
+ const HashableDimensionKey& dimKey);
+};
+
+} // namespace statsd
+} // namespace os
+} // namespace android
diff --git a/cmds/statsd/tests/UidMap_test.cpp b/cmds/statsd/tests/UidMap_test.cpp
index 5292f24..f26c10d 100644
--- a/cmds/statsd/tests/UidMap_test.cpp
+++ b/cmds/statsd/tests/UidMap_test.cpp
@@ -178,16 +178,16 @@
EXPECT_EQ(1, results.snapshots_size());
// It should be cleared now
- EXPECT_EQ(0, m.mOutput.snapshots_size());
+ EXPECT_EQ(1, m.mOutput.snapshots_size());
results = m.getOutput(3, config1);
- EXPECT_EQ(0, results.snapshots_size());
+ EXPECT_EQ(1, results.snapshots_size());
// Now add another configuration.
m.OnConfigUpdated(config2);
m.updateApp(5, String16(kApp1.c_str()), 1000, 40);
EXPECT_EQ(1, m.mOutput.changes_size());
results = m.getOutput(6, config1);
- EXPECT_EQ(0, results.snapshots_size());
+ EXPECT_EQ(1, results.snapshots_size());
EXPECT_EQ(1, results.changes_size());
EXPECT_EQ(1, m.mOutput.changes_size());
@@ -197,15 +197,15 @@
// We still can't remove anything.
results = m.getOutput(8, config1);
- EXPECT_EQ(0, results.snapshots_size());
+ EXPECT_EQ(1, results.snapshots_size());
EXPECT_EQ(2, results.changes_size());
EXPECT_EQ(2, m.mOutput.changes_size());
results = m.getOutput(9, config2);
- EXPECT_EQ(0, results.snapshots_size());
+ EXPECT_EQ(1, results.snapshots_size());
EXPECT_EQ(2, results.changes_size());
// At this point both should be cleared.
- EXPECT_EQ(0, m.mOutput.snapshots_size());
+ EXPECT_EQ(1, m.mOutput.snapshots_size());
EXPECT_EQ(0, m.mOutput.changes_size());
}
@@ -228,10 +228,8 @@
m.updateApp(3, String16(kApp1.c_str()), 1000, 40);
EXPECT_TRUE(m.mBytesUsed > snapshot_bytes);
- size_t bytesWithSnapshotChange = m.mBytesUsed;
m.getOutput(2, config1);
- EXPECT_TRUE(m.mBytesUsed < bytesWithSnapshotChange);
size_t prevBytes = m.mBytesUsed;
m.getOutput(4, config1);
diff --git a/cmds/statsd/tests/e2e/MetricConditionLink_e2e_test.cpp b/cmds/statsd/tests/e2e/MetricConditionLink_e2e_test.cpp
index eda16a2..4504a95 100644
--- a/cmds/statsd/tests/e2e/MetricConditionLink_e2e_test.cpp
+++ b/cmds/statsd/tests/e2e/MetricConditionLink_e2e_test.cpp
@@ -123,11 +123,13 @@
auto crashEvent10 = CreateAppCrashEvent(appUid, bucketStartTimeNs + 2 * bucketSizeNs - 2);
auto screenTurnedOnEvent =
- CreateScreenStateChangedEvent(ScreenStateChanged::STATE_ON, bucketStartTimeNs + 2);
+ CreateScreenStateChangedEvent(android::view::DisplayStateEnum::DISPLAY_STATE_ON,
+ bucketStartTimeNs + 2);
auto screenTurnedOffEvent =
- CreateScreenStateChangedEvent(ScreenStateChanged::STATE_OFF, bucketStartTimeNs + 200);
+ CreateScreenStateChangedEvent(android::view::DisplayStateEnum::DISPLAY_STATE_OFF,
+ bucketStartTimeNs + 200);
auto screenTurnedOnEvent2 =
- CreateScreenStateChangedEvent(ScreenStateChanged::STATE_ON,
+ CreateScreenStateChangedEvent(android::view::DisplayStateEnum::DISPLAY_STATE_ON,
bucketStartTimeNs + 2 * bucketSizeNs - 100);
auto syncOnEvent1 =
diff --git a/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp b/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
index e656b98..1186a16 100644
--- a/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
+++ b/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
@@ -73,11 +73,13 @@
EXPECT_TRUE(processor->mMetricsManagers.begin()->second->isConfigValid());
auto screenTurnedOnEvent =
- CreateScreenStateChangedEvent(ScreenStateChanged::STATE_ON, bucketStartTimeNs + 1);
+ CreateScreenStateChangedEvent(android::view::DisplayStateEnum::DISPLAY_STATE_ON,
+ bucketStartTimeNs + 1);
auto screenTurnedOffEvent =
- CreateScreenStateChangedEvent(ScreenStateChanged::STATE_OFF, bucketStartTimeNs + 200);
+ CreateScreenStateChangedEvent(android::view::DisplayStateEnum::DISPLAY_STATE_OFF,
+ bucketStartTimeNs + 200);
auto screenTurnedOnEvent2 =
- CreateScreenStateChangedEvent(ScreenStateChanged::STATE_ON,
+ CreateScreenStateChangedEvent(android::view::DisplayStateEnum::DISPLAY_STATE_ON,
bucketStartTimeNs + bucketSizeNs + 500);
std::vector<AttributionNode> attributions1 =
@@ -156,7 +158,8 @@
events.clear();
events.push_back(CreateScreenStateChangedEvent(
- ScreenStateChanged::STATE_OFF, bucketStartTimeNs + 2 * bucketSizeNs + 90));
+ android::view::DisplayStateEnum::DISPLAY_STATE_OFF,
+ bucketStartTimeNs + 2 * bucketSizeNs + 90));
events.push_back(CreateAcquireWakelockEvent(
attributions1, "wl3", bucketStartTimeNs + 2 * bucketSizeNs + 100));
events.push_back(CreateReleaseWakelockEvent(
diff --git a/cmds/statsd/tests/statsd_test_util.cpp b/cmds/statsd/tests/statsd_test_util.cpp
index 718b2e1..9f4582d 100644
--- a/cmds/statsd/tests/statsd_test_util.cpp
+++ b/cmds/statsd/tests/statsd_test_util.cpp
@@ -48,7 +48,7 @@
}
AtomMatcher CreateScreenStateChangedAtomMatcher(
- const string& name, ScreenStateChanged::State state) {
+ const string& name, android::view::DisplayStateEnum state) {
AtomMatcher atom_matcher;
atom_matcher.set_id(StringToId(name));
auto simple_atom_matcher = atom_matcher.mutable_simple_atom_matcher();
@@ -60,11 +60,13 @@
}
AtomMatcher CreateScreenTurnedOnAtomMatcher() {
- return CreateScreenStateChangedAtomMatcher("ScreenTurnedOn", ScreenStateChanged::STATE_ON);
+ return CreateScreenStateChangedAtomMatcher("ScreenTurnedOn",
+ android::view::DisplayStateEnum::DISPLAY_STATE_ON);
}
AtomMatcher CreateScreenTurnedOffAtomMatcher() {
- return CreateScreenStateChangedAtomMatcher("ScreenTurnedOff", ScreenStateChanged::STATE_OFF);
+ return CreateScreenStateChangedAtomMatcher("ScreenTurnedOff",
+ ::android::view::DisplayStateEnum::DISPLAY_STATE_OFF);
}
AtomMatcher CreateSyncStateChangedAtomMatcher(
@@ -209,7 +211,7 @@
}
std::unique_ptr<LogEvent> CreateScreenStateChangedEvent(
- const ScreenStateChanged::State state, uint64_t timestampNs) {
+ const android::view::DisplayStateEnum state, uint64_t timestampNs) {
auto event = std::make_unique<LogEvent>(android::util::SCREEN_STATE_CHANGED, timestampNs);
EXPECT_TRUE(event->write(state));
event->init();
@@ -221,7 +223,7 @@
const WakelockStateChanged::State state, uint64_t timestampNs) {
auto event = std::make_unique<LogEvent>(android::util::WAKELOCK_STATE_CHANGED, timestampNs);
event->write(attributions);
- event->write(WakelockStateChanged::PARTIAL);
+ event->write(android::os::WakeLockLevelEnum::PARTIAL_WAKE_LOCK);
event->write(wakelockName);
event->write(state);
event->init();
diff --git a/cmds/statsd/tests/statsd_test_util.h b/cmds/statsd/tests/statsd_test_util.h
index 1fc33de..ff8fef0c 100644
--- a/cmds/statsd/tests/statsd_test_util.h
+++ b/cmds/statsd/tests/statsd_test_util.h
@@ -84,7 +84,7 @@
// Create log event for screen state changed.
std::unique_ptr<LogEvent> CreateScreenStateChangedEvent(
- const ScreenStateChanged::State state, uint64_t timestampNs);
+ const android::view::DisplayStateEnum state, uint64_t timestampNs);
// Create log event for app moving to background.
std::unique_ptr<LogEvent> CreateMoveToBackgroundEvent(const int uid, uint64_t timestampNs);
diff --git a/cmds/statsd/tools/dogfood/src/com/android/statsd/dogfood/MainActivity.java b/cmds/statsd/tools/dogfood/src/com/android/statsd/dogfood/MainActivity.java
index 4f9032f..d39aa1d 100644
--- a/cmds/statsd/tools/dogfood/src/com/android/statsd/dogfood/MainActivity.java
+++ b/cmds/statsd/tools/dogfood/src/com/android/statsd/dogfood/MainActivity.java
@@ -16,12 +16,12 @@
package com.android.statsd.dogfood;
import android.app.Activity;
+import android.app.StatsManager;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.util.Log;
import android.util.StatsLog;
-import android.util.StatsManager;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
diff --git a/cmds/statsd/tools/loadtest/src/com/android/statsd/loadtest/LoadtestActivity.java b/cmds/statsd/tools/loadtest/src/com/android/statsd/loadtest/LoadtestActivity.java
index 26c1c72..652f6b2 100644
--- a/cmds/statsd/tools/loadtest/src/com/android/statsd/loadtest/LoadtestActivity.java
+++ b/cmds/statsd/tools/loadtest/src/com/android/statsd/loadtest/LoadtestActivity.java
@@ -19,6 +19,7 @@
import android.app.Activity;
import android.app.AlarmManager;
import android.app.PendingIntent;
+import android.app.StatsManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -34,7 +35,6 @@
import android.text.TextWatcher;
import android.util.Log;
import android.util.StatsLog;
-import android.util.StatsManager;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.view.MotionEvent;
diff --git a/cmds/statsd/tools/loadtest/src/com/android/statsd/loadtest/SequencePusher.java b/cmds/statsd/tools/loadtest/src/com/android/statsd/loadtest/SequencePusher.java
index d4b2aa4..5dcce9a 100644
--- a/cmds/statsd/tools/loadtest/src/com/android/statsd/loadtest/SequencePusher.java
+++ b/cmds/statsd/tools/loadtest/src/com/android/statsd/loadtest/SequencePusher.java
@@ -90,7 +90,7 @@
case 2:
case 10:
StatsLog.write(StatsLog.CHARGING_STATE_CHANGED,
- StatsLog.CHARGING_STATE_CHANGED__CHARGING_STATE__BATTERY_STATUS_CHARGING
+ StatsLog.CHARGING_STATE_CHANGED__STATE__BATTERY_STATUS_CHARGING
/* charging_state */);
break;
case 3:
@@ -103,7 +103,7 @@
case 4:
case 12:
StatsLog.write(StatsLog.CHARGING_STATE_CHANGED,
- StatsLog.CHARGING_STATE_CHANGED__CHARGING_STATE__BATTERY_STATUS_NOT_CHARGING
+ StatsLog.CHARGING_STATE_CHANGED__STATE__BATTERY_STATUS_NOT_CHARGING
/* charging_state */);
break;
case 5:
@@ -115,7 +115,7 @@
break;
case 6:
StatsLog.write(StatsLog.SCREEN_STATE_CHANGED,
- StatsLog.SCREEN_STATE_CHANGED__DISPLAY_STATE__STATE_ON /* display_state */);
+ StatsLog.SCREEN_STATE_CHANGED__STATE__DISPLAY_STATE_ON /* display_state */);
break;
case 7:
for (int i = 0; i < mBurst; i++) {
@@ -125,7 +125,7 @@
break;
case 14:
StatsLog.write(StatsLog.SCREEN_STATE_CHANGED,
- StatsLog.SCREEN_STATE_CHANGED__DISPLAY_STATE__STATE_OFF /* display_state */);
+ StatsLog.SCREEN_STATE_CHANGED__STATE__DISPLAY_STATE_OFF /* display_state */);
break;
case 15:
for (int i = 0; i < mBurst; i++) {
@@ -147,14 +147,14 @@
public void finish() {
// Screen goes back to off. This will ensure that conditions get back to false.
StatsLog.write(StatsLog.SCREEN_STATE_CHANGED,
- StatsLog.SCREEN_STATE_CHANGED__DISPLAY_STATE__STATE_OFF /* display_state */);
+ StatsLog.SCREEN_STATE_CHANGED__STATE__DISPLAY_STATE_OFF /* display_state */);
for (int i = 0; i < mBurst; i++) {
StatsLog.write(StatsLog.AUDIO_STATE_CHANGED, i /* uid */,
StatsLog.AUDIO_STATE_CHANGED__STATE__OFF /* state */);
}
// Stop charging, to ensure the corresponding durations are closed.
StatsLog.write(StatsLog.CHARGING_STATE_CHANGED,
- StatsLog.CHARGING_STATE_CHANGED__CHARGING_STATE__BATTERY_STATUS_NOT_CHARGING
+ StatsLog.CHARGING_STATE_CHANGED__STATE__BATTERY_STATUS_NOT_CHARGING
/* charging_state */);
// Stop scanning GPS, to ensure the corresponding conditions get back to false.
for (int i = 0; i < mBurst; i++) {
diff --git a/cmds/uiautomator/instrumentation/Android.mk b/cmds/uiautomator/instrumentation/Android.mk
index ed99f3e..e887539 100644
--- a/cmds/uiautomator/instrumentation/Android.mk
+++ b/cmds/uiautomator/instrumentation/Android.mk
@@ -21,7 +21,7 @@
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under, testrunner-src) \
$(call all-java-files-under, ../library/core-src)
-LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base.stubs
+LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
LOCAL_STATIC_JAVA_LIBRARIES := junit
LOCAL_MODULE := uiautomator-instrumentation
# TODO: change this to 18 when it's available
diff --git a/config/hiddenapi-blacklist.txt b/config/hiddenapi-blacklist.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/config/hiddenapi-blacklist.txt
diff --git a/config/hiddenapi-dark-greylist.txt b/config/hiddenapi-dark-greylist.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/config/hiddenapi-dark-greylist.txt
diff --git a/core/java/Android.bp b/core/java/Android.bp
index afa08e6..f7c5c57 100644
--- a/core/java/Android.bp
+++ b/core/java/Android.bp
@@ -11,7 +11,8 @@
// only used by key_store_service
cc_library_shared {
name: "libkeystore_aidl",
- srcs: ["android/security/IKeystoreService.aidl"],
+ srcs: ["android/security/IKeystoreService.aidl",
+ "android/security/IConfirmationPromptCallback.aidl"],
aidl: {
export_aidl_headers: true,
include_dirs: [
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 0a5b848..e7d0c8b 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -128,6 +128,8 @@
import com.android.internal.policy.DecorView;
import com.android.internal.policy.PhoneWindow;
+import dalvik.system.VMRuntime;
+
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.annotation.Retention;
@@ -2135,11 +2137,15 @@
* @param params non-null parameters to be combined with previously set parameters when entering
* picture-in-picture.
*
- * @return true if the system puts this activity into picture-in-picture mode or was already
- * in picture-in-picture mode (@see {@link #isInPictureInPictureMode())
+ * @return true if the system successfully put this activity into picture-in-picture mode or was
+ * already in picture-in-picture mode (@see {@link #isInPictureInPictureMode()). If the device
+ * does not support picture-in-picture, return false.
*/
public boolean enterPictureInPictureMode(@NonNull PictureInPictureParams params) {
try {
+ if (!deviceSupportsPictureInPictureMode()) {
+ return false;
+ }
if (params == null) {
throw new IllegalArgumentException("Expected non-null picture-in-picture params");
}
@@ -2167,6 +2173,9 @@
*/
public void setPictureInPictureParams(@NonNull PictureInPictureParams params) {
try {
+ if (!deviceSupportsPictureInPictureMode()) {
+ return;
+ }
if (params == null) {
throw new IllegalArgumentException("Expected non-null picture-in-picture params");
}
@@ -2189,6 +2198,13 @@
}
}
+ /**
+ * @return Whether this device supports picture-in-picture.
+ */
+ private boolean deviceSupportsPictureInPictureMode() {
+ return getPackageManager().hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE);
+ }
+
void dispatchMovedToDisplay(int displayId, Configuration config) {
updateDisplay(displayId);
onMovedToDisplay(displayId, config);
@@ -2618,6 +2634,7 @@
* @param id the ID to search for
* @return a view with given ID if found, or {@code null} otherwise
* @see View#findViewById(int)
+ * @see Activity#requireViewById(int)
*/
@Nullable
public <T extends View> T findViewById(@IdRes int id) {
@@ -2625,6 +2642,30 @@
}
/**
+ * Finds a view that was identified by the {@code android:id} XML attribute that was processed
+ * in {@link #onCreate}, or throws an IllegalArgumentException if the ID is invalid, or there is
+ * no matching view in the hierarchy.
+ * <p>
+ * <strong>Note:</strong> In most cases -- depending on compiler support --
+ * the resulting view is automatically cast to the target class type. If
+ * the target class type is unconstrained, an explicit cast may be
+ * necessary.
+ *
+ * @param id the ID to search for
+ * @return a view with given ID
+ * @see View#requireViewById(int)
+ * @see Activity#findViewById(int)
+ */
+ @NonNull
+ public final <T extends View> T requireViewById(@IdRes int id) {
+ T view = findViewById(id);
+ if (view == null) {
+ throw new IllegalArgumentException("ID does not reference a View inside this Activity");
+ }
+ return view;
+ }
+
+ /**
* Retrieve a reference to this activity's ActionBar.
*
* @return The Activity's ActionBar, or null if it does not have one.
@@ -7072,11 +7113,12 @@
mFragments.dispatchStart();
mFragments.reportLoaderStart();
- // This property is set for all builds except final release
- boolean isDlwarningEnabled = SystemProperties.getInt("ro.bionic.ld.warning", 0) == 1;
boolean isAppDebuggable =
(mApplication.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
+ // This property is set for all non-user builds except final release
+ boolean isDlwarningEnabled = SystemProperties.getInt("ro.bionic.ld.warning", 0) == 1;
+
if (isAppDebuggable || isDlwarningEnabled) {
String dlwarning = getDlWarning();
if (dlwarning != null) {
@@ -7097,6 +7139,28 @@
}
}
+ // This property is set for all non-user builds except final release
+ boolean isApiWarningEnabled = SystemProperties.getInt("ro.art.hiddenapi.warning", 0) == 1;
+
+ if (isAppDebuggable || isApiWarningEnabled) {
+ if (VMRuntime.getRuntime().hasUsedHiddenApi()) {
+ String appName = getApplicationInfo().loadLabel(getPackageManager())
+ .toString();
+ String warning = "Detected problems with API compatiblity\n"
+ + "(please consult log for detail)";
+ if (isAppDebuggable) {
+ new AlertDialog.Builder(this)
+ .setTitle(appName)
+ .setMessage(warning)
+ .setPositiveButton(android.R.string.ok, null)
+ .setCancelable(false)
+ .show();
+ } else {
+ Toast.makeText(this, appName + "\n" + warning, Toast.LENGTH_LONG).show();
+ }
+ }
+ }
+
mActivityTransitionState.enterReady(this);
}
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index 4554584..e2ce8b1 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -28,7 +28,6 @@
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
-import android.content.UriPermission;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.ConfigurationInfo;
@@ -181,7 +180,8 @@
BUGREPORT_OPTION_INTERACTIVE,
BUGREPORT_OPTION_REMOTE,
BUGREPORT_OPTION_WEAR,
- BUGREPORT_OPTION_TELEPHONY
+ BUGREPORT_OPTION_TELEPHONY,
+ BUGREPORT_OPTION_WIFI
})
public @interface BugreportMode {}
/**
@@ -216,6 +216,12 @@
public static final int BUGREPORT_OPTION_TELEPHONY = 4;
/**
+ * Takes a lightweight bugreport that only includes a few sections related to Wifi.
+ * @hide
+ */
+ public static final int BUGREPORT_OPTION_WIFI = 5;
+
+ /**
* <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code
* <meta-data>}</a> name for a 'home' Activity that declares a package that is to be
* uninstalled in lieu of the declaring one. The package named here must be
@@ -544,18 +550,68 @@
/** @hide Process does not exist. */
public static final int PROCESS_STATE_NONEXISTENT = 19;
- // NOTE: If PROCESS_STATEs are added or changed, then new fields must be added
- // to frameworks/base/core/proto/android/app/activitymanager.proto and the following method must
+ // NOTE: If PROCESS_STATEs are added, then new fields must be added
+ // to frameworks/base/core/proto/android/app/enums.proto and the following method must
// be updated to correctly map between them.
+ // However, if the current ActivityManager values are merely modified, no update should be made
+ // to enums.proto, to which values can only be added but never modified. Note that the proto
+ // versions do NOT have the ordering restrictions of the ActivityManager process state.
/**
- * Maps ActivityManager.PROCESS_STATE_ values to ProcessState enum.
+ * Maps ActivityManager.PROCESS_STATE_ values to enums.proto ProcessStateEnum value.
*
* @param amInt a process state of the form ActivityManager.PROCESS_STATE_
- * @return the value of the corresponding ActivityManager's ProcessState enum.
+ * @return the value of the corresponding enums.proto ProcessStateEnum value.
* @hide
*/
public static final int processStateAmToProto(int amInt) {
- return amInt * 100;
+ switch (amInt) {
+ case PROCESS_STATE_UNKNOWN:
+ return AppProtoEnums.PROCESS_STATE_UNKNOWN;
+ case PROCESS_STATE_PERSISTENT:
+ return AppProtoEnums.PROCESS_STATE_PERSISTENT;
+ case PROCESS_STATE_PERSISTENT_UI:
+ return AppProtoEnums.PROCESS_STATE_PERSISTENT_UI;
+ case PROCESS_STATE_TOP:
+ return AppProtoEnums.PROCESS_STATE_TOP;
+ case PROCESS_STATE_FOREGROUND_SERVICE:
+ return AppProtoEnums.PROCESS_STATE_FOREGROUND_SERVICE;
+ case PROCESS_STATE_BOUND_FOREGROUND_SERVICE:
+ return AppProtoEnums.PROCESS_STATE_BOUND_FOREGROUND_SERVICE;
+ case PROCESS_STATE_IMPORTANT_FOREGROUND:
+ return AppProtoEnums.PROCESS_STATE_IMPORTANT_FOREGROUND;
+ case PROCESS_STATE_IMPORTANT_BACKGROUND:
+ return AppProtoEnums.PROCESS_STATE_IMPORTANT_BACKGROUND;
+ case PROCESS_STATE_TRANSIENT_BACKGROUND:
+ return AppProtoEnums.PROCESS_STATE_TRANSIENT_BACKGROUND;
+ case PROCESS_STATE_BACKUP:
+ return AppProtoEnums.PROCESS_STATE_BACKUP;
+ case PROCESS_STATE_SERVICE:
+ return AppProtoEnums.PROCESS_STATE_SERVICE;
+ case PROCESS_STATE_RECEIVER:
+ return AppProtoEnums.PROCESS_STATE_RECEIVER;
+ case PROCESS_STATE_TOP_SLEEPING:
+ return AppProtoEnums.PROCESS_STATE_TOP_SLEEPING;
+ case PROCESS_STATE_HEAVY_WEIGHT:
+ return AppProtoEnums.PROCESS_STATE_HEAVY_WEIGHT;
+ case PROCESS_STATE_HOME:
+ return AppProtoEnums.PROCESS_STATE_HOME;
+ case PROCESS_STATE_LAST_ACTIVITY:
+ return AppProtoEnums.PROCESS_STATE_LAST_ACTIVITY;
+ case PROCESS_STATE_CACHED_ACTIVITY:
+ return AppProtoEnums.PROCESS_STATE_CACHED_ACTIVITY;
+ case PROCESS_STATE_CACHED_ACTIVITY_CLIENT:
+ return AppProtoEnums.PROCESS_STATE_CACHED_ACTIVITY_CLIENT;
+ case PROCESS_STATE_CACHED_RECENT:
+ return AppProtoEnums.PROCESS_STATE_CACHED_RECENT;
+ case PROCESS_STATE_CACHED_EMPTY:
+ return AppProtoEnums.PROCESS_STATE_CACHED_EMPTY;
+ case PROCESS_STATE_NONEXISTENT:
+ return AppProtoEnums.PROCESS_STATE_NONEXISTENT;
+ default:
+ // ActivityManager process state (amInt)
+ // could not be mapped to an AppProtoEnums ProcessState state.
+ return AppProtoEnums.PROCESS_STATE_UNKNOWN_TO_PROTO;
+ }
}
/** @hide The lowest process state number */
@@ -2654,17 +2710,22 @@
/**
* Permits an application to get the persistent URI permissions granted to another.
*
- * <p>Typically called by Settings.
+ * <p>Typically called by Settings or DocumentsUI, requires
+ * {@code GET_APP_GRANTED_URI_PERMISSIONS}.
*
- * @param packageName application to look for the granted permissions
+ * @param packageName application to look for the granted permissions, or {@code null} to get
+ * granted permissions for all applications
* @return list of granted URI permissions
*
* @hide
*/
- public ParceledListSlice<UriPermission> getGrantedUriPermissions(String packageName) {
+ public ParceledListSlice<GrantedUriPermission> getGrantedUriPermissions(
+ @Nullable String packageName) {
try {
- return getService().getGrantedUriPermissions(packageName,
- UserHandle.myUserId());
+ @SuppressWarnings("unchecked")
+ final ParceledListSlice<GrantedUriPermission> castedList = getService()
+ .getGrantedUriPermissions(packageName, UserHandle.myUserId());
+ return castedList;
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -2673,7 +2734,7 @@
/**
* Permits an application to clear the persistent URI permissions granted to another.
*
- * <p>Typically called by Settings.
+ * <p>Typically called by Settings, requires {@code CLEAR_APP_GRANTED_URI_PERMISSIONS}.
*
* @param packageName application to clear its granted permissions
*
diff --git a/core/java/android/app/ActivityManagerInternal.java b/core/java/android/app/ActivityManagerInternal.java
index da9f728..5ee7ede 100644
--- a/core/java/android/app/ActivityManagerInternal.java
+++ b/core/java/android/app/ActivityManagerInternal.java
@@ -43,25 +43,29 @@
* Type for {@link #notifyAppTransitionStarting}: The transition was started because we drew
* the splash screen.
*/
- public static final int APP_TRANSITION_SPLASH_SCREEN = 1;
+ public static final int APP_TRANSITION_SPLASH_SCREEN =
+ AppProtoEnums.APP_TRANSITION_SPLASH_SCREEN; // 1
/**
* Type for {@link #notifyAppTransitionStarting}: The transition was started because we all
* app windows were drawn
*/
- public static final int APP_TRANSITION_WINDOWS_DRAWN = 2;
+ public static final int APP_TRANSITION_WINDOWS_DRAWN =
+ AppProtoEnums.APP_TRANSITION_WINDOWS_DRAWN; // 2
/**
* Type for {@link #notifyAppTransitionStarting}: The transition was started because of a
* timeout.
*/
- public static final int APP_TRANSITION_TIMEOUT = 3;
+ public static final int APP_TRANSITION_TIMEOUT =
+ AppProtoEnums.APP_TRANSITION_TIMEOUT; // 3
/**
* Type for {@link #notifyAppTransitionStarting}: The transition was started because of a
* we drew a task snapshot.
*/
- public static final int APP_TRANSITION_SNAPSHOT = 4;
+ public static final int APP_TRANSITION_SNAPSHOT =
+ AppProtoEnums.APP_TRANSITION_SNAPSHOT; // 4
/**
* The bundle key to extract the assist data.
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index 4bcd677..fee5827 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -207,6 +207,12 @@
"android.activity.taskOverlayCanResume";
/**
+ * See {@link #setAvoidMoveToFront()}.
+ * @hide
+ */
+ private static final String KEY_AVOID_MOVE_TO_FRONT = "android.activity.avoidMoveToFront";
+
+ /**
* Where the split-screen-primary stack should be positioned.
* @hide
*/
@@ -307,6 +313,7 @@
private boolean mDisallowEnterPictureInPictureWhileLaunching;
private boolean mTaskOverlay;
private boolean mTaskOverlayCanResume;
+ private boolean mAvoidMoveToFront;
private AppTransitionAnimationSpec mAnimSpecs[];
private int mRotationAnimationHint = -1;
private Bundle mAppVerificationBundle;
@@ -923,6 +930,7 @@
mLaunchTaskId = opts.getInt(KEY_LAUNCH_TASK_ID, -1);
mTaskOverlay = opts.getBoolean(KEY_TASK_OVERLAY, false);
mTaskOverlayCanResume = opts.getBoolean(KEY_TASK_OVERLAY_CAN_RESUME, false);
+ mAvoidMoveToFront = opts.getBoolean(KEY_AVOID_MOVE_TO_FRONT, false);
mSplitScreenCreateMode = opts.getInt(KEY_SPLIT_SCREEN_CREATE_MODE,
SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT);
mDisallowEnterPictureInPictureWhileLaunching = opts.getBoolean(
@@ -1239,6 +1247,25 @@
return mTaskOverlayCanResume;
}
+ /**
+ * Sets whether the activity launched should not cause the activity stack it is contained in to
+ * be moved to the front as a part of launching.
+ *
+ * @hide
+ */
+ public void setAvoidMoveToFront() {
+ mAvoidMoveToFront = true;
+ }
+
+ /**
+ * @return whether the activity launch should prevent moving the associated activity stack to
+ * the front.
+ * @hide
+ */
+ public boolean getAvoidMoveToFront() {
+ return mAvoidMoveToFront;
+ }
+
/** @hide */
public int getSplitScreenCreateMode() {
return mSplitScreenCreateMode;
@@ -1416,6 +1443,7 @@
b.putInt(KEY_LAUNCH_TASK_ID, mLaunchTaskId);
b.putBoolean(KEY_TASK_OVERLAY, mTaskOverlay);
b.putBoolean(KEY_TASK_OVERLAY_CAN_RESUME, mTaskOverlayCanResume);
+ b.putBoolean(KEY_AVOID_MOVE_TO_FRONT, mAvoidMoveToFront);
b.putInt(KEY_SPLIT_SCREEN_CREATE_MODE, mSplitScreenCreateMode);
b.putBoolean(KEY_DISALLOW_ENTER_PICTURE_IN_PICTURE_WHILE_LAUNCHING,
mDisallowEnterPictureInPictureWhileLaunching);
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 934b0f3..6c3dbf4 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -389,7 +389,7 @@
ActivityInfo activityInfo;
CompatibilityInfo compatInfo;
- public LoadedApk loadedApk;
+ public LoadedApk packageInfo;
List<ResultInfo> pendingResults;
List<ReferrerIntent> pendingIntents;
@@ -432,7 +432,7 @@
this.isForward = isForward;
this.profilerInfo = profilerInfo;
this.overrideConfig = overrideConfig;
- this.loadedApk = client.getLoadedApkNoCheck(activityInfo.applicationInfo,
+ this.packageInfo = client.getPackageInfoNoCheck(activityInfo.applicationInfo,
compatInfo);
init();
}
@@ -614,7 +614,7 @@
}
static final class AppBindData {
- LoadedApk loadedApk;
+ LoadedApk info;
String processName;
ApplicationInfo appInfo;
List<ProviderInfo> providers;
@@ -1913,13 +1913,13 @@
return mH;
}
- public final LoadedApk getLoadedApkForPackageName(String packageName,
- CompatibilityInfo compatInfo, int flags) {
- return getLoadedApkForPackageName(packageName, compatInfo, flags, UserHandle.myUserId());
+ public final LoadedApk getPackageInfo(String packageName, CompatibilityInfo compatInfo,
+ int flags) {
+ return getPackageInfo(packageName, compatInfo, flags, UserHandle.myUserId());
}
- public final LoadedApk getLoadedApkForPackageName(String packageName,
- CompatibilityInfo compatInfo, int flags, int userId) {
+ public final LoadedApk getPackageInfo(String packageName, CompatibilityInfo compatInfo,
+ int flags, int userId) {
final boolean differentUser = (UserHandle.myUserId() != userId);
synchronized (mResourcesManager) {
WeakReference<LoadedApk> ref;
@@ -1932,13 +1932,13 @@
ref = mResourcePackages.get(packageName);
}
- LoadedApk loadedApk = ref != null ? ref.get() : null;
- //Slog.i(TAG, "getLoadedApkForPackageName " + packageName + ": " + loadedApk);
- //if (loadedApk != null) Slog.i(TAG, "isUptoDate " + loadedApk.mResDir
- // + ": " + loadedApk.mResources.getAssets().isUpToDate());
- if (loadedApk != null && (loadedApk.mResources == null
- || loadedApk.mResources.getAssets().isUpToDate())) {
- if (loadedApk.isSecurityViolation()
+ LoadedApk packageInfo = ref != null ? ref.get() : null;
+ //Slog.i(TAG, "getPackageInfo " + packageName + ": " + packageInfo);
+ //if (packageInfo != null) Slog.i(TAG, "isUptoDate " + packageInfo.mResDir
+ // + ": " + packageInfo.mResources.getAssets().isUpToDate());
+ if (packageInfo != null && (packageInfo.mResources == null
+ || packageInfo.mResources.getAssets().isUpToDate())) {
+ if (packageInfo.isSecurityViolation()
&& (flags&Context.CONTEXT_IGNORE_SECURITY) == 0) {
throw new SecurityException(
"Requesting code from " + packageName
@@ -1946,7 +1946,7 @@
+ mBoundApplication.processName
+ "/" + mBoundApplication.appInfo.uid);
}
- return loadedApk;
+ return packageInfo;
}
}
@@ -1961,13 +1961,13 @@
}
if (ai != null) {
- return getLoadedApk(ai, compatInfo, flags);
+ return getPackageInfo(ai, compatInfo, flags);
}
return null;
}
- public final LoadedApk getLoadedApk(ApplicationInfo ai, CompatibilityInfo compatInfo,
+ public final LoadedApk getPackageInfo(ApplicationInfo ai, CompatibilityInfo compatInfo,
int flags) {
boolean includeCode = (flags&Context.CONTEXT_INCLUDE_CODE) != 0;
boolean securityViolation = includeCode && ai.uid != 0
@@ -1989,17 +1989,17 @@
throw new SecurityException(msg);
}
}
- return getLoadedApk(ai, compatInfo, null, securityViolation, includeCode,
+ return getPackageInfo(ai, compatInfo, null, securityViolation, includeCode,
registerPackage);
}
@Override
- public final LoadedApk getLoadedApkNoCheck(ApplicationInfo ai,
+ public final LoadedApk getPackageInfoNoCheck(ApplicationInfo ai,
CompatibilityInfo compatInfo) {
- return getLoadedApk(ai, compatInfo, null, false, true, false);
+ return getPackageInfo(ai, compatInfo, null, false, true, false);
}
- public final LoadedApk peekLoadedApk(String packageName, boolean includeCode) {
+ public final LoadedApk peekPackageInfo(String packageName, boolean includeCode) {
synchronized (mResourcesManager) {
WeakReference<LoadedApk> ref;
if (includeCode) {
@@ -2011,7 +2011,7 @@
}
}
- private LoadedApk getLoadedApk(ApplicationInfo aInfo, CompatibilityInfo compatInfo,
+ private LoadedApk getPackageInfo(ApplicationInfo aInfo, CompatibilityInfo compatInfo,
ClassLoader baseLoader, boolean securityViolation, boolean includeCode,
boolean registerPackage) {
final boolean differentUser = (UserHandle.myUserId() != UserHandle.getUserId(aInfo.uid));
@@ -2026,35 +2026,35 @@
ref = mResourcePackages.get(aInfo.packageName);
}
- LoadedApk loadedApk = ref != null ? ref.get() : null;
- if (loadedApk == null || (loadedApk.mResources != null
- && !loadedApk.mResources.getAssets().isUpToDate())) {
+ LoadedApk packageInfo = ref != null ? ref.get() : null;
+ if (packageInfo == null || (packageInfo.mResources != null
+ && !packageInfo.mResources.getAssets().isUpToDate())) {
if (localLOGV) Slog.v(TAG, (includeCode ? "Loading code package "
: "Loading resource-only package ") + aInfo.packageName
+ " (in " + (mBoundApplication != null
? mBoundApplication.processName : null)
+ ")");
- loadedApk =
+ packageInfo =
new LoadedApk(this, aInfo, compatInfo, baseLoader,
securityViolation, includeCode &&
(aInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0, registerPackage);
if (mSystemThread && "android".equals(aInfo.packageName)) {
- loadedApk.installSystemApplicationInfo(aInfo,
- getSystemContext().mLoadedApk.getClassLoader());
+ packageInfo.installSystemApplicationInfo(aInfo,
+ getSystemContext().mPackageInfo.getClassLoader());
}
if (differentUser) {
// Caching not supported across users
} else if (includeCode) {
mPackages.put(aInfo.packageName,
- new WeakReference<LoadedApk>(loadedApk));
+ new WeakReference<LoadedApk>(packageInfo));
} else {
mResourcePackages.put(aInfo.packageName,
- new WeakReference<LoadedApk>(loadedApk));
+ new WeakReference<LoadedApk>(packageInfo));
}
}
- return loadedApk;
+ return packageInfo;
}
}
@@ -2778,8 +2778,8 @@
/** Core implementation of activity launch. */
private Activity performLaunchActivity(ActivityClientRecord r) {
ActivityInfo aInfo = r.activityInfo;
- if (r.loadedApk == null) {
- r.loadedApk = getLoadedApk(aInfo.applicationInfo, r.compatInfo,
+ if (r.packageInfo == null) {
+ r.packageInfo = getPackageInfo(aInfo.applicationInfo, r.compatInfo,
Context.CONTEXT_INCLUDE_CODE);
}
@@ -2816,15 +2816,15 @@
}
try {
- Application app = r.loadedApk.makeApplication(false, mInstrumentation);
+ Application app = r.packageInfo.makeApplication(false, mInstrumentation);
if (localLOGV) Slog.v(TAG, "Performing launch of " + r);
if (localLOGV) Slog.v(
TAG, r + ": app=" + app
+ ", appName=" + app.getPackageName()
- + ", pkg=" + r.loadedApk.getPackageName()
+ + ", pkg=" + r.packageInfo.getPackageName()
+ ", comp=" + r.intent.getComponent().toShortString()
- + ", dir=" + r.loadedApk.getAppDir());
+ + ", dir=" + r.packageInfo.getAppDir());
if (activity != null) {
CharSequence title = r.activityInfo.loadLabel(appContext.getPackageManager());
@@ -2969,7 +2969,7 @@
}
ContextImpl appContext = ContextImpl.createActivityContext(
- this, r.loadedApk, r.activityInfo, r.token, displayId, r.overrideConfig);
+ this, r.packageInfo, r.activityInfo, r.token, displayId, r.overrideConfig);
final DisplayManagerGlobal dm = DisplayManagerGlobal.getInstance();
// For debugging purposes, if the activity's package name contains the value of
@@ -2977,7 +2977,7 @@
// its content on a secondary display if there is one.
String pkgName = SystemProperties.get("debug.second-display.pkg");
if (pkgName != null && !pkgName.isEmpty()
- && r.loadedApk.mPackageName.contains(pkgName)) {
+ && r.packageInfo.mPackageName.contains(pkgName)) {
for (int id : dm.getDisplayIds()) {
if (id != Display.DEFAULT_DISPLAY) {
Display display =
@@ -3309,7 +3309,7 @@
String component = data.intent.getComponent().getClassName();
- LoadedApk loadedApk = getLoadedApkNoCheck(
+ LoadedApk packageInfo = getPackageInfoNoCheck(
data.info.applicationInfo, data.compatInfo);
IActivityManager mgr = ActivityManager.getService();
@@ -3318,7 +3318,7 @@
BroadcastReceiver receiver;
ContextImpl context;
try {
- app = loadedApk.makeApplication(false, mInstrumentation);
+ app = packageInfo.makeApplication(false, mInstrumentation);
context = (ContextImpl) app.getBaseContext();
if (data.info.splitName != null) {
context = (ContextImpl) context.createContextForSplit(data.info.splitName);
@@ -3327,7 +3327,7 @@
data.intent.setExtrasClassLoader(cl);
data.intent.prepareToEnterProcess();
data.setExtrasClassLoader(cl);
- receiver = loadedApk.getAppFactory()
+ receiver = packageInfo.getAppFactory()
.instantiateReceiver(cl, data.info.name, data.intent);
} catch (Exception e) {
if (DEBUG_BROADCAST) Slog.i(TAG,
@@ -3343,9 +3343,9 @@
TAG, "Performing receive of " + data.intent
+ ": app=" + app
+ ", appName=" + app.getPackageName()
- + ", pkg=" + loadedApk.getPackageName()
+ + ", pkg=" + packageInfo.getPackageName()
+ ", comp=" + data.intent.getComponent().toShortString()
- + ", dir=" + loadedApk.getAppDir());
+ + ", dir=" + packageInfo.getAppDir());
sCurrentBroadcastIntent.set(data.intent);
receiver.setPendingResult(data);
@@ -3390,8 +3390,8 @@
unscheduleGcIdler();
// instantiate the BackupAgent class named in the manifest
- LoadedApk loadedApk = getLoadedApkNoCheck(data.appInfo, data.compatInfo);
- String packageName = loadedApk.mPackageName;
+ LoadedApk packageInfo = getPackageInfoNoCheck(data.appInfo, data.compatInfo);
+ String packageName = packageInfo.mPackageName;
if (packageName == null) {
Slog.d(TAG, "Asked to create backup agent for nonexistent package");
return;
@@ -3417,11 +3417,11 @@
try {
if (DEBUG_BACKUP) Slog.v(TAG, "Initializing agent class " + classname);
- java.lang.ClassLoader cl = loadedApk.getClassLoader();
+ java.lang.ClassLoader cl = packageInfo.getClassLoader();
agent = (BackupAgent) cl.loadClass(classname).newInstance();
// set up the agent's context
- ContextImpl context = ContextImpl.createAppContext(this, loadedApk);
+ ContextImpl context = ContextImpl.createAppContext(this, packageInfo);
context.setOuterContext(agent);
agent.attach(context);
@@ -3457,8 +3457,8 @@
private void handleDestroyBackupAgent(CreateBackupAgentData data) {
if (DEBUG_BACKUP) Slog.v(TAG, "handleDestroyBackupAgent: " + data);
- LoadedApk loadedApk = getLoadedApkNoCheck(data.appInfo, data.compatInfo);
- String packageName = loadedApk.mPackageName;
+ LoadedApk packageInfo = getPackageInfoNoCheck(data.appInfo, data.compatInfo);
+ String packageName = packageInfo.mPackageName;
BackupAgent agent = mBackupAgents.get(packageName);
if (agent != null) {
try {
@@ -3478,12 +3478,12 @@
// we are back active so skip it.
unscheduleGcIdler();
- LoadedApk loadedApk = getLoadedApkNoCheck(
+ LoadedApk packageInfo = getPackageInfoNoCheck(
data.info.applicationInfo, data.compatInfo);
Service service = null;
try {
- java.lang.ClassLoader cl = loadedApk.getClassLoader();
- service = loadedApk.getAppFactory()
+ java.lang.ClassLoader cl = packageInfo.getClassLoader();
+ service = packageInfo.getAppFactory()
.instantiateService(cl, data.info.name, data.intent);
} catch (Exception e) {
if (!mInstrumentation.onException(service, e)) {
@@ -3496,10 +3496,10 @@
try {
if (localLOGV) Slog.v(TAG, "Creating service " + data.info.name);
- ContextImpl context = ContextImpl.createAppContext(this, loadedApk);
+ ContextImpl context = ContextImpl.createAppContext(this, packageInfo);
context.setOuterContext(service);
- Application app = loadedApk.makeApplication(false, mInstrumentation);
+ Application app = packageInfo.makeApplication(false, mInstrumentation);
service.attach(context, this, data.info.name, data.token, app,
ActivityManager.getService());
service.onCreate();
@@ -4363,11 +4363,11 @@
}
private void handleUpdatePackageCompatibilityInfo(UpdateCompatibilityData data) {
- LoadedApk apk = peekLoadedApk(data.pkg, false);
+ LoadedApk apk = peekPackageInfo(data.pkg, false);
if (apk != null) {
apk.setCompatibilityInfo(data.info);
}
- apk = peekLoadedApk(data.pkg, true);
+ apk = peekPackageInfo(data.pkg, true);
if (apk != null) {
apk.setCompatibilityInfo(data.info);
}
@@ -4861,7 +4861,7 @@
if (a != null) {
Configuration thisConfig = applyConfigCompatMainThread(
mCurDefaultDisplayDpi, newConfig,
- ar.loadedApk.getCompatibilityInfo());
+ ar.packageInfo.getCompatibilityInfo());
if (!ar.activity.mFinished && (allActivities || !ar.paused)) {
// If the activity is currently resumed, its configuration
// needs to change right now.
@@ -5114,6 +5114,8 @@
// as that method uses the same check on the activity config override as well.
final boolean equivalent = config != null && mConfiguration != null
&& (0 == mConfiguration.diffPublicOnly(config));
+ final Theme systemTheme = getSystemContext().getTheme();
+ final Theme systemUiTheme = getSystemUiContext().getTheme();
synchronized (mResourcesManager) {
if (mPendingConfiguration != null) {
@@ -5146,12 +5148,10 @@
configDiff = mConfiguration.updateFrom(config);
config = applyCompatConfiguration(mCurDefaultDisplayDpi);
- final Theme systemTheme = getSystemContext().getTheme();
if ((systemTheme.getChangingConfigurations() & configDiff) != 0) {
systemTheme.rebase();
}
- final Theme systemUiTheme = getSystemUiContext().getTheme();
if ((systemUiTheme.getChangingConfigurations() & configDiff) != 0) {
systemUiTheme.rebase();
}
@@ -5347,7 +5347,7 @@
}
final void handleDispatchPackageBroadcast(int cmd, String[] packages) {
- boolean hasLoadedApk = false;
+ boolean hasPkgInfo = false;
switch (cmd) {
case ApplicationThreadConstants.PACKAGE_REMOVED:
case ApplicationThreadConstants.PACKAGE_REMOVED_DONT_KILL:
@@ -5358,14 +5358,14 @@
}
synchronized (mResourcesManager) {
for (int i = packages.length - 1; i >= 0; i--) {
- if (!hasLoadedApk) {
+ if (!hasPkgInfo) {
WeakReference<LoadedApk> ref = mPackages.get(packages[i]);
if (ref != null && ref.get() != null) {
- hasLoadedApk = true;
+ hasPkgInfo = true;
} else {
ref = mResourcePackages.get(packages[i]);
if (ref != null && ref.get() != null) {
- hasLoadedApk = true;
+ hasPkgInfo = true;
}
}
}
@@ -5385,21 +5385,21 @@
synchronized (mResourcesManager) {
for (int i = packages.length - 1; i >= 0; i--) {
WeakReference<LoadedApk> ref = mPackages.get(packages[i]);
- LoadedApk loadedApk = ref != null ? ref.get() : null;
- if (loadedApk != null) {
- hasLoadedApk = true;
+ LoadedApk pkgInfo = ref != null ? ref.get() : null;
+ if (pkgInfo != null) {
+ hasPkgInfo = true;
} else {
ref = mResourcePackages.get(packages[i]);
- loadedApk = ref != null ? ref.get() : null;
- if (loadedApk != null) {
- hasLoadedApk = true;
+ pkgInfo = ref != null ? ref.get() : null;
+ if (pkgInfo != null) {
+ hasPkgInfo = true;
}
}
// If the package is being replaced, yet it still has a valid
// LoadedApk object, the package was updated with _DONT_KILL.
// Adjust it's internal references to the application info and
// resources.
- if (loadedApk != null) {
+ if (pkgInfo != null) {
try {
final String packageName = packages[i];
final ApplicationInfo aInfo =
@@ -5413,13 +5413,13 @@
if (ar.activityInfo.applicationInfo.packageName
.equals(packageName)) {
ar.activityInfo.applicationInfo = aInfo;
- ar.loadedApk = loadedApk;
+ ar.packageInfo = pkgInfo;
}
}
}
final List<String> oldPaths =
sPackageManager.getPreviousCodePaths(packageName);
- loadedApk.updateApplicationInfo(aInfo, oldPaths);
+ pkgInfo.updateApplicationInfo(aInfo, oldPaths);
} catch (RemoteException e) {
}
}
@@ -5428,7 +5428,7 @@
break;
}
}
- ApplicationPackageManager.handlePackageBroadcast(cmd, packages, hasLoadedApk);
+ ApplicationPackageManager.handlePackageBroadcast(cmd, packages, hasPkgInfo);
}
final void handleLowMemory() {
@@ -5636,10 +5636,10 @@
applyCompatConfiguration(mCurDefaultDisplayDpi);
}
- data.loadedApk = getLoadedApkNoCheck(data.appInfo, data.compatInfo);
+ data.info = getPackageInfoNoCheck(data.appInfo, data.compatInfo);
if (agent != null) {
- handleAttachAgent(agent, data.loadedApk);
+ handleAttachAgent(agent, data.info);
}
/**
@@ -5684,7 +5684,7 @@
// XXX should have option to change the port.
Debug.changeDebugPort(8100);
if (data.debugMode == ApplicationThreadConstants.DEBUG_WAIT) {
- Slog.w(TAG, "Application " + data.loadedApk.getPackageName()
+ Slog.w(TAG, "Application " + data.info.getPackageName()
+ " is waiting for the debugger on port 8100...");
IActivityManager mgr = ActivityManager.getService();
@@ -5703,7 +5703,7 @@
}
} else {
- Slog.w(TAG, "Application " + data.loadedApk.getPackageName()
+ Slog.w(TAG, "Application " + data.info.getPackageName()
+ " can be debugged on port 8100...");
}
}
@@ -5751,14 +5751,14 @@
mInstrumentationAppDir = ii.sourceDir;
mInstrumentationSplitAppDirs = ii.splitSourceDirs;
mInstrumentationLibDir = getInstrumentationLibrary(data.appInfo, ii);
- mInstrumentedAppDir = data.loadedApk.getAppDir();
- mInstrumentedSplitAppDirs = data.loadedApk.getSplitAppDirs();
- mInstrumentedLibDir = data.loadedApk.getLibDir();
+ mInstrumentedAppDir = data.info.getAppDir();
+ mInstrumentedSplitAppDirs = data.info.getSplitAppDirs();
+ mInstrumentedLibDir = data.info.getLibDir();
} else {
ii = null;
}
- final ContextImpl appContext = ContextImpl.createAppContext(this, data.loadedApk);
+ final ContextImpl appContext = ContextImpl.createAppContext(this, data.info);
updateLocaleListFromAppContext(appContext,
mResourcesManager.getConfiguration().getLocales());
@@ -5802,9 +5802,9 @@
}
ii.copyTo(instrApp);
instrApp.initForUser(UserHandle.myUserId());
- final LoadedApk loadedApk = getLoadedApk(instrApp, data.compatInfo,
+ final LoadedApk pi = getPackageInfo(instrApp, data.compatInfo,
appContext.getClassLoader(), false, true, false);
- final ContextImpl instrContext = ContextImpl.createAppContext(this, loadedApk);
+ final ContextImpl instrContext = ContextImpl.createAppContext(this, pi);
try {
final ClassLoader cl = instrContext.getClassLoader();
@@ -5849,7 +5849,7 @@
try {
// If the app is being launched for full backup or restore, bring it up in
// a restricted environment with the base application class.
- app = data.loadedApk.makeApplication(data.restrictedBackupMode, null);
+ app = data.info.makeApplication(data.restrictedBackupMode, null);
mInitialApplication = app;
// don't bring up providers in restricted mode; they may depend on the
@@ -5903,7 +5903,7 @@
final int preloadedFontsResource = info.metaData.getInt(
ApplicationInfo.METADATA_PRELOADED_FONTS, 0);
if (preloadedFontsResource != 0) {
- data.loadedApk.getResources().preloadFonts(preloadedFontsResource);
+ data.info.getResources().preloadFonts(preloadedFontsResource);
}
}
} catch (RemoteException e) {
@@ -6361,12 +6361,12 @@
try {
final java.lang.ClassLoader cl = c.getClassLoader();
- LoadedApk loadedApk = peekLoadedApk(ai.packageName, true);
- if (loadedApk == null) {
+ LoadedApk packageInfo = peekPackageInfo(ai.packageName, true);
+ if (packageInfo == null) {
// System startup case.
- loadedApk = getSystemContext().mLoadedApk;
+ packageInfo = getSystemContext().mPackageInfo;
}
- localProvider = loadedApk.getAppFactory()
+ localProvider = packageInfo.getAppFactory()
.instantiateProvider(cl, info.name);
provider = localProvider.getIContentProvider();
if (provider == null) {
@@ -6515,8 +6515,8 @@
mInstrumentation = new Instrumentation();
mInstrumentation.basicInit(this);
ContextImpl context = ContextImpl.createAppContext(
- this, getSystemContext().mLoadedApk);
- mInitialApplication = context.mLoadedApk.makeApplication(true, null);
+ this, getSystemContext().mPackageInfo);
+ mInitialApplication = context.mPackageInfo.makeApplication(true, null);
mInitialApplication.onCreate();
} catch (Exception e) {
throw new RuntimeException(
diff --git a/core/java/android/app/ActivityView.java b/core/java/android/app/ActivityView.java
index ac6cba1..5d0143a 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.app.ActivityManager.StackInfo;
import android.content.Context;
import android.content.Intent;
import android.hardware.display.DisplayManager;
@@ -38,6 +39,8 @@
import dalvik.system.CloseGuard;
+import java.util.List;
+
/**
* Activity container that allows launching activities into itself and does input forwarding.
* <p>Creation of this view is only allowed to callers who have
@@ -58,10 +61,13 @@
private final SurfaceCallback mSurfaceCallback;
private StateCallback mActivityViewCallback;
+ private IActivityManager mActivityManager;
private IInputForwarder mInputForwarder;
// Temp container to store view coordinates on screen.
private final int[] mLocationOnScreen = new int[2];
+ private TaskStackListener mTaskStackListener;
+
private final CloseGuard mGuard = CloseGuard.get();
private boolean mOpened; // Protected by mGuard.
@@ -76,6 +82,7 @@
public ActivityView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
+ mActivityManager = ActivityManager.getService();
mSurfaceView = new SurfaceView(context);
mSurfaceCallback = new SurfaceCallback();
mSurfaceView.getHolder().addCallback(mSurfaceCallback);
@@ -303,6 +310,12 @@
mInputForwarder = InputManager.getInstance().createInputForwarder(
mVirtualDisplay.getDisplay().getDisplayId());
+ mTaskStackListener = new TaskBackgroundChangeListener();
+ try {
+ mActivityManager.registerTaskStackListener(mTaskStackListener);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Failed to register task stack listener", e);
+ }
}
private void performRelease() {
@@ -317,6 +330,15 @@
}
cleanTapExcludeRegion();
+ if (mTaskStackListener != null) {
+ try {
+ mActivityManager.unregisterTaskStackListener(mTaskStackListener);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Failed to unregister task stack listener", e);
+ }
+ mTaskStackListener = null;
+ }
+
final boolean displayReleased;
if (mVirtualDisplay != null) {
mVirtualDisplay.release();
@@ -369,4 +391,42 @@
super.finalize();
}
}
+
+ /**
+ * A task change listener that detects background color change of the topmost stack on our
+ * virtual display and updates the background of the surface view. This background will be shown
+ * when surface view is resized, but the app hasn't drawn its content in new size yet.
+ */
+ private class TaskBackgroundChangeListener extends TaskStackListener {
+
+ @Override
+ public void onTaskDescriptionChanged(int taskId, ActivityManager.TaskDescription td)
+ throws RemoteException {
+ if (mVirtualDisplay == null) {
+ return;
+ }
+
+ // Find the topmost task on our virtual display - it will define the background
+ // color of the surface view during resizing.
+ final int displayId = mVirtualDisplay.getDisplay().getDisplayId();
+ final List<StackInfo> stackInfoList = mActivityManager.getAllStackInfos();
+
+ // Iterate through stacks from top to bottom.
+ final int stackCount = stackInfoList.size();
+ for (int i = 0; i < stackCount; i++) {
+ final StackInfo stackInfo = stackInfoList.get(i);
+ // Only look for stacks on our virtual display.
+ if (stackInfo.displayId != displayId) {
+ continue;
+ }
+ // Found the topmost stack on target display. Now check if the topmost task's
+ // description changed.
+ if (taskId == stackInfo.taskIds[stackInfo.taskIds.length - 1]) {
+ mSurfaceView.setResizeBackgroundColor(td.getBackgroundColor());
+ }
+ break;
+ }
+ }
+ }
+
}
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index 7ca6802..e923fb2 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -263,8 +263,10 @@
public static final int OP_REQUEST_DELETE_PACKAGES = 72;
/** @hide Bind an accessibility service. */
public static final int OP_BIND_ACCESSIBILITY_SERVICE = 73;
+ /** @hide Continue handover of a call from another app */
+ public static final int OP_ACCEPT_HANDOVER = 74;
/** @hide */
- public static final int _NUM_OP = 74;
+ public static final int _NUM_OP = 75;
/** Access to coarse location information. */
public static final String OPSTR_COARSE_LOCATION = "android:coarse_location";
@@ -378,7 +380,13 @@
/** Answer incoming phone calls */
public static final String OPSTR_ANSWER_PHONE_CALLS
= "android:answer_phone_calls";
-
+ /**
+ * Accept call handover
+ * @hide
+ */
+ @SystemApi @TestApi
+ public static final String OPSTR_ACCEPT_HANDOVER
+ = "android:accept_handover";
/** @hide */
@SystemApi @TestApi
public static final String OPSTR_GPS = "android:gps";
@@ -528,6 +536,7 @@
OP_USE_SIP,
OP_PROCESS_OUTGOING_CALLS,
OP_ANSWER_PHONE_CALLS,
+ OP_ACCEPT_HANDOVER,
// Microphone
OP_RECORD_AUDIO,
// Camera
@@ -626,6 +635,7 @@
OP_CHANGE_WIFI_STATE,
OP_REQUEST_DELETE_PACKAGES,
OP_BIND_ACCESSIBILITY_SERVICE,
+ OP_ACCEPT_HANDOVER,
};
/**
@@ -706,6 +716,7 @@
OPSTR_CHANGE_WIFI_STATE,
OPSTR_REQUEST_DELETE_PACKAGES,
OPSTR_BIND_ACCESSIBILITY_SERVICE,
+ OPSTR_ACCEPT_HANDOVER,
};
/**
@@ -787,6 +798,7 @@
"CHANGE_WIFI_STATE",
"REQUEST_DELETE_PACKAGES",
"BIND_ACCESSIBILITY_SERVICE",
+ "ACCEPT_HANDOVER",
};
/**
@@ -868,6 +880,7 @@
Manifest.permission.CHANGE_WIFI_STATE,
Manifest.permission.REQUEST_DELETE_PACKAGES,
Manifest.permission.BIND_ACCESSIBILITY_SERVICE,
+ Manifest.permission.ACCEPT_HANDOVER,
};
/**
@@ -950,6 +963,7 @@
null, // OP_CHANGE_WIFI_STATE
null, // REQUEST_DELETE_PACKAGES
null, // OP_BIND_ACCESSIBILITY_SERVICE
+ null, // ACCEPT_HANDOVER
};
/**
@@ -1031,6 +1045,7 @@
false, // OP_CHANGE_WIFI_STATE
false, // OP_REQUEST_DELETE_PACKAGES
false, // OP_BIND_ACCESSIBILITY_SERVICE
+ false, // ACCEPT_HANDOVER
};
/**
@@ -1111,6 +1126,7 @@
AppOpsManager.MODE_ALLOWED, // OP_CHANGE_WIFI_STATE
AppOpsManager.MODE_ALLOWED, // REQUEST_DELETE_PACKAGES
AppOpsManager.MODE_ALLOWED, // OP_BIND_ACCESSIBILITY_SERVICE
+ AppOpsManager.MODE_ALLOWED, // ACCEPT_HANDOVER
};
/**
@@ -1195,6 +1211,7 @@
false, // OP_CHANGE_WIFI_STATE
false, // OP_REQUEST_DELETE_PACKAGES
false, // OP_BIND_ACCESSIBILITY_SERVICE
+ false, // ACCEPT_HANDOVER
};
/**
diff --git a/core/java/android/app/Application.java b/core/java/android/app/Application.java
index 5822f5c..a13ac49 100644
--- a/core/java/android/app/Application.java
+++ b/core/java/android/app/Application.java
@@ -86,11 +86,21 @@
/**
* Called when the application is starting, before any activity, service,
* or receiver objects (excluding content providers) have been created.
- * Implementations should be as quick as possible (for example using
+ *
+ * <p>Implementations should be as quick as possible (for example using
* lazy initialization of state) since the time spent in this function
* directly impacts the performance of starting the first activity,
- * service, or receiver in a process.
- * If you override this method, be sure to call super.onCreate().
+ * service, or receiver in a process.</p>
+ *
+ * <p>If you override this method, be sure to call {@code super.onCreate()}.</p>
+ *
+ * <p class="note">Be aware that direct boot may also affect callback order on
+ * Android {@link android.os.Build.VERSION_CODES#N} and later devices.
+ * Until the user unlocks the device, only direct boot aware components are
+ * allowed to run. You should consider that all direct boot unaware
+ * components, including such {@link android.content.ContentProvider}, are
+ * disabled until user unlock happens, especially when component callback
+ * order matters.</p>
*/
@CallSuper
public void onCreate() {
@@ -187,7 +197,7 @@
*/
/* package */ final void attach(Context context) {
attachBaseContext(context);
- mLoadedApk = ContextImpl.getImpl(context).mLoadedApk;
+ mLoadedApk = ContextImpl.getImpl(context).mPackageInfo;
}
/* package */ void dispatchActivityCreated(Activity activity, Bundle savedInstanceState) {
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index cc68c05..6b0a2f9 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -1409,7 +1409,7 @@
sameUid ? app.sourceDir : app.publicSourceDir,
sameUid ? app.splitSourceDirs : app.splitPublicSourceDirs,
app.resourceDirs, app.sharedLibraryFiles, Display.DEFAULT_DISPLAY,
- mContext.mLoadedApk);
+ mContext.mPackageInfo);
if (r != null) {
return r;
}
diff --git a/core/java/android/app/ClientTransactionHandler.java b/core/java/android/app/ClientTransactionHandler.java
index 0f66652..5b61fdf 100644
--- a/core/java/android/app/ClientTransactionHandler.java
+++ b/core/java/android/app/ClientTransactionHandler.java
@@ -111,7 +111,7 @@
PendingTransactionActions pendingActions);
/** Get package info. */
- public abstract LoadedApk getLoadedApkNoCheck(ApplicationInfo ai,
+ public abstract LoadedApk getPackageInfoNoCheck(ApplicationInfo ai,
CompatibilityInfo compatInfo);
/** Deliver app configuration change notification. */
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 4914ffa..6496110 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -159,7 +159,7 @@
private ArrayMap<String, File> mSharedPrefsPaths;
final @NonNull ActivityThread mMainThread;
- final @NonNull LoadedApk mLoadedApk;
+ final @NonNull LoadedApk mPackageInfo;
private @Nullable ClassLoader mClassLoader;
private final @Nullable IBinder mActivityToken;
@@ -257,8 +257,8 @@
@Override
public Context getApplicationContext() {
- return (mLoadedApk != null) ?
- mLoadedApk.getApplication() : mMainThread.getApplication();
+ return (mPackageInfo != null) ?
+ mPackageInfo.getApplication() : mMainThread.getApplication();
}
@Override
@@ -302,15 +302,15 @@
@Override
public ClassLoader getClassLoader() {
- return mClassLoader != null ? mClassLoader : (mLoadedApk != null ? mLoadedApk.getClassLoader() : ClassLoader.getSystemClassLoader());
+ return mClassLoader != null ? mClassLoader : (mPackageInfo != null ? mPackageInfo.getClassLoader() : ClassLoader.getSystemClassLoader());
}
@Override
public String getPackageName() {
- if (mLoadedApk != null) {
- return mLoadedApk.getPackageName();
+ if (mPackageInfo != null) {
+ return mPackageInfo.getPackageName();
}
- // No mLoadedApk means this is a Context for the system itself,
+ // No mPackageInfo means this is a Context for the system itself,
// and this here is its name.
return "android";
}
@@ -329,24 +329,24 @@
@Override
public ApplicationInfo getApplicationInfo() {
- if (mLoadedApk != null) {
- return mLoadedApk.getApplicationInfo();
+ if (mPackageInfo != null) {
+ return mPackageInfo.getApplicationInfo();
}
throw new RuntimeException("Not supported in system context");
}
@Override
public String getPackageResourcePath() {
- if (mLoadedApk != null) {
- return mLoadedApk.getResDir();
+ if (mPackageInfo != null) {
+ return mPackageInfo.getResDir();
}
throw new RuntimeException("Not supported in system context");
}
@Override
public String getPackageCodePath() {
- if (mLoadedApk != null) {
- return mLoadedApk.getAppDir();
+ if (mPackageInfo != null) {
+ return mPackageInfo.getAppDir();
}
throw new RuntimeException("Not supported in system context");
}
@@ -356,7 +356,7 @@
// At least one application in the world actually passes in a null
// name. This happened to work because when we generated the file name
// we would stringify it to "null.xml". Nice.
- if (mLoadedApk.getApplicationInfo().targetSdkVersion <
+ if (mPackageInfo.getApplicationInfo().targetSdkVersion <
Build.VERSION_CODES.KITKAT) {
if (name == null) {
name = "null";
@@ -913,14 +913,14 @@
/** @hide */
@Override
- public void startActivitiesAsUser(Intent[] intents, Bundle options, UserHandle userHandle) {
+ public int startActivitiesAsUser(Intent[] intents, Bundle options, UserHandle userHandle) {
if ((intents[0].getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) == 0) {
throw new AndroidRuntimeException(
"Calling startActivities() from outside of an Activity "
+ " context requires the FLAG_ACTIVITY_NEW_TASK flag on first Intent."
+ " Is this really what you want?");
}
- mMainThread.getInstrumentation().execStartActivitiesAsUser(
+ return mMainThread.getInstrumentation().execStartActivitiesAsUser(
getOuterContext(), mMainThread.getApplicationThread(), null,
(Activity) null, intents, options, userHandle.getIdentifier());
}
@@ -1104,11 +1104,11 @@
warnIfCallingFromSystemProcess();
IIntentReceiver rd = null;
if (resultReceiver != null) {
- if (mLoadedApk != null) {
+ if (mPackageInfo != null) {
if (scheduler == null) {
scheduler = mMainThread.getHandler();
}
- rd = mLoadedApk.getReceiverDispatcher(
+ rd = mPackageInfo.getReceiverDispatcher(
resultReceiver, getOuterContext(), scheduler,
mMainThread.getInstrumentation(), false);
} else {
@@ -1208,11 +1208,11 @@
Handler scheduler, int initialCode, String initialData, Bundle initialExtras) {
IIntentReceiver rd = null;
if (resultReceiver != null) {
- if (mLoadedApk != null) {
+ if (mPackageInfo != null) {
if (scheduler == null) {
scheduler = mMainThread.getHandler();
}
- rd = mLoadedApk.getReceiverDispatcher(
+ rd = mPackageInfo.getReceiverDispatcher(
resultReceiver, getOuterContext(), scheduler,
mMainThread.getInstrumentation(), false);
} else {
@@ -1262,11 +1262,11 @@
warnIfCallingFromSystemProcess();
IIntentReceiver rd = null;
if (resultReceiver != null) {
- if (mLoadedApk != null) {
+ if (mPackageInfo != null) {
if (scheduler == null) {
scheduler = mMainThread.getHandler();
}
- rd = mLoadedApk.getReceiverDispatcher(
+ rd = mPackageInfo.getReceiverDispatcher(
resultReceiver, getOuterContext(), scheduler,
mMainThread.getInstrumentation(), false);
} else {
@@ -1344,11 +1344,11 @@
Bundle initialExtras) {
IIntentReceiver rd = null;
if (resultReceiver != null) {
- if (mLoadedApk != null) {
+ if (mPackageInfo != null) {
if (scheduler == null) {
scheduler = mMainThread.getHandler();
}
- rd = mLoadedApk.getReceiverDispatcher(
+ rd = mPackageInfo.getReceiverDispatcher(
resultReceiver, getOuterContext(), scheduler,
mMainThread.getInstrumentation(), false);
} else {
@@ -1425,11 +1425,11 @@
Handler scheduler, Context context, int flags) {
IIntentReceiver rd = null;
if (receiver != null) {
- if (mLoadedApk != null && context != null) {
+ if (mPackageInfo != null && context != null) {
if (scheduler == null) {
scheduler = mMainThread.getHandler();
}
- rd = mLoadedApk.getReceiverDispatcher(
+ rd = mPackageInfo.getReceiverDispatcher(
receiver, context, scheduler,
mMainThread.getInstrumentation(), true);
} else {
@@ -1456,8 +1456,8 @@
@Override
public void unregisterReceiver(BroadcastReceiver receiver) {
- if (mLoadedApk != null) {
- IIntentReceiver rd = mLoadedApk.forgetReceiverDispatcher(
+ if (mPackageInfo != null) {
+ IIntentReceiver rd = mPackageInfo.forgetReceiverDispatcher(
getOuterContext(), receiver);
try {
ActivityManager.getService().unregisterReceiver(rd);
@@ -1590,7 +1590,7 @@
@Override
public IServiceConnection getServiceDispatcher(ServiceConnection conn, Handler handler,
int flags) {
- return mLoadedApk.getServiceDispatcher(conn, getOuterContext(), handler, flags);
+ return mPackageInfo.getServiceDispatcher(conn, getOuterContext(), handler, flags);
}
/** @hide */
@@ -1612,16 +1612,16 @@
if (conn == null) {
throw new IllegalArgumentException("connection is null");
}
- if (mLoadedApk != null) {
- sd = mLoadedApk.getServiceDispatcher(conn, getOuterContext(), handler, flags);
+ if (mPackageInfo != null) {
+ sd = mPackageInfo.getServiceDispatcher(conn, getOuterContext(), handler, flags);
} else {
throw new RuntimeException("Not supported in system context");
}
validateServiceIntent(service);
try {
IBinder token = getActivityToken();
- if (token == null && (flags&BIND_AUTO_CREATE) == 0 && mLoadedApk != null
- && mLoadedApk.getApplicationInfo().targetSdkVersion
+ if (token == null && (flags&BIND_AUTO_CREATE) == 0 && mPackageInfo != null
+ && mPackageInfo.getApplicationInfo().targetSdkVersion
< android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
flags |= BIND_WAIVE_PRIORITY;
}
@@ -1645,8 +1645,8 @@
if (conn == null) {
throw new IllegalArgumentException("connection is null");
}
- if (mLoadedApk != null) {
- IServiceConnection sd = mLoadedApk.forgetServiceDispatcher(
+ if (mPackageInfo != null) {
+ IServiceConnection sd = mPackageInfo.forgetServiceDispatcher(
getOuterContext(), conn);
try {
ActivityManager.getService().unbindService(sd);
@@ -1991,20 +1991,40 @@
}
}
+ private static Resources createResources(IBinder activityToken, LoadedApk pi, String splitName,
+ int displayId, Configuration overrideConfig, CompatibilityInfo compatInfo) {
+ final String[] splitResDirs;
+ final ClassLoader classLoader;
+ try {
+ splitResDirs = pi.getSplitPaths(splitName);
+ classLoader = pi.getSplitClassLoader(splitName);
+ } catch (NameNotFoundException e) {
+ throw new RuntimeException(e);
+ }
+ return ResourcesManager.getInstance().getResources(activityToken,
+ pi.getResDir(),
+ splitResDirs,
+ pi.getOverlayDirs(),
+ pi.getApplicationInfo().sharedLibraryFiles,
+ displayId,
+ overrideConfig,
+ compatInfo,
+ classLoader);
+ }
+
@Override
public Context createApplicationContext(ApplicationInfo application, int flags)
throws NameNotFoundException {
- LoadedApk loadedApk = mMainThread.getLoadedApk(application,
- mResources.getCompatibilityInfo(),
+ LoadedApk pi = mMainThread.getPackageInfo(application, mResources.getCompatibilityInfo(),
flags | CONTEXT_REGISTER_PACKAGE);
- if (loadedApk != null) {
- ContextImpl c = new ContextImpl(this, mMainThread, loadedApk, null, mActivityToken,
+ if (pi != null) {
+ ContextImpl c = new ContextImpl(this, mMainThread, pi, null, mActivityToken,
new UserHandle(UserHandle.getUserId(application.uid)), flags, null);
final int displayId = mDisplay != null
? mDisplay.getDisplayId() : Display.DEFAULT_DISPLAY;
- c.setResources(loadedApk.createResources(mActivityToken, null, displayId, null,
+ c.setResources(createResources(mActivityToken, pi, null, displayId, null,
getDisplayAdjustments(displayId).getCompatibilityInfo()));
if (c.mResources != null) {
return c;
@@ -2028,21 +2048,20 @@
if (packageName.equals("system") || packageName.equals("android")) {
// The system resources are loaded in every application, so we can safely copy
// the context without reloading Resources.
- return new ContextImpl(this, mMainThread, mLoadedApk, null, mActivityToken, user,
+ return new ContextImpl(this, mMainThread, mPackageInfo, null, mActivityToken, user,
flags, null);
}
- LoadedApk loadedApk = mMainThread.getLoadedApkForPackageName(packageName,
- mResources.getCompatibilityInfo(),
+ LoadedApk pi = mMainThread.getPackageInfo(packageName, mResources.getCompatibilityInfo(),
flags | CONTEXT_REGISTER_PACKAGE, user.getIdentifier());
- if (loadedApk != null) {
- ContextImpl c = new ContextImpl(this, mMainThread, loadedApk, null, mActivityToken, user,
+ if (pi != null) {
+ ContextImpl c = new ContextImpl(this, mMainThread, pi, null, mActivityToken, user,
flags, null);
final int displayId = mDisplay != null
? mDisplay.getDisplayId() : Display.DEFAULT_DISPLAY;
- c.setResources(loadedApk.createResources(mActivityToken, null, displayId, null,
+ c.setResources(createResources(mActivityToken, pi, null, displayId, null,
getDisplayAdjustments(displayId).getCompatibilityInfo()));
if (c.mResources != null) {
return c;
@@ -2056,21 +2075,30 @@
@Override
public Context createContextForSplit(String splitName) throws NameNotFoundException {
- if (!mLoadedApk.getApplicationInfo().requestsIsolatedSplitLoading()) {
+ if (!mPackageInfo.getApplicationInfo().requestsIsolatedSplitLoading()) {
// All Splits are always loaded.
return this;
}
- final ClassLoader classLoader = mLoadedApk.getSplitClassLoader(splitName);
+ final ClassLoader classLoader = mPackageInfo.getSplitClassLoader(splitName);
+ final String[] paths = mPackageInfo.getSplitPaths(splitName);
- final ContextImpl context = new ContextImpl(this, mMainThread, mLoadedApk, splitName,
+ final ContextImpl context = new ContextImpl(this, mMainThread, mPackageInfo, splitName,
mActivityToken, mUser, mFlags, classLoader);
final int displayId = mDisplay != null
? mDisplay.getDisplayId() : Display.DEFAULT_DISPLAY;
- context.setResources(mLoadedApk.getOrCreateResourcesForSplit(splitName,
- mActivityToken, displayId));
+ context.setResources(ResourcesManager.getInstance().getResources(
+ mActivityToken,
+ mPackageInfo.getResDir(),
+ paths,
+ mPackageInfo.getOverlayDirs(),
+ mPackageInfo.getApplicationInfo().sharedLibraryFiles,
+ displayId,
+ null,
+ mPackageInfo.getCompatibilityInfo(),
+ classLoader));
return context;
}
@@ -2080,11 +2108,11 @@
throw new IllegalArgumentException("overrideConfiguration must not be null");
}
- ContextImpl context = new ContextImpl(this, mMainThread, mLoadedApk, mSplitName,
+ ContextImpl context = new ContextImpl(this, mMainThread, mPackageInfo, mSplitName,
mActivityToken, mUser, mFlags, mClassLoader);
final int displayId = mDisplay != null ? mDisplay.getDisplayId() : Display.DEFAULT_DISPLAY;
- context.setResources(mLoadedApk.createResources(mActivityToken, mSplitName, displayId,
+ context.setResources(createResources(mActivityToken, mPackageInfo, mSplitName, displayId,
overrideConfiguration, getDisplayAdjustments(displayId).getCompatibilityInfo()));
return context;
}
@@ -2095,11 +2123,11 @@
throw new IllegalArgumentException("display must not be null");
}
- ContextImpl context = new ContextImpl(this, mMainThread, mLoadedApk, mSplitName,
+ ContextImpl context = new ContextImpl(this, mMainThread, mPackageInfo, mSplitName,
mActivityToken, mUser, mFlags, mClassLoader);
final int displayId = display.getDisplayId();
- context.setResources(mLoadedApk.createResources(mActivityToken, mSplitName, displayId,
+ context.setResources(createResources(mActivityToken, mPackageInfo, mSplitName, displayId,
null, getDisplayAdjustments(displayId).getCompatibilityInfo()));
context.mDisplay = display;
return context;
@@ -2109,7 +2137,7 @@
public Context createDeviceProtectedStorageContext() {
final int flags = (mFlags & ~Context.CONTEXT_CREDENTIAL_PROTECTED_STORAGE)
| Context.CONTEXT_DEVICE_PROTECTED_STORAGE;
- return new ContextImpl(this, mMainThread, mLoadedApk, mSplitName, mActivityToken, mUser,
+ return new ContextImpl(this, mMainThread, mPackageInfo, mSplitName, mActivityToken, mUser,
flags, mClassLoader);
}
@@ -2117,7 +2145,7 @@
public Context createCredentialProtectedStorageContext() {
final int flags = (mFlags & ~Context.CONTEXT_DEVICE_PROTECTED_STORAGE)
| Context.CONTEXT_CREDENTIAL_PROTECTED_STORAGE;
- return new ContextImpl(this, mMainThread, mLoadedApk, mSplitName, mActivityToken, mUser,
+ return new ContextImpl(this, mMainThread, mPackageInfo, mSplitName, mActivityToken, mUser,
flags, mClassLoader);
}
@@ -2166,14 +2194,14 @@
@Override
public File getDataDir() {
- if (mLoadedApk != null) {
+ if (mPackageInfo != null) {
File res = null;
if (isCredentialProtectedStorage()) {
- res = mLoadedApk.getCredentialProtectedDataDirFile();
+ res = mPackageInfo.getCredentialProtectedDataDirFile();
} else if (isDeviceProtectedStorage()) {
- res = mLoadedApk.getDeviceProtectedDataDirFile();
+ res = mPackageInfo.getDeviceProtectedDataDirFile();
} else {
- res = mLoadedApk.getDataDirFile();
+ res = mPackageInfo.getDataDirFile();
}
if (res != null) {
@@ -2224,10 +2252,10 @@
}
static ContextImpl createSystemContext(ActivityThread mainThread) {
- LoadedApk loadedApk = new LoadedApk(mainThread);
- ContextImpl context = new ContextImpl(null, mainThread, loadedApk, null, null, null, 0,
+ LoadedApk packageInfo = new LoadedApk(mainThread);
+ ContextImpl context = new ContextImpl(null, mainThread, packageInfo, null, null, null, 0,
null);
- context.setResources(loadedApk.getResources());
+ context.setResources(packageInfo.getResources());
context.mResources.updateConfiguration(context.mResourcesManager.getConfiguration(),
context.mResourcesManager.getDisplayMetrics());
return context;
@@ -2238,35 +2266,35 @@
* Make sure that the created system UI context shares the same LoadedApk as the system context.
*/
static ContextImpl createSystemUiContext(ContextImpl systemContext) {
- final LoadedApk loadedApk = systemContext.mLoadedApk;
- ContextImpl context = new ContextImpl(null, systemContext.mMainThread, loadedApk, null,
+ final LoadedApk packageInfo = systemContext.mPackageInfo;
+ ContextImpl context = new ContextImpl(null, systemContext.mMainThread, packageInfo, null,
null, null, 0, null);
- context.setResources(loadedApk.createResources(null, null, Display.DEFAULT_DISPLAY, null,
- loadedApk.getCompatibilityInfo()));
+ context.setResources(createResources(null, packageInfo, null, Display.DEFAULT_DISPLAY, null,
+ packageInfo.getCompatibilityInfo()));
return context;
}
- static ContextImpl createAppContext(ActivityThread mainThread, LoadedApk loadedApk) {
- if (loadedApk == null) throw new IllegalArgumentException("loadedApk");
- ContextImpl context = new ContextImpl(null, mainThread, loadedApk, null, null, null, 0,
+ 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,
null);
- context.setResources(loadedApk.getResources());
+ context.setResources(packageInfo.getResources());
return context;
}
static ContextImpl createActivityContext(ActivityThread mainThread,
- LoadedApk loadedApk, ActivityInfo activityInfo, IBinder activityToken, int displayId,
+ LoadedApk packageInfo, ActivityInfo activityInfo, IBinder activityToken, int displayId,
Configuration overrideConfiguration) {
- if (loadedApk == null) throw new IllegalArgumentException("loadedApk");
+ if (packageInfo == null) throw new IllegalArgumentException("packageInfo");
- String[] splitDirs = loadedApk.getSplitResDirs();
- ClassLoader classLoader = loadedApk.getClassLoader();
+ String[] splitDirs = packageInfo.getSplitResDirs();
+ ClassLoader classLoader = packageInfo.getClassLoader();
- if (loadedApk.getApplicationInfo().requestsIsolatedSplitLoading()) {
+ if (packageInfo.getApplicationInfo().requestsIsolatedSplitLoading()) {
Trace.traceBegin(Trace.TRACE_TAG_RESOURCES, "SplitDependencies");
try {
- classLoader = loadedApk.getSplitClassLoader(activityInfo.splitName);
- splitDirs = loadedApk.getSplitPaths(activityInfo.splitName);
+ classLoader = packageInfo.getSplitClassLoader(activityInfo.splitName);
+ splitDirs = packageInfo.getSplitPaths(activityInfo.splitName);
} catch (NameNotFoundException e) {
// Nothing above us can handle a NameNotFoundException, better crash.
throw new RuntimeException(e);
@@ -2275,14 +2303,14 @@
}
}
- ContextImpl context = new ContextImpl(null, mainThread, loadedApk, activityInfo.splitName,
+ ContextImpl context = new ContextImpl(null, mainThread, packageInfo, activityInfo.splitName,
activityToken, null, 0, classLoader);
// Clamp display ID to DEFAULT_DISPLAY if it is INVALID_DISPLAY.
displayId = (displayId != Display.INVALID_DISPLAY) ? displayId : Display.DEFAULT_DISPLAY;
final CompatibilityInfo compatInfo = (displayId == Display.DEFAULT_DISPLAY)
- ? loadedApk.getCompatibilityInfo()
+ ? packageInfo.getCompatibilityInfo()
: CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO;
final ResourcesManager resourcesManager = ResourcesManager.getInstance();
@@ -2290,10 +2318,10 @@
// Create the base resources for which all configuration contexts for this Activity
// will be rebased upon.
context.setResources(resourcesManager.createBaseActivityResources(activityToken,
- loadedApk.getResDir(),
+ packageInfo.getResDir(),
splitDirs,
- loadedApk.getOverlayDirs(),
- loadedApk.getApplicationInfo().sharedLibraryFiles,
+ packageInfo.getOverlayDirs(),
+ packageInfo.getApplicationInfo().sharedLibraryFiles,
displayId,
overrideConfiguration,
compatInfo,
@@ -2304,7 +2332,7 @@
}
private ContextImpl(@Nullable ContextImpl container, @NonNull ActivityThread mainThread,
- @NonNull LoadedApk loadedApk, @Nullable String splitName,
+ @NonNull LoadedApk packageInfo, @Nullable String splitName,
@Nullable IBinder activityToken, @Nullable UserHandle user, int flags,
@Nullable ClassLoader classLoader) {
mOuterContext = this;
@@ -2313,10 +2341,10 @@
// location for application.
if ((flags & (Context.CONTEXT_CREDENTIAL_PROTECTED_STORAGE
| Context.CONTEXT_DEVICE_PROTECTED_STORAGE)) == 0) {
- final File dataDir = loadedApk.getDataDirFile();
- if (Objects.equals(dataDir, loadedApk.getCredentialProtectedDataDirFile())) {
+ final File dataDir = packageInfo.getDataDirFile();
+ if (Objects.equals(dataDir, packageInfo.getCredentialProtectedDataDirFile())) {
flags |= Context.CONTEXT_CREDENTIAL_PROTECTED_STORAGE;
- } else if (Objects.equals(dataDir, loadedApk.getDeviceProtectedDataDirFile())) {
+ } else if (Objects.equals(dataDir, packageInfo.getDeviceProtectedDataDirFile())) {
flags |= Context.CONTEXT_DEVICE_PROTECTED_STORAGE;
}
}
@@ -2330,7 +2358,7 @@
}
mUser = user;
- mLoadedApk = loadedApk;
+ mPackageInfo = packageInfo;
mSplitName = splitName;
mClassLoader = classLoader;
mResourcesManager = ResourcesManager.getInstance();
@@ -2341,8 +2369,8 @@
setResources(container.mResources);
mDisplay = container.mDisplay;
} else {
- mBasePackageName = loadedApk.mPackageName;
- ApplicationInfo ainfo = loadedApk.getApplicationInfo();
+ mBasePackageName = packageInfo.mPackageName;
+ ApplicationInfo ainfo = packageInfo.getApplicationInfo();
if (ainfo.uid == Process.SYSTEM_UID && ainfo.uid != Process.myUid()) {
// Special case: system components allow themselves to be loaded in to other
// processes. For purposes of app ops, we must then consider the context as
@@ -2365,7 +2393,7 @@
}
void installSystemApplicationInfo(ApplicationInfo info, ClassLoader classLoader) {
- mLoadedApk.installSystemApplicationInfo(info, classLoader);
+ mPackageInfo.installSystemApplicationInfo(info, classLoader);
}
final void scheduleFinalCleanup(String who, String what) {
@@ -2374,7 +2402,7 @@
final void performFinalCleanup(String who, String what) {
//Log.i(TAG, "Cleanup up context: " + this);
- mLoadedApk.removeContextRegistrations(getOuterContext(), who, what);
+ mPackageInfo.removeContextRegistrations(getOuterContext(), who, what);
}
final Context getReceiverRestrictedContext() {
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java
index b162cb1..2b648ea 100644
--- a/core/java/android/app/Dialog.java
+++ b/core/java/android/app/Dialog.java
@@ -16,10 +16,6 @@
package android.app;
-import com.android.internal.R;
-import com.android.internal.app.WindowDecorActionBar;
-import com.android.internal.policy.PhoneWindow;
-
import android.annotation.CallSuper;
import android.annotation.DrawableRes;
import android.annotation.IdRes;
@@ -32,8 +28,8 @@
import android.content.Context;
import android.content.ContextWrapper;
import android.content.DialogInterface;
-import android.content.res.Configuration;
import android.content.pm.ApplicationInfo;
+import android.content.res.Configuration;
import android.content.res.ResourceId;
import android.graphics.drawable.Drawable;
import android.net.Uri;
@@ -62,6 +58,10 @@
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
+import com.android.internal.R;
+import com.android.internal.app.WindowDecorActionBar;
+import com.android.internal.policy.PhoneWindow;
+
import java.lang.ref.WeakReference;
/**
@@ -512,6 +512,7 @@
* @param id the ID to search for
* @return a view with given ID if found, or {@code null} otherwise
* @see View#findViewById(int)
+ * @see Dialog#requireViewById(int)
*/
@Nullable
public <T extends View> T findViewById(@IdRes int id) {
@@ -519,6 +520,30 @@
}
/**
+ * Finds the first descendant view with the given ID or throws an IllegalArgumentException if
+ * the ID is invalid (< 0), there is no matching view in the hierarchy, or the dialog has not
+ * yet been fully created (for example, via {@link #show()} or {@link #create()}).
+ * <p>
+ * <strong>Note:</strong> In most cases -- depending on compiler support --
+ * the resulting view is automatically cast to the target class type. If
+ * the target class type is unconstrained, an explicit cast may be
+ * necessary.
+ *
+ * @param id the ID to search for
+ * @return a view with given ID
+ * @see View#requireViewById(int)
+ * @see Dialog#findViewById(int)
+ */
+ @NonNull
+ public final <T extends View> T requireViewById(@IdRes int id) {
+ T view = findViewById(id);
+ if (view == null) {
+ throw new IllegalArgumentException("ID does not reference a View inside this Dialog");
+ }
+ return view;
+ }
+
+ /**
* Set the screen content from a layout resource. The resource will be
* inflated, adding all top-level views to the screen.
*
diff --git a/core/java/android/app/EphemeralResolverService.java b/core/java/android/app/EphemeralResolverService.java
index 427a0386..d1c2441 100644
--- a/core/java/android/app/EphemeralResolverService.java
+++ b/core/java/android/app/EphemeralResolverService.java
@@ -17,20 +17,10 @@
package android.app;
import android.annotation.SystemApi;
-import android.app.Service;
-import android.app.InstantAppResolverService.InstantAppResolutionCallback;
-import android.content.Context;
-import android.content.Intent;
import android.content.pm.EphemeralResolveInfo;
import android.content.pm.InstantAppResolveInfo;
import android.os.Build;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.IRemoteCallback;
import android.os.Looper;
-import android.os.Message;
-import android.os.RemoteException;
import android.util.Log;
import java.util.ArrayList;
@@ -85,7 +75,6 @@
return super.getLooper();
}
- @Override
void _onGetInstantAppResolveInfo(int[] digestPrefix, String token,
InstantAppResolutionCallback callback) {
if (DEBUG_EPHEMERAL) {
@@ -101,7 +90,6 @@
callback.onInstantAppResolveInfo(resultList);
}
- @Override
void _onGetInstantAppIntentFilter(int[] digestPrefix, String token,
String hostName, InstantAppResolutionCallback callback) {
if (DEBUG_EPHEMERAL) {
diff --git a/core/proto/android/os/batterymanager.proto b/core/java/android/app/GrantedUriPermission.aidl
similarity index 64%
copy from core/proto/android/os/batterymanager.proto
copy to core/java/android/app/GrantedUriPermission.aidl
index 669bf2d..2734af0 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/core/java/android/app/GrantedUriPermission.aidl
@@ -1,5 +1,5 @@
/*
- * 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,16 +14,7 @@
* limitations under the License.
*/
-syntax = "proto2";
-package android.os;
+package android.app;
-option java_multiple_files = true;
-
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
-}
+/** @hide */
+parcelable GrantedUriPermission;
\ No newline at end of file
diff --git a/core/java/android/app/GrantedUriPermission.java b/core/java/android/app/GrantedUriPermission.java
new file mode 100644
index 0000000..9e84fe1
--- /dev/null
+++ b/core/java/android/app/GrantedUriPermission.java
@@ -0,0 +1,74 @@
+/*
+ * 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 android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.UriPermission;
+import android.net.Uri;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Represents an {@link UriPermission} granted to a package.
+ *
+ * {@hide}
+ */
+public class GrantedUriPermission implements Parcelable {
+
+ public final Uri uri;
+ public final String packageName;
+
+ public GrantedUriPermission(@NonNull Uri uri, @Nullable String packageName) {
+ this.uri = uri;
+ this.packageName = packageName;
+ }
+
+ @Override
+ public String toString() {
+ return packageName + ":" + uri;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeParcelable(uri, flags);
+ out.writeString(packageName);
+ }
+
+ public static final Parcelable.Creator<GrantedUriPermission> CREATOR =
+ new Parcelable.Creator<GrantedUriPermission>() {
+ @Override
+ public GrantedUriPermission createFromParcel(Parcel in) {
+ return new GrantedUriPermission(in);
+ }
+
+ @Override
+ public GrantedUriPermission[] newArray(int size) {
+ return new GrantedUriPermission[size];
+ }
+ };
+
+ private GrantedUriPermission(Parcel in) {
+ uri = in.readParcelable(null);
+ packageName = in.readString();
+ }
+}
diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl
index 04ee77d..02be002 100644
--- a/core/java/android/app/IActivityManager.aidl
+++ b/core/java/android/app/IActivityManager.aidl
@@ -19,6 +19,7 @@
import android.app.ActivityManager;
import android.app.ApplicationErrorReport;
import android.app.ContentProviderHolder;
+import android.app.GrantedUriPermission;
import android.app.IApplicationThread;
import android.app.IActivityController;
import android.app.IAppTask;
@@ -65,6 +66,7 @@
import android.os.StrictMode;
import android.os.WorkSource;
import android.service.voice.IVoiceInteractionSession;
+import android.view.IRecentsAnimationRunner;
import android.view.RemoteAnimationDefinition;
import com.android.internal.app.IVoiceInteractor;
import com.android.internal.os.IResultReceiver;
@@ -145,6 +147,7 @@
void publishService(in IBinder token, in Intent intent, in IBinder service);
void activityResumed(in IBinder token);
void setDebugApp(in String packageName, boolean waitForDebugger, boolean persistent);
+ void setAgentApp(in String packageName, @nullable String agent);
void setAlwaysFinish(boolean enabled);
boolean startInstrumentation(in ComponentName className, in String profileFile,
int flags, in Bundle arguments, in IInstrumentationWatcher watcher,
@@ -357,6 +360,20 @@
*/
void requestTelephonyBugReport(in String shareTitle, in String shareDescription);
+ /**
+ * Deprecated - This method is only used by Wifi, and it will soon be replaced by a proper
+ * bug report API.
+ *
+ * Takes a minimal bugreport of Wifi-related state.
+ *
+ * @param shareTitle should be a valid legible string less than 50 chars long
+ * @param shareDescription should be less than 91 bytes when encoded into UTF-8 format
+ *
+ * @throws IllegalArgumentException if shareTitle or shareDescription is too big or if the
+ * parameters cannot be encoding to an UTF-8 charset.
+ */
+ void requestWifiBugReport(in String shareTitle, in String shareDescription);
+
long inputDispatchingTimedOut(int pid, boolean aboveSystem, in String reason);
void clearPendingBackup();
Intent getIntentForIntentSender(in IIntentSender sender);
@@ -427,8 +444,9 @@
in Bundle options, int userId);
int startAssistantActivity(in String callingPackage, int callingPid, int callingUid,
in Intent intent, in String resolvedType, in Bundle options, int userId);
- int startRecentsActivity(in IAssistDataReceiver assistDataReceiver, in Bundle options,
- in Bundle activityOptions, int userId);
+ void startRecentsActivity(in Intent intent, in IAssistDataReceiver assistDataReceiver,
+ in IRecentsAnimationRunner recentsAnimationRunner);
+ void cancelRecentsAnimation();
int startActivityFromRecents(int taskId, in Bundle options);
Bundle getActivityOptions(in IBinder token);
List<IBinder> getAppTasks(in String callingPackage);
@@ -554,7 +572,7 @@
in Rect tempDockedTaskInsetBounds,
in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds);
int setVrMode(in IBinder token, boolean enabled, in ComponentName packageName);
- // Gets the URI permissions granted to an arbitrary package.
+ // Gets the URI permissions granted to an arbitrary package (or all packages if null)
// NOTE: this is different from getPersistedUriPermissions(), which returns the URIs the package
// granted to another packages (instead of those granted to it).
ParceledListSlice getGrantedUriPermissions(in String packageName, int userId);
diff --git a/core/java/android/app/IBackupAgent.aidl b/core/java/android/app/IBackupAgent.aidl
index 4a85efd..3aeef14 100644
--- a/core/java/android/app/IBackupAgent.aidl
+++ b/core/java/android/app/IBackupAgent.aidl
@@ -49,11 +49,13 @@
*
* @param callbackBinder Binder on which to indicate operation completion,
* passed here as a convenience to the agent.
+ *
+ * @param transportFlags Flags with additional information about the transport.
*/
void doBackup(in ParcelFileDescriptor oldState,
in ParcelFileDescriptor data,
in ParcelFileDescriptor newState,
- long quotaBytes, int token, IBackupManager callbackBinder);
+ long quotaBytes, int token, IBackupManager callbackBinder, int transportFlags);
/**
* Restore an entire data snapshot to the application.
@@ -100,13 +102,17 @@
*
* @param callbackBinder Binder on which to indicate operation completion,
* passed here as a convenience to the agent.
+ *
+ * @param transportFlags Flags with additional information about transport.
*/
- void doFullBackup(in ParcelFileDescriptor data, long quotaBytes, int token, IBackupManager callbackBinder);
+ void doFullBackup(in ParcelFileDescriptor data, long quotaBytes, int token,
+ IBackupManager callbackBinder, int transportFlags);
/**
* Estimate how much data a full backup will deliver
*/
- void doMeasureFullBackup(long quotaBytes, int token, IBackupManager callbackBinder);
+ void doMeasureFullBackup(long quotaBytes, int token, IBackupManager callbackBinder,
+ int transportFlags);
/**
* Tells the application agent that the backup data size exceeded current transport quota.
diff --git a/core/java/android/app/IInstantAppResolver.aidl b/core/java/android/app/IInstantAppResolver.aidl
index 805d8c0..ae20057 100644
--- a/core/java/android/app/IInstantAppResolver.aidl
+++ b/core/java/android/app/IInstantAppResolver.aidl
@@ -16,13 +16,15 @@
package android.app;
+import android.content.Intent;
import android.os.IRemoteCallback;
/** @hide */
oneway interface IInstantAppResolver {
- void getInstantAppResolveInfoList(in int[] digestPrefix,
+ void getInstantAppResolveInfoList(in Intent sanitizedIntent, in int[] hostDigestPrefix,
String token, int sequence, IRemoteCallback callback);
- void getInstantAppIntentFilterList(in int[] digestPrefix,
- String token, String hostName, IRemoteCallback callback);
+ void getInstantAppIntentFilterList(in Intent sanitizedIntent, in int[] hostDigestPrefix,
+ String token, IRemoteCallback callback);
+
}
diff --git a/core/java/android/app/InstantAppResolverService.java b/core/java/android/app/InstantAppResolverService.java
index c5dc86c..89aff36 100644
--- a/core/java/android/app/InstantAppResolverService.java
+++ b/core/java/android/app/InstantAppResolverService.java
@@ -17,7 +17,6 @@
package android.app;
import android.annotation.SystemApi;
-import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.content.pm.InstantAppResolveInfo;
@@ -35,6 +34,7 @@
import com.android.internal.os.SomeArgs;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
/**
@@ -53,23 +53,65 @@
Handler mHandler;
/**
- * Called to retrieve resolve info for instant applications.
+ * Called to retrieve resolve info for instant applications immediately.
*
* @param digestPrefix The hash prefix of the instant app's domain.
+ * @deprecated should implement {@link #onGetInstantAppResolveInfo(Intent, int[], String,
+ * InstantAppResolutionCallback)}
*/
+ @Deprecated
public void onGetInstantAppResolveInfo(
int digestPrefix[], String token, InstantAppResolutionCallback callback) {
throw new IllegalStateException("Must define");
}
/**
- * Called to retrieve intent filters for instant applications.
+ * Called to retrieve intent filters for instant applications from potentially expensive
+ * sources.
*
* @param digestPrefix The hash prefix of the instant app's domain.
+ * @deprecated should implement {@link #onGetInstantAppIntentFilter(Intent, int[], String,
+ * InstantAppResolutionCallback)}
*/
+ @Deprecated
public void onGetInstantAppIntentFilter(
int digestPrefix[], String token, InstantAppResolutionCallback callback) {
- throw new IllegalStateException("Must define");
+ throw new IllegalStateException("Must define onGetInstantAppIntentFilter");
+ }
+
+ /**
+ * Called to retrieve resolve info for instant applications immediately.
+ *
+ * @param sanitizedIntent The sanitized {@link Intent} used for resolution.
+ * @param hostDigestPrefix The hash prefix of the instant app's domain.
+ */
+ public void onGetInstantAppResolveInfo(Intent sanitizedIntent, int[] hostDigestPrefix,
+ String token, InstantAppResolutionCallback callback) {
+ // if not overridden, forward to old methods and filter out non-web intents
+ if (sanitizedIntent.isBrowsableWebIntent()) {
+ onGetInstantAppResolveInfo(hostDigestPrefix, token, callback);
+ } else {
+ callback.onInstantAppResolveInfo(Collections.emptyList());
+ }
+ }
+
+ /**
+ * Called to retrieve intent filters for instant applications from potentially expensive
+ * sources.
+ *
+ * @param sanitizedIntent The sanitized {@link Intent} used for resolution.
+ * @param hostDigestPrefix The hash prefix of the instant app's domain or null if no host is
+ * defined.
+ */
+ public void onGetInstantAppIntentFilter(Intent sanitizedIntent, int[] hostDigestPrefix,
+ String token, InstantAppResolutionCallback callback) {
+ Log.e(TAG, "New onGetInstantAppIntentFilter is not overridden");
+ // if not overridden, forward to old methods and filter out non-web intents
+ if (sanitizedIntent.isBrowsableWebIntent()) {
+ onGetInstantAppIntentFilter(hostDigestPrefix, token, callback);
+ } else {
+ callback.onInstantAppResolveInfo(Collections.emptyList());
+ }
}
/**
@@ -89,8 +131,8 @@
public final IBinder onBind(Intent intent) {
return new IInstantAppResolver.Stub() {
@Override
- public void getInstantAppResolveInfoList(
- int digestPrefix[], String token, int sequence, IRemoteCallback callback) {
+ public void getInstantAppResolveInfoList(Intent sanitizedIntent, int[] digestPrefix,
+ String token, int sequence, IRemoteCallback callback) {
if (DEBUG_EPHEMERAL) {
Slog.v(TAG, "[" + token + "] Phase1 called; posting");
}
@@ -98,14 +140,14 @@
args.arg1 = callback;
args.arg2 = digestPrefix;
args.arg3 = token;
- mHandler.obtainMessage(
- ServiceHandler.MSG_GET_INSTANT_APP_RESOLVE_INFO, sequence, 0, args)
- .sendToTarget();
+ args.arg4 = sanitizedIntent;
+ mHandler.obtainMessage(ServiceHandler.MSG_GET_INSTANT_APP_RESOLVE_INFO,
+ sequence, 0, args).sendToTarget();
}
@Override
- public void getInstantAppIntentFilterList(
- int digestPrefix[], String token, String hostName, IRemoteCallback callback) {
+ public void getInstantAppIntentFilterList(Intent sanitizedIntent,
+ int[] digestPrefix, String token, IRemoteCallback callback) {
if (DEBUG_EPHEMERAL) {
Slog.v(TAG, "[" + token + "] Phase2 called; posting");
}
@@ -113,9 +155,9 @@
args.arg1 = callback;
args.arg2 = digestPrefix;
args.arg3 = token;
- args.arg4 = hostName;
- mHandler.obtainMessage(
- ServiceHandler.MSG_GET_INSTANT_APP_INTENT_FILTER, callback).sendToTarget();
+ args.arg4 = sanitizedIntent;
+ mHandler.obtainMessage(ServiceHandler.MSG_GET_INSTANT_APP_INTENT_FILTER,
+ callback).sendToTarget();
}
};
}
@@ -142,29 +184,9 @@
}
}
- @Deprecated
- void _onGetInstantAppResolveInfo(int[] digestPrefix, String token,
- InstantAppResolutionCallback callback) {
- if (DEBUG_EPHEMERAL) {
- Slog.d(TAG, "[" + token + "] Phase1 request;"
- + " prefix: " + Arrays.toString(digestPrefix));
- }
- onGetInstantAppResolveInfo(digestPrefix, token, callback);
- }
- @Deprecated
- void _onGetInstantAppIntentFilter(int digestPrefix[], String token, String hostName,
- InstantAppResolutionCallback callback) {
- if (DEBUG_EPHEMERAL) {
- Slog.d(TAG, "[" + token + "] Phase2 request;"
- + " prefix: " + Arrays.toString(digestPrefix));
- }
- onGetInstantAppIntentFilter(digestPrefix, token, callback);
- }
-
private final class ServiceHandler extends Handler {
public static final int MSG_GET_INSTANT_APP_RESOLVE_INFO = 1;
public static final int MSG_GET_INSTANT_APP_INTENT_FILTER = 2;
-
public ServiceHandler(Looper looper) {
super(looper, null /*callback*/, true /*async*/);
}
@@ -179,9 +201,13 @@
final IRemoteCallback callback = (IRemoteCallback) args.arg1;
final int[] digestPrefix = (int[]) args.arg2;
final String token = (String) args.arg3;
+ final Intent intent = (Intent) args.arg4;
final int sequence = message.arg1;
- _onGetInstantAppResolveInfo(
- digestPrefix, token,
+ if (DEBUG_EPHEMERAL) {
+ Slog.d(TAG, "[" + token + "] Phase1 request;"
+ + " prefix: " + Arrays.toString(digestPrefix));
+ }
+ onGetInstantAppResolveInfo(intent, digestPrefix, token,
new InstantAppResolutionCallback(sequence, callback));
} break;
@@ -190,9 +216,12 @@
final IRemoteCallback callback = (IRemoteCallback) args.arg1;
final int[] digestPrefix = (int[]) args.arg2;
final String token = (String) args.arg3;
- final String hostName = (String) args.arg4;
- _onGetInstantAppIntentFilter(
- digestPrefix, token, hostName,
+ final Intent intent = (Intent) args.arg4;
+ if (DEBUG_EPHEMERAL) {
+ Slog.d(TAG, "[" + token + "] Phase2 request;"
+ + " prefix: " + Arrays.toString(digestPrefix));
+ }
+ onGetInstantAppIntentFilter(intent, digestPrefix, token,
new InstantAppResolutionCallback(-1 /*sequence*/, callback));
} break;
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
index c5a58f2..67f5a2e 100644
--- a/core/java/android/app/Instrumentation.java
+++ b/core/java/android/app/Instrumentation.java
@@ -1216,10 +1216,10 @@
+ " disabling AppComponentFactory", new Throwable());
return AppComponentFactory.DEFAULT;
}
- LoadedApk loadedApk = mThread.peekLoadedApk(pkg, true);
+ LoadedApk apk = mThread.peekPackageInfo(pkg, true);
// This is in the case of starting up "android".
- if (loadedApk == null) loadedApk = mThread.getSystemContext().mLoadedApk;
- return loadedApk.getAppFactory();
+ if (apk == null) apk = mThread.getSystemContext().mPackageInfo;
+ return apk.getAppFactory();
}
private void prePerformCreate(Activity activity) {
@@ -1688,9 +1688,13 @@
* {@link ActivityMonitor} objects only match against the first activity in
* the array.
*
+ * @return The corresponding flag {@link ActivityManager#START_CANCELED},
+ * {@link ActivityManager#START_SUCCESS} etc. indicating whether the launch was
+ * successful.
+ *
* {@hide}
*/
- public void execStartActivitiesAsUser(Context who, IBinder contextThread,
+ public int execStartActivitiesAsUser(Context who, IBinder contextThread,
IBinder token, Activity target, Intent[] intents, Bundle options,
int userId) {
IApplicationThread whoThread = (IApplicationThread) contextThread;
@@ -1705,11 +1709,11 @@
}
if (result != null) {
am.mHits++;
- return;
+ return ActivityManager.START_CANCELED;
} else if (am.match(who, null, intents[0])) {
am.mHits++;
if (am.isBlocking()) {
- return;
+ return ActivityManager.START_CANCELED;
}
break;
}
@@ -1727,6 +1731,7 @@
.startActivities(whoThread, who.getBasePackageName(), intents, resolvedTypes,
token, options, userId);
checkStartActivityResult(result, intents[0]);
+ return result;
} catch (RemoteException e) {
throw new RuntimeException("Failure from system", e);
}
diff --git a/core/java/android/app/KeyguardManager.java b/core/java/android/app/KeyguardManager.java
index 024dbcb..553099f 100644
--- a/core/java/android/app/KeyguardManager.java
+++ b/core/java/android/app/KeyguardManager.java
@@ -167,10 +167,11 @@
* clicking this button, the activity returns
* {@link #RESULT_ALTERNATE}
*
- * @return the intent for launching the activity or null if the credential of the previous
- * owner can not be verified (e.g. because there was none, or the device does not support
- * verifying credentials after a factory reset, or device setup has already been completed).
- *
+ * @return the intent for launching the activity or null if the previous owner of the device
+ * did not set a credential.
+ * @throws UnsupportedOperationException if the device does not support factory reset
+ * credentials
+ * @throws IllegalStateException if the device has already been provisioned
* @hide
*/
@SystemApi
@@ -178,14 +179,14 @@
CharSequence title, CharSequence description, CharSequence alternateButtonLabel) {
if (!LockPatternUtils.frpCredentialEnabled(mContext)) {
Log.w(TAG, "Factory reset credentials not supported.");
- return null;
+ throw new UnsupportedOperationException("not supported on this device");
}
// Cannot verify credential if the device is provisioned
if (Settings.Global.getInt(mContext.getContentResolver(),
Settings.Global.DEVICE_PROVISIONED, 0) != 0) {
Log.e(TAG, "Factory reset credential cannot be verified after provisioning.");
- return null;
+ throw new IllegalStateException("must not be provisioned yet");
}
// Make sure we have a credential
@@ -194,8 +195,10 @@
ServiceManager.getService(Context.PERSISTENT_DATA_BLOCK_SERVICE));
if (pdb == null) {
Log.e(TAG, "No persistent data block service");
- return null;
+ throw new UnsupportedOperationException("not supported on this device");
}
+ // The following will throw an UnsupportedOperationException if the device does not
+ // support factory reset credentials (or something went wrong retrieving it).
if (!pdb.hasFrpCredentialHandle()) {
Log.i(TAG, "The persistent data block does not have a factory reset credential.");
return null;
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index 26f4980..ea5932c 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -28,14 +28,13 @@
import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.pm.dex.ArtManager;
import android.content.pm.split.SplitDependencyLoader;
import android.content.res.AssetManager;
import android.content.res.CompatibilityInfo;
-import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build;
import android.os.Bundle;
-import android.os.Environment;
import android.os.FileUtils;
import android.os.Handler;
import android.os.IBinder;
@@ -49,13 +48,15 @@
import android.util.AndroidRuntimeException;
import android.util.ArrayMap;
import android.util.Log;
-import android.util.LogPrinter;
import android.util.Slog;
import android.util.SparseArray;
import android.view.Display;
import android.view.DisplayAdjustments;
+
import com.android.internal.util.ArrayUtils;
+
import dalvik.system.VMRuntime;
+
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -749,13 +750,6 @@
}
}
- // Keep in sync with installd (frameworks/native/cmds/installd/commands.cpp).
- private static File getPrimaryProfileFile(String packageName) {
- File profileDir = Environment.getDataProfilesDePackageDirectory(
- UserHandle.myUserId(), packageName);
- return new File(profileDir, "primary.prof");
- }
-
private void setupJitProfileSupport() {
if (!SystemProperties.getBoolean("dalvik.vm.usejitprofiles", false)) {
return;
@@ -783,10 +777,12 @@
return;
}
- final File profileFile = getPrimaryProfileFile(mPackageName);
-
- VMRuntime.registerAppInfo(profileFile.getPath(),
- codePaths.toArray(new String[codePaths.size()]));
+ for (int i = codePaths.size() - 1; i >= 0; i--) {
+ String splitName = i == 0 ? null : mApplicationInfo.splitNames[i - 1];
+ String profileFile = ArtManager.getCurrentProfilePath(
+ mPackageName, UserHandle.myUserId(), splitName);
+ VMRuntime.registerAppInfo(profileFile, new String[] {codePaths.get(i)});
+ }
// Register the app data directory with the reporter. It will
// help deciding whether or not a dex file is the primary apk or a
@@ -967,78 +963,14 @@
throw new AssertionError("null split not found");
}
- mResources = ResourcesManager.getInstance().getResources(
- null,
- mResDir,
- splitPaths,
- mOverlayDirs,
- mApplicationInfo.sharedLibraryFiles,
- Display.DEFAULT_DISPLAY,
- null,
- getCompatibilityInfo(),
+ mResources = ResourcesManager.getInstance().getResources(null, mResDir,
+ splitPaths, mOverlayDirs, mApplicationInfo.sharedLibraryFiles,
+ Display.DEFAULT_DISPLAY, null, getCompatibilityInfo(),
getClassLoader());
}
return mResources;
}
- public Resources getOrCreateResourcesForSplit(@NonNull String splitName,
- @Nullable IBinder activityToken, int displayId) throws NameNotFoundException {
- return ResourcesManager.getInstance().getResources(
- activityToken,
- mResDir,
- getSplitPaths(splitName),
- mOverlayDirs,
- mApplicationInfo.sharedLibraryFiles,
- displayId,
- null,
- getCompatibilityInfo(),
- getSplitClassLoader(splitName));
- }
-
- /**
- * Creates the top level resources for the given package. Will return an existing
- * Resources if one has already been created.
- */
- public Resources getOrCreateTopLevelResources(@NonNull ApplicationInfo appInfo) {
- // Request for this app, short circuit
- if (appInfo.uid == Process.myUid()) {
- return getResources();
- }
-
- // Get resources for a different package
- return ResourcesManager.getInstance().getResources(
- null,
- appInfo.publicSourceDir,
- appInfo.splitPublicSourceDirs,
- appInfo.resourceDirs,
- appInfo.sharedLibraryFiles,
- Display.DEFAULT_DISPLAY,
- null,
- getCompatibilityInfo(),
- getClassLoader());
- }
-
- public Resources createResources(IBinder activityToken, String splitName,
- int displayId, Configuration overrideConfig, CompatibilityInfo compatInfo) {
- final String[] splitResDirs;
- final ClassLoader classLoader;
- try {
- splitResDirs = getSplitPaths(splitName);
- classLoader = getSplitClassLoader(splitName);
- } catch (NameNotFoundException e) {
- throw new RuntimeException(e);
- }
- return ResourcesManager.getInstance().getResources(activityToken,
- mResDir,
- splitResDirs,
- mOverlayDirs,
- mApplicationInfo.sharedLibraryFiles,
- displayId,
- overrideConfig,
- compatInfo,
- classLoader);
- }
-
public Application makeApplication(boolean forceDefaultAppClass,
Instrumentation instrumentation) {
if (mApplication != null) {
diff --git a/core/java/android/app/LocalActivityManager.java b/core/java/android/app/LocalActivityManager.java
index 998ac5f..c34f4d9 100644
--- a/core/java/android/app/LocalActivityManager.java
+++ b/core/java/android/app/LocalActivityManager.java
@@ -16,6 +16,8 @@
package android.app;
+import android.app.ActivityThread.ActivityClientRecord;
+import android.app.servertransaction.PendingTransactionActions;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Binder;
@@ -141,6 +143,21 @@
}
r.window = r.activity.getWindow();
r.instanceState = null;
+
+ final ActivityClientRecord clientRecord = mActivityThread.getActivityClient(r);
+ final PendingTransactionActions pendingActions;
+
+ if (!r.activity.mFinished) {
+ // This matches pending actions set in ActivityThread#handleLaunchActivity
+ pendingActions = new PendingTransactionActions();
+ pendingActions.setOldState(clientRecord.state);
+ pendingActions.setRestoreInstanceState(true);
+ pendingActions.setCallOnPostCreate(true);
+ } else {
+ pendingActions = null;
+ }
+
+ mActivityThread.handleStartActivity(clientRecord, pendingActions);
r.curState = STARTED;
if (desiredState == RESUMED) {
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index d6fddfc..6e40986 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -200,6 +200,16 @@
*/
private static final int MAX_REPLY_HISTORY = 5;
+
+ /**
+ * If the notification contained an unsent draft for a RemoteInput when the user clicked on it,
+ * we're adding the draft as a String extra to the {@link #contentIntent} using this key.
+ *
+ * <p>Apps may use this extra to prepopulate text fields in the app, where the user usually
+ * sends messages.</p>
+ */
+ public static final String EXTRA_REMOTE_INPUT_DRAFT = "android.remoteInputDraft";
+
/**
* A timestamp related to this notification, in milliseconds since the epoch.
*
@@ -483,7 +493,7 @@
* </ul>
* <p>
* Since hardware varies, you are not guaranteed that any of the values
- * you pass are honored exactly. Use the system defaults (TODO) if possible
+ * you pass are honored exactly. Use the system defaults if possible
* because they will be set to values that work on any given hardware.
* <p>
* The alpha channel must be set for forward compatibility.
diff --git a/core/java/android/app/NotificationChannel.java b/core/java/android/app/NotificationChannel.java
index c06ad3f..30f2697 100644
--- a/core/java/android/app/NotificationChannel.java
+++ b/core/java/android/app/NotificationChannel.java
@@ -32,8 +32,6 @@
import com.android.internal.util.Preconditions;
-import com.android.internal.util.Preconditions;
-
import org.json.JSONException;
import org.json.JSONObject;
import org.xmlpull.v1.XmlPullParser;
@@ -936,7 +934,9 @@
}
/** @hide */
- public void toProto(ProtoOutputStream proto) {
+ public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ final long token = proto.start(fieldId);
+
proto.write(NotificationChannelProto.ID, mId);
proto.write(NotificationChannelProto.NAME, mName);
proto.write(NotificationChannelProto.DESCRIPTION, mDesc);
@@ -959,10 +959,10 @@
proto.write(NotificationChannelProto.IS_DELETED, mDeleted);
proto.write(NotificationChannelProto.GROUP, mGroup);
if (mAudioAttributes != null) {
- long aToken = proto.start(NotificationChannelProto.AUDIO_ATTRIBUTES);
- mAudioAttributes.toProto(proto);
- proto.end(aToken);
+ mAudioAttributes.writeToProto(proto, NotificationChannelProto.AUDIO_ATTRIBUTES);
}
proto.write(NotificationChannelProto.IS_BLOCKABLE_SYSTEM, mBlockableSystem);
+
+ proto.end(token);
}
}
diff --git a/core/java/android/app/NotificationChannelGroup.java b/core/java/android/app/NotificationChannelGroup.java
index 5cb7fb7..16166f7 100644
--- a/core/java/android/app/NotificationChannelGroup.java
+++ b/core/java/android/app/NotificationChannelGroup.java
@@ -298,13 +298,17 @@
}
/** @hide */
- public void toProto(ProtoOutputStream proto) {
+ public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ final long token = proto.start(fieldId);
+
proto.write(NotificationChannelGroupProto.ID, mId);
proto.write(NotificationChannelGroupProto.NAME, mName.toString());
proto.write(NotificationChannelGroupProto.DESCRIPTION, mDescription);
proto.write(NotificationChannelGroupProto.IS_BLOCKED, mBlocked);
for (NotificationChannel channel : mChannels) {
- channel.toProto(proto);
+ channel.writeToProto(proto, NotificationChannelGroupProto.CHANNELS);
}
+
+ proto.end(token);
}
}
diff --git a/core/java/android/app/NotificationManager.java b/core/java/android/app/NotificationManager.java
index 659cf16..49c03ab 100644
--- a/core/java/android/app/NotificationManager.java
+++ b/core/java/android/app/NotificationManager.java
@@ -93,6 +93,18 @@
private static boolean localLOGV = false;
/**
+ * Intent that is broadcast when an application is blocked or unblocked.
+ *
+ * This broadcast is only sent to the app whose block state has changed.
+ *
+ * Input: nothing
+ * Output: nothing
+ */
+ @SdkConstant(SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_APP_BLOCK_STATE_CHANGED =
+ "android.app.action.APP_BLOCK_STATE_CHANGED";
+
+ /**
* Intent that is broadcast when a {@link NotificationChannel} is blocked
* (when {@link NotificationChannel#getImportance()} is {@link #IMPORTANCE_NONE}) or unblocked
* (when {@link NotificationChannel#getImportance()} is anything other than
@@ -1133,7 +1145,7 @@
}
/** @hide */
- public void toProto(ProtoOutputStream proto, long fieldId) {
+ public void writeToProto(ProtoOutputStream proto, long fieldId) {
final long pToken = proto.start(fieldId);
bitwiseToProtoEnum(proto, PolicyProto.PRIORITY_CATEGORIES, priorityCategories);
diff --git a/core/java/android/app/ProfilerInfo.java b/core/java/android/app/ProfilerInfo.java
index a295c4c..6fbe9c6 100644
--- a/core/java/android/app/ProfilerInfo.java
+++ b/core/java/android/app/ProfilerInfo.java
@@ -20,6 +20,7 @@
import android.os.ParcelFileDescriptor;
import android.os.Parcelable;
import android.util.Slog;
+import android.util.proto.ProtoOutputStream;
import java.io.IOException;
import java.util.Objects;
@@ -86,6 +87,15 @@
}
/**
+ * Return a new ProfilerInfo instance, with fields populated from this object,
+ * and {@link agent} and {@link attachAgentDuringBind} as given.
+ */
+ public ProfilerInfo setAgent(String agent, boolean attachAgentDuringBind) {
+ return new ProfilerInfo(this.profileFile, this.profileFd, this.samplingInterval,
+ this.autoStopProfiler, this.streamingOutput, agent, attachAgentDuringBind);
+ }
+
+ /**
* Close profileFd, if it is open. The field will be null after a call to this function.
*/
public void closeFd() {
@@ -124,6 +134,20 @@
out.writeBoolean(attachAgentDuringBind);
}
+ /** @hide */
+ public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ final long token = proto.start(fieldId);
+ proto.write(ProfilerInfoProto.PROFILE_FILE, profileFile);
+ if (profileFd != null) {
+ proto.write(ProfilerInfoProto.PROFILE_FD, profileFd.getFd());
+ }
+ proto.write(ProfilerInfoProto.SAMPLING_INTERVAL, samplingInterval);
+ proto.write(ProfilerInfoProto.AUTO_STOP_PROFILER, autoStopProfiler);
+ proto.write(ProfilerInfoProto.STREAMING_OUTPUT, streamingOutput);
+ proto.write(ProfilerInfoProto.AGENT, agent);
+ proto.end(token);
+ }
+
public static final Parcelable.Creator<ProfilerInfo> CREATOR =
new Parcelable.Creator<ProfilerInfo>() {
@Override
diff --git a/core/java/android/app/StatsManager.java b/core/java/android/app/StatsManager.java
new file mode 100644
index 0000000..c525c89
--- /dev/null
+++ b/core/java/android/app/StatsManager.java
@@ -0,0 +1,244 @@
+/*
+ * Copyright 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 android.app;
+
+import android.Manifest;
+import android.annotation.RequiresPermission;
+import android.annotation.SystemApi;
+import android.os.IBinder;
+import android.os.IStatsManager;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.util.Slog;
+
+/**
+ * API for statsd clients to send configurations and retrieve data.
+ *
+ * @hide
+ */
+@SystemApi
+public final class StatsManager extends android.util.StatsManager { // TODO: Remove the extends.
+ IStatsManager mService;
+ private static final String TAG = "StatsManager";
+
+ /** Long extra of uid that added the relevant stats config. */
+ public static final String EXTRA_STATS_CONFIG_UID =
+ "android.app.extra.STATS_CONFIG_UID";
+ /** Long extra of the relevant stats config's configKey. */
+ public static final String EXTRA_STATS_CONFIG_KEY =
+ "android.app.extra.STATS_CONFIG_KEY";
+ /** Long extra of the relevant statsd_config.proto's Subscription.id. */
+ public static final String EXTRA_STATS_SUBSCRIPTION_ID =
+ "android.app.extra.STATS_SUBSCRIPTION_ID";
+ /** Long extra of the relevant statsd_config.proto's Subscription.rule_id. */
+ public static final String EXTRA_STATS_SUBSCRIPTION_RULE_ID =
+ "android.app.extra.STATS_SUBSCRIPTION_RULE_ID";
+ /**
+ * Extra of a {@link android.os.StatsDimensionsValue} representing sliced dimension value
+ * information.
+ */
+ public static final String EXTRA_STATS_DIMENSIONS_VALUE =
+ "android.app.extra.STATS_DIMENSIONS_VALUE";
+
+ /**
+ * Broadcast Action: Statsd has started.
+ * Configurations and PendingIntents can now be sent to it.
+ */
+ public static final String ACTION_STATSD_STARTED = "android.app.action.STATSD_STARTED";
+
+ /**
+ * Constructor for StatsManagerClient.
+ *
+ * @hide
+ */
+ public StatsManager() {
+ }
+
+ /**
+ * Clients can send a configuration and simultaneously registers the name of a broadcast
+ * receiver that listens for when it should request data.
+ *
+ * @param configKey An arbitrary integer that allows clients to track the configuration.
+ * @param config Wire-encoded StatsDConfig proto that specifies metrics (and all
+ * dependencies eg, conditions and matchers).
+ * @param pkg The package name to receive the broadcast.
+ * @param cls The name of the class that receives the broadcast.
+ * @return true if successful
+ */
+ @RequiresPermission(Manifest.permission.DUMP)
+ public boolean addConfiguration(long configKey, byte[] config, String pkg, String cls) {
+ synchronized (this) {
+ try {
+ IStatsManager service = getIStatsManagerLocked();
+ if (service == null) {
+ Slog.d(TAG, "Failed to find statsd when adding configuration");
+ return false;
+ }
+ return service.addConfiguration(configKey, config, pkg, cls);
+ } catch (RemoteException e) {
+ Slog.d(TAG, "Failed to connect to statsd when adding configuration");
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Remove a configuration from logging.
+ *
+ * @param configKey Configuration key to remove.
+ * @return true if successful
+ */
+ @RequiresPermission(Manifest.permission.DUMP)
+ public boolean removeConfiguration(long configKey) {
+ synchronized (this) {
+ try {
+ IStatsManager service = getIStatsManagerLocked();
+ if (service == null) {
+ Slog.d(TAG, "Failed to find statsd when removing configuration");
+ return false;
+ }
+ return service.removeConfiguration(configKey);
+ } catch (RemoteException e) {
+ Slog.d(TAG, "Failed to connect to statsd when removing configuration");
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Set the PendingIntent to be used when broadcasting subscriber information to the given
+ * subscriberId within the given config.
+ *
+ * <p>
+ * Suppose that the calling uid has added a config with key configKey, and that in this config
+ * it is specified that when a particular anomaly is detected, a broadcast should be sent to
+ * a BroadcastSubscriber with id subscriberId. This function links the given pendingIntent with
+ * that subscriberId (for that config), so that this pendingIntent is used to send the broadcast
+ * when the anomaly is detected.
+ *
+ * <p>
+ * When statsd sends the broadcast, the PendingIntent will used to send an intent with
+ * information of
+ * {@link #EXTRA_STATS_CONFIG_UID},
+ * {@link #EXTRA_STATS_CONFIG_KEY},
+ * {@link #EXTRA_STATS_SUBSCRIPTION_ID},
+ * {@link #EXTRA_STATS_SUBSCRIPTION_RULE_ID}, and
+ * {@link #EXTRA_STATS_DIMENSIONS_VALUE}.
+ *
+ * <p>
+ * This function can only be called by the owner (uid) of the config. It must be called each
+ * time statsd starts. The config must have been added first (via addConfiguration()).
+ *
+ * @param configKey The integer naming the config to which this subscriber is attached.
+ * @param subscriberId ID of the subscriber, as used in the config.
+ * @param pendingIntent the PendingIntent to use when broadcasting info to the subscriber
+ * associated with the given subscriberId. May be null, in which case
+ * it undoes any previous setting of this subscriberId.
+ * @return true if successful
+ */
+ @RequiresPermission(Manifest.permission.DUMP)
+ public boolean setBroadcastSubscriber(long configKey,
+ long subscriberId,
+ PendingIntent pendingIntent) {
+ synchronized (this) {
+ try {
+ IStatsManager service = getIStatsManagerLocked();
+ if (service == null) {
+ Slog.w(TAG, "Failed to find statsd when adding broadcast subscriber");
+ return false;
+ }
+ if (pendingIntent != null) {
+ // Extracts IIntentSender from the PendingIntent and turns it into an IBinder.
+ IBinder intentSender = pendingIntent.getTarget().asBinder();
+ return service.setBroadcastSubscriber(configKey, subscriberId, intentSender);
+ } else {
+ return service.unsetBroadcastSubscriber(configKey, subscriberId);
+ }
+ } catch (RemoteException e) {
+ Slog.w(TAG, "Failed to connect to statsd when adding broadcast subscriber", e);
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Clients can request data with a binder call. This getter is destructive and also clears
+ * the retrieved metrics from statsd memory.
+ *
+ * @param configKey Configuration key to retrieve data from.
+ * @return Serialized ConfigMetricsReportList proto. Returns null on failure.
+ */
+ @RequiresPermission(Manifest.permission.DUMP)
+ public byte[] getData(long configKey) {
+ synchronized (this) {
+ try {
+ IStatsManager service = getIStatsManagerLocked();
+ if (service == null) {
+ Slog.d(TAG, "Failed to find statsd when getting data");
+ return null;
+ }
+ return service.getData(configKey);
+ } catch (RemoteException e) {
+ Slog.d(TAG, "Failed to connecto statsd when getting data");
+ return null;
+ }
+ }
+ }
+
+ /**
+ * Clients can request metadata for statsd. Will contain stats across all configurations but not
+ * the actual metrics themselves (metrics must be collected via {@link #getData(String)}.
+ * This getter is not destructive and will not reset any metrics/counters.
+ *
+ * @return Serialized StatsdStatsReport proto. Returns null on failure.
+ */
+ @RequiresPermission(Manifest.permission.DUMP)
+ public byte[] getMetadata() {
+ synchronized (this) {
+ try {
+ IStatsManager service = getIStatsManagerLocked();
+ if (service == null) {
+ Slog.d(TAG, "Failed to find statsd when getting metadata");
+ return null;
+ }
+ return service.getMetadata();
+ } catch (RemoteException e) {
+ Slog.d(TAG, "Failed to connecto statsd when getting metadata");
+ return null;
+ }
+ }
+ }
+
+ private class StatsdDeathRecipient implements IBinder.DeathRecipient {
+ @Override
+ public void binderDied() {
+ synchronized (this) {
+ mService = null;
+ }
+ }
+ }
+
+ private IStatsManager getIStatsManagerLocked() throws RemoteException {
+ if (mService != null) {
+ return mService;
+ }
+ mService = IStatsManager.Stub.asInterface(ServiceManager.getService("stats"));
+ if (mService != null) {
+ mService.asBinder().linkToDeath(new StatsdDeathRecipient(), 0);
+ }
+ return mService;
+ }
+}
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index fb8d101..4310434 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -141,7 +141,6 @@
import android.telephony.euicc.EuiccCardManager;
import android.telephony.euicc.EuiccManager;
import android.util.Log;
-import android.util.StatsManager;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.WindowManager;
diff --git a/core/java/android/app/TaskStackBuilder.java b/core/java/android/app/TaskStackBuilder.java
index bab993f..ab59747 100644
--- a/core/java/android/app/TaskStackBuilder.java
+++ b/core/java/android/app/TaskStackBuilder.java
@@ -213,13 +213,13 @@
* Start the task stack constructed by this builder.
* @hide
*/
- public void startActivities(Bundle options, UserHandle userHandle) {
+ public int startActivities(Bundle options, UserHandle userHandle) {
if (mIntents.isEmpty()) {
throw new IllegalStateException(
"No intents added to TaskStackBuilder; cannot startActivities");
}
- mSourceContext.startActivitiesAsUser(getIntents(), options, userHandle);
+ return mSourceContext.startActivitiesAsUser(getIntents(), options, userHandle);
}
/**
diff --git a/core/java/android/app/UiAutomation.java b/core/java/android/app/UiAutomation.java
index ba39740..8f01685 100644
--- a/core/java/android/app/UiAutomation.java
+++ b/core/java/android/app/UiAutomation.java
@@ -24,6 +24,7 @@
import android.annotation.NonNull;
import android.annotation.TestApi;
import android.graphics.Bitmap;
+import android.graphics.Canvas;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.Region;
@@ -46,14 +47,10 @@
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.accessibility.AccessibilityWindowInfo;
import android.view.accessibility.IAccessibilityInteractionConnection;
-
-import com.android.internal.util.CollectionUtils;
-
import libcore.io.IoUtils;
import java.io.IOException;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeoutException;
@@ -583,8 +580,6 @@
// Execute the command *without* the lock being held.
command.run();
- List<AccessibilityEvent> eventsReceived = Collections.emptyList();
-
// Acquire the lock and wait for the event.
try {
// Wait for the event.
@@ -605,14 +600,14 @@
if (filter.accept(event)) {
return event;
}
- eventsReceived = CollectionUtils.add(eventsReceived, event);
+ event.recycle();
}
// Check if timed out and if not wait.
final long elapsedTimeMillis = SystemClock.uptimeMillis() - startTimeMillis;
final long remainingTimeMillis = timeoutMillis - elapsedTimeMillis;
if (remainingTimeMillis <= 0) {
throw new TimeoutException("Expected event not received within: "
- + timeoutMillis + " ms, among " + eventsReceived);
+ + timeoutMillis + " ms.");
}
synchronized (mLock) {
if (mEventQueue.isEmpty()) {
@@ -625,10 +620,6 @@
}
}
} finally {
- for (int i = 0; i < CollectionUtils.size(eventsReceived); i++) {
- AccessibilityEvent event = eventsReceived.get(i);
- event.recycle();
- }
synchronized (mLock) {
mWaitingForEventDelivery = false;
mEventQueue.clear();
diff --git a/core/java/android/app/admin/DeviceAdminInfo.java b/core/java/android/app/admin/DeviceAdminInfo.java
index 1de1d2f..ed2aaf9 100644
--- a/core/java/android/app/admin/DeviceAdminInfo.java
+++ b/core/java/android/app/admin/DeviceAdminInfo.java
@@ -75,6 +75,10 @@
*
* <p>To control this policy, the device admin must have a "limit-password"
* tag in the "uses-policies" section of its meta-data.
+ *
+ * <p>This policy is deprecated for use by a device admin. In future releases, it will
+ * only be possible for a device owner or profile owner to enforce constraints on user
+ * passwords.
*/
public static final int USES_POLICY_LIMIT_PASSWORD = 0;
@@ -136,6 +140,9 @@
*
* <p>To control this policy, the device admin must have an "expire-password"
* tag in the "uses-policies" section of its meta-data.
+ *
+ * <p>This policy is deprecated for use by a device admin. In future releases, it will
+ * only be possible for a device owner or profile owner to enforce password expiry.
*/
public static final int USES_POLICY_EXPIRE_PASSWORD = 6;
@@ -152,6 +159,9 @@
*
* <p>To control this policy, the device admin must have a "disable-camera"
* tag in the "uses-policies" section of its meta-data.
+ *
+ * <p>This policy is deprecated for use by a device admin. In future releases, it will
+ * only be possible for a device owner or profile owner to disable use of the camera.
*/
public static final int USES_POLICY_DISABLE_CAMERA = 8;
@@ -160,6 +170,10 @@
*
* <p>To control this policy, the device admin must have a "disable-keyguard-features"
* tag in the "uses-policies" section of its meta-data.
+ *
+ * <p>This policy is deprecated for use by a device admin. In future releases, it will
+ * only be possible for a device owner or profile owner to disable use of keyguard
+ * features.
*/
public static final int USES_POLICY_DISABLE_KEYGUARD_FEATURES = 9;
diff --git a/core/java/android/app/admin/DeviceAdminReceiver.java b/core/java/android/app/admin/DeviceAdminReceiver.java
index ffb3aff..28e845a 100644
--- a/core/java/android/app/admin/DeviceAdminReceiver.java
+++ b/core/java/android/app/admin/DeviceAdminReceiver.java
@@ -483,19 +483,28 @@
"android.app.action.TRANSFER_OWNERSHIP_COMPLETE";
/**
+ * Broadcast action: notify the device owner that the ownership of one of its affiliated
+ * profiles is transferred.
+ *
+ * @hide
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_AFFILIATED_PROFILE_TRANSFER_OWNERSHIP_COMPLETE =
+ "android.app.action.AFFILIATED_PROFILE_TRANSFER_OWNERSHIP_COMPLETE";
+
+ /**
* A {@link android.os.Parcelable} extra of type {@link android.os.PersistableBundle} that
* allows a mobile device management application to pass data to the management application
* instance after owner transfer.
*
- * <p>
- * If the transfer is successful, the new device owner receives the data in
+ * <p>If the transfer is successful, the new owner receives the data in
* {@link DeviceAdminReceiver#onTransferOwnershipComplete(Context, PersistableBundle)}.
* The bundle is not changed during the ownership transfer.
*
* @see DevicePolicyManager#transferOwnership(ComponentName, ComponentName, PersistableBundle)
*/
- public static final String EXTRA_TRANSFER_OWNER_ADMIN_EXTRAS_BUNDLE =
- "android.app.extra.TRANSFER_OWNER_ADMIN_EXTRAS_BUNDLE";
+ public static final String EXTRA_TRANSFER_OWNERSHIP_ADMIN_EXTRAS_BUNDLE =
+ "android.app.extra.TRANSFER_OWNERSHIP_ADMIN_EXTRAS_BUNDLE";
/**
* Name under which a device administration component indicates whether it supports transfer of
@@ -994,6 +1003,26 @@
}
/**
+ * Called on the device owner when the ownership of one of its affiliated profiles is
+ * transferred.
+ *
+ * <p>This can be used when transferring both device and profile ownership when using
+ * work profile on a fully managed device. The process would look like this:
+ * <ol>
+ * <li>Transfer profile ownership</li>
+ * <li>The device owner gets notified with this callback</li>
+ * <li>Transfer device ownership</li>
+ * <li>Both profile and device ownerships have been transferred</li>
+ * </ol>
+ *
+ * @param context the running context as per {@link #onReceive}
+ * @param user the {@link UserHandle} of the affiliated user
+ * @see DevicePolicyManager#transferOwnership(ComponentName, ComponentName, PersistableBundle)
+ */
+ public void onTransferAffiliatedProfileOwnershipComplete(Context context, UserHandle user) {
+ }
+
+ /**
* Intercept standard device administrator broadcasts. Implementations
* should not override this method; it is better to implement the
* convenience callbacks for each action.
@@ -1063,8 +1092,11 @@
onUserSwitched(context, intent, intent.getParcelableExtra(Intent.EXTRA_USER));
} else if (ACTION_TRANSFER_OWNERSHIP_COMPLETE.equals(action)) {
PersistableBundle bundle =
- intent.getParcelableExtra(EXTRA_TRANSFER_OWNER_ADMIN_EXTRAS_BUNDLE);
+ intent.getParcelableExtra(EXTRA_TRANSFER_OWNERSHIP_ADMIN_EXTRAS_BUNDLE);
onTransferOwnershipComplete(context, bundle);
+ } else if (ACTION_AFFILIATED_PROFILE_TRANSFER_OWNERSHIP_COMPLETE.equals(action)) {
+ onTransferAffiliatedProfileOwnershipComplete(context,
+ intent.getParcelableExtra(Intent.EXTRA_USER));
}
}
}
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index bad19e3..131abb5 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -68,6 +68,7 @@
import android.security.keystore.ParcelableKeyGenParameterSpec;
import android.service.restrictions.RestrictionsReceiver;
import android.telephony.TelephonyManager;
+import android.telephony.data.ApnSetting;
import android.util.ArraySet;
import android.util.Log;
@@ -7036,14 +7037,14 @@
* task. From {@link android.os.Build.VERSION_CODES#M} removing packages from the lock task
* package list results in locked tasks belonging to those packages to be finished.
* <p>
- * This function can only be called by the device owner or by a profile owner of a user/profile
- * that is affiliated with the device. See {@link #isAffiliatedUser}. Any packages
- * set via this method will be cleared if the user becomes unaffiliated.
+ * This function can only be called by the device owner, a profile owner of an affiliated user
+ * or profile, or the profile owner when no device owner is set. See {@link #isAffiliatedUser}.
+ * Any package set via this method will be cleared if the user becomes unaffiliated.
*
* @param packages The list of packages allowed to enter lock task mode
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
- * @throws SecurityException if {@code admin} is not the device owner, or the profile owner of
- * an affiliated user or profile.
+ * @throws SecurityException if {@code admin} is not the device owner, the profile owner of an
+ * affiliated user or profile, or the profile owner when no device owner is set.
* @see #isAffiliatedUser
* @see Activity#startLockTask()
* @see DeviceAdminReceiver#onLockTaskModeEntering(Context, Intent, String)
@@ -7065,8 +7066,8 @@
/**
* Returns the list of packages allowed to start the lock task mode.
*
- * @throws SecurityException if {@code admin} is not the device owner, or the profile owner of
- * an affiliated user or profile.
+ * @throws SecurityException if {@code admin} is not the device owner, the profile owner of an
+ * affiliated user or profile, or the profile owner when no device owner is set.
* @see #isAffiliatedUser
* @see #setLockTaskPackages
*/
@@ -7106,9 +7107,9 @@
* is in LockTask mode. If this method is not called, none of the features listed here will be
* enabled.
* <p>
- * This function can only be called by the device owner or by a profile owner of a user/profile
- * that is affiliated with the device. See {@link #isAffiliatedUser}. Any features
- * set via this method will be cleared if the user becomes unaffiliated.
+ * This function can only be called by the device owner, a profile owner of an affiliated user
+ * or profile, or the profile owner when no device owner is set. See {@link #isAffiliatedUser}.
+ * Any features set via this method will be cleared if the user becomes unaffiliated.
*
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
* @param flags Bitfield of feature flags:
@@ -7119,9 +7120,10 @@
* {@link #LOCK_TASK_FEATURE_RECENTS},
* {@link #LOCK_TASK_FEATURE_GLOBAL_ACTIONS},
* {@link #LOCK_TASK_FEATURE_KEYGUARD}
- * @throws SecurityException if {@code admin} is not the device owner, or the profile owner of
- * an affiliated user or profile.
+ * @throws SecurityException if {@code admin} is not the device owner, the profile owner of an
+ * affiliated user or profile, or the profile owner when no device owner is set.
* @see #isAffiliatedUser
+ * @throws SecurityException if {@code admin} is not the device owner or the profile owner.
*/
public void setLockTaskFeatures(@NonNull ComponentName admin, @LockTaskFeature int flags) {
throwIfParentInstance("setLockTaskFeatures");
@@ -7139,8 +7141,8 @@
*
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
* @return bitfield of flags. See {@link #setLockTaskFeatures(ComponentName, int)} for a list.
- * @throws SecurityException if {@code admin} is not the device owner, or the profile owner of
- * an affiliated user or profile.
+ * @throws SecurityException if {@code admin} is not the device owner, the profile owner of an
+ * affiliated user or profile, or the profile owner when no device owner is set.
* @see #isAffiliatedUser
* @see #setLockTaskFeatures
*/
@@ -7538,13 +7540,28 @@
/**
* Called by device owners to set a local system update policy. When a new policy is set,
* {@link #ACTION_SYSTEM_UPDATE_POLICY_CHANGED} is broadcasted.
+ * <p>
+ * If the supplied system update policy has freeze periods set but the freeze periods do not
+ * meet 90-day maximum length or 60-day minimum separation requirement set out in
+ * {@link SystemUpdatePolicy#setFreezePeriods},
+ * {@link SystemUpdatePolicy.ValidationFailedException} will the thrown. Note that the system
+ * keeps a record of freeze periods the device experienced previously, and combines them with
+ * the new freeze periods to be set when checking the maximum freeze length and minimum freeze
+ * separation constraints. As a result, freeze periods that passed validation during
+ * {@link SystemUpdatePolicy#setFreezePeriods} might fail the additional checks here due to
+ * the freeze period history. If this is causing issues during development,
+ * {@code adb shell dpm clear-freeze-period-record} can be used to clear the record.
*
* @param admin Which {@link DeviceAdminReceiver} this request is associated with. All
* components in the device owner package can set system update policies and the most
* recent policy takes effect.
* @param policy the new policy, or {@code null} to clear the current policy.
* @throws SecurityException if {@code admin} is not a device owner.
+ * @throws IllegalArgumentException if the policy type or maintenance window is not valid.
+ * @throws SystemUpdatePolicy.ValidationFailedException if the policy's freeze period does not
+ * meet the requirement.
* @see SystemUpdatePolicy
+ * @see SystemUpdatePolicy#setFreezePeriods(List)
*/
public void setSystemUpdatePolicy(@NonNull ComponentName admin, SystemUpdatePolicy policy) {
throwIfParentInstance("setSystemUpdatePolicy");
@@ -7575,6 +7592,22 @@
}
/**
+ * Reset record of previous system update freeze period the device went through.
+ * Only callable by ADB.
+ * @hide
+ */
+ public void clearSystemUpdatePolicyFreezePeriodRecord() {
+ throwIfParentInstance("clearSystemUpdatePolicyFreezePeriodRecord");
+ if (mService == null) {
+ return;
+ }
+ try {
+ mService.clearSystemUpdatePolicyFreezePeriodRecord();
+ } catch (RemoteException re) {
+ throw re.rethrowFromSystemServer();
+ }
+ }
+ /**
* Called by a device owner or profile owner of secondary users that is affiliated with the
* device to disable the keyguard altogether.
* <p>
@@ -8228,7 +8261,7 @@
}
/**
- * Called by a device or profile owner to restrict packages from accessing metered data.
+ * Called by a device or profile owner to restrict packages from using metered data.
*
* @param admin which {@link DeviceAdminReceiver} this request is associated with.
* @param packageNames the list of package names to be restricted.
@@ -8250,7 +8283,7 @@
/**
* Called by a device or profile owner to retrieve the list of packages which are restricted
- * by the admin from accessing metered data.
+ * by the admin from using metered data.
*
* @param admin which {@link DeviceAdminReceiver} this request is associated with.
* @return the list of restricted package names.
@@ -8269,6 +8302,30 @@
}
/**
+ * Called by the system to check if a package is restricted from using metered data
+ * by {@param admin}.
+ *
+ * @param admin which {@link DeviceAdminReceiver} this request is associated with.
+ * @param packageName the package whose restricted status is needed.
+ * @param userId the user to which {@param packageName} belongs.
+ * @return {@code true} if the package is restricted by admin, otherwise {@code false}
+ * @throws SecurityException if the caller doesn't run with {@link Process#SYSTEM_UID}
+ * @hide
+ */
+ public boolean isMeteredDataDisabledForUser(@NonNull ComponentName admin, String packageName,
+ @UserIdInt int userId) {
+ throwIfParentInstance("getMeteredDataDisabledForUser");
+ if (mService != null) {
+ try {
+ return mService.isMeteredDataDisabledForUser(admin, packageName, userId);
+ } catch (RemoteException re) {
+ throw re.rethrowFromSystemServer();
+ }
+ }
+ return false;
+ }
+
+ /**
* Called by device owners to retrieve device logs from before the device's last reboot.
* <p>
* <strong> This API is not supported on all devices. Calling this API on unsupported devices
@@ -8731,6 +8788,7 @@
*/
public void setMandatoryBackupTransport(
@NonNull ComponentName admin, @Nullable ComponentName backupTransportComponent) {
+ throwIfParentInstance("setMandatoryBackupTransport");
try {
mService.setMandatoryBackupTransport(admin, backupTransportComponent);
} catch (RemoteException re) {
@@ -8746,6 +8804,7 @@
* mandatory or {@code null} if backups are not mandatory.
*/
public ComponentName getMandatoryBackupTransport() {
+ throwIfParentInstance("getMandatoryBackupTransport");
try {
return mService.getMandatoryBackupTransport();
} catch (RemoteException re) {
@@ -9043,15 +9102,15 @@
* @param executor The executor through which the listener should be invoked.
* @param listener A callback object that will inform the caller when the clearing is done.
* @throws SecurityException if the caller is not the device owner/profile owner.
- * @return whether the clearing succeeded.
*/
- public boolean clearApplicationUserData(@NonNull ComponentName admin,
+ public void clearApplicationUserData(@NonNull ComponentName admin,
@NonNull String packageName, @NonNull @CallbackExecutor Executor executor,
@NonNull OnClearApplicationUserDataListener listener) {
throwIfParentInstance("clearAppData");
Preconditions.checkNotNull(executor);
+ Preconditions.checkNotNull(listener);
try {
- return mService.clearApplicationUserData(admin, packageName,
+ mService.clearApplicationUserData(admin, packageName,
new IPackageDataObserver.Stub() {
public void onRemoveCompleted(String pkg, boolean succeeded) {
executor.execute(() ->
@@ -9142,9 +9201,13 @@
* <li>A profile owner can only be transferred to a new profile owner</li>
* </ul>
*
- * <p>Use the {@code bundle} parameter to pass data to the new administrator. The parameters
+ * <p>Use the {@code bundle} parameter to pass data to the new administrator. The data
* will be received in the
- * {@link DeviceAdminReceiver#onTransferOwnershipComplete(Context, PersistableBundle)} callback.
+ * {@link DeviceAdminReceiver#onTransferOwnershipComplete(Context, PersistableBundle)}
+ * callback of the new administrator.
+ *
+ * <p>The transfer has failed if the original administrator is still the corresponding owner
+ * after calling this method.
*
* <p>The incoming target administrator must have the
* {@link DeviceAdminReceiver#SUPPORT_TRANSFER_OWNERSHIP_META_DATA} <code>meta-data</code> tag
@@ -9155,11 +9218,11 @@
* @param target which {@link DeviceAdminReceiver} we want the new administrator to be
* @param bundle data to be sent to the new administrator
* @throws SecurityException if {@code admin} is not a device owner nor a profile owner
- * @throws IllegalArgumentException if {@code admin} or {@code target} is {@code null},
- * both are components in the same package or {@code target} is not an active admin
+ * @throws IllegalArgumentException if {@code admin} or {@code target} is {@code null}, they
+ * are components in the same package or {@code target} is not an active admin
*/
public void transferOwnership(@NonNull ComponentName admin, @NonNull ComponentName target,
- PersistableBundle bundle) {
+ @Nullable PersistableBundle bundle) {
throwIfParentInstance("transferOwnership");
try {
mService.transferOwnership(admin, target, bundle);
@@ -9284,16 +9347,154 @@
}
/**
- * Returns error message to be displayed when printing is disabled.
+ * Called by device owner to add an override APN.
*
- * Used only by PrintService.
- * @return Localized error message.
- * @hide
+ * @param admin which {@link DeviceAdminReceiver} this request is associated with
+ * @param apnSetting the override APN to insert
+ * @return The {@code id} of inserted override APN. Or {@code -1} when failed to insert into
+ * the database.
+ * @throws SecurityException if {@code admin} is not a device owner.
+ *
+ * @see #setOverrideApnsEnabled(ComponentName, boolean)
*/
- @SystemApi
- public CharSequence getPrintingDisabledReason() {
+ public int addOverrideApn(@NonNull ComponentName admin, @NonNull ApnSetting apnSetting) {
+ throwIfParentInstance("addOverrideApn");
+ if (mService != null) {
+ try {
+ return mService.addOverrideApn(admin, apnSetting);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Called by device owner to update an override APN.
+ *
+ * @param admin which {@link DeviceAdminReceiver} this request is associated with
+ * @param apnId the {@code id} of the override APN to update
+ * @param apnSetting the override APN to update
+ * @return {@code true} if the required override APN is successfully updated,
+ * {@code false} otherwise.
+ * @throws SecurityException if {@code admin} is not a device owner.
+ *
+ * @see #setOverrideApnsEnabled(ComponentName, boolean)
+ */
+ public boolean updateOverrideApn(@NonNull ComponentName admin, int apnId,
+ @NonNull ApnSetting apnSetting) {
+ throwIfParentInstance("updateOverrideApn");
+ if (mService != null) {
+ try {
+ return mService.updateOverrideApn(admin, apnId, apnSetting);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Called by device owner to remove an override APN.
+ *
+ * @param admin which {@link DeviceAdminReceiver} this request is associated with
+ * @param apnId the {@code id} of the override APN to remove
+ * @return {@code true} if the required override APN is successfully removed, {@code false}
+ * otherwise.
+ * @throws SecurityException if {@code admin} is not a device owner.
+ *
+ * @see #setOverrideApnsEnabled(ComponentName, boolean)
+ */
+ public boolean removeOverrideApn(@NonNull ComponentName admin, int apnId) {
+ throwIfParentInstance("removeOverrideApn");
+ if (mService != null) {
+ try {
+ return mService.removeOverrideApn(admin, apnId);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Called by device owner to get all override APNs inserted by device owner.
+ *
+ * @param admin which {@link DeviceAdminReceiver} this request is associated with
+ * @return A list of override APNs inserted by device owner.
+ * @throws SecurityException if {@code admin} is not a device owner.
+ *
+ * @see #setOverrideApnsEnabled(ComponentName, boolean)
+ */
+ public List<ApnSetting> getOverrideApns(@NonNull ComponentName admin) {
+ throwIfParentInstance("getOverrideApns");
+ if (mService != null) {
+ try {
+ return mService.getOverrideApns(admin);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+ return Collections.emptyList();
+ }
+
+ /**
+ * Called by device owner to set if override APNs should be enabled.
+ * <p> Override APNs are separated from other APNs on the device, and can only be inserted or
+ * modified by the device owner. When enabled, only override APNs are in use, any other APNs
+ * are ignored.
+ *
+ * @param admin which {@link DeviceAdminReceiver} this request is associated with
+ * @param enabled {@code true} if override APNs should be enabled, {@code false} otherwise
+ * @throws SecurityException if {@code admin} is not a device owner.
+ */
+ public void setOverrideApnsEnabled(@NonNull ComponentName admin, boolean enabled) {
+ throwIfParentInstance("setOverrideApnEnabled");
+ if (mService != null) {
+ try {
+ mService.setOverrideApnsEnabled(admin, enabled);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+ }
+
+ /**
+ * Called by device owner to check if override APNs are currently enabled.
+ *
+ * @param admin which {@link DeviceAdminReceiver} this request is associated with
+ * @return {@code true} if override APNs are currently enabled, {@code false} otherwise.
+ * @throws SecurityException if {@code admin} is not a device owner.
+ *
+ * @see #setOverrideApnsEnabled(ComponentName, boolean)
+ */
+ public boolean isOverrideApnEnabled(@NonNull ComponentName admin) {
+ throwIfParentInstance("isOverrideApnEnabled");
+ if (mService != null) {
+ try {
+ return mService.isOverrideApnEnabled(admin);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Returns the data passed from the current administrator to the new administrator during an
+ * ownership transfer. This is the same {@code bundle} passed in
+ * {@link #transferOwnership(ComponentName, ComponentName, PersistableBundle)}.
+ *
+ * <p>Returns <code>null</code> if no ownership transfer was started for the calling user.
+ *
+ * @see #transferOwnership
+ * @see DeviceAdminReceiver#onTransferOwnershipComplete(Context, PersistableBundle)
+ */
+ @Nullable
+ public PersistableBundle getTransferOwnershipBundle() {
+ throwIfParentInstance("getTransferOwnershipBundle");
try {
- return mService.getPrintingDisabledReason();
+ return mService.getTransferOwnershipBundle();
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
diff --git a/core/java/android/app/admin/DevicePolicyManagerInternal.java b/core/java/android/app/admin/DevicePolicyManagerInternal.java
index 531bef0..ebaf464 100644
--- a/core/java/android/app/admin/DevicePolicyManagerInternal.java
+++ b/core/java/android/app/admin/DevicePolicyManagerInternal.java
@@ -132,4 +132,13 @@
* @param userId The user in question
*/
public abstract boolean canUserHaveUntrustedCredentialReset(@UserIdInt int userId);
+
+ /**
+ * Return text of error message if printing is disabled.
+ * Called by Print Service when printing is disabled by PO or DO when printing is attempted.
+ *
+ * @param userId The user in question
+ * @return localized error message
+ */
+ public abstract CharSequence getPrintingDisabledReasonForUser(@UserIdInt int userId);
}
diff --git a/core/java/android/app/admin/FreezeInterval.java b/core/java/android/app/admin/FreezeInterval.java
new file mode 100644
index 0000000..7acdfc8
--- /dev/null
+++ b/core/java/android/app/admin/FreezeInterval.java
@@ -0,0 +1,299 @@
+/*
+ * 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.admin;
+
+import android.app.admin.SystemUpdatePolicy.ValidationFailedException;
+import android.util.Log;
+import android.util.Pair;
+
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * An interval representing one freeze period which repeats annually. We use the number of days
+ * since the start of (non-leap) year to define the start and end dates of an interval, both
+ * inclusive. If the end date is smaller than the start date, the interval is considered wrapped
+ * around the year-end. As far as an interval is concerned, February 29th should be treated as
+ * if it were February 28th: so an interval starting or ending on February 28th are not
+ * distinguishable from an interval on February 29th. When calulating interval length or
+ * distance between two dates, February 29th is also disregarded.
+ *
+ * @see SystemUpdatePolicy#setFreezePeriods
+ * @hide
+ */
+public class FreezeInterval {
+ private static final String TAG = "FreezeInterval";
+
+ private static final int DUMMY_YEAR = 2001;
+ static final int DAYS_IN_YEAR = 365; // 365 since DUMMY_YEAR is not a leap year
+
+ final int mStartDay; // [1,365]
+ final int mEndDay; // [1,365]
+
+ FreezeInterval(int startDay, int endDay) {
+ if (startDay < 1 || startDay > 365 || endDay < 1 || endDay > 365) {
+ throw new RuntimeException("Bad dates for Interval: " + startDay + "," + endDay);
+ }
+ mStartDay = startDay;
+ mEndDay = endDay;
+ }
+
+ int getLength() {
+ return getEffectiveEndDay() - mStartDay + 1;
+ }
+
+ boolean isWrapped() {
+ return mEndDay < mStartDay;
+ }
+
+ /**
+ * Returns the effective end day, taking wrapping around year-end into consideration
+ */
+ int getEffectiveEndDay() {
+ if (!isWrapped()) {
+ return mEndDay;
+ } else {
+ return mEndDay + DAYS_IN_YEAR;
+ }
+ }
+
+ boolean contains(LocalDate localDate) {
+ final int daysOfYear = dayOfYearDisregardLeapYear(localDate);
+ if (!isWrapped()) {
+ // ---[start---now---end]---
+ return (mStartDay <= daysOfYear) && (daysOfYear <= mEndDay);
+ } else {
+ // ---end]---[start---now---
+ // or ---now---end]---[start---
+ return (mStartDay <= daysOfYear) || (daysOfYear <= mEndDay);
+ }
+ }
+
+ /**
+ * Instantiate the current interval to real calendar dates, given a calendar date
+ * {@code now}. If the interval contains now, the returned calendar dates should be the
+ * current interval (in real calendar dates) that includes now. If the interval does not
+ * include now, the returned dates represents the next future interval.
+ * The result will always have the same month and dayOfMonth value as the non-instantiated
+ * interval itself.
+ */
+ Pair<LocalDate, LocalDate> toCurrentOrFutureRealDates(LocalDate now) {
+ final int nowDays = dayOfYearDisregardLeapYear(now);
+ final int startYearAdjustment, endYearAdjustment;
+ if (contains(now)) {
+ // current interval
+ if (mStartDay <= nowDays) {
+ // ----------[start---now---end]---
+ // or ---end]---[start---now----------
+ startYearAdjustment = 0;
+ endYearAdjustment = isWrapped() ? 1 : 0;
+ } else /* nowDays <= mEndDay */ {
+ // or ---now---end]---[start----------
+ startYearAdjustment = -1;
+ endYearAdjustment = 0;
+ }
+ } else {
+ // next interval
+ if (mStartDay > nowDays) {
+ // ----------now---[start---end]---
+ // or ---end]---now---[start----------
+ startYearAdjustment = 0;
+ endYearAdjustment = isWrapped() ? 1 : 0;
+ } else /* mStartDay <= nowDays */ {
+ // or ---[start---end]---now----------
+ startYearAdjustment = 1;
+ endYearAdjustment = 1;
+ }
+ }
+ final LocalDate startDate = LocalDate.ofYearDay(DUMMY_YEAR, mStartDay).withYear(
+ now.getYear() + startYearAdjustment);
+ final LocalDate endDate = LocalDate.ofYearDay(DUMMY_YEAR, mEndDay).withYear(
+ now.getYear() + endYearAdjustment);
+ return new Pair<>(startDate, endDate);
+ }
+
+ @Override
+ public String toString() {
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MMM dd");
+ return LocalDate.ofYearDay(DUMMY_YEAR, mStartDay).format(formatter) + " - "
+ + LocalDate.ofYearDay(DUMMY_YEAR, mEndDay).format(formatter);
+ }
+
+ // Treat the supplied date as in a non-leap year and return its day of year.
+ static int dayOfYearDisregardLeapYear(LocalDate date) {
+ return date.withYear(DUMMY_YEAR).getDayOfYear();
+ }
+
+ /**
+ * Compute the number of days between first (inclusive) and second (exclusive),
+ * treating all years in between as non-leap.
+ */
+ public static int distanceWithoutLeapYear(LocalDate first, LocalDate second) {
+ return dayOfYearDisregardLeapYear(first) - dayOfYearDisregardLeapYear(second)
+ + DAYS_IN_YEAR * (first.getYear() - second.getYear());
+ }
+
+ /**
+ * Sort, de-duplicate and merge an interval list
+ *
+ * Instead of using any fancy logic for merging intervals which has loads of corner cases,
+ * simply flatten the interval onto a list of 365 calendar days and recreate the interval list
+ * from that.
+ *
+ * This method should return a list of intervals with the following post-conditions:
+ * 1. Interval.startDay in strictly ascending order
+ * 2. No two intervals should overlap or touch
+ * 3. At most one wrapped Interval remains, and it will be at the end of the list
+ * @hide
+ */
+ private static List<FreezeInterval> canonicalizeIntervals(List<FreezeInterval> intervals) {
+ boolean[] taken = new boolean[DAYS_IN_YEAR];
+ // First convert the intervals into flat array
+ for (FreezeInterval interval : intervals) {
+ for (int i = interval.mStartDay; i <= interval.getEffectiveEndDay(); i++) {
+ taken[(i - 1) % DAYS_IN_YEAR] = true;
+ }
+ }
+ // Then reconstruct intervals from the array
+ List<FreezeInterval> result = new ArrayList<>();
+ int i = 0;
+ while (i < DAYS_IN_YEAR) {
+ if (!taken[i]) {
+ i++;
+ continue;
+ }
+ final int intervalStart = i + 1;
+ while (i < DAYS_IN_YEAR && taken[i]) i++;
+ result.add(new FreezeInterval(intervalStart, i));
+ }
+ // Check if the last entry can be merged to the first entry to become one single
+ // wrapped interval
+ final int lastIndex = result.size() - 1;
+ if (lastIndex > 0 && result.get(lastIndex).mEndDay == DAYS_IN_YEAR
+ && result.get(0).mStartDay == 1) {
+ FreezeInterval wrappedInterval = new FreezeInterval(result.get(lastIndex).mStartDay,
+ result.get(0).mEndDay);
+ result.set(lastIndex, wrappedInterval);
+ result.remove(0);
+ }
+ return result;
+ }
+
+ /**
+ * Verifies if the supplied freeze periods satisfies the constraints set out in
+ * {@link SystemUpdatePolicy#setFreezePeriods(List)}, and in particular, any single freeze
+ * period cannot exceed {@link SystemUpdatePolicy#FREEZE_PERIOD_MAX_LENGTH} days, and two freeze
+ * periods need to be at least {@link SystemUpdatePolicy#FREEZE_PERIOD_MIN_SEPARATION} days
+ * apart.
+ *
+ * @hide
+ */
+ protected static void validatePeriods(List<FreezeInterval> periods) {
+ List<FreezeInterval> allPeriods = FreezeInterval.canonicalizeIntervals(periods);
+ if (allPeriods.size() != periods.size()) {
+ throw SystemUpdatePolicy.ValidationFailedException.duplicateOrOverlapPeriods();
+ }
+ for (int i = 0; i < allPeriods.size(); i++) {
+ FreezeInterval current = allPeriods.get(i);
+ if (current.getLength() > SystemUpdatePolicy.FREEZE_PERIOD_MAX_LENGTH) {
+ throw SystemUpdatePolicy.ValidationFailedException.freezePeriodTooLong("Freeze "
+ + "period " + current + " is too long: " + current.getLength() + " days");
+ }
+ FreezeInterval previous = i > 0 ? allPeriods.get(i - 1)
+ : allPeriods.get(allPeriods.size() - 1);
+ if (previous != current) {
+ final int separation;
+ if (i == 0 && !previous.isWrapped()) {
+ // -->[current]---[-previous-]<---
+ separation = current.mStartDay
+ + (DAYS_IN_YEAR - previous.mEndDay) - 1;
+ } else {
+ // --[previous]<--->[current]---------
+ // OR ----prev---]<--->[current]---[prev-
+ separation = current.mStartDay - previous.mEndDay - 1;
+ }
+ if (separation < SystemUpdatePolicy.FREEZE_PERIOD_MIN_SEPARATION) {
+ throw SystemUpdatePolicy.ValidationFailedException.freezePeriodTooClose("Freeze"
+ + " periods " + previous + " and " + current + " are too close "
+ + "together: " + separation + " days apart");
+ }
+ }
+ }
+ }
+
+ /**
+ * Verifies that the current freeze periods are still legal, considering the previous freeze
+ * periods the device went through. In particular, when combined with the previous freeze
+ * period, the maximum freeze length or the minimum freeze separation should not be violated.
+ *
+ * @hide
+ */
+ protected static void validateAgainstPreviousFreezePeriod(List<FreezeInterval> periods,
+ LocalDate prevPeriodStart, LocalDate prevPeriodEnd, LocalDate now) {
+ if (periods.size() == 0 || prevPeriodStart == null || prevPeriodEnd == null) {
+ return;
+ }
+ if (prevPeriodStart.isAfter(now) || prevPeriodEnd.isAfter(now)) {
+ Log.w(TAG, "Previous period (" + prevPeriodStart + "," + prevPeriodEnd + ") is after"
+ + " current date " + now);
+ // Clock was adjusted backwards. We can continue execution though, the separation
+ // and length validation below still works under this condition.
+ }
+ List<FreezeInterval> allPeriods = FreezeInterval.canonicalizeIntervals(periods);
+ // Given current time now, find the freeze period that's either current, or the one
+ // that's immediately afterwards. For the later case, it might be after the year-end,
+ // but this can only happen if there is only one freeze period.
+ FreezeInterval curOrNextFreezePeriod = allPeriods.get(0);
+ for (FreezeInterval interval : allPeriods) {
+ if (interval.contains(now)
+ || interval.mStartDay > FreezeInterval.dayOfYearDisregardLeapYear(now)) {
+ curOrNextFreezePeriod = interval;
+ break;
+ }
+ }
+ Pair<LocalDate, LocalDate> curOrNextFreezeDates = curOrNextFreezePeriod
+ .toCurrentOrFutureRealDates(now);
+ if (now.isAfter(curOrNextFreezeDates.first)) {
+ curOrNextFreezeDates = new Pair<>(now, curOrNextFreezeDates.second);
+ }
+ if (curOrNextFreezeDates.first.isAfter(curOrNextFreezeDates.second)) {
+ throw new IllegalStateException("Current freeze dates inverted: "
+ + curOrNextFreezeDates.first + "-" + curOrNextFreezeDates.second);
+ }
+ // Now validate [prevPeriodStart, prevPeriodEnd] against curOrNextFreezeDates
+ final String periodsDescription = "Prev: " + prevPeriodStart + "," + prevPeriodEnd
+ + "; cur: " + curOrNextFreezeDates.first + "," + curOrNextFreezeDates.second;
+ long separation = FreezeInterval.distanceWithoutLeapYear(curOrNextFreezeDates.first,
+ prevPeriodEnd) - 1;
+ if (separation > 0) {
+ // Two intervals do not overlap, check separation
+ if (separation < SystemUpdatePolicy.FREEZE_PERIOD_MIN_SEPARATION) {
+ throw ValidationFailedException.combinedPeriodTooClose("Previous freeze period "
+ + "too close to new period: " + separation + ", " + periodsDescription);
+ }
+ } else {
+ // Two intervals overlap, check combined length
+ long length = FreezeInterval.distanceWithoutLeapYear(curOrNextFreezeDates.second,
+ prevPeriodStart) + 1;
+ if (length > SystemUpdatePolicy.FREEZE_PERIOD_MAX_LENGTH) {
+ throw ValidationFailedException.combinedPeriodTooLong("Combined freeze period "
+ + "exceeds maximum days: " + length + ", " + periodsDescription);
+ }
+ }
+ }
+}
diff --git a/core/java/android/app/admin/IDevicePolicyManager.aidl b/core/java/android/app/admin/IDevicePolicyManager.aidl
index 514dca9..cba9311 100644
--- a/core/java/android/app/admin/IDevicePolicyManager.aidl
+++ b/core/java/android/app/admin/IDevicePolicyManager.aidl
@@ -38,6 +38,7 @@
import android.os.UserHandle;
import android.security.keymaster.KeymasterCertificateChain;
import android.security.keystore.ParcelableKeyGenParameterSpec;
+import android.telephony.data.ApnSetting;
import java.util.List;
@@ -294,6 +295,7 @@
void setSystemUpdatePolicy(in ComponentName who, in SystemUpdatePolicy policy);
SystemUpdatePolicy getSystemUpdatePolicy();
+ void clearSystemUpdatePolicyFreezePeriodRecord();
boolean setKeyguardDisabled(in ComponentName admin, boolean disabled);
boolean setStatusBarDisabled(in ComponentName who, boolean disabled);
@@ -384,13 +386,15 @@
boolean isCurrentInputMethodSetByOwner();
StringParceledListSlice getOwnerInstalledCaCerts(in UserHandle user);
- boolean clearApplicationUserData(in ComponentName admin, in String packageName, in IPackageDataObserver callback);
+ void clearApplicationUserData(in ComponentName admin, in String packageName, in IPackageDataObserver callback);
void setLogoutEnabled(in ComponentName admin, boolean enabled);
boolean isLogoutEnabled();
List<String> getDisallowedSystemApps(in ComponentName admin, int userId, String provisioningAction);
+
void transferOwnership(in ComponentName admin, in ComponentName target, in PersistableBundle bundle);
+ PersistableBundle getTransferOwnershipBundle();
void setStartUserSessionMessage(in ComponentName admin, in CharSequence startUserSessionMessage);
void setEndUserSessionMessage(in ComponentName admin, in CharSequence endUserSessionMessage);
@@ -399,8 +403,16 @@
void setPrintingEnabled(in ComponentName admin, boolean enabled);
boolean isPrintingEnabled();
- CharSequence getPrintingDisabledReason();
List<String> setMeteredDataDisabled(in ComponentName admin, in List<String> packageNames);
List<String> getMeteredDataDisabled(in ComponentName admin);
+
+ int addOverrideApn(in ComponentName admin, in ApnSetting apnSetting);
+ boolean updateOverrideApn(in ComponentName admin, int apnId, in ApnSetting apnSetting);
+ boolean removeOverrideApn(in ComponentName admin, int apnId);
+ List<ApnSetting> getOverrideApns(in ComponentName admin);
+ void setOverrideApnsEnabled(in ComponentName admin, boolean enabled);
+ boolean isOverrideApnEnabled(in ComponentName admin);
+
+ boolean isMeteredDataDisabledForUser(in ComponentName admin, String packageName, int userId);
}
diff --git a/core/java/android/app/admin/SecurityLog.java b/core/java/android/app/admin/SecurityLog.java
index d3b66d0..08effd9 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.content.ComponentName;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemProperties;
@@ -53,64 +54,367 @@
TAG_APP_PROCESS_START,
TAG_KEYGUARD_DISMISSED,
TAG_KEYGUARD_DISMISS_AUTH_ATTEMPT,
- TAG_KEYGUARD_SECURED
+ TAG_KEYGUARD_SECURED,
+ TAG_OS_STARTUP,
+ TAG_OS_SHUTDOWN,
+ TAG_LOGGING_STARTED,
+ TAG_LOGGING_STOPPED,
+ TAG_MEDIA_MOUNT,
+ TAG_MEDIA_UNMOUNT,
+ TAG_LOG_BUFFER_SIZE_CRITICAL,
+ TAG_PASSWORD_EXPIRATION_SET,
+ TAG_PASSWORD_COMPLEXITY_SET,
+ TAG_PASSWORD_HISTORY_LENGTH_SET,
+ TAG_MAX_SCREEN_LOCK_TIMEOUT_SET,
+ TAG_MAX_PASSWORD_ATTEMPTS_SET,
+ TAG_KEYGUARD_DISABLED_FEATURES_SET,
+ TAG_REMOTE_LOCK,
+ TAG_USER_RESTRICTION_ADDED,
+ TAG_USER_RESTRICTION_REMOVED,
+ TAG_WIPE_FAILURE,
+ TAG_KEY_GENERATED,
+ TAG_KEY_IMPORT,
+ TAG_KEY_DESTRUCTION,
+ TAG_CERT_AUTHORITY_INSTALLED,
+ TAG_CERT_AUTHORITY_REMOVED,
})
public @interface SecurityLogTag {}
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = { "LEVEL_" }, value = {
+ LEVEL_INFO,
+ LEVEL_WARNING,
+ LEVEL_ERROR
+ })
+ public @interface SecurityLogLevel {}
+
/**
- * Indicate that an ADB interactive shell was opened via "adb shell".
+ * Indicates that an ADB interactive shell was opened via "adb shell".
* There is no extra payload in the log event.
*/
public static final int TAG_ADB_SHELL_INTERACTIVE =
SecurityLogTags.SECURITY_ADB_SHELL_INTERACTIVE;
+
/**
- * Indicate that an shell command was issued over ADB via "adb shell command"
- * The log entry contains a string data of the shell command, accessible via
- * {@link SecurityEvent#getData()}
+ * Indicates that a shell command was issued over ADB via {@code adb shell <command>}
+ * The log entry contains a {@code String} payload containing the shell command, accessible
+ * via {@link SecurityEvent#getData()}.
*/
public static final int TAG_ADB_SHELL_CMD = SecurityLogTags.SECURITY_ADB_SHELL_COMMAND;
+
/**
- * Indicate that a file was pulled from the device via the adb daemon, for example via
- * "adb pull". The log entry contains a string data of the path of the pulled file,
- * accessible via {@link SecurityEvent#getData()}
+ * Indicates that a file was pulled from the device via the adb daemon, for example via
+ * {@code adb pull}. The log entry contains a {@code String} payload containing the path of the
+ * pulled file on the device, accessible via {@link SecurityEvent#getData()}.
*/
public static final int TAG_SYNC_RECV_FILE = SecurityLogTags.SECURITY_ADB_SYNC_RECV;
+
/**
- * Indicate that a file was pushed to the device via the adb daemon, for example via
- * "adb push". The log entry contains a string data of the destination path of the
- * pushed file, accessible via {@link SecurityEvent#getData()}
+ * Indicates that a file was pushed to the device via the adb daemon, for example via
+ * {@code adb push}. The log entry contains a {@code String} payload containing the destination
+ * path of the pushed file, accessible via {@link SecurityEvent#getData()}.
*/
public static final int TAG_SYNC_SEND_FILE = SecurityLogTags.SECURITY_ADB_SYNC_SEND;
+
/**
- * Indicate that an app process was started. The log entry contains the following
+ * Indicates that an app process was started. The log entry contains the following
* information about the process encapsulated in an {@link Object} array, accessible via
* {@link SecurityEvent#getData()}:
- * process name (String), exact start time (long), app Uid (integer), app Pid (integer),
- * seinfo tag (String), SHA-256 hash of the base APK in hexadecimal (String)
+ * <li> [0] process name ({@code String})
+ * <li> [1] exact start time in milliseconds according to {@code System.currentTimeMillis()}
+ * ({@code Long})
+ * <li> [2] app uid ({@code Integer})
+ * <li> [3] app pid ({@code Integer})
+ * <li> [4] seinfo tag ({@code String})
+ * <li> [5] SHA-256 hash of the base APK in hexadecimal ({@code String})
*/
public static final int TAG_APP_PROCESS_START = SecurityLogTags.SECURITY_APP_PROCESS_START;
+
/**
- * Indicate that keyguard is being dismissed.
+ * Indicates that keyguard has been dismissed.
* There is no extra payload in the log event.
*/
- public static final int TAG_KEYGUARD_DISMISSED =
- SecurityLogTags.SECURITY_KEYGUARD_DISMISSED;
+ public static final int TAG_KEYGUARD_DISMISSED = SecurityLogTags.SECURITY_KEYGUARD_DISMISSED;
+
/**
- * Indicate that there has been an authentication attempt to dismiss the keyguard. The log entry
- * contains the following information about the attempt encapsulated in an {@link Object} array,
- * accessible via {@link SecurityEvent#getData()}:
- * attempt result (integer, 1 for successful, 0 for unsuccessful), strength of auth method
- * (integer, 1 if strong auth method was used, 0 otherwise)
+ * Indicates that there has been an authentication attempt to dismiss the keyguard. The log
+ * entry contains the following information about the attempt encapsulated in an {@link Object}
+ * array, accessible via {@link SecurityEvent#getData()}:
+ * <li> [0] attempt result ({@code Integer}, 1 for successful, 0 for unsuccessful)
+ * <li> [1] strength of authentication method ({@code Integer}, 1 if strong authentication
+ * method was used, 0 otherwise)
*/
public static final int TAG_KEYGUARD_DISMISS_AUTH_ATTEMPT =
SecurityLogTags.SECURITY_KEYGUARD_DISMISS_AUTH_ATTEMPT;
+
/**
- * Indicate that the device has been locked, either by user or by timeout.
- * There is no extra payload in the log event.
+ * Indicates that the device has been locked, either by the user or by a timeout. There is no
+ * extra payload in the log event.
*/
public static final int TAG_KEYGUARD_SECURED = SecurityLogTags.SECURITY_KEYGUARD_SECURED;
/**
+ * Indicates that the Android OS has started. The log entry contains the following information
+ * about the startup time software integrity check encapsulated in an {@link Object} array,
+ * accessible via {@link SecurityEvent#getData()}:
+ * <li> [0] Verified Boot state ({@code String})
+ * <li> [1] dm-verity mode ({@code String}).
+ * <p>Verified Boot state can be one of the following:
+ * <li> {@code green} indicates that there is a full chain of trust extending from the
+ * bootloader to verified partitions including the bootloader, boot partition, and all verified
+ * partitions.
+ * <li> {@code yellow} indicates that the boot partition has been verified using the embedded
+ * certificate and the signature is valid.
+ * <li> {@code orange} indicates that the device may be freely modified. Device integrity is
+ * left to the user to verify out-of-band.
+ * <p>dm-verity mode can be one of the following:
+ * <li> {@code enforcing} indicates that the device will be restarted when corruption is
+ * detected.
+ * <li> {@code eio} indicates that an I/O error will be returned for an attempt to read
+ * corrupted data blocks.
+ * For details see Verified Boot documentation.
+ */
+ public static final int TAG_OS_STARTUP = SecurityLogTags.SECURITY_OS_STARTUP;
+
+ /**
+ * Indicates that the Android OS has shutdown. There is no extra payload in the log event.
+ */
+ public static final int TAG_OS_SHUTDOWN = SecurityLogTags.SECURITY_OS_SHUTDOWN;
+
+ /**
+ * Indicates start-up of audit logging. There is no extra payload in the log event.
+ */
+ public static final int TAG_LOGGING_STARTED = SecurityLogTags.SECURITY_LOGGING_STARTED;
+
+ /**
+ * Indicates shutdown of audit logging. There is no extra payload in the log event.
+ */
+ public static final int TAG_LOGGING_STOPPED = SecurityLogTags.SECURITY_LOGGING_STOPPED;
+
+ /**
+ * Indicates that removable media has been mounted on the device. The log entry contains the
+ * following information about the event, encapsulated in an {@link Object} array and
+ * accessible via {@link SecurityEvent#getData()}:
+ * <li> [0] mount point ({@code String})
+ * <li> [1] volume label ({@code String}).
+ */
+ public static final int TAG_MEDIA_MOUNT = SecurityLogTags.SECURITY_MEDIA_MOUNTED;
+
+ /**
+ * Indicates that removable media was unmounted from the device. The log entry contains the
+ * following information about the event, encapsulated in an {@link Object} array and
+ * accessible via {@link SecurityEvent#getData()}:
+ * <li> [0] mount point ({@code String})
+ * <li> [1] volume label ({@code String}).
+ */
+ public static final int TAG_MEDIA_UNMOUNT = SecurityLogTags.SECURITY_MEDIA_UNMOUNTED;
+
+ /**
+ * Indicates that the audit log buffer has reached 90% of its capacity. There is no extra
+ * payload in the log event.
+ */
+ public static final int TAG_LOG_BUFFER_SIZE_CRITICAL =
+ SecurityLogTags.SECURITY_LOG_BUFFER_SIZE_CRITICAL;
+
+ /**
+ * Indicates that an admin has set a password expiration timeout. The log entry contains the
+ * following information about the event, encapsulated in an {@link Object} array and accessible
+ * via {@link SecurityEvent#getData()}:
+ * <li> [0] admin package name ({@code String})
+ * <li> [1] admin user ID ({@code Integer})
+ * <li> [2] target user ID ({@code Integer})
+ * <li> [3] new password expiration timeout in milliseconds ({@code Long}).
+ * @see DevicePolicyManager#setPasswordExpirationTimeout(ComponentName, long)
+ */
+ public static final int TAG_PASSWORD_EXPIRATION_SET =
+ SecurityLogTags.SECURITY_PASSWORD_EXPIRATION_SET;
+
+ /**
+ * Indicates that an admin has set a requirement for password complexity. The log entry contains
+ * the following information about the event, encapsulated in an {@link Object} array and
+ * accessible via {@link SecurityEvent#getData()}:
+ * <li> [0] admin package name ({@code String})
+ * <li> [1] admin user ID ({@code Integer})
+ * <li> [2] target user ID ({@code Integer})
+ * <li> [3] minimum password length ({@code Integer})
+ * <li> [4] password quality constraint ({@code Integer})
+ * <li> [5] minimum number of letters ({@code Integer})
+ * <li> [6] minimum number of non-letters ({@code Integer})
+ * <li> [7] minimum number of digits ({@code Integer})
+ * <li> [8] minimum number of uppercase letters ({@code Integer})
+ * <li> [9] minimum number of lowercase letters ({@code Integer})
+ * <li> [10] minimum number of symbols ({@code Integer})
+ *
+ * @see DevicePolicyManager#setPasswordMinimumLength(ComponentName, int)
+ * @see DevicePolicyManager#setPasswordQuality(ComponentName, int)
+ * @see DevicePolicyManager#setPasswordMinimumLetters(ComponentName, int)
+ * @see DevicePolicyManager#setPasswordMinimumNonLetter(ComponentName, int)
+ * @see DevicePolicyManager#setPasswordMinimumLowerCase(ComponentName, int)
+ * @see DevicePolicyManager#setPasswordMinimumUpperCase(ComponentName, int)
+ * @see DevicePolicyManager#setPasswordMinimumNumeric(ComponentName, int)
+ * @see DevicePolicyManager#setPasswordMinimumSymbols(ComponentName, int)
+ */
+ public static final int TAG_PASSWORD_COMPLEXITY_SET =
+ SecurityLogTags.SECURITY_PASSWORD_COMPLEXITY_SET;
+
+ /**
+ * Indicates that an admin has set a password history length. The log entry contains the
+ * following information about the event encapsulated in an {@link Object} array, accessible
+ * via {@link SecurityEvent#getData()}:
+ * <li> [0] admin package name ({@code String})
+ * <li> [1] admin user ID ({@code Integer})
+ * <li> [2] target user ID ({@code Integer})
+ * <li> [3] new password history length value ({@code Integer})
+ * @see DevicePolicyManager#setPasswordHistoryLength(ComponentName, int)
+ */
+ public static final int TAG_PASSWORD_HISTORY_LENGTH_SET =
+ SecurityLogTags.SECURITY_PASSWORD_HISTORY_LENGTH_SET;
+
+ /**
+ * Indicates that an admin has set a maximum screen lock timeout. The log entry contains the
+ * following information about the event encapsulated in an {@link Object} array, accessible
+ * via {@link SecurityEvent#getData()}:
+ * <li> [0] admin package name ({@code String})
+ * <li> [1] admin user ID ({@code Integer})
+ * <li> [2] target user ID ({@code Integer})
+ * <li> [3] new screen lock timeout in milliseconds ({@code Long})
+ * @see DevicePolicyManager#setMaximumTimeToLock(ComponentName, long)
+ */
+ public static final int TAG_MAX_SCREEN_LOCK_TIMEOUT_SET =
+ SecurityLogTags.SECURITY_MAX_SCREEN_LOCK_TIMEOUT_SET;
+
+ /**
+ * Indicates that an admin has set a maximum number of failed password attempts before wiping
+ * data. The log entry contains the following information about the event encapsulated in an
+ * {@link Object} array, accessible via {@link SecurityEvent#getData()}:
+ * <li> [0] admin package name ({@code String})
+ * <li> [1] admin user ID ({@code Integer})
+ * <li> [2] target user ID ({@code Integer})
+ * <li> [3] new maximum number of failed password attempts ({@code Integer})
+ * @see DevicePolicyManager#setMaximumTimeToLock(ComponentName, long)
+ */
+ public static final int TAG_MAX_PASSWORD_ATTEMPTS_SET =
+ SecurityLogTags.SECURITY_MAX_PASSWORD_ATTEMPTS_SET;
+
+ /**
+ * Indicates that an admin has set disabled keyguard features. The log entry contains the
+ * following information about the event encapsulated in an {@link Object} array, accessible via
+ * {@link SecurityEvent#getData()}:
+ * <li> [0] admin package name ({@code String})
+ * <li> [1] admin user ID ({@code Integer})
+ * <li> [2] target user ID ({@code Integer})
+ * <li> [3] disabled keyguard feature mask ({@code Integer}).
+ * @see DevicePolicyManager#setKeyguardDisabledFeatures(ComponentName, int)
+ */
+ public static final int TAG_KEYGUARD_DISABLED_FEATURES_SET =
+ SecurityLogTags.SECURITY_KEYGUARD_DISABLED_FEATURES_SET;
+
+ /**
+ * Indicates that an admin remotely locked the device or profile. The log entry contains the
+ * following information about the event encapsulated in an {@link Object} array, accessible via
+ * {@link SecurityEvent#getData()}:
+ * <li> [0] admin package name ({@code String}),
+ * <li> [1] admin user ID ({@code Integer}).
+ */
+ public static final int TAG_REMOTE_LOCK = SecurityLogTags.SECURITY_REMOTE_LOCK;
+
+ /**
+ * Indicates a failure to wipe device or user data. There is no extra payload in the log event.
+ */
+ public static final int TAG_WIPE_FAILURE = SecurityLogTags.SECURITY_WIPE_FAILED;
+
+ /**
+ * Indicates that an authentication key was generated. The log entry contains the following
+ * information about the event, encapsulated in an {@link Object} array and accessible via
+ * {@link SecurityEvent#getData()}:
+ * <li> [0] result ({@code Integer}, 0 if operation failed, 1 if succeeded)
+ * <li> [1] alias of the key ({@code String})
+ * <li> [2] requesting process uid ({@code Integer}).
+ */
+ public static final int TAG_KEY_GENERATED =
+ SecurityLogTags.SECURITY_KEY_GENERATED;
+
+ /**
+ * Indicates that a cryptographic key was imported. The log entry contains the following
+ * information about the event, encapsulated in an {@link Object} array and accessible via
+ * {@link SecurityEvent#getData()}:
+ * <li> [0] result ({@code Integer}, 0 if operation failed, 1 if succeeded)
+ * <li> [1] alias of the key ({@code String})
+ * <li> [2] requesting process uid ({@code Integer}).
+ */
+ public static final int TAG_KEY_IMPORT = SecurityLogTags.SECURITY_KEY_IMPORTED;
+
+ /**
+ * Indicates that a cryptographic key was destroyed. The log entry contains the following
+ * information about the event, encapsulated in an {@link Object} array and accessible via
+ * {@link SecurityEvent#getData()}:
+ * <li> [0] result ({@code Integer}, 0 if operation failed, 1 if succeeded)
+ * <li> [1] alias of the key ({@code String})
+ * <li> [2] requesting process uid ({@code Integer}).
+ */
+ public static final int TAG_KEY_DESTRUCTION = SecurityLogTags.SECURITY_KEY_DESTROYED;
+
+ /**
+ * Indicates that a new root certificate has been installed into system's trusted credential
+ * storage. The log entry contains the following information about the event, encapsulated in an
+ * {@link Object} array and accessible via {@link SecurityEvent#getData()}:
+ * <li> [0] result ({@code Integer}, 0 if operation failed, 1 if succeeded)
+ * <li> [1] subject of the certificate ({@code String}).
+ */
+ public static final int TAG_CERT_AUTHORITY_INSTALLED =
+ SecurityLogTags.SECURITY_CERT_AUTHORITY_INSTALLED;
+
+ /**
+ * Indicates that a new oot certificate has been removed from system's trusted credential
+ * storage. The log entry contains the following information about the event, encapsulated in an
+ * {@link Object} array and accessible via {@link SecurityEvent#getData()}:
+ * <li> [0] result ({@code Integer}, 0 if operation failed, 1 if succeeded)
+ * <li> [1] subject of the certificate ({@code String}).
+ */
+ public static final int TAG_CERT_AUTHORITY_REMOVED =
+ SecurityLogTags.SECURITY_CERT_AUTHORITY_REMOVED;
+
+ /**
+ * Indicates that an admin has set a user restriction. The log entry contains the following
+ * information about the event, encapsulated in an {@link Object} array and accessible via
+ * {@link SecurityEvent#getData()}:
+ * <li> [0] admin package name ({@code String})
+ * <li> [1] admin user ID ({@code Integer})
+ * <li> [2] user restriction ({@code String})
+ * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
+ */
+ public static final int TAG_USER_RESTRICTION_ADDED =
+ SecurityLogTags.SECURITY_USER_RESTRICTION_ADDED;
+
+ /**
+ * Indicates that an admin has removed a user restriction. The log entry contains the following
+ * information about the event, encapsulated in an {@link Object} array and accessible via
+ * {@link SecurityEvent#getData()}:
+ * <li> [0] admin package name ({@code String})
+ * <li> [1] admin user ID ({@code Integer})
+ * <li> [2] user restriction ({@code String})
+ * @see DevicePolicyManager#clearUserRestriction(ComponentName, String)
+ */
+ public static final int TAG_USER_RESTRICTION_REMOVED =
+ SecurityLogTags.SECURITY_USER_RESTRICTION_REMOVED;
+
+ /**
+ * Event severity level indicating that the event corresponds to normal workflow.
+ */
+ public static final int LEVEL_INFO = 1;
+
+ /**
+ * Event severity level indicating that the event may require admin attention.
+ */
+ public static final int LEVEL_WARNING = 2;
+
+ /**
+ * Event severity level indicating that the event requires urgent admin action.
+ */
+ public static final int LEVEL_ERROR = 3;
+
+ /**
* Returns if security logging is enabled. Log producers should only write new logs if this is
* true. Under the hood this is the logical AND of whether device owner exists and whether
* it enables logging by setting the system property {@link #PROPERTY_LOGGING_ENABLED}.
@@ -198,6 +502,60 @@
return mId;
}
+ /**
+ * Returns severity level for the event.
+ */
+ public @SecurityLogLevel int getLogLevel() {
+ switch (mEvent.getTag()) {
+ case TAG_ADB_SHELL_INTERACTIVE:
+ case TAG_ADB_SHELL_CMD:
+ case TAG_SYNC_RECV_FILE:
+ case TAG_SYNC_SEND_FILE:
+ case TAG_APP_PROCESS_START:
+ case TAG_KEYGUARD_DISMISSED:
+ case TAG_KEYGUARD_SECURED:
+ case TAG_OS_STARTUP:
+ case TAG_OS_SHUTDOWN:
+ case TAG_LOGGING_STARTED:
+ case TAG_LOGGING_STOPPED:
+ case TAG_MEDIA_MOUNT:
+ case TAG_MEDIA_UNMOUNT:
+ case TAG_PASSWORD_EXPIRATION_SET:
+ case TAG_PASSWORD_COMPLEXITY_SET:
+ case TAG_PASSWORD_HISTORY_LENGTH_SET:
+ case TAG_MAX_SCREEN_LOCK_TIMEOUT_SET:
+ case TAG_MAX_PASSWORD_ATTEMPTS_SET:
+ case TAG_USER_RESTRICTION_ADDED:
+ case TAG_USER_RESTRICTION_REMOVED:
+ return LEVEL_INFO;
+ case TAG_CERT_AUTHORITY_REMOVED:
+ return getSuccess() ? LEVEL_INFO : LEVEL_ERROR;
+ case TAG_CERT_AUTHORITY_INSTALLED:
+ case TAG_KEYGUARD_DISMISS_AUTH_ATTEMPT:
+ case TAG_KEY_IMPORT:
+ case TAG_KEY_DESTRUCTION:
+ case TAG_KEY_GENERATED:
+ return getSuccess() ? LEVEL_INFO : LEVEL_WARNING;
+ case TAG_LOG_BUFFER_SIZE_CRITICAL:
+ case TAG_WIPE_FAILURE:
+ return LEVEL_ERROR;
+ default:
+ return LEVEL_INFO;
+ }
+ }
+
+ // Success/failure if present is encoded as an integer in the first (0th) element of data.
+ private boolean getSuccess() {
+ final Object data = getData();
+ if (data == null || !(data instanceof Object[])) {
+ return false;
+ }
+
+ final Object[] array = (Object[]) data;
+ return array.length >= 1 && array[0] instanceof Integer && (Integer) array[0] != 0;
+ }
+
+
@Override
public int describeContents() {
return 0;
@@ -263,8 +621,8 @@
throws IOException;
/**
- * Retrieve all security logs whose timestamp (in nanosceonds) is equal to or greater than the
- * given timestamp. This method will block until either the last log earlier than the given
+ * Retrieve all security logs whose timestamp is equal to or greater than the given timestamp in
+ * nanoseconds. This method will block until either the last log earlier than the given
* timestamp is about to be pruned, or after a 2-hour timeout has passed.
* @hide
*/
diff --git a/core/java/android/app/admin/SecurityLogTags.logtags b/core/java/android/app/admin/SecurityLogTags.logtags
index 39371c7..be62678 100644
--- a/core/java/android/app/admin/SecurityLogTags.logtags
+++ b/core/java/android/app/admin/SecurityLogTags.logtags
@@ -10,3 +10,28 @@
210006 security_keyguard_dismissed
210007 security_keyguard_dismiss_auth_attempt (success|1),(method_strength|1)
210008 security_keyguard_secured
+
+# Additional event types for NIAP MDFPP 3.1 compliant audit logging.
+
+210009 security_os_startup (boot_state|3),(verity_mode|3)
+210010 security_os_shutdown
+210011 security_logging_started
+210012 security_logging_stopped
+210013 security_media_mounted (path|3),(label|3)
+210014 security_media_unmounted (path|3),(label|3)
+210015 security_log_buffer_size_critical
+210016 security_password_expiration_set (package|3),(admin_user|1),(target_user|1),(timeout|2|3)
+210017 security_password_complexity_set (package|3),(admin_user|1),(target_user|1),(length|1),(quality|1),(num_letters|1),(num_non_letters|1),(num_numeric|1),(num_uppercase|1),(num_lowercase|1),(num_symbols|1)
+210018 security_password_history_length_set (package|3),(admin_user|1),(target_user|1),(length|1)
+210019 security_max_screen_lock_timeout_set (package|3),(admin_user|1),(target_user|1),(timeout|2|3)
+210020 security_max_password_attempts_set (package|3),(admin_user|1),(target_user|1),(num_failures|1)
+210021 security_keyguard_disabled_features_set (package|3),(admin_user|1),(target_user|1),(features|1)
+210022 security_remote_lock (package|3),(admin_user|1),(target_user|1)
+210023 security_wipe_failed (package|3),(admin_user|1)
+210024 security_key_generated (success|1),(key_id|3),(uid|1)
+210025 security_key_imported (success|1),(key_id|3),(uid|1)
+210026 security_key_destroyed (success|1),(key_id|3),(uid|1)
+210027 security_user_restriction_added (package|3),(admin_user|1),(restriction|3)
+210028 security_user_restriction_removed (package|3),(admin_user|1),(restriction|3)
+210029 security_cert_authority_installed (success|1),(subject|3)
+210030 security_cert_authority_removed (success|1),(subject|3)
\ No newline at end of file
diff --git a/core/java/android/app/admin/SystemUpdatePolicy.java b/core/java/android/app/admin/SystemUpdatePolicy.java
index 232a688..05d3fd9 100644
--- a/core/java/android/app/admin/SystemUpdatePolicy.java
+++ b/core/java/android/app/admin/SystemUpdatePolicy.java
@@ -16,16 +16,27 @@
package android.app.admin;
+import static org.xmlpull.v1.XmlPullParser.END_DOCUMENT;
+import static org.xmlpull.v1.XmlPullParser.END_TAG;
+import static org.xmlpull.v1.XmlPullParser.TEXT;
+
import android.annotation.IntDef;
import android.os.Parcel;
import android.os.Parcelable;
+import android.util.Log;
+import android.util.Pair;
import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlSerializer;
import java.io.IOException;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.time.LocalDate;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
/**
* A class that represents a local system update policy set by the device owner.
@@ -34,6 +45,7 @@
* @see DevicePolicyManager#getSystemUpdatePolicy
*/
public class SystemUpdatePolicy implements Parcelable {
+ private static final String TAG = "SystemUpdatePolicy";
/** @hide */
@IntDef(prefix = { "TYPE_" }, value = {
@@ -94,20 +106,157 @@
private static final String KEY_POLICY_TYPE = "policy_type";
private static final String KEY_INSTALL_WINDOW_START = "install_window_start";
private static final String KEY_INSTALL_WINDOW_END = "install_window_end";
+ private static final String KEY_FREEZE_TAG = "freeze";
+ private static final String KEY_FREEZE_START = "start";
+ private static final String KEY_FREEZE_END = "end";
+
/**
* The upper boundary of the daily maintenance window: 24 * 60 minutes.
*/
private static final int WINDOW_BOUNDARY = 24 * 60;
+ /**
+ * The maximum length of a single freeze period: 90 days.
+ */
+ static final int FREEZE_PERIOD_MAX_LENGTH = 90;
+
+ /**
+ * The minimum allowed time between two adjacent freeze period (from the end of the first
+ * freeze period to the start of the second freeze period, both exclusive): 60 days.
+ */
+ static final int FREEZE_PERIOD_MIN_SEPARATION = 60;
+
+
+ /**
+ * An exception class that represents various validation errors thrown from
+ * {@link SystemUpdatePolicy#setFreezePeriods} and
+ * {@link DevicePolicyManager#setSystemUpdatePolicy}
+ */
+ public static final class ValidationFailedException extends IllegalArgumentException
+ implements Parcelable {
+
+ /** @hide */
+ @IntDef(prefix = { "ERROR_" }, value = {
+ ERROR_NONE,
+ ERROR_DUPLICATE_OR_OVERLAP,
+ ERROR_NEW_FREEZE_PERIOD_TOO_LONG,
+ ERROR_NEW_FREEZE_PERIOD_TOO_CLOSE,
+ ERROR_COMBINED_FREEZE_PERIOD_TOO_LONG,
+ ERROR_COMBINED_FREEZE_PERIOD_TOO_CLOSE,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ @interface ValidationFailureType {}
+
+ /** @hide */
+ public static final int ERROR_NONE = 0;
+
+ /**
+ * The freeze periods contains duplicates, periods that overlap with each
+ * other or periods whose start and end joins.
+ */
+ public static final int ERROR_DUPLICATE_OR_OVERLAP = 1;
+
+ /**
+ * There exists at least one freeze period whose length exceeds 90 days.
+ */
+ public static final int ERROR_NEW_FREEZE_PERIOD_TOO_LONG = 2;
+
+ /**
+ * There exists some freeze period which starts within 60 days of the preceding period's
+ * end time.
+ */
+ public static final int ERROR_NEW_FREEZE_PERIOD_TOO_CLOSE = 3;
+
+ /**
+ * The device has been in a freeze period and when combining with the new freeze period
+ * to be set, it will result in the total freeze period being longer than 90 days.
+ */
+ public static final int ERROR_COMBINED_FREEZE_PERIOD_TOO_LONG = 4;
+
+ /**
+ * The device has been in a freeze period and some new freeze period to be set is less
+ * than 60 days from the end of the last freeze period the device went through.
+ */
+ public static final int ERROR_COMBINED_FREEZE_PERIOD_TOO_CLOSE = 5;
+
+ @ValidationFailureType
+ private final int mErrorCode;
+
+ private ValidationFailedException(int errorCode, String message) {
+ super(message);
+ mErrorCode = errorCode;
+ }
+
+ /**
+ * Returns the type of validation error associated with this exception.
+ */
+ public @ValidationFailureType int getErrorCode() {
+ return mErrorCode;
+ }
+
+ /** @hide */
+ public static ValidationFailedException duplicateOrOverlapPeriods() {
+ return new ValidationFailedException(ERROR_DUPLICATE_OR_OVERLAP,
+ "Found duplicate or overlapping periods");
+ }
+
+ /** @hide */
+ public static ValidationFailedException freezePeriodTooLong(String message) {
+ return new ValidationFailedException(ERROR_NEW_FREEZE_PERIOD_TOO_LONG, message);
+ }
+
+ /** @hide */
+ public static ValidationFailedException freezePeriodTooClose(String message) {
+ return new ValidationFailedException(ERROR_NEW_FREEZE_PERIOD_TOO_CLOSE, message);
+ }
+
+ /** @hide */
+ public static ValidationFailedException combinedPeriodTooLong(String message) {
+ return new ValidationFailedException(ERROR_COMBINED_FREEZE_PERIOD_TOO_LONG, message);
+ }
+
+ /** @hide */
+ public static ValidationFailedException combinedPeriodTooClose(String message) {
+ return new ValidationFailedException(ERROR_COMBINED_FREEZE_PERIOD_TOO_CLOSE, message);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(mErrorCode);
+ dest.writeString(getMessage());
+ }
+
+ public static final Parcelable.Creator<ValidationFailedException> CREATOR =
+ new Parcelable.Creator<ValidationFailedException>() {
+ @Override
+ public ValidationFailedException createFromParcel(Parcel source) {
+ return new ValidationFailedException(source.readInt(), source.readString());
+ }
+
+ @Override
+ public ValidationFailedException[] newArray(int size) {
+ return new ValidationFailedException[size];
+ }
+
+ };
+ }
+
@SystemUpdatePolicyType
private int mPolicyType;
private int mMaintenanceWindowStart;
private int mMaintenanceWindowEnd;
+ private final ArrayList<FreezeInterval> mFreezePeriods;
private SystemUpdatePolicy() {
mPolicyType = TYPE_UNKNOWN;
+ mFreezePeriods = new ArrayList<>();
}
/**
@@ -206,24 +355,129 @@
}
/**
- * Return if this object represents a valid policy.
+ * Return if this object represents a valid policy with:
+ * 1. Correct type
+ * 2. Valid maintenance window if applicable
+ * 3. Valid freeze periods
* @hide
*/
public boolean isValid() {
- if (mPolicyType == TYPE_INSTALL_AUTOMATIC || mPolicyType == TYPE_POSTPONE) {
+ try {
+ validateType();
+ validateFreezePeriods();
return true;
- } else if (mPolicyType == TYPE_INSTALL_WINDOWED) {
- return mMaintenanceWindowStart >= 0 && mMaintenanceWindowStart < WINDOW_BOUNDARY
- && mMaintenanceWindowEnd >= 0 && mMaintenanceWindowEnd < WINDOW_BOUNDARY;
- } else {
+ } catch (IllegalArgumentException e) {
return false;
}
}
+ /**
+ * Validate the type and maintenance window (if applicable) of this policy object,
+ * throws {@link IllegalArgumentException} if it's invalid.
+ * @hide
+ */
+ public void validateType() {
+ if (mPolicyType == TYPE_INSTALL_AUTOMATIC || mPolicyType == TYPE_POSTPONE) {
+ return;
+ } else if (mPolicyType == TYPE_INSTALL_WINDOWED) {
+ if (!(mMaintenanceWindowStart >= 0 && mMaintenanceWindowStart < WINDOW_BOUNDARY
+ && mMaintenanceWindowEnd >= 0 && mMaintenanceWindowEnd < WINDOW_BOUNDARY)) {
+ throw new IllegalArgumentException("Invalid maintenance window");
+ }
+ } else {
+ throw new IllegalArgumentException("Invalid system update policy type.");
+ }
+ }
+
+ /**
+ * Configure a list of freeze periods on top of the current policy. When the device's clock is
+ * within any of the freeze periods, all incoming system updates including security patches will
+ * be blocked and cannot be installed. When the device is outside the freeze periods, the normal
+ * policy behavior will apply.
+ * <p>
+ * Each freeze period is defined by a starting and finishing date (both inclusive). Since the
+ * freeze period repeats annually, both of these dates are simply represented by integers
+ * counting the number of days since year start, similar to {@link LocalDate#getDayOfYear()}. We
+ * do not consider leap year when handling freeze period so the valid range of the integer is
+ * always [1,365] (see last section for more details on leap year). If the finishing date is
+ * smaller than the starting date, the freeze period is considered to be spanning across
+ * year-end.
+ * <p>
+ * Each individual freeze period is allowed to be at most 90 days long, and adjacent freeze
+ * periods need to be at least 60 days apart. Also, the list of freeze periods should not
+ * contain duplicates or overlap with each other. If any of these conditions is not met, a
+ * {@link ValidationFailedException} will be thrown.
+ * <p>
+ * Handling of leap year: we do not consider leap year when handling freeze period, in
+ * particular,
+ * <ul>
+ * <li>When a freeze period is defined by the day of year, February 29th does not count as one
+ * day, so day 59 is February 28th while day 60 is March 1st.</li>
+ * <li>When applying freeze period behavior to the device, a system clock of February 29th is
+ * treated as if it were February 28th</li>
+ * <li>When calculating the number of days of a freeze period or separation between two freeze
+ * periods, February 29th is also ignored and not counted as one day.</li>
+ * </ul>
+ *
+ * @param freezePeriods the list of freeze periods
+ * @throws ValidationFailedException if the supplied freeze periods do not meet the
+ * requirement set above
+ * @return this instance
+ */
+ public SystemUpdatePolicy setFreezePeriods(List<Pair<Integer, Integer>> freezePeriods) {
+ List<FreezeInterval> newPeriods = freezePeriods.stream().map(
+ p -> new FreezeInterval(p.first, p.second)).collect(Collectors.toList());
+ FreezeInterval.validatePeriods(newPeriods);
+ mFreezePeriods.clear();
+ mFreezePeriods.addAll(newPeriods);
+ return this;
+ }
+
+ /**
+ * Returns the list of freeze periods previously set on this system update policy object.
+ *
+ * @return the list of freeze periods, or an empty list if none was set.
+ */
+ public List<Pair<Integer, Integer>> getFreezePeriods() {
+ List<Pair<Integer, Integer>> result = new ArrayList<>(mFreezePeriods.size());
+ for (FreezeInterval interval : mFreezePeriods) {
+ result.add(new Pair<>(interval.mStartDay, interval.mEndDay));
+ }
+ return result;
+ }
+
+ /**
+ * Returns the real calendar dates of the current freeze period, or null if the device
+ * is not in a freeze period at the moment.
+ * @hide
+ */
+ public Pair<LocalDate, LocalDate> getCurrentFreezePeriod(LocalDate now) {
+ for (FreezeInterval interval : mFreezePeriods) {
+ if (interval.contains(now)) {
+ return interval.toCurrentOrFutureRealDates(now);
+ }
+ }
+ return null;
+ }
+
+ /** @hide */
+ public void validateFreezePeriods() {
+ FreezeInterval.validatePeriods(mFreezePeriods);
+ }
+
+ /** @hide */
+ public void validateAgainstPreviousFreezePeriod(LocalDate prevPeriodStart,
+ LocalDate prevPeriodEnd, LocalDate now) {
+ FreezeInterval.validateAgainstPreviousFreezePeriod(mFreezePeriods, prevPeriodStart,
+ prevPeriodEnd, now);
+ }
+
@Override
public String toString() {
- return String.format("SystemUpdatePolicy (type: %d, windowStart: %d, windowEnd: %d)",
- mPolicyType, mMaintenanceWindowStart, mMaintenanceWindowEnd);
+ return String.format("SystemUpdatePolicy (type: %d, windowStart: %d, windowEnd: %d, "
+ + "freezes: [%s])",
+ mPolicyType, mMaintenanceWindowStart, mMaintenanceWindowEnd,
+ mFreezePeriods.stream().map(n -> n.toString()).collect(Collectors.joining(",")));
}
@Override
@@ -236,6 +490,13 @@
dest.writeInt(mPolicyType);
dest.writeInt(mMaintenanceWindowStart);
dest.writeInt(mMaintenanceWindowEnd);
+ int freezeCount = mFreezePeriods.size();
+ dest.writeInt(freezeCount);
+ for (int i = 0; i < freezeCount; i++) {
+ FreezeInterval interval = mFreezePeriods.get(i);
+ dest.writeInt(interval.mStartDay);
+ dest.writeInt(interval.mEndDay);
+ }
}
public static final Parcelable.Creator<SystemUpdatePolicy> CREATOR =
@@ -247,6 +508,12 @@
policy.mPolicyType = source.readInt();
policy.mMaintenanceWindowStart = source.readInt();
policy.mMaintenanceWindowEnd = source.readInt();
+ int freezeCount = source.readInt();
+ policy.mFreezePeriods.ensureCapacity(freezeCount);
+ for (int i = 0; i < freezeCount; i++) {
+ policy.mFreezePeriods.add(
+ new FreezeInterval(source.readInt(), source.readInt()));
+ }
return policy;
}
@@ -256,8 +523,10 @@
}
};
-
/**
+ * Restore a previously saved SystemUpdatePolicy from XML. No need to validate
+ * the reconstructed policy since the XML is supposed to be created by the
+ * system server from a validated policy object previously.
* @hide
*/
public static SystemUpdatePolicy restoreFromXml(XmlPullParser parser) {
@@ -275,10 +544,26 @@
if (value != null) {
policy.mMaintenanceWindowEnd = Integer.parseInt(value);
}
+
+ int outerDepth = parser.getDepth();
+ int type;
+ while ((type = parser.next()) != END_DOCUMENT
+ && (type != END_TAG || parser.getDepth() > outerDepth)) {
+ if (type == END_TAG || type == TEXT) {
+ continue;
+ }
+ if (!parser.getName().equals(KEY_FREEZE_TAG)) {
+ continue;
+ }
+ policy.mFreezePeriods.add(new FreezeInterval(
+ Integer.parseInt(parser.getAttributeValue(null, KEY_FREEZE_START)),
+ Integer.parseInt(parser.getAttributeValue(null, KEY_FREEZE_END))));
+ }
return policy;
}
- } catch (NumberFormatException e) {
+ } catch (NumberFormatException | XmlPullParserException | IOException e) {
// Fail through
+ Log.w(TAG, "Load xml failed", e);
}
return null;
}
@@ -290,6 +575,13 @@
out.attribute(null, KEY_POLICY_TYPE, Integer.toString(mPolicyType));
out.attribute(null, KEY_INSTALL_WINDOW_START, Integer.toString(mMaintenanceWindowStart));
out.attribute(null, KEY_INSTALL_WINDOW_END, Integer.toString(mMaintenanceWindowEnd));
+ for (int i = 0; i < mFreezePeriods.size(); i++) {
+ FreezeInterval interval = mFreezePeriods.get(i);
+ out.startTag(null, KEY_FREEZE_TAG);
+ out.attribute(null, KEY_FREEZE_START, Integer.toString(interval.mStartDay));
+ out.attribute(null, KEY_FREEZE_END, Integer.toString(interval.mEndDay));
+ out.endTag(null, KEY_FREEZE_TAG);
+ }
}
}
diff --git a/core/java/android/app/backup/BackupAgent.java b/core/java/android/app/backup/BackupAgent.java
index 861cb9a..72eb494 100644
--- a/core/java/android/app/backup/BackupAgent.java
+++ b/core/java/android/app/backup/BackupAgent.java
@@ -143,6 +143,26 @@
/** @hide */
public static final int TYPE_SYMLINK = 3;
+ /**
+ * Flag for {@link BackupDataOutput#getTransportFlags()} and
+ * {@link FullBackupDataOutput#getTransportFlags()} only.
+ *
+ * <p>The transport has client-side encryption enabled. i.e., the user's backup has been
+ * encrypted with a key known only to the device, and not to the remote storage solution. Even
+ * if an attacker had root access to the remote storage provider they should not be able to
+ * decrypt the user's backup data.
+ */
+ public static final int FLAG_CLIENT_SIDE_ENCRYPTION_ENABLED = 1;
+
+ /**
+ * Flag for {@link BackupDataOutput#getTransportFlags()} and
+ * {@link FullBackupDataOutput#getTransportFlags()} only.
+ *
+ * <p>The transport is for a device-to-device transfer. There is no third party or intermediate
+ * storage. The user's backup data is sent directly to another device over e.g., USB or WiFi.
+ */
+ public static final int FLAG_DEVICE_TO_DEVICE_TRANSFER = 2;
+
Handler mHandler = null;
Handler getHandler() {
@@ -920,12 +940,14 @@
public void doBackup(ParcelFileDescriptor oldState,
ParcelFileDescriptor data,
ParcelFileDescriptor newState,
- long quotaBytes, int token, IBackupManager callbackBinder) throws RemoteException {
+ long quotaBytes, int token, IBackupManager callbackBinder, int transportFlags)
+ throws RemoteException {
// Ensure that we're running with the app's normal permission level
long ident = Binder.clearCallingIdentity();
if (DEBUG) Log.v(TAG, "doBackup() invoked");
- BackupDataOutput output = new BackupDataOutput(data.getFileDescriptor(), quotaBytes);
+ BackupDataOutput output = new BackupDataOutput(
+ data.getFileDescriptor(), quotaBytes, transportFlags);
try {
BackupAgent.this.onBackup(oldState, output, newState);
@@ -999,7 +1021,7 @@
@Override
public void doFullBackup(ParcelFileDescriptor data,
- long quotaBytes, int token, IBackupManager callbackBinder) {
+ long quotaBytes, int token, IBackupManager callbackBinder, int transportFlags) {
// Ensure that we're running with the app's normal permission level
long ident = Binder.clearCallingIdentity();
@@ -1010,7 +1032,8 @@
waitForSharedPrefs();
try {
- BackupAgent.this.onFullBackup(new FullBackupDataOutput(data, quotaBytes));
+ BackupAgent.this.onFullBackup(new FullBackupDataOutput(
+ data, quotaBytes, transportFlags));
} catch (IOException ex) {
Log.d(TAG, "onFullBackup (" + BackupAgent.this.getClass().getName() + ") threw", ex);
throw new RuntimeException(ex);
@@ -1044,10 +1067,12 @@
}
}
- public void doMeasureFullBackup(long quotaBytes, int token, IBackupManager callbackBinder) {
+ public void doMeasureFullBackup(long quotaBytes, int token, IBackupManager callbackBinder,
+ int transportFlags) {
// Ensure that we're running with the app's normal permission level
final long ident = Binder.clearCallingIdentity();
- FullBackupDataOutput measureOutput = new FullBackupDataOutput(quotaBytes);
+ FullBackupDataOutput measureOutput =
+ new FullBackupDataOutput(quotaBytes, transportFlags);
waitForSharedPrefs();
try {
diff --git a/core/java/android/app/backup/BackupDataOutput.java b/core/java/android/app/backup/BackupDataOutput.java
index c7586a2..5a66f34 100644
--- a/core/java/android/app/backup/BackupDataOutput.java
+++ b/core/java/android/app/backup/BackupDataOutput.java
@@ -18,6 +18,7 @@
import android.annotation.SystemApi;
import android.os.ParcelFileDescriptor;
+
import java.io.FileDescriptor;
import java.io.IOException;
@@ -62,7 +63,10 @@
* @see BackupAgent
*/
public class BackupDataOutput {
- final long mQuota;
+
+ private final long mQuota;
+ private final int mTransportFlags;
+
long mBackupWriter;
/**
@@ -71,14 +75,20 @@
* @hide */
@SystemApi
public BackupDataOutput(FileDescriptor fd) {
- this(fd, -1);
+ this(fd, /*quota=*/ -1, /*transportFlags=*/ 0);
}
/** @hide */
@SystemApi
public BackupDataOutput(FileDescriptor fd, long quota) {
+ this(fd, quota, /*transportFlags=*/ 0);
+ }
+
+ /** @hide */
+ public BackupDataOutput(FileDescriptor fd, long quota, int transportFlags) {
if (fd == null) throw new NullPointerException();
mQuota = quota;
+ mTransportFlags = transportFlags;
mBackupWriter = ctor(fd);
if (mBackupWriter == 0) {
throw new RuntimeException("Native initialization failed with fd=" + fd);
@@ -96,6 +106,16 @@
}
/**
+ * Returns flags with additional information about the backup transport. For supported flags see
+ * {@link android.app.backup.BackupAgent}
+ *
+ * @see FullBackupDataOutput#getTransportFlags()
+ */
+ public int getTransportFlags() {
+ return mTransportFlags;
+ }
+
+ /**
* Mark the beginning of one record in the backup data stream. This must be called before
* {@link #writeEntityData}.
* @param key A string key that uniquely identifies the data record within the application.
diff --git a/core/java/android/app/backup/BackupManager.java b/core/java/android/app/backup/BackupManager.java
index 12f4483..6ec0969 100644
--- a/core/java/android/app/backup/BackupManager.java
+++ b/core/java/android/app/backup/BackupManager.java
@@ -252,6 +252,8 @@
}
/**
+ * @deprecated Since Android P app can no longer request restoring of its backup.
+ *
* Restore the calling application from backup. The data will be restored from the
* current backup dataset if the application has stored data there, or from
* the dataset used during the last full device setup operation if the current
@@ -269,6 +271,7 @@
*
* @return Zero on success; nonzero on error.
*/
+ @Deprecated
public int requestRestore(RestoreObserver observer) {
return requestRestore(observer, null);
}
@@ -276,6 +279,8 @@
// system APIs start here
/**
+ * @deprecated Since Android P app can no longer request restoring of its backup.
+ *
* Restore the calling application from backup. The data will be restored from the
* current backup dataset if the application has stored data there, or from
* the dataset used during the last full device setup operation if the current
@@ -298,28 +303,12 @@
*
* @hide
*/
+ @Deprecated
@SystemApi
public int requestRestore(RestoreObserver observer, BackupManagerMonitor monitor) {
- int result = -1;
- checkServiceBinder();
- if (sService != null) {
- RestoreSession session = null;
- try {
- IRestoreSession binder = sService.beginRestoreSession(mContext.getPackageName(),
- null);
- if (binder != null) {
- session = new RestoreSession(mContext, binder);
- result = session.restorePackage(mContext.getPackageName(), observer, monitor);
- }
- } catch (RemoteException e) {
- Log.e(TAG, "restoreSelf() unable to contact service");
- } finally {
- if (session != null) {
- session.endRestoreSession();
- }
- }
- }
- return result;
+ Log.w(TAG, "requestRestore(): Since Android P app can no longer request restoring"
+ + " of its backup.");
+ return -1;
}
/**
diff --git a/core/java/android/app/backup/BackupManagerMonitor.java b/core/java/android/app/backup/BackupManagerMonitor.java
index ae4a98a..07e7688a 100644
--- a/core/java/android/app/backup/BackupManagerMonitor.java
+++ b/core/java/android/app/backup/BackupManagerMonitor.java
@@ -172,6 +172,11 @@
public static final int LOG_EVENT_ID_NO_PACKAGES = 49;
public static final int LOG_EVENT_ID_TRANSPORT_IS_NULL = 50;
+ /**
+ * The transport returned {@link BackupTransport#TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED}.
+ */
+ public static final int LOG_EVENT_ID_TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED = 51;
+
diff --git a/core/java/android/app/backup/BackupTransport.java b/core/java/android/app/backup/BackupTransport.java
index 3558e34..f456395 100644
--- a/core/java/android/app/backup/BackupTransport.java
+++ b/core/java/android/app/backup/BackupTransport.java
@@ -51,6 +51,18 @@
public static final int AGENT_UNKNOWN = -1004;
public static final int TRANSPORT_QUOTA_EXCEEDED = -1005;
+ /**
+ * Indicates that the transport cannot accept a diff backup for this package.
+ *
+ * <p>Backup manager should clear its state for this package and immediately retry a
+ * non-incremental backup. This might be used if the transport no longer has data for this
+ * package in its backing store.
+ *
+ * <p>This is only valid when backup manager called {@link
+ * #performBackup(PackageInfo, ParcelFileDescriptor, int)} with {@link #FLAG_INCREMENTAL}.
+ */
+ public static final int TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED = -1006;
+
// Indicates that operation was initiated by user, not a scheduled one.
// Transport should ignore its own moratoriums for call with this flag set.
public static final int FLAG_USER_INITIATED = 1;
@@ -59,7 +71,7 @@
* For key value backup, indicates that the backup data is a diff from a previous backup. The
* transport must apply this diff to an existing backup to build the new backup set.
*
- * @hide
+ * @see #performBackup(PackageInfo, ParcelFileDescriptor, int)
*/
public static final int FLAG_INCREMENTAL = 1 << 1;
@@ -67,7 +79,7 @@
* For key value backup, indicates that the backup data is a complete set, not a diff from a
* previous backup. The transport should clear any previous backup when storing this backup.
*
- * @hide
+ * @see #performBackup(PackageInfo, ParcelFileDescriptor, int)
*/
public static final int FLAG_NON_INCREMENTAL = 1 << 2;
@@ -252,6 +264,13 @@
* set then {@link BackupTransport#FLAG_NON_INCREMENTAL} will be set. Before P neither flag will
* be set regardless of whether the backup is incremental or not.
*
+ * <p>If {@link BackupTransport#FLAG_INCREMENTAL} is set and the transport does not have data
+ * for this package in its storage backend then it cannot apply the incremental diff. Thus it
+ * should return {@link BackupTransport#TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED} to indicate
+ * that backup manager should delete its state and retry the package as a non-incremental
+ * backup. Before P, or if this is a non-incremental backup, then this return code is equivalent
+ * to {@link BackupTransport#TRANSPORT_ERROR}.
+ *
* @param packageInfo The identity of the application whose data is being backed up.
* This specifically includes the signature list for the package.
* @param inFd Descriptor of file with data that resulted from invoking the application's
@@ -262,9 +281,11 @@
* @return one of {@link BackupTransport#TRANSPORT_OK} (OK so far),
* {@link BackupTransport#TRANSPORT_PACKAGE_REJECTED} (to suppress backup of this
* specific package, but allow others to proceed),
- * {@link BackupTransport#TRANSPORT_ERROR} (on network error or other failure), or
- * {@link BackupTransport#TRANSPORT_NOT_INITIALIZED} (if the backend dataset has
- * become lost due to inactivity purge or some other reason and needs re-initializing)
+ * {@link BackupTransport#TRANSPORT_ERROR} (on network error or other failure), {@link
+ * BackupTransport#TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED} (if the transport cannot accept
+ * an incremental backup for this package), or {@link
+ * BackupTransport#TRANSPORT_NOT_INITIALIZED} (if the backend dataset has become lost due to
+ * inactivity purge or some other reason and needs re-initializing)
*/
public int performBackup(PackageInfo packageInfo, ParcelFileDescriptor inFd, int flags) {
return performBackup(packageInfo, inFd);
@@ -586,6 +607,15 @@
}
/**
+ * Returns flags with additional information about the transport, which is accessible to the
+ * {@link android.app.backup.BackupAgent}. This allows the agent to decide what to do based on
+ * properties of the transport.
+ */
+ public int getTransportFlags() {
+ return 0;
+ }
+
+ /**
* Bridge between the actual IBackupTransport implementation and the stable API. If the
* binder interface needs to change, we use this layer to translate so that we can
* (if appropriate) decouple those framework-side changes from the BackupTransport
@@ -717,6 +747,11 @@
}
@Override
+ public int getTransportFlags() {
+ return BackupTransport.this.getTransportFlags();
+ }
+
+ @Override
public int getNextFullRestoreDataChunk(ParcelFileDescriptor socket) {
return BackupTransport.this.getNextFullRestoreDataChunk(socket);
}
diff --git a/core/java/android/app/backup/FullBackupDataOutput.java b/core/java/android/app/backup/FullBackupDataOutput.java
index 5deedd0..18f4283 100644
--- a/core/java/android/app/backup/FullBackupDataOutput.java
+++ b/core/java/android/app/backup/FullBackupDataOutput.java
@@ -11,6 +11,7 @@
// Currently a name-scoping shim around BackupDataOutput
private final BackupDataOutput mData;
private final long mQuota;
+ private final int mTransportFlags;
private long mSize;
/**
@@ -23,22 +24,49 @@
return mQuota;
}
+ /**
+ * Returns flags with additional information about the backup transport. For supported flags see
+ * {@link android.app.backup.BackupAgent}
+ *
+ * @see BackupDataOutput#getTransportFlags()
+ */
+ public int getTransportFlags() {
+ return mTransportFlags;
+ }
+
/** @hide - used only in measure operation */
public FullBackupDataOutput(long quota) {
mData = null;
mQuota = quota;
mSize = 0;
+ mTransportFlags = 0;
+ }
+
+ /** @hide - used only in measure operation */
+ public FullBackupDataOutput(long quota, int transportFlags) {
+ mData = null;
+ mQuota = quota;
+ mSize = 0;
+ mTransportFlags = transportFlags;
}
/** @hide */
public FullBackupDataOutput(ParcelFileDescriptor fd, long quota) {
- mData = new BackupDataOutput(fd.getFileDescriptor(), quota);
+ mData = new BackupDataOutput(fd.getFileDescriptor(), quota, 0);
mQuota = quota;
+ mTransportFlags = 0;
+ }
+
+ /** @hide */
+ public FullBackupDataOutput(ParcelFileDescriptor fd, long quota, int transportFlags) {
+ mData = new BackupDataOutput(fd.getFileDescriptor(), quota, transportFlags);
+ mQuota = quota;
+ mTransportFlags = transportFlags;
}
/** @hide - used only internally to the backup manager service's stream construction */
public FullBackupDataOutput(ParcelFileDescriptor fd) {
- this(fd, -1);
+ this(fd, /*quota=*/ -1, /*transportFlags=*/ 0);
}
/** @hide */
diff --git a/core/java/android/app/job/JobInfo.java b/core/java/android/app/job/JobInfo.java
index cba9dcc..a1ad825c 100644
--- a/core/java/android/app/job/JobInfo.java
+++ b/core/java/android/app/job/JobInfo.java
@@ -256,6 +256,14 @@
public static final int FLAG_IS_PREFETCH = 1 << 2;
/**
+ * This job needs to be exempted from the app standby throttling. Only the system (UID 1000)
+ * can set it. Jobs with a time constrant must not have it.
+ *
+ * @hide
+ */
+ public static final int FLAG_EXEMPT_FROM_APP_STANDBY = 1 << 3;
+
+ /**
* @hide
*/
public static final int CONSTRAINT_FLAG_CHARGING = 1 << 0;
@@ -355,6 +363,13 @@
return flags;
}
+ /** @hide */
+ public boolean isExemptedFromAppStandby() {
+ return ((flags & FLAG_EXEMPT_FROM_APP_STANDBY) != 0)
+ && !hasEarlyConstraint()
+ && !hasLateConstraint();
+ }
+
/**
* Whether this job requires that the device be charging (or be a non-battery-powered
* device connected to permanent power, such as Android TV devices).
diff --git a/core/java/android/app/servertransaction/PendingTransactionActions.java b/core/java/android/app/servertransaction/PendingTransactionActions.java
index 8304c1c..073d28c 100644
--- a/core/java/android/app/servertransaction/PendingTransactionActions.java
+++ b/core/java/android/app/servertransaction/PendingTransactionActions.java
@@ -134,7 +134,7 @@
Bundle.dumpStats(pw, mPersistentState);
if (ex instanceof TransactionTooLargeException
- && mActivity.loadedApk.getTargetSdkVersion() < Build.VERSION_CODES.N) {
+ && mActivity.packageInfo.getTargetSdkVersion() < Build.VERSION_CODES.N) {
Log.e(TAG, "App sent too much data in instance state, so it was ignored", ex);
return;
}
diff --git a/core/java/android/app/slice/Slice.java b/core/java/android/app/slice/Slice.java
index 5808f8b..4c24a2d 100644
--- a/core/java/android/app/slice/Slice.java
+++ b/core/java/android/app/slice/Slice.java
@@ -146,11 +146,6 @@
*/
public static final String HINT_PARTIAL = "partial";
/**
- * A hint representing that this item is the max value possible for the slice containing this.
- * Used to indicate the maximum integer value for a {@link #SUBTYPE_SLIDER}.
- */
- public static final String HINT_MAX = "max";
- /**
* A hint representing that this item should be used to indicate that there's more
* content associated with this slice.
*/
@@ -168,6 +163,10 @@
*/
public static final String EXTRA_TOGGLE_STATE = "android.app.slice.extra.TOGGLE_STATE";
/**
+ * Key to retrieve an extra added to an intent when the value of a slider is changed.
+ */
+ public static final String EXTRA_SLIDER_VALUE = "android.app.slice.extra.SLIDER_VALUE";
+ /**
* Subtype to indicate that this is a message as part of a communication
* sequence in this slice.
*/
@@ -181,10 +180,18 @@
*/
public static final String SUBTYPE_COLOR = "color";
/**
- * Subtype to tag an item represents a slider.
+ * Subtype to tag an item as representing a slider.
*/
public static final String SUBTYPE_SLIDER = "slider";
/**
+ * Subtype to tag an item as representing the max int value for a {@link #SUBTYPE_SLIDER}.
+ */
+ public static final String SUBTYPE_MAX = "max";
+ /**
+ * Subtype to tag an item as representing the current int value for a {@link #SUBTYPE_SLIDER}.
+ */
+ public static final String SUBTYPE_VALUE = "value";
+ /**
* Subtype to indicate that this content has a toggle action associated with it. To indicate
* that the toggle is on, use {@link #HINT_SELECTED}. When the toggle state changes, the
* intent associated with it will be sent along with an extra {@link #EXTRA_TOGGLE_STATE}
diff --git a/core/java/android/app/usage/UsageStatsManagerInternal.java b/core/java/android/app/usage/UsageStatsManagerInternal.java
index bd978e3..5d6a989 100644
--- a/core/java/android/app/usage/UsageStatsManagerInternal.java
+++ b/core/java/android/app/usage/UsageStatsManagerInternal.java
@@ -146,6 +146,14 @@
* allowed to do work even if they're idle or in a low bucket.
*/
public abstract void onParoleStateChanged(boolean isParoleOn);
+
+ /**
+ * Optional callback to inform the listener that the app has transitioned into
+ * an active state due to user interaction.
+ */
+ public void onUserInteractionStarted(String packageName, @UserIdInt int userId) {
+ // No-op by default
+ }
}
/** Backup/Restore API */
@@ -212,4 +220,17 @@
* indicated here before by a call to {@link #setLastJobRunTime(String, int, long)}.
*/
public abstract long getTimeSinceLastJobRun(String packageName, @UserIdInt int userId);
+
+ /**
+ * Report a few data points about an app's job state at the current time.
+ *
+ * @param packageName the app whose job state is being described
+ * @param userId which user the app is associated with
+ * @param numDeferredJobs the number of pending jobs that were deferred
+ * due to bucketing policy
+ * @param timeSinceLastJobRun number of milliseconds since the last time one of
+ * this app's jobs was executed
+ */
+ public abstract void reportAppJobState(String packageName, @UserIdInt int userId,
+ int numDeferredJobs, long timeSinceLastJobRun);
}
diff --git a/core/java/android/bluetooth/BluetoothA2dp.java b/core/java/android/bluetooth/BluetoothA2dp.java
index 35a21a4..b255a43 100644
--- a/core/java/android/bluetooth/BluetoothA2dp.java
+++ b/core/java/android/bluetooth/BluetoothA2dp.java
@@ -300,11 +300,7 @@
}
/**
- * Initiate connection to a profile of the remote bluetooth device.
- *
- * <p> Currently, the system supports only 1 connection to the
- * A2DP profile. The API will automatically disconnect connected
- * devices before connecting.
+ * Initiate connection to a profile of the remote Bluetooth device.
*
* <p> This API returns false in scenarios like the profile on the
* device is already connected or Bluetooth is not turned on.
@@ -699,15 +695,17 @@
/**
* Gets the current codec status (configuration and capability).
*
+ * @param device the remote Bluetooth device. If null, use the current
+ * active A2DP Bluetooth device.
* @return the current codec status
* @hide
*/
- public BluetoothCodecStatus getCodecStatus() {
- if (DBG) Log.d(TAG, "getCodecStatus");
+ public BluetoothCodecStatus getCodecStatus(BluetoothDevice device) {
+ if (DBG) Log.d(TAG, "getCodecStatus(" + device + ")");
try {
mServiceLock.readLock().lock();
if (mService != null && isEnabled()) {
- return mService.getCodecStatus();
+ return mService.getCodecStatus(device);
}
if (mService == null) {
Log.w(TAG, "Proxy not attached to service");
@@ -724,15 +722,18 @@
/**
* Sets the codec configuration preference.
*
+ * @param device the remote Bluetooth device. If null, use the current
+ * active A2DP Bluetooth device.
* @param codecConfig the codec configuration preference
* @hide
*/
- public void setCodecConfigPreference(BluetoothCodecConfig codecConfig) {
- if (DBG) Log.d(TAG, "setCodecConfigPreference");
+ public void setCodecConfigPreference(BluetoothDevice device,
+ BluetoothCodecConfig codecConfig) {
+ if (DBG) Log.d(TAG, "setCodecConfigPreference(" + device + ")");
try {
mServiceLock.readLock().lock();
if (mService != null && isEnabled()) {
- mService.setCodecConfigPreference(codecConfig);
+ mService.setCodecConfigPreference(device, codecConfig);
}
if (mService == null) Log.w(TAG, "Proxy not attached to service");
return;
@@ -747,36 +748,42 @@
/**
* Enables the optional codecs.
*
+ * @param device the remote Bluetooth device. If null, use the currect
+ * active A2DP Bluetooth device.
* @hide
*/
- public void enableOptionalCodecs() {
- if (DBG) Log.d(TAG, "enableOptionalCodecs");
- enableDisableOptionalCodecs(true);
+ public void enableOptionalCodecs(BluetoothDevice device) {
+ if (DBG) Log.d(TAG, "enableOptionalCodecs(" + device + ")");
+ enableDisableOptionalCodecs(device, true);
}
/**
* Disables the optional codecs.
*
+ * @param device the remote Bluetooth device. If null, use the currect
+ * active A2DP Bluetooth device.
* @hide
*/
- public void disableOptionalCodecs() {
- if (DBG) Log.d(TAG, "disableOptionalCodecs");
- enableDisableOptionalCodecs(false);
+ public void disableOptionalCodecs(BluetoothDevice device) {
+ if (DBG) Log.d(TAG, "disableOptionalCodecs(" + device + ")");
+ enableDisableOptionalCodecs(device, false);
}
/**
* Enables or disables the optional codecs.
*
+ * @param device the remote Bluetooth device. If null, use the currect
+ * active A2DP Bluetooth device.
* @param enable if true, enable the optional codecs, other disable them
*/
- private void enableDisableOptionalCodecs(boolean enable) {
+ private void enableDisableOptionalCodecs(BluetoothDevice device, boolean enable) {
try {
mServiceLock.readLock().lock();
if (mService != null && isEnabled()) {
if (enable) {
- mService.enableOptionalCodecs();
+ mService.enableOptionalCodecs(device);
} else {
- mService.disableOptionalCodecs();
+ mService.disableOptionalCodecs(device);
}
}
if (mService == null) Log.w(TAG, "Proxy not attached to service");
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 9f11d6e..bc7823b 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -438,7 +438,7 @@
* Intent used to broadcast the change in connection state of the local
* Bluetooth adapter to a profile of the remote device. When the adapter is
* not connected to any profiles of any remote devices and it attempts a
- * connection to a profile this intent will sent. Once connected, this intent
+ * connection to a profile this intent will be sent. Once connected, this intent
* will not be sent for any more connection attempts to any profiles of any
* remote device. When the adapter disconnects from the last profile its
* connected to of any remote device, this intent will be sent.
diff --git a/core/java/android/content/AbstractThreadedSyncAdapter.java b/core/java/android/content/AbstractThreadedSyncAdapter.java
index 2629929..5a1216b7 100644
--- a/core/java/android/content/AbstractThreadedSyncAdapter.java
+++ b/core/java/android/content/AbstractThreadedSyncAdapter.java
@@ -21,6 +21,7 @@
import android.os.Bundle;
import android.os.IBinder;
import android.os.Process;
+import android.os.RemoteException;
import android.os.Trace;
import android.util.Log;
@@ -166,6 +167,12 @@
private class ISyncAdapterImpl extends ISyncAdapter.Stub {
@Override
+ public void onUnsyncableAccount(ISyncAdapterUnsyncableAccountCallback cb)
+ throws RemoteException {
+ cb.onUnsyncableAccountDone(AbstractThreadedSyncAdapter.this.onUnsyncableAccount());
+ }
+
+ @Override
public void startSync(ISyncContext syncContext, String authority, Account account,
Bundle extras) {
if (ENABLE_LOG) {
@@ -374,6 +381,26 @@
}
/**
+ * Allows to defer syncing until all accounts are properly set up.
+ *
+ * <p>Called when a account / authority pair
+ * <ul>
+ * <li>that can be handled by this adapter</li>
+ * <li>{@link ContentResolver#requestSync(SyncRequest) is synced}</li>
+ * <li>and the account/provider {@link ContentResolver#getIsSyncable(Account, String) has
+ * unknown state (<0)}.</li>
+ * </ul>
+ *
+ * <p>This might be called on a different service connection as {@link #onPerformSync}.
+ *
+ * @return If {@code false} syncing is deferred. Returns {@code true} by default, i.e. by
+ * default syncing starts immediately.
+ */
+ public boolean onUnsyncableAccount() {
+ return true;
+ }
+
+ /**
* Perform a sync for this account. SyncAdapter-specific parameters may
* be specified in extras, which is guaranteed to not be null. Invocations
* of this method are guaranteed to be serialized.
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index f69aab01..f2eb4a0 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -32,6 +32,7 @@
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UserIdInt;
+import android.app.ActivityManager;
import android.app.IApplicationThread;
import android.app.IServiceConnection;
import android.app.VrManager;
@@ -1834,13 +1835,17 @@
* See {@link android.content.Context#startActivity(Intent, Bundle)}
* Context.startActivity(Intent, Bundle)} for more details.
*
+ * @return The corresponding flag {@link ActivityManager#START_CANCELED},
+ * {@link ActivityManager#START_SUCCESS} etc. indicating whether the launch was
+ * successful.
+ *
* @throws ActivityNotFoundException
*
* @see #startActivities(Intent[])
* @see PackageManager#resolveActivity
*/
@RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL)
- public void startActivitiesAsUser(Intent[] intents, Bundle options, UserHandle userHandle) {
+ public int startActivitiesAsUser(Intent[] intents, Bundle options, UserHandle userHandle) {
throw new RuntimeException("Not implemented. Must override in a subclass.");
}
@@ -4121,7 +4126,7 @@
public static final String STATS_COMPANION_SERVICE = "statscompanion";
/**
- * Use with {@link #getSystemService(String)} to retrieve an {@link android.stats.StatsManager}.
+ * Use with {@link #getSystemService(String)} to retrieve an {@link android.app.StatsManager}.
* @hide
*/
@SystemApi
@@ -4165,6 +4170,16 @@
public static final String CROSS_PROFILE_APPS_SERVICE = "crossprofileapps";
/**
+ * Use with {@link #getSystemService} to retrieve a
+ * {@link android.se.omapi.ISecureElementService}
+ * for accessing the SecureElementService.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String SECURE_ELEMENT_SERVICE = "secure_element";
+
+ /**
* Determine whether the given permission is allowed for a particular
* process and user ID running in the system.
*
diff --git a/core/java/android/content/ContextWrapper.java b/core/java/android/content/ContextWrapper.java
index 67de4fe..8c1293e 100644
--- a/core/java/android/content/ContextWrapper.java
+++ b/core/java/android/content/ContextWrapper.java
@@ -418,8 +418,8 @@
/** @hide */
@Override
- public void startActivitiesAsUser(Intent[] intents, Bundle options, UserHandle userHandle) {
- mBase.startActivitiesAsUser(intents, options, userHandle);
+ public int startActivitiesAsUser(Intent[] intents, Bundle options, UserHandle userHandle) {
+ return mBase.startActivitiesAsUser(intents, options, userHandle);
}
@Override
diff --git a/core/java/android/content/ISyncAdapter.aidl b/core/java/android/content/ISyncAdapter.aidl
index 4660527..0eb581e 100644
--- a/core/java/android/content/ISyncAdapter.aidl
+++ b/core/java/android/content/ISyncAdapter.aidl
@@ -19,6 +19,7 @@
import android.accounts.Account;
import android.os.Bundle;
import android.content.ISyncContext;
+import android.content.ISyncAdapterUnsyncableAccountCallback;
/**
* Interface used to control the sync activity on a SyncAdapter
@@ -26,6 +27,14 @@
*/
oneway interface ISyncAdapter {
/**
+ * Called before {@link #startSync}. This allows the adapter to defer syncs until the
+ * adapter is ready for the account
+ *
+ * @param cb If called back with {@code false} accounts are not synced.
+ */
+ void onUnsyncableAccount(ISyncAdapterUnsyncableAccountCallback cb);
+
+ /**
* Initiate a sync for this account. SyncAdapter-specific parameters may
* be specified in extras, which is guaranteed to not be null.
*
diff --git a/core/java/android/content/ISyncAdapterUnsyncableAccountCallback.aidl b/core/java/android/content/ISyncAdapterUnsyncableAccountCallback.aidl
new file mode 100644
index 0000000..a738ac2
--- /dev/null
+++ b/core/java/android/content/ISyncAdapterUnsyncableAccountCallback.aidl
@@ -0,0 +1,30 @@
+/*
+ * 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;
+
+/**
+ * Callback for {@link ISyncAdapter#onUnsyncableAccount}
+ * @hide
+ */
+oneway interface ISyncAdapterUnsyncableAccountCallback {
+ /**
+ * Deliver the result for {@link ISyncAdapter#onUnsyncableAccount}
+ *
+ * @param isReady Iff {@code false} account is not synced.
+ */
+ void onUnsyncableAccountDone(boolean isReady);
+}
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index acbdf14..b3c8737 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -50,6 +50,7 @@
import android.provider.DocumentsProvider;
import android.provider.MediaStore;
import android.provider.OpenableColumns;
+import android.text.TextUtils;
import android.util.ArraySet;
import android.util.AttributeSet;
import android.util.Log;
@@ -4472,7 +4473,15 @@
public static final String EXTRA_INSTANT_APP_ACTION = "android.intent.extra.INSTANT_APP_ACTION";
/**
- * A {@link Bundle} of metadata that describes the instanta application that needs to be
+ * An array of {@link Bundle}s containing details about resolved instant apps..
+ * @hide
+ */
+ @SystemApi
+ public static final String EXTRA_INSTANT_APP_BUNDLES =
+ "android.intent.extra.INSTANT_APP_BUNDLES";
+
+ /**
+ * A {@link Bundle} of metadata that describes the instant application that needs to be
* installed. This data is populated from the response to
* {@link android.content.pm.InstantAppResolveInfo#getExtras()} as provided by the registered
* instant application resolver.
@@ -4482,6 +4491,16 @@
"android.intent.extra.INSTANT_APP_EXTRAS";
/**
+ * A boolean value indicating that the instant app resolver was unable to state with certainty
+ * that it did or did not have an app for the sanitized {@link Intent} defined at
+ * {@link #EXTRA_INTENT}.
+ * @hide
+ */
+ @SystemApi
+ public static final String EXTRA_UNKNOWN_INSTANT_APP =
+ "android.intent.extra.UNKNOWN_INSTANT_APP";
+
+ /**
* The version code of the app to install components from.
* @deprecated Use {@link #EXTRA_LONG_VERSION_CODE).
* @hide
@@ -5029,6 +5048,7 @@
FLAG_GRANT_PREFIX_URI_PERMISSION,
FLAG_DEBUG_TRIAGED_MISSING,
FLAG_IGNORE_EPHEMERAL,
+ FLAG_ACTIVITY_MATCH_EXTERNAL,
FLAG_ACTIVITY_NO_HISTORY,
FLAG_ACTIVITY_SINGLE_TOP,
FLAG_ACTIVITY_NEW_TASK,
@@ -5072,6 +5092,7 @@
FLAG_INCLUDE_STOPPED_PACKAGES,
FLAG_DEBUG_TRIAGED_MISSING,
FLAG_IGNORE_EPHEMERAL,
+ FLAG_ACTIVITY_MATCH_EXTERNAL,
FLAG_ACTIVITY_NO_HISTORY,
FLAG_ACTIVITY_SINGLE_TOP,
FLAG_ACTIVITY_NEW_TASK,
@@ -5475,6 +5496,14 @@
*/
public static final int FLAG_ACTIVITY_LAUNCH_ADJACENT = 0x00001000;
+
+ /**
+ * If set, resolution of this intent may take place via an instant app not
+ * yet on the device if there does not yet exist an app on device to
+ * resolve it.
+ */
+ public static final int FLAG_ACTIVITY_MATCH_EXTERNAL = 0x00000800;
+
/**
* If set, when sending a broadcast only registered receivers will be
* called -- no BroadcastReceiver components will be launched.
@@ -7028,7 +7057,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if none was found.
*
* @deprecated
@@ -7046,7 +7075,7 @@
* @param defaultValue the value to be returned if no value of the desired
* type is stored with the given name.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or the default value if none was found.
*
* @see #putExtra(String, boolean)
@@ -7063,7 +7092,7 @@
* @param defaultValue the value to be returned if no value of the desired
* type is stored with the given name.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or the default value if none was found.
*
* @see #putExtra(String, byte)
@@ -7080,7 +7109,7 @@
* @param defaultValue the value to be returned if no value of the desired
* type is stored with the given name.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or the default value if none was found.
*
* @see #putExtra(String, short)
@@ -7097,7 +7126,7 @@
* @param defaultValue the value to be returned if no value of the desired
* type is stored with the given name.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or the default value if none was found.
*
* @see #putExtra(String, char)
@@ -7114,7 +7143,7 @@
* @param defaultValue the value to be returned if no value of the desired
* type is stored with the given name.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or the default value if none was found.
*
* @see #putExtra(String, int)
@@ -7131,7 +7160,7 @@
* @param defaultValue the value to be returned if no value of the desired
* type is stored with the given name.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or the default value if none was found.
*
* @see #putExtra(String, long)
@@ -7148,7 +7177,7 @@
* @param defaultValue the value to be returned if no value of the desired
* type is stored with the given name.
*
- * @return the value of an item that previously added with putExtra(),
+ * @return the value of an item previously added with putExtra(),
* or the default value if no such item is present
*
* @see #putExtra(String, float)
@@ -7165,7 +7194,7 @@
* @param defaultValue the value to be returned if no value of the desired
* type is stored with the given name.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or the default value if none was found.
*
* @see #putExtra(String, double)
@@ -7180,7 +7209,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no String value was found.
*
* @see #putExtra(String, String)
@@ -7194,7 +7223,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no CharSequence value was found.
*
* @see #putExtra(String, CharSequence)
@@ -7208,7 +7237,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no Parcelable value was found.
*
* @see #putExtra(String, Parcelable)
@@ -7222,7 +7251,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no Parcelable[] value was found.
*
* @see #putExtra(String, Parcelable[])
@@ -7236,8 +7265,9 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
- * or null if no ArrayList<Parcelable> value was found.
+ * @return the value of an item previously added with
+ * putParcelableArrayListExtra(), or null if no
+ * ArrayList<Parcelable> value was found.
*
* @see #putParcelableArrayListExtra(String, ArrayList)
*/
@@ -7250,7 +7280,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no Serializable value was found.
*
* @see #putExtra(String, Serializable)
@@ -7264,8 +7294,9 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
- * or null if no ArrayList<Integer> value was found.
+ * @return the value of an item previously added with
+ * putIntegerArrayListExtra(), or null if no
+ * ArrayList<Integer> value was found.
*
* @see #putIntegerArrayListExtra(String, ArrayList)
*/
@@ -7278,8 +7309,9 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
- * or null if no ArrayList<String> value was found.
+ * @return the value of an item previously added with
+ * putStringArrayListExtra(), or null if no
+ * ArrayList<String> value was found.
*
* @see #putStringArrayListExtra(String, ArrayList)
*/
@@ -7292,8 +7324,9 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
- * or null if no ArrayList<CharSequence> value was found.
+ * @return the value of an item previously added with
+ * putCharSequenceArrayListExtra, or null if no
+ * ArrayList<CharSequence> value was found.
*
* @see #putCharSequenceArrayListExtra(String, ArrayList)
*/
@@ -7306,7 +7339,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no boolean array value was found.
*
* @see #putExtra(String, boolean[])
@@ -7320,7 +7353,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no byte array value was found.
*
* @see #putExtra(String, byte[])
@@ -7334,7 +7367,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no short array value was found.
*
* @see #putExtra(String, short[])
@@ -7348,7 +7381,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no char array value was found.
*
* @see #putExtra(String, char[])
@@ -7362,7 +7395,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no int array value was found.
*
* @see #putExtra(String, int[])
@@ -7376,7 +7409,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no long array value was found.
*
* @see #putExtra(String, long[])
@@ -7390,7 +7423,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no float array value was found.
*
* @see #putExtra(String, float[])
@@ -7404,7 +7437,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no double array value was found.
*
* @see #putExtra(String, double[])
@@ -7418,7 +7451,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no String array value was found.
*
* @see #putExtra(String, String[])
@@ -7432,7 +7465,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no CharSequence array value was found.
*
* @see #putExtra(String, CharSequence[])
@@ -7446,7 +7479,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no Bundle value was found.
*
* @see #putExtra(String, Bundle)
@@ -7460,7 +7493,7 @@
*
* @param name The name of the desired item.
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or null if no IBinder value was found.
*
* @see #putExtra(String, IBinder)
@@ -7480,7 +7513,7 @@
* @param defaultValue The default value to return in case no item is
* associated with the key 'name'
*
- * @return the value of an item that previously added with putExtra()
+ * @return the value of an item previously added with putExtra(),
* or defaultValue if none was found.
*
* @see #putExtra
@@ -9451,7 +9484,7 @@
proto.write(IntentProto.PACKAGE, mPackage);
}
if (comp && mComponent != null) {
- proto.write(IntentProto.COMPONENT, mComponent.flattenToShortString());
+ mComponent.writeToProto(proto, IntentProto.COMPONENT);
}
if (mSourceBounds != null) {
proto.write(IntentProto.SOURCE_BOUNDS, mSourceBounds.toShortString());
@@ -10024,6 +10057,25 @@
}
}
+ /** @hide */
+ public boolean hasWebURI() {
+ if (getData() == null) {
+ return false;
+ }
+ final String scheme = getScheme();
+ if (TextUtils.isEmpty(scheme)) {
+ return false;
+ }
+ return scheme.equals(IntentFilter.SCHEME_HTTP) || scheme.equals(IntentFilter.SCHEME_HTTPS);
+ }
+
+ /** @hide */
+ public boolean isBrowsableWebIntent() {
+ return ACTION_VIEW.equals(mAction)
+ && hasCategory(CATEGORY_BROWSABLE)
+ && hasWebURI();
+ }
+
/**
* @hide
*/
diff --git a/core/java/android/content/pm/AndroidTestBaseUpdater.java b/core/java/android/content/pm/AndroidTestBaseUpdater.java
new file mode 100644
index 0000000..2aaac02
--- /dev/null
+++ b/core/java/android/content/pm/AndroidTestBaseUpdater.java
@@ -0,0 +1,54 @@
+/*
+ * 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.pm;
+
+import static android.content.pm.SharedLibraryNames.ANDROID_TEST_BASE;
+import static android.content.pm.SharedLibraryNames.ANDROID_TEST_RUNNER;
+
+import android.content.pm.PackageParser.Package;
+
+import com.android.internal.annotations.VisibleForTesting;
+
+/**
+ * Updates a package to ensure that if it targets < P that the android.test.base library is
+ * included by default.
+ *
+ * <p>This is separated out so that it can be conditionally included at build time depending on
+ * whether android.test.base is on the bootclasspath or not. In order to include this at
+ * build time, and remove android.test.base from the bootclasspath pass
+ * REMOVE_ATB_FROM_BCP=true on the build command line, otherwise this class will not be included
+ * and the
+ *
+ * @hide
+ */
+@VisibleForTesting
+public class AndroidTestBaseUpdater extends PackageSharedLibraryUpdater {
+
+ @Override
+ public void updatePackage(Package pkg) {
+ // Packages targeted at <= O_MR1 expect the classes in the android.test.base library
+ // to be accessible so this maintains backward compatibility by adding the
+ // android.test.base library to those packages.
+ if (apkTargetsApiLevelLessThanOrEqualToOMR1(pkg)) {
+ prefixRequiredLibrary(pkg, ANDROID_TEST_BASE);
+ } else {
+ // If a package already depends on android.test.runner then add a dependency on
+ // android.test.base because android.test.runner depends on classes from the
+ // android.test.base library.
+ prefixImplicitDependency(pkg, ANDROID_TEST_RUNNER, ANDROID_TEST_BASE);
+ }
+ }
+}
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 84cbdb4..f6697e8 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -34,6 +34,7 @@
import android.text.TextUtils;
import android.util.Printer;
import android.util.SparseArray;
+import android.util.proto.ProtoOutputStream;
import com.android.internal.util.ArrayUtils;
@@ -601,6 +602,13 @@
*/
public static final int PRIVATE_FLAG_VENDOR = 1 << 18;
+ /**
+ * Value for {@linl #privateFlags}: whether this app is pre-installed on the
+ * product partition of the system image.
+ * @hide
+ */
+ public static final int PRIVATE_FLAG_PRODUCT = 1 << 19;
+
/** @hide */
@IntDef(flag = true, prefix = { "PRIVATE_FLAG_" }, value = {
PRIVATE_FLAG_ACTIVITIES_RESIZE_MODE_RESIZEABLE,
@@ -618,6 +626,7 @@
PRIVATE_FLAG_OEM,
PRIVATE_FLAG_PARTIALLY_DIRECT_BOOT_AWARE,
PRIVATE_FLAG_PRIVILEGED,
+ PRIVATE_FLAG_PRODUCT,
PRIVATE_FLAG_REQUIRED_FOR_SYSTEM_USER,
PRIVATE_FLAG_STATIC_SHARED_LIBRARY,
PRIVATE_FLAG_VENDOR,
@@ -1183,6 +1192,105 @@
super.dumpBack(pw, prefix);
}
+ /** {@hide} */
+ public void writeToProto(ProtoOutputStream proto, long fieldId, int dumpFlags) {
+ long token = proto.start(fieldId);
+ super.writeToProto(proto, ApplicationInfoProto.PACKAGE);
+ proto.write(ApplicationInfoProto.PERMISSION, permission);
+ proto.write(ApplicationInfoProto.PROCESS_NAME, processName);
+ proto.write(ApplicationInfoProto.UID, uid);
+ proto.write(ApplicationInfoProto.FLAGS, flags);
+ proto.write(ApplicationInfoProto.PRIVATE_FLAGS, privateFlags);
+ proto.write(ApplicationInfoProto.THEME, theme);
+ proto.write(ApplicationInfoProto.SOURCE_DIR, sourceDir);
+ if (!Objects.equals(sourceDir, publicSourceDir)) {
+ proto.write(ApplicationInfoProto.PUBLIC_SOURCE_DIR, publicSourceDir);
+ }
+ if (!ArrayUtils.isEmpty(splitSourceDirs)) {
+ for (String dir : splitSourceDirs) {
+ proto.write(ApplicationInfoProto.SPLIT_SOURCE_DIRS, dir);
+ }
+ }
+ if (!ArrayUtils.isEmpty(splitPublicSourceDirs)
+ && !Arrays.equals(splitSourceDirs, splitPublicSourceDirs)) {
+ for (String dir : splitPublicSourceDirs) {
+ proto.write(ApplicationInfoProto.SPLIT_PUBLIC_SOURCE_DIRS, dir);
+ }
+ }
+ if (resourceDirs != null) {
+ for (String dir : resourceDirs) {
+ proto.write(ApplicationInfoProto.RESOURCE_DIRS, dir);
+ }
+ }
+ proto.write(ApplicationInfoProto.DATA_DIR, dataDir);
+ proto.write(ApplicationInfoProto.CLASS_LOADER_NAME, classLoaderName);
+ if (!ArrayUtils.isEmpty(splitClassLoaderNames)) {
+ for (String name : splitClassLoaderNames) {
+ proto.write(ApplicationInfoProto.SPLIT_CLASS_LOADER_NAMES, name);
+ }
+ }
+
+ long versionToken = proto.start(ApplicationInfoProto.VERSION);
+ proto.write(ApplicationInfoProto.Version.ENABLED, enabled);
+ proto.write(ApplicationInfoProto.Version.MIN_SDK_VERSION, minSdkVersion);
+ proto.write(ApplicationInfoProto.Version.TARGET_SDK_VERSION, targetSdkVersion);
+ proto.write(ApplicationInfoProto.Version.VERSION_CODE, versionCode);
+ proto.write(ApplicationInfoProto.Version.TARGET_SANDBOX_VERSION, targetSandboxVersion);
+ proto.end(versionToken);
+
+ if ((dumpFlags & DUMP_FLAG_DETAILS) != 0) {
+ long detailToken = proto.start(ApplicationInfoProto.DETAIL);
+ if (className != null) {
+ proto.write(ApplicationInfoProto.Detail.CLASS_NAME, className);
+ }
+ proto.write(ApplicationInfoProto.Detail.TASK_AFFINITY, taskAffinity);
+ proto.write(ApplicationInfoProto.Detail.REQUIRES_SMALLEST_WIDTH_DP,
+ requiresSmallestWidthDp);
+ proto.write(ApplicationInfoProto.Detail.COMPATIBLE_WIDTH_LIMIT_DP,
+ compatibleWidthLimitDp);
+ proto.write(ApplicationInfoProto.Detail.LARGEST_WIDTH_LIMIT_DP,
+ largestWidthLimitDp);
+ if (seInfo != null) {
+ proto.write(ApplicationInfoProto.Detail.SEINFO, seInfo);
+ proto.write(ApplicationInfoProto.Detail.SEINFO_USER, seInfoUser);
+ }
+ proto.write(ApplicationInfoProto.Detail.DEVICE_PROTECTED_DATA_DIR,
+ deviceProtectedDataDir);
+ proto.write(ApplicationInfoProto.Detail.CREDENTIAL_PROTECTED_DATA_DIR,
+ credentialProtectedDataDir);
+ if (sharedLibraryFiles != null) {
+ for (String f : sharedLibraryFiles) {
+ proto.write(ApplicationInfoProto.Detail.SHARED_LIBRARY_FILES, f);
+ }
+ }
+ if (manageSpaceActivityName != null) {
+ proto.write(ApplicationInfoProto.Detail.MANAGE_SPACE_ACTIVITY_NAME,
+ manageSpaceActivityName);
+ }
+ if (descriptionRes != 0) {
+ proto.write(ApplicationInfoProto.Detail.DESCRIPTION_RES, descriptionRes);
+ }
+ if (uiOptions != 0) {
+ proto.write(ApplicationInfoProto.Detail.UI_OPTIONS, uiOptions);
+ }
+ proto.write(ApplicationInfoProto.Detail.SUPPORTS_RTL, hasRtlSupport());
+ if (fullBackupContent > 0) {
+ proto.write(ApplicationInfoProto.Detail.CONTENT, "@xml/" + fullBackupContent);
+ } else {
+ proto.write(ApplicationInfoProto.Detail.IS_FULL_BACKUP, fullBackupContent == 0);
+ }
+ if (networkSecurityConfigRes != 0) {
+ proto.write(ApplicationInfoProto.Detail.NETWORK_SECURITY_CONFIG_RES,
+ networkSecurityConfigRes);
+ }
+ if (category != CATEGORY_UNDEFINED) {
+ proto.write(ApplicationInfoProto.Detail.CATEGORY, category);
+ }
+ proto.end(detailToken);
+ }
+ proto.end(token);
+ }
+
/**
* @return true if "supportsRtl" has been set to true in the AndroidManifest
* @hide
@@ -1491,6 +1599,13 @@
/**
* @hide
*/
+ public boolean isAllowedToUseHiddenApi() {
+ return isSystemApp();
+ }
+
+ /**
+ * @hide
+ */
@Override
public Drawable loadDefaultIcon(PackageManager pm) {
if ((flags & FLAG_EXTERNAL_STORAGE) != 0
@@ -1592,6 +1707,11 @@
return (privateFlags & ApplicationInfo.PRIVATE_FLAG_VENDOR) != 0;
}
+ /** @hide */
+ public boolean isProduct() {
+ return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT) != 0;
+ }
+
/**
* Returns whether or not this application was installed as a virtual preload.
*/
diff --git a/core/java/android/content/pm/AuxiliaryResolveInfo.java b/core/java/android/content/pm/AuxiliaryResolveInfo.java
index 6bdcefb..202df50 100644
--- a/core/java/android/content/pm/AuxiliaryResolveInfo.java
+++ b/core/java/android/content/pm/AuxiliaryResolveInfo.java
@@ -21,6 +21,10 @@
import android.content.ComponentName;
import android.content.Intent;
import android.content.IntentFilter;
+import android.os.Bundle;
+
+import java.util.Collections;
+import java.util.List;
/**
* Auxiliary application resolution response.
@@ -31,56 +35,95 @@
* hasn't been installed.
* @hide
*/
-public final class AuxiliaryResolveInfo extends IntentFilter {
- /** Resolved information returned from the external instant resolver */
- public final InstantAppResolveInfo resolveInfo;
- /** The resolved package. Copied from {@link #resolveInfo}. */
- public final String packageName;
+public final class AuxiliaryResolveInfo {
/** The activity to launch if there's an installation failure. */
public final ComponentName installFailureActivity;
- /** The resolve split. Copied from the matched filter in {@link #resolveInfo}. */
- public final String splitName;
/** Whether or not instant resolution needs the second phase */
public final boolean needsPhaseTwo;
/** Opaque token to track the instant application resolution */
public final String token;
- /** The version code of the package */
- public final long versionCode;
/** An intent to start upon failure to install */
public final Intent failureIntent;
+ /** The matching filters for this resolve info. */
+ public final List<AuxiliaryFilter> filters;
/** Create a response for installing an instant application. */
- public AuxiliaryResolveInfo(@NonNull InstantAppResolveInfo resolveInfo,
- @NonNull IntentFilter orig,
- @Nullable String splitName,
- @NonNull String token,
+ public AuxiliaryResolveInfo(@NonNull String token,
boolean needsPhase2,
- @Nullable Intent failureIntent) {
- super(orig);
- this.resolveInfo = resolveInfo;
- this.packageName = resolveInfo.getPackageName();
- this.splitName = splitName;
+ @Nullable Intent failureIntent,
+ @Nullable List<AuxiliaryFilter> filters) {
this.token = token;
this.needsPhaseTwo = needsPhase2;
- this.versionCode = resolveInfo.getVersionCode();
this.failureIntent = failureIntent;
+ this.filters = filters;
this.installFailureActivity = null;
}
/** Create a response for installing a split on demand. */
- public AuxiliaryResolveInfo(@NonNull String packageName,
- @Nullable String splitName,
- @Nullable ComponentName failureActivity,
- long versionCode,
- @Nullable Intent failureIntent) {
+ public AuxiliaryResolveInfo(@Nullable ComponentName failureActivity,
+ @Nullable Intent failureIntent,
+ @Nullable List<AuxiliaryFilter> filters) {
super();
- this.packageName = packageName;
this.installFailureActivity = failureActivity;
- this.splitName = splitName;
- this.versionCode = versionCode;
- this.resolveInfo = null;
+ this.filters = filters;
this.token = null;
this.needsPhaseTwo = false;
this.failureIntent = failureIntent;
}
+
+ /** Create a response for installing a split on demand. */
+ public AuxiliaryResolveInfo(@Nullable ComponentName failureActivity,
+ String packageName, long versionCode, String splitName) {
+ this(failureActivity, null, Collections.singletonList(
+ new AuxiliaryResolveInfo.AuxiliaryFilter(packageName, versionCode, splitName)));
+ }
+
+ /** @hide */
+ public static final class AuxiliaryFilter extends IntentFilter {
+ /** Resolved information returned from the external instant resolver */
+ public final InstantAppResolveInfo resolveInfo;
+ /** The resolved package. Copied from {@link #resolveInfo}. */
+ public final String packageName;
+ /** The version code of the package */
+ public final long versionCode;
+ /** The resolve split. Copied from the matched filter in {@link #resolveInfo}. */
+ public final String splitName;
+ /** The extras to pass on to the installer for this filter. */
+ public final Bundle extras;
+
+ public AuxiliaryFilter(IntentFilter orig, InstantAppResolveInfo resolveInfo,
+ String splitName, Bundle extras) {
+ super(orig);
+ this.resolveInfo = resolveInfo;
+ this.packageName = resolveInfo.getPackageName();
+ this.versionCode = resolveInfo.getLongVersionCode();
+ this.splitName = splitName;
+ this.extras = extras;
+ }
+
+ public AuxiliaryFilter(InstantAppResolveInfo resolveInfo,
+ String splitName, Bundle extras) {
+ this.resolveInfo = resolveInfo;
+ this.packageName = resolveInfo.getPackageName();
+ this.versionCode = resolveInfo.getLongVersionCode();
+ this.splitName = splitName;
+ this.extras = extras;
+ }
+
+ public AuxiliaryFilter(String packageName, long versionCode, String splitName) {
+ this.resolveInfo = null;
+ this.packageName = packageName;
+ this.versionCode = versionCode;
+ this.splitName = splitName;
+ this.extras = null;
+ }
+
+ @Override
+ public String toString() {
+ return "AuxiliaryFilter{"
+ + "packageName='" + packageName + '\''
+ + ", versionCode=" + versionCode
+ + ", splitName='" + splitName + '\'' + '}';
+ }
+ }
}
\ No newline at end of file
diff --git a/core/java/android/content/pm/InstantAppResolveInfo.java b/core/java/android/content/pm/InstantAppResolveInfo.java
index 19cb932..112c5da 100644
--- a/core/java/android/content/pm/InstantAppResolveInfo.java
+++ b/core/java/android/content/pm/InstantAppResolveInfo.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.content.Intent;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -26,11 +27,35 @@
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Locale;
/**
- * Information about an instant application.
+ * Describes an externally resolvable instant application. There are three states that this class
+ * can represent: <p/>
+ * <ul>
+ * <li>
+ * The first, usable only for non http/s intents, implies that the resolver cannot
+ * immediately resolve this intent and would prefer that resolution be deferred to the
+ * instant app installer. Represent this state with {@link #InstantAppResolveInfo(Bundle)}.
+ * If the {@link android.content.Intent} has the scheme set to http/s and a set of digest
+ * prefixes were passed into one of the resolve methods in
+ * {@link android.app.InstantAppResolverService}, this state cannot be used.
+ * </li>
+ * <li>
+ * The second represents a partial match and is constructed with any of the other
+ * constructors. By setting one or more of the {@link Nullable}arguments to null, you
+ * communicate to the resolver in response to
+ * {@link android.app.InstantAppResolverService#onGetInstantAppResolveInfo(Intent, int[],
+ * String, InstantAppResolverService.InstantAppResolutionCallback)}
+ * that you need a 2nd round of resolution to complete the request.
+ * </li>
+ * <li>
+ * The third represents a complete match and is constructed with all @Nullable parameters
+ * populated.
+ * </li>
+ * </ul>
* @hide
*/
@SystemApi
@@ -38,6 +63,8 @@
/** Algorithm that will be used to generate the domain digest */
private static final String SHA_ALGORITHM = "SHA-256";
+ private static final byte[] EMPTY_DIGEST = new byte[0];
+
private final InstantAppDigest mDigest;
private final String mPackageName;
/** The filters used to match domain */
@@ -46,15 +73,30 @@
private final long mVersionCode;
/** Data about the app that should be passed along to the Instant App installer on resolve */
private final Bundle mExtras;
+ /**
+ * A flag that indicates that the resolver is aware that an app may match, but would prefer
+ * that the installer get the sanitized intent to decide. This should not be used for
+ * resolutions that include a host and will be ignored in such cases.
+ */
+ private final boolean mShouldLetInstallerDecide;
+ /** Constructor for intent-based InstantApp resolution results. */
public InstantAppResolveInfo(@NonNull InstantAppDigest digest, @Nullable String packageName,
@Nullable List<InstantAppIntentFilter> filters, int versionCode) {
this(digest, packageName, filters, (long) versionCode, null /* extras */);
}
+ /** Constructor for intent-based InstantApp resolution results with extras. */
public InstantAppResolveInfo(@NonNull InstantAppDigest digest, @Nullable String packageName,
@Nullable List<InstantAppIntentFilter> filters, long versionCode,
@Nullable Bundle extras) {
+ this(digest, packageName, filters, versionCode, extras, false);
+ }
+
+ /** Constructor for intent-based InstantApp resolution results with extras. */
+ private InstantAppResolveInfo(@NonNull InstantAppDigest digest, @Nullable String packageName,
+ @Nullable List<InstantAppIntentFilter> filters, long versionCode,
+ @Nullable Bundle extras, boolean shouldLetInstallerDecide) {
// validate arguments
if ((packageName == null && (filters != null && filters.size() != 0))
|| (packageName != null && (filters == null || filters.size() == 0))) {
@@ -62,7 +104,7 @@
}
mDigest = digest;
if (filters != null) {
- mFilters = new ArrayList<InstantAppIntentFilter>(filters.size());
+ mFilters = new ArrayList<>(filters.size());
mFilters.addAll(filters);
} else {
mFilters = null;
@@ -70,25 +112,48 @@
mPackageName = packageName;
mVersionCode = versionCode;
mExtras = extras;
+ mShouldLetInstallerDecide = shouldLetInstallerDecide;
}
+ /** Constructor for intent-based InstantApp resolution results by hostname. */
public InstantAppResolveInfo(@NonNull String hostName, @Nullable String packageName,
@Nullable List<InstantAppIntentFilter> filters) {
this(new InstantAppDigest(hostName), packageName, filters, -1 /*versionCode*/,
null /* extras */);
}
+ /**
+ * Constructor that creates a "let the installer decide" response with optional included
+ * extras.
+ */
+ public InstantAppResolveInfo(@Nullable Bundle extras) {
+ this(InstantAppDigest.UNDEFINED, null, null, -1, extras, true);
+ }
+
InstantAppResolveInfo(Parcel in) {
- mDigest = in.readParcelable(null /*loader*/);
- mPackageName = in.readString();
- mFilters = new ArrayList<InstantAppIntentFilter>();
- in.readList(mFilters, null /*loader*/);
- mVersionCode = in.readLong();
+ mShouldLetInstallerDecide = in.readBoolean();
mExtras = in.readBundle();
+ if (mShouldLetInstallerDecide) {
+ mDigest = InstantAppDigest.UNDEFINED;
+ mPackageName = null;
+ mFilters = Collections.emptyList();
+ mVersionCode = -1;
+ } else {
+ mDigest = in.readParcelable(null /*loader*/);
+ mPackageName = in.readString();
+ mFilters = new ArrayList<>();
+ in.readList(mFilters, null /*loader*/);
+ mVersionCode = in.readLong();
+ }
+ }
+
+ /** Returns true if the installer should be notified that it should query for packages. */
+ public boolean shouldLetInstallerDecide() {
+ return mShouldLetInstallerDecide;
}
public byte[] getDigestBytes() {
- return mDigest.getDigestBytes()[0];
+ return mDigest.mDigestBytes.length > 0 ? mDigest.getDigestBytes()[0] : EMPTY_DIGEST;
}
public int getDigestPrefix() {
@@ -127,11 +192,15 @@
@Override
public void writeToParcel(Parcel out, int flags) {
+ out.writeBoolean(mShouldLetInstallerDecide);
+ out.writeBundle(mExtras);
+ if (mShouldLetInstallerDecide) {
+ return;
+ }
out.writeParcelable(mDigest, flags);
out.writeString(mPackageName);
out.writeList(mFilters);
out.writeLong(mVersionCode);
- out.writeBundle(mExtras);
}
public static final Parcelable.Creator<InstantAppResolveInfo> CREATOR
@@ -159,7 +228,9 @@
@SystemApi
public static final class InstantAppDigest implements Parcelable {
private static final int DIGEST_MASK = 0xfffff000;
- private static final int DIGEST_PREFIX_COUNT = 5;
+
+ public static final InstantAppDigest UNDEFINED =
+ new InstantAppDigest(new byte[][]{}, new int[]{});
/** Full digest of the domain hashes */
private final byte[][] mDigestBytes;
/** The first 4 bytes of the domain hashes */
@@ -186,6 +257,11 @@
}
}
+ private InstantAppDigest(byte[][] digestBytes, int[] prefix) {
+ this.mDigestPrefix = prefix;
+ this.mDigestBytes = digestBytes;
+ }
+
private static byte[][] generateDigest(String hostName, int maxDigests) {
ArrayList<byte[]> digests = new ArrayList<>();
try {
diff --git a/core/java/android/content/pm/OrgApacheHttpLegacyUpdater.java b/core/java/android/content/pm/OrgApacheHttpLegacyUpdater.java
new file mode 100644
index 0000000..81e4105
--- /dev/null
+++ b/core/java/android/content/pm/OrgApacheHttpLegacyUpdater.java
@@ -0,0 +1,48 @@
+/*
+ * 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.pm;
+
+import static android.content.pm.SharedLibraryNames.ORG_APACHE_HTTP_LEGACY;
+
+import android.content.pm.PackageParser.Package;
+
+import com.android.internal.annotations.VisibleForTesting;
+
+/**
+ * Updates a package to ensure that if it targets < P that the org.apache.http.legacy library is
+ * included by default.
+ *
+ * <p>This is separated out so that it can be conditionally included at build time depending on
+ * whether org.apache.http.legacy is on the bootclasspath or not. In order to include this at
+ * build time, and remove org.apache.http.legacy from the bootclasspath pass
+ * REMOVE_OAHL_FROM_BCP=true on the build command line, otherwise this class will not be included
+ * and the
+ *
+ * @hide
+ */
+@VisibleForTesting
+public class OrgApacheHttpLegacyUpdater extends PackageSharedLibraryUpdater {
+
+ @Override
+ public void updatePackage(Package pkg) {
+ // Packages targeted at <= O_MR1 expect the classes in the org.apache.http.legacy library
+ // to be accessible so this maintains backward compatibility by adding the
+ // org.apache.http.legacy library to those packages.
+ if (apkTargetsApiLevelLessThanOrEqualToOMR1(pkg)) {
+ prefixRequiredLibrary(pkg, ORG_APACHE_HTTP_LEGACY);
+ }
+ }
+}
diff --git a/core/java/android/content/pm/PackageBackwardCompatibility.java b/core/java/android/content/pm/PackageBackwardCompatibility.java
index 8014c94..a16f81b 100644
--- a/core/java/android/content/pm/PackageBackwardCompatibility.java
+++ b/core/java/android/content/pm/PackageBackwardCompatibility.java
@@ -16,15 +16,19 @@
package android.content.pm;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
+import static android.content.pm.SharedLibraryNames.ANDROID_TEST_BASE;
+import static android.content.pm.SharedLibraryNames.ANDROID_TEST_MOCK;
+import static android.content.pm.SharedLibraryNames.ANDROID_TEST_RUNNER;
+import static android.content.pm.SharedLibraryNames.ORG_APACHE_HTTP_LEGACY;
+
import android.content.pm.PackageParser.Package;
-import android.os.Build;
+import android.util.Log;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.util.ArrayUtils;
import java.util.ArrayList;
+import java.util.List;
+import java.util.function.Supplier;
/**
* Modifies {@link Package} in order to maintain backwards compatibility.
@@ -32,13 +36,96 @@
* @hide
*/
@VisibleForTesting
-public class PackageBackwardCompatibility {
+public class PackageBackwardCompatibility extends PackageSharedLibraryUpdater {
- private static final String ANDROID_TEST_MOCK = "android.test.mock";
+ private static final String TAG = PackageBackwardCompatibility.class.getSimpleName();
- private static final String ANDROID_TEST_RUNNER = "android.test.runner";
+ private static final PackageBackwardCompatibility INSTANCE;
- private static final String APACHE_HTTP_LEGACY = "org.apache.http.legacy";
+ static {
+ final List<PackageSharedLibraryUpdater> packageUpdaters = new ArrayList<>();
+
+ // Attempt to load and add the optional updater that will only be available when
+ // REMOVE_OAHL_FROM_BCP=true. If that could not be found then add the default updater that
+ // will remove any references to org.apache.http.library from the package so that it does
+ // not try and load the library when it is on the bootclasspath.
+ boolean bootClassPathContainsOAHL = !addOptionalUpdater(packageUpdaters,
+ "android.content.pm.OrgApacheHttpLegacyUpdater",
+ RemoveUnnecessaryOrgApacheHttpLegacyLibrary::new);
+
+ // Add this before adding AndroidTestBaseUpdater so that android.test.base comes before
+ // android.test.mock.
+ packageUpdaters.add(new AndroidTestRunnerSplitUpdater());
+
+ // Attempt to load and add the optional updater that will only be available when
+ // REMOVE_ATB_FROM_BCP=true. If that could not be found then add the default updater that
+ // will remove any references to org.apache.http.library from the package so that it does
+ // not try and load the library when it is on the bootclasspath.
+ boolean bootClassPathContainsATB = !addOptionalUpdater(packageUpdaters,
+ "android.content.pm.AndroidTestBaseUpdater",
+ RemoveUnnecessaryAndroidTestBaseLibrary::new);
+
+ PackageSharedLibraryUpdater[] updaterArray = packageUpdaters
+ .toArray(new PackageSharedLibraryUpdater[0]);
+ INSTANCE = new PackageBackwardCompatibility(
+ bootClassPathContainsOAHL, bootClassPathContainsATB, updaterArray);
+ }
+
+ /**
+ * Add an optional {@link PackageSharedLibraryUpdater} instance to the list, if it could not be
+ * found then add a default instance instead.
+ *
+ * @param packageUpdaters the list to update.
+ * @param className the name of the optional class.
+ * @param defaultUpdater the supplier of the default instance.
+ * @return true if the optional updater was added false otherwise.
+ */
+ private static boolean addOptionalUpdater(List<PackageSharedLibraryUpdater> packageUpdaters,
+ String className, Supplier<PackageSharedLibraryUpdater> defaultUpdater) {
+ Class<? extends PackageSharedLibraryUpdater> clazz;
+ try {
+ clazz = (PackageBackwardCompatibility.class.getClassLoader()
+ .loadClass(className)
+ .asSubclass(PackageSharedLibraryUpdater.class));
+ Log.i(TAG, "Loaded " + className);
+ } catch (ClassNotFoundException e) {
+ Log.i(TAG, "Could not find " + className + ", ignoring");
+ clazz = null;
+ }
+
+ boolean usedOptional = false;
+ PackageSharedLibraryUpdater updater;
+ if (clazz == null) {
+ updater = defaultUpdater.get();
+ } else {
+ try {
+ updater = clazz.getConstructor().newInstance();
+ usedOptional = true;
+ } catch (ReflectiveOperationException e) {
+ throw new IllegalStateException("Could not create instance of " + className, e);
+ }
+ }
+ packageUpdaters.add(updater);
+ return usedOptional;
+ }
+
+ @VisibleForTesting
+ public static PackageSharedLibraryUpdater getInstance() {
+ return INSTANCE;
+ }
+
+ private final boolean mBootClassPathContainsOAHL;
+
+ private final boolean mBootClassPathContainsATB;
+
+ private final PackageSharedLibraryUpdater[] mPackageUpdaters;
+
+ public PackageBackwardCompatibility(boolean bootClassPathContainsOAHL,
+ boolean bootClassPathContainsATB, PackageSharedLibraryUpdater[] packageUpdaters) {
+ this.mBootClassPathContainsOAHL = bootClassPathContainsOAHL;
+ this.mBootClassPathContainsATB = bootClassPathContainsATB;
+ this.mPackageUpdaters = packageUpdaters;
+ }
/**
* Modify the shared libraries in the supplied {@link Package} to maintain backwards
@@ -48,52 +135,78 @@
*/
@VisibleForTesting
public static void modifySharedLibraries(Package pkg) {
- ArrayList<String> usesLibraries = pkg.usesLibraries;
- ArrayList<String> usesOptionalLibraries = pkg.usesOptionalLibraries;
-
- // Packages targeted at <= O_MR1 expect the classes in the org.apache.http.legacy library
- // to be accessible so this maintains backward compatibility by adding the
- // org.apache.http.legacy library to those packages.
- if (apkTargetsApiLevelLessThanOrEqualToOMR1(pkg)) {
- boolean apacheHttpLegacyPresent = isLibraryPresent(
- usesLibraries, usesOptionalLibraries, APACHE_HTTP_LEGACY);
- if (!apacheHttpLegacyPresent) {
- usesLibraries = prefix(usesLibraries, APACHE_HTTP_LEGACY);
- }
- }
-
- // android.test.runner has a dependency on android.test.mock so if android.test.runner
- // is present but android.test.mock is not then add android.test.mock.
- boolean androidTestMockPresent = isLibraryPresent(
- usesLibraries, usesOptionalLibraries, ANDROID_TEST_MOCK);
- if (ArrayUtils.contains(usesLibraries, ANDROID_TEST_RUNNER) && !androidTestMockPresent) {
- usesLibraries.add(ANDROID_TEST_MOCK);
- }
- if (ArrayUtils.contains(usesOptionalLibraries, ANDROID_TEST_RUNNER)
- && !androidTestMockPresent) {
- usesOptionalLibraries.add(ANDROID_TEST_MOCK);
- }
-
- pkg.usesLibraries = usesLibraries;
- pkg.usesOptionalLibraries = usesOptionalLibraries;
+ INSTANCE.updatePackage(pkg);
}
- private static boolean apkTargetsApiLevelLessThanOrEqualToOMR1(Package pkg) {
- int targetSdkVersion = pkg.applicationInfo.targetSdkVersion;
- return targetSdkVersion <= Build.VERSION_CODES.O_MR1;
- }
-
- private static boolean isLibraryPresent(ArrayList<String> usesLibraries,
- ArrayList<String> usesOptionalLibraries, String apacheHttpLegacy) {
- return ArrayUtils.contains(usesLibraries, apacheHttpLegacy)
- || ArrayUtils.contains(usesOptionalLibraries, apacheHttpLegacy);
- }
-
- private static @NonNull <T> ArrayList<T> prefix(@Nullable ArrayList<T> cur, T val) {
- if (cur == null) {
- cur = new ArrayList<>();
+ @Override
+ public void updatePackage(Package pkg) {
+ for (PackageSharedLibraryUpdater packageUpdater : mPackageUpdaters) {
+ packageUpdater.updatePackage(pkg);
}
- cur.add(0, val);
- return cur;
+ }
+
+ /**
+ * True if the org.apache.http.legacy is on the bootclasspath, false otherwise.
+ */
+ @VisibleForTesting
+ public static boolean bootClassPathContainsOAHL() {
+ return INSTANCE.mBootClassPathContainsOAHL;
+ }
+
+ /**
+ * True if the android.test.base is on the bootclasspath, false otherwise.
+ */
+ @VisibleForTesting
+ public static boolean bootClassPathContainsATB() {
+ return INSTANCE.mBootClassPathContainsATB;
+ }
+
+ /**
+ * Add android.test.mock dependency for any APK that depends on android.test.runner.
+ *
+ * <p>This is needed to maintain backwards compatibility as in previous versions of Android the
+ * android.test.runner library included the classes from android.test.mock which have since
+ * been split out into a separate library.
+ *
+ * @hide
+ */
+ @VisibleForTesting
+ public static class AndroidTestRunnerSplitUpdater extends PackageSharedLibraryUpdater {
+
+ @Override
+ public void updatePackage(Package pkg) {
+ // android.test.runner has a dependency on android.test.mock so if android.test.runner
+ // is present but android.test.mock is not then add android.test.mock.
+ prefixImplicitDependency(pkg, ANDROID_TEST_RUNNER, ANDROID_TEST_MOCK);
+ }
+ }
+
+ /**
+ * Remove any usages of org.apache.http.legacy from the shared library as the library is on the
+ * bootclasspath.
+ */
+ @VisibleForTesting
+ public static class RemoveUnnecessaryOrgApacheHttpLegacyLibrary
+ extends PackageSharedLibraryUpdater {
+
+ @Override
+ public void updatePackage(Package pkg) {
+ removeLibrary(pkg, ORG_APACHE_HTTP_LEGACY);
+ }
+
+ }
+
+ /**
+ * Remove any usages of android.test.base from the shared library as the library is on the
+ * bootclasspath.
+ */
+ @VisibleForTesting
+ public static class RemoveUnnecessaryAndroidTestBaseLibrary
+ extends PackageSharedLibraryUpdater {
+
+ @Override
+ public void updatePackage(Package pkg) {
+ removeLibrary(pkg, ANDROID_TEST_BASE);
+ }
}
}
diff --git a/core/java/android/content/pm/PackageInfo.java b/core/java/android/content/pm/PackageInfo.java
index 13ec4fd..09a46b8 100644
--- a/core/java/android/content/pm/PackageInfo.java
+++ b/core/java/android/content/pm/PackageInfo.java
@@ -16,14 +16,10 @@
package android.content.pm;
-import android.annotation.IntDef;
import android.annotation.Nullable;
import android.os.Parcel;
import android.os.Parcelable;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
/**
* Overall information about the contents of a package. This corresponds
* to all of the information collected from AndroidManifest.xml.
@@ -370,28 +366,9 @@
public int overlayPriority;
/**
- * Flag for use with {@link #mOverlayFlags}. Marks the overlay as static, meaning it cannot
- * be enabled/disabled at runtime.
+ * Whether the overlay is static, meaning it cannot be enabled/disabled at runtime.
*/
- static final int FLAG_OVERLAY_STATIC = 1 << 1;
-
- /**
- * Flag for use with {@link #mOverlayFlags}. Marks the overlay as trusted (not 3rd party).
- */
- static final int FLAG_OVERLAY_TRUSTED = 1 << 2;
-
- @IntDef(flag = true, prefix = "FLAG_OVERLAY_", value = {
- FLAG_OVERLAY_STATIC,
- FLAG_OVERLAY_TRUSTED
- })
- @Retention(RetentionPolicy.SOURCE)
- @interface OverlayFlags {}
-
- /**
- * Modifiers that affect the state of this overlay. See {@link #FLAG_OVERLAY_STATIC},
- * {@link #FLAG_OVERLAY_TRUSTED}.
- */
- @OverlayFlags int mOverlayFlags;
+ boolean mOverlayIsStatic;
/**
* The user-visible SDK version (ex. 26) of the framework against which the application claims
@@ -424,7 +401,7 @@
* @hide
*/
public boolean isOverlayPackage() {
- return overlayTarget != null && (mOverlayFlags & FLAG_OVERLAY_TRUSTED) != 0;
+ return overlayTarget != null;
}
/**
@@ -433,7 +410,7 @@
* @hide
*/
public boolean isStaticOverlayPackage() {
- return overlayTarget != null && (mOverlayFlags & FLAG_OVERLAY_STATIC) != 0;
+ return overlayTarget != null && mOverlayIsStatic;
}
@Override
@@ -488,7 +465,7 @@
dest.writeString(requiredAccountType);
dest.writeString(overlayTarget);
dest.writeInt(overlayPriority);
- dest.writeInt(mOverlayFlags);
+ dest.writeBoolean(mOverlayIsStatic);
dest.writeInt(compileSdkVersion);
dest.writeString(compileSdkVersionCodename);
}
@@ -543,7 +520,7 @@
requiredAccountType = source.readString();
overlayTarget = source.readString();
overlayPriority = source.readInt();
- mOverlayFlags = source.readInt();
+ mOverlayIsStatic = source.readBoolean();
compileSdkVersion = source.readInt();
compileSdkVersionCodename = source.readString();
diff --git a/core/java/android/content/pm/PackageItemInfo.java b/core/java/android/content/pm/PackageItemInfo.java
index 11830c2..2c0c6ad0 100644
--- a/core/java/android/content/pm/PackageItemInfo.java
+++ b/core/java/android/content/pm/PackageItemInfo.java
@@ -19,7 +19,6 @@
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.content.res.XmlResourceParser;
-
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Parcel;
@@ -28,6 +27,8 @@
import android.text.TextPaint;
import android.text.TextUtils;
import android.util.Printer;
+import android.util.proto.ProtoOutputStream;
+
import java.text.Collator;
import java.util.Comparator;
@@ -386,6 +387,24 @@
dest.writeInt(showUserIcon);
}
+ /**
+ * @hide
+ */
+ public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ long token = proto.start(fieldId);
+ if (name != null) {
+ proto.write(PackageItemInfoProto.NAME, name);
+ }
+ proto.write(PackageItemInfoProto.PACKAGE_NAME, packageName);
+ if (labelRes != 0 || nonLocalizedLabel != null || icon != 0 || banner != 0) {
+ proto.write(PackageItemInfoProto.LABEL_RES, labelRes);
+ proto.write(PackageItemInfoProto.NON_LOCALIZED_LABEL, nonLocalizedLabel.toString());
+ proto.write(PackageItemInfoProto.ICON, icon);
+ proto.write(PackageItemInfoProto.BANNER, banner);
+ }
+ proto.end(token);
+ }
+
protected PackageItemInfo(Parcel source) {
name = source.readString();
packageName = source.readString();
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 67c9584..0b4231f 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -1766,6 +1766,16 @@
"android.hardware.camera.capability.raw";
/**
+ * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: At least one
+ * of the cameras on the device supports the
+ * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING
+ * MOTION_TRACKING} capability level.
+ */
+ @SdkConstant(SdkConstantType.FEATURE)
+ public static final String FEATURE_CAMERA_AR =
+ "android.hardware.camera.ar";
+
+ /**
* Feature for {@link #getSystemAvailableFeatures} and
* {@link #hasSystemFeature}: The device is capable of communicating with
* consumer IR devices.
@@ -1940,6 +1950,14 @@
* <li>Minor version number in bits 21-12</li>
* <li>Patch version number in bits 11-0</li>
* </ul>
+ * A version of 1.1.0 or higher also indicates:
+ * <ul>
+ * <li>The {@code VK_ANDROID_external_memory_android_hardware_buffer} extension is
+ * supported.</li>
+ * <li>{@code SYNC_FD} external semaphore and fence handles are supported.</li>
+ * <li>{@code VkPhysicalDeviceSamplerYcbcrConversionFeatures::samplerYcbcrConversion} is
+ * supported.</li>
+ * </ul>
*/
@SdkConstant(SdkConstantType.FEATURE)
public static final String FEATURE_VULKAN_HARDWARE_VERSION = "android.hardware.vulkan.version";
@@ -2594,6 +2612,14 @@
public static final String FEATURE_VR_HEADTRACKING = "android.hardware.vr.headtracking";
/**
+ * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
+ * The device has a StrongBox hardware-backed Keystore.
+ */
+ @SdkConstant(SdkConstantType.FEATURE)
+ public static final String FEATURE_STRONGBOX_KEYSTORE =
+ "android.hardware.strongbox_keystore";
+
+ /**
* Action to external storage service to clean out removed apps.
* @hide
*/
@@ -4740,7 +4766,7 @@
PackageParser.Package pkg = parser.parseMonolithicPackage(apkFile, 0);
if ((flags & GET_SIGNATURES) != 0) {
- PackageParser.collectCertificates(pkg, 0);
+ PackageParser.collectCertificates(pkg, false /* skipVerify */);
}
PackageUserState state = new PackageUserState();
return PackageParser.generatePackageInfo(pkg, null, flags, 0, 0, null, state);
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 5b5ccf5..3d26af1 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -679,15 +679,7 @@
pi.requiredAccountType = p.mRequiredAccountType;
pi.overlayTarget = p.mOverlayTarget;
pi.overlayPriority = p.mOverlayPriority;
-
- if (p.mIsStaticOverlay) {
- pi.mOverlayFlags |= PackageInfo.FLAG_OVERLAY_STATIC;
- }
-
- if (p.mTrustedOverlay) {
- pi.mOverlayFlags |= PackageInfo.FLAG_OVERLAY_TRUSTED;
- }
-
+ pi.mOverlayIsStatic = p.mOverlayIsStatic;
pi.compileSdkVersion = p.mCompileSdkVersion;
pi.compileSdkVersionCodename = p.mCompileSdkVersionCodename;
pi.firstInstallTime = firstInstallTime;
@@ -1504,9 +1496,9 @@
* populating {@link Package#mSigningDetails}. Also asserts that all APK
* contents are signed correctly and consistently.
*/
- public static void collectCertificates(Package pkg, @ParseFlags int parseFlags)
+ public static void collectCertificates(Package pkg, boolean skipVerify)
throws PackageParserException {
- collectCertificatesInternal(pkg, parseFlags);
+ collectCertificatesInternal(pkg, skipVerify);
final int childCount = (pkg.childPackages != null) ? pkg.childPackages.size() : 0;
for (int i = 0; i < childCount; i++) {
Package childPkg = pkg.childPackages.get(i);
@@ -1514,17 +1506,17 @@
}
}
- private static void collectCertificatesInternal(Package pkg, @ParseFlags int parseFlags)
+ private static void collectCertificatesInternal(Package pkg, boolean skipVerify)
throws PackageParserException {
pkg.mSigningDetails = SigningDetails.UNKNOWN;
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "collectCertificates");
try {
- collectCertificates(pkg, new File(pkg.baseCodePath), parseFlags);
+ collectCertificates(pkg, new File(pkg.baseCodePath), skipVerify);
if (!ArrayUtils.isEmpty(pkg.splitCodePaths)) {
for (int i = 0; i < pkg.splitCodePaths.length; i++) {
- collectCertificates(pkg, new File(pkg.splitCodePaths[i]), parseFlags);
+ collectCertificates(pkg, new File(pkg.splitCodePaths[i]), skipVerify);
}
}
} finally {
@@ -1532,7 +1524,7 @@
}
}
- private static void collectCertificates(Package pkg, File apkFile, @ParseFlags int parseFlags)
+ private static void collectCertificates(Package pkg, File apkFile, boolean skipVerify)
throws PackageParserException {
final String apkPath = apkFile.getAbsolutePath();
@@ -1542,7 +1534,7 @@
minSignatureScheme = SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V2;
}
SigningDetails verified;
- if ((parseFlags & PARSE_IS_SYSTEM_DIR) != 0) {
+ if (skipVerify) {
// systemDir APKs are already trusted, save time by not verifying
verified = ApkSignatureVerifier.plsCertsNoVerifyOnlyCerts(
apkPath, minSignatureScheme);
@@ -1622,9 +1614,10 @@
if ((flags & PARSE_COLLECT_CERTIFICATES) != 0) {
// TODO: factor signature related items out of Package object
final Package tempPkg = new Package((String) null);
+ final boolean skipVerify = (flags & PARSE_IS_SYSTEM_DIR) != 0;
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "collectCertificates");
try {
- collectCertificates(tempPkg, apkFile, flags);
+ collectCertificates(tempPkg, apkFile, skipVerify);
} finally {
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
}
@@ -2085,7 +2078,7 @@
pkg.mOverlayPriority = sa.getInt(
com.android.internal.R.styleable.AndroidManifestResourceOverlay_priority,
0);
- pkg.mIsStaticOverlay = sa.getBoolean(
+ pkg.mOverlayIsStatic = sa.getBoolean(
com.android.internal.R.styleable.AndroidManifestResourceOverlay_isStatic,
false);
final String propName = sa.getString(
@@ -6094,8 +6087,7 @@
public String mOverlayTarget;
public int mOverlayPriority;
- public boolean mIsStaticOverlay;
- public boolean mTrustedOverlay;
+ public boolean mOverlayIsStatic;
public int mCompileSdkVersion;
public String mCompileSdkVersionCodename;
@@ -6402,6 +6394,11 @@
}
/** @hide */
+ public boolean isProduct() {
+ return applicationInfo.isProduct();
+ }
+
+ /** @hide */
public boolean isPrivileged() {
return applicationInfo.isPrivilegedApp();
}
@@ -6625,8 +6622,7 @@
mRequiredAccountType = dest.readString();
mOverlayTarget = dest.readString();
mOverlayPriority = dest.readInt();
- mIsStaticOverlay = (dest.readInt() == 1);
- mTrustedOverlay = (dest.readInt() == 1);
+ mOverlayIsStatic = (dest.readInt() == 1);
mCompileSdkVersion = dest.readInt();
mCompileSdkVersionCodename = dest.readString();
mUpgradeKeySets = (ArraySet<String>) dest.readArraySet(boot);
@@ -6749,8 +6745,7 @@
dest.writeString(mRequiredAccountType);
dest.writeString(mOverlayTarget);
dest.writeInt(mOverlayPriority);
- dest.writeInt(mIsStaticOverlay ? 1 : 0);
- dest.writeInt(mTrustedOverlay ? 1 : 0);
+ dest.writeInt(mOverlayIsStatic ? 1 : 0);
dest.writeInt(mCompileSdkVersion);
dest.writeString(mCompileSdkVersionCodename);
dest.writeArraySet(mUpgradeKeySets);
diff --git a/core/java/android/content/pm/PackageSharedLibraryUpdater.java b/core/java/android/content/pm/PackageSharedLibraryUpdater.java
new file mode 100644
index 0000000..fa89432
--- /dev/null
+++ b/core/java/android/content/pm/PackageSharedLibraryUpdater.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.content.pm;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.Build;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.ArrayUtils;
+
+import java.util.ArrayList;
+
+/**
+ * Base for classes that update a {@link PackageParser.Package}'s shared libraries.
+ *
+ * @hide
+ */
+@VisibleForTesting
+public abstract class PackageSharedLibraryUpdater {
+
+ /**
+ * Update the package's shared libraries.
+ *
+ * @param pkg the package to update.
+ */
+ public abstract void updatePackage(PackageParser.Package pkg);
+
+ static void removeLibrary(PackageParser.Package pkg, String libraryName) {
+ pkg.usesLibraries = ArrayUtils.remove(pkg.usesLibraries, libraryName);
+ pkg.usesOptionalLibraries =
+ ArrayUtils.remove(pkg.usesOptionalLibraries, libraryName);
+ }
+
+ static @NonNull
+ <T> ArrayList<T> prefix(@Nullable ArrayList<T> cur, T val) {
+ if (cur == null) {
+ cur = new ArrayList<>();
+ }
+ cur.add(0, val);
+ return cur;
+ }
+
+ private static boolean isLibraryPresent(ArrayList<String> usesLibraries,
+ ArrayList<String> usesOptionalLibraries, String apacheHttpLegacy) {
+ return ArrayUtils.contains(usesLibraries, apacheHttpLegacy)
+ || ArrayUtils.contains(usesOptionalLibraries, apacheHttpLegacy);
+ }
+
+ static boolean apkTargetsApiLevelLessThanOrEqualToOMR1(PackageParser.Package pkg) {
+ int targetSdkVersion = pkg.applicationInfo.targetSdkVersion;
+ return targetSdkVersion <= Build.VERSION_CODES.O_MR1;
+ }
+
+ /**
+ * Add an implicit dependency.
+ *
+ * <p>If the package has an existing dependency on {@code existingLibrary} then prefix it with
+ * the {@code implicitDependency} if it is not already in the list of libraries.
+ *
+ * @param pkg the {@link PackageParser.Package} to update.
+ * @param existingLibrary the existing library.
+ * @param implicitDependency the implicit dependency to add
+ */
+ void prefixImplicitDependency(PackageParser.Package pkg, String existingLibrary,
+ String implicitDependency) {
+ ArrayList<String> usesLibraries = pkg.usesLibraries;
+ ArrayList<String> usesOptionalLibraries = pkg.usesOptionalLibraries;
+
+ if (!isLibraryPresent(usesLibraries, usesOptionalLibraries, implicitDependency)) {
+ if (ArrayUtils.contains(usesLibraries, existingLibrary)) {
+ prefix(usesLibraries, implicitDependency);
+ } else if (ArrayUtils.contains(usesOptionalLibraries, existingLibrary)) {
+ prefix(usesOptionalLibraries, implicitDependency);
+ }
+
+ pkg.usesLibraries = usesLibraries;
+ pkg.usesOptionalLibraries = usesOptionalLibraries;
+ }
+ }
+
+ void prefixRequiredLibrary(PackageParser.Package pkg, String libraryName) {
+ ArrayList<String> usesLibraries = pkg.usesLibraries;
+ ArrayList<String> usesOptionalLibraries = pkg.usesOptionalLibraries;
+
+ boolean alreadyPresent = isLibraryPresent(
+ usesLibraries, usesOptionalLibraries, libraryName);
+ if (!alreadyPresent) {
+ usesLibraries = prefix(usesLibraries, libraryName);
+
+ pkg.usesLibraries = usesLibraries;
+ }
+ }
+}
diff --git a/core/java/android/content/pm/SharedLibraryNames.java b/core/java/android/content/pm/SharedLibraryNames.java
new file mode 100644
index 0000000..83e8663
--- /dev/null
+++ b/core/java/android/content/pm/SharedLibraryNames.java
@@ -0,0 +1,32 @@
+/*
+ * 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.pm;
+
+/**
+ * A set of shared library names
+ *
+ * @hide
+ */
+public class SharedLibraryNames {
+
+ static final String ANDROID_TEST_BASE = "android.test.base";
+
+ static final String ANDROID_TEST_MOCK = "android.test.mock";
+
+ static final String ANDROID_TEST_RUNNER = "android.test.runner";
+
+ static final String ORG_APACHE_HTTP_LEGACY = "org.apache.http.legacy";
+}
diff --git a/core/java/android/content/pm/dex/ArtManager.java b/core/java/android/content/pm/dex/ArtManager.java
index 201cd8d..4129398 100644
--- a/core/java/android/content/pm/dex/ArtManager.java
+++ b/core/java/android/content/pm/dex/ArtManager.java
@@ -16,16 +16,22 @@
package android.content.pm.dex;
+import android.annotation.CallbackExecutor;
+import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
+import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
import android.util.Slog;
+import java.io.File;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.concurrent.Executor;
+
/**
* Class for retrieving various kinds of information related to the runtime artifacts of
* packages that are currently installed on the device.
@@ -43,6 +49,20 @@
/** The snapshot failed because of an internal error (e.g. error during opening profiles). */
public static final int SNAPSHOT_FAILED_INTERNAL_ERROR = 2;
+ /** Constant used for applications profiles. */
+ public static final int PROFILE_APPS = 0;
+ /** Constant used for the boot image profile. */
+ public static final int PROFILE_BOOT_IMAGE = 1;
+
+ /** @hide */
+ @IntDef(flag = true, prefix = { "PROFILE_" }, value = {
+ PROFILE_APPS,
+ PROFILE_BOOT_IMAGE,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ProfileType {}
+
+
private IArtManager mArtManager;
/**
@@ -53,41 +73,59 @@
}
/**
- * Snapshots the runtime profile for an apk belonging to the package {@code packageName}.
- * The apk is identified by {@code codePath}. The calling process must have
- * {@code android.permission.READ_RUNTIME_PROFILE} permission.
+ * Snapshots a runtime profile according to the {@code profileType} parameter.
*
- * The result will be posted on {@code handler} using the given {@code callback}.
- * The profile being available as a read-only {@link android.os.ParcelFileDescriptor}.
+ * If {@code profileType} is {@link ArtManager#PROFILE_APPS} the method will snapshot
+ * the profile for for an apk belonging to the package {@code packageName}.
+ * The apk is identified by {@code codePath}.
*
- * @param packageName the target package name
- * @param codePath the code path for which the profile should be retrieved
+ * If {@code profileType} is {@code ArtManager.PROFILE_BOOT_IMAGE} the method will snapshot
+ * the profile for the boot image. In this case {@code codePath can be null}. The parameters
+ * {@code packageName} and {@code codePath} are ignored.
+ *u
+ * The calling process must have {@code android.permission.READ_RUNTIME_PROFILE} permission.
+ *
+ * The result will be posted on the {@code executor} using the given {@code callback}.
+ * The profile will be available as a read-only {@link android.os.ParcelFileDescriptor}.
+ *
+ * This method will throw {@link IllegalStateException} if
+ * {@link ArtManager#isRuntimeProfilingEnabled(int)} does not return true for the given
+ * {@code profileType}.
+ *
+ * @param profileType the type of profile that should be snapshot (boot image or app)
+ * @param packageName the target package name or null if the target is the boot image
+ * @param codePath the code path for which the profile should be retrieved or null if
+ * the target is the boot image
* @param callback the callback which should be used for the result
- * @param handler the handler which should be used to post the result
+ * @param executor the executor which should be used to post the result
*/
@RequiresPermission(android.Manifest.permission.READ_RUNTIME_PROFILES)
- public void snapshotRuntimeProfile(@NonNull String packageName, @NonNull String codePath,
- @NonNull SnapshotRuntimeProfileCallback callback, @NonNull Handler handler) {
+ public void snapshotRuntimeProfile(@ProfileType int profileType, @Nullable String packageName,
+ @Nullable String codePath, @NonNull @CallbackExecutor Executor executor,
+ @NonNull SnapshotRuntimeProfileCallback callback) {
Slog.d(TAG, "Requesting profile snapshot for " + packageName + ":" + codePath);
SnapshotRuntimeProfileCallbackDelegate delegate =
- new SnapshotRuntimeProfileCallbackDelegate(callback, handler.getLooper());
+ new SnapshotRuntimeProfileCallbackDelegate(callback, executor);
try {
- mArtManager.snapshotRuntimeProfile(packageName, codePath, delegate);
+ mArtManager.snapshotRuntimeProfile(profileType, packageName, codePath, delegate);
} catch (RemoteException e) {
e.rethrowAsRuntimeException();
}
}
/**
- * Returns true if runtime profiles are enabled, false otherwise.
+ * Returns true if runtime profiles are enabled for the given type, false otherwise.
*
* The calling process must have {@code android.permission.READ_RUNTIME_PROFILE} permission.
+ *
+ * @param profileType can be either {@link ArtManager#PROFILE_APPS}
+ * or {@link ArtManager#PROFILE_BOOT_IMAGE}
*/
@RequiresPermission(android.Manifest.permission.READ_RUNTIME_PROFILES)
- public boolean isRuntimeProfilingEnabled() {
+ public boolean isRuntimeProfilingEnabled(@ProfileType int profileType) {
try {
- return mArtManager.isRuntimeProfilingEnabled();
+ return mArtManager.isRuntimeProfilingEnabled(profileType);
} catch (RemoteException e) {
e.rethrowAsRuntimeException();
}
@@ -116,41 +154,57 @@
}
private static class SnapshotRuntimeProfileCallbackDelegate
- extends android.content.pm.dex.ISnapshotRuntimeProfileCallback.Stub
- implements Handler.Callback {
- private static final int MSG_SNAPSHOT_OK = 1;
- private static final int MSG_ERROR = 2;
+ extends android.content.pm.dex.ISnapshotRuntimeProfileCallback.Stub {
private final ArtManager.SnapshotRuntimeProfileCallback mCallback;
- private final Handler mHandler;
+ private final Executor mExecutor;
private SnapshotRuntimeProfileCallbackDelegate(
- ArtManager.SnapshotRuntimeProfileCallback callback, Looper looper) {
+ ArtManager.SnapshotRuntimeProfileCallback callback, Executor executor) {
mCallback = callback;
- mHandler = new Handler(looper, this);
+ mExecutor = executor;
}
@Override
- public void onSuccess(ParcelFileDescriptor profileReadFd) {
- mHandler.obtainMessage(MSG_SNAPSHOT_OK, profileReadFd).sendToTarget();
+ public void onSuccess(final ParcelFileDescriptor profileReadFd) {
+ mExecutor.execute(() -> mCallback.onSuccess(profileReadFd));
}
@Override
public void onError(int errCode) {
- mHandler.obtainMessage(MSG_ERROR, errCode, 0).sendToTarget();
+ mExecutor.execute(() -> mCallback.onError(errCode));
}
+ }
- @Override
- public boolean handleMessage(Message msg) {
- switch (msg.what) {
- case MSG_SNAPSHOT_OK:
- mCallback.onSuccess((ParcelFileDescriptor) msg.obj);
- break;
- case MSG_ERROR:
- mCallback.onError(msg.arg1);
- break;
- default: return false;
- }
- return true;
- }
+ /**
+ * Return the profile name for the given split. If {@code splitName} is null the
+ * method returns the profile name for the base apk.
+ *
+ * @hide
+ */
+ public static String getProfileName(String splitName) {
+ return splitName == null ? "primary.prof" : splitName + ".split.prof";
+ }
+
+ /**
+ * Return the path to the current profile corresponding to given package and split.
+ *
+ * @hide
+ */
+ public static String getCurrentProfilePath(String packageName, int userId, String splitName) {
+ File profileDir = Environment.getDataProfilesDePackageDirectory(userId, packageName);
+ return new File(profileDir, getProfileName(splitName)).getAbsolutePath();
+ }
+
+ /**
+ * Return the snapshot profile file for the given package and profile name.
+ *
+ * KEEP in sync with installd dexopt.cpp.
+ * TODO(calin): inject the snapshot profile name from PM to avoid the dependency.
+ *
+ * @hide
+ */
+ public static File getProfileSnapshotFileForName(String packageName, String profileName) {
+ File profileDir = Environment.getDataRefProfilesDePackageDirectory(packageName);
+ return new File(profileDir, profileName + ".snapshot");
}
}
diff --git a/core/java/android/content/pm/dex/IArtManager.aidl b/core/java/android/content/pm/dex/IArtManager.aidl
index 8cbb452..6abfdba 100644
--- a/core/java/android/content/pm/dex/IArtManager.aidl
+++ b/core/java/android/content/pm/dex/IArtManager.aidl
@@ -25,20 +25,34 @@
*/
interface IArtManager {
/**
- * Snapshots the runtime profile for an apk belonging to the package {@param packageName}.
- * The apk is identified by {@param codePath}. The calling process must have
- * {@code android.permission.READ_RUNTIME_PROFILE} permission.
+ * Snapshots a runtime profile according to the {@code profileType} parameter.
*
- * The result will be posted on {@param callback} with the profile being available as a
- * read-only {@link android.os.ParcelFileDescriptor}.
- */
- oneway void snapshotRuntimeProfile(in String packageName,
- in String codePath, in ISnapshotRuntimeProfileCallback callback);
-
- /**
- * Returns true if runtime profiles are enabled, false otherwise.
+ * If {@code profileType} is {@link ArtManager#PROFILE_APPS} the method will snapshot
+ * the profile for for an apk belonging to the package {@code packageName}.
+ * The apk is identified by {@code codePath}.
+ *
+ * If {@code profileType} is {@code ArtManager.PROFILE_BOOT_IMAGE} the method will snapshot
+ * the profile for the boot image. In this case {@code codePath can be null}. The parameters
+ * {@code packageName} and {@code codePath} are ignored.
*
* The calling process must have {@code android.permission.READ_RUNTIME_PROFILE} permission.
+ *
+ * The result will be posted on the {@code executor} using the given {@code callback}.
+ * The profile will be available as a read-only {@link android.os.ParcelFileDescriptor}.
+ *
+ * This method will throw {@link IllegalStateException} if
+ * {@link ArtManager#isRuntimeProfilingEnabled(int)} does not return true for the given
+ * {@code profileType}.
*/
- boolean isRuntimeProfilingEnabled();
+ oneway void snapshotRuntimeProfile(int profileType, in String packageName,
+ in String codePath, in ISnapshotRuntimeProfileCallback callback);
+
+ /**
+ * Returns true if runtime profiles are enabled for the given type, false otherwise.
+ * The type can be can be either {@code ArtManager.PROFILE_APPS}
+ * or {@code ArtManager.PROFILE_BOOT_IMAGE}.
+ *
+ * @param profileType
+ */
+ boolean isRuntimeProfilingEnabled(int profileType);
}
diff --git a/core/java/android/database/CursorWindow.java b/core/java/android/database/CursorWindow.java
index f84ec65..a748f4d 100644
--- a/core/java/android/database/CursorWindow.java
+++ b/core/java/android/database/CursorWindow.java
@@ -28,6 +28,7 @@
import android.util.LongSparseArray;
import android.util.SparseIntArray;
+import dalvik.annotation.optimization.FastNative;
import dalvik.system.CloseGuard;
/**
@@ -62,28 +63,43 @@
private static native void nativeDispose(long windowPtr);
private static native void nativeWriteToParcel(long windowPtr, Parcel parcel);
- private static native void nativeClear(long windowPtr);
-
- private static native int nativeGetNumRows(long windowPtr);
- private static native boolean nativeSetNumColumns(long windowPtr, int columnNum);
- private static native boolean nativeAllocRow(long windowPtr);
- private static native void nativeFreeLastRow(long windowPtr);
-
- private static native int nativeGetType(long windowPtr, int row, int column);
+ private static native String nativeGetName(long windowPtr);
private static native byte[] nativeGetBlob(long windowPtr, int row, int column);
private static native String nativeGetString(long windowPtr, int row, int column);
- private static native long nativeGetLong(long windowPtr, int row, int column);
- private static native double nativeGetDouble(long windowPtr, int row, int column);
private static native void nativeCopyStringToBuffer(long windowPtr, int row, int column,
CharArrayBuffer buffer);
-
private static native boolean nativePutBlob(long windowPtr, byte[] value, int row, int column);
- private static native boolean nativePutString(long windowPtr, String value, int row, int column);
+ private static native boolean nativePutString(long windowPtr, String value,
+ int row, int column);
+
+ // Below native methods don't do unconstrained work, so are FastNative for performance
+
+ @FastNative
+ private static native void nativeClear(long windowPtr);
+
+ @FastNative
+ private static native int nativeGetNumRows(long windowPtr);
+ @FastNative
+ private static native boolean nativeSetNumColumns(long windowPtr, int columnNum);
+ @FastNative
+ private static native boolean nativeAllocRow(long windowPtr);
+ @FastNative
+ private static native void nativeFreeLastRow(long windowPtr);
+
+ @FastNative
+ private static native int nativeGetType(long windowPtr, int row, int column);
+ @FastNative
+ private static native long nativeGetLong(long windowPtr, int row, int column);
+ @FastNative
+ private static native double nativeGetDouble(long windowPtr, int row, int column);
+
+ @FastNative
private static native boolean nativePutLong(long windowPtr, long value, int row, int column);
+ @FastNative
private static native boolean nativePutDouble(long windowPtr, double value, int row, int column);
+ @FastNative
private static native boolean nativePutNull(long windowPtr, int row, int column);
- private static native String nativeGetName(long windowPtr);
/**
* Creates a new empty cursor window and gives it a name.
diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java
index 7fb0c89..7297426 100644
--- a/core/java/android/hardware/Sensor.java
+++ b/core/java/android/hardware/Sensor.java
@@ -22,7 +22,9 @@
/**
* Class representing a sensor. Use {@link SensorManager#getSensorList} to get
- * the list of available Sensors.
+ * the list of available sensors. For more information about Android sensors,
+ * read the
+ * <a href="/guide/topics/sensors/sensors_motion.html">Motion Sensors guide</a>.</p>
*
* @see SensorManager
* @see SensorEventListener
diff --git a/core/java/android/hardware/camera2/TotalCaptureResult.java b/core/java/android/hardware/camera2/TotalCaptureResult.java
index 657745c..bae2d04 100644
--- a/core/java/android/hardware/camera2/TotalCaptureResult.java
+++ b/core/java/android/hardware/camera2/TotalCaptureResult.java
@@ -17,11 +17,14 @@
package android.hardware.camera2;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.impl.CaptureResultExtras;
+import android.hardware.camera2.impl.PhysicalCaptureResultInfo;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
/**
@@ -44,6 +47,12 @@
* as {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE}). Refer to each key documentation on
* a case-by-case basis.</p>
*
+ * <p>For a logical multi-camera device, if the CaptureRequest contains a surface for an underlying
+ * physical camera, the corresponding {@link TotalCaptureResult} object will include the metadata
+ * for that physical camera. And its keys and values can be accessed by
+ * {@link #getPhysicalCameraKey}. If all requested surfaces are for the logical camera, no
+ * metadata for physical camera will be included.</p>
+ *
* <p>{@link TotalCaptureResult} objects are immutable.</p>
*
* @see CameraDevice.CaptureCallback#onCaptureCompleted
@@ -52,6 +61,8 @@
private final List<CaptureResult> mPartialResults;
private final int mSessionId;
+ // The map between physical camera id and capture result
+ private final HashMap<String, CameraMetadataNative> mPhysicalCaptureResults;
/**
* Takes ownership of the passed-in camera metadata and the partial results
@@ -60,7 +71,8 @@
* @hide
*/
public TotalCaptureResult(CameraMetadataNative results, CaptureRequest parent,
- CaptureResultExtras extras, List<CaptureResult> partials, int sessionId) {
+ CaptureResultExtras extras, List<CaptureResult> partials, int sessionId,
+ PhysicalCaptureResultInfo physicalResults[]) {
super(results, parent, extras);
if (partials == null) {
@@ -70,6 +82,12 @@
}
mSessionId = sessionId;
+
+ mPhysicalCaptureResults = new HashMap<String, CameraMetadataNative>();
+ for (PhysicalCaptureResultInfo onePhysicalResult : physicalResults) {
+ mPhysicalCaptureResults.put(onePhysicalResult.getCameraId(),
+ onePhysicalResult.getCameraMetadata());
+ }
}
/**
@@ -83,6 +101,7 @@
mPartialResults = new ArrayList<>();
mSessionId = CameraCaptureSession.SESSION_ID_NONE;
+ mPhysicalCaptureResults = new HashMap<String, CameraMetadataNative>();
}
/**
@@ -111,4 +130,38 @@
public int getSessionId() {
return mSessionId;
}
+
+ /**
+ * Get a capture result field value for a particular physical camera id.
+ *
+ * <p>The field definitions can be found in {@link CaptureResult}.</p>
+ *
+ * <p>This function can be called for logical camera devices, which are devices that have
+ * REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA capability and calls to {@link
+ * CameraCharacteristics#getPhysicalCameraIds} return a non-empty list of physical devices that
+ * are backing the logical camera. The camera id included in physicalCameraId argument
+ * selects an individual physical device, and returns its specific capture result field.</p>
+ *
+ * <p>This function should only be called if one or more streams from the underlying
+ * 'physicalCameraId' was requested by the corresponding capture request.</p>
+ *
+ * @throws IllegalArgumentException if the key was not valid, or the physicalCameraId is not
+ * applicable to the current camera, or a stream from 'physicalCameraId' is not requested by the
+ * corresponding capture request.
+ *
+ * @param key The result field to read.
+ * @param physicalCameraId The physical camera the result originates from.
+ *
+ * @return The value of that key, or {@code null} if the field is not set.
+ */
+ @Nullable
+ public <T> T getPhysicalCameraKey(Key<T> key, @NonNull String physicalCameraId) {
+ if (!mPhysicalCaptureResults.containsKey(physicalCameraId)) {
+ throw new IllegalArgumentException(
+ "No TotalCaptureResult exists for physical camera " + physicalCameraId);
+ }
+
+ CameraMetadataNative physicalMetadata = mPhysicalCaptureResults.get(physicalCameraId);
+ return physicalMetadata.get(key);
+ }
}
diff --git a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
index cab9d70..511fa43 100644
--- a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
@@ -1001,19 +1001,17 @@
throw new IllegalArgumentException("Null Surface targets are not allowed");
}
- if (!request.isReprocess()) {
- continue;
- }
for (int i = 0; i < mConfiguredOutputs.size(); i++) {
OutputConfiguration configuration = mConfiguredOutputs.valueAt(i);
if (configuration.isForPhysicalCamera()
&& configuration.getSurfaces().contains(surface)) {
- throw new IllegalArgumentException(
- "Reprocess request on physical stream is not allowed");
+ if (request.isReprocess()) {
+ throw new IllegalArgumentException(
+ "Reprocess request on physical stream is not allowed");
+ }
}
}
}
-
}
synchronized(mInterfaceLock) {
@@ -1966,7 +1964,8 @@
@Override
public void onResultReceived(CameraMetadataNative result,
- CaptureResultExtras resultExtras) throws RemoteException {
+ CaptureResultExtras resultExtras, PhysicalCaptureResultInfo physicalResults[])
+ throws RemoteException {
int requestId = resultExtras.getRequestId();
long frameNumber = resultExtras.getFrameNumber();
@@ -2073,7 +2072,8 @@
request.get(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE);
final int subsequenceId = resultExtras.getSubsequenceId();
final TotalCaptureResult resultAsCapture = new TotalCaptureResult(result,
- request, resultExtras, partialResults, holder.getSessionId());
+ request, resultExtras, partialResults, holder.getSessionId(),
+ physicalResults);
// Final capture result
resultDispatch = new Runnable() {
@Override
@@ -2088,9 +2088,11 @@
NANO_PER_SECOND/fpsRange.getUpper());
CameraMetadataNative resultLocal =
new CameraMetadataNative(resultCopy);
+ // No logical multi-camera support for batched output mode.
TotalCaptureResult resultInBatch = new TotalCaptureResult(
resultLocal, holder.getRequest(i), resultExtras,
- partialResults, holder.getSessionId());
+ partialResults, holder.getSessionId(),
+ new PhysicalCaptureResultInfo[0]);
holder.getCallback().onCaptureCompleted(
CameraDeviceImpl.this,
diff --git a/core/java/android/hardware/camera2/impl/PhysicalCaptureResultInfo.java b/core/java/android/hardware/camera2/impl/PhysicalCaptureResultInfo.java
new file mode 100644
index 0000000..30eaf13
--- /dev/null
+++ b/core/java/android/hardware/camera2/impl/PhysicalCaptureResultInfo.java
@@ -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.
+ */
+package android.hardware.camera2.impl;
+
+import android.hardware.camera2.impl.CameraMetadataNative;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * @hide
+ */
+public class PhysicalCaptureResultInfo implements Parcelable {
+ private String cameraId;
+ private CameraMetadataNative cameraMetadata;
+
+ public static final Parcelable.Creator<PhysicalCaptureResultInfo> CREATOR =
+ new Parcelable.Creator<PhysicalCaptureResultInfo>() {
+ @Override
+ public PhysicalCaptureResultInfo createFromParcel(Parcel in) {
+ return new PhysicalCaptureResultInfo(in);
+ }
+
+ @Override
+ public PhysicalCaptureResultInfo[] newArray(int size) {
+ return new PhysicalCaptureResultInfo[size];
+ }
+ };
+
+ private PhysicalCaptureResultInfo(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public PhysicalCaptureResultInfo(String cameraId, CameraMetadataNative cameraMetadata) {
+ this.cameraId = cameraId;
+ this.cameraMetadata = cameraMetadata;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeString(cameraId);
+ cameraMetadata.writeToParcel(dest, flags);
+ }
+
+ public void readFromParcel(Parcel in) {
+ cameraId = in.readString();
+ cameraMetadata = new CameraMetadataNative();
+ cameraMetadata.readFromParcel(in);
+ }
+
+ public String getCameraId() {
+ return cameraId;
+ }
+
+ public CameraMetadataNative getCameraMetadata() {
+ return cameraMetadata;
+ }
+}
diff --git a/core/java/android/hardware/camera2/legacy/CameraDeviceUserShim.java b/core/java/android/hardware/camera2/legacy/CameraDeviceUserShim.java
index eccab75..bc7b126 100644
--- a/core/java/android/hardware/camera2/legacy/CameraDeviceUserShim.java
+++ b/core/java/android/hardware/camera2/legacy/CameraDeviceUserShim.java
@@ -26,6 +26,7 @@
import android.hardware.camera2.ICameraDeviceUser;
import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.impl.CaptureResultExtras;
+import android.hardware.camera2.impl.PhysicalCaptureResultInfo;
import android.hardware.camera2.params.OutputConfiguration;
import android.hardware.camera2.utils.SubmitInfo;
import android.os.ConditionVariable;
@@ -249,7 +250,8 @@
@Override
public void onResultReceived(final CameraMetadataNative result,
- final CaptureResultExtras resultExtras) {
+ final CaptureResultExtras resultExtras,
+ PhysicalCaptureResultInfo physicalResults[]) {
Object[] resultArray = new Object[] { result, resultExtras };
Message msg = getHandler().obtainMessage(RESULT_RECEIVED,
/*obj*/ resultArray);
@@ -320,7 +322,8 @@
Object[] resultArray = (Object[]) msg.obj;
CameraMetadataNative result = (CameraMetadataNative) resultArray[0];
CaptureResultExtras resultExtras = (CaptureResultExtras) resultArray[1];
- mCallbacks.onResultReceived(result, resultExtras);
+ mCallbacks.onResultReceived(result, resultExtras,
+ new PhysicalCaptureResultInfo[0]);
break;
}
case PREPARED: {
diff --git a/core/java/android/hardware/camera2/legacy/LegacyCameraDevice.java b/core/java/android/hardware/camera2/legacy/LegacyCameraDevice.java
index cb59fd1..e7f2134 100644
--- a/core/java/android/hardware/camera2/legacy/LegacyCameraDevice.java
+++ b/core/java/android/hardware/camera2/legacy/LegacyCameraDevice.java
@@ -23,6 +23,7 @@
import android.hardware.camera2.CaptureRequest;
import android.hardware.camera2.impl.CameraDeviceImpl;
import android.hardware.camera2.impl.CaptureResultExtras;
+import android.hardware.camera2.impl.PhysicalCaptureResultInfo;
import android.hardware.camera2.ICameraDeviceCallbacks;
import android.hardware.camera2.params.StreamConfigurationMap;
import android.hardware.camera2.utils.ArrayUtils;
@@ -253,7 +254,8 @@
holder.getRequestId());
}
try {
- mDeviceCallbacks.onResultReceived(result, extras);
+ mDeviceCallbacks.onResultReceived(result, extras,
+ new PhysicalCaptureResultInfo[0]);
} catch (RemoteException e) {
throw new IllegalStateException(
"Received remote exception during onCameraError callback: ", e);
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java
index 36673cd..4de4880 100644
--- a/core/java/android/hardware/display/DisplayManager.java
+++ b/core/java/android/hardware/display/DisplayManager.java
@@ -656,6 +656,34 @@
}
/**
+ * Temporarily sets the brightness of the display.
+ * <p>
+ * Requires the {@link android.Manifest.permission#CONTROL_DISPLAY_BRIGHTNESS} permission.
+ * </p>
+ *
+ * @param brightness The brightness value from 0 to 255.
+ *
+ * @hide Requires signature permission.
+ */
+ public void setTemporaryBrightness(int brightness) {
+ mGlobal.setTemporaryBrightness(brightness);
+ }
+
+ /**
+ * Temporarily sets the auto brightness adjustment factor.
+ * <p>
+ * Requires the {@link android.Manifest.permission#CONTROL_DISPLAY_BRIGHTNESS} permission.
+ * </p>
+ *
+ * @param adjustment The adjustment factor from -1.0 to 1.0.
+ *
+ * @hide Requires signature permission.
+ */
+ public void setTemporaryAutoBrightnessAdjustment(float adjustment) {
+ mGlobal.setTemporaryAutoBrightnessAdjustment(adjustment);
+ }
+
+ /**
* Listens for changes in available display devices.
*/
public interface DisplayListener {
diff --git a/core/java/android/hardware/display/DisplayManagerGlobal.java b/core/java/android/hardware/display/DisplayManagerGlobal.java
index 9c851f1..2d5f5e0 100644
--- a/core/java/android/hardware/display/DisplayManagerGlobal.java
+++ b/core/java/android/hardware/display/DisplayManagerGlobal.java
@@ -489,6 +489,42 @@
}
}
+ /**
+ * Temporarily sets the brightness of the display.
+ * <p>
+ * Requires the {@link android.Manifest.permission#CONTROL_DISPLAY_BRIGHTNESS} permission.
+ * </p>
+ *
+ * @param brightness The brightness value from 0 to 255.
+ *
+ * @hide Requires signature permission.
+ */
+ public void setTemporaryBrightness(int brightness) {
+ try {
+ mDm.setTemporaryBrightness(brightness);
+ } catch (RemoteException ex) {
+ throw ex.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Temporarily sets the auto brightness adjustment factor.
+ * <p>
+ * Requires the {@link android.Manifest.permission#CONTROL_DISPLAY_BRIGHTNESS} permission.
+ * </p>
+ *
+ * @param adjustment The adjustment factor from -1.0 to 1.0.
+ *
+ * @hide Requires signature permission.
+ */
+ public void setTemporaryAutoBrightnessAdjustment(float adjustment) {
+ try {
+ mDm.setTemporaryAutoBrightnessAdjustment(adjustment);
+ } catch (RemoteException ex) {
+ throw ex.rethrowFromSystemServer();
+ }
+ }
+
private final class DisplayManagerCallback extends IDisplayManagerCallback.Stub {
@Override
public void onDisplayEvent(int displayId, int event) {
diff --git a/core/java/android/hardware/display/DisplayManagerInternal.java b/core/java/android/hardware/display/DisplayManagerInternal.java
index 078958a..1cfad4f 100644
--- a/core/java/android/hardware/display/DisplayManagerInternal.java
+++ b/core/java/android/hardware/display/DisplayManagerInternal.java
@@ -214,23 +214,12 @@
// nearby, turning it off temporarily until the object is moved away.
public boolean useProximitySensor;
- // The desired screen brightness in the range 0 (minimum / off) to 255 (brightest).
- // The display power controller may choose to clamp the brightness.
- // When auto-brightness is enabled, this field should specify a nominal default
- // value to use while waiting for the light sensor to report enough data.
- public int screenBrightness;
+ // An override of the screen brightness. Set to -1 is used if there's no override.
+ public int screenBrightnessOverride;
- // The screen auto-brightness adjustment factor in the range -1 (dimmer) to 1 (brighter).
- public float screenAutoBrightnessAdjustment;
-
- // Set to true if screenBrightness and screenAutoBrightnessAdjustment were both
- // set by the user as opposed to being programmatically controlled by apps.
- public boolean brightnessSetByUser;
-
- // Set to true if screenBrightness or screenAutoBrightnessAdjustment are being set
- // temporarily. This is typically set while the user has their finger on the brightness
- // control, before they've selected the final brightness value.
- public boolean brightnessIsTemporary;
+ // An override of the screen auto-brightness adjustment factor in the range -1 (dimmer) to
+ // 1 (brighter). Set to Float.NaN if there's no override.
+ public float screenAutoBrightnessAdjustmentOverride;
// If true, enables automatic brightness control.
public boolean useAutoBrightness;
@@ -262,10 +251,10 @@
public DisplayPowerRequest() {
policy = POLICY_BRIGHT;
useProximitySensor = false;
- screenBrightness = PowerManager.BRIGHTNESS_ON;
- screenAutoBrightnessAdjustment = 0.0f;
- screenLowPowerBrightnessFactor = 0.5f;
+ screenBrightnessOverride = -1;
useAutoBrightness = false;
+ screenAutoBrightnessAdjustmentOverride = Float.NaN;
+ screenLowPowerBrightnessFactor = 0.5f;
blockScreenOn = false;
dozeScreenBrightness = PowerManager.BRIGHTNESS_DEFAULT;
dozeScreenState = Display.STATE_UNKNOWN;
@@ -286,12 +275,10 @@
public void copyFrom(DisplayPowerRequest other) {
policy = other.policy;
useProximitySensor = other.useProximitySensor;
- screenBrightness = other.screenBrightness;
- screenAutoBrightnessAdjustment = other.screenAutoBrightnessAdjustment;
- screenLowPowerBrightnessFactor = other.screenLowPowerBrightnessFactor;
- brightnessSetByUser = other.brightnessSetByUser;
- brightnessIsTemporary = other.brightnessIsTemporary;
+ screenBrightnessOverride = other.screenBrightnessOverride;
useAutoBrightness = other.useAutoBrightness;
+ screenAutoBrightnessAdjustmentOverride = other.screenAutoBrightnessAdjustmentOverride;
+ screenLowPowerBrightnessFactor = other.screenLowPowerBrightnessFactor;
blockScreenOn = other.blockScreenOn;
lowPowerMode = other.lowPowerMode;
boostScreenBrightness = other.boostScreenBrightness;
@@ -309,13 +296,12 @@
return other != null
&& policy == other.policy
&& useProximitySensor == other.useProximitySensor
- && screenBrightness == other.screenBrightness
- && screenAutoBrightnessAdjustment == other.screenAutoBrightnessAdjustment
+ && screenBrightnessOverride == other.screenBrightnessOverride
+ && useAutoBrightness == other.useAutoBrightness
+ && floatEquals(screenAutoBrightnessAdjustmentOverride,
+ other.screenAutoBrightnessAdjustmentOverride)
&& screenLowPowerBrightnessFactor
== other.screenLowPowerBrightnessFactor
- && brightnessSetByUser == other.brightnessSetByUser
- && brightnessIsTemporary == other.brightnessIsTemporary
- && useAutoBrightness == other.useAutoBrightness
&& blockScreenOn == other.blockScreenOn
&& lowPowerMode == other.lowPowerMode
&& boostScreenBrightness == other.boostScreenBrightness
@@ -323,6 +309,10 @@
&& dozeScreenState == other.dozeScreenState;
}
+ private boolean floatEquals(float f1, float f2) {
+ return f1 == f2 || Float.isNaN(f1) && Float.isNaN(f2);
+ }
+
@Override
public int hashCode() {
return 0; // don't care
@@ -332,12 +322,11 @@
public String toString() {
return "policy=" + policyToString(policy)
+ ", useProximitySensor=" + useProximitySensor
- + ", screenBrightness=" + screenBrightness
- + ", screenAutoBrightnessAdjustment=" + screenAutoBrightnessAdjustment
- + ", screenLowPowerBrightnessFactor=" + screenLowPowerBrightnessFactor
- + ", brightnessSetByUser=" + brightnessSetByUser
- + ", brightnessIsTemporary=" + brightnessIsTemporary
+ + ", screenBrightnessOverride=" + screenBrightnessOverride
+ ", useAutoBrightness=" + useAutoBrightness
+ + ", screenAutoBrightnessAdjustmentOverride="
+ + screenAutoBrightnessAdjustmentOverride
+ + ", screenLowPowerBrightnessFactor=" + screenLowPowerBrightnessFactor
+ ", blockScreenOn=" + blockScreenOn
+ ", lowPowerMode=" + lowPowerMode
+ ", boostScreenBrightness=" + boostScreenBrightness
diff --git a/core/java/android/hardware/display/IDisplayManager.aidl b/core/java/android/hardware/display/IDisplayManager.aidl
index 5b7b32f..13599cf 100644
--- a/core/java/android/hardware/display/IDisplayManager.aidl
+++ b/core/java/android/hardware/display/IDisplayManager.aidl
@@ -92,4 +92,10 @@
// the same as the calling user.
void setBrightnessConfigurationForUser(in BrightnessConfiguration c, int userId,
String packageName);
+
+ // Temporarily sets the display brightness.
+ void setTemporaryBrightness(int brightness);
+
+ // Temporarily sets the auto brightness adjustment factor.
+ void setTemporaryAutoBrightnessAdjustment(float adjustment);
}
diff --git a/core/java/android/hardware/input/InputManager.java b/core/java/android/hardware/input/InputManager.java
index 1de8882..fdea5a2 100644
--- a/core/java/android/hardware/input/InputManager.java
+++ b/core/java/android/hardware/input/InputManager.java
@@ -1246,7 +1246,7 @@
int repeat;
if (effect instanceof VibrationEffect.OneShot) {
VibrationEffect.OneShot oneShot = (VibrationEffect.OneShot) effect;
- pattern = new long[] { 0, oneShot.getTiming() };
+ pattern = new long[] { 0, oneShot.getDuration() };
repeat = -1;
} else if (effect instanceof VibrationEffect.Waveform) {
VibrationEffect.Waveform waveform = (VibrationEffect.Waveform) effect;
diff --git a/core/proto/android/os/batterymanager.proto b/core/java/android/hardware/radio/Announcement.aidl
similarity index 64%
copy from core/proto/android/os/batterymanager.proto
copy to core/java/android/hardware/radio/Announcement.aidl
index 669bf2d..eeb5951 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/core/java/android/hardware/radio/Announcement.aidl
@@ -1,5 +1,5 @@
-/*
- * 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,16 +14,7 @@
* limitations under the License.
*/
-syntax = "proto2";
-package android.os;
+package android.hardware.radio;
-option java_multiple_files = true;
-
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
-}
+/** @hide */
+parcelable Announcement;
diff --git a/core/java/android/hardware/radio/Announcement.java b/core/java/android/hardware/radio/Announcement.java
new file mode 100644
index 0000000..166fe60
--- /dev/null
+++ b/core/java/android/hardware/radio/Announcement.java
@@ -0,0 +1,133 @@
+/**
+ * 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.hardware.radio;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * @hide
+ */
+@SystemApi
+public final class Announcement implements Parcelable {
+
+ /** DAB alarm, RDS emergency program type (PTY 31). */
+ public static final int TYPE_EMERGENCY = 1;
+ /** DAB warning. */
+ public static final int TYPE_WARNING = 2;
+ /** DAB road traffic, RDS TA, HD Radio transportation. */
+ public static final int TYPE_TRAFFIC = 3;
+ /** Weather. */
+ public static final int TYPE_WEATHER = 4;
+ /** News. */
+ public static final int TYPE_NEWS = 5;
+ /** DAB event, special event. */
+ public static final int TYPE_EVENT = 6;
+ /** DAB sport report, RDS sports. */
+ public static final int TYPE_SPORT = 7;
+ /** All others. */
+ public static final int TYPE_MISC = 8;
+ /** @hide */
+ @IntDef(prefix = { "TYPE_" }, value = {
+ TYPE_EMERGENCY,
+ TYPE_WARNING,
+ TYPE_TRAFFIC,
+ TYPE_WEATHER,
+ TYPE_NEWS,
+ TYPE_EVENT,
+ TYPE_SPORT,
+ TYPE_MISC,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface Type {}
+
+ /**
+ * Listener of announcement list events.
+ */
+ public interface OnListUpdatedListener {
+ /**
+ * An event called whenever a list of active announcements change.
+ *
+ * The entire list is sent each time a new announcement appears or any ends broadcasting.
+ *
+ * @param activeAnnouncements a full list of active announcements
+ */
+ void onListUpdated(Collection<Announcement> activeAnnouncements);
+ }
+
+ @NonNull private final ProgramSelector mSelector;
+ @Type private final int mType;
+ @NonNull private final Map<String, String> mVendorInfo;
+
+ /** @hide */
+ public Announcement(@NonNull ProgramSelector selector, @Type int type,
+ @NonNull Map<String, String> vendorInfo) {
+ mSelector = Objects.requireNonNull(selector);
+ mType = Objects.requireNonNull(type);
+ mVendorInfo = Objects.requireNonNull(vendorInfo);
+ }
+
+ private Announcement(@NonNull Parcel in) {
+ mSelector = in.readTypedObject(ProgramSelector.CREATOR);
+ mType = in.readInt();
+ mVendorInfo = Utils.readStringMap(in);
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeTypedObject(mSelector, 0);
+ dest.writeInt(mType);
+ Utils.writeStringMap(dest, mVendorInfo);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ public static final Parcelable.Creator<Announcement> CREATOR =
+ new Parcelable.Creator<Announcement>() {
+ public Announcement createFromParcel(Parcel in) {
+ return new Announcement(in);
+ }
+
+ public Announcement[] newArray(int size) {
+ return new Announcement[size];
+ }
+ };
+
+ public @NonNull ProgramSelector getSelector() {
+ return mSelector;
+ }
+
+ public @Type int getType() {
+ return mType;
+ }
+
+ public @NonNull Map<String, String> getVendorInfo() {
+ return mVendorInfo;
+ }
+}
diff --git a/core/proto/android/os/batterymanager.proto b/core/java/android/hardware/radio/IAnnouncementListener.aidl
similarity index 64%
copy from core/proto/android/os/batterymanager.proto
copy to core/java/android/hardware/radio/IAnnouncementListener.aidl
index 669bf2d..b4d974a 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/core/java/android/hardware/radio/IAnnouncementListener.aidl
@@ -1,5 +1,5 @@
-/*
- * 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,16 +14,11 @@
* limitations under the License.
*/
-syntax = "proto2";
-package android.os;
+package android.hardware.radio;
-option java_multiple_files = true;
+import android.hardware.radio.Announcement;
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
+/** {@hide} */
+oneway interface IAnnouncementListener {
+ void onListUpdated(in List<Announcement> activeAnnouncements);
}
diff --git a/core/proto/android/os/batterymanager.proto b/core/java/android/hardware/radio/ICloseHandle.aidl
similarity index 64%
copy from core/proto/android/os/batterymanager.proto
copy to core/java/android/hardware/radio/ICloseHandle.aidl
index 669bf2d..576c03b 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/core/java/android/hardware/radio/ICloseHandle.aidl
@@ -1,5 +1,5 @@
-/*
- * 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,16 +14,9 @@
* limitations under the License.
*/
-syntax = "proto2";
-package android.os;
+package android.hardware.radio;
-option java_multiple_files = true;
-
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
+/** {@hide} */
+interface ICloseHandle {
+ void close();
}
diff --git a/core/java/android/hardware/radio/IRadioService.aidl b/core/java/android/hardware/radio/IRadioService.aidl
index c43fd26..9349cf7 100644
--- a/core/java/android/hardware/radio/IRadioService.aidl
+++ b/core/java/android/hardware/radio/IRadioService.aidl
@@ -16,6 +16,8 @@
package android.hardware.radio;
+import android.hardware.radio.IAnnouncementListener;
+import android.hardware.radio.ICloseHandle;
import android.hardware.radio.ITuner;
import android.hardware.radio.ITunerCallback;
import android.hardware.radio.RadioManager;
@@ -30,4 +32,7 @@
ITuner openTuner(int moduleId, in RadioManager.BandConfig bandConfig, boolean withAudio,
in ITunerCallback callback);
+
+ ICloseHandle addAnnouncementListener(in int[] enabledTypes,
+ in IAnnouncementListener listener);
}
diff --git a/core/java/android/hardware/radio/ITuner.aidl b/core/java/android/hardware/radio/ITuner.aidl
index bf5e391..429f1f3 100644
--- a/core/java/android/hardware/radio/ITuner.aidl
+++ b/core/java/android/hardware/radio/ITuner.aidl
@@ -64,8 +64,6 @@
void cancelAnnouncement();
- RadioManager.ProgramInfo getProgramInformation();
-
Bitmap getImage(int id);
/**
@@ -92,6 +90,4 @@
* @return Vendor-specific key-value pairs, must be Map<String, String>
*/
Map getParameters(in List<String> keys);
-
- boolean isAntennaConnected();
}
diff --git a/core/java/android/hardware/radio/ITunerCallback.aidl b/core/java/android/hardware/radio/ITunerCallback.aidl
index 54af30f..b32daa5 100644
--- a/core/java/android/hardware/radio/ITunerCallback.aidl
+++ b/core/java/android/hardware/radio/ITunerCallback.aidl
@@ -17,12 +17,14 @@
package android.hardware.radio;
import android.hardware.radio.ProgramList;
+import android.hardware.radio.ProgramSelector;
import android.hardware.radio.RadioManager;
import android.hardware.radio.RadioMetadata;
/** {@hide} */
oneway interface ITunerCallback {
void onError(int status);
+ void onTuneFailed(int result, in ProgramSelector selector);
void onConfigurationChanged(in RadioManager.BandConfig config);
void onCurrentProgramInfoChanged(in RadioManager.ProgramInfo info);
void onTrafficAnnouncement(boolean active);
diff --git a/core/java/android/hardware/radio/ProgramSelector.java b/core/java/android/hardware/radio/ProgramSelector.java
index 0cf7605..0294a29 100644
--- a/core/java/android/hardware/radio/ProgramSelector.java
+++ b/core/java/android/hardware/radio/ProgramSelector.java
@@ -27,6 +27,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.stream.Stream;
@@ -363,6 +364,38 @@
}
/**
+ * Creates an equivalent ProgramSelector with a given secondary identifier preferred.
+ *
+ * Used to point to a specific physical identifier for technologies that may broadcast the same
+ * program on different channels. For example, with a DAB program broadcasted over multiple
+ * ensembles, the radio hardware may select the one with the strongest signal. The UI may select
+ * preferred ensemble though, so the radio hardware may try to use it in the first place.
+ *
+ * This is a best-effort hint for the tuner, not a guaranteed behavior.
+ *
+ * Setting the given secondary identifier as preferred means filtering out other secondary
+ * identifiers of its type and adding it to the list.
+ *
+ * @param preferred preferred secondary identifier
+ * @return a new ProgramSelector with a given secondary identifier preferred
+ */
+ public @NonNull ProgramSelector withSecondaryPreferred(@NonNull Identifier preferred) {
+ int preferredType = preferred.getType();
+ Identifier[] secondaryIds = Stream.concat(
+ // remove other identifiers of that type
+ Arrays.stream(mSecondaryIds).filter(id -> id.getType() != preferredType),
+ // add preferred identifier instead
+ Stream.of(preferred)).toArray(Identifier[]::new);
+
+ return new ProgramSelector(
+ mProgramType,
+ mPrimaryId,
+ secondaryIds,
+ mVendorIds
+ );
+ }
+
+ /**
* Builds new ProgramSelector for AM/FM frequency.
*
* @param band the band.
diff --git a/core/java/android/hardware/radio/RadioManager.java b/core/java/android/hardware/radio/RadioManager.java
index 56668ac..b00f603 100644
--- a/core/java/android/hardware/radio/RadioManager.java
+++ b/core/java/android/hardware/radio/RadioManager.java
@@ -17,8 +17,10 @@
package android.hardware.radio;
import android.Manifest;
+import android.annotation.CallbackExecutor;
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
@@ -32,14 +34,19 @@
import android.text.TextUtils;
import android.util.Log;
+import com.android.internal.util.Preconditions;
+
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
+import java.util.concurrent.Executor;
import java.util.stream.Collectors;
/**
@@ -1380,35 +1387,44 @@
};
}
- /** Radio program information returned by
- * {@link RadioTuner#getProgramInformation(RadioManager.ProgramInfo[])} */
+ /** Radio program information. */
public static class ProgramInfo implements Parcelable {
- // sourced from hardware/interfaces/broadcastradio/1.1/types.hal
+ // sourced from hardware/interfaces/broadcastradio/2.0/types.hal
private static final int FLAG_LIVE = 1 << 0;
private static final int FLAG_MUTED = 1 << 1;
private static final int FLAG_TRAFFIC_PROGRAM = 1 << 2;
private static final int FLAG_TRAFFIC_ANNOUNCEMENT = 1 << 3;
+ private static final int FLAG_TUNED = 1 << 4;
+ private static final int FLAG_STEREO = 1 << 5;
@NonNull private final ProgramSelector mSelector;
- private final boolean mTuned; // TODO(b/69958777): replace with mFlags
- private final boolean mStereo;
- private final boolean mDigital;
- private final int mFlags;
- private final int mSignalStrength;
- private final RadioMetadata mMetadata;
+ @Nullable private final ProgramSelector.Identifier mLogicallyTunedTo;
+ @Nullable private final ProgramSelector.Identifier mPhysicallyTunedTo;
+ @NonNull private final Collection<ProgramSelector.Identifier> mRelatedContent;
+ private final int mInfoFlags;
+ private final int mSignalQuality;
+ @Nullable private final RadioMetadata mMetadata;
@NonNull private final Map<String, String> mVendorInfo;
/** @hide */
- public ProgramInfo(@NonNull ProgramSelector selector, boolean tuned, boolean stereo,
- boolean digital, int signalStrength, RadioMetadata metadata, int flags,
- Map<String, String> vendorInfo) {
- mSelector = selector;
- mTuned = tuned;
- mStereo = stereo;
- mDigital = digital;
- mFlags = flags;
- mSignalStrength = signalStrength;
+ public ProgramInfo(@NonNull ProgramSelector selector,
+ @Nullable ProgramSelector.Identifier logicallyTunedTo,
+ @Nullable ProgramSelector.Identifier physicallyTunedTo,
+ @Nullable Collection<ProgramSelector.Identifier> relatedContent,
+ int infoFlags, int signalQuality, @Nullable RadioMetadata metadata,
+ @Nullable Map<String, String> vendorInfo) {
+ mSelector = Objects.requireNonNull(selector);
+ mLogicallyTunedTo = logicallyTunedTo;
+ mPhysicallyTunedTo = physicallyTunedTo;
+ if (relatedContent == null) {
+ mRelatedContent = Collections.emptyList();
+ } else {
+ Preconditions.checkCollectionElementsNotNull(relatedContent, "relatedContent");
+ mRelatedContent = relatedContent;
+ }
+ mInfoFlags = infoFlags;
+ mSignalQuality = signalQuality;
mMetadata = metadata;
mVendorInfo = (vendorInfo == null) ? new HashMap<>() : vendorInfo;
}
@@ -1422,6 +1438,51 @@
return mSelector;
}
+ /**
+ * Identifier currently used for program selection.
+ *
+ * This identifier can be used to determine which technology is
+ * currently being used for reception.
+ *
+ * Some program selectors contain tuning information for different radio
+ * technologies (i.e. FM RDS and DAB). For example, user may tune using
+ * a ProgramSelector with RDS_PI primary identifier, but the tuner hardware
+ * may choose to use DAB technology to make actual tuning. This identifier
+ * must reflect that.
+ */
+ public @Nullable ProgramSelector.Identifier getLogicallyTunedTo() {
+ return mLogicallyTunedTo;
+ }
+
+ /**
+ * Identifier currently used by hardware to physically tune to a channel.
+ *
+ * Some radio technologies broadcast the same program on multiple channels,
+ * i.e. with RDS AF the same program may be broadcasted on multiple
+ * alternative frequencies; the same DAB program may be broadcast on
+ * multiple ensembles. This identifier points to the channel to which the
+ * radio hardware is physically tuned to.
+ */
+ public @Nullable ProgramSelector.Identifier getPhysicallyTunedTo() {
+ return mPhysicallyTunedTo;
+ }
+
+ /**
+ * Primary identifiers of related contents.
+ *
+ * Some radio technologies provide pointers to other programs that carry
+ * related content (i.e. DAB soft-links). This field is a list of pointers
+ * to other programs on the program list.
+ *
+ * Please note, that these identifiers does not have to exist on the program
+ * list - i.e. DAB tuner may provide information on FM RDS alternatives
+ * despite not supporting FM RDS. If the system has multiple tuners, another
+ * one may have it on its list.
+ */
+ public @Nullable Collection<ProgramSelector.Identifier> getRelatedContent() {
+ return mRelatedContent;
+ }
+
/** Main channel expressed in units according to band type.
* Currently all defined band types express channels as frequency in kHz
* @return the program channel
@@ -1456,19 +1517,28 @@
* @return {@code true} if currently tuned, {@code false} otherwise.
*/
public boolean isTuned() {
- return mTuned;
+ return (mInfoFlags & FLAG_TUNED) != 0;
}
+
/** {@code true} if the received program is stereo
* @return {@code true} if stereo, {@code false} otherwise.
*/
public boolean isStereo() {
- return mStereo;
+ return (mInfoFlags & FLAG_STEREO) != 0;
}
+
/** {@code true} if the received program is digital (e.g HD radio)
* @return {@code true} if digital, {@code false} otherwise.
+ * @deprecated Use {@link getLogicallyTunedTo()} instead.
*/
+ @Deprecated
public boolean isDigital() {
- return mDigital;
+ ProgramSelector.Identifier id = mLogicallyTunedTo;
+ if (id == null) id = mSelector.getPrimaryId();
+
+ int type = id.getType();
+ return (type != ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY
+ && type != ProgramSelector.IDENTIFIER_TYPE_RDS_PI);
}
/**
@@ -1477,7 +1547,7 @@
* usually targetted at reduced latency.
*/
public boolean isLive() {
- return (mFlags & FLAG_LIVE) != 0;
+ return (mInfoFlags & FLAG_LIVE) != 0;
}
/**
@@ -1487,7 +1557,7 @@
* It does NOT mean the user has muted audio.
*/
public boolean isMuted() {
- return (mFlags & FLAG_MUTED) != 0;
+ return (mInfoFlags & FLAG_MUTED) != 0;
}
/**
@@ -1495,7 +1565,7 @@
* regularily.
*/
public boolean isTrafficProgram() {
- return (mFlags & FLAG_TRAFFIC_PROGRAM) != 0;
+ return (mInfoFlags & FLAG_TRAFFIC_PROGRAM) != 0;
}
/**
@@ -1503,15 +1573,18 @@
* at the very moment.
*/
public boolean isTrafficAnnouncementActive() {
- return (mFlags & FLAG_TRAFFIC_ANNOUNCEMENT) != 0;
+ return (mInfoFlags & FLAG_TRAFFIC_ANNOUNCEMENT) != 0;
}
- /** Signal strength indicator from 0 (no signal) to 100 (excellent)
- * @return the signal strength indication.
+ /**
+ * Signal quality (as opposed to the name) indication from 0 (no signal)
+ * to 100 (excellent)
+ * @return the signal quality indication.
*/
public int getSignalStrength() {
- return mSignalStrength;
+ return mSignalQuality;
}
+
/** Metadata currently received from this station.
* null if no metadata have been received
* @return current meta data received from this program.
@@ -1535,17 +1608,13 @@
}
private ProgramInfo(Parcel in) {
- mSelector = in.readParcelable(null);
- mTuned = in.readByte() == 1;
- mStereo = in.readByte() == 1;
- mDigital = in.readByte() == 1;
- mSignalStrength = in.readInt();
- if (in.readByte() == 1) {
- mMetadata = RadioMetadata.CREATOR.createFromParcel(in);
- } else {
- mMetadata = null;
- }
- mFlags = in.readInt();
+ mSelector = Objects.requireNonNull(in.readTypedObject(ProgramSelector.CREATOR));
+ mLogicallyTunedTo = in.readTypedObject(ProgramSelector.Identifier.CREATOR);
+ mPhysicallyTunedTo = in.readTypedObject(ProgramSelector.Identifier.CREATOR);
+ mRelatedContent = in.createTypedArrayList(ProgramSelector.Identifier.CREATOR);
+ mInfoFlags = in.readInt();
+ mSignalQuality = in.readInt();
+ mMetadata = in.readTypedObject(RadioMetadata.CREATOR);
mVendorInfo = Utils.readStringMap(in);
}
@@ -1562,18 +1631,13 @@
@Override
public void writeToParcel(Parcel dest, int flags) {
- dest.writeParcelable(mSelector, 0);
- dest.writeByte((byte)(mTuned ? 1 : 0));
- dest.writeByte((byte)(mStereo ? 1 : 0));
- dest.writeByte((byte)(mDigital ? 1 : 0));
- dest.writeInt(mSignalStrength);
- if (mMetadata == null) {
- dest.writeByte((byte)0);
- } else {
- dest.writeByte((byte)1);
- mMetadata.writeToParcel(dest, flags);
- }
- dest.writeInt(mFlags);
+ dest.writeTypedObject(mSelector, flags);
+ dest.writeTypedObject(mLogicallyTunedTo, flags);
+ dest.writeTypedObject(mPhysicallyTunedTo, flags);
+ Utils.writeTypedCollection(dest, mRelatedContent);
+ dest.writeInt(mInfoFlags);
+ dest.writeInt(mSignalQuality);
+ dest.writeTypedObject(mMetadata, flags);
Utils.writeStringMap(dest, mVendorInfo);
}
@@ -1584,52 +1648,38 @@
@Override
public String toString() {
- return "ProgramInfo [mSelector=" + mSelector
- + ", mTuned=" + mTuned + ", mStereo=" + mStereo + ", mDigital=" + mDigital
- + ", mFlags=" + mFlags + ", mSignalStrength=" + mSignalStrength
- + ((mMetadata == null) ? "" : (", mMetadata=" + mMetadata.toString()))
+ return "ProgramInfo"
+ + " [selector=" + mSelector
+ + ", logicallyTunedTo=" + Objects.toString(mLogicallyTunedTo)
+ + ", physicallyTunedTo=" + Objects.toString(mPhysicallyTunedTo)
+ + ", relatedContent=" + mRelatedContent.size()
+ + ", infoFlags=" + mInfoFlags
+ + ", mSignalQuality=" + mSignalQuality
+ + ", mMetadata=" + Objects.toString(mMetadata)
+ "]";
}
@Override
public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + mSelector.hashCode();
- result = prime * result + (mTuned ? 1 : 0);
- result = prime * result + (mStereo ? 1 : 0);
- result = prime * result + (mDigital ? 1 : 0);
- result = prime * result + mFlags;
- result = prime * result + mSignalStrength;
- result = prime * result + ((mMetadata == null) ? 0 : mMetadata.hashCode());
- result = prime * result + mVendorInfo.hashCode();
- return result;
+ return Objects.hash(mSelector, mLogicallyTunedTo, mPhysicallyTunedTo,
+ mRelatedContent, mInfoFlags, mSignalQuality, mMetadata, mVendorInfo);
}
@Override
public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof ProgramInfo))
- return false;
+ if (this == obj) return true;
+ if (!(obj instanceof ProgramInfo)) return false;
ProgramInfo other = (ProgramInfo) obj;
- if (!mSelector.equals(other.getSelector())) return false;
- if (mTuned != other.isTuned())
- return false;
- if (mStereo != other.isStereo())
- return false;
- if (mDigital != other.isDigital())
- return false;
- if (mFlags != other.mFlags)
- return false;
- if (mSignalStrength != other.getSignalStrength())
- return false;
- if (mMetadata == null) {
- if (other.getMetadata() != null)
- return false;
- } else if (!mMetadata.equals(other.getMetadata()))
- return false;
- if (!mVendorInfo.equals(other.mVendorInfo)) return false;
+
+ if (!Objects.equals(mSelector, other.mSelector)) return false;
+ if (!Objects.equals(mLogicallyTunedTo, other.mLogicallyTunedTo)) return false;
+ if (!Objects.equals(mPhysicallyTunedTo, other.mPhysicallyTunedTo)) return false;
+ if (!Objects.equals(mRelatedContent, other.mRelatedContent)) return false;
+ if (mInfoFlags != other.mInfoFlags) return false;
+ if (mSignalQuality != other.mSignalQuality) return false;
+ if (!Objects.equals(mMetadata, other.mMetadata)) return false;
+ if (!Objects.equals(mVendorInfo, other.mVendorInfo)) return false;
+
return true;
}
}
@@ -1713,6 +1763,68 @@
config != null ? config.getType() : BAND_INVALID);
}
+ private final Map<Announcement.OnListUpdatedListener, ICloseHandle> mAnnouncementListeners =
+ new HashMap<>();
+
+ /**
+ * Adds new announcement listener.
+ *
+ * @param enabledAnnouncementTypes a set of announcement types to listen to
+ * @param listener announcement listener
+ */
+ @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
+ public void addAnnouncementListener(@NonNull Set<Integer> enabledAnnouncementTypes,
+ @NonNull Announcement.OnListUpdatedListener listener) {
+ addAnnouncementListener(cmd -> cmd.run(), enabledAnnouncementTypes, listener);
+ }
+
+ /**
+ * Adds new announcement listener with executor.
+ *
+ * @param executor the executor
+ * @param enabledAnnouncementTypes a set of announcement types to listen to
+ * @param listener announcement listener
+ */
+ @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
+ public void addAnnouncementListener(@NonNull @CallbackExecutor Executor executor,
+ @NonNull Set<Integer> enabledAnnouncementTypes,
+ @NonNull Announcement.OnListUpdatedListener listener) {
+ Objects.requireNonNull(executor);
+ Objects.requireNonNull(listener);
+ int[] types = enabledAnnouncementTypes.stream().mapToInt(Integer::intValue).toArray();
+ IAnnouncementListener listenerIface = new IAnnouncementListener.Stub() {
+ public void onListUpdated(List<Announcement> activeAnnouncements) {
+ executor.execute(() -> listener.onListUpdated(activeAnnouncements));
+ }
+ };
+ synchronized (mAnnouncementListeners) {
+ ICloseHandle closeHandle = null;
+ try {
+ closeHandle = mService.addAnnouncementListener(types, listenerIface);
+ } catch (RemoteException ex) {
+ ex.rethrowFromSystemServer();
+ }
+ Objects.requireNonNull(closeHandle);
+ ICloseHandle oldCloseHandle = mAnnouncementListeners.put(listener, closeHandle);
+ if (oldCloseHandle != null) Utils.close(oldCloseHandle);
+ }
+ }
+
+ /**
+ * Removes previously registered announcement listener.
+ *
+ * @param listener announcement listener, previously registered with
+ * {@link addAnnouncementListener}
+ */
+ @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
+ public void removeAnnouncementListener(@NonNull Announcement.OnListUpdatedListener listener) {
+ Objects.requireNonNull(listener);
+ synchronized (mAnnouncementListeners) {
+ ICloseHandle closeHandle = mAnnouncementListeners.remove(listener);
+ if (closeHandle != null) Utils.close(closeHandle);
+ }
+ }
+
@NonNull private final Context mContext;
@NonNull private final IRadioService mService;
diff --git a/core/java/android/hardware/radio/RadioTuner.java b/core/java/android/hardware/radio/RadioTuner.java
index ed20c4a..0edd055 100644
--- a/core/java/android/hardware/radio/RadioTuner.java
+++ b/core/java/android/hardware/radio/RadioTuner.java
@@ -64,7 +64,9 @@
* <li>{@link RadioManager#STATUS_DEAD_OBJECT} if the binder transaction to the native
* service fails, </li>
* </ul>
+ * @deprecated Only applicable for HAL 1.x.
*/
+ @Deprecated
public abstract int setConfiguration(RadioManager.BandConfig config);
/**
@@ -80,7 +82,10 @@
* <li>{@link RadioManager#STATUS_DEAD_OBJECT} if the binder transaction to the native
* service fails, </li>
* </ul>
+ *
+ * @deprecated Only applicable for HAL 1.x.
*/
+ @Deprecated
public abstract int getConfiguration(RadioManager.BandConfig[] config);
@@ -228,7 +233,9 @@
* <li>{@link RadioManager#STATUS_DEAD_OBJECT} if the binder transaction to the native
* service fails, </li>
* </ul>
+ * @deprecated Use {@link onProgramInfoChanged} callback instead.
*/
+ @Deprecated
public abstract int getProgramInformation(RadioManager.ProgramInfo[] info);
/**
@@ -427,7 +434,10 @@
* Get current antenna connection state for current configuration.
* Only valid if a configuration has been applied.
* @return {@code true} if the antenna is connected, {@code false} otherwise.
+ *
+ * @deprecated Use {@link onAntennaState} callback instead
*/
+ @Deprecated
public abstract boolean isAntennaConnected();
/**
@@ -446,20 +456,41 @@
public abstract boolean hasControl();
/** Indicates a failure of radio IC or driver.
- * The application must close and re open the tuner */
+ * The application must close and re open the tuner
+ * @deprecated See {@link onError} callback.
+ */
+ @Deprecated
public static final int ERROR_HARDWARE_FAILURE = 0;
/** Indicates a failure of the radio service.
- * The application must close and re open the tuner */
+ * The application must close and re open the tuner
+ * @deprecated See {@link onError} callback.
+ */
+ @Deprecated
public static final int ERROR_SERVER_DIED = 1;
- /** A pending seek or tune operation was cancelled */
+ /** A pending seek or tune operation was cancelled
+ * @deprecated See {@link onError} callback.
+ */
+ @Deprecated
public static final int ERROR_CANCELLED = 2;
- /** A pending seek or tune operation timed out */
+ /** A pending seek or tune operation timed out
+ * @deprecated See {@link onError} callback.
+ */
+ @Deprecated
public static final int ERROR_SCAN_TIMEOUT = 3;
- /** The requested configuration could not be applied */
+ /** The requested configuration could not be applied
+ * @deprecated See {@link onError} callback.
+ */
+ @Deprecated
public static final int ERROR_CONFIG = 4;
- /** Background scan was interrupted due to hardware becoming temporarily unavailable. */
+ /** Background scan was interrupted due to hardware becoming temporarily unavailable.
+ * @deprecated See {@link onError} callback.
+ */
+ @Deprecated
public static final int ERROR_BACKGROUND_SCAN_UNAVAILABLE = 5;
- /** Background scan failed due to other error, ie. HW failure. */
+ /** Background scan failed due to other error, ie. HW failure.
+ * @deprecated See {@link onError} callback.
+ */
+ @Deprecated
public static final int ERROR_BACKGROUND_SCAN_FAILED = 6;
/**
@@ -473,13 +504,29 @@
* status is one of {@link #ERROR_HARDWARE_FAILURE}, {@link #ERROR_SERVER_DIED},
* {@link #ERROR_CANCELLED}, {@link #ERROR_SCAN_TIMEOUT},
* {@link #ERROR_CONFIG}
+ *
+ * @deprecated Use {@link onTuneFailed} for tune, scan and step;
+ * other use cases (configuration, background scan) are already deprecated.
*/
public void onError(int status) {}
+
+ /**
+ * Called when tune, scan or step operation fails.
+ *
+ * @param result cause of the failure
+ * @param selector ProgramSelector argument of tune that failed;
+ * null for scan and step.
+ */
+ public void onTuneFailed(int result, @Nullable ProgramSelector selector) {}
+
/**
* onConfigurationChanged() is called upon successful completion of
* {@link RadioManager#openTuner(int, RadioManager.BandConfig, boolean, Callback, Handler)}
* or {@link RadioTuner#setConfiguration(RadioManager.BandConfig)}
+ *
+ * @deprecated Only applicable for HAL 1.x.
*/
+ @Deprecated
public void onConfigurationChanged(RadioManager.BandConfig config) {}
/**
diff --git a/core/java/android/hardware/radio/TunerAdapter.java b/core/java/android/hardware/radio/TunerAdapter.java
index 91944bf..85f3115 100644
--- a/core/java/android/hardware/radio/TunerAdapter.java
+++ b/core/java/android/hardware/radio/TunerAdapter.java
@@ -202,15 +202,17 @@
@Override
public int getProgramInformation(RadioManager.ProgramInfo[] info) {
if (info == null || info.length != 1) {
- throw new IllegalArgumentException("The argument must be an array of length 1");
+ Log.e(TAG, "The argument must be an array of length 1");
+ return RadioManager.STATUS_BAD_VALUE;
}
- try {
- info[0] = mTuner.getProgramInformation();
- return RadioManager.STATUS_OK;
- } catch (RemoteException e) {
- Log.e(TAG, "service died", e);
- return RadioManager.STATUS_DEAD_OBJECT;
+
+ RadioManager.ProgramInfo current = mCallback.getCurrentProgramInformation();
+ if (current == null) {
+ Log.w(TAG, "Didn't get program info yet");
+ return RadioManager.STATUS_INVALID_OPERATION;
}
+ info[0] = current;
+ return RadioManager.STATUS_OK;
}
@Override
@@ -288,12 +290,20 @@
@Override
public boolean isAnalogForced() {
- return isConfigFlagSet(RadioManager.CONFIG_FORCE_ANALOG);
+ try {
+ return isConfigFlagSet(RadioManager.CONFIG_FORCE_ANALOG);
+ } catch (UnsupportedOperationException ex) {
+ throw new IllegalStateException(ex);
+ }
}
@Override
public void setAnalogForced(boolean isForced) {
- setConfigFlag(RadioManager.CONFIG_FORCE_ANALOG, isForced);
+ try {
+ setConfigFlag(RadioManager.CONFIG_FORCE_ANALOG, isForced);
+ } catch (UnsupportedOperationException ex) {
+ throw new IllegalStateException(ex);
+ }
}
@Override
@@ -343,11 +353,7 @@
@Override
public boolean isAntennaConnected() {
- try {
- return mTuner.isAntennaConnected();
- } catch (RemoteException e) {
- throw new RuntimeException("service died", e);
- }
+ return mCallback.isAntennaConnected();
}
@Override
diff --git a/core/java/android/hardware/radio/TunerCallbackAdapter.java b/core/java/android/hardware/radio/TunerCallbackAdapter.java
index b299ffe..7437c40 100644
--- a/core/java/android/hardware/radio/TunerCallbackAdapter.java
+++ b/core/java/android/hardware/radio/TunerCallbackAdapter.java
@@ -37,8 +37,12 @@
@NonNull private final Handler mHandler;
@Nullable ProgramList mProgramList;
- @Nullable List<RadioManager.ProgramInfo> mLastCompleteList; // for legacy getProgramList call
+
+ // cache for deprecated methods
+ boolean mIsAntennaConnected = true;
+ @Nullable List<RadioManager.ProgramInfo> mLastCompleteList;
private boolean mDelayedCompleteCallback = false;
+ @Nullable RadioManager.ProgramInfo mCurrentProgramInfo;
TunerCallbackAdapter(@NonNull RadioTuner.Callback callback, @Nullable Handler handler) {
mCallback = callback;
@@ -92,12 +96,46 @@
}
}
+ @Nullable RadioManager.ProgramInfo getCurrentProgramInformation() {
+ synchronized (mLock) {
+ return mCurrentProgramInfo;
+ }
+ }
+
+ boolean isAntennaConnected() {
+ return mIsAntennaConnected;
+ }
+
@Override
public void onError(int status) {
mHandler.post(() -> mCallback.onError(status));
}
@Override
+ public void onTuneFailed(int status, @Nullable ProgramSelector selector) {
+ mHandler.post(() -> mCallback.onTuneFailed(status, selector));
+
+ int errorCode;
+ switch (status) {
+ case RadioManager.STATUS_PERMISSION_DENIED:
+ case RadioManager.STATUS_DEAD_OBJECT:
+ errorCode = RadioTuner.ERROR_SERVER_DIED;
+ break;
+ case RadioManager.STATUS_ERROR:
+ case RadioManager.STATUS_NO_INIT:
+ case RadioManager.STATUS_BAD_VALUE:
+ case RadioManager.STATUS_INVALID_OPERATION:
+ Log.i(TAG, "Got an error with no mapping to the legacy API (" + status
+ + "), doing a best-effort conversion to ERROR_SCAN_TIMEOUT");
+ // fall through
+ case RadioManager.STATUS_TIMED_OUT:
+ default:
+ errorCode = RadioTuner.ERROR_SCAN_TIMEOUT;
+ }
+ mHandler.post(() -> mCallback.onError(errorCode));
+ }
+
+ @Override
public void onConfigurationChanged(RadioManager.BandConfig config) {
mHandler.post(() -> mCallback.onConfigurationChanged(config));
}
@@ -109,6 +147,10 @@
return;
}
+ synchronized (mLock) {
+ mCurrentProgramInfo = info;
+ }
+
mHandler.post(() -> {
mCallback.onProgramInfoChanged(info);
@@ -129,6 +171,7 @@
@Override
public void onAntennaState(boolean connected) {
+ mIsAntennaConnected = connected;
mHandler.post(() -> mCallback.onAntennaState(connected));
}
diff --git a/core/java/android/hardware/radio/Utils.java b/core/java/android/hardware/radio/Utils.java
index 09bf8fe..f1b5897 100644
--- a/core/java/android/hardware/radio/Utils.java
+++ b/core/java/android/hardware/radio/Utils.java
@@ -20,7 +20,10 @@
import android.annotation.Nullable;
import android.os.Parcel;
import android.os.Parcelable;
+import android.os.RemoteException;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@@ -28,6 +31,8 @@
import java.util.Set;
final class Utils {
+ private static final String TAG = "BroadcastRadio.utils";
+
static void writeStringMap(@NonNull Parcel dest, @Nullable Map<String, String> map) {
if (map == null) {
dest.writeInt(0);
@@ -89,4 +94,25 @@
}
});
}
+
+ static <T extends Parcelable> void writeTypedCollection(@NonNull Parcel dest,
+ @Nullable Collection<T> coll) {
+ ArrayList<T> list = null;
+ if (coll != null) {
+ if (coll instanceof ArrayList) {
+ list = (ArrayList) coll;
+ } else {
+ list = new ArrayList<>(coll);
+ }
+ }
+ dest.writeTypedList(list);
+ }
+
+ static void close(ICloseHandle handle) {
+ try {
+ handle.close();
+ } catch (RemoteException ex) {
+ ex.rethrowFromSystemServer();
+ }
+ }
}
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 7528bc3..a817f33 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -265,6 +265,10 @@
*/
public static final int IME_VISIBLE = 0x2;
+ // Min and max values for back disposition.
+ private static final int BACK_DISPOSITION_MIN = BACK_DISPOSITION_DEFAULT;
+ private static final int BACK_DISPOSITION_MAX = BACK_DISPOSITION_WILL_DISMISS;
+
InputMethodManager mImm;
int mTheme = 0;
@@ -501,9 +505,8 @@
}
clearInsetOfPreviousIme();
// If user uses hard keyboard, IME button should always be shown.
- boolean showing = isInputViewShown();
mImm.setImeWindowStatus(mToken, mStartInputToken,
- IME_ACTIVE | (showing ? IME_VISIBLE : 0), mBackDisposition);
+ mapToImeWindowStatus(isInputViewShown()), mBackDisposition);
if (resultReceiver != null) {
resultReceiver.send(wasVis != isInputViewShown()
? InputMethodManager.RESULT_SHOWN
@@ -1014,7 +1017,16 @@
}
public void setBackDisposition(int disposition) {
+ if (disposition == mBackDisposition) {
+ return;
+ }
+ if (disposition > BACK_DISPOSITION_MAX || disposition < BACK_DISPOSITION_MIN) {
+ Log.e(TAG, "Invalid back disposition value (" + disposition + ") specified.");
+ return;
+ }
mBackDisposition = disposition;
+ mImm.setImeWindowStatus(mToken, mStartInputToken, mapToImeWindowStatus(isInputViewShown()),
+ mBackDisposition);
}
public int getBackDisposition() {
@@ -1762,7 +1774,7 @@
startExtractingText(false);
}
- final int nextImeWindowStatus = IME_ACTIVE | (isInputViewShown() ? IME_VISIBLE : 0);
+ final int nextImeWindowStatus = mapToImeWindowStatus(isInputViewShown());
if (previousImeWindowStatus != nextImeWindowStatus) {
mImm.setImeWindowStatus(mToken, mStartInputToken, nextImeWindowStatus,
mBackDisposition);
@@ -1889,6 +1901,7 @@
mInputStarted = false;
mStartedInputConnection = null;
mCurCompletions = null;
+ mBackDisposition = BACK_DISPOSITION_DEFAULT;
}
void doStartInput(InputConnection ic, EditorInfo attribute, boolean restarting) {
@@ -2104,7 +2117,11 @@
* them to perform navigation in the underlying application.
*/
public boolean onKeyDown(int keyCode, KeyEvent event) {
+
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
+ if (mBackDisposition == BACK_DISPOSITION_WILL_NOT_DISMISS) {
+ return false;
+ }
final ExtractEditText eet = getExtractEditTextIfVisible();
if (eet != null && eet.handleBackInTextActionModeIfNeeded(event)) {
return true;
@@ -2738,6 +2755,10 @@
mImm.exposeContent(mToken, inputContentInfo, getCurrentInputEditorInfo());
}
+ private static int mapToImeWindowStatus(boolean isInputViewShown) {
+ return IME_ACTIVE | (isInputViewShown ? IME_VISIBLE : 0);
+ }
+
/**
* Performs a dump of the InputMethodService's internal state. Override
* to add your own information to the dump.
diff --git a/core/java/android/inputmethodservice/KeyboardView.java b/core/java/android/inputmethodservice/KeyboardView.java
index 13b9206..2306e5f 100644
--- a/core/java/android/inputmethodservice/KeyboardView.java
+++ b/core/java/android/inputmethodservice/KeyboardView.java
@@ -61,6 +61,7 @@
* @attr ref android.R.styleable#KeyboardView_keyBackground
* @attr ref android.R.styleable#KeyboardView_keyPreviewLayout
* @attr ref android.R.styleable#KeyboardView_keyPreviewOffset
+ * @attr ref android.R.styleable#KeyboardView_keyPreviewHeight
* @attr ref android.R.styleable#KeyboardView_labelTextSize
* @attr ref android.R.styleable#KeyboardView_keyTextSize
* @attr ref android.R.styleable#KeyboardView_keyTextColor
diff --git a/core/java/android/net/IIpSecService.aidl b/core/java/android/net/IIpSecService.aidl
index eeb30e2..3ce0283 100644
--- a/core/java/android/net/IIpSecService.aidl
+++ b/core/java/android/net/IIpSecService.aidl
@@ -21,6 +21,7 @@
import android.net.IpSecUdpEncapResponse;
import android.net.IpSecSpiResponse;
import android.net.IpSecTransformResponse;
+import android.net.IpSecTunnelInterfaceResponse;
import android.os.Bundle;
import android.os.IBinder;
import android.os.ParcelFileDescriptor;
@@ -39,11 +40,29 @@
void closeUdpEncapsulationSocket(int resourceId);
+ IpSecTunnelInterfaceResponse createTunnelInterface(
+ in String localAddr,
+ in String remoteAddr,
+ in Network underlyingNetwork,
+ in IBinder binder);
+
+ void addAddressToTunnelInterface(
+ int tunnelResourceId,
+ String localAddr);
+
+ void removeAddressFromTunnelInterface(
+ int tunnelResourceId,
+ String localAddr);
+
+ void deleteTunnelInterface(int resourceId);
+
IpSecTransformResponse createTransform(in IpSecConfig c, in IBinder binder);
void deleteTransform(int transformId);
void applyTransportModeTransform(in ParcelFileDescriptor socket, int direction, int transformId);
+ void applyTunnelModeTransform(int tunnelResourceId, int direction, int transformResourceId);
+
void removeTransportModeTransforms(in ParcelFileDescriptor socket);
}
diff --git a/core/java/android/net/IpSecConfig.java b/core/java/android/net/IpSecConfig.java
index 80b0af3..6a262e2 100644
--- a/core/java/android/net/IpSecConfig.java
+++ b/core/java/android/net/IpSecConfig.java
@@ -65,6 +65,10 @@
// An interval, in seconds between the NattKeepalive packets
private int mNattKeepaliveInterval;
+ // XFRM mark and mask
+ private int mMarkValue;
+ private int mMarkMask;
+
/** Set the mode for this IPsec transform */
public void setMode(int mode) {
mMode = mode;
@@ -121,6 +125,14 @@
mNattKeepaliveInterval = interval;
}
+ public void setMarkValue(int mark) {
+ mMarkValue = mark;
+ }
+
+ public void setMarkMask(int mask) {
+ mMarkMask = mask;
+ }
+
// Transport or Tunnel
public int getMode() {
return mMode;
@@ -170,6 +182,14 @@
return mNattKeepaliveInterval;
}
+ public int getMarkValue() {
+ return mMarkValue;
+ }
+
+ public int getMarkMask() {
+ return mMarkMask;
+ }
+
// Parcelable Methods
@Override
@@ -191,6 +211,8 @@
out.writeInt(mEncapSocketResourceId);
out.writeInt(mEncapRemotePort);
out.writeInt(mNattKeepaliveInterval);
+ out.writeInt(mMarkValue);
+ out.writeInt(mMarkMask);
}
@VisibleForTesting
@@ -212,6 +234,8 @@
mEncapSocketResourceId = in.readInt();
mEncapRemotePort = in.readInt();
mNattKeepaliveInterval = in.readInt();
+ mMarkValue = in.readInt();
+ mMarkMask = in.readInt();
}
@Override
@@ -242,6 +266,10 @@
.append(mAuthentication)
.append(", mAuthenticatedEncryption=")
.append(mAuthenticatedEncryption)
+ .append(", mMarkValue=")
+ .append(mMarkValue)
+ .append(", mMarkMask=")
+ .append(mMarkMask)
.append("}");
return strBuilder.toString();
@@ -275,6 +303,8 @@
&& IpSecAlgorithm.equals(lhs.mEncryption, rhs.mEncryption)
&& IpSecAlgorithm.equals(
lhs.mAuthenticatedEncryption, rhs.mAuthenticatedEncryption)
- && IpSecAlgorithm.equals(lhs.mAuthentication, rhs.mAuthentication));
+ && IpSecAlgorithm.equals(lhs.mAuthentication, rhs.mAuthentication)
+ && lhs.mMarkValue == rhs.mMarkValue
+ && lhs.mMarkMask == rhs.mMarkMask);
}
}
diff --git a/core/java/android/net/IpSecManager.java b/core/java/android/net/IpSecManager.java
index 6125394..24a078f 100644
--- a/core/java/android/net/IpSecManager.java
+++ b/core/java/android/net/IpSecManager.java
@@ -685,7 +685,30 @@
mLocalAddress = localAddress;
mRemoteAddress = remoteAddress;
mUnderlyingNetwork = underlyingNetwork;
- // TODO: Call IpSecService
+
+ try {
+ IpSecTunnelInterfaceResponse result =
+ mService.createTunnelInterface(
+ localAddress.getHostAddress(),
+ remoteAddress.getHostAddress(),
+ underlyingNetwork,
+ new Binder());
+ switch (result.status) {
+ case Status.OK:
+ break;
+ case Status.RESOURCE_UNAVAILABLE:
+ throw new ResourceUnavailableException(
+ "No more tunnel interfaces may be allocated by this requester.");
+ default:
+ throw new RuntimeException(
+ "Unknown status returned by IpSecService: " + result.status);
+ }
+ mResourceId = result.resourceId;
+ mInterfaceName = result.interfaceName;
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ mCloseGuard.open("constructor");
}
/**
@@ -697,12 +720,12 @@
*/
@Override
public void close() {
- // try {
- // TODO: Call IpSecService
- mResourceId = INVALID_RESOURCE_ID;
- // } catch (RemoteException e) {
- // throw e.rethrowFromSystemServer();
- // }
+ try {
+ mService.deleteTunnelInterface(mResourceId);
+ mResourceId = INVALID_RESOURCE_ID;
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
mCloseGuard.close();
}
@@ -714,11 +737,20 @@
}
close();
}
+
+ /** @hide */
+ @VisibleForTesting
+ public int getResourceId() {
+ return mResourceId;
+ }
}
/**
* Create a new IpSecTunnelInterface as a local endpoint for tunneled IPsec traffic.
*
+ * <p>An application that creates tunnels is responsible for cleaning up the tunnel when the
+ * underlying network goes away, and the onLost() callback is received.
+ *
* @param localAddress The local addres of the tunnel
* @param remoteAddress The local addres of the tunnel
* @param underlyingNetwork the {@link Network} that will carry traffic for this tunnel.
@@ -750,7 +782,12 @@
@SystemApi
public void applyTunnelModeTransform(IpSecTunnelInterface tunnel, int direction,
IpSecTransform transform) throws IOException {
- // TODO: call IpSecService
+ try {
+ mService.applyTunnelModeTransform(
+ tunnel.getResourceId(), direction, transform.getResourceId());
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
}
/**
* Construct an instance of IpSecManager within an application context.
diff --git a/core/java/android/net/IpSecTransform.java b/core/java/android/net/IpSecTransform.java
index 37e2c4f..9ccdbe2 100644
--- a/core/java/android/net/IpSecTransform.java
+++ b/core/java/android/net/IpSecTransform.java
@@ -17,11 +17,14 @@
import static android.net.IpSecManager.INVALID_RESOURCE_ID;
+import static com.android.internal.util.Preconditions.checkNotNull;
+
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.content.Context;
import android.os.Binder;
+import android.os.Handler;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -128,13 +131,6 @@
int status = result.status;
checkResultStatus(status);
mResourceId = result.resourceId;
-
- /* Keepalive will silently fail if not needed by the config; but, if needed and
- * it fails to start, we need to bail because a transform will not be reliable
- * to use if keepalive is expected to offload and fails.
- */
- // FIXME: if keepalive fails, we need to fail spectacularly
- startKeepalive(mContext);
Log.d(TAG, "Added Transform with Id " + mResourceId);
mCloseGuard.open("build");
} catch (RemoteException e) {
@@ -164,13 +160,9 @@
return;
}
try {
- /* Order matters here because the keepalive is best-effort but could fail in some
- * horrible way to be removed if the wifi (or cell) subsystem has crashed, and we
- * still want to clear out the transform.
- */
IIpSecService svc = getIpSecService();
svc.deleteTransform(mResourceId);
- stopKeepalive();
+ stopNattKeepalive();
} catch (RemoteException e) {
throw e.rethrowAsRuntimeException();
} finally {
@@ -198,42 +190,35 @@
private final Context mContext;
private final CloseGuard mCloseGuard = CloseGuard.get();
private ConnectivityManager.PacketKeepalive mKeepalive;
- private int mKeepaliveStatus = ConnectivityManager.PacketKeepalive.NO_KEEPALIVE;
- private Object mKeepaliveSyncLock = new Object();
- private ConnectivityManager.PacketKeepaliveCallback mKeepaliveCallback =
+ private Handler mCallbackHandler;
+ private final ConnectivityManager.PacketKeepaliveCallback mKeepaliveCallback =
new ConnectivityManager.PacketKeepaliveCallback() {
@Override
public void onStarted() {
- synchronized (mKeepaliveSyncLock) {
- mKeepaliveStatus = ConnectivityManager.PacketKeepalive.SUCCESS;
- mKeepaliveSyncLock.notifyAll();
+ synchronized (this) {
+ mCallbackHandler.post(() -> mUserKeepaliveCallback.onStarted());
}
}
@Override
public void onStopped() {
- synchronized (mKeepaliveSyncLock) {
- mKeepaliveStatus = ConnectivityManager.PacketKeepalive.NO_KEEPALIVE;
- mKeepaliveSyncLock.notifyAll();
+ synchronized (this) {
+ mKeepalive = null;
+ mCallbackHandler.post(() -> mUserKeepaliveCallback.onStopped());
}
}
@Override
public void onError(int error) {
- synchronized (mKeepaliveSyncLock) {
- mKeepaliveStatus = error;
- mKeepaliveSyncLock.notifyAll();
+ synchronized (this) {
+ mKeepalive = null;
+ mCallbackHandler.post(() -> mUserKeepaliveCallback.onError(error));
}
}
};
- /* Package */
- void startKeepalive(Context c) {
- if (mConfig.getNattKeepaliveInterval() != 0) {
- Log.wtf(TAG, "Keepalive not yet supported.");
- }
- }
+ private NattKeepaliveCallback mUserKeepaliveCallback;
/** @hide */
@VisibleForTesting
@@ -241,9 +226,93 @@
return mResourceId;
}
- /* Package */
- void stopKeepalive() {
- return;
+ /**
+ * A callback class to provide status information regarding a NAT-T keepalive session
+ *
+ * <p>Use this callback to receive status information regarding a NAT-T keepalive session
+ * by registering it when calling {@link #startNattKeepalive}.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static class NattKeepaliveCallback {
+ /** The specified {@code Network} is not connected. */
+ public static final int ERROR_INVALID_NETWORK = 1;
+ /** The hardware does not support this request. */
+ public static final int ERROR_HARDWARE_UNSUPPORTED = 2;
+ /** The hardware returned an error. */
+ public static final int ERROR_HARDWARE_ERROR = 3;
+
+ /** The requested keepalive was successfully started. */
+ public void onStarted() {}
+ /** The keepalive was successfully stopped. */
+ public void onStopped() {}
+ /** An error occurred. */
+ public void onError(int error) {}
+ }
+
+ /**
+ * Start a NAT-T keepalive session for the current transform.
+ *
+ * For a transform that is using UDP encapsulated IPv4, NAT-T offloading provides
+ * a power efficient mechanism of sending NAT-T packets at a specified interval.
+ *
+ * @param userCallback a {@link #NattKeepaliveCallback} to receive asynchronous status
+ * information about the requested NAT-T keepalive session.
+ * @param intervalSeconds the interval between NAT-T keepalives being sent. The
+ * the allowed range is between 20 and 3600 seconds.
+ * @param handler a handler on which to post callbacks when received.
+ *
+ * @hide
+ */
+ @SystemApi
+ public void startNattKeepalive(@NonNull NattKeepaliveCallback userCallback,
+ int intervalSeconds, @NonNull Handler handler) throws IOException {
+ checkNotNull(userCallback);
+ if (intervalSeconds < 20 || intervalSeconds > 3600) {
+ throw new IllegalArgumentException("Invalid NAT-T keepalive interval");
+ }
+ checkNotNull(handler);
+ if (mResourceId == INVALID_RESOURCE_ID) {
+ throw new IllegalStateException(
+ "Packet keepalive cannot be started for an inactive transform");
+ }
+
+ synchronized (mKeepaliveCallback) {
+ if (mKeepaliveCallback != null) {
+ throw new IllegalStateException("Keepalive already active");
+ }
+
+ mUserKeepaliveCallback = userCallback;
+ ConnectivityManager cm = (ConnectivityManager) mContext.getSystemService(
+ Context.CONNECTIVITY_SERVICE);
+ mKeepalive = cm.startNattKeepalive(
+ mConfig.getNetwork(), intervalSeconds, mKeepaliveCallback,
+ NetworkUtils.numericToInetAddress(mConfig.getSourceAddress()),
+ 4500, // FIXME urgently, we need to get the port number from the Encap socket
+ NetworkUtils.numericToInetAddress(mConfig.getDestinationAddress()));
+ mCallbackHandler = handler;
+ }
+ }
+
+ /**
+ * Stop an ongoing NAT-T keepalive session.
+ *
+ * Calling this API will request that an ongoing NAT-T keepalive session be terminated.
+ * If this API is not called when a Transform is closed, the underlying NAT-T session will
+ * be terminated automatically.
+ *
+ * @hide
+ */
+ @SystemApi
+ public void stopNattKeepalive() {
+ synchronized (mKeepaliveCallback) {
+ if (mKeepalive == null) {
+ Log.e(TAG, "No active keepalive to stop");
+ return;
+ }
+ mKeepalive.stop();
+ }
}
/** This class is used to build {@link IpSecTransform} objects. */
@@ -323,26 +392,6 @@
return this;
}
- // TODO: Decrease the minimum keepalive to maybe 10?
- // TODO: Probably a better exception to throw for NATTKeepalive failure
- // TODO: Specify the needed NATT keepalive permission.
- /**
- * Set NAT-T keepalives to be sent with a given interval.
- *
- * <p>This will set power-efficient keepalive packets to be sent by the system. If NAT-T
- * keepalive is requested but cannot be activated, then creation of an {@link
- * IpSecTransform} will fail when calling the build method.
- *
- * @param intervalSeconds the maximum number of seconds between keepalive packets. Must be
- * between 20s and 3600s.
- * @hide
- */
- @SystemApi
- public IpSecTransform.Builder setNattKeepalive(int intervalSeconds) {
- mConfig.setNattKeepaliveInterval(intervalSeconds);
- return this;
- }
-
/**
* Build a transport mode {@link IpSecTransform}.
*
diff --git a/core/proto/android/os/batterymanager.proto b/core/java/android/net/IpSecTunnelInterfaceResponse.aidl
similarity index 64%
copy from core/proto/android/os/batterymanager.proto
copy to core/java/android/net/IpSecTunnelInterfaceResponse.aidl
index 669bf2d..7239221 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/core/java/android/net/IpSecTunnelInterfaceResponse.aidl
@@ -1,5 +1,5 @@
/*
- * 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,16 +14,7 @@
* limitations under the License.
*/
-syntax = "proto2";
-package android.os;
+package android.net;
-option java_multiple_files = true;
-
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
-}
+/** @hide */
+parcelable IpSecTunnelInterfaceResponse;
diff --git a/core/java/android/net/IpSecTunnelInterfaceResponse.java b/core/java/android/net/IpSecTunnelInterfaceResponse.java
new file mode 100644
index 0000000..c23d831
--- /dev/null
+++ b/core/java/android/net/IpSecTunnelInterfaceResponse.java
@@ -0,0 +1,78 @@
+/*
+ * 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.net;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * This class is used to return an IpSecTunnelInterface resource Id and and corresponding status
+ * from the IpSecService to an IpSecTunnelInterface object.
+ *
+ * @hide
+ */
+public final class IpSecTunnelInterfaceResponse implements Parcelable {
+ private static final String TAG = "IpSecTunnelInterfaceResponse";
+
+ public final int resourceId;
+ public final String interfaceName;
+ public final int status;
+ // Parcelable Methods
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeInt(status);
+ out.writeInt(resourceId);
+ out.writeString(interfaceName);
+ }
+
+ public IpSecTunnelInterfaceResponse(int inStatus) {
+ if (inStatus == IpSecManager.Status.OK) {
+ throw new IllegalArgumentException("Valid status implies other args must be provided");
+ }
+ status = inStatus;
+ resourceId = IpSecManager.INVALID_RESOURCE_ID;
+ interfaceName = "";
+ }
+
+ public IpSecTunnelInterfaceResponse(int inStatus, int inResourceId, String inInterfaceName) {
+ status = inStatus;
+ resourceId = inResourceId;
+ interfaceName = inInterfaceName;
+ }
+
+ private IpSecTunnelInterfaceResponse(Parcel in) {
+ status = in.readInt();
+ resourceId = in.readInt();
+ interfaceName = in.readString();
+ }
+
+ public static final Parcelable.Creator<IpSecTunnelInterfaceResponse> CREATOR =
+ new Parcelable.Creator<IpSecTunnelInterfaceResponse>() {
+ public IpSecTunnelInterfaceResponse createFromParcel(Parcel in) {
+ return new IpSecTunnelInterfaceResponse(in);
+ }
+
+ public IpSecTunnelInterfaceResponse[] newArray(int size) {
+ return new IpSecTunnelInterfaceResponse[size];
+ }
+ };
+}
diff --git a/core/proto/android/os/batterymanager.proto b/core/java/android/net/KeepalivePacketData.aidl
similarity index 64%
copy from core/proto/android/os/batterymanager.proto
copy to core/java/android/net/KeepalivePacketData.aidl
index 669bf2d..d456b53 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/core/java/android/net/KeepalivePacketData.aidl
@@ -1,5 +1,5 @@
/*
- * 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,16 +14,6 @@
* limitations under the License.
*/
-syntax = "proto2";
-package android.os;
+package android.net;
-option java_multiple_files = true;
-
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
-}
+parcelable KeepalivePacketData;
diff --git a/services/core/java/com/android/server/connectivity/KeepalivePacketData.java b/core/java/android/net/KeepalivePacketData.java
similarity index 61%
rename from services/core/java/com/android/server/connectivity/KeepalivePacketData.java
rename to core/java/android/net/KeepalivePacketData.java
index 2ccfdd1..08d4ff5 100644
--- a/services/core/java/com/android/server/connectivity/KeepalivePacketData.java
+++ b/core/java/android/net/KeepalivePacketData.java
@@ -14,12 +14,15 @@
* limitations under the License.
*/
-package com.android.server.connectivity;
+package android.net;
import android.system.OsConstants;
import android.net.ConnectivityManager;
-import android.net.NetworkUtils;
import android.net.util.IpUtils;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.system.OsConstants;
+import android.util.Log;
import java.net.Inet4Address;
import java.net.Inet6Address;
@@ -35,9 +38,8 @@
*
* @hide
*/
-public class KeepalivePacketData {
- /** Protocol of the packet to send; one of the OsConstants.ETH_P_* values. */
- public final int protocol;
+public class KeepalivePacketData implements Parcelable {
+ private static final String TAG = "KeepalivePacketData";
/** Source IP address */
public final InetAddress srcAddress;
@@ -51,57 +53,57 @@
/** Destination port */
public final int dstPort;
- /** Destination MAC address. Can change if routing changes. */
- public byte[] dstMac;
-
/** Packet data. A raw byte string of packet data, not including the link-layer header. */
- public final byte[] data;
+ private final byte[] mPacket;
private static final int IPV4_HEADER_LENGTH = 20;
private static final int UDP_HEADER_LENGTH = 8;
+ // This should only be constructed via static factory methods, such as
+ // nattKeepalivePacket
protected KeepalivePacketData(InetAddress srcAddress, int srcPort,
InetAddress dstAddress, int dstPort, byte[] data) throws InvalidPacketException {
this.srcAddress = srcAddress;
this.dstAddress = dstAddress;
this.srcPort = srcPort;
this.dstPort = dstPort;
- this.data = data;
+ this.mPacket = data;
// Check we have two IP addresses of the same family.
- if (srcAddress == null || dstAddress == null ||
- !srcAddress.getClass().getName().equals(dstAddress.getClass().getName())) {
- throw new InvalidPacketException(ERROR_INVALID_IP_ADDRESS);
- }
-
- // Set the protocol.
- if (this.dstAddress instanceof Inet4Address) {
- this.protocol = OsConstants.ETH_P_IP;
- } else if (this.dstAddress instanceof Inet6Address) {
- this.protocol = OsConstants.ETH_P_IPV6;
- } else {
+ if (srcAddress == null || dstAddress == null || !srcAddress.getClass().getName()
+ .equals(dstAddress.getClass().getName())) {
+ Log.e(TAG, "Invalid or mismatched InetAddresses in KeepalivePacketData");
throw new InvalidPacketException(ERROR_INVALID_IP_ADDRESS);
}
// Check the ports.
if (!IpUtils.isValidUdpOrTcpPort(srcPort) || !IpUtils.isValidUdpOrTcpPort(dstPort)) {
+ Log.e(TAG, "Invalid ports in KeepalivePacketData");
throw new InvalidPacketException(ERROR_INVALID_PORT);
}
}
public static class InvalidPacketException extends Exception {
- final public int error;
+ public final int error;
public InvalidPacketException(int error) {
this.error = error;
}
}
- /**
- * Creates an IPsec NAT-T keepalive packet with the specified parameters.
- */
+ public byte[] getPacket() {
+ return mPacket.clone();
+ }
+
public static KeepalivePacketData nattKeepalivePacket(
- InetAddress srcAddress, int srcPort,
- InetAddress dstAddress, int dstPort) throws InvalidPacketException {
+ InetAddress srcAddress, int srcPort, InetAddress dstAddress, int dstPort)
+ throws InvalidPacketException {
+
+ // FIXME: remove this and actually support IPv6 keepalives
+ if (srcAddress instanceof Inet6Address && dstAddress instanceof Inet6Address) {
+ // Optimistically returning an IPv6 Keepalive Packet with no data,
+ // which currently only works on cellular
+ return new KeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, new byte[0]);
+ }
if (!(srcAddress instanceof Inet4Address) || !(dstAddress instanceof Inet4Address)) {
throw new InvalidPacketException(ERROR_INVALID_IP_ADDRESS);
@@ -134,4 +136,39 @@
return new KeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, buf.array());
}
+
+ /* Parcelable Implementation */
+ public int describeContents() {
+ return 0;
+ }
+
+ /** Write to parcel */
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeString(srcAddress.getHostAddress());
+ out.writeString(dstAddress.getHostAddress());
+ out.writeInt(srcPort);
+ out.writeInt(dstPort);
+ out.writeByteArray(mPacket);
+ }
+
+ private KeepalivePacketData(Parcel in) {
+ srcAddress = NetworkUtils.numericToInetAddress(in.readString());
+ dstAddress = NetworkUtils.numericToInetAddress(in.readString());
+ srcPort = in.readInt();
+ dstPort = in.readInt();
+ mPacket = in.createByteArray();
+ }
+
+ /** Parcelable Creator */
+ public static final Parcelable.Creator<KeepalivePacketData> CREATOR =
+ new Parcelable.Creator<KeepalivePacketData>() {
+ public KeepalivePacketData createFromParcel(Parcel in) {
+ return new KeepalivePacketData(in);
+ }
+
+ public KeepalivePacketData[] newArray(int size) {
+ return new KeepalivePacketData[size];
+ }
+ };
+
}
diff --git a/core/java/android/net/NetworkAgent.java b/core/java/android/net/NetworkAgent.java
index 2dacf8f..52a2354 100644
--- a/core/java/android/net/NetworkAgent.java
+++ b/core/java/android/net/NetworkAgent.java
@@ -17,6 +17,7 @@
package android.net;
import android.content.Context;
+import android.net.ConnectivityManager.PacketKeepalive;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
@@ -26,7 +27,6 @@
import com.android.internal.util.AsyncChannel;
import com.android.internal.util.Protocol;
-import android.net.ConnectivityManager.PacketKeepalive;
import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -101,20 +101,6 @@
public static final int EVENT_NETWORK_SCORE_CHANGED = BASE + 4;
/**
- * Sent by the NetworkAgent to ConnectivityService to add new UID ranges
- * to be forced into this Network. For VPNs only.
- * obj = UidRange[] to forward
- */
- public static final int EVENT_UID_RANGES_ADDED = BASE + 5;
-
- /**
- * Sent by the NetworkAgent to ConnectivityService to remove UID ranges
- * from being forced into this Network. For VPNs only.
- * obj = UidRange[] to stop forwarding
- */
- public static final int EVENT_UID_RANGES_REMOVED = BASE + 6;
-
- /**
* Sent by ConnectivityService to the NetworkAgent to inform the agent of the
* networks status - whether we could use the network or could not, due to
* either a bad network configuration (no internet link) or captive portal.
@@ -390,22 +376,6 @@
}
/**
- * Called by the VPN code when it wants to add ranges of UIDs to be routed
- * through the VPN network.
- */
- public void addUidRanges(UidRange[] ranges) {
- queueOrSendMessage(EVENT_UID_RANGES_ADDED, ranges);
- }
-
- /**
- * Called by the VPN code when it wants to remove ranges of UIDs from being routed
- * through the VPN network.
- */
- public void removeUidRanges(UidRange[] ranges) {
- queueOrSendMessage(EVENT_UID_RANGES_REMOVED, ranges);
- }
-
- /**
* Called by the bearer to indicate this network was manually selected by the user.
* This should be called before the NetworkInfo is marked CONNECTED so that this
* Network can be given special treatment at that time. If {@code acceptUnvalidated} is
diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java
index 214ff64..8e05cfa 100644
--- a/core/java/android/net/NetworkCapabilities.java
+++ b/core/java/android/net/NetworkCapabilities.java
@@ -20,6 +20,7 @@
import android.net.ConnectivityManager.NetworkCallback;
import android.os.Parcel;
import android.os.Parcelable;
+import android.util.ArraySet;
import android.util.proto.ProtoOutputStream;
import com.android.internal.annotations.VisibleForTesting;
@@ -29,6 +30,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Objects;
+import java.util.Set;
import java.util.StringJoiner;
/**
@@ -47,6 +49,7 @@
*/
public final class NetworkCapabilities implements Parcelable {
private static final String TAG = "NetworkCapabilities";
+ private static final int INVALID_UID = -1;
/**
* @hide
@@ -64,6 +67,8 @@
mLinkDownBandwidthKbps = nc.mLinkDownBandwidthKbps;
mNetworkSpecifier = nc.mNetworkSpecifier;
mSignalStrength = nc.mSignalStrength;
+ mUids = nc.mUids;
+ mEstablishingVpnAppUid = nc.mEstablishingVpnAppUid;
}
}
@@ -77,6 +82,8 @@
mLinkUpBandwidthKbps = mLinkDownBandwidthKbps = LINK_BANDWIDTH_UNSPECIFIED;
mNetworkSpecifier = null;
mSignalStrength = SIGNAL_STRENGTH_UNSPECIFIED;
+ mUids = null;
+ mEstablishingVpnAppUid = INVALID_UID;
}
/**
@@ -619,6 +626,29 @@
}
/**
+ * UID of the app that manages this network, or INVALID_UID if none/unknown.
+ *
+ * This field keeps track of the UID of the app that created this network and is in charge
+ * of managing it. In the practice, it is used to store the UID of VPN apps so it is named
+ * accordingly, but it may be renamed if other mechanisms are offered for third party apps
+ * to create networks.
+ *
+ * Because this field is only used in the services side (and to avoid apps being able to
+ * set this to whatever they want), this field is not parcelled and will not be conserved
+ * across the IPC boundary.
+ * @hide
+ */
+ private int mEstablishingVpnAppUid = INVALID_UID;
+
+ /**
+ * Set the UID of the managing app.
+ * @hide
+ */
+ public void setEstablishingVpnAppUid(final int uid) {
+ mEstablishingVpnAppUid = uid;
+ }
+
+ /**
* Value indicating that link bandwidth is unspecified.
* @hide
*/
@@ -837,6 +867,174 @@
}
/**
+ * List of UIDs this network applies to. No restriction if null.
+ * <p>
+ * This is typically (and at this time, only) used by VPN. This network is only available to
+ * the UIDs in this list, and it is their default network. Apps in this list that wish to
+ * bypass the VPN can do so iff the VPN app allows them to or if they are privileged. If this
+ * member is null, then the network is not restricted by app UID. If it's an empty list, then
+ * it means nobody can use it.
+ * As a special exception, the app managing this network (as identified by its UID stored in
+ * mEstablishingVpnAppUid) can always see this network. This is embodied by a special check in
+ * satisfiedByUids. That still does not mean the network necessarily <strong>applies</strong>
+ * to the app that manages it as determined by #appliesToUid.
+ * <p>
+ * Please note that in principle a single app can be associated with multiple UIDs because
+ * each app will have a different UID when it's run as a different (macro-)user. A single
+ * macro user can only have a single active VPN app at any given time however.
+ * <p>
+ * Also please be aware this class does not try to enforce any normalization on this. Callers
+ * can only alter the UIDs by setting them wholesale : this class does not provide any utility
+ * to add or remove individual UIDs or ranges. If callers have any normalization needs on
+ * their own (like requiring sortedness or no overlap) they need to enforce it
+ * themselves. Some of the internal methods also assume this is normalized as in no adjacent
+ * or overlapping ranges are present.
+ *
+ * @hide
+ */
+ private ArraySet<UidRange> mUids = null;
+
+ /**
+ * Convenience method to set the UIDs this network applies to to a single UID.
+ * @hide
+ */
+ public NetworkCapabilities setSingleUid(int uid) {
+ final ArraySet<UidRange> identity = new ArraySet<>(1);
+ identity.add(new UidRange(uid, uid));
+ setUids(identity);
+ return this;
+ }
+
+ /**
+ * Set the list of UIDs this network applies to.
+ * This makes a copy of the set so that callers can't modify it after the call.
+ * @hide
+ */
+ public NetworkCapabilities setUids(Set<UidRange> uids) {
+ if (null == uids) {
+ mUids = null;
+ } else {
+ mUids = new ArraySet<>(uids);
+ }
+ return this;
+ }
+
+ /**
+ * Get the list of UIDs this network applies to.
+ * This returns a copy of the set so that callers can't modify the original object.
+ * @hide
+ */
+ public Set<UidRange> getUids() {
+ return null == mUids ? null : new ArraySet<>(mUids);
+ }
+
+ /**
+ * Test whether this network applies to this UID.
+ * @hide
+ */
+ public boolean appliesToUid(int uid) {
+ if (null == mUids) return true;
+ for (UidRange range : mUids) {
+ if (range.contains(uid)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Tests if the set of UIDs that this network applies to is the same of the passed set of UIDs.
+ * <p>
+ * This test only checks whether equal range objects are in both sets. It will
+ * return false if the ranges are not exactly the same, even if the covered UIDs
+ * are for an equivalent result.
+ * <p>
+ * Note that this method is not very optimized, which is fine as long as it's not used very
+ * often.
+ * <p>
+ * nc is assumed nonnull.
+ *
+ * @hide
+ */
+ @VisibleForTesting
+ public boolean equalsUids(NetworkCapabilities nc) {
+ Set<UidRange> comparedUids = nc.mUids;
+ if (null == comparedUids) return null == mUids;
+ if (null == mUids) return false;
+ // Make a copy so it can be mutated to check that all ranges in mUids
+ // also are in uids.
+ final Set<UidRange> uids = new ArraySet<>(mUids);
+ for (UidRange range : comparedUids) {
+ if (!uids.contains(range)) {
+ return false;
+ }
+ uids.remove(range);
+ }
+ return uids.isEmpty();
+ }
+
+ /**
+ * Test whether the passed NetworkCapabilities satisfies the UIDs this capabilities require.
+ *
+ * This method is called on the NetworkCapabilities embedded in a request with the
+ * capabilities of an available network. It checks whether all the UIDs from this listen
+ * (representing the UIDs that must have access to the network) are satisfied by the UIDs
+ * in the passed nc (representing the UIDs that this network is available to).
+ * <p>
+ * As a special exception, the UID that created the passed network (as represented by its
+ * mEstablishingVpnAppUid field) always satisfies a NetworkRequest requiring it (of LISTEN
+ * or REQUEST types alike), even if the network does not apply to it. That is so a VPN app
+ * can see its own network when it listens for it.
+ * <p>
+ * nc is assumed nonnull. Else, NPE.
+ * @see #appliesToUid
+ * @hide
+ */
+ public boolean satisfiedByUids(NetworkCapabilities nc) {
+ if (null == nc.mUids) return true; // The network satisfies everything.
+ if (null == mUids) return false; // Not everything allowed but requires everything
+ for (UidRange requiredRange : mUids) {
+ if (requiredRange.contains(nc.mEstablishingVpnAppUid)) return true;
+ if (!nc.appliesToUidRange(requiredRange)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Returns whether this network applies to the passed ranges.
+ * This assumes that to apply, the passed range has to be entirely contained
+ * within one of the ranges this network applies to. If the ranges are not normalized,
+ * this method may return false even though all required UIDs are covered because no
+ * single range contained them all.
+ * @hide
+ */
+ @VisibleForTesting
+ public boolean appliesToUidRange(UidRange requiredRange) {
+ if (null == mUids) return true;
+ for (UidRange uidRange : mUids) {
+ if (uidRange.containsRange(requiredRange)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Combine the UIDs this network currently applies to with the UIDs the passed
+ * NetworkCapabilities apply to.
+ * nc is assumed nonnull.
+ */
+ private void combineUids(NetworkCapabilities nc) {
+ if (null == nc.mUids || null == mUids) {
+ mUids = null;
+ return;
+ }
+ mUids.addAll(nc.mUids);
+ }
+
+ /**
* Combine a set of Capabilities to this one. Useful for coming up with the complete set
* @hide
*/
@@ -846,6 +1044,7 @@
combineLinkBandwidths(nc);
combineSpecifiers(nc);
combineSignalStrength(nc);
+ combineUids(nc);
}
/**
@@ -858,12 +1057,13 @@
* @hide
*/
private boolean satisfiedByNetworkCapabilities(NetworkCapabilities nc, boolean onlyImmutable) {
- return (nc != null &&
- satisfiedByNetCapabilities(nc, onlyImmutable) &&
- satisfiedByTransportTypes(nc) &&
- (onlyImmutable || satisfiedByLinkBandwidths(nc)) &&
- satisfiedBySpecifier(nc) &&
- (onlyImmutable || satisfiedBySignalStrength(nc)));
+ return (nc != null
+ && satisfiedByNetCapabilities(nc, onlyImmutable)
+ && satisfiedByTransportTypes(nc)
+ && (onlyImmutable || satisfiedByLinkBandwidths(nc))
+ && satisfiedBySpecifier(nc)
+ && (onlyImmutable || satisfiedBySignalStrength(nc))
+ && (onlyImmutable || satisfiedByUids(nc)));
}
/**
@@ -944,24 +1144,26 @@
@Override
public boolean equals(Object obj) {
if (obj == null || (obj instanceof NetworkCapabilities == false)) return false;
- NetworkCapabilities that = (NetworkCapabilities)obj;
- return (equalsNetCapabilities(that) &&
- equalsTransportTypes(that) &&
- equalsLinkBandwidths(that) &&
- equalsSignalStrength(that) &&
- equalsSpecifier(that));
+ NetworkCapabilities that = (NetworkCapabilities) obj;
+ return (equalsNetCapabilities(that)
+ && equalsTransportTypes(that)
+ && equalsLinkBandwidths(that)
+ && equalsSignalStrength(that)
+ && equalsSpecifier(that)
+ && equalsUids(that));
}
@Override
public int hashCode() {
- return ((int)(mNetworkCapabilities & 0xFFFFFFFF) +
- ((int)(mNetworkCapabilities >> 32) * 3) +
- ((int)(mTransportTypes & 0xFFFFFFFF) * 5) +
- ((int)(mTransportTypes >> 32) * 7) +
- (mLinkUpBandwidthKbps * 11) +
- (mLinkDownBandwidthKbps * 13) +
- Objects.hashCode(mNetworkSpecifier) * 17 +
- (mSignalStrength * 19));
+ return ((int) (mNetworkCapabilities & 0xFFFFFFFF)
+ + ((int) (mNetworkCapabilities >> 32) * 3)
+ + ((int) (mTransportTypes & 0xFFFFFFFF) * 5)
+ + ((int) (mTransportTypes >> 32) * 7)
+ + (mLinkUpBandwidthKbps * 11)
+ + (mLinkDownBandwidthKbps * 13)
+ + Objects.hashCode(mNetworkSpecifier) * 17
+ + (mSignalStrength * 19)
+ + Objects.hashCode(mUids) * 23);
}
@Override
@@ -976,6 +1178,7 @@
dest.writeInt(mLinkDownBandwidthKbps);
dest.writeParcelable((Parcelable) mNetworkSpecifier, flags);
dest.writeInt(mSignalStrength);
+ dest.writeArraySet(mUids);
}
public static final Creator<NetworkCapabilities> CREATOR =
@@ -990,6 +1193,8 @@
netCap.mLinkDownBandwidthKbps = in.readInt();
netCap.mNetworkSpecifier = in.readParcelable(null);
netCap.mSignalStrength = in.readInt();
+ netCap.mUids = (ArraySet<UidRange>) in.readArraySet(
+ null /* ClassLoader, null for default */);
return netCap;
}
@Override
@@ -1022,7 +1227,12 @@
String signalStrength = (hasSignalStrength() ? " SignalStrength: " + mSignalStrength : "");
- return "[" + transports + capabilities + upBand + dnBand + specifier + signalStrength + "]";
+ String uids = (null != mUids ? " Uids: <" + mUids + ">" : "");
+
+ String establishingAppUid = " EstablishingAppUid: " + mEstablishingVpnAppUid;
+
+ return "[" + transports + capabilities + upBand + dnBand + specifier + signalStrength
+ + uids + establishingAppUid + "]";
}
/** @hide */
diff --git a/core/java/android/net/metrics/NetworkMetrics.java b/core/java/android/net/metrics/NetworkMetrics.java
index 2b662a0..2425bba 100644
--- a/core/java/android/net/metrics/NetworkMetrics.java
+++ b/core/java/android/net/metrics/NetworkMetrics.java
@@ -96,6 +96,13 @@
}
}
+ /** Accumulate a single netd sock_diag poll result reported by netd. */
+ public void addTcpStatsResult(int sent, int lost, int rttUs, int sentAckDiffMs) {
+ pendingSummary.tcpLossRate.count(lost, sent);
+ pendingSummary.roundTripTimeUs.count(rttUs);
+ pendingSummary.sentAckTimeDiffenceMs.count(sentAckDiffMs);
+ }
+
/** Represents running sums for dns and connect average error counts and average latencies. */
public static class Summary {
@@ -109,6 +116,13 @@
public final Metrics connectLatencies = new Metrics();
// Blocking and non blocking connect error rate measured in percentage points.
public final Metrics connectErrorRate = new Metrics();
+ // TCP socket packet loss stats collected from Netlink sock_diag.
+ public final Metrics tcpLossRate = new Metrics();
+ // TCP averaged microsecond round-trip-time stats collected from Netlink sock_diag.
+ public final Metrics roundTripTimeUs = new Metrics();
+ // TCP stats collected from Netlink sock_diag that averages millisecond per-socket
+ // differences between last packet sent timestamp and last ack received timestamp.
+ public final Metrics sentAckTimeDiffenceMs = new Metrics();
public Summary(int netId, long transports) {
this.netId = netId;
@@ -120,6 +134,7 @@
dnsErrorRate.merge(that.dnsErrorRate);
connectLatencies.merge(that.connectLatencies);
connectErrorRate.merge(that.connectErrorRate);
+ tcpLossRate.merge(that.tcpLossRate);
}
@Override
@@ -135,6 +150,10 @@
j.add(String.format("connect avg=%dms max=%dms err=%.1f%% tot=%d",
(int) connectLatencies.average(), (int) connectLatencies.max,
100 * connectErrorRate.average(), connectErrorRate.count));
+ j.add(String.format("tcp avg_loss=%.1f%% total_sent=%d total_lost=%d",
+ 100 * tcpLossRate.average(), tcpLossRate.count, (int) tcpLossRate.sum));
+ j.add(String.format("tcp rtt=%dms", (int) (roundTripTimeUs.average() / 1000)));
+ j.add(String.format("tcp sent-ack_diff=%dms", (int) sentAckTimeDiffenceMs.average()));
return j.toString();
}
}
@@ -152,7 +171,11 @@
}
void count(double value) {
- count++;
+ count(value, 1);
+ }
+
+ void count(double value, int subcount) {
+ count += subcount;
sum += value;
max = Math.max(max, value);
}
diff --git a/services/net/java/android/net/util/IpUtils.java b/core/java/android/net/util/IpUtils.java
similarity index 100%
rename from services/net/java/android/net/util/IpUtils.java
rename to core/java/android/net/util/IpUtils.java
diff --git a/core/java/android/os/BatteryManager.java b/core/java/android/os/BatteryManager.java
index 843bdb5..a734719 100644
--- a/core/java/android/os/BatteryManager.java
+++ b/core/java/android/os/BatteryManager.java
@@ -157,11 +157,11 @@
// values of the "plugged" field in the ACTION_BATTERY_CHANGED intent.
// These must be powers of 2.
/** Power source is an AC charger. */
- public static final int BATTERY_PLUGGED_AC = 1;
+ public static final int BATTERY_PLUGGED_AC = OsProtoEnums.BATTERY_PLUGGED_AC; // = 1
/** Power source is a USB port. */
- public static final int BATTERY_PLUGGED_USB = 2;
+ public static final int BATTERY_PLUGGED_USB = OsProtoEnums.BATTERY_PLUGGED_USB; // = 2
/** Power source is wireless. */
- public static final int BATTERY_PLUGGED_WIRELESS = 4;
+ public static final int BATTERY_PLUGGED_WIRELESS = OsProtoEnums.BATTERY_PLUGGED_WIRELESS; // = 4
/** @hide */
public static final int BATTERY_PLUGGED_ANY =
diff --git a/core/java/android/os/BatteryManagerInternal.java b/core/java/android/os/BatteryManagerInternal.java
index f3a95b9..a86237d 100644
--- a/core/java/android/os/BatteryManagerInternal.java
+++ b/core/java/android/os/BatteryManagerInternal.java
@@ -24,26 +24,63 @@
public abstract class BatteryManagerInternal {
/**
* Returns true if the device is plugged into any of the specified plug types.
+ *
+ * This is a simple accessor that's safe to be called from any locks, but internally it may
+ * wait on the battery service lock.
*/
public abstract boolean isPowered(int plugTypeSet);
/**
* Returns the current plug type.
+ *
+ * This is a simple accessor that's safe to be called from any locks, but internally it may
+ * wait on the battery service lock.
*/
public abstract int getPlugType();
/**
* Returns battery level as a percentage.
+ *
+ * This is a simple accessor that's safe to be called from any locks, but internally it may
+ * wait on the battery service lock.
*/
public abstract int getBatteryLevel();
/**
+ * Instantaneous battery capacity in uA-h, as defined in the HealthInfo HAL struct.
+ * Please note apparently it could be bigger than {@link #getBatteryFullCharge}.
+ *
+ * This is a simple accessor that's safe to be called from any locks, but internally it may
+ * wait on the battery service lock.
+ *
+ * @see android.hardware.health.V1_0.HealthInfo#batteryChargeCounter
+ */
+ public abstract int getBatteryChargeCounter();
+
+ /**
+ * Battery charge value when it is considered to be "full" in uA-h , as defined in the
+ * HealthInfo HAL struct.
+ *
+ * This is a simple accessor that's safe to be called from any locks, but internally it may
+ * wait on the battery service lock.
+ *
+ * @see android.hardware.health.V1_0.HealthInfo#batteryFullCharge
+ */
+ public abstract int getBatteryFullCharge();
+
+ /**
* Returns whether we currently consider the battery level to be low.
+ *
+ * This is a simple accessor that's safe to be called from any locks, but internally it may
+ * wait on the battery service lock.
*/
public abstract boolean getBatteryLevelLow();
/**
* Returns a non-zero value if an unsupported charger is attached.
+ *
+ * This is a simple accessor that's safe to be called from any locks, but internally it may
+ * wait on the battery service lock.
*/
public abstract int getInvalidCharger();
}
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java
index 03a8dba..fd0e5ae 100644
--- a/core/java/android/os/BatteryStats.java
+++ b/core/java/android/os/BatteryStats.java
@@ -20,6 +20,7 @@
import android.app.job.JobParameters;
import android.content.Context;
import android.content.pm.ApplicationInfo;
+import android.server.ServerProtoEnums;
import android.service.batterystats.BatteryStatsServiceDumpProto;
import android.telephony.SignalStrength;
import android.text.format.DateFormat;
@@ -2054,17 +2055,17 @@
/**
* Constant for device idle mode: not active.
*/
- public static final int DEVICE_IDLE_MODE_OFF = 0;
+ public static final int DEVICE_IDLE_MODE_OFF = ServerProtoEnums.DEVICE_IDLE_MODE_OFF; // 0
/**
* Constant for device idle mode: active in lightweight mode.
*/
- public static final int DEVICE_IDLE_MODE_LIGHT = 1;
+ public static final int DEVICE_IDLE_MODE_LIGHT = ServerProtoEnums.DEVICE_IDLE_MODE_LIGHT; // 1
/**
* Constant for device idle mode: active in full mode.
*/
- public static final int DEVICE_IDLE_MODE_DEEP = 2;
+ public static final int DEVICE_IDLE_MODE_DEEP = ServerProtoEnums.DEVICE_IDLE_MODE_DEEP; // 2
/**
* Returns the time in microseconds that device has been in idle mode while
diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java
index 33e8c3e..e606964 100644
--- a/core/java/android/os/Debug.java
+++ b/core/java/android/os/Debug.java
@@ -56,10 +56,10 @@
* <p><strong>Logging Trace Files</strong></p>
* <p>Debug can create log files that give details about an application, such as
* a call stack and start/stop times for any running methods. See <a
-href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Log Viewer</a> for
- * information about reading trace files. To start logging trace files, call one
- * of the startMethodTracing() methods. To stop tracing, call
- * {@link #stopMethodTracing()}.
+ * href="{@docRoot}studio/profile/traceview.html">Inspect Trace Logs with
+ * Traceview</a> for information about reading trace files. To start logging
+ * trace files, call one of the startMethodTracing() methods. To stop tracing,
+ * call {@link #stopMethodTracing()}.
*/
public final class Debug
{
@@ -116,6 +116,8 @@
/** The proportional set size that is swappable for dalvik heap. */
/** @hide We may want to expose this, eventually. */
public int dalvikSwappablePss;
+ /** @hide The resident set size for dalvik heap. (Without other Dalvik overhead.) */
+ public int dalvikRss;
/** The private dirty pages used by dalvik heap. */
public int dalvikPrivateDirty;
/** The shared dirty pages used by dalvik heap. */
@@ -138,6 +140,8 @@
/** The proportional set size that is swappable for the native heap. */
/** @hide We may want to expose this, eventually. */
public int nativeSwappablePss;
+ /** @hide The resident set size for the native heap. */
+ public int nativeRss;
/** The private dirty pages used by the native heap. */
public int nativePrivateDirty;
/** The shared dirty pages used by the native heap. */
@@ -160,6 +164,8 @@
/** The proportional set size that is swappable for everything else. */
/** @hide We may want to expose this, eventually. */
public int otherSwappablePss;
+ /** @hide The resident set size for everything else. */
+ public int otherRss;
/** The private dirty pages used by everything else. */
public int otherPrivateDirty;
/** The shared dirty pages used by everything else. */
@@ -288,24 +294,26 @@
public static final int NUM_DVK_STATS = 14;
/** @hide */
- public static final int NUM_CATEGORIES = 8;
+ public static final int NUM_CATEGORIES = 9;
/** @hide */
- public static final int offsetPss = 0;
+ public static final int OFFSET_PSS = 0;
/** @hide */
- public static final int offsetSwappablePss = 1;
+ public static final int OFFSET_SWAPPABLE_PSS = 1;
/** @hide */
- public static final int offsetPrivateDirty = 2;
+ public static final int OFFSET_RSS = 2;
/** @hide */
- public static final int offsetSharedDirty = 3;
+ public static final int OFFSET_PRIVATE_DIRTY = 3;
/** @hide */
- public static final int offsetPrivateClean = 4;
+ public static final int OFFSET_SHARED_DIRTY = 4;
/** @hide */
- public static final int offsetSharedClean = 5;
+ public static final int OFFSET_PRIVATE_CLEAN = 5;
/** @hide */
- public static final int offsetSwappedOut = 6;
+ public static final int OFFSET_SHARED_CLEAN = 6;
/** @hide */
- public static final int offsetSwappedOutPss = 7;
+ public static final int OFFSET_SWAPPED_OUT = 7;
+ /** @hide */
+ public static final int OFFSET_SWAPPED_OUT_PSS = 8;
private int[] otherStats = new int[(NUM_OTHER_STATS+NUM_DVK_STATS)*NUM_CATEGORIES];
@@ -337,6 +345,13 @@
}
/**
+ * @hide Return total RSS memory usage in kB.
+ */
+ public int getTotalRss() {
+ return dalvikRss + nativeRss + otherRss;
+ }
+
+ /**
* Return total private dirty memory usage in kB.
*/
public int getTotalPrivateDirty() {
@@ -382,29 +397,32 @@
/** @hide */
public int getOtherPss(int which) {
- return otherStats[which*NUM_CATEGORIES + offsetPss];
+ return otherStats[which * NUM_CATEGORIES + OFFSET_PSS];
}
-
/** @hide */
public int getOtherSwappablePss(int which) {
- return otherStats[which*NUM_CATEGORIES + offsetSwappablePss];
+ return otherStats[which * NUM_CATEGORIES + OFFSET_SWAPPABLE_PSS];
}
+ /** @hide */
+ public int getOtherRss(int which) {
+ return otherStats[which * NUM_CATEGORIES + OFFSET_RSS];
+ }
/** @hide */
public int getOtherPrivateDirty(int which) {
- return otherStats[which*NUM_CATEGORIES + offsetPrivateDirty];
+ return otherStats[which * NUM_CATEGORIES + OFFSET_PRIVATE_DIRTY];
}
/** @hide */
public int getOtherSharedDirty(int which) {
- return otherStats[which*NUM_CATEGORIES + offsetSharedDirty];
+ return otherStats[which * NUM_CATEGORIES + OFFSET_SHARED_DIRTY];
}
/** @hide */
public int getOtherPrivateClean(int which) {
- return otherStats[which*NUM_CATEGORIES + offsetPrivateClean];
+ return otherStats[which * NUM_CATEGORIES + OFFSET_PRIVATE_CLEAN];
}
/** @hide */
@@ -414,17 +432,17 @@
/** @hide */
public int getOtherSharedClean(int which) {
- return otherStats[which*NUM_CATEGORIES + offsetSharedClean];
+ return otherStats[which * NUM_CATEGORIES + OFFSET_SHARED_CLEAN];
}
/** @hide */
public int getOtherSwappedOut(int which) {
- return otherStats[which*NUM_CATEGORIES + offsetSwappedOut];
+ return otherStats[which * NUM_CATEGORIES + OFFSET_SWAPPED_OUT];
}
/** @hide */
public int getOtherSwappedOutPss(int which) {
- return otherStats[which*NUM_CATEGORIES + offsetSwappedOutPss];
+ return otherStats[which * NUM_CATEGORIES + OFFSET_SWAPPED_OUT_PSS];
}
/** @hide */
@@ -741,6 +759,7 @@
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(dalvikPss);
dest.writeInt(dalvikSwappablePss);
+ dest.writeInt(dalvikRss);
dest.writeInt(dalvikPrivateDirty);
dest.writeInt(dalvikSharedDirty);
dest.writeInt(dalvikPrivateClean);
@@ -749,6 +768,7 @@
dest.writeInt(dalvikSwappedOutPss);
dest.writeInt(nativePss);
dest.writeInt(nativeSwappablePss);
+ dest.writeInt(nativeRss);
dest.writeInt(nativePrivateDirty);
dest.writeInt(nativeSharedDirty);
dest.writeInt(nativePrivateClean);
@@ -757,6 +777,7 @@
dest.writeInt(nativeSwappedOutPss);
dest.writeInt(otherPss);
dest.writeInt(otherSwappablePss);
+ dest.writeInt(otherRss);
dest.writeInt(otherPrivateDirty);
dest.writeInt(otherSharedDirty);
dest.writeInt(otherPrivateClean);
@@ -770,6 +791,7 @@
public void readFromParcel(Parcel source) {
dalvikPss = source.readInt();
dalvikSwappablePss = source.readInt();
+ dalvikRss = source.readInt();
dalvikPrivateDirty = source.readInt();
dalvikSharedDirty = source.readInt();
dalvikPrivateClean = source.readInt();
@@ -778,6 +800,7 @@
dalvikSwappedOutPss = source.readInt();
nativePss = source.readInt();
nativeSwappablePss = source.readInt();
+ nativeRss = source.readInt();
nativePrivateDirty = source.readInt();
nativeSharedDirty = source.readInt();
nativePrivateClean = source.readInt();
@@ -786,6 +809,7 @@
nativeSwappedOutPss = source.readInt();
otherPss = source.readInt();
otherSwappablePss = source.readInt();
+ otherRss = source.readInt();
otherPrivateDirty = source.readInt();
otherSharedDirty = source.readInt();
otherPrivateClean = source.readInt();
@@ -1001,8 +1025,8 @@
* under your package-specific directory on primary shared/external storage,
* as returned by {@link Context#getExternalFilesDir(String)}.
* <p>
- * See <a href="{@docRoot}guide/developing/tools/traceview.html">Traceview:
- * A Graphical Log Viewer</a> for information about reading trace files.
+ * See <a href="{@docRoot}studio/profile/traceview.html">Inspect Trace Logs
+ * with Traceview</a> for information about reading trace files.
* <p class="note">
* When method tracing is enabled, the VM will run more slowly than usual,
* so the timings from the trace files should only be considered in relative
@@ -1025,8 +1049,8 @@
* your package-specific directory on primary shared/external storage, as
* returned by {@link Context#getExternalFilesDir(String)}.
* <p>
- * See <a href="{@docRoot}guide/developing/tools/traceview.html">Traceview:
- * A Graphical Log Viewer</a> for information about reading trace files.
+ * See <a href="{@docRoot}studio/profile/traceview.html">Inspect Trace Logs
+ * with Traceview</a> for information about reading trace files.
* <p class="note">
* When method tracing is enabled, the VM will run more slowly than usual,
* so the timings from the trace files should only be considered in relative
@@ -1055,8 +1079,8 @@
* your package-specific directory on primary shared/external storage, as
* returned by {@link Context#getExternalFilesDir(String)}.
* <p>
- * See <a href="{@docRoot}guide/developing/tools/traceview.html">Traceview:
- * A Graphical Log Viewer</a> for information about reading trace files.
+ * See <a href="{@docRoot}studio/profile/traceview.html">Inspect Trace Logs
+ * with Traceview</a> for information about reading trace files.
* <p class="note">
* When method tracing is enabled, the VM will run more slowly than usual,
* so the timings from the trace files should only be considered in relative
@@ -1087,8 +1111,8 @@
* your package-specific directory on primary shared/external storage, as
* returned by {@link Context#getExternalFilesDir(String)}.
* <p>
- * See <a href="{@docRoot}guide/developing/tools/traceview.html">Traceview:
- * A Graphical Log Viewer</a> for information about reading trace files.
+ * See <a href="{@docRoot}studio/profile/traceview.html">Inspect Trace Logs
+ * with Traceview</a> for information about reading trace files.
* <p class="note">
* When method tracing is enabled, the VM will run more slowly than usual,
* so the timings from the trace files should only be considered in relative
@@ -1121,8 +1145,8 @@
* your package-specific directory on primary shared/external storage, as
* returned by {@link Context#getExternalFilesDir(String)}.
* <p>
- * See <a href="{@docRoot}guide/developing/tools/traceview.html">Traceview:
- * A Graphical Log Viewer</a> for information about reading trace files.
+ * See <a href="{@docRoot}studio/profile/traceview.html">Inspect Trace Logs
+ * with Traceview</a> for information about reading trace files.
*
* @param tracePath Path to the trace log file to create. If {@code null},
* this will default to "dmtrace.trace". If the file already
diff --git a/core/java/android/os/Environment.java b/core/java/android/os/Environment.java
index b1794a6..03203d0 100644
--- a/core/java/android/os/Environment.java
+++ b/core/java/android/os/Environment.java
@@ -41,6 +41,7 @@
private static final String ENV_OEM_ROOT = "OEM_ROOT";
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";
/** {@hide} */
public static final String DIR_ANDROID = "Android";
@@ -62,6 +63,7 @@
private static final File DIR_OEM_ROOT = getDirectory(ENV_OEM_ROOT, "/oem");
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 UserEnvironment sCurrentUser;
private static boolean sUserRequired;
@@ -180,6 +182,16 @@
}
/**
+ * Return root directory of the "product" partition holding product-specific
+ * customizations if any. If present, the partition is mounted read-only.
+ *
+ * @hide
+ */
+ public static File getProductDirectory() {
+ return DIR_PRODUCT_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.
@@ -292,9 +304,18 @@
}
/** {@hide} */
- public static File getProfileSnapshotPath(String packageName, String codePath) {
- return buildPath(buildPath(getDataDirectory(), "misc", "profiles", "ref", packageName,
- "primary.prof.snapshot"));
+ public static File getDataVendorCeDirectory(int userId) {
+ return buildPath(getDataDirectory(), "vendor_ce", String.valueOf(userId));
+ }
+
+ /** {@hide} */
+ public static File getDataVendorDeDirectory(int userId) {
+ return buildPath(getDataDirectory(), "vendor_de", String.valueOf(userId));
+ }
+
+ /** {@hide} */
+ public static File getDataRefProfilesDePackageDirectory(String packageName) {
+ return buildPath(getDataDirectory(), "misc", "profiles", "ref", packageName);
}
/** {@hide} */
diff --git a/core/java/android/os/HidlSupport.java b/core/java/android/os/HidlSupport.java
index 4d7d931..91b796a 100644
--- a/core/java/android/os/HidlSupport.java
+++ b/core/java/android/os/HidlSupport.java
@@ -16,6 +16,8 @@
package android.os;
+import android.annotation.SystemApi;
+
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
@@ -25,6 +27,7 @@
import java.util.stream.IntStream;
/** @hide */
+@SystemApi
public class HidlSupport {
/**
* Similar to Objects.deepEquals, but also take care of lists.
@@ -36,7 +39,9 @@
* 2.3 Both are Lists, elements are checked recursively
* 2.4 (If both are collections other than lists or maps, throw an error)
* 2.5 lft.equals(rgt) returns true
+ * @hide
*/
+ @SystemApi
public static boolean deepEquals(Object lft, Object rgt) {
if (lft == rgt) {
return true;
@@ -91,6 +96,7 @@
* and should be avoided).
*
* @param <E> Inner object type.
+ * @hide
*/
public static final class Mutable<E> {
public E value;
@@ -106,7 +112,9 @@
/**
* Similar to Arrays.deepHashCode, but also take care of lists.
+ * @hide
*/
+ @SystemApi
public static int deepHashCode(Object o) {
if (o == null) {
return 0;
@@ -133,6 +141,7 @@
return o.hashCode();
}
+ /** @hide */
private static void throwErrorIfUnsupportedType(Object o) {
if (o instanceof Collection<?> && !(o instanceof List<?>)) {
throw new UnsupportedOperationException(
@@ -146,6 +155,7 @@
}
}
+ /** @hide */
private static int primitiveArrayHashCode(Object o) {
Class<?> elementType = o.getClass().getComponentType();
if (elementType == boolean.class) {
@@ -185,7 +195,9 @@
* - If both interfaces are stubs, asBinder() returns the object itself. By default,
* auto-generated IFoo.Stub does not override equals(), but an implementation can
* optionally override it, and {@code interfacesEqual} will use it here.
+ * @hide
*/
+ @SystemApi
public static boolean interfacesEqual(IHwInterface lft, Object rgt) {
if (lft == rgt) {
return true;
@@ -200,7 +212,12 @@
}
/**
- * Return PID of process if sharable to clients.
+ * Return PID of process only if on a non-user build. For debugging purposes.
+ * @hide
*/
+ @SystemApi
public static native int getPidIfSharable();
+
+ /** @hide */
+ public HidlSupport() {}
}
diff --git a/core/java/android/os/HwBinder.java b/core/java/android/os/HwBinder.java
index 5e2a081..2a088a6 100644
--- a/core/java/android/os/HwBinder.java
+++ b/core/java/android/os/HwBinder.java
@@ -16,16 +16,20 @@
package android.os;
+import android.annotation.SystemApi;
+
import libcore.util.NativeAllocationRegistry;
import java.util.NoSuchElementException;
/** @hide */
+@SystemApi
public abstract class HwBinder implements IHwBinder {
private static final String TAG = "HwBinder";
private static final NativeAllocationRegistry sNativeRegistry;
+ /** @hide */
public HwBinder() {
native_setup();
@@ -34,33 +38,71 @@
mNativeContext);
}
+ /** @hide */
@Override
public final native void transact(
int code, HwParcel request, HwParcel reply, int flags)
throws RemoteException;
+ /** @hide */
public abstract void onTransact(
int code, HwParcel request, HwParcel reply, int flags)
throws RemoteException;
+ /** @hide */
public native final void registerService(String serviceName)
throws RemoteException;
+ /**
+ * Returns the specified service from the hwservicemanager. Does not retry.
+ *
+ * @param iface fully-qualified interface name for example foo.bar@1.3::IBaz
+ * @param serviceName the instance name of the service for example default.
+ * @throws NoSuchElementException when the service is unavailable
+ * @hide
+ */
+ @SystemApi
public static final IHwBinder getService(
String iface,
String serviceName)
throws RemoteException, NoSuchElementException {
return getService(iface, serviceName, false /* retry */);
}
+ /**
+ * Returns the specified service from the hwservicemanager.
+ * @param iface fully-qualified interface name for example foo.bar@1.3::IBaz
+ * @param serviceName the instance name of the service for example default.
+ * @param retry whether to wait for the service to start if it's not already started
+ * @throws NoSuchElementException when the service is unavailable
+ * @hide
+ */
+ @SystemApi
public static native final IHwBinder getService(
String iface,
String serviceName,
boolean retry)
throws RemoteException, NoSuchElementException;
+ /**
+ * Configures how many threads the process-wide hwbinder threadpool
+ * has to process incoming requests.
+ *
+ * @hide
+ */
+ @SystemApi
public static native final void configureRpcThreadpool(
long maxThreads, boolean callerWillJoin);
+ /**
+ * Current thread will join hwbinder threadpool and process
+ * commands in the pool. Should be called after configuring
+ * a threadpool with callerWillJoin true and then registering
+ * the provided service if this thread doesn't need to do
+ * anything else.
+ *
+ * @hide
+ */
+ @SystemApi
public static native final void joinRpcThreadpool();
// Returns address of the "freeFunction".
@@ -82,7 +124,20 @@
private static native void native_report_sysprop_change();
/**
+ * Enable instrumentation if available.
+ * @hide
+ */
+ @SystemApi
+ public static void enableInstrumentation() {
+ native_report_sysprop_change();
+ }
+
+ /**
* Notifies listeners that a system property has changed
+ *
+ * TODO(b/72480743): remove this method
+ *
+ * @hide
*/
public static void reportSyspropChanged() {
native_report_sysprop_change();
diff --git a/core/java/android/os/HwBlob.java b/core/java/android/os/HwBlob.java
index 5e9b9ae3..405651e 100644
--- a/core/java/android/os/HwBlob.java
+++ b/core/java/android/os/HwBlob.java
@@ -17,10 +17,17 @@
package android.os;
import android.annotation.NonNull;
+import android.annotation.SystemApi;
import libcore.util.NativeAllocationRegistry;
-/** @hide */
+/**
+ * Represents fixed sized allocation of marshalled data used. Helper methods
+ * allow for access to the unmarshalled data in a variety of ways.
+ *
+ * @hide
+ */
+@SystemApi
public class HwBlob {
private static final String TAG = "HwBlob";
@@ -34,48 +41,276 @@
mNativeContext);
}
+ /**
+ * @param offset offset to unmarshall a boolean from
+ * @return the unmarshalled boolean value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final boolean getBool(long offset);
+ /**
+ * @param offset offset to unmarshall a byte from
+ * @return the unmarshalled byte value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final byte getInt8(long offset);
+ /**
+ * @param offset offset to unmarshall a short from
+ * @return the unmarshalled short value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final short getInt16(long offset);
+ /**
+ * @param offset offset to unmarshall an int from
+ * @return the unmarshalled int value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final int getInt32(long offset);
+ /**
+ * @param offset offset to unmarshall a long from
+ * @return the unmarshalled long value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final long getInt64(long offset);
+ /**
+ * @param offset offset to unmarshall a float from
+ * @return the unmarshalled float value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final float getFloat(long offset);
+ /**
+ * @param offset offset to unmarshall a double from
+ * @return the unmarshalled double value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final double getDouble(long offset);
+ /**
+ * @param offset offset to unmarshall a string from
+ * @return the unmarshalled string value
+ * @throws IndexOutOfBoundsException when offset is out of this HwBlob
+ */
public native final String getString(long offset);
/**
- The copyTo... methods copy the blob's data, starting from the given
- byte offset, into the array. A total of "size" _elements_ are copied.
+ * Copy the blobs data starting from the given byte offset into the range, copying
+ * a total of size elements.
+ *
+ * @param offset starting location in blob
+ * @param array destination array
+ * @param size total number of elements to copy
+ * @throws IllegalArgumentException array.length < size
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jboolean)] out of the blob.
*/
public native final void copyToBoolArray(long offset, boolean[] array, int size);
+ /**
+ * Copy the blobs data starting from the given byte offset into the range, copying
+ * a total of size elements.
+ *
+ * @param offset starting location in blob
+ * @param array destination array
+ * @param size total number of elements to copy
+ * @throws IllegalArgumentException array.length < size
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jbyte)] out of the blob.
+ */
public native final void copyToInt8Array(long offset, byte[] array, int size);
+ /**
+ * Copy the blobs data starting from the given byte offset into the range, copying
+ * a total of size elements.
+ *
+ * @param offset starting location in blob
+ * @param array destination array
+ * @param size total number of elements to copy
+ * @throws IllegalArgumentException array.length < size
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jshort)] out of the blob.
+ */
public native final void copyToInt16Array(long offset, short[] array, int size);
+ /**
+ * Copy the blobs data starting from the given byte offset into the range, copying
+ * a total of size elements.
+ *
+ * @param offset starting location in blob
+ * @param array destination array
+ * @param size total number of elements to copy
+ * @throws IllegalArgumentException array.length < size
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jint)] out of the blob.
+ */
public native final void copyToInt32Array(long offset, int[] array, int size);
+ /**
+ * Copy the blobs data starting from the given byte offset into the range, copying
+ * a total of size elements.
+ *
+ * @param offset starting location in blob
+ * @param array destination array
+ * @param size total number of elements to copy
+ * @throws IllegalArgumentException array.length < size
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jlong)] out of the blob.
+ */
public native final void copyToInt64Array(long offset, long[] array, int size);
+ /**
+ * Copy the blobs data starting from the given byte offset into the range, copying
+ * a total of size elements.
+ *
+ * @param offset starting location in blob
+ * @param array destination array
+ * @param size total number of elements to copy
+ * @throws IllegalArgumentException array.length < size
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jfloat)] out of the blob.
+ */
public native final void copyToFloatArray(long offset, float[] array, int size);
+ /**
+ * Copy the blobs data starting from the given byte offset into the range, copying
+ * a total of size elements.
+ *
+ * @param offset starting location in blob
+ * @param array destination array
+ * @param size total number of elements to copy
+ * @throws IllegalArgumentException array.length < size
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jdouble)] out of the blob.
+ */
public native final void copyToDoubleArray(long offset, double[] array, int size);
+ /**
+ * Writes a boolean value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jboolean)] is out of range
+ */
public native final void putBool(long offset, boolean x);
+ /**
+ * Writes a byte value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jbyte)] is out of range
+ */
public native final void putInt8(long offset, byte x);
+ /**
+ * Writes a short value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jshort)] is out of range
+ */
public native final void putInt16(long offset, short x);
+ /**
+ * Writes a int value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jint)] is out of range
+ */
public native final void putInt32(long offset, int x);
+ /**
+ * Writes a long value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jlong)] is out of range
+ */
public native final void putInt64(long offset, long x);
+ /**
+ * Writes a float value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jfloat)] is out of range
+ */
public native final void putFloat(long offset, float x);
+ /**
+ * Writes a double value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jdouble)] is out of range
+ */
public native final void putDouble(long offset, double x);
+ /**
+ * Writes a string value at an offset.
+ *
+ * @param offset location to write value
+ * @param x value to write
+ * @throws IndexOutOfBoundsException when [offset, offset + sizeof(jstring)] is out of range
+ */
public native final void putString(long offset, String x);
+ /**
+ * Put a boolean array contiguously at an offset in the blob.
+ *
+ * @param offset location to write values
+ * @param x array to write
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jboolean)] out of the blob.
+ */
public native final void putBoolArray(long offset, boolean[] x);
+ /**
+ * Put a byte array contiguously at an offset in the blob.
+ *
+ * @param offset location to write values
+ * @param x array to write
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jbyte)] out of the blob.
+ */
public native final void putInt8Array(long offset, byte[] x);
+ /**
+ * Put a short array contiguously at an offset in the blob.
+ *
+ * @param offset location to write values
+ * @param x array to write
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jshort)] out of the blob.
+ */
public native final void putInt16Array(long offset, short[] x);
+ /**
+ * Put a int array contiguously at an offset in the blob.
+ *
+ * @param offset location to write values
+ * @param x array to write
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jint)] out of the blob.
+ */
public native final void putInt32Array(long offset, int[] x);
+ /**
+ * Put a long array contiguously at an offset in the blob.
+ *
+ * @param offset location to write values
+ * @param x array to write
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jlong)] out of the blob.
+ */
public native final void putInt64Array(long offset, long[] x);
+ /**
+ * Put a float array contiguously at an offset in the blob.
+ *
+ * @param offset location to write values
+ * @param x array to write
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jfloat)] out of the blob.
+ */
public native final void putFloatArray(long offset, float[] x);
+ /**
+ * Put a double array contiguously at an offset in the blob.
+ *
+ * @param offset location to write values
+ * @param x array to write
+ * @throws IndexOutOfBoundsException [offset, offset + size * sizeof(jdouble)] out of the blob.
+ */
public native final void putDoubleArray(long offset, double[] x);
+ /**
+ * Write another HwBlob into this blob at the specified location.
+ *
+ * @param offset location to write value
+ * @param blob data to write
+ * @throws IndexOutOfBoundsException if [offset, offset + blob's size] outside of the range of
+ * this blob.
+ */
public native final void putBlob(long offset, HwBlob blob);
+ /**
+ * @return current handle of HwBlob for reference in a parcelled binder transaction
+ */
public native final long handle();
+ /**
+ * Convert a primitive to a wrapped array for boolean.
+ *
+ * @param array from array
+ * @return transformed array
+ */
public static Boolean[] wrapArray(@NonNull boolean[] array) {
final int n = array.length;
Boolean[] wrappedArray = new Boolean[n];
@@ -85,6 +320,12 @@
return wrappedArray;
}
+ /**
+ * Convert a primitive to a wrapped array for long.
+ *
+ * @param array from array
+ * @return transformed array
+ */
public static Long[] wrapArray(@NonNull long[] array) {
final int n = array.length;
Long[] wrappedArray = new Long[n];
@@ -94,6 +335,12 @@
return wrappedArray;
}
+ /**
+ * Convert a primitive to a wrapped array for byte.
+ *
+ * @param array from array
+ * @return transformed array
+ */
public static Byte[] wrapArray(@NonNull byte[] array) {
final int n = array.length;
Byte[] wrappedArray = new Byte[n];
@@ -103,6 +350,12 @@
return wrappedArray;
}
+ /**
+ * Convert a primitive to a wrapped array for short.
+ *
+ * @param array from array
+ * @return transformed array
+ */
public static Short[] wrapArray(@NonNull short[] array) {
final int n = array.length;
Short[] wrappedArray = new Short[n];
@@ -112,6 +365,12 @@
return wrappedArray;
}
+ /**
+ * Convert a primitive to a wrapped array for int.
+ *
+ * @param array from array
+ * @return transformed array
+ */
public static Integer[] wrapArray(@NonNull int[] array) {
final int n = array.length;
Integer[] wrappedArray = new Integer[n];
@@ -121,6 +380,12 @@
return wrappedArray;
}
+ /**
+ * Convert a primitive to a wrapped array for float.
+ *
+ * @param array from array
+ * @return transformed array
+ */
public static Float[] wrapArray(@NonNull float[] array) {
final int n = array.length;
Float[] wrappedArray = new Float[n];
@@ -130,6 +395,12 @@
return wrappedArray;
}
+ /**
+ * Convert a primitive to a wrapped array for double.
+ *
+ * @param array from array
+ * @return transformed array
+ */
public static Double[] wrapArray(@NonNull double[] array) {
final int n = array.length;
Double[] wrappedArray = new Double[n];
diff --git a/core/java/android/os/HwParcel.java b/core/java/android/os/HwParcel.java
index 4ba1144..0eb62c95 100644
--- a/core/java/android/os/HwParcel.java
+++ b/core/java/android/os/HwParcel.java
@@ -16,17 +16,32 @@
package android.os;
-import java.util.ArrayList;
-import java.util.Arrays;
+import android.annotation.IntDef;
+import android.annotation.SystemApi;
import libcore.util.NativeAllocationRegistry;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.ArrayList;
+import java.util.Arrays;
+
/** @hide */
+@SystemApi
public class HwParcel {
private static final String TAG = "HwParcel";
+ @IntDef(prefix = { "STATUS_" }, value = {
+ STATUS_SUCCESS,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface Status {}
+
+ /**
+ * Success return error for a transaction. Written to parcels
+ * using writeStatus.
+ */
public static final int STATUS_SUCCESS = 0;
- public static final int STATUS_ERROR = -1;
private static final NativeAllocationRegistry sNativeRegistry;
@@ -38,6 +53,9 @@
mNativeContext);
}
+ /**
+ * Creates an initialized and empty parcel.
+ */
public HwParcel() {
native_setup(true /* allocate */);
@@ -46,25 +64,106 @@
mNativeContext);
}
+ /**
+ * Writes an interface token into the parcel used to verify that
+ * a transaction has made it to the write type of interface.
+ *
+ * @param interfaceName fully qualified name of interface message
+ * is being sent to.
+ */
public native final void writeInterfaceToken(String interfaceName);
+ /**
+ * Writes a boolean value to the end of the parcel.
+ * @param val to write
+ */
public native final void writeBool(boolean val);
+ /**
+ * Writes a byte value to the end of the parcel.
+ * @param val to write
+ */
public native final void writeInt8(byte val);
+ /**
+ * Writes a short value to the end of the parcel.
+ * @param val to write
+ */
public native final void writeInt16(short val);
+ /**
+ * Writes a int value to the end of the parcel.
+ * @param val to write
+ */
public native final void writeInt32(int val);
+ /**
+ * Writes a long value to the end of the parcel.
+ * @param val to write
+ */
public native final void writeInt64(long val);
+ /**
+ * Writes a float value to the end of the parcel.
+ * @param val to write
+ */
public native final void writeFloat(float val);
+ /**
+ * Writes a double value to the end of the parcel.
+ * @param val to write
+ */
public native final void writeDouble(double val);
+ /**
+ * Writes a String value to the end of the parcel.
+ *
+ * Note, this will be converted to UTF-8 when it is written.
+ *
+ * @param val to write
+ */
public native final void writeString(String val);
+ /**
+ * Writes an array of boolean values to the end of the parcel.
+ * @param val to write
+ */
private native final void writeBoolVector(boolean[] val);
+ /**
+ * Writes an array of byte values to the end of the parcel.
+ * @param val to write
+ */
private native final void writeInt8Vector(byte[] val);
+ /**
+ * Writes an array of short values to the end of the parcel.
+ * @param val to write
+ */
private native final void writeInt16Vector(short[] val);
+ /**
+ * Writes an array of int values to the end of the parcel.
+ * @param val to write
+ */
private native final void writeInt32Vector(int[] val);
+ /**
+ * Writes an array of long values to the end of the parcel.
+ * @param val to write
+ */
private native final void writeInt64Vector(long[] val);
+ /**
+ * Writes an array of float values to the end of the parcel.
+ * @param val to write
+ */
private native final void writeFloatVector(float[] val);
+ /**
+ * Writes an array of double values to the end of the parcel.
+ * @param val to write
+ */
private native final void writeDoubleVector(double[] val);
+ /**
+ * Writes an array of String values to the end of the parcel.
+ *
+ * Note, these will be converted to UTF-8 as they are written.
+ *
+ * @param val to write
+ */
private native final void writeStringVector(String[] val);
+ /**
+ * Helper method to write a list of Booleans to val.
+ * @param val list to write
+ */
public final void writeBoolVector(ArrayList<Boolean> val) {
final int n = val.size();
boolean[] array = new boolean[n];
@@ -75,6 +174,10 @@
writeBoolVector(array);
}
+ /**
+ * Helper method to write a list of Booleans to the end of the parcel.
+ * @param val list to write
+ */
public final void writeInt8Vector(ArrayList<Byte> val) {
final int n = val.size();
byte[] array = new byte[n];
@@ -85,6 +188,10 @@
writeInt8Vector(array);
}
+ /**
+ * Helper method to write a list of Shorts to the end of the parcel.
+ * @param val list to write
+ */
public final void writeInt16Vector(ArrayList<Short> val) {
final int n = val.size();
short[] array = new short[n];
@@ -95,6 +202,10 @@
writeInt16Vector(array);
}
+ /**
+ * Helper method to write a list of Integers to the end of the parcel.
+ * @param val list to write
+ */
public final void writeInt32Vector(ArrayList<Integer> val) {
final int n = val.size();
int[] array = new int[n];
@@ -105,6 +216,10 @@
writeInt32Vector(array);
}
+ /**
+ * Helper method to write a list of Longs to the end of the parcel.
+ * @param val list to write
+ */
public final void writeInt64Vector(ArrayList<Long> val) {
final int n = val.size();
long[] array = new long[n];
@@ -115,6 +230,10 @@
writeInt64Vector(array);
}
+ /**
+ * Helper method to write a list of Floats to the end of the parcel.
+ * @param val list to write
+ */
public final void writeFloatVector(ArrayList<Float> val) {
final int n = val.size();
float[] array = new float[n];
@@ -125,6 +244,10 @@
writeFloatVector(array);
}
+ /**
+ * Helper method to write a list of Doubles to the end of the parcel.
+ * @param val list to write
+ */
public final void writeDoubleVector(ArrayList<Double> val) {
final int n = val.size();
double[] array = new double[n];
@@ -135,93 +258,272 @@
writeDoubleVector(array);
}
+ /**
+ * Helper method to write a list of Strings to the end of the parcel.
+ * @param val list to write
+ */
public final void writeStringVector(ArrayList<String> val) {
writeStringVector(val.toArray(new String[val.size()]));
}
+ /**
+ * Write a hwbinder object to the end of the parcel.
+ * @param binder value to write
+ */
public native final void writeStrongBinder(IHwBinder binder);
+ /**
+ * Checks to make sure that the interface name matches the name written by the parcel
+ * sender by writeInterfaceToken
+ *
+ * @throws SecurityException interface doesn't match
+ */
public native final void enforceInterface(String interfaceName);
+
+ /**
+ * Reads a boolean value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final boolean readBool();
+ /**
+ * Reads a byte value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final byte readInt8();
+ /**
+ * Reads a short value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final short readInt16();
+ /**
+ * Reads a int value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final int readInt32();
+ /**
+ * Reads a long value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final long readInt64();
+ /**
+ * Reads a float value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final float readFloat();
+ /**
+ * Reads a double value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final double readDouble();
+ /**
+ * Reads a String value from the current location in the parcel.
+ * @return value parsed from the parcel
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final String readString();
+ /**
+ * Reads an array of boolean values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final boolean[] readBoolVectorAsArray();
+ /**
+ * Reads an array of byte values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final byte[] readInt8VectorAsArray();
+ /**
+ * Reads an array of short values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final short[] readInt16VectorAsArray();
+ /**
+ * Reads an array of int values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final int[] readInt32VectorAsArray();
+ /**
+ * Reads an array of long values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final long[] readInt64VectorAsArray();
+ /**
+ * Reads an array of float values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final float[] readFloatVectorAsArray();
+ /**
+ * Reads an array of double values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final double[] readDoubleVectorAsArray();
+ /**
+ * Reads an array of String values from the parcel.
+ * @return array of parsed values
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
private native final String[] readStringVectorAsArray();
+ /**
+ * Convenience method to read a Boolean vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<Boolean> readBoolVector() {
Boolean[] array = HwBlob.wrapArray(readBoolVectorAsArray());
return new ArrayList<Boolean>(Arrays.asList(array));
}
+ /**
+ * Convenience method to read a Byte vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<Byte> readInt8Vector() {
Byte[] array = HwBlob.wrapArray(readInt8VectorAsArray());
return new ArrayList<Byte>(Arrays.asList(array));
}
+ /**
+ * Convenience method to read a Short vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<Short> readInt16Vector() {
Short[] array = HwBlob.wrapArray(readInt16VectorAsArray());
return new ArrayList<Short>(Arrays.asList(array));
}
+ /**
+ * Convenience method to read a Integer vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<Integer> readInt32Vector() {
Integer[] array = HwBlob.wrapArray(readInt32VectorAsArray());
return new ArrayList<Integer>(Arrays.asList(array));
}
+ /**
+ * Convenience method to read a Long vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<Long> readInt64Vector() {
Long[] array = HwBlob.wrapArray(readInt64VectorAsArray());
return new ArrayList<Long>(Arrays.asList(array));
}
+ /**
+ * Convenience method to read a Float vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<Float> readFloatVector() {
Float[] array = HwBlob.wrapArray(readFloatVectorAsArray());
return new ArrayList<Float>(Arrays.asList(array));
}
+ /**
+ * Convenience method to read a Double vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<Double> readDoubleVector() {
Double[] array = HwBlob.wrapArray(readDoubleVectorAsArray());
return new ArrayList<Double>(Arrays.asList(array));
}
+ /**
+ * Convenience method to read a String vector as an ArrayList.
+ * @return array of parsed values.
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public final ArrayList<String> readStringVector() {
return new ArrayList<String>(Arrays.asList(readStringVectorAsArray()));
}
+ /**
+ * 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
+ */
public native final IHwBinder readStrongBinder();
- // Handle is stored as part of the blob.
+ /**
+ * Read opaque segment of data as a blob.
+ * @return blob of size expectedSize
+ * @throws IllegalArgumentException if the parcel has no more data
+ */
public native final HwBlob readBuffer(long expectedSize);
+ /**
+ * Read a buffer written using scatter gather.
+ *
+ * @param expectedSize size that buffer should be
+ * @param parentHandle handle from which to read the embedded buffer
+ * @param offset offset into parent
+ * @param nullable whether or not to allow for a null return
+ * @return blob of data with size expectedSize
+ * @throws NoSuchElementException if an embedded buffer is not available to read
+ * @throws IllegalArgumentException if expectedSize < 0
+ * @throws NullPointerException if the transaction specified the blob to be null
+ * but nullable is false
+ */
public native final HwBlob readEmbeddedBuffer(
long expectedSize, long parentHandle, long offset,
boolean nullable);
+ /**
+ * Write a buffer into the transaction.
+ * @param blob blob to write into the parcel.
+ */
public native final void writeBuffer(HwBlob blob);
-
+ /**
+ * Write a status value into the blob.
+ * @param status value to write
+ */
public native final void writeStatus(int status);
+ /**
+ * @throws IllegalArgumentException if a success vaue cannot be read
+ * @throws RemoteException if success value indicates a transaction error
+ */
public native final void verifySuccess();
+ /**
+ * Should be called to reduce memory pressure when this object no longer needs
+ * to be written to.
+ */
public native final void releaseTemporaryStorage();
+ /**
+ * Should be called when object is no longer needed to reduce possible memory
+ * pressure if the Java GC does not get to this object in time.
+ */
public native final void release();
+ /**
+ * Sends the parcel to the specified destination.
+ */
public native final void send();
// Returns address of the "freeFunction".
diff --git a/core/java/android/os/IHwBinder.java b/core/java/android/os/IHwBinder.java
index 619f4dc..0c592e1 100644
--- a/core/java/android/os/IHwBinder.java
+++ b/core/java/android/os/IHwBinder.java
@@ -16,26 +16,57 @@
package android.os;
+import android.annotation.SystemApi;
+
/** @hide */
+@SystemApi
public interface IHwBinder {
// These MUST match their corresponding libhwbinder/IBinder.h definition !!!
+ /** @hide */
public static final int FIRST_CALL_TRANSACTION = 1;
+ /** @hide */
public static final int FLAG_ONEWAY = 1;
+ /**
+ * Process a hwbinder transaction.
+ *
+ * @hide
+ */
+ @SystemApi
public void transact(
int code, HwParcel request, HwParcel reply, int flags)
throws RemoteException;
+ /**
+ * Return as IHwInterface instance only if this implements descriptor.
+ * @param descriptor for example foo.bar@1.0::IBaz
+ * @hide
+ */
+ @SystemApi
public IHwInterface queryLocalInterface(String descriptor);
/**
* Interface for receiving a callback when the process hosting a service
* has gone away.
*/
+ @SystemApi
public interface DeathRecipient {
+ /**
+ * Callback for a registered process dying.
+ */
+ @SystemApi
public void serviceDied(long cookie);
}
+ /**
+ * Notifies the death recipient with the cookie when the process containing
+ * this binder dies.
+ */
+ @SystemApi
public boolean linkToDeath(DeathRecipient recipient, long cookie);
+ /**
+ * Unregisters the death recipient from this binder.
+ */
+ @SystemApi
public boolean unlinkToDeath(DeathRecipient recipient);
}
diff --git a/core/java/android/os/IHwInterface.java b/core/java/android/os/IHwInterface.java
index 7c5ac6f..a2f59a9 100644
--- a/core/java/android/os/IHwInterface.java
+++ b/core/java/android/os/IHwInterface.java
@@ -16,7 +16,13 @@
package android.os;
+import android.annotation.SystemApi;
/** @hide */
+@SystemApi
public interface IHwInterface {
+ /**
+ * Returns the binder object that corresponds to an interface.
+ */
+ @SystemApi
public IHwBinder asBinder();
}
diff --git a/core/java/android/os/IPowerManager.aidl b/core/java/android/os/IPowerManager.aidl
index 75f7c1f..1681f11 100644
--- a/core/java/android/os/IPowerManager.aidl
+++ b/core/java/android/os/IPowerManager.aidl
@@ -63,11 +63,6 @@
// --- deprecated ---
boolean isScreenBrightnessBoosted();
- // temporarily overrides the screen brightness settings to allow the user to
- // see the effect of a settings change without applying it immediately
- void setTemporaryScreenBrightnessSettingOverride(int brightness);
- void setTemporaryScreenAutoBrightnessAdjustmentSettingOverride(float adj);
-
// sets the attention light (used by phone app only)
void setAttentionLight(boolean on, int color);
}
diff --git a/core/java/android/os/IStatsCompanionService.aidl b/core/java/android/os/IStatsCompanionService.aidl
index 1d2a408..8a27700 100644
--- a/core/java/android/os/IStatsCompanionService.aidl
+++ b/core/java/android/os/IStatsCompanionService.aidl
@@ -16,6 +16,7 @@
package android.os;
+import android.os.StatsDimensionsValue;
import android.os.StatsLogEventWrapper;
/**
@@ -55,8 +56,17 @@
StatsLogEventWrapper[] pullData(int pullCode);
/** Send a broadcast to the specified pkg and class that it should getData now. */
+ // TODO: Rename this and use a pending intent instead.
oneway void sendBroadcast(String pkg, String cls);
+ /**
+ * Requests StatsCompanionService to send a broadcast using the given intentSender
+ * (which should cast to an IIntentSender), along with the other information specified.
+ */
+ oneway void sendSubscriberBroadcast(in IBinder intentSender, long configUid, long configId,
+ long subscriptionId, long subscriptionRuleId,
+ in StatsDimensionsValue dimensionsValue);
+
/** Tells StatsCompaionService to grab the uid map snapshot and send it to statsd. */
oneway void triggerUidSnapshot();
}
diff --git a/core/java/android/os/IStatsManager.aidl b/core/java/android/os/IStatsManager.aidl
index 29812e8..679b49d 100644
--- a/core/java/android/os/IStatsManager.aidl
+++ b/core/java/android/os/IStatsManager.aidl
@@ -81,7 +81,7 @@
/**
* Sets a configuration with the specified config key and subscribes to updates for this
* configuration key. Broadcasts will be sent if this configuration needs to be collected.
- * The configuration must be a wire-encoded StatsDConfig. The caller specifies the name of the
+ * The configuration must be a wire-encoded StatsdConfig. The caller specifies the name of the
* package and class that should receive these broadcasts.
*
* Returns if this configuration was correctly registered.
@@ -95,4 +95,33 @@
* Returns if this configuration key was removed.
*/
boolean removeConfiguration(in long configKey);
+
+ /**
+ * Set the IIntentSender (i.e. PendingIntent) to be used when broadcasting subscriber
+ * information to the given subscriberId within the given config.
+ *
+ * Suppose that the calling uid has added a config with key configKey, and that in this config
+ * it is specified that when a particular anomaly is detected, a broadcast should be sent to
+ * a BroadcastSubscriber with id subscriberId. This function links the given intentSender with
+ * that subscriberId (for that config), so that this intentSender is used to send the broadcast
+ * when the anomaly is detected.
+ *
+ * This function can only be called by the owner (uid) of the config. It must be called each
+ * time statsd starts. Later calls overwrite previous calls; only one intentSender is stored.
+ *
+ * intentSender must be convertible into an IntentSender using IntentSender(IBinder)
+ * and cannot be null.
+ *
+ * Returns true if successful.
+ */
+ boolean setBroadcastSubscriber(long configKey, long subscriberId, in IBinder intentSender);
+
+ /**
+ * Undoes setBroadcastSubscriber() for the (configKey, subscriberId) pair.
+ * Any broadcasts associated with subscriberId will henceforth not be sent.
+ * No-op if this (configKey, subsriberId) pair was not associated with an IntentSender.
+ *
+ * Returns true if successful.
+ */
+ boolean unsetBroadcastSubscriber(long configKey, long subscriberId);
}
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index 3798a5e..811cc5e 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -23,6 +23,7 @@
import android.annotation.SystemService;
import android.content.Context;
import android.util.Log;
+import android.util.proto.ProtoOutputStream;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -109,7 +110,7 @@
/* NOTE: Wake lock levels were previously defined as a bit field, except that only a few
* combinations were actually supported so the bit field was removed. This explains
* why the numbering scheme is so odd. If adding a new wake lock level, any unused
- * value can be used.
+ * value (in frameworks/base/core/proto/android/os/enums.proto) can be used.
*/
/**
@@ -120,7 +121,7 @@
* but the CPU will be kept on until all partial wake locks have been released.
* </p>
*/
- public static final int PARTIAL_WAKE_LOCK = 0x00000001;
+ public static final int PARTIAL_WAKE_LOCK = OsProtoEnums.PARTIAL_WAKE_LOCK; // 0x00000001
/**
* Wake lock level: Ensures that the screen is on (but may be dimmed);
@@ -137,7 +138,7 @@
* as the user moves between applications and doesn't require a special permission.
*/
@Deprecated
- public static final int SCREEN_DIM_WAKE_LOCK = 0x00000006;
+ public static final int SCREEN_DIM_WAKE_LOCK = OsProtoEnums.SCREEN_DIM_WAKE_LOCK; // 0x00000006
/**
* Wake lock level: Ensures that the screen is on at full brightness;
@@ -154,7 +155,8 @@
* as the user moves between applications and doesn't require a special permission.
*/
@Deprecated
- public static final int SCREEN_BRIGHT_WAKE_LOCK = 0x0000000a;
+ public static final int SCREEN_BRIGHT_WAKE_LOCK =
+ OsProtoEnums.SCREEN_BRIGHT_WAKE_LOCK; // 0x0000000a
/**
* Wake lock level: Ensures that the screen and keyboard backlight are on at
@@ -171,7 +173,7 @@
* as the user moves between applications and doesn't require a special permission.
*/
@Deprecated
- public static final int FULL_WAKE_LOCK = 0x0000001a;
+ public static final int FULL_WAKE_LOCK = OsProtoEnums.FULL_WAKE_LOCK; // 0x0000001a
/**
* Wake lock level: Turns the screen off when the proximity sensor activates.
@@ -192,7 +194,8 @@
* Cannot be used with {@link #ACQUIRE_CAUSES_WAKEUP}.
* </p>
*/
- public static final int PROXIMITY_SCREEN_OFF_WAKE_LOCK = 0x00000020;
+ public static final int PROXIMITY_SCREEN_OFF_WAKE_LOCK =
+ OsProtoEnums.PROXIMITY_SCREEN_OFF_WAKE_LOCK; // 0x00000020
/**
* Wake lock level: Put the screen in a low power state and allow the CPU to suspend
@@ -206,7 +209,7 @@
*
* {@hide}
*/
- public static final int DOZE_WAKE_LOCK = 0x00000040;
+ public static final int DOZE_WAKE_LOCK = OsProtoEnums.DOZE_WAKE_LOCK; // 0x00000040
/**
* Wake lock level: Keep the device awake enough to allow drawing to occur.
@@ -220,7 +223,7 @@
*
* {@hide}
*/
- public static final int DRAW_WAKE_LOCK = 0x00000080;
+ public static final int DRAW_WAKE_LOCK = OsProtoEnums.DRAW_WAKE_LOCK; // 0x00000080
/**
* Mask for the wake lock level component of a combined wake lock level and flags integer.
@@ -1000,24 +1003,6 @@
return false;
}
- /**
- * Sets the brightness of the backlights (screen, keyboard, button).
- * <p>
- * Requires the {@link android.Manifest.permission#DEVICE_POWER} permission.
- * </p>
- *
- * @param brightness The brightness value from 0 to 255.
- *
- * @hide Requires signature permission.
- */
- public void setBacklightBrightness(int brightness) {
- try {
- mService.setTemporaryScreenBrightnessSettingOverride(brightness);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
- }
-
/**
* Returns true if the specified wake lock level is supported.
*
@@ -1652,6 +1637,21 @@
}
}
+ /** @hide */
+ public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ synchronized (mToken) {
+ final long token = proto.start(fieldId);
+ proto.write(PowerManagerProto.WakeLockProto.HEX_STRING,
+ Integer.toHexString(System.identityHashCode(this)));
+ proto.write(PowerManagerProto.WakeLockProto.HELD, mHeld);
+ proto.write(PowerManagerProto.WakeLockProto.INTERNAL_COUNT, mInternalCount);
+ if (mWorkSource != null) {
+ mWorkSource.writeToProto(proto, PowerManagerProto.WakeLockProto.WORK_SOURCE);
+ }
+ proto.end(token);
+ }
+ }
+
/**
* Wraps a Runnable such that this method immediately acquires the wake lock and then
* once the Runnable is done the wake lock is released.
diff --git a/core/java/android/os/PowerManagerInternal.java b/core/java/android/os/PowerManagerInternal.java
index 3ef0961..c7d89b0 100644
--- a/core/java/android/os/PowerManagerInternal.java
+++ b/core/java/android/os/PowerManagerInternal.java
@@ -71,6 +71,24 @@
}
/**
+ * Converts platform constants to proto enums.
+ */
+ public static int wakefulnessToProtoEnum(int wakefulness) {
+ switch (wakefulness) {
+ case WAKEFULNESS_ASLEEP:
+ return PowerManagerInternalProto.WAKEFULNESS_ASLEEP;
+ case WAKEFULNESS_AWAKE:
+ return PowerManagerInternalProto.WAKEFULNESS_AWAKE;
+ case WAKEFULNESS_DREAMING:
+ return PowerManagerInternalProto.WAKEFULNESS_DREAMING;
+ case WAKEFULNESS_DOZING:
+ return PowerManagerInternalProto.WAKEFULNESS_DOZING;
+ default:
+ return wakefulness;
+ }
+ }
+
+ /**
* Returns true if the wakefulness state represents an interactive state
* as defined by {@link android.os.PowerManager#isInteractive}.
*/
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index 7683880..96e2ae3 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -157,6 +157,12 @@
*/
public static final int INCIDENTD_UID = 1067;
+ /**
+ * Defines the UID/GID for the Secure Element service process.
+ * @hide
+ */
+ public static final int SE_UID = 1068;
+
/** {@hide} */
public static final int NOBODY_UID = 9999;
@@ -574,6 +580,14 @@
}
/**
+ * Returns whether the given uid belongs to a system core component or not.
+ * @hide
+ */
+ public static boolean isCoreUid(int uid) {
+ return UserHandle.isCore(uid);
+ }
+
+ /**
* Returns whether the given uid belongs to an application.
* @param uid A kernel uid.
* @return Whether the uid corresponds to an application sandbox running in
diff --git a/core/proto/android/os/batterymanager.proto b/core/java/android/os/StatsDimensionsValue.aidl
similarity index 61%
copy from core/proto/android/os/batterymanager.proto
copy to core/java/android/os/StatsDimensionsValue.aidl
index 669bf2d..81a14a4 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/core/java/android/os/StatsDimensionsValue.aidl
@@ -1,11 +1,11 @@
-/*
- * 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.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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,
@@ -14,16 +14,7 @@
* limitations under the License.
*/
-syntax = "proto2";
package android.os;
-option java_multiple_files = true;
-
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
-}
+/** @hide */
+parcelable StatsDimensionsValue cpp_header "android/os/StatsDimensionsValue.h";
\ No newline at end of file
diff --git a/core/java/android/os/StatsDimensionsValue.java b/core/java/android/os/StatsDimensionsValue.java
new file mode 100644
index 0000000..257cc52
--- /dev/null
+++ b/core/java/android/os/StatsDimensionsValue.java
@@ -0,0 +1,353 @@
+/*
+ * 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.os;
+
+import android.annotation.SystemApi;
+import android.util.Slog;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Container for statsd dimension value information, corresponding to a
+ * stats_log.proto's DimensionValue.
+ *
+ * This consists of a field (an int representing a statsd atom field)
+ * and a value (which may be one of a number of types).
+ *
+ * <p>
+ * Only a single value is held, and it is necessarily one of the following types:
+ * {@link String}, int, long, boolean, float,
+ * or tuple (i.e. {@link List} of {@code StatsDimensionsValue}).
+ *
+ * The type of value held can be retrieved using {@link #getValueType()}, which returns one of the
+ * following ints, depending on the type of value:
+ * <ul>
+ * <li>{@link #STRING_VALUE_TYPE}</li>
+ * <li>{@link #INT_VALUE_TYPE}</li>
+ * <li>{@link #LONG_VALUE_TYPE}</li>
+ * <li>{@link #BOOLEAN_VALUE_TYPE}</li>
+ * <li>{@link #FLOAT_VALUE_TYPE}</li>
+ * <li>{@link #TUPLE_VALUE_TYPE}</li>
+ * </ul>
+ * Alternatively, this can be determined using {@link #isValueType(int)} with one of these constants
+ * as a parameter.
+ * The value itself can be retrieved using the correct get...Value() function for its type.
+ *
+ * <p>
+ * The field is always an int, and always exists; it can be obtained using {@link #getField()}.
+ *
+ *
+ * @hide
+ */
+@SystemApi
+public final class StatsDimensionsValue implements Parcelable {
+ private static final String TAG = "StatsDimensionsValue";
+
+ // Values of the value type correspond to stats_log.proto's DimensionValue fields.
+ // Keep constants in sync with services/include/android/os/StatsDimensionsValue.h.
+ /** Indicates that this holds a String. */
+ public static final int STRING_VALUE_TYPE = 2;
+ /** Indicates that this holds an int. */
+ public static final int INT_VALUE_TYPE = 3;
+ /** Indicates that this holds a long. */
+ public static final int LONG_VALUE_TYPE = 4;
+ /** Indicates that this holds a boolean. */
+ public static final int BOOLEAN_VALUE_TYPE = 5;
+ /** Indicates that this holds a float. */
+ public static final int FLOAT_VALUE_TYPE = 6;
+ /** Indicates that this holds a List of StatsDimensionsValues. */
+ public static final int TUPLE_VALUE_TYPE = 7;
+
+ /** Value of a stats_log.proto DimensionsValue.field. */
+ private final int mField;
+
+ /** Type of stats_log.proto DimensionsValue.value, according to the VALUE_TYPEs above. */
+ private final int mValueType;
+
+ /**
+ * Value of a stats_log.proto DimensionsValue.value.
+ * String, Integer, Long, Boolean, Float, or StatsDimensionsValue[].
+ */
+ private final Object mValue; // immutable or array of immutables
+
+ /**
+ * Creates a {@code StatsDimensionValue} from a parcel.
+ *
+ * @hide
+ */
+ public StatsDimensionsValue(Parcel in) {
+ mField = in.readInt();
+ mValueType = in.readInt();
+ mValue = readValueFromParcel(mValueType, in);
+ }
+
+ /**
+ * Return the field, i.e. the tag of a statsd atom.
+ *
+ * @return the field
+ */
+ public int getField() {
+ return mField;
+ }
+
+ /**
+ * Retrieve the String held, if any.
+ *
+ * @return the {@link String} held if {@link #getValueType()} == {@link #STRING_VALUE_TYPE},
+ * null otherwise
+ */
+ public String getStringValue() {
+ try {
+ if (mValueType == STRING_VALUE_TYPE) return (String) mValue;
+ } catch (ClassCastException e) {
+ Slog.w(TAG, "Failed to successfully get value", e);
+ }
+ return null;
+ }
+
+ /**
+ * Retrieve the int held, if any.
+ *
+ * @return the int held if {@link #getValueType()} == {@link #INT_VALUE_TYPE}, 0 otherwise
+ */
+ public int getIntValue() {
+ try {
+ if (mValueType == INT_VALUE_TYPE) return (Integer) mValue;
+ } catch (ClassCastException e) {
+ Slog.w(TAG, "Failed to successfully get value", e);
+ }
+ return 0;
+ }
+
+ /**
+ * Retrieve the long held, if any.
+ *
+ * @return the long held if {@link #getValueType()} == {@link #LONG_VALUE_TYPE}, 0 otherwise
+ */
+ public long getLongValue() {
+ try {
+ if (mValueType == LONG_VALUE_TYPE) return (Long) mValue;
+ } catch (ClassCastException e) {
+ Slog.w(TAG, "Failed to successfully get value", e);
+ }
+ return 0;
+ }
+
+ /**
+ * Retrieve the boolean held, if any.
+ *
+ * @return the boolean held if {@link #getValueType()} == {@link #BOOLEAN_VALUE_TYPE},
+ * false otherwise
+ */
+ public boolean getBooleanValue() {
+ try {
+ if (mValueType == BOOLEAN_VALUE_TYPE) return (Boolean) mValue;
+ } catch (ClassCastException e) {
+ Slog.w(TAG, "Failed to successfully get value", e);
+ }
+ return false;
+ }
+
+ /**
+ * Retrieve the float held, if any.
+ *
+ * @return the float held if {@link #getValueType()} == {@link #FLOAT_VALUE_TYPE}, 0 otherwise
+ */
+ public float getFloatValue() {
+ try {
+ if (mValueType == FLOAT_VALUE_TYPE) return (Float) mValue;
+ } catch (ClassCastException e) {
+ Slog.w(TAG, "Failed to successfully get value", e);
+ }
+ return 0;
+ }
+
+ /**
+ * Retrieve the tuple, in the form of a {@link List} of {@link StatsDimensionsValue}, held,
+ * if any.
+ *
+ * @return the {@link List} of {@link StatsDimensionsValue} held
+ * if {@link #getValueType()} == {@link #TUPLE_VALUE_TYPE},
+ * null otherwise
+ */
+ public List<StatsDimensionsValue> getTupleValueList() {
+ if (mValueType != TUPLE_VALUE_TYPE) {
+ return null;
+ }
+ try {
+ StatsDimensionsValue[] orig = (StatsDimensionsValue[]) mValue;
+ List<StatsDimensionsValue> copy = new ArrayList<>(orig.length);
+ // Shallow copy since StatsDimensionsValue is immutable anyway
+ for (int i = 0; i < orig.length; i++) {
+ copy.add(orig[i]);
+ }
+ return copy;
+ } catch (ClassCastException e) {
+ Slog.w(TAG, "Failed to successfully get value", e);
+ return null;
+ }
+ }
+
+ /**
+ * Returns the constant representing the type of value stored, namely one of
+ * <ul>
+ * <li>{@link #STRING_VALUE_TYPE}</li>
+ * <li>{@link #INT_VALUE_TYPE}</li>
+ * <li>{@link #LONG_VALUE_TYPE}</li>
+ * <li>{@link #BOOLEAN_VALUE_TYPE}</li>
+ * <li>{@link #FLOAT_VALUE_TYPE}</li>
+ * <li>{@link #TUPLE_VALUE_TYPE}</li>
+ * </ul>
+ *
+ * @return the constant representing the type of value stored
+ */
+ public int getValueType() {
+ return mValueType;
+ }
+
+ /**
+ * Returns whether the type of value stored is equal to the given type.
+ *
+ * @param valueType int representing the type of value stored, as used in {@link #getValueType}
+ * @return true if {@link #getValueType()} is equal to {@code valueType}.
+ */
+ public boolean isValueType(int valueType) {
+ return mValueType == valueType;
+ }
+
+ /**
+ * Returns a String representing the information in this StatsDimensionValue.
+ * No guarantees are made about the format of this String.
+ *
+ * @return String representation
+ *
+ * @hide
+ */
+ // Follows the format of statsd's dimension.h toString.
+ public String toString() {
+ try {
+ StringBuilder sb = new StringBuilder();
+ sb.append(mField);
+ sb.append(":");
+ if (mValueType == TUPLE_VALUE_TYPE) {
+ sb.append("{");
+ StatsDimensionsValue[] sbvs = (StatsDimensionsValue[]) mValue;
+ for (int i = 0; i < sbvs.length; i++) {
+ sb.append(sbvs[i].toString());
+ sb.append("|");
+ }
+ sb.append("}");
+ } else {
+ sb.append(mValue.toString());
+ }
+ return sb.toString();
+ } catch (ClassCastException e) {
+ Slog.w(TAG, "Failed to successfully get value", e);
+ }
+ return "";
+ }
+
+ /**
+ * Parcelable Creator for StatsDimensionsValue.
+ */
+ public static final Parcelable.Creator<StatsDimensionsValue> CREATOR = new
+ Parcelable.Creator<StatsDimensionsValue>() {
+ public StatsDimensionsValue createFromParcel(Parcel in) {
+ return new StatsDimensionsValue(in);
+ }
+
+ public StatsDimensionsValue[] newArray(int size) {
+ return new StatsDimensionsValue[size];
+ }
+ };
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeInt(mField);
+ out.writeInt(mValueType);
+ writeValueToParcel(mValueType, mValue, out, flags);
+ }
+
+ /** Writes mValue to a parcel. Returns true if succeeds. */
+ private static boolean writeValueToParcel(int valueType, Object value, Parcel out, int flags) {
+ try {
+ switch (valueType) {
+ case STRING_VALUE_TYPE:
+ out.writeString((String) value);
+ return true;
+ case INT_VALUE_TYPE:
+ out.writeInt((Integer) value);
+ return true;
+ case LONG_VALUE_TYPE:
+ out.writeLong((Long) value);
+ return true;
+ case BOOLEAN_VALUE_TYPE:
+ out.writeBoolean((Boolean) value);
+ return true;
+ case FLOAT_VALUE_TYPE:
+ out.writeFloat((Float) value);
+ return true;
+ case TUPLE_VALUE_TYPE: {
+ StatsDimensionsValue[] values = (StatsDimensionsValue[]) value;
+ out.writeInt(values.length);
+ for (int i = 0; i < values.length; i++) {
+ values[i].writeToParcel(out, flags);
+ }
+ return true;
+ }
+ default:
+ Slog.w(TAG, "readValue of an impossible type " + valueType);
+ return false;
+ }
+ } catch (ClassCastException e) {
+ Slog.w(TAG, "writeValue cast failed", e);
+ return false;
+ }
+ }
+
+ /** Reads mValue from a parcel. */
+ private static Object readValueFromParcel(int valueType, Parcel parcel) {
+ switch (valueType) {
+ case STRING_VALUE_TYPE:
+ return parcel.readString();
+ case INT_VALUE_TYPE:
+ return parcel.readInt();
+ case LONG_VALUE_TYPE:
+ return parcel.readLong();
+ case BOOLEAN_VALUE_TYPE:
+ return parcel.readBoolean();
+ case FLOAT_VALUE_TYPE:
+ return parcel.readFloat();
+ case TUPLE_VALUE_TYPE: {
+ final int sz = parcel.readInt();
+ StatsDimensionsValue[] values = new StatsDimensionsValue[sz];
+ for (int i = 0; i < sz; i++) {
+ values[i] = new StatsDimensionsValue(parcel);
+ }
+ return values;
+ }
+ default:
+ Slog.w(TAG, "readValue of an impossible type " + valueType);
+ return null;
+ }
+ }
+}
diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java
index 6381b56..5be72bc 100644
--- a/core/java/android/os/UserHandle.java
+++ b/core/java/android/os/UserHandle.java
@@ -126,7 +126,10 @@
return getAppId(uid1) == getAppId(uid2);
}
- /** @hide */
+ /**
+ * Whether a UID is an "isolated" UID.
+ * @hide
+ */
public static boolean isIsolated(int uid) {
if (uid > 0) {
final int appId = getAppId(uid);
@@ -136,7 +139,11 @@
}
}
- /** @hide */
+ /**
+ * Whether a UID belongs to a regular app. *Note* "Not a regular app" does not mean
+ * "it's system", because of isolated UIDs. Use {@link #isCore} for that.
+ * @hide
+ */
public static boolean isApp(int uid) {
if (uid > 0) {
final int appId = getAppId(uid);
@@ -147,6 +154,19 @@
}
/**
+ * Whether a UID belongs to a system core component or not.
+ * @hide
+ */
+ public static boolean isCore(int uid) {
+ if (uid > 0) {
+ final int appId = getAppId(uid);
+ return appId < Process.FIRST_APPLICATION_UID;
+ } else {
+ return false;
+ }
+ }
+
+ /**
* Returns the user for a given uid.
* @param uid A uid for an application running in a particular user.
* @return A {@link UserHandle} for that user.
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index 13b5b5c9..b2b43cf 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -2259,12 +2259,6 @@
}
}
- /** @removed */
- @Deprecated
- public boolean trySetQuietModeEnabled(boolean enableQuietMode, @NonNull UserHandle userHandle) {
- return requestQuietModeEnabled(enableQuietMode, userHandle);
- }
-
/**
* Enables or disables quiet mode for a managed profile. If quiet mode is enabled, apps in a
* managed profile don't run, generate notifications, or consume data or battery.
diff --git a/core/java/android/os/VibrationEffect.java b/core/java/android/os/VibrationEffect.java
index da0ed54..b6f16a7 100644
--- a/core/java/android/os/VibrationEffect.java
+++ b/core/java/android/os/VibrationEffect.java
@@ -16,7 +16,9 @@
package android.os;
+import android.hardware.vibrator.V1_0.Constants.EffectStrength;
import android.hardware.vibrator.V1_1.Constants.Effect_1_1;
+import android.util.MathUtils;
import java.util.Arrays;
@@ -36,6 +38,12 @@
public static final int DEFAULT_AMPLITUDE = -1;
/**
+ * The maximum amplitude value
+ * @hide
+ */
+ public static final int MAX_AMPLITUDE = 255;
+
+ /**
* A click effect.
*
* @see #get(int)
@@ -198,38 +206,75 @@
/** @hide */
public abstract void validate();
+ /**
+ * Gets the estimated duration of the vibration in milliseconds.
+ *
+ * For effects without a defined end (e.g. a Waveform with a non-negative repeat index), this
+ * returns Long.MAX_VALUE. For effects with an unknown duration (e.g. Prebaked effects where
+ * the length is device and potentially run-time dependent), this returns -1.
+ *
+ * @hide
+ */
+ public abstract long getDuration();
+
+ /**
+ * Scale the amplitude with the given constraints.
+ *
+ * This assumes that the previous value was in the range [0, MAX_AMPLITUDE]
+ * @hide
+ */
+ protected static int scale(int amplitude, float gamma, int maxAmplitude) {
+ float val = MathUtils.pow(amplitude / (float) MAX_AMPLITUDE, gamma);
+ return (int) (val * maxAmplitude);
+ }
+
/** @hide */
public static class OneShot extends VibrationEffect implements Parcelable {
- private long mTiming;
- private int mAmplitude;
+ private final long mDuration;
+ private final int mAmplitude;
public OneShot(Parcel in) {
- this(in.readLong(), in.readInt());
+ mDuration = in.readLong();
+ mAmplitude = in.readInt();
}
public OneShot(long milliseconds, int amplitude) {
- mTiming = milliseconds;
+ mDuration = milliseconds;
mAmplitude = amplitude;
}
- public long getTiming() {
- return mTiming;
+ @Override
+ public long getDuration() {
+ return mDuration;
}
public int getAmplitude() {
return mAmplitude;
}
+ /**
+ * Scale the amplitude of this effect.
+ *
+ * @param gamma the gamma adjustment to apply
+ * @param maxAmplitude the new maximum amplitude of the effect
+ *
+ * @return A {@link OneShot} effect with the same timing but scaled amplitude.
+ */
+ public VibrationEffect scale(float gamma, int maxAmplitude) {
+ int newAmplitude = scale(mAmplitude, gamma, maxAmplitude);
+ return new OneShot(mDuration, newAmplitude);
+ }
+
@Override
public void validate() {
if (mAmplitude < -1 || mAmplitude == 0 || mAmplitude > 255) {
throw new IllegalArgumentException(
- "amplitude must either be DEFAULT_AMPLITUDE, " +
- "or between 1 and 255 inclusive (amplitude=" + mAmplitude + ")");
+ "amplitude must either be DEFAULT_AMPLITUDE, "
+ + "or between 1 and 255 inclusive (amplitude=" + mAmplitude + ")");
}
- if (mTiming <= 0) {
+ if (mDuration <= 0) {
throw new IllegalArgumentException(
- "timing must be positive (timing=" + mTiming + ")");
+ "duration must be positive (duration=" + mDuration + ")");
}
}
@@ -239,26 +284,26 @@
return false;
}
VibrationEffect.OneShot other = (VibrationEffect.OneShot) o;
- return other.mTiming == mTiming && other.mAmplitude == mAmplitude;
+ return other.mDuration == mDuration && other.mAmplitude == mAmplitude;
}
@Override
public int hashCode() {
int result = 17;
- result = 37 * (int) mTiming;
- result = 37 * mAmplitude;
+ result += 37 * (int) mDuration;
+ result += 37 * mAmplitude;
return result;
}
@Override
public String toString() {
- return "OneShot{mTiming=" + mTiming +", mAmplitude=" + mAmplitude + "}";
+ return "OneShot{mDuration=" + mDuration + ", mAmplitude=" + mAmplitude + "}";
}
@Override
public void writeToParcel(Parcel out, int flags) {
out.writeInt(PARCEL_TOKEN_ONE_SHOT);
- out.writeLong(mTiming);
+ out.writeLong(mDuration);
out.writeInt(mAmplitude);
}
@@ -279,9 +324,9 @@
/** @hide */
public static class Waveform extends VibrationEffect implements Parcelable {
- private long[] mTimings;
- private int[] mAmplitudes;
- private int mRepeat;
+ private final long[] mTimings;
+ private final int[] mAmplitudes;
+ private final int mRepeat;
public Waveform(Parcel in) {
this(in.createLongArray(), in.createIntArray(), in.readInt());
@@ -308,34 +353,68 @@
}
@Override
+ public long getDuration() {
+ if (mRepeat >= 0) {
+ return Long.MAX_VALUE;
+ }
+ long duration = 0;
+ for (long d : mTimings) {
+ duration += d;
+ }
+ return duration;
+ }
+
+ /**
+ * Scale the Waveform with the given gamma and new max amplitude.
+ *
+ * @param gamma the gamma adjustment to apply
+ * @param maxAmplitude the new maximum amplitude of the effect
+ *
+ * @return A {@link Waveform} effect with the same timings and repeat index
+ * but scaled amplitude.
+ */
+ public VibrationEffect scale(float gamma, int maxAmplitude) {
+ if (gamma == 1.0f && maxAmplitude == MAX_AMPLITUDE) {
+ // Just return a copy of the original if there's no scaling to be done.
+ return new Waveform(mTimings, mAmplitudes, mRepeat);
+ }
+
+ int[] scaledAmplitudes = Arrays.copyOf(mAmplitudes, mAmplitudes.length);
+ for (int i = 0; i < scaledAmplitudes.length; i++) {
+ scaledAmplitudes[i] = scale(scaledAmplitudes[i], gamma, maxAmplitude);
+ }
+ return new Waveform(mTimings, scaledAmplitudes, mRepeat);
+ }
+
+ @Override
public void validate() {
if (mTimings.length != mAmplitudes.length) {
throw new IllegalArgumentException(
- "timing and amplitude arrays must be of equal length" +
- " (timings.length=" + mTimings.length +
- ", amplitudes.length=" + mAmplitudes.length + ")");
+ "timing and amplitude arrays must be of equal length"
+ + " (timings.length=" + mTimings.length
+ + ", amplitudes.length=" + mAmplitudes.length + ")");
}
if (!hasNonZeroEntry(mTimings)) {
- throw new IllegalArgumentException("at least one timing must be non-zero" +
- " (timings=" + Arrays.toString(mTimings) + ")");
+ throw new IllegalArgumentException("at least one timing must be non-zero"
+ + " (timings=" + Arrays.toString(mTimings) + ")");
}
for (long timing : mTimings) {
if (timing < 0) {
- throw new IllegalArgumentException("timings must all be >= 0" +
- " (timings=" + Arrays.toString(mTimings) + ")");
+ throw new IllegalArgumentException("timings must all be >= 0"
+ + " (timings=" + Arrays.toString(mTimings) + ")");
}
}
for (int amplitude : mAmplitudes) {
if (amplitude < -1 || amplitude > 255) {
throw new IllegalArgumentException(
- "amplitudes must all be DEFAULT_AMPLITUDE or between 0 and 255" +
- " (amplitudes=" + Arrays.toString(mAmplitudes) + ")");
+ "amplitudes must all be DEFAULT_AMPLITUDE or between 0 and 255"
+ + " (amplitudes=" + Arrays.toString(mAmplitudes) + ")");
}
}
if (mRepeat < -1 || mRepeat >= mTimings.length) {
throw new IllegalArgumentException(
- "repeat index must be within the bounds of the timings array" +
- " (timings.length=" + mTimings.length + ", index=" + mRepeat +")");
+ "repeat index must be within the bounds of the timings array"
+ + " (timings.length=" + mTimings.length + ", index=" + mRepeat + ")");
}
}
@@ -345,26 +424,26 @@
return false;
}
VibrationEffect.Waveform other = (VibrationEffect.Waveform) o;
- return Arrays.equals(mTimings, other.mTimings) &&
- Arrays.equals(mAmplitudes, other.mAmplitudes) &&
- mRepeat == other.mRepeat;
+ return Arrays.equals(mTimings, other.mTimings)
+ && Arrays.equals(mAmplitudes, other.mAmplitudes)
+ && mRepeat == other.mRepeat;
}
@Override
public int hashCode() {
int result = 17;
- result = 37 * Arrays.hashCode(mTimings);
- result = 37 * Arrays.hashCode(mAmplitudes);
- result = 37 * mRepeat;
+ result += 37 * Arrays.hashCode(mTimings);
+ result += 37 * Arrays.hashCode(mAmplitudes);
+ result += 37 * mRepeat;
return result;
}
@Override
public String toString() {
- return "Waveform{mTimings=" + Arrays.toString(mTimings) +
- ", mAmplitudes=" + Arrays.toString(mAmplitudes) +
- ", mRepeat=" + mRepeat +
- "}";
+ return "Waveform{mTimings=" + Arrays.toString(mTimings)
+ + ", mAmplitudes=" + Arrays.toString(mAmplitudes)
+ + ", mRepeat=" + mRepeat
+ + "}";
}
@Override
@@ -402,16 +481,20 @@
/** @hide */
public static class Prebaked extends VibrationEffect implements Parcelable {
- private int mEffectId;
- private boolean mFallback;
+ private final int mEffectId;
+ private final boolean mFallback;
+
+ private int mEffectStrength;
public Prebaked(Parcel in) {
this(in.readInt(), in.readByte() != 0);
+ mEffectStrength = in.readInt();
}
public Prebaked(int effectId, boolean fallback) {
mEffectId = effectId;
mFallback = fallback;
+ mEffectStrength = EffectStrength.MEDIUM;
}
public int getId() {
@@ -427,6 +510,39 @@
}
@Override
+ public long getDuration() {
+ return -1;
+ }
+
+ /**
+ * Set the effect strength of the prebaked effect.
+ */
+ public void setEffectStrength(int strength) {
+ if (!isValidEffectStrength(strength)) {
+ throw new IllegalArgumentException("Invalid effect strength: " + strength);
+ }
+ mEffectStrength = strength;
+ }
+
+ /**
+ * Set the effect strength.
+ */
+ public int getEffectStrength() {
+ return mEffectStrength;
+ }
+
+ private static boolean isValidEffectStrength(int strength) {
+ switch (strength) {
+ case EffectStrength.LIGHT:
+ case EffectStrength.MEDIUM:
+ case EffectStrength.STRONG:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ @Override
public void validate() {
switch (mEffectId) {
case EFFECT_CLICK:
@@ -437,6 +553,10 @@
throw new IllegalArgumentException(
"Unknown prebaked effect type (value=" + mEffectId + ")");
}
+ if (!isValidEffectStrength(mEffectStrength)) {
+ throw new IllegalArgumentException(
+ "Unknown prebaked effect strength (value=" + mEffectStrength + ")");
+ }
}
@Override
@@ -445,17 +565,25 @@
return false;
}
VibrationEffect.Prebaked other = (VibrationEffect.Prebaked) o;
- return mEffectId == other.mEffectId && mFallback == other.mFallback;
+ return mEffectId == other.mEffectId
+ && mFallback == other.mFallback
+ && mEffectStrength == other.mEffectStrength;
}
@Override
public int hashCode() {
- return mEffectId;
+ int result = 17;
+ result += 37 * mEffectId;
+ result += 37 * mEffectStrength;
+ return result;
}
@Override
public String toString() {
- return "Prebaked{mEffectId=" + mEffectId + ", mFallback=" + mFallback + "}";
+ return "Prebaked{mEffectId=" + mEffectId
+ + ", mEffectStrength=" + mEffectStrength
+ + ", mFallback=" + mFallback
+ + "}";
}
@@ -464,6 +592,7 @@
out.writeInt(PARCEL_TOKEN_EFFECT);
out.writeInt(mEffectId);
out.writeByte((byte) (mFallback ? 1 : 0));
+ out.writeInt(mEffectStrength);
}
public static final Parcelable.Creator<Prebaked> CREATOR =
diff --git a/core/java/android/os/Vibrator.java b/core/java/android/os/Vibrator.java
index 8078fb8..f1f6f41 100644
--- a/core/java/android/os/Vibrator.java
+++ b/core/java/android/os/Vibrator.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.IntDef;
import android.annotation.RequiresPermission;
import android.annotation.SystemService;
import android.app.ActivityThread;
@@ -23,6 +24,9 @@
import android.media.AudioAttributes;
import android.util.Log;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
/**
* Class that operates the vibrator on the device.
* <p>
@@ -33,6 +37,40 @@
public abstract class Vibrator {
private static final String TAG = "Vibrator";
+ /**
+ * Vibration intensity: no vibrations.
+ * @hide
+ */
+ public static final int VIBRATION_INTENSITY_OFF = 0;
+
+ /**
+ * Vibration intensity: low.
+ * @hide
+ */
+ public static final int VIBRATION_INTENSITY_LOW = 1;
+
+ /**
+ * Vibration intensity: medium.
+ * @hide
+ */
+ public static final int VIBRATION_INTENSITY_MEDIUM = 2;
+
+ /**
+ * Vibration intensity: high.
+ * @hide
+ */
+ public static final int VIBRATION_INTENSITY_HIGH = 3;
+
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = { "VIBRATION_INTENSITY_" }, value = {
+ VIBRATION_INTENSITY_OFF,
+ VIBRATION_INTENSITY_LOW,
+ VIBRATION_INTENSITY_MEDIUM,
+ VIBRATION_INTENSITY_HIGH
+ })
+ public @interface VibrationIntensity{}
+
private final String mPackageName;
/**
@@ -50,6 +88,22 @@
}
/**
+ * Get the default vibration intensity for haptic feedback.
+ * @hide
+ */
+ public int getDefaultHapticFeedbackIntensity() {
+ return VIBRATION_INTENSITY_MEDIUM;
+ }
+
+ /**
+ * Get the default vibration intensity for notifications and ringtones.
+ * @hide
+ */
+ public int getDefaultNotificationVibrationIntensity() {
+ return VIBRATION_INTENSITY_HIGH;
+ }
+
+ /**
* Check whether the hardware has a vibrator.
*
* @return True if the hardware has a vibrator, else false.
diff --git a/core/java/android/os/WorkSource.java b/core/java/android/os/WorkSource.java
index d0c2870..17d83db 100644
--- a/core/java/android/os/WorkSource.java
+++ b/core/java/android/os/WorkSource.java
@@ -1,10 +1,16 @@
package android.os;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.content.Context;
import android.os.WorkSourceProto;
+import android.provider.Settings;
+import android.provider.Settings.Global;
import android.util.Log;
import android.util.proto.ProtoOutputStream;
+import com.android.internal.annotations.VisibleForTesting;
+
import java.util.ArrayList;
import java.util.Arrays;
@@ -109,6 +115,17 @@
}
}
+ /**
+ * Whether system services should create {@code WorkChains} (wherever possible) in the place
+ * of flat UID lists.
+ *
+ * @hide
+ */
+ public static boolean isChainedBatteryAttributionEnabled(Context context) {
+ return Settings.Global.getInt(context.getContentResolver(),
+ Global.CHAINED_BATTERY_ATTRIBUTION_ENABLED, 0) == 1;
+ }
+
/** @hide */
public int size() {
return mNum;
@@ -450,6 +467,7 @@
*
* @hide
*/
+ @SystemApi
public WorkChain createWorkChain() {
if (mChains == null) {
mChains = new ArrayList<>(4);
@@ -479,6 +497,29 @@
return mChains;
}
+ /**
+ * DO NOT USE: Hacky API provided solely for {@code GnssLocationProvider}. See
+ * {@code setReturningDiffs} as well.
+ *
+ * @hide
+ */
+ public void transferWorkChains(WorkSource other) {
+ if (mChains != null) {
+ mChains.clear();
+ }
+
+ if (other.mChains == null || other.mChains.isEmpty()) {
+ return;
+ }
+
+ if (mChains == null) {
+ mChains = new ArrayList<>(4);
+ }
+
+ mChains.addAll(other.mChains);
+ other.mChains.clear();
+ }
+
private boolean removeUids(WorkSource other) {
int N1 = mNum;
final int[] uids1 = mUids;
@@ -817,7 +858,8 @@
*
* @hide
*/
- public static class WorkChain implements Parcelable {
+ @SystemApi
+ public static final class WorkChain implements Parcelable {
private int mSize;
private int[] mUids;
private String[] mTags;
@@ -829,7 +871,8 @@
mTags = new String[4];
}
- // @VisibleForTesting
+ /** @hide */
+ @VisibleForTesting
public WorkChain(WorkChain other) {
mSize = other.mSize;
mUids = other.mUids.clone();
@@ -866,19 +909,32 @@
return mUids[0];
}
+ /**
+ * Return the tag associated with the attribution UID. See (@link #getAttributionUid}.
+ */
+ public String getAttributionTag() {
+ return mTags[0];
+ }
+
// TODO: The following three trivial getters are purely for testing and will be removed
// once we have higher level logic in place, e.g for serializing this WorkChain to a proto,
// diffing it etc.
- //
- // @VisibleForTesting
+
+
+ /** @hide */
+ @VisibleForTesting
public int[] getUids() {
return mUids;
}
- // @VisibleForTesting
+
+ /** @hide */
+ @VisibleForTesting
public String[] getTags() {
return mTags;
}
- // @VisibleForTesting
+
+ /** @hide */
+ @VisibleForTesting
public int getSize() {
return mSize;
}
diff --git a/core/java/android/preference/SeekBarVolumizer.java b/core/java/android/preference/SeekBarVolumizer.java
index 3d2e1d1..d774281 100644
--- a/core/java/android/preference/SeekBarVolumizer.java
+++ b/core/java/android/preference/SeekBarVolumizer.java
@@ -34,6 +34,7 @@
import android.provider.Settings;
import android.provider.Settings.Global;
import android.provider.Settings.System;
+import android.service.notification.ZenModeConfig;
import android.util.Log;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
@@ -87,10 +88,22 @@
private static final int MSG_INIT_SAMPLE = 3;
private static final int CHECK_RINGTONE_PLAYBACK_DELAY_MS = 1000;
+ private NotificationManager.Policy mNotificationPolicy;
+ private boolean mAllowAlarms;
+ private boolean mAllowMediaSystem;
+ private boolean mAllowRinger;
+
public SeekBarVolumizer(Context context, int streamType, Uri defaultUri, Callback callback) {
mContext = context;
mAudioManager = context.getSystemService(AudioManager.class);
mNotificationManager = context.getSystemService(NotificationManager.class);
+ mNotificationPolicy = mNotificationManager.getNotificationPolicy();
+ mAllowAlarms = (mNotificationPolicy.priorityCategories & NotificationManager.Policy
+ .PRIORITY_CATEGORY_ALARMS) != 0;
+ mAllowMediaSystem = (mNotificationPolicy.priorityCategories & NotificationManager.Policy
+ .PRIORITY_CATEGORY_MEDIA_SYSTEM_OTHER) != 0;
+ mAllowRinger = !ZenModeConfig.areAllPriorityOnlyNotificationZenSoundsMuted(
+ mNotificationPolicy);
mStreamType = streamType;
mAffectedByRingerMode = mAudioManager.isStreamAffectedByRingerMode(mStreamType);
mNotificationOrRing = isNotificationOrRing(mStreamType);
@@ -122,6 +135,14 @@
return stream == AudioManager.STREAM_RING || stream == AudioManager.STREAM_NOTIFICATION;
}
+ private static boolean isAlarmsStream(int stream) {
+ return stream == AudioManager.STREAM_ALARM;
+ }
+
+ private static boolean isMediaOrSystemStream(int stream) {
+ return stream == AudioManager.STREAM_MUSIC || stream == AudioManager.STREAM_SYSTEM;
+ }
+
public void setSeekBar(SeekBar seekBar) {
if (mSeekBar != null) {
mSeekBar.setOnSeekBarChangeListener(null);
@@ -135,7 +156,11 @@
private boolean isZenMuted() {
return mNotificationOrRing && mZenMode == Global.ZEN_MODE_ALARMS
- || mZenMode == Global.ZEN_MODE_NO_INTERRUPTIONS;
+ || mZenMode == Global.ZEN_MODE_NO_INTERRUPTIONS
+ || (mZenMode == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS
+ && ((!mAllowAlarms && isAlarmsStream(mStreamType))
+ || (!mAllowMediaSystem && isMediaOrSystemStream(mStreamType))
+ || (!mAllowRinger && isNotificationOrRing(mStreamType))));
}
protected void updateSeekBar() {
@@ -396,6 +421,7 @@
final IntentFilter filter = new IntentFilter(AudioManager.VOLUME_CHANGED_ACTION);
filter.addAction(AudioManager.INTERNAL_RINGER_MODE_CHANGED_ACTION);
filter.addAction(NotificationManager.ACTION_INTERRUPTION_FILTER_CHANGED);
+ filter.addAction(NotificationManager.ACTION_NOTIFICATION_POLICY_CHANGED);
filter.addAction(AudioManager.STREAM_DEVICES_CHANGED_ACTION);
mContext.registerReceiver(this, filter);
} else {
@@ -424,6 +450,15 @@
} else if (NotificationManager.ACTION_INTERRUPTION_FILTER_CHANGED.equals(action)) {
mZenMode = mNotificationManager.getZenMode();
updateSlider();
+ } else if (NotificationManager.ACTION_NOTIFICATION_POLICY_CHANGED.equals(action)) {
+ mNotificationPolicy = mNotificationManager.getNotificationPolicy();
+ mAllowAlarms = (mNotificationPolicy.priorityCategories & NotificationManager.Policy
+ .PRIORITY_CATEGORY_ALARMS) != 0;
+ mAllowMediaSystem = (mNotificationPolicy.priorityCategories
+ & NotificationManager.Policy.PRIORITY_CATEGORY_MEDIA_SYSTEM_OTHER) != 0;
+ mAllowRinger = !ZenModeConfig.areAllPriorityOnlyNotificationZenSoundsMuted(
+ mNotificationPolicy);
+ updateSlider();
}
}
diff --git a/core/java/android/provider/DocumentsContract.java b/core/java/android/provider/DocumentsContract.java
index e7fd59e..d96316a 100644
--- a/core/java/android/provider/DocumentsContract.java
+++ b/core/java/android/provider/DocumentsContract.java
@@ -738,7 +738,9 @@
private static final String PATH_DOCUMENT = "document";
private static final String PATH_CHILDREN = "children";
private static final String PATH_SEARCH = "search";
- private static final String PATH_TREE = "tree";
+ // TODO(b/72055774): make private again once ScopedAccessProvider is refactored
+ /** {@hide} */
+ public static final String PATH_TREE = "tree";
private static final String PARAM_QUERY = "query";
private static final String PARAM_MANAGE = "manage";
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 1c41979..2440b48 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1479,6 +1479,21 @@
public static final String ACTION_REQUEST_SET_AUTOFILL_SERVICE =
"android.settings.REQUEST_SET_AUTOFILL_SERVICE";
+ /**
+ * Activity Action: Show screen for controlling which apps have access on volume directories.
+ * <p>
+ * Input: Nothing.
+ * <p>
+ * Output: Nothing.
+ * <p>
+ * Applications typically use this action to ask the user to revert the "Do not ask again"
+ * status of directory access requests made by
+ * {@link android.os.storage.StorageVolume#createAccessIntent(String)}.
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_STORAGE_VOLUME_ACCESS_SETTINGS =
+ "android.settings.STORAGE_VOLUME_ACCESS_SETTINGS";
+
// End of Intent actions for Settings
/**
@@ -3160,6 +3175,43 @@
private static final Validator VIBRATE_INPUT_DEVICES_VALIDATOR = BOOLEAN_VALIDATOR;
/**
+ * The intensity of notification vibrations, if configurable.
+ *
+ * Not all devices are capable of changing their vibration intensity; on these devices
+ * there will likely be no difference between the various vibration intensities except for
+ * intensity 0 (off) and the rest.
+ *
+ * <b>Values:</b><br/>
+ * 0 - Vibration is disabled<br/>
+ * 1 - Weak vibrations<br/>
+ * 2 - Medium vibrations<br/>
+ * 3 - Strong vibrations
+ * @hide
+ */
+ public static final String NOTIFICATION_VIBRATION_INTENSITY =
+ "notification_vibration_intensity";
+
+ /**
+ * The intensity of haptic feedback vibrations, if configurable.
+ *
+ * Not all devices are capable of changing their feedback intensity; on these devices
+ * there will likely be no difference between the various vibration intensities except for
+ * intensity 0 (off) and the rest.
+ *
+ * <b>Values:</b><br/>
+ * 0 - Vibration is disabled<br/>
+ * 1 - Weak vibrations<br/>
+ * 2 - Medium vibrations<br/>
+ * 3 - Strong vibrations
+ * @hide
+ */
+ public static final String HAPTIC_FEEDBACK_INTENSITY =
+ "haptic_feedback_intensity";
+
+ private static final Validator VIBRATION_INTENSITY_VALIDATOR =
+ new SettingsValidators.InclusiveIntegerRangeValidator(0, 3);
+
+ /**
* Ringer volume. This is used internally, changing this value will not
* change the volume. See AudioManager.
*
@@ -3980,7 +4032,9 @@
LOCK_TO_APP_ENABLED,
NOTIFICATION_SOUND,
ACCELEROMETER_ROTATION,
- SHOW_BATTERY_PERCENT
+ SHOW_BATTERY_PERCENT,
+ NOTIFICATION_VIBRATION_INTENSITY,
+ HAPTIC_FEEDBACK_INTENSITY,
};
/**
@@ -4121,6 +4175,8 @@
VALIDATORS.put(MODE_RINGER_STREAMS_AFFECTED, MODE_RINGER_STREAMS_AFFECTED_VALIDATOR);
VALIDATORS.put(MUTE_STREAMS_AFFECTED, MUTE_STREAMS_AFFECTED_VALIDATOR);
VALIDATORS.put(VIBRATE_ON, VIBRATE_ON_VALIDATOR);
+ VALIDATORS.put(NOTIFICATION_VIBRATION_INTENSITY, VIBRATION_INTENSITY_VALIDATOR);
+ VALIDATORS.put(HAPTIC_FEEDBACK_INTENSITY, VIBRATION_INTENSITY_VALIDATOR);
VALIDATORS.put(RINGTONE, RINGTONE_VALIDATOR);
VALIDATORS.put(NOTIFICATION_SOUND, NOTIFICATION_SOUND_VALIDATOR);
VALIDATORS.put(ALARM_ALERT, ALARM_ALERT_VALIDATOR);
@@ -5495,6 +5551,27 @@
public static final String LOCATION_MODE = "location_mode";
/**
+ * The App or module that changes the location mode.
+ * @hide
+ */
+ public static final String LOCATION_CHANGER = "location_changer";
+ /**
+ * The location changer is unknown or unable to detect.
+ * @hide
+ */
+ public static final int LOCATION_CHANGER_UNKNOWN = 0;
+ /**
+ * Location settings in system settings.
+ * @hide
+ */
+ public static final int LOCATION_CHANGER_SYSTEM_SETTINGS = 1;
+ /**
+ * The location icon in drop down notification drawer.
+ * @hide
+ */
+ public static final int LOCATION_CHANGER_QUICK_SETTINGS = 2;
+
+ /**
* Location access disabled.
*
* @deprecated To check location status, use {@link LocationManager#isLocationEnabled()}. To
@@ -7587,6 +7664,13 @@
public static final String BACKUP_MANAGER_CONSTANTS = "backup_manager_constants";
/**
+ * Flag to set if the system should predictively attempt to re-enable Bluetooth while
+ * the user is driving.
+ * @hide
+ */
+ public static final String BLUETOOTH_ON_WHILE_DRIVING = "bluetooth_on_while_driving";
+
+ /**
* This are the settings to be backed up.
*
* NOTE: Settings are backed up and restored in the order they appear
@@ -7859,6 +7943,7 @@
CLONE_TO_MANAGED_PROFILE.add(DEFAULT_INPUT_METHOD);
CLONE_TO_MANAGED_PROFILE.add(ENABLED_ACCESSIBILITY_SERVICES);
CLONE_TO_MANAGED_PROFILE.add(ENABLED_INPUT_METHODS);
+ CLONE_TO_MANAGED_PROFILE.add(LOCATION_CHANGER);
CLONE_TO_MANAGED_PROFILE.add(LOCATION_MODE);
CLONE_TO_MANAGED_PROFILE.add(LOCATION_PROVIDERS_ALLOWED);
CLONE_TO_MANAGED_PROFILE.add(SELECTED_INPUT_METHOD_SUBTYPE);
@@ -9133,6 +9218,22 @@
BOOLEAN_VALIDATOR;
/**
+ * Whether to notify the user of carrier networks.
+ * <p>
+ * If not connected and the scan results have a carrier network, we will
+ * put this notification up. If we attempt to connect to a network or
+ * the carrier network(s) disappear, we remove the notification. When we
+ * show the notification, we will not show it again for
+ * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} time.
+ * @hide
+ */
+ public static final String WIFI_CARRIER_NETWORKS_AVAILABLE_NOTIFICATION_ON =
+ "wifi_carrier_networks_available_notification_on";
+
+ private static final Validator WIFI_CARRIER_NETWORKS_AVAILABLE_NOTIFICATION_ON_VALIDATOR =
+ BOOLEAN_VALIDATOR;
+
+ /**
* {@hide}
*/
public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON =
@@ -9313,13 +9414,52 @@
public static final String RECOMMENDED_NETWORK_EVALUATOR_CACHE_EXPIRY_MS =
"recommended_network_evaluator_cache_expiry_ms";
- /**
+ /**
* Settings to allow BLE scans to be enabled even when Bluetooth is turned off for
* connectivity.
* @hide
*/
- public static final String BLE_SCAN_ALWAYS_AVAILABLE =
- "ble_scan_always_enabled";
+ public static final String BLE_SCAN_ALWAYS_AVAILABLE = "ble_scan_always_enabled";
+
+ /**
+ * The length in milliseconds of a BLE scan window in a low-power scan mode.
+ * @hide
+ */
+ public static final String BLE_SCAN_LOW_POWER_WINDOW_MS = "ble_scan_low_power_window_ms";
+
+ /**
+ * The length in milliseconds of a BLE scan window in a balanced scan mode.
+ * @hide
+ */
+ public static final String BLE_SCAN_BALANCED_WINDOW_MS = "ble_scan_balanced_window_ms";
+
+ /**
+ * The length in milliseconds of a BLE scan window in a low-latency scan mode.
+ * @hide
+ */
+ public static final String BLE_SCAN_LOW_LATENCY_WINDOW_MS =
+ "ble_scan_low_latency_window_ms";
+
+ /**
+ * The length in milliseconds of a BLE scan interval in a low-power scan mode.
+ * @hide
+ */
+ public static final String BLE_SCAN_LOW_POWER_INTERVAL_MS =
+ "ble_scan_low_power_interval_ms";
+
+ /**
+ * The length in milliseconds of a BLE scan interval in a balanced scan mode.
+ * @hide
+ */
+ public static final String BLE_SCAN_BALANCED_INTERVAL_MS =
+ "ble_scan_balanced_interval_ms";
+
+ /**
+ * The length in milliseconds of a BLE scan interval in a low-latency scan mode.
+ * @hide
+ */
+ public static final String BLE_SCAN_LOW_LATENCY_INTERVAL_MS =
+ "ble_scan_low_latency_interval_ms";
/**
* Used to save the Wifi_ON state prior to tethering.
@@ -10363,6 +10503,15 @@
= "forced_app_standby_for_small_battery_enabled";
/**
+ * Whether or not to enable Time Only Mode for watch type devices.
+ * Type: int (0 for false, 1 for true)
+ * Default: 0
+ * @hide
+ */
+ public static final String TIME_ONLY_MODE_ENABLED
+ = "time_only_mode_enabled";
+
+ /**
* Whether or not Network Watchlist feature is enabled.
* Type: int (0 for false, 1 for true)
* Default: 0
@@ -11159,10 +11308,30 @@
*
* @hide
*/
+ @TestApi
public static final String LOCATION_GLOBAL_KILL_SWITCH =
"location_global_kill_switch";
/**
+ * If set to 1, SettingsProvider's restoreAnyVersion="true" attribute will be ignored
+ * and restoring to lower version of platform API will be skipped.
+ *
+ * @hide
+ */
+ public static final String OVERRIDE_SETTINGS_PROVIDER_RESTORE_ANY_VERSION =
+ "override_settings_provider_restore_any_version";
+ /**
+ * Flag to toggle whether system services report attribution chains when they attribute
+ * battery use via a {@code WorkSource}.
+ *
+ * Type: int (0 to disable, 1 to enable)
+ *
+ * @hide
+ */
+ public static final String CHAINED_BATTERY_ATTRIBUTION_ENABLED =
+ "chained_battery_attribution_enabled";
+
+ /**
* Settings to backup. This is here so that it's in the same place as the settings
* keys and easy to update.
*
@@ -11190,6 +11359,7 @@
NETWORK_RECOMMENDATIONS_ENABLED,
WIFI_WAKEUP_ENABLED,
WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
+ WIFI_CARRIER_NETWORKS_AVAILABLE_NOTIFICATION_ON,
USE_OPEN_WIFI_PACKAGE,
WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED,
EMERGENCY_TONE,
@@ -11236,6 +11406,8 @@
VALIDATORS.put(PRIVATE_DNS_MODE, PRIVATE_DNS_MODE_VALIDATOR);
VALIDATORS.put(PRIVATE_DNS_SPECIFIER, PRIVATE_DNS_SPECIFIER_VALIDATOR);
VALIDATORS.put(SOFT_AP_TIMEOUT_ENABLED, SOFT_AP_TIMEOUT_ENABLED_VALIDATOR);
+ VALIDATORS.put(WIFI_CARRIER_NETWORKS_AVAILABLE_NOTIFICATION_ON,
+ WIFI_CARRIER_NETWORKS_AVAILABLE_NOTIFICATION_ON_VALIDATOR);
}
/**
@@ -11881,6 +12053,19 @@
* @hide
*/
public static final String SHOW_FIRST_CRASH_DIALOG = "show_first_crash_dialog";
+
+ /**
+ * If nonzero, crash dialogs will show an option to restart the app.
+ * @hide
+ */
+ public static final String SHOW_RESTART_IN_CRASH_DIALOG = "show_restart_in_crash_dialog";
+
+ /**
+ * If nonzero, crash dialogs will show an option to mute all future crash dialogs for
+ * this app.
+ * @hide
+ */
+ public static final String SHOW_MUTE_IN_CRASH_DIALOG = "show_mute_in_crash_dialog";
}
/**
diff --git a/core/java/android/provider/SettingsSlicesContract.java b/core/java/android/provider/SettingsSlicesContract.java
new file mode 100644
index 0000000..f79d852
--- /dev/null
+++ b/core/java/android/provider/SettingsSlicesContract.java
@@ -0,0 +1,106 @@
+/*
+ * 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.provider;
+
+import android.content.ContentResolver;
+import android.net.Uri;
+
+/**
+ * Provides a contract for platform-supported Settings {@link android.app.slice.Slice Slices}.
+ * <p>
+ * Contains definitions for the supported {@link android.app.slice.SliceProvider SliceProvider}
+ * authority, authority {@link Uri}, and key constants.
+ * <p>
+ * {@link android.app.slice.Slice Slice} presenters interested in learning meta-data about the
+ * {@link android.app.slice.Slice Slice} should read the {@link android.app.slice.Slice Slice}
+ * object at runtime.
+ * <p>
+ * {@link Uri} builder example:
+ * <pre>
+ * Uri wifiActionUri = AUTHORITY_URI
+ * .buildUpon()
+ * .appendPath(PATH_SETTING_ACTION)
+ * .appendPath(KEY_WIFI)
+ * .build();
+ * Uri bluetoothIntentUri = AUTHORITY_URI
+ * .buildUpon()
+ * .appendPath(PATH_SETTING_INTENT)
+ * .appendPath(KEY_BLUETOOTH)
+ * .build();
+ * </pre>
+ */
+public class SettingsSlicesContract {
+ private SettingsSlicesContract() {
+ }
+
+ /**
+ * Authority for platform Settings Slices.
+ */
+ public static final String AUTHORITY = "android.settings.slices";
+
+ /**
+ * A content:// style uri to the Settings Slices authority, {@link #AUTHORITY}.
+ */
+ public static final Uri BASE_URI = new Uri.Builder()
+ .scheme(ContentResolver.SCHEME_CONTENT)
+ .authority(AUTHORITY)
+ .build();
+
+ /**
+ * {@link Uri} path indicating that the requested {@link android.app.slice.Slice Slice} should
+ * have inline controls for the corresponding setting.
+ * <p>
+ * This path will only contain Slices defined by keys in this class.
+ */
+ public static final String PATH_SETTING_ACTION = "action";
+
+ /**
+ * {@link Uri} path indicating that the requested {@link android.app.slice.Slice Slice} should
+ * be {@link android.content.Intent Intent}-only.
+ * <p>
+ * {@link android.app.slice.Slice Slices} with actions should use the {@link
+ * #PATH_SETTING_ACTION} path.
+ * <p>
+ * This path will only contain Slices defined by keys in this class
+ */
+ public static final String PATH_SETTING_INTENT = "intent";
+
+ /**
+ * {@link Uri} key for the Airplane Mode setting.
+ */
+ public static final String KEY_AIRPLANE_MODE = "airplane_mode";
+
+ /**
+ * {@link Uri} key for the Battery Saver setting.
+ */
+ public static final String KEY_BATTERY_SAVER = "battery_saver";
+
+ /**
+ * {@link Uri} key for the Bluetooth setting.
+ */
+ public static final String KEY_BLUETOOTH = "bluetooth";
+
+ /**
+ * {@link Uri} key for the Location setting.
+ */
+ public static final String KEY_LOCATION = "location";
+
+ /**
+ * {@link Uri} key for the Wi-fi setting.
+ */
+ public static final String KEY_WIFI = "wifi";
+}
diff --git a/core/java/android/provider/SettingsValidators.java b/core/java/android/provider/SettingsValidators.java
index 84c9e88..5885b6b 100644
--- a/core/java/android/provider/SettingsValidators.java
+++ b/core/java/android/provider/SettingsValidators.java
@@ -100,7 +100,7 @@
String[] subparts = value.split("\\.");
boolean isValidPackageName = true;
for (String subpart : subparts) {
- isValidPackageName |= isSubpartValidForPackageName(subpart);
+ isValidPackageName &= isSubpartValidForPackageName(subpart);
if (!isValidPackageName) break;
}
return isValidPackageName;
@@ -110,7 +110,7 @@
if (subpart.length() == 0) return false;
boolean isValidSubpart = Character.isLetter(subpart.charAt(0));
for (int i = 1; i < subpart.length(); i++) {
- isValidSubpart |= (Character.isLetterOrDigit(subpart.charAt(i))
+ isValidSubpart &= (Character.isLetterOrDigit(subpart.charAt(i))
|| (subpart.charAt(i) == '_'));
if (!isValidSubpart) break;
}
diff --git a/core/java/android/se/omapi/Channel.java b/core/java/android/se/omapi/Channel.java
new file mode 100644
index 0000000..f0b9fa2d
--- /dev/null
+++ b/core/java/android/se/omapi/Channel.java
@@ -0,0 +1,251 @@
+/*
+ * 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.
+ */
+/*
+ * Copyright (c) 2015-2017, The Linux Foundation.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.RemoteException;
+import android.util.Log;
+
+import java.io.IOException;
+
+/**
+ * Instances of this class represent an ISO/IEC 7816-4 channel opened to a
+ * Secure Element. It can be either a logical channel or the basic channel. They
+ * can be used to send APDUs to the secure element. Channels are opened by
+ * calling the Session.openBasicChannel(byte[]) or
+ * Session.openLogicalChannel(byte[]) methods.
+ *
+ * @see <a href="http://globalplatform.org">GlobalPlatform Open Mobile API</a>
+ */
+public class Channel {
+
+ private static final String TAG = "OMAPI.Channel";
+ private Session mSession;
+ private final ISecureElementChannel mChannel;
+ private final SEService mService;
+ private final Object mLock = new Object();
+
+ Channel(SEService service, Session session, ISecureElementChannel channel) {
+ if (service == null || session == null || channel == null) {
+ throw new IllegalArgumentException("Parameters cannot be null");
+ }
+ mService = service;
+ mSession = session;
+ mChannel = channel;
+ }
+
+ /**
+ * Closes this channel to the Secure Element. If the method is called when
+ * the channel is already closed, this method will be ignored. The close()
+ * method shall wait for completion of any pending transmit(byte[] command)
+ * before closing the channel.
+ */
+ public void close() {
+ if (!isClosed()) {
+ synchronized (mLock) {
+ try {
+ mChannel.close();
+ } catch (Exception e) {
+ Log.e(TAG, "Error closing channel", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Tells if this channel is closed.
+ *
+ * @return <code>true</code> if the channel is closed or in case of an error.
+ * <code>false</code> otherwise.
+ */
+ public boolean isClosed() {
+ if (!mService.isConnected()) {
+ Log.e(TAG, "service not connected to system");
+ return true;
+ }
+ try {
+ return mChannel.isClosed();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Exception in isClosed()");
+ return true;
+ }
+ }
+
+ /**
+ * Returns a boolean telling if this channel is the basic channel.
+ *
+ * @return <code>true</code> if this channel is a basic channel. <code>false</code> if
+ * this channel is a logical channel.
+ */
+ public boolean isBasicChannel() {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service not connected to system");
+ }
+ try {
+ return mChannel.isBasicChannel();
+ } catch (RemoteException e) {
+ throw new IllegalStateException(e.getMessage());
+ }
+ }
+
+ /**
+ * Transmit an APDU command (as per ISO/IEC 7816-4) to the Secure Element. The
+ * underlying layers generate as many TPDUs as necessary to transport this APDU. The
+ * API shall ensure that all available data returned from Secure Element, including
+ * concatenated responses, are retrieved and made available to the calling application. If a
+ * warning status code is received the API wont check for further response data but will
+ * return all data received so far and the warning status code.<br>
+ * The transport part is invisible from the application. The generated response is the
+ * response of the APDU which means that all protocols related responses are handled
+ * inside the API or the underlying implementation.<br>
+ * The transmit method shall support extended length APDU commands independently of
+ * the coding within the ATR.<br>
+ * For status word '61 XX' the API or underlying implementation shall issue a GET
+ * RESPONSE command as specified by ISO 7816-4 standard with LE=XX; for the status
+ * word '6C XX', the API or underlying implementation shall reissue the input command
+ * with LE=XX. For other status words, the API (or underlying implementation) shall return
+ * the complete response including data and status word to the device application. The API
+ * (or underlying implementation) shall not handle internally the received status words. The
+ * channel shall not be closed even if the Secure Element answered with an error code.
+ * The system ensures the synchronization between all the concurrent calls to this method,
+ * and that only one APDU will be sent at a time, irrespective of the number of TPDUs that
+ * might be required to transport it to the SE. The entire APDU communication to this SE is
+ * locked to the APDU.<br>
+ * The channel information in the class byte in the APDU will be ignored. The system will
+ * add any required information to ensure the APDU is transported on this channel.
+ * The only restrictions on the set of commands that can be sent is defined below, the API
+ * implementation shall be able to send all other commands: <br>
+ * <ul>
+ * <li>MANAGE_CHANNEL commands are not allowed.</li>
+ * <li>SELECT by DF Name (p1=04) are not allowed.</li>
+ * <li>CLA bytes with channel numbers are de-masked.</li>
+ * </ul>
+ *
+ * @param command the APDU command to be transmitted, as a byte array.
+ *
+ * @return the response received, as a byte array. The returned byte array contains the data
+ * bytes in the following order:
+ * [<first data byte>, ..., <last data byte>, <sw1>, <sw2>]
+ *
+ * @throws IOException if there is a communication problem to the reader or the Secure Element.
+ * @throws IllegalStateException if the channel is used after being closed.
+ * @throws IllegalArgumentException if the command byte array is less than 4 bytes long.
+ * @throws IllegalArgumentException if Lc byte is inconsistent with length of the byte array.
+ * @throws IllegalArgumentException if CLA byte is invalid according to [2] (0xff).
+ * @throws IllegalArgumentException if INS byte is invalid according to [2] (0x6x or 0x9x).
+ * @throws SecurityException if the command is filtered by the security policy.
+ * @throws NullPointerException if command is NULL.
+ */
+ public @NonNull byte[] transmit(byte[] command) throws IOException {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service not connected to system");
+ }
+ synchronized (mLock) {
+ try {
+ byte[] response = mChannel.transmit(command);
+ if (response == null) {
+ throw new IOException("Error in communicating with Secure Element");
+ }
+ return response;
+ } catch (RemoteException e) {
+ throw new IOException(e.getMessage());
+ }
+ }
+ }
+
+ /**
+ * Get the session that has opened this channel.
+ *
+ * @return the session object this channel is bound to.
+ */
+ public @NonNull Session getSession() {
+ return mSession;
+ }
+
+ /**
+ * Returns the data as received from the application select command inclusively the status word
+ * received at applet selection.
+ * The returned byte array contains the data bytes in the following order:
+ * [<first data byte>, ..., <last data byte>, <sw1>, <sw2>]
+ * @return The data as returned by the application select command inclusively the status word.
+ * Only the status word if the application select command has no returned data.
+ * Returns null if an application select command has not been performed or the selection
+ * response can not be retrieved by the reader implementation.
+ */
+ public @Nullable byte[] getSelectResponse() {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service not connected to system");
+ }
+
+ byte[] response;
+ try {
+ response = mChannel.getSelectResponse();
+ } catch (RemoteException e) {
+ throw new IllegalStateException(e.getMessage());
+ }
+
+ if (response != null && response.length == 0) {
+ response = null;
+ }
+ return response;
+ }
+
+ /**
+ * Performs a selection of the next Applet on this channel that matches to the partial AID
+ * specified in the openBasicChannel(byte[] aid) or openLogicalChannel(byte[] aid) method.
+ * This mechanism can be used by a device application to iterate through all Applets
+ * matching to the same partial AID.
+ * If selectNext() returns true a new Applet was successfully selected on this channel.
+ * If no further Applet exists with matches to the partial AID this method returns false
+ * and the already selected Applet stays selected. <br>
+ *
+ * Since the API cannot distinguish between a partial and full AID the API shall rely on the
+ * response of the Secure Element for the return value of this method. <br>
+ * The implementation of the underlying SELECT command within this method shall use
+ * the same values as the corresponding openBasicChannel(byte[] aid) or
+ * openLogicalChannel(byte[] aid) command with the option: <br>
+ * P2='02' (Next occurrence) <br>
+ * The select response stored in the Channel object shall be updated with the APDU
+ * response of the SELECT command.
+
+ * @return <code>true</code> if new Applet was selected on this channel.
+ <code>false</code> he already selected Applet stays selected on this channel.
+ *
+ * @throws IOException if there is a communication problem to the reader or the Secure Element.
+ * @throws IllegalStateException if the channel is used after being closed.
+ * @throws UnsupportedOperationException if this operation is not supported by the card.
+ */
+ public boolean selectNext() throws IOException {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service not connected to system");
+ }
+ try {
+ synchronized (mLock) {
+ return mChannel.selectNext();
+ }
+ } catch (RemoteException e) {
+ throw new IOException(e.getMessage());
+ }
+ }
+}
diff --git a/core/java/android/se/omapi/ISecureElementChannel.aidl b/core/java/android/se/omapi/ISecureElementChannel.aidl
new file mode 100644
index 0000000..4ae57ab
--- /dev/null
+++ b/core/java/android/se/omapi/ISecureElementChannel.aidl
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.se.omapi.ISecureElementSession;
+
+/** @hide */
+interface ISecureElementChannel {
+
+ /**
+ * Closes the specified connection and frees internal resources.
+ * A logical channel will be closed.
+ */
+ void close();
+
+ /**
+ * Tells if this channel is closed.
+ *
+ * @return <code>true</code> if the channel is closed,
+ * <code>false</code> otherwise.
+ */
+ boolean isClosed();
+
+ /**
+ * Returns a boolean telling if this channel is the basic channel.
+ *
+ * @return <code>true</code> if this channel is a basic channel.
+ * <code>false</code> if this channel is a logical channel.
+ */
+ boolean isBasicChannel();
+
+ /**
+ * Returns the data as received from the application select command
+ * inclusively the status word. The returned byte array contains the data
+ * bytes in the following order:
+ * [<first data byte>, ..., <last data byte>, <sw1>, <sw2>]
+ */
+ byte[] getSelectResponse();
+
+ /**
+ * Transmits the specified command APDU and returns the response APDU.
+ * MANAGE channel commands are not supported.
+ * Selection of applets is not supported in logical channels.
+ */
+ byte[] transmit(in byte[] command);
+
+ /**
+ * Performs a selection of the next Applet on this channel that matches to
+ * the partial AID specified in the openBasicChannel(byte[] aid) or
+ * openLogicalChannel(byte[] aid) method. This mechanism can be used by a
+ * device application to iterate through all Applets matching to the same
+ * partial AID.
+ * If selectNext() returns true a new Applet was successfully selected on
+ * this channel.
+ * If no further Applet exists with matches to the partial AID this method
+ * returns false and the already selected Applet stays selected.
+ *
+ * @return <code>true</code> if new Applet was successfully selected.
+ * <code>false</code> if no further Applet exists which matches the
+ * partial AID.
+ */
+ boolean selectNext();
+}
diff --git a/core/proto/android/os/batterymanager.proto b/core/java/android/se/omapi/ISecureElementListener.aidl
similarity index 61%
copy from core/proto/android/os/batterymanager.proto
copy to core/java/android/se/omapi/ISecureElementListener.aidl
index 669bf2d..3a99d63 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/core/java/android/se/omapi/ISecureElementListener.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * 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.
@@ -13,17 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
-syntax = "proto2";
-package android.os;
+package android.se.omapi;
-option java_multiple_files = true;
-
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
+/**
+ * Interface to receive call-backs when the service is connected.
+ */
+interface ISecureElementListener {
+ /**
+ * Called by the framework when the service is connected.
+ */
+ void serviceConnected();
}
diff --git a/core/java/android/se/omapi/ISecureElementReader.aidl b/core/java/android/se/omapi/ISecureElementReader.aidl
new file mode 100644
index 0000000..a312c44
--- /dev/null
+++ b/core/java/android/se/omapi/ISecureElementReader.aidl
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.se.omapi.ISecureElementSession;
+
+/** @hide */
+interface ISecureElementReader {
+
+ /**
+ * Returns true if a card is present in the specified reader.
+ * Returns false if a card is not present in the specified reader.
+ */
+ boolean isSecureElementPresent();
+
+ /**
+ * Connects to a secure element in this reader. <br>
+ * This method prepares (initialises) the Secure Element for communication
+ * before the Session object is returned (e.g. powers the Secure Element by
+ * ICC ON if its not already on). There might be multiple sessions opened at
+ * the same time on the same reader. The system ensures the interleaving of
+ * APDUs between the respective sessions.
+ *
+ * @return a Session object to be used to create Channels.
+ */
+ ISecureElementSession openSession();
+
+ /**
+ * Close all the sessions opened on this reader. All the channels opened by
+ * all these sessions will be closed.
+ */
+ void closeSessions();
+
+}
diff --git a/core/java/android/se/omapi/ISecureElementService.aidl b/core/java/android/se/omapi/ISecureElementService.aidl
new file mode 100644
index 0000000..4fa799e
--- /dev/null
+++ b/core/java/android/se/omapi/ISecureElementService.aidl
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+/*
+ * Copyright (c) 2015-2017, The Linux Foundation.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.se.omapi.ISecureElementReader;
+
+/**
+ * SecureElement service interface.
+ * @hide
+ */
+interface ISecureElementService {
+
+ /**
+ * Returns the friendly names of available Secure Element readers.
+ */
+ String[] getReaders();
+
+ /**
+ * Returns SecureElement Service reader object to the given name.
+ */
+ ISecureElementReader getReader(String reader);
+
+ /**
+ * Checks if the application defined by the package name is allowed to
+ * receive NFC transaction events for the defined AID.
+ */
+ boolean[] isNFCEventAllowed(String reader, in byte[] aid,
+ in String[] packageNames);
+
+}
diff --git a/core/java/android/se/omapi/ISecureElementSession.aidl b/core/java/android/se/omapi/ISecureElementSession.aidl
new file mode 100644
index 0000000..8ea599f
--- /dev/null
+++ b/core/java/android/se/omapi/ISecureElementSession.aidl
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+/*
+ * Copyright (c) 2015-2017, The Linux Foundation.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.se.omapi.ISecureElementChannel;
+import android.se.omapi.ISecureElementReader;
+import android.se.omapi.ISecureElementListener;
+
+/** @hide */
+interface ISecureElementSession {
+
+ /**
+ * Returns the ATR of the connected card or null if the ATR is not available
+ */
+ byte[] getAtr();
+
+ /**
+ * Close the connection with the Secure Element. This will close any
+ * channels opened by this application with this Secure Element.
+ */
+ void close();
+
+ /**
+ * Close any channel opened on this session.
+ */
+ void closeChannels();
+
+
+ /**
+ * Tells if this session is closed.
+ *
+ * @return <code>true</code> if the session is closed, false otherwise.
+ */
+ boolean isClosed();
+
+ /**
+ * Opens a connection using the basic channel of the card in the
+ * specified reader and returns a channel handle. Selects the specified
+ * applet if aid != null.
+ * Logical channels cannot be opened with this connection.
+ * Use interface method openLogicalChannel() to open a logical channel.
+ */
+ ISecureElementChannel openBasicChannel(in byte[] aid, in byte p2,
+ ISecureElementListener listener);
+
+ /**
+ * Opens a connection using the next free logical channel of the card in the
+ * specified reader. Selects the specified applet.
+ * Selection of other applets with this connection is not supported.
+ */
+ ISecureElementChannel openLogicalChannel(in byte[] aid, in byte p2,
+ ISecureElementListener listener);
+}
diff --git a/core/java/android/se/omapi/Reader.java b/core/java/android/se/omapi/Reader.java
new file mode 100644
index 0000000..9f15739
--- /dev/null
+++ b/core/java/android/se/omapi/Reader.java
@@ -0,0 +1,151 @@
+/*
+ * 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.
+ */
+/*
+ * Copyright (c) 2015-2017, The Linux Foundation.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.annotation.NonNull;
+import android.os.RemoteException;
+import android.util.Log;
+
+import java.io.IOException;
+
+/**
+ * Instances of this class represent Secure Element Readers supported to this
+ * device. These Readers can be physical devices or virtual devices. They can be
+ * removable or not. They can contain Secure Element that can or cannot be
+ * removed.
+ *
+ * @see <a href="http://globalplatform.org">GlobalPlatform Open Mobile API</a>
+ */
+public class Reader {
+
+ private static final String TAG = "OMAPI.Reader";
+ private final String mName;
+ private final SEService mService;
+ private ISecureElementReader mReader;
+ private final Object mLock = new Object();
+
+
+ Reader(SEService service, String name, ISecureElementReader reader) throws
+ IOException {
+ if (reader == null || service == null || name == null) {
+ throw new IllegalArgumentException("Parameters cannot be null");
+ }
+ mName = name;
+ mService = service;
+ mReader = reader;
+ }
+
+ /**
+ * Return the name of this reader.
+ * <ul>
+ * <li>If this reader is a SIM reader, then its name must be "SIM[Slot]".</li>
+ * <li>If the reader is a SD or micro SD reader, then its name must be "SD[Slot]"</li>
+ * <li>If the reader is a embedded SE reader, then its name must be "eSE[Slot]"</li>
+ * </ul>
+ * Slot is a decimal number without leading zeros. The Numbering must start with 1
+ * (e.g. SIM1, SIM2, ... or SD1, SD2, ... or eSE1, eSE2, ...).
+ * The slot number “1” for a reader is optional
+ * (SIM and SIM1 are both valid for the first SIM-reader,
+ * but if there are two readers then the second reader must be named SIM2).
+ * This applies also for other SD or SE readers.
+ *
+ * @return the reader name, as a String.
+ */
+ public @NonNull String getName() {
+ return mName;
+ }
+
+ /**
+ * Connects to a Secure Element in this reader. <br>
+ * This method prepares (initialises) the Secure Element for communication
+ * before the Session object is returned (e.g. powers the Secure Element by
+ * ICC ON if its not already on). There might be multiple sessions opened at
+ * the same time on the same reader. The system ensures the interleaving of
+ * APDUs between the respective sessions.
+ *
+ * @throws IOException if something went wrong with the communicating to the
+ * Secure Element or the reader.
+ * @return a Session object to be used to create Channels.
+ */
+ public @NonNull Session openSession() throws IOException {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service is not connected");
+ }
+
+ synchronized (mLock) {
+ ISecureElementSession session;
+ try {
+ session = mReader.openSession();
+ } catch (RemoteException e) {
+ throw new IOException(e.getMessage());
+ }
+ if (session == null) {
+ throw new IOException("service session is null.");
+ }
+ return new Session(mService, session, this);
+ }
+ }
+
+ /**
+ * Check if a Secure Element is present in this reader.
+ *
+ * @throws IllegalStateException if the service is not connected
+ * @return <code>true</code> if the SE is present, <code>false</code> otherwise.
+ */
+ public boolean isSecureElementPresent() {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service is not connected");
+ }
+
+ try {
+ return mReader.isSecureElementPresent();
+ } catch (RemoteException e) {
+ throw new IllegalStateException("Error in isSecureElementPresent()");
+ }
+ }
+
+ /**
+ * Return the Secure Element service this reader is bound to.
+ *
+ * @return the SEService object.
+ */
+ public @NonNull SEService getSEService() {
+ return mService;
+ }
+
+ /**
+ * Close all the sessions opened on this reader.
+ * All the channels opened by all these sessions will be closed.
+ */
+ public void closeSessions() {
+ if (!mService.isConnected()) {
+ Log.e(TAG, "service is not connected");
+ return;
+ }
+ synchronized (mLock) {
+ try {
+ mReader.closeSessions();
+ } catch (RemoteException ignore) { }
+ }
+ }
+}
diff --git a/core/java/android/se/omapi/SEService.java b/core/java/android/se/omapi/SEService.java
new file mode 100644
index 0000000..1e37277d
--- /dev/null
+++ b/core/java/android/se/omapi/SEService.java
@@ -0,0 +1,222 @@
+/*
+ * 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.
+ */
+/*
+ * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.annotation.NonNull;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.util.Log;
+
+import java.util.HashMap;
+
+/**
+ * The SEService realises the communication to available Secure Elements on the
+ * device. This is the entry point of this API. It is used to connect to the
+ * infrastructure and get access to a list of Secure Element Readers.
+ *
+ * @see <a href="http://simalliance.org">SIMalliance Open Mobile API v3.0</a>
+ */
+public class SEService {
+
+ private static final String TAG = "OMAPI.SEService";
+
+ private final Object mLock = new Object();
+
+ /** The client context (e.g. activity). */
+ private final Context mContext;
+
+ /** The backend system. */
+ private volatile ISecureElementService mSecureElementService;
+
+ /**
+ * Class for interacting with the main interface of the backend.
+ */
+ private ServiceConnection mConnection;
+
+ /**
+ * Collection of available readers
+ */
+ private final HashMap<String, Reader> mReaders = new HashMap<String, Reader>();
+
+ /**
+ * Listener object that allows the notification of the caller if this
+ * SEService could be bound to the backend.
+ */
+ private ISecureElementListener mSEListener;
+
+ /**
+ * Establishes a new connection that can be used to connect to all the
+ * Secure Elements available in the system. The connection process can be
+ * quite long, so it happens in an asynchronous way. It is usable only if
+ * the specified listener is called or if isConnected() returns
+ * <code>true</code>. <br>
+ * The call-back object passed as a parameter will have its
+ * serviceConnected() method called when the connection actually happen.
+ *
+ * @param context
+ * the context of the calling application. Cannot be
+ * <code>null</code>.
+ * @param listener
+ * a ISecureElementListener object. Can be <code>null</code>.
+ */
+ public SEService(Context context, ISecureElementListener listener) {
+
+ if (context == null) {
+ throw new NullPointerException("context must not be null");
+ }
+
+ mContext = context;
+ mSEListener = listener;
+
+ mConnection = new ServiceConnection() {
+
+ public synchronized void onServiceConnected(
+ ComponentName className, IBinder service) {
+
+ mSecureElementService = ISecureElementService.Stub.asInterface(service);
+ if (mSEListener != null) {
+ try {
+ mSEListener.serviceConnected();
+ } catch (RemoteException ignore) { }
+ }
+ Log.i(TAG, "Service onServiceConnected");
+ }
+
+ public void onServiceDisconnected(ComponentName className) {
+ mSecureElementService = null;
+ Log.i(TAG, "Service onServiceDisconnected");
+ }
+ };
+
+ Intent intent = new Intent(ISecureElementService.class.getName());
+ intent.setClassName("com.android.se",
+ "com.android.se.SecureElementService");
+ boolean bindingSuccessful =
+ mContext.bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
+ if (bindingSuccessful) {
+ Log.i(TAG, "bindService successful");
+ }
+ }
+
+ /**
+ * Tells whether or not the service is connected.
+ *
+ * @return <code>true</code> if the service is connected.
+ */
+ public boolean isConnected() {
+ return mSecureElementService != null;
+ }
+
+ /**
+ * Returns the list of available Secure Element readers.
+ * There must be no duplicated objects in the returned list.
+ * All available readers shall be listed even if no card is inserted.
+ *
+ * @return The readers list, as an array of Readers. If there are no
+ * readers the returned array is of length 0.
+ */
+ public @NonNull Reader[] getReaders() {
+ if (mSecureElementService == null) {
+ throw new IllegalStateException("service not connected to system");
+ }
+ String[] readerNames;
+ try {
+ readerNames = mSecureElementService.getReaders();
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+
+ Reader[] readers = new Reader[readerNames.length];
+ int i = 0;
+ for (String readerName : readerNames) {
+ if (mReaders.get(readerName) == null) {
+ try {
+ mReaders.put(readerName, new Reader(this, readerName,
+ getReader(readerName)));
+ readers[i++] = mReaders.get(readerName);
+ } catch (Exception e) {
+ Log.e(TAG, "Error adding Reader: " + readerName, e);
+ }
+ } else {
+ readers[i++] = mReaders.get(readerName);
+ }
+ }
+ return readers;
+ }
+
+ /**
+ * Releases all Secure Elements resources allocated by this SEService
+ * (including any binding to an underlying service).
+ * As a result isConnected() will return false after shutdown() was called.
+ * After this method call, the SEService object is not connected.
+ * It is recommended to call this method in the termination method of the calling application
+ * (or part of this application) which is bound to this SEService.
+ */
+ public void shutdown() {
+ synchronized (mLock) {
+ if (mSecureElementService != null) {
+ for (Reader reader : mReaders.values()) {
+ try {
+ reader.closeSessions();
+ } catch (Exception ignore) { }
+ }
+ }
+ try {
+ mContext.unbindService(mConnection);
+ } catch (IllegalArgumentException e) {
+ // Do nothing and fail silently since an error here indicates
+ // that binding never succeeded in the first place.
+ }
+ mSecureElementService = null;
+ }
+ }
+
+ /**
+ * Returns the version of the OpenMobile API specification this
+ * implementation is based on.
+ *
+ * @return String containing the OpenMobile API version (e.g. "3.0").
+ */
+ public String getVersion() {
+ return "3.2";
+ }
+
+ @NonNull ISecureElementListener getListener() {
+ return mSEListener;
+ }
+
+ /**
+ * Obtain a Reader instance from the SecureElementService
+ */
+ private @NonNull ISecureElementReader getReader(String name) {
+ try {
+ return mSecureElementService.getReader(name);
+ } catch (RemoteException e) {
+ throw new IllegalStateException(e.getMessage());
+ }
+ }
+}
diff --git a/core/java/android/se/omapi/Session.java b/core/java/android/se/omapi/Session.java
new file mode 100644
index 0000000..bb2a032
--- /dev/null
+++ b/core/java/android/se/omapi/Session.java
@@ -0,0 +1,347 @@
+/*
+ * 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.
+ */
+/*
+ * Copyright (c) 2017, The Linux Foundation.
+ */
+/*
+ * Contributed by: Giesecke & Devrient GmbH.
+ */
+
+package android.se.omapi;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.RemoteException;
+import android.util.Log;
+
+import java.io.IOException;
+import java.util.NoSuchElementException;
+
+/**
+ * Instances of this class represent a connection session to one of the Secure
+ * Elements available on the device. These objects can be used to get a
+ * communication channel with an Applet in the Secure Element.
+ * This channel can be the basic channel or a logical channel.
+ *
+ * @see <a href="http://simalliance.org">SIMalliance Open Mobile API v3.0</a>
+ */
+public class Session {
+
+ private final Object mLock = new Object();
+ private final SEService mService;
+ private final Reader mReader;
+ private final ISecureElementSession mSession;
+ private static final String TAG = "OMAPI.Session";
+
+ Session(SEService service, ISecureElementSession session, Reader reader) {
+ if (service == null || reader == null || session == null) {
+ throw new IllegalArgumentException("Parameters cannot be null");
+ }
+ mService = service;
+ mReader = reader;
+ mSession = session;
+ }
+
+ /**
+ * Get the reader that provides this session.
+ *
+ * @return The Reader object.
+ */
+ public @NonNull Reader getReader() {
+ return mReader;
+ }
+
+ /**
+ * Get the Answer to Reset of this Secure Element. <br>
+ * The returned byte array can be null if the ATR for this Secure Element is
+ * not available.
+ *
+ * @throws IllegalStateException if there was an error connecting to SE or
+ * if the service was not connected.
+ * @return the ATR as a byte array or null.
+ */
+ public @Nullable byte[] getATR() {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service not connected to system");
+ }
+ try {
+ return mSession.getAtr();
+ } catch (RemoteException e) {
+ throw new IllegalStateException(e.getMessage());
+ }
+ }
+
+ /**
+ * Close the connection with the Secure Element. This will close any
+ * channels opened by this application with this Secure Element.
+ */
+ public void close() {
+ if (!mService.isConnected()) {
+ Log.e(TAG, "service not connected to system");
+ return;
+ }
+ synchronized (mLock) {
+ try {
+ mSession.close();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error closing session", e);
+ }
+ }
+ }
+
+ /**
+ * Tells if this session is closed.
+ *
+ * @return <code>true</code> if the session is closed, false otherwise.
+ */
+ public boolean isClosed() {
+ try {
+ return mSession.isClosed();
+ } catch (RemoteException e) {
+ // If there was an error here, then the session is considered close
+ return true;
+ }
+ }
+
+ /**
+ * Close any channel opened on this session.
+ */
+ public void closeChannels() {
+ if (!mService.isConnected()) {
+ Log.e(TAG, "service not connected to system");
+ return;
+ }
+
+ synchronized (mLock) {
+ try {
+ mSession.closeChannels();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error closing channels", e);
+ }
+ }
+ }
+
+ /**
+ * Get an access to the basic channel, as defined in the ISO/IEC 7816-4 specification (the
+ * one that has number 0). The obtained object is an instance of the Channel class.
+ * If the AID is null, it means no Applet is to be selected on this channel and the default
+ * Applet is used. If the AID is defined then the corresponding Applet is selected.
+ * Once this channel has been opened by a device application, it is considered as "locked"
+ * by this device application, and other calls to this method will return null, until the
+ * channel is closed. Some Secure Elements (like the UICC) might always keep the basic channel
+ * locked (i.e. return null to applications), to prevent access to the basic channel, while
+ * some other might return a channel object implementing some kind of filtering on the
+ * commands, restricting the set of accepted command to a smaller set.
+ * It is recommended for the UICC to reject the opening of the basic channel to a specific
+ * applet, by always answering null to such a request.
+ * For other Secure Elements, the recommendation is to accept opening the basic channel
+ * on the default applet until another applet is selected on the basic channel. As there is no
+ * other way than a reset to select again the default applet, the implementation of the
+ * transport API should guarantee that the openBasicChannel(null) command will return
+ * null until a reset occurs.
+ * With previous release (V2.05) it was not possible to set P2 value, this value was always
+ * set to '00'.Except for specific needs it is recommended to keep P2 to '00'. It is
+ * recommended that the device allows all values for P2, however only the following values
+ * are mandatory: '00', '04', '08', '0C'(as defined in [2])
+ * The implementation of the underlying SELECT command within this method shall be
+ * based on ISO 7816-4 with following options:
+ * <ul>
+ * <li>CLA = '00'</li>
+ * <li>INS = 'A4'</li>
+ * <li>P1 = '04' (Select by DF name/application identifier)</li>
+ * </ul>
+ *
+ * The select response data can be retrieved with byte[] getSelectResponse().
+ * The API shall handle received status word as follow. If the status word indicates that the
+ * Secure Element was able to open a channel (e.g. status word '90 00' or status words
+ * referencing a warning in ISO-7816-4: '62 XX' or '63 XX') the API shall keep the
+ * channel opened and the next getSelectResponse() shall return the received status
+ * word.
+ * Other received status codes indicating that the Secure Element was able not to open a
+ * channel shall be considered as an error and the corresponding channel shall not be
+ * opened.
+ * The function without P2 as parameter is provided for backwards compatibility and will
+ * fall back to a select command with P2='00'.
+ *
+ * @param aid the AID of the Applet to be selected on this channel, as a
+ * byte array, or null if no Applet is to be selected.
+ * @param p2 the P2 parameter of the SELECT APDU executed on this channel.
+ * @throws IOException if there is a communication problem to the reader or
+ * the Secure Element.
+ * @throws IllegalStateException if the Secure Element session is used after
+ * being closed.
+ * @throws IllegalArgumentException if the aid's length is not within 5 to
+ * 16 (inclusive).
+ * @throws SecurityException if the calling application cannot be granted
+ * access to this AID or the default Applet on this
+ * session.
+ * @throws NoSuchElementException if the AID on the Secure Element is not available or cannot be
+ * selected.
+ * @throws UnsupportedOperationException if the given P2 parameter is not
+ * supported by the device
+ * @return an instance of Channel if available or null.
+ */
+ public @Nullable Channel openBasicChannel(byte[] aid, byte p2) throws IOException {
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service not connected to system");
+ }
+
+ synchronized (mLock) {
+ try {
+ ISecureElementChannel channel = mSession.openBasicChannel(aid, p2,
+ mReader.getSEService().getListener());
+ if (channel == null) {
+ return null;
+ }
+ return new Channel(mService, this, channel);
+ } catch (RemoteException e) {
+ throw new IOException(e.getMessage());
+ }
+ }
+ }
+
+ /**
+ * This method is provided to ease the development of mobile application and for compliancy
+ * with existing applications.
+ * This method is equivalent to openBasicChannel(aid, P2=0x00)
+ *
+ * @param aid the AID of the Applet to be selected on this channel, as a
+ * byte array, or null if no Applet is to be selected.
+ * @throws IOException if there is a communication problem to the reader or
+ * the Secure Element.
+ * @throws IllegalStateException if the Secure Element session is used after
+ * being closed.
+ * @throws IllegalArgumentException if the aid's length is not within 5 to
+ * 16 (inclusive).
+ * @throws SecurityException if the calling application cannot be granted
+ * access to this AID or the default Applet on this
+ * session.
+ * @throws NoSuchElementException if the AID on the Secure Element is not available or cannot be
+ * selected.
+ * @throws UnsupportedOperationException if the given P2 parameter is not
+ * supported by the device
+ * @return an instance of Channel if available or null.
+ */
+ public @Nullable Channel openBasicChannel(byte[] aid) throws IOException {
+ return openBasicChannel(aid, (byte) 0x00);
+ }
+
+ /**
+ * Open a logical channel with the Secure Element, selecting the Applet represented by
+ * the given AID. If the AID is null, which means no Applet is to be selected on this
+ * channel, the default Applet is used. It's up to the Secure Element to choose which
+ * logical channel will be used.
+ * With previous release (V2.05) it was not possible to set P2 value, this value was always
+ * set to '00'.Except for specific needs it is recommended to keep P2 to '00'. It is
+ * recommended that the device allows all values for P2, however only the following values
+ * are mandatory: '00', '04', '08', '0C'(as defined in [2])
+ * The implementation of the underlying SELECT command within this method shall be
+ * based on ISO 7816-4 with following options:
+ *
+ * <ul>
+ * <li>CLA = '01' to '03', '40 to 4F'</li>
+ * <li>INS = 'A4'</li>
+ * <li>P1 = '04' (Select by DF name/application identifier)</li>
+ * </ul>
+ *
+ * The select response data can be retrieved with byte[] getSelectResponse().
+ * The API shall handle received status word as follow. If the status word indicates that the
+ * Secure Element was able to open a channel (e.g. status word '90 00' or status words
+ * referencing a warning in ISO-7816-4: '62 XX' or '63 XX') the API shall keep the
+ * channel opened and the next getSelectResponse() shall return the received status
+ * word.
+ * Other received status codes indicating that the Secure Element was able not to open a
+ * channel shall be considered as an error and the corresponding channel shall not be
+ * opened.
+ * In case of UICC it is recommended for the API to reject the opening of the logical
+ * channel without a specific AID, by always answering null to such a request.
+ * The function without P2 as parameter is provided for backwards compatibility and will
+ * fall back to a select command with P2=00.
+ *
+ * @param aid the AID of the Applet to be selected on this channel, as a
+ * byte array.
+ * @param p2 the P2 parameter of the SELECT APDU executed on this channel.
+ * @throws IOException if there is a communication problem to the reader or
+ * the Secure Element.
+ * @throws IllegalStateException if the Secure Element is used after being
+ * closed.
+ * @throws IllegalArgumentException if the aid's length is not within 5 to
+ * 16 (inclusive).
+ * @throws SecurityException if the calling application cannot be granted
+ * access to this AID or the default Applet on this
+ * session.
+ * @throws NoSuchElementException if the AID on the Secure Element is not
+ * available or cannot be selected or a logical channel is already
+ * open to a non-multiselectable Applet.
+ * @throws UnsupportedOperationException if the given P2 parameter is not
+ * supported by the device.
+ * @return an instance of Channel. Null if the Secure Element is unable to
+ * provide a new logical channel.
+ */
+ public @Nullable Channel openLogicalChannel(byte[] aid, byte p2) throws IOException {
+
+ if ((mReader.getName().startsWith("SIM")) && (aid == null)) {
+ Log.e(TAG, "NULL AID not supported on " + mReader.getName());
+ return null;
+ }
+
+ if (!mService.isConnected()) {
+ throw new IllegalStateException("service not connected to system");
+ }
+ synchronized (mLock) {
+ try {
+ ISecureElementChannel channel = mSession.openLogicalChannel(
+ aid,
+ p2,
+ mReader.getSEService().getListener());
+ if (channel == null) {
+ return null;
+ }
+ return new Channel(mService, this, channel);
+ } catch (RemoteException e) {
+ throw new IOException(e.getMessage());
+ }
+ }
+ }
+
+ /**
+ * This method is provided to ease the development of mobile application and for compliancy
+ * with existing applications.
+ * This method is equivalent to openLogicalChannel(aid, P2=0x00)
+ *
+ * @param aid the AID of the Applet to be selected on this channel, as a
+ * byte array.
+ * @throws IOException if there is a communication problem to the reader or
+ * the Secure Element.
+ * @throws IllegalStateException if the Secure Element is used after being
+ * closed.
+ * @throws IllegalArgumentException if the aid's length is not within 5 to
+ * 16 (inclusive).
+ * @throws SecurityException if the calling application cannot be granted
+ * access to this AID or the default Applet on this
+ * session.
+ * @throws NoSuchElementException if the AID on the Secure Element is not
+ * available or cannot be selected or a logical channel is already
+ * open to a non-multiselectable Applet.
+ * @throws UnsupportedOperationException if the given P2 parameter is not
+ * supported by the device.
+ * @return an instance of Channel. Null if the Secure Element is unable to
+ * provide a new logical channel.
+ */
+ public @Nullable Channel openLogicalChannel(byte[] aid) throws IOException {
+ return openLogicalChannel(aid, (byte) 0x00);
+ }
+}
diff --git a/core/java/android/security/IConfirmationPromptCallback.aidl b/core/java/android/security/IConfirmationPromptCallback.aidl
new file mode 100644
index 0000000..96a1a04
--- /dev/null
+++ b/core/java/android/security/IConfirmationPromptCallback.aidl
@@ -0,0 +1,27 @@
+/**
+ * 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 android.security;
+
+/**
+ * This must be kept manually in sync with system/security/keystore until AIDL
+ * can generate both Java and C++ bindings.
+ *
+ * @hide
+ */
+interface IConfirmationPromptCallback {
+ oneway void onConfirmationPromptCompleted(in int result, in byte[] dataThatWasConfirmed);
+}
diff --git a/core/java/android/security/IKeystoreService.aidl b/core/java/android/security/IKeystoreService.aidl
index b5496e4..738eb68 100644
--- a/core/java/android/security/IKeystoreService.aidl
+++ b/core/java/android/security/IKeystoreService.aidl
@@ -81,4 +81,7 @@
in String wrappingKeyAlias, in byte[] maskingKey, in KeymasterArguments arguments,
in long rootSid, in long fingerprintSid,
out KeyCharacteristics characteristics);
+ int presentConfirmationPrompt(IBinder listener, String promptText, in byte[] extraData,
+ in String locale, in int uiOptionsAsFlags);
+ int cancelConfirmationPrompt(IBinder listener);
}
diff --git a/core/java/android/security/keystore/KeychainProtectionParams.java b/core/java/android/security/keystore/KeychainProtectionParams.java
index a3cd431..a940fdc 100644
--- a/core/java/android/security/keystore/KeychainProtectionParams.java
+++ b/core/java/android/security/keystore/KeychainProtectionParams.java
@@ -260,9 +260,6 @@
}
};
- /**
- * @hide
- */
@Override
public void writeToParcel(Parcel out, int flags) {
out.writeInt(mUserSecretType);
diff --git a/core/java/android/security/keystore/KeychainSnapshot.java b/core/java/android/security/keystore/KeychainSnapshot.java
index e03dd4a..23aec25 100644
--- a/core/java/android/security/keystore/KeychainSnapshot.java
+++ b/core/java/android/security/keystore/KeychainSnapshot.java
@@ -151,6 +151,8 @@
/**
* Builder for creating {@link KeychainSnapshot}.
+ *
+ * @hide
*/
public static class Builder {
private KeychainSnapshot mInstance = new KeychainSnapshot();
@@ -263,9 +265,6 @@
}
}
- /**
- * @hide
- */
@Override
public void writeToParcel(Parcel out, int flags) {
out.writeInt(mSnapshotVersion);
diff --git a/core/java/android/security/keystore/RecoveryController.java b/core/java/android/security/keystore/RecoveryController.java
index 8be6d52..98e6a20 100644
--- a/core/java/android/security/keystore/RecoveryController.java
+++ b/core/java/android/security/keystore/RecoveryController.java
@@ -167,7 +167,7 @@
public @NonNull KeychainSnapshot getRecoveryData(@NonNull byte[] account)
throws InternalRecoveryServiceException {
try {
- return BackwardsCompat.toLegacyKeychainSnapshot(mBinder.getRecoveryData(account));
+ return BackwardsCompat.toLegacyKeychainSnapshot(mBinder.getKeyChainSnapshot());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
} catch (ServiceSpecificException e) {
diff --git a/core/java/android/security/keystore/recovery/BadCertificateFormatException.java b/core/java/android/security/keystore/recovery/BadCertificateFormatException.java
index fda3387..e0781a5 100644
--- a/core/java/android/security/keystore/recovery/BadCertificateFormatException.java
+++ b/core/java/android/security/keystore/recovery/BadCertificateFormatException.java
@@ -20,6 +20,7 @@
* Error thrown when the recovery agent supplies an invalid X509 certificate.
*
* @hide
+ * Deprecated
*/
public class BadCertificateFormatException extends RecoveryControllerException {
public BadCertificateFormatException(String msg) {
diff --git a/core/java/android/security/keystore/recovery/DecryptionFailedException.java b/core/java/android/security/keystore/recovery/DecryptionFailedException.java
index 93f033f..af00e05 100644
--- a/core/java/android/security/keystore/recovery/DecryptionFailedException.java
+++ b/core/java/android/security/keystore/recovery/DecryptionFailedException.java
@@ -16,6 +16,8 @@
package android.security.keystore.recovery;
+import android.annotation.SystemApi;
+
import java.security.GeneralSecurityException;
/**
@@ -24,8 +26,8 @@
*
* @hide
*/
+@SystemApi
public class DecryptionFailedException extends GeneralSecurityException {
-
public DecryptionFailedException(String msg) {
super(msg);
}
diff --git a/core/java/android/security/keystore/recovery/InternalRecoveryServiceException.java b/core/java/android/security/keystore/recovery/InternalRecoveryServiceException.java
index 9a03226..218d26e 100644
--- a/core/java/android/security/keystore/recovery/InternalRecoveryServiceException.java
+++ b/core/java/android/security/keystore/recovery/InternalRecoveryServiceException.java
@@ -16,8 +16,9 @@
package android.security.keystore.recovery;
-import java.security.GeneralSecurityException;
+import android.annotation.SystemApi;
+import java.security.GeneralSecurityException;
/**
* An error thrown when something went wrong internally in the recovery service.
*
@@ -26,6 +27,7 @@
*
* @hide
*/
+@SystemApi
public class InternalRecoveryServiceException extends GeneralSecurityException {
public InternalRecoveryServiceException(String msg) {
super(msg);
diff --git a/core/java/android/security/keystore/recovery/KeyChainProtectionParams.java b/core/java/android/security/keystore/recovery/KeyChainProtectionParams.java
index 7ccb909..a43952a 100644
--- a/core/java/android/security/keystore/recovery/KeyChainProtectionParams.java
+++ b/core/java/android/security/keystore/recovery/KeyChainProtectionParams.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -47,6 +48,7 @@
*
* @hide
*/
+@SystemApi
public final class KeyChainProtectionParams implements Parcelable {
/** @hide */
@Retention(RetentionPolicy.SOURCE)
@@ -260,9 +262,6 @@
}
};
- /**
- * @hide
- */
@Override
public void writeToParcel(Parcel out, int flags) {
out.writeInt(mUserSecretType);
diff --git a/core/java/android/security/keystore/recovery/KeyChainSnapshot.java b/core/java/android/security/keystore/recovery/KeyChainSnapshot.java
index 9639bb5..df535ed 100644
--- a/core/java/android/security/keystore/recovery/KeyChainSnapshot.java
+++ b/core/java/android/security/keystore/recovery/KeyChainSnapshot.java
@@ -17,6 +17,7 @@
package android.security.keystore.recovery;
import android.annotation.NonNull;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -42,6 +43,7 @@
*
* @hide
*/
+@SystemApi
public final class KeyChainSnapshot implements Parcelable {
private static final int DEFAULT_MAX_ATTEMPTS = 10;
private static final long DEFAULT_COUNTER_ID = 1L;
@@ -151,10 +153,10 @@
/**
* Builder for creating {@link KeyChainSnapshot}.
+ * @hide
*/
public static class Builder {
- private KeyChainSnapshot
- mInstance = new KeyChainSnapshot();
+ private KeyChainSnapshot mInstance = new KeyChainSnapshot();
/**
* Snapshot version for given account.
@@ -264,9 +266,6 @@
}
}
- /**
- * @hide
- */
@Override
public void writeToParcel(Parcel out, int flags) {
out.writeInt(mSnapshotVersion);
diff --git a/core/java/android/security/keystore/recovery/KeyDerivationParams.java b/core/java/android/security/keystore/recovery/KeyDerivationParams.java
index 20631b0..fc909a0 100644
--- a/core/java/android/security/keystore/recovery/KeyDerivationParams.java
+++ b/core/java/android/security/keystore/recovery/KeyDerivationParams.java
@@ -18,9 +18,11 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
+
import com.android.internal.util.Preconditions;
import java.lang.annotation.Retention;
@@ -32,6 +34,7 @@
*
* @hide
*/
+@SystemApi
public final class KeyDerivationParams implements Parcelable {
private final int mAlgorithm;
private byte[] mSalt;
@@ -61,6 +64,9 @@
return new KeyDerivationParams(ALGORITHM_SHA256, salt);
}
+ /**
+ * @hide
+ */
// TODO: Make private once legacy API is removed
public KeyDerivationParams(@KeyDerivationAlgorithm int algorithm, @NonNull byte[] salt) {
mAlgorithm = algorithm;
@@ -92,9 +98,6 @@
}
};
- /**
- * @hide
- */
@Override
public void writeToParcel(Parcel out, int flags) {
out.writeInt(mAlgorithm);
diff --git a/core/java/android/security/keystore/recovery/LockScreenRequiredException.java b/core/java/android/security/keystore/recovery/LockScreenRequiredException.java
index acf893b..0062d29 100644
--- a/core/java/android/security/keystore/recovery/LockScreenRequiredException.java
+++ b/core/java/android/security/keystore/recovery/LockScreenRequiredException.java
@@ -16,6 +16,8 @@
package android.security.keystore.recovery;
+import android.annotation.SystemApi;
+
import java.security.GeneralSecurityException;
/**
@@ -25,6 +27,7 @@
*
* @hide
*/
+@SystemApi
public class LockScreenRequiredException extends GeneralSecurityException {
public LockScreenRequiredException(String msg) {
super(msg);
diff --git a/core/java/android/security/keystore/recovery/RecoveryClaim.java b/core/java/android/security/keystore/recovery/RecoveryClaim.java
index 11385d8..45c6b4ff 100644
--- a/core/java/android/security/keystore/recovery/RecoveryClaim.java
+++ b/core/java/android/security/keystore/recovery/RecoveryClaim.java
@@ -20,6 +20,7 @@
* An attempt to recover a keychain protected by remote secure hardware.
*
* @hide
+ * Deprecated
*/
public class RecoveryClaim {
diff --git a/core/java/android/security/keystore/recovery/RecoveryController.java b/core/java/android/security/keystore/recovery/RecoveryController.java
index 2087317..4e4a037 100644
--- a/core/java/android/security/keystore/recovery/RecoveryController.java
+++ b/core/java/android/security/keystore/recovery/RecoveryController.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
+import android.annotation.SystemApi;
import android.app.PendingIntent;
import android.content.Context;
import android.content.pm.PackageManager.NameNotFoundException;
@@ -52,6 +53,7 @@
*
* @hide
*/
+@SystemApi
public class RecoveryController {
private static final String TAG = "RecoveryController";
@@ -169,6 +171,8 @@
}
/**
+ * Deprecated - use getKeyChainSnapshot.
+ *
* Returns data necessary to store all recoverable keys. Key material is
* encrypted with user secret and recovery public key.
*
@@ -177,10 +181,35 @@
* service.
*/
@RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
- public @NonNull KeyChainSnapshot getRecoveryData()
+ public @Nullable KeyChainSnapshot getRecoveryData()
throws InternalRecoveryServiceException {
try {
- return mBinder.getRecoveryData(/*account=*/ new byte[]{});
+ return mBinder.getKeyChainSnapshot();
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ } catch (ServiceSpecificException e) {
+ if (e.errorCode == ERROR_NO_SNAPSHOT_PENDING) {
+ return null;
+ }
+ throw wrapUnexpectedServiceSpecificException(e);
+ }
+ }
+
+ /**
+ * Returns data necessary to store all recoverable keys. Key material is
+ * encrypted with user secret and recovery public key.
+ *
+ * @return Data necessary to recover keystore or {@code null} if snapshot is not available.
+ * @throws InternalRecoveryServiceException if an unexpected error occurred in the recovery
+ * service.
+ *
+ * @hide
+ */
+ @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
+ public @Nullable KeyChainSnapshot getKeyChainSnapshot()
+ throws InternalRecoveryServiceException {
+ try {
+ return mBinder.getKeyChainSnapshot();
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
} catch (ServiceSpecificException e) {
@@ -236,12 +265,13 @@
/**
* Gets aliases of recoverable keys for the application.
+ *
* @param packageName which recoverable keys' aliases will be returned.
*
* @return {@code List} of all aliases.
*/
public List<String> getAliases(@Nullable String packageName)
- throws RemoteException, InternalRecoveryServiceException {
+ throws InternalRecoveryServiceException {
try {
// TODO: update aidl
Map<String, Integer> allStatuses = mBinder.getRecoveryStatus(packageName);
@@ -400,8 +430,8 @@
}
/**
- * Generates a key called {@code alias} and loads it into the recoverable key store. Returns the
- * raw material of the key.
+ * Generates a AES256/GCM/NoPADDING key called {@code alias} and loads it into the recoverable
+ * key store. Returns the raw material of the key.
*
* @param alias The key alias.
* @param account The account associated with the key
diff --git a/core/java/android/security/keystore/recovery/RecoveryControllerException.java b/core/java/android/security/keystore/recovery/RecoveryControllerException.java
index 0fb7c07..2733aca 100644
--- a/core/java/android/security/keystore/recovery/RecoveryControllerException.java
+++ b/core/java/android/security/keystore/recovery/RecoveryControllerException.java
@@ -22,6 +22,7 @@
* Base exception for errors thrown by {@link RecoveryController}.
*
* @hide
+ * Deprecated
*/
public abstract class RecoveryControllerException extends GeneralSecurityException {
RecoveryControllerException() { }
diff --git a/core/java/android/security/keystore/recovery/RecoverySession.java b/core/java/android/security/keystore/recovery/RecoverySession.java
index 11bea96..4db5d6e 100644
--- a/core/java/android/security/keystore/recovery/RecoverySession.java
+++ b/core/java/android/security/keystore/recovery/RecoverySession.java
@@ -17,6 +17,8 @@
package android.security.keystore.recovery;
import android.annotation.NonNull;
+import android.annotation.RequiresPermission;
+import android.annotation.SystemApi;
import android.os.RemoteException;
import android.os.ServiceSpecificException;
import android.util.Log;
@@ -32,6 +34,7 @@
*
* @hide
*/
+@SystemApi
public class RecoverySession implements AutoCloseable {
private static final String TAG = "RecoverySession";
@@ -48,6 +51,7 @@
/**
* A new session, started by {@code recoveryManager}.
*/
+ @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
static RecoverySession newInstance(RecoveryController recoveryController) {
return new RecoverySession(recoveryController, newSessionId());
}
@@ -88,6 +92,7 @@
* @throws InternalRecoveryServiceException if an unexpected error occurred in the recovery
* service.
*/
+ @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
@NonNull public byte[] start(
@NonNull byte[] verifierPublicKey,
@NonNull byte[] vaultParams,
@@ -125,6 +130,7 @@
* @throws DecryptionFailedException if unable to decrypt the snapshot.
* @throws InternalRecoveryServiceException if an error occurs internal to the recovery service.
*/
+ @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
public Map<String, byte[]> recoverKeys(
@NonNull byte[] recoveryKeyBlob,
@NonNull List<WrappedApplicationKey> applicationKeys)
@@ -158,9 +164,8 @@
/**
* Deletes all data associated with {@code session}. Should not be invoked directly but via
* {@link RecoverySession#close()}.
- *
- * @hide
*/
+ @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
@Override
public void close() {
try {
diff --git a/core/java/android/security/keystore/recovery/SessionExpiredException.java b/core/java/android/security/keystore/recovery/SessionExpiredException.java
index abee62e..8c18e41 100644
--- a/core/java/android/security/keystore/recovery/SessionExpiredException.java
+++ b/core/java/android/security/keystore/recovery/SessionExpiredException.java
@@ -16,14 +16,16 @@
package android.security.keystore.recovery;
-import java.security.GeneralSecurityException;
+import android.annotation.SystemApi;
+import java.security.GeneralSecurityException;
/**
* Error thrown when attempting to use a {@link RecoverySession} that has since expired.
*
* @hide
*/
+@SystemApi
public class SessionExpiredException extends GeneralSecurityException {
public SessionExpiredException(String msg) {
super(msg);
diff --git a/core/java/android/security/keystore/recovery/WrappedApplicationKey.java b/core/java/android/security/keystore/recovery/WrappedApplicationKey.java
index 2719137..f360bbe9 100644
--- a/core/java/android/security/keystore/recovery/WrappedApplicationKey.java
+++ b/core/java/android/security/keystore/recovery/WrappedApplicationKey.java
@@ -17,6 +17,8 @@
package android.security.keystore.recovery;
import android.annotation.NonNull;
+import android.annotation.SystemApi;
+
import android.os.Parcel;
import android.os.Parcelable;
@@ -36,6 +38,7 @@
*
* @hide
*/
+@SystemApi
public final class WrappedApplicationKey implements Parcelable {
private String mAlias;
// The only supported format is AES-256 symmetric key.
@@ -143,9 +146,6 @@
}
};
- /**
- * @hide
- */
@Override
public void writeToParcel(Parcel out, int flags) {
out.writeString(mAlias);
diff --git a/core/java/android/service/dreams/DreamService.java b/core/java/android/service/dreams/DreamService.java
index 2a245d0..99e2c62 100644
--- a/core/java/android/service/dreams/DreamService.java
+++ b/core/java/android/service/dreams/DreamService.java
@@ -17,6 +17,7 @@
import android.annotation.IdRes;
import android.annotation.LayoutRes;
+import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
@@ -54,7 +55,6 @@
import java.io.FileDescriptor;
import java.io.PrintWriter;
-import java.util.List;
/**
* Extend this class to implement a custom dream (available to the user as a "Daydream").
@@ -458,8 +458,16 @@
* was processed in {@link #onCreate}.
*
* <p>Note: Requires a window, do not call before {@link #onAttachedToWindow()}</p>
+ * <p>
+ * <strong>Note:</strong> In most cases -- depending on compiler support --
+ * the resulting view is automatically cast to the target class type. If
+ * the target class type is unconstrained, an explicit cast may be
+ * necessary.
*
+ * @param id the ID to search for
* @return The view if found or null otherwise.
+ * @see View#findViewById(int)
+ * @see DreamService#requireViewById(int)
*/
@Nullable
public <T extends View> T findViewById(@IdRes int id) {
@@ -467,6 +475,33 @@
}
/**
+ * Finds a view that was identified by the id attribute from the XML that was processed in
+ * {@link #onCreate}, or throws an IllegalArgumentException if the ID is invalid or there is no
+ * matching view in the hierarchy.
+ *
+ * <p>Note: Requires a window, do not call before {@link #onAttachedToWindow()}</p>
+ * <p>
+ * <strong>Note:</strong> In most cases -- depending on compiler support --
+ * the resulting view is automatically cast to the target class type. If
+ * the target class type is unconstrained, an explicit cast may be
+ * necessary.
+ *
+ * @param id the ID to search for
+ * @return a view with given ID
+ * @see View#requireViewById(int)
+ * @see DreamService#findViewById(int)
+ */
+ @NonNull
+ public final <T extends View> T requireViewById(@IdRes int id) {
+ T view = findViewById(id);
+ if (view == null) {
+ throw new IllegalArgumentException(
+ "ID does not reference a View inside this DreamService");
+ }
+ return view;
+ }
+
+ /**
* Marks this dream as interactive to receive input events.
*
* <p>Non-interactive dreams (default) will dismiss on the first input event.</p>
diff --git a/core/java/android/service/notification/Condition.java b/core/java/android/service/notification/Condition.java
index 2a352ad..b6c6bdc 100644
--- a/core/java/android/service/notification/Condition.java
+++ b/core/java/android/service/notification/Condition.java
@@ -18,11 +18,11 @@
import android.annotation.IntDef;
import android.annotation.SystemApi;
-import android.app.AutomaticZenRule;
import android.content.Context;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
+import android.util.proto.ProtoOutputStream;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -161,6 +161,22 @@
.append(']').toString();
}
+ /** @hide */
+ public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ final long token = proto.start(fieldId);
+
+ // id is guarantreed not to be null.
+ proto.write(ConditionProto.ID, id.toString());
+ proto.write(ConditionProto.SUMMARY, summary);
+ proto.write(ConditionProto.LINE_1, line1);
+ proto.write(ConditionProto.LINE_2, line2);
+ proto.write(ConditionProto.ICON, icon);
+ proto.write(ConditionProto.STATE, state);
+ proto.write(ConditionProto.FLAGS, flags);
+
+ proto.end(token);
+ }
+
@SystemApi
public static String stateToString(int state) {
if (state == STATE_FALSE) return "STATE_FALSE";
diff --git a/core/java/android/service/notification/ZenModeConfig.java b/core/java/android/service/notification/ZenModeConfig.java
index f658ae0..23ae4b9 100644
--- a/core/java/android/service/notification/ZenModeConfig.java
+++ b/core/java/android/service/notification/ZenModeConfig.java
@@ -17,6 +17,7 @@
package android.service.notification;
import android.app.ActivityManager;
+import android.app.NotificationManager;
import android.app.NotificationManager.Policy;
import android.content.ComponentName;
import android.content.Context;
@@ -33,6 +34,7 @@
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Slog;
+import android.util.proto.ProtoOutputStream;
import com.android.internal.R;
@@ -1262,6 +1264,30 @@
.append(']').toString();
}
+ /** @hide */
+ public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ final long token = proto.start(fieldId);
+
+ proto.write(ZenRuleProto.ID, id);
+ proto.write(ZenRuleProto.NAME, name);
+ proto.write(ZenRuleProto.CREATION_TIME_MS, creationTime);
+ proto.write(ZenRuleProto.ENABLED, enabled);
+ proto.write(ZenRuleProto.ENABLER, enabler);
+ proto.write(ZenRuleProto.IS_SNOOZING, snoozing);
+ proto.write(ZenRuleProto.ZEN_MODE, zenMode);
+ if (conditionId != null) {
+ proto.write(ZenRuleProto.CONDITION_ID, conditionId.toString());
+ }
+ if (condition != null) {
+ condition.writeToProto(proto, ZenRuleProto.CONDITION);
+ }
+ if (component != null) {
+ component.writeToProto(proto, ZenRuleProto.COMPONENT);
+ }
+
+ proto.end(token);
+ }
+
private static void appendDiff(Diff d, String item, ZenRule from, ZenRule to) {
if (d == null) return;
if (from == null) {
@@ -1385,4 +1411,38 @@
}
}
+ /**
+ * Determines whether dnd behavior should mute all notification sounds
+ */
+ public static boolean areAllPriorityOnlyNotificationZenSoundsMuted(NotificationManager.Policy
+ policy) {
+ boolean allowReminders = (policy.priorityCategories
+ & NotificationManager.Policy.PRIORITY_CATEGORY_REMINDERS) != 0;
+ boolean allowCalls = (policy.priorityCategories
+ & NotificationManager.Policy.PRIORITY_CATEGORY_CALLS) != 0;
+ boolean allowMessages = (policy.priorityCategories
+ & NotificationManager.Policy.PRIORITY_CATEGORY_MESSAGES) != 0;
+ boolean allowEvents = (policy.priorityCategories
+ & NotificationManager.Policy.PRIORITY_CATEGORY_EVENTS) != 0;
+ boolean allowRepeatCallers = (policy.priorityCategories
+ & NotificationManager.Policy.PRIORITY_CATEGORY_REPEAT_CALLERS) != 0;
+ return !allowReminders && !allowCalls && !allowMessages && !allowEvents
+ && !allowRepeatCallers;
+ }
+
+ /**
+ * Determines whether dnd behavior should mute all notification sounds
+ */
+ public static boolean areAllPriorityOnlyNotificationZenSoundsMuted(ZenModeConfig config) {
+ return !config.allowReminders && !config.allowCalls && !config.allowMessages
+ && !config.allowEvents && !config.allowRepeatCallers;
+ }
+
+ /**
+ * Determines whether all dnd mutes all sounds
+ */
+ public static boolean areAllZenBehaviorSoundsMuted(ZenModeConfig config) {
+ return !config.allowAlarms && !config.allowMediaSystemOther
+ && areAllPriorityOnlyNotificationZenSoundsMuted(config);
+ }
}
diff --git a/core/java/android/text/BoringLayout.java b/core/java/android/text/BoringLayout.java
index ce38ebb..6fa5312 100644
--- a/core/java/android/text/BoringLayout.java
+++ b/core/java/android/text/BoringLayout.java
@@ -347,7 +347,14 @@
TextLine line = TextLine.obtain();
line.set(paint, text, 0, textLength, Layout.DIR_LEFT_TO_RIGHT,
Layout.DIRS_ALL_LEFT_TO_RIGHT, false, null);
- fm.width = (int) Math.ceil(line.metrics(fm));
+ if (text instanceof MeasuredText) {
+ MeasuredText mt = (MeasuredText) text;
+ // Reaching here means there is only one paragraph.
+ MeasuredParagraph mp = mt.getMeasuredParagraph(0);
+ fm.width = (int) Math.ceil(mp.getWidth(0, mp.getTextLength()));
+ } else {
+ fm.width = (int) Math.ceil(line.metrics(fm));
+ }
TextLine.recycle(line);
return fm;
diff --git a/core/java/android/text/MeasuredParagraph.java b/core/java/android/text/MeasuredParagraph.java
index c7d4a4a..aafcf44 100644
--- a/core/java/android/text/MeasuredParagraph.java
+++ b/core/java/android/text/MeasuredParagraph.java
@@ -176,6 +176,15 @@
}
/**
+ * Returns the length of the paragraph.
+ *
+ * This is always available.
+ */
+ public int getTextLength() {
+ return mTextLength;
+ }
+
+ /**
* Returns the characters to be measured.
*
* This is always available.
@@ -212,7 +221,7 @@
/**
* Returns the whole text width.
*
- * This is available only if the MeasureText is computed with computeForMeasurement.
+ * This is available only if the MeasuredParagraph is computed with buildForMeasurement.
* Returns 0 in other cases.
*/
public @FloatRange(from = 0.0f) float getWholeWidth() {
@@ -222,7 +231,7 @@
/**
* Returns the individual character's width.
*
- * This is available only if the MeasureText is computed with computeForMeasurement.
+ * This is available only if the MeasuredParagraph is computed with buildForMeasurement.
* Returns empty array in other cases.
*/
public @NonNull FloatArray getWidths() {
@@ -234,7 +243,7 @@
*
* If the input text is not a spanned string, this has one value that is the length of the text.
*
- * This is available only if the MeasureText is computed with computeForStaticLayout.
+ * This is available only if the MeasuredParagraph is computed with buildForStaticLayout.
* Returns empty array in other cases.
*/
public @NonNull IntArray getSpanEndCache() {
@@ -246,7 +255,7 @@
*
* This array holds the repeat of top, bottom, ascent, descent of font metrics value.
*
- * This is available only if the MeasureText is computed with computeForStaticLayout.
+ * This is available only if the MeasuredParagraph is computed with buildForStaticLayout.
* Returns empty array in other cases.
*/
public @NonNull IntArray getFontMetrics() {
@@ -256,7 +265,7 @@
/**
* Returns the native ptr of the MeasuredParagraph.
*
- * This is available only if the MeasureText is computed with computeForStaticLayout.
+ * This is available only if the MeasuredParagraph is computed with buildForStaticLayout.
* Returns 0 in other cases.
*/
public /* Maybe Zero */ long getNativePtr() {
@@ -264,6 +273,30 @@
}
/**
+ * Returns the width of the given range.
+ *
+ * This is not available if the MeasuredParagraph is computed with buildForBidi.
+ * Returns 0 if the MeasuredParagraph is computed with buildForBidi.
+ *
+ * @param start the inclusive start offset of the target region in the text
+ * @param end the exclusive end offset of the target region in the text
+ */
+ public float getWidth(int start, int end) {
+ if (mNativePtr == 0) {
+ // We have result in Java.
+ final float[] widths = mWidths.getRawArray();
+ float r = 0.0f;
+ for (int i = start; i < end; ++i) {
+ r += widths[i];
+ }
+ return r;
+ } else {
+ // We have result in native.
+ return nGetWidth(mNativePtr, start, end);
+ }
+ }
+
+ /**
* Generates new MeasuredParagraph for Bidi computation.
*
* If recycle is null, this returns new instance. If recycle is not null, this fills computed
@@ -357,6 +390,7 @@
@IntRange(from = 0) int end,
@NonNull TextDirectionHeuristic textDir,
boolean computeHyphenation,
+ boolean computeLayout,
@Nullable MeasuredParagraph recycle) {
final MeasuredParagraph mt = recycle == null ? obtain() : recycle;
mt.resetAndAnalyzeBidi(text, start, end, textDir);
@@ -367,7 +401,7 @@
try {
mt.bindNativeObject(
nBuildNativeMeasuredParagraph(nativeBuilderPtr, mt.mCopiedBuffer,
- computeHyphenation));
+ computeHyphenation, computeLayout));
} finally {
nFreeBuilder(nativeBuilderPtr);
}
@@ -397,7 +431,7 @@
}
}
mt.bindNativeObject(nBuildNativeMeasuredParagraph(nativeBuilderPtr, mt.mCopiedBuffer,
- computeHyphenation));
+ computeHyphenation, computeLayout));
} finally {
nFreeBuilder(nativeBuilderPtr);
}
@@ -595,7 +629,7 @@
*
* If forward=false is passed, returns the minimum index from the end instead.
*
- * This only works if the MeasuredParagraph is computed with computeForMeasurement.
+ * This only works if the MeasuredParagraph is computed with buildForMeasurement.
* Undefined behavior in other case.
*/
@IntRange(from = 0) int breakText(int limit, boolean forwards, float width) {
@@ -626,7 +660,7 @@
/**
* Returns the length of the substring.
*
- * This only works if the MeasuredParagraph is computed with computeForMeasurement.
+ * This only works if the MeasuredParagraph is computed with buildForMeasurement.
* Undefined behavior in other case.
*/
@FloatRange(from = 0.0f) float measure(int start, int limit) {
@@ -638,6 +672,13 @@
return width;
}
+ /**
+ * This only works if the MeasuredParagraph is computed with buildForStaticLayout.
+ */
+ @IntRange(from = 0) int getMemoryUsage() {
+ return nGetMemoryUsage(mNativePtr);
+ }
+
private static native /* Non Zero */ long nInitBuilder();
/**
@@ -672,10 +713,19 @@
private static native long nBuildNativeMeasuredParagraph(/* Non Zero */ long nativeBuilderPtr,
@NonNull char[] text,
- boolean computeHyphenation);
+ boolean computeHyphenation,
+ boolean computeLayout);
private static native void nFreeBuilder(/* Non Zero */ long nativeBuilderPtr);
@CriticalNative
+ private static native float nGetWidth(/* Non Zero */ long nativePtr,
+ @IntRange(from = 0) int start,
+ @IntRange(from = 0) int end);
+
+ @CriticalNative
private static native /* Non Zero */ long nGetReleaseFunc();
+
+ @CriticalNative
+ private static native int nGetMemoryUsage(/* Non Zero */ long nativePtr);
}
diff --git a/core/java/android/text/MeasuredText.java b/core/java/android/text/MeasuredText.java
index b96b489..bb7a9e0 100644
--- a/core/java/android/text/MeasuredText.java
+++ b/core/java/android/text/MeasuredText.java
@@ -155,6 +155,11 @@
* @return the measured text.
*/
public @NonNull MeasuredText build() {
+ return build(true /* build full layout result */);
+ }
+
+ /** @hide */
+ public @NonNull MeasuredText build(boolean computeLayout) {
final boolean needHyphenation = mBreakStrategy != Layout.BREAK_STRATEGY_SIMPLE
&& mHyphenationFrequency != Layout.HYPHENATION_FREQUENCY_NONE;
@@ -175,7 +180,7 @@
paragraphEnds.add(paraEnd);
measuredTexts.add(MeasuredParagraph.buildForStaticLayout(
mPaint, mText, paraStart, paraEnd, mTextDir, needHyphenation,
- null /* no recycle */));
+ computeLayout, null /* no recycle */));
}
return new MeasuredText(mText, mStart, mEnd, mPaint, mTextDir, mBreakStrategy,
@@ -198,7 +203,8 @@
mText = text;
mStart = start;
mEnd = end;
- mPaint = paint;
+ // Copy the paint so that we can keep the reference of typeface in native layout result.
+ mPaint = new TextPaint(paint);
mMeasuredParagraphs = measuredTexts;
mParagraphBreakPoints = paragraphBreakPoints;
mTextDir = textDir;
@@ -283,6 +289,64 @@
return mHyphenationFrequency;
}
+ /**
+ * Returns true if the given TextPaint gives the same result of text layout for this text.
+ * @hide
+ */
+ public boolean canUseMeasuredResult(@NonNull TextPaint paint) {
+ return mPaint.getTextSize() == paint.getTextSize()
+ && mPaint.getTextSkewX() == paint.getTextSkewX()
+ && mPaint.getTextScaleX() == paint.getTextScaleX()
+ && mPaint.getLetterSpacing() == paint.getLetterSpacing()
+ && mPaint.getWordSpacing() == paint.getWordSpacing()
+ && mPaint.getFlags() == paint.getFlags() // Maybe not all flag affects text layout.
+ && mPaint.getTextLocales() == paint.getTextLocales() // need to be equals?
+ && mPaint.getFontVariationSettings() == paint.getFontVariationSettings()
+ && mPaint.getTypeface() == paint.getTypeface()
+ && TextUtils.equals(mPaint.getFontFeatureSettings(), paint.getFontFeatureSettings());
+ }
+
+ /** @hide */
+ public int findParaIndex(@IntRange(from = 0) int pos) {
+ // TODO: Maybe good to remove paragraph concept from MeasuredText and add substring layout
+ // support to StaticLayout.
+ for (int i = 0; i < mParagraphBreakPoints.length; ++i) {
+ if (pos < mParagraphBreakPoints[i]) {
+ return i;
+ }
+ }
+ throw new IndexOutOfBoundsException(
+ "pos must be less than " + mParagraphBreakPoints[mParagraphBreakPoints.length - 1]
+ + ", gave " + pos);
+ }
+
+ /** @hide */
+ public float getWidth(@IntRange(from = 0) int start, @IntRange(from = 0) int end) {
+ final int paraIndex = findParaIndex(start);
+ final int paraStart = getParagraphStart(paraIndex);
+ final int paraEnd = getParagraphEnd(paraIndex);
+ if (start < paraStart || paraEnd < end) {
+ throw new RuntimeException("Cannot measured across the paragraph:"
+ + "para: (" + paraStart + ", " + paraEnd + "), "
+ + "request: (" + start + ", " + end + ")");
+ }
+ return getMeasuredParagraph(paraIndex).getWidth(start - paraStart, end - paraStart);
+ }
+
+ /**
+ * Returns the size of native MeasuredText memory usage
+ *
+ * Note that this may not be aculate. Must be used only for testing purposes.
+ * @hide
+ */
+ public int getMemoryUsage() {
+ int r = 0;
+ for (int i = 0; i < getParagraphCount(); ++i) {
+ r += getMeasuredParagraph(i).getMemoryUsage();
+ }
+ return r;
+ }
+
///////////////////////////////////////////////////////////////////////////////////////////////
// Spanned overrides
//
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java
index 70d6486..e62f421 100644
--- a/core/java/android/text/StaticLayout.java
+++ b/core/java/android/text/StaticLayout.java
@@ -678,7 +678,7 @@
.setTextDirection(textDir)
.setBreakStrategy(b.mBreakStrategy)
.setHyphenationFrequency(b.mHyphenationFrequency)
- .build();
+ .build(false /* full layout is not necessary for line breaking */);
spanned = (source instanceof Spanned) ? (Spanned) source : null;
} else {
final CharSequence original = measured.getText();
@@ -928,8 +928,6 @@
}
}
- // The parameters that are not changed in the method are marked as final to make the code
- // easier to understand.
private int out(final CharSequence text, final int start, final int end, int above, int below,
int top, int bottom, int v, final float spacingmult, final float spacingadd,
final LineHeightSpan[] chooseHt, final int[] chooseHtv, final Paint.FontMetricsInt fm,
@@ -958,21 +956,29 @@
mLineDirections = grow;
}
- lines[off + START] = start;
- lines[off + TOP] = v;
+ if (chooseHt != null) {
+ fm.ascent = above;
+ fm.descent = below;
+ fm.top = top;
+ fm.bottom = bottom;
- // Information about hyphenation, tabs, and directions are needed for determining
- // ellipsization, so the values should be assigned before ellipsization.
+ for (int i = 0; i < chooseHt.length; i++) {
+ if (chooseHt[i] instanceof LineHeightSpan.WithDensity) {
+ ((LineHeightSpan.WithDensity) chooseHt[i])
+ .chooseHeight(text, start, end, chooseHtv[i], v, fm, paint);
+ } else {
+ chooseHt[i].chooseHeight(text, start, end, chooseHtv[i], v, fm);
+ }
+ }
- // TODO: could move TAB to share same column as HYPHEN, simplifying this code and gaining
- // one bit for start field
- lines[off + TAB] |= flags & TAB_MASK;
- lines[off + HYPHEN] = flags;
- lines[off + DIR] |= dir << DIR_SHIFT;
- mLineDirections[j] = measured.getDirections(start - widthStart, end - widthStart);
+ above = fm.ascent;
+ below = fm.descent;
+ top = fm.top;
+ bottom = fm.bottom;
+ }
- final boolean firstLine = (j == 0);
- final boolean currentLineIsTheLastVisibleOne = (j + 1 == mMaximumVisibleLineCount);
+ boolean firstLine = (j == 0);
+ boolean currentLineIsTheLastVisibleOne = (j + 1 == mMaximumVisibleLineCount);
if (ellipsize != null) {
// If there is only one line, then do any type of ellipsis except when it is MARQUEE
@@ -985,9 +991,9 @@
(!firstLine && (currentLineIsTheLastVisibleOne || !moreChars) &&
ellipsize == TextUtils.TruncateAt.END);
if (doEllipsis) {
- calculateEllipsis(text, start, end, widths, widthStart,
- ellipsisWidth - getTotalInsets(j), ellipsize, j,
- textWidth, paint, forceEllipsis, dir);
+ calculateEllipsis(start, end, widths, widthStart,
+ ellipsisWidth, ellipsize, j,
+ textWidth, paint, forceEllipsis);
}
}
@@ -1006,28 +1012,6 @@
}
}
- if (chooseHt != null) {
- fm.ascent = above;
- fm.descent = below;
- fm.top = top;
- fm.bottom = bottom;
-
- for (int i = 0; i < chooseHt.length; i++) {
- if (chooseHt[i] instanceof LineHeightSpan.WithDensity) {
- ((LineHeightSpan.WithDensity) chooseHt[i])
- .chooseHeight(text, start, end, chooseHtv[i], v, fm, paint);
-
- } else {
- chooseHt[i].chooseHeight(text, start, end, chooseHtv[i], v, fm);
- }
- }
-
- above = fm.ascent;
- below = fm.descent;
- top = fm.top;
- bottom = fm.bottom;
- }
-
if (firstLine) {
if (trackPad) {
mTopPadding = top - above;
@@ -1038,6 +1022,8 @@
}
}
+ int extra;
+
if (lastLine) {
if (trackPad) {
mBottomPadding = bottom - below;
@@ -1048,9 +1034,8 @@
}
}
- final int extra;
if (needMultiply && (addLastLineLineSpacing || !lastLine)) {
- final double ex = (below - above) * (spacingmult - 1) + spacingadd;
+ double ex = (below - above) * (spacingmult - 1) + spacingadd;
if (ex >= 0) {
extra = (int)(ex + EXTRA_ROUNDING);
} else {
@@ -1060,6 +1045,8 @@
extra = 0;
}
+ lines[off + START] = start;
+ lines[off + TOP] = v;
lines[off + DESCENT] = below + extra;
lines[off + EXTRA] = extra;
@@ -1067,7 +1054,7 @@
// store the height as if it was ellipsized
if (!mEllipsized && currentLineIsTheLastVisibleOne) {
// below calculation as if it was the last line
- final int maxLineBelow = includePad ? bottom : below;
+ int maxLineBelow = includePad ? bottom : below;
// similar to the calculation of v below, without the extra.
mMaxLineHeight = v + (maxLineBelow - above);
}
@@ -1076,13 +1063,23 @@
lines[off + mColumns + START] = end;
lines[off + mColumns + TOP] = v;
+ // TODO: could move TAB to share same column as HYPHEN, simplifying this code and gaining
+ // one bit for start field
+ lines[off + TAB] |= flags & TAB_MASK;
+ lines[off + HYPHEN] = flags;
+ lines[off + DIR] |= dir << DIR_SHIFT;
+ mLineDirections[j] = measured.getDirections(start - widthStart, end - widthStart);
+
mLineCount++;
return v;
}
- private void calculateEllipsis(CharSequence text, int lineStart, int lineEnd, float[] widths,
- int widthStart, float avail, TextUtils.TruncateAt where, int line, float textWidth,
- TextPaint paint, boolean forceEllipsis, int dir) {
+ private void calculateEllipsis(int lineStart, int lineEnd,
+ float[] widths, int widthStart,
+ float avail, TextUtils.TruncateAt where,
+ int line, float textWidth, TextPaint paint,
+ boolean forceEllipsis) {
+ avail -= getTotalInsets(line);
if (textWidth <= avail && !forceEllipsis) {
// Everything fits!
mLines[mColumns * line + ELLIPSIS_START] = 0;
@@ -1090,53 +1087,11 @@
return;
}
- float tempAvail = avail;
- int numberOfTries = 0;
- boolean lineFits = false;
- mWorkPaint.set(paint);
- do {
- final float ellipsizedWidth = guessEllipsis(text, lineStart, lineEnd, widths,
- widthStart, tempAvail, where, line, mWorkPaint, forceEllipsis, dir);
- if (ellipsizedWidth <= avail) {
- lineFits = true;
- } else {
- numberOfTries++;
- if (numberOfTries > 10) {
- // If the text still doesn't fit after ten tries, assume it will never fit and
- // ellipsize it all.
- mLines[mColumns * line + ELLIPSIS_START] = 0;
- mLines[mColumns * line + ELLIPSIS_COUNT] = lineEnd - lineStart;
- lineFits = true;
- } else {
- // Some side effect of ellipsization has caused the text to go over the
- // available width. Let's make the available width shorter by exactly that
- // amount and retry.
- tempAvail -= ellipsizedWidth - avail;
- }
- }
- } while (!lineFits);
- mEllipsized = true;
- }
+ float ellipsisWidth = paint.measureText(TextUtils.getEllipsisString(where));
+ int ellipsisStart = 0;
+ int ellipsisCount = 0;
+ int len = lineEnd - lineStart;
- // Returns the width of the ellipsized line which in some rare cases can actually be larger
- // than 'avail' (due to kerning or other context-based effect of replacement of text by
- // ellipsis). If all the line needs to ellipsized away, or it's an invalud hyphenation mode,
- // returns 0 so the caller can stop iterating.
- //
- // This method temporarily modifies the TextPaint passed to it, so the TextPaint passed to it
- // should not be accessed while the method is running.
- private float guessEllipsis(CharSequence text, int lineStart, int lineEnd, float[] widths,
- int widthStart, float avail, TextUtils.TruncateAt where, int line,
- TextPaint paint, boolean forceEllipsis, int dir) {
- final int savedHyphenEdit = paint.getHyphenEdit();
- paint.setHyphenEdit(0);
- final float ellipsisWidth = paint.measureText(TextUtils.getEllipsisString(where));
- final int ellipsisStart;
- final int ellipsisCount;
- final int len = lineEnd - lineStart;
- final int offset = lineStart - widthStart;
-
- int hyphen = getHyphen(line);
// We only support start ellipsis on a single line
if (where == TextUtils.TruncateAt.START) {
if (mMaximumVisibleLineCount == 1) {
@@ -1144,9 +1099,9 @@
int i;
for (i = len; i > 0; i--) {
- final float w = widths[i - 1 + offset];
+ float w = widths[i - 1 + lineStart - widthStart];
if (w + sum + ellipsisWidth > avail) {
- while (i < len && widths[i + offset] == 0.0f) {
+ while (i < len && widths[i + lineStart - widthStart] == 0.0f) {
i++;
}
break;
@@ -1157,13 +1112,9 @@
ellipsisStart = 0;
ellipsisCount = i;
- // Strip the potential hyphenation at beginning of line.
- hyphen &= ~Paint.HYPHENEDIT_MASK_START_OF_LINE;
} else {
- ellipsisStart = 0;
- ellipsisCount = 0;
if (Log.isLoggable(TAG, Log.WARN)) {
- Log.w(TAG, "Start ellipsis only supported with one line");
+ Log.w(TAG, "Start Ellipsis only supported with one line");
}
}
} else if (where == TextUtils.TruncateAt.END || where == TextUtils.TruncateAt.MARQUEE ||
@@ -1172,7 +1123,7 @@
int i;
for (i = 0; i < len; i++) {
- final float w = widths[i + offset];
+ float w = widths[i + lineStart - widthStart];
if (w + sum + ellipsisWidth > avail) {
break;
@@ -1181,27 +1132,24 @@
sum += w;
}
- if (forceEllipsis && i == len && len > 0) {
+ ellipsisStart = i;
+ ellipsisCount = len - i;
+ if (forceEllipsis && ellipsisCount == 0 && len > 0) {
ellipsisStart = len - 1;
ellipsisCount = 1;
- } else {
- ellipsisStart = i;
- ellipsisCount = len - i;
}
- // Strip the potential hyphenation at end of line.
- hyphen &= ~Paint.HYPHENEDIT_MASK_END_OF_LINE;
- } else { // where = TextUtils.TruncateAt.MIDDLE
- // We only support middle ellipsis on a single line.
+ } else {
+ // where = TextUtils.TruncateAt.MIDDLE We only support middle ellipsis on a single line
if (mMaximumVisibleLineCount == 1) {
float lsum = 0, rsum = 0;
int left = 0, right = len;
- final float ravail = (avail - ellipsisWidth) / 2;
+ float ravail = (avail - ellipsisWidth) / 2;
for (right = len; right > 0; right--) {
- final float w = widths[right - 1 + offset];
+ float w = widths[right - 1 + lineStart - widthStart];
if (w + rsum > ravail) {
- while (right < len && widths[right + offset] == 0.0f) {
+ while (right < len && widths[right + lineStart - widthStart] == 0.0f) {
right++;
}
break;
@@ -1209,9 +1157,9 @@
rsum += w;
}
- final float lavail = avail - ellipsisWidth - rsum;
+ float lavail = avail - ellipsisWidth - rsum;
for (left = 0; left < right; left++) {
- final float w = widths[left + offset];
+ float w = widths[left + lineStart - widthStart];
if (w + lsum > lavail) {
break;
@@ -1223,53 +1171,14 @@
ellipsisStart = left;
ellipsisCount = right - left;
} else {
- ellipsisStart = 0;
- ellipsisCount = 0;
if (Log.isLoggable(TAG, Log.WARN)) {
- Log.w(TAG, "Middle ellipsis only supported with one line");
+ Log.w(TAG, "Middle Ellipsis only supported with one line");
}
}
}
+ mEllipsized = true;
mLines[mColumns * line + ELLIPSIS_START] = ellipsisStart;
mLines[mColumns * line + ELLIPSIS_COUNT] = ellipsisCount;
-
- if (ellipsisStart == 0 && (ellipsisCount == 0 || ellipsisCount == len)) {
- // Unsupported ellipsization mode or all text is ellipsized away. Return 0.
- return 0.0f;
- }
-
- final boolean isSpanned = text instanceof Spanned;
- final Ellipsizer ellipsizedText = isSpanned
- ? new SpannedEllipsizer(text)
- : new Ellipsizer(text);
- ellipsizedText.mLayout = this;
- ellipsizedText.mMethod = where;
-
- final boolean hasTabs = getLineContainsTab(line);
- final TabStops tabStops;
- if (hasTabs && isSpanned) {
- final TabStopSpan[] tabs = getParagraphSpans((Spanned) ellipsizedText, lineStart,
- lineEnd, TabStopSpan.class);
- if (tabs.length == 0) {
- tabStops = null;
- } else {
- tabStops = new TabStops(TAB_INCREMENT, tabs);
- }
- } else {
- tabStops = null;
- }
- paint.setHyphenEdit(hyphen);
- final TextLine textline = TextLine.obtain();
- textline.set(paint, ellipsizedText, lineStart, lineEnd, dir, getLineDirections(line),
- hasTabs, tabStops);
- // Since TextLine.metric() returns negative values for RTL text, multiplication by dir
- // converts it to an actual width. Note that we don't want to use the absolute value,
- // since we may actually have glyphs with negative advances, which by definition always
- // fit.
- final float ellipsizedWidth = textline.metrics(null) * dir;
- TextLine.recycle(textline);
- paint.setHyphenEdit(savedHyphenEdit);
- return ellipsizedWidth;
}
private float getTotalInsets(int line) {
@@ -1509,8 +1418,6 @@
*/
private int mMaxLineHeight = DEFAULT_MAX_LINE_HEIGHT;
- private TextPaint mWorkPaint = new TextPaint();
-
private static final int COLUMNS_NORMAL = 5;
private static final int COLUMNS_ELLIPSIZE = 7;
private static final int START = 0;
diff --git a/core/java/android/text/TextLine.java b/core/java/android/text/TextLine.java
index 86cc0141..55367dc 100644
--- a/core/java/android/text/TextLine.java
+++ b/core/java/android/text/TextLine.java
@@ -60,6 +60,7 @@
private char[] mChars;
private boolean mCharsValid;
private Spanned mSpanned;
+ private MeasuredText mMeasured;
// Additional width of whitespace for justification. This value is per whitespace, thus
// the line width will increase by mAddedWidth x (number of stretchable whitespaces).
@@ -118,6 +119,7 @@
tl.mSpanned = null;
tl.mTabs = null;
tl.mChars = null;
+ tl.mMeasured = null;
tl.mMetricAffectingSpanSpanSet.recycle();
tl.mCharacterStyleSpanSet.recycle();
@@ -168,6 +170,14 @@
hasReplacement = mReplacementSpanSpanSet.numberOfSpans > 0;
}
+ mMeasured = null;
+ if (text instanceof MeasuredText) {
+ MeasuredText mt = (MeasuredText) text;
+ if (mt.canUseMeasuredResult(paint)) {
+ mMeasured = mt;
+ }
+ }
+
mCharsValid = hasReplacement || hasTabs || directions != Layout.DIRS_ALL_LEFT_TO_RIGHT;
if (mCharsValid) {
@@ -736,8 +746,13 @@
return wp.getRunAdvance(mChars, start, end, contextStart, contextEnd, runIsRtl, offset);
} else {
final int delta = mStart;
- return wp.getRunAdvance(mText, delta + start, delta + end,
- delta + contextStart, delta + contextEnd, runIsRtl, delta + offset);
+ if (mMeasured == null) {
+ // TODO: Enable measured getRunAdvance for ReplacementSpan and RTL text.
+ return wp.getRunAdvance(mText, delta + start, delta + end,
+ delta + contextStart, delta + contextEnd, runIsRtl, delta + offset);
+ } else {
+ return mMeasured.getWidth(start + delta, end + delta);
+ }
}
}
diff --git a/core/java/android/text/TextUtils.java b/core/java/android/text/TextUtils.java
index 409e514..af0eebf 100644
--- a/core/java/android/text/TextUtils.java
+++ b/core/java/android/text/TextUtils.java
@@ -88,8 +88,8 @@
/** {@hide} */
@NonNull
- public static String getEllipsisString(@NonNull TruncateAt method) {
- return (method == TruncateAt.END_SMALL) ? ELLIPSIS_TWO_DOTS : ELLIPSIS_NORMAL;
+ public static String getEllipsisString(@NonNull TextUtils.TruncateAt method) {
+ return (method == TextUtils.TruncateAt.END_SMALL) ? ELLIPSIS_TWO_DOTS : ELLIPSIS_NORMAL;
}
@@ -1194,11 +1194,9 @@
* or, if it does not fit, a truncated
* copy with ellipsis character added at the specified edge or center.
*/
- @NonNull
- public static CharSequence ellipsize(@NonNull CharSequence text,
- @NonNull TextPaint p,
- @FloatRange(from = 0.0) float avail,
- @NonNull TruncateAt where) {
+ public static CharSequence ellipsize(CharSequence text,
+ TextPaint p,
+ float avail, TruncateAt where) {
return ellipsize(text, p, avail, where, false, null);
}
@@ -1214,11 +1212,9 @@
* report the start and end of the ellipsized range. TextDirection
* is determined by the first strong directional character.
*/
- @NonNull
- public static CharSequence ellipsize(@NonNull CharSequence text,
- @NonNull TextPaint paint,
- @FloatRange(from = 0.0) float avail,
- @NonNull TruncateAt where,
+ public static CharSequence ellipsize(CharSequence text,
+ TextPaint paint,
+ float avail, TruncateAt where,
boolean preserveLength,
@Nullable EllipsizeCallback callback) {
return ellipsize(text, paint, avail, where, preserveLength, callback,
@@ -1239,19 +1235,16 @@
*
* @hide
*/
- @NonNull
- public static CharSequence ellipsize(@NonNull CharSequence text,
- @NonNull TextPaint paint,
- @FloatRange(from = 0.0) float avail,
- @NonNull TruncateAt where,
+ public static CharSequence ellipsize(CharSequence text,
+ TextPaint paint,
+ float avail, TruncateAt where,
boolean preserveLength,
@Nullable EllipsizeCallback callback,
- @NonNull TextDirectionHeuristic textDir,
- @NonNull String ellipsis) {
+ TextDirectionHeuristic textDir, String ellipsis) {
- final int len = text.length();
+ int len = text.length();
+
MeasuredParagraph mt = null;
- MeasuredParagraph resultMt = null;
try {
mt = MeasuredParagraph.buildForMeasurement(paint, text, 0, text.length(), textDir, mt);
float width = mt.getWholeWidth();
@@ -1260,110 +1253,76 @@
if (callback != null) {
callback.ellipsized(0, 0);
}
+
return text;
}
- // First estimate of effective width of ellipsis.
- float ellipsisWidth = paint.measureText(ellipsis);
- int numberOfTries = 0;
- boolean textFits = false;
- int start, end;
- CharSequence result;
- do {
- if (avail < ellipsisWidth) {
- // Even the ellipsis can't fit. So it all goes.
- start = 0;
- end = len;
- } else {
- final float remainingWidth = avail - ellipsisWidth;
- if (where == TruncateAt.START) {
- start = 0;
- end = len - mt.breakText(len, false /* backwards */, remainingWidth);
- } else if (where == TruncateAt.END || where == TruncateAt.END_SMALL) {
- start = mt.breakText(len, true /* forwards */, remainingWidth);
- end = len;
- } else {
- end = len - mt.breakText(len, false /* backwards */, remainingWidth / 2);
- start = mt.breakText(end, true /* forwards */,
- remainingWidth - mt.measure(end, len));
- }
- }
+ // XXX assumes ellipsis string does not require shaping and
+ // is unaffected by style
+ float ellipsiswid = paint.measureText(ellipsis);
+ avail -= ellipsiswid;
- final char[] buf = mt.getChars();
- final Spanned sp = text instanceof Spanned ? (Spanned) text : null;
-
- final int removed = end - start;
- final int remaining = len - removed;
- if (preserveLength) {
- int pos = start;
- if (remaining > 0 && removed >= ellipsis.length()) {
- ellipsis.getChars(0, ellipsis.length(), buf, start);
- pos += ellipsis.length();
- } // else eliminate the ellipsis
- while (pos < end) {
- buf[pos++] = ELLIPSIS_FILLER;
- }
- final String s = new String(buf, 0, len);
- if (sp == null) {
- result = s;
- } else {
- final SpannableString ss = new SpannableString(s);
- copySpansFrom(sp, 0, len, Object.class, ss, 0);
- result = ss;
- }
- } else {
- if (remaining == 0) {
- result = "";
- } else if (sp == null) {
- final StringBuilder sb = new StringBuilder(remaining + ellipsis.length());
- sb.append(buf, 0, start);
- sb.append(ellipsis);
- sb.append(buf, end, len - end);
- result = sb.toString();
- } else {
- final SpannableStringBuilder ssb = new SpannableStringBuilder();
- ssb.append(text, 0, start);
- ssb.append(ellipsis);
- ssb.append(text, end, len);
- result = ssb;
- }
- }
-
- if (remaining == 0) { // All text is gone.
- textFits = true;
- } else {
- resultMt = MeasuredParagraph.buildForMeasurement(
- paint, result, 0, result.length(), textDir, resultMt);
- width = resultMt.getWholeWidth();
- if (width <= avail) {
- textFits = true;
- } else {
- numberOfTries++;
- if (numberOfTries > 10) {
- // If the text still doesn't fit after ten tries, assume it will never
- // fit and ellipsize it all. We do this by setting the width of the
- // ellipsis to be positive infinity, so we get to empty text in the next
- // round.
- ellipsisWidth = Float.POSITIVE_INFINITY;
- } else {
- // Adjust the width of the ellipsis by adding the amount 'width' is
- // still over.
- ellipsisWidth += width - avail;
- }
- }
- }
- } while (!textFits);
- if (callback != null) {
- callback.ellipsized(start, end);
+ int left = 0;
+ int right = len;
+ if (avail < 0) {
+ // it all goes
+ } else if (where == TruncateAt.START) {
+ right = len - mt.breakText(len, false, avail);
+ } else if (where == TruncateAt.END || where == TruncateAt.END_SMALL) {
+ left = mt.breakText(len, true, avail);
+ } else {
+ right = len - mt.breakText(len, false, avail / 2);
+ avail -= mt.measure(right, len);
+ left = mt.breakText(right, true, avail);
}
- return result;
+
+ if (callback != null) {
+ callback.ellipsized(left, right);
+ }
+
+ final char[] buf = mt.getChars();
+ Spanned sp = text instanceof Spanned ? (Spanned) text : null;
+
+ final int removed = right - left;
+ final int remaining = len - removed;
+ if (preserveLength) {
+ if (remaining > 0 && removed >= ellipsis.length()) {
+ ellipsis.getChars(0, ellipsis.length(), buf, left);
+ left += ellipsis.length();
+ } // else skip the ellipsis
+ for (int i = left; i < right; i++) {
+ buf[i] = ELLIPSIS_FILLER;
+ }
+ String s = new String(buf, 0, len);
+ if (sp == null) {
+ return s;
+ }
+ SpannableString ss = new SpannableString(s);
+ copySpansFrom(sp, 0, len, Object.class, ss, 0);
+ return ss;
+ }
+
+ if (remaining == 0) {
+ return "";
+ }
+
+ if (sp == null) {
+ StringBuilder sb = new StringBuilder(remaining + ellipsis.length());
+ sb.append(buf, 0, left);
+ sb.append(ellipsis);
+ sb.append(buf, right, len - right);
+ return sb.toString();
+ }
+
+ SpannableStringBuilder ssb = new SpannableStringBuilder();
+ ssb.append(text, 0, left);
+ ssb.append(ellipsis);
+ ssb.append(text, right, len);
+ return ssb;
} finally {
if (mt != null) {
mt.recycle();
}
- if (resultMt != null) {
- resultMt.recycle();
- }
}
}
@@ -1394,6 +1353,7 @@
* @return the formatted CharSequence. If even the shortest sequence (e.g. {@code "A, 11 more"})
* doesn't fit, it will return an empty string.
*/
+
public static CharSequence listEllipsize(@Nullable Context context,
@Nullable List<CharSequence> elements, @NonNull String separator,
@NonNull TextPaint paint, @FloatRange(from=0.0,fromInclusive=false) float avail,
diff --git a/core/java/android/text/style/AlignmentSpan.java b/core/java/android/text/style/AlignmentSpan.java
index 6158309..18c3e16 100644
--- a/core/java/android/text/style/AlignmentSpan.java
+++ b/core/java/android/text/style/AlignmentSpan.java
@@ -16,49 +16,90 @@
package android.text.style;
+import android.annotation.NonNull;
import android.os.Parcel;
import android.text.Layout;
import android.text.ParcelableSpan;
import android.text.TextUtils;
+/**
+ * Span that allows defining the alignment of text at the paragraph level.
+ */
public interface AlignmentSpan extends ParagraphStyle {
+
+ /**
+ * Returns the alignment of the text.
+ *
+ * @return the text alignment
+ */
Layout.Alignment getAlignment();
+ /**
+ * Default implementation of the {@link AlignmentSpan}.
+ * <p>
+ * For example, a text written in a left to right language, like English, which is by default
+ * aligned to the left, can be aligned opposite to the layout direction like this:
+ * <pre>{@code SpannableString string = new SpannableString("Text with opposite alignment");
+ *string.setSpan(new AlignmentSpan.Standard(Layout.Alignment.ALIGN_OPPOSITE), 0,
+ *string.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);}</pre>
+ * <img src="{@docRoot}reference/android/images/text/style/ltralignmentspan.png" />
+ * <figcaption>Align left to right text opposite to the layout direction.</figcaption>
+ * <p>
+ * A text written in a right to left language, like Hebrew, which is by default aligned to the
+ * right, can be aligned opposite to the layout direction like this:
+ * <pre>{@code SpannableString string = new SpannableString("טקסט עם יישור הפוך");
+ *string.setSpan(new AlignmentSpan.Standard(Layout.Alignment.ALIGN_OPPOSITE), 0,
+ *string.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);}</pre>
+ * <img src="{@docRoot}reference/android/images/text/style/rtlalignmentspan.png" />
+ * <figcaption>Align right to left text opposite to the layout direction.</figcaption>
+ */
class Standard implements AlignmentSpan, ParcelableSpan {
- public Standard(Layout.Alignment align) {
+ private final Layout.Alignment mAlignment;
+
+ /**
+ * Constructs a {@link Standard} from an alignment.
+ */
+ public Standard(@NonNull Layout.Alignment align) {
mAlignment = align;
}
- public Standard(Parcel src) {
+ /**
+ * Constructs a {@link Standard} from a parcel.
+ */
+ public Standard(@NonNull Parcel src) {
mAlignment = Layout.Alignment.valueOf(src.readString());
}
-
- public int getSpanTypeId() {
- return getSpanTypeIdInternal();
- }
- /** @hide */
- public int getSpanTypeIdInternal() {
+ @Override
+ public int getSpanTypeId() {
+ return getSpanTypeIdInternal();
+ }
+
+ /** @hide */
+ @Override
+ public int getSpanTypeIdInternal() {
return TextUtils.ALIGNMENT_SPAN;
}
-
+
+ @Override
public int describeContents() {
return 0;
}
- public void writeToParcel(Parcel dest, int flags) {
+ @Override
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
writeToParcelInternal(dest, flags);
}
/** @hide */
- public void writeToParcelInternal(Parcel dest, int flags) {
+ @Override
+ public void writeToParcelInternal(@NonNull Parcel dest, int flags) {
dest.writeString(mAlignment.name());
}
+ @Override
public Layout.Alignment getAlignment() {
return mAlignment;
}
-
- private final Layout.Alignment mAlignment;
}
}
diff --git a/core/java/android/text/style/ClickableSpan.java b/core/java/android/text/style/ClickableSpan.java
index b098f16..60aed2a 100644
--- a/core/java/android/text/style/ClickableSpan.java
+++ b/core/java/android/text/style/ClickableSpan.java
@@ -16,6 +16,7 @@
package android.text.style;
+import android.annotation.NonNull;
import android.text.TextPaint;
import android.view.View;
@@ -24,6 +25,16 @@
* with a movement method of LinkMovementMethod, the affected spans of
* text can be selected. If selected and clicked, the {@link #onClick} method will
* be called.
+ * <p>
+ * The text with a <code>ClickableSpan</code> attached will be underlined and the link color will be
+ * used as a text color. The default link color is the theme's accent color or
+ * <code>android:textColorLink</code> if this attribute is defined in the theme.
+ * For example, considering that we have a <code>CustomClickableSpan</code> that extends
+ * <code>ClickableSpan</code>, it can be used like this:
+ * <pre>{@code SpannableString string = new SpannableString("Text with clickable text");
+ *string.setSpan(new CustomClickableSpan(), 10, 19, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);}</pre>
+ * <img src="{@docRoot}reference/android/images/text/style/clickablespan.png" />
+ * <figcaption>Text with <code>ClickableSpan</code>.</figcaption>
*/
public abstract class ClickableSpan extends CharacterStyle implements UpdateAppearance {
private static int sIdCounter = 0;
@@ -33,13 +44,13 @@
/**
* Performs the click action associated with this span.
*/
- public abstract void onClick(View widget);
+ public abstract void onClick(@NonNull View widget);
/**
* Makes the text underlined and in the link color.
*/
@Override
- public void updateDrawState(TextPaint ds) {
+ public void updateDrawState(@NonNull TextPaint ds) {
ds.setColor(ds.linkColor);
ds.setUnderlineText(true);
}
diff --git a/core/java/android/text/style/EasyEditSpan.java b/core/java/android/text/style/EasyEditSpan.java
index 7af1c2c..9ee0b07 100644
--- a/core/java/android/text/style/EasyEditSpan.java
+++ b/core/java/android/text/style/EasyEditSpan.java
@@ -16,6 +16,7 @@
package android.text.style;
+import android.annotation.NonNull;
import android.app.PendingIntent;
import android.os.Parcel;
import android.text.ParcelableSpan;
@@ -79,7 +80,7 @@
/**
* Constructor called from {@link TextUtils} to restore the span.
*/
- public EasyEditSpan(Parcel source) {
+ public EasyEditSpan(@NonNull Parcel source) {
mPendingIntent = source.readParcelable(null);
mDeleteEnabled = (source.readByte() == 1);
}
@@ -90,12 +91,12 @@
}
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
writeToParcelInternal(dest, flags);
}
/** @hide */
- public void writeToParcelInternal(Parcel dest, int flags) {
+ public void writeToParcelInternal(@NonNull Parcel dest, int flags) {
dest.writeParcelable(mPendingIntent, 0);
dest.writeByte((byte) (mDeleteEnabled ? 1 : 0));
}
diff --git a/core/java/android/text/style/MetricAffectingSpan.java b/core/java/android/text/style/MetricAffectingSpan.java
index 853ecc6..61b7947 100644
--- a/core/java/android/text/style/MetricAffectingSpan.java
+++ b/core/java/android/text/style/MetricAffectingSpan.java
@@ -16,6 +16,7 @@
package android.text.style;
+import android.annotation.NonNull;
import android.text.TextPaint;
/**
@@ -23,13 +24,19 @@
* changes the width or height of characters extend this class.
*/
public abstract class MetricAffectingSpan
-extends CharacterStyle
-implements UpdateLayout {
-
- public abstract void updateMeasureState(TextPaint p);
+ extends CharacterStyle
+ implements UpdateLayout {
/**
- * Returns "this" for most MetricAffectingSpans, but for
+ * Classes that extend MetricAffectingSpan implement this method to update the text formatting
+ * in a way that can change the width or height of characters.
+ *
+ * @param textPaint the paint used for drawing the text
+ */
+ public abstract void updateMeasureState(@NonNull TextPaint textPaint);
+
+ /**
+ * Returns "this" for most MetricAffectingSpans, but for
* MetricAffectingSpans that were generated by {@link #wrap},
* returns the underlying MetricAffectingSpan.
*/
@@ -41,18 +48,18 @@
/**
* A Passthrough MetricAffectingSpan is one that
* passes {@link #updateDrawState} and {@link #updateMeasureState}
- * calls through to the specified MetricAffectingSpan
+ * calls through to the specified MetricAffectingSpan
* while still being a distinct object,
* and is therefore able to be attached to the same Spannable
* to which the specified MetricAffectingSpan is already attached.
*/
/* package */ static class Passthrough extends MetricAffectingSpan {
private MetricAffectingSpan mStyle;
-
+
/**
* Creates a new Passthrough of the specfied MetricAffectingSpan.
*/
- public Passthrough(MetricAffectingSpan cs) {
+ Passthrough(@NonNull MetricAffectingSpan cs) {
mStyle = cs;
}
@@ -60,7 +67,7 @@
* Passes updateDrawState through to the underlying MetricAffectingSpan.
*/
@Override
- public void updateDrawState(TextPaint tp) {
+ public void updateDrawState(@NonNull TextPaint tp) {
mStyle.updateDrawState(tp);
}
@@ -68,10 +75,10 @@
* Passes updateMeasureState through to the underlying MetricAffectingSpan.
*/
@Override
- public void updateMeasureState(TextPaint tp) {
+ public void updateMeasureState(@NonNull TextPaint tp) {
mStyle.updateMeasureState(tp);
}
-
+
/**
* Returns the MetricAffectingSpan underlying this one, or the one
* underlying it if it too is a Passthrough.
diff --git a/core/java/android/text/style/QuoteSpan.java b/core/java/android/text/style/QuoteSpan.java
index 7217e1e..a1c12c2 100644
--- a/core/java/android/text/style/QuoteSpan.java
+++ b/core/java/android/text/style/QuoteSpan.java
@@ -17,6 +17,9 @@
package android.text.style;
import android.annotation.ColorInt;
+import android.annotation.IntRange;
+import android.annotation.NonNull;
+import android.annotation.Px;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.os.Parcel;
@@ -24,68 +27,178 @@
import android.text.ParcelableSpan;
import android.text.TextUtils;
+/**
+ * A span which styles paragraphs by adding a vertical stripe at the beginning of the text
+ * (respecting layout direction).
+ * <p>
+ * A <code>QuoteSpan</code> must be attached from the first character to the last character of a
+ * single paragraph, otherwise the span will not be displayed.
+ * <p>
+ * <code>QuoteSpans</code> allow configuring the following elements:
+ * <ul>
+ * <li><b>color</b> - the vertical stripe color. By default, the stripe color is 0xff0000ff</li>
+ * <li><b>gap width</b> - the distance, in pixels, between the stripe and the paragraph.
+ * Default value is 2px.</li>
+ * <li><b>stripe width</b> - the width, in pixels, of the stripe. Default value is
+ * 2px.</li>
+ * </ul>
+ * For example, a <code>QuoteSpan</code> using the default values can be constructed like this:
+ * <pre>{@code SpannableString string = new SpannableString("Text with quote span on a long line");
+ *string.setSpan(new QuoteSpan(), 0, string.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);}</pre>
+ * <img src="{@docRoot}reference/android/images/text/style/defaultquotespan.png" />
+ * <figcaption><code>QuoteSpan</code> constructed with default values.</figcaption>
+ * <p>
+ * <p>
+ * To construct a <code>QuoteSpan</code> with a green stripe, of 20px in width and a gap width of
+ * 40px:
+ * <pre>{@code SpannableString string = new SpannableString("Text with quote span on a long line");
+ *string.setSpan(new QuoteSpan(Color.GREEN, 20, 40), 0, string.length(),
+ *Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);}</pre>
+ * <img src="{@docRoot}reference/android/images/text/style/customquotespan.png" />
+ * <figcaption>Customized <code>QuoteSpan</code>.</figcaption>
+ */
public class QuoteSpan implements LeadingMarginSpan, ParcelableSpan {
- private static final int STRIPE_WIDTH = 2;
- private static final int GAP_WIDTH = 2;
+ /**
+ * Default stripe width in pixels.
+ */
+ public static final int STANDARD_STRIPE_WIDTH_PX = 2;
+ /**
+ * Default gap width in pixels.
+ */
+ public static final int STANDARD_GAP_WIDTH_PX = 2;
+
+ /**
+ * Default color for the quote stripe.
+ */
+ @ColorInt
+ public static final int STANDARD_COLOR = 0xff0000ff;
+
+ @ColorInt
private final int mColor;
+ @Px
+ private final int mStripeWidth;
+ @Px
+ private final int mGapWidth;
+ /**
+ * Creates a {@link QuoteSpan} with the default values.
+ */
public QuoteSpan() {
- super();
- mColor = 0xff0000ff;
+ this(STANDARD_COLOR, STANDARD_STRIPE_WIDTH_PX, STANDARD_GAP_WIDTH_PX);
}
+ /**
+ * Creates a {@link QuoteSpan} based on a color.
+ *
+ * @param color the color of the quote stripe.
+ */
public QuoteSpan(@ColorInt int color) {
- super();
+ this(color, STANDARD_STRIPE_WIDTH_PX, STANDARD_GAP_WIDTH_PX);
+ }
+
+ /**
+ * Creates a {@link QuoteSpan} based on a color, a stripe width and the width of the gap
+ * between the stripe and the text.
+ *
+ * @param color the color of the quote stripe.
+ * @param stripeWidth the width of the stripe.
+ * @param gapWidth the width of the gap between the stripe and the text.
+ */
+ public QuoteSpan(@ColorInt int color, @IntRange(from = 0) int stripeWidth,
+ @IntRange(from = 0) int gapWidth) {
mColor = color;
+ mStripeWidth = stripeWidth;
+ mGapWidth = gapWidth;
}
- public QuoteSpan(Parcel src) {
+ /**
+ * Create a {@link QuoteSpan} from a parcel.
+ */
+ public QuoteSpan(@NonNull Parcel src) {
mColor = src.readInt();
+ mStripeWidth = src.readInt();
+ mGapWidth = src.readInt();
}
+ @Override
public int getSpanTypeId() {
return getSpanTypeIdInternal();
}
- /** @hide */
+ /**
+ * @hide
+ */
+ @Override
public int getSpanTypeIdInternal() {
return TextUtils.QUOTE_SPAN;
}
+ @Override
public int describeContents() {
return 0;
}
+ @Override
public void writeToParcel(Parcel dest, int flags) {
writeToParcelInternal(dest, flags);
}
- /** @hide */
+ /**
+ * @hide
+ */
+ @Override
public void writeToParcelInternal(Parcel dest, int flags) {
dest.writeInt(mColor);
+ dest.writeInt(mStripeWidth);
+ dest.writeInt(mGapWidth);
}
+ /**
+ * Get the color of the quote stripe.
+ *
+ * @return the color of the quote stripe.
+ */
@ColorInt
public int getColor() {
return mColor;
}
- public int getLeadingMargin(boolean first) {
- return STRIPE_WIDTH + GAP_WIDTH;
+ /**
+ * Get the width of the quote stripe.
+ *
+ * @return the width of the quote stripe.
+ */
+ public int getStripeWidth() {
+ return mStripeWidth;
}
- public void drawLeadingMargin(Canvas c, Paint p, int x, int dir,
- int top, int baseline, int bottom,
- CharSequence text, int start, int end,
- boolean first, Layout layout) {
+ /**
+ * Get the width of the gap between the stripe and the text.
+ *
+ * @return the width of the gap between the stripe and the text.
+ */
+ public int getGapWidth() {
+ return mGapWidth;
+ }
+
+ @Override
+ public int getLeadingMargin(boolean first) {
+ return mStripeWidth + mGapWidth;
+ }
+
+ @Override
+ public void drawLeadingMargin(@NonNull Canvas c, @NonNull Paint p, int x, int dir,
+ int top, int baseline, int bottom,
+ @NonNull CharSequence text, int start, int end,
+ boolean first, @NonNull Layout layout) {
Paint.Style style = p.getStyle();
int color = p.getColor();
p.setStyle(Paint.Style.FILL);
p.setColor(mColor);
- c.drawRect(x, top, x + dir * STRIPE_WIDTH, bottom, p);
+ c.drawRect(x, top, x + dir * mStripeWidth, bottom, p);
p.setStyle(style);
p.setColor(color);
diff --git a/core/java/android/util/AtomicFile.java b/core/java/android/util/AtomicFile.java
index 6342c8b..cf7ed9b 100644
--- a/core/java/android/util/AtomicFile.java
+++ b/core/java/android/util/AtomicFile.java
@@ -17,6 +17,7 @@
package android.util;
import android.os.FileUtils;
+import android.os.SystemClock;
import libcore.io.IoUtils;
@@ -47,14 +48,25 @@
public class AtomicFile {
private final File mBaseName;
private final File mBackupName;
+ private final String mCommitTag;
+ private long mStartTime;
/**
* Create a new AtomicFile for a file located at the given File path.
* The secondary backup file will be the same file path with ".bak" appended.
*/
public AtomicFile(File baseName) {
+ this(baseName, null);
+ }
+
+ /**
+ * @hide Internal constructor that also allows you to have the class
+ * automatically log commit events.
+ */
+ public AtomicFile(File baseName, String commitTag) {
mBaseName = baseName;
mBackupName = new File(baseName.getPath() + ".bak");
+ mCommitTag = commitTag;
}
/**
@@ -88,6 +100,18 @@
* access to AtomicFile.
*/
public FileOutputStream startWrite() throws IOException {
+ return startWrite(mCommitTag != null ? SystemClock.uptimeMillis() : 0);
+ }
+
+ /**
+ * @hide Internal version of {@link #startWrite()} that allows you to specify an earlier
+ * start time of the operation to adjust how the commit is logged.
+ * @param startTime The effective start time of the operation, in the time
+ * base of {@link SystemClock#uptimeMillis()}.
+ */
+ public FileOutputStream startWrite(long startTime) throws IOException {
+ mStartTime = startTime;
+
// Rename the current file so it may be used as a backup during the next read
if (mBaseName.exists()) {
if (!mBackupName.exists()) {
@@ -135,6 +159,10 @@
} catch (IOException e) {
Log.w("AtomicFile", "finishWrite: Got exception:", e);
}
+ if (mCommitTag != null) {
+ com.android.internal.logging.EventLogTags.writeCommitSysConfigFile(
+ mCommitTag, SystemClock.uptimeMillis() - mStartTime);
+ }
}
}
diff --git a/core/java/android/util/FeatureFlagUtils.java b/core/java/android/util/FeatureFlagUtils.java
index b313514..8af4b71 100644
--- a/core/java/android/util/FeatureFlagUtils.java
+++ b/core/java/android/util/FeatureFlagUtils.java
@@ -42,10 +42,10 @@
DEFAULT_FLAGS.put("settings_connected_device_v2", "true");
DEFAULT_FLAGS.put("settings_battery_v2", "true");
DEFAULT_FLAGS.put("settings_battery_display_app_list", "false");
- DEFAULT_FLAGS.put("settings_security_settings_v2", "true");
DEFAULT_FLAGS.put("settings_zone_picker_v2", "true");
DEFAULT_FLAGS.put("settings_suggestion_ui_v2", "false");
DEFAULT_FLAGS.put("settings_about_phone_v2", "false");
+ DEFAULT_FLAGS.put("settings_bluetooth_while_driving", "false");
}
/**
diff --git a/core/java/android/util/MemoryIntArray.java b/core/java/android/util/MemoryIntArray.java
index bf33519..5970892 100644
--- a/core/java/android/util/MemoryIntArray.java
+++ b/core/java/android/util/MemoryIntArray.java
@@ -16,12 +16,18 @@
package android.util;
+import static android.os.Process.FIRST_APPLICATION_UID;
+
import android.os.Parcel;
import android.os.ParcelFileDescriptor;
import android.os.Parcelable;
+import android.os.Process;
+
+import com.android.internal.annotations.GuardedBy;
+
+import dalvik.system.CloseGuard;
import libcore.io.IoUtils;
-import dalvik.system.CloseGuard;
import java.io.Closeable;
import java.io.IOException;
@@ -49,13 +55,18 @@
*/
public final class MemoryIntArray implements Parcelable, Closeable {
private static final String TAG = "MemoryIntArray";
+ private static final boolean DEBUG = Process.myUid() < FIRST_APPLICATION_UID;
private static final int MAX_SIZE = 1024;
+ private final Object mLock = new Object();
private final CloseGuard mCloseGuard = CloseGuard.get();
private final boolean mIsOwner;
private final long mMemoryAddr;
+
+ /** Fd for the shared memory object, -1 when closed */
+ @GuardedBy("mLock")
private int mFd = -1;
/**
@@ -74,6 +85,7 @@
mFd = nativeCreate(name, size);
mMemoryAddr = nativeOpen(mFd, mIsOwner);
mCloseGuard.open("close");
+ if (DEBUG) Log.i(TAG, "created " + getString());
}
private MemoryIntArray(Parcel parcel) throws IOException {
@@ -85,6 +97,8 @@
mFd = pfd.detachFd();
mMemoryAddr = nativeOpen(mFd, mIsOwner);
mCloseGuard.open("close");
+
+ if (DEBUG) Log.i(TAG, "created from parcel " + getString());
}
/**
@@ -141,13 +155,33 @@
*/
@Override
public void close() throws IOException {
- if (!isClosed()) {
- nativeClose(mFd, mMemoryAddr, mIsOwner);
- mFd = -1;
- mCloseGuard.close();
+ synchronized (mLock) {
+ if (!isClosed()) {
+ if (DEBUG) {
+ try {
+ throw new Exception();
+ } catch (Exception here) {
+ Log.i(TAG, "closing " + getString(), here);
+ }
+ }
+ nativeClose(mFd, mMemoryAddr, mIsOwner);
+ mFd = -1;
+ mCloseGuard.close();
+ } else {
+ try {
+ throw new Exception();
+ } catch (Exception here) {
+ if (DEBUG) Log.i(TAG, getString() + " already closed", here);
+ }
+ }
}
}
+ private String getString() {
+ return this.getClass().getSimpleName() + "@" + System.identityHashCode(this)
+ + " mMemoryAddr=" + mMemoryAddr + " mFd=" + mFd;
+ }
+
/**
* @return Whether this array is closed and shouldn't be used.
*/
@@ -162,7 +196,9 @@
mCloseGuard.warnIfOpen();
}
- IoUtils.closeQuietly(this);
+ if (!isClosed()) {
+ IoUtils.closeQuietly(this);
+ }
} finally {
super.finalize();
}
@@ -206,7 +242,8 @@
private void enforceNotClosed() {
if (isClosed()) {
- throw new IllegalStateException("cannot interact with a closed instance");
+ throw new IllegalStateException("cannot interact with a closed instance "
+ + getString());
}
}
diff --git a/core/java/android/util/MutableBoolean.java b/core/java/android/util/MutableBoolean.java
index ed837ab..44e73cc 100644
--- a/core/java/android/util/MutableBoolean.java
+++ b/core/java/android/util/MutableBoolean.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableBoolean {
public boolean value;
diff --git a/core/java/android/util/MutableByte.java b/core/java/android/util/MutableByte.java
index cc6b00a..b9ec25d 100644
--- a/core/java/android/util/MutableByte.java
+++ b/core/java/android/util/MutableByte.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableByte {
public byte value;
diff --git a/core/java/android/util/MutableChar.java b/core/java/android/util/MutableChar.java
index 9a2e2bc..9f7a9ae 100644
--- a/core/java/android/util/MutableChar.java
+++ b/core/java/android/util/MutableChar.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableChar {
public char value;
diff --git a/core/java/android/util/MutableDouble.java b/core/java/android/util/MutableDouble.java
index bd7329a..56e539b 100644
--- a/core/java/android/util/MutableDouble.java
+++ b/core/java/android/util/MutableDouble.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableDouble {
public double value;
diff --git a/core/java/android/util/MutableFloat.java b/core/java/android/util/MutableFloat.java
index e6f2d7d..6d7ad59 100644
--- a/core/java/android/util/MutableFloat.java
+++ b/core/java/android/util/MutableFloat.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableFloat {
public float value;
diff --git a/core/java/android/util/MutableInt.java b/core/java/android/util/MutableInt.java
index a3d8606..bb24566 100644
--- a/core/java/android/util/MutableInt.java
+++ b/core/java/android/util/MutableInt.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableInt {
public int value;
diff --git a/core/java/android/util/MutableLong.java b/core/java/android/util/MutableLong.java
index 575068e..86e70e1 100644
--- a/core/java/android/util/MutableLong.java
+++ b/core/java/android/util/MutableLong.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableLong {
public long value;
diff --git a/core/java/android/util/MutableShort.java b/core/java/android/util/MutableShort.java
index 48fb232..b94ab07 100644
--- a/core/java/android/util/MutableShort.java
+++ b/core/java/android/util/MutableShort.java
@@ -17,7 +17,9 @@
package android.util;
/**
+ * @deprecated This class will be removed from a future version of the Android API.
*/
+@Deprecated
public final class MutableShort {
public short value;
diff --git a/core/java/android/util/SparseSetArray.java b/core/java/android/util/SparseSetArray.java
new file mode 100644
index 0000000..d100f12
--- /dev/null
+++ b/core/java/android/util/SparseSetArray.java
@@ -0,0 +1,98 @@
+/*
+ * 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.util;
+
+/**
+ * A sparse array of ArraySets, which is suitable to hold userid->packages association.
+ *
+ * @hide
+ */
+public class SparseSetArray<T> {
+ private final SparseArray<ArraySet<T>> mData = new SparseArray<>();
+
+ public SparseSetArray() {
+ }
+
+ /**
+ * Add a value at index n.
+ * @return FALSE when the value already existed at the given index, TRUE otherwise.
+ */
+ public boolean add(int n, T value) {
+ ArraySet<T> set = mData.get(n);
+ if (set == null) {
+ set = new ArraySet<>();
+ mData.put(n, set);
+ }
+ if (set.contains(value)) {
+ return true;
+ }
+ set.add(value);
+ return false;
+ }
+
+ /**
+ * @return whether a value exists at index n.
+ */
+ public boolean contains(int n, T value) {
+ final ArraySet<T> set = mData.get(n);
+ if (set == null) {
+ return false;
+ }
+ return set.contains(value);
+ }
+
+ /**
+ * Remove a value from index n.
+ * @return TRUE when the value existed at the given index and removed, FALSE otherwise.
+ */
+ public boolean remove(int n, T value) {
+ final ArraySet<T> set = mData.get(n);
+ if (set == null) {
+ return false;
+ }
+ final boolean ret = set.remove(value);
+ if (set.size() == 0) {
+ mData.remove(n);
+ }
+ return ret;
+ }
+
+ /**
+ * Remove all values from index n.
+ */
+ public void remove(int n) {
+ mData.remove(n);
+ }
+ public int size() {
+ return mData.size();
+ }
+
+ public int keyAt(int index) {
+ return mData.keyAt(index);
+ }
+
+ public int sizeAt(int index) {
+ final ArraySet<T> set = mData.valueAt(index);
+ if (set == null) {
+ return 0;
+ }
+ return set.size();
+ }
+
+ public T valueAt(int intIndex, int valueIndex) {
+ return mData.valueAt(intIndex).valueAt(valueIndex);
+ }
+}
diff --git a/core/java/android/util/StatsManager.java b/core/java/android/util/StatsManager.java
index e0d085c..687aa83 100644
--- a/core/java/android/util/StatsManager.java
+++ b/core/java/android/util/StatsManager.java
@@ -17,19 +17,33 @@
import android.Manifest;
import android.annotation.RequiresPermission;
-import android.annotation.SystemApi;
import android.os.IBinder;
import android.os.IStatsManager;
import android.os.RemoteException;
import android.os.ServiceManager;
+
+/*
+ *
+ *
+ *
+ *
+ * THIS ENTIRE FILE IS ONLY TEMPORARY TO PREVENT BREAKAGES OF DEPENDENCIES ON OLD APIS.
+ * The new StatsManager is to be found in android.app.StatsManager.
+ * TODO: Delete this file!
+ *
+ *
+ *
+ *
+ */
+
+
/**
* API for StatsD clients to send configurations and retrieve data.
*
* @hide
*/
-@SystemApi
-public final class StatsManager {
+public class StatsManager {
IStatsManager mService;
private static final String TAG = "StatsManager";
@@ -55,7 +69,7 @@
* Clients can send a configuration and simultaneously registers the name of a broadcast
* receiver that listens for when it should request data.
*
- * @param configKey An arbitrary string that allows clients to track the configuration.
+ * @param configKey An arbitrary integer that allows clients to track the configuration.
* @param config Wire-encoded StatsDConfig proto that specifies metrics (and all
* dependencies eg, conditions and matchers).
* @param pkg The package name to receive the broadcast.
diff --git a/core/java/android/util/apk/ApkSignatureSchemeV2Verifier.java b/core/java/android/util/apk/ApkSignatureSchemeV2Verifier.java
index 5a09dab..62222b5 100644
--- a/core/java/android/util/apk/ApkSignatureSchemeV2Verifier.java
+++ b/core/java/android/util/apk/ApkSignatureSchemeV2Verifier.java
@@ -412,6 +412,20 @@
}
}
+ static byte[] generateFsverityRootHash(String apkPath)
+ throws IOException, SignatureNotFoundException, DigestException,
+ NoSuchAlgorithmException {
+ try (RandomAccessFile apk = new RandomAccessFile(apkPath, "r")) {
+ SignatureInfo signatureInfo = findSignature(apk);
+ VerifiedSigner vSigner = verify(apk, false);
+ if (vSigner.verityRootHash == null) {
+ return null;
+ }
+ return ApkVerityBuilder.generateFsverityRootHash(
+ apk, ByteBuffer.wrap(vSigner.verityRootHash), signatureInfo);
+ }
+ }
+
private static boolean isSupportedSignatureAlgorithm(int sigAlgorithm) {
switch (sigAlgorithm) {
case SIGNATURE_RSA_PSS_WITH_SHA256:
diff --git a/core/java/android/util/apk/ApkSignatureSchemeV3Verifier.java b/core/java/android/util/apk/ApkSignatureSchemeV3Verifier.java
index 1b04eb2..a4c590f 100644
--- a/core/java/android/util/apk/ApkSignatureSchemeV3Verifier.java
+++ b/core/java/android/util/apk/ApkSignatureSchemeV3Verifier.java
@@ -477,6 +477,7 @@
}
}
+ signedData.rewind();
byte[] encodedCert = readLengthPrefixedByteArray(signedData);
int signedSigAlgorithm = signedData.getInt();
if (lastCert != null && lastSigAlgorithm != signedSigAlgorithm) {
@@ -523,6 +524,20 @@
}
}
+ static byte[] generateFsverityRootHash(String apkPath)
+ throws NoSuchAlgorithmException, DigestException, IOException,
+ SignatureNotFoundException {
+ try (RandomAccessFile apk = new RandomAccessFile(apkPath, "r")) {
+ SignatureInfo signatureInfo = findSignature(apk);
+ VerifiedSigner vSigner = verify(apk, false);
+ if (vSigner.verityRootHash == null) {
+ return null;
+ }
+ return ApkVerityBuilder.generateFsverityRootHash(
+ apk, ByteBuffer.wrap(vSigner.verityRootHash), signatureInfo);
+ }
+ }
+
private static boolean isSupportedSignatureAlgorithm(int sigAlgorithm) {
switch (sigAlgorithm) {
case SIGNATURE_RSA_PSS_WITH_SHA256:
diff --git a/core/java/android/util/apk/ApkSignatureVerifier.java b/core/java/android/util/apk/ApkSignatureVerifier.java
index 8794372..de9f55b 100644
--- a/core/java/android/util/apk/ApkSignatureVerifier.java
+++ b/core/java/android/util/apk/ApkSignatureVerifier.java
@@ -427,6 +427,27 @@
}
/**
+ * Generates the FSVerity root hash from FSVerity header, extensions and Merkle tree root hash
+ * in Signing Block.
+ *
+ * @return FSverity root hash
+ */
+ public static byte[] generateFsverityRootHash(String apkPath)
+ throws NoSuchAlgorithmException, DigestException, IOException {
+ // first try v3
+ try {
+ return ApkSignatureSchemeV3Verifier.generateFsverityRootHash(apkPath);
+ } catch (SignatureNotFoundException e) {
+ // try older version
+ }
+ try {
+ return ApkSignatureSchemeV2Verifier.generateFsverityRootHash(apkPath);
+ } catch (SignatureNotFoundException e) {
+ return null;
+ }
+ }
+
+ /**
* Result of a successful APK verification operation.
*/
public static class Result {
diff --git a/core/java/android/util/apk/ApkVerityBuilder.java b/core/java/android/util/apk/ApkVerityBuilder.java
index a0d5e4c..4c6e511 100644
--- a/core/java/android/util/apk/ApkVerityBuilder.java
+++ b/core/java/android/util/apk/ApkVerityBuilder.java
@@ -68,31 +68,80 @@
static ApkVerityResult generateApkVerity(RandomAccessFile apk,
SignatureInfo signatureInfo, ByteBufferFactory bufferFactory)
throws IOException, SecurityException, NoSuchAlgorithmException, DigestException {
+ long signingBlockSize =
+ signatureInfo.centralDirOffset - signatureInfo.apkSigningBlockOffset;
+ long dataSize = apk.length() - signingBlockSize;
+ int[] levelOffset = calculateVerityLevelOffset(dataSize);
+
+ ByteBuffer output = bufferFactory.create(
+ CHUNK_SIZE_BYTES + // fsverity header + extensions + padding
+ levelOffset[levelOffset.length - 1]); // Merkle tree size
+ output.order(ByteOrder.LITTLE_ENDIAN);
+
+ ByteBuffer header = slice(output, 0, FSVERITY_HEADER_SIZE_BYTES);
+ ByteBuffer extensions = slice(output, FSVERITY_HEADER_SIZE_BYTES, CHUNK_SIZE_BYTES);
+ ByteBuffer tree = slice(output, CHUNK_SIZE_BYTES, output.limit());
+ byte[] apkDigestBytes = new byte[DIGEST_SIZE_BYTES];
+ ByteBuffer apkDigest = ByteBuffer.wrap(apkDigestBytes);
+ apkDigest.order(ByteOrder.LITTLE_ENDIAN);
+
+ calculateFsveritySignatureInternal(apk, signatureInfo, tree, apkDigest, header, extensions);
+
+ output.rewind();
+ return new ApkVerityResult(output, apkDigestBytes);
+ }
+
+ /**
+ * Calculates the fsverity root hash for integrity measurement. This needs to be consistent to
+ * what kernel returns.
+ */
+ static byte[] generateFsverityRootHash(RandomAccessFile apk, ByteBuffer apkDigest,
+ SignatureInfo signatureInfo)
+ throws NoSuchAlgorithmException, DigestException, IOException {
+ ByteBuffer verityBlock = ByteBuffer.allocate(CHUNK_SIZE_BYTES)
+ .order(ByteOrder.LITTLE_ENDIAN);
+ ByteBuffer header = slice(verityBlock, 0, FSVERITY_HEADER_SIZE_BYTES);
+ ByteBuffer extensions = slice(verityBlock, FSVERITY_HEADER_SIZE_BYTES, CHUNK_SIZE_BYTES);
+
+ calculateFsveritySignatureInternal(apk, signatureInfo, null, null, header, extensions);
+
+ MessageDigest md = MessageDigest.getInstance(JCA_DIGEST_ALGORITHM);
+ md.update(DEFAULT_SALT);
+ md.update(verityBlock);
+ md.update(apkDigest);
+ return md.digest();
+ }
+
+ private static void calculateFsveritySignatureInternal(
+ RandomAccessFile apk, SignatureInfo signatureInfo, ByteBuffer treeOutput,
+ ByteBuffer rootHashOutput, ByteBuffer headerOutput, ByteBuffer extensionsOutput)
+ throws IOException, NoSuchAlgorithmException, DigestException {
assertSigningBlockAlignedAndHasFullPages(signatureInfo);
long signingBlockSize =
signatureInfo.centralDirOffset - signatureInfo.apkSigningBlockOffset;
long dataSize = apk.length() - signingBlockSize - ZIP_EOCD_CENTRAL_DIR_OFFSET_FIELD_SIZE;
int[] levelOffset = calculateVerityLevelOffset(dataSize);
- ByteBuffer output = bufferFactory.create(
- CHUNK_SIZE_BYTES + // fsverity header + extensions + padding
- levelOffset[levelOffset.length - 1] + // Merkle tree size
- FSVERITY_HEADER_SIZE_BYTES); // second fsverity header (verbatim copy)
- // Start generating the tree from the block boundary as the kernel will expect.
- ByteBuffer treeOutput = slice(output, CHUNK_SIZE_BYTES,
- output.limit() - FSVERITY_HEADER_SIZE_BYTES);
- byte[] rootHash = generateApkVerityTree(apk, signatureInfo, DEFAULT_SALT, levelOffset,
- treeOutput);
+ if (treeOutput != null) {
+ byte[] apkRootHash = generateApkVerityTree(apk, signatureInfo, DEFAULT_SALT,
+ levelOffset, treeOutput);
+ if (rootHashOutput != null) {
+ rootHashOutput.put(apkRootHash);
+ }
+ }
- ByteBuffer integrityHeader = generateFsverityHeader(apk.length(), DEFAULT_SALT);
- output.put(integrityHeader);
- output.put(generateFsverityExtensions());
+ if (headerOutput != null) {
+ headerOutput.order(ByteOrder.LITTLE_ENDIAN);
+ generateFsverityHeader(headerOutput, apk.length(), levelOffset.length - 1,
+ DEFAULT_SALT);
+ }
- integrityHeader.rewind();
- output.put(integrityHeader);
- output.rewind();
- return new ApkVerityResult(output, rootHash);
+ if (extensionsOutput != null) {
+ extensionsOutput.order(ByteOrder.LITTLE_ENDIAN);
+ generateFsverityExtensions(extensionsOutput, signatureInfo.apkSigningBlockOffset,
+ signingBlockSize, signatureInfo.eocdOffset);
+ }
}
/**
@@ -211,7 +260,7 @@
eocdCdOffsetFieldPosition - signatureInfo.centralDirOffset),
MMAP_REGION_SIZE_BYTES);
- // 3. Fill up the rest of buffer with 0s.
+ // 3. Consume offset of Signing Block as an alternative EoCD.
ByteBuffer alternativeCentralDirOffset = ByteBuffer.allocate(
ZIP_EOCD_CENTRAL_DIR_OFFSET_FIELD_SIZE).order(ByteOrder.LITTLE_ENDIAN);
alternativeCentralDirOffset.putInt(Math.toIntExact(signatureInfo.apkSigningBlockOffset));
@@ -259,36 +308,101 @@
return rootHash;
}
- private static ByteBuffer generateFsverityHeader(long fileSize, byte[] salt) {
+ private static ByteBuffer generateFsverityHeader(ByteBuffer buffer, long fileSize, int depth,
+ byte[] salt) {
if (salt.length != 8) {
throw new IllegalArgumentException("salt is not 8 bytes long");
}
- ByteBuffer buffer = ByteBuffer.allocate(FSVERITY_HEADER_SIZE_BYTES);
- buffer.order(ByteOrder.LITTLE_ENDIAN);
-
- // TODO(b/30972906): insert a reference when there is a public one.
+ // TODO(b/30972906): update the reference when there is a better one in public.
buffer.put("TrueBrew".getBytes()); // magic
- buffer.put((byte) 1); // major version
- buffer.put((byte) 0); // minor version
- buffer.put((byte) 12); // log2(block-size) == log2(4096)
- buffer.put((byte) 7); // log2(leaves-per-node) == log2(block-size / digest-size)
- // == log2(4096 / 32)
- buffer.putShort((short) 1); // meta algorithm, 1: SHA-256 FIXME finalize constant
- buffer.putShort((short) 1); // data algorithm, 1: SHA-256 FIXME finalize constant
- buffer.putInt(0x1); // flags, 0x1: has extension, FIXME also hide it
- buffer.putInt(0); // reserved
- buffer.putLong(fileSize); // original i_size
- buffer.put(salt); // salt (8 bytes)
- // TODO(b/30972906): Add extension.
+ buffer.put((byte) 1); // major version
+ buffer.put((byte) 0); // minor version
+ buffer.put((byte) 12); // log2(block-size): log2(4096)
+ buffer.put((byte) 7); // log2(leaves-per-node): log2(4096 / 32)
+
+ buffer.putShort((short) 1); // meta algorithm, SHA256_MODE == 1
+ buffer.putShort((short) 1); // data algorithm, SHA256_MODE == 1
+
+ buffer.putInt(0x1); // flags, 0x1: has extension
+ buffer.putInt(0); // reserved
+
+ buffer.putLong(fileSize); // original file size
+
+ buffer.put((byte) 0); // auth block offset, disabled here
+ buffer.put((byte) 2); // extension count
+ buffer.put(salt); // salt (8 bytes)
+ // skip(buffer, 22); // reserved
buffer.rewind();
return buffer;
}
- private static ByteBuffer generateFsverityExtensions() {
- return ByteBuffer.allocate(64); // TODO(b/30972906): implement this.
+ private static ByteBuffer generateFsverityExtensions(ByteBuffer buffer, long signingBlockOffset,
+ long signingBlockSize, long eocdOffset) {
+ // Snapshot of the FSVerity structs (subject to change once upstreamed).
+ //
+ // struct fsverity_extension {
+ // __le16 length;
+ // u8 type;
+ // u8 reserved[5];
+ // };
+ //
+ // struct fsverity_extension_elide {
+ // __le64 offset;
+ // __le64 length;
+ // }
+ //
+ // struct fsverity_extension_patch {
+ // __le64 offset;
+ // u8 length;
+ // u8 reserved[7];
+ // u8 databytes[];
+ // };
+
+ final int kSizeOfFsverityExtensionHeader = 8;
+
+ {
+ // struct fsverity_extension #1
+ final int kSizeOfFsverityElidedExtension = 16;
+
+ buffer.putShort((short) // total size of extension, padded to 64-bit alignment
+ (kSizeOfFsverityExtensionHeader + kSizeOfFsverityElidedExtension));
+ buffer.put((byte) 0); // ID of elide extension
+ skip(buffer, 5); // reserved
+
+ // struct fsverity_extension_elide
+ buffer.putLong(signingBlockOffset);
+ buffer.putLong(signingBlockSize);
+ }
+
+ {
+ // struct fsverity_extension #2
+ final int kSizeOfFsverityPatchExtension =
+ 8 + // offset size
+ 1 + // size of length from offset (up to 255)
+ 7 + // reserved
+ ZIP_EOCD_CENTRAL_DIR_OFFSET_FIELD_SIZE;
+ final int kPadding = (int) divideRoundup(kSizeOfFsverityPatchExtension % 8, 8);
+
+ buffer.putShort((short) // total size of extension, padded to 64-bit alignment
+ (kSizeOfFsverityExtensionHeader + kSizeOfFsverityPatchExtension + kPadding));
+ buffer.put((byte) 1); // ID of patch extension
+ skip(buffer, 5); // reserved
+
+ // struct fsverity_extension_patch
+ buffer.putLong(eocdOffset); // offset
+ buffer.put((byte) ZIP_EOCD_CENTRAL_DIR_OFFSET_FIELD_SIZE); // length
+ skip(buffer, 7); // reserved
+ buffer.putInt(Math.toIntExact(signingBlockOffset)); // databytes
+
+ // There are extra kPadding bytes of 0s here, included in the total size field of the
+ // extension header. The output ByteBuffer is assumed to be initialized to 0.
+ }
+
+ buffer.rewind();
+ return buffer;
}
/**
@@ -344,6 +458,11 @@
return b.slice();
}
+ /** Skip the {@code ByteBuffer} position by {@code bytes}. */
+ private static void skip(ByteBuffer buffer, int bytes) {
+ buffer.position(buffer.position() + bytes);
+ }
+
/** Divides a number and round up to the closest integer. */
private static long divideRoundup(long dividend, long divisor) {
return (dividend + divisor - 1) / divisor;
diff --git a/core/java/android/util/proto/ProtoUtils.java b/core/java/android/util/proto/ProtoUtils.java
index 85b7ec8..c7bbb9f 100644
--- a/core/java/android/util/proto/ProtoUtils.java
+++ b/core/java/android/util/proto/ProtoUtils.java
@@ -48,4 +48,26 @@
proto.write(Duration.END_MS, endMs);
proto.end(token);
}
+
+ /**
+ * Helper function to write bit-wise flags to proto as repeated enums
+ * @hide
+ */
+ public static void writeBitWiseFlagsToProtoEnum(ProtoOutputStream proto, long fieldId,
+ int flags, int[] origEnums, int[] protoEnums) {
+ if (protoEnums.length != origEnums.length) {
+ throw new IllegalArgumentException("The length of origEnums must match protoEnums");
+ }
+ int len = origEnums.length;
+ for (int i = 0; i < len; i++) {
+ // handle zero flag case.
+ if (origEnums[i] == 0 && flags == 0) {
+ proto.write(fieldId, protoEnums[i]);
+ return;
+ }
+ if ((flags & origEnums[i]) != 0) {
+ proto.write(fieldId, protoEnums[i]);
+ }
+ }
+ }
}
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index 5bd7446..31cfebc 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -267,21 +267,21 @@
*
* @see #getState
*/
- public static final int STATE_UNKNOWN = 0;
+ public static final int STATE_UNKNOWN = ViewProtoEnums.DISPLAY_STATE_UNKNOWN; // 0
/**
* Display state: The display is off.
*
* @see #getState
*/
- public static final int STATE_OFF = 1;
+ public static final int STATE_OFF = ViewProtoEnums.DISPLAY_STATE_OFF; // 1
/**
* Display state: The display is on.
*
* @see #getState
*/
- public static final int STATE_ON = 2;
+ public static final int STATE_ON = ViewProtoEnums.DISPLAY_STATE_ON; // 2
/**
* Display state: The display is dozing in a low power state; it is still
@@ -291,7 +291,7 @@
* @see #getState
* @see android.os.PowerManager#isInteractive
*/
- public static final int STATE_DOZE = 3;
+ public static final int STATE_DOZE = ViewProtoEnums.DISPLAY_STATE_DOZE; // 3
/**
* Display state: The display is dozing in a suspended low power state; it is still
@@ -303,7 +303,7 @@
* @see #getState
* @see android.os.PowerManager#isInteractive
*/
- public static final int STATE_DOZE_SUSPEND = 4;
+ public static final int STATE_DOZE_SUSPEND = ViewProtoEnums.DISPLAY_STATE_DOZE_SUSPEND; // 4
/**
* Display state: The display is on and optimized for VR mode.
@@ -311,7 +311,7 @@
* @see #getState
* @see android.os.PowerManager#isInteractive
*/
- public static final int STATE_VR = 5;
+ public static final int STATE_VR = ViewProtoEnums.DISPLAY_STATE_VR; // 5
/**
* Display state: The display is in a suspended full power state; it is still
@@ -323,7 +323,7 @@
* @see #getState
* @see android.os.PowerManager#isInteractive
*/
- public static final int STATE_ON_SUSPEND = 6;
+ public static final int STATE_ON_SUSPEND = ViewProtoEnums.DISPLAY_STATE_ON_SUSPEND; // 6
/* The color mode constants defined below must be kept in sync with the ones in
* system/core/include/system/graphics-base.h */
diff --git a/core/java/android/view/IRecentsAnimationController.aidl b/core/java/android/view/IRecentsAnimationController.aidl
new file mode 100644
index 0000000..5607b11
--- /dev/null
+++ b/core/java/android/view/IRecentsAnimationController.aidl
@@ -0,0 +1,54 @@
+/*
+ * 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.view;
+
+import android.app.ActivityManager;
+import android.view.IRemoteAnimationFinishedCallback;
+import android.graphics.GraphicBuffer;
+
+/**
+ * Passed to the {@link IRecentsAnimationRunner} in order for the runner to control to let the
+ * runner control certain aspects of the recents animation, and to notify window manager when the
+ * animation has completed.
+ *
+ * {@hide}
+ */
+interface IRecentsAnimationController {
+
+ /**
+ * Takes a screenshot of the task associated with the given {@param taskId}. Only valid for the
+ * current set of task ids provided to the handler.
+ */
+ ActivityManager.TaskSnapshot screenshotTask(int taskId);
+
+ /**
+ * Notifies to the system that the animation into Recents should end, and all leashes associated
+ * with remote animation targets should be relinquished. If {@param moveHomeToTop} is true, then
+ * the home activity should be moved to the top. Otherwise, the home activity is hidden and the
+ * user is returned to the app.
+ */
+ void finish(boolean moveHomeToTop);
+
+ /**
+ * Called by the handler to indicate that the recents animation input consumer should be
+ * enabled. This is currently used to work around an issue where registering an input consumer
+ * mid-animation causes the existing motion event chain to be canceled. Instead, the caller
+ * may register the recents animation input consumer prior to starting the recents animation
+ * and then enable it mid-animation to start receiving touch events.
+ */
+ void setInputConsumerEnabled(boolean enabled);
+}
diff --git a/core/java/android/view/IRecentsAnimationRunner.aidl b/core/java/android/view/IRecentsAnimationRunner.aidl
new file mode 100644
index 0000000..ea6226b
--- /dev/null
+++ b/core/java/android/view/IRecentsAnimationRunner.aidl
@@ -0,0 +1,42 @@
+/*
+ * 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.view;
+
+import android.view.RemoteAnimationTarget;
+import android.view.IRecentsAnimationController;
+
+/**
+ * Interface that is used to callback from window manager to the process that runs a recents
+ * animation to start or cancel it.
+ *
+ * {@hide}
+ */
+oneway interface IRecentsAnimationRunner {
+
+ /**
+ * Called when the system is ready for the handler to start animating all the visible tasks.
+ */
+ void onAnimationStart(in IRecentsAnimationController controller,
+ in RemoteAnimationTarget[] apps);
+
+ /**
+ * Called when the system needs to cancel the current animation. This can be due to the
+ * wallpaper not drawing in time, or the handler not finishing the animation within a predefined
+ * amount of time.
+ */
+ void onAnimationCanceled();
+}
diff --git a/core/java/android/view/IWindowSession.aidl b/core/java/android/view/IWindowSession.aidl
index 17b6ddc..d7fd329 100644
--- a/core/java/android/view/IWindowSession.aidl
+++ b/core/java/android/view/IWindowSession.aidl
@@ -157,10 +157,8 @@
* @param flags See {@code View#startDragAndDrop}
* @param surface Surface containing drag shadow image
* @param touchSource See {@code InputDevice#getSource()}
- * @param touchX TODO (b/72072998): Fix the issue that the system server misuse the arguments as
- * initial touch point while the framework passes drag shadow size.
- * @param touchY TODO (b/72072998): Fix the issue that the system server misuse the arguments as
- * initial touch point while the framework passes drag shadow size.
+ * @param touchX X coordinate of last touch point
+ * @param touchY Y coordinate of last touch point
* @param thumbCenterX X coordinate for the position within the shadow image that should be
* underneath the touch point during the drag and drop operation.
* @param thumbCenterY Y coordinate for the position within the shadow image that should be
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java
index 04fa637..1d7c1de 100644
--- a/core/java/android/view/MotionEvent.java
+++ b/core/java/android/view/MotionEvent.java
@@ -26,6 +26,8 @@
import dalvik.annotation.optimization.CriticalNative;
import dalvik.annotation.optimization.FastNative;
+import java.util.Objects;
+
/**
* Object used to report movement (mouse, pen, finger, trackball) events.
* Motion events may hold either absolute or relative movements and other data,
@@ -173,6 +175,8 @@
private static final long NS_PER_MS = 1000000;
private static final String LABEL_PREFIX = "AXIS_";
+ private static final boolean DEBUG_CONCISE_TOSTRING = false;
+
/**
* An invalid pointer id.
*
@@ -3236,31 +3240,42 @@
public String toString() {
StringBuilder msg = new StringBuilder();
msg.append("MotionEvent { action=").append(actionToString(getAction()));
- msg.append(", actionButton=").append(buttonStateToString(getActionButton()));
+ appendUnless("0", msg, ", actionButton=", buttonStateToString(getActionButton()));
final int pointerCount = getPointerCount();
for (int i = 0; i < pointerCount; i++) {
- msg.append(", id[").append(i).append("]=").append(getPointerId(i));
- msg.append(", x[").append(i).append("]=").append(getX(i));
- msg.append(", y[").append(i).append("]=").append(getY(i));
- msg.append(", toolType[").append(i).append("]=").append(
- toolTypeToString(getToolType(i)));
+ appendUnless(i, msg, ", id[" + i + "]=", getPointerId(i));
+ float x = getX(i);
+ float y = getY(i);
+ if (!DEBUG_CONCISE_TOSTRING || x != 0f || y != 0f) {
+ msg.append(", x[").append(i).append("]=").append(x);
+ msg.append(", y[").append(i).append("]=").append(y);
+ }
+ appendUnless(TOOL_TYPE_SYMBOLIC_NAMES.get(TOOL_TYPE_FINGER),
+ msg, ", toolType[" + i + "]=", toolTypeToString(getToolType(i)));
}
- msg.append(", buttonState=").append(MotionEvent.buttonStateToString(getButtonState()));
- msg.append(", metaState=").append(KeyEvent.metaStateToString(getMetaState()));
- msg.append(", flags=0x").append(Integer.toHexString(getFlags()));
- msg.append(", edgeFlags=0x").append(Integer.toHexString(getEdgeFlags()));
- msg.append(", pointerCount=").append(pointerCount);
- msg.append(", historySize=").append(getHistorySize());
+ appendUnless("0", msg, ", buttonState=", MotionEvent.buttonStateToString(getButtonState()));
+ appendUnless("0", msg, ", metaState=", KeyEvent.metaStateToString(getMetaState()));
+ appendUnless("0", msg, ", flags=0x", Integer.toHexString(getFlags()));
+ appendUnless("0", msg, ", edgeFlags=0x", Integer.toHexString(getEdgeFlags()));
+ appendUnless(1, msg, ", pointerCount=", pointerCount);
+ appendUnless(0, msg, ", historySize=", getHistorySize());
msg.append(", eventTime=").append(getEventTime());
- msg.append(", downTime=").append(getDownTime());
- msg.append(", deviceId=").append(getDeviceId());
- msg.append(", source=0x").append(Integer.toHexString(getSource()));
+ if (!DEBUG_CONCISE_TOSTRING) {
+ msg.append(", downTime=").append(getDownTime());
+ msg.append(", deviceId=").append(getDeviceId());
+ msg.append(", source=0x").append(Integer.toHexString(getSource()));
+ }
msg.append(" }");
return msg.toString();
}
+ private static <T> void appendUnless(T defValue, StringBuilder sb, String key, T value) {
+ if (DEBUG_CONCISE_TOSTRING && Objects.equals(defValue, value)) return;
+ sb.append(key).append(value);
+ }
+
/**
* Returns a string that represents the symbolic name of the specified unmasked action
* such as "ACTION_DOWN", "ACTION_POINTER_DOWN(3)" or an equivalent numeric constant
diff --git a/core/java/android/view/RecordingCanvas.java b/core/java/android/view/RecordingCanvas.java
index 5088cdc..fbb862b 100644
--- a/core/java/android/view/RecordingCanvas.java
+++ b/core/java/android/view/RecordingCanvas.java
@@ -34,6 +34,7 @@
import android.graphics.RectF;
import android.graphics.TemporaryBuffer;
import android.text.GraphicsOperations;
+import android.text.MeasuredText;
import android.text.SpannableString;
import android.text.SpannedString;
import android.text.TextUtils;
@@ -473,7 +474,8 @@
}
nDrawTextRun(mNativeCanvasWrapper, text, index, count, contextIndex, contextCount,
- x, y, isRtl, paint.getNativeInstance());
+ x, y, isRtl, paint.getNativeInstance(), 0 /* measured text */,
+ 0 /* measured text offset */);
}
@Override
@@ -503,8 +505,20 @@
int len = end - start;
char[] buf = TemporaryBuffer.obtain(contextLen);
TextUtils.getChars(text, contextStart, contextEnd, buf, 0);
+ long measuredTextPtr = 0;
+ int measuredTextOffset = 0;
+ if (text instanceof MeasuredText) {
+ MeasuredText mt = (MeasuredText) text;
+ int paraIndex = mt.findParaIndex(start);
+ if (end <= mt.getParagraphEnd(paraIndex)) {
+ // Only support if the target is in the same paragraph.
+ measuredTextPtr = mt.getMeasuredParagraph(paraIndex).getNativePtr();
+ measuredTextOffset = start - mt.getParagraphStart(paraIndex);
+ }
+ }
nDrawTextRun(mNativeCanvasWrapper, buf, start - contextStart, len,
- 0, contextLen, x, y, isRtl, paint.getNativeInstance());
+ 0, contextLen, x, y, isRtl, paint.getNativeInstance(),
+ measuredTextPtr, measuredTextOffset);
TemporaryBuffer.recycle(buf);
}
}
@@ -626,7 +640,8 @@
@FastNative
private static native void nDrawTextRun(long nativeCanvas, char[] text, int start, int count,
- int contextStart, int contextCount, float x, float y, boolean isRtl, long nativePaint);
+ int contextStart, int contextCount, float x, float y, boolean isRtl, long nativePaint,
+ long nativeMeasuredText, int measuredTextOffset);
@FastNative
private static native void nDrawTextOnPath(long nativeCanvas, char[] text, int index, int count,
diff --git a/core/java/android/view/RemoteAnimationTarget.java b/core/java/android/view/RemoteAnimationTarget.java
index f39e618..c28c389 100644
--- a/core/java/android/view/RemoteAnimationTarget.java
+++ b/core/java/android/view/RemoteAnimationTarget.java
@@ -17,6 +17,7 @@
package android.view;
import android.annotation.IntDef;
+import android.app.WindowConfiguration;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.Parcel;
@@ -98,8 +99,14 @@
*/
public final Rect sourceContainerBounds;
+ /**
+ * The window configuration for the target.
+ */
+ public final WindowConfiguration windowConfiguration;
+
public RemoteAnimationTarget(int taskId, int mode, SurfaceControl leash, boolean isTranslucent,
- Rect clipRect, int prefixOrderIndex, Point position, Rect sourceContainerBounds) {
+ Rect clipRect, int prefixOrderIndex, Point position, Rect sourceContainerBounds,
+ WindowConfiguration windowConfig) {
this.mode = mode;
this.taskId = taskId;
this.leash = leash;
@@ -108,6 +115,7 @@
this.prefixOrderIndex = prefixOrderIndex;
this.position = new Point(position);
this.sourceContainerBounds = new Rect(sourceContainerBounds);
+ this.windowConfiguration = windowConfig;
}
public RemoteAnimationTarget(Parcel in) {
@@ -119,6 +127,7 @@
prefixOrderIndex = in.readInt();
position = in.readParcelable(null);
sourceContainerBounds = in.readParcelable(null);
+ windowConfiguration = in.readParcelable(null);
}
@Override
@@ -136,6 +145,7 @@
dest.writeInt(prefixOrderIndex);
dest.writeParcelable(position, 0 /* flags */);
dest.writeParcelable(sourceContainerBounds, 0 /* flags */);
+ dest.writeParcelable(windowConfiguration, 0 /* flags */);
}
public static final Creator<RemoteAnimationTarget> CREATOR
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 578679b..4a9da4a 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -25,6 +25,7 @@
import android.content.res.CompatibilityInfo.Translator;
import android.content.res.Configuration;
import android.graphics.Canvas;
+import android.graphics.Color;
import android.graphics.PixelFormat;
import android.graphics.PorterDuff;
import android.graphics.Rect;
@@ -114,7 +115,7 @@
final Rect mScreenRect = new Rect();
SurfaceSession mSurfaceSession;
- SurfaceControl mSurfaceControl;
+ SurfaceControlWithBackground mSurfaceControl;
// In the case of format changes we switch out the surface in-place
// we need to preserve the old one until the new one has drawn.
SurfaceControl mDeferredDestroySurfaceControl;
@@ -925,6 +926,17 @@
return mSubLayer >= 0;
}
+ /**
+ * Set an opaque background color to use with this {@link SurfaceView} when it's being resized
+ * and size of the content hasn't updated yet. This color will fill the expanded area when the
+ * view becomes larger.
+ * @param bgColor An opaque color to fill the background. Alpha component will be ignored.
+ * @hide
+ */
+ public void setResizeBackgroundColor(int bgColor) {
+ mSurfaceControl.setBackgroundColor(bgColor);
+ }
+
private final SurfaceHolder mSurfaceHolder = new SurfaceHolder() {
private static final String LOG_TAG = "SurfaceHolder";
@@ -1219,6 +1231,19 @@
mBackgroundControl.deferTransactionUntil(barrier, frame);
}
+ /** Set the color to fill the background with. */
+ private void setBackgroundColor(int bgColor) {
+ final float[] colorComponents = new float[] { Color.red(bgColor) / 255.f,
+ Color.green(bgColor) / 255.f, Color.blue(bgColor) / 255.f };
+
+ SurfaceControl.openTransaction();
+ try {
+ mBackgroundControl.setColor(colorComponents);
+ } finally {
+ SurfaceControl.closeTransaction();
+ }
+ }
+
void updateBackgroundVisibility() {
if (mOpaque && mVisible) {
mBackgroundControl.show();
diff --git a/core/java/android/view/ThreadedRenderer.java b/core/java/android/view/ThreadedRenderer.java
index 8b730f2..370c97e 100644
--- a/core/java/android/view/ThreadedRenderer.java
+++ b/core/java/android/view/ThreadedRenderer.java
@@ -166,18 +166,6 @@
public static final String OVERDRAW_PROPERTY_SHOW = "show";
/**
- * Defines the rendering pipeline to be used by the ThreadedRenderer.
- *
- * Possible values:
- * "opengl", will use the existing OpenGL renderer
- * "skiagl", will use Skia's OpenGL renderer
- * "skiavk", will use Skia's Vulkan renderer
- *
- * @hide
- */
- public static final String DEBUG_RENDERER_PROPERTY = "debug.hwui.renderer";
-
- /**
* Turn on to debug non-rectangular clip operations.
*
* Possible values:
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 05770c3..5150c1f 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -16,6 +16,8 @@
package android.view;
+import static android.view.accessibility.AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED;
+
import static java.lang.Math.max;
import android.animation.AnimatorInflater;
@@ -4440,6 +4442,7 @@
private CheckForLongPress mPendingCheckForLongPress;
private CheckForTap mPendingCheckForTap = null;
private PerformClick mPerformClick;
+ private SendViewScrolledAccessibilityEvent mSendViewScrolledAccessibilityEvent;
private UnsetPressedState mUnsetPressedState;
@@ -7199,7 +7202,7 @@
if (gainFocus) {
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED);
} else {
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
@@ -7269,7 +7272,8 @@
public void setAccessibilityPaneTitle(CharSequence accessibilityPaneTitle) {
if (!TextUtils.equals(accessibilityPaneTitle, mAccessibilityPaneTitle)) {
mAccessibilityPaneTitle = accessibilityPaneTitle;
- notifyAccessibilityStateChanged(AccessibilityEvent.CONTENT_CHANGE_TYPE_PANE_TITLE);
+ notifyViewAccessibilityStateChangedIfNeeded(
+ AccessibilityEvent.CONTENT_CHANGE_TYPE_PANE_TITLE);
}
}
@@ -8548,6 +8552,12 @@
info.setLongClickable(isLongClickable());
info.setContextClickable(isContextClickable());
info.setLiveRegion(getAccessibilityLiveRegion());
+ if ((mTooltipInfo != null) && (mTooltipInfo.mTooltipText != null)) {
+ info.setTooltipText(mTooltipInfo.mTooltipText);
+ info.addAction((mTooltipInfo.mTooltipPopup == null)
+ ? AccessibilityNodeInfo.AccessibilityAction.ACTION_SHOW_TOOLTIP
+ : AccessibilityNodeInfo.AccessibilityAction.ACTION_HIDE_TOOLTIP);
+ }
// TODO: These make sense only if we are in an AdapterView but all
// views can be selected. Maybe from accessibility perspective
@@ -8916,9 +8926,9 @@
final boolean nonEmptyDesc = contentDescription != null && contentDescription.length() > 0;
if (nonEmptyDesc && getImportantForAccessibility() == IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
} else {
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION);
}
}
@@ -8951,7 +8961,7 @@
return;
}
mAccessibilityTraversalBeforeId = beforeId;
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
@@ -8995,7 +9005,7 @@
return;
}
mAccessibilityTraversalAfterId = afterId;
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
@@ -9038,7 +9048,7 @@
&& mID == View.NO_ID) {
mID = generateViewId();
}
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
@@ -10539,7 +10549,8 @@
if (pflags3 != mPrivateFlags3) {
mPrivateFlags3 = pflags3;
- notifyAccessibilityStateChanged(AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
+ notifyViewAccessibilityStateChangedIfNeeded(
+ AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
}
@@ -11253,6 +11264,8 @@
if (!isLayoutValid()) {
mPrivateFlags |= PFLAG_WANTS_FOCUS;
+ } else {
+ clearParentsWantFocus();
}
handleFocusGainInternal(direction, previouslyFocusedRect);
@@ -11367,7 +11380,7 @@
mPrivateFlags2 &= ~PFLAG2_ACCESSIBILITY_LIVE_REGION_MASK;
mPrivateFlags2 |= (mode << PFLAG2_ACCESSIBILITY_LIVE_REGION_SHIFT)
& PFLAG2_ACCESSIBILITY_LIVE_REGION_MASK;
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
}
@@ -11425,9 +11438,9 @@
mPrivateFlags2 |= (mode << PFLAG2_IMPORTANT_FOR_ACCESSIBILITY_SHIFT)
& PFLAG2_IMPORTANT_FOR_ACCESSIBILITY_MASK;
if (!maySkipNotify || oldIncludeForAccessibility != includeForAccessibility()) {
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
} else {
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
}
@@ -11604,32 +11617,11 @@
*
* @hide
*/
- public void notifyAccessibilityStateChanged(int changeType) {
- notifyAccessibilityStateChanged(this, changeType);
- }
-
- /**
- * Notifies that the accessibility state of this view changed. The change
- * is *not* local to this view and does represent structural changes such
- * as children and parent. For example, the view size changed. The
- * notification is at at most once every
- * {@link ViewConfiguration#getSendRecurringAccessibilityEventsInterval()}
- * to avoid unnecessary load to the system. Also once a view has a pending
- * notification this method is a NOP until the notification has been sent.
- *
- * @hide
- */
- public void notifyAccessibilitySubtreeChanged() {
- if ((mPrivateFlags2 & PFLAG2_SUBTREE_ACCESSIBILITY_STATE_CHANGED) == 0) {
- mPrivateFlags2 |= PFLAG2_SUBTREE_ACCESSIBILITY_STATE_CHANGED;
- notifyAccessibilityStateChanged(AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
- }
- }
-
- void notifyAccessibilityStateChanged(View source, int changeType) {
+ public void notifyViewAccessibilityStateChangedIfNeeded(int changeType) {
if (!AccessibilityManager.getInstance(mContext).isEnabled() || mAttachInfo == null) {
return;
}
+
// Changes to views with a pane title count as window state changes, as the pane title
// marks them as significant parts of the UI.
if (!TextUtils.isEmpty(getAccessibilityPaneTitle())) {
@@ -11647,12 +11639,49 @@
}
}
- if (mParent != null) {
+ // If this is a live region, we should send a subtree change event
+ // from this view immediately. Otherwise, we can let it propagate up.
+ if (getAccessibilityLiveRegion() != ACCESSIBILITY_LIVE_REGION_NONE) {
+ final AccessibilityEvent event = AccessibilityEvent.obtain();
+ event.setEventType(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
+ event.setContentChangeTypes(changeType);
+ sendAccessibilityEventUnchecked(event);
+ } else if (mParent != null) {
try {
- mParent.notifySubtreeAccessibilityStateChanged(this, source, changeType);
+ mParent.notifySubtreeAccessibilityStateChanged(this, this, changeType);
} catch (AbstractMethodError e) {
- Log.e(VIEW_LOG_TAG, mParent.getClass().getSimpleName()
- + " does not fully implement ViewParent", e);
+ Log.e(VIEW_LOG_TAG, mParent.getClass().getSimpleName() +
+ " does not fully implement ViewParent", e);
+ }
+ }
+ }
+
+ /**
+ * Notifies that the accessibility state of this view changed. The change
+ * is *not* local to this view and does represent structural changes such
+ * as children and parent. For example, the view size changed. The
+ * notification is at at most once every
+ * {@link ViewConfiguration#getSendRecurringAccessibilityEventsInterval()}
+ * to avoid unnecessary load to the system. Also once a view has a pending
+ * notification this method is a NOP until the notification has been sent.
+ *
+ * @hide
+ */
+ public void notifySubtreeAccessibilityStateChangedIfNeeded() {
+ if (!AccessibilityManager.getInstance(mContext).isEnabled() || mAttachInfo == null) {
+ return;
+ }
+
+ if ((mPrivateFlags2 & PFLAG2_SUBTREE_ACCESSIBILITY_STATE_CHANGED) == 0) {
+ mPrivateFlags2 |= PFLAG2_SUBTREE_ACCESSIBILITY_STATE_CHANGED;
+ if (mParent != null) {
+ try {
+ mParent.notifySubtreeAccessibilityStateChanged(
+ this, this, AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
+ } catch (AbstractMethodError e) {
+ Log.e(VIEW_LOG_TAG, mParent.getClass().getSimpleName() +
+ " does not fully implement ViewParent", e);
+ }
}
}
}
@@ -11674,10 +11703,8 @@
/**
* Reset the flag indicating the accessibility state of the subtree rooted
* at this view changed.
- *
- * @hide
*/
- public void resetSubtreeAccessibilityStateChanged() {
+ void resetSubtreeAccessibilityStateChanged() {
mPrivateFlags2 &= ~PFLAG2_SUBTREE_ACCESSIBILITY_STATE_CHANGED;
}
@@ -11838,7 +11865,7 @@
|| getAccessibilitySelectionEnd() != end)
&& (start == end)) {
setAccessibilitySelection(start, end);
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
return true;
}
@@ -11856,6 +11883,21 @@
return true;
}
} break;
+ case R.id.accessibilityActionShowTooltip: {
+ if ((mTooltipInfo != null) && (mTooltipInfo.mTooltipPopup != null)) {
+ // Tooltip already showing
+ return false;
+ }
+ return showLongClickTooltip(0, 0);
+ }
+ case R.id.accessibilityActionHideTooltip: {
+ if ((mTooltipInfo == null) || (mTooltipInfo.mTooltipPopup == null)) {
+ // No tooltip showing
+ return false;
+ }
+ hideTooltip();
+ return true;
+ }
}
return false;
}
@@ -12624,7 +12666,7 @@
}
if (!TextUtils.isEmpty(getAccessibilityPaneTitle())) {
if (isVisible != oldVisible) {
- notifyAccessibilityStateChanged(isVisible
+ notifyViewAccessibilityStateChangedIfNeeded(isVisible
? AccessibilityEvent.CONTENT_CHANGE_TYPE_PANE_APPEARED
: AccessibilityEvent.CONTENT_CHANGE_TYPE_PANE_DISAPPEARED);
}
@@ -13841,7 +13883,7 @@
((!(mParent instanceof ViewGroup)) || ((ViewGroup) mParent).isShown())) {
dispatchVisibilityAggregated(newVisibility == VISIBLE);
}
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
}
@@ -13887,13 +13929,13 @@
|| (changed & CLICKABLE) != 0 || (changed & LONG_CLICKABLE) != 0
|| (changed & CONTEXT_CLICKABLE) != 0) {
if (oldIncludeForAccessibility != includeForAccessibility()) {
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
} else {
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
} else if ((changed & ENABLED_MASK) != 0) {
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
}
@@ -13928,13 +13970,10 @@
* @param oldt Previous vertical scroll origin.
*/
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
- ViewRootImpl root = getViewRootImpl();
- if (root != null) {
- root.getAccessibilityState()
- .getSendViewScrolledAccessibilityEvent()
- .post(this, /* dx */ l - oldl, /* dy */ t - oldt);
+ if (AccessibilityManager.getInstance(mContext).isEnabled()) {
+ postSendViewScrolledAccessibilityEventCallback(l - oldl, t - oldt);
}
mBackgroundSizeChanged = true;
@@ -14330,7 +14369,7 @@
invalidateViewProperty(false, true);
invalidateParentIfNeededAndWasQuickRejected();
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
}
@@ -14374,7 +14413,7 @@
invalidateViewProperty(false, true);
invalidateParentIfNeededAndWasQuickRejected();
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
}
@@ -14418,7 +14457,7 @@
invalidateViewProperty(false, true);
invalidateParentIfNeededAndWasQuickRejected();
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
}
@@ -14455,7 +14494,7 @@
invalidateViewProperty(false, true);
invalidateParentIfNeededAndWasQuickRejected();
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
}
@@ -14492,7 +14531,7 @@
invalidateViewProperty(false, true);
invalidateParentIfNeededAndWasQuickRejected();
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
}
@@ -14695,7 +14734,7 @@
if (mTransformationInfo.mAlpha != alpha) {
// Report visibility changes, which can affect children, to accessibility
if ((alpha == 0) ^ (mTransformationInfo.mAlpha == 0)) {
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
mTransformationInfo.mAlpha = alpha;
if (onSetAlpha((int) (alpha * 255))) {
@@ -15197,7 +15236,7 @@
invalidateViewProperty(false, true);
invalidateParentIfNeededAndWasQuickRejected();
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
}
@@ -15231,7 +15270,7 @@
invalidateViewProperty(false, true);
invalidateParentIfNeededAndWasQuickRejected();
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
}
@@ -15401,7 +15440,7 @@
public void invalidateOutline() {
rebuildOutline();
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
invalidateViewProperty(false, false);
}
@@ -15596,7 +15635,7 @@
}
invalidateParentIfNeeded();
}
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
}
@@ -15644,7 +15683,7 @@
}
invalidateParentIfNeeded();
}
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
}
@@ -16522,6 +16561,18 @@
}
/**
+ * Post a callback to send a {@link AccessibilityEvent#TYPE_VIEW_SCROLLED} event.
+ * This event is sent at most once every
+ * {@link ViewConfiguration#getSendRecurringAccessibilityEventsInterval()}.
+ */
+ private void postSendViewScrolledAccessibilityEventCallback(int dx, int dy) {
+ if (mSendViewScrolledAccessibilityEvent == null) {
+ mSendViewScrolledAccessibilityEvent = new SendViewScrolledAccessibilityEvent();
+ }
+ mSendViewScrolledAccessibilityEvent.post(dx, dy);
+ }
+
+ /**
* Called by a parent to request that a child update its values for mScrollX
* and mScrollY if necessary. This will typically be done if the child is
* animating a scroll using a {@link android.widget.Scroller Scroller}
@@ -17776,13 +17827,7 @@
removeUnsetPressCallback();
removeLongPressCallback();
removePerformClickCallback();
- if (mAttachInfo != null
- && mAttachInfo.mViewRootImpl.mAccessibilityState != null
- && mAttachInfo.mViewRootImpl.mAccessibilityState.isScrollEventSenderInitialized()) {
- mAttachInfo.mViewRootImpl.mAccessibilityState
- .getSendViewScrolledAccessibilityEvent()
- .cancelIfPendingFor(this);
- }
+ cancel(mSendViewScrolledAccessibilityEvent);
stopNestedScroll();
// Anything that started animating right before detach should already
@@ -20410,7 +20455,7 @@
mForegroundInfo.mBoundsChanged = true;
}
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
return changed;
}
@@ -21854,7 +21899,7 @@
if (selected) {
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
} else {
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
}
@@ -22209,7 +22254,7 @@
*
* @param id the ID to search for
* @return a view with given ID if found, or {@code null} otherwise
- * @see View#findViewById(int)
+ * @see View#requireViewById(int)
*/
@Nullable
public final <T extends View> T findViewById(@IdRes int id) {
@@ -22220,6 +22265,29 @@
}
/**
+ * Finds the first descendant view with the given ID, the view itself if the ID matches
+ * {@link #getId()}, or throws an IllegalArgumentException if the ID is invalid or there is no
+ * matching view in the hierarchy.
+ * <p>
+ * <strong>Note:</strong> In most cases -- depending on compiler support --
+ * the resulting view is automatically cast to the target class type. If
+ * the target class type is unconstrained, an explicit cast may be
+ * necessary.
+ *
+ * @param id the ID to search for
+ * @return a view with given ID
+ * @see View#findViewById(int)
+ */
+ @NonNull
+ public final <T extends View> T requireViewById(@IdRes int id) {
+ T view = findViewById(id);
+ if (view == null) {
+ throw new IllegalArgumentException("ID does not reference a View inside this View");
+ }
+ return view;
+ }
+
+ /**
* Finds a view by its unuque and stable accessibility id.
*
* @param accessibilityId The searched accessibility id.
@@ -26419,6 +26487,53 @@
}
/**
+ * Resuable callback for sending
+ * {@link AccessibilityEvent#TYPE_VIEW_SCROLLED} accessibility event.
+ */
+ private class SendViewScrolledAccessibilityEvent implements Runnable {
+ public volatile boolean mIsPending;
+ public int mDeltaX;
+ public int mDeltaY;
+
+ public void post(int dx, int dy) {
+ mDeltaX += dx;
+ mDeltaY += dy;
+ if (!mIsPending) {
+ mIsPending = true;
+ postDelayed(this, ViewConfiguration.getSendRecurringAccessibilityEventsInterval());
+ }
+ }
+
+ @Override
+ public void run() {
+ if (AccessibilityManager.getInstance(mContext).isEnabled()) {
+ AccessibilityEvent event = AccessibilityEvent.obtain(
+ AccessibilityEvent.TYPE_VIEW_SCROLLED);
+ event.setScrollDeltaX(mDeltaX);
+ event.setScrollDeltaY(mDeltaY);
+ sendAccessibilityEventUnchecked(event);
+ }
+ reset();
+ }
+
+ private void reset() {
+ mIsPending = false;
+ mDeltaX = 0;
+ mDeltaY = 0;
+ }
+ }
+
+ /**
+ * Remove the pending callback for sending a
+ * {@link AccessibilityEvent#TYPE_VIEW_SCROLLED} accessibility event.
+ */
+ private void cancel(@Nullable SendViewScrolledAccessibilityEvent callback) {
+ if (callback == null || !callback.mIsPending) return;
+ removeCallbacks(callback);
+ callback.reset();
+ }
+
+ /**
* <p>
* This class represents a delegate that can be registered in a {@link View}
* to enhance accessibility support via composition rather via inheritance.
@@ -27034,6 +27149,8 @@
final boolean fromTouch = (mPrivateFlags3 & PFLAG3_FINGER_DOWN) == PFLAG3_FINGER_DOWN;
mTooltipInfo.mTooltipPopup.show(this, x, y, fromTouch, mTooltipInfo.mTooltipText);
mAttachInfo.mTooltipHost = this;
+ // The available accessibility actions have changed
+ notifyViewAccessibilityStateChangedIfNeeded(CONTENT_CHANGE_TYPE_UNDEFINED);
return true;
}
@@ -27052,6 +27169,8 @@
if (mAttachInfo != null) {
mAttachInfo.mTooltipHost = null;
}
+ // The available accessibility actions have changed
+ notifyViewAccessibilityStateChangedIfNeeded(CONTENT_CHANGE_TYPE_UNDEFINED);
}
private boolean showLongClickTooltip(int x, int y) {
@@ -27060,8 +27179,8 @@
return showTooltip(x, y, true);
}
- private void showHoverTooltip() {
- showTooltip(mTooltipInfo.mAnchorX, mTooltipInfo.mAnchorY, false);
+ private boolean showHoverTooltip() {
+ return showTooltip(mTooltipInfo.mAnchorX, mTooltipInfo.mAnchorY, false);
}
boolean dispatchTooltipHoverEvent(MotionEvent event) {
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 4631261..a8bdb85 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -3649,34 +3649,44 @@
return ViewGroup.class.getName();
}
+ @Override
+ public void notifySubtreeAccessibilityStateChanged(View child, View source, int changeType) {
+ // If this is a live region, we should send a subtree change event
+ // from this view. Otherwise, we can let it propagate up.
+ if (getAccessibilityLiveRegion() != ACCESSIBILITY_LIVE_REGION_NONE) {
+ notifyViewAccessibilityStateChangedIfNeeded(
+ AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
+ } else if (mParent != null) {
+ try {
+ mParent.notifySubtreeAccessibilityStateChanged(this, source, changeType);
+ } catch (AbstractMethodError e) {
+ Log.e(VIEW_LOG_TAG, mParent.getClass().getSimpleName() +
+ " does not fully implement ViewParent", e);
+ }
+ }
+ }
+
/** @hide */
@Override
- public void notifyAccessibilitySubtreeChanged() {
+ public void notifySubtreeAccessibilityStateChangedIfNeeded() {
if (!AccessibilityManager.getInstance(mContext).isEnabled() || mAttachInfo == null) {
return;
}
// If something important for a11y is happening in this subtree, make sure it's dispatched
// from a view that is important for a11y so it doesn't get lost.
- if (getImportantForAccessibility() != IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
- && !isImportantForAccessibility()
- && getChildCount() > 0) {
+ if ((getImportantForAccessibility() != IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS)
+ && !isImportantForAccessibility() && (getChildCount() > 0)) {
ViewParent a11yParent = getParentForAccessibility();
if (a11yParent instanceof View) {
- ((View) a11yParent).notifyAccessibilitySubtreeChanged();
+ ((View) a11yParent).notifySubtreeAccessibilityStateChangedIfNeeded();
return;
}
}
- super.notifyAccessibilitySubtreeChanged();
+ super.notifySubtreeAccessibilityStateChangedIfNeeded();
}
@Override
- public void notifySubtreeAccessibilityStateChanged(View child, View source, int changeType) {
- notifyAccessibilityStateChanged(source, changeType);
- }
-
- /** @hide */
- @Override
- public void resetSubtreeAccessibilityStateChanged() {
+ void resetSubtreeAccessibilityStateChanged() {
super.resetSubtreeAccessibilityStateChanged();
View[] children = mChildren;
final int childCount = mChildrenCount;
@@ -5088,7 +5098,7 @@
}
if (child.getVisibility() != View.GONE) {
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
if (mTransientIndices != null) {
@@ -5358,7 +5368,7 @@
dispatchViewRemoved(view);
if (view.getVisibility() != View.GONE) {
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
int transientCount = mTransientIndices == null ? 0 : mTransientIndices.size();
@@ -6077,7 +6087,7 @@
if (invalidate) {
invalidateViewProperty(false, false);
}
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
@Override
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 30f584c..0af1254 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -89,11 +89,9 @@
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction;
import android.view.accessibility.AccessibilityNodeProvider;
-import android.view.accessibility.AccessibilityViewHierarchyState;
import android.view.accessibility.AccessibilityWindowInfo;
import android.view.accessibility.IAccessibilityInteractionConnection;
import android.view.accessibility.IAccessibilityInteractionConnectionCallback;
-import android.view.accessibility.ThrottlingAccessibilityEventSender;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.Interpolator;
import android.view.inputmethod.InputMethodManager;
@@ -115,6 +113,7 @@
import java.io.PrintWriter;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.concurrent.CountDownLatch;
/**
@@ -461,6 +460,10 @@
new AccessibilityInteractionConnectionManager();
final HighContrastTextManager mHighContrastTextManager;
+ SendWindowContentChangedAccessibilityEvent mSendWindowContentChangedAccessibilityEvent;
+
+ HashSet<View> mTempHashSet;
+
private final int mDensity;
private final int mNoncompatDensity;
@@ -475,8 +478,6 @@
private boolean mNeedsRendererSetup;
- protected AccessibilityViewHierarchyState mAccessibilityState;
-
/**
* Consistency verifier for debugging purposes.
*/
@@ -895,6 +896,26 @@
return mWindowAttributes.getTitle();
}
+ /**
+ * @return the width of the root view. Note that this will return {@code -1} until the first
+ * layout traversal, when the width is set.
+ *
+ * @hide
+ */
+ public int getWidth() {
+ return mWidth;
+ }
+
+ /**
+ * @return the height of the root view. Note that this will return {@code -1} until the first
+ * layout traversal, when the height is set.
+ *
+ * @hide
+ */
+ public int getHeight() {
+ return mHeight;
+ }
+
void destroyHardwareResources() {
if (mAttachInfo.mThreadedRenderer != null) {
mAttachInfo.mThreadedRenderer.destroyHardwareResources(mView);
@@ -7258,9 +7279,11 @@
* {@link ViewConfiguration#getSendRecurringAccessibilityEventsInterval()}.
*/
private void postSendWindowContentChangedCallback(View source, int changeType) {
- getAccessibilityState()
- .getSendWindowContentChangedAccessibilityEvent()
- .runOrPost(source, changeType);
+ if (mSendWindowContentChangedAccessibilityEvent == null) {
+ mSendWindowContentChangedAccessibilityEvent =
+ new SendWindowContentChangedAccessibilityEvent();
+ }
+ mSendWindowContentChangedAccessibilityEvent.runOrPost(source, changeType);
}
/**
@@ -7268,20 +7291,11 @@
* {@link AccessibilityEvent#TYPE_WINDOW_CONTENT_CHANGED} event.
*/
private void removeSendWindowContentChangedCallback() {
- if (mAccessibilityState != null
- && mAccessibilityState.isWindowContentChangedEventSenderInitialized()) {
- ThrottlingAccessibilityEventSender.cancelIfPending(
- mAccessibilityState.getSendWindowContentChangedAccessibilityEvent());
+ if (mSendWindowContentChangedAccessibilityEvent != null) {
+ mHandler.removeCallbacks(mSendWindowContentChangedAccessibilityEvent);
}
}
- AccessibilityViewHierarchyState getAccessibilityState() {
- if (mAccessibilityState == null) {
- mAccessibilityState = new AccessibilityViewHierarchyState();
- }
- return mAccessibilityState;
- }
-
@Override
public boolean showContextMenuForChild(View originalView) {
return false;
@@ -7317,8 +7331,12 @@
return false;
}
- // Send any pending event to prevent reordering
- flushPendingAccessibilityEvents();
+ // Immediately flush pending content changed event (if any) to preserve event order
+ if (event.getEventType() != AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED
+ && mSendWindowContentChangedAccessibilityEvent != null
+ && mSendWindowContentChangedAccessibilityEvent.mSource != null) {
+ mSendWindowContentChangedAccessibilityEvent.removeCallbacksAndRun();
+ }
// Intercept accessibility focus events fired by virtual nodes to keep
// track of accessibility focus position in such nodes.
@@ -7362,19 +7380,6 @@
return true;
}
- /** @hide */
- public void flushPendingAccessibilityEvents() {
- if (mAccessibilityState != null) {
- if (mAccessibilityState.isScrollEventSenderInitialized()) {
- mAccessibilityState.getSendViewScrolledAccessibilityEvent().sendNowIfPending();
- }
- if (mAccessibilityState.isWindowContentChangedEventSenderInitialized()) {
- mAccessibilityState.getSendWindowContentChangedAccessibilityEvent()
- .sendNowIfPending();
- }
- }
- }
-
/**
* Updates the focused virtual view, when necessary, in response to a
* content changed event.
@@ -7509,6 +7514,39 @@
return View.TEXT_ALIGNMENT_RESOLVED_DEFAULT;
}
+ private View getCommonPredecessor(View first, View second) {
+ if (mTempHashSet == null) {
+ mTempHashSet = new HashSet<View>();
+ }
+ HashSet<View> seen = mTempHashSet;
+ seen.clear();
+ View firstCurrent = first;
+ while (firstCurrent != null) {
+ seen.add(firstCurrent);
+ ViewParent firstCurrentParent = firstCurrent.mParent;
+ if (firstCurrentParent instanceof View) {
+ firstCurrent = (View) firstCurrentParent;
+ } else {
+ firstCurrent = null;
+ }
+ }
+ View secondCurrent = second;
+ while (secondCurrent != null) {
+ if (seen.contains(secondCurrent)) {
+ seen.clear();
+ return secondCurrent;
+ }
+ ViewParent secondCurrentParent = secondCurrent.mParent;
+ if (secondCurrentParent instanceof View) {
+ secondCurrent = (View) secondCurrentParent;
+ } else {
+ secondCurrent = null;
+ }
+ }
+ seen.clear();
+ return null;
+ }
+
void checkThread() {
if (mThread != Thread.currentThread()) {
throw new CalledFromWrongThreadException(
@@ -8119,6 +8157,80 @@
}
}
+ private class SendWindowContentChangedAccessibilityEvent implements Runnable {
+ private int mChangeTypes = 0;
+
+ public View mSource;
+ public long mLastEventTimeMillis;
+
+ @Override
+ public void run() {
+ // Protect against re-entrant code and attempt to do the right thing in the case that
+ // we're multithreaded.
+ View source = mSource;
+ mSource = null;
+ if (source == null) {
+ Log.e(TAG, "Accessibility content change has no source");
+ return;
+ }
+ // The accessibility may be turned off while we were waiting so check again.
+ if (AccessibilityManager.getInstance(mContext).isEnabled()) {
+ mLastEventTimeMillis = SystemClock.uptimeMillis();
+ AccessibilityEvent event = AccessibilityEvent.obtain();
+ event.setEventType(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
+ event.setContentChangeTypes(mChangeTypes);
+ source.sendAccessibilityEventUnchecked(event);
+ } else {
+ mLastEventTimeMillis = 0;
+ }
+ // In any case reset to initial state.
+ source.resetSubtreeAccessibilityStateChanged();
+ mChangeTypes = 0;
+ }
+
+ public void runOrPost(View source, int changeType) {
+ if (mHandler.getLooper() != Looper.myLooper()) {
+ CalledFromWrongThreadException e = new CalledFromWrongThreadException("Only the "
+ + "original thread that created a view hierarchy can touch its views.");
+ // TODO: Throw the exception
+ Log.e(TAG, "Accessibility content change on non-UI thread. Future Android "
+ + "versions will throw an exception.", e);
+ // Attempt to recover. This code does not eliminate the thread safety issue, but
+ // it should force any issues to happen near the above log.
+ mHandler.removeCallbacks(this);
+ if (mSource != null) {
+ // Dispatch whatever was pending. It's still possible that the runnable started
+ // just before we removed the callbacks, and bad things will happen, but at
+ // least they should happen very close to the logged error.
+ run();
+ }
+ }
+ if (mSource != null) {
+ // If there is no common predecessor, then mSource points to
+ // a removed view, hence in this case always prefer the source.
+ View predecessor = getCommonPredecessor(mSource, source);
+ mSource = (predecessor != null) ? predecessor : source;
+ mChangeTypes |= changeType;
+ return;
+ }
+ mSource = source;
+ mChangeTypes = changeType;
+ final long timeSinceLastMillis = SystemClock.uptimeMillis() - mLastEventTimeMillis;
+ final long minEventIntevalMillis =
+ ViewConfiguration.getSendRecurringAccessibilityEventsInterval();
+ if (timeSinceLastMillis >= minEventIntevalMillis) {
+ removeCallbacksAndRun();
+ } else {
+ mHandler.postDelayed(this, minEventIntevalMillis - timeSinceLastMillis);
+ }
+ }
+
+ public void removeCallbacksAndRun() {
+ mHandler.removeCallbacks(this);
+ run();
+ }
+ }
+
private static class KeyFallbackManager {
// This is used to ensure that key-fallback events are only dispatched once. We attempt
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 95abea1..93b3fc2 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -25,7 +25,6 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StyleRes;
-import android.annotation.SystemApi;
import android.app.WindowConfiguration;
import android.content.Context;
import android.content.pm.ActivityInfo;
@@ -1255,14 +1254,6 @@
}
/** @hide */
- @SystemApi
- public void setDisableWallpaperTouchEvents(boolean disable) {
- setPrivateFlags(disable
- ? WindowManager.LayoutParams.PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS : 0,
- WindowManager.LayoutParams.PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS);
- }
-
- /** @hide */
public abstract void alwaysReadCloseOnTouchAttr();
/** @hide */
@@ -1339,9 +1330,9 @@
/**
* Finds a view that was identified by the {@code android:id} XML attribute
- * that was processed in {@link android.app.Activity#onCreate}. This will
- * implicitly call {@link #getDecorView} with all of the associated
- * side-effects.
+ * that was processed in {@link android.app.Activity#onCreate}.
+ * <p>
+ * This will implicitly call {@link #getDecorView} with all of the associated side-effects.
* <p>
* <strong>Note:</strong> In most cases -- depending on compiler support --
* the resulting view is automatically cast to the target class type. If
@@ -1351,11 +1342,35 @@
* @param id the ID to search for
* @return a view with given ID if found, or {@code null} otherwise
* @see View#findViewById(int)
+ * @see Window#requireViewById(int)
*/
@Nullable
public <T extends View> T findViewById(@IdRes int id) {
return getDecorView().findViewById(id);
}
+ /**
+ * Finds a view that was identified by the {@code android:id} XML attribute
+ * that was processed in {@link android.app.Activity#onCreate}, or throws an
+ * IllegalArgumentException if the ID is invalid, or there is no matching view in the hierarchy.
+ * <p>
+ * <strong>Note:</strong> In most cases -- depending on compiler support --
+ * the resulting view is automatically cast to the target class type. If
+ * the target class type is unconstrained, an explicit cast may be
+ * necessary.
+ *
+ * @param id the ID to search for
+ * @return a view with given ID
+ * @see View#requireViewById(int)
+ * @see Window#findViewById(int)
+ */
+ @NonNull
+ public final <T extends View> T requireViewById(@IdRes int id) {
+ T view = findViewById(id);
+ if (view == null) {
+ throw new IllegalArgumentException("ID does not reference a View inside this Window");
+ }
+ return view;
+ }
/**
* Convenience for
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index 3bb3a4c..1c5e871 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -98,11 +98,13 @@
int DOCKED_BOTTOM = 4;
/** @hide */
- final static String INPUT_CONSUMER_PIP = "pip_input_consumer";
+ String INPUT_CONSUMER_PIP = "pip_input_consumer";
/** @hide */
- final static String INPUT_CONSUMER_NAVIGATION = "nav_input_consumer";
+ String INPUT_CONSUMER_NAVIGATION = "nav_input_consumer";
/** @hide */
- final static String INPUT_CONSUMER_WALLPAPER = "wallpaper_input_consumer";
+ String INPUT_CONSUMER_WALLPAPER = "wallpaper_input_consumer";
+ /** @hide */
+ String INPUT_CONSUMER_RECENTS_ANIMATION = "recents_animation_input_consumer";
/**
* Not set up for a transition.
diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
index 3ee282e..23e7d61 100644
--- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
@@ -727,6 +727,7 @@
private CharSequence mError;
private CharSequence mPaneTitle;
private CharSequence mContentDescription;
+ private CharSequence mTooltipText;
private String mViewIdResourceName;
private ArrayList<String> mExtraDataKeys;
@@ -2655,6 +2656,34 @@
}
/**
+ * Gets the tooltip text of this node.
+ *
+ * @return The tooltip text.
+ */
+ @Nullable
+ public CharSequence getTooltipText() {
+ return mTooltipText;
+ }
+
+ /**
+ * Sets the tooltip text of this node.
+ * <p>
+ * <strong>Note:</strong> Cannot be called from an
+ * {@link android.accessibilityservice.AccessibilityService}.
+ * This class is made immutable before being delivered to an AccessibilityService.
+ * </p>
+ *
+ * @param tooltipText The tooltip text.
+ *
+ * @throws IllegalStateException If called from an AccessibilityService.
+ */
+ public void setTooltipText(@Nullable CharSequence tooltipText) {
+ enforceNotSealed();
+ mTooltipText = (tooltipText == null) ? null
+ : tooltipText.subSequence(0, tooltipText.length());
+ }
+
+ /**
* Sets the view for which the view represented by this info serves as a
* label for accessibility purposes.
*
@@ -3209,6 +3238,10 @@
nonDefaultFields |= bitAt(fieldIndex);
}
fieldIndex++;
+ if (!Objects.equals(mTooltipText, DEFAULT.mTooltipText)) {
+ nonDefaultFields |= bitAt(fieldIndex);
+ }
+ fieldIndex++;
if (!Objects.equals(mViewIdResourceName, DEFAULT.mViewIdResourceName)) {
nonDefaultFields |= bitAt(fieldIndex);
}
@@ -3329,6 +3362,8 @@
parcel.writeCharSequence(mContentDescription);
}
if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeCharSequence(mPaneTitle);
+ if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeCharSequence(mTooltipText);
+
if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeString(mViewIdResourceName);
if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeInt(mTextSelectionStart);
@@ -3401,6 +3436,7 @@
mError = other.mError;
mContentDescription = other.mContentDescription;
mPaneTitle = other.mPaneTitle;
+ mTooltipText = other.mTooltipText;
mViewIdResourceName = other.mViewIdResourceName;
if (mActions != null) mActions.clear();
@@ -3522,6 +3558,7 @@
mContentDescription = parcel.readCharSequence();
}
if (isBitSet(nonDefaultFields, fieldIndex++)) mPaneTitle = parcel.readString();
+ if (isBitSet(nonDefaultFields, fieldIndex++)) mTooltipText = parcel.readCharSequence();
if (isBitSet(nonDefaultFields, fieldIndex++)) mViewIdResourceName = parcel.readString();
if (isBitSet(nonDefaultFields, fieldIndex++)) mTextSelectionStart = parcel.readInt();
@@ -3684,6 +3721,10 @@
return "ACTION_SET_PROGRESS";
case R.id.accessibilityActionContextClick:
return "ACTION_CONTEXT_CLICK";
+ case R.id.accessibilityActionShowTooltip:
+ return "ACTION_SHOW_TOOLTIP";
+ case R.id.accessibilityActionHideTooltip:
+ return "ACTION_HIDE_TOOLTIP";
default:
return "ACTION_UNKNOWN";
}
@@ -3797,6 +3838,7 @@
builder.append("; error: ").append(mError);
builder.append("; maxTextLength: ").append(mMaxTextLength);
builder.append("; contentDescription: ").append(mContentDescription);
+ builder.append("; tooltipText: ").append(mTooltipText);
builder.append("; viewIdResName: ").append(mViewIdResourceName);
builder.append("; checkable: ").append(isCheckable());
@@ -4211,6 +4253,20 @@
public static final AccessibilityAction ACTION_MOVE_WINDOW =
new AccessibilityAction(R.id.accessibilityActionMoveWindow);
+ /**
+ * Action to show a tooltip. A node should expose this action only for views with tooltip
+ * text that but are not currently showing a tooltip.
+ */
+ public static final AccessibilityAction ACTION_SHOW_TOOLTIP =
+ new AccessibilityAction(R.id.accessibilityActionShowTooltip);
+
+ /**
+ * Action to hide a tooltip. A node should expose this action only for views that are
+ * currently showing a tooltip.
+ */
+ public static final AccessibilityAction ACTION_HIDE_TOOLTIP =
+ new AccessibilityAction(R.id.accessibilityActionHideTooltip);
+
private final int mActionId;
private final CharSequence mLabel;
diff --git a/core/java/android/view/accessibility/AccessibilityViewHierarchyState.java b/core/java/android/view/accessibility/AccessibilityViewHierarchyState.java
deleted file mode 100644
index 447fafa..0000000
--- a/core/java/android/view/accessibility/AccessibilityViewHierarchyState.java
+++ /dev/null
@@ -1,61 +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 android.view.accessibility;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-
-/**
- * Accessibility-related state of a {@link android.view.ViewRootImpl}
- *
- * @hide
- */
-public class AccessibilityViewHierarchyState {
- private @Nullable SendViewScrolledAccessibilityEvent mSendViewScrolledAccessibilityEvent;
- private @Nullable SendWindowContentChangedAccessibilityEvent
- mSendWindowContentChangedAccessibilityEvent;
-
- /**
- * @return a {@link SendViewScrolledAccessibilityEvent}, creating one if needed
- */
- public @NonNull SendViewScrolledAccessibilityEvent getSendViewScrolledAccessibilityEvent() {
- if (mSendViewScrolledAccessibilityEvent == null) {
- mSendViewScrolledAccessibilityEvent = new SendViewScrolledAccessibilityEvent();
- }
- return mSendViewScrolledAccessibilityEvent;
- }
-
- public boolean isScrollEventSenderInitialized() {
- return mSendViewScrolledAccessibilityEvent != null;
- }
-
- /**
- * @return a {@link SendWindowContentChangedAccessibilityEvent}, creating one if needed
- */
- public @NonNull SendWindowContentChangedAccessibilityEvent
- getSendWindowContentChangedAccessibilityEvent() {
- if (mSendWindowContentChangedAccessibilityEvent == null) {
- mSendWindowContentChangedAccessibilityEvent =
- new SendWindowContentChangedAccessibilityEvent();
- }
- return mSendWindowContentChangedAccessibilityEvent;
- }
-
- public boolean isWindowContentChangedEventSenderInitialized() {
- return mSendWindowContentChangedAccessibilityEvent != null;
- }
-}
diff --git a/core/java/android/view/accessibility/SendViewScrolledAccessibilityEvent.java b/core/java/android/view/accessibility/SendViewScrolledAccessibilityEvent.java
deleted file mode 100644
index 40a1b6a..0000000
--- a/core/java/android/view/accessibility/SendViewScrolledAccessibilityEvent.java
+++ /dev/null
@@ -1,58 +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 android.view.accessibility;
-
-
-import android.annotation.NonNull;
-import android.view.View;
-
-/**
- * Sender for {@link AccessibilityEvent#TYPE_VIEW_SCROLLED} accessibility event.
- *
- * @hide
- */
-public class SendViewScrolledAccessibilityEvent extends ThrottlingAccessibilityEventSender {
-
- public int mDeltaX;
- public int mDeltaY;
-
- /**
- * Post a scroll event to be sent for the given view
- */
- public void post(View source, int dx, int dy) {
- if (!isPendingFor(source)) sendNowIfPending();
-
- mDeltaX += dx;
- mDeltaY += dy;
-
- if (!isPendingFor(source)) scheduleFor(source);
- }
-
- @Override
- protected void performSendEvent(@NonNull View source) {
- AccessibilityEvent event = AccessibilityEvent.obtain(AccessibilityEvent.TYPE_VIEW_SCROLLED);
- event.setScrollDeltaX(mDeltaX);
- event.setScrollDeltaY(mDeltaY);
- source.sendAccessibilityEventUnchecked(event);
- }
-
- @Override
- protected void resetState(@NonNull View source) {
- mDeltaX = 0;
- mDeltaY = 0;
- }
-}
diff --git a/core/java/android/view/accessibility/SendWindowContentChangedAccessibilityEvent.java b/core/java/android/view/accessibility/SendWindowContentChangedAccessibilityEvent.java
deleted file mode 100644
index df38fba..0000000
--- a/core/java/android/view/accessibility/SendWindowContentChangedAccessibilityEvent.java
+++ /dev/null
@@ -1,111 +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 android.view.accessibility;
-
-
-import static com.android.internal.util.ObjectUtils.firstNotNull;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.view.View;
-import android.view.ViewParent;
-
-import java.util.HashSet;
-
-/**
- * @hide
- */
-public class SendWindowContentChangedAccessibilityEvent
- extends ThrottlingAccessibilityEventSender {
-
- private int mChangeTypes = 0;
-
- private HashSet<View> mTempHashSet;
-
- @Override
- protected void performSendEvent(@NonNull View source) {
- AccessibilityEvent event = AccessibilityEvent.obtain();
- event.setEventType(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
- event.setContentChangeTypes(mChangeTypes);
- source.sendAccessibilityEventUnchecked(event);
- }
-
- @Override
- protected void resetState(@Nullable View source) {
- if (source != null) {
- source.resetSubtreeAccessibilityStateChanged();
- }
- mChangeTypes = 0;
- }
-
- /**
- * Post the {@link AccessibilityEvent#TYPE_WINDOW_CONTENT_CHANGED} event with the given
- * {@link AccessibilityEvent#getContentChangeTypes change type} for the given view
- */
- public void runOrPost(View source, int changeType) {
- if (source.getAccessibilityLiveRegion() != View.ACCESSIBILITY_LIVE_REGION_NONE) {
- sendNowIfPending();
- mChangeTypes = changeType;
- sendNow(source);
- } else {
- mChangeTypes |= changeType;
- scheduleFor(source);
- }
- }
-
- @Override
- protected @Nullable View tryMerge(@NonNull View oldSource, @NonNull View newSource) {
- // If there is no common predecessor, then oldSource points to
- // a removed view, hence in this case always prefer the newSource.
- return firstNotNull(
- getCommonPredecessor(oldSource, newSource),
- newSource);
- }
-
- private View getCommonPredecessor(View first, View second) {
- if (mTempHashSet == null) {
- mTempHashSet = new HashSet<>();
- }
- HashSet<View> seen = mTempHashSet;
- seen.clear();
- View firstCurrent = first;
- while (firstCurrent != null) {
- seen.add(firstCurrent);
- ViewParent firstCurrentParent = firstCurrent.getParent();
- if (firstCurrentParent instanceof View) {
- firstCurrent = (View) firstCurrentParent;
- } else {
- firstCurrent = null;
- }
- }
- View secondCurrent = second;
- while (secondCurrent != null) {
- if (seen.contains(secondCurrent)) {
- seen.clear();
- return secondCurrent;
- }
- ViewParent secondCurrentParent = secondCurrent.getParent();
- if (secondCurrentParent instanceof View) {
- secondCurrent = (View) secondCurrentParent;
- } else {
- secondCurrent = null;
- }
- }
- seen.clear();
- return null;
- }
-}
diff --git a/core/java/android/view/accessibility/ThrottlingAccessibilityEventSender.java b/core/java/android/view/accessibility/ThrottlingAccessibilityEventSender.java
deleted file mode 100644
index 66fa301..0000000
--- a/core/java/android/view/accessibility/ThrottlingAccessibilityEventSender.java
+++ /dev/null
@@ -1,248 +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 android.view.accessibility;
-
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.os.Handler;
-import android.os.Looper;
-import android.os.SystemClock;
-import android.util.Log;
-import android.view.View;
-import android.view.ViewConfiguration;
-import android.view.ViewRootImpl;
-import android.view.ViewRootImpl.CalledFromWrongThreadException;
-
-/**
- * A throttling {@link AccessibilityEvent} sender that relies on its currently associated
- * 'source' view's {@link View#postDelayed delayed execution} to delay and possibly
- * {@link #tryMerge merge} together any events that come in less than
- * {@link ViewConfiguration#getSendRecurringAccessibilityEventsInterval
- * the configured amount of milliseconds} apart.
- *
- * The suggested usage is to create a singleton extending this class, holding any state specific to
- * the particular event type that the subclass represents, and have an 'entrypoint' method that
- * delegates to {@link #scheduleFor(View)}.
- * For example:
- *
- * {@code
- * public void post(View view, String text, int resId) {
- * mText = text;
- * mId = resId;
- * scheduleFor(view);
- * }
- * }
- *
- * @see #scheduleFor(View)
- * @see #tryMerge(View, View)
- * @see #performSendEvent(View)
- * @hide
- */
-public abstract class ThrottlingAccessibilityEventSender {
-
- private static final boolean DEBUG = false;
- private static final String LOG_TAG = "ThrottlingA11ySender";
-
- View mSource;
- private long mLastSendTimeMillis = Long.MIN_VALUE;
- private boolean mIsPending = false;
-
- private final Runnable mWorker = () -> {
- View source = mSource;
- if (DEBUG) Log.d(LOG_TAG, thisClass() + ".run(mSource = " + source + ")");
-
- if (!checkAndResetIsPending() || source == null) {
- resetStateInternal();
- return;
- }
-
- // Accessibility may be turned off while we were waiting
- if (isAccessibilityEnabled(source)) {
- mLastSendTimeMillis = SystemClock.uptimeMillis();
- performSendEvent(source);
- }
- resetStateInternal();
- };
-
- /**
- * Populate and send an {@link AccessibilityEvent} using the given {@code source} view, as well
- * as any extra data from this instance's state.
- *
- * Send the event via {@link View#sendAccessibilityEventUnchecked(AccessibilityEvent)} or
- * {@link View#sendAccessibilityEvent(int)} on the provided {@code source} view to allow for
- * overrides of those methods on {@link View} subclasses to take effect, and/or make sure that
- * an {@link View#getAccessibilityDelegate() accessibility delegate} is not ignored if any.
- */
- protected abstract void performSendEvent(@NonNull View source);
-
- /**
- * Perform optional cleanup after {@link #performSendEvent}
- *
- * @param source the view this event was associated with
- */
- protected abstract void resetState(@Nullable View source);
-
- /**
- * Attempt to merge the pending events for source views {@code oldSource} and {@code newSource}
- * into one, with source set to the resulting {@link View}
- *
- * A result of {@code null} means merger is not possible, resulting in the currently pending
- * event being flushed before proceeding.
- */
- protected @Nullable View tryMerge(@NonNull View oldSource, @NonNull View newSource) {
- return null;
- }
-
- /**
- * Schedules a {@link #performSendEvent} with the source {@link View} set to given
- * {@code source}
- *
- * If an event is already scheduled a {@link #tryMerge merge} will be attempted.
- * If merging is not possible (as indicated by the null result from {@link #tryMerge}),
- * the currently scheduled event will be {@link #sendNow sent immediately} and the new one
- * will be scheduled afterwards.
- */
- protected final void scheduleFor(@NonNull View source) {
- if (DEBUG) Log.d(LOG_TAG, thisClass() + ".scheduleFor(source = " + source + ")");
-
- Handler uiHandler = source.getHandler();
- if (uiHandler == null || uiHandler.getLooper() != Looper.myLooper()) {
- CalledFromWrongThreadException e = new CalledFromWrongThreadException(
- "Expected to be called from main thread but was called from "
- + Thread.currentThread());
- // TODO: Throw the exception
- Log.e(LOG_TAG, "Accessibility content change on non-UI thread. Future Android "
- + "versions will throw an exception.", e);
- }
-
- if (!isAccessibilityEnabled(source)) return;
-
- if (mIsPending) {
- View merged = tryMerge(mSource, source);
- if (merged != null) {
- setSource(merged);
- return;
- } else {
- sendNow();
- }
- }
-
- setSource(source);
-
- final long timeSinceLastMillis = SystemClock.uptimeMillis() - mLastSendTimeMillis;
- final long minEventIntervalMillis =
- ViewConfiguration.getSendRecurringAccessibilityEventsInterval();
- if (timeSinceLastMillis >= minEventIntervalMillis) {
- sendNow();
- } else {
- mSource.postDelayed(mWorker, minEventIntervalMillis - timeSinceLastMillis);
- }
- }
-
- static boolean isAccessibilityEnabled(@NonNull View contextProvider) {
- return AccessibilityManager.getInstance(contextProvider.getContext()).isEnabled();
- }
-
- protected final void sendNow(View source) {
- setSource(source);
- sendNow();
- }
-
- private void sendNow() {
- mSource.removeCallbacks(mWorker);
- mWorker.run();
- }
-
- /**
- * Flush the event if one is pending
- */
- public void sendNowIfPending() {
- if (mIsPending) sendNow();
- }
-
- /**
- * Cancel the event if one is pending and is for the given view
- */
- public final void cancelIfPendingFor(@NonNull View source) {
- if (isPendingFor(source)) cancelIfPending(this);
- }
-
- /**
- * @return whether an event is currently pending for the given source view
- */
- protected final boolean isPendingFor(@Nullable View source) {
- return mIsPending && mSource == source;
- }
-
- /**
- * Cancel the event if one is not null and pending
- */
- public static void cancelIfPending(@Nullable ThrottlingAccessibilityEventSender sender) {
- if (sender == null || !sender.checkAndResetIsPending()) return;
- sender.mSource.removeCallbacks(sender.mWorker);
- sender.resetStateInternal();
- }
-
- void resetStateInternal() {
- if (DEBUG) Log.d(LOG_TAG, thisClass() + ".resetStateInternal()");
-
- resetState(mSource);
- setSource(null);
- }
-
- boolean checkAndResetIsPending() {
- if (mIsPending) {
- mIsPending = false;
- return true;
- } else {
- return false;
- }
- }
-
- private void setSource(@Nullable View source) {
- if (DEBUG) Log.d(LOG_TAG, thisClass() + ".setSource(" + source + ")");
-
- if (source == null && mIsPending) {
- Log.e(LOG_TAG, "mSource nullified while callback still pending: " + this);
- return;
- }
-
- if (source != null && !mIsPending) {
- // At most one can be pending at any given time
- View oldSource = mSource;
- if (oldSource != null) {
- ViewRootImpl viewRootImpl = oldSource.getViewRootImpl();
- if (viewRootImpl != null) {
- viewRootImpl.flushPendingAccessibilityEvents();
- }
- }
- mIsPending = true;
- }
- mSource = source;
- }
-
- String thisClass() {
- return getClass().getSimpleName();
- }
-
- @Override
- public String toString() {
- return thisClass() + "(" + mSource + ")";
- }
-
-}
diff --git a/core/java/android/view/inputmethod/InputConnection.java b/core/java/android/view/inputmethod/InputConnection.java
index e554540..eba9176 100644
--- a/core/java/android/view/inputmethod/InputConnection.java
+++ b/core/java/android/view/inputmethod/InputConnection.java
@@ -21,6 +21,7 @@
import android.inputmethodservice.InputMethodService;
import android.os.Bundle;
import android.os.Handler;
+import android.os.LocaleList;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
@@ -898,4 +899,37 @@
*/
boolean commitContent(@NonNull InputContentInfo inputContentInfo, int flags,
@Nullable Bundle opts);
+
+ /**
+ * Called by the input method to tell a hint about the locales of text to be committed.
+ *
+ * <p>This is just a hint for editor authors (and the system) to choose better options when
+ * they have to disambiguate languages, like editor authors can do for input methods with
+ * {@link EditorInfo#hintLocales}.</p>
+ *
+ * <p>The language hint provided by this callback should have higher priority than
+ * {@link InputMethodSubtype#getLanguageTag()}, which cannot be updated dynamically.</p>
+ *
+ * <p>Note that in general it is discouraged for input method to specify
+ * {@link android.text.style.LocaleSpan} when inputting text, mainly because of application
+ * compatibility concerns.</p>
+ * <ul>
+ * <li>When an existing text that already has {@link android.text.style.LocaleSpan} is being
+ * modified by both the input method and application, there is no reliable and easy way to
+ * keep track of who modified {@link android.text.style.LocaleSpan}. For instance, if the
+ * text was updated by JavaScript, it it highly likely that span information is completely
+ * removed, while some input method attempts to preserve spans if possible.</li>
+ * <li>There is no clear semantics regarding whether {@link android.text.style.LocaleSpan}
+ * means a weak (ignorable) hint or a strong hint. This becomes more problematic when
+ * multiple {@link android.text.style.LocaleSpan} instances are specified to the same
+ * text region, especially when those spans are conflicting.</li>
+ * </ul>
+ * @param languageHint list of languages sorted by the priority and/or probability
+ */
+ default void reportLanguageHint(@NonNull LocaleList languageHint) {
+ // Intentionally empty.
+ //
+ // We need to have *some* default implementation for the source compatibility.
+ // See Bug 72127682 for details.
+ }
}
diff --git a/core/java/android/view/inputmethod/InputConnectionWrapper.java b/core/java/android/view/inputmethod/InputConnectionWrapper.java
index f671e22..cbe6856 100644
--- a/core/java/android/view/inputmethod/InputConnectionWrapper.java
+++ b/core/java/android/view/inputmethod/InputConnectionWrapper.java
@@ -16,8 +16,10 @@
package android.view.inputmethod;
+import android.annotation.NonNull;
import android.os.Bundle;
import android.os.Handler;
+import android.os.LocaleList;
import android.view.KeyEvent;
/**
@@ -303,4 +305,13 @@
public boolean commitContent(InputContentInfo inputContentInfo, int flags, Bundle opts) {
return mTarget.commitContent(inputContentInfo, flags, opts);
}
+
+ /**
+ * {@inheritDoc}
+ * @throws NullPointerException if the target is {@code null}.
+ */
+ @Override
+ public void reportLanguageHint(@NonNull LocaleList languageHint) {
+ mTarget.reportLanguageHint(languageHint);
+ }
}
diff --git a/core/java/android/view/textclassifier/SmartSelection.java b/core/java/android/view/textclassifier/SmartSelection.java
index 2c93a19..8edf97e 100644
--- a/core/java/android/view/textclassifier/SmartSelection.java
+++ b/core/java/android/view/textclassifier/SmartSelection.java
@@ -16,6 +16,7 @@
package android.view.textclassifier;
+import android.annotation.Nullable;
import android.content.res.AssetFileDescriptor;
/**
@@ -146,11 +147,24 @@
final String mCollection;
/** float range: 0 - 1 */
final float mScore;
+ @Nullable final DatetimeParseResult mDatetime;
ClassificationResult(String collection, float score) {
mCollection = collection;
mScore = score;
+ mDatetime = null;
}
+
+ ClassificationResult(String collection, float score, DatetimeParseResult datetime) {
+ mCollection = collection;
+ mScore = score;
+ mDatetime = datetime;
+ }
+ }
+
+ /** Parsed date information for the classification result. */
+ static final class DatetimeParseResult {
+ long mMsSinceEpoch;
}
/** Represents a result of Annotate call. */
diff --git a/core/java/android/view/textclassifier/TextClassification.java b/core/java/android/view/textclassifier/TextClassification.java
index 7089677..54e93d5 100644
--- a/core/java/android/view/textclassifier/TextClassification.java
+++ b/core/java/android/view/textclassifier/TextClassification.java
@@ -36,6 +36,7 @@
import com.android.internal.util.Preconditions;
import java.util.ArrayList;
+import java.util.Calendar;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -592,6 +593,7 @@
public static final class Options implements Parcelable {
private @Nullable LocaleList mDefaultLocales;
+ private @Nullable Calendar mReferenceTime;
public Options() {}
@@ -606,6 +608,16 @@
}
/**
+ * @param referenceTime reference time based on which relative dates (e.g. "tomorrow" should
+ * be interpreted. This should usually be the time when the text was originally
+ * composed. If no reference time is set, now is used.
+ */
+ public Options setReferenceTime(Calendar referenceTime) {
+ mReferenceTime = referenceTime;
+ return this;
+ }
+
+ /**
* @return ordered list of locale preferences that can be used to disambiguate
* the provided text.
*/
@@ -614,6 +626,15 @@
return mDefaultLocales;
}
+ /**
+ * @return reference time based on which relative dates (e.g. "tomorrow") should be
+ * interpreted.
+ */
+ @Nullable
+ public Calendar getReferenceTime() {
+ return mReferenceTime;
+ }
+
@Override
public int describeContents() {
return 0;
@@ -625,6 +646,10 @@
if (mDefaultLocales != null) {
mDefaultLocales.writeToParcel(dest, flags);
}
+ dest.writeInt(mReferenceTime != null ? 1 : 0);
+ if (mReferenceTime != null) {
+ dest.writeSerializable(mReferenceTime);
+ }
}
public static final Parcelable.Creator<Options> CREATOR =
@@ -644,6 +669,9 @@
if (in.readInt() > 0) {
mDefaultLocales = LocaleList.CREATOR.createFromParcel(in);
}
+ if (in.readInt() > 0) {
+ mReferenceTime = (Calendar) in.readSerializable();
+ }
}
}
diff --git a/core/java/android/view/textclassifier/TextClassifier.java b/core/java/android/view/textclassifier/TextClassifier.java
index e9715c5..04ab447 100644
--- a/core/java/android/view/textclassifier/TextClassifier.java
+++ b/core/java/android/view/textclassifier/TextClassifier.java
@@ -47,12 +47,26 @@
/** @hide */
String DEFAULT_LOG_TAG = "androidtc";
+ /** The TextClassifier failed to run. */
String TYPE_UNKNOWN = "";
+ /** The classifier ran, but didn't recognize a known entity. */
String TYPE_OTHER = "other";
+ /** E-mail address (e.g. "noreply@android.com"). */
String TYPE_EMAIL = "email";
+ /** Phone number (e.g. "555-123 456"). */
String TYPE_PHONE = "phone";
+ /** Physical address. */
String TYPE_ADDRESS = "address";
+ /** Web URL. */
String TYPE_URL = "url";
+ /** Time reference that is no more specific than a date. May be absolute such as "01/01/2000" or
+ * relative like "tomorrow". **/
+ String TYPE_DATE = "date";
+ /** Time reference that includes a specific time. May be absolute such as "01/01/2000 5:30pm" or
+ * relative like "tomorrow at 5:30pm". **/
+ String TYPE_DATE_TIME = "datetime";
+ /** Flight number in IATA format. */
+ String TYPE_FLIGHT_NUMBER = "flight";
/** @hide */
@Retention(RetentionPolicy.SOURCE)
@@ -63,6 +77,9 @@
TYPE_PHONE,
TYPE_ADDRESS,
TYPE_URL,
+ TYPE_DATE,
+ TYPE_DATE_TIME,
+ TYPE_FLIGHT_NUMBER,
})
@interface EntityType {}
diff --git a/core/java/android/view/textclassifier/TextClassifierImpl.java b/core/java/android/view/textclassifier/TextClassifierImpl.java
index 7db0e76..6a44fb3 100644
--- a/core/java/android/view/textclassifier/TextClassifierImpl.java
+++ b/core/java/android/view/textclassifier/TextClassifierImpl.java
@@ -18,7 +18,9 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.app.SearchManager;
import android.content.ComponentName;
+import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
@@ -28,6 +30,7 @@
import android.os.LocaleList;
import android.os.ParcelFileDescriptor;
import android.provider.Browser;
+import android.provider.CalendarContract;
import android.provider.ContactsContract;
import android.provider.Settings;
import android.text.util.Linkify;
@@ -42,6 +45,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Calendar;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@@ -49,6 +53,7 @@
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
+import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -73,7 +78,10 @@
TextClassifier.TYPE_ADDRESS,
TextClassifier.TYPE_EMAIL,
TextClassifier.TYPE_PHONE,
- TextClassifier.TYPE_URL));
+ TextClassifier.TYPE_URL,
+ TextClassifier.TYPE_DATE,
+ TextClassifier.TYPE_DATE_TIME,
+ TextClassifier.TYPE_FLIGHT_NUMBER));
private static final List<String> ENTITY_TYPES_BASE =
Collections.unmodifiableList(Arrays.asList(
TextClassifier.TYPE_ADDRESS,
@@ -104,16 +112,17 @@
@Override
public TextSelection suggestSelection(
@NonNull CharSequence text, int selectionStartIndex, int selectionEndIndex,
- @NonNull TextSelection.Options options) {
+ @Nullable TextSelection.Options options) {
Utils.validateInput(text, selectionStartIndex, selectionEndIndex);
try {
if (text.length() > 0) {
final LocaleList locales = (options == null) ? null : options.getDefaultLocales();
+ final boolean darkLaunchAllowed = options != null && options.isDarkLaunchAllowed();
final SmartSelection smartSelection = getSmartSelection(locales);
final String string = text.toString();
final int start;
final int end;
- if (getSettings().isDarkLaunch() && !options.isDarkLaunchAllowed()) {
+ if (getSettings().isDarkLaunch() && !darkLaunchAllowed) {
start = selectionStartIndex;
end = selectionEndIndex;
} else {
@@ -122,7 +131,7 @@
start = startEnd[0];
end = startEnd[1];
}
- if (start <= end
+ if (start < end
&& start >= 0 && end <= string.length()
&& start <= selectionStartIndex && end >= selectionEndIndex) {
final TextSelection.Builder tsBuilder = new TextSelection.Builder(start, end);
@@ -157,19 +166,19 @@
@Override
public TextClassification classifyText(
@NonNull CharSequence text, int startIndex, int endIndex,
- @NonNull TextClassification.Options options) {
+ @Nullable TextClassification.Options options) {
Utils.validateInput(text, startIndex, endIndex);
try {
if (text.length() > 0) {
final String string = text.toString();
final LocaleList locales = (options == null) ? null : options.getDefaultLocales();
+ final Calendar refTime = (options == null) ? null : options.getReferenceTime();
final SmartSelection.ClassificationResult[] results = getSmartSelection(locales)
.classifyText(string, startIndex, endIndex,
getHintFlags(string, startIndex, endIndex));
if (results.length > 0) {
- final TextClassification classificationResult =
- createClassificationResult(results, string, startIndex, endIndex);
- return classificationResult;
+ return createClassificationResult(
+ results, string, startIndex, endIndex, refTime);
}
}
} catch (Throwable t) {
@@ -410,18 +419,24 @@
private TextClassification createClassificationResult(
SmartSelection.ClassificationResult[] classifications,
- String text, int start, int end) {
+ String text, int start, int end, @Nullable Calendar referenceTime) {
final String classifiedText = text.substring(start, end);
final TextClassification.Builder builder = new TextClassification.Builder()
.setText(classifiedText);
final int size = classifications.length;
+ SmartSelection.ClassificationResult highestScoringResult = null;
+ float highestScore = Float.MIN_VALUE;
for (int i = 0; i < size; i++) {
builder.setEntityType(classifications[i].mCollection, classifications[i].mScore);
+ if (classifications[i].mScore > highestScore) {
+ highestScoringResult = classifications[i];
+ highestScore = classifications[i].mScore;
+ }
}
- final String type = getHighestScoringType(classifications);
- addActions(builder, IntentFactory.create(mContext, type, classifiedText));
+ addActions(builder, IntentFactory.create(
+ mContext, referenceTime, highestScoringResult, classifiedText));
return builder.setSignature(getSignature(text, start, end)).build();
}
@@ -441,11 +456,10 @@
}
if (resolveInfo != null && resolveInfo.activityInfo != null) {
final String packageName = resolveInfo.activityInfo.packageName;
- CharSequence label;
+ final String label = IntentFactory.getLabel(mContext, intent);
Drawable icon;
if ("android".equals(packageName)) {
// Requires the chooser to find an activity to handle the intent.
- label = IntentFactory.getLabel(mContext, intent);
icon = null;
} else {
// A default activity will handle the intent.
@@ -455,16 +469,11 @@
if (icon == null) {
icon = resolveInfo.loadIcon(pm);
}
- label = resolveInfo.activityInfo.loadLabel(pm);
- if (label == null) {
- label = resolveInfo.loadLabel(pm);
- }
}
- final String labelString = (label != null) ? label.toString() : null;
if (i == 0) {
- builder.setPrimaryAction(intent, labelString, icon);
+ builder.setPrimaryAction(intent, label, icon);
} else {
- builder.addSecondaryAction(intent, labelString, icon);
+ builder.addSecondaryAction(intent, label, icon);
}
}
}
@@ -483,23 +492,6 @@
return flag;
}
- private static String getHighestScoringType(SmartSelection.ClassificationResult[] types) {
- if (types.length < 1) {
- return "";
- }
-
- String type = types[0].mCollection;
- float highestScore = types[0].mScore;
- final int size = types.length;
- for (int i = 1; i < size; i++) {
- if (types[i].mScore > highestScore) {
- type = types[i].mCollection;
- highestScore = types[i].mScore;
- }
- }
- return type;
- }
-
/**
* Closes the ParcelFileDescriptor and logs any errors that occur.
*/
@@ -514,87 +506,175 @@
/**
* Creates intents based on the classification type.
*/
- private static final class IntentFactory {
+ static final class IntentFactory {
+
+ private static final long MIN_EVENT_FUTURE_MILLIS = TimeUnit.MINUTES.toMillis(5);
+ private static final long DEFAULT_EVENT_DURATION = TimeUnit.HOURS.toMillis(1);
private IntentFactory() {}
@NonNull
- public static List<Intent> create(Context context, String type, String text) {
- final List<Intent> intents = new ArrayList<>();
- type = type.trim().toLowerCase(Locale.ENGLISH);
+ public static List<Intent> create(
+ Context context,
+ @Nullable Calendar referenceTime,
+ SmartSelection.ClassificationResult classification,
+ String text) {
+ final String type = classification.mCollection.trim().toLowerCase(Locale.ENGLISH);
text = text.trim();
switch (type) {
case TextClassifier.TYPE_EMAIL:
- intents.add(new Intent(Intent.ACTION_SENDTO)
- .setData(Uri.parse(String.format("mailto:%s", text))));
- intents.add(new Intent(Intent.ACTION_INSERT_OR_EDIT)
+ return createForEmail(text);
+ case TextClassifier.TYPE_PHONE:
+ return createForPhone(text);
+ case TextClassifier.TYPE_ADDRESS:
+ return createForAddress(text);
+ case TextClassifier.TYPE_URL:
+ return createForUrl(context, text);
+ case TextClassifier.TYPE_DATE:
+ case TextClassifier.TYPE_DATE_TIME:
+ if (classification.mDatetime != null) {
+ Calendar eventTime = Calendar.getInstance();
+ eventTime.setTimeInMillis(classification.mDatetime.mMsSinceEpoch);
+ return createForDatetime(type, referenceTime, eventTime);
+ } else {
+ return new ArrayList<>();
+ }
+ case TextClassifier.TYPE_FLIGHT_NUMBER:
+ return createForFlight(text);
+ default:
+ return new ArrayList<>();
+ }
+ }
+
+ @NonNull
+ private static List<Intent> createForEmail(String text) {
+ return Arrays.asList(
+ new Intent(Intent.ACTION_SENDTO)
+ .setData(Uri.parse(String.format("mailto:%s", text))),
+ new Intent(Intent.ACTION_INSERT_OR_EDIT)
.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE)
.putExtra(ContactsContract.Intents.Insert.EMAIL, text));
- break;
- case TextClassifier.TYPE_PHONE:
- intents.add(new Intent(Intent.ACTION_DIAL)
- .setData(Uri.parse(String.format("tel:%s", text))));
- intents.add(new Intent(Intent.ACTION_INSERT_OR_EDIT)
+ }
+
+ @NonNull
+ private static List<Intent> createForPhone(String text) {
+ return Arrays.asList(
+ new Intent(Intent.ACTION_DIAL)
+ .setData(Uri.parse(String.format("tel:%s", text))),
+ new Intent(Intent.ACTION_INSERT_OR_EDIT)
.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE)
- .putExtra(ContactsContract.Intents.Insert.PHONE, text));
- intents.add(new Intent(Intent.ACTION_SENDTO)
+ .putExtra(ContactsContract.Intents.Insert.PHONE, text),
+ new Intent(Intent.ACTION_SENDTO)
.setData(Uri.parse(String.format("smsto:%s", text))));
- break;
- case TextClassifier.TYPE_ADDRESS:
- intents.add(new Intent(Intent.ACTION_VIEW)
- .setData(Uri.parse(String.format("geo:0,0?q=%s", text))));
- break;
- case TextClassifier.TYPE_URL:
- final String httpPrefix = "http://";
- final String httpsPrefix = "https://";
- if (text.toLowerCase().startsWith(httpPrefix)) {
- text = httpPrefix + text.substring(httpPrefix.length());
- } else if (text.toLowerCase().startsWith(httpsPrefix)) {
- text = httpsPrefix + text.substring(httpsPrefix.length());
- } else {
- text = httpPrefix + text;
- }
- intents.add(new Intent(Intent.ACTION_VIEW, Uri.parse(text))
- .putExtra(Browser.EXTRA_APPLICATION_ID, context.getPackageName()));
- break;
+ }
+
+ @NonNull
+ private static List<Intent> createForAddress(String text) {
+ return Arrays.asList(new Intent(Intent.ACTION_VIEW)
+ .setData(Uri.parse(String.format("geo:0,0?q=%s", text))));
+ }
+
+ @NonNull
+ private static List<Intent> createForUrl(Context context, String text) {
+ final String httpPrefix = "http://";
+ final String httpsPrefix = "https://";
+ if (text.toLowerCase().startsWith(httpPrefix)) {
+ text = httpPrefix + text.substring(httpPrefix.length());
+ } else if (text.toLowerCase().startsWith(httpsPrefix)) {
+ text = httpsPrefix + text.substring(httpsPrefix.length());
+ } else {
+ text = httpPrefix + text;
+ }
+ return Arrays.asList(new Intent(Intent.ACTION_VIEW, Uri.parse(text))
+ .putExtra(Browser.EXTRA_APPLICATION_ID, context.getPackageName()));
+ }
+
+ @NonNull
+ private static List<Intent> createForDatetime(
+ String type, @Nullable Calendar referenceTime, Calendar eventTime) {
+ if (referenceTime == null) {
+ // If no reference time was given, use now.
+ referenceTime = Calendar.getInstance();
+ }
+ List<Intent> intents = new ArrayList<>();
+ intents.add(createCalendarViewIntent(eventTime));
+ final long millisSinceReference =
+ eventTime.getTimeInMillis() - referenceTime.getTimeInMillis();
+ if (millisSinceReference > MIN_EVENT_FUTURE_MILLIS) {
+ intents.add(createCalendarCreateEventIntent(eventTime, type));
}
return intents;
}
+ @NonNull
+ private static List<Intent> createForFlight(String text) {
+ return Arrays.asList(new Intent(Intent.ACTION_WEB_SEARCH)
+ .putExtra(SearchManager.QUERY, text));
+ }
+
+ @NonNull
+ private static Intent createCalendarViewIntent(Calendar eventTime) {
+ Uri.Builder builder = CalendarContract.CONTENT_URI.buildUpon();
+ builder.appendPath("time");
+ ContentUris.appendId(builder, eventTime.getTimeInMillis());
+ return new Intent(Intent.ACTION_VIEW).setData(builder.build());
+ }
+
+ @NonNull
+ private static Intent createCalendarCreateEventIntent(
+ Calendar eventTime, @EntityType String type) {
+ final boolean isAllDay = TextClassifier.TYPE_DATE.equals(type);
+ return new Intent(Intent.ACTION_INSERT)
+ .setData(CalendarContract.Events.CONTENT_URI)
+ .putExtra(CalendarContract.EXTRA_EVENT_ALL_DAY, isAllDay)
+ .putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, eventTime.getTimeInMillis())
+ .putExtra(CalendarContract.EXTRA_EVENT_END_TIME,
+ eventTime.getTimeInMillis() + DEFAULT_EVENT_DURATION);
+ }
+
@Nullable
public static String getLabel(Context context, @Nullable Intent intent) {
if (intent == null || intent.getAction() == null) {
return null;
}
+ final String authority =
+ intent.getData() == null ? null : intent.getData().getAuthority();
switch (intent.getAction()) {
case Intent.ACTION_DIAL:
return context.getString(com.android.internal.R.string.dial);
case Intent.ACTION_SENDTO:
- switch (intent.getScheme()) {
- case "mailto":
- return context.getString(com.android.internal.R.string.email);
- case "smsto":
- return context.getString(com.android.internal.R.string.sms);
- default:
- return null;
+ if ("mailto".equals(intent.getScheme())) {
+ return context.getString(com.android.internal.R.string.email);
+ } else if ("smsto".equals(intent.getScheme())) {
+ return context.getString(com.android.internal.R.string.sms);
+ } else {
+ return null;
}
+ case Intent.ACTION_INSERT:
+ if (CalendarContract.AUTHORITY.equals(authority)) {
+ return context.getString(com.android.internal.R.string.add_calendar_event);
+ }
+ return null;
case Intent.ACTION_INSERT_OR_EDIT:
- switch (intent.getDataString()) {
- case ContactsContract.Contacts.CONTENT_ITEM_TYPE:
- return context.getString(com.android.internal.R.string.add_contact);
- default:
- return null;
+ if (ContactsContract.Contacts.CONTENT_ITEM_TYPE.equals(
+ intent.getType())) {
+ return context.getString(com.android.internal.R.string.add_contact);
+ } else {
+ return null;
}
case Intent.ACTION_VIEW:
- switch (intent.getScheme()) {
- case "geo":
- return context.getString(com.android.internal.R.string.map);
- case "http": // fall through
- case "https":
- return context.getString(com.android.internal.R.string.browse);
- default:
- return null;
+ if (CalendarContract.AUTHORITY.equals(authority)) {
+ return context.getString(com.android.internal.R.string.view_calendar);
+ } else if ("geo".equals(intent.getScheme())) {
+ return context.getString(com.android.internal.R.string.map);
+ } else if ("http".equals(intent.getScheme())
+ || "https".equals(intent.getScheme())) {
+ return context.getString(com.android.internal.R.string.browse);
+ } else {
+ return null;
}
+ case Intent.ACTION_WEB_SEARCH:
+ return context.getString(com.android.internal.R.string.view_flight);
default:
return null;
}
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 90cc481..cba11a8 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -931,12 +931,12 @@
* Note that this setting affects only JavaScript access to file scheme
* resources. Other access to such resources, for example, from image HTML
* elements, is unaffected. To prevent possible violation of same domain policy
- * on {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH} and earlier
- * devices, you should explicitly set this value to {@code false}.
+ * when targeting {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1} and earlier,
+ * you should explicitly set this value to {@code false}.
* <p>
- * The default value is {@code true} for API level
+ * The default value is {@code true} for apps targeting
* {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1} and below,
- * and {@code false} for API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN}
+ * and {@code false} when targeting {@link android.os.Build.VERSION_CODES#JELLY_BEAN}
* and above.
*
* @param flag whether JavaScript running in the context of a file scheme
@@ -947,18 +947,18 @@
/**
* Sets whether JavaScript running in the context of a file scheme URL
* should be allowed to access content from other file scheme URLs. To
- * enable the most restrictive, and therefore secure policy, this setting
+ * enable the most restrictive, and therefore secure, policy this setting
* should be disabled. Note that the value of this setting is ignored if
* the value of {@link #getAllowUniversalAccessFromFileURLs} is {@code true}.
* Note too, that this setting affects only JavaScript access to file scheme
* resources. Other access to such resources, for example, from image HTML
* elements, is unaffected. To prevent possible violation of same domain policy
- * on {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH} and earlier
- * devices, you should explicitly set this value to {@code false}.
+ * when targeting {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1} and earlier,
+ * you should explicitly set this value to {@code false}.
* <p>
- * The default value is {@code true} for API level
+ * The default value is {@code true} for apps targeting
* {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1} and below,
- * and {@code false} for API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN}
+ * and {@code false} when targeting {@link android.os.Build.VERSION_CODES#JELLY_BEAN}
* and above.
*
* @param flag whether JavaScript running in the context of a file scheme
@@ -1394,26 +1394,26 @@
/**
- * Sets whether Safe Browsing is enabled. Safe browsing allows WebView to
+ * Sets whether Safe Browsing is enabled. Safe Browsing allows WebView to
* protect against malware and phishing attacks by verifying the links.
*
* <p>
- * Safe browsing is disabled by default. The recommended way to enable Safe browsing is using a
- * manifest tag to change the default value to enabled for all WebViews (read <a
- * href="{@docRoot}reference/android/webkit/WebView.html">general Safe Browsing info</a>).
+ * Safe Browsing can be disabled for all WebViews using a manifest tag (read <a
+ * href="{@docRoot}reference/android/webkit/WebView.html">general Safe Browsing info</a>). The
+ * manifest tag has a lower precedence than this API.
*
* <p>
- * This API overrides the manifest tag value for this WebView.
+ * Safe Browsing is enabled by default for devices which support it.
*
- * @param enabled Whether Safe browsing is enabled.
+ * @param enabled Whether Safe Browsing is enabled.
*/
public abstract void setSafeBrowsingEnabled(boolean enabled);
/**
- * Gets whether Safe browsing is enabled.
+ * Gets whether Safe Browsing is enabled.
* See {@link #setSafeBrowsingEnabled}.
*
- * @return {@code true} if Safe browsing is enabled and {@code false} otherwise.
+ * @return {@code true} if Safe Browsing is enabled and {@code false} otherwise.
*/
public abstract boolean getSafeBrowsingEnabled();
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 00860a4..d2cb70e 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -327,22 +327,25 @@
* <h3>Safe Browsing</h3>
*
* <p>
- * If Safe Browsing is enabled, WebView will block malicious URLs and present a warning UI to the
- * user to allow them to navigate back safely or proceed to the malicious page.
+ * With Safe Browsing, WebView will block malicious URLs and present a warning UI to the user to
+ * allow them to navigate back safely or proceed to the malicious page.
* <p>
- * The recommended way for apps to enable the feature is putting the following tag in the manifest's
- * {@code <application>} element:
+ * Safe Browsing is enabled by default on devices which support it. If your app needs to disable
+ * Safe Browsing for all WebViews, it can do so in the manifest's {@code <application>} element:
* <p>
* <pre>
* <manifest>
* <application>
* ...
* <meta-data android:name="android.webkit.WebView.EnableSafeBrowsing"
- * android:value="true" />
+ * android:value="false" />
* </application>
* </manifest>
* </pre>
*
+ * <p>
+ * Otherwise, see {@link WebSettings#setSafeBrowsingEnabled}.
+ *
*/
// Implementation notes.
// The WebView is a thin API class that delegates its public API to a backend WebViewProvider
@@ -663,6 +666,10 @@
if (context == null) {
throw new IllegalArgumentException("Invalid context argument");
}
+ if (mWebViewThread == null) {
+ throw new RuntimeException(
+ "WebView cannot be initialized on a thread that has no Looper.");
+ }
sEnforceThreadChecking = context.getApplicationInfo().targetSdkVersion >=
Build.VERSION_CODES.JELLY_BEAN_MR2;
checkThread();
@@ -1666,9 +1673,8 @@
* invoked with {@code true}. Safe Browsing is not fully supported on all devices. For those
* devices {@code callback} will receive {@code false}.
* <p>
- * This does not enable the Safe Browsing feature itself, and should only be called if Safe
- * Browsing is enabled by the manifest tag or {@link WebSettings#setSafeBrowsingEnabled}. This
- * prepares resources used for Safe Browsing.
+ * This should not be called if Safe Browsing has been disabled by manifest tag or {@link
+ * WebSettings#setSafeBrowsingEnabled}. This prepares resources used for Safe Browsing.
* <p>
* This should be called with the Application Context (and will always use the Application
* context to do its work regardless).
@@ -2422,6 +2428,14 @@
return getFactory().getWebViewClassLoader();
}
+ /**
+ * Returns the {@link Looper} corresponding to the thread on which WebView calls must be made.
+ */
+ @NonNull
+ public Looper getLooper() {
+ return mWebViewThread;
+ }
+
//-------------------------------------------------------------------------
// Interface for WebView providers
//-------------------------------------------------------------------------
diff --git a/core/java/android/webkit/WebViewProviderInfo.java b/core/java/android/webkit/WebViewProviderInfo.java
index 5d091c9..b0e9f01 100644
--- a/core/java/android/webkit/WebViewProviderInfo.java
+++ b/core/java/android/webkit/WebViewProviderInfo.java
@@ -17,10 +17,10 @@
package android.webkit;
import android.annotation.SystemApi;
+import android.content.pm.Signature;
import android.os.Parcel;
import android.os.Parcelable;
-
-import java.util.Arrays;
+import android.util.Base64;
/**
* @hide
@@ -34,7 +34,14 @@
this.description = description;
this.availableByDefault = availableByDefault;
this.isFallback = isFallback;
- this.signatures = signatures;
+ if (signatures == null) {
+ this.signatures = new Signature[0];
+ } else {
+ this.signatures = new Signature[signatures.length];
+ for (int n = 0; n < signatures.length; n++) {
+ this.signatures[n] = new Signature(Base64.decode(signatures[n], Base64.DEFAULT));
+ }
+ }
}
// aidl stuff
@@ -54,7 +61,7 @@
description = in.readString();
availableByDefault = (in.readInt() > 0);
isFallback = (in.readInt() > 0);
- signatures = in.createStringArray();
+ signatures = in.createTypedArray(Signature.CREATOR);
}
@Override
@@ -68,7 +75,7 @@
out.writeString(description);
out.writeInt(availableByDefault ? 1 : 0);
out.writeInt(isFallback ? 1 : 0);
- out.writeStringArray(signatures);
+ out.writeTypedArray(signatures, 0);
}
// fields read from framework resource
@@ -76,5 +83,5 @@
public final String description;
public final boolean availableByDefault;
public final boolean isFallback;
- public final String[] signatures;
+ public final Signature[] signatures;
}
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 6bee58f..a13de75 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -19,6 +19,7 @@
import android.annotation.ColorInt;
import android.annotation.DrawableRes;
import android.annotation.NonNull;
+import android.annotation.TestApi;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
@@ -30,6 +31,7 @@
import android.os.Bundle;
import android.os.Debug;
import android.os.Handler;
+import android.os.LocaleList;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.StrictMode;
@@ -2744,7 +2746,7 @@
}
private void drawSelector(Canvas canvas) {
- if (!mSelectorRect.isEmpty()) {
+ if (shouldDrawSelector()) {
final Drawable selector = mSelector;
selector.setBounds(mSelectorRect);
selector.draw(canvas);
@@ -2752,6 +2754,14 @@
}
/**
+ * @hide
+ */
+ @TestApi
+ public final boolean shouldDrawSelector() {
+ return !mSelectorRect.isEmpty();
+ }
+
+ /**
* Controls whether the selection highlight drawable should be drawn on top of the item or
* behind it.
*
@@ -6026,6 +6036,11 @@
public boolean commitContent(InputContentInfo inputContentInfo, int flags, Bundle opts) {
return getTarget().commitContent(inputContentInfo, flags, opts);
}
+
+ @Override
+ public void reportLanguageHint(@NonNull LocaleList languageHint) {
+ getTarget().reportLanguageHint(languageHint);
+ }
}
/**
@@ -6849,7 +6864,7 @@
// detached and we do not allow detached views to fire accessibility
// events. So we are announcing that the subtree changed giving a chance
// to clients holding on to a view in this subtree to refresh it.
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
// Don't scrap views that have transient state.
diff --git a/core/java/android/widget/AdapterView.java b/core/java/android/widget/AdapterView.java
index 08374cb..6c19256 100644
--- a/core/java/android/widget/AdapterView.java
+++ b/core/java/android/widget/AdapterView.java
@@ -1093,7 +1093,7 @@
checkSelectionChanged();
}
- notifyAccessibilitySubtreeChanged();
+ notifySubtreeAccessibilityStateChangedIfNeeded();
}
/**
diff --git a/core/java/android/widget/CheckedTextView.java b/core/java/android/widget/CheckedTextView.java
index af01a3e..92bfd56 100644
--- a/core/java/android/widget/CheckedTextView.java
+++ b/core/java/android/widget/CheckedTextView.java
@@ -132,7 +132,7 @@
if (mChecked != checked) {
mChecked = checked;
refreshDrawableState();
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
}
diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java
index e57f153..0762b15 100644
--- a/core/java/android/widget/CompoundButton.java
+++ b/core/java/android/widget/CompoundButton.java
@@ -158,7 +158,7 @@
mCheckedFromResource = false;
mChecked = checked;
refreshDrawableState();
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
// Avoid infinite recursions if setChecked() is called from a listener
diff --git a/core/java/android/widget/Magnifier.java b/core/java/android/widget/Magnifier.java
index 310b170..e42217f 100644
--- a/core/java/android/widget/Magnifier.java
+++ b/core/java/android/widget/Magnifier.java
@@ -18,7 +18,6 @@
import android.annotation.FloatRange;
import android.annotation.NonNull;
-import android.annotation.Nullable;
import android.annotation.UiThread;
import android.content.Context;
import android.graphics.Bitmap;
@@ -30,9 +29,11 @@
import android.view.LayoutInflater;
import android.view.PixelCopy;
import android.view.Surface;
+import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewParent;
+import android.view.ViewRootImpl;
import com.android.internal.util.Preconditions;
@@ -124,7 +125,8 @@
configureCoordinates(xPosInView, yPosInView);
- // Clamp startX value to avoid distorting the rendering of the magnifier content.
+ // Clamp the startX value to avoid magnifying content which does not belong to the magnified
+ // view. This will not take into account overlapping views.
// For this, we compute:
// - zeroScrollXInSurface: this is the start x of mView, where this is not masked by a
// potential scrolling container. For example, if mView is a
@@ -190,57 +192,79 @@
}
}
- private void configureCoordinates(float xPosInView, float yPosInView) {
- final float posX;
- final float posY;
-
+ private void configureCoordinates(final float xPosInView, final float yPosInView) {
+ // Compute the coordinates of the center of the content going to be displayed in the
+ // magnifier. These are relative to the surface the content is copied from.
+ final float contentPosX;
+ final float contentPosY;
if (mView instanceof SurfaceView) {
// No offset required if the backing Surface matches the size of the SurfaceView.
- posX = xPosInView;
- posY = yPosInView;
+ contentPosX = xPosInView;
+ contentPosY = yPosInView;
} else {
mView.getLocationInSurface(mViewCoordinatesInSurface);
- posX = xPosInView + mViewCoordinatesInSurface[0];
- posY = yPosInView + mViewCoordinatesInSurface[1];
+ contentPosX = xPosInView + mViewCoordinatesInSurface[0];
+ contentPosY = yPosInView + mViewCoordinatesInSurface[1];
}
+ mCenterZoomCoords.x = Math.round(contentPosX);
+ mCenterZoomCoords.y = Math.round(contentPosY);
- mCenterZoomCoords.x = Math.round(posX);
- mCenterZoomCoords.y = Math.round(posY);
-
- final int verticalMagnifierOffset = mView.getContext().getResources().getDimensionPixelSize(
+ // Compute the position of the magnifier window. These have to be relative to the window
+ // of the view the magnifier is attached to, as the magnifier popup is a panel window
+ // attached to that window.
+ final int[] viewCoordinatesInWindow = new int[2];
+ mView.getLocationInWindow(viewCoordinatesInWindow);
+ final int verticalOffset = mView.getContext().getResources().getDimensionPixelSize(
com.android.internal.R.dimen.magnifier_offset);
- mWindowCoords.x = mCenterZoomCoords.x - mWindowWidth / 2;
- mWindowCoords.y = mCenterZoomCoords.y - mWindowHeight / 2 - verticalMagnifierOffset;
+ final float magnifierPosX = xPosInView + viewCoordinatesInWindow[0];
+ final float magnifierPosY = yPosInView + viewCoordinatesInWindow[1] - verticalOffset;
+ mWindowCoords.x = Math.round(magnifierPosX - mWindowWidth / 2);
+ mWindowCoords.y = Math.round(magnifierPosY - mWindowHeight / 2);
}
private void performPixelCopy(final int startXInSurface, final int startYInSurface) {
- final Surface surface = getValidViewSurface();
- if (surface != null) {
- mPixelCopyRequestRect.set(startXInSurface, startYInSurface,
- startXInSurface + mBitmap.getWidth(), startYInSurface + mBitmap.getHeight());
-
- PixelCopy.request(surface, mPixelCopyRequestRect, mBitmap,
- result -> {
- getImageView().invalidate();
- mPrevStartCoordsInSurface.x = startXInSurface;
- mPrevStartCoordsInSurface.y = startYInSurface;
- },
- mPixelCopyHandler);
- }
- }
-
- @Nullable
- private Surface getValidViewSurface() {
+ // Get the view surface where the content will be copied from.
final Surface surface;
+ final int surfaceWidth;
+ final int surfaceHeight;
if (mView instanceof SurfaceView) {
- surface = ((SurfaceView) mView).getHolder().getSurface();
+ final SurfaceHolder surfaceHolder = ((SurfaceView) mView).getHolder();
+ surface = surfaceHolder.getSurface();
+ surfaceWidth = surfaceHolder.getSurfaceFrame().right;
+ surfaceHeight = surfaceHolder.getSurfaceFrame().bottom;
} else if (mView.getViewRootImpl() != null) {
- surface = mView.getViewRootImpl().mSurface;
+ final ViewRootImpl viewRootImpl = mView.getViewRootImpl();
+ surface = viewRootImpl.mSurface;
+ surfaceWidth = viewRootImpl.getWidth();
+ surfaceHeight = viewRootImpl.getHeight();
} else {
surface = null;
+ surfaceWidth = NONEXISTENT_PREVIOUS_CONFIG_VALUE;
+ surfaceHeight = NONEXISTENT_PREVIOUS_CONFIG_VALUE;
}
- return (surface != null && surface.isValid()) ? surface : null;
+ if (surface == null || !surface.isValid()) {
+ return;
+ }
+
+ // Clamp copy coordinates inside the surface to avoid displaying distorted content.
+ final int clampedStartXInSurface = Math.max(0,
+ Math.min(startXInSurface, surfaceWidth - mWindowWidth));
+ final int clampedStartYInSurface = Math.max(0,
+ Math.min(startYInSurface, surfaceHeight - mWindowHeight));
+
+ // Perform the pixel copy.
+ mPixelCopyRequestRect.set(clampedStartXInSurface,
+ clampedStartYInSurface,
+ clampedStartXInSurface + mBitmap.getWidth(),
+ clampedStartYInSurface + mBitmap.getHeight());
+ PixelCopy.request(surface, mPixelCopyRequestRect, mBitmap,
+ result -> {
+ getImageView().invalidate();
+ mPrevStartCoordsInSurface.x = startXInSurface;
+ mPrevStartCoordsInSurface.y = startYInSurface;
+ },
+ mPixelCopyHandler);
}
private ImageView getImageView() {
diff --git a/core/java/android/widget/MediaControlView2.java b/core/java/android/widget/MediaControlView2.java
index 0aa2b64..39c23b4 100644
--- a/core/java/android/widget/MediaControlView2.java
+++ b/core/java/android/widget/MediaControlView2.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.Context;
@@ -24,14 +25,121 @@
import android.media.update.MediaControlView2Provider;
import android.media.update.ViewProvider;
import android.util.AttributeSet;
-import android.view.KeyEvent;
import android.view.MotionEvent;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
/**
+ * A View that contains the controls for MediaPlayer2.
+ * It provides a wide range of UI including buttons such as "Play/Pause", "Rewind", "Fast Forward",
+ * "Subtitle", "Full Screen", and it is also possible to add multiple custom buttons.
+ *
+ * <p>
+ * <em> MediaControlView2 can be initialized in two different ways: </em>
+ * 1) When VideoView2 is initialized, it automatically initializes a MediaControlView2 instance and
+ * adds it to the view.
+ * 2) Initialize MediaControlView2 programmatically and add it to a ViewGroup instance.
+ *
+ * In the first option, VideoView2 automatically connects MediaControlView2 to MediaController,
+ * which is necessary to communicate with MediaSession2. In the second option, however, the
+ * developer needs to manually retrieve a MediaController instance and set it to MediaControlView2
+ * by calling setController(MediaController controller).
+ *
+ * <p>
+ * There is no separate method that handles the show/hide behavior for MediaControlView2. Instead,
+ * one can directly change the visibility of this view by calling View.setVisibility(int). The
+ * values supported are View.VISIBLE and View.GONE.
+ * In addition, the following customizations are supported:
+ * 1. Modify default timeout value of 2 seconds by calling setTimeout(long).
+ * 2. Set focus to the play/pause button by calling requestPlayButtonFocus().
+ *
+ * <p>
+ * It is also possible to add custom buttons with custom icons and actions inside MediaControlView2.
+ * Those buttons will be shown when the overflow button is clicked.
+ * See {@link VideoView2#setCustomActions} for more details on how to add.
+ *
* TODO PUBLIC API
* @hide
*/
public class MediaControlView2 extends FrameLayout {
+ /** @hide */
+ @IntDef({
+ BUTTON_PLAY_PAUSE,
+ BUTTON_FFWD,
+ BUTTON_REW,
+ BUTTON_NEXT,
+ BUTTON_PREV,
+ BUTTON_SUBTITLE,
+ BUTTON_FULL_SCREEN,
+ BUTTON_OVERFLOW,
+ BUTTON_MUTE,
+ BUTTON_ASPECT_RATIO,
+ BUTTON_SETTINGS
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface Button {}
+
+ /**
+ * MediaControlView2 button value for playing and pausing media.
+ */
+ public static final int BUTTON_PLAY_PAUSE = 1;
+ /**
+ * MediaControlView2 button value for jumping 30 seconds forward.
+ */
+ public static final int BUTTON_FFWD = 2;
+ /**
+ * MediaControlView2 button value for jumping 10 seconds backward.
+ */
+ public static final int BUTTON_REW = 3;
+ /**
+ * MediaControlView2 button value for jumping to next media.
+ */
+ public static final int BUTTON_NEXT = 4;
+ /**
+ * MediaControlView2 button value for jumping to previous media.
+ */
+ public static final int BUTTON_PREV = 5;
+ /**
+ * MediaControlView2 button value for showing/hiding subtitle track.
+ */
+ public static final int BUTTON_SUBTITLE = 6;
+ /**
+ * MediaControlView2 button value for toggling full screen.
+ */
+ public static final int BUTTON_FULL_SCREEN = 7;
+ /**
+ * MediaControlView2 button value for showing/hiding overflow buttons.
+ */
+ public static final int BUTTON_OVERFLOW = 8;
+ /**
+ * MediaControlView2 button value for muting audio.
+ */
+ public static final int BUTTON_MUTE = 9;
+ /**
+ * MediaControlView2 button value for adjusting aspect ratio of view.
+ */
+ public static final int BUTTON_ASPECT_RATIO = 10;
+ /**
+ * MediaControlView2 button value for showing/hiding settings page.
+ */
+ public static final int BUTTON_SETTINGS = 11;
+
+ /**
+ * String for receiving command to show subtitle from MediaSession. Can be checked by
+ * implementing {@link android.media.session.MediaSession.Callback#onCommand}
+ */
+ public static final String COMMAND_SHOW_SUBTITLE = "showSubtitle";
+ /**
+ * String for receiving command to hide subtitle from MediaSession. Can be checked by
+ * implementing {@link android.media.session.MediaSession.Callback#onCommand}
+ */
+ public static final String COMMAND_HIDE_SUBTITLE = "hideSubtitle";
+ /**
+ * String for receiving command to set fullscreen from MediaSession. Can be checked by
+ * implementing {@link android.media.session.MediaSession.Callback#onCommand}
+ */
+ public static final String COMMAND_SET_FULLSCREEN = "setFullscreen";
+
private final MediaControlView2Provider mProvider;
public MediaControlView2(@NonNull Context context) {
@@ -43,124 +151,97 @@
}
public MediaControlView2(@NonNull Context context, @Nullable AttributeSet attrs,
- int defStyleAttr) {
+ int defStyleAttr) {
this(context, attrs, defStyleAttr, 0);
}
public MediaControlView2(@NonNull Context context, @Nullable AttributeSet attrs,
- int defStyleAttr, int defStyleRes) {
+ int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
mProvider = ApiLoader.getProvider(context)
.createMediaControlView2(this, new SuperProvider());
}
+ /**
+ * @hide
+ */
public MediaControlView2Provider getProvider() {
return mProvider;
}
/**
- * TODO: add docs
+ * Sets MediaController instance to control corresponding MediaSession.
*/
public void setController(MediaController controller) {
mProvider.setController_impl(controller);
}
/**
- * TODO: add docs
- */
- public void show() {
- mProvider.show_impl();
- }
-
- /**
- * TODO: add docs
- */
- public void show(int timeout) {
- mProvider.show_impl(timeout);
- }
-
- /**
- * TODO: add docs
+ * Returns whether the control view is currently shown or hidden.
*/
public boolean isShowing() {
return mProvider.isShowing_impl();
}
/**
- * TODO: add docs
+ * Changes the visibility state of an individual button. Default value is View.Visible.
+ *
+ * @param button the {@code Button} assigned to individual buttons
+ * <ul>
+ * <li>{@link #BUTTON_PLAY_PAUSE}
+ * <li>{@link #BUTTON_FFWD}
+ * <li>{@link #BUTTON_REW}
+ * <li>{@link #BUTTON_NEXT}
+ * <li>{@link #BUTTON_PREV}
+ * <li>{@link #BUTTON_SUBTITLE}
+ * <li>{@link #BUTTON_FULL_SCREEN}
+ * <li>{@link #BUTTON_MUTE}
+ * <li>{@link #BUTTON_OVERFLOW}
+ * <li>{@link #BUTTON_ASPECT_RATIO}
+ * <li>{@link #BUTTON_SETTINGS}
+ * </ul>
+ * @param visibility One of {@link #VISIBLE}, {@link #INVISIBLE}, or {@link #GONE}.
*/
- public void hide() {
- mProvider.hide_impl();
+ public void setButtonVisibility(@Button int button, @Visibility int visibility) {
+ mProvider.setButtonVisibility_impl(button, visibility);
}
/**
- * TODO: add docs
+ * Requests focus for the play/pause button.
*/
- public void showCCButton() {
- mProvider.showCCButton_impl();
+ public void requestPlayButtonFocus() {
+ mProvider.requestPlayButtonFocus_impl();
}
/**
- * TODO: add docs
+ * Sets a new timeout value (in milliseconds) for showing MediaControlView2. The default value
+ * is set as 2 seconds.
+ * @param timeout the
*/
- public boolean isPlaying() {
- return mProvider.isPlaying_impl();
+ public void setTimeout(long timeout) {
+ mProvider.setTimeout_impl(timeout);
}
/**
- * TODO: add docs
+ * Retrieves current timeout value (in milliseconds) for showing MediaControlView2. The default
+ * value is set as 2 seconds.
*/
- public int getCurrentPosition() {
- return mProvider.getCurrentPosition_impl();
+ public long getTimeout() {
+ return mProvider.getTimeout_impl();
}
- /**
- * TODO: add docs
- */
- public int getBufferPercentage() {
- return mProvider.getBufferPercentage_impl();
- }
+ @Override
+ public void onVisibilityAggregated(boolean isVisible) {
- /**
- * TODO: add docs
- */
- public boolean canPause() {
- return mProvider.canPause_impl();
- }
-
- /**
- * TODO: add docs
- */
- public boolean canSeekBackward() {
- return mProvider.canSeekBackward_impl();
- }
-
- /**
- * TODO: add docs
- */
- public boolean canSeekForward() {
- return mProvider.canSeekForward_impl();
- }
-
- /**
- * TODO: add docs
- */
- public void showSubtitle() {
- mProvider.showSubtitle_impl();
- }
-
- /**
- * TODO: add docs
- */
- public void hideSubtitle() {
- mProvider.hideSubtitle_impl();
+ mProvider.onVisibilityAggregated_impl(isVisible);
}
@Override
protected void onAttachedToWindow() {
mProvider.onAttachedToWindow_impl();
}
+
@Override
protected void onDetachedFromWindow() {
mProvider.onDetachedFromWindow_impl();
@@ -182,21 +263,11 @@
}
@Override
- public boolean onKeyDown(int keyCode, KeyEvent event) {
- return mProvider.onKeyDown_impl(keyCode, event);
- }
-
- @Override
public void onFinishInflate() {
mProvider.onFinishInflate_impl();
}
@Override
- public boolean dispatchKeyEvent(KeyEvent event) {
- return mProvider.dispatchKeyEvent_impl(event);
- }
-
- @Override
public void setEnabled(boolean enabled) {
mProvider.setEnabled_impl(enabled);
}
@@ -228,21 +299,11 @@
}
@Override
- public boolean onKeyDown_impl(int keyCode, KeyEvent event) {
- return MediaControlView2.super.onKeyDown(keyCode, event);
- }
-
- @Override
public void onFinishInflate_impl() {
MediaControlView2.super.onFinishInflate();
}
@Override
- public boolean dispatchKeyEvent_impl(KeyEvent event) {
- return MediaControlView2.super.dispatchKeyEvent(event);
- }
-
- @Override
public void setEnabled_impl(boolean enabled) {
MediaControlView2.super.setEnabled(enabled);
}
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 7d3fcf4..5710db3 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -2397,7 +2397,7 @@
setText(mText);
if (hasPasswordTransformationMethod()) {
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
@@ -5152,7 +5152,8 @@
public void setAccessibilityHeading(boolean isHeading) {
if (isHeading != mIsAccessibilityHeading) {
mIsAccessibilityHeading = isHeading;
- notifyAccessibilityStateChanged(AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
+ notifyViewAccessibilityStateChangedIfNeeded(
+ AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
}
@@ -5659,7 +5660,7 @@
sendOnTextChanged(text, 0, oldlen, textLength);
onTextChanged(text, 0, oldlen, textLength);
- notifyAccessibilityStateChanged(AccessibilityEvent.CONTENT_CHANGE_TYPE_TEXT);
+ notifyViewAccessibilityStateChangedIfNeeded(AccessibilityEvent.CONTENT_CHANGE_TYPE_TEXT);
if (needEditableForNotification) {
sendAfterTextChanged((Editable) text);
@@ -6393,7 +6394,7 @@
public void setError(CharSequence error, Drawable icon) {
createEditorIfNeeded();
mEditor.setError(error, icon);
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
diff --git a/core/java/android/widget/VideoView2.java b/core/java/android/widget/VideoView2.java
index 56f3dbd..8404223 100644
--- a/core/java/android/widget/VideoView2.java
+++ b/core/java/android/widget/VideoView2.java
@@ -22,28 +22,33 @@
import android.content.Context;
import android.media.AudioAttributes;
import android.media.AudioManager;
+import android.media.MediaPlayerInterface;
+import android.media.session.MediaController;
+import android.media.session.MediaSession;
+import android.media.session.PlaybackState;
import android.media.update.ApiLoader;
import android.media.update.VideoView2Provider;
import android.media.update.ViewProvider;
import android.net.Uri;
+import android.os.Bundle;
import android.util.AttributeSet;
-import android.view.KeyEvent;
import android.view.MotionEvent;
+import android.view.View;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.List;
import java.util.Map;
+import java.util.concurrent.Executor;
-// TODO: Use @link tag to refer MediaPlayer2 in docs once MediaPlayer2.java is submitted. Same to
-// MediaSession2.
-// TODO: change the reference from MediaPlayer to MediaPlayer2.
+// TODO: Replace MediaSession wtih MediaSession2 once MediaSession2 is submitted.
/**
* Displays a video file. VideoView2 class is a View class which is wrapping MediaPlayer2 so that
* developers can easily implement a video rendering application.
*
* <p>
* <em> Data sources that VideoView2 supports : </em>
- * VideoView2 can play video files and audio-only fiels as
+ * VideoView2 can play video files and audio-only files as
* well. It can load from various sources such as resources or content providers. The supported
* media file formats are the same as MediaPlayer2.
*
@@ -74,8 +79,8 @@
* If a developer wants to attach a customed MediaControlView2, then set enableControlView attribute
* to false and assign the customed media control widget using {@link #setMediaControlView2}.
* <li> VideoView2 is integrated with MediaPlayer2 while VideoView is integrated with MediaPlayer.
- * <li> VideoView2 is integrated with MediaSession2 and so it responses with media key events.
- * A VideoView2 keeps a MediaSession2 instance internally and connects it to a corresponding
+ * <li> VideoView2 is integrated with MediaSession and so it responses with media key events.
+ * A VideoView2 keeps a MediaSession instance internally and connects it to a corresponding
* MediaControlView2 instance.
* </p>
* </ul>
@@ -106,7 +111,18 @@
@Retention(RetentionPolicy.SOURCE)
public @interface ViewType {}
+ /**
+ * Indicates video is rendering on SurfaceView.
+ *
+ * @see #setViewType
+ */
public static final int VIEW_TYPE_SURFACEVIEW = 1;
+
+ /**
+ * Indicates video is rendering on TextureView.
+ *
+ * @see #setViewType
+ */
public static final int VIEW_TYPE_TEXTUREVIEW = 2;
private final VideoView2Provider mProvider;
@@ -157,86 +173,30 @@
return mProvider.getMediaControlView2_impl();
}
+
/**
- * Starts playback with the media contents specified by {@link #setVideoURI} and
- * {@link #setVideoPath}.
- * If it has been paused, this method will resume playback from the current position.
+ * Returns MediaController instance which is connected with MediaSession that VideoView2 is
+ * using. This method should be called when VideoView2 is attached to window, or it throws
+ * IllegalStateException, since internal MediaSession instance is not available until
+ * this view is attached to window. Please check {@link android.view.View#isAttachedToWindow}
+ * before calling this method.
+ *
+ * @throws IllegalStateException if interal MediaSession is not created yet.
*/
- public void start() {
- mProvider.start_impl();
+ public MediaController getMediaController() {
+ return mProvider.getMediaController_impl();
}
/**
- * Pauses playback.
+ * Shows or hides closed caption or subtitles if there is any.
+ * The first subtitle track will be chosen by default if there multiple subtitle tracks exist.
+ * @param show shows closed caption or subtitles if this value is true, or hides.
*/
- public void pause() {
- mProvider.pause_impl();
+ public void showSubtitle(boolean show) {
+ mProvider.showSubtitle_impl(show);
}
/**
- * Gets the duration of the media content specified by #setVideoURI and #setVideoPath
- * in milliseconds.
- */
- public int getDuration() {
- return mProvider.getDuration_impl();
- }
-
- /**
- * Gets current playback position in milliseconds.
- */
- public int getCurrentPosition() {
- return mProvider.getCurrentPosition_impl();
- }
-
- // TODO: mention about key-frame related behavior.
- /**
- * Moves the media by specified time position.
- * @param msec the offset in milliseconds from the start to seek to.
- */
- public void seekTo(int msec) {
- mProvider.seekTo_impl(msec);
- }
-
- /**
- * Says if the media is currently playing.
- * @return true if the media is playing, false if it is not (eg. paused or stopped).
- */
- public boolean isPlaying() {
- return mProvider.isPlaying_impl();
- }
-
- // TODO: check what will return if it is a local media.
- /**
- * Gets the percentage (0-100) of the content that has been buffered or played so far.
- */
- public int getBufferPercentage() {
- return mProvider.getBufferPercentage_impl();
- }
-
- /**
- * Returns the audio session ID.
- */
- public int getAudioSessionId() {
- return mProvider.getAudioSessionId_impl();
- }
-
- /**
- * Starts rendering closed caption or subtitles if there is any. The first subtitle track will
- * be chosen by default if there multiple subtitle tracks exist.
- */
- public void showSubtitle() {
- mProvider.showSubtitle_impl();
- }
-
- /**
- * Stops showing closed captions or subtitles.
- */
- public void hideSubtitle() {
- mProvider.hideSubtitle_impl();
- }
-
- // TODO: This should be revised after integration with MediaPlayer2.
- /**
* Sets playback speed.
*
* It is expressed as a multiplicative factor, where normal speed is 1.0f. If it is less than
@@ -245,21 +205,12 @@
* be reset to the normal speed 1.0f.
* @param speed the playback speed. It should be positive.
*/
+ // TODO: Support this via MediaController2.
public void setSpeed(float speed) {
mProvider.setSpeed_impl(speed);
}
/**
- * Returns current speed setting.
- *
- * If setSpeed() has never been called, returns the default value 1.0f.
- * @return current speed setting
- */
- public float getSpeed() {
- return mProvider.getSpeed_impl();
- }
-
- /**
* Sets which type of audio focus will be requested during the playback, or configures playback
* to not request audio focus. Valid values for focus requests are
* {@link AudioManager#AUDIOFOCUS_GAIN}, {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT},
@@ -271,7 +222,8 @@
* background.
*
* @param focusGain the type of audio focus gain that will be requested, or
- * {@link AudioManager#AUDIOFOCUS_NONE} to disable the use audio focus during playback.
+ * {@link AudioManager#AUDIOFOCUS_NONE} to disable the use audio focus during
+ * playback.
*/
public void setAudioFocusRequest(int focusGain) {
mProvider.setAudioFocusRequest_impl(focusGain);
@@ -287,6 +239,39 @@
}
/**
+ * Sets a remote player for handling playback of the selected route from MediaControlView2.
+ * If this is not called, MediaCotrolView2 will not show the route button.
+ *
+ * @param routeCategories the list of media control categories in
+ * {@link android.support.v7.media.MediaControlIntent}
+ * @param player the player to handle playback of the selected route.
+ * If null, a default route player will be used.
+ * @throws IllegalStateException if MediaControlView2 is not set.
+ * @hide
+ */
+ public void setRouteAttributes(@NonNull List<String> routeCategories,
+ @Nullable MediaPlayerInterface player) {
+ mProvider.setRouteAttributes_impl(routeCategories, player);
+ }
+
+ /**
+ * Sets a remote player for handling playback of the selected route from MediaControlView2.
+ * If this is not called, MediaCotrolView2 will not show the route button.
+ *
+ * @param routeCategories the list of media control categories in
+ * {@link android.support.v7.media.MediaControlIntent}
+ * @param sessionPlayer the player to handle playback of the selected route.
+ * If null, a default route player will be used.
+ * @throws IllegalStateException if MediaControlView2 is not set.
+ * @hide
+ */
+ // TODO: Use MediaPlayerBase once MediaSession2 APIs are ready.
+ public void setRouteAttributes(@NonNull List<String> routeCategories,
+ @Nullable MediaSession.Callback sessionPlayer) {
+ mProvider.setRouteAttributes_impl(routeCategories, sessionPlayer);
+ }
+
+ /**
* Sets video path.
*
* @param path the path of the video.
@@ -300,8 +285,8 @@
*
* @param uri the URI of the video.
*/
- public void setVideoURI(Uri uri) {
- mProvider.setVideoURI_impl(uri);
+ public void setVideoUri(Uri uri) {
+ mProvider.setVideoUri_impl(uri);
}
/**
@@ -314,8 +299,8 @@
* "android-allow-cross-domain-redirect" as the key and "0" or "1" as the value
* to disallow or allow cross domain redirection.
*/
- public void setVideoURI(Uri uri, Map<String, String> headers) {
- mProvider.setVideoURI_impl(uri, headers);
+ public void setVideoUri(Uri uri, Map<String, String> headers) {
+ mProvider.setVideoUri_impl(uri, headers);
}
/**
@@ -342,30 +327,38 @@
}
/**
- * Stops playback and release all the resources. This should be called whenever a VideoView2
- * instance is no longer to be used.
+ * Sets custom actions which will be shown as custom buttons in {@link MediaControlView2}.
+ *
+ * @param actionList A list of {@link PlaybackState.CustomAction}. The return value of
+ * {@link PlaybackState.CustomAction#getIcon()} will be used to draw buttons
+ * in {@link MediaControlView2}.
+ * @param executor executor to run callbacks on.
+ * @param listener A listener to be called when a custom button is clicked.
*/
- public void stopPlayback() {
- mProvider.stopPlayback_impl();
+ public void setCustomActions(List<PlaybackState.CustomAction> actionList,
+ Executor executor, OnCustomActionListener listener) {
+ mProvider.setCustomActions_impl(actionList, executor, listener);
}
/**
* Registers a callback to be invoked when the media file is loaded and ready to go.
*
+ * @param executor executor to run callbacks on.
* @param l the callback that will be run.
*/
- public void setOnPreparedListener(OnPreparedListener l) {
- mProvider.setOnPreparedListener_impl(l);
+ public void setOnPreparedListener(Executor executor, OnPreparedListener l) {
+ mProvider.setOnPreparedListener_impl(executor, l);
}
/**
* Registers a callback to be invoked when the end of a media file has been reached during
* playback.
*
+ * @param executor executor to run callbacks on.
* @param l the callback that will be run.
*/
- public void setOnCompletionListener(OnCompletionListener l) {
- mProvider.setOnCompletionListener_impl(l);
+ public void setOnCompletionListener(Executor executor, OnCompletionListener l) {
+ mProvider.setOnCompletionListener_impl(executor, l);
}
/**
@@ -373,45 +366,58 @@
* listener is specified, or if the listener returned false, VideoView2 will inform the user of
* any errors.
*
+ * @param executor executor to run callbacks on.
* @param l The callback that will be run
*/
- public void setOnErrorListener(OnErrorListener l) {
- mProvider.setOnErrorListener_impl(l);
+ public void setOnErrorListener(Executor executor, OnErrorListener l) {
+ mProvider.setOnErrorListener_impl(executor, l);
}
/**
* Registers a callback to be invoked when an informational event occurs during playback or
* setup.
*
+ * @param executor executor to run callbacks on.
* @param l The callback that will be run
*/
- public void setOnInfoListener(OnInfoListener l) {
- mProvider.setOnInfoListener_impl(l);
+ public void setOnInfoListener(Executor executor, OnInfoListener l) {
+ mProvider.setOnInfoListener_impl(executor, l);
}
/**
* Registers a callback to be invoked when a view type change is done.
* {@see #setViewType(int)}
+ * @param executor executor to run callbacks on.
* @param l The callback that will be run
*/
- public void setOnViewTypeChangedListener(OnViewTypeChangedListener l) {
- mProvider.setOnViewTypeChangedListener_impl(l);
+ public void setOnViewTypeChangedListener(Executor executor, OnViewTypeChangedListener l) {
+ mProvider.setOnViewTypeChangedListener_impl(executor, l);
}
/**
- * Interface definition of a callback to be invoked when the viw type has been changed.
+ * Registers a callback to be invoked when the fullscreen mode should be changed.
+ * @param executor executor to run callbacks on.
+ * @param l The callback that will be run
+ */
+ public void setFullScreenRequestListener(Executor executor, OnFullScreenRequestListener l) {
+ mProvider.setFullScreenRequestListener_impl(executor, l);
+ }
+
+ /**
+ * Interface definition of a callback to be invoked when the view type has been changed.
*/
public interface OnViewTypeChangedListener {
/**
* Called when the view type has been changed.
* @see #setViewType(int)
+ * @param view the View whose view type is changed
* @param viewType
* <ul>
* <li>{@link #VIEW_TYPE_SURFACEVIEW}
* <li>{@link #VIEW_TYPE_TEXTUREVIEW}
* </ul>
*/
- void onViewTypeChanged(@ViewType int viewType);
+ void onViewTypeChanged(View view, @ViewType int viewType);
}
/**
@@ -421,7 +427,7 @@
/**
* Called when the media file is ready for playback.
*/
- void onPrepared();
+ void onPrepared(View view);
}
/**
@@ -432,7 +438,7 @@
/**
* Called when the end of a media source is reached during playback.
*/
- void onCompletion();
+ void onCompletion(View view);
}
/**
@@ -448,7 +454,7 @@
* @return true if the method handled the error, false if it didn't.
* @see MediaPlayer#OnErrorListener
*/
- boolean onError(int what, int extra);
+ boolean onError(View view, int what, int extra);
}
/**
@@ -463,7 +469,33 @@
*
* @see MediaPlayer#OnInfoListener
*/
- void onInfo(int what, int extra);
+ void onInfo(View view, int what, int extra);
+ }
+
+ /**
+ * Interface definition of a callback to be invoked to inform the fullscreen mode is changed.
+ * Application should handle the fullscreen mode accordingly.
+ */
+ public interface OnFullScreenRequestListener {
+ /**
+ * Called to indicate a fullscreen mode change.
+ */
+ void onFullScreenRequest(View view, boolean fullScreen);
+ }
+
+ /**
+ * Interface definition of a callback to be invoked to inform that a custom action is performed.
+ */
+ // TODO: When MediaSession2 is ready, modify the method to match the signature.
+ public interface OnCustomActionListener {
+ /**
+ * Called to indicate that a custom action is performed.
+ *
+ * @param action The action that was originally sent in the
+ * {@link PlaybackState.CustomAction}.
+ * @param extras Optional extras.
+ */
+ void onCustomAction(String action, Bundle extras);
}
@Override
@@ -492,21 +524,11 @@
}
@Override
- public boolean onKeyDown(int keyCode, KeyEvent event) {
- return mProvider.onKeyDown_impl(keyCode, event);
- }
-
- @Override
public void onFinishInflate() {
mProvider.onFinishInflate_impl();
}
@Override
- public boolean dispatchKeyEvent(KeyEvent event) {
- return mProvider.dispatchKeyEvent_impl(event);
- }
-
- @Override
public void setEnabled(boolean enabled) {
mProvider.setEnabled_impl(enabled);
}
@@ -538,21 +560,11 @@
}
@Override
- public boolean onKeyDown_impl(int keyCode, KeyEvent event) {
- return VideoView2.super.onKeyDown(keyCode, event);
- }
-
- @Override
public void onFinishInflate_impl() {
VideoView2.super.onFinishInflate();
}
@Override
- public boolean dispatchKeyEvent_impl(KeyEvent event) {
- return VideoView2.super.dispatchKeyEvent(event);
- }
-
- @Override
public void setEnabled_impl(boolean enabled) {
VideoView2.super.setEnabled(enabled);
}
diff --git a/core/java/com/android/internal/app/EventLogTags.logtags b/core/java/com/android/internal/app/EventLogTags.logtags
new file mode 100644
index 0000000..d681a8d
--- /dev/null
+++ b/core/java/com/android/internal/app/EventLogTags.logtags
@@ -0,0 +1,6 @@
+# See system/core/logcat/event.logtags for a description of the format of this file.
+
+option java_package com.android.internal.app;
+
+53000 harmful_app_warning_uninstall (package_name|3)
+53001 harmful_app_warning_launch_anyway (package_name|3)
\ No newline at end of file
diff --git a/core/java/com/android/internal/app/HarmfulAppWarningActivity.java b/core/java/com/android/internal/app/HarmfulAppWarningActivity.java
index 042da36..9966626 100644
--- a/core/java/com/android/internal/app/HarmfulAppWarningActivity.java
+++ b/core/java/com/android/internal/app/HarmfulAppWarningActivity.java
@@ -20,8 +20,12 @@
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentSender;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
+import android.view.View;
+import android.widget.TextView;
import com.android.internal.R;
/**
@@ -31,7 +35,7 @@
*/
public class HarmfulAppWarningActivity extends AlertActivity implements
DialogInterface.OnClickListener {
- private static final String TAG = "HarmfulAppWarningActivity";
+ private static final String TAG = HarmfulAppWarningActivity.class.getSimpleName();
private static final String EXTRA_HARMFUL_APP_WARNING = "harmful_app_warning";
@@ -39,13 +43,11 @@
private String mHarmfulAppWarning;
private IntentSender mTarget;
- // [b/63909431] STOPSHIP replace placeholder UI with final Harmful App Warning UI
-
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- Intent intent = getIntent();
+ final Intent intent = getIntent();
mPackageName = intent.getStringExtra(Intent.EXTRA_PACKAGE_NAME);
mTarget = intent.getParcelableExtra(Intent.EXTRA_INTENT);
mHarmfulAppWarning = intent.getStringExtra(EXTRA_HARMFUL_APP_WARNING);
@@ -55,33 +57,56 @@
finish();
}
- AlertController.AlertParams p = mAlertParams;
+ final ApplicationInfo applicationInfo;
+ try {
+ applicationInfo = getPackageManager().getApplicationInfo(mPackageName, 0 /*flags*/);
+ } catch (PackageManager.NameNotFoundException e) {
+ Log.e(TAG, "Could not show warning because package does not exist ", e);
+ finish();
+ return;
+ }
+
+ final AlertController.AlertParams p = mAlertParams;
p.mTitle = getString(R.string.harmful_app_warning_title);
- p.mMessage = mHarmfulAppWarning;
- p.mPositiveButtonText = getString(R.string.harmful_app_warning_launch_anyway);
+ p.mView = createView(applicationInfo);
+
+ p.mPositiveButtonText = getString(R.string.harmful_app_warning_uninstall);
p.mPositiveButtonListener = this;
- p.mNegativeButtonText = getString(R.string.harmful_app_warning_uninstall);
+ p.mNegativeButtonText = getString(R.string.harmful_app_warning_open_anyway);
p.mNegativeButtonListener = this;
mAlert.installContent(mAlertParams);
}
+ private View createView(ApplicationInfo applicationInfo) {
+ final View view = getLayoutInflater().inflate(R.layout.harmful_app_warning_dialog,
+ null /*root*/);
+ ((TextView) view.findViewById(R.id.app_name_text))
+ .setText(applicationInfo.loadSafeLabel(getPackageManager()));
+ ((TextView) view.findViewById(R.id.message))
+ .setText(mHarmfulAppWarning);
+ return view;
+ }
+
@Override
public void onClick(DialogInterface dialog, int which) {
switch (which) {
case DialogInterface.BUTTON_POSITIVE:
- getPackageManager().setHarmfulAppWarning(mPackageName, null);
-
- IntentSender target = getIntent().getParcelableExtra(Intent.EXTRA_INTENT);
- try {
- startIntentSenderForResult(target, -1, null, 0, 0, 0);
- } catch (IntentSender.SendIntentException e) {
- // ignore..
- }
+ getPackageManager().deletePackage(mPackageName, null /*observer*/, 0 /*flags*/);
+ EventLogTags.writeHarmfulAppWarningUninstall(mPackageName);
finish();
break;
case DialogInterface.BUTTON_NEGATIVE:
- getPackageManager().deletePackage(mPackageName, null, 0);
+ getPackageManager().setHarmfulAppWarning(mPackageName, null /*warning*/);
+
+ final IntentSender target = getIntent().getParcelableExtra(Intent.EXTRA_INTENT);
+ try {
+ startIntentSenderForResult(target, -1 /*requestCode*/, null /*fillInIntent*/,
+ 0 /*flagsMask*/, 0 /*flagsValue*/, 0 /*extraFlags*/);
+ } catch (IntentSender.SendIntentException e) {
+ Log.e(TAG, "Error while starting intent sender", e);
+ }
+ EventLogTags.writeHarmfulAppWarningLaunchAnyway(mPackageName);
finish();
break;
}
@@ -89,7 +114,7 @@
public static Intent createHarmfulAppWarningIntent(Context context, String targetPackageName,
IntentSender target, CharSequence harmfulAppWarning) {
- Intent intent = new Intent();
+ final Intent intent = new Intent();
intent.setClass(context, HarmfulAppWarningActivity.class);
intent.putExtra(Intent.EXTRA_PACKAGE_NAME, targetPackageName);
intent.putExtra(Intent.EXTRA_INTENT, target);
diff --git a/core/java/com/android/internal/app/IBatteryStats.aidl b/core/java/com/android/internal/app/IBatteryStats.aidl
index d3e807d..514ff76 100644
--- a/core/java/com/android/internal/app/IBatteryStats.aidl
+++ b/core/java/com/android/internal/app/IBatteryStats.aidl
@@ -91,8 +91,7 @@
void noteVibratorOn(int uid, long durationMillis);
void noteVibratorOff(int uid);
- void noteStartGps(int uid);
- void noteStopGps(int uid);
+ void noteGpsChanged(in WorkSource oldSource, in WorkSource newSource);
void noteGpsSignalQuality(int signalLevel);
void noteScreenState(int state);
void noteScreenBrightness(int brightness);
diff --git a/core/java/com/android/internal/app/LocaleStore.java b/core/java/com/android/internal/app/LocaleStore.java
index 2b0b5ee..d247013 100644
--- a/core/java/com/android/internal/app/LocaleStore.java
+++ b/core/java/com/android/internal/app/LocaleStore.java
@@ -146,7 +146,11 @@
private String getLangScriptKey() {
if (mLangScriptKey == null) {
- Locale parentWithScript = getParent(LocaleHelper.addLikelySubtags(mLocale));
+ Locale baseLocale = new Locale.Builder()
+ .setLocale(mLocale)
+ .setExtension(Locale.UNICODE_LOCALE_EXTENSION, "")
+ .build();
+ Locale parentWithScript = getParent(LocaleHelper.addLikelySubtags(baseLocale));
mLangScriptKey =
(parentWithScript == null)
? mLocale.toLanguageTag()
diff --git a/core/java/com/android/internal/app/ResolverListController.java b/core/java/com/android/internal/app/ResolverListController.java
index 2ab2d20..1dfff5e 100644
--- a/core/java/com/android/internal/app/ResolverListController.java
+++ b/core/java/com/android/internal/app/ResolverListController.java
@@ -103,11 +103,14 @@
List<ResolverActivity.ResolvedComponentInfo> resolvedComponents = null;
for (int i = 0, N = intents.size(); i < N; i++) {
final Intent intent = intents.get(i);
- final List<ResolveInfo> infos = mpm.queryIntentActivities(intent,
- PackageManager.MATCH_DEFAULT_ONLY
- | (shouldGetResolvedFilter ? PackageManager.GET_RESOLVED_FILTER : 0)
- | (shouldGetActivityMetadata ? PackageManager.GET_META_DATA : 0)
- | PackageManager.MATCH_INSTANT);
+ int flags = PackageManager.MATCH_DEFAULT_ONLY
+ | (shouldGetResolvedFilter ? PackageManager.GET_RESOLVED_FILTER : 0)
+ | (shouldGetActivityMetadata ? PackageManager.GET_META_DATA : 0);
+ if (intent.isBrowsableWebIntent()
+ || (intent.getFlags() & Intent.FLAG_ACTIVITY_MATCH_EXTERNAL) != 0) {
+ flags |= PackageManager.MATCH_INSTANT;
+ }
+ final List<ResolveInfo> infos = mpm.queryIntentActivities(intent, flags);
// Remove any activities that are not exported.
int totalSize = infos.size();
for (int j = totalSize - 1; j >= 0 ; j--) {
diff --git a/core/java/com/android/internal/app/procstats/DumpUtils.java b/core/java/com/android/internal/app/procstats/DumpUtils.java
index 0bc8c483..e38a844 100644
--- a/core/java/com/android/internal/app/procstats/DumpUtils.java
+++ b/core/java/com/android/internal/app/procstats/DumpUtils.java
@@ -21,6 +21,7 @@
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;
@@ -46,12 +47,77 @@
* Utilities for dumping.
*/
public final class DumpUtils {
- public static final String[] STATE_NAMES = new String[] {
- "Persist", "Top ", "ImpFg ", "ImpBg ",
- "Backup ", "HeavyWt", "Service", "ServRst",
- "Receivr", "Home ",
- "LastAct", "CchAct ", "CchCAct", "CchEmty"
- };
+ public static final String[] STATE_NAMES;
+ public static final String[] STATE_NAMES_CSV;
+ static final String[] STATE_TAGS;
+ static final int[] STATE_PROTO_ENUMS;
+
+ // Make the mapping easy to update.
+ static {
+ STATE_NAMES = new String[STATE_COUNT];
+ STATE_NAMES[STATE_PERSISTENT] = "Persist";
+ STATE_NAMES[STATE_TOP] = "Top";
+ STATE_NAMES[STATE_IMPORTANT_FOREGROUND] = "ImpFg";
+ STATE_NAMES[STATE_IMPORTANT_BACKGROUND] = "ImpBg";
+ STATE_NAMES[STATE_BACKUP] = "Backup";
+ STATE_NAMES[STATE_SERVICE] = "Service";
+ STATE_NAMES[STATE_SERVICE_RESTARTING] = "ServRst";
+ STATE_NAMES[STATE_RECEIVER] = "Receivr";
+ STATE_NAMES[STATE_HEAVY_WEIGHT] = "HeavyWt";
+ STATE_NAMES[STATE_HOME] = "Home";
+ STATE_NAMES[STATE_LAST_ACTIVITY] = "LastAct";
+ STATE_NAMES[STATE_CACHED_ACTIVITY] = "CchAct";
+ STATE_NAMES[STATE_CACHED_ACTIVITY_CLIENT] = "CchCAct";
+ STATE_NAMES[STATE_CACHED_EMPTY] = "CchEmty";
+
+ STATE_NAMES_CSV = new String[STATE_COUNT];
+ STATE_NAMES_CSV[STATE_PERSISTENT] = "pers";
+ STATE_NAMES_CSV[STATE_TOP] = "top";
+ STATE_NAMES_CSV[STATE_IMPORTANT_FOREGROUND] = "impfg";
+ STATE_NAMES_CSV[STATE_IMPORTANT_BACKGROUND] = "impbg";
+ STATE_NAMES_CSV[STATE_BACKUP] = "backup";
+ STATE_NAMES_CSV[STATE_SERVICE] = "service";
+ STATE_NAMES_CSV[STATE_SERVICE_RESTARTING] = "service-rs";
+ STATE_NAMES_CSV[STATE_RECEIVER] = "receiver";
+ STATE_NAMES_CSV[STATE_HEAVY_WEIGHT] = "heavy";
+ STATE_NAMES_CSV[STATE_HOME] = "home";
+ STATE_NAMES_CSV[STATE_LAST_ACTIVITY] = "lastact";
+ STATE_NAMES_CSV[STATE_CACHED_ACTIVITY] = "cch-activity";
+ STATE_NAMES_CSV[STATE_CACHED_ACTIVITY_CLIENT] = "cch-aclient";
+ STATE_NAMES_CSV[STATE_CACHED_EMPTY] = "cch-empty";
+
+ STATE_TAGS = new String[STATE_COUNT];
+ STATE_TAGS[STATE_PERSISTENT] = "p";
+ STATE_TAGS[STATE_TOP] = "t";
+ STATE_TAGS[STATE_IMPORTANT_FOREGROUND] = "f";
+ STATE_TAGS[STATE_IMPORTANT_BACKGROUND] = "b";
+ STATE_TAGS[STATE_BACKUP] = "u";
+ STATE_TAGS[STATE_SERVICE] = "s";
+ STATE_TAGS[STATE_SERVICE_RESTARTING] = "x";
+ STATE_TAGS[STATE_RECEIVER] = "r";
+ STATE_TAGS[STATE_HEAVY_WEIGHT] = "w";
+ STATE_TAGS[STATE_HOME] = "h";
+ STATE_TAGS[STATE_LAST_ACTIVITY] = "l";
+ STATE_TAGS[STATE_CACHED_ACTIVITY] = "a";
+ STATE_TAGS[STATE_CACHED_ACTIVITY_CLIENT] = "c";
+ 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;
+ }
public static final String[] ADJ_SCREEN_NAMES_CSV = new String[] {
"off", "on"
@@ -61,25 +127,26 @@
"norm", "mod", "low", "crit"
};
- public static final String[] STATE_NAMES_CSV = new String[] {
- "pers", "top", "impfg", "impbg", "backup", "heavy",
- "service", "service-rs", "receiver", "home", "lastact",
- "cch-activity", "cch-aclient", "cch-empty"
- };
-
// State enum is defined in frameworks/base/core/proto/android/service/procstats.proto
// Update states must sync enum definition as well, the ordering must not be changed.
static final String[] ADJ_SCREEN_TAGS = new String[] {
"0", "1"
};
+ static final int[] ADJ_SCREEN_PROTO_ENUMS = new int[] {
+ ProcessStatsProto.State.OFF,
+ ProcessStatsProto.State.ON
+ };
+
static final String[] ADJ_MEM_TAGS = new String[] {
"n", "m", "l", "c"
};
- static final String[] STATE_TAGS = new String[] {
- "p", "t", "f", "b", "u", "w",
- "s", "x", "r", "h", "l", "a", "c", "e"
+ static final int[] ADJ_MEM_PROTO_ENUMS = new int[] {
+ ProcessStatsProto.State.NORMAL,
+ ProcessStatsProto.State.MODERATE,
+ ProcessStatsProto.State.LOW,
+ ProcessStatsProto.State.CRITICAL
};
static final String CSV_SEP = "\t";
@@ -182,9 +249,10 @@
public static void printProcStateTagProto(ProtoOutputStream proto, long screenId, long memId,
long stateId, int state) {
- state = printProto(proto, screenId, ADJ_SCREEN_TAGS, state, ADJ_SCREEN_MOD * STATE_COUNT);
- state = printProto(proto, memId, ADJ_MEM_TAGS, state, STATE_COUNT);
- printProto(proto, stateId, STATE_TAGS, state, 1);
+ state = printProto(proto, screenId, ADJ_SCREEN_PROTO_ENUMS,
+ state, ADJ_SCREEN_MOD * STATE_COUNT);
+ state = printProto(proto, memId, ADJ_MEM_PROTO_ENUMS, state, STATE_COUNT);
+ printProto(proto, stateId, STATE_PROTO_ENUMS, state, 1);
}
public static void printAdjTag(PrintWriter pw, int state) {
@@ -294,30 +362,6 @@
}
}
- /*
- * Doesn't seem to be used.
- *
- public static void dumpProcessList(PrintWriter pw, String prefix, ArrayList<ProcessState> procs,
- int[] screenStates, int[] memStates, int[] procStates, long now) {
- String innerPrefix = prefix + " ";
- for (int i=procs.size()-1; i>=0; i--) {
- ProcessState proc = procs.get(i);
- pw.print(prefix);
- pw.print(proc.mName);
- pw.print(" / ");
- UserHandle.formatUid(pw, proc.mUid);
- pw.print(" (");
- pw.print(proc.durations.getKeyCount());
- pw.print(" entries)");
- pw.println(":");
- proc.dumpProcessState(pw, innerPrefix, screenStates, memStates, procStates, now);
- if (proc.pssTable.getKeyCount() > 0) {
- proc.dumpPss(pw, innerPrefix, screenStates, memStates, procStates);
- }
- }
- }
- */
-
public static void dumpProcessSummaryLocked(PrintWriter pw, String prefix,
ArrayList<ProcessState> procs, int[] screenStates, int[] memStates, int[] procStates,
long now, long totalTime) {
@@ -362,11 +406,11 @@
return value - index*mod;
}
- public static int printProto(ProtoOutputStream proto, long fieldId, String[] array, int value, int mod) {
+ public static int printProto(ProtoOutputStream proto, long fieldId,
+ int[] enums, int value, int mod) {
int index = value/mod;
- if (index >= 0 && index < array.length) {
- // Valid state enum number starts at 1, 0 stands for unknown.
- proto.write(fieldId, index + 1);
+ if (index >= 0 && index < enums.length) {
+ proto.write(fieldId, enums[index]);
} // else enum default is always zero in proto3
return value - index*mod;
}
diff --git a/core/java/com/android/internal/app/procstats/ProcessState.java b/core/java/com/android/internal/app/procstats/ProcessState.java
index a0be64b..65bd48f 100644
--- a/core/java/com/android/internal/app/procstats/ProcessState.java
+++ b/core/java/com/android/internal/app/procstats/ProcessState.java
@@ -17,25 +17,18 @@
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.pm.PackageProto;
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.LongSparseArray;
import android.util.Slog;
-import android.util.SparseArray;
import android.util.TimeUtils;
import android.util.proto.ProtoOutputStream;
import android.util.proto.ProtoUtils;
-import com.android.internal.app.procstats.ProcessStats;
import com.android.internal.app.procstats.ProcessStats.PackageState;
import com.android.internal.app.procstats.ProcessStats.ProcessStateHolder;
import com.android.internal.app.procstats.ProcessStats.TotalMemoryUseCollection;
@@ -43,6 +36,9 @@
import static com.android.internal.app.procstats.ProcessStats.PSS_MINIMUM;
import static com.android.internal.app.procstats.ProcessStats.PSS_AVERAGE;
import static com.android.internal.app.procstats.ProcessStats.PSS_MAXIMUM;
+import static com.android.internal.app.procstats.ProcessStats.PSS_RSS_MINIMUM;
+import static com.android.internal.app.procstats.ProcessStats.PSS_RSS_AVERAGE;
+import static com.android.internal.app.procstats.ProcessStats.PSS_RSS_MAXIMUM;
import static com.android.internal.app.procstats.ProcessStats.PSS_USS_MINIMUM;
import static com.android.internal.app.procstats.ProcessStats.PSS_USS_AVERAGE;
import static com.android.internal.app.procstats.ProcessStats.PSS_USS_MAXIMUM;
@@ -64,20 +60,10 @@
import static com.android.internal.app.procstats.ProcessStats.STATE_CACHED_EMPTY;
import static com.android.internal.app.procstats.ProcessStats.STATE_COUNT;
-import dalvik.system.VMRuntime;
-import libcore.util.EmptyArray;
-
-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.HashMap;
-import java.util.List;
import java.util.Map;
-import java.util.Objects;
public final class ProcessState {
private static final String TAG = "ProcessStats";
@@ -469,13 +455,21 @@
}
}
- public void addPss(long pss, long uss, boolean always, int type, long duration,
+ public void addPss(long pss, long uss, long rss, boolean always, int type, long duration,
ArrayMap<String, ProcessStateHolder> pkgList) {
ensureNotDead();
switch (type) {
- case ProcessStats.ADD_PSS_INTERNAL:
- mStats.mInternalPssCount++;
- mStats.mInternalPssTime += duration;
+ case ProcessStats.ADD_PSS_INTERNAL_SINGLE:
+ mStats.mInternalSinglePssCount++;
+ mStats.mInternalSinglePssTime += duration;
+ break;
+ case ProcessStats.ADD_PSS_INTERNAL_ALL_MEM:
+ mStats.mInternalAllMemPssCount++;
+ mStats.mInternalAllMemPssTime += duration;
+ break;
+ case ProcessStats.ADD_PSS_INTERNAL_ALL_POLL:
+ mStats.mInternalAllPollPssCount++;
+ mStats.mInternalAllPollPssTime += duration;
break;
case ProcessStats.ADD_PSS_EXTERNAL:
mStats.mExternalPssCount++;
@@ -496,7 +490,8 @@
mLastPssTime = SystemClock.uptimeMillis();
if (mCurState != STATE_NOTHING) {
// First update the common process.
- mCommonProcess.mPssTable.mergeStats(mCurState, 1, pss, pss, pss, uss, uss, uss);
+ mCommonProcess.mPssTable.mergeStats(mCurState, 1, pss, pss, pss, uss, uss, uss,
+ rss, rss, rss);
// If the common process is not multi-package, there is nothing else to do.
if (!mCommonProcess.mMultiPackage) {
@@ -506,7 +501,7 @@
if (pkgList != null) {
for (int ip=pkgList.size()-1; ip>=0; ip--) {
pullFixedProc(pkgList, ip).mPssTable.mergeStats(mCurState, 1,
- pss, pss, pss, uss, uss, uss);
+ pss, pss, pss, uss, uss, uss, rss, rss, rss);
}
}
}
@@ -658,6 +653,18 @@
return mPssTable.getValueForId((byte)state, PSS_USS_MAXIMUM);
}
+ public long getPssRssMinimum(int state) {
+ return mPssTable.getValueForId((byte)state, PSS_RSS_MINIMUM);
+ }
+
+ public long getPssRssAverage(int state) {
+ return mPssTable.getValueForId((byte)state, PSS_RSS_AVERAGE);
+ }
+
+ public long getPssRssMaximum(int state) {
+ return mPssTable.getValueForId((byte)state, PSS_RSS_MAXIMUM);
+ }
+
/**
* Sums up the PSS data and adds it to 'data'.
*
@@ -793,6 +800,8 @@
new int[] {STATE_SERVICE_RESTARTING}, now, totalTime, true);
dumpProcessSummaryDetails(pw, prefix, " Receiver: ", screenStates, memStates,
new int[] {STATE_RECEIVER}, now, totalTime, true);
+ dumpProcessSummaryDetails(pw, prefix, " Heavy: ", screenStates, memStates,
+ new int[] {STATE_HOME}, now, totalTime, true);
dumpProcessSummaryDetails(pw, prefix, " (Home): ", screenStates, memStates,
new int[] {STATE_HOME}, now, totalTime, true);
dumpProcessSummaryDetails(pw, prefix, " (Last Act): ", screenStates, memStates,
@@ -897,6 +906,12 @@
DebugUtils.printSizeValue(pw, getPssUssAverage(bucket) * 1024);
pw.print(" ");
DebugUtils.printSizeValue(pw, getPssUssMaximum(bucket) * 1024);
+ pw.print(" / ");
+ DebugUtils.printSizeValue(pw, getPssRssMinimum(bucket) * 1024);
+ pw.print(" ");
+ DebugUtils.printSizeValue(pw, getPssRssAverage(bucket) * 1024);
+ pw.print(" ");
+ DebugUtils.printSizeValue(pw, getPssRssMaximum(bucket) * 1024);
pw.println();
}
}
@@ -969,7 +984,8 @@
public void computeProcessData(ProcessStats.ProcessDataCollection data, long now) {
data.totalTime = 0;
data.numPss = data.minPss = data.avgPss = data.maxPss =
- data.minUss = data.avgUss = data.maxUss = 0;
+ data.minUss = data.avgUss = data.maxUss =
+ data.minRss = data.avgRss = data.maxRss = 0;
for (int is=0; is<data.screenStates.length; is++) {
for (int im=0; im<data.memStates.length; im++) {
for (int ip=0; ip<data.procStates.length; ip++) {
@@ -984,6 +1000,9 @@
long minUss = getPssUssMinimum(bucket);
long avgUss = getPssUssAverage(bucket);
long maxUss = getPssUssMaximum(bucket);
+ long minRss = getPssRssMinimum(bucket);
+ long avgRss = getPssRssAverage(bucket);
+ long maxRss = getPssRssMaximum(bucket);
if (data.numPss == 0) {
data.minPss = minPss;
data.avgPss = avgPss;
@@ -991,6 +1010,9 @@
data.minUss = minUss;
data.avgUss = avgUss;
data.maxUss = maxUss;
+ data.minRss = minRss;
+ data.avgRss = avgRss;
+ data.maxRss = maxRss;
} else {
if (minPss < data.minPss) {
data.minPss = minPss;
@@ -1008,6 +1030,14 @@
if (maxUss > data.maxUss) {
data.maxUss = maxUss;
}
+ if (minRss < data.minRss) {
+ data.minRss = minRss;
+ }
+ data.avgRss = (long)( ((data.avgRss*(double)data.numPss)
+ + (avgRss*(double)samples)) / (data.numPss+samples) );
+ if (maxRss > data.maxRss) {
+ data.maxRss = maxRss;
+ }
}
data.numPss += samples;
}
@@ -1176,6 +1206,12 @@
pw.print(mPssTable.getValue(key, PSS_USS_AVERAGE));
pw.print(':');
pw.print(mPssTable.getValue(key, PSS_USS_MAXIMUM));
+ pw.print(':');
+ pw.print(mPssTable.getValue(key, PSS_RSS_MINIMUM));
+ pw.print(':');
+ pw.print(mPssTable.getValue(key, PSS_RSS_AVERAGE));
+ pw.print(':');
+ pw.print(mPssTable.getValue(key, PSS_RSS_MAXIMUM));
}
}
@@ -1191,7 +1227,9 @@
return sb.toString();
}
- public void toProto(ProtoOutputStream proto, String procName, int uid, long now) {
+ public void writeToProto(ProtoOutputStream proto, long fieldId,
+ String procName, int uid, long now) {
+ final long token = proto.start(fieldId);
proto.write(ProcessStatsProto.PROCESS, procName);
proto.write(ProcessStatsProto.UID, uid);
if (mNumExcessiveCpu > 0 || mNumCachedKill > 0 ) {
@@ -1247,6 +1285,10 @@
mPssTable.getValue(key, PSS_USS_MINIMUM),
mPssTable.getValue(key, PSS_USS_AVERAGE),
mPssTable.getValue(key, PSS_USS_MAXIMUM));
+ ProtoUtils.toAggStatsProto(proto, ProcessStatsProto.State.RSS,
+ mPssTable.getValue(key, PSS_RSS_MINIMUM),
+ mPssTable.getValue(key, PSS_RSS_AVERAGE),
+ mPssTable.getValue(key, PSS_RSS_MAXIMUM));
proto.end(stateToken);
}
@@ -1261,5 +1303,6 @@
proto.write(ProcessStatsProto.State.DURATION_MS, entry.getValue());
proto.end(stateToken);
}
+ proto.end(token);
}
}
diff --git a/core/java/com/android/internal/app/procstats/ProcessStats.java b/core/java/com/android/internal/app/procstats/ProcessStats.java
index 35b2dd2..d35bddd 100644
--- a/core/java/com/android/internal/app/procstats/ProcessStats.java
+++ b/core/java/com/android/internal/app/procstats/ProcessStats.java
@@ -27,7 +27,6 @@
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.DebugUtils;
-import android.util.Log;
import android.util.LongSparseArray;
import android.util.Slog;
import android.util.SparseArray;
@@ -35,16 +34,8 @@
import android.util.proto.ProtoOutputStream;
import com.android.internal.app.ProcessMap;
-import com.android.internal.app.procstats.DurationsTable;
-import com.android.internal.app.procstats.ProcessState;
-import com.android.internal.app.procstats.PssTable;
-import com.android.internal.app.procstats.ServiceState;
-import com.android.internal.app.procstats.SparseMappingTable;
-import com.android.internal.app.procstats.SysMemUsageTable;
-import com.android.internal.app.procstats.DumpUtils.*;
import dalvik.system.VMRuntime;
-import libcore.util.EmptyArray;
import java.io.BufferedReader;
import java.io.FileReader;
@@ -54,7 +45,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
-import java.util.Comparator;
import java.util.Objects;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
@@ -99,7 +89,10 @@
public static final int PSS_USS_MINIMUM = 4;
public static final int PSS_USS_AVERAGE = 5;
public static final int PSS_USS_MAXIMUM = 6;
- public static final int PSS_COUNT = PSS_USS_MAXIMUM+1;
+ public static final int PSS_RSS_MINIMUM = 7;
+ public static final int PSS_RSS_AVERAGE = 8;
+ public static final int PSS_RSS_MAXIMUM = 9;
+ public static final int PSS_COUNT = PSS_RSS_MAXIMUM+1;
public static final int SYS_MEM_USAGE_SAMPLE_COUNT = 0;
public static final int SYS_MEM_USAGE_CACHED_MINIMUM = 1;
@@ -134,9 +127,11 @@
public static final int FLAG_SHUTDOWN = 1<<1;
public static final int FLAG_SYSPROPS = 1<<2;
- public static final int ADD_PSS_INTERNAL = 0;
- public static final int ADD_PSS_EXTERNAL = 1;
- public static final int ADD_PSS_EXTERNAL_SLOW = 2;
+ public static final int ADD_PSS_INTERNAL_SINGLE = 0;
+ public static final int ADD_PSS_INTERNAL_ALL_MEM = 1;
+ public static final int ADD_PSS_INTERNAL_ALL_POLL = 2;
+ public static final int ADD_PSS_EXTERNAL = 3;
+ public static final int ADD_PSS_EXTERNAL_SLOW = 4;
public static final int[] ALL_MEM_ADJ = new int[] { ADJ_MEM_FACTOR_NORMAL,
ADJ_MEM_FACTOR_MODERATE, ADJ_MEM_FACTOR_LOW, ADJ_MEM_FACTOR_CRITICAL };
@@ -162,7 +157,7 @@
};
// Current version of the parcel format.
- private static final int PARCEL_VERSION = 24;
+ private static final int PARCEL_VERSION = 27;
// In-memory Parcel magic number, used to detect attempts to unmarshall bad data
private static final int MAGIC = 0x50535454;
@@ -187,9 +182,17 @@
boolean mHasSwappedOutPss;
- // Count and total time expended doing "quick" pss computations for internal use.
- public long mInternalPssCount;
- public long mInternalPssTime;
+ // Count and total time expended doing "quick" single pss computations for internal use.
+ public long mInternalSinglePssCount;
+ public long mInternalSinglePssTime;
+
+ // Count and total time expended doing "quick" all mem pss computations for internal use.
+ public long mInternalAllMemPssCount;
+ public long mInternalAllMemPssTime;
+
+ // Count and total time expended doing "quick" all poll pss computations for internal use.
+ public long mInternalAllPollPssCount;
+ public long mInternalAllPollPssTime;
// Count and total time expended doing "quick" pss computations due to external requests.
public long mExternalPssCount;
@@ -318,8 +321,12 @@
mTimePeriodEndRealtime += other.mTimePeriodEndRealtime - other.mTimePeriodStartRealtime;
mTimePeriodEndUptime += other.mTimePeriodEndUptime - other.mTimePeriodStartUptime;
- mInternalPssCount += other.mInternalPssCount;
- mInternalPssTime += other.mInternalPssTime;
+ mInternalSinglePssCount += other.mInternalSinglePssCount;
+ mInternalSinglePssTime += other.mInternalSinglePssTime;
+ mInternalAllMemPssCount += other.mInternalAllMemPssCount;
+ mInternalAllMemPssTime += other.mInternalAllMemPssTime;
+ mInternalAllPollPssCount += other.mInternalAllPollPssCount;
+ mInternalAllPollPssTime += other.mInternalAllPollPssTime;
mExternalPssCount += other.mExternalPssCount;
mExternalPssTime += other.mExternalPssTime;
mExternalSlowPssCount += other.mExternalSlowPssCount;
@@ -523,8 +530,12 @@
buildTimePeriodStartClockStr();
mTimePeriodStartRealtime = mTimePeriodEndRealtime = SystemClock.elapsedRealtime();
mTimePeriodStartUptime = mTimePeriodEndUptime = SystemClock.uptimeMillis();
- mInternalPssCount = 0;
- mInternalPssTime = 0;
+ mInternalSinglePssCount = 0;
+ mInternalSinglePssTime = 0;
+ mInternalAllMemPssCount = 0;
+ mInternalAllMemPssTime = 0;
+ mInternalAllPollPssCount = 0;
+ mInternalAllPollPssTime = 0;
mExternalPssCount = 0;
mExternalPssTime = 0;
mExternalSlowPssCount = 0;
@@ -789,8 +800,12 @@
out.writeLong(mTimePeriodEndRealtime);
out.writeLong(mTimePeriodStartUptime);
out.writeLong(mTimePeriodEndUptime);
- out.writeLong(mInternalPssCount);
- out.writeLong(mInternalPssTime);
+ out.writeLong(mInternalSinglePssCount);
+ out.writeLong(mInternalSinglePssTime);
+ out.writeLong(mInternalAllMemPssCount);
+ out.writeLong(mInternalAllMemPssTime);
+ out.writeLong(mInternalAllPollPssCount);
+ out.writeLong(mInternalAllPollPssTime);
out.writeLong(mExternalPssCount);
out.writeLong(mExternalPssTime);
out.writeLong(mExternalSlowPssCount);
@@ -963,8 +978,12 @@
mTimePeriodEndRealtime = in.readLong();
mTimePeriodStartUptime = in.readLong();
mTimePeriodEndUptime = in.readLong();
- mInternalPssCount = in.readLong();
- mInternalPssTime = in.readLong();
+ mInternalSinglePssCount = in.readLong();
+ mInternalSinglePssTime = in.readLong();
+ mInternalAllMemPssCount = in.readLong();
+ mInternalAllMemPssTime = in.readLong();
+ mInternalAllPollPssCount = in.readLong();
+ mInternalAllPollPssTime = in.readLong();
mExternalPssCount = in.readLong();
mExternalPssTime = in.readLong();
mExternalSlowPssCount = in.readLong();
@@ -1526,10 +1545,20 @@
totalMem.processStateSamples[STATE_SERVICE_RESTARTING]);
pw.println();
pw.println("PSS collection stats:");
- pw.print(" Internal: ");
- pw.print(mInternalPssCount);
+ pw.print(" Internal Single: ");
+ pw.print(mInternalSinglePssCount);
pw.print("x over ");
- TimeUtils.formatDuration(mInternalPssTime, pw);
+ TimeUtils.formatDuration(mInternalSinglePssTime, pw);
+ pw.println();
+ pw.print(" Internal All Procs (Memory Change): ");
+ pw.print(mInternalAllMemPssCount);
+ pw.print("x over ");
+ TimeUtils.formatDuration(mInternalAllMemPssTime, pw);
+ pw.println();
+ pw.print(" Internal All Procs (Polling): ");
+ pw.print(mInternalAllPollPssCount);
+ pw.print("x over ");
+ TimeUtils.formatDuration(mInternalAllPollPssTime, pw);
pw.println();
pw.print(" External: ");
pw.print(mExternalPssCount);
@@ -1776,10 +1805,11 @@
}
}
- public void toProto(ProtoOutputStream proto, long now) {
+ 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);
@@ -1811,11 +1841,10 @@
for (int iu=0; iu<uids.size(); iu++) {
final int uid = uids.keyAt(iu);
final ProcessState procState = uids.valueAt(iu);
- final long processStateToken = proto.start(ProcessStatsSectionProto.PROCESS_STATS);
- procState.toProto(proto, procName, uid, now);
- proto.end(processStateToken);
+ procState.writeToProto(proto, ProcessStatsSectionProto.PROCESS_STATS, procName, uid, now);
}
}
+ proto.end(token);
}
final public static class ProcessStateHolder {
@@ -1854,6 +1883,9 @@
public long minUss;
public long avgUss;
public long maxUss;
+ public long minRss;
+ public long avgRss;
+ public long maxRss;
public ProcessDataCollection(int[] _screenStates, int[] _memStates, int[] _procStates) {
screenStates = _screenStates;
@@ -1879,6 +1911,12 @@
DebugUtils.printSizeValue(pw, avgUss * 1024);
pw.print("-");
DebugUtils.printSizeValue(pw, maxUss * 1024);
+ pw.print("/");
+ DebugUtils.printSizeValue(pw, minRss * 1024);
+ pw.print("-");
+ DebugUtils.printSizeValue(pw, avgRss * 1024);
+ pw.print("-");
+ DebugUtils.printSizeValue(pw, maxRss * 1024);
if (full) {
pw.print(" over ");
pw.print(numPss);
diff --git a/core/java/com/android/internal/app/procstats/PssTable.java b/core/java/com/android/internal/app/procstats/PssTable.java
index de5f673..1e7c566 100644
--- a/core/java/com/android/internal/app/procstats/PssTable.java
+++ b/core/java/com/android/internal/app/procstats/PssTable.java
@@ -16,6 +16,9 @@
package com.android.internal.app.procstats;
+import static com.android.internal.app.procstats.ProcessStats.PSS_RSS_AVERAGE;
+import static com.android.internal.app.procstats.ProcessStats.PSS_RSS_MAXIMUM;
+import static com.android.internal.app.procstats.ProcessStats.PSS_RSS_MINIMUM;
import static com.android.internal.app.procstats.ProcessStats.PSS_SAMPLE_COUNT;
import static com.android.internal.app.procstats.ProcessStats.PSS_MINIMUM;
import static com.android.internal.app.procstats.ProcessStats.PSS_AVERAGE;
@@ -51,7 +54,10 @@
that.getValue(key, PSS_MAXIMUM),
that.getValue(key, PSS_USS_MINIMUM),
that.getValue(key, PSS_USS_AVERAGE),
- that.getValue(key, PSS_USS_MAXIMUM));
+ that.getValue(key, PSS_USS_MAXIMUM),
+ that.getValue(key, PSS_RSS_MINIMUM),
+ that.getValue(key, PSS_RSS_AVERAGE),
+ that.getValue(key, PSS_RSS_MAXIMUM));
}
}
@@ -60,7 +66,7 @@
* one and the new one, the average will now incorporate the new average, etc.
*/
public void mergeStats(int state, int inCount, long minPss, long avgPss, long maxPss,
- long minUss, long avgUss, long maxUss) {
+ long minUss, long avgUss, long maxUss, long minRss, long avgRss, long maxRss) {
final int key = getOrAddKey((byte)state, PSS_COUNT);
final long count = getValue(key, PSS_SAMPLE_COUNT);
if (count == 0) {
@@ -71,6 +77,9 @@
setValue(key, PSS_USS_MINIMUM, minUss);
setValue(key, PSS_USS_AVERAGE, avgUss);
setValue(key, PSS_USS_MAXIMUM, maxUss);
+ setValue(key, PSS_RSS_MINIMUM, minRss);
+ setValue(key, PSS_RSS_AVERAGE, avgRss);
+ setValue(key, PSS_RSS_MAXIMUM, maxRss);
} else {
setValue(key, PSS_SAMPLE_COUNT, count + inCount);
@@ -103,6 +112,20 @@
if (val < maxUss) {
setValue(key, PSS_USS_MAXIMUM, maxUss);
}
+
+ val = getValue(key, PSS_RSS_MINIMUM);
+ if (val > minUss) {
+ setValue(key, PSS_RSS_MINIMUM, minUss);
+ }
+
+ val = getValue(key, PSS_RSS_AVERAGE);
+ setValue(key, PSS_RSS_AVERAGE,
+ (long)(((val*(double)count)+(avgUss*(double)inCount)) / (count+inCount)));
+
+ val = getValue(key, PSS_RSS_MAXIMUM);
+ if (val < maxUss) {
+ setValue(key, PSS_RSS_MAXIMUM, maxUss);
+ }
}
}
}
diff --git a/core/java/com/android/internal/backup/IBackupTransport.aidl b/core/java/com/android/internal/backup/IBackupTransport.aidl
index 147438c..f8117a7 100644
--- a/core/java/com/android/internal/backup/IBackupTransport.aidl
+++ b/core/java/com/android/internal/backup/IBackupTransport.aidl
@@ -306,4 +306,13 @@
* operation will immediately be finished with no further attempts to restore app data.
*/
int abortFullRestore();
+
+ /**
+ * Returns flags with additional information about the transport, which is accessible to the
+ * {@link android.app.backup.BackupAgent}. This allows the agent to decide what to backup or
+ * restore based on properties of the transport.
+ *
+ * <p>For supported flags see {@link android.app.backup.BackupAgent}.
+ */
+ int getTransportFlags();
}
diff --git a/core/java/com/android/internal/logging/EventLogTags.logtags b/core/java/com/android/internal/logging/EventLogTags.logtags
index a440ee4..693bd16 100644
--- a/core/java/com/android/internal/logging/EventLogTags.logtags
+++ b/core/java/com/android/internal/logging/EventLogTags.logtags
@@ -13,3 +13,6 @@
# LatencyTracker.java
# ---------------------------
36070 sysui_latency (action|1|6),(latency|1|3)
+
+# Generic event for logging when we write system files.
+525000 commit_sys_config_file (name|3),(time|2|3)
diff --git a/core/java/com/android/internal/net/NetworkStatsFactory.java b/core/java/com/android/internal/net/NetworkStatsFactory.java
index 02cd09f..43abade 100644
--- a/core/java/com/android/internal/net/NetworkStatsFactory.java
+++ b/core/java/com/android/internal/net/NetworkStatsFactory.java
@@ -31,13 +31,17 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.ProcFileReader;
+import com.google.android.collect.Lists;
import libcore.io.IoUtils;
+import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileReader;
import java.io.IOException;
import java.net.ProtocolException;
+import java.util.ArrayList;
import java.util.Objects;
/**
@@ -57,6 +61,8 @@
// Used for correct stats accounting on clatd interfaces.
private static final int IPV4V6_HEADER_DELTA = 20;
+ /** Path to {@code /proc/net/dev}. */
+ private final File mStatsIfaceDev;
/** Path to {@code /proc/net/xt_qtaguid/iface_stat_all}. */
private final File mStatsXtIfaceAll;
/** Path to {@code /proc/net/xt_qtaguid/iface_stat_fmt}. */
@@ -64,6 +70,8 @@
/** Path to {@code /proc/net/xt_qtaguid/stats}. */
private final File mStatsXtUid;
+ private boolean mUseBpfStats;
+
// TODO: to improve testability and avoid global state, do not use a static variable.
@GuardedBy("sStackedIfaces")
private static final ArrayMap<String, String> sStackedIfaces = new ArrayMap<>();
@@ -79,14 +87,54 @@
}
public NetworkStatsFactory() {
- this(new File("/proc/"));
+ this(new File("/proc/"), new File("/sys/fs/bpf/traffic_uid_stats_map").exists());
}
@VisibleForTesting
- public NetworkStatsFactory(File procRoot) {
+ public NetworkStatsFactory(File procRoot, boolean useBpfStats) {
+ mStatsIfaceDev = new File(procRoot, "net/dev");
mStatsXtIfaceAll = new File(procRoot, "net/xt_qtaguid/iface_stat_all");
mStatsXtIfaceFmt = new File(procRoot, "net/xt_qtaguid/iface_stat_fmt");
mStatsXtUid = new File(procRoot, "net/xt_qtaguid/stats");
+ mUseBpfStats = useBpfStats;
+ }
+
+ @VisibleForTesting
+ public NetworkStats readNetworkStatsIfaceDev() throws IOException {
+ final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskReads();
+
+ final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6);
+ final NetworkStats.Entry entry = new NetworkStats.Entry();
+
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new FileReader(mStatsIfaceDev));
+
+ // skip first two header lines
+ reader.readLine();
+ reader.readLine();
+
+ // parse remaining lines
+ String line;
+ while ((line = reader.readLine()) != null) {
+ String[] values = line.trim().split("\\:?\\s+");
+ entry.iface = values[0];
+ entry.uid = UID_ALL;
+ entry.set = SET_ALL;
+ entry.tag = TAG_NONE;
+ entry.rxBytes = Long.parseLong(values[1]);
+ entry.rxPackets = Long.parseLong(values[2]);
+ entry.txBytes = Long.parseLong(values[9]);
+ entry.txPackets = Long.parseLong(values[10]);
+ stats.addValues(entry);
+ }
+ } catch (NullPointerException|NumberFormatException e) {
+ throw new ProtocolException("problem parsing stats", e);
+ } finally {
+ IoUtils.closeQuietly(reader);
+ StrictMode.setThreadPolicy(savedPolicy);
+ }
+ return stats;
}
/**
@@ -98,6 +146,11 @@
* @throws IllegalStateException when problem parsing stats.
*/
public NetworkStats readNetworkStatsSummaryDev() throws IOException {
+
+ // Return the stats get from /proc/net/dev if switched to bpf module.
+ if (mUseBpfStats)
+ return readNetworkStatsIfaceDev();
+
final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskReads();
final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6);
@@ -149,6 +202,11 @@
* @throws IllegalStateException when problem parsing stats.
*/
public NetworkStats readNetworkStatsSummaryXt() throws IOException {
+
+ // Return the stats get from /proc/net/dev if qtaguid module is replaced.
+ if (mUseBpfStats)
+ return readNetworkStatsIfaceDev();
+
final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskReads();
// return null when kernel doesn't support
@@ -254,7 +312,7 @@
stats = new NetworkStats(SystemClock.elapsedRealtime(), -1);
}
if (nativeReadNetworkStatsDetail(stats, mStatsXtUid.getAbsolutePath(), limitUid,
- limitIfaces, limitTag) != 0) {
+ limitIfaces, limitTag, mUseBpfStats) != 0) {
throw new IOException("Failed to parse network stats");
}
if (SANITY_CHECK_NATIVE) {
@@ -348,6 +406,6 @@
* are expected to monotonically increase since device boot.
*/
@VisibleForTesting
- public static native int nativeReadNetworkStatsDetail(
- NetworkStats stats, String path, int limitUid, String[] limitIfaces, int limitTag);
+ public static native int nativeReadNetworkStatsDetail(NetworkStats stats, String path,
+ int limitUid, String[] limitIfaces, int limitTag, boolean useBpfStats);
}
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index 039b66d..7def876 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -41,9 +41,11 @@
import android.os.IBatteryPropertiesRegistrar;
import android.os.Looper;
import android.os.Message;
+import android.os.OsProtoEnums;
import android.os.Parcel;
import android.os.ParcelFormatException;
import android.os.Parcelable;
+import android.os.PowerManager;
import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -4252,11 +4254,11 @@
getUidStatsLocked(uid).noteStartWakeLocked(pid, name, type, elapsedRealtime);
if (wc != null) {
- StatsLog.write(
- StatsLog.WAKELOCK_STATE_CHANGED, wc.getUids(), wc.getTags(), type, name, 1);
+ StatsLog.write(StatsLog.WAKELOCK_STATE_CHANGED, wc.getUids(), wc.getTags(),
+ getPowerManagerWakeLockLevel(type), name, 1);
} else {
- StatsLog.write_non_chained(StatsLog.WAKELOCK_STATE_CHANGED, uid, null, type, name,
- 1);
+ StatsLog.write_non_chained(StatsLog.WAKELOCK_STATE_CHANGED, uid, null,
+ getPowerManagerWakeLockLevel(type), name, 1);
}
}
}
@@ -4295,15 +4297,45 @@
getUidStatsLocked(uid).noteStopWakeLocked(pid, name, type, elapsedRealtime);
if (wc != null) {
- StatsLog.write(
- StatsLog.WAKELOCK_STATE_CHANGED, wc.getUids(), wc.getTags(), type, name, 0);
+ StatsLog.write(StatsLog.WAKELOCK_STATE_CHANGED, wc.getUids(), wc.getTags(),
+ getPowerManagerWakeLockLevel(type), name, 0);
} else {
- StatsLog.write_non_chained(StatsLog.WAKELOCK_STATE_CHANGED, uid, null, type, name,
- 0);
+ StatsLog.write_non_chained(StatsLog.WAKELOCK_STATE_CHANGED, uid, null,
+ getPowerManagerWakeLockLevel(type), name, 0);
}
}
}
+ /**
+ * Converts BatteryStats wakelock types back into PowerManager wakelock levels.
+ * This is the inverse map of Notifier.getBatteryStatsWakeLockMonitorType().
+ * These are estimations, since batterystats loses some of the original data.
+ * TODO: Delete this. Instead, StatsLog.write should be called from PowerManager's Notifier.
+ */
+ private int getPowerManagerWakeLockLevel(int battertStatsWakelockType) {
+ switch (battertStatsWakelockType) {
+ // PowerManager.PARTIAL_WAKE_LOCK or PROXIMITY_SCREEN_OFF_WAKE_LOCK
+ case BatteryStats.WAKE_TYPE_PARTIAL:
+ return PowerManager.PARTIAL_WAKE_LOCK;
+
+ // PowerManager.SCREEN_DIM_WAKE_LOCK or SCREEN_BRIGHT_WAKE_LOCK
+ case BatteryStats.WAKE_TYPE_FULL:
+ return PowerManager.FULL_WAKE_LOCK;
+
+ case BatteryStats.WAKE_TYPE_DRAW:
+ return PowerManager.DRAW_WAKE_LOCK;
+
+ // It appears that nothing can ever make a Window and PowerManager lacks an equivalent.
+ case BatteryStats.WAKE_TYPE_WINDOW:
+ Slog.e(TAG, "Illegal window wakelock type observed in batterystats.");
+ return -1;
+
+ default:
+ Slog.e(TAG, "Illegal wakelock type in batterystats: " + battertStatsWakelockType);
+ return -1;
+ }
+ }
+
public void noteStartWakeFromSourceLocked(WorkSource ws, int pid, String name,
String historyName, int type, boolean unimportantForLogging) {
final long elapsedRealtime = mClocks.elapsedRealtime();
@@ -4587,8 +4619,35 @@
int mGpsNesting;
- public void noteStartGpsLocked(int uid) {
- uid = mapUid(uid);
+ public void noteGpsChangedLocked(WorkSource oldWs, WorkSource newWs) {
+ for (int i = 0; i < newWs.size(); ++i) {
+ noteStartGpsLocked(newWs.get(i), null);
+ }
+
+ for (int i = 0; i < oldWs.size(); ++i) {
+ noteStopGpsLocked((oldWs.get(i)), null);
+ }
+
+ List<WorkChain>[] wcs = WorkSource.diffChains(oldWs, newWs);
+ if (wcs != null) {
+ if (wcs[0] != null) {
+ final List<WorkChain> newChains = wcs[0];
+ for (int i = 0; i < newChains.size(); ++i) {
+ noteStartGpsLocked(-1, newChains.get(i));
+ }
+ }
+
+ if (wcs[1] != null) {
+ final List<WorkChain> goneChains = wcs[1];
+ for (int i = 0; i < goneChains.size(); ++i) {
+ noteStopGpsLocked(-1, goneChains.get(i));
+ }
+ }
+ }
+ }
+
+ private void noteStartGpsLocked(int uid, WorkChain workChain) {
+ uid = getAttributionUid(uid, workChain);
final long elapsedRealtime = mClocks.elapsedRealtime();
final long uptime = mClocks.uptimeMillis();
if (mGpsNesting == 0) {
@@ -4598,11 +4657,19 @@
addHistoryRecordLocked(elapsedRealtime, uptime);
}
mGpsNesting++;
+
+ if (workChain == null) {
+ StatsLog.write_non_chained(StatsLog.GPS_SCAN_STATE_CHANGED, uid, null, 1);
+ } else {
+ StatsLog.write(StatsLog.GPS_SCAN_STATE_CHANGED,
+ workChain.getUids(), workChain.getTags(), 1);
+ }
+
getUidStatsLocked(uid).noteStartGps(elapsedRealtime);
}
- public void noteStopGpsLocked(int uid) {
- uid = mapUid(uid);
+ private void noteStopGpsLocked(int uid, WorkChain workChain) {
+ uid = getAttributionUid(uid, workChain);
final long elapsedRealtime = mClocks.elapsedRealtime();
final long uptime = mClocks.uptimeMillis();
mGpsNesting--;
@@ -4614,6 +4681,14 @@
stopAllGpsSignalQualityTimersLocked(-1);
mGpsSignalQualityBin = -1;
}
+
+ if (workChain == null) {
+ StatsLog.write_non_chained(StatsLog.GPS_SCAN_STATE_CHANGED, uid, null, 0);
+ } else {
+ StatsLog.write(StatsLog.GPS_SCAN_STATE_CHANGED, workChain.getUids(),
+ workChain.getTags(), 0);
+ }
+
getUidStatsLocked(uid).noteStopGps(elapsedRealtime);
}
@@ -6211,8 +6286,20 @@
}
@Override public long getGpsBatteryDrainMaMs() {
- //TODO: Add GPS power computation (b/67213967)
- return 0;
+ final double opVolt = mPowerProfile.getAveragePower(
+ PowerProfile.POWER_GPS_OPERATING_VOLTAGE) / 1000.0;
+ if (opVolt == 0) {
+ return 0;
+ }
+ double energyUsedMaMs = 0.0;
+ final int which = STATS_SINCE_CHARGED;
+ final long rawRealtime = SystemClock.elapsedRealtime() * 1000;
+ for(int i=0; i < GnssMetrics.NUM_GPS_SIGNAL_QUALITY_LEVELS; i++) {
+ energyUsedMaMs
+ += mPowerProfile.getAveragePower(PowerProfile.POWER_GPS_SIGNAL_QUALITY_BASED, i)
+ * (getGpsSignalQualityTime(i, rawRealtime, which) / 1000);
+ }
+ return (long) energyUsedMaMs;
}
@Override public long getPhoneOnTime(long elapsedRealtimeUs, int which) {
@@ -9830,9 +9917,7 @@
public void noteStartSensor(int sensor, long elapsedRealtimeMs) {
DualTimer t = getSensorTimerLocked(sensor, /* create= */ true);
t.startRunningLocked(elapsedRealtimeMs);
- if (sensor == Sensor.GPS) {
- StatsLog.write_non_chained(StatsLog.GPS_SCAN_STATE_CHANGED, getUid(), null, 1);
- } else {
+ if (sensor != Sensor.GPS) {
StatsLog.write_non_chained(StatsLog.SENSOR_STATE_CHANGED, getUid(), null, sensor,
1);
}
@@ -9843,14 +9928,9 @@
DualTimer t = getSensorTimerLocked(sensor, false);
if (t != null) {
t.stopRunningLocked(elapsedRealtimeMs);
- if (!t.isRunningLocked()) { // only tell statsd if truly stopped
- if (sensor == Sensor.GPS) {
- StatsLog.write_non_chained(StatsLog.GPS_SCAN_STATE_CHANGED, getUid(), null,
- 0);
- } else {
- StatsLog.write_non_chained(StatsLog.SENSOR_STATE_CHANGED, getUid(), null,
- sensor, 0);
- }
+ if (sensor != Sensor.GPS) {
+ StatsLog.write_non_chained(StatsLog.SENSOR_STATE_CHANGED, getUid(), null,
+ sensor, 0);
}
}
}
@@ -10089,6 +10169,7 @@
updateDailyDeadlineLocked();
if (hasData) {
+ final long startTime = SystemClock.uptimeMillis();
mDailyItems.add(item);
while (mDailyItems.size() > MAX_DAILY_ITEMS) {
mDailyItems.remove(0);
@@ -10098,10 +10179,12 @@
XmlSerializer out = new FastXmlSerializer();
out.setOutput(memStream, StandardCharsets.UTF_8.name());
writeDailyItemsLocked(out);
+ final long initialTime = SystemClock.uptimeMillis() - startTime;
BackgroundThread.getHandler().post(new Runnable() {
@Override
public void run() {
synchronized (mCheckinFile) {
+ final long startTime2 = SystemClock.uptimeMillis();
FileOutputStream stream = null;
try {
stream = mDailyFile.startWrite();
@@ -10110,6 +10193,9 @@
FileUtils.sync(stream);
stream.close();
mDailyFile.finishWrite(stream);
+ com.android.internal.logging.EventLogTags.writeCommitSysConfigFile(
+ "batterystats-daily",
+ initialTime + SystemClock.uptimeMillis() - startTime2);
} catch (IOException e) {
Slog.w("BatteryStats",
"Error writing battery daily items", e);
@@ -10810,7 +10896,7 @@
return null;
}
- /**
+ /**
* Distribute WiFi energy info and network traffic to apps.
* @param info The energy information from the WiFi controller.
*/
@@ -11074,6 +11160,9 @@
}
}
+ private ModemActivityInfo mLastModemActivityInfo =
+ new ModemActivityInfo(0, 0, 0, new int[0], 0, 0);
+
/**
* Distribute Cell radio energy info and network traffic to apps.
*/
@@ -11094,6 +11183,22 @@
}
}
+ int rxTimeMs = 0;
+ int[] txTimeMs = new int[ModemActivityInfo.TX_POWER_LEVELS];
+ int idleTimeMs = 0;
+ int sleepTimeMs = 0;
+ if (activityInfo != null) {
+ rxTimeMs = activityInfo.getRxTimeMillis() - mLastModemActivityInfo.getRxTimeMillis();
+ for (int i = 0; i < ModemActivityInfo.TX_POWER_LEVELS; i++) {
+ txTimeMs[i] = activityInfo.getTxTimeMillis()[i]
+ - mLastModemActivityInfo.getTxTimeMillis()[i];
+ }
+ idleTimeMs =
+ activityInfo.getIdleTimeMillis() - mLastModemActivityInfo.getIdleTimeMillis();
+ sleepTimeMs =
+ activityInfo.getSleepTimeMillis() - mLastModemActivityInfo.getSleepTimeMillis();
+ }
+
synchronized (this) {
if (!mOnBatteryInternal) {
if (delta != null) {
@@ -11105,11 +11210,11 @@
if (activityInfo != null) {
mHasModemReporting = true;
mModemActivity.getIdleTimeCounter().addCountLocked(
- activityInfo.getIdleTimeMillis());
- mModemActivity.getRxTimeCounter().addCountLocked(activityInfo.getRxTimeMillis());
+ idleTimeMs);
+ mModemActivity.getRxTimeCounter().addCountLocked(rxTimeMs);
for (int lvl = 0; lvl < ModemActivityInfo.TX_POWER_LEVELS; lvl++) {
mModemActivity.getTxTimeCounters()[lvl]
- .addCountLocked(activityInfo.getTxTimeMillis()[lvl]);
+ .addCountLocked(txTimeMs[lvl]);
}
// POWER_MODEM_CONTROLLER_OPERATING_VOLTAGE is measured in mV, so convert to V.
@@ -11117,16 +11222,15 @@
PowerProfile.POWER_MODEM_CONTROLLER_OPERATING_VOLTAGE) / 1000.0;
if (opVolt != 0) {
double energyUsed =
- activityInfo.getSleepTimeMillis() *
+ sleepTimeMs *
mPowerProfile.getAveragePower(PowerProfile.POWER_MODEM_CONTROLLER_SLEEP)
- + activityInfo.getIdleTimeMillis() *
+ + idleTimeMs *
mPowerProfile.getAveragePower(PowerProfile.POWER_MODEM_CONTROLLER_IDLE)
- + activityInfo.getRxTimeMillis() *
+ + rxTimeMs *
mPowerProfile.getAveragePower(PowerProfile.POWER_MODEM_CONTROLLER_RX);
- int[] txCurrentMa = activityInfo.getTxTimeMillis();
- for (int i = 0; i < Math.min(txCurrentMa.length,
+ for (int i = 0; i < Math.min(txTimeMs.length,
SignalStrength.NUM_SIGNAL_STRENGTH_BINS); i++) {
- energyUsed += txCurrentMa[i] * mPowerProfile.getAveragePower(
+ energyUsed += txTimeMs[i] * mPowerProfile.getAveragePower(
PowerProfile.POWER_MODEM_CONTROLLER_TX, i);
}
@@ -11207,7 +11311,7 @@
ControllerActivityCounterImpl activityCounter =
u.getOrCreateModemControllerActivityLocked();
if (totalRxPackets > 0 && entry.rxPackets > 0) {
- final long rxMs = (entry.rxPackets * activityInfo.getRxTimeMillis())
+ final long rxMs = (entry.rxPackets * rxTimeMs)
/ totalRxPackets;
activityCounter.getRxTimeCounter().addCountLocked(rxMs);
}
@@ -11215,7 +11319,7 @@
if (totalTxPackets > 0 && entry.txPackets > 0) {
for (int lvl = 0; lvl < ModemActivityInfo.TX_POWER_LEVELS; lvl++) {
long txMs =
- entry.txPackets * activityInfo.getTxTimeMillis()[lvl];
+ entry.txPackets * txTimeMs[lvl];
txMs /= totalTxPackets;
activityCounter.getTxTimeCounters()[lvl].addCountLocked(txMs);
}
@@ -11236,6 +11340,10 @@
}
}
+ // Cache last value for comparison.
+ private BluetoothActivityEnergyInfo mLastBluetoothActivityEnergyInfo =
+ new BluetoothActivityEnergyInfo(0, 0, 0, 0, 0, 0);
+
/**
* Distribute Bluetooth energy info and network traffic to apps.
* @param info The energy information from the bluetooth controller.
@@ -11252,14 +11360,17 @@
mHasBluetoothReporting = true;
final long elapsedRealtimeMs = mClocks.elapsedRealtime();
- final long rxTimeMs = info.getControllerRxTimeMillis();
- final long txTimeMs = info.getControllerTxTimeMillis();
-
+ final long rxTimeMs = info.getControllerRxTimeMillis() -
+ mLastBluetoothActivityEnergyInfo.getControllerRxTimeMillis();
+ final long txTimeMs = info.getControllerTxTimeMillis() -
+ mLastBluetoothActivityEnergyInfo.getControllerTxTimeMillis();
+ final long idleTimeMs = info.getControllerIdleTimeMillis() -
+ mLastBluetoothActivityEnergyInfo.getControllerIdleTimeMillis();
if (DEBUG_ENERGY) {
Slog.d(TAG, "------ BEGIN BLE power blaming ------");
Slog.d(TAG, " Tx Time: " + txTimeMs + " ms");
Slog.d(TAG, " Rx Time: " + rxTimeMs + " ms");
- Slog.d(TAG, " Idle Time: " + info.getControllerIdleTimeMillis() + " ms");
+ Slog.d(TAG, " Idle Time: " + idleTimeMs + " ms");
}
long totalScanTimeMs = 0;
@@ -11338,9 +11449,25 @@
long totalRxBytes = 0;
final UidTraffic[] uidTraffic = info.getUidTraffic();
- final int numUids = uidTraffic != null ? uidTraffic.length : 0;
- for (int i = 0; i < numUids; i++) {
- final UidTraffic traffic = uidTraffic[i];
+ final UidTraffic[] lastUidTraffic = mLastBluetoothActivityEnergyInfo.getUidTraffic();
+ final ArrayList<UidTraffic> deltaTraffic = new ArrayList<>();
+ int m = 0, n = 0;
+ for (; m < uidTraffic.length && n < lastUidTraffic.length; m++) {
+ final UidTraffic traffic = uidTraffic[m];
+ final UidTraffic lastTraffic = lastUidTraffic[n];
+ if (traffic.getUid() == lastTraffic.getUid()) {
+ deltaTraffic.add(new UidTraffic(traffic.getUid(),
+ traffic.getRxBytes() - lastTraffic.getRxBytes(),
+ traffic.getTxBytes() - lastTraffic.getTxBytes()));
+ n++;
+ }
+ }
+ for (; m < uidTraffic.length; m ++) {
+ deltaTraffic.add(uidTraffic[m]);
+ }
+
+ for (int i = 0, j = 0; i < deltaTraffic.size(); i++) {
+ final UidTraffic traffic = deltaTraffic.get(i);
// Add to the global counters.
mNetworkByteActivityCounters[NETWORK_BT_RX_DATA].addCountLocked(
@@ -11360,8 +11487,8 @@
if ((totalTxBytes != 0 || totalRxBytes != 0) &&
(leftOverRxTimeMs != 0 || leftOverTxTimeMs != 0)) {
- for (int i = 0; i < numUids; i++) {
- final UidTraffic traffic = uidTraffic[i];
+ for (int i = 0; i < deltaTraffic.size(); i++) {
+ final UidTraffic traffic = deltaTraffic.get(i);
final Uid u = getUidStatsLocked(mapUid(traffic.getUid()));
final ControllerActivityCounterImpl counter =
@@ -11392,12 +11519,9 @@
}
}
- mBluetoothActivity.getRxTimeCounter().addCountLocked(
- info.getControllerRxTimeMillis());
- mBluetoothActivity.getTxTimeCounters()[0].addCountLocked(
- info.getControllerTxTimeMillis());
- mBluetoothActivity.getIdleTimeCounter().addCountLocked(
- info.getControllerIdleTimeMillis());
+ mBluetoothActivity.getRxTimeCounter().addCountLocked(rxTimeMs);
+ mBluetoothActivity.getTxTimeCounters()[0].addCountLocked(txTimeMs);
+ mBluetoothActivity.getIdleTimeCounter().addCountLocked(idleTimeMs);
// POWER_BLUETOOTH_CONTROLLER_OPERATING_VOLTAGE is measured in mV, so convert to V.
final double opVolt = mPowerProfile.getAveragePower(
@@ -11405,8 +11529,10 @@
if (opVolt != 0) {
// We store the power drain as mAms.
mBluetoothActivity.getPowerCounter().addCountLocked(
- (long) (info.getControllerEnergyUsed() / opVolt));
+ (long) ((info.getControllerEnergyUsed() -
+ mLastBluetoothActivityEnergyInfo.getControllerEnergyUsed() )/ opVolt));
}
+ mLastBluetoothActivityEnergyInfo = info;
}
/**
@@ -12026,11 +12152,14 @@
// stats to be reported in the next checkin. Only do this if we have
// a sufficient amount of data to make it interesting.
if (getLowDischargeAmountSinceCharge() >= 20) {
+ final long startTime = SystemClock.uptimeMillis();
final Parcel parcel = Parcel.obtain();
writeSummaryToParcel(parcel, true);
+ final long initialTime = SystemClock.uptimeMillis() - startTime;
BackgroundThread.getHandler().post(new Runnable() {
@Override public void run() {
synchronized (mCheckinFile) {
+ final long startTime2 = SystemClock.uptimeMillis();
FileOutputStream stream = null;
try {
stream = mCheckinFile.startWrite();
@@ -12039,6 +12168,9 @@
FileUtils.sync(stream);
stream.close();
mCheckinFile.finishWrite(stream);
+ com.android.internal.logging.EventLogTags.writeCommitSysConfigFile(
+ "batterystats-checkin",
+ initialTime + SystemClock.uptimeMillis() - startTime2);
} catch (IOException e) {
Slog.w("BatteryStats",
"Error writing checkin battery statistics", e);
@@ -12167,7 +12299,7 @@
}
// This should probably be exposed in the API, though it's not critical
- public static final int BATTERY_PLUGGED_NONE = 0;
+ public static final int BATTERY_PLUGGED_NONE = OsProtoEnums.BATTERY_PLUGGED_NONE; // = 0
public void setBatteryStateLocked(final int status, final int health, final int plugType,
final int level, /* not final */ int temp, final int volt, final int chargeUAh,
@@ -13041,12 +13173,15 @@
mWriteLock.lock();
try {
+ final long startTime = SystemClock.uptimeMillis();
FileOutputStream stream = new FileOutputStream(mFile.chooseForWrite());
stream.write(next.marshall());
stream.flush();
FileUtils.sync(stream);
stream.close();
mFile.commit();
+ com.android.internal.logging.EventLogTags.writeCommitSysConfigFile(
+ "batterystats", SystemClock.uptimeMillis() - startTime);
} catch (IOException e) {
Slog.w("BatteryStats", "Error writing battery statistics", e);
mFile.rollback();
diff --git a/core/java/com/android/internal/os/PowerProfile.java b/core/java/com/android/internal/os/PowerProfile.java
index 240fc51..f4436d3 100644
--- a/core/java/com/android/internal/os/PowerProfile.java
+++ b/core/java/com/android/internal/os/PowerProfile.java
@@ -104,12 +104,18 @@
public static final String POWER_MODEM_CONTROLLER_OPERATING_VOLTAGE =
"modem.controller.voltage";
- /**
+ /**
* Power consumption when GPS is on.
*/
public static final String POWER_GPS_ON = "gps.on";
/**
+ * GPS power parameters based on signal quality
+ */
+ public static final String POWER_GPS_SIGNAL_QUALITY_BASED = "gps.signalqualitybased";
+ public static final String POWER_GPS_OPERATING_VOLTAGE = "gps.voltage";
+
+ /**
* Power consumption when Bluetooth driver is on.
* @deprecated
*/
diff --git a/core/java/com/android/internal/os/Zygote.java b/core/java/com/android/internal/os/Zygote.java
index 079ba0b..f9a2341 100644
--- a/core/java/com/android/internal/os/Zygote.java
+++ b/core/java/com/android/internal/os/Zygote.java
@@ -53,6 +53,8 @@
public static final int DISABLE_VERIFIER = 1 << 9;
/** Only use oat files located in /system. Otherwise use dex/jar/apk . */
public static final int ONLY_USE_SYSTEM_OAT_FILES = 1 << 10;
+ /** Do not enfore hidden API access restrictions. */
+ public static final int DISABLE_HIDDEN_API_CHECKS = 1 << 11;
/** No external storage should be mounted. */
public static final int MOUNT_EXTERNAL_NONE = IVold.REMOUNT_MODE_NONE;
@@ -156,6 +158,9 @@
*/
public static int forkSystemServer(int uid, int gid, int[] gids, int runtimeFlags,
int[][] rlimits, long permittedCapabilities, long effectiveCapabilities) {
+ // SystemServer is always allowed to use hidden APIs.
+ runtimeFlags |= DISABLE_HIDDEN_API_CHECKS;
+
VM_HOOKS.preFork();
// Resets nice priority for zygote process.
resetNicePriority();
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 2671f29..39279b5 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -98,6 +98,10 @@
private static final String SOCKET_NAME_ARG = "--socket-name=";
+ /* Dexopt flag to disable hidden API access checks when dexopting SystemServer.
+ * Must be kept in sync with com.android.server.pm.Installer. */
+ private static final int DEXOPT_DISABLE_HIDDEN_API_CHECKS = 1 << 10;
+
/**
* Used to pre-load resources.
*/
@@ -565,7 +569,10 @@
if (dexoptNeeded != DexFile.NO_DEXOPT_NEEDED) {
final String packageName = "*";
final String outputPath = null;
- final int dexFlags = 0;
+ // Dexopt with a flag which lifts restrictions on hidden API usage.
+ // Offending methods would otherwise be re-verified at runtime and
+ // we want to avoid the performance overhead of that.
+ final int dexFlags = DEXOPT_DISABLE_HIDDEN_API_CHECKS;
final String compilerFilter = systemServerFilter;
final String uuid = StorageManager.UUID_PRIVATE_INTERNAL;
final String seInfo = null;
@@ -576,7 +583,7 @@
installd.dexopt(classPathElement, Process.SYSTEM_UID, packageName,
instructionSet, dexoptNeeded, outputPath, dexFlags, compilerFilter,
uuid, classLoaderContext, seInfo, false /* downgrade */,
- targetSdkVersion);
+ targetSdkVersion, /*profileName*/ null);
} catch (RemoteException | ServiceSpecificException e) {
// Ignore (but log), we need this on the classpath for fallback mode.
Log.w(TAG, "Failed compiling classpath element for system server: "
diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl
index f5af80a..ebb5f9f 100644
--- a/core/java/com/android/internal/statusbar/IStatusBar.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl
@@ -35,6 +35,8 @@
void animateCollapsePanels();
void togglePanel();
+ void showChargingAnimation(int batteryLevel);
+
/**
* Notifies the status bar of a System UI visibility flag change.
*
diff --git a/core/java/com/android/internal/util/ObjectUtils.java b/core/java/com/android/internal/util/ObjectUtils.java
index 379602a..59e5a64 100644
--- a/core/java/com/android/internal/util/ObjectUtils.java
+++ b/core/java/com/android/internal/util/ObjectUtils.java
@@ -29,9 +29,6 @@
return a != null ? a : Preconditions.checkNotNull(b);
}
- /**
- * Compares two {@link Nullable} objects with {@code null} values considered the smallest
- */
public static <T extends Comparable> int compare(@Nullable T a, @Nullable T b) {
if (a != null) {
return (b != null) ? a.compareTo(b) : 1;
@@ -39,13 +36,4 @@
return (b != null) ? -1 : 0;
}
}
-
- /**
- * @return {@code null} if the given instance is not of the given calss, or the given
- * instance otherwise
- */
- @Nullable
- public static <S, T extends S> T castOrNull(@Nullable S instance, @NonNull Class<T> c) {
- return c.isInstance(instance) ? (T) instance : null;
- }
}
diff --git a/core/java/com/android/internal/view/IInputConnectionWrapper.java b/core/java/com/android/internal/view/IInputConnectionWrapper.java
index 28291ae..e08caa8 100644
--- a/core/java/com/android/internal/view/IInputConnectionWrapper.java
+++ b/core/java/com/android/internal/view/IInputConnectionWrapper.java
@@ -23,6 +23,7 @@
import android.annotation.Nullable;
import android.os.Bundle;
import android.os.Handler;
+import android.os.LocaleList;
import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
@@ -64,6 +65,7 @@
private static final int DO_REQUEST_UPDATE_CURSOR_ANCHOR_INFO = 140;
private static final int DO_CLOSE_CONNECTION = 150;
private static final int DO_COMMIT_CONTENT = 160;
+ private static final int DO_REPORT_LANGUAGE_HINT = 170;
@GuardedBy("mLock")
@Nullable
@@ -217,6 +219,10 @@
callback));
}
+ public void reportLanguageHint(@NonNull LocaleList languageHint) {
+ dispatchMessage(obtainMessageO(DO_REPORT_LANGUAGE_HINT, languageHint));
+ }
+
void dispatchMessage(Message msg) {
// If we are calling this from the main thread, then we can call
// right through. Otherwise, we need to send the message to the
@@ -577,6 +583,16 @@
}
return;
}
+ case DO_REPORT_LANGUAGE_HINT: {
+ final LocaleList languageHint = (LocaleList) msg.obj;
+ final InputConnection ic = getInputConnection();
+ if (ic == null || !isActive()) {
+ Log.w(TAG, "reportLanguageHint on inactive InputConnection");
+ return;
+ }
+ ic.reportLanguageHint(languageHint);
+ return;
+ }
}
Log.w(TAG, "Unhandled message code: " + msg.what);
}
diff --git a/core/java/com/android/internal/view/IInputContext.aidl b/core/java/com/android/internal/view/IInputContext.aidl
index c227991..e69a87ff 100644
--- a/core/java/com/android/internal/view/IInputContext.aidl
+++ b/core/java/com/android/internal/view/IInputContext.aidl
@@ -17,6 +17,7 @@
package com.android.internal.view;
import android.os.Bundle;
+import android.os.LocaleList;
import android.view.KeyEvent;
import android.view.inputmethod.CompletionInfo;
import android.view.inputmethod.CorrectionInfo;
@@ -78,4 +79,6 @@
void commitContent(in InputContentInfo inputContentInfo, int flags, in Bundle opts, int sec,
IInputContextCallback callback);
+
+ void reportLanguageHint(in LocaleList languageHint);
}
diff --git a/core/java/com/android/internal/view/InputConnectionWrapper.java b/core/java/com/android/internal/view/InputConnectionWrapper.java
index 5b65bbe..34be598 100644
--- a/core/java/com/android/internal/view/InputConnectionWrapper.java
+++ b/core/java/com/android/internal/view/InputConnectionWrapper.java
@@ -22,6 +22,7 @@
import android.inputmethodservice.AbstractInputMethodService;
import android.os.Bundle;
import android.os.Handler;
+import android.os.LocaleList;
import android.os.RemoteException;
import android.os.SystemClock;
import android.util.Log;
@@ -620,6 +621,14 @@
}
@AnyThread
+ public void reportLanguageHint(@NonNull LocaleList languageHint) {
+ try {
+ mIInputContext.reportLanguageHint(languageHint);
+ } catch (RemoteException e) {
+ }
+ }
+
+ @AnyThread
private boolean isMethodMissing(@MissingMethodFlags final int methodFlag) {
return (mMissingMethods & methodFlag) == methodFlag;
}
diff --git a/core/java/com/android/internal/view/menu/MenuPopupHelper.java b/core/java/com/android/internal/view/menu/MenuPopupHelper.java
index 6af41a5..324f923 100644
--- a/core/java/com/android/internal/view/menu/MenuPopupHelper.java
+++ b/core/java/com/android/internal/view/menu/MenuPopupHelper.java
@@ -256,7 +256,7 @@
final int hgrav = Gravity.getAbsoluteGravity(mDropDownGravity,
mAnchorView.getLayoutDirection()) & Gravity.HORIZONTAL_GRAVITY_MASK;
if (hgrav == Gravity.RIGHT) {
- xOffset += mAnchorView.getWidth();
+ xOffset -= mAnchorView.getWidth();
}
popup.setHorizontalOffset(xOffset);
diff --git a/core/java/com/android/internal/view/menu/StandardMenuPopup.java b/core/java/com/android/internal/view/menu/StandardMenuPopup.java
index d9ca5be..445379b 100644
--- a/core/java/com/android/internal/view/menu/StandardMenuPopup.java
+++ b/core/java/com/android/internal/view/menu/StandardMenuPopup.java
@@ -263,7 +263,6 @@
mShownAnchorView, mOverflowOnly, mPopupStyleAttr, mPopupStyleRes);
subPopup.setPresenterCallback(mPresenterCallback);
subPopup.setForceShowIcon(MenuPopup.shouldPreserveIconSpacing(subMenu));
- subPopup.setGravity(mDropDownGravity);
// Pass responsibility for handling onDismiss to the submenu.
subPopup.setOnDismissListener(mOnDismissListener);
@@ -273,8 +272,17 @@
mMenu.close(false /* closeAllMenus */);
// Show the new sub-menu popup at the same location as this popup.
- final int horizontalOffset = mPopup.getHorizontalOffset();
+ int horizontalOffset = mPopup.getHorizontalOffset();
final int verticalOffset = mPopup.getVerticalOffset();
+
+ // As xOffset of parent menu popup is subtracted with Anchor width for Gravity.RIGHT,
+ // So, again to display sub-menu popup in same xOffset, add the Anchor width.
+ final int hgrav = Gravity.getAbsoluteGravity(mDropDownGravity,
+ mAnchorView.getLayoutDirection()) & Gravity.HORIZONTAL_GRAVITY_MASK;
+ if (hgrav == Gravity.RIGHT) {
+ horizontalOffset += mAnchorView.getWidth();
+ }
+
if (subPopup.tryShow(horizontalOffset, verticalOffset)) {
if (mPresenterCallback != null) {
mPresenterCallback.onOpenSubMenu(subMenu);
diff --git a/core/java/com/android/internal/widget/ILockSettings.aidl b/core/java/com/android/internal/widget/ILockSettings.aidl
index 927d757..5673814 100644
--- a/core/java/com/android/internal/widget/ILockSettings.aidl
+++ b/core/java/com/android/internal/widget/ILockSettings.aidl
@@ -64,7 +64,7 @@
// {@code ServiceSpecificException} may be thrown to signal an error, which caller can
// convert to {@code RecoveryManagerException}.
void initRecoveryService(in String rootCertificateAlias, in byte[] signedPublicKeyList);
- KeyChainSnapshot getRecoveryData(in byte[] account);
+ KeyChainSnapshot getKeyChainSnapshot();
byte[] generateAndStoreKey(String alias);
void removeKey(String alias);
void setSnapshotCreatedPendingIntent(in PendingIntent intent);
diff --git a/core/java/com/android/internal/widget/ResolverDrawerLayout.java b/core/java/com/android/internal/widget/ResolverDrawerLayout.java
index 6f2246a..7635a72 100644
--- a/core/java/com/android/internal/widget/ResolverDrawerLayout.java
+++ b/core/java/com/android/internal/widget/ResolverDrawerLayout.java
@@ -22,7 +22,9 @@
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
+import android.graphics.Color;
import android.graphics.Rect;
+import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Parcel;
@@ -502,7 +504,7 @@
}
private void onCollapsedChanged(boolean isCollapsed) {
- notifyAccessibilityStateChanged(
+ notifyViewAccessibilityStateChangedIfNeeded(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
if (mScrollIndicatorDrawable != null) {
diff --git a/core/java/com/android/server/BootReceiver.java b/core/java/com/android/server/BootReceiver.java
index 8848e393..e3436e8 100644
--- a/core/java/com/android/server/BootReceiver.java
+++ b/core/java/com/android/server/BootReceiver.java
@@ -85,7 +85,7 @@
private static final String LOG_FILES_FILE = "log-files.xml";
private static final AtomicFile sFile = new AtomicFile(new File(
- Environment.getDataSystemDirectory(), LOG_FILES_FILE));
+ Environment.getDataSystemDirectory(), LOG_FILES_FILE), "log-files");
private static final String LAST_HEADER_FILE = "last-header.txt";
private static final File lastHeaderFile = new File(
Environment.getDataSystemDirectory(), LAST_HEADER_FILE);
diff --git a/core/java/com/android/server/SystemConfig.java b/core/java/com/android/server/SystemConfig.java
index c5af897..111934f 100644
--- a/core/java/com/android/server/SystemConfig.java
+++ b/core/java/com/android/server/SystemConfig.java
@@ -149,6 +149,9 @@
final ArrayMap<String, ArraySet<String>> mVendorPrivAppPermissions = new ArrayMap<>();
final ArrayMap<String, ArraySet<String>> mVendorPrivAppDenyPermissions = new ArrayMap<>();
+ final ArrayMap<String, ArraySet<String>> mProductPrivAppPermissions = new ArrayMap<>();
+ final ArrayMap<String, ArraySet<String>> mProductPrivAppDenyPermissions = new ArrayMap<>();
+
final ArrayMap<String, ArrayMap<String, Boolean>> mOemPermissions = new ArrayMap<>();
public static SystemConfig getInstance() {
@@ -240,6 +243,14 @@
return mVendorPrivAppDenyPermissions.get(packageName);
}
+ public ArraySet<String> getProductPrivAppPermissions(String packageName) {
+ return mProductPrivAppPermissions.get(packageName);
+ }
+
+ public ArraySet<String> getProductPrivAppDenyPermissions(String packageName) {
+ return mProductPrivAppDenyPermissions.get(packageName);
+ }
+
public Map<String, Boolean> getOemPermissions(String packageName) {
final Map<String, Boolean> oemPermissions = mOemPermissions.get(packageName);
if (oemPermissions != null) {
@@ -278,6 +289,14 @@
Environment.getOemDirectory(), "etc", "sysconfig"), oemPermissionFlag);
readPermissions(Environment.buildPath(
Environment.getOemDirectory(), "etc", "permissions"), oemPermissionFlag);
+
+ // Allow Product to customize system configs around libs, features, permissions and apps
+ int productPermissionFlag = ALLOW_LIBS | ALLOW_FEATURES | ALLOW_PERMISSIONS |
+ ALLOW_APP_CONFIGS | ALLOW_PRIVAPP_PERMISSIONS;
+ readPermissions(Environment.buildPath(
+ Environment.getProductDirectory(), "etc", "sysconfig"), productPermissionFlag);
+ readPermissions(Environment.buildPath(
+ Environment.getProductDirectory(), "etc", "permissions"), productPermissionFlag);
}
void readPermissions(File libraryDir, int permissionFlag) {
@@ -598,15 +617,20 @@
}
XmlUtils.skipCurrentTag(parser);
} else if ("privapp-permissions".equals(name) && allowPrivappPermissions) {
- // privapp permissions from system and vendor partitions are stored
+ // 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.
boolean vendor = permFile.toPath().startsWith(
Environment.getVendorDirectory().toPath());
+ boolean product = permFile.toPath().startsWith(
+ Environment.getProductDirectory().toPath());
if (vendor) {
readPrivAppPermissions(parser, mVendorPrivAppPermissions,
mVendorPrivAppDenyPermissions);
+ } else if (product) {
+ readPrivAppPermissions(parser, mProductPrivAppPermissions,
+ mProductPrivAppDenyPermissions);
} else {
readPrivAppPermissions(parser, mPrivAppPermissions,
mPrivAppDenyPermissions);
diff --git a/core/jni/Android.bp b/core/jni/Android.bp
index 543acc7..93f95c6 100644
--- a/core/jni/Android.bp
+++ b/core/jni/Android.bp
@@ -163,6 +163,7 @@
"android_media_AudioTrack.cpp",
"android_media_DeviceCallback.cpp",
"android_media_JetPlayer.cpp",
+ "android_media_MediaMetricsJNI.cpp",
"android_media_RemoteDisplay.cpp",
"android_media_ToneGenerator.cpp",
"android_hardware_Camera.cpp",
@@ -228,6 +229,8 @@
],
shared_libs: [
+ "libbpf",
+ "libnetdutils",
"libmemtrack",
"libandroidfw",
"libappfuse",
@@ -258,6 +261,7 @@
"libselinux",
"libicuuc",
"libmedia",
+ "libmediametrics",
"libaudioclient",
"libjpeg",
"libusbhost",
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index aa9a824..bf7a7794 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -973,6 +973,12 @@
addOption("--generate-debug-info");
}
+ // The mini-debug-info makes it possible to backtrace through JIT code.
+ if (property_get_bool("dalvik.vm.minidebuginfo", 0)) {
+ addOption("-Xcompiler-option");
+ addOption("--generate-mini-debug-info");
+ }
+
/*
* Retrieve the build fingerprint and provide it to the runtime. That way, ANR dumps will
* contain the fingerprint and can be parsed.
diff --git a/core/jni/android/graphics/AnimatedImageDrawable.cpp b/core/jni/android/graphics/AnimatedImageDrawable.cpp
index ec15cce..0e562c0 100644
--- a/core/jni/android/graphics/AnimatedImageDrawable.cpp
+++ b/core/jni/android/graphics/AnimatedImageDrawable.cpp
@@ -17,7 +17,9 @@
#include "GraphicsJNI.h"
#include "ImageDecoder.h"
#include "core_jni_helpers.h"
+#include "Utils.h"
+#include <hwui/AnimatedImageDrawable.h>
#include <hwui/Canvas.h>
#include <SkAndroidCodec.h>
#include <SkAnimatedImage.h>
@@ -27,10 +29,7 @@
using namespace android;
-struct AnimatedImageDrawable {
- sk_sp<SkAnimatedImage> mDrawable;
- SkPaint mPaint;
-};
+static jmethodID gAnimatedImageDrawable_postOnAnimationEndMethodID;
// Note: jpostProcess holds a handle to the ImageDecoder.
static jlong AnimatedImageDrawable_nCreate(JNIEnv* env, jobject /*clazz*/,
@@ -65,20 +64,21 @@
picture = recorder.finishRecordingAsPicture();
}
- std::unique_ptr<AnimatedImageDrawable> drawable(new AnimatedImageDrawable);
- drawable->mDrawable = SkAnimatedImage::Make(std::move(imageDecoder->mCodec),
- scaledSize, subset, std::move(picture));
- if (!drawable->mDrawable) {
+
+ sk_sp<SkAnimatedImage> animatedImg = SkAnimatedImage::Make(std::move(imageDecoder->mCodec),
+ scaledSize, subset,
+ std::move(picture));
+ if (!animatedImg) {
doThrowIOE(env, "Failed to create drawable");
return 0;
}
- drawable->mDrawable->start();
+ sk_sp<AnimatedImageDrawable> drawable(new AnimatedImageDrawable(animatedImg));
return reinterpret_cast<jlong>(drawable.release());
}
static void AnimatedImageDrawable_destruct(AnimatedImageDrawable* drawable) {
- delete drawable;
+ SkSafeUnref(drawable);
}
static jlong AnimatedImageDrawable_nGetNativeFinalizer(JNIEnv* /*env*/, jobject /*clazz*/) {
@@ -86,45 +86,84 @@
}
static jlong AnimatedImageDrawable_nDraw(JNIEnv* env, jobject /*clazz*/, jlong nativePtr,
- jlong canvasPtr, jlong msecs) {
+ jlong canvasPtr) {
auto* drawable = reinterpret_cast<AnimatedImageDrawable*>(nativePtr);
- double timeToNextUpdate = drawable->mDrawable->update(msecs);
auto* canvas = reinterpret_cast<Canvas*>(canvasPtr);
- canvas->drawAnimatedImage(drawable->mDrawable.get(), 0, 0, &drawable->mPaint);
- return (jlong) timeToNextUpdate;
+ return (jlong) canvas->drawAnimatedImage(drawable);
}
static void AnimatedImageDrawable_nSetAlpha(JNIEnv* env, jobject /*clazz*/, jlong nativePtr,
jint alpha) {
auto* drawable = reinterpret_cast<AnimatedImageDrawable*>(nativePtr);
- drawable->mPaint.setAlpha(alpha);
+ drawable->setStagingAlpha(alpha);
}
static jlong AnimatedImageDrawable_nGetAlpha(JNIEnv* env, jobject /*clazz*/, jlong nativePtr) {
auto* drawable = reinterpret_cast<AnimatedImageDrawable*>(nativePtr);
- return drawable->mPaint.getAlpha();
+ return drawable->getStagingAlpha();
}
static void AnimatedImageDrawable_nSetColorFilter(JNIEnv* env, jobject /*clazz*/, jlong nativePtr,
jlong nativeFilter) {
auto* drawable = reinterpret_cast<AnimatedImageDrawable*>(nativePtr);
auto* filter = reinterpret_cast<SkColorFilter*>(nativeFilter);
- drawable->mPaint.setColorFilter(sk_ref_sp(filter));
+ drawable->setStagingColorFilter(sk_ref_sp(filter));
}
static jboolean AnimatedImageDrawable_nIsRunning(JNIEnv* env, jobject /*clazz*/, jlong nativePtr) {
auto* drawable = reinterpret_cast<AnimatedImageDrawable*>(nativePtr);
- return drawable->mDrawable->isRunning();
+ return drawable->isRunning();
}
-static void AnimatedImageDrawable_nStart(JNIEnv* env, jobject /*clazz*/, jlong nativePtr) {
+// Java's NOT_RUNNING relies on this being -2.0.
+static_assert(SkAnimatedImage::kNotRunning == -2.0);
+
+static jboolean AnimatedImageDrawable_nStart(JNIEnv* env, jobject /*clazz*/, jlong nativePtr) {
auto* drawable = reinterpret_cast<AnimatedImageDrawable*>(nativePtr);
- drawable->mDrawable->start();
+ return drawable->start();
}
static void AnimatedImageDrawable_nStop(JNIEnv* env, jobject /*clazz*/, jlong nativePtr) {
auto* drawable = reinterpret_cast<AnimatedImageDrawable*>(nativePtr);
- drawable->mDrawable->stop();
+ drawable->stop();
+}
+
+// Java's LOOP_INFINITE relies on this being the same.
+static_assert(SkCodec::kRepetitionCountInfinite == -1);
+
+static void AnimatedImageDrawable_nSetLoopCount(JNIEnv* env, jobject /*clazz*/, jlong nativePtr,
+ jint loopCount) {
+ auto* drawable = reinterpret_cast<AnimatedImageDrawable*>(nativePtr);
+ drawable->setRepetitionCount(loopCount);
+}
+
+class JniAnimationEndListener : public OnAnimationEndListener {
+public:
+ JniAnimationEndListener(JNIEnv* env, jobject javaObject) {
+ LOG_ALWAYS_FATAL_IF(env->GetJavaVM(&mJvm) != JNI_OK);
+ mJavaObject = env->NewGlobalRef(javaObject);
+ }
+
+ ~JniAnimationEndListener() override {
+ auto* env = get_env_or_die(mJvm);
+ env->DeleteGlobalRef(mJavaObject);
+ }
+
+ void onAnimationEnd() override {
+ auto* env = get_env_or_die(mJvm);
+ env->CallVoidMethod(mJavaObject, gAnimatedImageDrawable_postOnAnimationEndMethodID);
+ }
+
+private:
+ JavaVM* mJvm;
+ jobject mJavaObject;
+};
+
+static void AnimatedImageDrawable_nSetOnAnimationEndListener(JNIEnv* env, jobject /*clazz*/,
+ jlong nativePtr, jobject jdrawable) {
+ auto* drawable = reinterpret_cast<AnimatedImageDrawable*>(nativePtr);
+ drawable->setOnAnimationEndListener(std::unique_ptr<OnAnimationEndListener>(
+ new JniAnimationEndListener(env, jdrawable)));
}
static long AnimatedImageDrawable_nNativeByteSize(JNIEnv* env, jobject /*clazz*/, jlong nativePtr) {
@@ -136,17 +175,22 @@
static const JNINativeMethod gAnimatedImageDrawableMethods[] = {
{ "nCreate", "(JLandroid/graphics/ImageDecoder;IILandroid/graphics/Rect;)J", (void*) AnimatedImageDrawable_nCreate },
{ "nGetNativeFinalizer", "()J", (void*) AnimatedImageDrawable_nGetNativeFinalizer },
- { "nDraw", "(JJJ)J", (void*) AnimatedImageDrawable_nDraw },
+ { "nDraw", "(JJ)J", (void*) AnimatedImageDrawable_nDraw },
{ "nSetAlpha", "(JI)V", (void*) AnimatedImageDrawable_nSetAlpha },
{ "nGetAlpha", "(J)I", (void*) AnimatedImageDrawable_nGetAlpha },
{ "nSetColorFilter", "(JJ)V", (void*) AnimatedImageDrawable_nSetColorFilter },
{ "nIsRunning", "(J)Z", (void*) AnimatedImageDrawable_nIsRunning },
- { "nStart", "(J)V", (void*) AnimatedImageDrawable_nStart },
+ { "nStart", "(J)Z", (void*) AnimatedImageDrawable_nStart },
{ "nStop", "(J)V", (void*) AnimatedImageDrawable_nStop },
+ { "nSetLoopCount", "(JI)V", (void*) AnimatedImageDrawable_nSetLoopCount },
+ { "nSetOnAnimationEndListener", "(JLandroid/graphics/drawable/AnimatedImageDrawable;)V", (void*) AnimatedImageDrawable_nSetOnAnimationEndListener },
{ "nNativeByteSize", "(J)J", (void*) AnimatedImageDrawable_nNativeByteSize },
};
int register_android_graphics_drawable_AnimatedImageDrawable(JNIEnv* env) {
+ jclass animatedImageDrawable_class = FindClassOrDie(env, "android/graphics/drawable/AnimatedImageDrawable");
+ gAnimatedImageDrawable_postOnAnimationEndMethodID = GetMethodIDOrDie(env, animatedImageDrawable_class, "postOnAnimationEnd", "()V");
+
return android::RegisterMethodsOrDie(env, "android/graphics/drawable/AnimatedImageDrawable",
gAnimatedImageDrawableMethods, NELEM(gAnimatedImageDrawableMethods));
}
diff --git a/core/jni/android/graphics/ByteBufferStreamAdaptor.cpp b/core/jni/android/graphics/ByteBufferStreamAdaptor.cpp
index 85c9ef3..173818b 100644
--- a/core/jni/android/graphics/ByteBufferStreamAdaptor.cpp
+++ b/core/jni/android/graphics/ByteBufferStreamAdaptor.cpp
@@ -1,5 +1,6 @@
#include "ByteBufferStreamAdaptor.h"
#include "core_jni_helpers.h"
+#include "Utils.h"
#include <SkStream.h>
@@ -8,14 +9,6 @@
static jmethodID gByteBuffer_getMethodID;
static jmethodID gByteBuffer_setPositionMethodID;
-static JNIEnv* get_env_or_die(JavaVM* jvm) {
- JNIEnv* env;
- if (jvm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
- LOG_ALWAYS_FATAL("Failed to get JNIEnv for JavaVM: %p", jvm);
- }
- return env;
-}
-
class ByteBufferStream : public SkStreamAsset {
private:
ByteBufferStream(JavaVM* jvm, jobject jbyteBuffer, size_t initialPosition, size_t length,
diff --git a/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp b/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp
index 4257c98..7a9fea7 100644
--- a/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp
+++ b/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp
@@ -12,15 +12,6 @@
static jmethodID gInputStream_readMethodID;
static jmethodID gInputStream_skipMethodID;
-// FIXME: Share with ByteBufferStreamAdaptor.cpp?
-static JNIEnv* get_env_or_die(JavaVM* jvm) {
- JNIEnv* env;
- if (jvm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
- LOG_ALWAYS_FATAL("Failed to get JNIEnv for JavaVM: %p", jvm);
- }
- return env;
-}
-
/**
* Wrapper for a Java InputStream.
*/
@@ -57,13 +48,13 @@
}
~JavaInputStreamAdaptor() override {
- auto* env = get_env_or_die(fJvm);
+ auto* env = android::get_env_or_die(fJvm);
env->DeleteGlobalRef(fJavaInputStream);
env->DeleteGlobalRef(fJavaByteArray);
}
size_t read(void* buffer, size_t size) override {
- auto* env = get_env_or_die(fJvm);
+ auto* env = android::get_env_or_die(fJvm);
if (!fSwallowExceptions && checkException(env)) {
// Just in case the caller did not clear from a previous exception.
return 0;
diff --git a/core/jni/android/graphics/Paint.cpp b/core/jni/android/graphics/Paint.cpp
index 1e7f5f5..115d0d5 100644
--- a/core/jni/android/graphics/Paint.cpp
+++ b/core/jni/android/graphics/Paint.cpp
@@ -24,6 +24,7 @@
#include "core_jni_helpers.h"
#include <nativehelper/ScopedStringChars.h>
#include <nativehelper/ScopedUtfChars.h>
+#include <nativehelper/ScopedPrimitiveArray.h>
#include "SkBlurDrawLooper.h"
#include "SkColorFilter.h"
@@ -307,7 +308,8 @@
static void getTextPath(JNIEnv* env, Paint* paint, const Typeface* typeface, const jchar* text,
jint count, jint bidiFlags, jfloat x, jfloat y, SkPath* path) {
minikin::Layout layout = MinikinUtils::doLayout(
- paint, static_cast<minikin::Bidi>(bidiFlags), typeface, text, 0, count, count);
+ paint, static_cast<minikin::Bidi>(bidiFlags), typeface, text, 0, count, count,
+ nullptr, 0);
size_t nGlyphs = layout.nGlyphs();
uint16_t* glyphs = new uint16_t[nGlyphs];
SkPoint* pos = new SkPoint[nGlyphs];
@@ -349,7 +351,8 @@
SkIRect ir;
minikin::Layout layout = MinikinUtils::doLayout(&paint,
- static_cast<minikin::Bidi>(bidiFlags), typeface, text, 0, count, count);
+ static_cast<minikin::Bidi>(bidiFlags), typeface, text, 0, count, count, nullptr,
+ 0);
minikin::MinikinRect rect;
layout.getBounds(&rect);
r.fLeft = rect.mLeft;
@@ -465,7 +468,7 @@
}
minikin::Layout layout = MinikinUtils::doLayout(paint,
static_cast<minikin::Bidi>(bidiFlags), typeface, str.get(), 0, str.size(),
- str.size());
+ str.size(), nullptr, 0);
size_t nGlyphs = countNonSpaceGlyphs(layout);
if (nGlyphs != 1 && nChars > 1) {
// multiple-character input, and was not a ligature
@@ -485,7 +488,8 @@
// U+1F1FF (REGIONAL INDICATOR SYMBOL LETTER Z) is \uD83C\uDDFF in UTF16.
static const jchar ZZ_FLAG_STR[] = { 0xD83C, 0xDDFF, 0xD83C, 0xDDFF };
minikin::Layout zzLayout = MinikinUtils::doLayout(paint,
- static_cast<minikin::Bidi>(bidiFlags), typeface, ZZ_FLAG_STR, 0, 4, 4);
+ static_cast<minikin::Bidi>(bidiFlags), typeface, ZZ_FLAG_STR, 0, 4, 4,
+ nullptr, 0);
if (zzLayout.nGlyphs() != 1 || layoutContainsNotdef(zzLayout)) {
// The font collection doesn't have a glyph for unknown flag. Just return true.
return true;
@@ -512,11 +516,10 @@
jint start, jint end, jint contextStart, jint contextEnd, jboolean isRtl, jint offset) {
const Paint* paint = reinterpret_cast<Paint*>(paintHandle);
const Typeface* typeface = paint->getAndroidTypeface();
- jchar* textArray = (jchar*) env->GetPrimitiveArrayCritical(text, nullptr);
- jfloat result = doRunAdvance(paint, typeface, textArray + contextStart,
+ ScopedCharArrayRO textArray(env, text);
+ jfloat result = doRunAdvance(paint, typeface, textArray.get() + contextStart,
start - contextStart, end - start, contextEnd - contextStart, isRtl,
offset - contextStart);
- env->ReleasePrimitiveArrayCritical(text, textArray, JNI_ABORT);
return result;
}
@@ -534,11 +537,10 @@
jboolean isRtl, jfloat advance) {
const Paint* paint = reinterpret_cast<Paint*>(paintHandle);
const Typeface* typeface = paint->getAndroidTypeface();
- jchar* textArray = (jchar*) env->GetPrimitiveArrayCritical(text, nullptr);
- jint result = doOffsetForAdvance(paint, typeface, textArray + contextStart,
+ ScopedCharArrayRO textArray(env, text);
+ jint result = doOffsetForAdvance(paint, typeface, textArray.get() + contextStart,
start - contextStart, end - start, contextEnd - contextStart, isRtl, advance);
result += contextStart;
- env->ReleasePrimitiveArrayCritical(text, textArray, JNI_ABORT);
return result;
}
diff --git a/core/jni/android/graphics/Utils.cpp b/core/jni/android/graphics/Utils.cpp
index 630220a..dd9bafe 100644
--- a/core/jni/android/graphics/Utils.cpp
+++ b/core/jni/android/graphics/Utils.cpp
@@ -117,3 +117,11 @@
bool android::isSeekable(int descriptor) {
return ::lseek64(descriptor, 0, SEEK_CUR) != -1;
}
+
+JNIEnv* android::get_env_or_die(JavaVM* jvm) {
+ JNIEnv* env;
+ if (jvm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
+ LOG_ALWAYS_FATAL("Failed to get JNIEnv for JavaVM: %p", jvm);
+ }
+ return env;
+}
diff --git a/core/jni/android/graphics/Utils.h b/core/jni/android/graphics/Utils.h
index 69930a5..2f2ee96 100644
--- a/core/jni/android/graphics/Utils.h
+++ b/core/jni/android/graphics/Utils.h
@@ -74,6 +74,8 @@
*/
bool isSeekable(int descriptor);
+JNIEnv* get_env_or_die(JavaVM* jvm);
+
}; // namespace android
#endif // _ANDROID_GRAPHICS_UTILS_H_
diff --git a/core/jni/android_database_CursorWindow.cpp b/core/jni/android_database_CursorWindow.cpp
index 0d09b56..86cda44 100644
--- a/core/jni/android_database_CursorWindow.cpp
+++ b/core/jni/android_database_CursorWindow.cpp
@@ -519,8 +519,21 @@
(void*)nativeDispose },
{ "nativeWriteToParcel", "(JLandroid/os/Parcel;)V",
(void*)nativeWriteToParcel },
+
{ "nativeGetName", "(J)Ljava/lang/String;",
(void*)nativeGetName },
+ { "nativeGetBlob", "(JII)[B",
+ (void*)nativeGetBlob },
+ { "nativeGetString", "(JII)Ljava/lang/String;",
+ (void*)nativeGetString },
+ { "nativeCopyStringToBuffer", "(JIILandroid/database/CharArrayBuffer;)V",
+ (void*)nativeCopyStringToBuffer },
+ { "nativePutBlob", "(J[BII)Z",
+ (void*)nativePutBlob },
+ { "nativePutString", "(JLjava/lang/String;II)Z",
+ (void*)nativePutString },
+
+ // ------- @FastNative below here ----------------------
{ "nativeClear", "(J)V",
(void*)nativeClear },
{ "nativeGetNumRows", "(J)I",
@@ -533,20 +546,11 @@
(void*)nativeFreeLastRow },
{ "nativeGetType", "(JII)I",
(void*)nativeGetType },
- { "nativeGetBlob", "(JII)[B",
- (void*)nativeGetBlob },
- { "nativeGetString", "(JII)Ljava/lang/String;",
- (void*)nativeGetString },
{ "nativeGetLong", "(JII)J",
(void*)nativeGetLong },
{ "nativeGetDouble", "(JII)D",
(void*)nativeGetDouble },
- { "nativeCopyStringToBuffer", "(JIILandroid/database/CharArrayBuffer;)V",
- (void*)nativeCopyStringToBuffer },
- { "nativePutBlob", "(J[BII)Z",
- (void*)nativePutBlob },
- { "nativePutString", "(JLjava/lang/String;II)Z",
- (void*)nativePutString },
+
{ "nativePutLong", "(JJII)Z",
(void*)nativePutLong },
{ "nativePutDouble", "(JDII)Z",
diff --git a/core/jni/android_graphics_Canvas.cpp b/core/jni/android_graphics_Canvas.cpp
index f08b89c..6b961f5 100644
--- a/core/jni/android_graphics_Canvas.cpp
+++ b/core/jni/android_graphics_Canvas.cpp
@@ -30,6 +30,10 @@
#include "SkRegion.h"
#include "SkVertices.h"
+namespace minikin {
+class MeasuredText;
+} // namespace minikin
+
namespace android {
namespace CanvasJNI {
@@ -480,7 +484,7 @@
const Typeface* typeface = paint->getAndroidTypeface();
jchar* jchars = env->GetCharArrayElements(text, NULL);
get_canvas(canvasHandle)->drawText(jchars + index, 0, count, count, x, y,
- static_cast<minikin::Bidi>(bidiFlags), *paint, typeface);
+ static_cast<minikin::Bidi>(bidiFlags), *paint, typeface, nullptr, 0);
env->ReleaseCharArrayElements(text, jchars, JNI_ABORT);
}
@@ -492,20 +496,22 @@
const int count = end - start;
const jchar* jchars = env->GetStringChars(text, NULL);
get_canvas(canvasHandle)->drawText(jchars + start, 0, count, count, x, y,
- static_cast<minikin::Bidi>(bidiFlags), *paint, typeface);
+ static_cast<minikin::Bidi>(bidiFlags), *paint, typeface, nullptr, 0);
env->ReleaseStringChars(text, jchars);
}
static void drawTextRunChars(JNIEnv* env, jobject, jlong canvasHandle, jcharArray text, jint index,
jint count, jint contextIndex, jint contextCount, jfloat x, jfloat y,
- jboolean isRtl, jlong paintHandle) {
+ jboolean isRtl, jlong paintHandle, jlong mtHandle, jint mtOffset) {
Paint* paint = reinterpret_cast<Paint*>(paintHandle);
+ minikin::MeasuredText* mt = reinterpret_cast<minikin::MeasuredText*>(mtHandle);
const Typeface* typeface = paint->getAndroidTypeface();
const minikin::Bidi bidiFlags = isRtl ? minikin::Bidi::FORCE_RTL : minikin::Bidi::FORCE_LTR;
jchar* jchars = env->GetCharArrayElements(text, NULL);
get_canvas(canvasHandle)->drawText(jchars + contextIndex, index - contextIndex, count,
- contextCount, x, y, bidiFlags, *paint, typeface);
+ contextCount, x, y, bidiFlags, *paint, typeface, mt,
+ mtOffset);
env->ReleaseCharArrayElements(text, jchars, JNI_ABORT);
}
@@ -520,7 +526,7 @@
jint contextCount = contextEnd - contextStart;
const jchar* jchars = env->GetStringChars(text, NULL);
get_canvas(canvasHandle)->drawText(jchars + contextStart, start - contextStart, count,
- contextCount, x, y, bidiFlags, *paint, typeface);
+ contextCount, x, y, bidiFlags, *paint, typeface, nullptr, 0);
env->ReleaseStringChars(text, jchars);
}
@@ -628,7 +634,7 @@
{"nDrawBitmap", "(J[IIIFFIIZJ)V", (void*)CanvasJNI::drawBitmapArray},
{"nDrawText","(J[CIIFFIJ)V", (void*) CanvasJNI::drawTextChars},
{"nDrawText","(JLjava/lang/String;IIFFIJ)V", (void*) CanvasJNI::drawTextString},
- {"nDrawTextRun","(J[CIIIIFFZJ)V", (void*) CanvasJNI::drawTextRunChars},
+ {"nDrawTextRun","(J[CIIIIFFZJJI)V", (void*) CanvasJNI::drawTextRunChars},
{"nDrawTextRun","(JLjava/lang/String;IIIIFFZJ)V", (void*) CanvasJNI::drawTextRunString},
{"nDrawTextOnPath","(J[CIIJFFIJ)V", (void*) CanvasJNI::drawTextOnPathChars},
{"nDrawTextOnPath","(JLjava/lang/String;JFFIJ)V", (void*) CanvasJNI::drawTextOnPathString},
diff --git a/core/jni/android_media_AudioRecord.cpp b/core/jni/android_media_AudioRecord.cpp
index e4da3c6..ebd16c7 100644
--- a/core/jni/android_media_AudioRecord.cpp
+++ b/core/jni/android_media_AudioRecord.cpp
@@ -31,6 +31,7 @@
#include "android_media_AudioFormat.h"
#include "android_media_AudioErrors.h"
#include "android_media_DeviceCallback.h"
+#include "android_media_MediaMetricsJNI.h"
// ----------------------------------------------------------------------------
@@ -751,6 +752,39 @@
}
// ----------------------------------------------------------------------------
+static jobject
+android_media_AudioRecord_native_getMetrics(JNIEnv *env, jobject thiz)
+{
+ ALOGV("android_media_AudioRecord_native_getMetrics");
+
+ sp<AudioRecord> lpRecord = getAudioRecord(env, thiz);
+
+ if (lpRecord == NULL) {
+ ALOGE("Unable to retrieve AudioRecord pointer for getMetrics()");
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return (jobject) NULL;
+ }
+
+ // get what we have for the metrics from the record session
+ MediaAnalyticsItem *item = NULL;
+
+ status_t err = lpRecord->getMetrics(item);
+ if (err != OK) {
+ ALOGE("getMetrics failed");
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return (jobject) NULL;
+ }
+
+ jobject mybundle = MediaMetricsJNI::writeMetricsToBundle(env, item, NULL /* mybundle */);
+
+ // housekeeping
+ delete item;
+ item = NULL;
+
+ return mybundle;
+}
+
+// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
static const JNINativeMethod gMethods[] = {
// name, signature, funcPtr
@@ -781,6 +815,8 @@
"()I", (void *)android_media_AudioRecord_get_pos_update_period},
{"native_get_min_buff_size",
"(III)I", (void *)android_media_AudioRecord_get_min_buff_size},
+ {"native_getMetrics", "()Landroid/os/PersistableBundle;",
+ (void *)android_media_AudioRecord_native_getMetrics},
{"native_setInputDevice", "(I)Z", (void *)android_media_AudioRecord_setInputDevice},
{"native_getRoutedDeviceId", "()I", (void *)android_media_AudioRecord_getRoutedDeviceId},
{"native_enableDeviceCallback", "()V", (void *)android_media_AudioRecord_enableDeviceCallback},
diff --git a/core/jni/android_media_AudioSystem.cpp b/core/jni/android_media_AudioSystem.cpp
index 2be9471..376a797 100644
--- a/core/jni/android_media_AudioSystem.cpp
+++ b/core/jni/android_media_AudioSystem.cpp
@@ -608,9 +608,10 @@
}
static jint
-android_media_AudioSystem_setLowRamDevice(JNIEnv *env, jobject clazz, jboolean isLowRamDevice)
+android_media_AudioSystem_setLowRamDevice(
+ JNIEnv *env, jobject clazz, jboolean isLowRamDevice, jlong totalMemory)
{
- return (jint) AudioSystem::setLowRamDevice((bool) isLowRamDevice);
+ return (jint) AudioSystem::setLowRamDevice((bool) isLowRamDevice, (int64_t) totalMemory);
}
static jint
@@ -1819,7 +1820,7 @@
{"getPrimaryOutputSamplingRate", "()I", (void *)android_media_AudioSystem_getPrimaryOutputSamplingRate},
{"getPrimaryOutputFrameCount", "()I", (void *)android_media_AudioSystem_getPrimaryOutputFrameCount},
{"getOutputLatency", "(I)I", (void *)android_media_AudioSystem_getOutputLatency},
- {"setLowRamDevice", "(Z)I", (void *)android_media_AudioSystem_setLowRamDevice},
+ {"setLowRamDevice", "(ZJ)I", (void *)android_media_AudioSystem_setLowRamDevice},
{"checkAudioFlinger", "()I", (void *)android_media_AudioSystem_checkAudioFlinger},
{"listAudioPorts", "(Ljava/util/ArrayList;[I)I",
(void *)android_media_AudioSystem_listAudioPorts},
diff --git a/core/jni/android_media_AudioTrack.cpp b/core/jni/android_media_AudioTrack.cpp
index 11011b1..afbc579 100644
--- a/core/jni/android_media_AudioTrack.cpp
+++ b/core/jni/android_media_AudioTrack.cpp
@@ -34,6 +34,7 @@
#include "android_media_AudioFormat.h"
#include "android_media_AudioErrors.h"
+#include "android_media_MediaMetricsJNI.h"
#include "android_media_PlaybackParams.h"
#include "android_media_DeviceCallback.h"
#include "android_media_VolumeShaper.h"
@@ -1011,6 +1012,39 @@
return (jint) nativeToJavaStatus(status);
}
+// ----------------------------------------------------------------------------
+static jobject
+android_media_AudioTrack_native_getMetrics(JNIEnv *env, jobject thiz)
+{
+ ALOGD("android_media_AudioTrack_native_getMetrics");
+
+ sp<AudioTrack> lpTrack = getAudioTrack(env, thiz);
+
+ if (lpTrack == NULL) {
+ ALOGE("Unable to retrieve AudioTrack pointer for getMetrics()");
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return (jobject) NULL;
+ }
+
+ // get what we have for the metrics from the track
+ MediaAnalyticsItem *item = NULL;
+
+ status_t err = lpTrack->getMetrics(item);
+ if (err != OK) {
+ ALOGE("getMetrics failed");
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return (jobject) NULL;
+ }
+
+ jobject mybundle = MediaMetricsJNI::writeMetricsToBundle(env, item, NULL /* mybundle */);
+
+ // housekeeping
+ delete item;
+ item = NULL;
+
+ return mybundle;
+}
+
// ----------------------------------------------------------------------------
static jint android_media_AudioTrack_set_loop(JNIEnv *env, jobject thiz,
@@ -1275,6 +1309,8 @@
{"native_get_underrun_count", "()I", (void *)android_media_AudioTrack_get_underrun_count},
{"native_get_flags", "()I", (void *)android_media_AudioTrack_get_flags},
{"native_get_timestamp", "([J)I", (void *)android_media_AudioTrack_get_timestamp},
+ {"native_getMetrics", "()Landroid/os/PersistableBundle;",
+ (void *)android_media_AudioTrack_native_getMetrics},
{"native_set_loop", "(III)I", (void *)android_media_AudioTrack_set_loop},
{"native_reload_static", "()I", (void *)android_media_AudioTrack_reload},
{"native_get_output_sample_rate",
diff --git a/media/jni/android_media_MediaMetricsJNI.cpp b/core/jni/android_media_MediaMetricsJNI.cpp
similarity index 100%
rename from media/jni/android_media_MediaMetricsJNI.cpp
rename to core/jni/android_media_MediaMetricsJNI.cpp
diff --git a/media/jni/android_media_MediaMetricsJNI.h b/core/jni/android_media_MediaMetricsJNI.h
similarity index 100%
rename from media/jni/android_media_MediaMetricsJNI.h
rename to core/jni/android_media_MediaMetricsJNI.h
diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp
index b9ff0a7..bf183cc 100644
--- a/core/jni/android_os_Debug.cpp
+++ b/core/jni/android_os_Debug.cpp
@@ -107,6 +107,7 @@
struct stat_fields {
jfieldID pss_field;
jfieldID pssSwappable_field;
+ jfieldID rss_field;
jfieldID privateDirty_field;
jfieldID sharedDirty_field;
jfieldID privateClean_field;
@@ -118,6 +119,7 @@
struct stat_field_names {
const char* pss_name;
const char* pssSwappable_name;
+ const char* rss_name;
const char* privateDirty_name;
const char* sharedDirty_name;
const char* privateClean_name;
@@ -129,11 +131,11 @@
static stat_fields stat_fields[_NUM_CORE_HEAP];
static stat_field_names stat_field_names[_NUM_CORE_HEAP] = {
- { "otherPss", "otherSwappablePss", "otherPrivateDirty", "otherSharedDirty",
+ { "otherPss", "otherSwappablePss", "otherRss", "otherPrivateDirty", "otherSharedDirty",
"otherPrivateClean", "otherSharedClean", "otherSwappedOut", "otherSwappedOutPss" },
- { "dalvikPss", "dalvikSwappablePss", "dalvikPrivateDirty", "dalvikSharedDirty",
+ { "dalvikPss", "dalvikSwappablePss", "dalvikRss", "dalvikPrivateDirty", "dalvikSharedDirty",
"dalvikPrivateClean", "dalvikSharedClean", "dalvikSwappedOut", "dalvikSwappedOutPss" },
- { "nativePss", "nativeSwappablePss", "nativePrivateDirty", "nativeSharedDirty",
+ { "nativePss", "nativeSwappablePss", "nativeRss", "nativePrivateDirty", "nativeSharedDirty",
"nativePrivateClean", "nativeSharedClean", "nativeSwappedOut", "nativeSwappedOutPss" }
};
@@ -143,6 +145,7 @@
struct stats_t {
int pss;
int swappablePss;
+ int rss;
int privateDirty;
int sharedDirty;
int privateClean;
@@ -246,7 +249,7 @@
int len, nameLen;
bool skip, done = false;
- unsigned pss = 0, swappable_pss = 0;
+ unsigned pss = 0, swappable_pss = 0, rss = 0;
float sharing_proportion = 0.0;
unsigned shared_clean = 0, shared_dirty = 0;
unsigned private_clean = 0, private_dirty = 0;
@@ -412,7 +415,7 @@
if (line[0] == 'S' && sscanf(line, "Size: %d kB", &temp) == 1) {
/* size = temp; */
} else if (line[0] == 'R' && sscanf(line, "Rss: %d kB", &temp) == 1) {
- /* resident = temp; */
+ rss = temp;
} else if (line[0] == 'P' && sscanf(line, "Pss: %d kB", &temp) == 1) {
pss = temp;
} else if (line[0] == 'S' && sscanf(line, "Shared_Clean: %d kB", &temp) == 1) {
@@ -450,6 +453,7 @@
stats[whichHeap].pss += pss;
stats[whichHeap].swappablePss += swappable_pss;
+ stats[whichHeap].rss += rss;
stats[whichHeap].privateDirty += private_dirty;
stats[whichHeap].sharedDirty += shared_dirty;
stats[whichHeap].privateClean += private_clean;
@@ -460,6 +464,7 @@
whichHeap == HEAP_DEX || whichHeap == HEAP_ART) {
stats[subHeap].pss += pss;
stats[subHeap].swappablePss += swappable_pss;
+ stats[subHeap].rss += rss;
stats[subHeap].privateDirty += private_dirty;
stats[subHeap].sharedDirty += shared_dirty;
stats[subHeap].privateClean += private_clean;
@@ -495,15 +500,19 @@
if (read_memtrack_memory(pid, &graphics_mem) == 0) {
stats[HEAP_GRAPHICS].pss = graphics_mem.graphics;
stats[HEAP_GRAPHICS].privateDirty = graphics_mem.graphics;
+ stats[HEAP_GRAPHICS].rss = graphics_mem.graphics;
stats[HEAP_GL].pss = graphics_mem.gl;
stats[HEAP_GL].privateDirty = graphics_mem.gl;
+ stats[HEAP_GL].rss = graphics_mem.gl;
stats[HEAP_OTHER_MEMTRACK].pss = graphics_mem.other;
stats[HEAP_OTHER_MEMTRACK].privateDirty = graphics_mem.other;
+ stats[HEAP_OTHER_MEMTRACK].rss = graphics_mem.other;
}
for (int i=_NUM_CORE_HEAP; i<_NUM_EXCLUSIVE_HEAP; i++) {
stats[HEAP_UNKNOWN].pss += stats[i].pss;
stats[HEAP_UNKNOWN].swappablePss += stats[i].swappablePss;
+ stats[HEAP_UNKNOWN].rss += stats[i].rss;
stats[HEAP_UNKNOWN].privateDirty += stats[i].privateDirty;
stats[HEAP_UNKNOWN].sharedDirty += stats[i].sharedDirty;
stats[HEAP_UNKNOWN].privateClean += stats[i].privateClean;
@@ -515,6 +524,7 @@
for (int i=0; i<_NUM_CORE_HEAP; i++) {
env->SetIntField(object, stat_fields[i].pss_field, stats[i].pss);
env->SetIntField(object, stat_fields[i].pssSwappable_field, stats[i].swappablePss);
+ env->SetIntField(object, stat_fields[i].rss_field, stats[i].rss);
env->SetIntField(object, stat_fields[i].privateDirty_field, stats[i].privateDirty);
env->SetIntField(object, stat_fields[i].sharedDirty_field, stats[i].sharedDirty);
env->SetIntField(object, stat_fields[i].privateClean_field, stats[i].privateClean);
@@ -536,6 +546,7 @@
for (int i=_NUM_CORE_HEAP; i<_NUM_HEAP; i++) {
otherArray[j++] = stats[i].pss;
otherArray[j++] = stats[i].swappablePss;
+ otherArray[j++] = stats[i].rss;
otherArray[j++] = stats[i].privateDirty;
otherArray[j++] = stats[i].sharedDirty;
otherArray[j++] = stats[i].privateClean;
@@ -580,10 +591,11 @@
}
static jlong android_os_Debug_getPssPid(JNIEnv *env, jobject clazz, jint pid,
- jlongArray outUssSwapPss, jlongArray outMemtrack)
+ jlongArray outUssSwapPssRss, jlongArray outMemtrack)
{
- char line[1024];
+ char lineBuffer[1024];
jlong pss = 0;
+ jlong rss = 0;
jlong swapPss = 0;
jlong uss = 0;
jlong memtrack = 0;
@@ -597,50 +609,70 @@
UniqueFile fp = OpenSmapsOrRollup(pid);
if (fp != nullptr) {
+ char* line;
+
while (true) {
- if (fgets(line, sizeof (line), fp.get()) == NULL) {
+ if (fgets(lineBuffer, sizeof (lineBuffer), fp.get()) == NULL) {
break;
}
+ line = lineBuffer;
- if (line[0] == 'P') {
- if (strncmp(line, "Pss:", 4) == 0) {
- char* c = line + 4;
- while (*c != 0 && (*c < '0' || *c > '9')) {
- c++;
+ switch (line[0]) {
+ case 'P':
+ if (strncmp(line, "Pss:", 4) == 0) {
+ char* c = line + 4;
+ while (*c != 0 && (*c < '0' || *c > '9')) {
+ c++;
+ }
+ pss += atoi(c);
+ } else if (strncmp(line, "Private_Clean:", 14) == 0
+ || strncmp(line, "Private_Dirty:", 14) == 0) {
+ char* c = line + 14;
+ while (*c != 0 && (*c < '0' || *c > '9')) {
+ c++;
+ }
+ uss += atoi(c);
}
- pss += atoi(c);
- } else if (strncmp(line, "Private_Clean:", 14) == 0
- || strncmp(line, "Private_Dirty:", 14) == 0) {
- char* c = line + 14;
- while (*c != 0 && (*c < '0' || *c > '9')) {
- c++;
+ break;
+ case 'R':
+ if (strncmp(line, "Rss:", 4) == 0) {
+ char* c = line + 4;
+ while (*c != 0 && (*c < '0' || *c > '9')) {
+ c++;
+ }
+ rss += atoi(c);
}
- uss += atoi(c);
- }
- } else if (line[0] == 'S' && strncmp(line, "SwapPss:", 8) == 0) {
- char* c = line + 8;
- jlong lSwapPss;
- while (*c != 0 && (*c < '0' || *c > '9')) {
- c++;
- }
- lSwapPss = atoi(c);
- swapPss += lSwapPss;
- pss += lSwapPss; // Also in swap, those pages would be accounted as Pss without SWAP
+ break;
+ case 'S':
+ if (strncmp(line, "SwapPss:", 8) == 0) {
+ char* c = line + 8;
+ jlong lSwapPss;
+ while (*c != 0 && (*c < '0' || *c > '9')) {
+ c++;
+ }
+ lSwapPss = atoi(c);
+ swapPss += lSwapPss;
+ pss += lSwapPss; // Also in swap, those pages would be accounted as Pss without SWAP
+ }
+ break;
}
}
}
}
- if (outUssSwapPss != NULL) {
- if (env->GetArrayLength(outUssSwapPss) >= 1) {
- jlong* outUssSwapPssArray = env->GetLongArrayElements(outUssSwapPss, 0);
- if (outUssSwapPssArray != NULL) {
- outUssSwapPssArray[0] = uss;
- if (env->GetArrayLength(outUssSwapPss) >= 2) {
- outUssSwapPssArray[1] = swapPss;
+ if (outUssSwapPssRss != NULL) {
+ if (env->GetArrayLength(outUssSwapPssRss) >= 1) {
+ jlong* outUssSwapPssRssArray = env->GetLongArrayElements(outUssSwapPssRss, 0);
+ if (outUssSwapPssRssArray != NULL) {
+ outUssSwapPssRssArray[0] = uss;
+ if (env->GetArrayLength(outUssSwapPssRss) >= 2) {
+ outUssSwapPssRssArray[1] = swapPss;
+ }
+ if (env->GetArrayLength(outUssSwapPssRss) >= 3) {
+ outUssSwapPssRssArray[2] = rss;
}
}
- env->ReleaseLongArrayElements(outUssSwapPss, outUssSwapPssArray, 0);
+ env->ReleaseLongArrayElements(outUssSwapPssRss, outUssSwapPssRssArray, 0);
}
}
@@ -1209,6 +1241,8 @@
env->GetFieldID(clazz, stat_field_names[i].pss_name, "I");
stat_fields[i].pssSwappable_field =
env->GetFieldID(clazz, stat_field_names[i].pssSwappable_name, "I");
+ stat_fields[i].rss_field =
+ env->GetFieldID(clazz, stat_field_names[i].rss_name, "I");
stat_fields[i].privateDirty_field =
env->GetFieldID(clazz, stat_field_names[i].privateDirty_name, "I");
stat_fields[i].sharedDirty_field =
diff --git a/core/jni/android_text_MeasuredParagraph.cpp b/core/jni/android_text_MeasuredParagraph.cpp
index 58c05b4..dddddbb 100644
--- a/core/jni/android_text_MeasuredParagraph.cpp
+++ b/core/jni/android_text_MeasuredParagraph.cpp
@@ -85,12 +85,14 @@
// Regular JNI
static jlong nBuildNativeMeasuredParagraph(JNIEnv* env, jclass /* unused */, jlong builderPtr,
- jcharArray javaText, jboolean computeHyphenation) {
+ jcharArray javaText, jboolean computeHyphenation,
+ jboolean computeLayout) {
ScopedCharArrayRO text(env, javaText);
const minikin::U16StringPiece textBuffer(text.get(), text.size());
// Pass the ownership to Java.
- return toJLong(toBuilder(builderPtr)->build(textBuffer, computeHyphenation).release());
+ return toJLong(toBuilder(builderPtr)->build(textBuffer, computeHyphenation,
+ computeLayout).release());
}
// Regular JNI
@@ -99,20 +101,36 @@
}
// CriticalNative
+static jfloat nGetWidth(jlong ptr, jint start, jint end) {
+ minikin::MeasuredText* mt = toMeasuredParagraph(ptr);
+ float r = 0.0f;
+ for (int i = start; i < end; ++i) {
+ r += mt->widths[i];
+ }
+ return r;
+}
+
+// CriticalNative
static jlong nGetReleaseFunc() {
return toJLong(&releaseMeasuredParagraph);
}
+static jint nGetMemoryUsage(jlong ptr) {
+ return static_cast<jint>(toMeasuredParagraph(ptr)->getMemoryUsage());
+}
+
static const JNINativeMethod gMethods[] = {
// MeasuredParagraphBuilder native functions.
{"nInitBuilder", "()J", (void*) nInitBuilder},
{"nAddStyleRun", "(JJIIZ)V", (void*) nAddStyleRun},
{"nAddReplacementRun", "(JJIIF)V", (void*) nAddReplacementRun},
- {"nBuildNativeMeasuredParagraph", "(J[CZ)J", (void*) nBuildNativeMeasuredParagraph},
+ {"nBuildNativeMeasuredParagraph", "(J[CZZ)J", (void*) nBuildNativeMeasuredParagraph},
{"nFreeBuilder", "(J)V", (void*) nFreeBuilder},
// MeasuredParagraph native functions.
+ {"nGetWidth", "(JII)F", (void*) nGetWidth}, // Critical Natives
{"nGetReleaseFunc", "()J", (void*) nGetReleaseFunc}, // Critical Natives
+ {"nGetMemoryUsage", "(J)I", (void*) nGetMemoryUsage}, // Critical Native
};
int register_android_text_MeasuredParagraph(JNIEnv* env) {
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index c6828c4..683b4c4 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -189,6 +189,10 @@
argv[argc++] = AssetManager::OVERLAY_DIR;
}
+ if (stat(AssetManager::PRODUCT_OVERLAY_DIR, &st) == 0) {
+ argv[argc++] = AssetManager::PRODUCT_OVERLAY_DIR;
+ }
+
// Finally, invoke idmap (if any overlay directory exists)
if (argc > 5) {
execv(AssetManager::IDMAP_BIN, (char* const*)argv);
@@ -205,6 +209,7 @@
}
}
+
// ----------------------------------------------------------------------------
// this guy is exported to other jni routines
diff --git a/core/jni/android_util_Process.cpp b/core/jni/android_util_Process.cpp
index dec6c02..62aa1f38 100644
--- a/core/jni/android_util_Process.cpp
+++ b/core/jni/android_util_Process.cpp
@@ -610,7 +610,7 @@
return -1;
}
- char buffer[256];
+ char buffer[2048];
const int len = read(fd, buffer, sizeof(buffer)-1);
close(fd);
@@ -719,7 +719,7 @@
int fd = open(file.string(), O_RDONLY | O_CLOEXEC);
if (fd >= 0) {
- const size_t BUFFER_SIZE = 2048;
+ const size_t BUFFER_SIZE = 4096;
char* buffer = (char*)malloc(BUFFER_SIZE);
int len = read(fd, buffer, BUFFER_SIZE-1);
close(fd);
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index 421e0de..f5c09fd 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -524,15 +524,15 @@
static jint nativeSetSharedBufferModeEnabled(JNIEnv* env, jclass clazz, jlong nativeObject,
jboolean enabled) {
Surface* surface = reinterpret_cast<Surface*>(nativeObject);
- return ((ANativeWindow*) nativeObject)->perform(surface,
- NATIVE_WINDOW_SET_SHARED_BUFFER_MODE, enabled);
+ ANativeWindow* anw = static_cast<ANativeWindow*>(surface);
+ return anw->perform(surface, NATIVE_WINDOW_SET_SHARED_BUFFER_MODE, int(enabled));
}
static jint nativeSetAutoRefreshEnabled(JNIEnv* env, jclass clazz, jlong nativeObject,
jboolean enabled) {
Surface* surface = reinterpret_cast<Surface*>(nativeObject);
- return ((ANativeWindow*) nativeObject)->perform(surface,
- NATIVE_WINDOW_SET_AUTO_REFRESH, enabled);
+ ANativeWindow* anw = static_cast<ANativeWindow*>(surface);
+ return anw->perform(surface, NATIVE_WINDOW_SET_AUTO_REFRESH, int(enabled));
}
namespace uirenderer {
diff --git a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
index d254de6..99d9839 100644
--- a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
+++ b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
@@ -30,7 +30,14 @@
#include <utils/Log.h>
#include <utils/misc.h>
-#include <utils/Vector.h>
+
+#include "android-base/unique_fd.h"
+#include "bpf/BpfNetworkStats.h"
+#include "bpf/BpfUtils.h"
+
+using android::bpf::hasBpfSupport;
+using android::bpf::parseBpfNetworkStatsDetail;
+using android::bpf::stats_line;
namespace android {
@@ -53,17 +60,6 @@
jfieldID operations;
} gNetworkStatsClassInfo;
-struct stats_line {
- char iface[32];
- int32_t uid;
- int32_t set;
- int32_t tag;
- int64_t rxBytes;
- int64_t rxPackets;
- int64_t txBytes;
- int64_t txPackets;
-};
-
static jobjectArray get_string_array(JNIEnv* env, jobject obj, jfieldID field, int size, bool grow)
{
if (!grow) {
@@ -97,33 +93,14 @@
return env->NewLongArray(size);
}
-static int readNetworkStatsDetail(JNIEnv* env, jclass clazz, jobject stats,
- jstring path, jint limitUid, jobjectArray limitIfacesObj, jint limitTag) {
- ScopedUtfChars path8(env, path);
- if (path8.c_str() == NULL) {
- return -1;
- }
-
- FILE *fp = fopen(path8.c_str(), "r");
+static int legacyReadNetworkStatsDetail(std::vector<stats_line>* lines,
+ const std::vector<std::string>& limitIfaces,
+ int limitTag, int limitUid, const char* path) {
+ FILE* fp = fopen(path, "r");
if (fp == NULL) {
return -1;
}
- Vector<String8> limitIfaces;
- if (limitIfacesObj != NULL && env->GetArrayLength(limitIfacesObj) > 0) {
- int num = env->GetArrayLength(limitIfacesObj);
- limitIfaces.setCapacity(num);
- for (int i=0; i<num; i++) {
- jstring string = (jstring)env->GetObjectArrayElement(limitIfacesObj, i);
- ScopedUtfChars string8(env, string);
- if (string8.c_str() != NULL) {
- limitIfaces.add(String8(string8.c_str()));
- }
- }
- }
-
- Vector<stats_line> lines;
-
int lastIdx = 1;
int idx;
char buffer[384];
@@ -215,7 +192,7 @@
//ALOGI("skipping due to uid: %s", buffer);
continue;
}
- lines.push_back(s);
+ lines->push_back(s);
} else {
//ALOGI("skipping due to bad remaining fields: %s", pos);
}
@@ -225,8 +202,42 @@
ALOGE("Failed to close netstats file");
return -1;
}
+ return 0;
+}
+
+static int readNetworkStatsDetail(JNIEnv* env, jclass clazz, jobject stats, jstring path,
+ jint limitUid, jobjectArray limitIfacesObj, jint limitTag,
+ jboolean useBpfStats) {
+ ScopedUtfChars path8(env, path);
+ if (path8.c_str() == NULL) {
+ return -1;
+ }
+
+ std::vector<std::string> limitIfaces;
+ if (limitIfacesObj != NULL && env->GetArrayLength(limitIfacesObj) > 0) {
+ int num = env->GetArrayLength(limitIfacesObj);
+ for (int i = 0; i < num; i++) {
+ jstring string = (jstring)env->GetObjectArrayElement(limitIfacesObj, i);
+ ScopedUtfChars string8(env, string);
+ if (string8.c_str() != NULL) {
+ limitIfaces.push_back(std::string(string8.c_str()));
+ }
+ }
+ }
+ std::vector<stats_line> lines;
+
+
+ if (useBpfStats) {
+ if (parseBpfNetworkStatsDetail(&lines, limitIfaces, limitTag, limitUid) < 0)
+ return -1;
+ } else {
+ if (legacyReadNetworkStatsDetail(&lines, limitIfaces, limitTag,
+ limitUid, path8.c_str()) < 0)
+ return -1;
+ }
int size = lines.size();
+
bool grow = size > env->GetIntField(stats, gNetworkStatsClassInfo.capacity);
ScopedLocalRef<jobjectArray> iface(env, get_string_array(env, stats,
@@ -303,7 +314,7 @@
static const JNINativeMethod gMethods[] = {
{ "nativeReadNetworkStatsDetail",
- "(Landroid/net/NetworkStats;Ljava/lang/String;I[Ljava/lang/String;I)I",
+ "(Landroid/net/NetworkStats;Ljava/lang/String;I[Ljava/lang/String;IZ)I",
(void*) readNetworkStatsDetail }
};
diff --git a/core/jni/fd_utils.cpp b/core/jni/fd_utils.cpp
index 956b724..3b7b14c 100644
--- a/core/jni/fd_utils.cpp
+++ b/core/jni/fd_utils.cpp
@@ -85,11 +85,15 @@
static const char* kOverlayDir = "/system/vendor/overlay/";
static const char* kVendorOverlayDir = "/vendor/overlay";
static const char* kOverlaySubdir = "/system/vendor/overlay-subdir/";
+ static const char* kSystemProductOverlayDir = "/system/product/overlay/";
+ static const char* kProductOverlayDir = "/product/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, kVendorOverlayDir)
+ || android::base::StartsWith(path, kSystemProductOverlayDir)
+ || android::base::StartsWith(path, kProductOverlayDir))
&& android::base::EndsWith(path, kApkSuffix)
&& path.find("/../") == std::string::npos) {
return true;
diff --git a/core/proto/android/app/activitymanager.proto b/core/proto/android/app/activitymanager.proto
index 3412a32..4756c13 100644
--- a/core/proto/android/app/activitymanager.proto
+++ b/core/proto/android/app/activitymanager.proto
@@ -19,63 +19,18 @@
package android.app;
option java_multiple_files = true;
+option java_outer_classname = "ActivityManagerProto";
-// ActivityManager.java PROCESS_STATEs
-enum ProcessState {
- // Order matters for process states, so values have been spaced to provide
- // room for future additions.
-
- // Not a real process state.
- PROCESS_STATE_UNKNOWN = -100;
- // Process is a persistent system process.
- PROCESS_STATE_PERSISTENT = 0;
- // Process is a persistent system process and is doing UI.
- PROCESS_STATE_PERSISTENT_UI = 100;
- // Process is hosting the current top activities. Note that this covers
- // all activities that are visible to the user.
- PROCESS_STATE_TOP = 200;
- // Process is hosting a foreground service due to a system binding.
- PROCESS_STATE_BOUND_FOREGROUND_SERVICE = 300;
- // Process is hosting a foreground service.
- PROCESS_STATE_FOREGROUND_SERVICE = 400;
- // Process is important to the user, and something they are aware of.
- PROCESS_STATE_IMPORTANT_FOREGROUND = 500;
- // Process is important to the user, but not something they are aware of.
- PROCESS_STATE_IMPORTANT_BACKGROUND = 600;
- // Process is in the background transient so we will try to keep running.
- PROCESS_STATE_TRANSIENT_BACKGROUND = 700;
- // Process is in the background running a backup/restore operation.
- PROCESS_STATE_BACKUP = 800;
- // 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.
- PROCESS_STATE_SERVICE = 900;
- // 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.
- PROCESS_STATE_RECEIVER = 1000;
- // Same as PROCESS_STATE_TOP but while device is sleeping.
- PROCESS_STATE_TOP_SLEEPING = 1100;
- // Process is in the background, but it can't restore its state so we want
- // to try to avoid killing it.
- PROCESS_STATE_HEAVY_WEIGHT = 1200;
- // Process is in the background but hosts the home activity.
- PROCESS_STATE_HOME = 1300;
- // Process is in the background but hosts the last shown activity.
- PROCESS_STATE_LAST_ACTIVITY = 1400;
- // Process is being cached for later use and contains activities.
- PROCESS_STATE_CACHED_ACTIVITY = 1500;
- // Process is being cached for later use and is a client of another cached
- // process that contains activities.
- PROCESS_STATE_CACHED_ACTIVITY_CLIENT = 1600;
- // Process is being cached for later use and has an activity that corresponds
- // to an existing recent task.
- PROCESS_STATE_CACHED_RECENT = 1700;
- // Process is being cached for later use and is empty.
- PROCESS_STATE_CACHED_EMPTY = 1800;
- // Process does not exist.
- PROCESS_STATE_NONEXISTENT = 1900;
+// ActivityManager.java UID_OBSERVERs flags
+enum UidObserverFlag {
+ // report changes in process state, original value is 1 << 0
+ UID_OBSERVER_FLAG_PROCSTATE = 1;
+ // report uid gone, original value is 1 << 1
+ UID_OBSERVER_FLAG_GONE = 2;
+ // report uid has become idle, original value is 1 << 2
+ UID_OBSERVER_FLAG_IDLE = 3;
+ // report uid has become active, original value is 1 << 3
+ UID_OBSERVER_FLAG_ACTIVE = 4;
+ // report uid cached state has changed, original value is 1 << 4
+ UID_OBSERVER_FLAG_CACHED = 5;
}
-
diff --git a/core/proto/android/app/alarmmanager.proto b/core/proto/android/app/alarmmanager.proto
index 789e3d6..7ef08ca 100644
--- a/core/proto/android/app/alarmmanager.proto
+++ b/core/proto/android/app/alarmmanager.proto
@@ -17,6 +17,7 @@
syntax = "proto2";
import "frameworks/base/core/proto/android/app/pendingintent.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
option java_multiple_files = true;
@@ -47,6 +48,8 @@
// An android.app.AlarmManager.AlarmClockInfo object.
message AlarmClockInfoProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
// This value is UTC wall clock time in milliseconds, as returned by
// System#currentTimeMillis() for example.
optional int64 trigger_time_ms = 1;
diff --git a/core/proto/android/app/enums.proto b/core/proto/android/app/enums.proto
new file mode 100644
index 0000000..5eb05be
--- /dev/null
+++ b/core/proto/android/app/enums.proto
@@ -0,0 +1,100 @@
+/*
+ * 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.
+ */
+
+syntax = "proto2";
+
+package android.app;
+
+option java_outer_classname = "AppProtoEnums";
+option java_multiple_files = true;
+
+// ActivityManagerInternal.java's APP_TRANSITION reasons.
+enum AppTransitionReasonEnum {
+ APP_TRANSITION_REASON_UNKNOWN = 0;
+ // The transition was started because we drew the splash screen.
+ APP_TRANSITION_SPLASH_SCREEN = 1;
+ // The transition was started because we all app windows were drawn.
+ APP_TRANSITION_WINDOWS_DRAWN = 2;
+ // The transition was started because of a timeout.
+ APP_TRANSITION_TIMEOUT = 3;
+ // The transition was started because of a we drew a task snapshot.
+ APP_TRANSITION_SNAPSHOT = 4;
+}
+
+// ActivityManager.java PROCESS_STATEs
+enum ProcessStateEnum {
+ // Unlike the ActivityManager PROCESS_STATE values, the ordering and numerical values
+ // here are completely fixed and arbitrary. Order is irrelevant.
+ // No attempt need be made to keep them in sync.
+ // The values here must not be modified. Any new process states can be appended to the end.
+
+ // Process state that is unknown to this proto file (i.e. is not mapped
+ // by ActivityManager.processStateAmToProto()). Can only happen if there's a bug in the mapping.
+ PROCESS_STATE_UNKNOWN_TO_PROTO = 998;
+ // Not a real process state.
+ PROCESS_STATE_UNKNOWN = 999;
+ // Process is a persistent system process.
+ PROCESS_STATE_PERSISTENT = 1000;
+ // Process is a persistent system process and is doing UI.
+ PROCESS_STATE_PERSISTENT_UI = 1001;
+ // Process is hosting the current top activities. Note that this covers
+ // all activities that are visible to the user.
+ PROCESS_STATE_TOP = 1002;
+ // Process is hosting a foreground service.
+ PROCESS_STATE_FOREGROUND_SERVICE = 1003;
+ // Process is hosting a foreground service due to a system binding.
+ PROCESS_STATE_BOUND_FOREGROUND_SERVICE = 1004;
+ // Process is important to the user, and something they are aware of.
+ PROCESS_STATE_IMPORTANT_FOREGROUND = 1005;
+ // Process is important to the user, but not something they are aware of.
+ PROCESS_STATE_IMPORTANT_BACKGROUND = 1006;
+ // Process is in the background transient so we will try to keep running.
+ PROCESS_STATE_TRANSIENT_BACKGROUND = 1007;
+ // Process is in the background running a backup/restore operation.
+ PROCESS_STATE_BACKUP = 1008;
+ // 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.
+ PROCESS_STATE_SERVICE = 1009;
+ // 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.
+ PROCESS_STATE_RECEIVER = 1010;
+ // Same as PROCESS_STATE_TOP but while device is sleeping.
+ PROCESS_STATE_TOP_SLEEPING = 1011;
+ // Process is in the background, but it can't restore its state so we want
+ // to try to avoid killing it.
+ PROCESS_STATE_HEAVY_WEIGHT = 1012;
+ // Process is in the background but hosts the home activity.
+ PROCESS_STATE_HOME = 1013;
+ // Process is in the background but hosts the last shown activity.
+ PROCESS_STATE_LAST_ACTIVITY = 1014;
+ // Process is being cached for later use and contains activities.
+ PROCESS_STATE_CACHED_ACTIVITY = 1015;
+ // Process is being cached for later use and is a client of another cached
+ // process that contains activities.
+ PROCESS_STATE_CACHED_ACTIVITY_CLIENT = 1016;
+ // Process is being cached for later use and has an activity that corresponds
+ // to an existing recent task.
+ PROCESS_STATE_CACHED_RECENT = 1017;
+ // Process is being cached for later use and is empty.
+ PROCESS_STATE_CACHED_EMPTY = 1018;
+ // Process does not exist.
+ PROCESS_STATE_NONEXISTENT = 1019;
+}
+
diff --git a/core/proto/android/app/notification.proto b/core/proto/android/app/notification.proto
index 5376b0e..c7e313a 100644
--- a/core/proto/android/app/notification.proto
+++ b/core/proto/android/app/notification.proto
@@ -20,18 +20,22 @@
package android.app;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
/**
* An android.app.Notification object.
* Deprecated fields are not included in the proto.
*/
message NotificationProto {
- optional string channel_id = 1;
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string channel_id = 1 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional bool has_ticker_text = 2;
optional int32 flags = 3;
optional int32 color = 4;
- optional string category = 5;
- optional string group_key = 6;
- optional string sort_key = 7;
+ optional string category = 5 [ (.android.privacy).dest = DEST_EXPLICIT ];
+ optional string group_key = 6 [ (.android.privacy).dest = DEST_EXPLICIT ];
+ optional string sort_key = 7 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional int32 action_length = 8;
// If this field is not set, then the value is unknown.
diff --git a/core/proto/android/app/notification_channel.proto b/core/proto/android/app/notification_channel.proto
index 0388547..337aa1c 100644
--- a/core/proto/android/app/notification_channel.proto
+++ b/core/proto/android/app/notification_channel.proto
@@ -21,19 +21,22 @@
package android.app;
import "frameworks/base/core/proto/android/media/audioattributes.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
/**
* An android.app.NotificationChannel object.
*/
message NotificationChannelProto {
- optional string id = 1;
- optional string name = 2;
- optional string description = 3;
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string id = 1 [ (android.privacy).dest = DEST_EXPLICIT ];
+ optional string name = 2 [ (android.privacy).dest = DEST_EXPLICIT ];
+ optional string description = 3 [ (android.privacy).dest = DEST_EXPLICIT ];
optional int32 importance = 4;
optional bool can_bypass_dnd = 5;
// Default is VISIBILITY_NO_OVERRIDE (-1000).
optional int32 lockscreen_visibility = 6;
- optional string sound = 7;
+ optional string sound = 7 [ (android.privacy).dest = DEST_EXPLICIT ];
optional bool use_lights = 8;
// Default is 0.
optional int32 light_color = 9;
@@ -46,7 +49,7 @@
optional bool show_badge = 13;
// Default is false.
optional bool is_deleted = 14;
- optional string group = 15;
+ optional string group = 15 [ (android.privacy).dest = DEST_EXPLICIT ];
optional android.media.AudioAttributesProto audio_attributes = 16;
// If this is a blockable system notification channel.
optional bool is_blockable_system = 17;
diff --git a/core/proto/android/app/notification_channel_group.proto b/core/proto/android/app/notification_channel_group.proto
index 89a540f..7b270d7 100644
--- a/core/proto/android/app/notification_channel_group.proto
+++ b/core/proto/android/app/notification_channel_group.proto
@@ -21,11 +21,14 @@
package android.app;
import "frameworks/base/core/proto/android/app/notification_channel.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
/**
* An android.app.NotificationChannelGroup object.
*/
message NotificationChannelGroupProto {
+ option (.android.msg_privacy).dest = DEST_EXPLICIT;
+
optional string id = 1;
optional string name = 2;
optional string description = 3;
diff --git a/core/proto/android/app/notificationmanager.proto b/core/proto/android/app/notificationmanager.proto
index 7d774ae..e991688 100644
--- a/core/proto/android/app/notificationmanager.proto
+++ b/core/proto/android/app/notificationmanager.proto
@@ -20,10 +20,14 @@
package android.app;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
/**
- * An android.app.NotificationMananger.Policy object.
+ * An android.app.NotificationManager.Policy object.
*/
message PolicyProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
enum Category {
CATEGORY_UNKNOWN = 0;
// Reminder notifications are prioritized.
@@ -36,6 +40,11 @@
CALLS = 4;
// Calls from repeat callers are prioritized.
REPEAT_CALLERS = 5;
+ // Alarms are prioritized.
+ ALARMS = 6;
+ // Media, system, game (catch-all for non-never suppressible sounds) are
+ // prioritized.
+ MEDIA_SYSTEM_OTHER = 7;
}
repeated Category priority_categories = 1;
diff --git a/core/proto/android/app/pendingintent.proto b/core/proto/android/app/pendingintent.proto
index b562c0b..ab0d34e 100644
--- a/core/proto/android/app/pendingintent.proto
+++ b/core/proto/android/app/pendingintent.proto
@@ -20,9 +20,13 @@
package android.app;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
/**
* An android.app.PendingIntent object.
*/
message PendingIntentProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string target = 1;
}
diff --git a/core/proto/android/app/profilerinfo.proto b/core/proto/android/app/profilerinfo.proto
new file mode 100644
index 0000000..6b28318
--- /dev/null
+++ b/core/proto/android/app/profilerinfo.proto
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+syntax = "proto2";
+option java_package = "android.app";
+option java_multiple_files = true;
+
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
+package android.app;
+
+/**
+ * An android.app.ProfilerInfo object.
+ */
+message ProfilerInfoProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ 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;
+ optional string agent = 6;
+}
diff --git a/core/proto/android/content/clipdata.proto b/core/proto/android/content/clipdata.proto
index 6967b69..aeeef97 100644
--- a/core/proto/android/content/clipdata.proto
+++ b/core/proto/android/content/clipdata.proto
@@ -21,13 +21,18 @@
import "frameworks/base/core/proto/android/content/clipdescription.proto";
import "frameworks/base/core/proto/android/content/intent.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
// An android.content.ClipData object.
message ClipDataProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional android.content.ClipDescriptionProto description = 1;
// Custom dump of an android.graphics.Bitmap object.
message Icon {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 width = 1;
optional int32 height = 2;
}
@@ -35,6 +40,8 @@
// An android.content.ClipData.Item object.
message Item {
+ option (.android.msg_privacy).dest = DEST_EXPLICIT;
+
oneof data {
string html_text = 1;
string text = 2;
diff --git a/core/proto/android/content/clipdescription.proto b/core/proto/android/content/clipdescription.proto
index 40f4ad3..bc0e940 100644
--- a/core/proto/android/content/clipdescription.proto
+++ b/core/proto/android/content/clipdescription.proto
@@ -20,11 +20,14 @@
option java_multiple_files = true;
import "frameworks/base/core/proto/android/os/persistablebundle.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
// An android.content.ClipDescription object.
message ClipDescriptionProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
repeated string mime_types = 1;
- optional string label = 2;
+ optional string label = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional android.os.PersistableBundleProto extras = 3;
optional int64 timestamp_ms = 4;
}
diff --git a/core/proto/android/content/component_name.proto b/core/proto/android/content/component_name.proto
index fc0c8c5..4e49cf2 100644
--- a/core/proto/android/content/component_name.proto
+++ b/core/proto/android/content/component_name.proto
@@ -20,10 +20,14 @@
package android.content;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
/**
* An android.content.ComponentName object.
*/
message ComponentNameProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string package_name = 1;
optional string class_name = 2;
}
diff --git a/core/proto/android/content/configuration.proto b/core/proto/android/content/configuration.proto
index 111b27f..a62d56c 100644
--- a/core/proto/android/content/configuration.proto
+++ b/core/proto/android/content/configuration.proto
@@ -22,11 +22,14 @@
import "frameworks/base/core/proto/android/app/window_configuration.proto";
import "frameworks/base/core/proto/android/content/locale.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
/**
* An android resource configuration.
*/
message ConfigurationProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional float font_scale = 1;
optional uint32 mcc = 2;
optional uint32 mnc = 3;
diff --git a/core/proto/android/content/featureinfo.proto b/core/proto/android/content/featureinfo.proto
index a750120..6878f0e 100644
--- a/core/proto/android/content/featureinfo.proto
+++ b/core/proto/android/content/featureinfo.proto
@@ -16,14 +16,20 @@
syntax = "proto2";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
option java_package = "android.content.pm";
option java_multiple_files = true;
package android.content.pm;
message FeatureInfoProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ // Some hard coded feature name
optional string name = 1;
optional int32 version = 2;
+ // String representation of reqGlEsVersion.
optional string gles_version = 3;
optional int32 flags = 4;
}
diff --git a/core/proto/android/content/intent.proto b/core/proto/android/content/intent.proto
index 3e5265a..5e0ed11 100644
--- a/core/proto/android/content/intent.proto
+++ b/core/proto/android/content/intent.proto
@@ -20,10 +20,14 @@
option java_package = "android.content";
option java_multiple_files = true;
+import "frameworks/base/core/proto/android/content/component_name.proto";
import "frameworks/base/core/proto/android/os/patternmatcher.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
// Next Tag: 13
message IntentProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
enum DockState {
// Used as an int value for Intent#EXTRA_DOCK_STATE to represent that
// the phone is not in any dock.
@@ -48,23 +52,25 @@
optional string action = 1;
repeated string categories = 2;
- optional string data = 3;
+ optional string data = 3 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional string type = 4;
optional string flag = 5;
optional string package = 6;
- optional string component = 7;
+ optional ComponentNameProto component = 7;
optional string source_bounds = 8;
- optional string clip_data = 9;
- optional string extras = 10;
+ optional string clip_data = 9 [ (.android.privacy).dest = DEST_EXPLICIT ];
+ optional string extras = 10 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional int32 content_user_hint = 11;
optional string selector = 12;
}
// Next Tag: 11
message IntentFilterProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
repeated string actions = 1;
repeated string categories = 2;
- repeated string data_schemes = 3;
+ repeated string data_schemes = 3 [ (.android.privacy).dest = DEST_EXPLICIT ];
repeated android.os.PatternMatcherProto data_scheme_specs = 4;
repeated AuthorityEntryProto data_authorities = 5;
repeated android.os.PatternMatcherProto data_paths = 6;
@@ -75,6 +81,8 @@
}
message AuthorityEntryProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string host = 1;
optional bool wild = 2;
optional int32 port = 3;
diff --git a/core/proto/android/content/locale.proto b/core/proto/android/content/locale.proto
index f0de31c..2be3ab9 100644
--- a/core/proto/android/content/locale.proto
+++ b/core/proto/android/content/locale.proto
@@ -18,9 +18,13 @@
option java_package = "android.content";
option java_multiple_files = true;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
package android.content;
message LocaleProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string language = 1;
optional string country = 2;
optional string variant = 3;
diff --git a/core/proto/android/content/package_item_info.proto b/core/proto/android/content/package_item_info.proto
new file mode 100644
index 0000000..6e99bec
--- /dev/null
+++ b/core/proto/android/content/package_item_info.proto
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ */
+
+syntax = "proto2";
+option java_package = "android.content.pm";
+option java_multiple_files = true;
+
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
+package android.content.pm;
+
+message PackageItemInfoProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string name = 1;
+ optional string package_name = 2;
+ optional int32 label_res = 3;
+ optional string non_localized_label = 4;
+ optional int32 icon = 5;
+ optional int32 banner = 6;
+}
+
+// Proto of android.content.pm.ApplicationInfo which extends PackageItemInfo
+message ApplicationInfoProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional PackageItemInfoProto package = 1;
+ optional string permission = 2;
+ optional string process_name = 3;
+ optional int32 uid = 4;
+ optional int32 flags = 5;
+ optional int32 private_flags = 6;
+ optional int32 theme = 7;
+ optional string source_dir = 8;
+ optional string public_source_dir = 9;
+ repeated string split_source_dirs = 10;
+ repeated string split_public_source_dirs = 11;
+ repeated string resource_dirs = 12;
+ optional string data_dir = 13;
+ optional string class_loader_name = 14;
+ repeated string split_class_loader_names = 15;
+
+ message Version {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional bool enabled = 1;
+ optional int32 min_sdk_version = 2;
+ optional int32 target_sdk_version = 3;
+ optional int32 version_code = 4;
+ optional int32 target_sandbox_version = 5;
+ }
+ optional Version version = 16;
+
+ message Detail {
+ option (.android.msg_privacy).dest = DEST_EXPLICIT;
+
+ optional string class_name = 1;
+ optional string task_affinity = 2;
+ optional int32 requires_smallest_width_dp = 3;
+ optional int32 compatible_width_limit_dp = 4;
+ optional int32 largest_width_limit_dp = 5;
+ optional string seinfo = 6;
+ optional string seinfo_user = 7;
+ optional string device_protected_data_dir = 8;
+ optional string credential_protected_data_dir = 9;
+ 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 {
+ string content = 15;
+ bool is_full_backup = 16;
+ }
+ optional int32 networkSecurity_config_res = 17;
+ optional int32 category = 18;
+ }
+ optional Detail detail = 17;
+}
diff --git a/core/proto/android/graphics/point.proto b/core/proto/android/graphics/point.proto
index 5ae17cb..035b9fe 100644
--- a/core/proto/android/graphics/point.proto
+++ b/core/proto/android/graphics/point.proto
@@ -17,9 +17,13 @@
syntax = "proto2";
package android.graphics;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
option java_multiple_files = true;
message PointProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 x = 1;
optional int32 y = 2;
}
diff --git a/core/proto/android/graphics/rect.proto b/core/proto/android/graphics/rect.proto
index 562ffce..eb403fe 100644
--- a/core/proto/android/graphics/rect.proto
+++ b/core/proto/android/graphics/rect.proto
@@ -17,9 +17,13 @@
syntax = "proto2";
package android.graphics;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
option java_multiple_files = true;
message RectProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 left = 1;
optional int32 top = 2;
optional int32 right = 3;
diff --git a/core/proto/android/internal/locallog.proto b/core/proto/android/internal/locallog.proto
index 51f6c1c..73d1492 100644
--- a/core/proto/android/internal/locallog.proto
+++ b/core/proto/android/internal/locallog.proto
@@ -19,6 +19,10 @@
option java_multiple_files = true;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
message LocalLogProto {
+ option (.android.msg_privacy).dest = DEST_EXPLICIT;
+
repeated string lines = 1;
}
diff --git a/core/proto/android/net/network.proto b/core/proto/android/net/network.proto
index 9c7ea5d..e13ca9f 100644
--- a/core/proto/android/net/network.proto
+++ b/core/proto/android/net/network.proto
@@ -19,9 +19,14 @@
package android.net;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
/**
* An android.net.Network object.
*/
message NetworkProto {
- optional int32 net_id = 1;
+ // The netId is an implementation detail which might be changed in the
+ // future, or which alone (i.e. in the absence of some additional context)
+ // might not be sufficient to fully identify a Network.
+ optional int32 net_id = 1 [ (.android.privacy).dest = DEST_AUTOMATIC ];
}
diff --git a/core/proto/android/net/networkcapabilities.proto b/core/proto/android/net/networkcapabilities.proto
index e1c2af1..0338bf8 100644
--- a/core/proto/android/net/networkcapabilities.proto
+++ b/core/proto/android/net/networkcapabilities.proto
@@ -20,10 +20,14 @@
option java_multiple_files = true;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
/**
* An android.net.NetworkCapabilities object.
*/
message NetworkCapabilitiesProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
enum Transport {
// Indicates this network uses a Cellular transport.
TRANSPORT_CELLULAR = 0;
@@ -118,7 +122,7 @@
optional int32 link_up_bandwidth_kbps = 3;
optional int32 link_down_bandwidth_kbps = 4;
- optional string network_specifier = 5;
+ optional string network_specifier = 5 [ (.android.privacy).dest = DEST_EXPLICIT ];
// True if this object specifies a signal strength.
optional bool can_report_signal_strength = 6;
diff --git a/core/proto/android/net/networkrequest.proto b/core/proto/android/net/networkrequest.proto
index 9884464..d260b13 100644
--- a/core/proto/android/net/networkrequest.proto
+++ b/core/proto/android/net/networkrequest.proto
@@ -21,11 +21,14 @@
option java_multiple_files = true;
import "frameworks/base/core/proto/android/net/networkcapabilities.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
/**
* An android.net.NetworkRequest object.
*/
message NetworkRequestProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
enum Type {
TYPE_UNKNOWN = 0;
// Only used by applications. When an application creates a
diff --git a/core/proto/android/os/batterystats.proto b/core/proto/android/os/batterystats.proto
index ce1d5c9..9f9fd05 100644
--- a/core/proto/android/os/batterystats.proto
+++ b/core/proto/android/os/batterystats.proto
@@ -21,7 +21,7 @@
import "frameworks/base/core/proto/android/app/jobparameters.proto";
import "frameworks/base/core/proto/android/os/powermanager.proto";
-import "frameworks/base/core/proto/android/telephony/signalstrength.proto";
+import "frameworks/base/core/proto/android/telephony/enums.proto";
import "frameworks/base/libs/incident/proto/android/privacy.proto";
message BatteryStatsProto {
@@ -339,7 +339,7 @@
message PhoneSignalStrength {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
- optional android.telephony.SignalStrengthProto.StrengthName name = 1;
+ optional android.telephony.SignalStrengthEnum name = 1;
optional TimerProto total = 2;
};
repeated PhoneSignalStrength phone_signal_strength = 16;
diff --git a/core/proto/android/os/bundle.proto b/core/proto/android/os/bundle.proto
index 6990281..5556936 100644
--- a/core/proto/android/os/bundle.proto
+++ b/core/proto/android/os/bundle.proto
@@ -19,10 +19,14 @@
option java_multiple_files = true;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
// An android.os.Bundle object.
message BundleProto {
oneof data {
- int32 parcelled_data_size = 1;
- string map_data = 2;
+ int32 parcelled_data_size = 1 [
+ (.android.privacy).dest = DEST_AUTOMATIC
+ ];
+ string map_data = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
}
}
diff --git a/core/proto/android/os/cpufreq.proto b/core/proto/android/os/cpufreq.proto
index a8da0bf..8481ffc 100644
--- a/core/proto/android/os/cpufreq.proto
+++ b/core/proto/android/os/cpufreq.proto
@@ -18,10 +18,13 @@
option java_multiple_files = true;
option java_outer_classname = "CpuFreqProto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
package android.os;
// cpu frequency time from /sys/devices/system/cpu/cpufreq/all_time_in_state
message CpuFreq {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
optional int32 jiffy_hz = 1; // obtain by system config.
@@ -30,10 +33,13 @@
// frequency time pre cpu, unit in jiffy, TODO: obtain jiffies.
message CpuFreqStats {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
optional string cpu_name = 1;
message TimeInState {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 state_khz = 1; // cpu frequency
optional int64 time_jiffy = 2; // number of jiffies
}
diff --git a/core/proto/android/os/cpuinfo.proto b/core/proto/android/os/cpuinfo.proto
index cd151e2..ca43602 100644
--- a/core/proto/android/os/cpuinfo.proto
+++ b/core/proto/android/os/cpuinfo.proto
@@ -18,6 +18,8 @@
option java_multiple_files = true;
option java_outer_classname = "CpuInfoProto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
package android.os;
/**
@@ -27,8 +29,11 @@
* Next Tag: 6
*/
message CpuInfo {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
message TaskStats {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 total = 1; // total number of cpu tasks
optional int32 running = 2; // number of running tasks
optional int32 sleeping = 3; // number of sleeping tasks
@@ -38,6 +43,8 @@
optional TaskStats task_stats = 1;
message MemStats { // unit in kB
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 total = 1;
optional int32 used = 2;
optional int32 free = 3;
@@ -48,6 +55,8 @@
optional MemStats swap = 3;
message CpuUsage { // unit is percentage %
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 cpu = 1; // 400% cpu indicates 4 cores
optional int32 user = 2;
optional int32 nice = 3;
@@ -62,9 +71,11 @@
// Next Tag: 13
message Task {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 pid = 1;
optional int32 tid = 2;
- optional string user = 3;
+ optional string user = 3; // the process name which uses cpu
optional string pr = 4; // priority of each task, using string type is because special value RT (real time)
optional sint32 ni = 5; // niceness value
optional float cpu = 6; // precentage of cpu usage of the task
diff --git a/core/proto/android/os/enums.proto b/core/proto/android/os/enums.proto
new file mode 100644
index 0000000..fe9b7ac
--- /dev/null
+++ b/core/proto/android/os/enums.proto
@@ -0,0 +1,112 @@
+/*
+ * 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.
+ */
+
+syntax = "proto2";
+package android.os;
+
+option java_outer_classname = "OsProtoEnums";
+option java_multiple_files = true;
+
+// These constants are defined in hardware/interfaces/health/1.0/types.hal
+// They are primarily used by android/os/BatteryManager.java.
+enum BatteryHealthEnum {
+ BATTERY_HEALTH_INVALID = 0;
+ BATTERY_HEALTH_UNKNOWN = 1;
+ BATTERY_HEALTH_GOOD = 2;
+ BATTERY_HEALTH_OVERHEAT = 3;
+ BATTERY_HEALTH_DEAD = 4;
+ BATTERY_HEALTH_OVER_VOLTAGE = 5;
+ BATTERY_HEALTH_UNSPECIFIED_FAILURE = 6;
+ BATTERY_HEALTH_COLD = 7;
+}
+
+// Plug states, primarily used by android/os/BatteryManager.java.
+enum BatteryPluggedStateEnum {
+ // Note that NONE is not in BatteryManager.java's constants.
+ BATTERY_PLUGGED_NONE = 0;
+ // Power source is an AC charger.
+ BATTERY_PLUGGED_AC = 1;
+ // Power source is a USB port.
+ BATTERY_PLUGGED_USB = 2;
+ // Power source is wireless.
+ BATTERY_PLUGGED_WIRELESS = 4;
+}
+
+// These constants are defined in hardware/interfaces/health/1.0/types.hal
+// They are primarily used by android/os/BatteryManager.java.
+enum BatteryStatusEnum {
+ BATTERY_STATUS_INVALID = 0;
+ BATTERY_STATUS_UNKNOWN = 1;
+ BATTERY_STATUS_CHARGING = 2;
+ BATTERY_STATUS_DISCHARGING = 3;
+ BATTERY_STATUS_NOT_CHARGING = 4;
+ BATTERY_STATUS_FULL = 5;
+}
+
+// Wakelock types, primarily used by android/os/PowerManager.java.
+enum WakeLockLevelEnum {
+ // NOTE: Wake lock levels were previously defined as a bit field, except
+ // that only a few combinations were actually supported so the bit field
+ // was removed. This explains why the numbering scheme is so odd. If
+ // adding a new wake lock level, any unused value can be used.
+
+ // Ensures that the CPU is running; the screen and keyboard backlight
+ // will be allowed to go off.
+ PARTIAL_WAKE_LOCK = 1;
+
+ // Ensures that the screen is on (but may be dimmed); the keyboard
+ // backlight will be allowed to go off. If the user presses the power
+ // button, then the SCREEN_DIM_WAKE_LOCK will be implicitly released by
+ // the system, causing both the screen and the CPU to be turned off.
+ SCREEN_DIM_WAKE_LOCK = 6 [deprecated = true];
+
+ // Ensures that the screen is on at full brightness; the keyboard
+ // backlight will be allowed to go off. If the user presses the power
+ // button, then the SCREEN_BRIGHT_WAKE_LOCK will be implicitly released
+ // by the system, causing both the screen and the CPU to be turned off.
+ SCREEN_BRIGHT_WAKE_LOCK = 10 [deprecated = true];
+
+ // Ensures that the screen and keyboard backlight are on at full
+ // brightness. If the user presses the power button, then the
+ // FULL_WAKE_LOCK will be implicitly released by the system, causing
+ // both the screen and the CPU to be turned off.
+ FULL_WAKE_LOCK = 26 [deprecated = true];
+
+ // Turns the screen off when the proximity sensor activates. If the
+ // proximity sensor detects that an object is nearby, the screen turns
+ // off immediately. Shortly after the object moves away, the screen
+ // turns on again.
+ // A proximity wake lock does not prevent the device from falling asleep
+ // unlike FULL_WAKE_LOCK, SCREEN_BRIGHT_WAKE_LOCK and
+ // SCREEN_DIM_WAKE_LOCK. If there is no user activity and no other wake
+ // locks are held, then the device will fall asleep (and lock) as usual.
+ // However, the device will not fall asleep while the screen has been
+ // turned off by the proximity sensor because it effectively counts as
+ // ongoing user activity.
+ PROXIMITY_SCREEN_OFF_WAKE_LOCK = 32;
+
+ // Put the screen in a low power state and allow the CPU to suspend if
+ // no other wake locks are held. This is used by the dream manager to
+ // implement doze mode. It currently has no effect unless the power
+ // manager is in the dozing state.
+ DOZE_WAKE_LOCK = 64;
+
+ // Keep the device awake enough to allow drawing to occur. This is used
+ // by the window manager to allow applications to draw while the system
+ // is dozing. It currently has no effect unless the power manager is in
+ // the dozing state.
+ DRAW_WAKE_LOCK = 128;
+}
diff --git a/core/proto/android/os/incident.proto b/core/proto/android/os/incident.proto
index e5efb90..3ec6f05 100644
--- a/core/proto/android/os/incident.proto
+++ b/core/proto/android/os/incident.proto
@@ -123,7 +123,7 @@
// Linux services
optional Procrank procrank = 2000 [
- (section).type = SECTION_COMMAND,
+ (section).type = SECTION_NONE, // disable procrank until figure out permission
(section).args = "/system/xbin/procrank"
];
@@ -226,7 +226,10 @@
(section).args = "activity --proto service"
];
- optional com.android.server.am.proto.ProcessProto amprocesses = 3015;
+ optional com.android.server.am.proto.ProcessesProto amprocesses = 3015 [
+ (section).type = SECTION_DUMPSYS,
+ (section).args = "activity --proto processes"
+ ];
optional com.android.server.AlarmManagerServiceProto alarm = 3016 [
(section).type = SECTION_DUMPSYS,
diff --git a/core/proto/android/os/kernelwake.proto b/core/proto/android/os/kernelwake.proto
index 7e5be9d..c296dab 100644
--- a/core/proto/android/os/kernelwake.proto
+++ b/core/proto/android/os/kernelwake.proto
@@ -18,15 +18,21 @@
option java_multiple_files = true;
option java_outer_classname = "WakeupSourcesProto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
package android.os;
message KernelWakeSources {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Kernel records of what caused the application processor to wake up
repeated WakeupSourceProto wakeup_sources = 1;
}
// Next Tag: 11
message WakeupSourceProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Name of the event which triggers application processor
optional string name = 1;
diff --git a/core/proto/android/os/looper.proto b/core/proto/android/os/looper.proto
index ef84bb1..435c648 100644
--- a/core/proto/android/os/looper.proto
+++ b/core/proto/android/os/looper.proto
@@ -20,9 +20,12 @@
option java_multiple_files = true;
import "frameworks/base/core/proto/android/os/messagequeue.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
message LooperProto {
- optional string thread_name = 1;
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string thread_name = 1 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional int64 thread_id = 2;
optional int32 identity_hash_code = 3;
optional android.os.MessageQueueProto queue = 4;
diff --git a/core/proto/android/os/message.proto b/core/proto/android/os/message.proto
index 38e27a1..048d031 100644
--- a/core/proto/android/os/message.proto
+++ b/core/proto/android/os/message.proto
@@ -17,9 +17,12 @@
syntax = "proto2";
package android.os;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
option java_multiple_files = true;
message MessageProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int64 when = 1;
// Name of callback class.
optional string callback = 2;
@@ -29,7 +32,7 @@
optional int32 arg1 = 4;
optional int32 arg2 = 5;
// String representation of an arbitrary object to send to the recipient.
- optional string obj = 6;
+ optional string obj = 6 [ (.android.privacy).dest = DEST_EXPLICIT ];
// Name of target class.
optional string target = 7;
optional int32 barrier = 8;
diff --git a/core/proto/android/os/messagequeue.proto b/core/proto/android/os/messagequeue.proto
index 5d4bff0..4bfcb81 100644
--- a/core/proto/android/os/messagequeue.proto
+++ b/core/proto/android/os/messagequeue.proto
@@ -20,8 +20,11 @@
option java_multiple_files = true;
import "frameworks/base/core/proto/android/os/message.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
message MessageQueueProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
repeated android.os.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 f82ea76..b8f618b 100644
--- a/core/proto/android/os/pagetypeinfo.proto
+++ b/core/proto/android/os/pagetypeinfo.proto
@@ -18,6 +18,8 @@
option java_multiple_files = true;
option java_outer_classname = "PageTypeInfoProto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
package android.os;
/*
@@ -36,6 +38,7 @@
* Next tag: 5
*/
message PageTypeInfo {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
optional int32 page_block_order = 1;
@@ -48,6 +51,7 @@
// Next tag: 5
message MigrateTypeProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
optional int32 node = 1;
@@ -61,6 +65,7 @@
// Next tag: 9
message BlockProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
optional int32 node = 1;
diff --git a/core/proto/android/os/patternmatcher.proto b/core/proto/android/os/patternmatcher.proto
index d30315b..520f2f5 100644
--- a/core/proto/android/os/patternmatcher.proto
+++ b/core/proto/android/os/patternmatcher.proto
@@ -16,10 +16,13 @@
syntax = "proto2";
option java_multiple_files = true;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
package android.os;
message PatternMatcherProto {
+ option (android.msg_privacy).dest = DEST_EXPLICIT;
+
optional string pattern = 1;
enum Type {
diff --git a/core/proto/android/os/persistablebundle.proto b/core/proto/android/os/persistablebundle.proto
index 75ff787..712f87c 100644
--- a/core/proto/android/os/persistablebundle.proto
+++ b/core/proto/android/os/persistablebundle.proto
@@ -19,10 +19,14 @@
option java_multiple_files = true;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
// An android.os.PersistableBundle object.
message PersistableBundleProto {
oneof data {
- int32 parcelled_data_size = 1;
- string map_data = 2;
+ int32 parcelled_data_size = 1 [
+ (.android.privacy).dest = DEST_AUTOMATIC
+ ];
+ string map_data = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
}
}
diff --git a/core/proto/android/os/powermanager.proto b/core/proto/android/os/powermanager.proto
index e9f409d..78a28ed 100644
--- a/core/proto/android/os/powermanager.proto
+++ b/core/proto/android/os/powermanager.proto
@@ -19,6 +19,9 @@
option java_multiple_files = true;
+import "frameworks/base/core/proto/android/os/worksource.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
message PowerManagerProto {
/* User activity events in PowerManager.java. */
enum UserActivityEvent {
@@ -32,58 +35,14 @@
USER_ACTIVITY_EVENT_ACCESSIBILITY = 3;
}
- enum WakeLockLevel {
- // NOTE: Wake lock levels were previously defined as a bit field, except
- // that only a few combinations were actually supported so the bit field
- // was removed. This explains why the numbering scheme is so odd. If
- // adding a new wake lock level, any unused value can be used.
+ // WakeLock class in android.os.PowerManager, it is the one used by sdk
+ message WakeLockProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
- // Ensures that the CPU is running; the screen and keyboard backlight
- // will be allowed to go off.
- PARTIAL_WAKE_LOCK = 1;
-
- // Ensures that the screen is on (but may be dimmed); the keyboard
- // backlight will be allowed to go off. If the user presses the power
- // button, then the SCREEN_DIM_WAKE_LOCK will be implicitly released by
- // the system, causing both the screen and the CPU to be turned off.
- SCREEN_DIM_WAKE_LOCK = 6 [deprecated = true];
-
- // Ensures that the screen is on at full brightness; the keyboard
- // backlight will be allowed to go off. If the user presses the power
- // button, then the SCREEN_BRIGHT_WAKE_LOCK will be implicitly released
- // by the system, causing both the screen and the CPU to be turned off.
- SCREEN_BRIGHT_WAKE_LOCK = 10 [deprecated = true];
-
- // Ensures that the screen and keyboard backlight are on at full
- // brightness. If the user presses the power button, then the
- // FULL_WAKE_LOCK will be implicitly released by the system, causing
- // both the screen and the CPU to be turned off.
- FULL_WAKE_LOCK = 26 [deprecated = true];
-
- // Turns the screen off when the proximity sensor activates. If the
- // proximity sensor detects that an object is nearby, the screen turns
- // off immediately. Shortly after the object moves away, the screen
- // turns on again.
- // A proximity wake lock does not prevent the device from falling asleep
- // unlike FULL_WAKE_LOCK, SCREEN_BRIGHT_WAKE_LOCK and
- // SCREEN_DIM_WAKE_LOCK. If there is no user activity and no other wake
- // locks are held, then the device will fall asleep (and lock) as usual.
- // However, the device will not fall asleep while the screen has been
- // turned off by the proximity sensor because it effectively counts as
- // ongoing user activity.
- PROXIMITY_SCREEN_OFF_WAKE_LOCK = 32;
-
- // Put the screen in a low power state and allow the CPU to suspend if
- // no other wake locks are held. This is used by the dream manager to
- // implement doze mode. It currently has no effect unless the power
- // manager is in the dozing state.
- DOZE_WAKE_LOCK = 64;
-
- // Keep the device awake enough to allow drawing to occur. This is used
- // by the window manager to allow applications to draw while the system
- // is dozing. It currently has no effect unless the power manager is in
- // the dozing state.
- DRAW_WAKE_LOCK = 128;
+ optional string hex_string = 1;
+ optional bool held = 2;
+ optional int32 internal_count = 3;
+ optional WorkSourceProto work_source = 4;
}
}
diff --git a/core/proto/android/os/ps.proto b/core/proto/android/os/ps.proto
index 88c6609..9cce727 100644
--- a/core/proto/android/os/ps.proto
+++ b/core/proto/android/os/ps.proto
@@ -20,10 +20,17 @@
option java_multiple_files = true;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
message PsDumpProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
message Process {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Security label, most commonly used for SELinux context data.
optional string label = 1;
+ // String representation of uid.
optional string user = 2;
// Process ID number.
optional int32 pid = 3;
diff --git a/core/proto/android/os/system_properties.proto b/core/proto/android/os/system_properties.proto
index 07b9ad0..694b94b 100644
--- a/core/proto/android/os/system_properties.proto
+++ b/core/proto/android/os/system_properties.proto
@@ -134,6 +134,8 @@
optional bool hal_instrumentation_enable = 11;
message InitSvc {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
enum Status {
STATUS_UNKNOWN = 0;
STATUS_RUNNING = 1;
@@ -230,7 +232,7 @@
// Read only properites on the device.
message Ro {
- optional bool adb_secure = 1;
+ 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;
@@ -265,6 +267,8 @@
// boot.img's properties.
message BootImage {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
// When the boot.img is built.
optional string build_date = 1;
// UTC timestamp of build date.
@@ -278,12 +282,14 @@
optional BootImage bootimage = 8;
// Version of bootloader on device.
- optional string bootloader = 9;
+ optional string bootloader = 9 [ (android.privacy).dest = DEST_AUTOMATIC ];
// Kernel bootmode, e.g. charger.
- optional string bootmode = 10;
+ optional string bootmode = 10 [ (android.privacy).dest = DEST_AUTOMATIC ];
// Android Platform build metadata.
message Build {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string date = 1;
optional int64 date_utc = 2;
optional string description = 3;
@@ -297,6 +303,8 @@
optional string user = 11;
message Version {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string base_os = 1;
optional string codename = 2;
optional string incremental = 3;
@@ -313,10 +321,10 @@
}
optional Build build = 11;
- optional bool camera_notify_nfc = 12;
+ optional bool camera_notify_nfc = 12 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional string carrier = 13;
- optional bool com_android_dataroaming = 14;
- optional bool com_android_prov_mobiledata = 15;
+ optional bool com_android_dataroaming = 14 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional bool com_android_prov_mobiledata = 15 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional string com_google_clientidbase = 16;
message Config {
@@ -341,6 +349,8 @@
optional string gfx_driver_0 = 26;
message Hardware {
+ option (android.msg_privacy).dest = DEST_LOCAL;
+
optional string value = 1; // value of ro.hardware itself
optional string activity_recognition = 2;
@@ -392,6 +402,8 @@
optional int32 opengles_version = 31;
message Product {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string board = 1;
optional string brand = 2;
optional string cpu_abi = 3;
@@ -405,6 +417,8 @@
optional string name = 11;
message Vendor {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string brand = 1;
optional string device = 2;
optional string manufacturer = 3;
diff --git a/core/proto/android/os/worksource.proto b/core/proto/android/os/worksource.proto
index 2f8b2fb..0a9c2ed 100644
--- a/core/proto/android/os/worksource.proto
+++ b/core/proto/android/os/worksource.proto
@@ -17,15 +17,23 @@
syntax = "proto2";
package android.os;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
option java_multiple_files = true;
message WorkSourceProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
message WorkSourceContentProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 uid = 1;
optional string name = 2;
}
message WorkChain {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
repeated WorkSourceContentProto nodes = 1;
}
diff --git a/core/proto/android/providers/settings.proto b/core/proto/android/providers/settings.proto
index 95eb889..bfd575a 100644
--- a/core/proto/android/providers/settings.proto
+++ b/core/proto/android/providers/settings.proto
@@ -20,7 +20,11 @@
option java_multiple_files = true;
option java_outer_classname = "SettingsServiceProto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
message SettingsServiceDumpProto {
+ option (android.msg_privacy).dest = DEST_EXPLICIT;
+
// Per user settings
repeated UserSettingsProto user_settings = 1;
@@ -29,8 +33,10 @@
}
message UserSettingsProto {
+ option (android.msg_privacy).dest = DEST_EXPLICIT;
+
// Should be 0, 10, 11, 12, etc. where 0 is the owner.
- optional int32 user_id = 1;
+ optional int32 user_id = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
// The secure settings for this user
optional SecureSettingsProto secure_settings = 2;
@@ -42,246 +48,266 @@
// Note: it's a conscious decision to add each setting as a separate field. This
// allows annotating each setting with its own privacy tag.
message GlobalSettingsProto {
+ option (android.msg_privacy).dest = DEST_EXPLICIT;
+
repeated SettingsOperationProto historical_operations = 1;
- optional SettingProto add_users_when_locked = 2;
- optional SettingProto enable_accessibility_global_gesture_enabled = 3;
- optional SettingProto airplane_mode_on = 4;
- optional SettingProto theater_mode_on = 5;
- optional SettingProto radio_bluetooth = 6;
- optional SettingProto radio_wifi = 7;
- optional SettingProto radio_wimax = 8;
- optional SettingProto radio_cell = 9;
- optional SettingProto radio_nfc = 10;
- optional SettingProto airplane_mode_radios = 11;
- optional SettingProto airplane_mode_toggleable_radios = 12;
- optional SettingProto bluetooth_class_of_device = 293;
+ optional SettingProto add_users_when_locked = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto enable_accessibility_global_gesture_enabled = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto airplane_mode_on = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto theater_mode_on = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ reserved 6,7,8,9,10; // Accidentally used. They are currently free to be reused.
+ // A comma-separated list of radios that need to be disabled when airplane
+ // mode is on. This overrides wifi_on and bluetooth_on if wifi and bluetooth
+ // are included in the comma-separated list.
+ optional SettingProto airplane_mode_radios = 11 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto airplane_mode_toggleable_radios = 12 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_class_of_device = 293 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto bluetooth_disabled_profiles = 13;
optional SettingProto bluetooth_interoperability_list = 14;
- optional SettingProto wifi_sleep_policy = 15;
- optional SettingProto auto_time = 16;
- optional SettingProto auto_time_zone = 17;
+ optional SettingProto wifi_sleep_policy = 15 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto auto_time = 16 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto auto_time_zone = 17 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto car_dock_sound = 18;
optional SettingProto car_undock_sound = 19;
optional SettingProto desk_dock_sound = 20;
optional SettingProto desk_undock_sound = 21;
- optional SettingProto dock_sounds_enabled = 22;
- optional SettingProto dock_sounds_enabled_when_accessibility = 23;
+ optional SettingProto dock_sounds_enabled = 22 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dock_sounds_enabled_when_accessibility = 23 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto lock_sound = 24;
optional SettingProto unlock_sound = 25;
optional SettingProto trusted_sound = 26;
optional SettingProto low_battery_sound = 27;
- optional SettingProto power_sounds_enabled = 28;
+ optional SettingProto power_sounds_enabled = 28 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto wireless_charging_started_sound = 29;
- optional SettingProto charging_sounds_enabled = 30;
- optional SettingProto stay_on_while_plugged_in = 31;
- optional SettingProto bugreport_in_power_menu = 32;
- optional SettingProto adb_enabled = 33;
- optional SettingProto debug_view_attributes = 34;
- optional SettingProto assisted_gps_enabled = 35;
- optional SettingProto bluetooth_on = 36;
- optional SettingProto cdma_cell_broadcast_sms = 37;
- optional SettingProto cdma_roaming_mode = 38;
- optional SettingProto cdma_subscription_mode = 39;
- optional SettingProto data_activity_timeout_mobile = 40;
- optional SettingProto data_activity_timeout_wifi = 41;
- optional SettingProto data_roaming = 42;
- optional SettingProto mdc_initial_max_retry = 43;
- optional SettingProto force_allow_on_external = 44;
- optional SettingProto euicc_provisioned = 294;
- optional SettingProto development_force_resizable_activities = 45;
- optional SettingProto development_enable_freeform_windows_support = 46;
- optional SettingProto development_settings_enabled = 47;
- optional SettingProto device_provisioned = 48;
- optional SettingProto device_provisioning_mobile_data_enabled = 49;
- optional SettingProto display_size_forced = 50;
- optional SettingProto display_scaling_force = 51;
- optional SettingProto download_max_bytes_over_mobile = 52;
- optional SettingProto download_recommended_max_bytes_over_mobile = 53;
- optional SettingProto hdmi_control_enabled = 54;
- optional SettingProto hdmi_system_audio_control_enabled = 55;
- optional SettingProto hdmi_control_auto_wakeup_enabled = 56;
- optional SettingProto hdmi_control_auto_device_off_enabled = 57;
- optional SettingProto location_background_throttle_interval_ms = 295;
- optional SettingProto location_background_throttle_proximity_alert_interval_ms = 296;
- optional SettingProto location_background_throttle_package_whitelist = 297;
- optional SettingProto wifi_scan_background_throttle_interval_ms = 298;
- optional SettingProto wifi_scan_background_throttle_package_whitelist = 299;
- optional SettingProto mhl_input_switching_enabled = 58;
- optional SettingProto mhl_power_charge_enabled = 59;
- optional SettingProto mobile_data = 60;
- optional SettingProto mobile_data_always_on = 61;
- optional SettingProto connectivity_metrics_buffer_size = 62;
- optional SettingProto netstats_enabled = 63;
- optional SettingProto netstats_poll_interval = 64;
- optional SettingProto netstats_time_cache_max_age = 65;
- optional SettingProto netstats_global_alert_bytes = 66;
- optional SettingProto netstats_sample_enabled = 67;
- optional SettingProto netstats_augment_enabled = 300;
- optional SettingProto netstats_dev_bucket_duration = 68;
- optional SettingProto netstats_dev_persist_bytes = 69;
- optional SettingProto netstats_dev_rotate_age = 70;
- optional SettingProto netstats_dev_delete_age = 71;
- optional SettingProto netstats_uid_bucket_duration = 72;
- optional SettingProto netstats_uid_persist_bytes = 73;
- optional SettingProto netstats_uid_rotate_age = 74;
- optional SettingProto netstats_uid_delete_age = 75;
- optional SettingProto netstats_uid_tag_bucket_duration = 76;
- optional SettingProto netstats_uid_tag_persist_bytes = 77;
- optional SettingProto netstats_uid_tag_rotate_age = 78;
- optional SettingProto netstats_uid_tag_delete_age = 79;
+ optional SettingProto charging_sounds_enabled = 30 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto stay_on_while_plugged_in = 31 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bugreport_in_power_menu = 32 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto adb_enabled = 33 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Whether views are allowed to save their attribute data.
+ optional SettingProto debug_view_attributes = 34 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto assisted_gps_enabled = 35 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_on = 36 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto cdma_cell_broadcast_sms = 37 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto cdma_roaming_mode = 38 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto cdma_subscription_mode = 39 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto data_activity_timeout_mobile = 40 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto data_activity_timeout_wifi = 41 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto data_roaming = 42 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto mdc_initial_max_retry = 43 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto force_allow_on_external = 44 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto euicc_provisioned = 294 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto development_force_resizable_activities = 45 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto development_enable_freeform_windows_support = 46 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto development_settings_enabled = 47 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto device_provisioned = 48 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto device_provisioning_mobile_data_enabled = 49 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto display_size_forced = 50 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto display_scaling_force = 51 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto download_max_bytes_over_mobile = 52 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto download_recommended_max_bytes_over_mobile = 53 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto hdmi_control_enabled = 54 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto hdmi_system_audio_control_enabled = 55 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto hdmi_control_auto_wakeup_enabled = 56 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto hdmi_control_auto_device_off_enabled = 57 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto location_background_throttle_interval_ms = 295 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto location_background_throttle_proximity_alert_interval_ms = 296 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Packages that are whitelisted for background throttling (throttling will
+ // not be applied).
+ optional SettingProto location_background_throttle_package_whitelist = 297 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_scan_background_throttle_interval_ms = 298 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_scan_background_throttle_package_whitelist = 299 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto mhl_input_switching_enabled = 58 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto mhl_power_charge_enabled = 59 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto mobile_data = 60 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto mobile_data_always_on = 61 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto connectivity_metrics_buffer_size = 62 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_enabled = 63 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_poll_interval = 64 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_time_cache_max_age = 65 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_global_alert_bytes = 66 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_sample_enabled = 67 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_augment_enabled = 300 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_dev_bucket_duration = 68 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_dev_persist_bytes = 69 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_dev_rotate_age = 70 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_dev_delete_age = 71 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_uid_bucket_duration = 72 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_uid_persist_bytes = 73 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_uid_rotate_age = 74 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_uid_delete_age = 75 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_uid_tag_bucket_duration = 76 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_uid_tag_persist_bytes = 77 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_uid_tag_rotate_age = 78 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto netstats_uid_tag_delete_age = 79 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // User preference for which network(s) should be used.
optional SettingProto network_preference = 80;
- optional SettingProto network_scorer_app = 81;
- optional SettingProto nitz_update_diff = 82;
- optional SettingProto nitz_update_spacing = 83;
+ optional SettingProto network_scorer_app = 81 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto nitz_update_diff = 82 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto nitz_update_spacing = 83 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto ntp_server = 84;
- optional SettingProto ntp_timeout = 85;
- optional SettingProto storage_benchmark_interval = 86;
- optional SettingProto dns_resolver_sample_validity_seconds = 87;
- optional SettingProto dns_resolver_success_threshold_percent = 88;
- optional SettingProto dns_resolver_min_samples = 89;
- optional SettingProto dns_resolver_max_samples = 90;
- optional SettingProto ota_disable_automatic_update = 91;
- optional SettingProto package_verifier_enable = 92;
- optional SettingProto package_verifier_timeout = 93;
+ optional SettingProto ntp_timeout = 85 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto storage_benchmark_interval = 86 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dns_resolver_sample_validity_seconds = 87 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dns_resolver_success_threshold_percent = 88 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dns_resolver_min_samples = 89 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dns_resolver_max_samples = 90 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Whether to disable the automatic scheduling of system updates.
+ optional SettingProto ota_disable_automatic_update = 91 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto package_verifier_enable = 92 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto package_verifier_timeout = 93 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto package_verifier_default_response = 94;
- optional SettingProto package_verifier_setting_visible = 95;
- optional SettingProto package_verifier_include_adb = 96;
- optional SettingProto fstrim_mandatory_interval = 97;
- optional SettingProto pdp_watchdog_poll_interval_ms = 98;
- optional SettingProto pdp_watchdog_long_poll_interval_ms = 99;
- optional SettingProto pdp_watchdog_error_poll_interval_ms = 100;
- optional SettingProto pdp_watchdog_trigger_packet_count = 101;
- optional SettingProto pdp_watchdog_error_poll_count = 102;
- optional SettingProto pdp_watchdog_max_pdp_reset_fail_count = 103;
+ optional SettingProto package_verifier_setting_visible = 95 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto package_verifier_include_adb = 96 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto fstrim_mandatory_interval = 97 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto pdp_watchdog_poll_interval_ms = 98 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto pdp_watchdog_long_poll_interval_ms = 99 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto pdp_watchdog_error_poll_interval_ms = 100 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto pdp_watchdog_trigger_packet_count = 101 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto pdp_watchdog_error_poll_count = 102 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto pdp_watchdog_max_pdp_reset_fail_count = 103 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto setup_prepaid_data_service_url = 105;
optional SettingProto setup_prepaid_detection_target_url = 106;
optional SettingProto setup_prepaid_detection_redir_host = 107;
- optional SettingProto sms_outgoing_check_interval_ms = 108;
- optional SettingProto sms_outgoing_check_max_count = 109;
- optional SettingProto sms_short_code_confirmation = 110;
- optional SettingProto sms_short_code_rule = 111;
- optional SettingProto tcp_default_init_rwnd = 112;
- optional SettingProto tether_supported = 113;
- optional SettingProto tether_dun_required = 114;
+ optional SettingProto sms_outgoing_check_interval_ms = 108 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sms_outgoing_check_max_count = 109 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Used to disable SMS short code confirmation. Defaults to true.
+ optional SettingProto sms_short_code_confirmation = 110 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sms_short_code_rule = 111 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto tcp_default_init_rwnd = 112 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto tether_supported = 113 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto tether_dun_required = 114 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto tether_dun_apn = 115;
- optional SettingProto tether_offload_disabled = 301;
- optional SettingProto carrier_app_whitelist = 116;
- optional SettingProto usb_mass_storage_enabled = 117;
- optional SettingProto use_google_mail = 118;
+ optional SettingProto tether_offload_disabled = 301 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // List of carrier apps which are whitelisted to prompt the user for install
+ // when a SIM card with marchin UICC carrier privilege rules is inserted.
+ optional SettingProto carrier_app_whitelist = 116 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto usb_mass_storage_enabled = 117 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto use_google_mail = 118 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto webview_data_reduction_proxy_key = 119;
- optional SettingProto webview_fallback_logic_enabled = 120;
- optional SettingProto webview_provider = 121;
- optional SettingProto webview_multiprocess = 122;
- optional SettingProto network_switch_notification_daily_limit = 123;
- optional SettingProto network_switch_notification_rate_limit_millis = 124;
- optional SettingProto network_avoid_bad_wifi = 125;
- optional SettingProto network_metered_multipath_preference = 302;
- optional SettingProto network_watchlist_last_report_time = 303;
- optional SettingProto wifi_badging_thresholds = 304;
- optional SettingProto wifi_display_on = 126;
- optional SettingProto wifi_display_certification_on = 127;
- optional SettingProto wifi_display_wps_config = 128;
- optional SettingProto wifi_networks_available_notification_on = 129;
- optional SettingProto wimax_networks_available_notification_on = 130;
- optional SettingProto wifi_networks_available_repeat_delay = 131;
+ optional SettingProto webview_fallback_logic_enabled = 120 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Name of the package used as WebView provider.
+ optional SettingProto webview_provider = 121 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto webview_multiprocess = 122 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto network_switch_notification_daily_limit = 123 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto network_switch_notification_rate_limit_millis = 124 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto network_avoid_bad_wifi = 125 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto network_metered_multipath_preference = 302 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto network_watchlist_last_report_time = 303 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_badging_thresholds = 304 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_display_on = 126 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_display_certification_on = 127 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_display_wps_config = 128 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_networks_available_notification_on = 129 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wimax_networks_available_notification_on = 130 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_networks_available_repeat_delay = 131 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto wifi_country_code = 132;
- optional SettingProto wifi_framework_scan_interval_ms = 133;
- optional SettingProto wifi_idle_ms = 134;
- optional SettingProto wifi_num_open_networks_kept = 135;
- optional SettingProto wifi_on = 136;
- optional SettingProto wifi_scan_always_available = 137;
- optional SettingProto wifi_wakeup_enabled = 138;
- optional SettingProto wifi_wakeup_available = 305;
- optional SettingProto network_scoring_ui_enabled = 306;
- optional SettingProto speed_label_cache_eviction_age_millis = 307;
- optional SettingProto recommended_network_evaluator_cache_expiry_ms = 308;
- optional SettingProto network_recommendations_enabled = 139;
- optional SettingProto network_recommendations_package = 286;
- optional SettingProto use_open_wifi_package = 309;
- optional SettingProto network_recommendation_request_timeout_ms = 310;
- optional SettingProto ble_scan_always_available = 140;
- optional SettingProto wifi_saved_state = 141;
- optional SettingProto wifi_supplicant_scan_interval_ms = 142;
- optional SettingProto wifi_enhanced_auto_join = 143;
- optional SettingProto wifi_network_show_rssi = 144;
- optional SettingProto wifi_scan_interval_when_p2p_connected_ms = 145;
- optional SettingProto wifi_watchdog_on = 146;
- optional SettingProto wifi_watchdog_poor_network_test_enabled = 147;
- optional SettingProto wifi_suspend_optimizations_enabled = 148;
- optional SettingProto wifi_verbose_logging_enabled = 149;
- optional SettingProto wifi_max_dhcp_retry_count = 150;
- optional SettingProto wifi_mobile_data_transition_wakelock_timeout_ms = 151;
- optional SettingProto wifi_device_owner_configs_lockdown = 152;
- optional SettingProto wifi_frequency_band = 153;
+ optional SettingProto wifi_framework_scan_interval_ms = 133 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_idle_ms = 134 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_num_open_networks_kept = 135 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_on = 136 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_scan_always_available = 137 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_wakeup_enabled = 138 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_wakeup_available = 305 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto network_scoring_ui_enabled = 306 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto speed_label_cache_eviction_age_millis = 307 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto recommended_network_evaluator_cache_expiry_ms = 308 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto network_recommendations_enabled = 139 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto network_recommendations_package = 286 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto use_open_wifi_package = 309 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto network_recommendation_request_timeout_ms = 310 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto ble_scan_always_available = 140 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_saved_state = 141 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_supplicant_scan_interval_ms = 142 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_enhanced_auto_join = 143 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_network_show_rssi = 144 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_scan_interval_when_p2p_connected_ms = 145 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_watchdog_on = 146 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_watchdog_poor_network_test_enabled = 147 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_suspend_optimizations_enabled = 148 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_verbose_logging_enabled = 149 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_connected_mac_randomization_enabled = 350 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_max_dhcp_retry_count = 150 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_mobile_data_transition_wakelock_timeout_ms = 151 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_device_owner_configs_lockdown = 152 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_frequency_band = 153 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto wifi_p2p_device_name = 154;
- optional SettingProto wifi_reenable_delay_ms = 155;
- optional SettingProto wifi_ephemeral_out_of_range_timeout_ms = 156;
- optional SettingProto data_stall_alarm_non_aggressive_delay_in_ms = 157;
- optional SettingProto data_stall_alarm_aggressive_delay_in_ms = 158;
- optional SettingProto provisioning_apn_alarm_delay_in_ms = 159;
- optional SettingProto gprs_register_check_period_ms = 160;
- optional SettingProto wtf_is_fatal = 161;
- optional SettingProto mode_ringer = 162;
- optional SettingProto overlay_display_devices = 163;
- optional SettingProto battery_discharge_duration_threshold = 164;
- optional SettingProto battery_discharge_threshold = 165;
- optional SettingProto send_action_app_error = 166;
- optional SettingProto dropbox_age_seconds = 167;
- optional SettingProto dropbox_max_files = 168;
- optional SettingProto dropbox_quota_kb = 169;
- optional SettingProto dropbox_quota_percent = 170;
- optional SettingProto dropbox_reserve_percent = 171;
- optional SettingProto dropbox_tag_prefix = 172;
- optional SettingProto error_logcat_prefix = 173;
- optional SettingProto sys_free_storage_log_interval = 174;
- optional SettingProto disk_free_change_reporting_threshold = 175;
- optional SettingProto sys_storage_threshold_percentage = 176;
- optional SettingProto sys_storage_threshold_max_bytes = 177;
- optional SettingProto sys_storage_full_threshold_bytes = 178;
- optional SettingProto sys_storage_cache_percentage = 311;
- optional SettingProto sys_storage_cache_max_bytes = 312;
- optional SettingProto sync_max_retry_delay_in_seconds = 179;
- optional SettingProto connectivity_change_delay = 180;
- optional SettingProto connectivity_sampling_interval_in_seconds = 181;
- optional SettingProto pac_change_delay = 182;
- optional SettingProto captive_portal_mode = 183;
- optional SettingProto captive_portal_detection_enabled = 313;
+ optional SettingProto wifi_reenable_delay_ms = 155 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_ephemeral_out_of_range_timeout_ms = 156 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto data_stall_alarm_non_aggressive_delay_in_ms = 157 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto data_stall_alarm_aggressive_delay_in_ms = 158 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto provisioning_apn_alarm_delay_in_ms = 159 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto gprs_register_check_period_ms = 160 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wtf_is_fatal = 161 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Ringer mode. A change in this value will not reflect as a change in the
+ // ringer mode.
+ optional SettingProto mode_ringer = 162 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Overlay display devices setting.
+ // The value is a specially formatted string that describes the size and
+ // density of simulated secondary devices.
+ // Format: {width}x{height}/dpi;...
+ optional SettingProto overlay_display_devices = 163 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto battery_discharge_duration_threshold = 164 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto battery_discharge_threshold = 165 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto send_action_app_error = 166 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dropbox_age_seconds = 167 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dropbox_max_files = 168 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dropbox_quota_kb = 169 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dropbox_quota_percent = 170 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dropbox_reserve_percent = 171 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dropbox_tag_prefix = 172 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto error_logcat_prefix = 173 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sys_free_storage_log_interval = 174 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto disk_free_change_reporting_threshold = 175 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sys_storage_threshold_percentage = 176 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sys_storage_threshold_max_bytes = 177 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sys_storage_full_threshold_bytes = 178 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sys_storage_cache_percentage = 311 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sys_storage_cache_max_bytes = 312 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sync_max_retry_delay_in_seconds = 179 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto connectivity_change_delay = 180 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto connectivity_sampling_interval_in_seconds = 181 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto pac_change_delay = 182 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto captive_portal_mode = 183 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto captive_portal_detection_enabled = 313 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto captive_portal_server = 184;
optional SettingProto captive_portal_https_url = 185;
optional SettingProto captive_portal_http_url = 186;
optional SettingProto captive_portal_fallback_url = 187;
optional SettingProto captive_portal_other_fallback_urls = 314;
- optional SettingProto captive_portal_use_https = 188;
+ optional SettingProto captive_portal_use_https = 188 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto captive_portal_user_agent = 189;
- optional SettingProto nsd_on = 190;
- optional SettingProto set_install_location = 191;
- optional SettingProto default_install_location = 192;
- optional SettingProto inet_condition_debounce_up_delay = 193;
- optional SettingProto inet_condition_debounce_down_delay = 194;
- optional SettingProto read_external_storage_enforced_default = 195;
+ optional SettingProto nsd_on = 190 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Let user pick default install location.
+ optional SettingProto set_install_location = 191 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto default_install_location = 192 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto inet_condition_debounce_up_delay = 193 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto inet_condition_debounce_down_delay = 194 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto read_external_storage_enforced_default = 195 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto http_proxy = 196;
optional SettingProto global_http_proxy_host = 197;
optional SettingProto global_http_proxy_port = 198;
optional SettingProto global_http_proxy_exclusion_list = 199;
optional SettingProto global_http_proxy_pac = 200;
- optional SettingProto set_global_http_proxy = 201;
+ // Enables the UI setting to allow the user to specify the global HTTP proxy
+ // and associated exclusion list.
+ optional SettingProto set_global_http_proxy = 201 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto default_dns_server = 202;
// The requested Private DNS mode and an accompanying specifier.
optional SettingProto private_dns_mode = 315;
optional SettingProto private_dns_specifier = 316;
- optional SettingProto bluetooth_headset_priority_prefix = 203;
- optional SettingProto bluetooth_a2dp_sink_priority_prefix = 204;
- optional SettingProto bluetooth_a2dp_src_priority_prefix = 205;
- optional SettingProto bluetooth_a2dp_supports_optional_codecs_prefix = 287;
- optional SettingProto bluetooth_a2dp_optional_codecs_enabled_prefix = 288;
- optional SettingProto bluetooth_input_device_priority_prefix = 206;
- optional SettingProto bluetooth_map_priority_prefix = 207;
- optional SettingProto bluetooth_map_client_priority_prefix = 208;
- optional SettingProto bluetooth_pbap_client_priority_prefix = 209;
- optional SettingProto bluetooth_sap_priority_prefix = 210;
- optional SettingProto bluetooth_pan_priority_prefix = 211;
- optional SettingProto bluetooth_hearing_aid_priority_prefix = 345;
+ optional SettingProto bluetooth_headset_priority_prefix = 203 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_a2dp_sink_priority_prefix = 204 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_a2dp_src_priority_prefix = 205 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_a2dp_supports_optional_codecs_prefix = 287 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_a2dp_optional_codecs_enabled_prefix = 288 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_input_device_priority_prefix = 206 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_map_priority_prefix = 207 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_map_client_priority_prefix = 208 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_pbap_client_priority_prefix = 209 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_sap_priority_prefix = 210 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_pan_priority_prefix = 211 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_hearing_aid_priority_prefix = 345 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto activity_manager_constants = 317;
optional SettingProto device_idle_constants = 212;
optional SettingProto device_idle_constants_watch = 213;
@@ -295,26 +321,28 @@
optional SettingProto shortcut_manager_constants = 217;
optional SettingProto device_policy_constants = 322;
optional SettingProto text_classifier_constants = 323;
- optional SettingProto window_animation_scale = 218;
- optional SettingProto transition_animation_scale = 219;
- optional SettingProto animator_duration_scale = 220;
- optional SettingProto fancy_ime_animations = 221;
- optional SettingProto compatibility_mode = 222;
- optional SettingProto emergency_tone = 223;
- optional SettingProto call_auto_retry = 224;
- optional SettingProto emergency_affordance_needed = 225;
- optional SettingProto preferred_network_mode = 226;
+ optional SettingProto window_animation_scale = 218 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto transition_animation_scale = 219 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto animator_duration_scale = 220 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto fancy_ime_animations = 221 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto compatibility_mode = 222 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto emergency_tone = 223 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto call_auto_retry = 224 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto emergency_affordance_needed = 225 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto preferred_network_mode = 226 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Name of an application package to be debugged.
optional SettingProto debug_app = 227;
- optional SettingProto wait_for_debugger = 228;
- optional SettingProto enable_gpu_debug_layers = 342;
+ optional SettingProto wait_for_debugger = 228 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto enable_gpu_debug_layers = 342 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // App allowed to load GPU debug layers.
optional SettingProto gpu_debug_app = 343;
- optional SettingProto gpu_debug_layers = 344;
- optional SettingProto low_power_mode = 229;
- optional SettingProto low_power_mode_trigger_level = 230;
- optional SettingProto always_finish_activities = 231;
- optional SettingProto dock_audio_media_enabled = 232;
- optional SettingProto encoded_surround_output = 233;
- optional SettingProto audio_safe_volume_state = 234;
+ optional SettingProto gpu_debug_layers = 344 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto low_power_mode = 229 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto low_power_mode_trigger_level = 230 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto always_finish_activities = 231 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dock_audio_media_enabled = 232 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto encoded_surround_output = 233 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto audio_safe_volume_state = 234 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto tzinfo_update_content_url = 235;
optional SettingProto tzinfo_update_metadata_url = 236;
optional SettingProto selinux_update_content_url = 237;
@@ -331,304 +359,349 @@
optional SettingProto lang_id_update_metadata_url = 325;
optional SettingProto smart_selection_update_content_url = 326;
optional SettingProto smart_selection_update_metadata_url = 327;
- optional SettingProto selinux_status = 247;
- optional SettingProto development_force_rtl = 248;
- optional SettingProto low_battery_sound_timeout = 249;
- optional SettingProto wifi_bounce_delay_override_ms = 250;
- optional SettingProto policy_control = 251;
- optional SettingProto zen_mode = 252;
- optional SettingProto zen_mode_ringer_level = 253;
+ optional SettingProto selinux_status = 247 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto development_force_rtl = 248 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto low_battery_sound_timeout = 249 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wifi_bounce_delay_override_ms = 250 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto policy_control = 251 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto zen_mode = 252 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto zen_mode_ringer_level = 253 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto zen_mode_config_etag = 254;
- optional SettingProto heads_up_notifications_enabled = 255;
+ optional SettingProto heads_up_notifications_enabled = 255 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto device_name = 256;
- optional SettingProto network_scoring_provisioned = 257;
- optional SettingProto require_password_to_decrypt = 258;
- optional SettingProto enhanced_4g_mode_enabled = 259;
- optional SettingProto vt_ims_enabled = 260;
- optional SettingProto wfc_ims_enabled = 261;
- optional SettingProto wfc_ims_mode = 262;
- optional SettingProto wfc_ims_roaming_mode = 263;
- optional SettingProto wfc_ims_roaming_enabled = 264;
- optional SettingProto lte_service_forced = 265;
- optional SettingProto ephemeral_cookie_max_size_bytes = 266;
- optional SettingProto enable_ephemeral_feature = 267;
- optional SettingProto instant_app_dexopt_enabled = 328;
- optional SettingProto installed_instant_app_min_cache_period = 268;
- optional SettingProto installed_instant_app_max_cache_period = 289;
- optional SettingProto uninstalled_instant_app_min_cache_period = 290;
- optional SettingProto uninstalled_instant_app_max_cache_period = 291;
- optional SettingProto unused_static_shared_lib_min_cache_period = 292;
- optional SettingProto allow_user_switching_when_system_user_locked = 269;
- optional SettingProto boot_count = 270;
- optional SettingProto safe_boot_disallowed = 271;
- optional SettingProto device_demo_mode = 272;
- optional SettingProto network_access_timeout_ms = 329;
+ optional SettingProto network_scoring_provisioned = 257 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto require_password_to_decrypt = 258 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto enhanced_4g_mode_enabled = 259 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto vt_ims_enabled = 260 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wfc_ims_enabled = 261 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wfc_ims_mode = 262 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wfc_ims_roaming_mode = 263 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wfc_ims_roaming_enabled = 264 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto lte_service_forced = 265 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto ephemeral_cookie_max_size_bytes = 266 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto enable_ephemeral_feature = 267 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto instant_app_dexopt_enabled = 328 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto installed_instant_app_min_cache_period = 268 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto installed_instant_app_max_cache_period = 289 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto uninstalled_instant_app_min_cache_period = 290 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto uninstalled_instant_app_max_cache_period = 291 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto unused_static_shared_lib_min_cache_period = 292 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto allow_user_switching_when_system_user_locked = 269 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto boot_count = 270 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto safe_boot_disallowed = 271 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto device_demo_mode = 272 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto network_access_timeout_ms = 329 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto database_downgrade_reason = 274;
- optional SettingProto database_creation_buildid = 330;
- optional SettingProto contacts_database_wal_enabled = 275;
- optional SettingProto location_settings_link_to_permissions_enabled = 331;
+ optional SettingProto database_creation_buildid = 330 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto contacts_database_wal_enabled = 275 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto location_settings_link_to_permissions_enabled = 331 [ (android.privacy).dest = DEST_AUTOMATIC ];
reserved 332; // Removed backup_refactored_service_disabled
- optional SettingProto euicc_factory_reset_timeout_millis = 333;
- optional SettingProto storage_settings_clobber_threshold = 334;
- optional SettingProto multi_sim_voice_call_subscription = 276;
- optional SettingProto multi_sim_voice_prompt = 277;
- optional SettingProto multi_sim_data_call_subscription = 278;
- optional SettingProto multi_sim_sms_subscription = 279;
- optional SettingProto multi_sim_sms_prompt = 280;
- optional SettingProto new_contact_aggregator = 281;
- optional SettingProto contact_metadata_sync_enabled = 282;
- optional SettingProto enable_cellular_on_boot = 283;
- optional SettingProto max_notification_enqueue_rate = 284;
- optional SettingProto show_notification_channel_warnings = 335;
- optional SettingProto cell_on = 285;
- optional SettingProto show_temperature_warning = 336;
- optional SettingProto warning_temperature = 337;
- optional SettingProto enable_diskstats_logging = 338;
- optional SettingProto enable_cache_quota_calculation = 339;
- optional SettingProto enable_deletion_helper_no_threshold_toggle = 340;
- optional SettingProto notification_snooze_options = 341;
- optional SettingProto enable_gnss_raw_meas_full_tracking = 346;
- optional SettingProto zram_enabled = 347;
- optional SettingProto enable_smart_replies_in_notifications = 348;
- optional SettingProto show_first_crash_dialog = 349;
- optional SettingProto wifi_connected_mac_randomization_enabled = 350;
+ optional SettingProto euicc_factory_reset_timeout_millis = 333 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto storage_settings_clobber_threshold = 334 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto chained_battery_attribution_enabled = 353 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Subscription to be used for voice call on a multi sim device. The
+ // supported values are 0 = SUB1, 1 = SUB2 and etc.
+ optional SettingProto multi_sim_voice_call_subscription = 276 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto multi_sim_voice_prompt = 277 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto multi_sim_data_call_subscription = 278 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto multi_sim_sms_subscription = 279 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto multi_sim_sms_prompt = 280 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Whether to enable new contacts aggregator or not.
+ // 1 = enable, 0 = disable.
+ optional SettingProto new_contact_aggregator = 281 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto contact_metadata_sync_enabled = 282 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto enable_cellular_on_boot = 283 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto max_notification_enqueue_rate = 284 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto show_notification_channel_warnings = 335 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto cell_on = 285 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto show_temperature_warning = 336 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto warning_temperature = 337 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto enable_diskstats_logging = 338 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto enable_cache_quota_calculation = 339 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto enable_deletion_helper_no_threshold_toggle = 340 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto notification_snooze_options = 341 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto enable_gnss_raw_meas_full_tracking = 346 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto zram_enabled = 347 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto enable_smart_replies_in_notifications = 348 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto show_first_crash_dialog = 349 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto show_restart_in_crash_dialog = 351 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto show_mute_in_crash_dialog = 352 [ (android.privacy).dest = DEST_AUTOMATIC ];
- // Next tag = 351;
+ // Please insert fields in the same order as in
+ // frameworks/base/core/java/android/provider/Settings.java.
+ // Next tag = 354;
}
message SecureSettingsProto {
+ option (android.msg_privacy).dest = DEST_EXPLICIT;
+
repeated SettingsOperationProto historical_operations = 1;
optional SettingProto android_id = 2;
- optional SettingProto default_input_method = 3;
- optional SettingProto selected_input_method_subtype = 4;
- optional SettingProto input_methods_subtype_history = 5;
- optional SettingProto input_method_selector_visibility = 6;
- optional SettingProto voice_interaction_service = 7;
- optional SettingProto autofill_service = 8;
+ optional SettingProto default_input_method = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto selected_input_method_subtype = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto input_methods_subtype_history = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto input_method_selector_visibility = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // The currently selected voice interaction service flattened ComponentName.
+ optional SettingProto voice_interaction_service = 7 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // The currently selected autofill service flattened ComponentName.
+ optional SettingProto autofill_service = 8 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto bluetooth_hci_log = 9;
- optional SettingProto user_setup_complete = 10;
+ optional SettingProto user_setup_complete = 10 [ (android.privacy).dest = DEST_AUTOMATIC ];
// Whether the current user has been set up via setup wizard (0 = false,
// 1 = true). This value differs from USER_SETUP_COMPLETE in that it can be
// reset back to 0 in case SetupWizard has been re-enabled on TV devices.
- optional SettingProto tv_user_setup_complete = 170;
- optional SettingProto completed_category_prefix = 11;
- optional SettingProto enabled_input_methods = 12;
- optional SettingProto disabled_system_input_methods = 13;
- optional SettingProto show_ime_with_hard_keyboard = 14;
+ optional SettingProto tv_user_setup_complete = 170 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto completed_category_prefix = 11 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto enabled_input_methods = 12 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto disabled_system_input_methods = 13 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto show_ime_with_hard_keyboard = 14 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto always_on_vpn_app = 15;
- optional SettingProto always_on_vpn_lockdown = 16;
- optional SettingProto install_non_market_apps = 17;
- optional SettingProto unknown_sources_default_reversed = 171;
- optional SettingProto location_mode = 18;
+ optional SettingProto always_on_vpn_lockdown = 16 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto install_non_market_apps = 17 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto unknown_sources_default_reversed = 171 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // The degree of location access enabled by the user.
+ optional SettingProto location_mode = 18 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto location_previous_mode = 19;
- optional SettingProto lock_to_app_exit_locked = 20;
- optional SettingProto lock_screen_lock_after_timeout = 21;
- optional SettingProto lock_screen_allow_private_notifications = 172;
- optional SettingProto lock_screen_allow_remote_input = 22;
- optional SettingProto show_note_about_notification_hiding = 23;
- optional SettingProto trust_agents_initialized = 24;
- optional SettingProto parental_control_enabled = 25;
- optional SettingProto parental_control_last_update = 26;
- optional SettingProto parental_control_redirect_url = 27;
- optional SettingProto settings_classname = 28;
- optional SettingProto accessibility_enabled = 29;
- optional SettingProto accessibility_shortcut_enabled = 173;
- optional SettingProto accessibility_shortcut_on_lock_screen = 174;
- optional SettingProto accessibility_shortcut_dialog_shown = 175;
- optional SettingProto accessibility_shortcut_target_service = 176;
- optional SettingProto accessibility_button_target_component = 177;
- optional SettingProto touch_exploration_enabled = 30;
+ // Whether lock-to-app will lock the keyguard when exiting.
+ optional SettingProto lock_to_app_exit_locked = 20 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto lock_screen_lock_after_timeout = 21 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto lock_screen_allow_private_notifications = 172 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto lock_screen_allow_remote_input = 22 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto show_note_about_notification_hiding = 23 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto trust_agents_initialized = 24 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto parental_control_enabled = 25 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto parental_control_last_update = 26 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto parental_control_redirect_url = 27 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto settings_classname = 28 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_enabled = 29 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_shortcut_enabled = 173 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_shortcut_on_lock_screen = 174 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_shortcut_dialog_shown = 175 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_shortcut_target_service = 176 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Setting specifying the accessibility service or feature to be toggled via
+ // the accessibility button in the navigation bar. This is either a
+ // flattened ComponentName or the class name of a system class implementing
+ // a supported accessibility feature.
+ optional SettingProto accessibility_button_target_component = 177 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto touch_exploration_enabled = 30 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // List of the enabled accessibility providers.
optional SettingProto enabled_accessibility_services = 31;
+ // List of the accessibility services to which the user has granted
+ // permission to put the device into touch exploration mode.
optional SettingProto touch_exploration_granted_accessibility_services = 32;
- optional SettingProto accessibility_speak_password = 33;
- optional SettingProto accessibility_high_text_contrast_enabled = 34;
+ // Whether to speak passwords while in accessibility mode.
+ optional SettingProto accessibility_speak_password = 33 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_high_text_contrast_enabled = 34 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto accessibility_script_injection = 35;
optional SettingProto accessibility_screen_reader_url = 36;
optional SettingProto accessibility_web_content_key_bindings = 37;
- optional SettingProto accessibility_display_magnification_enabled = 38;
- optional SettingProto accessibility_display_magnification_navbar_enabled = 178;
- optional SettingProto accessibility_display_magnification_scale = 39;
- optional SettingProto accessibility_display_magnification_auto_update = 179;
- optional SettingProto accessibility_soft_keyboard_mode = 40;
- optional SettingProto accessibility_captioning_enabled = 41;
- optional SettingProto accessibility_captioning_locale = 42;
- optional SettingProto accessibility_captioning_preset = 43;
- optional SettingProto accessibility_captioning_background_color = 44;
- optional SettingProto accessibility_captioning_foreground_color = 45;
- optional SettingProto accessibility_captioning_edge_type = 46;
- optional SettingProto accessibility_captioning_edge_color = 47;
- optional SettingProto accessibility_captioning_window_color = 48;
- optional SettingProto accessibility_captioning_typeface = 49;
- optional SettingProto accessibility_captioning_font_scale = 50;
- optional SettingProto accessibility_display_inversion_enabled = 51;
- optional SettingProto accessibility_display_daltonizer_enabled = 52;
- optional SettingProto accessibility_display_daltonizer = 53;
- optional SettingProto accessibility_autoclick_enabled = 54;
- optional SettingProto accessibility_autoclick_delay = 55;
- optional SettingProto accessibility_large_pointer_icon = 56;
- optional SettingProto long_press_timeout = 57;
- optional SettingProto multi_press_timeout = 58;
+ optional SettingProto accessibility_display_magnification_enabled = 38 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_display_magnification_navbar_enabled = 178 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_display_magnification_scale = 39 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_display_magnification_auto_update = 179 [deprecated = true];
+ optional SettingProto accessibility_soft_keyboard_mode = 40 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_captioning_enabled = 41 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_captioning_locale = 42 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_captioning_preset = 43 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_captioning_background_color = 44 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_captioning_foreground_color = 45 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_captioning_edge_type = 46 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_captioning_edge_color = 47 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_captioning_window_color = 48 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_captioning_typeface = 49 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_captioning_font_scale = 50 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_display_inversion_enabled = 51 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_display_daltonizer_enabled = 52 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_display_daltonizer = 53 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_autoclick_enabled = 54 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_autoclick_delay = 55 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accessibility_large_pointer_icon = 56 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto long_press_timeout = 57 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto multi_press_timeout = 58 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto enabled_print_services = 59;
optional SettingProto disabled_print_services = 60;
- optional SettingProto display_density_forced = 61;
- optional SettingProto tts_default_rate = 62;
- optional SettingProto tts_default_pitch = 63;
- optional SettingProto tts_default_synth = 64;
- optional SettingProto tts_default_locale = 65;
+ optional SettingProto display_density_forced = 61 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto tts_default_rate = 62 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto tts_default_pitch = 63 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto tts_default_synth = 64 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto tts_default_locale = 65 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto tts_enabled_plugins = 66;
- optional SettingProto connectivity_release_pending_intent_delay_ms = 67;
+ optional SettingProto connectivity_release_pending_intent_delay_ms = 67 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto allowed_geolocation_origins = 68;
- optional SettingProto preferred_tty_mode = 69;
- optional SettingProto enhanced_voice_privacy_enabled = 70;
- optional SettingProto tty_mode_enabled = 71;
- optional SettingProto backup_enabled = 72;
- optional SettingProto backup_auto_restore = 73;
- optional SettingProto backup_provisioned = 74;
- optional SettingProto backup_transport = 75;
- optional SettingProto last_setup_shown = 76;
- optional SettingProto search_global_search_activity = 77;
- optional SettingProto search_num_promoted_sources = 78;
- optional SettingProto search_max_results_to_display = 79;
- optional SettingProto search_max_results_per_source = 80;
- optional SettingProto search_web_results_override_limit = 81;
- optional SettingProto search_promoted_source_deadline_millis = 82;
- optional SettingProto search_source_timeout_millis = 83;
- optional SettingProto search_prefill_millis = 84;
- optional SettingProto search_max_stat_age_millis = 85;
- optional SettingProto search_max_source_event_age_millis = 86;
- optional SettingProto search_min_impressions_for_source_ranking = 87;
- optional SettingProto search_min_clicks_for_source_ranking = 88;
- optional SettingProto search_max_shortcuts_returned = 89;
- optional SettingProto search_query_thread_core_pool_size = 90;
- optional SettingProto search_query_thread_max_pool_size = 91;
- optional SettingProto search_shortcut_refresh_core_pool_size = 92;
- optional SettingProto search_shortcut_refresh_max_pool_size = 93;
- optional SettingProto search_thread_keepalive_seconds = 94;
- optional SettingProto search_per_source_concurrent_query_limit = 95;
- optional SettingProto mount_play_notification_snd = 96;
- optional SettingProto mount_ums_autostart = 97;
- optional SettingProto mount_ums_prompt = 98;
- optional SettingProto mount_ums_notify_enabled = 99;
- optional SettingProto anr_show_background = 100;
- optional SettingProto voice_recognition_service = 101;
- optional SettingProto package_verifier_user_consent = 102;
- optional SettingProto selected_spell_checker = 103;
- optional SettingProto selected_spell_checker_subtype = 104;
- optional SettingProto spell_checker_enabled = 105;
- optional SettingProto incall_power_button_behavior = 106;
- optional SettingProto incall_back_button_behavior = 107;
- optional SettingProto wake_gesture_enabled = 108;
- optional SettingProto doze_enabled = 109;
- optional SettingProto doze_always_on = 110;
- optional SettingProto doze_pulse_on_pick_up = 111;
- optional SettingProto doze_pulse_on_long_press = 180;
- optional SettingProto doze_pulse_on_double_tap = 112;
- optional SettingProto ui_night_mode = 113;
- optional SettingProto screensaver_enabled = 114;
- optional SettingProto screensaver_components = 115;
- optional SettingProto screensaver_activate_on_dock = 116;
- optional SettingProto screensaver_activate_on_sleep = 117;
- optional SettingProto screensaver_default_component = 118;
- optional SettingProto nfc_payment_default_component = 119;
- optional SettingProto nfc_payment_foreground = 120;
- optional SettingProto sms_default_application = 121;
- optional SettingProto dialer_default_application = 122;
- optional SettingProto emergency_assistance_application = 123;
- optional SettingProto assist_structure_enabled = 124;
- optional SettingProto assist_screenshot_enabled = 125;
- optional SettingProto assist_disclosure_enabled = 126;
- optional SettingProto enabled_notification_assistant = 127;
- optional SettingProto enabled_notification_listeners = 128;
- optional SettingProto enabled_notification_policy_access_packages = 129;
- optional SettingProto sync_parent_sounds = 130;
- optional SettingProto immersive_mode_confirmations = 131;
- optional SettingProto print_service_search_uri = 132;
- optional SettingProto payment_service_search_uri = 133;
- optional SettingProto autofill_service_search_uri = 181;
- optional SettingProto skip_first_use_hints = 134;
- optional SettingProto unsafe_volume_music_active_ms = 135;
- optional SettingProto lock_screen_show_notifications = 136;
+ optional SettingProto preferred_tty_mode = 69 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto enhanced_voice_privacy_enabled = 70 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto tty_mode_enabled = 71 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto backup_enabled = 72 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto backup_auto_restore = 73 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto backup_provisioned = 74 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto backup_transport = 75 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto last_setup_shown = 76 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_global_search_activity = 77 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_num_promoted_sources = 78 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_max_results_to_display = 79 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_max_results_per_source = 80 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_web_results_override_limit = 81 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_promoted_source_deadline_millis = 82 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_source_timeout_millis = 83 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_prefill_millis = 84 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_max_stat_age_millis = 85 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_max_source_event_age_millis = 86 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_min_impressions_for_source_ranking = 87 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_min_clicks_for_source_ranking = 88 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_max_shortcuts_returned = 89 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_query_thread_core_pool_size = 90 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_query_thread_max_pool_size = 91 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_shortcut_refresh_core_pool_size = 92 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_shortcut_refresh_max_pool_size = 93 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_thread_keepalive_seconds = 94 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto search_per_source_concurrent_query_limit = 95 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Whether or not alert sounds are played on StorageManagerService events.
+ optional SettingProto mount_play_notification_snd = 96 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto mount_ums_autostart = 97 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto mount_ums_prompt = 98 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto mount_ums_notify_enabled = 99 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto anr_show_background = 100 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // The ComponentName string of the service to be used as the voice
+ // recognition service.
+ optional SettingProto voice_recognition_service = 101 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto package_verifier_user_consent = 102 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto selected_spell_checker = 103 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto selected_spell_checker_subtype = 104 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto spell_checker_enabled = 105 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto incall_power_button_behavior = 106 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto incall_back_button_behavior = 107 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto wake_gesture_enabled = 108 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto doze_enabled = 109 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto doze_always_on = 110 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto doze_pulse_on_pick_up = 111 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto doze_pulse_on_long_press = 180 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto doze_pulse_on_double_tap = 112 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto ui_night_mode = 113 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto screensaver_enabled = 114 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto screensaver_components = 115 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto screensaver_activate_on_dock = 116 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto screensaver_activate_on_sleep = 117 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto screensaver_default_component = 118 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto nfc_payment_default_component = 119 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto nfc_payment_foreground = 120 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sms_default_application = 121 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dialer_default_application = 122 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto emergency_assistance_application = 123 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto assist_structure_enabled = 124 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto assist_screenshot_enabled = 125 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto assist_disclosure_enabled = 126 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Read only list of the service components that the current user has
+ // explicitly allowed to see and assist with all of the user's
+ // notifications.
+ optional SettingProto enabled_notification_assistant = 127 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto enabled_notification_listeners = 128 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto enabled_notification_policy_access_packages = 129 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Defines whether managed profile ringtones should be synced from its
+ // parent profile.
+ optional SettingProto sync_parent_sounds = 130 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto immersive_mode_confirmations = 131 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // The query URI to find a print service to install.
+ optional SettingProto print_service_search_uri = 132 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // The query URI to find an NFC service to install.
+ optional SettingProto payment_service_search_uri = 133 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // The query URI to find an auto fill service to install.
+ optional SettingProto autofill_service_search_uri = 181 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto skip_first_use_hints = 134 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto unsafe_volume_music_active_ms = 135 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto lock_screen_show_notifications = 136 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto tv_input_hidden_inputs = 137;
optional SettingProto tv_input_custom_labels = 138;
- optional SettingProto usb_audio_automatic_routing_disabled = 139;
- optional SettingProto sleep_timeout = 140;
- optional SettingProto double_tap_to_wake = 141;
- optional SettingProto assistant = 142;
- optional SettingProto camera_gesture_disabled = 143;
- optional SettingProto camera_double_tap_power_gesture_disabled = 144;
- optional SettingProto camera_double_twist_to_flip_enabled = 145;
- optional SettingProto camera_lift_trigger_enabled = 182;
- optional SettingProto assist_gesture_enabled = 183;
- optional SettingProto assist_gesture_sensitivity = 184;
- optional SettingProto assist_gesture_silence_alerts_enabled = 185;
- optional SettingProto assist_gesture_wake_enabled = 186;
- optional SettingProto assist_gesture_setup_complete = 187;
- optional SettingProto night_display_activated = 146;
- optional SettingProto night_display_auto_mode = 147;
- optional SettingProto night_display_color_temperature = 188;
- optional SettingProto night_display_custom_start_time = 148;
- optional SettingProto night_display_custom_end_time = 149;
- optional SettingProto night_display_last_activated_time = 189;
+ optional SettingProto usb_audio_automatic_routing_disabled = 139 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sleep_timeout = 140 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto double_tap_to_wake = 141 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // The current assistant component. It could be a voice interaction service,
+ // or an activity that handles ACTION_ASSIST, or empty, which means using
+ // the default handling.
+ optional SettingProto assistant = 142 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto camera_gesture_disabled = 143 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto camera_double_tap_power_gesture_disabled = 144 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto camera_double_twist_to_flip_enabled = 145 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto camera_lift_trigger_enabled = 182 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto assist_gesture_enabled = 183 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto assist_gesture_sensitivity = 184 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto assist_gesture_silence_alerts_enabled = 185 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto assist_gesture_wake_enabled = 186 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto assist_gesture_setup_complete = 187 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto night_display_activated = 146 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto night_display_auto_mode = 147 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto night_display_color_temperature = 188 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto night_display_custom_start_time = 148 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto night_display_custom_end_time = 149 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto night_display_last_activated_time = 189 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto brightness_use_twilight = 150;
- optional SettingProto enabled_vr_listeners = 151;
- optional SettingProto vr_display_mode = 152;
- optional SettingProto carrier_apps_handled = 153;
- optional SettingProto managed_profile_contact_remote_search = 154;
- optional SettingProto automatic_storage_manager_enabled = 155;
- optional SettingProto automatic_storage_manager_days_to_retain = 156;
- optional SettingProto automatic_storage_manager_bytes_cleared = 157;
- optional SettingProto automatic_storage_manager_last_run = 158;
- optional SettingProto automatic_storage_manager_turned_off_by_policy = 190;
- optional SettingProto system_navigation_keys_enabled = 159;
+ optional SettingProto enabled_vr_listeners = 151 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto vr_display_mode = 152 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto carrier_apps_handled = 153 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto managed_profile_contact_remote_search = 154 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto automatic_storage_manager_enabled = 155 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto automatic_storage_manager_days_to_retain = 156 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto automatic_storage_manager_bytes_cleared = 157 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto automatic_storage_manager_last_run = 158 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto automatic_storage_manager_turned_off_by_policy = 190 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto system_navigation_keys_enabled = 159 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto downloads_backup_enabled = 160;
optional SettingProto downloads_backup_allow_metered = 161;
optional SettingProto downloads_backup_charging_only = 162;
optional SettingProto automatic_storage_manager_downloads_days_to_retain = 163;
- optional SettingProto qs_tiles = 164;
+ // Holds comma-separated list of ordering of QuickSettings tiles.
+ optional SettingProto qs_tiles = 164 [ (android.privacy).dest = DEST_AUTOMATIC ];
reserved 165; // Removed demo_user_setup_complete
- optional SettingProto instant_apps_enabled = 166;
- optional SettingProto device_paired = 167;
- optional SettingProto package_verifier_state = 191;
- optional SettingProto cmas_additional_broadcast_pkg = 192;
- optional SettingProto notification_badging = 168;
- optional SettingProto qs_auto_added_tiles = 193;
- optional SettingProto lockdown_in_power_menu = 194;
+ optional SettingProto instant_apps_enabled = 166 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto device_paired = 167 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto package_verifier_state = 191 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto cmas_additional_broadcast_pkg = 192 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto notification_badging = 168 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto qs_auto_added_tiles = 193 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto lockdown_in_power_menu = 194 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto backup_manager_constants = 169;
- optional SettingProto show_first_crash_dialog_dev_option = 195;
+ optional SettingProto show_first_crash_dialog_dev_option = 195 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_on_while_driving = 196 [ (android.privacy).dest = DEST_AUTOMATIC ];
- // Next tag = 196
+ // Please insert fields in the same order as in
+ // frameworks/base/core/java/android/provider/Settings.java.
+ // Next tag = 197
}
message SystemSettingsProto {
+ option (android.msg_privacy).dest = DEST_EXPLICIT;
+
repeated SettingsOperationProto historical_operations = 1;
- optional SettingProto end_button_behavior = 2;
- optional SettingProto advanced_settings = 3;
- optional SettingProto bluetooth_discoverability = 4;
- optional SettingProto bluetooth_discoverability_timeout = 5;
- optional SettingProto font_scale = 6;
- optional SettingProto system_locales = 7;
- optional SettingProto display_color_mode = 67;
- optional SettingProto screen_off_timeout = 8;
- optional SettingProto screen_brightness = 9;
- optional SettingProto screen_brightness_for_vr = 10;
- optional SettingProto screen_brightness_mode = 11;
- optional SettingProto screen_auto_brightness_adj = 12;
- optional SettingProto mode_ringer_streams_affected = 13;
- optional SettingProto mute_streams_affected = 14;
- optional SettingProto vibrate_on = 15;
- optional SettingProto vibrate_input_devices = 16;
- optional SettingProto volume_ring = 17;
- optional SettingProto volume_system = 18;
- optional SettingProto volume_voice = 19;
- optional SettingProto volume_music = 20;
- optional SettingProto volume_alarm = 21;
- optional SettingProto volume_notification = 22;
- optional SettingProto volume_bluetooth_sco = 23;
- optional SettingProto volume_accessibility = 68;
- optional SettingProto volume_master = 24;
- optional SettingProto master_mono = 25;
+ optional SettingProto end_button_behavior = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto advanced_settings = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_discoverability = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto bluetooth_discoverability_timeout = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto font_scale = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto system_locales = 7 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto display_color_mode = 67 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto screen_off_timeout = 8 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto screen_brightness = 9 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto screen_brightness_for_vr = 10 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto screen_brightness_mode = 11 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto screen_auto_brightness_adj = 12 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Determines which streams are affected by ringer mode changes. The stream
+ // type's bit will be set to 1 if it should be muted when going into an
+ // inaudible ringer mode.
+ optional SettingProto mode_ringer_streams_affected = 13 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto mute_streams_affected = 14 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto vibrate_on = 15 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto vibrate_input_devices = 16 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto volume_ring = 17 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto volume_system = 18 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto volume_voice = 19 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto volume_music = 20 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto volume_alarm = 21 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto volume_notification = 22 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto volume_bluetooth_sco = 23 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto volume_accessibility = 68 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto volume_master = 24 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto master_mono = 25 [ (android.privacy).dest = DEST_AUTOMATIC ];
// Whether silent mode should allow vibration feedback. This is used
// internally in AudioService and the Sound settings activity to coordinate
// decoupling of vibrate and silent modes. This setting will likely be
@@ -637,8 +710,10 @@
// Not used anymore. On devices with vibrator, the user explicitly selects
// silent or vibrate mode. Kept for use by legacy database upgrade code in
// DatabaseHelper.
- optional SettingProto vibrate_in_silent = 26;
- optional SettingProto append_for_last_audible = 27;
+ optional SettingProto vibrate_in_silent = 26 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Appended to various volume related settings to record the previous values
+ // before the settings were affected by a silent/vibrate ringer mode change.
+ optional SettingProto append_for_last_audible = 27 [ (android.privacy).dest = DEST_AUTOMATIC ];
optional SettingProto ringtone = 28;
optional SettingProto ringtone_cache = 29;
optional SettingProto notification_sound = 30;
@@ -646,44 +721,47 @@
optional SettingProto alarm_alert = 32;
optional SettingProto alarm_alert_cache = 33;
optional SettingProto media_button_receiver = 34;
- optional SettingProto text_auto_replace = 35;
- optional SettingProto text_auto_caps = 36;
- optional SettingProto text_auto_punctuate = 37;
- optional SettingProto text_show_password = 38;
- optional SettingProto show_gtalk_service_status = 39;
- optional SettingProto time_12_24 = 40;
- optional SettingProto date_format = 41;
- optional SettingProto setup_wizard_has_run = 42;
- optional SettingProto accelerometer_rotation = 43;
- optional SettingProto user_rotation = 44;
- optional SettingProto hide_rotation_lock_toggle_for_accessibility = 45;
- optional SettingProto vibrate_when_ringing = 46;
- optional SettingProto dtmf_tone_when_dialing = 47;
- optional SettingProto dtmf_tone_type_when_dialing = 48;
- optional SettingProto hearing_aid = 49;
- optional SettingProto tty_mode = 50;
- optional SettingProto sound_effects_enabled = 51;
- optional SettingProto haptic_feedback_enabled = 52;
- optional SettingProto notification_light_pulse = 53;
- optional SettingProto pointer_location = 54;
- optional SettingProto show_touches = 55;
+ optional SettingProto text_auto_replace = 35 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto text_auto_caps = 36 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto text_auto_punctuate = 37 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto text_show_password = 38 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto show_gtalk_service_status = 39 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto time_12_24 = 40 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto date_format = 41 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto setup_wizard_has_run = 42 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto accelerometer_rotation = 43 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto user_rotation = 44 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto hide_rotation_lock_toggle_for_accessibility = 45 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto vibrate_when_ringing = 46 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dtmf_tone_when_dialing = 47 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto dtmf_tone_type_when_dialing = 48 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto hearing_aid = 49 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto tty_mode = 50 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sound_effects_enabled = 51 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto haptic_feedback_enabled = 52 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto notification_light_pulse = 53 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Show pointer location on screen? 0 = no, 1 = yes.
+ optional SettingProto pointer_location = 54 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto show_touches = 55 [ (android.privacy).dest = DEST_AUTOMATIC ];
// Log raw orientation data from {@link
// com.android.server.policy.WindowOrientationListener} for use with the
// orientationplot.py tool.
// 0 = no, 1 = yes
- optional SettingProto window_orientation_listener_log = 56;
- optional SettingProto lockscreen_sounds_enabled = 57;
- optional SettingProto lockscreen_disabled = 58;
- optional SettingProto sip_receive_calls = 59;
- optional SettingProto sip_call_options = 60;
- optional SettingProto sip_always = 61;
- optional SettingProto sip_address_only = 62;
- optional SettingProto pointer_speed = 63;
- optional SettingProto lock_to_app_enabled = 64;
- optional SettingProto egg_mode = 65;
- optional SettingProto show_battery_percent = 69;
- optional SettingProto when_to_make_wifi_calls = 66;
+ optional SettingProto window_orientation_listener_log = 56 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto lockscreen_sounds_enabled = 57 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto lockscreen_disabled = 58 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sip_receive_calls = 59 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sip_call_options = 60 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sip_always = 61 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto sip_address_only = 62 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto pointer_speed = 63 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto lock_to_app_enabled = 64 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto egg_mode = 65 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto show_battery_percent = 69 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ optional SettingProto when_to_make_wifi_calls = 66 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Please insert fields in the same order as in
+ // frameworks/base/core/java/android/provider/Settings.java.
// Next tag = 70;
}
diff --git a/core/proto/android/server/activitymanagerservice.proto b/core/proto/android/server/activitymanagerservice.proto
index d3ca496..788d901 100644
--- a/core/proto/android/server/activitymanagerservice.proto
+++ b/core/proto/android/server/activitymanagerservice.proto
@@ -18,29 +18,41 @@
package com.android.server.am.proto;
+import "frameworks/base/core/proto/android/app/activitymanager.proto";
+import "frameworks/base/core/proto/android/app/enums.proto";
import "frameworks/base/core/proto/android/app/notification.proto";
+import "frameworks/base/core/proto/android/app/profilerinfo.proto";
+import "frameworks/base/core/proto/android/content/component_name.proto";
+import "frameworks/base/core/proto/android/content/configuration.proto";
import "frameworks/base/core/proto/android/content/intent.proto";
+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/looper.proto";
+import "frameworks/base/core/proto/android/os/powermanager.proto";
import "frameworks/base/core/proto/android/server/intentresolver.proto";
import "frameworks/base/core/proto/android/server/windowmanagerservice.proto";
import "frameworks/base/core/proto/android/util/common.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
option java_multiple_files = true;
message ActivityManagerServiceProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional ActivityStackSupervisorProto activities = 1;
optional BroadcastProto broadcasts = 2;
optional ActiveServicesProto services = 3;
- optional ProcessProto processes = 4;
+ optional ProcessesProto processes = 4;
}
// "dumpsys activity --proto activities"
message ActivityStackSupervisorProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .com.android.server.wm.proto.ConfigurationContainerProto configuration_container = 1;
repeated ActivityDisplayProto displays = 2;
optional KeyguardControllerProto keyguard_controller = 3;
@@ -50,12 +62,16 @@
/* represents ActivityStackSupervisor.ActivityDisplay */
message ActivityDisplayProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .com.android.server.wm.proto.ConfigurationContainerProto configuration_container = 1;
optional int32 id = 2;
repeated ActivityStackProto stacks = 3;
}
message ActivityStackProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .com.android.server.wm.proto.ConfigurationContainerProto configuration_container = 1;
optional int32 id = 2;
repeated TaskRecordProto tasks = 3;
@@ -66,6 +82,8 @@
}
message TaskRecordProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .com.android.server.wm.proto.ConfigurationContainerProto configuration_container = 1;
optional int32 id = 2;
repeated ActivityRecordProto activities = 3;
@@ -82,6 +100,8 @@
}
message ActivityRecordProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .com.android.server.wm.proto.ConfigurationContainerProto configuration_container = 1;
optional .com.android.server.wm.proto.IdentifierProto identifier = 2;
optional string state = 3;
@@ -91,12 +111,16 @@
}
message KeyguardControllerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool keyguard_showing = 1;
optional bool keyguard_occluded = 2;
}
// "dumpsys activity --proto broadcasts"
message BroadcastProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
repeated ReceiverListProto receiver_list = 1;
optional .com.android.server.IntentResolverProto receiver_resolver = 2;
@@ -106,6 +130,8 @@
repeated StickyBroadcastProto sticky_broadcasts = 4;
message MainHandler {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string handler = 1;
optional .android.os.LooperProto looper = 2;
}
@@ -113,6 +139,8 @@
}
message ReceiverListProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional ProcessRecordProto app = 1;
optional int32 pid = 2;
optional int32 uid = 3;
@@ -124,20 +152,27 @@
}
message ProcessRecordProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 pid = 1;
optional string process_name = 2;
optional int32 uid = 3;
optional int32 user_id = 4;
optional int32 app_id = 5;
optional int32 isolated_app_id = 6;
+ optional bool persistent = 7;
}
message BroadcastRecordProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 user_id = 1;
optional string intent_action = 2;
}
message BroadcastFilterProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .android.content.IntentFilterProto intent_filter = 1;
optional string required_permission = 2;
optional string hex_hash = 3; // used to find the object in IntentResolver
@@ -145,6 +180,8 @@
}
message BroadcastQueueProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string queue_name = 1;
repeated BroadcastRecordProto parallel_broadcasts = 2;
repeated BroadcastRecordProto ordered_broadcasts = 3;
@@ -152,6 +189,8 @@
repeated BroadcastRecordProto historical_broadcasts = 5;
message BroadcastSummary {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .android.content.IntentProto intent = 1;
optional int64 enqueue_clock_time_ms = 2;
optional int64 dispatch_clock_time_ms = 3;
@@ -161,14 +200,20 @@
}
message MemInfoProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int64 uptime_duration_ms = 1;
optional int64 elapsed_realtime_ms = 2;
message ProcessMemory {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 pid = 1;
optional string process_name = 2;
message MemoryInfo {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string name = 1;
// The proportional set size for the heap.
optional int32 total_pss_kb = 2;
@@ -190,6 +235,8 @@
}
}
message HeapInfo {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional MemoryInfo mem_info = 1;
optional int32 heap_size_kb = 2;
optional int32 heap_alloc_kb = 3;
@@ -205,6 +252,8 @@
repeated MemoryInfo dalvik_details = 8;
message AppSummary {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 java_heap_pss_kb = 1;
optional int32 native_heap_pss_kb = 2;
optional int32 code_pss_kb = 3;
@@ -223,9 +272,13 @@
repeated ProcessMemory native_processes = 3;
message AppData {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional ProcessMemory process_memory = 1;
message ObjectStats {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 view_instance_count = 1;
optional int32 view_root_instance_count = 2;
optional int32 app_context_instance_count = 3;
@@ -243,11 +296,15 @@
optional ObjectStats objects = 2;
message SqlStats {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 memory_used_kb = 1;
optional int32 pagecache_overflow_kb = 2;
optional int32 malloc_size_kb = 3;
message Database {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string name = 1;
optional int32 page_size = 2;
optional int32 db_size = 3;
@@ -267,6 +324,8 @@
repeated AppData app_processes = 4;
message MemItem {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string tag = 1;
optional string label = 2;
optional int32 id = 3;
@@ -330,9 +389,13 @@
}
message StickyBroadcastProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 user = 1;
message StickyAction {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string name = 1;
repeated .android.content.IntentProto intents = 2;
}
@@ -341,6 +404,7 @@
// "dumpsys activity --proto service"
message ActiveServicesProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
message ServicesByUser {
optional int32 user_id = 1;
@@ -351,11 +415,15 @@
// corresponds to ActivityManagerService.GrantUri Java class
message GrantUriProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 source_user_id = 1;
- optional string uri = 2;
+ optional string uri = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
}
message NeededUriGrantsProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string target_package = 1;
optional int32 target_uid = 2;
optional int32 flags = 3;
@@ -364,12 +432,16 @@
}
message UriPermissionOwnerProto {
+ option (.android.msg_privacy).dest = DEST_EXPLICIT;
+
optional string owner = 1;
repeated GrantUriProto read_perms = 2;
repeated GrantUriProto write_perms = 3;
}
message ServiceRecordProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string short_name = 1;
optional string hex_hash = 2;
optional bool is_running = 3; // false if the application service is null
@@ -380,6 +452,8 @@
optional string permission = 8;
message AppInfo {
+ option (.android.msg_privacy).dest = DEST_EXPLICIT;
+
optional string base_dir = 1;
optional string res_dir = 2;
optional string data_dir = 3;
@@ -391,6 +465,8 @@
optional bool delayed = 13;
message Foreground {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 id = 1;
optional .android.app.NotificationProto notification = 2;
}
@@ -404,6 +480,8 @@
// variables used to track states related to service start
message Start {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool start_requested = 1;
optional bool delayed_stop = 2;
optional bool stop_if_killed = 3;
@@ -413,6 +491,8 @@
optional Start start = 20;
message ExecuteNesting {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 execute_nesting = 1;
optional bool execute_fg = 2;
optional .android.util.Duration executing_start = 3;
@@ -422,6 +502,8 @@
optional .android.util.Duration destory_time = 22;
message Crash {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 restart_count = 1;
optional .android.util.Duration restart_delay = 2;
optional .android.util.Duration next_restart_time = 3;
@@ -430,6 +512,8 @@
optional Crash crash = 23;
message StartItemProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 id = 1;
optional .android.util.Duration duration = 2;
optional int32 delivery_count = 3;
@@ -446,6 +530,8 @@
}
message ConnectionRecordProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string hex_hash = 1;
optional int32 user_id = 2;
@@ -459,7 +545,7 @@
WAIVE_PRIORITY = 6;
IMPORTANT = 7;
ADJUST_WITH_ACTIVITY = 8;
- FG_SERVICE_WHILE_WAKE = 9;
+ FG_SERVICE_WHILE_AWAKE = 9;
FG_SERVICE = 10;
TREAT_LIKE_ACTIVITY = 11;
VISIBLE = 12;
@@ -473,12 +559,16 @@
}
message AppBindRecordProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string hex_hash = 1;
optional ProcessRecordProto client = 2;
repeated ConnectionRecordProto connections = 3;
}
message IntentBindRecordProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string hex_hash = 1;
optional bool is_create = 2;
optional .android.content.IntentProto intent = 3;
@@ -492,5 +582,431 @@
}
// TODO: "dumpsys activity --proto processes"
-message ProcessProto {
+message ProcessesProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ repeated ProcessRecordProto procs = 1;
+ repeated ProcessRecordProto isolated_procs = 2;
+ repeated ActiveInstrumentationProto active_instrumentations = 3;
+ repeated UidRecordProto active_uids = 4;
+ repeated UidRecordProto validate_uids = 5;
+
+ // Process LRU list (sorted by oom_adj)
+ message LruProcesses {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional int32 size = 1;
+ optional int32 non_act_at = 2;
+ optional int32 non_svc_at = 3;
+ repeated ProcessOomProto list = 4;
+ }
+ optional LruProcesses lru_procs = 6;
+ repeated ProcessRecordProto pids_self_locked = 7;
+ // Foreground Processes
+ repeated ImportanceTokenProto important_procs = 8;
+ // Persisent processes that are starting
+ repeated ProcessRecordProto persistent_starting_procs = 9;
+ // Processes that are being removed
+ repeated ProcessRecordProto removed_procs = 10;
+ // Processes that are on old until the system is ready
+ repeated ProcessRecordProto on_hold_procs = 11;
+ // Processes that are waiting to GC
+ repeated ProcessToGcProto gc_procs = 12;
+ optional AppErrorsProto app_errors = 13;
+ optional UserControllerProto user_controller = 14;
+ optional ProcessRecordProto home_proc = 15;
+ optional ProcessRecordProto previous_proc = 16;
+ optional int64 previous_proc_visible_time_ms = 17;
+ optional ProcessRecordProto heavy_weight_proc = 18;
+ optional .android.content.ConfigurationProto global_configuration = 19;
+ // ActivityStackSupervisorProto dumps these values as well, still here?
+ // repeated ActivityDisplayProto displays = 20;
+
+ optional bool config_will_change = 21;
+
+ message ScreenCompatPackage {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string package = 1;
+ optional int32 mode = 2;
+ }
+ repeated ScreenCompatPackage screen_compat_packages = 22;
+
+ message UidObserverRegistrationProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional int32 uid = 1;
+ optional string package = 2;
+ repeated .android.app.UidObserverFlag flags = 3;
+ optional int32 cut_point = 4; // only available when UID_OBSERVER_PROCSTATE is on
+
+ message ProcState {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional int32 uid = 1;
+ optional int32 state = 2;
+ }
+ repeated ProcState last_proc_states = 5;
+ }
+ repeated UidObserverRegistrationProto uid_observers = 23;
+ repeated int32 device_idle_whitelist = 24;
+ repeated int32 device_idle_temp_whitelist = 25;
+
+ message PendingTempWhitelist {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional int32 target_uid = 1;
+ optional int64 duration_ms = 2;
+ optional string tag = 3;
+ }
+ repeated PendingTempWhitelist pending_temp_whitelist = 26;
+
+ message SleepStatus {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional .android.os.PowerManagerInternalProto.Wakefulness wakefulness = 1;
+ repeated string sleep_tokens = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
+ optional bool sleeping = 3;
+ optional bool shutting_down = 4;
+ optional bool test_pss_mode = 5;
+ }
+ optional SleepStatus sleep_status = 27;
+
+ message VoiceProto {
+ option (.android.msg_privacy).dest = DEST_EXPLICIT;
+
+ optional string session = 1;
+ optional .android.os.PowerManagerProto.WakeLockProto wakelock = 2;
+ }
+ optional VoiceProto running_voice = 28;
+
+ message VrControllerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ enum VrMode {
+ FLAG_NON_VR_MODE = 0;
+ FLAG_VR_MODE = 1;
+ FLAG_PERSISTENT_VR_MODE = 2;
+ }
+ repeated VrMode vr_mode = 1;
+ optional int32 render_thread_id = 2;
+ }
+ optional VrControllerProto vr_controller = 29;
+
+ message DebugApp {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string debug_app = 1;
+ optional string orig_debug_app = 2;
+ optional bool debug_transient = 3;
+ optional bool orig_wait_for_debugger = 4;
+ }
+ optional DebugApp debug = 30;
+ optional AppTimeTrackerProto current_tracker = 31;
+
+ message MemWatchProcess {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ message Process {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string name = 1;
+
+ message MemStats {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional int32 uid = 1;
+ optional string size = 2;
+ optional string report_to = 3;
+ }
+ repeated MemStats mem_stats = 2;
+ }
+ repeated Process procs = 1;
+
+ message Dump {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string proc_name = 1;
+ optional string file = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
+ optional int32 pid = 3;
+ optional int32 uid = 4;
+ }
+ optional Dump dump = 2;
+ }
+ optional MemWatchProcess mem_watch_processes = 32;
+ optional string track_allocation_app = 33;
+
+ message Profile {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string app_name = 1;
+ optional ProcessRecordProto proc = 2;
+ optional .android.app.ProfilerInfoProto info = 3;
+ optional int32 type = 4;
+ }
+ optional Profile profile = 34;
+ optional string native_debugging_app = 35;
+ optional bool always_finish_activities = 36;
+
+ message Controller {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string controller = 1;
+ optional bool is_a_monkey = 2;
+ }
+ optional Controller controller = 37;
+
+ optional int32 total_persistent_procs = 38;
+ optional bool processes_ready = 39;
+ optional bool system_ready = 40;
+ optional bool booted = 41;
+ optional int32 factory_test = 42;
+ optional bool booting = 43;
+ optional bool call_finish_booting = 44;
+ optional bool boot_animation_complete = 45;
+ optional int64 last_power_check_uptime_ms = 46;
+ optional .android.os.PowerManagerProto.WakeLockProto going_to_sleep = 47;
+ optional .android.os.PowerManagerProto.WakeLockProto launching_activity = 48;
+ optional int32 adj_seq = 49;
+ optional int32 lru_seq = 50;
+ optional int32 num_non_cached_procs = 51;
+ optional int32 num_cached_hidden_procs = 52;
+ optional int32 num_service_procs = 53;
+ optional int32 new_num_service_procs = 54;
+ optional bool allow_lower_mem_level = 55;
+ optional int32 last_memory_level = 56;
+ optional int32 last_num_processes = 57;
+ optional .android.util.Duration last_idle_time = 58;
+ optional int64 low_ram_since_last_idle_ms = 59;
+}
+
+message ActiveInstrumentationProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional .android.content.ComponentNameProto class = 1;
+ optional bool finished = 2;
+ repeated ProcessRecordProto running_processes = 3;
+ repeated string target_processes = 4;
+ optional .android.content.pm.ApplicationInfoProto target_info = 5;
+ optional string profile_file = 6;
+ optional string watcher = 7;
+ optional string ui_automation_connection = 8;
+ optional string arguments = 9 [ (.android.privacy).dest = DEST_EXPLICIT ];
+}
+
+// Proto definition of com.android.server.am.UidRecord.java
+message UidRecordProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string hex_hash = 1;
+ optional int32 uid = 2;
+ optional .android.app.ProcessStateEnum current = 3;
+ optional bool ephemeral = 4;
+ optional bool fg_services = 5;
+ optional bool whilelist = 6;
+ optional .android.util.Duration last_background_time = 7;
+ optional bool idle = 8;
+
+ enum Change {
+ CHANGE_GONE = 0;
+ CHANGE_IDLE = 1;
+ CHANGE_ACTIVE = 2;
+ CHANGE_CACHED = 3;
+ CHANGE_UNCACHED = 4;
+ }
+ repeated Change last_reported_changes = 9;
+ optional int32 num_procs = 10;
+
+ message ProcStateSequence {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional int64 cururent = 1;
+ optional int64 last_network_updated = 2;
+ optional int64 last_dispatched = 3;
+ }
+ optional ProcStateSequence network_state_update = 11;
+}
+
+// proto of class ImportanceToken in ActivityManagerService
+message ImportanceTokenProto {
+ option (.android.msg_privacy).dest = DEST_EXPLICIT;
+
+ optional int32 pid = 1;
+ optional string token = 2;
+ optional string reason = 3;
+}
+
+message ProcessOomProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional bool persistent = 1;
+ optional int32 num = 2;
+ optional string oom_adj = 3;
+
+ // Activity manager's version of Process enum, see ProcessList.java
+ enum SchedGroup {
+ SCHED_GROUP_UNKNOWN = -1;
+ SCHED_GROUP_BACKGROUND = 0;
+ SCHED_GROUP_DEFAULT = 1;
+ SCHED_GROUP_TOP_APP = 2;
+ SCHED_GROUP_TOP_APP_BOUND = 3;
+ }
+ optional SchedGroup sched_group = 4 [ default = SCHED_GROUP_UNKNOWN];
+
+ oneof Foreground {
+ bool activities = 5;
+ bool services = 6;
+ }
+
+ optional .android.app.ProcessStateEnum state = 7;
+ optional int32 trim_memory_level = 8;
+ optional ProcessRecordProto proc = 9;
+ optional string adj_type = 10;
+
+ oneof AdjTarget {
+ .android.content.ComponentNameProto adj_target_component_name = 11;
+ string adj_target_object = 12;
+ }
+
+ oneof AdjSource {
+ ProcessRecordProto adj_source_proc = 13;
+ string adj_source_object = 14;
+ }
+
+ message Detail {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional int32 max_adj = 1;
+ optional int32 cur_raw_adj = 2;
+ optional int32 set_raw_adj = 3;
+ optional int32 cur_adj = 4;
+ optional int32 set_adj = 5;
+ optional .android.app.ProcessStateEnum current_state = 7;
+ optional .android.app.ProcessStateEnum set_state = 8;
+ optional string last_pss = 9;
+ optional string last_swap_pss = 10;
+ optional string last_cached_pss = 11;
+ optional bool cached = 12;
+ optional bool empty = 13;
+ optional bool has_above_client = 14;
+
+ // only make sense if process is a service
+ message CpuRunTime {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional int64 over_ms = 1;
+ optional int64 used_ms = 2;
+ optional float ultilization = 3; // ratio of cpu time usage
+ }
+ optional CpuRunTime service_run_time = 15;
+ }
+ optional Detail detail = 15;
+}
+
+message ProcessToGcProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional ProcessRecordProto proc = 1;
+ optional bool report_low_memory = 2;
+ optional int64 now_uptime_ms = 3;
+ optional int64 last_gced_ms = 4;
+ optional int64 last_low_memory_ms = 5;
+}
+
+// sync with com.android.server.am.AppErrors.java
+message AppErrorsProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional int64 now_uptime_ms = 1;
+
+ message ProcessCrashTime {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string process_name = 1;
+
+ message Entry {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional int32 uid = 1;
+ optional int64 last_crashed_at_ms = 2;
+ }
+ repeated Entry entries = 2;
+ }
+ repeated ProcessCrashTime process_crash_times = 2;
+
+ message BadProcess {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string process_name = 1;
+
+ message Entry {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional int32 uid = 1;
+ optional int64 crashed_at_ms = 2;
+ optional string short_msg = 3;
+ optional string long_msg = 4 [ (.android.privacy).dest = DEST_EXPLICIT ];
+ optional string stack = 5 [ (.android.privacy).dest = DEST_EXPLICIT ];
+ }
+ repeated Entry entries = 2;
+ }
+ repeated BadProcess bad_processes = 3;
+}
+
+// sync with com.android.server.am.UserState.java
+message UserStateProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ enum State {
+ STATE_BOOTING = 0;
+ STATE_RUNNING_LOCKED = 1;
+ STATE_RUNNING_UNLOCKING = 2;
+ STATE_RUNNING_UNLOCKED = 3;
+ STATE_STOPPING = 4;
+ STATE_SHUTDOWN = 5;
+ }
+ optional State state = 1;
+ optional bool switching = 2;
+}
+
+// sync with com.android.server.am.UserController.java
+message UserControllerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ message User {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional int32 id = 1;
+ optional UserStateProto state = 2;
+ }
+ repeated User started_users = 1;
+ repeated int32 started_user_array = 2;
+ repeated int32 user_lru = 3;
+
+ message UserProfile {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional int32 user = 1;
+ optional int32 profile = 2;
+ }
+ repeated UserProfile user_profile_group_ids = 4;
+}
+
+// sync with com.android.server.am.AppTimeTracker.java
+message AppTimeTrackerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string receiver = 1;
+ optional int64 total_duration_ms = 2;
+
+ message PackageTime {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string package = 1;
+ optional int64 duration_ms = 2;
+ }
+ repeated PackageTime package_times = 3;
+
+ optional .android.util.Duration started_time = 4;
+ optional string started_package = 5;
}
diff --git a/core/proto/android/server/alarmmanagerservice.proto b/core/proto/android/server/alarmmanagerservice.proto
index 87d302e..aa2663f 100644
--- a/core/proto/android/server/alarmmanagerservice.proto
+++ b/core/proto/android/server/alarmmanagerservice.proto
@@ -21,12 +21,15 @@
import "frameworks/base/core/proto/android/internal/locallog.proto";
import "frameworks/base/core/proto/android/os/worksource.proto";
import "frameworks/base/core/proto/android/server/forceappstandbytracker.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
package com.android.server;
option java_multiple_files = true;
message AlarmManagerServiceProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int64 current_time = 1;
optional int64 elapsed_realtime = 2;
optional int64 last_time_change_clock_time = 3;
@@ -47,6 +50,8 @@
// Only valid if is_interactive is false.
optional int64 time_until_next_non_wakeup_delivery_ms = 11;
+ // Can be negative if the non-wakeup alarm time is in the past (non-wakeup
+ // alarms aren't delivered unil the next time the device wakes up).
optional int64 time_until_next_non_wakeup_alarm_ms = 12;
optional int64 time_until_next_wakeup_ms = 13;
optional int64 time_since_last_wakeup_ms = 14;
@@ -104,6 +109,8 @@
optional int64 allow_while_idle_min_duration_ms = 35;
message LastAllowWhileIdleDispatch {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 uid = 1;
// In the 'elapsed' timebase.
optional int64 time_ms = 2;
@@ -115,6 +122,8 @@
optional com.android.internal.util.LocalLogProto recent_problems = 37;
message TopAlarm {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 uid = 1;
optional string package_name = 2;
optional FilterStatsProto filter = 3;
@@ -122,6 +131,8 @@
repeated TopAlarm top_alarms = 38;
message AlarmStat {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional BroadcastStatsProto broadcast = 1;
repeated FilterStatsProto filters = 2;
}
@@ -134,6 +145,8 @@
// This is a soft wrapper for alarm clock information. It is not representative
// of an android.app.AlarmManager.AlarmClockInfo object.
message AlarmClockMetadataProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 user = 1;
optional bool is_pending_send = 2;
// This value is UTC wall clock time in milliseconds, as returned by
@@ -143,7 +156,9 @@
// A com.android.server.AlarmManagerService.Alarm object.
message AlarmProto {
- optional string tag = 1;
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string tag = 1 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional .android.app.AlarmManagerProto.AlarmType type = 2;
// How long until the alarm goes off, in the 'elapsed' timebase. Can be
// negative if 'when' is in the past.
@@ -154,11 +169,13 @@
optional int32 flags = 7;
optional .android.app.AlarmClockInfoProto alarm_clock = 8;
optional .android.app.PendingIntentProto operation = 9;
- optional string listener = 10;
+ optional string listener = 10 [ (.android.privacy).dest = DEST_EXPLICIT ];
}
// A com.android.server.AlarmManagerService.Batch object.
message BatchProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Start time in terms of elapsed realtime.
optional int64 start_realtime = 1;
// End time in terms of elapsed realtime.
@@ -169,6 +186,8 @@
// A com.android.server.AlarmManagerService.BroadcastStats object.
message BroadcastStatsProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 uid = 1;
optional string package_name = 2;
// The total amount of time this broadcast was in flight.
@@ -184,6 +203,8 @@
// A com.android.server.AlarmManagerService.Constants object.
message ConstantsProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Minimum futurity of a new alarm.
optional int64 min_futurity_duration_ms = 1;
// Minimum alarm recurrence interval.
@@ -200,7 +221,9 @@
// A com.android.server.AlarmManagerService.FilterStats object.
message FilterStatsProto {
- optional string tag = 1;
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ 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;
// The total amount of time this filter was in flight.
@@ -216,9 +239,11 @@
// A com.android.server.AlarmManagerService.IdleDispatchEntry object.
message IdleDispatchEntryProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 uid = 1;
optional string pkg = 2;
- optional string tag = 3;
+ optional string tag = 3 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional string op = 4;
// Time when this entry was created, in terms of elapsed realtime.
optional int64 entry_creation_realtime = 5;
@@ -230,8 +255,10 @@
// A com.android.server.AlarmManagerService.InFlight object.
message InFlightProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 uid = 1;
- optional string tag = 2;
+ optional string tag = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional int64 when_elapsed_ms = 3;
optional .android.app.AlarmManagerProto.AlarmType alarm_type = 4;
optional .android.app.PendingIntentProto pending_intent = 5;
@@ -242,6 +269,8 @@
// A com.android.server.AlarmManagerService.WakeupEvent object.
message WakeupEventProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 uid = 1;
optional string action = 2;
optional int64 when = 3;
diff --git a/core/proto/android/server/appwindowthumbnail.proto b/core/proto/android/server/appwindowthumbnail.proto
index e67b854..8f48d75 100644
--- a/core/proto/android/server/appwindowthumbnail.proto
+++ b/core/proto/android/server/appwindowthumbnail.proto
@@ -17,6 +17,7 @@
syntax = "proto2";
import "frameworks/base/core/proto/android/server/surfaceanimator.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
package com.android.server.wm.proto;
option java_multiple_files = true;
@@ -25,6 +26,8 @@
* Represents a {@link com.android.server.wm.AppWindowThumbnail} object.
*/
message AppWindowThumbnailProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 width = 1;
optional int32 height = 2;
optional SurfaceAnimatorProto surface_animator = 3;
diff --git a/core/proto/android/os/batterymanager.proto b/core/proto/android/server/enums.proto
similarity index 61%
copy from core/proto/android/os/batterymanager.proto
copy to core/proto/android/server/enums.proto
index 669bf2d..ef02438 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/core/proto/android/server/enums.proto
@@ -1,5 +1,5 @@
/*
- * 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,15 +15,16 @@
*/
syntax = "proto2";
-package android.os;
+package android.server;
+option java_outer_classname = "ServerProtoEnums";
option java_multiple_files = true;
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
+enum DeviceIdleModeEnum {
+ // Device idle mode - not active.
+ DEVICE_IDLE_MODE_OFF = 0;
+ // Device idle mode - active in lightweight mode.
+ DEVICE_IDLE_MODE_LIGHT = 1;
+ // Device idle mode - active in full mode.
+ DEVICE_IDLE_MODE_DEEP = 2;
}
diff --git a/core/proto/android/server/fingerprint.proto b/core/proto/android/server/fingerprint.proto
index ec4ffe0..2a7fbc3 100644
--- a/core/proto/android/server/fingerprint.proto
+++ b/core/proto/android/server/fingerprint.proto
@@ -17,15 +17,21 @@
syntax = "proto2";
package com.android.server.fingerprint;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
option java_multiple_files = true;
option java_outer_classname = "FingerprintServiceProto";
message FingerprintServiceDumpProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Each log may include multiple tuples of (user_id, num_fingerprints).
repeated FingerprintUserStatsProto users = 1;
}
message FingerprintUserStatsProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Should be 0, 10, 11, 12, etc. where 0 is the owner.
optional int32 user_id = 1;
@@ -42,6 +48,8 @@
// A com.android.server.fingerprint.FingerpintService.PerformanceStats object.
message PerformanceStatsProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Number of accepted fingerprints.
optional int32 accept = 1;
diff --git a/core/proto/android/server/forceappstandbytracker.proto b/core/proto/android/server/forceappstandbytracker.proto
index c9f7d52..d0fd0b4 100644
--- a/core/proto/android/server/forceappstandbytracker.proto
+++ b/core/proto/android/server/forceappstandbytracker.proto
@@ -16,12 +16,18 @@
syntax = "proto2";
+import "frameworks/base/core/proto/android/server/statlogger.proto";
+
package com.android.server;
option java_multiple_files = true;
-// Dump from ForceAppStandbyTracker.
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
+// Dump from com.android.server.ForceAppStandbyTracker.
message ForceAppStandbyTrackerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Whether all apps are forced standby or not.
optional bool force_all_apps_standby = 1;
@@ -35,10 +41,11 @@
repeated int32 temp_power_save_whitelist_app_ids = 4;
message RunAnyInBackgroundRestrictedPackages {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 uid = 1;
optional string package_name = 2;
}
-
// Packages that are disallowed OP_RUN_ANY_IN_BACKGROUND.
repeated RunAnyInBackgroundRestrictedPackages run_any_in_background_restricted_packages = 5;
@@ -48,6 +55,17 @@
// Whether force app standby for small battery device setting is enabled
optional bool force_all_apps_standby_for_small_battery = 7;
- // Whether device is charging
- optional bool is_charging = 8;
+ // Whether device is plugged in to the charger
+ optional bool is_plugged_in = 8;
+
+ // Performance stats.
+ optional StatLoggerProto stats = 9;
+
+ message ExemptedPackage {
+ optional int32 userId = 1;
+ optional string package_name = 2;
+ }
+
+ // Packages that are in the EXEMPT bucket.
+ repeated ExemptedPackage exempted_packages = 10;
}
diff --git a/core/proto/android/server/jobscheduler.proto b/core/proto/android/server/jobscheduler.proto
index f72ca62..304e63f 100644
--- a/core/proto/android/server/jobscheduler.proto
+++ b/core/proto/android/server/jobscheduler.proto
@@ -29,13 +29,18 @@
import "frameworks/base/core/proto/android/os/bundle.proto";
import "frameworks/base/core/proto/android/os/persistablebundle.proto";
import "frameworks/base/core/proto/android/server/forceappstandbytracker.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
message JobSchedulerServiceDumpProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional ConstantsProto settings = 1;
repeated int32 started_users = 2;
message RegisteredJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional JobStatusDumpProto dump = 2;
@@ -56,6 +61,8 @@
// Which uids are currently in the foreground.
message PriorityOverride {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 uid = 1;
// Use sint32 instead of an enum since priorities can technically be
// negative.
@@ -71,6 +78,8 @@
optional JobPackageTrackerDumpProto package_tracker = 8;
message PendingJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional JobStatusDumpProto dump = 2;
optional sint32 evaluated_priority = 3;
@@ -81,12 +90,18 @@
// From a service that has currently active or pending jobs.
message ActiveJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
message InactiveJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int64 time_since_stopped_ms = 1;
// This is not always provided.
optional string stopped_reason = 2;
}
message RunningJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
// How long this job has been running for.
optional int64 running_duration_ms = 2;
@@ -119,6 +134,8 @@
// A com.android.server.job.JobSchedulerService.Constants object.
message ConstantsProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Minimum # of idle jobs that must be ready in order to force the JMS to
// schedule things early.
optional int32 min_idle_count = 1;
@@ -187,10 +204,16 @@
}
message StateControllerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
message AppIdleController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool is_parole_on = 1;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
optional string source_package_name = 3;
@@ -201,9 +224,13 @@
repeated TrackedJob tracked_jobs = 2;
}
message BackgroundJobsController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional com.android.server.ForceAppStandbyTrackerProto force_app_standby_tracker = 1;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
optional string source_package_name = 3;
@@ -217,6 +244,8 @@
repeated TrackedJob tracked_jobs = 2;
}
message BatteryController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool is_on_stable_power = 1;
optional bool is_battery_not_low = 2;
@@ -226,15 +255,21 @@
optional int32 last_broadcast_sequence_number = 4;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
}
repeated TrackedJob tracked_jobs = 5;
}
message ConnectivityController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool is_connected = 1;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
optional .android.net.NetworkRequestProto required_network = 3;
@@ -242,31 +277,47 @@
repeated TrackedJob tracked_jobs = 2;
}
message ContentObserverController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
}
repeated TrackedJob tracked_jobs = 1;
message Observer {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 user_id = 1;
message TriggerContentData {
- optional string uri = 1;
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string uri = 1 [
+ (.android.privacy).dest = DEST_EXPLICIT
+ ];
optional int32 flags = 2;
// A
// com.android.server.job.controllers.ContentObserverController.JobInstance
// object.
message JobInstance {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
optional int64 trigger_content_update_delay_ms = 3;
optional int64 trigger_content_max_delay_ms = 4;
- repeated string changed_authorities = 5;
- repeated string changed_uris = 6;
+ repeated string changed_authorities = 5 [
+ (.android.privacy).dest = DEST_EXPLICIT
+ ];
+ repeated string changed_uris = 6 [
+ (.android.privacy).dest = DEST_EXPLICIT
+ ];
}
repeated JobInstance jobs = 3;
}
@@ -275,10 +326,14 @@
repeated Observer observers = 2;
}
message DeviceIdleJobsController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
// True when in device idle mode.
optional bool is_device_idle_mode = 1;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
optional string source_package_name = 3;
@@ -293,30 +348,42 @@
repeated TrackedJob tracked_jobs = 2;
}
message IdleController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool is_idle = 1;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
}
repeated TrackedJob tracked_jobs = 2;
}
message StorageController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool is_storage_not_low = 1;
optional int32 last_broadcast_sequence_number = 2;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
}
repeated TrackedJob tracked_jobs = 3;
}
message TimeController {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int64 now_elapsed_realtime = 1;
optional int64 time_until_next_delay_alarm_ms = 2;
optional int64 time_until_next_deadline_alarm_ms = 3;
message TrackedJob {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional JobStatusShortInfoProto info = 1;
optional int32 source_uid = 2;
@@ -347,6 +414,8 @@
// A com.android.server.job.JobPackageTracker.DataSet object.
message DataSetProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int64 start_clock_time_ms = 1;
// How much time has elapsed since the DataSet was instantiated.
optional int64 elapsed_time_ms = 2;
@@ -355,10 +424,14 @@
// Represents a com.android.server.job.JobPackageTracker.PackageEntry
// object, but with some extra data.
message PackageEntryProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 uid = 1;
optional string package_name = 2;
message State {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int64 duration_ms = 1;
optional int32 count = 2;
}
@@ -377,6 +450,8 @@
optional bool active_top = 8;
message StopReasonCount {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .android.app.JobParametersProto.CancelReason reason = 1;
optional int32 count = 2;
}
@@ -390,19 +465,27 @@
// Dump from com.android.server.job.GrantedUriPermissions.
message GrantedUriPermissionsDumpProto {
- optional int32 flags = 1;
- optional int32 source_user_id = 2;
+ option (.android.msg_privacy).dest = DEST_EXPLICIT;
+
+ optional int32 flags = 1 [ (.android.privacy).dest = DEST_AUTOMATIC ];
+ optional int32 source_user_id = 2 [
+ (.android.privacy).dest = DEST_AUTOMATIC
+ ];
optional string tag = 3;
optional string permission_owner = 4;
repeated string uris = 5;
}
message JobPackageTrackerDumpProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
repeated DataSetProto historical_stats = 1;
optional DataSetProto current_stats = 2;
}
message JobPackageHistoryProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
enum Event {
UNKNOWN = 0;
START_JOB = 1;
@@ -411,12 +494,14 @@
STOP_PERIODIC_JOB = 4;
}
message HistoryEvent {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional Event event = 1;
optional int64 time_since_event_ms = 2;
optional int32 uid = 3;
// Job IDs can technically be negative.
optional int32 job_id = 4;
- optional string tag = 5;
+ optional string tag = 5 [ (.android.privacy).dest = DEST_EXPLICIT ];
// Only valid for STOP_JOB or STOP_PERIODIC_JOB Events.
optional .android.app.JobParametersProto.CancelReason stop_reason = 6;
}
@@ -424,17 +509,23 @@
}
message JobStatusShortInfoProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 calling_uid = 1;
// Job IDs can technically be negative.
optional int32 job_id = 2;
- optional string battery_name = 3;
+ optional string battery_name = 3 [
+ (.android.privacy).dest = DEST_EXPLICIT
+ ];
}
// Dump from a com.android.server.job.controllers.JobStatus object.
message JobStatusDumpProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
// The UID that scheduled the job.
optional int32 calling_uid = 1;
- optional string tag = 2;
+ optional string tag = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
// The UID for which the job is being run.
optional int32 source_uid = 3;
@@ -444,6 +535,8 @@
// Custom dump of android.app.job.JobInfo object.
message JobInfo {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .android.content.ComponentNameProto service = 1;
optional bool is_periodic = 2;
@@ -461,8 +554,10 @@
optional bool requires_device_idle = 10;
message TriggerContentUri {
- optional int32 flags = 1;
- optional string uri = 2;
+ optional int32 flags = 1 [
+ (.android.privacy).dest = DEST_AUTOMATIC
+ ];
+ optional string uri = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
}
repeated TriggerContentUri trigger_content_uris = 11;
optional int64 trigger_content_update_delay_ms = 12;
@@ -482,6 +577,8 @@
optional int64 max_execution_delay_ms = 21;
message Backoff {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
enum Policy {
BACKOFF_POLICY_LINEAR = 0;
BACKOFF_POLICY_EXPONENTIAL = 1;
@@ -524,13 +621,19 @@
// Controllers that are currently tracking the job.
repeated TrackingController tracking_controllers = 11;
- repeated string changed_authorities = 12;
- repeated string changed_uris = 13;
+ repeated string changed_authorities = 12 [
+ (.android.privacy).dest = DEST_EXPLICIT
+ ];
+ repeated string changed_uris = 13 [
+ (.android.privacy).dest = DEST_EXPLICIT
+ ];
optional .android.net.NetworkProto network = 14;
// Only the desired data from an android.app.job.JobWorkItem object.
message JobWorkItem {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 work_id = 1;
optional int32 delivery_count = 2;
optional .android.content.IntentProto intent = 3;
@@ -558,4 +661,6 @@
optional int64 last_successful_run_time = 22;
optional int64 last_failed_run_time = 23;
+
+ optional int64 internal_flags = 24;
}
diff --git a/core/proto/android/server/powermanagerservice.proto b/core/proto/android/server/powermanagerservice.proto
index c1bd692..b5c3ac0 100644
--- a/core/proto/android/server/powermanagerservice.proto
+++ b/core/proto/android/server/powermanagerservice.proto
@@ -19,22 +19,29 @@
option java_multiple_files = true;
-import "frameworks/base/core/proto/android/app/activitymanager.proto";
+import "frameworks/base/core/proto/android/app/enums.proto";
import "frameworks/base/core/proto/android/content/intent.proto";
-import "frameworks/base/core/proto/android/os/batterymanager.proto";
+import "frameworks/base/core/proto/android/os/enums.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/os/worksource.proto";
import "frameworks/base/core/proto/android/providers/settings.proto";
import "frameworks/base/core/proto/android/server/wirelesschargerdetector.proto";
-import "frameworks/base/core/proto/android/view/display.proto";
+import "frameworks/base/core/proto/android/view/enums.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
message PowerManagerServiceDumpProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
// A com.android.server.power.PowerManagerService.Constants object.
message ConstantsProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool is_no_cached_wake_locks = 1;
}
message ActiveWakeLocksProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool is_cpu = 1;
optional bool is_screen_bright = 2;
optional bool is_screen_dim = 3;
@@ -46,18 +53,21 @@
optional bool is_draw = 8;
}
message UserActivityProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool is_screen_bright = 1;
optional bool is_screen_dim = 2;
optional bool is_screen_dream = 3;
}
// A com.android.server.power.PowerManagerService.UidState object.
message UidStateProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 uid = 1;
optional string uid_string = 2;
optional bool is_active = 3;
optional int32 num_wake_locks = 4;
- optional bool is_process_state_unknown = 5;
- optional .android.app.ProcessState process_state = 6;
+ optional .android.app.ProcessStateEnum process_state = 5;
}
optional ConstantsProto constants = 1;
@@ -70,7 +80,7 @@
// True if the device is plugged into a power source.
optional bool is_powered = 5;
// The current plug type
- optional .android.os.BatteryManagerProto.PlugType plug_type = 6;
+ optional .android.os.BatteryPluggedStateEnum plug_type = 6;
// The current battery level percentage.
optional int32 battery_level = 7;
// The battery level percentage at the time the dream started.
@@ -167,13 +177,19 @@
// A com.android.server.power.PowerManagerService.SuspendBlockerImpl object.
message SuspendBlockerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string name = 1;
optional int32 reference_count = 2;
}
// A com.android.server.power.PowerManagerService.WakeLock object.
message WakeLockProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
message WakeLockFlagsProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Turn the screen on when the wake lock is acquired.
optional bool is_acquire_causes_wakeup = 1;
// When this wake lock is released, poke the user activity timer
@@ -181,8 +197,8 @@
optional bool is_on_after_release = 2;
}
- optional .android.os.PowerManagerProto.WakeLockLevel lock_level = 1;
- optional string tag = 2;
+ optional .android.os.WakeLockLevelEnum lock_level = 1;
+ optional string tag = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional WakeLockFlagsProto flags = 3;
optional bool is_disabled = 4;
// Acquire time in ms
@@ -196,12 +212,18 @@
}
message PowerServiceSettingsAndConfigurationDumpProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
message StayOnWhilePluggedInProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool is_stay_on_while_plugged_in_ac = 1;
optional bool is_stay_on_while_plugged_in_usb = 2;
optional bool is_stay_on_while_plugged_in_wireless = 3;
}
message ScreenBrightnessSettingLimitsProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 setting_minimum = 1;
optional int32 setting_maximum = 2;
optional int32 setting_default = 3;
@@ -300,7 +322,7 @@
// Use NaN to disable.
optional float temporary_screen_auto_brightness_adjustment_setting_override = 37;
// The screen state to use while dozing.
- optional .android.view.DisplayProto.DisplayState doze_screen_state_override_from_dream_manager = 38;
+ optional .android.view.DisplayStateEnum doze_screen_state_override_from_dream_manager = 38;
// The screen brightness to use while dozing.
optional float dozed_screen_brightness_override_from_dream_manager = 39;
// Screen brightness settings limits.
diff --git a/core/proto/android/os/batterymanager.proto b/core/proto/android/server/statlogger.proto
similarity index 65%
rename from core/proto/android/os/batterymanager.proto
rename to core/proto/android/server/statlogger.proto
index 669bf2d..fa430d8 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/core/proto/android/server/statlogger.proto
@@ -1,5 +1,5 @@
/*
- * 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,15 +15,19 @@
*/
syntax = "proto2";
-package android.os;
+
+package com.android.server;
option java_multiple_files = true;
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
+// Dump from StatLogger.
+message StatLoggerProto {
+ message Event {
+ optional int32 eventId = 1;
+ optional string label = 2;
+ optional int32 count = 3;
+ optional int64 total_duration_micros = 4;
+ }
+
+ repeated Event events = 1;
}
diff --git a/core/proto/android/server/surfaceanimator.proto b/core/proto/android/server/surfaceanimator.proto
index 60713d7..7f7839e 100644
--- a/core/proto/android/server/surfaceanimator.proto
+++ b/core/proto/android/server/surfaceanimator.proto
@@ -17,6 +17,7 @@
syntax = "proto2";
import "frameworks/base/core/proto/android/view/surfacecontrol.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
package com.android.server.wm.proto;
option java_multiple_files = true;
@@ -25,6 +26,8 @@
* Represents a {@link com.android.server.wm.SurfaceAnimator} object.
*/
message SurfaceAnimatorProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string animation_adapter = 1;
optional .android.view.SurfaceControlProto leash = 2;
optional bool animation_start_delayed = 3;
diff --git a/core/proto/android/server/windowmanagerservice.proto b/core/proto/android/server/windowmanagerservice.proto
index 71f33c7..c11058a 100644
--- a/core/proto/android/server/windowmanagerservice.proto
+++ b/core/proto/android/server/windowmanagerservice.proto
@@ -26,12 +26,15 @@
import "frameworks/base/core/proto/android/view/displayinfo.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";
package com.android.server.wm.proto;
option java_multiple_files = true;
message WindowManagerServiceProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional WindowManagerPolicyProto policy = 1;
/* window hierarchy root */
optional RootWindowContainerProto root_window_container = 2;
@@ -46,6 +49,8 @@
/* represents DisplayContent */
message RootWindowContainerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional WindowContainerProto window_container = 1;
repeated DisplayProto displays = 2;
/* window references in top down z order */
@@ -53,16 +58,22 @@
}
message BarControllerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .android.app.StatusBarManagerProto.WindowState state = 1;
optional .android.app.StatusBarManagerProto.TransientWindowState transient_state = 2;
}
message WindowOrientationListenerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool enabled = 1;
optional .android.view.SurfaceProto.Rotation rotation = 2;
}
message KeyguardServiceDelegateProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool showing = 1;
optional bool occluded = 2;
optional bool secure = 3;
@@ -84,6 +95,8 @@
/* represents PhoneWindowManager */
message WindowManagerPolicyProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 last_system_ui_flags = 1;
enum UserRotationMode {
USER_ROTATION_FREE = 0;
@@ -112,6 +125,8 @@
/* represents AppTransition */
message AppTransitionProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
enum AppState {
APP_STATE_IDLE = 0;
APP_STATE_READY = 1;
@@ -147,6 +162,8 @@
/* represents DisplayContent */
message DisplayProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional WindowContainerProto window_container = 1;
optional int32 id = 2;
repeated StackProto stacks = 3;
@@ -165,22 +182,30 @@
/* represents DisplayFrames */
message DisplayFramesProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .android.graphics.RectProto stable_bounds = 1;
}
/* represents DockedStackDividerController */
message DockedStackDividerControllerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool minimized_dock = 1;
}
/* represents PinnedStackController */
message PinnedStackControllerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .android.graphics.RectProto default_bounds = 1;
optional .android.graphics.RectProto movement_bounds = 2;
}
/* represents TaskStack */
message StackProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional WindowContainerProto window_container = 1;
optional int32 id = 2;
repeated TaskProto tasks = 3;
@@ -197,6 +222,8 @@
/* represents Task */
message TaskProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional WindowContainerProto window_container = 1;
optional int32 id = 2;
repeated AppWindowTokenProto app_window_tokens = 3;
@@ -208,8 +235,10 @@
/* represents AppWindowToken */
message AppWindowTokenProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
/* obtained from ActivityRecord */
- optional string name = 1;
+ optional string name = 1 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional WindowTokenProto window_token = 2;
optional bool last_surface_showing = 3;
optional bool is_waiting_for_transition_start = 4;
@@ -236,6 +265,8 @@
/* represents WindowToken */
message WindowTokenProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional WindowContainerProto window_container = 1;
optional int32 hash_code = 2;
repeated WindowStateProto windows = 3;
@@ -246,6 +277,8 @@
/* represents WindowState */
message WindowStateProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional WindowContainerProto window_container = 1;
optional IdentifierProto identifier = 2;
optional int32 display_id = 3;
@@ -287,13 +320,17 @@
}
message IdentifierProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 hash_code = 1;
optional int32 user_id = 2;
- optional string title = 3;
+ optional string title = 3 [ (.android.privacy).dest = DEST_EXPLICIT ];
}
/* represents WindowStateAnimator */
message WindowStateAnimatorProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .android.graphics.RectProto last_clip_rect = 1;
optional WindowSurfaceControllerProto surface = 2;
enum DrawState {
@@ -309,18 +346,24 @@
/* represents WindowSurfaceController */
message WindowSurfaceControllerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool shown = 1;
optional int32 layer = 2;
}
/* represents ScreenRotationAnimation */
message ScreenRotationAnimationProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional bool started = 1;
optional bool animation_running = 2;
}
/* represents WindowContainer */
message WindowContainerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional ConfigurationContainerProto configuration_container = 1;
optional int32 orientation = 2;
optional bool visible = 3;
@@ -329,6 +372,8 @@
/* represents ConfigurationContainer */
message ConfigurationContainerProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional .android.content.ConfigurationProto override_configuration = 1;
optional .android.content.ConfigurationProto full_configuration = 2;
optional .android.content.ConfigurationProto merged_override_configuration = 3;
diff --git a/core/proto/android/service/battery.proto b/core/proto/android/service/battery.proto
index 42fa72c..34cb229 100644
--- a/core/proto/android/service/battery.proto
+++ b/core/proto/android/service/battery.proto
@@ -20,35 +20,16 @@
option java_multiple_files = true;
option java_outer_classname = "BatteryServiceProto";
-import "frameworks/base/core/proto/android/os/batterymanager.proto";
+import "frameworks/base/core/proto/android/os/enums.proto";
import "frameworks/base/libs/incident/proto/android/privacy.proto";
message BatteryServiceDumpProto {
option (android.msg_privacy).dest = DEST_AUTOMATIC;
- enum BatteryStatus {
- BATTERY_STATUS_INVALID = 0;
- BATTERY_STATUS_UNKNOWN = 1;
- BATTERY_STATUS_CHARGING = 2;
- BATTERY_STATUS_DISCHARGING = 3;
- BATTERY_STATUS_NOT_CHARGING = 4;
- BATTERY_STATUS_FULL = 5;
- }
- enum BatteryHealth {
- BATTERY_HEALTH_INVALID = 0;
- BATTERY_HEALTH_UNKNOWN = 1;
- BATTERY_HEALTH_GOOD = 2;
- BATTERY_HEALTH_OVERHEAT = 3;
- BATTERY_HEALTH_DEAD = 4;
- BATTERY_HEALTH_OVER_VOLTAGE = 5;
- BATTERY_HEALTH_UNSPECIFIED_FAILURE = 6;
- BATTERY_HEALTH_COLD = 7;
- }
-
// If true: UPDATES STOPPED -- use 'reset' to restart
optional bool are_updates_stopped = 1;
// Plugged status of power sources
- optional android.os.BatteryManagerProto.PlugType plugged = 2;
+ optional android.os.BatteryPluggedStateEnum plugged = 2;
// Max current in microamperes. This may be 0 if the device's kernel drivers
// don't support it.
optional int32 max_charging_current = 3;
@@ -58,9 +39,9 @@
// Battery capacity in microampere-hours
optional int32 charge_counter = 5;
// Charging status
- optional BatteryStatus status = 6;
+ optional android.os.BatteryStatusEnum status = 6;
// Battery health
- optional BatteryHealth health = 7;
+ optional android.os.BatteryHealthEnum health = 7;
// True if the battery is present
optional bool is_present = 8;
// Charge level, from 0 through "scale" inclusive
diff --git a/core/proto/android/service/diskstats.proto b/core/proto/android/service/diskstats.proto
index 3c7a0e3..3d7ee91 100644
--- a/core/proto/android/service/diskstats.proto
+++ b/core/proto/android/service/diskstats.proto
@@ -17,10 +17,14 @@
syntax = "proto2";
package android.service.diskstats;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
option java_multiple_files = true;
option java_outer_classname = "DiskStatsServiceProto";
message DiskStatsServiceDumpProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
enum EncryptionType {
// Unknown encryption type
ENCRYPTION_UNKNOWN = 0;
@@ -34,7 +38,7 @@
// Whether the latency test resulted in an error
optional bool has_test_error = 1;
// If the test errored, error message is contained here
- optional string error_message = 2;
+ optional string error_message = 2 [ (android.privacy).dest = DEST_EXPLICIT ];
// 512B write latency in milliseconds, if the test was successful
optional int32 write_512b_latency_millis = 3;
// Free Space in the major partitions
@@ -48,6 +52,8 @@
}
message DiskStatsCachedValuesProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Total app code size, in kilobytes
optional int64 agg_apps_size = 1;
// Total app cache size, in kilobytes
@@ -71,6 +77,8 @@
}
message DiskStatsAppSizesProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Name of the package
optional string package_name = 1;
// App's code size in kilobytes
@@ -82,6 +90,8 @@
}
message DiskStatsFreeSpaceProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
enum Folder {
// Data folder
FOLDER_DATA = 0;
diff --git a/core/proto/android/service/netstats.proto b/core/proto/android/service/netstats.proto
index ad9191c..29fd195 100644
--- a/core/proto/android/service/netstats.proto
+++ b/core/proto/android/service/netstats.proto
@@ -17,11 +17,15 @@
syntax = "proto2";
package android.service;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
option java_multiple_files = true;
option java_outer_classname = "NetworkStatsServiceProto";
// Represents dumpsys from NetworkStatsService (netstats).
message NetworkStatsServiceDumpProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
repeated NetworkInterfaceProto active_interfaces = 1;
repeated NetworkInterfaceProto active_uid_interfaces = 2;
@@ -41,6 +45,8 @@
// Corresponds to NetworkStatsService.mActiveIfaces/mActiveUidIfaces.
message NetworkInterfaceProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string interface = 1;
optional NetworkIdentitySetProto identities = 2;
@@ -48,17 +54,21 @@
// Corresponds to NetworkIdentitySet.
message NetworkIdentitySetProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
repeated NetworkIdentityProto identities = 1;
}
// Corresponds to NetworkIdentity.
message NetworkIdentityProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Constats from ConnectivityManager.TYPE_*.
optional int32 type = 1;
- optional string subscriber_id = 2;
+ optional string subscriber_id = 2 [ (android.privacy).dest = DEST_EXPLICIT ];
- optional string network_id = 3;
+ optional string network_id = 3 [ (android.privacy).dest = DEST_EXPLICIT ];
optional bool roaming = 4;
@@ -69,6 +79,8 @@
// Corresponds to NetworkStatsRecorder.
message NetworkStatsRecorderProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int64 pending_total_bytes = 1;
optional NetworkStatsCollectionProto complete_history = 2;
@@ -76,11 +88,15 @@
// Corresponds to NetworkStatsCollection.
message NetworkStatsCollectionProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
repeated NetworkStatsCollectionStatsProto stats = 1;
}
// Corresponds to NetworkStatsCollection.mStats.
message NetworkStatsCollectionStatsProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional NetworkStatsCollectionKeyProto key = 1;
optional NetworkStatsHistoryProto history = 2;
@@ -88,6 +104,8 @@
// Corresponds to NetworkStatsCollection.Key.
message NetworkStatsCollectionKeyProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional NetworkIdentitySetProto identity = 1;
optional int32 uid = 2;
@@ -99,6 +117,8 @@
// Corresponds to NetworkStatsHistory.
message NetworkStatsHistoryProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Duration for this bucket in milliseconds.
optional int64 bucket_duration_ms = 1;
@@ -107,6 +127,8 @@
// Corresponds to each bucket in NetworkStatsHistory.
message NetworkStatsHistoryBucketProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Bucket start time in milliseconds since epoch.
optional int64 bucket_start_ms = 1;
diff --git a/core/proto/android/service/notification.proto b/core/proto/android/service/notification.proto
index 7a0e152..9013a23 100644
--- a/core/proto/android/service/notification.proto
+++ b/core/proto/android/service/notification.proto
@@ -24,8 +24,12 @@
import "frameworks/base/core/proto/android/app/notification_channel_group.proto";
import "frameworks/base/core/proto/android/app/notificationmanager.proto";
import "frameworks/base/core/proto/android/content/component_name.proto";
+import "frameworks/base/core/proto/android/media/audioattributes.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
message NotificationServiceDumpProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
repeated NotificationRecordProto records = 1;
optional ZenModeProto zen = 2;
@@ -44,7 +48,9 @@
}
message NotificationRecordProto {
- optional string key = 1;
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string key = 1 [ (.android.privacy).dest = DEST_EXPLICIT ];
enum State {
ENQUEUED = 0;
@@ -53,21 +59,25 @@
}
optional State state = 2;
optional int32 flags = 3;
- optional string channelId = 4;
- optional string sound = 5;
- optional int32 sound_usage = 6;
+ optional string channelId = 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;
optional bool can_show_light = 8;
- optional string group_key = 9;
+ optional string group_key = 9 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional int32 importance = 10;
}
message ListenersDisablingEffectsProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 hint = 1;
repeated ManagedServiceInfoProto listeners = 2;
}
message ManagedServiceInfoProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional android.content.ComponentNameProto component = 1;
optional int32 user_id = 2;
optional string service = 3;
@@ -76,10 +86,14 @@
}
message ManagedServicesProto {
- optional string caption = 1;
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional string caption = 1 [ (.android.privacy).dest = DEST_EXPLICIT ];
message ServiceProto {
- repeated string name = 1;
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ repeated string name = 1 [ (.android.privacy).dest = DEST_EXPLICIT ];
optional int32 user_id = 2;
optional bool is_primary = 3;
}
@@ -96,9 +110,13 @@
}
message RankingHelperProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
repeated string notification_signal_extractors = 1;
message RecordProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string package = 1;
// Default value is UNKNOWN_UID = USER_NULL = -10000.
optional int32 uid = 2;
@@ -117,16 +135,72 @@
repeated RecordProto records_restored_without_uid = 3;
}
-message ZenModeProto {
- enum ZenMode {
- ZEN_MODE_OFF = 0;
- ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1;
- ZEN_MODE_NO_INTERRUPTIONS = 2;
- ZEN_MODE_ALARMS = 3;
+enum ZenMode {
+ ZEN_MODE_OFF = 0;
+ ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1;
+ ZEN_MODE_NO_INTERRUPTIONS = 2;
+ ZEN_MODE_ALARMS = 3;
+}
+
+// An android.service.notification.Condition object.
+message ConditionProto {
+ option (android.msg_privacy).dest = DEST_EXPLICIT;
+
+ optional string id = 1;
+ optional string summary = 2;
+ optional string line_1 = 3;
+ optional string line_2 = 4;
+ optional int32 icon = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
+
+ enum State {
+ // Indicates that Do Not Disturb should be turned off.
+ STATE_FALSE = 0;
+ // Indicates that Do Not Disturb should be turned on.
+ STATE_TRUE = 1;
+ STATE_UNKNOWN = 2;
+ STATE_ERROR = 3;
}
+ optional State state = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];
+
+ optional int32 flags = 7 [ (android.privacy).dest = DEST_AUTOMATIC ];
+}
+
+// An android.service.notification.ZenModeConfig.ZenRule object.
+message ZenRuleProto {
+ option (android.msg_privacy).dest = DEST_EXPLICIT;
+
+ // Required for automatic (unique).
+ optional string id = 1;
+ // Required for automatic.
+ optional string name = 2;
+ // Required for automatic.
+ optional int64 creation_time_ms = 3 [
+ (android.privacy).dest = DEST_AUTOMATIC
+ ];
+ optional bool enabled = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // Package name, only used for manual rules.
+ optional string enabler = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
+ // User manually disabled this instance.
+ optional bool is_snoozing = 6 [
+ (android.privacy).dest = DEST_AUTOMATIC
+ ];
+ optional ZenMode zen_mode = 7 [
+ (android.privacy).dest = DEST_AUTOMATIC
+ ];
+
+ // Required for automatic.
+ optional string condition_id = 8;
+ optional ConditionProto condition = 9;
+ optional android.content.ComponentNameProto component = 10;
+}
+
+// A dump from com.android.server.notification.ZenModeHelper.
+message ZenModeProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional ZenMode zen_mode = 1;
- repeated string enabled_active_conditions = 2;
+ repeated ZenRuleProto enabled_active_conditions = 2;
optional int32 suppressed_effects = 3;
- repeated string suppressors = 4;
+ repeated android.content.ComponentNameProto suppressors = 4;
optional android.app.PolicyProto policy = 5;
}
diff --git a/core/proto/android/service/package.proto b/core/proto/android/service/package.proto
index aa1a575..ef777de 100644
--- a/core/proto/android/service/package.proto
+++ b/core/proto/android/service/package.proto
@@ -18,18 +18,25 @@
package android.service.pm;
import "frameworks/base/core/proto/android/content/featureinfo.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
option java_multiple_files = true;
option java_outer_classname = "PackageServiceProto";
message PackageServiceDumpProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
message PackageShortProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Name of package. e.g. "com.android.providers.telephony".
optional string name = 1;
// UID for this package as assigned by Android OS.
optional int32 uid = 2;
}
message SharedLibraryProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional string name = 1;
// True if library path is not null (jar), false otherwise (apk)
optional bool is_jar = 2;
@@ -39,8 +46,10 @@
optional string apk = 4;
}
message SharedUserProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 user_id = 1;
- optional string name = 2;
+ optional string name = 2 [ (android.privacy).dest = DEST_EXPLICIT ];
}
// Installed packages.
@@ -51,15 +60,22 @@
repeated PackageProto packages = 5;
repeated SharedUserProto shared_users = 6;
// Messages from the settings problem file
- repeated string messages = 7;
+ repeated string messages = 7 [ (android.privacy).dest = DEST_EXPLICIT ];
}
message PackageProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
message SplitProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ // The split name of package, e.g. base
optional string name = 1;
optional int32 revision_code = 2;
}
message UserInfoProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
enum InstallType {
NOT_INSTALLED_FOR_USER = 0;
FULL_APP_INSTALL = 1;
diff --git a/core/proto/android/service/procstats.proto b/core/proto/android/service/procstats.proto
index b2e0373..15ede0c 100644
--- a/core/proto/android/service/procstats.proto
+++ b/core/proto/android/service/procstats.proto
@@ -19,6 +19,7 @@
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;
@@ -28,6 +29,7 @@
* Next Tag: 4
*/
message ProcessStatsServiceDumpProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
optional ProcessStatsSectionProto procstats_now = 1;
@@ -43,6 +45,7 @@
* Next Tag: 9
*/
message ProcessStatsSectionProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
// Elapsed realtime at start of report.
optional int64 start_realtime_ms = 1;
@@ -78,6 +81,7 @@
// Next Tag: 6
message ProcessStatsProto {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
// Name of process.
optional string process = 1;
@@ -87,6 +91,8 @@
// Information about how often kills occurred
message Kill {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
// Count of excessive CPU kills
optional int32 cpu = 1;
@@ -99,6 +105,8 @@
optional Kill kill = 3;
message State {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
enum ScreenState {
SCREEN_UNKNOWN = 0;
OFF = 1;
@@ -115,6 +123,8 @@
}
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.
@@ -127,14 +137,14 @@
IMPORTANT_BACKGROUND = 4;
// Performing backup operation.
BACKUP = 5;
- // Heavy-weight process (currently not used).
- HEAVY_WEIGHT = 6;
// Background process running a service.
- SERVICE = 7;
+ SERVICE = 6;
// Process not running, but would be if there was enough RAM.
- SERVICE_RESTARTING = 8;
+ SERVICE_RESTARTING = 7;
// Process running a receiver.
- RECEIVER = 9;
+ 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.
@@ -159,6 +169,9 @@
// 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;
}
diff --git a/core/proto/android/telephony/enums.proto b/core/proto/android/telephony/enums.proto
new file mode 100644
index 0000000..60f8d8d
--- /dev/null
+++ b/core/proto/android/telephony/enums.proto
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+syntax = "proto2";
+package android.telephony;
+
+option java_outer_classname = "TelephonyProtoEnums";
+option java_multiple_files = true;
+
+// Data conn. power states, primarily used by android/telephony/DataConnectionRealTimeInfo.java.
+enum DataConnectionPowerStateEnum {
+ DATA_CONNECTION_POWER_STATE_LOW = 1;
+ DATA_CONNECTION_POWER_STATE_MEDIUM = 2;
+ DATA_CONNECTION_POWER_STATE_HIGH = 3;
+ DATA_CONNECTION_POWER_STATE_UNKNOWN = 2147483647; // Java Integer.MAX_VALUE;
+}
+
+// Signal strength levels, primarily used by android/telephony/SignalStrength.java.
+enum SignalStrengthEnum {
+ SIGNAL_STRENGTH_NONE_OR_UNKNOWN = 0;
+ SIGNAL_STRENGTH_POOR = 1;
+ SIGNAL_STRENGTH_MODERATE = 2;
+ SIGNAL_STRENGTH_GOOD = 3;
+ SIGNAL_STRENGTH_GREAT = 4;
+}
diff --git a/core/proto/android/telephony/signalstrength.proto b/core/proto/android/telephony/signalstrength.proto
deleted file mode 100644
index 366f1d1..0000000
--- a/core/proto/android/telephony/signalstrength.proto
+++ /dev/null
@@ -1,34 +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.
- */
-
-syntax = "proto2";
-option java_package = "android.telephony";
-option java_multiple_files = true;
-
-package android.telephony;
-
-/**
- * An android.telephony.SignalStrength object.
- */
-message SignalStrengthProto {
- enum StrengthName {
- SIGNAL_STRENGTH_NONE_OR_UNKNOWN = 0;
- SIGNAL_STRENGTH_POOR = 1;
- SIGNAL_STRENGTH_MODERATE = 2;
- SIGNAL_STRENGTH_GOOD = 3;
- SIGNAL_STRENGTH_GREAT = 4;
- }
-}
diff --git a/core/proto/android/util/common.proto b/core/proto/android/util/common.proto
index 308ef70..f8f7885 100644
--- a/core/proto/android/util/common.proto
+++ b/core/proto/android/util/common.proto
@@ -17,12 +17,15 @@
syntax = "proto2";
package android.util;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
option java_multiple_files = true;
/**
* Very basic data structure used by aggregated stats.
*/
message AggStats {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
optional int64 min = 1;
@@ -35,6 +38,7 @@
* Very basic data structure to represent Duration.
*/
message Duration {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
optional int64 start_ms = 1;
diff --git a/core/proto/android/util/log.proto b/core/proto/android/util/log.proto
index fd4fa9e..416c055 100644
--- a/core/proto/android/util/log.proto
+++ b/core/proto/android/util/log.proto
@@ -17,11 +17,15 @@
syntax = "proto2";
package android.util;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
option java_multiple_files = true;
// Represents a Text Log in logd
// Next Tag: 9
message TextLogEntry {
+ option (android.msg_privacy).dest = DEST_EXPLICIT;
+
optional uint64 sec = 1;
optional uint64 nanosec = 2;
@@ -47,6 +51,8 @@
// Represents a Binary Log in logd, need to look event-log-tags for more info.
// Next Tag: 8
message BinaryLogEntry {
+ option (android.msg_privacy).dest = DEST_EXPLICIT;
+
optional uint64 sec = 1;
optional uint64 nanosec = 2;
optional int32 uid = 3;
@@ -81,6 +87,8 @@
}
message LogProto {
+ option (android.msg_privacy).dest = DEST_EXPLICIT;
+
repeated TextLogEntry text_logs = 1;
repeated BinaryLogEntry binary_logs = 2;
diff --git a/core/proto/android/view/display.proto b/core/proto/android/view/display.proto
index cac0830..30046c3 100644
--- a/core/proto/android/view/display.proto
+++ b/core/proto/android/view/display.proto
@@ -20,24 +20,6 @@
option java_multiple_files = true;
message DisplayProto {
- enum DisplayState {
- // The display state is unknown.
- DISPLAY_STATE_UNKNOWN = 0;
- // The display state is off.
- DISPLAY_STATE_OFF = 1;
- // The display state is on.
- DISPLAY_STATE_ON = 2;
- // The display is dozing in a low power state; it is still on but is
- // optimized for showing system-provided content while the device is
- // non-interactive.
- DISPLAY_STATE_DOZE = 3;
- // The display is dozing in a suspended low power state; it is still on
- // but is optimized for showing static system-provided content while the
- // device is non-interactive.
- DISPLAY_STATE_DOZE_SUSPEND = 4;
- // The display is on and optimized for VR mode.
- DISPLAY_STATE_VR = 5;
- }
enum ColorMode {
COLOR_MODE_INVALID = -1;
COLOR_MODE_BT601_625 = 1;
diff --git a/core/proto/android/view/displayinfo.proto b/core/proto/android/view/displayinfo.proto
index 9ca4046..3ac8f3b 100644
--- a/core/proto/android/view/displayinfo.proto
+++ b/core/proto/android/view/displayinfo.proto
@@ -17,10 +17,14 @@
syntax = "proto2";
package android.view;
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
+
option java_multiple_files = true;
/* represents DisplayInfo */
message DisplayInfoProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 logical_width = 1;
optional int32 logical_height = 2;
optional int32 app_width = 3;
diff --git a/core/proto/android/view/enums.proto b/core/proto/android/view/enums.proto
new file mode 100644
index 0000000..10785ce
--- /dev/null
+++ b/core/proto/android/view/enums.proto
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+syntax = "proto2";
+package android.view;
+
+option java_outer_classname = "ViewProtoEnums";
+option java_multiple_files = true;
+
+// Screen states, primarily used by android/view/Display.java.
+enum DisplayStateEnum {
+ // The display state is unknown.
+ DISPLAY_STATE_UNKNOWN = 0;
+ // The display state is off.
+ DISPLAY_STATE_OFF = 1;
+ // The display state is on.
+ DISPLAY_STATE_ON = 2;
+ // The display is dozing in a low power state; it is still on but is
+ // optimized for showing system-provided content while the device is
+ // non-interactive.
+ DISPLAY_STATE_DOZE = 3;
+ // The display is dozing in a suspended low power state; it is still on
+ // but is optimized for showing static system-provided content while the
+ // device is non-interactive.
+ DISPLAY_STATE_DOZE_SUSPEND = 4;
+ // The display is on and optimized for VR mode.
+ DISPLAY_STATE_VR = 5;
+ // The display is in a suspended full power state; it is still on but the
+ // CPU is not updating it.
+ DISPLAY_STATE_ON_SUSPEND = 6;
+}
diff --git a/core/proto/android/view/windowlayoutparams.proto b/core/proto/android/view/windowlayoutparams.proto
index f079e1e..0362ab1 100644
--- a/core/proto/android/view/windowlayoutparams.proto
+++ b/core/proto/android/view/windowlayoutparams.proto
@@ -18,12 +18,15 @@
import "frameworks/base/core/proto/android/graphics/pixelformat.proto";
import "frameworks/base/core/proto/android/view/display.proto";
+import "frameworks/base/libs/incident/proto/android/privacy.proto";
package android.view;
option java_multiple_files = true;
/* represents WindowManager.LayoutParams */
message WindowLayoutParamsProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
optional int32 type = 1;
optional int32 x = 2;
optional int32 y = 3;
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 081c92c..a0ba3ad 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -514,6 +514,7 @@
<protected-broadcast android:name="android.os.action.ACTION_EFFECTS_SUPPRESSOR_CHANGED" />
<protected-broadcast android:name="android.app.action.NOTIFICATION_CHANNEL_BLOCK_STATE_CHANGED" />
<protected-broadcast android:name="android.app.action.NOTIFICATION_CHANNEL_GROUP_BLOCK_STATE_CHANGED" />
+ <protected-broadcast android:name="android.app.action.APP_BLOCK_STATE_CHANGED" />
<protected-broadcast android:name="android.permission.GET_APP_GRANTED_URI_PERMISSIONS" />
<protected-broadcast android:name="android.permission.CLEAR_APP_GRANTED_URI_PERMISSIONS" />
@@ -577,7 +578,9 @@
<!-- Added in P -->
<protected-broadcast android:name="android.app.action.PROFILE_OWNER_CHANGED" />
<protected-broadcast android:name="android.app.action.TRANSFER_OWNERSHIP_COMPLETE" />
+ <protected-broadcast android:name="android.app.action.AFFILIATED_PROFILE_TRANSFER_OWNERSHIP_COMPLETE" />
<protected-broadcast android:name="android.app.action.DATA_SHARING_RESTRICTION_CHANGED" />
+ <protected-broadcast android:name="android.app.action.STATSD_STARTED" />
<!-- ====================================================================== -->
<!-- RUNTIME PERMISSIONS -->
@@ -969,6 +972,23 @@
android:description="@string/permdesc_manageOwnCalls"
android:protectionLevel="normal" />
+ <!-- Allows a calling app to continue a call which was started in another app. An example is a
+ video calling app that wants to continue a voice call on the user's mobile network.<p>
+ When the handover of a call from one app to another takes place, there are two devices
+ which are involved in the handover; the initiating and receiving devices. The initiating
+ device is where the request to handover the call was started, and the receiving device is
+ where the handover request is confirmed by the other party.<p>
+ This permission protects access to the
+ {@link android.telecom.TelecomManager#acceptHandover(Uri, int, PhoneAccountHandle)} which
+ the receiving side of the handover uses to accept a handover.
+ <p>Protection level: dangerous
+ -->
+ <permission android:name="android.permission.ACCEPT_HANDOVER"
+ android:permissionGroup="android.permission-group.PHONE"
+ android.label="@string/permlab_acceptHandover"
+ android:description="@string/permdesc_acceptHandovers"
+ android:protectionLevel="dangerous" />
+
<!-- ====================================================================== -->
<!-- Permissions for accessing the device microphone -->
<!-- ====================================================================== -->
@@ -1437,6 +1457,12 @@
android:label="@string/permlab_nfc"
android:protectionLevel="normal" />
+ <!-- Allows applications to receive NFC transaction events.
+ <p>Protection level: normal
+ -->
+ <permission android:name="android.permission.NFC_TRANSACTION_EVENT"
+ android:protectionLevel="normal" />
+
<!-- @SystemApi Allows an internal user to use privileged ConnectivityManager APIs.
@hide -->
<permission android:name="android.permission.CONNECTIVITY_INTERNAL"
@@ -2992,6 +3018,11 @@
<permission android:name="android.permission.CONFIGURE_DISPLAY_BRIGHTNESS"
android:protectionLevel="signature|privileged|development" />
+ <!-- Allows an application to control the system's display brightness
+ @hide -->
+ <permission android:name="android.permission.CONTROL_DISPLAY_BRIGHTNESS"
+ android:protectionLevel="signature" />
+
<!-- @SystemApi Allows an application to control VPN.
<p>Not for use by third-party applications.</p>
@hide -->
@@ -3936,6 +3967,7 @@
android:theme="@style/Theme.DeviceDefault.Light.Dialog.Alert"
android:excludeFromRecents="true"
android:process=":ui"
+ android:label="@string/harmful_app_warning_title"
android:exported="false">
</activity>
diff --git a/core/res/res/anim/activity_close_exit.xml b/core/res/res/anim/activity_close_exit.xml
index 143bedb..d87f100 100644
--- a/core/res/res/anim/activity_close_exit.xml
+++ b/core/res/res/anim/activity_close_exit.xml
@@ -34,11 +34,11 @@
android:toTop="95.9%"
android:toRight="100%"
android:toBottom="100%"
- android:interpolator="@interpolator/exaggerated_ease"
+ android:interpolator="@interpolator/fast_out_extra_slow_in"
android:duration="425"/>
<alpha
android:fromAlpha="1.0"
android:toAlpha="1.0"
android:interpolator="@interpolator/fast_out_linear_in"
android:duration="425"/>
-</set>
\ No newline at end of file
+</set>
diff --git a/core/res/res/anim/activity_open_enter.xml b/core/res/res/anim/activity_open_enter.xml
index f9381b4..cb03070 100644
--- a/core/res/res/anim/activity_open_enter.xml
+++ b/core/res/res/anim/activity_open_enter.xml
@@ -32,6 +32,6 @@
android:toTop="0%"
android:toRight="100%"
android:toBottom="100%"
- android:interpolator="@interpolator/exaggerated_ease"
+ android:interpolator="@interpolator/fast_out_extra_slow_in"
android:duration="425"/>
-</set>
\ No newline at end of file
+</set>
diff --git a/core/res/res/anim/cross_profile_apps_thumbnail_enter.xml b/core/res/res/anim/cross_profile_apps_thumbnail_enter.xml
index 3254ebb..6f3dc8c 100644
--- a/core/res/res/anim/cross_profile_apps_thumbnail_enter.xml
+++ b/core/res/res/anim/cross_profile_apps_thumbnail_enter.xml
@@ -20,19 +20,54 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false" android:zAdjustment="top">
- <alpha android:fromAlpha="0" android:toAlpha="1.0"
- android:startOffset="300"
- android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
- android:interpolator="@interpolator/decelerate_quart"
- android:duration="167"/>
+ <alpha
+ android:fromAlpha="1"
+ android:toAlpha="1.0"
+ android:fillEnabled="true"
+ android:fillBefore="true"
+ android:fillAfter="true"
+ android:interpolator="@interpolator/linear"
+ android:startOffset="67"
+ android:duration="217"/>
- <translate android:fromYDelta="110%" android:toYDelta="0"
- android:startOffset="300"
- android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
- android:interpolator="@interpolator/decelerate_quint"
- android:duration="417"/>
+ <translate
+ android:fromXDelta="-105%"
+ android:toXDelta="0"
+ android:fillEnabled="true"
+ android:fillBefore="true"
+ android:fillAfter="true"
+ android:interpolator="@interpolator/aggressive_ease"
+ android:startOffset="50"
+ android:duration="383"/>
- <!-- To keep the thumbnail around longer -->
+ <scale
+ android:fromXScale="1.0526"
+ android:toXScale="1"
+ android:fromYScale="1.0526"
+ android:toYScale="1"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:fillEnabled="true"
+ android:fillBefore="true"
+ android:fillAfter="true"
+ android:interpolator="@interpolator/fast_out_slow_in"
+ android:duration="283"/>
+
+ <scale
+ android:fromXScale="0.95"
+ android:toXScale="1"
+ android:fromYScale="0.95"
+ android:toYScale="1"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:fillEnabled="true"
+ android:fillBefore="true"
+ android:fillAfter="true"
+ android:interpolator="@interpolator/fast_out_slow_in"
+ android:startOffset="283"
+ android:duration="317"/>
+
+ <!-- To keep the thumbnail around longer and fade out the thumbnail -->
<alpha android:fromAlpha="1.0" android:toAlpha="0"
android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
android:interpolator="@interpolator/decelerate_quint"
diff --git a/core/res/res/anim/task_open_enter.xml b/core/res/res/anim/task_open_enter.xml
index 2ee7cd8..0e66eda 100644
--- a/core/res/res/anim/task_open_enter.xml
+++ b/core/res/res/anim/task_open_enter.xml
@@ -14,7 +14,9 @@
** See the License for the specific language governing permissions and
** limitations under the License.
*/
---><!-- This should in sync with task_open_enter_cross_profile_apps.xml -->
+-->
+<!-- This should in sync with task_open_enter_cross_profile_apps.xml -->
+<!-- This should in sync with cross_profile_apps_thumbnail_enter.xml -->
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false"
android:zAdjustment="top">
diff --git a/core/res/res/drawable/ic_info_outline_24.xml b/core/res/res/drawable/ic_info_outline_24.xml
new file mode 100644
index 0000000..abba8cf
--- /dev/null
+++ b/core/res/res/drawable/ic_info_outline_24.xml
@@ -0,0 +1,25 @@
+<!--
+ 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
+ -->
+
+<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="M11,17h2v-6h-2v6zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM11,9h2L13,7h-2v2z"/>
+</vector>
diff --git a/core/res/res/drawable/red_shield.xml b/core/res/res/drawable/red_shield.xml
new file mode 100644
index 0000000..7f425c7
--- /dev/null
+++ b/core/res/res/drawable/red_shield.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="34dp"
+ android:height="37dp"
+ android:viewportWidth="34"
+ android:viewportHeight="37">
+
+ <group
+ android:translateX="-3.000000"
+ android:translateY="-2.000000">
+ <path
+ android:fillType="evenOdd"
+ android:strokeWidth="1"
+ android:pathData="M 0 0 H 40 V 40 H 0 V 0 Z" />
+ <path
+ android:fillColor="#D0021B"
+ android:fillType="evenOdd"
+ android:strokeWidth="1"
+ android:pathData="M35.5858891,6.865 C27.841629,3.02166667 19.6666667,2 19.6666667,2 C19.6666667,2
+11.4917044,3.02166667 3.74744428,6.865 C3.25808614,8.915 3,11.0533333
+3,13.2533333 C3,15.515 3.27484498,17.715 3.79269315,19.8216667
+C4.89374895,24.3033333 7.09753645,28.355 10.1023965,31.6783333
+C12.7385621,34.5983333 15.9964806,36.955 19.6666667,38.5433333
+C23.3368527,36.955 26.5947712,34.5983333 29.2326127,31.6783333
+C32.2357969,28.355 34.4395844,24.3033333 35.5423161,19.8216667
+C36.0584884,17.715 36.3333333,15.515 36.3333333,13.2533333
+C36.3333333,11.0533333 36.0769231,8.915 35.5858891,6.865 M21.3333333,27.8333333
+L18,27.8333333 L18,24.5 L21.3333333,24.5 L21.3333333,27.8333333
+L21.3333333,27.8333333 Z M21.3333333,22 L18,22 L18,12 L21.3333333,12
+L21.3333333,22 L21.3333333,22 Z" />
+ </group>
+</vector>
\ No newline at end of file
diff --git a/core/res/res/interpolator/emphasized_deceleration.xml b/core/res/res/interpolator/emphasized_deceleration.xml
deleted file mode 100644
index 60c315c..0000000
--- a/core/res/res/interpolator/emphasized_deceleration.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ 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
- -->
-
-<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
- android:controlX1="0.1"
- android:controlY1="0.8"
- android:controlX2="0.2"
- android:controlY2="1"/>
\ No newline at end of file
diff --git a/core/res/res/interpolator/exaggerated_ease.xml b/core/res/res/interpolator/fast_out_extra_slow_in.xml
similarity index 87%
rename from core/res/res/interpolator/exaggerated_ease.xml
rename to core/res/res/interpolator/fast_out_extra_slow_in.xml
index 4961c1c..f160574 100644
--- a/core/res/res/interpolator/exaggerated_ease.xml
+++ b/core/res/res/interpolator/fast_out_extra_slow_in.xml
@@ -16,4 +16,4 @@
-->
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
- android:pathData="M 0,0 C 0.05, 0, 0.133333, 0.08, 0.166666, 0.4 C 0.225, 0.94, 0.25, 1, 1, 1"/>
+ android:pathData="M 0,0 C 0.05, 0, 0.133333, 0.06, 0.166666, 0.4 C 0.208333, 0.82, 0.25, 1, 1, 1"/>
diff --git a/core/res/res/layout/app_error_dialog.xml b/core/res/res/layout/app_error_dialog.xml
index d78ce59..c3b149a 100644
--- a/core/res/res/layout/app_error_dialog.xml
+++ b/core/res/res/layout/app_error_dialog.xml
@@ -18,48 +18,50 @@
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:paddingTop="@dimen/aerr_padding_list_top"
+ android:paddingBottom="@dimen/aerr_padding_list_bottom">
+
+ <Button
+ android:id="@+id/aerr_restart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingTop="@dimen/aerr_padding_list_top"
- android:paddingBottom="@dimen/aerr_padding_list_bottom">
-
+ android:text="@string/aerr_restart"
+ android:drawableStart="@drawable/ic_refresh"
+ style="@style/aerr_list_item" />
<Button
- android:id="@+id/aerr_restart"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/aerr_restart"
- android:drawableStart="@drawable/ic_refresh"
- style="@style/aerr_list_item"
- />
+ android:id="@+id/aerr_app_info"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/app_info"
+ android:drawableStart="@drawable/ic_info_outline_24"
+ style="@style/aerr_list_item" />
<Button
- android:id="@+id/aerr_close"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/aerr_close_app"
- android:drawableStart="@drawable/ic_close"
- style="@style/aerr_list_item"
- />
+ android:id="@+id/aerr_close"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/aerr_close_app"
+ android:drawableStart="@drawable/ic_close"
+ style="@style/aerr_list_item" />
<Button
- android:id="@+id/aerr_report"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/aerr_report"
- android:drawableStart="@drawable/ic_feedback"
- style="@style/aerr_list_item"
- />
+ android:id="@+id/aerr_report"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/aerr_report"
+ android:drawableStart="@drawable/ic_feedback"
+ style="@style/aerr_list_item" />
<Button
- android:id="@+id/aerr_mute"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/aerr_mute"
- android:drawableStart="@drawable/ic_eject_24dp"
- style="@style/aerr_list_item"
- />
-
+ android:id="@+id/aerr_mute"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/aerr_mute"
+ android:drawableStart="@drawable/ic_eject_24dp"
+ style="@style/aerr_list_item" />
</LinearLayout>
diff --git a/core/res/res/layout/harmful_app_warning_dialog.xml b/core/res/res/layout/harmful_app_warning_dialog.xml
new file mode 100644
index 0000000..d41691f
--- /dev/null
+++ b/core/res/res/layout/harmful_app_warning_dialog.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2018, Google Inc.
+ *
+ * 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.
+ */
+-->
+
+<ScrollView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fillViewport="true">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="@dimen/harmful_app_padding_top"
+ android:orientation="vertical">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="@dimen/harmful_app_name_padding_bottom"
+ android:paddingLeft="@dimen/harmful_app_name_padding_left"
+ android:paddingRight="@dimen/harmful_app_name_padding_right"
+ android:paddingTop="@dimen/harmful_app_name_padding_top"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:layout_width="@dimen/harmful_app_icon_size"
+ android:layout_height="@dimen/harmful_app_icon_size"
+ android:scaleType="fitCenter"
+ android:src="@drawable/red_shield"/>
+
+ <TextView
+ android:id="@+id/app_name_text"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:gravity="center_vertical"
+ android:textColor="@color/primary_text_material_light"
+ android:textSize="@dimen/text_size_subhead_material"
+ android:paddingLeft="@dimen/harmful_app_icon_name_padding">
+ </TextView>
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/message"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingLeft="@dimen/harmful_app_message_padding_left"
+ android:paddingRight="@dimen/harmful_app_message_padding_right"
+ android:paddingBottom="@dimen/harmful_app_message_padding_bottom"
+ android:lineSpacingMultiplier="@dimen/harmful_app_message_line_spacing_modifier"
+ android:textSize="@dimen/text_size_body_1_material"/>
+ </LinearLayout>
+</ScrollView>
\ No newline at end of file
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 1bb3417..f3db598 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Jou organisasie bestuur hierdie toestel en kan netwerkverkeer monitor. Tik vir besonderhede."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Jou toestel sal uitgevee word"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Die administrasieprogram kan nie gebruik word nie. Jou toestel sal nou uitgevee word.\n\nKontak jou organisasie se administrateur as jy vrae het."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Druk is gedeaktiveer deur <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Ek"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Tablet-opsies"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV-opsies"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Noodgeval"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Foutverslag"</string>
<string name="global_action_logout" msgid="935179188218826050">"Beëindig sessie"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Skermkiekie"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Neem foutverslag"</string>
<string name="bugreport_message" msgid="398447048750350456">"Dit sal inligting oor die huidige toestand van jou toestel insamel om as \'n e-posboodskap te stuur. Dit sal \'n tydjie neem vandat die foutverslag begin is totdat dit reg is om gestuur te word; wees asseblief geduldig."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interaktiewe verslag"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Veiligmodus"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-stelsel"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Skakel oor na persoonlik"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Skakel oor na werk"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontakte"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"in te gaan by jou kontakte"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Gee <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> toegang tot jou kontakte"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Laat die program toe om toegang tot die foonfunksies van die toestel te verkry. Hierdie toestemming laat die program toe om te bepaal wat die foonnommer en toestel-IDs is, of die oproep aan die gang is, en die afgeleë nommer wat deur \'n oproep verbind word."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"roeteer oproepe deur die stelsel"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Laat die program toe om sy oproepe deur die stelsel te stuur om die oproepervaring te verbeter."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"lees foonnommers"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Laat die program toe om toegang tot die toestel se foonnommers te kry."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"verhoed dat tablet slaap"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Vinger is te stadig beweer. Probeer asseblief weer."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nie herken nie"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Vingerafdrukhardeware is nie beskikbaar nie."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Vingerafdruk kan nie gestoor word nie. Verwyder asseblief \'n bestaande vingerafdruk."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Vingerafdrukuittelling is bereik. Probeer weer."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Vingerafdrukhandeling is gekanselleer."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Te veel pogings. Probeer later weer."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Te veel pogings. Vingerafdruksensor is gedeaktiveer."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Probeer weer."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Maak oop"</string>
<string name="sms" msgid="4560537514610063430">"SMS"</string>
<string name="add_contact" msgid="7867066569670597203">"Voeg by"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Bergingspasie word min"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Sommige stelselfunksies werk moontlik nie"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Nie genoeg berging vir die stelsel nie. Maak seker jy het 250 MB spasie beskikbaar en herbegin."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Oop Wi-Fi-netwerk beskikbaar</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Koppel aan oop Wi-Fi-netwerk"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Koppel tans aan oop Wi‑Fi-netwerk"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Aan Wi-Fi-netwerk gekoppel"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Kon nie aan Wi-Fi-netwerk koppel nie"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi-Fi sal outomaties aanskakel"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Wanneer jy naby \'n gestoorde hoëgehaltenetwerk is"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Moenie weer aanskakel nie"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi is outomaties aangeskakel"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Jy is naby \'n gestoorde netwerk: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Meld aan by Wi-Fi-netwerk"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Meld by netwerk aan"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> oor gespesifiseerde limiet."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Agtergronddata is beperk"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Tik om beperking te verwyder."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Groot datagebruik"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Jou datagebruik was die laaste paar dae groter as normaalweg. Tik om die gebruik en instellings te bekyk."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Sekuriteitsertifikaat"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Die sertifikaat is geldig."</string>
<string name="issued_to" msgid="454239480274921032">"Uitgereik aan:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Tot <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Tot <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (volgende wekker)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Totdat jy Moenie Steur Nie afskakel"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Totdat jy dit afskakel"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Totdat jy Moenie Steur Nie afskakel"</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">"Vou in"</string>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Alle tale"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Allle streke"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Soek"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Skakel werkmodus aan?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Dit sal jou werkprofiel, insluitend programme, agtergrondsinkronisering en verwante kenmerke, aanskakel"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Skakel aan"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Jy het nuwe boodskappe"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Maak SMS-program oop om te bekyk"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Sommige funksies kan beperk wees"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Kon nie die kortpad teruglaai nie omdat die program nie rugsteun en teruglaai steun nie"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Kon nie teruglaai nie omdat programondertekening nie ooreenstem nie"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Kon nie kortpad teruglaai nie"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Kortpad is gedeaktiveer"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> wil <xliff:g id="APP_2">%2$s</xliff:g>-skyfies wys"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Wysig"</string>
</resources>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index ee287c3..0dbda7f 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"የእርስዎ ድርጅት ይህን መሣሪያ ያስተዳድራል፣ እና የአውታረ መረብ ትራፊክን ሊከታተል ይችላል። ዝርዝሮችን ለማግኘት መታ ያድርጉ።"</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"የእርስዎ መሣሪያ ይደመሰሳል"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"የአስተዳዳሪ መተግበሪያ ጥቅም ላይ ሊውል አይችልም። የእርስዎን መሣሪያ አሁን ይደመሰሳል።\n\nጥያቄዎች ካልዎት የእርስዎን ድርጅት አስተዳዳሪ ያነጋግሩ።"</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"ማተም በ<xliff:g id="OWNER_APP">%s</xliff:g> ተሰናክሏል።"</string>
<string name="me" msgid="6545696007631404292">"እኔ"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"የጡባዊ አማራጮች"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"የቴሌቪዥን አማራጮች"</string>
@@ -263,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>፣ <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"የሚያስተማምን ሁነታ"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android ስርዓት"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"ወደ የግል ቀይር"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"ወደ ሥራ ቀይር"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"ዕውቂያዎች"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"የእርስዎ እውቂያዎች ላይ ይድረሱባቸው"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> እውቂያዎችዎን እንዲደርስ ይፍቀዱለት"</string>
@@ -416,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"መተግበሪያው የመሳሪያውን የስልክ ባህሪያት ላይ እንዲደርስ ይፈቅድለታል። ይህ ፈቃድ መተግበሪያው የስልክ ቁጥሩን እና የመሳሪያውን መታወቂያዎች፣ ጥሪ የነቃ እንደሆነ፣ እና በጥሪ የተገናኘውን የሩቅ ቁጥር እንዲወስን ይፈቅድለታል።"</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"ጥሪዎችን በስርዓቱ በኩል አዙር"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"መተግበሪያው የጥሪ ተሞክሮን እንዲያሻሽል ጥሪዎቹን በስርዓቱ በኩል እንዲያዞር ያስችለዋል።"</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ስልክ ቁጥሮች ያንብቡ"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"መተግበሪያው የመሣሪያውን የስልክ ቁጥሮች እንዲደርስባቸው ይፈቅድለታል።"</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ጡባዊ ከማንቀላፋት ተከላከል"</string>
@@ -485,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"ጣት ከልክ በላይ ተንቀራፎ ተንቀሳቅሷል። እባክዎ እንደገና ይሞክሩ።"</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"አልታወቀም"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"የጣት አሻራ ሃርድዌር አይገኝም።"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"የጣት አሻራ ሊከማች አይችልም። እባክዎ አሁን ያለውን የጣት አሻራ ያስወግዱ።"</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"የጣት አሻራ ማብቂያ ጊዜ ደርሷል። እንደገና ይሞክሩ።"</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"የጣት አሻራ ስርዓተ ክወና ተትቷል።"</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"ከልክ በላይ ብዙ ሙከራዎች። በኋላ ላይ እንደገና ይሞክሩ።"</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"በጣም ብዙ ሙከራዎች። የጣት አሻራ ዳሳሽ ተሰናክሏል።"</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"እንደገና ይሞክሩ።"</string>
@@ -990,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"ክፈት"</string>
<string name="sms" msgid="4560537514610063430">"መልዕክት"</string>
<string name="add_contact" msgid="7867066569670597203">"አክል"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"የማከማቻ ቦታ እያለቀ ነው"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"አንዳንድ የስርዓት ተግባራት ላይሰሩ ይችላሉ"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"ለስርዓቱ የሚሆን በቂ ቦታ የለም። 250 ሜባ ነጻ ቦታ እንዳለዎት ያረጋግጡና ዳግም ያስጀምሩ።"</string>
@@ -1115,6 +1131,8 @@
<item quantity="other">የሚገኙ የWi-Fi አውታረ መረቦችን ክፈት</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"ከክፍት የWi‑Fi አውታረ መረብ ጋር ያገናኙ"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"ከክፍት የWi‑Fi አውታረ መረብ ጋር በመገናኘት ላይ"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"ከWi‑Fi አውታረ መረብ ጋር ተገናኝቷል"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"ከWi‑Fi አውታረ መረብ ጋር መገናኘት አልተቻለም"</string>
@@ -1412,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> ከተወሰነለት በላይ።"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"ዳራ ውሂብ የተገደበ ነው"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"ገደብን ለማስወገድ መታ ያድርጉ።"</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"ትልቅ የውሂብ አጠቃቀም"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"ባለፉት ጥቂት ቀናት ላይ የነበረው የእርስዎ የውሂብ አጠቃቀም ከተለመደው የበለጠ ነው። አጠቃቀምን እና ቅንብሮችን ለመመልከት መታ ያድርጉ።"</string>
<string name="ssl_certificate" msgid="6510040486049237639">"የደህንነት ዕውቅና ማረጋገጫ"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"ይህ የዐዕውቅና ማረጋገጫ ትክክል ነው።"</string>
<string name="issued_to" msgid="454239480274921032">"ለ፡ ተዘጋጀ"</string>
@@ -1688,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"እስከ <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> ድረስ"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"እስከ <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (ቀጣይ ማንቂያ)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"አትረብሽን እስኪያጠፉ ድረስ"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"እስኪያጠፉት ድረስ"</string>
<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>
@@ -1737,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"ሁሉም ቋንቋዎች"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"ሁሉም ክልሎች"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"ፈልግ"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"የሥራ ሁነታ ይጥፋ?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"ይህ የእርስዎን የሥራ መገለጫ መተግበሪያዎችን፣ የበስተጀርባ ስምረት እና ተዛማጅ ባህሪያትን ጨምሮ እንዲበሩ ያደርጋቸዋል"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"አብራ"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"አዲስ መልእክቶች አለዎት"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"ለመመልከት የኤስኤምኤስ መተግበሪያ ይክፈቱ"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"አንዳንድ ተግባሮች የተገደቡ ሊሆኑ ይችላሉ"</string>
@@ -1811,7 +1837,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"በመተግበሪያ ፊርማ አለመዛመድ አቋራጭን ወደነበረበት መመለስ አልተቻለም"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"አቋራጭን ወደ ነበረበት መመለስ አልተቻለም"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"አቋራጭ ተሰናክሏል"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"አራግፍ"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"የሆነው ሆኖ አስጀምር"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"ጎጂ መተግበሪያ ይራገፍ?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> የ<xliff:g id="APP_2">%2$s</xliff:g> ቁራጮችን ማሳየት ይፈልጋል"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"አርትዕ"</string>
</resources>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index e929bf8..065869c 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -189,6 +189,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"تدير مؤسستك هذا الجهاز ويمكنها مراقبة حركة بيانات الشبكة. يمكنك النقر للحصول على تفاصيل."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"سيتم محو بيانات جهازك."</string>
<string name="factory_reset_message" msgid="7972496262232832457">"تعذر استخدام تطبيق المشرف. سيتم محو بيانات جهازك الآن.\n\nإذا كانت لديك أسئلة، فاتصل بمشرف مؤسستك."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"تم تعطيل الطباعة بواسطة <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"أنا"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"خيارات الجهاز اللوحي"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"خيارات التلفزيون"</string>
@@ -225,6 +226,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"الطوارئ"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"تقرير الأخطاء"</string>
<string name="global_action_logout" msgid="935179188218826050">"إنهاء الجلسة"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"لقطة شاشة"</string>
<string name="bugreport_title" msgid="2667494803742548533">"إعداد تقرير بالأخطاء"</string>
<string name="bugreport_message" msgid="398447048750350456">"سيجمع هذا معلومات حول حالة جهازك الحالي لإرسالها كرسالة إلكترونية، ولكنه سيستغرق وقتًا قليلاً من بدء عرض تقرير بالأخطاء. وحتى يكون جاهزًا للإرسال، يُرجى الانتظار."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"تقرير تفاعلي"</string>
@@ -274,8 +276,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>، <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"الوضع الآمن"</string>
<string name="android_system_label" msgid="6577375335728551336">"نظام Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"التبديل إلى الشخصي"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"التبديل إلى العمل"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"جهات الاتصال"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"الوصول إلى جهات اتصالك"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"السماح لتطبيق <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> بالوصول إلى جهات الاتصال"</string>
@@ -427,6 +431,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"للسماح للتطبيق بالدخول إلى ميزات الهاتف في الجهاز. ويتيح هذا الإذن للتطبيق تحديد رقم الهاتف ومعرّفات الجهاز، وما إذا كانت هناك مكالمة نشطة والرقم البعيد الذي تم الاتصال به في المكالمة."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"توجيه المكالمات من خلال النظام"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"يسمح للتطبيق بتوجيه المكالمات من خلال النظام لتحسين تجربة الاتصال."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"قراءة أرقام الهواتف"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"للسماح للتطبيق بالوصول إلى أرقام الهواتف على هذا الجهاز."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"منع الجهاز اللوحي من الدخول في وضع السكون"</string>
@@ -496,10 +504,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"تم تحريك الإصبع ببطء شديد. يُرجى إعادة المحاولة."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"لم يتم التعرف عليها"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"جهاز بصمة الإصبع غير متاح."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"يتعذر تخزين بصمة الإصبع؛ يرجى إزالة إحدى البصمات المخزنة."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"تم بلوغ مهلة إدخال بصمة الإصبع. أعد المحاولة."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"تم إلغاء تشغيل بصمة الإصبع."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"تم إجراء عدد كبير من المحاولات. أعد المحاولة لاحقًا."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"تم إجراء عدد كبير جدًا من المحاولات. لذا تم تعطيل مستشعر بصمات الإصبع."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"أعد المحاولة."</string>
@@ -1069,6 +1080,12 @@
<string name="browse" msgid="1245903488306147205">"فتح"</string>
<string name="sms" msgid="4560537514610063430">"رسالة"</string>
<string name="add_contact" msgid="7867066569670597203">"إضافة"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"مساحة التخزين منخفضة"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"قد لا تعمل بعض وظائف النظام"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"ليست هناك سعة تخزينية كافية للنظام. تأكد من أنه لديك مساحة خالية تبلغ ٢٥٠ ميغابايت وأعد التشغيل."</string>
@@ -1202,6 +1219,8 @@
<item quantity="one">تتوفر شبكة Wi-Fi واحدة مفتوحة</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"الاتصال بشبكة Wi-Fi المفتوحة"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"جارٍ الاتصال بشبكة Wi-Fi المفتوحة"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"تم الاتصال بشبكة Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"تعذَّر الاتصال بشبكة Wi‑Fi"</string>
@@ -1211,6 +1230,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"سيتم تشغيل شبكة Wi-Fi تلقائيًا."</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"عندما تكون بالقرب من شبكة محفوظة عالية الجودة"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"عدم إعادة التشغيل"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"تم تفعيل شبكة Wi-Fi تلقائيًا."</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"أنت قريب من شبكة محفوظة: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>."</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"تسجيل الدخول إلى شبكة Wi-Fi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"تسجيل الدخول إلى الشبكة"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1501,6 +1522,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> فوق الحد المعين."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"تم تقييد بيانات الخلفية"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"انقر لإزالة القيد."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"معدل مرتفع لاستخدام البيانات"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"لقد تجاوز استخدامك للبيانات خلال الأيام القليلة الماضية المعدل المعتاد. انقر لعرض البيانات عن الاستخدام والإعدادات."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"شهادة الأمان"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"هذه الشهادة صالحة."</string>
<string name="issued_to" msgid="454239480274921032">"إصدار لـ:"</string>
@@ -1817,7 +1840,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"حتى <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"حتى <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (التنبيه التالي)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"حتى يتم تعطيل \"عدم الإزعاج\""</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"لحين الإيقاف"</string>
<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>
@@ -1870,9 +1893,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"جميع اللغات"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"كل المناطق"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"البحث"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"هل تريد تشغيل وضع العمل؟"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"سيؤدي هذا إلى تشغيل الملف الشخصي للعمل، بما في ذلك التطبيقات ومزامنة الخلفية والميزات ذات الصلة"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"تشغيل"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"لديك رسائل جديدة"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"فتح تطبيق الرسائل القصيرة SMS للعرض"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"ربما تكون بعض الوظائف مُقيّدة."</string>
@@ -1947,6 +1976,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"تعذّرت استعادة الاختصار لأن التطبيق لا يوفِّر إمكانية النسخ الاحتياطي والاستعادة"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"تعذّرت استعادة الاختصار بسبب عدم تطابق توقيع التطبيق"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"تعذّرت استعادة الاختصار"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"تم إيقاف الاختصار"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"يريد تطبيق <xliff:g id="APP_0">%1$s</xliff:g> عرض شرائح تطبيق <xliff:g id="APP_2">%2$s</xliff:g>."</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"تعديل"</string>
</resources>
diff --git a/core/res/res/values-az/strings.xml b/core/res/res/values-az/strings.xml
index 8069d6c..5255a12 100644
--- a/core/res/res/values-az/strings.xml
+++ b/core/res/res/values-az/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Təşkilat bu cihazı idarə edir və şəbəkənin ötürülməsinə nəzarət edə bilər. Detallar üçün klikləyin."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Cihazınız təmizlənəcəkdir"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Bu admin tətbiqini istifadə etmək mümkün deyil. Cihaz indi təmizlənəcək.\n\nSualınız varsa, təşkilatın admini ilə əlaqə saxlayın."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Çap <xliff:g id="OWNER_APP">%s</xliff:g> tərəfindən deaktiv edildi."</string>
<string name="me" msgid="6545696007631404292">"Mən"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Planşet seçimləri"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV seçimləri"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Təcili"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Baq hesabatı"</string>
<string name="global_action_logout" msgid="935179188218826050">"Sessiyanı sonlandırın"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Skrinşot"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Baqı xəbər verin"</string>
<string name="bugreport_message" msgid="398447048750350456">"Bu, sizin hazırkı cihaz durumu haqqında məlumat toplayacaq ki, elektron məktub şəklində göndərsin. Baq raportuna başlamaq üçün bir az vaxt lazım ola bilər, bir az səbr edin."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"İnteraktiv hesabat"</string>
@@ -262,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Təhlükəsiz rejim"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android sistemi"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Şəxsi profilə keçirin"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"İş profilinə keçirin"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Şəxsi profilə keçin"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"İş profilinə keçin"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontaktlar"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"kontaktlarınıza daxil olun"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> tətbiqinə kontaktlara daxil olmaq icazəsi verin"</string>
@@ -415,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Tətbiqə cihazın telefon funksiyalarına giriş icazəsi verir. Belə icazəli tətbiq bu telefonun nömrəsini və cihaz İD\'ni, zəngin aktiv olub-olmadığını və zəng edilən nömrəni müəyyən edə bilər."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"zəngləri sistem üzərindən yönləndirin"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Tətbiqə, zəng təcrübəsini yaxşılaşdırmaq üçün, zəngləri sistem üzərindən yönləndirməyə icazə verilir."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"telefon nömrələrini oxuyun"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Tətbiqə cihazın telefon nömrələrinə daxil olmağa icazə verir."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"planşetin yuxu rejiminin qarşısını almaq"</string>
@@ -484,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Barmağınızı çox yavaş hərəkət etdirdiniz. Lütfən, yenidən cəhd edin."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Tanınmır"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Barmaq izi üçün avadanlıq yoxdur."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Barmaq izi saxlana bilməz. Lütfən, mövcud barmaq izini silin."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Barmaq izinin vaxtı başa çatdı. Yenidən cəhd edin."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Barmaq izi əməliyyatı ləğv edildi."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Barmaq izi əməliyyatı istifadəçi tərəfindən ləğv edildi."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Cəhdlər çox oldu. Sonraya saxlayın."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Həddindən çox cəhd. Barmaq izi sensoru deaktiv edilib."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Yenidən cəhd edin."</string>
@@ -989,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"Açın"</string>
<string name="sms" msgid="4560537514610063430">"Mesaj"</string>
<string name="add_contact" msgid="7867066569670597203">"Əlavə edin"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Yaddaş yeri bitir"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Bəzi sistem funksiyaları işləməyə bilər"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Sistem üçün yetərincə yaddaş ehtiyatı yoxdur. 250 MB yaddaş ehtiyatının olmasına əmin olun və yenidən başladın."</string>
@@ -1114,6 +1128,8 @@
<item quantity="one">Əlçatan açıq Wi-Fi şəbəkəsi</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Açıq Wi‑Fi şəbəkəsinə qoşulun"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Açıq Wi‑Fi şəbəkəsinə qoşulur"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Wi‑Fi şəbəkəsinə qoşuldu"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Wi‑Fi şəbəkəsinə qoşulmaq mümkün deyil"</string>
@@ -1123,6 +1139,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi avtomatik olaraq aktiv ediləcək"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Yadda saxlanmış yüksək keyfiyyətli şəbəkələr yaxınlıqda olduqda"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Yenidən aktiv etməyin"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi avtomatik aktiv edildi"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Yadda saxlanmış şəbəkəyə yaxınsınız: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Wi-Fi şəbəkəsinə daxil ol"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Şəbəkəyə daxil olun"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1427,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> müəyyən edilmiş limit aşır."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Arxaplan datası məhdudlaşdırıldı"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Məhdudiyyəti aradan qaldırmaq üçün tıklayın."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Geniş data istifadəsi"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Son bir neçə gün ərzində olan data istifadəniz normadan çoxdur. İstifadəyə və ayarlara baxmaq üçün klikləyin."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Təhlükəsizlik sertifikatı"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Bu sertifikat etibarlıdır."</string>
<string name="issued_to" msgid="454239480274921032">"Verilib:"</string>
@@ -1685,7 +1705,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Saat <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> qədər"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> radəsinə qədər (növbəti siqnal)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"\"Narahat etməyin\" seçiminini deaktiv edənə kimi"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Deaktiv edənə qədər"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"\"Narahat etməyin\" seçiminini deaktiv edənə kimi"</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">"Dağıt"</string>
@@ -1734,9 +1754,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Bütün dillər"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Bütün bölgələr"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Axtarın"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"İş rejimi aktiv edilsin?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Bununla tətbiq, arax fon sinxronizasiyası və əlaqəli funksiyalar daxil olmaqla iş profili aktiv ediləcək"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"İş profili aktiv edilsin?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"İş tətbiqləri, bildirişləri, data və digər iş profili funksiyaları aktiv ediləcək"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Aktivləşdirin"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Yeni mesajlarınız var"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Baxmaq üçün SMS tətbiqini açın"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Bir neçə funksionallıq məhdudlaşdırıla bilər"</string>
@@ -1807,6 +1831,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Qısayolu bərpa etmək mümkün olmadı, çünki tətbiq yedəkləməni və bərpa etməyi dəstəkləmir"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Tətbiqin imza uyğunsuzluğu səbəbilə qısayolu bərpa etmək mümkün olmadı"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Qısayolu bərpa etmək mümkün olmadı"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Qısayol deaktiv edildi"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> <xliff:g id="APP_2">%2$s</xliff:g> tətbiqindən bölmələr göstərmək istəyir"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Redaktə edin"</string>
</resources>
diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml
index bb5a404..8cc35d4 100644
--- a/core/res/res/values-b+sr+Latn/strings.xml
+++ b/core/res/res/values-b+sr+Latn/strings.xml
@@ -183,6 +183,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Organizacija upravlja ovim uređajem i može da nadgleda mrežni saobraćaj. Dodirnite za detalje."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Uređaj će biti obrisan"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Ne možete da koristite ovu aplikaciju za administratore. Uređaj će sada biti obrisan.\n\nAko imate pitanja, kontaktirajte administratora organizacije."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Štampanje je onemogućila aplikacija <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Ja"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opcije za tablet"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opcije za TV"</string>
@@ -219,6 +220,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Hitni poziv"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Izveštaj o grešci"</string>
<string name="global_action_logout" msgid="935179188218826050">"Završi sesiju"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Snimak ekrana"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Napravi izveštaj o grešci"</string>
<string name="bugreport_message" msgid="398447048750350456">"Ovim će se prikupiti informacije o trenutnom stanju uređaja kako bi bile poslate u poruci e-pošte. Od započinjanja izveštaja o grešci do trenutka za njegovo slanje proći će neko vreme; budite strpljivi."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interaktiv. izveštaj"</string>
@@ -265,8 +267,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Bezbedni režim"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android sistem"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Pređi na Lični profil"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Pređi na profil za Work"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontakti"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"pristupi kontaktima"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Dozvolite da <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> pristupa kontaktima"</string>
@@ -418,6 +422,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Dozvoljava aplikaciji da pristupa funkcijama telefona na uređaju. Ova dozvola omogućava aplikaciji da utvrdi broj telefona i ID-ove uređaja, zatim da li je poziv aktivan, kao i broj daljinskog uređaja sa kojim je uspostavljen poziv."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"preusmeravanje poziva preko sistema"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Dozvoljava aplikaciji da preusmerava pozive preko sistema da bi poboljšala doživljaj pozivanja."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"čitanje brojeva telefona"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Dozvoljava aplikaciji da pristupa brojevima telefona na uređaju."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"sprečavanje prelaska tableta u stanje spavanja"</string>
@@ -487,10 +495,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Previše sporo ste pomerili prst. Probajte ponovo."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nije prepoznat"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hardver za otiske prstiju nije dostupan."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Nije moguće sačuvati otisak prsta. Uklonite neki od postojećih otisaka prstiju."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Vremensko ograničenje za otisak prsta je isteklo. Probajte ponovo."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Radnja sa otiskom prsta je otkazana."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Previše pokušaja. Probajte ponovo kasnije."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Previše pokušaja. Senzor za otisak prsta je onemogućen."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Probajte ponovo."</string>
@@ -1009,6 +1020,12 @@
<string name="browse" msgid="1245903488306147205">"Otvori"</string>
<string name="sms" msgid="4560537514610063430">"Pošalji SMS"</string>
<string name="add_contact" msgid="7867066569670597203">"Dodaj"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Memorijski prostor je na izmaku"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Neke sistemske funkcije možda ne funkcionišu"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Nema dovoljno memorijskog prostora za sistem. Uverite se da imate 250 MB slobodnog prostora i ponovo pokrenite."</string>
@@ -1136,6 +1153,8 @@
<item quantity="other">Otvorene Wi-Fi mreže su dostupne</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Povežite se sa otvorenom Wi‑Fi mrežom"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Povezujete se sa otvorenom Wi‑Fi mrežom"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Povezali ste se sa Wi‑Fi mrežom"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Povezivanje sa Wi‑Fi mrežom nije uspelo"</string>
@@ -1145,6 +1164,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi će se automatski uključiti"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Kada ste u blizini sačuvane mreže visokog kvaliteta"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Ne uključuj ponovo"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi je automatski uključen"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"U blizini ste sačuvane mreže: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Prijavljivanje na Wi-Fi mrežu"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Prijavite se na mrežu"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1432,6 +1453,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> preko navedenog ograničenja."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Pozadinski podaci su ograničeni"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Dodirnite za uklanjanje ograničenja."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Velika potrošnja podataka"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Potrošnja podataka tokom poslednjih par dana je veća nego obično. Dodirnite da biste pregledali potrošnju i podešavanja."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Bezbednosni sertifikat"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Ovaj sertifikat je važeći."</string>
<string name="issued_to" msgid="454239480274921032">"Izdato za:"</string>
@@ -1718,7 +1741,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Do <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Do <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (sledeći alarm)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Dok ne isključite režim Ne uznemiravaj"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Dok ne isključite"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Dok ne isključite režim Ne uznemiravaj"</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">"Skupi"</string>
@@ -1768,9 +1791,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Svi jezici"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Svi regioni"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Pretraži"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Uključiti režim za Work?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Ovo će uključiti profil za Work, uključujući aplikacije, sinhronizaciju u pozadini i srodne funkcije."</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Uključi"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Imate nove poruke"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Otvorite aplikaciju za SMS da biste pregledali"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Neke funkcije su možda ograničene"</string>
@@ -1842,6 +1871,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Vraćanje prečice nije uspelo jer aplikacija ne podržava pravljenje rezervne kopije i vraćanje"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Vraćanje prečice nije uspelo jer se potpisi aplikacija ne podudaraju"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Vraćanje prečice nije uspelo"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Prečica je onemogućena"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"Aplikacija <xliff:g id="APP_0">%1$s</xliff:g> želi da prikazuje isečke iz aplikacije <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Izmeni"</string>
</resources>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index b5e28b3..64ee9d7 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -185,6 +185,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Ваша арганізацыя кіруе гэтай прыладай і можа сачыць за сеткавым трафікам. Дакраніцеся для атрымання дадатковай інфармацыі."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Даныя вашай прылады будуць сцерты"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Немагчыма выкарыстоўваць праграму адміністратара. Зараз звесткі на вашай прыладзе будуць выдалены.\n\nКалі ў вас ёсць пытанні, звярніцеся да адміністратара вашай арганізацыі."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Друк адключаны ўладальнікам праграмы <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Я"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Параметры планшэта"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Параметры ТБ"</string>
@@ -221,6 +222,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"SOS-выклік"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Справаздача пра памылкі"</string>
<string name="global_action_logout" msgid="935179188218826050">"Скончыць сеанс"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Здымак экрана"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Справаздача пра памылку"</string>
<string name="bugreport_message" msgid="398447048750350456">"Будзе збiрацца iнфармацыя пра бягучы стан прылады, якая будзе адпраўляцца на электронную пошту. Стварэнне справаздачы пра памылкi зойме некаторы час."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Інтэрактыўная справаздача"</string>
@@ -268,8 +270,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Бяспечны рэжым"</string>
<string name="android_system_label" msgid="6577375335728551336">"Сістэма Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Пераключыцца на асабісты"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Пераключыцца на працоўны"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Кантакты"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"атрымліваць доступ да вашых кантактаў"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Дазволіць <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> атрымліваць доступ да вашых кантактаў"</string>
@@ -421,6 +425,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Дазваляе прыкладанням атрымлiваць доступ да функцый тэлефона на прыладзе. Дзякуючы гэтаму дазволу прыкладанне можа вызначаць iдэнтыфiкатары нумару тэлефона i прылады, незалежна ад таго, цi актыўны выклiк, i аддалены нумар, на якi робiцца выклiк."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"перанакіраванне выклікаў праз сістэму"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Дазваляе праграме перанакіроўваць выклікі праз сістэму ў мэтах паляпшэння выклікаў."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"счытваць нумары тэлефонаў"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Дазваляе праграме атрымліваць доступ да нумароў тэлефонаў на прыладзе."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"прадухіліць планшэт ад пераходу ў рэжым сну"</string>
@@ -490,10 +498,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Палец рухаўся занадта павольна. Паспрабуйце яшчэ раз."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Не распазнаны"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Апаратныя сродкі адбіткаў пальцаў недаступныя."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Адбіткі пальцаў нельга захаваць. Выдаліце існы адбітак."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Час чакання адбіткаў пальцаў выйшаў. Паспрабуйце яшчэ раз."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Аперацыя з адбіткамі пальцаў скасавана."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Занадта шмат спроб. Паспрабуйце яшчэ раз пазней."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Занадта шмат спроб. Сканер адбіткаў пальцаў адключаны."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Паспрабуйце яшчэ раз."</string>
@@ -1029,6 +1040,12 @@
<string name="browse" msgid="1245903488306147205">"Адкрыць"</string>
<string name="sms" msgid="4560537514610063430">"Паведамленне"</string>
<string name="add_contact" msgid="7867066569670597203">"Дадаць"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Месца для захавання на зыходзе"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Некаторыя сістэмныя функцыі могуць не працаваць"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Не хапае сховішча для сістэмы. Пераканайцеся, што ў вас ёсць 250 МБ свабоднага месца, і перазапусціце."</string>
@@ -1158,6 +1175,8 @@
<item quantity="other">адкрытай сеткі Wi-Fi даступна</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Падключыцеся да адкрытай сеткі Wi-Fi"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Ідзе падключэнне да адкрытай сеткі Wi‑Fi"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Выканана падключэнне да адкрытай сеткі Wi‑Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Не атрымалася падключыцца да адкрытай сеткі Wi‑Fi"</string>
@@ -1167,6 +1186,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi уключыцца аўтаматычна"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Побач з захаванай сеткай з высакаякасным сігналам"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Не ўключаць зноў"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi уключыўся аўтаматычна"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Вы знаходзіцеся побач з захаванай сеткай: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Уваход у сетку Wi-Fi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Увайдзіце ў сетку"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1455,6 +1476,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"Аб\'ём <xliff:g id="SIZE">%s</xliff:g> перавышае устаноўл. мяжу."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Зыходныя дадзеныя абмежаваныя"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Дакраніцеся, каб зняць абмежав."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Значнае выкарыстанне трафіка"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"У апошнія некалькі дзён вы выкарысталі больш трафіку, чым звычайна. Націсніце для прагляду выкарыстання і налад."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Сертыфікат бяспекі"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Гэты сертыфікат сапраўдны."</string>
<string name="issued_to" msgid="454239480274921032">"Каму выдадзена:"</string>
@@ -1751,7 +1774,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Да <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Да <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (наступны будзільнік)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Пакуль вы не выключыце рэжым \"Не турбаваць\""</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Пакуль не выключыце"</string>
<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>
@@ -1802,9 +1825,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Усе мовы"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Усе рэгіёны"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Шукаць"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Уключыць працоўны рэжым?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Гэта прывядзе да ўключэння вашага працоўнага профілю, у тым ліку праграм, фонавай сінхранізацыі і звязаных з імі функцый"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Уключыць"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"У вас ёсць новыя паведамленні"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Праглядзець праз праграму для SMS"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Частка функц. можа быць абмеж."</string>
@@ -1877,6 +1906,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Не атрымалася аднавіць ярлык, бо праграма не падтрымлівае рэзервовае капіраванне і аднаўленне"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Не атрымалася аднавіць ярлык з-за несупадзення подпісаў праграм"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Не атрымалася аднавіць ярлык"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Ярлык адключаны"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"Праграма <xliff:g id="APP_0">%1$s</xliff:g> запытвае дазвол на паказ зрэзаў праграмы <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Рэдагаваць"</string>
</resources>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index e069c4e..0904e77 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Организацията ви управлява това устройство и може да наблюдава мрежовия трафик. Докоснете за подробности."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Данните на устройството ви ще бъдат изтрити"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Приложението за администриране не може да се използва. Сега данните на устройството ви ще бъдат изтрити.\n\nАко имате въпроси, свържете се с администратора на организацията си."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Отпечатването е деактивиранo от <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Аз"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Опции за таблета"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Опции за телевизора"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Спешно обаждане"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Сигнал за програмна грешка"</string>
<string name="global_action_logout" msgid="935179188218826050">"Прекратяване на сесията"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Екранна снимка"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Сигнал за програмна грешка"</string>
<string name="bugreport_message" msgid="398447048750350456">"По този начин ще се събере информация за текущото състояние на устройството ви, която да се изпрати като имейл съобщение. След стартирането на процеса ще мине известно време, докато сигналът за програмна грешка бъде готов за подаване. Моля, имайте търпение."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Интерактивен сигнал"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Безопасен режим"</string>
<string name="android_system_label" msgid="6577375335728551336">"Система Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Превключване към личния потребителски профил"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Превключване към служебния пoтребителски профил"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Контакти"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"има достъп до контактите ви"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Разрешете на <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> да осъществява достъп до контактите ви"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Разрешава на приложението достъп до телефонните функции на устройството. Това разрешение позволява на приложението да определя телефонния номер и идентификационния номер на устройството, дали се води разговор и отдалечения номер, до който е установена връзка с обаждането."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"маршрутизиране на обажданията чрез системата"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Разрешава на приложението да маршрутизира обажданията си чрез системата с цел подобряване на свързаната с тях практическа работа."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"четене на телефонните номера"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Разрешава на приложението да осъществява достъп до телефонните номера на устройството."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"предотвратяване на спящия режим на таблета"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Преместихте пръста си твърде бавно. Моля, опитайте отново."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Не е разпознато"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Хардуерът за отпечатъци не е налице."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Отпечатъкът не може да бъде съхранен. Моля, премахнете съществуващ."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Времето за изчакване за отпечатък изтече. Опитайте отново."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Операцията за отпечатък е анулирана."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Твърде много опити. Пробвайте отново по-късно."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Твърде много опити. Сензорът за отпечатъци е деактивиран."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Опитайте отново."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Отваряне"</string>
<string name="sms" msgid="4560537514610063430">"Съобщение"</string>
<string name="add_contact" msgid="7867066569670597203">"Добавяне"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Мястото в хранилището е на изчерпване"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Възможно е някои функции на системата да не работят"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"За системата няма достатъчно място в хранилището. Уверете се, че имате свободни 250 МБ, и рестартирайте."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Има достъпна отворена Wi-Fi мрежа</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Свързване с отворена Wi‑Fi мрежа"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Установява се връзка с отворена Wi‑Fi мрежа"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Установихте връзка с Wi-Fi мрежата"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Не можа да се установи връзка с Wi‑Fi мрежата"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi ще се включи автоматично"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Когато сте в района на запазена мрежа с високо качество"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Без повторно включване"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi-Fi се включи автоматично"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Намирате се в района на запазена мрежа: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Влизане в Wi-Fi мрежа"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Вход в мрежата"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> над определения лимит."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Ограничени данни на заден план"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Докоснете и премахнете огранич."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Голям пренос на данни"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Преносът ви на данни през последните няколко дни е по-голям от обичайното. Докоснете за преглед на преноса и настройките."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Сертификат за сигурност"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Този сертификат е валиден."</string>
<string name="issued_to" msgid="454239480274921032">"Издаден на:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"До <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"До следващия будилник (<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Докато не изключите „Не безпокойте“"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"До изключване"</string>
<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>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Всички езици"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Всички региони"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Търсене"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Включване на работния режим?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Това действие ще включи служебния ви потребителски профил, включително приложенията, синхронизирането на заден план и свързаните функции"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Включване"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Имате нови съобщения"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Преглед в приложението за SMS"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Някои функции може да са огранич."</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Прекият път не можа да бъде възстановен, защото приложението не поддържа създаването на резервно копие и възстановяването"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Прекият път не можа да бъде възстановен поради несъответствие в подписа на приложението"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Прекият път не можа да бъде възстановен"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Прекият път е деактивиран"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> иска да показва части от <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Редактиране"</string>
</resources>
diff --git a/core/res/res/values-bn/strings.xml b/core/res/res/values-bn/strings.xml
index 9b1f6c3..ecadbbf 100644
--- a/core/res/res/values-bn/strings.xml
+++ b/core/res/res/values-bn/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"আপনার প্রতিষ্ঠান এই ডিভাইসটি পরিচালনা করে এবং এটির নেটওয়ার্ক ট্রাফিকের উপরে নজর রাখতে পারে। বিশদ বিবরণের জন্য ট্যাপ করুন।,"</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"আপনার ডিভাইসটি মুছে ফেলা হবে"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"প্রশাসক অ্যাপটি ব্যবহার করা যাবে না। আপনার ডিভাইসে থাকা সবকিছু এখন মুছে ফেলা হবে।\n\nকোনও প্রশ্ন থাকলে আপনার প্রতিষ্ঠানের প্রশাসকের সাথে যোগাযোগ করুন।"</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> প্রিন্টিং বন্ধ রেখেছে।"</string>
<string name="me" msgid="6545696007631404292">"আমাকে"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"ট্যাবলেট বিকল্পগুলি"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"টিভি বিকল্পগুলি"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"জরুরী"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"ত্রুটির প্রতিবেদন"</string>
<string name="global_action_logout" msgid="935179188218826050">"সেশন শেষ করুন"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"স্ক্রিনশট নিন"</string>
<string name="bugreport_title" msgid="2667494803742548533">"ত্রুটির অভিযোগ করুন"</string>
<string name="bugreport_message" msgid="398447048750350456">"এটি একটি ই-মেল মেসেজ পাঠানোর জন্য আপনার ডিভাইসের বর্তমান অবস্থা সম্পর্কে তথ্য সংগ্রহ করবে৷ ত্রুটির প্রতিবেদন শুরুর সময় থেকে এটি পাঠানোর জন্য প্রস্তুত হতে কিছুটা সময় নেবে; অনুগ্রহ করে ধৈর্য রাখুন৷"</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"ইন্টারেক্টিভ প্রতিবেদন"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"নিরাপদ মোড"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android সিস্টেম"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"ব্যক্তিগততে পাল্টান"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"কর্মস্থানে পাল্টান"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"পরিচিতি"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"আপনার পরিচিতিগুলিতে অ্যাক্সেস"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> কে আপনার পরিচিতিগুলি অ্যাক্সেস করতে দিন"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"অ্যাপ্লিকেশানটিকে ডিভাইসের ফোন বৈশিষ্ট্যগুলিকে অ্যাক্সেস করার অনুমতি দেয়৷ এই অনুমতিটি অ্যাপ্লিকেশানটিকে একটি কল সক্রিয় থাকা অবস্থায় এবং দূরবর্তী নম্বর একটি কল দ্বারা সংযুক্ত থাকাকালীনও ফোন নম্বর এবং ডিভাইসের IDগুলি নির্ধারণ করার অনুমতি দেয়৷"</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"সিস্টেমের মাধ্যমে কলগুলি রুট করতে দিন"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"কল করার অভিজ্ঞতা উন্নত করার জন্য অ্যাপকে সিস্টেমের মাধ্যমে তার কলগুলি রুট করতে দেয়।"</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ফোন নম্বরগুলি পড়া হোক"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"অ্যাপটিকে এই ডিভাইসের ফোন নম্বরগুলি অ্যাক্সেস করতে দেয়।"</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ঘুমানো থেকে ট্যাবলেটকে প্রতিরোধ করে"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"আঙ্গুল খুব ধীরে সরানো হয়েছে৷ অনুগ্রহ করে আবার চেষ্টা করুন৷"</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"স্বীকৃত নয়"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"আঙ্গুলের ছাপ নেওয়ার হার্ডওয়্যার অনুপলব্ধ৷"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"আঙ্গুলের ছাপ সংরক্ষণ করা যাবে না৷ অনুগ্রহ করে একটি বিদ্যমান আঙ্গুলের ছাপ সরান৷"</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"আঙ্গুলের ছাপ নেওয়ার সময়সীমা শেষ হযেছে৷ আবার চেষ্টা করুন৷"</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"আঙ্গুলের ছাপ অপারেশন বাতিল করা হয়েছে৷"</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"অনেকবার প্রচেষ্টা করা হয়েছে৷ পরে আবার চেষ্টা করুন৷"</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"বহুবার চেষ্টা করেছেন। আঙ্গুলের ছাপ নেওয়ার সেন্সর অক্ষম করা হয়েছে।"</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"আবার চেষ্টা করুন৷"</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"খুলুন"</string>
<string name="sms" msgid="4560537514610063430">"মেসেজ"</string>
<string name="add_contact" msgid="7867066569670597203">"যোগ করুন"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"স্টোরেজ পূর্ণ হতে চলেছে"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"কিছু কিছু সিস্টেম ক্রিয়াকলাপ কাজ নাও করতে পারে"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"সিস্টেমের জন্য যথেষ্ট স্টোরেজ নেই৷ আপনার কাছে ২৫০এমবি ফাঁকা স্থান রয়েছে কিনা সে বিষয়ে নিশ্চিত হন এবং সিস্টেম চালু করুন৷"</string>
@@ -1114,6 +1131,8 @@
<item quantity="other">খোলা ওয়াই-ফাই নেটওয়ার্কগুলি উপলব্ধ রয়েছে</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"উন্মুক্ত ওয়াই-ফাই নেটওয়ার্কে সংযোগ করুন"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"উন্মুক্ত ওয়াই-ফাই নেটওয়ার্কে সংযোগ করা হচ্ছে"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"উন্মুক্ত ওয়াই-ফাই নেটওয়ার্কে সংযুক্ত করা হয়েছে"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"ওয়াই-ফাই নেটওয়ার্কে সংযোগ করা গেল না"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"ওয়াই-ফাই নিজে থেকেই চালু হবে"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"যখন আপনি একটি উচ্চ মানের সংরক্ষিত নেটওয়ার্ক কাছাকাছি থাকেন"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"আবার চালু করবেন না"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"ওয়াই-ফাই নিজে থেকে চালু করা হয়েছে"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"আপনি একটি সেভ করা নেটওয়ার্কের কাছেই আছেন: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"ওয়াই-ফাই নেটওয়ার্কে সাইন-ইন করুন"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"নেটওয়ার্কে সাইন-ইন করুন"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1410,6 +1431,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"নির্দিষ্ট সীমার থেকে <xliff:g id="SIZE">%s</xliff:g> বেশি৷"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"পটভূমি ডেটা সীমিত করা আছে"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"সীমাবদ্ধতা সরাতে আলতো চাপুন৷"</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"বেশি ডেটা ব্যবহার হয়েছে"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"গত কয়েকদিনে আপনি স্বাভাবিকের থেকে বেশি ডেটা ব্যবহার করেছেন। ডেটার ব্যবহার দেখতে এবং সেটিংসে যেতে ট্যাপ করুন।"</string>
<string name="ssl_certificate" msgid="6510040486049237639">"নিরাপত্তার সার্টিফিকেট"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"শংসাপত্রটি বৈধ৷"</string>
<string name="issued_to" msgid="454239480274921032">"এর জন্য ইস্যু করা হয়েছে:"</string>
@@ -1686,7 +1709,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> পর্যন্ত"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> পর্যন্ত (পরবর্তী অ্যালার্ম)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"যতক্ষণ না পর্যন্ত আপনি \'বিরক্ত করবেন না\' বন্ধ করছেন"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"যতক্ষণ না আপনি বন্ধ করছেন"</string>
<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>
@@ -1735,9 +1758,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"সকল ভাষা"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"সমস্ত অঞ্চল"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"খুঁজুন"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"কর্মস্থলের মোড চালু করবেন?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"এটি অ্যাপ, পটভূমি সিঙ্ক, এবং সম্পর্কিত বৈশিষ্ট্যগুলি সহ কর্মস্থলের প্রোফাইলটিকে চালু করবে"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"চালু করুন"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"আপনার নতুন মেসেজ আছে"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"দেখার জন্য SMS অ্যাপ্লিকেশান খুলুন"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"কিছু ক্রিয়াকলাপ সীমিত হতে পারে"</string>
@@ -1808,6 +1837,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"শর্টকাট ফিরিয়ে আনা যায়নি কারণ অ্যাপটিতে \'ব্যাক-আপ এবং রিস্টোর\' করার সুবিধা নেই"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"শর্টকাট ফিরিয়ে আনা যায়নি কারণ অ্যাপের সিগ্নেচারটি মিল হচ্ছে না"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"শর্টকাট ফিরিয়ে আনা যায়নি"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"শর্টকাট অক্ষম করা আছে"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> অ্যাপটি <xliff:g id="APP_2">%2$s</xliff:g> এর অংশ দেখাতে চায়"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"এডিট করুন"</string>
</resources>
diff --git a/core/res/res/values-bs/strings.xml b/core/res/res/values-bs/strings.xml
index c79566b..f143d4e 100644
--- a/core/res/res/values-bs/strings.xml
+++ b/core/res/res/values-bs/strings.xml
@@ -183,6 +183,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Vaša organizacija upravlja ovim uređajem i može pratiti mrežni saobraćaj. Dodirnite za detalje."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Uređaj će biti izbrisan"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Nije moguće koristiti aplikaciju administratora. Potpuno će se izbrisati podaci na vašem uređaju.\n\nAko imate pitanja, obratite se administratoru vaše organizacije."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Štampanje je onemogućila aplikacija <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Ja"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opcije tableta"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opcije za TV"</string>
@@ -219,6 +220,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Hitno"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Izvještaj o greškama"</string>
<string name="global_action_logout" msgid="935179188218826050">"Završi sesiju"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Snimak ekrana"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Kreirajte izvještaj o greškama"</string>
<string name="bugreport_message" msgid="398447048750350456">"Ovim će se prikupljati informacije o trenutnom stanju uređaja, koji će biti poslani kao e-poruka. Može malo potrajati dok se izvještaj o greškama ne kreira i bude spreman za slanje. Budite strpljivi."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interaktivni izvještaj"</string>
@@ -265,8 +267,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Siguran način rada"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android sistem"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Prebacite se na lični"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Prebacite se na radni"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontakti"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"pristupa vašim kontaktima"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Dozvolite aplikaciji <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> pristup vašim kontaktima"</string>
@@ -418,6 +422,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Omogućava aplikaciji pristup telefonskim funkcijama uređaja. Ovo odobrenje omogućava aplikaciji određivanje telefonskog i identifikacionog broja uređaja, bez obzira da li je poziv aktivan i da li je uspostavljena veza sa pozivanim brojem."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"usmjeravanje poziva preko sistema"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Dopušta aplikaciji da pozive usmjeri preko sistema radi poboljšanja iskustva pozivanja."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"čitanje telefonskih brojeva"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Dozvoljava aplikaciji pristup telefonskim brojevima uređaja."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"sprečavanje tableta da uđe u režim mirovanja"</string>
@@ -487,10 +495,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Prst je uklonjen presporo. Pokušajte ponovo."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nije prepoznat"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hardver za otisak prsta nije dostupan."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Otisak prsta se ne može pohraniti. Uklonite postojeći otisak prsta."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Vremensko ograničenje za otisak prsta je isteklo. Pokušajte ponovo."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Radnja sa otiskom prsta je otkazana."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Previše pokušaja. Pokušajte ponovo kasnije."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Previše pokušaja. Senzor za otisak prsta je onemogućen."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Pokušajte ponovo."</string>
@@ -1009,6 +1020,12 @@
<string name="browse" msgid="1245903488306147205">"Otvorite"</string>
<string name="sms" msgid="4560537514610063430">"Poruka"</string>
<string name="add_contact" msgid="7867066569670597203">"Dodajte"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Ponestaje prostora za pohranu"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Neke funkcije sistema možda neće raditi"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Nema dovoljno prostora za sistem. Obezbijedite 250MB slobodnog prostora i ponovo pokrenite uređaj."</string>
@@ -1138,6 +1155,8 @@
<item quantity="other">Otvorene Wi-Fi mreže su dostupne</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Povežite se na otvorenu Wi‑Fi mrežu"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Povezivanje na otvorenu Wi‑Fi mrežu"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Povezani ste na Wi‑Fi mrežu"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Nije se moguće povezati na Wi‑Fi mrežu"</string>
@@ -1147,6 +1166,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi veza će se automatski uključiti"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Kada ste u blizini sačuvane mreže visokog kvaliteta"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Nemoj ponovo uključiti"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi veza se automatski uključila"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"U blizini ste sačuvane mreže: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Prijavljivanje na Wi-Fi mrežu"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Prijava na mrežu"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1434,6 +1455,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> preko navedenog ograničenja."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Pozadinski podaci su ograničeni"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Dodirnite da biste uklonili ograničenja."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Velik prijenos podataka"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Prijenos podataka tokom prethodnih nekoliko dana je bio veći nego inače. Dodirnite za prikaz potrošnje i postavki."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Sigurnosni certifikat"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Ovaj certifikat je važeći."</string>
<string name="issued_to" msgid="454239480274921032">"Primalac:"</string>
@@ -1720,7 +1743,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Do <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Do <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (sljedeći alarm)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Dok ne isključite opciju Ne ometaj"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Dok ne isključite"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Dok ne isključite opciju Ne ometaj"</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">"Skupi"</string>
@@ -1770,9 +1793,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Svi jezici"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Sve regije"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Pretraga"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Želite uključiti radni način?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Ovim će se uključiti vaš radni profil, uključujući aplikacije, sinhronizacija u pozadini i povezane funkcije"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Uključi"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Imate nove poruke"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Otvorite SMS aplikaciju da biste pregledali poruke"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Neke funkcije mogu biti ograničene"</string>
@@ -1844,6 +1873,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Prečica nije uspješno vraćena jer aplikacija ne podržava izradu sigurnosne kopije i vraćanje"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Prečica nije uspješno vraćena zbog nepodudaranja potpisa aplikacije"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Prečica nije uspješno vraćena"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Prečica je onemogućena"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"Aplikacija <xliff:g id="APP_0">%1$s</xliff:g> želi prikazati isječke aplikacije <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Uredi"</string>
</resources>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index ea09008..bf91550 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"La teva organització gestiona aquest dispositiu i és possible que supervisi el trànsit de xarxa. Toca per obtenir més informació."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"El contingut del dispositiu s\'esborrarà"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"No es pot utilitzar l\'aplicació d\'administració. S\'esborraran les dades del dispositiu.\n\nSi tens cap dubte, contacta amb l\'administrador de la teva organització."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> ha desactivat la impressió."</string>
<string name="me" msgid="6545696007631404292">"Mi"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opcions de la tauleta"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opcions del televisor"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Emergències"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Informe d\'error"</string>
<string name="global_action_logout" msgid="935179188218826050">"Finalitza la sessió"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Captura de pantalla"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Crea informe d\'errors"</string>
<string name="bugreport_message" msgid="398447048750350456">"Es recopilarà informació sobre l\'estat actual del dispositiu i se t\'enviarà per correu electrònic. Passaran uns quants minuts des de l\'inici de l\'informe d\'errors fins al seu enviament, per la qual cosa et recomanem que tinguis paciència."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Informe interactiu"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Mode segur"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Canvia al perfil personal"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Canvia al perfil professional"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Contactes"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"accedir als contactes"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Permet que <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> accedeixi als contactes"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Permet que l\'aplicació accedeixi a les funcions de telèfon del dispositiu. Aquest permís permet que l\'aplicació determini el número de telèfon i els identificadors del dispositiu, si hi ha una trucada activa i el número remot connectat amb una trucada."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"encaminar trucades a través del sistema"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Permet que l\'aplicació encamini les trucades a través del sistema per millorar-ne l\'experiència."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"llegir els números de telèfon"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Permet que l\'aplicació accedeixi als números de telèfon del dispositiu."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"evita que la tauleta entri en mode de repòs"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"El dit s\'ha mogut massa lentament. Torna-ho a provar."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"No s\'ha reconegut"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"El maquinari per a empremtes digitals no està disponible."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"L\'empremta digital no es pot desar. Suprimeix-ne una."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"S\'ha esgotat el temps d\'espera per a l\'empremta digital. Torna-ho a provar."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"S\'ha cancel·lat l\'operació d\'empremta digital."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"S\'han produït massa intents. Torna-ho a provar més tard."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"S\'han fet massa intents. S\'ha desactivat el sensor d\'empremtes digitals."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Torna-ho a provar."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Obre"</string>
<string name="sms" msgid="4560537514610063430">"Missatge"</string>
<string name="add_contact" msgid="7867066569670597203">"Afegeix"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"L\'espai d\'emmagatzematge s\'està esgotant"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"És possible que algunes funcions del sistema no funcionin"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"No hi ha prou espai d\'emmagatzematge per al sistema. Comprova que tinguis 250 MB d\'espai lliure i reinicia."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Xarxa Wi-Fi oberta disponible</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Connecta\'t a una xarxa Wi-Fi oberta"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"S\'està connectant a una xarxa Wi-Fi oberta"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"S\'ha connectat a la xarxa Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"No s\'ha pogut connectar a una xarxa Wi-Fi"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"La Wi-Fi s\'activarà automàticament"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Quan siguis a prop d\'una xarxa de qualitat desada"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"No tornis a activar"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"La Wi‑Fi s\'ha activat automàticament"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Ets a prop d\'una xarxa desada: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Inicia la sessió a la xarxa Wi-Fi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Inicia la sessió a la xarxa"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> per sobre del límit especif."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Dades en segon pla restringides"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Toca per suprimir la restricció."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Ús de dades excessiu"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"L\'ús de dades dels últims dies és superior a l\'habitual. Toca per veure\'n l\'ús i la configuració."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Certificat de seguretat"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Aquest certificat és vàlid."</string>
<string name="issued_to" msgid="454239480274921032">"Emès per a:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Fins a les <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Fins a les <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (propera alarma)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Fins que desactivis el mode No molestis"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Fins que es desactivi"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Fins que desactivis el mode No molestis"</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">"Replega"</string>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Tots els idiomes"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Totes les regions"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Cerca"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Vols activar el mode de feina?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"S\'activarà el teu perfil professional, incloses les aplicacions, la sincronització en segon pla i les funcions relacionades"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Activa"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Tens missatges nous"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Obre l\'aplicació d\'SMS per veure\'ls"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Algunes funcions es limitaran"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"No s\'ha pogut restaurar la drecera perquè l\'aplicació no permet la còpia de seguretat ni la restauració"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"No s\'ha pogut restaurar la drecera perquè la signatura de l\'aplicació no coincideix"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"No s\'ha pogut restaurar la drecera"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"S\'ha desactivat la drecera"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> vol mostrar porcions de l\'aplicació <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Edita"</string>
</resources>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 6b5f1c8..32d4294 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -185,6 +185,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Toto zařízení je spravováno vaší organizací, která může sledovat síťový provoz. Podrobnosti zobrazíte klepnutím."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Zařízení bude vymazáno"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Aplikaci pro správu nelze použít. Zařízení nyní bude vymazáno.\n\nV případě dotazů vám pomůže administrátor organizace."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Aplikace <xliff:g id="OWNER_APP">%s</xliff:g> tisk zakazuje."</string>
<string name="me" msgid="6545696007631404292">"Já"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Možnosti tabletu"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Možnosti televize"</string>
@@ -269,8 +270,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Nouzový režim"</string>
<string name="android_system_label" msgid="6577375335728551336">"Systém Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Přepnout na osobní profil"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Přepnout na pracovní profil"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontakty"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"přístup ke kontaktům"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Povolte aplikaci <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> přístup ke kontaktům"</string>
@@ -422,6 +425,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Umožňuje aplikaci získat přístup k telefonním funkcím zařízení. Toto oprávnění umožňuje aplikaci zjistit telefonní číslo telefonu, identifikační čísla zařízení, zda zrovna probíhá hovor, a vzdálené číslo, ke kterému je hovor připojen."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"směrování volání prostřednictvím systému"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Umožňuje aplikaci směrovat volání prostřednictvím systému za účelem vylepšení funkcí volání."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"přístup k telefonním číslům"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Umožňuje aplikaci přístup k telefonním číslům v zařízení."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"bránění přechodu tabletu do režimu spánku"</string>
@@ -491,10 +498,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Pohyb prstem byl příliš pomalý. Zkuste to znovu."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nerozpoznáno"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Není k dispozici hardware ke snímání otisků prstů."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Otisk prstu nelze uložit. Odstraňte existující otisk prstu."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Časový limit sejmutí otisku prstu vypršel. Zkuste to znovu."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Operace otisku prstu byla zrušena."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Příliš mnoho pokusů. Zkuste to později."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Příliš mnoho pokusů. Snímač otisků prstů byl deaktivován."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Zkuste to znovu."</string>
@@ -1030,6 +1040,12 @@
<string name="browse" msgid="1245903488306147205">"Otevřít"</string>
<string name="sms" msgid="4560537514610063430">"Zpráva"</string>
<string name="add_contact" msgid="7867066569670597203">"Přidat"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"V úložišti je málo místa"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Některé systémové funkce nemusí fungovat"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Pro systém není dostatek místa v úložišti. Uvolněte alespoň 250 MB místa a restartujte zařízení."</string>
@@ -1159,6 +1175,8 @@
<item quantity="one">K dispozici je veřejná síť Wi-Fi</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Připojení k otevřené síti Wi-Fi"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Připojování k otevřené síti Wi-Fi"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Připojeno k síti Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Připojení k síti Wi-Fi se nezdařilo"</string>
@@ -1458,6 +1476,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> nad stanoveným limitem."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Data na pozadí jsou omezena"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Klepnutím odstraníte omezení."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Velké využití dat"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Za posledních několik dní máte větší využití dat než obvykle. Klepnutím zobrazíte využití a nastavení."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Certifikát zabezpečení"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Tento certifikát je platný."</string>
<string name="issued_to" msgid="454239480274921032">"Vydáno pro:"</string>
@@ -1754,7 +1774,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Do <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Do <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (příští budík)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Dokud nevypnete režim Nerušit"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Dokud tuto funkci nevypnete"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Dokud nevypnete režim Nerušit"</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">"Sbalit"</string>
@@ -1805,9 +1825,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Všechny jazyky"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Všechny oblasti"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Vyhledávání"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Zapnout pracovní režim?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Zapne se pracovní profil, včetně aplikací, synchronizace na pozadí a souvisejících funkcí"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Zapnout"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Máte nové zprávy"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Zobrazíte je v aplikaci pro SMS"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Funkce mohou být omezeny"</string>
@@ -1881,7 +1907,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Zkratku nelze obnovit, protože se neshoduje podpis aplikace"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Zkratku nelze obnovit"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Zkratka nefunguje"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Odinstalovat"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Přesto spustit"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Odinstalovat škodlivou aplikaci?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"Aplikace <xliff:g id="APP_0">%1$s</xliff:g> chce zobrazovat ukázky z aplikace <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Upravit"</string>
</resources>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 90b7e5e..df0f578 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Din organisation administrerer denne enhed og kan overvåge netværkstrafik. Tryk for at se oplysninger."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Enheden slettes"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Administrationsappen kan ikke bruges. Enheden vil nu blive ryddet. \n\nKontakt din organisations administrator, hvis du har nogen spørgsmål."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Udskrivning er deaktiveret af <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Mig"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Valgmuligheder for tabletcomputeren"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Tv-indstillinger"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Nødopkald"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Fejlrapport"</string>
<string name="global_action_logout" msgid="935179188218826050">"Afslut sessionen"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Screenshot"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Lav fejlrapport"</string>
<string name="bugreport_message" msgid="398447048750350456">"Der indsamles oplysninger om din enheds aktuelle status, der efterfølgende sendes i en e-mail. Der går lidt tid, fra fejlrapporten påbegyndes, til den er klar til at blive sendt. Tak for tålmodigheden."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interaktiv rapport"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Sikker tilstand"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-system"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Skift til Tilpasset"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Skift til arbejde"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontaktpersoner"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"have adgang til dine kontaktpersoner"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Giv <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> adgang til dine kontaktpersoner"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Tillader, at appen kan få adgang til telefonfunktionerne på enheden. Med denne tilladelse kan appen fastslå telefonnummeret og enheds-id\'erne, hvorvidt et opkald er aktivt samt det eksterne nummer, der oprettes forbindelse til via et opkald."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"dirigere opkald gennem systemet"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Tillader appen at dirigere sine opkald gennem systemet for at forbedre opkaldsoplevelsen."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"læse telefonnumre"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Tillader, at appen får adgang til telefonnumrene på denne enhed."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"afholde tabletcomputeren fra at gå i dvale"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Du bevægede fingeren for langsomt. Prøv igen."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Ikke genkendt"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hardwaren til fingeraftryk er ikke tilgængelig."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Fingeraftrykket kan ikke gemmes. Fjern et eksisterende fingeraftryk."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Registrering af fingeraftryk fik timeout. Prøv igen."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Fingeraftrykshandlingen blev annulleret."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Du har prøvet for mange gange. Prøv igen senere."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Du har brugt for mange forsøg. Fingeraftrykslæseren er deaktiveret."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Prøv igen."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Åbn"</string>
<string name="sms" msgid="4560537514610063430">"Besked"</string>
<string name="add_contact" msgid="7867066569670597203">"Tilføj"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Der er snart ikke mere lagerplads"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Nogle systemfunktioner virker måske ikke"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Der er ikke nok ledig lagerplads til systemet. Sørg for, at du har 250 MB ledig plads, og genstart."</string>
@@ -1114,6 +1131,8 @@
<item quantity="other">Åbne Wi-Fi-netværk er tilgængelige</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Opret forbindelse til et åbent Wi-Fi-netværk"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Opretter forbindelse til et åbent Wi‑Fi-netværk"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Forbundet til Wi-Fi-netværket"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Der kan ikke oprettes forbindelse til Wi-Fi-netværket"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi aktiveres automatisk"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Når du er i nærheden af et gemt netværk af høj kvalitet"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Aktivér ikke igen"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi blev automatisk aktiveret"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Du er i nærheden af et gemt netværk: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Log ind på Wi-Fi-netværk"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Log ind på netværk"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> over den angivne grænse."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Baggrundsdata er begrænsede"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Tryk for at fjerne begrænsning."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Stort dataforbrug"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Dit dataforbrug i løbet af de seneste 7 dage er større end normalt. Tryk for at se forbrug og indstillinger."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Sikkerhedscertifikat"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Dette certifikat er gyldigt."</string>
<string name="issued_to" msgid="454239480274921032">"Udstedt til:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Indtil <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Indtil <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (næste alarm)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Indtil du deaktiverer \"Forstyr ikke\""</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Indtil du deaktiverer"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Indtil du slår \"Forstyr ikke\" fra"</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">"Skjul"</string>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Alle sprog"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Alle områder"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Søg"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Aktivér arbejdstilstand?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Dette vil aktivere din arbejdsprofil, bl.a. apps, baggrundssynkronisering og relaterede funktioner"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Slå til"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Du har nye beskeder"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Åbn sms-appen for at se beskeden"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Nogle funktioner er begrænsede"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Genvejen kunne ikke gendannes, da appen ikke understøtter backup og gendannelse"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Genvejen kunne ikke gendannes på grund af uoverensstemmelse i appsignatur"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Genvejen kunne ikke gendannes"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Genvejen er deaktiveret"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> anmoder om tilladelse til at vise eksempler fra <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Rediger"</string>
</resources>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index b94cc90..f2a96a9 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Deine Organisation verwaltet dieses Gerät und überprüft unter Umständen den Netzwerkverkehr. Tippe hier, um weitere Informationen zu erhalten."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Die Daten auf deinem Gerät werden gelöscht."</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Die Admin-App kann nicht verwendet werden. Die Daten auf deinem Gerät werden nun gelöscht.\n\nBitte wende dich an den Administrator deiner Organisation."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Drucken wurde von <xliff:g id="OWNER_APP">%s</xliff:g> deaktiviert."</string>
<string name="me" msgid="6545696007631404292">"Eigene"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Tablet-Optionen"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV-Optionen"</string>
@@ -217,8 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Notfall"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Fehlerbericht"</string>
<string name="global_action_logout" msgid="935179188218826050">"Sitzung beenden"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Screenshot"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Fehlerbericht abrufen"</string>
<string name="bugreport_message" msgid="398447048750350456">"Bei diesem Fehlerbericht werden Daten zum aktuellen Status deines Geräts erfasst und als E-Mail versandt. Vom Start des Berichts bis zu seinem Versand kann es eine Weile dauern. Bitte habe etwas Geduld."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interaktiver Bericht"</string>
@@ -264,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Abgesicherter Modus"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-System"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Zu \"Privat\" wechseln"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Zu \"Arbeit\" wechseln"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontakte"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"auf deine Kontakte zugreifen"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> Zugriff auf deine Kontakte erlauben"</string>
@@ -417,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Ermöglicht der App, auf die Telefonfunktionen des Geräts zuzugreifen. Die Berechtigung erlaubt der App, die Telefonnummer und Geräte-IDs zu erfassen, festzustellen, ob gerade ein Gespräch geführt wird, und die Rufnummer verbundener Anrufer zu lesen."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"Anrufe über das System durchführen"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Ermöglicht der App, Anrufe über das System durchzuführen, um die Anrufqualität zu verbessern."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"Telefonnummern vorlesen"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Ermöglicht der App, auf die Telefonnummern auf dem Gerät zuzugreifen."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"Ruhezustand des Tablets deaktivieren"</string>
@@ -486,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Finger zu langsam bewegt. Versuche es erneut."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nicht erkannt"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Fingerabdruckhardware nicht verfügbar"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Fingerabdruck kann nicht gespeichert werden. Entferne einen vorhandenen Fingerabdruck."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Zeitüberschreitung für Fingerabdruck. Versuche es erneut."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Fingerabdruckvorgang abgebrochen"</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Zu viele Versuche. Versuche es später erneut."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Zu viele Versuche. Der Fingerabdrucksensor wurde deaktiviert."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Bitte versuche es erneut."</string>
@@ -991,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Öffnen"</string>
<string name="sms" msgid="4560537514610063430">"SMS"</string>
<string name="add_contact" msgid="7867066569670597203">"Hinzufügen"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Der Speicherplatz wird knapp"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Einige Systemfunktionen funktionieren möglicherweise nicht."</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Der Speicherplatz reicht nicht für das System aus. Stelle sicher, dass 250 MB freier Speicherplatz vorhanden sind, und starte das Gerät dann neu."</string>
@@ -1116,6 +1131,8 @@
<item quantity="one">Verfügbares WLAN öffnen</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Mit offenem WLAN verbinden"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Verbindung mit offenem WLAN wird hergestellt"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Mit WLAN verbunden"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"WLAN-Verbindung konnte nicht hergestellt werden"</string>
@@ -1125,10 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"WLAN wird automatisch aktiviert"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Wenn du in der Nähe eines sicheren gespeicherten Netzwerks bist"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Nicht wieder aktivieren"</string>
- <!-- no translation found for wifi_wakeup_enabled_title (6534603733173085309) -->
- <skip />
- <!-- no translation found for wifi_wakeup_enabled_content (189330154407990583) -->
- <skip />
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"WLAN automatisch aktiviert"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Du bist in der Nähe eines gespeicherten Netzwerks: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"In WLAN anmelden"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Im Netzwerk anmelden"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1415,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> über dem vorgegebenen Limit"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Hintergrunddaten beschränkt"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Zum Entfernen der Beschränkung tippen."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Hohe Datennutzung"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Du hast in den letzten Tagen mehr Daten verbraucht als üblich. Tippe, um deine Datennutzung und deine Einstellungen anzuzeigen."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Sicherheitszertifikat"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Dies ist ein gültiges Zertifikat."</string>
<string name="issued_to" msgid="454239480274921032">"Ausgestellt für:"</string>
@@ -1691,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Bis <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Bis <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (nächste Weckzeit)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Bis zur Deaktivierung von \"Nicht stören\""</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Bis zur Deaktivierung"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Bis zur Deaktivierung von \"Nicht stören\""</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">"Minimieren"</string>
@@ -1740,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Alle Sprachen"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Alle Regionen"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Suche"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Arbeitsmodus aktivieren?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Dadurch wird dein Arbeitsprofil aktiviert, darunter Apps, Synchronisierung im Hintergrund und verknüpfte Funktionen"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Aktivieren"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Du hast neue Nachrichten"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Zum Ansehen SMS-App öffnen"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Einige Funktionen sind evtl. eingeschränkt"</string>
@@ -1814,10 +1837,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Verknüpfung konnte nicht wiederhergestellt werden, weil die App-Signatur nicht übereinstimmt"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Verknüpfung konnte nicht wiederhergestellt werden"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Verknüpfung ist deaktiviert"</string>
- <!-- no translation found for harmful_app_warning_uninstall (3846265696369136266) -->
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
- <!-- no translation found for harmful_app_warning_launch_anyway (5784428382367400530) -->
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
<skip />
- <!-- no translation found for harmful_app_warning_title (2229996292333310435) -->
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
<skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> möchte Teile von <xliff:g id="APP_2">%2$s</xliff:g> anzeigen"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Bearbeiten"</string>
</resources>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 9aa3eb5..e0058c6 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Ο οργανισμός σας διαχειρίζεται αυτήν τη συσκευή και ενδέχεται να παρακολουθεί την επισκεψιμότητα δικτύου. Πατήστε για λεπτομέρειες."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Η συσκευή σας θα διαγραφεί"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Δεν είναι δυνατή η χρήση της εφαρμογής διαχείρισης. Θα πραγματοποιηθεί διαγραφή της συσκευής σας.\n\nΕάν έχετε ερωτήσεις, επικοινωνήστε με τον διαχειριστή του οργανισμού σας."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Η εκτύπωση απενεργοποιήθηκε από τον χρήστη <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Για εμένα"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Επιλογές tablet"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Επιλογές τηλεόρασης"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Κλήση έκτακτης ανάγκης"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Αναφορά σφαλμάτων"</string>
<string name="global_action_logout" msgid="935179188218826050">"Λήξη περιόδου σύνδεσης"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Στιγμιότυπο οθόνης"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Λήψη αναφοράς σφάλματος"</string>
<string name="bugreport_message" msgid="398447048750350456">"Θα συλλέξει πληροφορίες σχετικά με την τρέχουσα κατάσταση της συσκευής σας και θα τις στείλει μέσω μηνύματος ηλεκτρονικού ταχυδρομείου. Απαιτείται λίγος χρόνος για τη σύνταξη της αναφοράς σφάλματος και την αποστολή της. Κάντε λίγη υπομονή."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Διαδραστική αναφορά"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Ασφαλής λειτουργία"</string>
<string name="android_system_label" msgid="6577375335728551336">"Σύστημα Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Μετάβαση σε προσωπικό προφίλ"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Μετάβαση σε προφίλ εργασίας"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Επαφές"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"πρόσβαση στις επαφές σας"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Να επιτρέπεται στην εφαρμογή <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> να έχει πρόσβαση στις επαφές σας"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Επιτρέπει στην εφαρμογή την πρόσβαση στις λειτουργίες τηλεφώνου της συσκευής. Αυτή η άδεια δίνει τη δυνατότητα στην εφαρμογή να καθορίζει τον αριθμό τηλεφώνου και τα αναγνωριστικά συσκευών, εάν μια κλήση είναι ενεργή, καθώς και τον απομακρυσμένο αριθμό που συνδέεται από μια κλήση."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"δρομολόγηση κλήσεων μέσω του συστήματος"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Επιτρέπει στην εφαρμογή να δρομολογεί τις κλήσεις της μέσω του συστήματος για να βελτιώσει την εμπειρία κλήσης."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ανάγνωση αριθμών τηλεφώνου"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Επιτρέπει στην εφαρμογή να αποκτήσει πρόσβαση στους αριθμούς τηλεφώνου της συσκευής"</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"αποτρέπει την μετάβαση του tablet σε κατάσταση αδράνειας"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Πολύ αργή κίνηση δαχτύλου. Δοκιμάστε ξανά."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Δεν αναγνωρίστηκε"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Ο εξοπλισμός μοναδικού χαρακτηριστικού δεν είναι διαθέσιμος."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Δεν είναι δυνατή η αποθήκευση μοναδικού χαρακτηριστικού. Καταργήστε το υπάρχον μοναδικό χαρακτηριστικό."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Λήξη χρονικού ορίου μοναδικού χαρακτηριστικού. Δοκιμάστε ξανά."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Η λειτουργία μοναδικού χαρακτηριστικού ακυρώθηκε."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Πάρα πολλές προσπάθειες. Δοκιμάστε ξανά αργότερα."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Πάρα πολλές προσπάθειες. Ο αισθητήρας δακτυλικών αποτυπωμάτων απενεργοποιήθηκε."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Δοκιμάστε ξανά."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Άνοιγμα"</string>
<string name="sms" msgid="4560537514610063430">"Μήνυμα"</string>
<string name="add_contact" msgid="7867066569670597203">"Προσθήκη"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Ο αποθηκευτικός χώρος εξαντλείται"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Ορισμένες λειτουργίες συστήματος ενδέχεται να μην λειτουργούν"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Δεν υπάρχει αρκετός αποθηκευτικός χώρος για το σύστημα. Βεβαιωθείτε ότι διαθέτετε 250 MB ελεύθερου χώρου και κάντε επανεκκίνηση."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Υπάρχει διαθέσιμο ανοικτό δίκτυο Wi-Fi</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Σύνδεση σε ανοιχτό δίκτυο Wi‑Fi"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Σύνδεση σε ανοιχτό δίκτυο Wi‑Fi"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Ολοκληρώθηκε η σύνδεση στο δίκτυο Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Δεν ήταν δυνατή η σύνδεση σε δίκτυο Wi‑Fi"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Το Wi‑Fi θα ενεργοποιηθεί αυτόματα"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Όταν βρίσκεστε κοντά σε αποθηκευμένο δίκτυο υψηλής ποιότητας"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Να μην ενεργοποιηθεί ξανά"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Το Wi‑Fi ενεργοποιήθηκε αυτόματα"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Βρίσκεστε κοντά σε αποθηκευμένο δίκτυο: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Συνδεθείτε στο δίκτυο Wi-Fi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Σύνδεση στο δίκτυο"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> πάνω από το καθορισμένο όριο."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Περ.δεδομ.παρασκ."</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Πατήστε για κατάργ. περιορισμών."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Εκτεταμένη χρήση δεδομένων"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Η χρήση δεδομένων κατά τις τελευταίες ημέρες είναι μεγαλύτερη από το κανονικό. Πατήστε για να δείτε τη χρήση και τις ρυθμίσεις."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Πιστοποιητικό ασφαλείας"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Αυτό το πιστοποιητικό είναι έγκυρο."</string>
<string name="issued_to" msgid="454239480274921032">"Εκδόθηκε σε:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Έως τις <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Μέχρι τις <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (επόμενο ξυπνητήρι)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Μέχρι να απενεργοποιήσετε \"Μην ενοχλείτε\""</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Μέχρι την απενεργοποίηση"</string>
<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>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Όλες οι γλώσσες"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Όλες οι περιοχές"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Αναζήτηση"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Ενεργοπ. λειτουργ. εργασίας;"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Με αυτή την ενέργεια θα ενεργοποιηθεί το προφίλ εργασίας σας, συμπεριλαμβανομένων των εφαρμογών, του συγχρονισμού στο παρασκήνιο και σχετικών λειτουργιών"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Ενεργοποίηση"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Έχετε νέα μηνύματα"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Άνοιγμα της εφαρμογής SMS για προβολή"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Μερ. λειτ. ίσως είναι περιορ."</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Δεν ήταν δυνατή η επαναφορά της συντόμευσης, επειδή η εφαρμογή δεν υποστηρίζει τη δημιουργία αντιγράφων ασφαλείας και την επαναφορά"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Δεν ήταν δυνατή η επαναφορά της συντόμευσης, λόγω αναντιστοιχίας της υπογραφής εφαρμογής"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Δεν ήταν δυνατή η επαναφορά της συντόμευσης"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Η συντόμευση είναι απενεργοποιημένη"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"Η εφαρμογή <xliff:g id="APP_0">%1$s</xliff:g> θέλει να εμφανίζει τμήματα της εφαρμογής <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Επεξεργασία"</string>
</resources>
diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml
index 2910067..0f774d6 100644
--- a/core/res/res/values-en-rAU/strings.xml
+++ b/core/res/res/values-en-rAU/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Your organisation manages this device and may monitor network traffic. Tap for details."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Your device will be erased"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"The admin app can\'t be used. Your device will now be erased.\n\nIf you have questions, contact your organisation\'s admin."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Printing disabled by <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Me"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Tablet options"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV options"</string>
@@ -263,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Safe mode"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android system"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Switch to Personal"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Switch to Work"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Switch to personal profile"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"Switch to work profile"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Contacts"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"access your contacts"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your contacts"</string>
@@ -416,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Allows the app to access the phone features of the device. This permission allows the app to determine the phone number and device IDs, whether a call is active and the remote number connected by a call."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"route calls through the system"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Allows the app to route its calls through the system in order to improve the calling experience."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"read phone numbers"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Allows the app to access the phone numbers of the device."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"prevent tablet from sleeping"</string>
@@ -485,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Finger moved too slow. Please try again."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Not recognised"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Fingerprint hardware not available."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Fingerprint can\'t be stored. Please remove an existing fingerprint."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Fingerprint timeout reached. Try again."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Fingerprint operation cancelled."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Fingerprint operation cancelled by user."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Too many attempts. Try again later."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Too many attempts. Fingerprint sensor disabled."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Try again."</string>
@@ -990,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"Open"</string>
<string name="sms" msgid="4560537514610063430">"Message"</string>
<string name="add_contact" msgid="7867066569670597203">"Add"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Storage space running out"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Some system functions may not work"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Not enough storage for the system. Make sure that you have 250 MB of free space and restart."</string>
@@ -1115,6 +1128,8 @@
<item quantity="one">Open Wi-Fi network available</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Connect to open Wi‑Fi network"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Connecting to open Wi‑Fi network"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Connected to Wi‑Fi network"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Could not connect to Wi‑Fi network"</string>
@@ -1412,6 +1427,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> over specified limit."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Background data restricted"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Tap to remove restriction."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Large data usage"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Your data usage over the last few days is larger than normal. Tap to view usage and settings."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Security certificate"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"This certificate is valid."</string>
<string name="issued_to" msgid="454239480274921032">"Issued to:"</string>
@@ -1688,7 +1705,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Until <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Until <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (next alarm)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Until you turn off Do not disturb"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Until you turn off"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Until you turn off Do not disturb"</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">"Collapse"</string>
@@ -1737,9 +1754,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"All languages"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"All regions"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Search"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Turn on work mode?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"This will turn on your work profile, including apps, background sync and related features"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"Turn on work profile?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"Your work apps, notifications, data and other work profile features will be turned on"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Turn on"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"You have new messages"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Open SMS app to view"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Some functionality may be limited"</string>
@@ -1811,7 +1832,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Couldn’t restore shortcut because of app signature mismatch"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Couldn’t restore shortcut"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Shortcut is disabled"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Uninstall"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Launch anyway"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Uninstall harmful app?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> wants to show <xliff:g id="APP_2">%2$s</xliff:g> slices"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Edit"</string>
</resources>
diff --git a/core/res/res/values-en-rCA/strings.xml b/core/res/res/values-en-rCA/strings.xml
index 2910067..0f774d6 100644
--- a/core/res/res/values-en-rCA/strings.xml
+++ b/core/res/res/values-en-rCA/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Your organisation manages this device and may monitor network traffic. Tap for details."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Your device will be erased"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"The admin app can\'t be used. Your device will now be erased.\n\nIf you have questions, contact your organisation\'s admin."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Printing disabled by <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Me"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Tablet options"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV options"</string>
@@ -263,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Safe mode"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android system"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Switch to Personal"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Switch to Work"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Switch to personal profile"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"Switch to work profile"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Contacts"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"access your contacts"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your contacts"</string>
@@ -416,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Allows the app to access the phone features of the device. This permission allows the app to determine the phone number and device IDs, whether a call is active and the remote number connected by a call."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"route calls through the system"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Allows the app to route its calls through the system in order to improve the calling experience."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"read phone numbers"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Allows the app to access the phone numbers of the device."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"prevent tablet from sleeping"</string>
@@ -485,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Finger moved too slow. Please try again."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Not recognised"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Fingerprint hardware not available."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Fingerprint can\'t be stored. Please remove an existing fingerprint."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Fingerprint timeout reached. Try again."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Fingerprint operation cancelled."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Fingerprint operation cancelled by user."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Too many attempts. Try again later."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Too many attempts. Fingerprint sensor disabled."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Try again."</string>
@@ -990,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"Open"</string>
<string name="sms" msgid="4560537514610063430">"Message"</string>
<string name="add_contact" msgid="7867066569670597203">"Add"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Storage space running out"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Some system functions may not work"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Not enough storage for the system. Make sure that you have 250 MB of free space and restart."</string>
@@ -1115,6 +1128,8 @@
<item quantity="one">Open Wi-Fi network available</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Connect to open Wi‑Fi network"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Connecting to open Wi‑Fi network"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Connected to Wi‑Fi network"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Could not connect to Wi‑Fi network"</string>
@@ -1412,6 +1427,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> over specified limit."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Background data restricted"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Tap to remove restriction."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Large data usage"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Your data usage over the last few days is larger than normal. Tap to view usage and settings."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Security certificate"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"This certificate is valid."</string>
<string name="issued_to" msgid="454239480274921032">"Issued to:"</string>
@@ -1688,7 +1705,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Until <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Until <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (next alarm)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Until you turn off Do not disturb"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Until you turn off"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Until you turn off Do not disturb"</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">"Collapse"</string>
@@ -1737,9 +1754,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"All languages"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"All regions"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Search"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Turn on work mode?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"This will turn on your work profile, including apps, background sync and related features"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"Turn on work profile?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"Your work apps, notifications, data and other work profile features will be turned on"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Turn on"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"You have new messages"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Open SMS app to view"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Some functionality may be limited"</string>
@@ -1811,7 +1832,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Couldn’t restore shortcut because of app signature mismatch"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Couldn’t restore shortcut"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Shortcut is disabled"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Uninstall"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Launch anyway"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Uninstall harmful app?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> wants to show <xliff:g id="APP_2">%2$s</xliff:g> slices"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Edit"</string>
</resources>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 2910067..0f774d6 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Your organisation manages this device and may monitor network traffic. Tap for details."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Your device will be erased"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"The admin app can\'t be used. Your device will now be erased.\n\nIf you have questions, contact your organisation\'s admin."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Printing disabled by <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Me"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Tablet options"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV options"</string>
@@ -263,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Safe mode"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android system"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Switch to Personal"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Switch to Work"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Switch to personal profile"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"Switch to work profile"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Contacts"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"access your contacts"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your contacts"</string>
@@ -416,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Allows the app to access the phone features of the device. This permission allows the app to determine the phone number and device IDs, whether a call is active and the remote number connected by a call."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"route calls through the system"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Allows the app to route its calls through the system in order to improve the calling experience."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"read phone numbers"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Allows the app to access the phone numbers of the device."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"prevent tablet from sleeping"</string>
@@ -485,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Finger moved too slow. Please try again."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Not recognised"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Fingerprint hardware not available."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Fingerprint can\'t be stored. Please remove an existing fingerprint."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Fingerprint timeout reached. Try again."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Fingerprint operation cancelled."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Fingerprint operation cancelled by user."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Too many attempts. Try again later."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Too many attempts. Fingerprint sensor disabled."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Try again."</string>
@@ -990,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"Open"</string>
<string name="sms" msgid="4560537514610063430">"Message"</string>
<string name="add_contact" msgid="7867066569670597203">"Add"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Storage space running out"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Some system functions may not work"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Not enough storage for the system. Make sure that you have 250 MB of free space and restart."</string>
@@ -1115,6 +1128,8 @@
<item quantity="one">Open Wi-Fi network available</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Connect to open Wi‑Fi network"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Connecting to open Wi‑Fi network"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Connected to Wi‑Fi network"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Could not connect to Wi‑Fi network"</string>
@@ -1412,6 +1427,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> over specified limit."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Background data restricted"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Tap to remove restriction."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Large data usage"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Your data usage over the last few days is larger than normal. Tap to view usage and settings."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Security certificate"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"This certificate is valid."</string>
<string name="issued_to" msgid="454239480274921032">"Issued to:"</string>
@@ -1688,7 +1705,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Until <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Until <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (next alarm)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Until you turn off Do not disturb"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Until you turn off"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Until you turn off Do not disturb"</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">"Collapse"</string>
@@ -1737,9 +1754,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"All languages"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"All regions"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Search"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Turn on work mode?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"This will turn on your work profile, including apps, background sync and related features"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"Turn on work profile?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"Your work apps, notifications, data and other work profile features will be turned on"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Turn on"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"You have new messages"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Open SMS app to view"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Some functionality may be limited"</string>
@@ -1811,7 +1832,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Couldn’t restore shortcut because of app signature mismatch"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Couldn’t restore shortcut"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Shortcut is disabled"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Uninstall"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Launch anyway"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Uninstall harmful app?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> wants to show <xliff:g id="APP_2">%2$s</xliff:g> slices"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Edit"</string>
</resources>
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index 2910067..0f774d6 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Your organisation manages this device and may monitor network traffic. Tap for details."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Your device will be erased"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"The admin app can\'t be used. Your device will now be erased.\n\nIf you have questions, contact your organisation\'s admin."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Printing disabled by <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Me"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Tablet options"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV options"</string>
@@ -263,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Safe mode"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android system"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Switch to Personal"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Switch to Work"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Switch to personal profile"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"Switch to work profile"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Contacts"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"access your contacts"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your contacts"</string>
@@ -416,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Allows the app to access the phone features of the device. This permission allows the app to determine the phone number and device IDs, whether a call is active and the remote number connected by a call."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"route calls through the system"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Allows the app to route its calls through the system in order to improve the calling experience."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"read phone numbers"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Allows the app to access the phone numbers of the device."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"prevent tablet from sleeping"</string>
@@ -485,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Finger moved too slow. Please try again."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Not recognised"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Fingerprint hardware not available."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Fingerprint can\'t be stored. Please remove an existing fingerprint."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Fingerprint timeout reached. Try again."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Fingerprint operation cancelled."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Fingerprint operation cancelled by user."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Too many attempts. Try again later."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Too many attempts. Fingerprint sensor disabled."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Try again."</string>
@@ -990,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"Open"</string>
<string name="sms" msgid="4560537514610063430">"Message"</string>
<string name="add_contact" msgid="7867066569670597203">"Add"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Storage space running out"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Some system functions may not work"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Not enough storage for the system. Make sure that you have 250 MB of free space and restart."</string>
@@ -1115,6 +1128,8 @@
<item quantity="one">Open Wi-Fi network available</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Connect to open Wi‑Fi network"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Connecting to open Wi‑Fi network"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Connected to Wi‑Fi network"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Could not connect to Wi‑Fi network"</string>
@@ -1412,6 +1427,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> over specified limit."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Background data restricted"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Tap to remove restriction."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Large data usage"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Your data usage over the last few days is larger than normal. Tap to view usage and settings."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Security certificate"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"This certificate is valid."</string>
<string name="issued_to" msgid="454239480274921032">"Issued to:"</string>
@@ -1688,7 +1705,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Until <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Until <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (next alarm)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Until you turn off Do not disturb"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Until you turn off"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Until you turn off Do not disturb"</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">"Collapse"</string>
@@ -1737,9 +1754,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"All languages"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"All regions"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Search"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Turn on work mode?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"This will turn on your work profile, including apps, background sync and related features"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"Turn on work profile?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"Your work apps, notifications, data and other work profile features will be turned on"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Turn on"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"You have new messages"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Open SMS app to view"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Some functionality may be limited"</string>
@@ -1811,7 +1832,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Couldn’t restore shortcut because of app signature mismatch"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Couldn’t restore shortcut"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Shortcut is disabled"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Uninstall"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Launch anyway"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Uninstall harmful app?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> wants to show <xliff:g id="APP_2">%2$s</xliff:g> slices"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Edit"</string>
</resources>
diff --git a/core/res/res/values-en-rXC/strings.xml b/core/res/res/values-en-rXC/strings.xml
index 5f7f19c..8160f0d 100644
--- a/core/res/res/values-en-rXC/strings.xml
+++ b/core/res/res/values-en-rXC/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Your organization manages this device and may monitor network traffic. Tap for details."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Your device will be erased"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"The admin app can\'t be used. Your device will now be erased.\n\nIf you have questions, contact your organizations admin."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Printing disabled by <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Me"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Tablet options"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV options"</string>
@@ -263,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Safe mode"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android System"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Switch to Personal"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Switch to Work"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Switch to personal profile"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"Switch to work profile"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Contacts"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"access your contacts"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Allow <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> to access your contacts"</string>
@@ -416,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Allows the app to access the phone features of the device. This permission allows the app to determine the phone number and device IDs, whether a call is active, and the remote number connected by a call."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"route calls through the system"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Allows the app to route its calls through the system in order to improve the calling experience."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"read phone numbers"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Allows the app to access the phone numbers of the device."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"prevent tablet from sleeping"</string>
@@ -485,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Finger moved too slow. Please try again."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Not recognized"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Fingerprint hardware not available."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Fingerprint can\'t be stored. Please remove an existing fingerprint."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Fingerprint time out reached. Try again."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Fingerprint operation canceled."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Fingerprint operation canceled by user."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Too many attempts. Try again later."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Too many attempts. Fingerprint sensor disabled."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Try again."</string>
@@ -990,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"Open"</string>
<string name="sms" msgid="4560537514610063430">"Message"</string>
<string name="add_contact" msgid="7867066569670597203">"Add"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Storage space running out"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Some system functions may not work"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Not enough storage for the system. Make sure you have 250MB of free space and restart."</string>
@@ -1115,6 +1128,8 @@
<item quantity="one">Open Wi-Fi network available</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Connect to open Wi‑Fi network"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Connecting to open Wi‑Fi network"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Connected to Wi‑Fi network"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Could not connect to Wi‑Fi network"</string>
@@ -1412,6 +1427,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> over specified limit."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Background data restricted"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Tap to remove restriction."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Large data usage"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Your data usage over the last few days is larger than normal. Tap to view usage and settings."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Security certificate"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"This certificate is valid."</string>
<string name="issued_to" msgid="454239480274921032">"Issued to:"</string>
@@ -1688,7 +1705,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Until <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Until <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (next alarm)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Until you turn off Do Not Disturb"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Until you turn off"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Until you turn off Do Not Disturb"</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">"Collapse"</string>
@@ -1737,9 +1754,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"All languages"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"All regions"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Search"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Turn on work mode?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"This will turn on your work profile, including apps, background sync, and related features"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"Turn on work profile?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"Your work apps, notifications, data, and other work profile features will be turned on"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Turn on"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"You have new messages"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Open SMS app to view"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Some functionality may be limited"</string>
@@ -1811,7 +1832,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Couldn’t restore shortcut because of app signature mismatch"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Couldn’t restore shortcut"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Shortcut is disabled"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Uninstall"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Launch anyway"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Uninstall harmful app?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> wants to show <xliff:g id="APP_2">%2$s</xliff:g> slices"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Edit"</string>
</resources>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 1fe3c9a..6af7eda 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Tu organización administra este dispositivo y es posible que controle el tráfico de red. Presiona para obtener más información."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Se borrarán los datos del dispositivo"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"No se puede usar la app de administración. Ahora se borrará tu dispositivo.\n\nSi tienes preguntas, comunícate con el administrador de tu organización."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> inhabilitó la impresión."</string>
<string name="me" msgid="6545696007631404292">"Yo"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opciones de tablet"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opciones de TV"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Emergencias"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Informe de errores"</string>
<string name="global_action_logout" msgid="935179188218826050">"Finalizar sesión"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Captura de pantalla"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Iniciar informe de errores"</string>
<string name="bugreport_message" msgid="398447048750350456">"Se recopilará información sobre el estado actual de tu dispositivo, que se enviará por correo. Pasarán unos minutos desde que se inicie el informe de errores hasta que se envíe, por lo que te recomendamos que tengas paciencia."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Informe interactivo"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Modo seguro"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Cambiar al perfil personal"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Cambiar al perfil de trabajo"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Contactos"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"acceder a los contactos"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Permite que <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acceda a tus contactos"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Permite que la aplicación acceda a las funciones de teléfono del dispositivo. La aplicación puede utilizar este permiso para descubrir identificadores de dispositivos y números de teléfono, para saber si una llamada está activa y para conocer el número remoto con el que se ha establecido conexión mediante una llamada."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"Transmite llamadas a través del sistema"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Permite que la app transmita las llamadas a través del sistema para mejorar la experiencia de llamadas."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"leer números de teléfono"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Le permite a la app acceder a los números de teléfono del dispositivo."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"evitar que el tablet entre en estado de inactividad"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Moviste el dedo muy lento. Vuelve a intentarlo."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"No reconocido"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"El hardware para detectar huellas digitales no está disponible."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"No se puede almacenar la huella digital. Elimina una de las existentes."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Finalizó el tiempo de espera para la huella digital. Vuelve a intentarlo."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Se canceló la operación de huella digital."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Demasiados intentos. Vuelve a intentarlo más tarde."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Realizaste demasiados intentos. Se inhabilitó el sensor de huellas digitales."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Vuelve a intentarlo."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Abrir"</string>
<string name="sms" msgid="4560537514610063430">"Mensaje"</string>
<string name="add_contact" msgid="7867066569670597203">"Agregar"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Queda poco espacio de almacenamiento"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Es posible que algunas funciones del sistema no estén disponibles."</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"No hay espacio suficiente para el sistema. Asegúrate de que haya 250 MB libres y reinicia el dispositivo."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Abrir red de Wi-Fi disponible</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Conectarse a una red Wi-Fi abierta"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Conectándose a una red Wi-Fi abierta"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Se conectó a la red Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"No fue posible conectarse a la red Wi‑Fi"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Se activará la conexión Wi-Fi automáticamente"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Cuando estés cerca de una red guardada de alta calidad"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"No volver a activar"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Se activó el Wi-Fi automáticamente"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Estás cerca de una red guardada: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Accede a una red Wi-Fi."</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Acceder a la red"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"Límite superado en <xliff:g id="SIZE">%s</xliff:g>"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Datos de referencia restringidos"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Presiona y quita la restricción."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Uso de datos elevado"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Tu uso de datos fue más elevado de lo normal en los últimos días. Presiona para ver detalles sobre el uso y la configuración."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Certificado de seguridad"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Este certificado es válido."</string>
<string name="issued_to" msgid="454239480274921032">"Emitido a:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Hasta la(s) <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Hasta la hora <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (próxima alarma)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Hasta que desactives No molestar"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Hasta que lo desactives"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Hasta que desactives No molestar"</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">"Contraer"</string>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Todos los idiomas"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Todas las regiones"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Búsqueda"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"¿Activar modo de trabajo?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Esta acción activará tu perfil de trabajo, incluidas las apps, la sincronización en segundo plano y las funciones relacionadas"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Activar"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Tienes mensajes nuevos"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Abrir app de SMS para ver el mensaje"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Funciones limitadas"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Error al restablecer el acceso directo porque la app no admite la opción de copia de seguridad y restauración"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Error al restablecer el acceso directo por falta de coincidencia con la firma de apps"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Error al restablecer el acceso directo"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Se inhabilitó el acceso directo"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> quiere mostrar fragmentos de <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Editar"</string>
</resources>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index cf25ed3..d1a2fa3 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Tu organización administra este dispositivo y puede supervisar el tráfico de red. Toca la notificación para obtener más información."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Tu dispositivo se borrará"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"No se puede utilizar la aplicación de administración. Se borrarán los datos del dispositivo. \n\nSi tienes alguna pregunta, ponte en contacto con el administrador de tu organización."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> ha inhabilitado la impresión."</string>
<string name="me" msgid="6545696007631404292">"Yo"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opciones del tablet"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opciones de la TV"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Emergencia"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Informe de error"</string>
<string name="global_action_logout" msgid="935179188218826050">"Finalizar sesión"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Captura de pantalla"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Crear informe de errores"</string>
<string name="bugreport_message" msgid="398447048750350456">"Se recopilará información sobre el estado actual de tu dispositivo y se enviará por correo electrónico. Pasarán unos minutos desde que empiece a generarse el informe de errores hasta que se envíe."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Informe interactivo"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Modo seguro"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Cambiar a perfil personal"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Cambiar a perfil de trabajo"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Contactos"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"acceder a tus contactos"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Permite que <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acceda a tus contactos"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Permite que la aplicación acceda a las funciones de teléfono del dispositivo. La aplicación puede utilizar este permiso para descubrir identificadores de dispositivos y números de teléfono, para saber si una llamada está activa y para conocer el número remoto con el que se ha establecido conexión mediante una llamada."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"direccionar llamadas a través del sistema"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Permite a la aplicación direccionar sus llamadas hacia el sistema para mejorar la calidad de estas."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"leer números de teléfono"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Permite que la aplicación acceda a los números de teléfono del dispositivo."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"impedir que el tablet entre en modo de suspensión"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Has movido el dedo demasiado despacio. Vuelve a intentarlo."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"No reconocido"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"El hardware de huella digital no está disponible."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"No se puede almacenar la huella digital. Elimina una ya creada."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Se ha alcanzado el tiempo de espera de la huella digital. Vuelve a intentarlo."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Se ha cancelado la operación de huella digital."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Demasiados intentos. Vuelve a intentarlo más tarde."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Demasiados intentos. Se ha inhabilitado el sensor de huellas digitales."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Vuelve a intentarlo."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Abrir"</string>
<string name="sms" msgid="4560537514610063430">"Mensaje"</string>
<string name="add_contact" msgid="7867066569670597203">"Añadir"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Queda poco espacio"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Es posible que algunas funciones del sistema no funcionen."</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"No hay espacio suficiente para el sistema. Comprueba que haya 250 MB libres y reinicia el dispositivo."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Red Wi-Fi abierta disponible</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Conectarse a una red Wi-Fi abierta"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Conectándose a una red Wi-Fi abierta"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Conectado a la red Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"No se ha podido conectar a la red Wi-Fi"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"La conexión Wi‑Fi se activará automáticamente"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Cuando estés cerca de una red de alta calidad guardada"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"No volver a activar"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi activada automáticamente"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Estás cerca de una red guardada: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Iniciar sesión en red Wi-Fi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Iniciar sesión en la red"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"Límite superado en <xliff:g id="SIZE">%s</xliff:g>"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Datos en segundo plano restringidos"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Toca para quitar la restricción."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Uso de datos elevado"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Tu uso de datos ha sido más elevado de lo normal en los últimos días. Toca para ver detalles sobre el uso y ajustes."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Certificado de seguridad"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Este certificado es válido."</string>
<string name="issued_to" msgid="454239480274921032">"Emitido para:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Hasta las <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Hasta las <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (próxima alarma)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Hasta que desactives el modo No molestar"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Hasta que se desactive"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Hasta que desactives la opción No molestar"</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">"Contraer"</string>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Todos los idiomas"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Todas las regiones"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Buscar"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"¿Activar modo de trabajo?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Se activará tu perfil de trabajo, incluidas las aplicaciones, la sincronización en segundo plano y las funciones relacionadas"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Activar"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Tienes mensajes nuevos"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Abre la aplicación de SMS para ver el mensaje"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Algunas funciones limitadas"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"No se ha podido restaurar el acceso directo porque la aplicación no es compatible con la función de copia de seguridad y restauración"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"No se ha podido restaurar el acceso directo porque la firma de la aplicación no coincide"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"No se ha podido restaurar el acceso directo"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"El acceso directo está inhabilitado"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> quiere mostrar fragmentos de <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Editar"</string>
</resources>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index c0821c7..29d600f 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Teie organisatsioon haldab seda seadet ja võib jälgida võrguliiklust. Puudutage üksikasjade vaatamiseks."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Seade kustutatakse"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Administraatori rakendust ei saa kasutada. Teie seade kustutatakse.\n\nKüsimuste korral pöörduge organisatsiooni administraatori poole."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Rakendus <xliff:g id="OWNER_APP">%s</xliff:g> on printimise keelanud."</string>
<string name="me" msgid="6545696007631404292">"Mina"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Tahvelarvuti valikud"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Teleri valikud"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Hädaabi"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Veaaruanne"</string>
<string name="global_action_logout" msgid="935179188218826050">"Seansi lõpp"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Ekraanipilt"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Veaaruande võtmine"</string>
<string name="bugreport_message" msgid="398447048750350456">"Nii kogutakse teavet teie seadme praeguse oleku kohta, et saata see meilisõnumina. Enne kui saate veaaruande ära saata, võtab selle loomine natuke aega; varuge kannatust."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interakt. aruanne"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Turvarežiim"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-süsteem"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Lülita isiklikule profiilile"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Lülita tööprofiilile"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontaktid"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"juurdepääs kontaktidele"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Lubage rakendusele <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> juurdepääs kontaktidele"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Annab rakendusele juurdepääsu seadme telefonifunktsioonidele. See luba võimaldab rakendusel määrata telefoninumbri ja seadme ID-d ning kontrollida, kas kõne on aktiivne ja kaugnumber on kõne kaudu telefoniga ühendatud."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"kõnede marsruutimine süsteemi kaudu"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Võimaldab rakendusel kõnesid süsteemi kaudu marsruutida, et helistamiskogemust täiustada."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"lugeda telefoninumbreid"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Rakendusel lubatakse juurde pääseda seadme telefoninumbritele."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"tahvelarvuti uinumise vältimine"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Sõrm liikus liiga aeglaselt. Proovige uuesti."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Ei tuvastatud"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Sõrmejälje riistvara pole saadaval."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Sõrmejälge ei saa salvestada. Eemaldage olemasolev sõrmejälg."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Sõrmejälje riistvara taimeri ajalõpp. Proovige uuesti."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Sõrmejälje toiming tühistati."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Liiga palju katseid. Proovige hiljem uuesti."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Liiga palju katseid. Sõrmejäljeandur on keelatud."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Proovige uuesti."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Ava"</string>
<string name="sms" msgid="4560537514610063430">"Saada sõnum"</string>
<string name="add_contact" msgid="7867066569670597203">"Lisa"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Talletusruum saab täis"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Mõned süsteemifunktsioonid ei pruugi töötada"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Süsteemis pole piisavalt talletusruumi. Veenduge, et seadmes oleks 250 MB vaba ruumi, ja käivitage seade uuesti."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Avatud WiFi-võrk on saadaval</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Looge ühendus avatud WiFi-võrguga"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Ühenduse loomine avatud WiFi-võrguga"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Ühendatud WiFi-võrguga"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"WiFi-võrguga ei õnnestunud ühendust luua"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"WiFi lülitub sisse automaatselt"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Kui olete kvaliteetse salvestatud võrgu läheduses"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Ära lülita tagasi sisse"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"WiFi lülitati automaatselt sisse"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Teie lähedal on salvestatud võrk: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Logi sisse WiFi-võrku"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Võrku sisselogimine"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> üle määratud piirmäära."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Taustandmed on piiratud"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Puudut. piirangu eemaldamiseks."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Suur andmekasutus"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Teie andmekasutus on viimastel päevadel tavapärasest suurem. Puudutage kasutuse ja seadete vaatamiseks."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Turvasertifikaat"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"See sertifikaat on kehtiv."</string>
<string name="issued_to" msgid="454239480274921032">"Väljastatud subjektile:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Kuni <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Kuni <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (järgmine äratus)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Kuni lülitate välja valiku Mitte segada"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Kuni välja lülitate"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Kuni lülitate välja valiku Mitte segada"</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">"Ahendamine"</string>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Kõik keeled"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Kõik piirkonnad"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Otsing"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Kas lülitada töörežiim sisse?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"See lülitab sisse teie tööprofiili, sh rakendused, taustal sünkroonimise ja seotud funktsioonid"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Lülita sisse"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Teile on uusi sõnumeid"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Avage vaatamiseks SMS-rakendus"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Funktsioon võib olla piiratud"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Otseteed ei õnnestunud taastada, kuna rakendus ei toeta varundamist ega taastamist"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Otseteed ei õnnestunud taastada, kuna rakenduse allkiri ei ühti"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Otseteed ei õnnestunud taastada"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Otsetee on keelatud"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"Rakendus <xliff:g id="APP_0">%1$s</xliff:g> soovib näidata rakenduse <xliff:g id="APP_2">%2$s</xliff:g> lõike"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Muutmine"</string>
</resources>
diff --git a/core/res/res/values-eu/strings.xml b/core/res/res/values-eu/strings.xml
index 960dfd8..2436326 100644
--- a/core/res/res/values-eu/strings.xml
+++ b/core/res/res/values-eu/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Erakundeak kudeatzen du gailua eta baliteke sareko trafikoa gainbegiratzea. Sakatu hau xehetasunak ikusteko."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Gailuko datuak ezabatu egingo dira"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Ezin da erabili administratzeko aplikazioa. Ezabatu egingo da gailuko eduki guztia.\n\nZalantzarik baduzu, jarri erakundeko administratzailearekin harremanetan."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> aplikazioak desgaitu egin du inprimatzeko aukera."</string>
<string name="me" msgid="6545696007631404292">"Ni"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Tabletaren aukerak"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Telebistaren aukerak"</string>
@@ -217,8 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Larrialdi-deiak"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Akatsen txostena"</string>
<string name="global_action_logout" msgid="935179188218826050">"Amaitu saioa"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Pantaila-argazkia"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Sortu akatsen txostena"</string>
<string name="bugreport_message" msgid="398447048750350456">"Gailuaren uneko egoerari buruzko informazioa bilduko da, mezu elektroniko gisa bidaltzeko. Minutu batzuk igaroko dira akatsen txostena sortzen hasten denetik bidaltzeko prest egon arte. Itxaron, mesedez."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Txosten dinamikoa"</string>
@@ -264,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Modu segurua"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android sistema"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Aldatu profil pertsonalera"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Aldatu laneko profilera"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontaktuak"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"atzitu kontaktuak"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Baimendu kontaktuak atzitzea <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> aplikazioari"</string>
@@ -417,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Gailuaren telefono-eginbideak atzitzeko baimena ematen die aplikazioei. Baimen horrek aplikazioari telefono-zenbakia eta gailu IDak zein diren, deirik aktibo dagoen eta deia zer zenbakirekin konektatuta dagoen zehazteko baimena ematen die aplikazioei."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"bideratu deiak sistemaren bidez"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Deiak sistemaren bidez bideratzea baimentzen die aplikazioei, deien zerbitzua ahal bezain ona izan dadin."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"irakurri telefono-zenbakiak"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Gailuaren telefono-zenbakiak atzitzea baimentzen die aplikazioei."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"eragotzi tableta inaktibo ezartzea"</string>
@@ -438,9 +444,9 @@
<string name="permdesc_setTimeZone" product="tv" msgid="888864653946175955">"Telebistaren ordu-zona aldatzea baimentzen die aplikazioei."</string>
<string name="permdesc_setTimeZone" product="default" msgid="4499943488436633398">"Telefonoaren ordu-zona aldatzea baimentzen die aplikazioei."</string>
<string name="permlab_getAccounts" msgid="1086795467760122114">"bilatu gailuko kontuak"</string>
- <string name="permdesc_getAccounts" product="tablet" msgid="2741496534769660027">"Tabletak ezagutzen dituen kontuen zerrenda lortzeko baimena ematen die aplikazioei. Instalatuta dituzun aplikazioek sortutako kontuak har daitezke barne."</string>
+ <string name="permdesc_getAccounts" product="tablet" msgid="2741496534769660027">"Tabletak ezagutzen dituen kontuen zerrenda lortzeko baimena ematen die aplikazioei. Instalatuta dituzun aplikazioek sortutako kontuak har daitezke barnean."</string>
<string name="permdesc_getAccounts" product="tv" msgid="4190633395633907543">"Telebistak ezagutzen dituen kontuen zerrenda lortzea baimentzen die aplikazioei. Instalatuta dituzun aplikazioek sortutako kontuak sar daitezke."</string>
- <string name="permdesc_getAccounts" product="default" msgid="3448316822451807382">"Telefonoak ezagutzen dituen kontuen zerrenda lortzeko baimena ematen die aplikazioei. Instalatuta dituzun aplikazioek sortutako kontuak har daitezke barne."</string>
+ <string name="permdesc_getAccounts" product="default" msgid="3448316822451807382">"Telefonoak ezagutzen dituen kontuen zerrenda lortzeko baimena ematen die aplikazioei. Instalatuta dituzun aplikazioek sortutako kontuak har daitezke barnean."</string>
<string name="permlab_accessNetworkState" msgid="4951027964348974773">"ikusi sareko konexioak"</string>
<string name="permdesc_accessNetworkState" msgid="8318964424675960975">"Sareko konexioei buruzko informazioa ikusteko baimena ematen die aplikazioei; adibidez, zer sare dauden eta zeintzuk dauden konektatuta."</string>
<string name="permlab_createNetworkSockets" msgid="7934516631384168107">"izan sarerako sarbide osoa"</string>
@@ -486,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Mantsoegi mugitu duzu hatza. Saiatu berriro."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Ez da ezagutzen"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hatz-markaren hardwarea ez dago erabilgarri."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Ezin da gorde hatz-marka digitala. Kendu lehendik gordeta duzunetako bat."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Hatz-marka digitalak prozesatzeko denbora-muga gainditu da. Saiatu berriro."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Hatz-markaren eragiketa bertan behera utzi da."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Saiakera gehiegi egin dituzu. Saiatu berriro geroago."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Saiakera gehiegi egin dituzu. Desgaitu egin da hatz-marken sentsorea."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Saiatu berriro."</string>
@@ -991,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Ireki"</string>
<string name="sms" msgid="4560537514610063430">"Bidali mezua"</string>
<string name="add_contact" msgid="7867066569670597203">"Gehitu"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Memoria betetzen ari da"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Sistemaren funtzio batzuek ez dute agian funtzionatuko"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Sisteman ez dago behar adina memoria. Ziurtatu gutxienez 250 MB erabilgarri dituzula eta, ondoren, berrabiarazi gailua."</string>
@@ -1116,6 +1131,8 @@
<item quantity="one">Wi-Fi sare irekia erabilgarri</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Konektatu Wi‑Fi sare irekira"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Wi‑Fi sare irekira konektatzen"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Wi‑Fi sare irekira konektatuta"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Ezin izan da konektatu Wi‑Fi sare irekira"</string>
@@ -1125,10 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi konexioa automatikoki aktibatuko da"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Gordeta daukazun kalitate handiko sare batetik gertu zaudenean"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Ez aktibatu berriro"</string>
- <!-- no translation found for wifi_wakeup_enabled_title (6534603733173085309) -->
- <skip />
- <!-- no translation found for wifi_wakeup_enabled_content (189330154407990583) -->
- <skip />
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Automatikoki aktibatu da Wi‑Fi konexioa"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Gordetako sare honetatik gertu zaude: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Hasi saioa Wi-Fi sarean"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Hasi saioa sarean"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1416,6 +1431,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"Zehaztutako muga baino <xliff:g id="SIZE">%s</xliff:g> gehiago."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Atzeko planoko datuak murriztuta"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Sakatu murriztapena kentzeko."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Datu asko erabili dira"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Ohikoa baino datu kopuru handiagoa erabili duzu azken egunetan. Sakatu erabilera eta ezarpenak ikusteko."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Segurtasun-ziurtagiria"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Ziurtagiria baliozkoa da."</string>
<string name="issued_to" msgid="454239480274921032">"Honi jaulkia:"</string>
@@ -1692,7 +1709,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> arte"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> arte (hurrengo alarma)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"\"Ez molestatu\" desaktibatzen duzun arte"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Desaktibatu arte"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"\"Ez molestatu\" desaktibatzen duzun arte"</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">"Tolestu"</string>
@@ -1741,9 +1758,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Hizkuntza guztiak"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Lurralde guztiak"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Bilaketa"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Laneko modua aktibatu?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Laneko profila aktibatuko da, aplikazioak, atzeko planoko sinkronizazioa eta erlazionatutako eginbideak barne"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Aktibatu"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Mezu berriak dituzu"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Mezuak ikusteko, ireki SMS mezuen aplikazioa"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Funtzioak mugatuta egon litezke"</string>
@@ -1815,10 +1838,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Ezin izan da leheneratu lasterbidea aplikazioaren sinadurak ez datozelako bat"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Ezin izan da leheneratu lasterbidea"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Desgaituta dago lasterbidea"</string>
- <!-- no translation found for harmful_app_warning_uninstall (3846265696369136266) -->
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
- <!-- no translation found for harmful_app_warning_launch_anyway (5784428382367400530) -->
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
<skip />
- <!-- no translation found for harmful_app_warning_title (2229996292333310435) -->
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
<skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> aplikazioak <xliff:g id="APP_2">%2$s</xliff:g> aplikazioaren zatiak erakutsi nahi ditu"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Editatu"</string>
</resources>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 0458336..9f9d335 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"سازمانتان این دستگاه را مدیریت میکند و ممکن است ترافیک شبکه را پایش کند. برای اطلاع از جزئیات، ضربه بزنید."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"دستگاهتان پاک خواهد شد"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"برنامه سرپرست سیستم نمیتواند استفاده شود. دستگاه شما در این لحظه پاک میشود.\n\nاگر سؤالی دارید، با سرپرست سیستم سازمانتان تماس بگیرید."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> چاپ کردن را غیرفعال کرده است."</string>
<string name="me" msgid="6545696007631404292">"من"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"گزینههای رایانهٔ لوحی"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"گزینههای تلویزیون"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"اضطراری"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"گزارش اشکال"</string>
<string name="global_action_logout" msgid="935179188218826050">"پایان جلسه"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"عکس صفحهنمایش"</string>
<string name="bugreport_title" msgid="2667494803742548533">"گرفتن گزارش اشکال"</string>
<string name="bugreport_message" msgid="398447048750350456">"این گزارش اطلاعات مربوط به وضعیت دستگاه کنونی شما را جمعآوری میکند تا به صورت یک پیام رایانامه ارسال شود. از زمان شروع گزارش اشکال تا آماده شدن برای ارسال اندکی زمان میبرد؛ لطفاً شکیبا باشید."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"گزارش تعاملی"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>، <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"حالت ایمن"</string>
<string name="android_system_label" msgid="6577375335728551336">"سیستم Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"رفتن به نمایه شخصی"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"رفتن به نمایه کاری"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"مخاطبین"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"دسترسی به مخاطبین شما"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"به <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> امکان دهید به مخاطبین شما دسترسی پیدا کند"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"به برنامه اجازه میدهد به ویژگیهای تلفن دستگاه شما دسترسی پیدا کند. این مجوز به برنامه اجازه میدهد شماره تلفن و شناسههای دستگاه، فعال بودن یک تماس و شماره راه دوری که با یک تماس متصل شده است را مشخص کند."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"برقرار کردن تماسها ازطریق سیستم"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"به برنامه امکان میدهد برای بهبود تجربه تماس، تماسهایش را ازطریق سیستم برقرار کند."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"خواندن شماره تلفنها"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"به برنامه امکان میدهد به شماره تلفنهای دستگاه دسترسی داشته باشد."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ممانعت از به خواب رفتن رایانهٔ لوحی"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"حرکت انگشت خیلی آهسته بود. لطفاً دوباره امتحان کنید."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"شناخته نشد"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"سختافزار اثرانگشت در دسترس نیست."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"ذخیره اثر انگشت ممکن نیست. لطفاً یک اثر انگشت موجود را حذف کنید."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"مهلت زمانی ثبت اثر انگشت به پایان رسید. دوباره امتحان کنید."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"عملکرد اثر انگشت لغو شد."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"تلاشهای زیادی انجام شده است. بعداً دوباره امتحان کنید."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"تلاشهای بسیاری زیادی انجام شده است. حسگر اثر انگشت غیرفعال شد."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"دوباره امتحان کنید."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"باز کردن"</string>
<string name="sms" msgid="4560537514610063430">"پیام"</string>
<string name="add_contact" msgid="7867066569670597203">"افزودن"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"حافظه درحال پر شدن است"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"برخی از عملکردهای سیستم ممکن است کار نکنند"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"فضای ذخیرهسازی سیستم کافی نیست. اطمینان حاصل کنید که دارای ۲۵۰ مگابایت فضای خالی هستید و سیستم را راهاندازی مجدد کنید."</string>
@@ -1114,6 +1131,8 @@
<item quantity="other">شبکه Wi-Fi باز در دسترس</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"اتصال به شبکه Wi‑Fi باز"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"درحال اتصال به شبکه Wi‑Fi باز"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"به شبکه Wi‑Fi متصل شد"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"به شبکه Wi-Fi متصل نشد"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi بهطور خودکار روشن خواهد شد"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"وقتی نزدیک شبکه ذخیرهشده با کیفیت بالا هستید"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"دوباره روشن نشود"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi بهصورت خودکار روشن شد"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"نزدیک شبکه ذخیرهشدهای هستید: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"ورود به شبکه Wi-Fi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"ورود به سیستم شبکه"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> از حد تعیین شده بیشتر شد."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"داده پسزمینه محدود شد"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"برای برداشتن محدودیت ضربه بزنید."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"مصرف داده زیاد"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"مصرف داده شما در چند روز گذشته بیشتر از حالت عادی بوده است. برای مشاهده میزان مصرف و تنظیمات، ضربه بزنید."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"گواهی امنیتی"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"این گواهی معتبر است."</string>
<string name="issued_to" msgid="454239480274921032">"صادر شده برای:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"تا <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"تا <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (هشدار بعدی)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"تا زمانی که «مزاحم نشوید» را خاموش کنید"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"تا زمانیکه آن را خاموش کنید"</string>
<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>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"همه زبانها"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"همه منطقهها"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"جستجو"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"حالت کار روشن شود؟"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"با این کار، نمایه کاری شما روشن میشود (ازجمله برنامهها، همگامسازی پسزمینه و قابلیتهای مرتبط)"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"روشن کردن"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"پیامهای جدیدی دارید"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"برای مشاهده، برنامه پیامک را باز کنید"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"ممکن است برخی از عملکردها محدود باشند"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"نمیتوان میانبر را بازیابی کرد زیرا برنامه از پشتیبانگیری و بازیابی پشتیبانی نمیکند"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"بهعلت عدم تطابق امضای برنامه نمیتوان میانبر را بازیابی کرد"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"نمیتوان میانبر را بازیابی کرد"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"میانبر غیرفعال شده است"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> میخواهد تکههای <xliff:g id="APP_2">%2$s</xliff:g> را نشان دهد"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"ویرایش"</string>
</resources>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index d6d1315..e5ed2a3 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Organisaatiosi hallinnoi tätä laitetta ja voi tarkkailla verkkoliikennettä. Katso lisätietoja napauttamalla."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Laitteen tiedot poistetaan"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Hallintasovellusta ei voi käyttää. Laitteen tiedot poistetaan.\n\nPyydä ohjeita järjestelmänvalvojaltasi."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> on poistanut tulostuksen käytöstä."</string>
<string name="me" msgid="6545696007631404292">"Minä"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Tablet-laitteen asetukset"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Televisioasetukset"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Hätäpuhelu"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Virheraportti"</string>
<string name="global_action_logout" msgid="935179188218826050">"Lopeta käyttökerta"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Kuvakaappaus"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Luo virheraportti"</string>
<string name="bugreport_message" msgid="398447048750350456">"Toiminto kerää tietoja laitteen tilasta ja lähettää ne sähköpostitse. Virheraportti on valmis lähetettäväksi hetken kuluttua - kiitos kärsivällisyydestäsi."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interaktiivinen"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Suojattu tila"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-järjestelmä"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Siirry henkilökohtaiseen profiiliin"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Siirry työprofiiliin"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontaktit"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"käyttää yhteystietoja"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Anna sovellukselle <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> yhteystietojesi käyttöoikeus."</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Antaa sovelluksen käyttää laitteen puhelinominaisuuksia. Sovellus voi määrittää puhelinnumeron ja laitteen tunnuksen, puhelun tilan sekä soitetun numeron."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"ohjata puhelut järjestelmän kautta"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Tämä sallii sovelluksen ohjata puhelut järjestelmän kautta, mikä auttaa parantamaan puhelujen laatua."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"lukea puhelinnumeroita"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Anna sovelluksen käyttää laitteella olevia puhelinnumeroita."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"estä tablet-laitetta menemästä virransäästötilaan"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Liikutit sormea liian hitaasti. Yritä uudelleen."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Ei tunnistettu"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Sormenjälkilaitteisto ei ole käytettävissä."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Sormenjälkeä ei voida tallentaa. Poista aiemmin lisätty sormenjälki."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Sormenjälkitunnistimen toiminta aikakatkaistiin. Yritä uudelleen."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Sormenjälkitoiminto peruutettiin."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Liian monta yritystä. Yritä myöhemmin uudelleen."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Liian monta yritystä. Sormenjälkitunnistin poistettu käytöstä."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Yritä uudelleen."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Avaa"</string>
<string name="sms" msgid="4560537514610063430">"Viesti"</string>
<string name="add_contact" msgid="7867066569670597203">"Lisää"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Tallennustila loppumassa"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Kaikki järjestelmätoiminnot eivät välttämättä toimi"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Tallennustila ei riitä. Varmista, että vapaata tilaa on 250 Mt, ja käynnistä uudelleen."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Avoin Wi-Fi-verkko käytettävissä</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Yhdistä avoimeen Wi‑Fi-verkkoon"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Yhdistetään avoimeen Wi‑Fi-verkkoon"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Yhdistetty Wi-Fi-verkkoon"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Wi‑Fi-verkkoon yhdistäminen epäonnistui"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi-Fi käynnistyy automaattisesti"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Kun olet lähellä laadukasta tallennettua verkkoa"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Älä käynnistä uudelleen"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi otettiin käyttöön automaattisesti"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Olet lähellä tallennettua verkkoa: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Kirjaudu Wi-Fi-verkkoon"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Kirjaudu verkkoon"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> yli asetetun rajan"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Rajoitettu taustadatan käyttö"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Poista rajoitus napauttamalla."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Suuri datan käyttö"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Olet käyttänyt normaalia enemmän dataa viime päivinä. Napauta nähdäksesi käyttö ja asetukset."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Suojausvarmenne"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Varmenne on voimassa."</string>
<string name="issued_to" msgid="454239480274921032">"Varmenteen saaja:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Kunnes kello on <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> asti (seuraava hälytys)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Kunnes poistat Älä häiritse ‑tilan käytöstä"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Kunnes poistat sen käytöstä"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Kunnes poistat Varattu-tilan käytöstä."</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">"Kutista"</string>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Kaikki kielet"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Kaikki alueet"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Haku"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Otetaanko työtila käyttöön?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Ottaa käyttöön työprofiilin, esimerkiksi sovelluksia, taustasynkronoinnin ja muita ominaisuuksia."</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Ota käyttöön"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Sinulle on uusia viestejä"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Katso avaamalla tekstiviestisovellus."</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Toimintorajoitus mahdollinen"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Pikakuvakkeen palautus epäonnistui, koska sovellus ei tue varmuuskopiointia eikä palauttamista."</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Pikakuvakkeen palautus epäonnistui sovelluksen allekirjoituksen yhteensopimattomuuden vuoksi."</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Pikakuvakkeen palautus epäonnistui."</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Pikakuvake on poistettu käytöstä."</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> haluaa näyttää osia sovelluksesta <xliff:g id="APP_2">%2$s</xliff:g>."</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Muokkaa"</string>
</resources>
diff --git a/core/res/res/values-gl/strings.xml b/core/res/res/values-gl/strings.xml
index a53fac7..9fd7fe6 100644
--- a/core/res/res/values-gl/strings.xml
+++ b/core/res/res/values-gl/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"A túa organización xestiona este dispositivo e pode controlar o tráfico de rede. Toca para obter máis detalles."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Borrarase o teu dispositivo"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Non se pode utilizar a aplicación de administración. Borrarase o teu dispositivo.\n\nSe tes preguntas, contacta co administrador da túa organización."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> desactivou a impresión."</string>
<string name="me" msgid="6545696007631404292">"Eu"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opcións da tableta"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opcións da televisión"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Urxencias"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Informe de erros"</string>
<string name="global_action_logout" msgid="935179188218826050">"Finalizar a sesión"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Captura de pantalla"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Crear informe de erros"</string>
<string name="bugreport_message" msgid="398447048750350456">"Este informe recompilará información acerca do estado actual do teu dispositivo para enviala en forma de mensaxe de correo electrónico. O informe de erros tardará un pouco en completarse desde o seu inicio ata que estea preparado para enviarse, polo que che recomendamos que teñas paciencia."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Informe interactivo"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Modo seguro"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Cambiar ao perfil persoal"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Cambiar ao perfil de traballo"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Contactos"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"acceder aos teus contactos"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Permitir que a aplicación <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acceda aos teus contactos"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Permite á aplicación acceder ás funcións de teléfono do dispositivo. Con este permiso a aplicación pode determinar o número de teléfono e os ID do dispositivo, se unha chamada está activa e o número remoto conectado mediante unha chamada."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"dirixir as chamadas a través do sistema"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Permite á aplicación dirixir as súas chamadas a través do sistema para mellorar a túa experiencia durante as chamadas."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ler números de teléfono"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Permite que a aplicación acceda aos números de teléfono do dispositivo."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"evitar que a tableta entre en modo de inactividade"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"O dedo moveuse demasiado lento. Téntao de novo."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Non se recoñece"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hardware de impresión dixital non dispoñible."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Non se pode almacenar a impresión dixital. Elimina unha impresión dixital existente."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Esgotouse o tempo de espera da impresión dixital. Téntao de novo."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Cancelouse a operación da impresión dixital."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Demasiados intentos. Téntao de novo máis tarde."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Demasiados intentos. Desactivouse o sensor de impresión dixital."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Téntao de novo."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Abrir"</string>
<string name="sms" msgid="4560537514610063430">"Mensaxe"</string>
<string name="add_contact" msgid="7867066569670597203">"Engadir"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Estase esgotando o espazo de almacenamento"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"É posible que algunhas funcións do sistema non funcionen"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Non hai almacenamento suficiente para o sistema. Asegúrate de ter un espazo libre de 250 MB e reinicia o dispositivo."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Abrir rede wifi dispoñible</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Conéctate a unha rede wifi aberta"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Conectándose á rede wifi aberta"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Conectouse á rede wifi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Non se puido conectar á rede wifi"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"A wifi activarase automaticamente"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Cando esteas preto dunha rede gardada de alta calidade"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Non volver activar"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Activouse a wifi automaticamente"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Estás preto dunha rede gardada: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Inicia sesión na rede wifi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Inicia sesión na rede"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1410,6 +1431,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> supera o límite especificado."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Datos en segundo plano limitados"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Toca para eliminar a restrición."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Uso de datos elevado"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Nos últimos días estás usando máis datos do habitual. Toca para ver o uso e a configuración."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Certificado de seguranza"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Este certificado é válido."</string>
<string name="issued_to" msgid="454239480274921032">"Emitido para:"</string>
@@ -1686,7 +1709,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Ata as <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Ata as <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (próxima alarma)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Ata que desactives o modo Non molestar"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Ata a desactivación"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Ata que desactives o modo Non molestar"</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">"Contraer"</string>
@@ -1735,9 +1758,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Todos os idiomas"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Todas as rexións"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Buscar"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Activar o modo de traballo?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Así activarase o teu perfil de traballo, mesmo as aplicacións, a sincronización en segundo plano e as funcións relacionadas"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Activar"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Tes mensaxes novas"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Abre a aplicación de SMS para ver as mensaxes"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Pode haber funcións limitadas"</string>
@@ -1808,6 +1837,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Non se puido restaurar o atallo porque a aplicación non é compatible coa restauración e a copia de seguranza"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Non se puido restaurar o atallo porque a sinatura da aplicación non coincide"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Non se puido restaurar o atallo"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Desactivouse o atallo"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"A aplicación <xliff:g id="APP_0">%1$s</xliff:g> quere mostrar partes de <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Editar"</string>
</resources>
diff --git a/core/res/res/values-gu/strings.xml b/core/res/res/values-gu/strings.xml
index 2af95ce..0ed3d6d 100644
--- a/core/res/res/values-gu/strings.xml
+++ b/core/res/res/values-gu/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"તમારી સંસ્થા આ ઉપકરણનું સંચાલન કરે છે અને નેટવર્ક ટ્રાફિફનું નિયમન કરી શકે છે. વિગતો માટે ટૅપ કરો."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"તમારું ઉપકરણ કાઢી નાખવામાં આવશે"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"આ વ્યવસ્થાપક ઍપ્લિકેશનનો ઉપયોગ કરી શકાશે નહીં. તમારું ઉપકરણ હવે કાઢી નાખવામાં આવશે.\n\nજો તમને પ્રશ્નો હોય, તો તમારી સંસ્થાના વ્યવસ્થાપકનો સંપર્ક કરો."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> દ્વારા પ્રિન્ટ કરવાનું બંધ કરાયું છે."</string>
<string name="me" msgid="6545696007631404292">"હું"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"ટેબ્લેટ વિકલ્પો"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV વિકલ્પો"</string>
@@ -217,8 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"કટોકટી"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"બગ રિપોર્ટ"</string>
<string name="global_action_logout" msgid="935179188218826050">"સત્ર સમાપ્ત કરો"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"સ્ક્રીનશૉટ"</string>
<string name="bugreport_title" msgid="2667494803742548533">"બગ રિપોર્ટ લો"</string>
<string name="bugreport_message" msgid="398447048750350456">"આ, એક ઇ-મેઇલ સંદેશ તરીકે મોકલવા માટે, તમારા વર્તમાન ઉપકરણ સ્થિતિ વિશેની માહિતી એકત્રિત કરશે. એક બગ રિપોર્ટ પ્રારંભ કરીને તે મોકલવા માટે તૈયાર ન થઈ જાય ત્યાં સુધી તેમાં થોડો સમય લાગશે; કૃપા કરીને ધીરજ રાખો."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"ક્રિયાપ્રતિક્રિયાત્મક રિપોર્ટ"</string>
@@ -264,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"સુરક્ષિત મોડ"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android સિસ્ટમ"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"વ્યક્તિગત પર સ્વિચ કરો"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"કાર્ય પર સ્વિચ કરો"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"સંપર્કો"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"તમારા સંપર્કોને ઍક્સેસ કરવાની"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>ને તમારા સંપર્કોને ઍક્સેસ કરવાની મંજૂરી આપો"</string>
@@ -417,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"એપ્લિકેશનને ફોન સુવિધાઓને ઍક્સેસ કરવાની મંજૂરી આપે છે. આ પરવાનગી એપ્લિકેશનને ફોન નંબર અને ઉપકરણ ID, કૉલ સક્રિય છે અને કોઈ કૉલ દ્વારા કનેક્ટ થયેલ રિમોટ નંબર નિર્ધારિત કરવાની મંજૂરી આપે છે."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"સિસ્ટમ મારફતે કૉલ બીજે વાળો"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"કૉલિંગ અનુભવ સુધારવા માટે ઍપ્લિકેશનને સિસ્ટમ મારફતે કૉલ બીજે વાળવાની મંજૂરી આપે છે."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ફોન નંબર વાંચો"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"ઍપ્લિકેશનને ઉપકરણનાં ફોન નંબરને ઍક્સેસ કરવાની મંજૂરી આપે છે."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ટેબ્લેટને નિષ્ક્રિય થતું અટકાવો"</string>
@@ -486,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"આંગળી બહુ જ ધીમેથી ખસેડી. કૃપા કરીને ફરી પ્રયાસ કરો."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"ઓળખાયેલ નથી"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"ફિંગરપ્રિન્ટ હાર્ડવેર ઉપલબ્ધ નથી."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"ફિંગરપ્રિન્ટ સંગ્રહિત કરી શકાતી નથી. કૃપા કરીને અસ્તિત્વમાંની ફિંગરપ્રિન્ટ દૂર કરો."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"ફિંગરપ્રિન્ટનો સમય બાહ્ય થયો. ફરી પ્રયાસ કરો."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"ફિંગરપ્રિન્ટ ઓપરેશન રદ કર્યું."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"ઘણા બધા પ્રયત્નો. પછીથી ફરી પ્રયાસ કરો."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"ઘણા વધુ પ્રયત્નો. ફિંગરપ્રિન્ટ સેન્સર અક્ષમ કરવામાં આવ્યું છે."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"ફરી પ્રયાસ કરો."</string>
@@ -991,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"ખોલો"</string>
<string name="sms" msgid="4560537514610063430">"સંદેશ મોકલો"</string>
<string name="add_contact" msgid="7867066569670597203">"ઉમેરો"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"સ્ટોરેજ સ્થાન સમાપ્ત થયું"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"કેટલાક સિસ્ટમ કાર્યો કામ કરી શકશે નહીં"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"સિસ્ટમ માટે પર્યાપ્ત સ્ટોરેજ નથી. ખાતરી કરો કે તમારી પાસે 250MB ખાલી સ્થાન છે અને ફરીથી પ્રારંભ કરો."</string>
@@ -1116,6 +1131,8 @@
<item quantity="other">ખુલ્લા વાઇ-ફાઇ નેટવર્ક્સ ઉપલબ્ધ છે</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"ખુલ્લા વાઇ-ફાઇ નેટવર્ક સાથે કનેક્ટ કરો"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"ખુલ્લા વાઇ-ફાઇ નેટવર્ક સાથે કનેક્ટ કરી રહ્યાં છીએ"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"વાઇ-ફાઇ નેટવર્ક સાથે કનેક્ટ કર્યુ"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"વાઇ-ફાઇ નેટવર્ક સાથે કનેક્ટ કરી શકાયું નથી"</string>
@@ -1125,10 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"વાઇ-ફાઇ આપમેળે ચાલુ થઈ જશે"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"જ્યારે તમે એક ઉચ્ચ ક્વૉલિટીવાળા સાચવેલ નેટવર્કની નજીક હોવ"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"પાછું ચાલુ કરશો નહીં"</string>
- <!-- no translation found for wifi_wakeup_enabled_title (6534603733173085309) -->
- <skip />
- <!-- no translation found for wifi_wakeup_enabled_content (189330154407990583) -->
- <skip />
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"વાઇ-ફાઇ આપમેળે ચાલુ થયું"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"તમે એક સાચવેલ નેટવર્કની નજીકમાં છો: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"વાઇ-ફાઇ નેટવર્ક પર સાઇન ઇન કરો"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"નેટવર્ક પર સાઇન ઇન કરો"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1416,6 +1431,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"ઉલ્લેખિત મર્યાદાથી <xliff:g id="SIZE">%s</xliff:g> વધુ."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"બૅકગ્રાઉન્ડ ડેટા પ્રતિબંધિત"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"પ્રતિબંધ દૂર કરવા માટે ટૅપ કરો."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"વધુ પડતો ડેટા વપરાશ"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"છેલ્લા થોડા દિવસ દરમ્યાનમાં તમારો ડેટા વપરાશ સામાન્ય કરતાં વધુ થયો છે. વપરાશ અને સેટિંગ જોવા માટે ટૅપ કરો."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"સુરક્ષા પ્રમાણપત્ર"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"આ પ્રમાણપત્ર માન્ય છે."</string>
<string name="issued_to" msgid="454239480274921032">"આને રજૂ:"</string>
@@ -1692,7 +1709,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> સુધી"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (આગલા એલાર્મ) સુધી"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"તમે ખલેલ પાડશો નહીં બંધ ન કરો ત્યાં સુધી"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"તમે બંધ ન કરો ત્યાં સુધી"</string>
<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>
@@ -1741,9 +1758,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"બધી ભાષાઓ"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"તમામ પ્રદેશ"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"શોધ"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"કાર્ય મોડ ચાલુ કરીએ?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"આનાથી ઍપ્લિકેશનો, બૅકગ્રાઉન્ડ સિંક અને તે સંબંધિત સુવિધાઓ સહિતની તમારી કાર્યાલયની પ્રોફાઇલ ચાલુ થઈ જશે"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"ચાલુ કરો"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"તમારી પાસે નવા સંદેશા છે"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"જોવા માટે SMS ઍપ્લિકેશન ખોલો"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"કેટલીક કાર્યક્ષમતા મર્યાદિત હોઈ શકે છે"</string>
@@ -1815,10 +1838,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"શૉર્ટકટ ફરી મેળવી શકાયો નથી કારણ કે ઍપમાં છે તે સહી મેળ ખાતી નથી"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"શૉર્ટકટ પાછો મેળવી શકાયો નથી"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"શૉર્ટકટને બંધ કરવામાં આવ્યો છે"</string>
- <!-- no translation found for harmful_app_warning_uninstall (3846265696369136266) -->
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
- <!-- no translation found for harmful_app_warning_launch_anyway (5784428382367400530) -->
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
<skip />
- <!-- no translation found for harmful_app_warning_title (2229996292333310435) -->
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
<skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g>એ <xliff:g id="APP_2">%2$s</xliff:g> સ્લાઇસ બતાવવા માગે છે"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"ફેરફાર કરો"</string>
</resources>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 251ec84..d9f592c 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"आपका संगठन इस डिवाइस का प्रबंधन करता है और वह नेटवर्क ट्रैफ़िक की निगरानी भी कर सकता है. विवरण के लिए टैप करें."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"आपके डिवाइस को मिटा दिया जाएगा"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"व्यवस्थापक ऐप्लिकेशन का उपयोग नहीं किया जा सकता. अब आपके डिवाइस को मिटा दिया जाएगा.\n\nअगर आप सवाल पूछना चाहते हैं, तो अपने संगठन के व्यवस्थापक से संपर्क करें."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> ने प्रिंटिंग सुविधा बंद कर दी है."</string>
<string name="me" msgid="6545696007631404292">"मैं"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"टैबलेट विकल्प"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"टीवी के विकल्प"</string>
@@ -217,8 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"आपातकाल"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"गड़बड़ी की रिपोर्ट"</string>
<string name="global_action_logout" msgid="935179188218826050">"सत्र खत्म करें"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"स्क्रीनशॉट"</string>
<string name="bugreport_title" msgid="2667494803742548533">"गड़बड़ी की रिपोर्ट लें"</string>
<string name="bugreport_message" msgid="398447048750350456">"इससे ईमेल भेजने के लिए, आपके डिवाइस की मौजूदा स्थिति से जुड़ी जानकारी इकट्ठा की जाएगी. गड़बड़ी की रिपोर्ट बनना शुरू होने से लेकर भेजने के लिए तैयार होने तक कुछ समय लगेगा; कृपया इंतज़ार करें."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"सहभागी रिपोर्ट"</string>
@@ -264,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"सुरक्षित मोड"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android सिस्टम"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"व्यक्तिगत प्रोफ़ाइल में स्विच करें"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"कार्य प्रोफ़ाइल में स्विच करें"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"संपर्क"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"अपने संपर्कों को ऐक्सेस करने की"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> को अपने संपर्क तक पहुंचने दें"</string>
@@ -417,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"ऐप्स को डिवाइस की फ़ोन सुविधाओं तक पहुंचने देता है. यह अनुमति ऐप्स को फ़ोन नंबर और डिवाइस आईडी, कॉल सक्रिय है या नहीं, और कॉल द्वारा कनेक्ट किया गया दूरस्थ नंबर निर्धारित करने देती है."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"सिस्टम के माध्यम से कॉल रूट करें"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"कॉल करने के अनुभव को बेहतर बनाने के लिए ऐप्लिकेशन को सिस्टम के माध्यम से उसके कॉल रूट करने देती है."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"फ़ोन नंबर पढ़ना"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"ऐप को डिवाइस के फ़ोन नंबर का इस्तेमाल करने देती है."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"टैबलेट को सोने (कम बैटरी मोड) से रोकें"</string>
@@ -486,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"उंगली बहुत धीरे चलाई गई. कृपया फिर से कोशिश करें."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"पहचाना नहीं गया"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"फ़िंगरप्रिंट हार्डवेयर उपलब्ध नहीं है."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"फ़िंगरप्रिंट को संग्रहित नहीं किया जा सका. कृपया कोई मौजूदा फ़िंगरप्रिंट निकालें."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"फ़िंगरप्रिंट का समय समाप्त हो गया. पुनः प्रयास करें."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"फ़िंगरप्रिंट क्रियान्वयन रोक दिया गया."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"बहुत अधिक प्रयास कर लिए गए हैं. बाद में पुन: प्रयास करें."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"बहुत अधिक कोशिशें. फ़िंगरप्रिंट सेंसर अक्षम है."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"पुन: प्रयास करें."</string>
@@ -991,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"खोलें"</string>
<string name="sms" msgid="4560537514610063430">"मैसेज"</string>
<string name="add_contact" msgid="7867066569670597203">"जोड़ें"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"मेमोरी में जगह नहीं बची है"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"हो सकता है कुछ सिस्टम फ़ंक्शन कार्य न करें"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"सिस्टम के लिए ज़रूरी मेमोरी नहीं है. पक्का करें कि आपके पास 250एमबी की खाली जगह है और फिर से शुरू करें."</string>
@@ -1116,6 +1131,8 @@
<item quantity="other">खुले वाई-फ़ाई नेटवर्क उपलब्ध</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"खुले वाई-फ़ाई नेटवर्क से कनेक्ट करें"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"खुले वाई-फ़ाई नेटवर्क से कनेक्ट हो रहा है"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"वाई-फ़ाई नेटवर्क से कनेक्ट हो गया है"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"वाई-फ़ाई नेटवर्क से कनेक्ट नहीं हो सका"</string>
@@ -1125,10 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"वाई-फ़ाई अपने आप चालू हो जाएगा"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"जब आप किसी अच्छी क्वालिटी वाले सेव किए गए नेटवर्क के पास हों"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"वापस चालू न करें"</string>
- <!-- no translation found for wifi_wakeup_enabled_title (6534603733173085309) -->
- <skip />
- <!-- no translation found for wifi_wakeup_enabled_content (189330154407990583) -->
- <skip />
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"वाई-फ़ाई अपने आप चालू हो गया है"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"आप एक सेव किए गए नेटवर्क के पास हैं: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"वाई-फ़ाई नेटवर्क में साइन इन करें"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"नेटवर्क में साइन इन करें"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1415,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> निर्दिष्ट सीमा से अधिक."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"पृष्ठभूमि डेटा प्रतिबंधित है"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"प्रतिबंध निकालने हेतु टैप करें."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"डेटा खर्च ज़्यादा हो गया है"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"पिछले कुछ दिनों से आपका डेटा खर्च, सामान्य से ज़्यादा है. डेटा का इस्तेमाल और सेटिंग देखने के लिए टैप करें."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"सुरक्षा प्रमाणपत्र"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"यह प्रमाणपत्र मान्य है."</string>
<string name="issued_to" msgid="454239480274921032">"इन्हें जारी किया गया:"</string>
@@ -1691,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> तक"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (अगले अलार्म) तक"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"जब तक कि आप परेशान ना करें को बंद नहीं कर देते"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"जब तक आप बंद नहीं करते"</string>
<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>
@@ -1740,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"सभी भाषाएं"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"सभी क्षेत्र"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"सर्च करें"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"कार्य मोड चालू करें?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"इससे आपकी कार्य प्रोफ़ाइल चालू हो जाएगी, जिसमें ऐप्लिकेशन, बैकग्राउंड सिंक और संबंधित सुविधाएं शामिल हैं"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"चालू करें"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"आपके पास नए संदेश हैं"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"देखने के लिए मैसेज (एसएमएस) ऐप खोलें"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"कुछ कार्य क्षमताएं सीमित हो सकती हैं"</string>
@@ -1814,10 +1837,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"ऐप सिग्नेचर अलग होने के कारण शॉर्टकट बहाल नहीं किया जा सका"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"शॉर्टकट बहाल नहीं किया जा सका"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"शॉर्टकट बंद है"</string>
- <!-- no translation found for harmful_app_warning_uninstall (3846265696369136266) -->
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
- <!-- no translation found for harmful_app_warning_launch_anyway (5784428382367400530) -->
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
<skip />
- <!-- no translation found for harmful_app_warning_title (2229996292333310435) -->
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
<skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g>, <xliff:g id="APP_2">%2$s</xliff:g> के हिस्से (स्लाइस) दिखाना चाहता है"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"बदलाव करें"</string>
</resources>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index bbe7ca9..767cbac 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -183,6 +183,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Vaša organizacija upravlja ovim uređajem i može nadzirati mrežni promet. Dodirnite za pojedinosti."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Uređaj će se izbrisati"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Administratorska aplikacija ne može se upotrebljavati. Uređaj će se izbrisati.\n\nAko imate pitanja, obratite se administratoru organizacije."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Ispis je onemogućila aplikacija <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Ja"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opcije tabletnog uređaja"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opcije televizora"</string>
@@ -219,6 +220,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Hitno"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Izvješće o bugovima"</string>
<string name="global_action_logout" msgid="935179188218826050">"Završi sesiju"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Snimka zaslona"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Izvješće o programskoj pogrešci"</string>
<string name="bugreport_message" msgid="398447048750350456">"Time će se prikupiti podaci o trenutačnom stanju vašeg uređaja koje ćete nam poslati u e-poruci. Za pripremu izvješća o programskoj pogrešci potrebno je nešto vremena pa vas molimo za strpljenje."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interaktivno izvješće"</string>
@@ -265,8 +267,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Siguran način rada"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sustav Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Prijeđite na osobni"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Prijeđite na radni"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontakti"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"pristupati vašim kontaktima"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Dopustite aplikaciji <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> da pristupa vašim kontaktima"</string>
@@ -418,6 +422,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Aplikaciji omogućuje pristup telefonskim značajkama uređaja. Ta dozvola aplikaciji omogućuje utvrđivanje telefonskog broja i ID-ova uređaja, je li poziv aktivan te udaljeni broj koji je povezan pozivom."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"preusmjeravati pozive putem sustava"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Omogućuje aplikaciji da preusmjerava pozive putem sustava radi poboljšanja doživljaja."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"čitati telefonske brojeve"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Aplikaciji omogućuje da pristupi telefonskim brojevima na uređaju."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"spriječi mirovanje tabletnog uređaja"</string>
@@ -487,10 +495,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Presporo pomicanje prsta. Pokušajte ponovo."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nije prepoznat"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hardver za otisak prsta nije dostupan."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Otisak prsta nije pohranjen. Uklonite postojeći otisak prsta."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Isteklo je vrijeme čekanja za otisak prsta. Pokušajte ponovo."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Radnja otiska prsta otkazana je."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Previše pokušaja. Pokušajte ponovo kasnije."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Senzor otiska prsta onemogućen je zbog previše pokušaja."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Pokušajte ponovo."</string>
@@ -1009,6 +1020,12 @@
<string name="browse" msgid="1245903488306147205">"Otvori"</string>
<string name="sms" msgid="4560537514610063430">"Poruka"</string>
<string name="add_contact" msgid="7867066569670597203">"Dodaj"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Ponestaje prostora za pohranu"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Neke sistemske funkcije možda neće raditi"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Nema dovoljno pohrane za sustav. Oslobodite 250 MB prostora i pokrenite uređaj ponovo."</string>
@@ -1136,6 +1153,8 @@
<item quantity="other">Dostupne su otvorene Wi-Fi mreže</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Povezivanje s otvorenom Wi‑Fi mrežom"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Povezivanje s otvorenom Wi‑Fi mrežom"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Povezano s Wi-Fi mrežom"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Nije uspjelo povezivanje s Wi-Fi mrežom"</string>
@@ -1145,6 +1164,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi će se uključiti automatski"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Kada ste u blizini spremljene mreže visoke kvalitete"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Više ne uključuj"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi je uključen automatski"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Nalazite se u blizini spremljene mreže: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Prijava na Wi-Fi mrežu"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Prijava na mrežu"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1432,6 +1453,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"Veličina <xliff:g id="SIZE">%s</xliff:g> prelazi navedeno ograničenje."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Pozadinski podaci ograničeni"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Dodirnite i uklonite ograničenje"</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Velika potrošnja podat. prometa"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Vaša potrošnja podatkovnog prometa u zadnjih je nekoliko dana veća nego obično. Dodirnite da biste vidjeli potrošnju i postavke."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Sigurnosni certifikat"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Ovaj je certifikat valjan."</string>
<string name="issued_to" msgid="454239480274921032">"Izdano za:"</string>
@@ -1718,7 +1741,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Do <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Do <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (sljedeći alarm)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Dok ne isključite \"Ne ometaj\""</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Dok ne isključite"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Dok ne isključite \"Ne ometaj\""</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">"Sažmi"</string>
@@ -1768,9 +1791,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Svi jezici"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Sve regije"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Pretraži"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Uključiti radni način?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Time će se uključiti vaš radni profil, uključujući aplikacije, sinkronizaciju u pozadini i povezane značajke"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Uključi"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Imate nove poruke"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Otvorite SMS aplikaciju da biste pregledali poruke"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Funkcije mogu biti ograničene"</string>
@@ -1842,6 +1871,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Vraćanje prečaca nije uspjelo jer aplikacija ne podržava sigurnosno kopiranje i vraćanje"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Vraćanje prečaca nije uspjelo zbog nepodudaranja potpisa aplikacije"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Vraćanje prečaca nije uspjelo"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Prečac je onemogućen"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> želi prikazivati isječke aplikacije <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Uređivanje"</string>
</resources>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 2dbe49d..e072b70 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Ezt az eszközt szervezete kezeli, és lehetséges, hogy a hálózati forgalmat is figyelik. További részletekért koppintson."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"A rendszer törölni fogja eszközét"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"A rendszergazdai alkalmazás nem használható. A rendszer most törli az eszközt.\n\nKérdéseivel forduljon szervezete rendszergazdájához."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"A(z) <xliff:g id="OWNER_APP">%s</xliff:g> letiltotta a nyomtatást."</string>
<string name="me" msgid="6545696007631404292">"Saját"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Táblagép beállításai"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Tévébeállítások"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Segélyhívás"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Programhiba bejelentése"</string>
<string name="global_action_logout" msgid="935179188218826050">"Munkamenet befejezése"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Képernyőkép"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Hibajelentés készítése"</string>
<string name="bugreport_message" msgid="398447048750350456">"Ezzel információt fog gyűjteni az eszköz jelenlegi állapotáról, amelyet a rendszer e-mailben fog elküldeni. Kérjük, legyen türelemmel, amíg a hibajelentés elkészül, és küldhető állapotba kerül."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interaktív jelentés"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Biztonsági üzemmód"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android rendszer"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Átváltás személyes profilra"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Átváltás munkaprofilra"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Névjegyek"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"hozzáférés a névjegyekhez"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Engedélyezi a(z) <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> számára, hogy hozzáférjen a névjegyekhez"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Lehetővé teszi az alkalmazás számára, hogy hozzáférjen az eszköz telefonálási funkcióihoz. Az engedéllyel rendelkező alkalmazás meghatározhatja a telefonszámot és eszközazonosítókat, hogy egy hívás aktív-e, valamint híváskor a másik fél telefonszámát."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"rendszeren keresztüli hívásirányítás"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"A telefonálási élmény javítása érdekében lehetővé teszi az alkalmazás számára a rendszeren keresztüli hívásirányítást."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"telefonszámok olvasása"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Engedélyezi az alkalmazás számára az eszköz telefonszámaihoz való hozzáférést."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"táblagép alvás üzemmódjának megakadályozása"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Túl lassan húzta az ujját. Próbálkozzon újra."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nem sikerült felismerni"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Az ujjlenyomathoz szükséges hardver nem érhető el."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Az ujjlenyomat nem tárolható. Távolítson el egy meglévő ujjlenyomatot."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Az ujjlenyomat-beolvasási műveletkor időtúllépés történt. Próbálkozzon újra."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Ujjlenyomattal kapcsolatos művelet megszakítva"</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Túl sok próbálkozás. Próbálja újra később."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Túl sok próbálkozás. Ujjlenyomat-érzékelő letiltva."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Próbálkozzon újra."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Megnyitás"</string>
<string name="sms" msgid="4560537514610063430">"Üzenet"</string>
<string name="add_contact" msgid="7867066569670597203">"Hozzáadás"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Kevés a szabad terület"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Előfordulhat, hogy néhány rendszerfunkció nem működik."</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Nincs elegendő tárhely a rendszerhez. Győződjön meg arról, hogy rendelkezik 250 MB szabad területtel, majd kezdje elölről."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Nyílt Wi-Fi hálózat érhető el</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Nyílt Wi-Fi-hálózathoz kapcsolódhat"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Kapcsolódás nyílt Wi‑Fi-hálózathoz…"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Sikeres kapcsolódás a Wi-Fi-hálózathoz"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Nem sikerült kapcsolódni a Wi‑Fi-hálózathoz"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"A Wi-Fi automatikusan bekapcsol"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Amikor jó minőségű mentett hálózat közelében tartózkodik"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Ne kapcsolódjon vissza"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi automatikusan bekapcsolva"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Ön a következő mentett hálózat közelében tartózkodik: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Bejelentkezés Wi-Fi hálózatba"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Bejelentkezés a hálózatba"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g>-tal túllépte a korlátot."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Háttéradatok korlátozva"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Koppintson az eltávolításhoz."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Nagymértékű adathasználat"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Adathasználata az elmúlt napokban nagyobb a szokásosnál. Koppintson az adathasználati adatok és a beállítások megtekintéséhez."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Biztonsági tanúsítvány"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"A tanúsítvány érvényes."</string>
<string name="issued_to" msgid="454239480274921032">"Kiállítva a következőnek:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Eddig: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Eddig: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (ez a következő ébresztés)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Amíg ki nem kapcsolja a „Ne zavarjanak” lehetőséget"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Kikapcsolásig"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Amíg ki nem kapcsolja a „Ne zavarjanak” lehetőséget"</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">"Összecsukás"</string>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Minden nyelv"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Minden régió"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Keresés"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Bekapcsolja a munka módot?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Bekapcsolja a munkaprofilt, beleértve az alkalmazásokat, a háttérben való szinkronizálást és a kapcsolódó funkciókat"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Bekapcsolás"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Új üzenetei érkeztek"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"SMS-alkalmazás megnyitása a megtekintéshez"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Egyes funkciók korlátozva lehetnek"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Nem sikerült visszaállítani a parancsikont, mert az alkalmazás nem támogatja a biztonsági mentést és visszaállítást"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Nem sikerült visszaállítani a parancsikont, mert az alkalmazás-aláírás nem egyezik"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Nem sikerült visszaállítani a parancsikont"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"A parancsikon le van tiltva"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"A(z) <xliff:g id="APP_0">%1$s</xliff:g> alkalmazás részleteket szeretne megjeleníteni a(z) <xliff:g id="APP_2">%2$s</xliff:g> alkalmazásból"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Szerkesztés"</string>
</resources>
diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml
index 1218b48..0b7b7d09 100644
--- a/core/res/res/values-hy/strings.xml
+++ b/core/res/res/values-hy/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Ձեր կազմակերպությունը կառավարում է այս սարքը և կարող է վերահսկել ցանցի թրաֆիկը: Հպեք՝ մանրամասները դիտելու համար:"</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Ձեր սարքը ջնջվելու է"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Հնարավոր չէ օգտագործել ադմինիստրատորի հավելվածը։ Ձեր սարքն այժմ կջնջվի։\n\nԵթե ունեք հարցեր, ապա դիմեք ձեր կազմակերպության ադմինիստրատորին։"</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Տպումն անջատված է <xliff:g id="OWNER_APP">%s</xliff:g> հավելվածի կողմից։"</string>
<string name="me" msgid="6545696007631404292">"Իմ"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Պլանշետի ընտրանքները"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Հեռուստացույցի ընտրանքներ"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Շտապ կանչ"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Վրիպակի զեկույց"</string>
<string name="global_action_logout" msgid="935179188218826050">"Ավարտել աշխատաշրջանը"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Էկրանի պատկեր"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Գրել սխալի զեկույց"</string>
<string name="bugreport_message" msgid="398447048750350456">"Սա տեղեկություններ կհավաքագրի ձեր սարքի առկա կարգավիճակի մասին և կուղարկի այն էլեկտրոնային նամակով: Որոշակի ժամանակ կպահանջվի վրիպակի մասին զեկուցելու պահից սկսած մինչ ուղարկելը: Խնդրում ենք փոքր-ինչ համբերատար լինել:"</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Ինտերակտիվ զեկույց"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Անվտանգ ռեժիմ"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android համակարգ"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Անցնել անհատական պրոֆիլին"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Անցնել աշխատանքային պրոֆիլին"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Կոնտակտներ"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"օգտագործել ձեր կոնտակտները"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Թույլ տալ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> հավելվածին օգտագործել ձեր կոնտակտները"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Թույլ է տալիս հավելվածին օգտագործել սարքի հեռախոսային գործիքները: Այս թույլտվությունը հավելվածին հնարավորություն է տալիս որոշել հեռախոսահամարը և սարքի ID-ները, արդյոք զանգը ակտիվ է և միացված զանգի հեռակա հեռախոսահամարը:"</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"զանգերն ուղարկել համակարգի միջոցով"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Հավելվածին թույլ է տալիս իր զանգերն ուղարկել համակարգի միջոցով՝ կապի որակը բարձրացնելու նպատակով։"</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"օգտագործել հեռախոսահամարները"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Հավելվածին թույլ է տալիս օգտագործել սարքի հեռախոսահամարները:"</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"զերծ պահել պլանշետը քնելուց"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Շատ դանդաղ անցկացրեցիք մատը: Փորձեք նորից:"</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Չճանաչվեց"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Մատնահետքի սարքն անհասանելի է:"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Հնարավոր չէ պահել մատնահետքը: Հեռացրեք առկա մատնահետքը:"</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Մատնահետքի գրանցման ժամանակը սպառվել է: Փորձեք նորից:"</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Իսկորոշումը մատնահետքի միջոցով չեղարկվեց:"</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Չափից շատ փորձ եք կատարել: Փորձեք նորից քիչ հետո:"</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Չափից շատ փորձ եք կատարել: Մատնահետքերի սկաներն անջատվել է:"</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Փորձեք նորից:"</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Բացել"</string>
<string name="sms" msgid="4560537514610063430">"SMS գրել"</string>
<string name="add_contact" msgid="7867066569670597203">"Ավելացնել"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Հիշողությունը սպառվում է"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Որոշ գործառույթներ կարող են չաշխատել"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Համակարգի համար բավարար հիշողություն չկա: Համոզվեք, որ ունեք 250ՄԲ ազատ տարածություն և վերագործարկեք:"</string>
@@ -1114,6 +1131,8 @@
<item quantity="other">Հասանելի են չպաշտպանված Wi-Fi ցանցեր</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Միացեք բաց Wi‑Fi ցանցին"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Միացում բաց Wi‑Fi ցանցին"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Միացել է Wi‑Fi ցանցին"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Չհաջողվեց միանալ Wi‑Fi ցանցին"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi-ն ավտոմատ կմիանա"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Լավ ազդանշանով պահված ցանցի տարածքում գտնվելիս"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Նորից չմիացնել"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi-ը միացել է ավտոմատ կերպով"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Դուք գտնվում եք պահված ցանցի մոտակայքում՝ <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Մուտք գործեք Wi-Fi ցանց"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Մուտք գործեք ցանց"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g>-ը գերազանցում է նշված սահմանաչափը:"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Հետնաշերտային տվյալները սահմանափակ են"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Հպեք և հանեք սահմանափակումը:"</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Թրաֆիկի շատ օգտագործում"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Վերջին օրերին դուք սովորականից շատ թրաֆիկ եք օգտագործում։ Հպեք՝ օգտագործված թրաֆիկը և կարգավորումները դիտելու համար։"</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Անվտանգության վկայական"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Այս վկայականը վավեր է:"</string>
<string name="issued_to" msgid="454239480274921032">"Թողարկվել է`"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Մինչև <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Մինչև ժ. <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>-ը (հաջորդ զարթուցիչը)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Մինչև չանջատեք «Չանհանգստացնել» գործառույթը"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Մինչև դուք չանջատեք"</string>
<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>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Բոլոր լեզուները"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Բոլոր տարածաշրջանները"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Որոնում"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Միացնե՞լ աշխատանքային ռեժիմը։"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Սա կմիացնի ձեր աշխատանքային պրոֆիլը, այդ թվում նաև հավելվածները, ֆոնային համաժամեցումը և առնչվող գործառույթները"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Միացնել"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Դուք ունեք նոր հաղորդագրություններ"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Դիտելու համար բացել SMS հավելվածը"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Որոշ գործառույթներ կարող են սահմանափակված լինել"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Չհաջողվեց վերականգնել դյուրանցումը, քանի որ հավելվածում չի աջակցվում պահուստավորման և վերականգնման գործառույթը"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Չհաջողվեց վերականգնել դյուրանցումը, քանի որ հավելվածների ստորագրությունները տարբեր են"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Չհաջողվեց վերականգնել դյուրանցումը"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Դյուրանցումն անջատված է"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> հավելվածն ուզում է ցուցադրել հատվածներ <xliff:g id="APP_2">%2$s</xliff:g> հավելվածից"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Փոփոխել"</string>
</resources>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index e3df0c8..a93d333 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Organisasi mengelola perangkat ini dan mungkin memantau traffic jaringan. Tap untuk melihat detailnya."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Perangkat akan dihapus"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Aplikasi admin tidak dapat digunakan. Kini, perangkat Anda akan dihapus.\n\nJika ada pertanyaan, hubungi admin organisasi."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Fitur pencetakan dinonaktifkan oleh <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Saya"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opsi tablet"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opsi TV"</string>
@@ -263,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Mode aman"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistem Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Beralih ke Pribadi"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Beralih ke Kantor"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Beralih ke profil pribadi"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"Beralih ke profil kerja"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontak"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"mengakses kontak"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Izinkan <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> mengakses kontak"</string>
@@ -416,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Memungkinkan aplikasi mengakses fitur telepon perangkat. Izin ini memungkinkan aplikasi menentukan nomor telepon dan ID perangkat, apakah suatu panggilan aktif atau tidak, dan nomor jarak jauh yang tersambung oleh sebuah panggilan."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"sambungkan panggilan telepon melalui sistem"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Mengizinkan aplikasi menyambungkan panggilan telepon melalui sistem untuk menyempurnakan pengalaman menelepon."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"membaca nomor telepon"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Mengizinkan aplikasi mengakses nomor telepon perangkat."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"cegah tablet dari tidur"</string>
@@ -485,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Jari digerakkan terlalu lambat. Coba lagi."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Tidak dikenali"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hardware sidik jari tidak tersedia."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Sidik jari tidak dapat disimpan. Hapus sidik jari yang ada."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Waktu sidik jari habis. Coba lagi."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Operasi sidik jari dibatalkan."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Operasi sidik jari dibatalkan oleh pengguna."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Terlalu banyak upaya. Coba lagi nanti."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Terlalu sering dicoba. Sensor sidik jari dinonaktifkan."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Coba lagi."</string>
@@ -990,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"Buka"</string>
<string name="sms" msgid="4560537514610063430">"Pesan"</string>
<string name="add_contact" msgid="7867066569670597203">"Tambahkan"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Ruang penyimpanan hampir habis"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Beberapa fungsi sistem mungkin tidak dapat bekerja"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Penyimpanan tidak cukup untuk sistem. Pastikan Anda memiliki 250 MB ruang kosong, lalu mulai ulang."</string>
@@ -1115,6 +1128,8 @@
<item quantity="one">Jaringan Wi-Fi terbuka tersedia</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Hubungkan ke jaringan Wi-Fi terbuka"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Menghubungkan ke jaringan Wi-Fi terbuka"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Terhubung ke jaringan Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Tidak dapat menghubungkan ke jaringan Wi‑Fi"</string>
@@ -1412,6 +1427,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> melebihi batas yang ditentukan."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Data latar belakang dibatasi"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Ketuk untuk menghapus batasan."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Penggunaan data yang besar"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Penggunaan data selama beberapa hari terakhir lebih besar dari biasanya. Tap untuk melihat penggunaan dan setelan."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Sertifikat keamanan"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Sertifikat ini valid."</string>
<string name="issued_to" msgid="454239480274921032">"Diterbitkan ke:"</string>
@@ -1688,7 +1705,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Hingga <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Hingga <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (alarm berikutnya)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Hingga Anda menonaktifkan status Jangan Ganggu"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Sampai Anda menonaktifkannya"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Hingga status Jangan Ganggu dinonaktifkan"</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">"Ciutkan"</string>
@@ -1737,9 +1754,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Semua bahasa"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Semua wilayah"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Telusuri"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Aktifkan mode kerja?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Tindakan ini akan mengaktifkan profil kerja, termasuk aplikasi, sinkronisasi latar belakang, dan fitur terkait"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"Aktifkan profil kerja?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"Aplikasi kerja, notifikasi, data, dan fitur profil kerja lainnya akan diaktifkan"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Aktifkan"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Ada pesan baru"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Buka aplikasi SMS untuk melihat"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Beberapa fungsi mungkin terbatas"</string>
@@ -1811,7 +1832,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Tidak dapat memulihkan pintasan karena tanda tangan aplikasi tidak cocok"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Tidak dapat memulihkan pintasan."</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Pintasan dinonaktifkan"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Uninstal"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Tetap luncurkan"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Uninstal aplikasi berbahaya?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> ingin menampilkan potongan <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Edit"</string>
</resources>
diff --git a/core/res/res/values-is/strings.xml b/core/res/res/values-is/strings.xml
index 40bf34c..b5462eb 100644
--- a/core/res/res/values-is/strings.xml
+++ b/core/res/res/values-is/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Fyrirtækið þitt stjórnar þessu tæki og kann að fylgjast með netnotkun. Ýttu hér til að fá upplýsingar."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Tækið verður hreinsað"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Ekki er hægt að nota stjórnunarforritið. Tækinu verður eytt.\n\nEf spurningar vakna skaltu hafa samband við kerfisstjóra fyrirtækisins."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> lokaði á prentun."</string>
<string name="me" msgid="6545696007631404292">"Ég"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Valkostir spjaldtölvu"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Sjónvarpsvalkostir"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Neyðarsímtal"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Villutilkynning"</string>
<string name="global_action_logout" msgid="935179188218826050">"Ljúka lotu"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Skjámynd"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Útbúa villutilkynningu"</string>
<string name="bugreport_message" msgid="398447048750350456">"Þetta safnar upplýsingum um núverandi stöðu tækisins til að senda með tölvupósti. Það tekur smástund frá því villutilkynningin er ræst og þar til hún er tilbúin til sendingar – sýndu biðlund."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Gagnvirk skýrsla"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Örugg stilling"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android kerfið"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Skipta yfir í persónulegt snið"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Skipta yfir í vinnusnið"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Tengiliðir"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"fá aðgang að tengiliðunum þínum"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Veita <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> aðgang að tengiliðunum þínum"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Leyfir forriti að fá aðgang að símaeiginleikum tækisins. Þessi heimild gerir forritinu kleift að komast að símanúmeri og auðkennum tækisins, hvort símtal er í gangi og símanúmeri viðmælanda í símtali."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"senda símtöl gegnum kerfið"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Heimilar forritinu að senda símtöl sín gegnum kerfið til að bæta gæði símtalsins."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"lesa símanúmer"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Veitir forritinu aðgang að símanúmerum tækisins."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"koma í veg fyrir að spjaldtölvan fari í biðstöðu"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Fingurinn hreyfðist of hægt. Reyndu aftur."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Þekktist ekki"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Fingrafarsvélbúnaður ekki til staðar."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Ekki er hægt að vista fingrafarið. Fjarlægðu eitthvert af fingraförunum sem fyrir eru."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Tímamörk runnu út fyrir fingrafar. Reyndu aftur."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Hætt við fingrafarsaðgerð."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Of margar tilraunir. Reyndu aftur síðar."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Of margar tilraunir. Fingrafaralesari gerður óvirkur."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Reyndu aftur."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Opna"</string>
<string name="sms" msgid="4560537514610063430">"Skilaboð"</string>
<string name="add_contact" msgid="7867066569670597203">"Bæta við"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Geymslurýmið er senn á þrotum"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Sumir kerfiseiginleikar kunna að vera óvirkir"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Ekki nægt geymslurými fyrir kerfið. Gakktu úr skugga um að 250 MB séu laus og endurræstu."</string>
@@ -1114,6 +1131,8 @@
<item quantity="other">Opin Wi-Fi net í boði</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Tengjast opnu Wi-Fi neti"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Tengist opnu Wi‑Fi neti"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Tengt við Wi‑Fi net"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Ekki hægt að tengjast Wi-Fi neti"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Kveikt verður sjálfkrafa á Wi‑Fi"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Þegar þú ert nálægt vistuðu hágæðaneti"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Ekki kveikja aftur"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Sjálfkrafa kveikt á Wi-Fi"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Þú ert nálægt vistuðu neti: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Skrá inn á Wi-Fi net"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Skrá inn á net"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1410,6 +1431,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> yfir tilgreindum mörkum."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Bakgrunnsgögn takmörkuð"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Ýttu til að eyða takmörkun."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Mikil gagnanotkun"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Gagnanotkun þín síðustu daga er meiri en venjulega. Ýttu til að skoða upplýsingar um notkun og stillingar."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Öryggisvottorð"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Þetta vottorð er gilt."</string>
<string name="issued_to" msgid="454239480274921032">"Gefið út fyrir:"</string>
@@ -1686,7 +1709,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Til <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Þangað til <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (næsta viðvörun)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Þar til þú slekkur á „Ónáðið ekki“"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Þar til þú slekkur"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Þar til þú slekkur á „Ónáðið ekki“"</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">"Minnka"</string>
@@ -1735,9 +1758,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Öll tungumál"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Öll svæði"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Leita"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Viltu kveikja á vinnustillingu?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Þetta slekkur á vinnusniðinu þínu, þar á meðal forritum, samstillingu í bakgrunni og tengdum eiginleikum"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Kveikja"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Þú ert með ný skilaboð"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Opnaðu SMS-forritið til að skoða"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Sum virkni kann að vera takmörkuð"</string>
@@ -1808,6 +1837,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Ekki var hægt að endurheimta flýtileið vegna þess að forritið styður ekki öryggisafritun og endurheimt"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Ekki var hægt að endurheimta flýtileið vegna þess að undirskriftir forrita passa ekki saman"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Ekki var hægt að endurheimta flýtileið"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Flýtileið er óvirk"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> vill sýna sneiðar úr <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Breyta"</string>
</resources>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index c1ef402..8807282 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Questo dispositivo è gestito dalla tua organizzazione, che potrebbe monitorare il traffico di rete. Tocca per i dettagli."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Il dispositivo verrà resettato"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Impossibile usare l\'app di amministrazione. Il dispositivo verrà resettato.\n\nPer eventuali domande, contatta l\'amministratore della tua organizzazione."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Stampa disattivata da <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Io"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opzioni tablet"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opzioni TV"</string>
@@ -263,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Modalità provvisoria"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Passa al profilo personale"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Passa al profilo di lavoro"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Passa al profilo personale"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"Passa a profilo di lavoro"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Contatti"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"accedere ai contatti"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Consenti a <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> di accedere ai tuoi contatti"</string>
@@ -416,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Consente all\'applicazione di accedere alle funzioni telefoniche del dispositivo. Questa autorizzazione consente all\'applicazione di determinare il numero di telefono e gli ID dei dispositivi, se una chiamata è attiva e il numero remoto connesso da una chiamata."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"indirizzamento delle chiamate tramite il sistema"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Consente all\'app di indirizzare le proprie chiamate tramite il sistema al fine di migliorare l\'esperienza di chiamata."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"lettura dei numeri di telefono"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Consente all\'app di accedere ai numeri di telefono del dispositivo."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"disattivazione stand-by del tablet"</string>
@@ -485,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Movimento del dito troppo lento. Riprova."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Non riconosciuto"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hardware per l\'impronta digitale non disponibile."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Impossibile memorizzare l\'impronta digitale. Rimuovi un\'impronta esistente."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Timeout impronta digitale. Riprova."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Operazione associata all\'impronta digitale annullata."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Operazione associata all\'impronta digitale annullata dall\'utente."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Troppi tentativi. Riprova più tardi."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Troppi tentativi. Sensore di impronte digitali disattivato."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Riprova."</string>
@@ -990,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"Apri"</string>
<string name="sms" msgid="4560537514610063430">"Invia messaggio"</string>
<string name="add_contact" msgid="7867066569670597203">"Aggiungi"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Spazio di archiviazione in esaurimento"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Alcune funzioni di sistema potrebbero non funzionare"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Memoria insufficiente per il sistema. Assicurati di avere 250 MB di spazio libero e riavvia."</string>
@@ -1115,6 +1128,8 @@
<item quantity="one">Apri rete Wi-Fi disponibile</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Stabilisci la connessione per aprire la rete Wi‑Fi"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Connessione per aprire la rete Wi‑Fi"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Connessione alla rete Wi-Fi stabilita"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Impossibile connettersi alla rete Wi-Fi"</string>
@@ -1412,6 +1427,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> oltre il limite specificato."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Dati in background limitati"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Tocca per rimuovere le limitazioni."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Massiccio utilizzo dei dati"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"L\'utilizzo dei dati negli ultimi giorni è superiore al normale. Tocca per visualizzare l\'utilizzo e le impostazioni."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Certificato di sicurezza"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Questo certificato è valido."</string>
<string name="issued_to" msgid="454239480274921032">"Rilasciato a:"</string>
@@ -1688,7 +1705,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Fino a <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Fino a <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (prossima sveglia)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Fino alla disattivazione di Non disturbare"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Fino alla disattivazione"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Fino alla disattivazione di Non disturbare"</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">"Comprimi"</string>
@@ -1737,9 +1754,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Tutte le lingue"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Tutte le aree geografiche"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Cerca"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Attivare la modalità Lavoro?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Verrà attivato il profilo di lavoro, incluse app, sincronizzazione in background e funzioni correlate"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"Attivare il profilo di lavoro?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"Le tue app di lavoro, le notifiche, i dati e altri elementi del profilo di lavoro saranno attivati."</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Attiva"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Hai nuovi messaggi"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Apri l\'app SMS per la visualizzazione"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Funzioni potenzial. limitate"</string>
@@ -1811,7 +1832,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Impossibile ripristinare la scorciatoia perché la firma dell\'app non corrisponde"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Impossibile ripristinare la scorciatoia"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"La scorciatoia è disattivata"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Disinstalla"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Avvia comunque"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Disinstallare l\'app dannosa?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"L\'app <xliff:g id="APP_0">%1$s</xliff:g> vuole mostrare porzioni dell\'app <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Modifica"</string>
</resources>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 7c0ce3a..d14e2aa 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -185,6 +185,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"הארגון שלך מנהל מכשיר זה ועשוי לנטר את התנועה ברשת. הקש לקבלת פרטים."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"תתבצע מחיקה של המכשיר"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"לא ניתן להשתמש באפליקציה של מנהל המערכת.\n\nאם יש לך שאלות, פנה למנהל המערכת של הארגון."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"ההדפסה הושבתה על ידי <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"אני"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"אפשרויות טאבלט"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"אפשרויות טלוויזיה"</string>
@@ -221,6 +222,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"חירום"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"דיווח על באג"</string>
<string name="global_action_logout" msgid="935179188218826050">"סיום הפעלה"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"צילום מסך"</string>
<string name="bugreport_title" msgid="2667494803742548533">"שלח דיווח על באג"</string>
<string name="bugreport_message" msgid="398447048750350456">"פעולה זו תאסוף מידע על מצב המכשיר הנוכחי שלך על מנת לשלוח אותו כהודעת אימייל. היא תימשך זמן קצר מרגע פתיחת דיווח הבאג ועד לשליחת ההודעה בפועל. אנא המתן בסבלנות."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"דוח אינטראקטיבי"</string>
@@ -268,8 +270,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="RIGHT_SIDE">%2$s</xliff:g>, <xliff:g id="LEFT_SIDE">%1$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"מצב בטוח"</string>
<string name="android_system_label" msgid="6577375335728551336">"מערכת Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"עבור ל\'אישי\'"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"עבור ל\'עבודה\'"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"אנשי קשר"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"גישה אל אנשי הקשר"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"האפליקציה <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> תקבל הרשאת גישה לאנשי הקשר שלך"</string>
@@ -421,6 +425,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"מאפשר לאפליקציה לגשת לתכונות הטלפון של המכשיר. אישור זה מתיר לאפליקציה לגלות את מספר הטלפון ואת זיהויי המכשיר, האם שיחה פעילה ואת המספר המרוחק המחובר באמצעות שיחה."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"ניתוב שיחות דרך המערכת"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"מאפשרת לאפליקציה לנתב את השיחות דרך המערכת כדי לשפר את חוויית השיחה."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"גישה למספרי הטלפון"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"מתירה לאפליקציה גישה למספרי הטלפון במכשיר."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"מנע מהטאבלט לעבור למצב שינה"</string>
@@ -490,10 +498,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"הזזת את האצבע לאט מדי. נסה שוב."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"לא זוהתה"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"החומרה בשביל טביעת אצבע אינה זמינה."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"לא ניתן לאחסן טביעת אצבע. הסר טביעת אצבע קיימת."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"חלף הזמן הקצוב לטביעת אצבע. נסה שוב."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"פעולת טביעת האצבע בוטלה."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"יותר מדי ניסיונות. נסה שוב מאוחר יותר."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"יותר מדי ניסיונות. חיישן טביעות האצבע הושבת."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"נסה שוב."</string>
@@ -1029,6 +1040,12 @@
<string name="browse" msgid="1245903488306147205">"פתיחה"</string>
<string name="sms" msgid="4560537514610063430">"הודעה"</string>
<string name="add_contact" msgid="7867066569670597203">"הוספה"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"שטח האחסון אוזל"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"ייתכן שפונקציות מערכת מסוימות לא יפעלו"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"אין מספיק שטח אחסון עבור המערכת. ודא שיש לך שטח פנוי בגודל 250MB התחל שוב."</string>
@@ -1158,6 +1175,8 @@
<item quantity="one">יש רשת Wi-Fi פתוחה וזמינה</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"התחברות לרשת Wi‑Fi פתוחה"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"מתחבר לרשת Wi‑Fi פתוחה"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"מחובר לרשת Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"לא ניתן היה להתחבר לרשת Wi-Fi"</string>
@@ -1167,6 +1186,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"ה-Wi-Fi יופעל אוטומטית"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"כשתימצאו בקרבת רשת באיכות גבוהה ששמרתם"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"אל תפעיל שוב"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"רשת Wi‑Fi הופעלה אוטומטית"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"המיקום הנוכחי שלך הוא בקרבת הרשת השמורה: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"היכנס לרשת Wi-Fi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"היכנס לרשת"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1455,6 +1476,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> מעל למגבלה שצוינה."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"נתוני הרקע מוגבלים"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"הקש כדי להסיר את ההגבלה."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"שימוש נרחב בחבילת הגלישה"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"נפח השימוש שלך בחבילת הגלישה במהלך הימים האחרונים גדול מהרגיל. יש להקיש כדי להציג נתוני שימוש והגדרות."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"אישור אבטחה"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"אישור זה תקף."</string>
<string name="issued_to" msgid="454239480274921032">"הוקצה ל:"</string>
@@ -1751,7 +1774,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"עד <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"עד <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (ההתראה הבאה)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"עד שתכבה את \'נא לא להפריע\'"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"עד הכיבוי"</string>
<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>
@@ -1802,9 +1825,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"כל השפות"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"כל האזורים"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"חיפוש"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"להפעיל את \'מצב עבודה\'?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"פעולה זו תפעיל את הפרופיל העבודה שלך, כולל אפליקציות, סנכרון ברקע ותכונות קשורות"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"הפעל"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"יש לך הודעות חדשות"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"פתח את אפליקציית ה-SMS כדי להציג"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"ייתכן שחלק מהפונקציונליות תהיה מוגבלת"</string>
@@ -1877,6 +1906,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"לא ניתן היה לשחזר את קיצור הדרך מפני שהאפליקציה אינה תומכת בגיבוי ובשחזור"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"לא ניתן היה לשחזר את קיצור הדרך עקב חוסר התאמה בחתימה על האפליקציות"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"לא ניתן היה לשחזר את קיצור הדרך"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"מקש הקיצור מושבת"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> רוצה להציג חלקים מ-<xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"עריכה"</string>
</resources>
diff --git a/core/res/res/values-ka/strings.xml b/core/res/res/values-ka/strings.xml
index 45ed466..663aa06 100644
--- a/core/res/res/values-ka/strings.xml
+++ b/core/res/res/values-ka/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"ამ მოწყობილობას თქვენი ორგანიზაცია მართავს და მას ქსელის ტრაფიკის მონიტორინგი შეუძლია. შეეხეთ დამატებითი დეტალებისთვის."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"თქვენი მოწყობილობა წაიშლება"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"ადმინისტრატორის აპის გამოყენება ვერ მოხერხდება. თქვენი მოწყობილობა ახლა ამოიშლება.\n\nთუ შეკითხვები გაქვთ, დაუკავშირდით თქვენი ორგანიზაციის ადმინისტრატორს."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"ბეჭდვა გათიშულია <xliff:g id="OWNER_APP">%s</xliff:g>-ის მიერ."</string>
<string name="me" msgid="6545696007631404292">"მე"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"ტაბლეტის პარამეტრები"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"ტელევიზორის პარამეტრები"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"საგანგებო სამსახურები"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"ხარვეზის შესახებ ანგარიში"</string>
<string name="global_action_logout" msgid="935179188218826050">"სესიის დასრულება"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"ეკრანის ანაბეჭდი"</string>
<string name="bugreport_title" msgid="2667494803742548533">"შექმენით შეცდომის ანგარიში"</string>
<string name="bugreport_message" msgid="398447048750350456">"იგი შეაგროვებს ინფორმაციას თქვენი მოწყობილობის ამჟამინდელი მდგომარეობის შესახებ, რათა ის ელფოსტის შეტყობინების სახით გააგზავნოს. ხარვეზის ანგარიშის მომზადებასა და შეტყობინების გაგზავნას გარკვეული დრო სჭირდება. გთხოვთ, მოითმინოთ."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"ინტერაქტიული ანგარიში"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"უსაფრთხო რეჟიმი"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-ის სისტემა"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"პირად პროფილზე გადართვა"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"სამსახურის პროფილზე გადართვა"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"კონტაქტები"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"თქვენს კონტაქტებზე წვდომა"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g>-ისთვის</b> თქვენს კონტაქტებზე წვდომის ნების დართვა"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"აპს შეეძლება ჰქონდეს წვდომა მოწყობილობის სატელეფონო ფუნქციებზე. აპმა მსგავსი უფლებით შეძლებს დაადგინოს ტელეფონის ნომერი, მისი სერიული გამოცემა, აქტიური ზარი, დაკავშირებული ნომერი და მსგავსი."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"ზარების სისტემის მეშვეობით მარშრუტიზაცია"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"დარეკვის ხარისხის გაუმჯობესების მიზნით, აპს ზარების სისტემის მეშვეობით მარშრუტიზაციის საშუალებას აძლევს."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ტელეფონის ნომრების წაკითხვა"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"აპს მოწყობილობის ტელეფონის ნომრებზე წვდომის საშუალებას მისცემს."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"დაიცავით ტაბლეტი დაძინებისგან"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"თითის აღება მეტისმეტად ნელა მოხდა. გთხოვთ, სცადოთ ხელახლა."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"არ არის ამოცნობილი"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"თითის ანაბეჭდის აპარატურა არ არის ხელმისაწვდომი."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"თითის ანაბეჭდის შენახვა ვერ ხერხდება. გთხოვთ, ამოშალოთ არსებული თითის ანაბეჭდი."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"თითის ანაბეჭდის ლოდინის დრო ამოიწურა. სცადეთ ხელახლა."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"თითის ანაბეჭდის აღების ოპერაცია გაუქმდა."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"ძალიან ბევრი მცდელობა იყო. სცადეთ მოგვიანებით."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"დაფიქსირდა მეტისმეტად ბევრი მცდელობა. თითის ანაბეჭდის სენსორი გათიშულია."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"ხელახლა სცადეთ"</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"გახსნა"</string>
<string name="sms" msgid="4560537514610063430">"შეტყობინება"</string>
<string name="add_contact" msgid="7867066569670597203">"დამატება"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"თავისუფალი ადგილი იწურება"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"სისტემის ზოგიერთმა ფუნქციამ შესაძლოა არ იმუშავოს"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"სისტემისათვის საკმარისი საცავი არ არის. დარწმუნდით, რომ იქონიოთ სულ მცირე 250 მბაიტი თავისუფალი სივრცე და დაიწყეთ ხელახლა."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">ხელმისაწვდომია ღია Wi-Fi ქსელი</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"დაუკავშირდით ღია Wi‑Fi ქსელს"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"მიმდინარეობს ღია Wi‑Fi ქსელთან დაკავშირება"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Wi‑Fi ქსელთან დაკავშირება წარმატებით მოხერხდა"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Wi‑Fi ქსელთან დაკავშირება ვერ მოხერხდა"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi-Fi ავტომატურად ჩაირთვება"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"როცა შენახულ მაღალხარისხიან ქსელებთან ახლოს იმყოფებით"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"ხელახლა ნუ ჩართავ"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi ავტომატურად ჩაირთო"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"თქვენ შენახული ქსელის მახლობლად ხართ: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Wi-Fi ქსელთან დაკავშირება"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"ქსელში შესვლა"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"ლიმიტი გადაჭარბებულია <xliff:g id="SIZE">%s</xliff:g>-ით."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"მონაცემთა ფონური გადაცემა შეზღუდულია"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"შეეხეთ შეზღუდვის მოსახსნელად."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"მონაცემთა ინტენსიური მოხმარება"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"ბოლო რამდენიმე დღე თქვენ მიერ მონაცემთა მოხმარება აჭარბებდა ჩვეულებრივს. შეეხეთ მოხმარებისა და პარამეტრების სანახავად."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"უსაფრთხოების სერტიფიკატი"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"ეს სერტიფიკატი სწორია."</string>
<string name="issued_to" msgid="454239480274921032">"მიეცა:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>-მდე"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>-მდე (შემდეგი მაღვიძარა)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"სანამ გამორთავთ „არ შემაწუხოთ“ ფუნქციას"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"გამორთვამდე"</string>
<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>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"ყველა ენა"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"ყველა რეგიონი"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"ძიება"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"ჩაირთოს სამსახურის რეჟიმი?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"ეს ქმედება ჩართავს თქვენს სამსახურის პროფილს, მათ შორის, აპებს, ფონურ სინქრონიზაციას და სხვა დაკავშირებულ ფუნქციებს"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"ჩართვა"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"თქვენ ახალი შეტყობინებები გაქვთ"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"სანახავად, გახსენით SMS აპი"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"ზოგიერთი ფუნქცია შეიძლება შეიზღუდოს"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"მალსახმობის აღდგენა ვერ მოხერხდა, რადგან ამ აპის მიერ მხარდაუჭერელია სარეზერვო ასლით აღდგენა"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"მალსახმობის აღდგენა ვერ მოხერხდა აპის ხელმოწერის შეუსაბამობის გამო"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"მალსახმობის აღდგენა ვერ მოხერხდა"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"მალსახმობი გათიშულია"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g>-ს სურს, გაჩვენოთ <xliff:g id="APP_2">%2$s</xliff:g>-ის ფრაგმენტები"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"რედაქტირება"</string>
</resources>
diff --git a/core/res/res/values-kk/strings.xml b/core/res/res/values-kk/strings.xml
index 51c5147..a65286b 100644
--- a/core/res/res/values-kk/strings.xml
+++ b/core/res/res/values-kk/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Ұйымыңыз осы құрылғыны басқарады және желі трафигін бақылауы мүмкін. Мәліметтер алу үшін түртіңіз."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Құрылғыңыздағы деректер өшіріледі"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Әкімші қолданбасын пайдалану мүмкін емес. Қазір құрылғыдағы деректер өшіріледі.\n\nСұрақтарыңыз болса, ұйым әкімшісіне хабарласыңыз."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Басып шығаруды <xliff:g id="OWNER_APP">%s</xliff:g> өшірді."</string>
<string name="me" msgid="6545696007631404292">"Мен"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Планшет опциялары"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"ТД опциялары"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Төтенше жағдай"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Вирус туралы хабарлау"</string>
<string name="global_action_logout" msgid="935179188218826050">"Сеансты аяқтау"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Скриншот"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Қате туралы есеп құру"</string>
<string name="bugreport_message" msgid="398447048750350456">"Құрылғының қазіргі күйі туралы ақпаратты жинап, электрондық хабармен жібереді. Есеп әзір болғанша біраз уақыт кетеді, шыдай тұрыңыз."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Интерактивті есеп"</string>
@@ -262,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Қауіпсіз режим"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android жүйесі"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Жекеге ауысу"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Жұмысқа ауысу"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Жеке профильге ауысу"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"Жұмыс профиліне ауысу"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Контактілер"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"контактілерге кіру"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"\"<xliff:g id="APP_NAME">%1$s</xliff:g>\" қолданбасына контактілерге кіруге рұқсат беріңіз"</string>
@@ -415,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Қолданбаға құрылғыдағы телефон функцияларына кіру мүмкіндігін береді. Бұл рұқсат қолданбаға телефон нөмірі, құрылғы жеке анықтағышы, қоңырау белсенділігі және сол қоңырауға байланысты қашықтағы нөмірді анықтау мүмкіндігін береді."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"қоңырауларды жүйе арқылы бағыттау"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Қоңырау шалу тәжірибесін жақсарту үшін қолданба қоңырауларды жүйе арқылы бағыттай алады."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"телефон нөмірлерін оқу"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Қолданбаға құрылғының телефон нөмірлерін алуға мүмкіндік береді."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"планшетті ұйқыдан бөгеу"</string>
@@ -484,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Саусағыңызды тым баяу қозғалттыңыз. Әрекетті қайталап көріңіз."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Анықталмаған"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Саусақ ізі жабдығы қолжетімді емес."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Саусақ ізін сақтау мүмкін емес. Бар саусақ ізін жойыңыз."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Саусақ ізін күту уақыты бітті. Әрекетті қайталаңыз."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Саусақ ізі операциясынан бас тартылған."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Пайдаланушы саусақ ізі операциясынан бас тартты."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Талпыныстар тым көп. Кейінірек қайталап көріңіз."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Тым көп әрекет жасалды. Саусақ ізін оқу сканері өшірілді."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Әрекетті қайталаңыз."</string>
@@ -989,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"Ашу"</string>
<string name="sms" msgid="4560537514610063430">"Хабар"</string>
<string name="add_contact" msgid="7867066569670597203">"Енгізу"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Жадта орын азайып барады"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Жүйенің кейбір функциялары жұмыс істемеуі мүмкін"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Жүйе үшін жад жеткіліксіз. 250 МБ бос орын бар екенін тексеріп, қайта іске қосыңыз."</string>
@@ -1114,6 +1128,8 @@
<item quantity="one">Ашық Wi-Fi желісі қол жетімді</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Ашық Wi‑Fi желісіне қосылу"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Ашық Wi‑Fi желісіне қосылуда"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Wi‑Fi желісіне қосылды"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Wi‑Fi желісіне қосылмады"</string>
@@ -1123,6 +1139,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi автоматты түрде қосылады"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Сақталған жоғары сапалы желіге жақын болғанда"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Қайта қоспау"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi автоматты түрде қосылды"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Сақталған желінің маңайындасыз: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Wi-Fi желісіне кіру"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Желіге кіру"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1410,6 +1428,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"Анықталған уақтыттан <xliff:g id="SIZE">%s</xliff:g> асты."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Фондық деректер шектелген"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Шектеуді жою үшін түртіңіз."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Шамадан тыс деректер трафигі"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Соңғы бірнеше күнде деректер трафигі әдеттегіден көп. Оның пайдаланылуы мен параметрлерін көру үшін түртіңіз."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Қауіпсіздік сертификаты"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Бұл сертификат жарамды."</string>
<string name="issued_to" msgid="454239480274921032">"Кімге берілген:"</string>
@@ -1686,7 +1706,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> дейін"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> дейін (келесі дабыл)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"\"Мазаламау\" режимін өшіргенше"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Өшірілгенге дейін"</string>
<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>
@@ -1735,9 +1755,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Барлық тілдер"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Барлық аймақтар"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Іздеу"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Жұмыс режимін қосу керек пе?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Бұл жұмыс профилін, соның ішінде қолданбаларды, фондық синхрондауды және қатысты мүмкіндіктерді қосады"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"Жұмыс профилі қосылсын ба?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"Жұмыс қолданбалары, хабарландырулар, деректер және басқа да жұмыс профильдерінің мүмкіндіктері қосылады"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Қосу"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Сізде жаңа хабарлар бар"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Көру үшін SMS қолданбасын ашыңыз"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Кейбір функциялар істемеуі мүмкін"</string>
@@ -1808,6 +1832,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Қолданба сақтық көшірме жасау мен қалпына келтіруді қолдамайтындықтан, таңбаша қалпына келтірілмеді"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Қолтаңба сәйкес келмейтіндіктен, таңбаша қалпына келтірілмеді"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Таңбаша қалпына келтірілмеді"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Таңбаша өшірілген"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> қолданбасы <xliff:g id="APP_2">%2$s</xliff:g> қолданбасының үзінділерін көрсеткісі келеді"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Өзгерту"</string>
</resources>
diff --git a/core/res/res/values-km/strings.xml b/core/res/res/values-km/strings.xml
index c266416..bccd96d 100644
--- a/core/res/res/values-km/strings.xml
+++ b/core/res/res/values-km/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"ស្ថាប័នរបស់អ្នកគ្រប់គ្រងឧបករណ៍នេះ ហើយអាចនឹងតាមដានចរាចរណ៍បណ្តាញ។ ចុចដើម្បីទទួលបានព័ត៌មានលម្អិត។"</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"ឧបករណ៍របស់អ្នកនឹងត្រូវបានលុប"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"មិនអាចប្រើកម្មវិធីអ្នកគ្រប់គ្រងបានទេ។ ឧបករណ៍របស់អ្នកនឹងត្រូវបានលុបឥឡូវនេះ។\n\nប្រសិនបើអ្នកមានសំណួរ សូមទាក់ទងទៅអ្នកគ្រប់គ្រងស្ថាប័នរបស់អ្នក។"</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"ការបោះពុម្ពត្រូវបានបិទដោយ <xliff:g id="OWNER_APP">%s</xliff:g> ។"</string>
<string name="me" msgid="6545696007631404292">"ខ្ញុំ"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"ជម្រើសកុំព្យូទ័របន្ទះ"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"ជម្រើសទូរទស្សន៍"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"អាសន្ន"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"របាយការណ៍កំហុស"</string>
<string name="global_action_logout" msgid="935179188218826050">"បញ្ចប់សម័យ"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"រូបថតអេក្រង់"</string>
<string name="bugreport_title" msgid="2667494803742548533">"យករបាយការណ៍កំហុស"</string>
<string name="bugreport_message" msgid="398447048750350456">"វានឹងប្រមូលព័ត៌មានអំពីស្ថានភាពឧបករណ៍របស់អ្នក ដើម្បីផ្ញើជាសារអ៊ីមែល។ វានឹងចំណាយពេលតិចពីពេលចាប់ផ្ដើមរបាយការណ៍រហូតដល់ពេលវារួចរាល់ដើម្បីផ្ញើ សូមអត់ធ្មត់។"</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"របាយការណ៍អន្តរកម្ម"</string>
@@ -262,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"របៀបសុវត្ថិភាព"</string>
<string name="android_system_label" msgid="6577375335728551336">"ប្រព័ន្ធ Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"ប្តូរទៅផ្ទាល់ខ្លួន"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"ប្តូរទៅការងារ"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"ប្តូរទៅកម្រងព័ត៌មានផ្ទាល់ខ្លួន"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"ប្តូរទៅកម្រងព័ត៌មានការងារ"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"ទំនាក់ទំនង"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"ចូលប្រើទំនាក់ទំនងរបស់អ្នក"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"អនុញ្ញាតឲ្យ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ចូលប្រើទំនាក់ទំនងរបស់អ្នក"</string>
@@ -415,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"ឲ្យកម្មវិធីចូលដំណើរការលក្ខណៈទូរស័ព្ទនៃឧបករណ៍។ សិទ្ធិនេះឲ្យកម្មវិធីកំណត់លេខទូរស័ព្ទ និងលេខសម្គាល់ឧបករណ៍ ថាតើការហៅសកម្ម និងលេខពីចម្ងាយបានភ្ជាប់ដោយការហៅ។"</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"បញ្ជូនការហៅទូរសព្ទតាមរយៈប្រព័ន្ធ"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"អនុញ្ញាតឲ្យកម្មវិធីនេះបញ្ជូនការហៅទូរសព្ទរបស់វាតាមរយៈប្រព័ន្ធ ដើម្បីធ្វើឲ្យការហៅទូរសព្ទប្រសើរជាងមុន។"</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"អានលេខទូរសព្ទ"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"អនុញ្ញាតឲ្យកម្មវិធីនេះចូលប្រើប្រាស់លេខទូរសព្ទរបស់ឧបករណ៍នេះ។"</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ការពារកុំព្យូទ័របន្ទះមិនឲ្យដេក"</string>
@@ -484,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"ចលនាម្រាមដៃយឺតពេកហើយ។ សូមព្យាយាមម្តងទៀត។"</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"មិនអាចសម្គាល់បានទេ"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"ផ្នែករឹងស្នាមម្រាមដៃមិនមានទេ។"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"មិនអាចផ្ទុកស្នាមម្រាមដៃទេ។ សូមយកស្នាមម្រាមដៃដែលមានស្រាប់ចេញ។"</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"ការផ្តិតម្រាមដៃបានអស់ពេល។ សូមព្យាយាមម្តងទៀត។"</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"បានបោះបង់ប្រតិបត្តិការស្នាមម្រាមដៃ។"</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"ប្រតិបត្តិការស្នាមម្រាមដៃត្រូវបានបោះបង់ដោយអ្នកប្រើប្រាស់។"</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"ព្យាយាមចូលច្រើនពេកហើយ។ សូមព្យាយាមម្តងទៀតពេលក្រោយ។"</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"ព្យាយាមចូលច្រើនដងពេកហើយ។ ឧបករណ៍ចាប់ស្នាមម្រាមដៃត្រូវបានបិទ។"</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"ព្យាយាមម្ដងទៀត។"</string>
@@ -989,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"បើក"</string>
<string name="sms" msgid="4560537514610063430">"សារ"</string>
<string name="add_contact" msgid="7867066569670597203">"បញ្ចូល"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"អស់ទំហំផ្ទុក"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"មុខងារប្រព័ន្ធមួយចំនួនអាចមិនដំណើរការ"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"មិនមានទំហំផ្ទុកគ្រប់គ្រាន់សម្រាប់ប្រព័ន្ធ។ សូមប្រាកដថាអ្នកមានទំហំទំនេរ 250MB ហើយចាប់ផ្ដើមឡើងវិញ។"</string>
@@ -1116,6 +1130,8 @@
<item quantity="one">បើកបណ្តាញ Wi-Fi ដែលមាន</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"ភ្ជាប់ទៅបណ្តាញ Wi‑Fi ចំហ"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"កំពុងភ្ជាប់ទៅបណ្តាញ Wi‑Fi ចំហ"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"បានភ្ជាប់ទៅបណ្តាញ Wi‑Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"មិនអាចភ្ជាប់ទៅបណ្តាញ Wi‑Fi បានទេ"</string>
@@ -1125,6 +1141,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi នឹងបើកដោយស្វ័យប្រវត្តិ"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"នៅពេលដែលអ្នកនៅជិតបណ្តាញគុណភាពខ្ពស់ដែលបានរក្សាទុក"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"កុំបើកឡើងវិញ"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi បានបើកដោយស្វ័យប្រវត្តិ"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"អ្នកនៅជិតបណ្តាញដែលបានរក្សាទុក៖ <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"ចូលបណ្ដាញវ៉ាយហ្វាយ"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"ចូលទៅបណ្តាញ"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1411,6 +1429,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> លើដែនកំណត់បានបញ្ជាក់។"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"បានដាក់កម្រិតទិន្នន័យផ្ទៃខាងក្រោយ"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"ប៉ះដើម្បីយកការរឹតបន្តឹងចេញ"</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"ការប្រើទិន្នន័យច្រើន"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"ការប្រើទិន្នន័យរបស់អ្នកក្នុងរយៈពេលពីរបីថ្ងៃចុងក្រោយគឺច្រើនជាងធម្មតា។ សូមចុចដើម្បីមើលការប្រើប្រាស់ និងការកំណត់។"</string>
<string name="ssl_certificate" msgid="6510040486049237639">"វិញ្ញាបនបត្រសុវត្ថិភាព"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"វិញ្ញាបនបត្រនេះត្រឹមត្រូវ។"</string>
<string name="issued_to" msgid="454239480274921032">"បានចេញឲ្យ៖"</string>
@@ -1687,7 +1707,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"រហូតដល់ <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"រហូតដល់ <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (ម៉ោងរោទិ៍បន្ទាប់)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"រហូតទាល់តែអ្នកបិទ កុំរំខាន"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"រហូតទាល់តែអ្នកបិទ"</string>
<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>
@@ -1736,9 +1756,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"ភាសាទាំងអស់"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"តំបន់ទាំងអស់"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"ស្វែងរក"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"បើកមុខងារការងារ?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"វានឹងបើកកម្រងព័ត៌មានការងាររបស់អ្នក រួមទាំងកម្មវិធី សមកាលកម្មផ្ទៃខាងក្រោយ និងមុខងារដែលពាក់ព័ន្ធផងដែរ"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"បើកកម្រងព័ត៌មានការងារ?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"កម្មវិធីការងារ ការជូនដំណឹង ទិន្នន័យ និងមុខងារកម្រងព័ត៌មានការងារផ្សេងទៀតរបស់អ្នកនឹងត្រូវបានបើក"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"បើក"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"អ្នកមានសារថ្មី"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"បើកកម្មវិធីសារ SMS ដើម្បីមើល"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"លទ្ធភាពប្រើមុខងារមួយចំនួនអាចត្រូវបាកម្រិត"</string>
@@ -1809,6 +1833,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"មិនអាចស្តារផ្លូវកាត់បានទេ ដោយសារកម្មវិធីមិនស្គាល់ការបម្រុងទុក និងការស្តារ"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"មិនអាចស្តារផ្លូវកាត់បានទេ ដោយសារការស៊ីញ៉េកម្មវិធីមិនត្រូវគ្នា"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"មិនអាចស្តារផ្លូវកាត់បានទេ"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"ផ្លូវកាត់ត្រូវបានបិទ"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> ចង់បង្ហាញស្ថិតិប្រើប្រាស់របស់ <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"កែសម្រួល"</string>
</resources>
diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml
index b9539ea..ee690b5 100644
--- a/core/res/res/values-kn/strings.xml
+++ b/core/res/res/values-kn/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"ನಿಮ್ಮ ಸಂಸ್ಥೆಯು ಈ ಸಾಧನವನ್ನು ನಿರ್ವಹಿಸುತ್ತದೆ ಮತ್ತು ಅದು ನೆಟ್ವರ್ಕ್ ಟ್ರಾಫಿಕ್ ಮೇಲೆ ಗಮನವಿರಿಸಬಹುದು. ವಿವರಗಳಿಗಾಗಿ ಟ್ಯಾಪ್ ಮಾಡಿ."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"ನಿಮ್ಮ ಸಾಧನವನ್ನು ಅಳಿಸಲಾಗುತ್ತದೆ"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"ನಿರ್ವಹಣೆ ಅಪ್ಲಿಕೇಶನ್ ಬಳಸಲು ಸಾಧ್ಯವಿಲ್ಲ. ನಿಮ್ಮ ಸಾಧನವನ್ನು ಇದೀಗ ಅಳಿಸಲಾಗುತ್ತದೆ.\n\nನಿಮ್ಮಲ್ಲಿ ಪ್ರಶ್ನೆಗಳಿದ್ದರೆ, ನಿಮ್ಮ ಸಂಸ್ಥೆಯ ನಿರ್ವಾಹಕರನ್ನು ಸಂಪರ್ಕಿಸಿ."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> ಮೂಲಕ ಪ್ರಿಂಟಿಂಗ್ ಅನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ."</string>
<string name="me" msgid="6545696007631404292">"ನಾನು"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"ಟ್ಯಾಬ್ಲೆಟ್ ಆಯ್ಕೆಗಳು"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"ಟಿವಿ ಆಯ್ಕೆಗಳು"</string>
@@ -217,8 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"ತುರ್ತು"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"ದೋಷದ ವರದಿ"</string>
<string name="global_action_logout" msgid="935179188218826050">"ಸೆಷನ್ ಅಂತ್ಯಗೊಳಿಸಿ"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"ಸ್ಕ್ರೀನ್ಶಾಟ್"</string>
<string name="bugreport_title" msgid="2667494803742548533">"ದೋಷ ವರದಿ ರಚಿಸಿ"</string>
<string name="bugreport_message" msgid="398447048750350456">"ನಿಮ್ಮ ಸಾಧನದ ಪ್ರಸ್ತುತ ಸ್ಥಿತಿಯ ಕುರಿತು ಮಾಹಿತಿಯನ್ನು ಸಂಗ್ರಹಿಸಿಕೊಳ್ಳುವುದರ ಜೊತೆ ಇ-ಮೇಲ್ ರೂಪದಲ್ಲಿ ನಿಮಗೆ ರವಾನಿಸುತ್ತದೆ. ಇದು ದೋಷ ವರದಿಯನ್ನು ಪ್ರಾರಂಭಿಸಿದ ಸಮಯದಿಂದ ಅದನ್ನು ಕಳುಹಿಸುವವರೆಗೆ ಸ್ವಲ್ಪ ಸಮಯವನ್ನು ತೆಗೆದುಕೊಳ್ಳುತ್ತದೆ; ದಯವಿಟ್ಟು ತಾಳ್ಮೆಯಿಂದಿರಿ."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"ಪರಸ್ಪರ ಸಂವಹನ ವರದಿ"</string>
@@ -264,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"ಸುರಕ್ಷಿತ ಮೋಡ್"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android ಸಿಸ್ಟಂ"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"ವೈಯಕ್ತಿಕಗೆ ಬದಲಿಸಿ"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"ಕೆಲಸಕ್ಕೆ ಬದಲಿಸು"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"ಸಂಪರ್ಕಗಳು"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"ನಿಮ್ಮ ಸಂಪರ್ಕಗಳನ್ನು ಪ್ರವೇಶಿಸಲು"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"ನಿಮ್ಮ ಸಂಪರ್ಕಗಳನ್ನು ಪ್ರವೇಶಿಸಲು <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ಗೆ ಅನುಮತಿಸಿ"</string>
@@ -417,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"ಸಾಧನದ ಫೋನ್ ವೈಶಿಷ್ಟ್ಯಗಳನ್ನು ಪ್ರವೇಶಿಸಲು ಅಪ್ಲಿಕೇಶನ್ಗೆ ಅವಕಾಶ ಮಾಡಿಕೊಡುತ್ತದೆ. ಈ ಅನುಮತಿಯು ಫೋನ್ ಸಂಖ್ಯೆ ಮತ್ತು ಸಾಧನದ ID ಗಳನ್ನು ನಿರ್ಧರಿಸಲು, ಕರೆಯು ಸಕ್ರಿಯವಾಗಿದೆಯೇ ಮತ್ತು ಕರೆಯ ಮೂಲಕ ರಿಮೋಟ್ ಸಂಖ್ಯೆಯು ಸಂಪರ್ಕಗೊಂಡಿವೆಯೇ ಎಂಬುದನ್ನೂ ನಿರ್ಧರಿಸಲು ಅಪ್ಲಿಕೇಶನ್ಗೆ ಅವಕಾಶ ಕಲ್ಪಿಸುತ್ತದೆ."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"ಕರೆಗಳನ್ನು ಸಿಸ್ಟಂ ಮೂಲಕ ರವಾನಿಸಿ"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"ಕರೆಯ ಅನುಭವವನ್ನು ಸುಧಾರಿಸಲು ಅಪ್ಲಿಕೇಶನ್ನ ಕರೆಗಳನ್ನು ಸಿಸ್ಟಂ ಮೂಲಕ ರವಾನಿಸಲು ಅನುಮತಿಸುತ್ತದೆ."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ಫೋನ್ ಸಂಖ್ಯೆಗಳನ್ನು ಓದಿ"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"ಸಾಧನದ ಫೋನ್ ಸಂಖ್ಯೆಗಳಿಗೆ ಪ್ರವೇಶ ಪಡೆಯಲು ಅಪ್ಲಿಕೇಶನ್ಗೆ ಅನುಮತಿ ನೀಡುತ್ತದೆ."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ಟ್ಯಾಬ್ಲೆಟ್ ನಿದ್ರಾವಸ್ಥೆಯನ್ನು ತಡೆಯಿರಿ"</string>
@@ -486,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"ಬೆರಳನ್ನು ತುಂಬಾ ನಿಧಾನವಾಗಿ ಸರಿಸಲಾಗಿದೆ. ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"ಗುರುತಿಸಲಾಗಿಲ್ಲ"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"ಬೆರಳಚ್ಚು ಹಾರ್ಡ್ವೇರ್ ಲಭ್ಯವಿಲ್ಲ."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"ಬೆರಳಚ್ಚು ಸಂಗ್ರಹಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ. ಅಸ್ತಿತ್ವದಲ್ಲಿರುವ ಬೆರಳಚ್ಚು ತೆಗೆದುಹಾಕಿ."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"ಬೆರಳಚ್ಚು ಅವಧಿ ಮೀರಿದೆ. ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"ಬೆರಳಚ್ಚು ಕಾರ್ಯಾಚರಣೆಯನ್ನು ರದ್ದುಮಾಡಲಾಗಿದೆ."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"ಹಲವಾರು ಪ್ರಯತ್ನಗಳು. ನಂತರ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"ಹಲವು ಬಾರಿ ಪ್ರಯತ್ನಿಸಿದ್ದೀರಿ. ಫಿಂಗರ್ ಫ್ರಿಂಟ್ ಸೆನ್ಸಾರ್ ನಿಷ್ಕ್ರಿಯಗೊಂಡಿದೆ."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."</string>
@@ -991,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"ತೆರೆ"</string>
<string name="sms" msgid="4560537514610063430">"ಸಂದೇಶ"</string>
<string name="add_contact" msgid="7867066569670597203">"ಸೇರಿಸಿ"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"ಸಂಗ್ರಹಣೆ ಸ್ಥಳವು ತುಂಬಿದೆ"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"ಕೆಲವು ಸಿಸ್ಟಂ ಕಾರ್ಯವಿಧಾನಗಳು ಕಾರ್ಯನಿರ್ವಹಿಸದೇ ಇರಬಹುದು"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"ಸಿಸ್ಟಂನಲ್ಲಿ ಸಾಕಷ್ಟು ಸಂಗ್ರಹಣೆಯಿಲ್ಲ. ನೀವು 250MB ನಷ್ಟು ಖಾಲಿ ಸ್ಥಳವನ್ನು ಹೊಂದಿರುವಿರಾ ಎಂಬುದನ್ನು ಖಚಿತಪಡಿಸಿಕೊಳ್ಳಿ ಹಾಗೂ ಮರುಪ್ರಾರಂಭಿಸಿ."</string>
@@ -1116,6 +1131,8 @@
<item quantity="other">ಮುಕ್ತ ವೈ-ಫೈ ನೆಟ್ವರ್ಕ್ಗಳು ಲಭ್ಯವಿವೆ</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"ಮುಕ್ತ ವೈ-ಫೈ ನೆಟ್ವರ್ಕ್ಗೆ ಸಂಪರ್ಕಿಸಿ"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"ಮುಕ್ತ ವೈ-ಫೈ ನೆಟ್ವರ್ಕ್ಗೆ ಸಂಪರ್ಕಪಡಿಸಲಾಗುತ್ತಿದೆ"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"ವೈ-ಫೈ ನೆಟ್ವರ್ಕ್ಗೆ ಸಂಪರ್ಕಪಡಿಸಲಾಗಿದೆ"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"ವೈ-ಫೈ ನೆಟ್ವರ್ಕ್ಗೆ ಸಂಪರ್ಕಿಸಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ"</string>
@@ -1125,10 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"ವೈ‑ಫೈ ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಆನ್ ಆಗುತ್ತದೆ"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"ನೀವು ಉಳಿಸಿದ ಅಧಿಕ ಗುಣಮಟ್ಟದ ನೆಟ್ವರ್ಕ್ ಸಮೀಪದಲ್ಲಿದ್ದಾಗ"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"ಮತ್ತೆ ಆನ್ ಮಾಡಲು ಹಿಂತಿರುಗಬೇಡಿ"</string>
- <!-- no translation found for wifi_wakeup_enabled_title (6534603733173085309) -->
- <skip />
- <!-- no translation found for wifi_wakeup_enabled_content (189330154407990583) -->
- <skip />
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"ವೈ-ಫೈ ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಆನ್ ಆಗಿದೆ"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"ನೀವು ಉಳಿಸಿದ ನೆಟ್ವರ್ಕ್ನ ಸಮೀಪವಿರುವಿರಿ: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"ವೈ-ಫೈ ನೆಟ್ವರ್ಕ್ಗೆ ಸೈನ್ ಇನ್ ಮಾಡಿ"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"ನೆಟ್ವರ್ಕ್ಗೆ ಸೈನ್ ಇನ್ ಮಾಡಿ"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1416,6 +1431,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> ನಿರ್ದಿಷ್ಟಪಡಿಸಿದ ಮಿತಿ ಮೀರಿದೆ."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"ಹಿನ್ನೆಲೆ ಡೇಟಾವನ್ನು ನಿರ್ಬಂಧಿಸಲಾಗಿದೆ"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"ನಿರ್ಬಂಧವನ್ನು ತೆಗೆದುಹಾಕಲು ಟ್ಯಾಪ್ ಮಾಡಿ."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"ಹೆಚ್ಚು ಡೇಟಾ ಬಳಕೆ"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"ಕಳೆದ ಕೆಲವು ದಿನಗಳಿಂದ ನಿಮ್ಮ ಡೇಟಾ ಬಳಕೆಯು ಸಾಮಾನ್ಯಕ್ಕಿಂತ ಹೆಚ್ಚಾಗಿದೆ. ಬಳಕೆ ಮತ್ತು ಸೆಟ್ಟಿಂಗ್ಗಳನ್ನು ವೀಕ್ಷಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"ಭದ್ರತಾ ಪ್ರಮಾಣಪತ್ರ"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"ಈ ಪ್ರಮಾಣಪತ್ರವು ಮಾನ್ಯವಾಗಿದೆ."</string>
<string name="issued_to" msgid="454239480274921032">"ಇವರಿಗೆ ನೀಡಲಾಗಿದೆ:"</string>
@@ -1692,7 +1709,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> ವರೆಗೆ"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> ವರೆಗೆ (ಮುಂದಿನ ಅಲಾರಮ್)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"ನೀವು ಆಫ್ ಮಾಡುವವರೆಗೂ ಅಡಚಣೆ ಮಾಡಬೇಡಿ"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"ನೀವು ಆಫ್ ಮಾಡುವವರೆಗೆ"</string>
<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>
@@ -1741,9 +1758,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"ಎಲ್ಲಾ ಭಾಷೆಗಳು"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"ಎಲ್ಲಾ ಪ್ರದೇಶಗಳು"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"ಹುಡುಕಿ"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"ಉದ್ಯೋಗ ಮೋಡ್ ಆನ್ ಮಾಡುವುದೇ?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"ಇದು ನಿಮ್ಮ ಉದ್ಯೋಗ ಪ್ರೊಫೈಲ್ ಜೊತೆಗೆ ಅಪ್ಲಿಕೇಶನ್ಗಳು, ಹಿನ್ನೆಲೆ ಸಿಂಕ್ ಮತ್ತು ಸಂಬಂಧಿತ ವೈಶಿಷ್ಟ್ಯಗಳನ್ನು ಆನ್ ಮಾಡುತ್ತದೆ"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"ಆನ್ ಮಾಡಿ"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"ನೀವು ಹೊಸ ಸಂದೇಶಗಳನ್ನು ಹೊಂದಿರುವಿರಿ"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"ವೀಕ್ಷಿಸಲು SMS ಅಪ್ಲಿಕೇಶನ್ ತೆರೆಯಿರಿ"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"ಕೆಲವು ಕಾರ್ಯನಿರ್ವಹಣೆಗಳು ಸೀಮಿತವಾಗಿರಬಹುದು"</string>
@@ -1815,10 +1838,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"ಅಪ್ಲಿಕೇಶನ್ ಸಹಿ ಹೊಂದಿಕೆಯಾಗದ ಕಾರಣದಿಂದ ಶಾರ್ಟ್ಕಟ್ ಅನ್ನು ಪುನಃಸ್ಥಾಪಿಸಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"ಶಾರ್ಟ್ಕಟ್ ಅನ್ನು ಪುನಃ ಸ್ಥಾಪನೆ ಮಾಡಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"ಶಾರ್ಟ್ಕಟ್ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ"</string>
- <!-- no translation found for harmful_app_warning_uninstall (3846265696369136266) -->
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
- <!-- no translation found for harmful_app_warning_launch_anyway (5784428382367400530) -->
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
<skip />
- <!-- no translation found for harmful_app_warning_title (2229996292333310435) -->
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
<skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_2">%2$s</xliff:g> ಸ್ಲೈಸ್ಗಳನ್ನು <xliff:g id="APP_0">%1$s</xliff:g> ತೋರಿಸಲು ಬಯಸಿದೆ"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"ಎಡಿಟ್"</string>
</resources>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 221a233..b3a5ba6 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"조직에서 이 기기를 관리하며 네트워크 트래픽을 모니터링할 수도 있습니다. 자세한 내용을 보려면 탭하세요."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"기기가 삭제됩니다."</string>
<string name="factory_reset_message" msgid="7972496262232832457">"관리자 앱을 사용할 수 없습니다. 곧 기기가 삭제됩니다.\n\n궁금한 점이 있으면 조직의 관리자에게 문의하세요."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g>에 의해 사용 중지되었습니다."</string>
<string name="me" msgid="6545696007631404292">"나"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"태블릿 옵션"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV 옵션"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"긴급 전화"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"버그 신고"</string>
<string name="global_action_logout" msgid="935179188218826050">"세션 끝내기"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"스크린샷"</string>
<string name="bugreport_title" msgid="2667494803742548533">"버그 신고"</string>
<string name="bugreport_message" msgid="398447048750350456">"현재 기기 상태에 대한 정보를 수집하여 이메일 메시지로 전송합니다. 버그 신고를 시작하여 전송할 준비가 되려면 약간 시간이 걸립니다."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"대화형 보고서"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"안전 모드"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android 시스템"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"개인으로 전환"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"직장으로 전환"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"주소록"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"주소록에 액세스"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>에서 내 연락처를 액세스하도록 허용합니다."</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"앱이 기기의 휴대전화 기능에 접근할 수 있도록 허용합니다. 이 권한을 사용하면 앱이 전화번호 및 기기의 ID, 활성 통화인지 여부, 통화가 연결된 원격 번호 등을 확인할 수 있습니다."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"시스템을 통해 통화 연결"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"통화 환경을 개선하기 위해 앱이 시스템을 통해 통화를 연결하도록 허용합니다."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"전화번호 읽기"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"앱에서 기기의 전화번호에 액세스하도록 허용합니다."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"태블릿이 절전 모드로 전환되지 않도록 설정"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"손가락을 너무 느리게 움직였습니다. 다시 시도해 주세요."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"인식할 수 없습니다."</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"지문 인식 하드웨어를 사용할 수 없습니다."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"지문을 저장할 수 없습니다. 기존 지문을 삭제하세요."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"지문 인식 시간이 초과되었습니다. 다시 시도하세요."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"지문 인식 작업이 취소되었습니다."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"시도 횟수가 너무 많습니다. 나중에 다시 시도하세요."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"시도 횟수가 너무 많습니다. 지문 센서가 사용 중지되었습니다."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"다시 시도해 보세요."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"열기"</string>
<string name="sms" msgid="4560537514610063430">"메시지"</string>
<string name="add_contact" msgid="7867066569670597203">"추가"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"저장 공간이 부족함"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"일부 시스템 기능이 작동하지 않을 수 있습니다."</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"시스템의 저장 공간이 부족합니다. 250MB의 여유 공간이 확보한 후 다시 시작하세요."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">개방형 Wi-Fi 네트워크 사용 가능</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"공개 Wi‑Fi 네트워크에 연결"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"공개 Wi‑Fi 네트워크에 연결 중"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Wi‑Fi 네트워크에 연결됨"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Wi‑Fi 네트워크에 연결할 수 없음"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi가 자동으로 사용 설정됨"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"저장된 고품질 네트워크가 가까이 있는 경우"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"다시 사용 설정하지 않음"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi가 자동으로 사용 설정됨"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"주변에 저장된 네트워크(<xliff:g id="NETWORK_SSID">%1$s</xliff:g>)가 있습니다"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Wi-Fi 네트워크에 로그인"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"네트워크에 로그인"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> - 지정된 한도 초과"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"백그라운드 데이터 사용이 제한됨"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"제한을 삭제하려면 탭하세요."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"데이터 사용량 많음"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"지난 며칠 동안의 데이터 사용량이 평소보다 많습니다. 사용량 및 설정을 보려면 탭하세요."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"보안 인증서"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"유효한 인증서입니다."</string>
<string name="issued_to" msgid="454239480274921032">"발급 대상:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>까지"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>(다음 알람)까지"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"알림 일시중지 기능을 사용 중지할 때까지"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"사용 중지할 때까지"</string>
<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>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"모든 언어"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"모든 지역"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"검색"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"작업 모드를 사용 설정하시겠습니까?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"앱, 백그라운드 동기화 및 관련 기능을 포함한 직장 프로필이 사용 설정됩니다."</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"사용 설정"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"새 메시지 있음"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"SMS 앱을 열고 확인"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"일부 기능이 제한될 수 있습니다."</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"앱이 백업 및 복원을 지원하지 않으므로 바로가기를 복원할 수 없습니다"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"앱 서명이 일치하지 않아 바로가기를 복원할 수 없습니다"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"바로가기를 복원할 수 없습니다"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"바로가기가 사용 중지됨"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g>에서 <xliff:g id="APP_2">%2$s</xliff:g>의 슬라이스를 표시하려고 합니다"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"수정"</string>
</resources>
diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml
index 1bce491..6b4be9b 100644
--- a/core/res/res/values-ky/strings.xml
+++ b/core/res/res/values-ky/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Ишканаңыз бул түзмөктү башкарат жана тармак трафигин көзөмөлдөшү мүмкүн. Чоо-жайын көрүү үчүн таптап коюңуз."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Түзмөгүңүз тазаланат"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Түзмөктү башкаруучу колдонмо жараксыз. Түзмөгүңүз азыр тазаланат.\n\nСуроолоруңуз болсо, ишканаңыздын администраторуна кайрылыңыз."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Басып чыгаруу <xliff:g id="OWNER_APP">%s</xliff:g> тарабынан өчүрүлдү."</string>
<string name="me" msgid="6545696007631404292">"Мен"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Планшет мүмкүнчүлүктөрү"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Сыналгы параметрлери"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Тез жардам"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Ката тууралуу билдирүү"</string>
<string name="global_action_logout" msgid="935179188218826050">"Сеансты бүтүрүү"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Скриншот"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Ката тууралуу билдирүү түзүү"</string>
<string name="bugreport_message" msgid="398447048750350456">"Ушуну менен түзмөгүңүздүн учурдагы абалы тууралуу маалымат топтолуп, электрондук почта аркылуу жөнөтүлөт. Отчет даяр болгуча бир аз күтө туруңуз."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Интерактивдүү кабар"</string>
@@ -262,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Коопсуз режим"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android тутуму"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Жеке профилге которулуу"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Жумуш профилине которулуу"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Жеке профилге которулуу"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"Жумуш профилине которулуу"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Байланыштар"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"байланыштарыңызды көрүүгө"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> колдонмосуна байланыштарыңызды пайдалануу мүмкүнчүлүгүн бериңиз"</string>
@@ -415,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Колдонмого түзмөктүн чалуу мүмкүнчүлүктөрүнө жетки алуу уруксатын берет. Бул уруксат колдонмого, телефондун номурун, түзмөктүн ID-син, чалуунун абалын жана байланышта чыккан номурду аныктоого жол берет."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"чалууларды тутум аркылуу өткөрүү"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Чалуунун сапатын жакшыртуу максатында колдонмого чалууларын тутум аркылуу өткөрүүгө уруксат берет."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"телефон номерлерин окуу"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Колдонмого түзмөктүн телефон номерлерин окуу мүмкүнчүлүгү берилет."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"планшетти уктатпай сактоо"</string>
@@ -484,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Манжа өтө жай жылды. Кайра аракет кылыңыз."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Таанылган жок"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Манжа изинин аппараттык камсыздоосу жеткиликтүү эмес."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Манжа изин сактоо мүмкүн эмес. Учурдагы манжа изин алып салыңыз."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Манжа изин күтүү мөөнөтү бүттү. Кайра аракет кылыңыз."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Манжа изи иш-аракети жокко чыгарылды."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Манжа изи менен аныктыгын текшерүүнү колдонуучу жокко чыгарды."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Аракеттер өтө көп болду. Кийинчерээк кайра аракет кылыңыз."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Өтө көп жолу аракет жасадыңыз. Манжа изинин сенсору өчүрүлдү."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Кайра бир аракеттениңиз."</string>
@@ -989,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"Ачуу"</string>
<string name="sms" msgid="4560537514610063430">"Билдирүү"</string>
<string name="add_contact" msgid="7867066569670597203">"Кошуу"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Сактагычта орун калбай баратат"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Системанын кээ бир функциялары иштебеши мүмкүн"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Тутумда сактагыч жетишсиз. 250МБ бош орун бар экенин текшерип туруп, өчүрүп күйгүзүңүз."</string>
@@ -1114,6 +1128,8 @@
<item quantity="one">Ачык Wi-Fi тармагы жеткиликтүү</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Ачык Wi‑Fi тармагына туташуу"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Ачык Wi‑Fi тармагына туташууда"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Ачык Wi‑Fi тармагына туташты"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Wi-Fi тармагына туташпай калды"</string>
@@ -1123,6 +1139,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi автоматтык түрдө күйгүзүлөт"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Байланыш сигналы жакшы болгон тармактарга жакындаганда"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Өзү кайра күйбөйт"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi автоматтык түрдө күйгүзүлдү"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Сакталган тармактын жанындасыз: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Wi-Fi түйүнүнө кирүү"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Тармакка кирүү"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1411,6 +1429,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"Орнотулган чектөөдөн <xliff:g id="SIZE">%s</xliff:g> ашты."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Фондук трафик чектелген"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Чектөөнү алыш үчүн таптаңыз."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Трафик көп колдонулду"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Акыркы бир нече күндүн ичинде трафикти адаттагыдан көп колдондуңуз. Трафиктин колдонулушун жана жөндөөлөрүн көрүү үчүн таптаңыз."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Коопсуздук тастыктамасы"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Бул тастыктама жарактуу."</string>
<string name="issued_to" msgid="454239480274921032">"Берилди:"</string>
@@ -1687,7 +1707,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> чейин"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> чейин (кийинки ойготкуч)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"\"Тынчымды алба\" режими өчүрүлгөнгө чейин"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Бул функция өчүрүлгөнгө чейин"</string>
<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>
@@ -1727,8 +1747,8 @@
<string name="default_notification_channel_label" msgid="5929663562028088222">"Категорияларга бөлүнгөн эмес"</string>
<string name="importance_from_user" msgid="7318955817386549931">"Бул эскертмелердин маанилүүлүгүн белгиледиңиз."</string>
<string name="importance_from_person" msgid="9160133597262938296">"Булар сиз үчүн маанилүү адамдар."</string>
- <string name="user_creation_account_exists" msgid="1942606193570143289">"<xliff:g id="APP">%1$s</xliff:g> колдонмосу <xliff:g id="ACCOUNT">%2$s</xliff:g> каттоо эсеби менен жаңы колдонуучу түзө берсинби ?"</string>
- <string name="user_creation_adding" msgid="4482658054622099197">"<xliff:g id="APP">%1$s</xliff:g> колдонмосу <xliff:g id="ACCOUNT">%2$s</xliff:g> каттоо эсеби менен жаңы колдонуучу түзө берсинби (мындай каттоо эсеби бар колдонуучу мурунтан эле бар) ?"</string>
+ <string name="user_creation_account_exists" msgid="1942606193570143289">"<xliff:g id="APP">%1$s</xliff:g> колдонмосу <xliff:g id="ACCOUNT">%2$s</xliff:g> аккаунту менен жаңы колдонуучу түзө берсинби?"</string>
+ <string name="user_creation_adding" msgid="4482658054622099197">"<xliff:g id="APP">%1$s</xliff:g> колдонмосуна <xliff:g id="ACCOUNT">%2$s</xliff:g> аккаунту үчүн жаңы колдонуучу түзгөнгө уруксат бересизби (мындай аккаунту бар колдонуучу мурунтан эле бар)?"</string>
<string name="language_selection_title" msgid="2680677278159281088">"Тил кошуңуз"</string>
<string name="country_selection_title" msgid="2954859441620215513">"Чөлкөмдүк жөндөөлөр"</string>
<string name="search_language_hint" msgid="7042102592055108574">"Тилди киргизиңиз"</string>
@@ -1736,9 +1756,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Бардык тилдер"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Бардык аймактар"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Издөө"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Жумуш режими иштетилсинби?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Ушуну менен жумуш профилиңиз, ошондой эле колдонмолор, фондо шайкештирүү жана ага байланыштуу функциялар иштетилет."</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"Жумуш профили күйгүзүлсүнбү?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"Жумуш колдонмолоруңуз, эскертмелериңиз, дайындарыңыз жана жумуш профилинин башка функциялары өчүрүлөт"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Күйгүзүү"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Сизге жаңы билдирүүлөр келди"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Көрүү үчүн SMS колдонмосун ачыңыз"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Айрым функциялар чектлши мүмкн"</string>
@@ -1809,6 +1833,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Колдонмо камдык көчүрмөнү сактоо жана калыбына келтирүү функцияларын колдобогондуктан кыска жол калыбына келтирилбей койду"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Колдонмонун колтамгасы дал келбегендиктен кыска жол калыбына келтирилбей койду"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Кыска жол калыбына келтирилбей койду"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Кыска жол өчүрүлгөн"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> колдонмосу <xliff:g id="APP_2">%2$s</xliff:g> үлгүлөрүн көрсөткөнү жатат"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Түзөтүү"</string>
</resources>
diff --git a/core/res/res/values-lo/strings.xml b/core/res/res/values-lo/strings.xml
index 9f7a28f..088d44f 100644
--- a/core/res/res/values-lo/strings.xml
+++ b/core/res/res/values-lo/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"ອົງກອນຂອງທ່ານຈັດການອຸປະກອນນີ້ ແລະ ອາດກວດສອບທຣາບຟິກເຄືອຂ່າຍນຳ. ແຕະເພື່ອເບິ່ງລາຍລະອຽດ."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"ອຸປະກອນຂອງທ່ານຈະຖືກລຶບ"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"ບໍ່ສາມາດໃຊ້ແອັບຜູ້ເບິ່ງແຍງລະບົບໄດ້. ອຸປະກອນຂອງທ່ານຈະຖືກລຶບຂໍ້ມູນໃນຕອນນີ້.\n\nຫາກທ່ານມີຄຳຖາມ, ໃຫ້ຕິດຕໍ່ຜູ້ເບິ່ງແຍງລະບົບອົງກອນຂອງທ່ານ."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"ການພິມຖືກປິດໄວ້ໂດຍ <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"ຂ້າພະເຈົ້າ"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"ໂຕເລືອກແທັບເລັດ"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"ທາງເລືອກໂທລະພາບ"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"ສຸກເສີນ"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"ລາຍງານຂໍ້ຜິດພາດ"</string>
<string name="global_action_logout" msgid="935179188218826050">"ສິ້ນສຸດເຊດຊັນ"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"ພາບໜ້າຈໍ"</string>
<string name="bugreport_title" msgid="2667494803742548533">"ໃຊ້ລາຍງານຂໍ້ບົກພ່ອງ"</string>
<string name="bugreport_message" msgid="398447048750350456">"ນີ້ຈະເປັນການເກັບກຳຂໍ້ມູນກ່ຽວກັບ ສະຖານະປັດຈຸບັນຂອງອຸປະກອນທ່ານ ເພື່ອສົ່ງເປັນຂໍ້ຄວາມທາງອີເມວ. ມັນຈະໃຊ້ເວລາໜ້ອຍນຶ່ງ ໃນການເລີ່ມຕົ້ນການລາຍງານຂໍ້ຜິດພາດ ຈົນກວ່າຈະພ້ອມທີ່ຈະສົ່ງໄດ້, ກະລຸນາລໍຖ້າ."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"ລາຍງານແບບໂຕ້ຕອບ"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Safe mode"</string>
<string name="android_system_label" msgid="6577375335728551336">"ລະບົບ Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"ສະລັບໄປໂປຣໄຟລ໌ສ່ວນຕົວ"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"ສະລັບໄປໂປຣໄຟລ໌ວຽ."</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"ລາຍຊື່"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"ເຂົ້າຫາລາຍຊື່ຂອງທ່ານ"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"ອະນຸຍາດ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ໃຫ້ເຂົ້າເຖິງລາຍຊື່ຜູ້ຕິດຕໍ່ຂອງທ່ານ"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"ອະນຸຍາດໃຫ້ແອັບຯ ເຂົ້າເຖິງຄວາມສາມາດການໂທລະສັບຂອງອຸປະກອນ. ການກຳນົດສິດນີ້ເຮັດໃຫ້ແອັບຯສາມາດກວດສອບເບີໂທລະສັບ ແລະ ID ຂອງອຸປະກອນ, ບໍ່ວ່າການໂທຈະຍັງດຳເນີນຢູ່ ແລະເບີປາຍທາງເຊື່ອມຕໍ່ຢູ່ຫຼືບໍ່ກໍຕາມ."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"route calls through the system"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Allows the app to route its calls through the system in order to improve the calling experience."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ອ່ານເບີໂທລະສັບ"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"ອະນຸຍາດໃຫ້ແອັບເຂົ້າເຖິງເບີໂທລະສັບຂອງອຸປະກອນໄດ້."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ຂັດຂວາງບໍ່ໃຫ້ປິດໜ້າຈໍແທັບເລັດ"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"ຍ້າຍນີ້ວມືໄປຊ້າເກີນໄປ. ກະລຸນາລອງໃໝ່ອີກ."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"ບໍ່ຈົດຈຳໄດ້"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"ບໍ່ມີຮາດແວລາຍນີ້ວມືໃຫ້ຢູ່."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"ບໍ່ສາມາດເກັບຮັກສາລາຍນີ້ວມືໄວ້ໄດ້. ກະລຸນາເອົາລາຍນີ້ວມືທີ່ມີຢູ່ອອກໄປ."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"ເວລາລາຍນີ້ວມືບໍ່ເຂົ້າເຖິງໄດ້. ລອງໃໝ່ອີກ."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"ຍົກເລີກການດຳເນີນການລາຍນີ້ວມືແລ້ວ."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"ມີຄວາມພະຍາຍາມຫຼາຍຄັ້ງເກີນໄປ. ລອງໃໝ່ພາຍຫຼັງ."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"ພະຍາຍາມຫຼາຍເທື່ອເກີນໄປ. ລະບົບປິດການເຮັດວຽກຂອງເຊັນເຊີລາຍນິ້ວມືແລ້ວ."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"ລອງໃໝ່ອີກຄັ້ງ."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"ເປີດ"</string>
<string name="sms" msgid="4560537514610063430">"ຂໍ້ຄວາມ"</string>
<string name="add_contact" msgid="7867066569670597203">"ເພີ່ມ"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"ພື້ນທີ່ຈັດເກັບຂໍ້ມູນກຳລັງຈະເຕັມ"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"ການເຮັດວຽກບາງຢ່າງຂອງລະບົບບາງອາດຈະໃຊ້ບໍ່ໄດ້"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"ບໍ່ມີບ່ອນເກັບຂໍ້ມູນພຽງພໍສຳລັບລະບົບ. ກວດສອບໃຫ້ແນ່ໃຈວ່າທ່ານມີພື້ນທີ່ຫວ່າງຢ່າງໜ້ອຍ 250MB ແລ້ວລອງໃໝ່."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">ເປີດເຄືອຂ່າຍ Wi-Fi ທີ່ມີໃຫ້</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"ເຊື່ອມຕໍ່ຫາເຄືອຂ່າຍ Wi‑Fi ແບບເປີດ"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"ກຳລັງເຊື່ອມຕໍ່ຫາເຄືອຂ່າຍ Wi‑Fi"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"ເຊື່ອມຕໍ່ຫາເຄືອຂ່າຍ Wi‑Fi ແລ້ວ"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"ບໍ່ສາມາດເຊື່ອມຕໍ່ຫາເຄືອຂ່າຍ Wi‑Fi ໄດ້"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"ຈະມີການເປີດໃຊ້ Wi‑Fi ອັດຕະໂນມັດ"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"ເມື່ອທ່ານຢູ່ໃກ້ເຄືອຂ່າຍຄຸນນະພາບສູງທີ່ບັນທຶກໄວ້"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"ບໍ່ຕ້ອງເປີດໃຊ້ຄືນໃໝ່"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"ເປີດໃຊ້ Wi‑Fi ອັດຕະໂນມັດແລ້ວ"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"ທ່ານຢູ່ໃກ້ເຄືອຂ່າຍທີ່ບັນທຶກໄວ້: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"ເຂົ້າສູ່ລະບົບເຄືອຂ່າຍ Wi-Fi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"ລົງຊື່ເຂົ້າເຄືອຂ່າຍ"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> ເກີນທີ່ກໍານົດໄວ້."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"ຂໍ້ມູນແບັກກຣາວຖືກຈຳກັດແລ້ວ"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"ແຕະເພື່ອລຶບຂໍ້ຈຳກັດອອກ."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"ການນຳໃຊ້ຂໍ້ມູນຈຳນວນຫຼາຍ"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"ການນຳໃຊ້ຂໍ້ມູນຂອງທ່ານໃນສອງສາມມື້ທີ່ຜ່ານມານັ້ນຫຼາຍກວ່າປົກກະຕິ. ແຕະເພື່ອເບິ່ງການນຳໃຊ້ ແລະ ການຕັ້ງຄ່າ."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"ໃບຮັບຮອງຄວາມປອດໄພ"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"ໃບຮັບຮອງບໍ່ຖືກຕ້ອງ."</string>
<string name="issued_to" msgid="454239480274921032">"ອອກໃຫ້ແກ່:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"ຈົນຮອດ <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"ຈົນກ່ວາ <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (ສັນຍານເຕືອນຕໍ່ໄປ)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"ຈົນກວ່າທ່ານຈະປິດການຫ້າມລົບກວນ"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"ຈົນກວ່າທ່ານຈະປິດ"</string>
<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>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"ທຸກພາສາ"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"ທຸກຂົງເຂດ"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"ຄົ້ນຫາ"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"ເປີດໂໝດບ່ອນເຮັດວຽກບໍ?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"ນີ້ຈະເປີດໂປຣໄຟລ໌ບ່ອນເຮັດວຽກຂອງທ່ານ, ຮວມທັງແອັບ, ການຊິ້ງໃນພື້ນຫຼັງ ແລະ ຄຸນສົມບັດທີ່ກ່ຽວຈ້ອງ"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"ເປີດ"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"ທ່ານມີຂໍ້ຄວາມໃໝ່"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"ເປີດແອັບ SMS ເພື່ອເບິ່ງ"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"ບາງຄວາມສາມາດນຳໃຊ້ອາດຈະຖືກຈຳກັດ"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"ບໍ່ສາມາດກູ້ທາງລັດຂຶ້ນມາໄດ້ເນື່ອງຈາກແອັບບໍ່ຮອງຮັບການສຳຮອງ ແລະ ກູ້ຂໍ້ມູນ"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"ບໍ່ສາມາດກູ້ທາງລັດຄືນມາໄດ້ເນື່ອງຈາກລາຍເຊັນແອັບບໍ່ກົງກັນ"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"ບໍ່ສາມາດກູ້ທາງລັດຄືນມາໄດ້"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"ທາງລັດຖືກປິດການນຳໃຊ້"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> ຕ້ອງການສະແດງ <xliff:g id="APP_2">%2$s</xliff:g> ສະໄລ້"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"ແກ້ໄຂ"</string>
</resources>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index e248f45..89d803c 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -185,6 +185,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Šį įrenginį tvarko organizacija ir gali stebėti tinklo srautą. Palieskite, kad gautumėte daugiau informacijos."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Įrenginys bus ištrintas"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Administratoriaus programos negalima naudoti. Dabar įrenginys bus ištrintas.\n\nJei kyla klausimų, susisiekite su organizacijos administratoriumi."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Neleidžiama spausdinti (<xliff:g id="OWNER_APP">%s</xliff:g>)."</string>
<string name="me" msgid="6545696007631404292">"Aš"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Planšetinio kompiuterio parinktys"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV parinktys"</string>
@@ -269,8 +270,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Saugos režimas"</string>
<string name="android_system_label" msgid="6577375335728551336">"„Android“ sistema"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Perjungti į asmeninį režimą"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Perjungti į darbo režimą"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontaktai"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"pasiekti kontaktus"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Suteikti <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> prieigą prie kontaktų"</string>
@@ -422,6 +425,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Leidžiama programai pasiekti telefono funkcijas įrenginyje. Šis leidimas suteikia teisę programai nustatyti telefono numerį ir įrenginio ID, tai, ar skambutis aktyvus, ir skambučiu prijungtą nuotolinį numerį."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"nukreipti skambučius per sistemą"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Programai leidžiama nukreipti jos skambučius per sistemą siekiant pagerinti skambinimo paslaugas."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"skaityti telefonų numerius"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Programai leidžiama pasiekti įrenginio telefonų numerius."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"neleisti planšetiniam kompiuteriui užmigti"</string>
@@ -491,10 +498,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Per lėtai judinate pirštą. Bandykite dar kartą."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Neatpažintas"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Kontrolinio kodo aparatinė įranga nepasiekiama."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Negalima išsaugoti kontrolinio kodo. Pašalinkite esamą kontrolinį kodą."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Baigėsi kontrolinio kodo nustatymo skirtasis laikas. Bandykite dar kartą."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Kontrolinio kodo operacija atšaukta."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Per daug bandymų. Vėliau bandykite dar kartą."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Per daug bandymų. Kontrolinio kodo jutiklis išjungtas."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Bandykite dar kartą."</string>
@@ -1030,6 +1040,12 @@
<string name="browse" msgid="1245903488306147205">"Atidaryti"</string>
<string name="sms" msgid="4560537514610063430">"Pranešimas"</string>
<string name="add_contact" msgid="7867066569670597203">"Pridėti"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Mažėja laisvos saugyklos vietos"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Kai kurios sistemos funkcijos gali neveikti"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Sistemos saugykloje nepakanka vietos. Įsitikinkite, kad yra 250 MB laisvos vietos, ir paleiskite iš naujo."</string>
@@ -1159,6 +1175,8 @@
<item quantity="other">Pasiekiami atvirieji „Wi-Fi“ tinklai</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Prisijunkite prie atviro „Wi‑Fi“ tinklo"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Prisijungiama prie atviro „Wi‑Fi“ tinklo"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Prisijungta prie „Wi-Fi“ tinklo"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Nepavyko prisijungti prie „Wi‑Fi“ tinklo"</string>
@@ -1458,6 +1476,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> viršyta nurodyta riba."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Apriboti foniniai duomenys"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Palieskite ir pašal. apribojimą."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Naudojama daug duomenų"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Pastarąsias kelias dienas naudojate daugiau duomenų nei įprastai. Palietę peržiūrėkite naudojimą ir nustatymus."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Saugos sertifikatas"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Šis sertifikatas galioja."</string>
<string name="issued_to" msgid="454239480274921032">"Išduota:"</string>
@@ -1754,7 +1774,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Iki <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Iki <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (kitas signalas)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Kol neišjungsite netrukdymo režimo"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Kol išjungsite"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Kol neišjungsite režimo „Netrukdyti“"</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">"Sutraukti"</string>
@@ -1805,9 +1825,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Visos kalbos"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Visi regionai"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Paieška"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Įjungti darbo režimą?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Tai atlikus bus įjungtas darbo profilis, įskaitant programas, sinchronizavimą fone ir susijusias funkcijas"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Įjungti"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Turite naujų pranešimų"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Atidaryti SMS programą, norint peržiūrėti"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Kai kurios funkcijos gali būti ribojamos"</string>
@@ -1881,7 +1907,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Nepavyko atkurti sparčiojo klavišo, nes programos parašas neatitinka"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Nepavyko atkurti sparčiojo klavišo"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Spartusis klavišas išjungtas"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Pašalinti"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Vis tiek paleisti"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Pašalinti žalingą programą?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"„<xliff:g id="APP_0">%1$s</xliff:g>“ nori rodyti „<xliff:g id="APP_2">%2$s</xliff:g>“ fragmentus"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Redaguoti"</string>
</resources>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 2d98ade..75f39de 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -183,6 +183,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Jūsu organizācija pārvalda šo ierīci un var uzraudzīt tīkla datplūsmu. Pieskarieties, lai saņemtu detalizētu informāciju."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Jūsu ierīces dati tiks dzēsti"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Administratora lietotni nevar izmantot. Ierīcē saglabātie dati tiks dzēsti. \n\nJa jums ir kādi jautājumi, sazinieties ar savas organizācijas administratoru."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Drukāšanu atspējoja <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Man"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Planšetdatora opcijas"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV opcijas"</string>
@@ -219,6 +220,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Ārkārtas"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Kļūdu ziņojums"</string>
<string name="global_action_logout" msgid="935179188218826050">"Beigt sesiju"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Ekrānuzņēmums"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Kļūdu ziņojuma sagatavošana"</string>
<string name="bugreport_message" msgid="398447048750350456">"Veicot šo darbību, tiks apkopota informācija par jūsu ierīces pašreizējo stāvokli un nosūtīta e-pasta ziņojuma veidā. Kļūdu ziņojuma pabeigšanai un nosūtīšanai var būt nepieciešams laiks. Lūdzu, esiet pacietīgs."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interaktīvs pārskats"</string>
@@ -265,8 +267,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Drošais režīms"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android sistēma"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Pārslēgt personīgo profilu"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Pārslēgt darba profilu"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontaktpersonas"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"piekļūt jūsu kontaktpersonu datiem"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Atļaut lietotnei <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> piekļūt jūsu kontaktpersonām"</string>
@@ -418,6 +422,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Ļauj lietotnei piekļūt ierīces tālruņa funkcijām. Ar šo atļauju lietotne var noteikt tālruņa numuru un ierīču ID, zvana statusu un attālo numuru, ar ko ir izveidots savienojums, veicot zvanu."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"maršrutēt zvanus sistēmā"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Ļauj lietotnei maršrutēt tās zvanus sistēmā, lai uzlabotu zvanīšanas pieredzi."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"lasīt tālruņa numurus"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Ļauj lietotnei piekļūt ierīcē esošajiem tālruņa numuriem."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"novērst planšetdatora pāriešanu miega režīmā"</string>
@@ -487,10 +495,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Pārāk lēna pirksta kustība. Lūdzu, mēģiniet vēlreiz."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nav atpazīts"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Nospieduma aparatūra nav pieejama."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Pirkstu nospiedumu nevar saglabāt. Lūdzu, noņemiet esošu pirksta nospiedumu."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Pirkstu nospiedumu nolasīšanas aparatūras noildze. Mēģiniet vēlreiz."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Nospieduma darbība neizdevās."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Pārāk daudz mēģinājumu. Vēlāk mēģiniet vēlreiz."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Pārāk daudz mēģinājumu. Pirksta nospieduma sensors atspējots."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Mēģiniet vēlreiz."</string>
@@ -1009,6 +1020,12 @@
<string name="browse" msgid="1245903488306147205">"Atvērt"</string>
<string name="sms" msgid="4560537514610063430">"Īsziņa"</string>
<string name="add_contact" msgid="7867066569670597203">"Pievienot"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Paliek maz brīvas vietas"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Dažas sistēmas funkcijas var nedarboties."</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Sistēmai pietrūkst vietas. Atbrīvojiet vismaz 250 MB vietas un restartējiet ierīci."</string>
@@ -1136,6 +1153,8 @@
<item quantity="other">Ir pieejami atvērti Wi-Fi tīkli</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Savienojuma izveide ar atvērtu Wi-Fi tīklu"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Notiek savienojuma izveide ar atvērtu Wi-Fi tīklu"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Ir izveidots savienojums ar Wi-Fi tīklu"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Nevarēja izveidot savienojumu ar Wi‑Fi tīklu"</string>
@@ -1145,6 +1164,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi tiks automātiski ieslēgts"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Kad atrodaties saglabāta augstas kvalitātes tīkla tuvumā"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Neieslēgt atkārtoti"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi-Fi tika ieslēgts automātiski"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Jūs atrodaties saglabāta tīkla tuvumā: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>."</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Pierakstieties Wi-Fi tīklā"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Pierakstīšanās tīklā"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1432,6 +1453,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> virs norādītā ierobežojuma."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Fona dati ir ierobežoti."</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Pieskar., lai noņemtu ierobežoj."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Liels datu lietojums"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Datu lietojums dažās pēdējās dienās ir lielāks nekā parasti. Pieskarieties, lai skatītu lietojumu un iestatījumus."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Drošības sertifikāts"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Sertifikāts ir derīgs."</string>
<string name="issued_to" msgid="454239480274921032">"Izdots:"</string>
@@ -1718,7 +1741,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Līdz <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Līdz plkst. <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (nākamais signāls)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Līdz izslēgsiet statusu “Netraucēt”"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Līdz brīdim, kad izslēgsiet"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Līdz izslēgsiet statusu “Netraucēt”"</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">"Sakļaut"</string>
@@ -1768,9 +1791,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Visas valodas"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Visi reģioni"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Meklēt"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Vai ieslēgt darba režīmu?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Jūsu darba profils, tostarp lietotnes, sinhronizācija fonā un saistītās funkcijas, tiks aktivizēti."</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Ieslēgt"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Jums ir jaunas īsziņas."</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Lai skatītu, atveriet īsziņu lietotni."</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Funkcijas var būt ierobežotas"</string>
@@ -1842,6 +1871,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Nevarēja atjaunot saīsni, jo lietotnē netiek atbalstīta dublēšana un atjaunošana."</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Saīsni nevarēja atjaunot lietotnes paraksta neatbilstības dēļ."</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Nevarēja atjaunot saīsni."</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Saīsne ir atspējota."</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"Lietotne <xliff:g id="APP_0">%1$s</xliff:g> vēlas rādīt lietotnes <xliff:g id="APP_2">%2$s</xliff:g> sadaļas"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Rediģēt"</string>
</resources>
diff --git a/core/res/res/values-mk/strings.xml b/core/res/res/values-mk/strings.xml
index 67aabea..746ac52 100644
--- a/core/res/res/values-mk/strings.xml
+++ b/core/res/res/values-mk/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Вашата организација управува со уредов и можно е да го следи сообраќајот на мрежата. Допрете за детали."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Уредот ќе се избрише"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Апликацијата на администраторот не може да се користи. Вашиот уред сега ќе се избрише.\n\nАко имате прашања, контактирајте со администраторот на вашата организација."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Печатењето е оневозможено од <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Јас"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Опции на таблет"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Опции на телевизорот"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Итен случај"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Извештај за грешка"</string>
<string name="global_action_logout" msgid="935179188218826050">"Завршете ја сесијата"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Слика од екранот"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Земи извештај за грешки"</string>
<string name="bugreport_message" msgid="398447048750350456">"Ова ќе собира информации за моменталната состојба на вашиот уред, за да ги испрати како порака по е-пошта. Тоа ќе одземе малку време почнувајќи од извештајот за грешки додека не се подготви за праќање; бидете трпеливи."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Интерактивен извештај"</string>
@@ -262,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Безбеден режим"</string>
<string name="android_system_label" msgid="6577375335728551336">"Систем Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Префрлете на личен профил"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Префрли на работен профил"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Префрли на личен профил"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"Префрли се на работен профил"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Контакти"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"пристапува до контактите"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Дозволете <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> да пристапува до контактите"</string>
@@ -415,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Овозможува апликацијата да пристапи кон карактеристиките на телефонот на уредот. Оваа дозвола овозможува апликацијата да ги утврди телефонскиот број и ID на уредот, дали повикот е активен и далечинскиот број поврзан со повикот."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"пренасочи повици преку системот"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Дозволете ѝ на апликацијата да ги пренасочи повиците преку системот за да го подобри искуството при јавувањето."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"да чита телефонски броеви"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Ѝ дозволува на апликацијата да пристапи до телефонските броеви на уредот."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"спречи режим на штедење кај таблет"</string>
@@ -484,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Прстот се движеше премногу бавно. Обидете се повторно."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Не е препознаено"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Хардвер за отпечаток од прст не е достапен."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Отпечатокот не може да се складира. Отстранете го постоечкиот отпечаток."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Се достигна времето на истекување на отпечатокот. Обидете се повторно."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Операцијата со отпечаток од прст се откажа."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Корисникот ја откажа потврдата со отпечаток."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Премногу обиди. Обидете се повторно подоцна."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Премногу обиди. Сензорот за отпечатоци е оневозможен."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Обидете се повторно."</string>
@@ -989,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"Отвори"</string>
<string name="sms" msgid="4560537514610063430">"Порака"</string>
<string name="add_contact" msgid="7867066569670597203">"Додај"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Капацитетот е речиси полн"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Некои системски функции може да не работат"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Нема доволно меморија во системот. Проверете дали има слободен простор од 250 МБ и рестартирајте."</string>
@@ -1114,6 +1128,8 @@
<item quantity="other">Отворени Wi-Fi мрежи се достапни</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Поврзете се на отворена Wi‑Fi-мрежа"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Поврзување на отворена Wi‑Fi-мрежа"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Се поврзавте на Wi‑Fi-мрежа"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Не можеше да се поврзе на Wi‑Fi-мрежа"</string>
@@ -1123,6 +1139,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi ќе се вклучи автоматски"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Кога сте во близина на зачувана мрежа со висок квалитет"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Не вклучувај повторно"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi се вклучи автоматски"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Близу сте до зачувана мрежа: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Најавете се на мрежа на Wi-Fi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Најавете се на мрежа"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1412,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> над назначената граница."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Подат. од заднина се ограничени"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Допрете за да се отст. огранич."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Голема потрошувачка на сообраќај"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Потрошениот сообраќај во изминативе неколку дена е поголем од нормално. Допрете за да ги видите сообраќајот и поставките."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Сертификат за безбедност"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Овој сертификат е важечки."</string>
<string name="issued_to" msgid="454239480274921032">"Издадено на:"</string>
@@ -1688,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"До <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"До <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (следниот аларм)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Додека не го исклучите „Не вознемирувај“"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Додека не го исклучите"</string>
<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>
@@ -1737,9 +1757,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Сите јазици"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Сите региони"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Пребарај"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Да се вклучи работен режим?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Ова ќе го вклучи вашиот работен профил, заедно со апликациите, синхронизирањето во заднина и слични функции"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"Да се вклучи работниот профил?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"Вашите работни апликации, известувања, податоци и други функции на работниот профил ќе бидат вклучени"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Вклучи"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Имате нови пораки"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Отворете ја апликацијата за SMS за приказ"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Некои функции се ограничени"</string>
@@ -1810,6 +1834,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Не можеше да се врати кратенката бидејќи апликацијата не поддржува бекап и враќање"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Не можеше да се врати кратенката бидејќи потписот на апликацијата не се совпаѓа"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Не можеше да се врати кратенката"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Кратенката е оневозможена"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> сака да прикажува делови од <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Измени"</string>
</resources>
diff --git a/core/res/res/values-ml/strings.xml b/core/res/res/values-ml/strings.xml
index ed2dc02..022e077 100644
--- a/core/res/res/values-ml/strings.xml
+++ b/core/res/res/values-ml/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"നിങ്ങളുടെ സ്ഥാപനമാണ് ഈ ഉപകരണം മാനേജുചെയ്യുന്നത്, നെറ്റ്വർക്ക് ട്രാഫിക്ക് നിരീക്ഷിക്കുകയും ചെയ്തേക്കാം, വിശദാംശങ്ങൾ അറിയാൻ ടാപ്പുചെയ്യുക."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"നിങ്ങളുടെ ഉപകരണം മായ്ക്കും"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"അഡ്മിൻ ആപ്പ് ഉപയോഗിക്കാൻ കഴിയില്ല. നിങ്ങളുടെ ഉപകരണം ഇപ്പോൾ മായ്ക്കപ്പെടും.\n\nനിങ്ങൾക്ക് ചോദ്യങ്ങൾ ഉണ്ടെങ്കിൽ, നിങ്ങളുടെ സ്ഥാപനത്തിന്റെ അഡ്മിനെ ബന്ധപ്പെടുക."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> പ്രിന്റിംഗ് പ്രവർത്തനരഹിതമാക്കി."</string>
<string name="me" msgid="6545696007631404292">"ഞാന്"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"ടാബ്ലെറ്റ് ഓപ്ഷനുകൾ"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"ടിവി ഓപ്ഷനുകൾ"</string>
@@ -217,8 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"അടിയന്തിരാവശ്യം"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"ബഗ് റിപ്പോർട്ട്"</string>
<string name="global_action_logout" msgid="935179188218826050">"സെഷൻ അവസാനിപ്പിക്കുക"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"സ്ക്രീൻഷോട്ട്"</string>
<string name="bugreport_title" msgid="2667494803742548533">"ബഗ് റിപ്പോർട്ട് എടുക്കുക"</string>
<string name="bugreport_message" msgid="398447048750350456">"ഒരു ഇമെയിൽ സന്ദേശമായി അയയ്ക്കുന്നതിന്, ഇത് നിങ്ങളുടെ നിലവിലെ ഉപകരണ നിലയെക്കുറിച്ചുള്ള വിവരങ്ങൾ ശേഖരിക്കും. ബഗ് റിപ്പോർട്ട് ആരംഭിക്കുന്നതിൽ നിന്ന് ഇത് അയയ്ക്കാനായി തയ്യാറാകുന്നതുവരെ അൽപ്പസമയമെടുക്കും; ക്ഷമയോടെ കാത്തിരിക്കുക."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"ഇന്റരാക്റ്റീവ് റിപ്പോർട്ട്"</string>
@@ -264,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"സുരക്ഷിത മോഡ്"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android സിസ്റ്റം"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"വ്യക്തിഗത പ്രൊഫൈലിലേക്ക് മാറുക"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"ഔദ്യോഗിക പ്രൊഫൈലിലേക്ക് മാറുക"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"കോൺടാക്റ്റുകൾ"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"നിങ്ങളുടെ കോൺടാക്റ്റുകൾ ആക്സസ്സ് ചെയ്യുക"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"നിങ്ങളുടെ കോണ്ടാക്റ്റുകള് ആക്സസ് ചെയ്യാൻ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ആപ്പിനെ അനുവദിക്കുക"</string>
@@ -417,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"ഉപകരണത്തിന്റെ ഫോൺ സവിശേഷതകൾ ആക്സസ്സുചെയ്യാൻ അപ്ലിക്കേഷനെ അനുവദിക്കുന്നു. ഈ അനുമതി ഫോൺ നമ്പർ, ഉപകരണ ഐഡികൾ, ഒരു കോൾ സജീവമാണോയെന്നത്, ഒരു കോൾ കണക്റ്റുചെയ്ത വിദൂര നമ്പർ എന്നിവ നിർണ്ണയിക്കാൻ അപ്ലിക്കേഷനെ അനുവദിക്കുന്നു."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"കോളുകൾ സിസ്റ്റത്തിലൂടെ വിടുക"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"കോളിംഗ് അനുഭവം മെച്ചപ്പെടുത്തുന്നതിനായി തങ്ങളുടെ കോളുകൾ സിസ്റ്റത്തിലേയ്ക്ക് വഴിതിരിച്ചുവിടാൻ ആപ്പുകളെ അനുവദിക്കുന്നു."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ഫോൺ നമ്പറുകൾ റീഡുചെയ്യൽ"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"ഉപകരണത്തിന്റെ ഫോൺ നമ്പറുകൾ ആക്സസ് ചെയ്യാൻ ആപ്പിനെ അനുവദിക്കുന്നു."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"സുഷുപ്തിയിലാകുന്നതിൽ നിന്ന് ടാബ്ലെറ്റിനെ തടയുക"</string>
@@ -486,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"വിരൽ വളരെ പതുക്കെ നീക്കി. വീണ്ടും ശ്രമിക്കുക."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"തിരിച്ചറിഞ്ഞില്ല"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"ഫിംഗർപ്രിന്റ് ഹാർഡ്വെയർ ലഭ്യമല്ല."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"വിരലടയാളം സംഭരിക്കാനാവില്ല. നിലവിലുള്ള വിരലടയാളം നീക്കംചെയ്യുക."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"വിരലടയാളം നൽകേണ്ട സമയം കഴിഞ്ഞു. വീണ്ടും ശ്രമിക്കുക."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"ഫിംഗർപ്രിന്റ് പ്രവർത്തനം റദ്ദാക്കി."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"നിരവധി തവണ ശ്രമിച്ചു. പിന്നീട് വീണ്ടും ശ്രമിക്കുക."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"നിരവധി തവണ ശ്രമിച്ചതിനാൽ, വിരലടയാള സെൻസർ പ്രവർത്തനരഹിതമായി."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"വീണ്ടും ശ്രമിക്കൂ."</string>
@@ -991,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"തുറക്കുക"</string>
<string name="sms" msgid="4560537514610063430">"സന്ദേശം"</string>
<string name="add_contact" msgid="7867066569670597203">"ചേർക്കുക"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"സംഭരണയിടം കഴിഞ്ഞു"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"ചില സിസ്റ്റം പ്രവർത്തനങ്ങൾ പ്രവർത്തിക്കണമെന്നില്ല."</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"സിസ്റ്റത്തിനായി മതിയായ സംഭരണമില്ല. 250MB സൗജന്യ സംഭരണമുണ്ടെന്ന് ഉറപ്പുവരുത്തി പുനരാരംഭിക്കുക."</string>
@@ -1116,6 +1131,8 @@
<item quantity="one">ലഭ്യമായ വൈഫൈ നെറ്റ്വർക്ക് തുറക്കുക</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"ലഭ്യമായ വൈഫൈ നെറ്റ്വർക്കിലേക്ക് കണക്റ്റുചെയ്യുക"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"ലഭ്യമായ വൈഫൈ നെറ്റ്വർക്കിലേക്ക് കണക്റ്റുചെയ്യുന്നു"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"വൈഫൈ നെറ്റ്വർക്കിലേക്ക് കണക്റ്റുചെയ്തു"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"വൈ-ഫൈ നെറ്റ്വർക്കിലേക്ക് കണക്റ്റുചെയ്യാനായില്ല"</string>
@@ -1125,10 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"വൈഫൈ സ്വമേധയാ ഓണാകും"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"നിങ്ങൾ ഉയർന്ന നിലവാരമുള്ള സംരക്ഷിക്കപ്പെട്ട നെറ്റ്വർക്കിനരികിലെത്തുമ്പോൾ"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"തിരികെ ഓണാക്കരുത്"</string>
- <!-- no translation found for wifi_wakeup_enabled_title (6534603733173085309) -->
- <skip />
- <!-- no translation found for wifi_wakeup_enabled_content (189330154407990583) -->
- <skip />
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"വൈഫൈ സ്വമേധയാ ഓണായി"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"നിങ്ങൾ സംരക്ഷിച്ചിട്ടുള്ള ഒരു നെറ്റ്വർക്കിന് സമീപമാണ്: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"വൈഫൈ നെറ്റ്വർക്കിലേക്ക് സൈൻ ഇൻ ചെയ്യുക"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"നെറ്റ്വർക്കിലേക്ക് സൈൻ ഇൻ ചെയ്യുക"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1416,6 +1431,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"നിശ്ചിത പരിധിയിലും <xliff:g id="SIZE">%s</xliff:g> കൂടുതലാണ്."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"പശ്ചാത്തല ഡാറ്റ പരിമിതപ്പെടുത്തി"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"നിയന്ത്രണം നീക്കംചെയ്യാൻ ടാപ്പുചെയ്യുക."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"കൂടുതൽ ഡാറ്റ ഉപയോഗം"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"കഴിഞ്ഞ കുറച്ച് ദിവസത്തെ നിങ്ങളുടെ ഡാറ്റ ഉപയോഗം സാധാരണയേക്കാൾ കൂടുതലാണ്. ഉപയോഗവും ക്രമീകരണവും കാണാൻ ടാപ്പ് ചെയ്യുക."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"സുരക്ഷ സർട്ടിഫിക്കറ്റ്"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"ഈ സര്ട്ടിഫിക്കറ്റ് സാധുതയുള്ളതാണ്."</string>
<string name="issued_to" msgid="454239480274921032">"ഇതിലേക്ക് നൽകി:"</string>
@@ -1692,7 +1709,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> വരെ"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> വരെ (അടുത്ത അലാറം)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"\'ശല്ല്യപ്പെടുത്തരുത്\' ഓഫാക്കുന്നതുവരെ"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"നിങ്ങൾ ഓഫാക്കുന്നത് വരെ"</string>
<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>
@@ -1741,9 +1758,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"എല്ലാ ഭാഷകളും"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"എല്ലാ പ്രദേശങ്ങളും"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"തിരയുക"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"ഔദ്യോഗിക മോഡ് ഓണാക്കണോ?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"ആപ്പുകളും പശ്ചാത്തല സമന്വയവും ബന്ധപ്പെട്ട ഫീച്ചറുകളും ഉൾപ്പെടെ, ഔദ്യോഗിക പ്രൊഫൈലിനെ ഇത് ഓണാക്കും"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"ഓണാക്കുക"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"നിങ്ങൾക്ക് പുതിയ സന്ദേശങ്ങൾ ഉണ്ട്"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"കാണുന്നതിന് SMS ആപ്പ് തുറക്കുക"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"ചില പ്രവർത്തനക്ഷമതകൾ പരിമിതപ്പെടാം"</string>
@@ -1815,10 +1838,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"ആപ്പ് സിഗ്നേച്ചർ പൊരുത്തപ്പെടാത്തതിനാൽ കുറുക്കുവഴി പുനഃസ്ഥാപിക്കാനായില്ല"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"കുറുക്കുവഴി പുനഃസ്ഥാപിക്കാനായില്ല"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"കുറുക്കുവഴി പ്രവർത്തനരഹിതമാണ്"</string>
- <!-- no translation found for harmful_app_warning_uninstall (3846265696369136266) -->
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
- <!-- no translation found for harmful_app_warning_launch_anyway (5784428382367400530) -->
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
<skip />
- <!-- no translation found for harmful_app_warning_title (2229996292333310435) -->
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
<skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_2">%2$s</xliff:g> സ്ലൈസുകൾ കാണിക്കാൻ <xliff:g id="APP_0">%1$s</xliff:g> താൽപ്പര്യപ്പെടുന്നു"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"എഡിറ്റ് ചെയ്യുക"</string>
</resources>
diff --git a/core/res/res/values-mn/strings.xml b/core/res/res/values-mn/strings.xml
index dbbb29e..7d082fd 100644
--- a/core/res/res/values-mn/strings.xml
+++ b/core/res/res/values-mn/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Таны байгууллага энэ төхөөрөмжийг удирдаж, сүлжээний ачааллыг хянадаг. Дэлгэрэнгүй мэдээлэл авах бол товшино уу."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Таны төхөөрөмж устах болно."</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Админы аппыг ашиглах боломжгүй. Таны төхөөрөмжийг одоо устгана.\n\nХэрэв танд асуулт байгаа бол админтайгаа холбогдоно уу."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> хэвлэх үйлдлийг идэвхгүй болгосон."</string>
<string name="me" msgid="6545696007631404292">"Би"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Таблетын сонголтууд"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Телевиз сонголтууд"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Яаралтай тусламж"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Алдаа мэдээлэх"</string>
<string name="global_action_logout" msgid="935179188218826050">"Гаргах харилцан үйлдэл"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Дэлгэцийн зураг дарах"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Согог репорт авах"</string>
<string name="bugreport_message" msgid="398447048750350456">"Энэ таны төхөөрөмжийн одоогийн статусын талаарх мэдээллийг цуглуулах ба имэйл мессеж болгон илгээнэ. Алдааны мэдэгдлээс эхэлж илгээхэд бэлэн болоход хэсэг хугацаа зарцуулагдана тэвчээртэй байна уу."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Интерактив тайлан"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Аюулгүй горим"</string>
<string name="android_system_label" msgid="6577375335728551336">"Андройд систем"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"\"Хувийн\" руу шилжих"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"\"Ажлын\" руу шилжих"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Харилцагчдын хаяг"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"харилцагч руугаа хандах"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>-д таны харилцагчдад хандахыг зөвшөөрнө үү"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Апп нь төхөөрөмжийн утасны функцд хандах боломжтой. Энэ зөвшөөрөл нь апп-д утасны дугаар болон төхөөрөмжийн ID-г, дуудлага идэвхтэй эсэх, холын дугаар дуудлагаар холбогдсон байгаа эсэхийг тогтоох боломжийг олгоно,"</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"системээр дамжуулах дуудлага"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Дуудлагыг сайжруулахын тулд дуудлагаа системээр дамжуулах зөвшөөрлийг апп-д олгодог."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"утасны дугаарыг унших"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Төхөөрөмжийн утасны дугаарт хандах зөвшөөрлийг апп-д олгоно."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"таблетыг унтуулахгүй байлгах"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Хуруу хэт удаан хөдөлгөсөн байна. Дахин оролдоно уу."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Танигдахгүй байна"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Хурууны хээний тоног төхөөрөмж бэлэн бус байна."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Хурууны хээг хадгалах боломжгүй байна. Одоо байгаа хурууны хээг арилгана уу."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Хурууны хээ оруулах хугацаа өнгөрсөн байна. Дахин оруулна уу."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Хурууны хээний бүртгэл амжилтгүй боллоо."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Хэтэрхий олон оролдлоо. Түр хүлээгээд дахин оролдоно уу."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Хэт олон удаа оролдсон тул хурууны хээ мэдрэгчийг идэвхгүй болголоо."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Дахин оролдно уу."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Нээх"</string>
<string name="sms" msgid="4560537514610063430">"Зурвас"</string>
<string name="add_contact" msgid="7867066569670597203">"Нэмэх"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Сангийн хэмжээ дутагдаж байна"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Зарим систем функц ажиллахгүй байна"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Системд хангалттай сан байхгүй байна. 250MБ чөлөөтэй зай байгаа эсэхийг шалгаад дахин эхлүүлнэ үү."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Нээлттэй Wi-Fi сүлжээ ашиглах боломжтой</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Нээлттэй Wi‑Fi сүлжээнд холбогдох"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Нээлттэй Wi‑Fi сүлжээнд холбогдож байна"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Wi‑Fi сүлжээнд холбогдлоо"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Wi‑Fi сүлжээнд холбогдож чадсангүй"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi автоматаар асна"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Таныг хадгалсан, өндөр чанартай сүлжээний ойролцоо байх үед"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Буцааж асаахгүй"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi-г автоматаар асаасан"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Та дараах хадгалсан сүлжээтэй ойрхон байна: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Wi-Fi сүлжээнд нэвтэрнэ үү"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Сүлжээнд нэвтэрнэ үү"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> заасан хязгаарыг давав."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Арын дата хязгаарлагдсан"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Хязгаарлалтыг устгах бол товш."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Их хэмжээний дата ашиглалт"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Таны сүүлийн хэдэн өдрийн дата ашиглалт хэвийн хэмжээнээс их байна. Ашиглалт, тохиргоог харах бол товшино уу."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Аюулгүй сертификат"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Сертификат хүчинтэй."</string>
<string name="issued_to" msgid="454239480274921032">"Гаргуулсан:"</string>
@@ -1683,7 +1706,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> хүртэл"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> хүртэл (дараагийн сэрүүлэг)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"\"Бүү саад бол\" горимыг унтраах хүртэл"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Та унтраах хүртэл"</string>
<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>
@@ -1732,9 +1755,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Бүх хэл"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Бүх бүс нутаг"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Хайх"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Ажлын горимыг асаах уу?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Энэ нь апп, цаана синк хийх болон холбоотой онцлог зэрэг таны ажлын профайлыг асаана"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Асаах"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Танд шинэ зурвасууд байна"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Үзэхийн тулд SMS аппыг нээх"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Зарим үйлдэл хязгаарлалттай байж болно"</string>
@@ -1805,6 +1834,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Апп нөөцлөлт, сэргээлтийг дэмждэггүй тул товчлолыг сэргээж чадсангүй"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Аппын гарын үсэг таарахгүй байгаа тул товчлолыг сэргээж чадсангүй"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Товчлолыг сэргээж чадсангүй"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Товчлолыг идэвхгүй болгосон"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> <xliff:g id="APP_2">%2$s</xliff:g>-н хэсгүүдийг (slices) харуулах хүсэлтэй байна"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Засах"</string>
</resources>
diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml
index 9e36c1d..0da8708 100644
--- a/core/res/res/values-mr/strings.xml
+++ b/core/res/res/values-mr/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"आपली संस्था हे डिव्हाइस व्यवस्थापित करते आणि नेटवर्क रहदारीचे निरीक्षण करू शकते. तपशीलांसाठी टॅप करा."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"तुमचे डिव्हाइस मिटविले जाईल"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"हे प्रशासक अॅप वापरले जाऊ शकत नाही. तुमचे डिव्हाइस आता मिटवले जाईल.\n\nतुम्हाला प्रश्न असल्यास, तुमच्या संस्थेच्या प्रशासकाशी संपर्क साधा."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> नी प्रिंट करणे बंद केले आहे."</string>
<string name="me" msgid="6545696007631404292">"मी"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"टॅबलेट पर्याय"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"टीव्ही पर्याय"</string>
@@ -217,8 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"आणीबाणी"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"बग रीपोर्ट"</string>
<string name="global_action_logout" msgid="935179188218826050">"सेशन समाप्त करा"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"स्क्रीनशॉट"</string>
<string name="bugreport_title" msgid="2667494803742548533">"बग रीपोर्ट घ्या"</string>
<string name="bugreport_message" msgid="398447048750350456">"ई-मेल संदेश म्हणून पाठविण्यासाठी, हे तुमच्या सद्य डिव्हाइस स्थितीविषयी माहिती संकलित करेल. बग रीपोर्ट सुरू करण्यापासून तो पाठविण्यापर्यंत थोडा वेळ लागेल; कृपया धीर धरा."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"परस्परसंवादी अहवाल"</string>
@@ -264,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"सुरक्षित मोड"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android सिस्टम"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"वैयक्तिकवर स्विच करा"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"कार्यावर स्विच करा"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"संपर्क"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"आपल्या संपर्कांवर प्रवेश"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ला तुमचे संपर्क अॅक्सेस करू द्या"</string>
@@ -417,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"डिव्हाइस च्या फोन वैशिष्ट्यांवर अॅक्सेस करण्यास अॅपला अनुमती देते. ही परवानगी कॉल अॅक्टिव्हेट असला किंवा नसला तरीही, फोन नंबर आणि डिव्हाइस आयडी आणि कॉलद्वारे कनेक्ट केलेला रीमोट नंबर निर्धारित करण्यासाठी अॅपला अनुमती देते."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"प्रणालीच्या माध्यमातून कॉल रूट करा"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"कॉल करण्याचा अनुभव सुधारण्यासाठी अॅपला त्याचे कॉल प्रणालीच्या माध्यमातून रूट करू देते."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"फोन नंबर वाचा"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"अॅपला डिव्हाइसच्या फोन नंबरमध्ये प्रवेश करण्याची अनुमती देते."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"टॅबलेट निष्क्रिय होण्यापासून प्रतिबंधित करा"</string>
@@ -486,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"बोट खूप सावकाश हलविले. कृपया पुन्हा प्रयत्न करा."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"ओळखले नाही"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"फिंगरप्रिंट हार्डवेअर उपलब्ध नाही."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"फिंगरप्रिंट स्टोअर केले जाऊ शकत नाही. कृपया विद्यमान फिंगरप्रिंट काढा."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"फिंगरप्रिंट टाइमआउट झाले. पुन्हा प्रयत्न करा."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"फिंगरप्रिंट ऑपरेशन रद्द झाले."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"खूप प्रयत्न केले. नंतर पुन्हा प्रयत्न करा."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"खूप प्रयत्न करून झाले. फिंगरप्रिंट सेंसर बंद आहे."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"पुन्हा प्रयत्न करा."</string>
@@ -991,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"उघडा"</string>
<string name="sms" msgid="4560537514610063430">"संदेश"</string>
<string name="add_contact" msgid="7867066569670597203">"जोडा"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"संचयन स्थान संपत आहे"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"काही सिस्टम कार्ये कार्य करू शकत नाहीत"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"सिस्टीमसाठी पुरेसे संचयन नाही. आपल्याकडे 250MB मोकळे स्थान असल्याचे सुनिश्चित करा आणि रीस्टार्ट करा."</string>
@@ -1116,6 +1131,8 @@
<item quantity="other">खुले वाय-फाय नेटवर्क उपलब्ध</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"खुल्या वाय-फाय नेटवर्कशी कनेक्ट करा"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"खुल्या वाय-फाय नेटवर्कशी कनेक्ट करत आहे"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"वाय-फाय नेटवर्कशी कनेक्ट केले"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"वाय-फाय नेटवर्कशी कनेक्ट करू शकत नाही"</string>
@@ -1125,10 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"वाय-फाय आपोआप चालू होईल"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"तुम्ही जेव्हा सेव्ह केलेल्या उच्च दर्जाच्या नेटवर्कजवळ असाल तेव्हा"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"पुन्हा चालू करू नका"</string>
- <!-- no translation found for wifi_wakeup_enabled_title (6534603733173085309) -->
- <skip />
- <!-- no translation found for wifi_wakeup_enabled_content (189330154407990583) -->
- <skip />
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"वाय-फाय आपोआप चालू झाले"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"तुम्ही या सेव्ह केलेल्या नेटवर्कजवळ आहात: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"वाय-फाय नेटवर्कमध्ये साइन इन करा"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"नेटवर्कवर साइन इन करा"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1416,6 +1431,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"निर्दिष्ट केलेल्या मर्यादेबाहेर <xliff:g id="SIZE">%s</xliff:g>."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"पार्श्वभूमीवरील डेटा प्रतिबंधित केला"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"प्रतिबंध काढण्यासाठी टॅप करा."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"डेटाचा जास्त वापर"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"तुमचा गेल्या काही दिवसांतला डेटाचा वापर हा नेहमीपेक्षा जास्त आहे. वापर आणि सेटिंग्ज पाहण्यासाठी टॅप करा."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"सुरक्षितता प्रमाणपत्र"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"हे प्रमाणपत्र वैध आहे."</string>
<string name="issued_to" msgid="454239480274921032">"यावर जारी केले:"</string>
@@ -1692,7 +1709,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> पर्यंत"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> पर्यंत (पुढील अलार्म)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"आपण व्यत्यय आणू नका बंद करेपर्यंत"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"तुम्ही बंद करेपर्यंत"</string>
<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>
@@ -1741,9 +1758,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"सर्व भाषा"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"सर्व प्रदेश"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"शोध"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"कार्य मोड चालू करायचा?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"हे अॅप्स, पार्श्वभूमी संकालन आणि संबंधित वैशिष्ट्यांसह आपले कार्य प्रोफाइल चालू करेल"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"चालू करा"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"आपल्याकडे नवीन संदेश आहेत"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"पाहण्यासाठी SMS अॅप उघडा"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"काही कार्यक्षमता मर्यादित असू शकतात"</string>
@@ -1815,10 +1838,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"अॅप स्वाक्षरी न जुळल्यामुळे शॉर्टकट रिस्टोअर करू शकलो नाही"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"शॉर्टकट रिस्टोअर करू शकलो नाही"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"शॉर्टकट बंद केलेला आहे"</string>
- <!-- no translation found for harmful_app_warning_uninstall (3846265696369136266) -->
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
- <!-- no translation found for harmful_app_warning_launch_anyway (5784428382367400530) -->
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
<skip />
- <!-- no translation found for harmful_app_warning_title (2229996292333310435) -->
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
<skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> ला <xliff:g id="APP_2">%2$s</xliff:g> चे तुकडे दाखवायचे आहेत"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"संपादित करा"</string>
</resources>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index f7e18ff..e27b0f1 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Organisasi anda mengurus peranti ini dan mungkin memantau trafik rangkaian. Ketik untuk mendapatkan butiran."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Peranti anda akan dipadam"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Apl pentadbir tidak dapat digunakan. Peranti anda akan dipadamkan sekarang.\n\nJika anda ingin mengemukakan soalan, hubungi pentadbir organisasi anda."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Pencetakan dilumpuhkan oleh <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Saya"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Pilihan tablet"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Pilihan TV"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Kecemasan"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Laporan pepijat"</string>
<string name="global_action_logout" msgid="935179188218826050">"Tamatkan sesi"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Tangkapan skrin"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Ambil laporan pepijat"</string>
<string name="bugreport_message" msgid="398447048750350456">"Ini akan mengumpul maklumat tentang keadaan peranti semasa anda untuk dihantarkan sebagai mesej e-mel. Harap bersabar, mungkin perlu sedikit masa untuk memulakan laporan sehingga siap untuk dihantar."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Laporan interaktif"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Mod selamat"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistem Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Beralih kepada Peribadi"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Beralih kepada Kerja"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kenalan"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"mengakses kenalan anda"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Benarkan <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> mengakses kenalan anda"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Membenarkan apl mengakses ciri telefon pada peranti. Kebenaran ini membolehkan apl menentukan nombor telefon dan ID peranti, sama ada panggilan aktif dan nombor jauh yang dihubungkan dengan panggilan."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"halakan panggilan menerusi sistem"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Membenarkan apl menghalakan panggilan menerusi sistem untuk meningkatkan pengalaman panggilan."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"baca nombor telefon"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Membenarkan apl mengakses nombor telefon peranti."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"menghalang tablet daripada tidur"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Jari digerakkan terlalu perlahan. Sila cuba lagi."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Tidak dicam"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Perkakasan cap jari tidak tersedia."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Cap jari tidak dapat disimpan. Sila alih keluar cap jari sedia ada."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Tamat masa cap jari dicapai. Cuba lagi."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Pengendalian cap jari dibatalkan."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Terlalu banyak percubaan. Cuba sebentar lagi."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Terlalu banyak percubaan. Penderia cap jadi dilumpuhkan."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Cuba lagi."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Buka"</string>
<string name="sms" msgid="4560537514610063430">"Mesej"</string>
<string name="add_contact" msgid="7867066569670597203">"Tambah"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Ruang storan semakin berkurangan"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Beberapa fungsi sistem mungkin tidak berfungsi"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Tidak cukup storan untuk sistem. Pastikan anda mempunyai 250MB ruang kosong dan mulakan semula."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Rangkaian Wi-Fi terbuka tersedia</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Sambung ke rangkaian Wi-Fi terbuka"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Menyambung ke rangkaian Wi‑Fi terbuka"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Disambungkan ke rangkaian Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Tidak dapat menyambung ke rangkaian Wi-Fi"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi akan dihidupkan secara automatik"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Apabila anda berada berdekatan dengan rangkaian disimpan yang berkualiti tinggi"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Jangan hidupkan kembali"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi dihidupkan secara automatik"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Anda berada berdekatan rangkaian yang disimpan: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Log masuk ke rangkaian Wi-Fi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Log masuk ke rangkaian"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> melebihi had yang ditentukan."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Data latar belakang terhad"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Ketik untuk alih keluar sekatan."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Penggunaan data yang banyak"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Penggunaan data anda sepanjang beberapa hari yang lalu adalah lebih banyak daripada biasa. Ketik untuk melihat penggunaan dan tetapan."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Sijil keselamatan"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Sijil ini sah."</string>
<string name="issued_to" msgid="454239480274921032">"Dikeluarkan kepada:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Sehingga <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Sehingga <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (penggera akan datang)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Hingga anda mematikan Jangan Ganggu"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Sehingga anda matikan"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Hingga anda mematikan Jangan Ganggu"</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">"Runtuhkan"</string>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Semua bahasa"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Semua rantau"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Cari"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Hidupkan mod kerja?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Tindakan ini akan menghidupkan profil kerja, termasuk apl, penyegerakan latar belakang dan ciri yang berkaitan"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Hidupkan"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Anda mempunyai mesej baharu"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Buka apl SMS untuk melihat"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Sesetengah fungsi mungkin terhad"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Tidak dapat memulihkan pintasan kerana apl tidak menyokong sandaran dan segerakan"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Tidak dapat memulihkan pintasan kerana ketakpadanan tandatangan apl"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Tidak dapat memulihkan pintasan"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Pintasan dilumpuhkan"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> mahu menunjukkan <xliff:g id="APP_2">%2$s</xliff:g> hirisan"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Edit"</string>
</resources>
diff --git a/core/res/res/values-my/strings.xml b/core/res/res/values-my/strings.xml
index 5f67641..afccd79 100644
--- a/core/res/res/values-my/strings.xml
+++ b/core/res/res/values-my/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"ဤစက်ပစ္စည်းကို သင်၏ အဖွဲ့အစည်းက စီမံပြီး ကွန်ရက်အသွားအလာကို စောင့်ကြည့်နိုင်ပါသည်။ ထပ်မံလေ့လာရန် တို့ပါ။"</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"သင့်ကိရိယာအား ပယ်ဖျက်လိမ့်မည်"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"စီမံခန့်ခွဲရန် အက်ပ်ကို သုံး၍မရပါ။ သင်၏ စက်ပစ္စည်းအတွင်းရှိ အရာများကို ဖျက်လိုက်ပါမည်။\n\nမေးမြန်းစရာများရှိပါက အဖွဲ့အစည်း၏ စီမံခန့်ခွဲသူကို ဆက်သွယ်ပါ။"</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> က ပုံနှိပ်ထုတ်ယူခြင်းကို ပိတ်ထားသည်။"</string>
<string name="me" msgid="6545696007631404292">"ကျွန်ုပ်"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Tabletဆိုင်ရာရွေးချယ်မှုများ"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"တီဗွီ ရွေးချယ်စရာများ"</string>
@@ -263,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>၊ <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"အန္တရာယ်ကင်းမှု စနစ်(Safe mode)"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android စနစ်"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"ကိုယ်ပိုင်သီးသန့်အဖြစ် ပြောင်းပါ"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"အလုပ်သို့ ပြောင်းပါ"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"ကိုယ်ရေးကိုယ်တာသုံး ပရိုဖိုင်သို့ ပြောင်းရန်"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"အလုပ်ပရိုဖိုင်သို့ ပြောင်းရန်"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"အဆက်အသွယ်များ"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"သင့် အဆက်အသွယ်များအား ဝင်ရောက်သုံးရန်"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<xliff:g id="APP_NAME">%1$s</xliff:g> အား သင်၏အဆက်အသွယ်များကို သုံးခွင့်ပေးရန်"</string>
@@ -416,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"အပလီကေးရှင်းအား ဖုန်းရဲ့ စွမ်းဆောင်ချက်များအား သုံးခွင့်ပြုပါ။ အပလီကေးရှင်းအနေဖြင့် ဖုန်းနံပါတ်၊ စက်နံပါတ်၊ ဖုန်းခေါ်နေမှု ရှိမရှိနှင့် တဖက်မှ ဖုန်းနံပါတ် များအား သိရှိနိုင်ပါသည်"</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"ခေါ်ဆိုမှုများကို စနစ်မှတစ်ဆင့် ဖြတ်သန်းခွင့်ပြုပါ"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"ခေါ်ဆိုမှု အတွေ့အကြုံ ပိုမိုကောင်းမွန်လာစေရန်အတွက် အက်ပ်၏ ခေါ်ဆိုမှုအား စနစ်မှတစ်ဆင့် ဖြတ်သန်းရန် ခွင့်ပြုပါသည်။"</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ဖုန်းနံပါတ်များကို ဖတ်ရန်"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"အက်ပ်ကို စက်ပစ္စည်း၏ ဖုန်းနံပါတ်များအား အသုံးပြုခွင့်ပေးပါ။"</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"တက်ပလက်အား ပိတ်ခြင်းမှ ကာကွယ်ခြင်း"</string>
@@ -485,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"လက်ညှိုးအလွန်နှေးကွေးစွာ ရွေ့ခဲ့သည်။ ကျေးဇူးပြု၍ ထပ်မံကြိုးစားပါ။"</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"အသိအမှတ်မပြုပါ"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"လက်ဗွေရာ ဟာ့ဒ်ဝဲ မရနိုင်ပါ။"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"လက်ဗွေရာ သိုလှောင်၍မရပါ။ ကျေးဇူးပြု၍ ရှိပြီးလက်ဗွေရာအား ဖယ်ရှားပါ။"</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"လက်ဗွေရာအချိန်ကုန် သွားပါသည်။ ထပ်မံကြိုးစားပါ။"</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"လက်ဗွေရာ လုပ်ငန်း ဖျက်သိမ်းခဲ့၏။"</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"လက်ဗွေဖြင့် အထောက်အထားစိစစ်ခြင်းကို အသုံးပြုသူက ပယ်ဖျက်ထားသည်။"</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"ကြိုးစာမှု အကြိမ်များနေ၏။ နောက်မှ ထပ်မံကြိုးစားပါ။"</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"အကြိမ်အရေအတွက် အလွန်များနေပါပြီ။ လက်ဗွေဖတ်စနစ်ကို ပိတ်ထားပါသည်။"</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"ပြန်ကြိုးစားပါ"</string>
@@ -990,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"ဖွင့်ရန်"</string>
<string name="sms" msgid="4560537514610063430">"စာပို့ရန်"</string>
<string name="add_contact" msgid="7867066569670597203">"ထည့်ရန်"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"သိမ်းဆည်သော နေရာ နည်းနေပါသည်"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"တချို့ စနစ်လုပ်ငန်းများ အလုပ် မလုပ်ခြင်း ဖြစ်နိုင်ပါသည်"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"စနစ်အတွက် သိုလှောင်ခန်း မလုံလောက်ပါ။ သင့်ဆီမှာ နေရာလွတ် ၂၅၀ MB ရှိတာ စစ်ကြည့်ပြီး စတင်ပါ။"</string>
@@ -1115,6 +1128,8 @@
<item quantity="one">Wi-Fi ကွန်ယက်ရရှိနိုင်သည်အား ဖွင့်ပါ</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"အများသုံး Wi‑Fi ကွန်ရက်သို့ ချိတ်ဆက်ပါ"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"အများသုံး Wi‑Fi ကွန်ရက်သို့ ချိတ်ဆက်နေသည်"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Wi‑Fi ကွန်ရက်သို့ ချိတ်ဆက်ပြီးပါပြီ"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Wi‑Fi ကွန်ရက်သို့ ချိတ်ဆက်၍ မရပါ"</string>
@@ -1169,7 +1184,7 @@
<string name="sms_control_title" msgid="7296612781128917719">"စာတိုပို့စနစ်(SMS)ဖြင့် စာများ ပို့သည်"</string>
<string name="sms_control_message" msgid="3867899169651496433">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> မှ စာ အမြောက်အများ ပို့နေပါသည်။ ဒီအပလီကေးရှင်းကို ဆက်လက်ပြီး လုပ်ဆောင်ရန် ခွင့်ပြုပါမလား"</string>
<string name="sms_control_yes" msgid="3663725993855816807">"ခွင့်ပြုရန်"</string>
- <string name="sms_control_no" msgid="625438561395534982">"ငြင်းပယ်ခြင်း"</string>
+ <string name="sms_control_no" msgid="625438561395534982">"ငြင်းပယ်ရန်"</string>
<string name="sms_short_code_confirm_message" msgid="1645436466285310855">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> မှ <b><xliff:g id="DEST_ADDRESS">%2$s</xliff:g></b> ကို စာတို ပို့ချင်ပါသည်"</string>
<string name="sms_short_code_details" msgid="5873295990846059400"><b>"ဒါက သင့် မိုဘိုင်း အကောင့် အတွက် "</b>" ကုန်ကျမှု ရှိလာနိုင်သည်။"</string>
<string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"ဒါက သင့် မိုဘိုင်း အကောင့် အတွက် ကုန်ကျမှု ရှိလာနိုင်သည်။"</b></string>
@@ -1413,6 +1428,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"သက်မှတ်နှုန်းထက် <xliff:g id="SIZE">%s</xliff:g> ကျော်နေပါသည်"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"နောက်ခံဒေတာ ကန့်သတ်ထားသည်"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"ကန့်သတ်ချက်ကိုဖယ်ရှားရန် တို့ပါ။"</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"ဒေတာသုံးစွဲမှု များပြားခြင်း"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"ပြီးခဲ့သည့်ရက်အနည်းငယ်က သင်၏ဒေတာသုံးစွဲမှုသည် ပုံမှန်ထက်ပိုများပါသည်။ သုံးစွဲမှုနှင့် ဆက်တင်များကိုကြည့်ရန် တို့ပါ။"</string>
<string name="ssl_certificate" msgid="6510040486049237639">"လုံခြံုမှုဆိုင်ရာ အသိအမှတ်ပြုလက်မှတ်"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"ဤအသိအမှတ်ပြုလက်မှတ်မှာ တရားဝင်သည်"</string>
<string name="issued_to" msgid="454239480274921032">"ထုတ်ပေးသည်-"</string>
@@ -1689,7 +1706,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>အထိ"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> အထိ (လာမည့် နှိုးစက်)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"\"မနှောင့်ယှက်ရန်\" ကို သင်ပိတ်လိုက်သည်အထိ"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"သင်ပိတ်လိုက်သည် အထိ"</string>
<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>
@@ -1738,9 +1755,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"ဘာသာစကားများအားလုံး"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"ဒေသအားလုံး"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"ရှာဖွေရန်"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"အလုပ်မုဒ်ကို ဖွင့်လိုပါသလား။"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"၎င်းသည် အက်ပ်၊ နောက်ခံတွင် စင့်ခ်လုပ်ခြင်းနှင့် သက်ဆိုင်ရာ ဝန်ဆောင်မှုများ အပါအဝင် သင်၏အလုပ်ပရိုဖိုင်ကို ဖွင့်လိုက်ပါမည်"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"အလုပ်ပရိုဖိုင် ဖွင့်လိုသလား။"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"သင်၏ အလုပ်အက်ပ်၊ အကြောင်းကြားချက်၊ ဒေတာနှင့် အခြားအလုပ်ပရိုဖိုင် ဝန်ဆောင်မှုများကို ဖွင့်လိုက်ပါမည်"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"ဖွင့်ပါ"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"သင့်ထံတွင် စာအသစ်များရောက်နေသည်"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"ကြည့်ရှုရန် SMS အက်ပ်ကိုဖွင့်ပါ"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"အချို့လုပ်ဆောင်ချက်များ ကန့်သတ်ချက်ရှိနိုင်သည်"</string>
@@ -1812,7 +1833,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"အက်ပ်လက်မှတ် မတူညီသည့်အတွက် ဖြတ်လမ်းလင့်ခ်များကို ပြန်ယူ၍မရပါ"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"ဖြတ်လမ်းလင့်ခ်ကို ပြန်ယူ၍မရပါ"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"ဖြတ်လမ်းလင့်ခ် ပိတ်ထားသည်"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"ဖြုတ်ရန်"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"မည်သို့ပင်ဖြစ်စေ ဖွင့်ရန်"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"အန္တရာယ်ရှိသည့် အက်ပ်ကို ဖြုတ်လိုပါသလား။"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> သည် <xliff:g id="APP_2">%2$s</xliff:g> ၏အချပ်များကို ပြသလိုသည်"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"တည်းဖြတ်ရန်"</string>
</resources>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index c3deb3e..4cbdd17 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Organisasjonen din kontrollerer denne enheten og kan overvåke nettverkstrafikk. Trykk for å få mer informasjon."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Enheten blir slettet"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Administratorappen kan ikke brukes. Enheten din blir nå tømt.\n\nTa kontakt med administratoren for organisasjonen din hvis du har spørsmål."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> har slått av utskrift."</string>
<string name="me" msgid="6545696007631404292">"Meg"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Innstillinger for nettbrettet"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Alternativer for TV"</string>
@@ -217,8 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Nødsituasjon"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Feilrapport"</string>
<string name="global_action_logout" msgid="935179188218826050">"Avslutt økten"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Skjermdump"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Utfør feilrapport"</string>
<string name="bugreport_message" msgid="398447048750350456">"Informasjon om tilstanden til enheten din samles inn og sendes som en e-post. Det tar litt tid fra du starter feilrapporten til e-posten er klar, så vær tålmodig."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interaktiv rapport"</string>
@@ -264,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Sikkermodus"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-system"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Bytt til den personlige profilen"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Bytt til jobbprofilen"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontakter"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"se kontaktene dine"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Gi <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> tilgang til kontaktene dine"</string>
@@ -417,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Lar appen bruke enhetens telefonfunksjoner. Med denne tillatelsen kan appen finne telefonnummer og enhets-ID-er, registrere om en samtale pågår, og se det eksterne nummeret det opprettes en forbindelse med via oppringing."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"send anrop gjennom systemet"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Lar appen sende anrop gjennom systemet for å forbedre anropsopplevelsen."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"les telefonnumre"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Gir appen tilgang til telefonnumrene til enheten."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"hindre nettbrettet fra å gå over til sovemodus"</string>
@@ -486,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Du flyttet fingeren for sakte. Prøv på nytt."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Ikke gjenkjent"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Maskinvare for fingeravtrykk er ikke tilgjengelig."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Fingeravtrykket kan ikke lagres. Fjern et eksisterende fingeravtrykk."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Tidsavbrudd for fingeravtrykk er nådd. Prøv på nytt."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Fingeravtrykk-operasjonen ble avbrutt."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"For mange forsøk. Prøve på nytt senere."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"For mange forsøk. Fingeravtrykkssensoren er slått av."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Prøv igjen."</string>
@@ -991,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Åpne"</string>
<string name="sms" msgid="4560537514610063430">"Melding"</string>
<string name="add_contact" msgid="7867066569670597203">"Legg til"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Lite ledig lagringsplass"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Enkelte systemfunksjoner fungerer muligens ikke slik de skal"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Det er ikke nok lagringsplass for systemet. Kontrollér at du har 250 MB ledig plass, og start på nytt."</string>
@@ -1116,6 +1131,8 @@
<item quantity="one">Åpent Wi-Fi-nettverk er tilgjengelig</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Koble til et åpent Wi‑Fi-nettverk"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Kobler til åpent Wi-Fi-nettverk"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Koblet til Wi-Fi-nettverk"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Kunne ikke koble til Wi-Fi-nettverket"</string>
@@ -1125,10 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi slås på automatisk"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Når du er i nærheten av et lagret nettverk av høy kvalitet"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Ikke slå på igjen"</string>
- <!-- no translation found for wifi_wakeup_enabled_title (6534603733173085309) -->
- <skip />
- <!-- no translation found for wifi_wakeup_enabled_content (189330154407990583) -->
- <skip />
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi er slått på automatisk"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Du er i nærheten av et lagret nettverk: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Logg på Wi-Fi-nettverket"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Logg på nettverk"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1415,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> over angitt grense."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Bakgrunnsdata er begrenset"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Trykk for å fjerne begrensningen."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Høy databruk"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Databruken din de siste dagene er høyere enn vanlig. Trykk for å se bruken og innstillingene."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Sikkerhetssertifikat"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Sertifikatet er gyldig."</string>
<string name="issued_to" msgid="454239480274921032">"Utstedt til:"</string>
@@ -1691,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Til <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Til <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (neste alarm)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Inntil du slår av Ikke forstyrr"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Til du slår av"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Inntil du slår av Ikke forstyrr"</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">"Skjul"</string>
@@ -1740,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Alle språk"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Alle områder"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Søk"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Vil du slå på jobbmodus?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Dette slår på jobbprofilen din, inkludert apper, synkronisering i bakgrunnen og relaterte funksjoner"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Slå på"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Du har nye meldinger"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Åpne SMS-appen for å se"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Enkelte funksjoner kan være begrenset"</string>
@@ -1814,10 +1837,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Kunne ikke gjenopprette snarveien på grunn av manglende samsvar for appsignaturen"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Kunne ikke gjenopprette snarveien"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Snarveien er slått av"</string>
- <!-- no translation found for harmful_app_warning_uninstall (3846265696369136266) -->
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
- <!-- no translation found for harmful_app_warning_launch_anyway (5784428382367400530) -->
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
<skip />
- <!-- no translation found for harmful_app_warning_title (2229996292333310435) -->
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
<skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> vil vise <xliff:g id="APP_2">%2$s</xliff:g>-utsnitt"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Endre"</string>
</resources>
diff --git a/core/res/res/values-ne/strings.xml b/core/res/res/values-ne/strings.xml
index 71e1258..014d4f2 100644
--- a/core/res/res/values-ne/strings.xml
+++ b/core/res/res/values-ne/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"तपाईंको संगठनले यस यन्त्रको व्यवस्थापन गर्दछ र नेटवर्क ट्राफिकको अनुगमन गर्न सक्छ। विवरणहरूका लागि ट्याप गर्नुहोस्।"</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"तपाईंको यन्त्र मेटिनेछ"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"प्रशासकको अनुप्रयोग प्रयोग गर्न मिल्दैन। तपाईंको यन्त्रको डेटा अब मेटाइने छ। \n\nतपाईंका कुनै प्रश्न भएमा, आफ्नो संगठनका प्रशासकलाई सम्पर्क गर्नुहोस्।"</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> ले छाप्ने कार्यलाई असक्षम पार्यो।"</string>
<string name="me" msgid="6545696007631404292">"मलाई"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"ट्याब्लेट विकल्पहरू"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV विकल्पहरू"</string>
@@ -217,8 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"आपतकालीन"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"बग रिपोर्ट"</string>
<string name="global_action_logout" msgid="935179188218826050">"सत्रको अन्त्य गर्नुहोस्"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"स्क्रिनसट"</string>
<string name="bugreport_title" msgid="2667494803742548533">"बग रिपोर्ट लिनुहोस्"</string>
<string name="bugreport_message" msgid="398447048750350456">"एउटा इमेल सन्देशको रूपमा पठाउनलाई यसले तपाईँको हालैको उपकरणको अवस्थाको बारेमा सूचना जम्मा गर्ने छ। बग रिपोर्ट सुरु गरेदेखि पठाउन तयार नभएसम्म यसले केही समय लिन्छ; कृपया धैर्य गर्नुहोस्।"</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"अन्तरक्रियामूलक रिपोर्ट"</string>
@@ -264,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"सुरक्षित मोड"</string>
<string name="android_system_label" msgid="6577375335728551336">"एन्ड्रोइड प्रणाली"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"व्यक्तिगत प्रोफाइलमा स्विच गर्नुहोस्"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"कार्य प्रोफाइलमा स्विच गर्नुहोस्"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"सम्पर्कहरू"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"तपाईँको सम्पर्कमाथि पहुँच गर्नुहोस्"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> लाई आफ्ना सम्पर्क ठेगानाहरूमाथि पहुँच राख्न दिनुहोस्"</string>
@@ -417,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"उपकरणको फोन विशेषताहरूको पहुँच गर्न अनुप्रयोगलाई अनुमति दिन्छ। यस अनुमतिले फोन नम्बर र उपकरणको IDs, कल सक्षम छ कि छैन र कलद्वारा जोडिएको टाढाको नम्बर निर्धारण गर्न अनुमति दिन्छ।"</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"प्रणाली मार्फत कल गर्न दिनुहोस्"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"कल गर्दाको अनुभवलाई सुधार्न यस अनुप्रयोगलाई प्रणाली मार्फत कलहरू गर्न अनुमति दिन्छ।"</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"फोन नम्बरहरू पढ्ने"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"उक्त अनुप्रयोगलाई यस यन्त्रको फोन नम्बरहरूमाथि पहुँच राख्न दिनुहोस्।"</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ट्याब्लेटलाई निन्द्रामा जानबाट रोक्नुहोस्"</string>
@@ -486,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"औंला निकै सुस्त सारियो। कृपया फेरि प्रयास गर्नुहोस्।"</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"चिनिएको छैन"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"औँठाछाप हार्डवेयर उपलब्ध छैन।"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"औँठाछाप भण्डारण गर्न सकिँदैन। कृपया अवस्थित औठाछाप हटाउनुहोस्।"</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"औँठाछापको समय सकिएको छ। फेरि प्रयास गर्नुहोस्।"</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"औँठाछाप सञ्चालन रद्द गरियो।"</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"धेरै प्रयासहरू। केहि समय पछि पुन: प्रयास गर्नुहोला"</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"अत्यन्त धेरै प्रयासहरू। फिंगरप्रिन्ट सेन्सरलाई असक्षम पारियो।"</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"पुन: प्रयास गर्नुहोला।"</string>
@@ -991,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"खोल्नुहोस्"</string>
<string name="sms" msgid="4560537514610063430">"सन्देश"</string>
<string name="add_contact" msgid="7867066569670597203">"थप्नुहोस्"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"भण्डारण ठाउँ सकिँदै छ"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"सायद केही प्रणाली कार्यक्रमहरूले काम गर्दैनन्"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"प्रणालीको लागि पर्याप्त भण्डारण छैन। तपाईँसँग २५० मेगा बाइट ठाउँ खाली भएको निश्चित गर्नुहोस् र फेरि सुरु गर्नुहोस्।"</string>
@@ -1122,6 +1137,8 @@
<item quantity="one">खुल्ला Wi-Fi सञ्जाल उपलब्ध छ</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"खुला Wi‑Fi नेटवर्कमा जडान गर्नुहोस्"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"खुला Wi‑Fi नेटवर्कमा जडान गर्दै"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Wi‑Fi नेटवर्कमा जडान गरियो"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Wi‑Fi नेटवर्कमा जडान गर्न सकिएन"</string>
@@ -1131,10 +1148,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi स्वतः सक्रिय हुनेछ"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"तपाईं कुनै सुरक्षित गरिएको उच्च गुणस्तरीय नेटवर्कको नजिक हुनुभएको अवस्थामा"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"फेरि सक्रिय नगर्नुहोला"</string>
- <!-- no translation found for wifi_wakeup_enabled_title (6534603733173085309) -->
- <skip />
- <!-- no translation found for wifi_wakeup_enabled_content (189330154407990583) -->
- <skip />
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi स्वतः सक्रिय गरियो"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"तपाईं कुनै सुरक्षित गरिएको नेटवर्क नजिकै हुनुहुन्छ: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Wi-Fi नेटवर्कमा साइन इन गर्नुहोस्"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"सञ्जालमा साइन इन गर्नुहोस्"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1421,6 +1436,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> उल्लेखित सीमा भन्दा बढी छ।"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"पृष्ठभूमिका डेटा प्रतिबन्धित गरिएको छ"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"सीमिततालाई हटाउन ट्याप गर्नुहोस्।"</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"धेरै मात्रामा डेटाको प्रयोग"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"तपाईं पछिल्ला केही दिनहरूमा सामान्यभन्दा धेरै डेटा प्रयोग गर्दै हुनुहुन्छ। प्रयोग तथा सेटिङहरू हेर्न ट्याप गर्नुहोस्।"</string>
<string name="ssl_certificate" msgid="6510040486049237639">"सुरक्षा प्रमाणपत्र"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"प्रमाणपत्र मान्य छ।"</string>
<string name="issued_to" msgid="454239480274921032">"द्वारा जारी गरिएको:"</string>
@@ -1697,7 +1714,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> सम्म"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (अर्को अलार्म) सम्म"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"तपाईंले बाधा नपुर्याउनुहोस् नामक सुविधालाई निष्क्रिय नगरेसम्म"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"तपाईंले निष्क्रिय नपार्नुभएसम्म"</string>
<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>
@@ -1746,9 +1763,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"सम्पूर्ण भाषाहरू"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"सबै क्षेत्रहरू"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"खोज"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"कार्य प्रोफाइल मोड सक्रिय गर्ने?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"यस कार्यले अनुप्रयोगहरू, पृष्ठभूमिको सिंक र सम्बन्धित सुविधाहरू लगायत तपाईंको कार्य प्रोफाइललाई सक्रिय गर्नेछ"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"सक्रिय गर्नुहोस्"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"तपाईंलाई नयाँ सन्देश आएको छ"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"हेर्नका लागि SMS अनुप्रयोग खोल्नुहोस्"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"केही कार्य सीमित हुनसक्छ"</string>
@@ -1820,10 +1843,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"अनुप्रयोगमा प्रयोग गरिने हस्ताक्षर नमिल्ने हुँदा सर्टकट पुनर्स्थापित गर्न सकिएन"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"सर्टकट पुनर्स्थापित गर्न सकिएन"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"सर्टकट असक्षम पारिएको छ"</string>
- <!-- no translation found for harmful_app_warning_uninstall (3846265696369136266) -->
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
- <!-- no translation found for harmful_app_warning_launch_anyway (5784428382367400530) -->
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
<skip />
- <!-- no translation found for harmful_app_warning_title (2229996292333310435) -->
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
<skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> ले <xliff:g id="APP_2">%2$s</xliff:g> का स्लाइसहरू देखाउन चाहन्छ"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"सम्पादन गर्नुहोस्"</string>
</resources>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 1d8619c..7aa8bf07 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Dit apparaat wordt beheerd door je organisatie. Het netwerkverkeer kan worden bijgehouden. Tik voor meer informatie."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Je apparaat wordt gewist"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"De beheer-app kan niet worden gebruikt. Je apparaat wordt nu gewist.\n\nNeem contact op met de beheerder van je organisatie als je vragen hebt."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Afdrukken uitgeschakeld door <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Ik"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Tabletopties"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV-opties"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Noodgeval"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Bugrapport"</string>
<string name="global_action_logout" msgid="935179188218826050">"Sessie beëindigen"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Screenshot"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Bugrapport genereren"</string>
<string name="bugreport_message" msgid="398447048750350456">"Hiermee worden gegevens over de huidige status van je apparaat verzameld en als e-mail verzonden. Wanneer u een bugrapport start, duurt het even voordat het kan worden verzonden. Even geduld alstublieft."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interactief rapport"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Veilige modus"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-systeem"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Overschakelen naar persoonlijk profiel"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Overschakelen naar werkprofiel"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Contacten"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"toegang krijgen tot je contacten"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Geef <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> toegang tot je contacten"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Hiermee kan de app toegang krijgen tot de telefoonfuncties van het apparaat, Met deze toestemming kan de app het telefoonnummer en de apparaat-ID\'s bepalen, of een oproep actief is, en het andere telefoonnummer waarmee wordt gebeld."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"oproepen doorschakelen via het systeem"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Hiermee kan de app de bijbehorende oproepen doorschakelen via het systeem om de belfunctionaliteit te verbeteren."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"telefoonnummers lezen"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Hiermee kan de app toegang krijgen tot de telefoonnummers van het apparaat."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"voorkomen dat tablet overschakelt naar slaapmodus"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Vinger te langzaam bewogen. Probeer het opnieuw."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Niet herkend"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hardware voor vingerafdruk niet beschikbaar."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Vingerafdruk kan niet worden opgeslagen. Verwijder een bestaande vingerafdruk."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Time-out bereikt voor vingerafdruk. Probeer het opnieuw."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Vingerafdrukbewerking geannuleerd."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Te veel pogingen. Probeer het later opnieuw."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Te veel pogingen. Vingerafdruksensor uitgeschakeld."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Probeer het opnieuw."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Openen"</string>
<string name="sms" msgid="4560537514610063430">"Bericht"</string>
<string name="add_contact" msgid="7867066569670597203">"Toevoegen"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Opslagruimte is bijna vol"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Bepaalde systeemfuncties werken mogelijk niet"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Onvoldoende opslagruimte voor het systeem. Zorg ervoor dat je 250 MB vrije ruimte hebt en start opnieuw."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Open wifi-netwerk beschikbaar</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Verbinding maken met een open wifi-netwerk"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Verbinding maken met een open wifi-netwerk…"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Verbonden met een wifi-netwerk"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Kan geen verbinding maken met het wifi-netwerk"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wifi wordt automatisch ingeschakeld"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Wanneer je in de buurt van een opgeslagen netwerk van hoge kwaliteit bent"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Niet weer inschakelen"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wifi automatisch ingeschakeld"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Je bent in de buurt van een opgeslagen netwerk: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Inloggen bij wifi-netwerk"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Inloggen bij netwerk"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> meer dan limiet."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Achtergrondgegevens beperkt"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Tik om beperking te verwijderen."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Hoog datagebruik"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Je datagebruik in de afgelopen dagen is hoger dan normaal. Tik om gebruik en instellingen weer te geven."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Beveiligingscertificaat"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Dit certificaat is geldig."</string>
<string name="issued_to" msgid="454239480274921032">"Uitgegeven voor:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Tot <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Tot <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (volgende wekker)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Totdat je \'Niet storen\' uitschakelt"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Totdat je uitschakelt"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Totdat u \'Niet storen\' uitschakelt"</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">"Samenvouwen"</string>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Alle talen"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Alle regio\'s"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Zoeken"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Werkmodus inschakelen?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Hiermee wordt je werkprofiel (waaronder apps, synchronisatie op de achtergrond en gerelateerde functies) ingeschakeld"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Inschakelen"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Je hebt nieuwe berichten"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Open je sms-app om ze te bekijken"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Bepaalde functionaliteit kan zijn beperkt"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Kan snelkoppeling niet herstellen omdat de app geen ondersteuning biedt voor \'Back-up maken en terugzetten\'"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Kan snelkoppeling niet herstellen vanwege een niet-overeenkomende app-ondertekening"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Kan snelkoppeling niet herstellen"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Snelkoppeling is uitgeschakeld"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> wil segmenten van <xliff:g id="APP_2">%2$s</xliff:g> weergeven"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Bewerken"</string>
</resources>
diff --git a/core/res/res/values-pa/strings.xml b/core/res/res/values-pa/strings.xml
index 8a11b9f..5412d47 100644
--- a/core/res/res/values-pa/strings.xml
+++ b/core/res/res/values-pa/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"ਤੁਹਾਡਾ ਸੰਗਠਨ ਇਸ ਡੀਵਾਈਸ ਦਾ ਪ੍ਰਬੰਧਨ ਕਰਦਾ ਹੈ ਅਤੇ ਨੈੱਟਵਰਕ ਟਰੈਫਿਕ ਦੀ ਨਿਗਰਾਨੀ ਕਰ ਸਕਦਾ ਹੈ। ਵੇਰਵਿਆਂ ਲਈ ਟੈਪ ਕਰੋ।"</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"ਤੁਹਾਡਾ ਡੀਵਾਈਸ ਮਿਟਾਇਆ ਜਾਏਗਾ"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"ਪ੍ਰਸ਼ਾਸਕ ਐਪ ਵਰਤੀ ਨਹੀਂ ਜਾ ਸਕਦੀ। ਹੁਣ ਤੁਹਾਡੇ ਡੀਵਾਈਸ ਦਾ ਡਾਟਾ ਮਿਟਾਇਆ ਜਾਵੇਗਾ।\n\nਜੇਕਰ ਤੁਹਾਡੇ ਕੋਲ ਕੋਈ ਸਵਾਲ ਹਨ, ਤਾਂ ਆਪਣੀ ਸੰਸਥਾ ਦੇ ਪ੍ਰਸ਼ਾਸਕ ਨੂੰ ਸੰਪਰਕ ਕਰੋ।"</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> ਵੱਲੋਂ ਪ੍ਰਿੰਟ ਕਰਨਾ ਬੰਦ ਕੀਤਾ ਗਿਆ।"</string>
<string name="me" msgid="6545696007631404292">"ਮੈਂ"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"ਟੈਬਲੈੱਟ ਵਿਕਲਪ"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV ਚੋਣਾਂ"</string>
@@ -217,8 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"ਸੰਕਟਕਾਲ"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"ਬਗ ਰਿਪੋਰਟ"</string>
<string name="global_action_logout" msgid="935179188218826050">"ਸੈਸ਼ਨ ਸਮਾਪਤ ਕਰੋ"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"ਸਕ੍ਰੀਨਸ਼ਾਟ"</string>
<string name="bugreport_title" msgid="2667494803742548533">"ਬਗ ਰਿਪੋਰਟ ਲਓ"</string>
<string name="bugreport_message" msgid="398447048750350456">"ਇਹ ਇੱਕ ਈਮੇਲ ਸੁਨੇਹਾ ਭੇਜਣ ਲਈ, ਤੁਹਾਡੇ ਵਰਤਮਾਨ ਡੀਵਾਈਸ ਬਾਰੇ ਜਾਣਕਾਰੀ ਇਕੱਠੀ ਕਰੇਗਾ। ਬੱਗ ਰਿਪੋਰਟ ਸ਼ੁਰੂ ਕਰਨ ਵਿੱਚ ਥੋੜ੍ਹਾ ਸਮਾਂ ਲੱਗੇਗਾ ਜਦੋਂ ਤੱਕ ਇਹ ਭੇਜੇ ਜਾਣ ਲਈ ਤਿਆਰ ਨਾ ਹੋਵੇ, ਕਿਰਪਾ ਕਰਕੇ ਧੀਰਜ ਰੱਖੋ।"</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"ਅੰਤਰਕਿਰਿਆਤਮਕ ਰਿਪੋਰਟ"</string>
@@ -264,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"ਸੁਰੱਖਿਅਤ ਮੋਡ"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android System"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"ਨਿੱਜੀ \'ਤੇ ਸਵਿੱਚ ਕਰੋ"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"ਕੰਮ \'ਤੇ ਸਵਿੱਚ ਕਰੋ"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"ਸੰਪਰਕ"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"ਆਪਣੇ ਸੰਪਰਕਾਂ ਤੱਕ ਪਹੁੰਚ ਕਰਨ"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ਨੂੰ ਤੁਹਾਡੇ ਸੰਪਰਕਾਂ \'ਤੇ ਪਹੁੰਚ ਕਰਨ ਦਿਓ"</string>
@@ -417,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"ਐਪ ਨੂੰ ਡੀਵਾਈਸ ਦੀਆਂ ਫ਼ੋਨ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਤੱਕ ਪਹੁੰਚ ਦੀ ਆਗਿਆ ਦਿੰਦਾ ਹੈ। ਇਹ ਇਜਾਜ਼ਤ ਐਪ ਨੂੰ ਫ਼ੋਨ ਨੰਬਰ ਅਤੇ ਡੀਵਾਈਸ ਆਈ.ਡੀ. ਨਿਰਧਾਰਤ ਕਰਨ ਦੀ ਆਗਿਆ ਦਿੰਦੀ ਹੈ, ਇੱਕ ਕਾਲ ਕਿਰਿਆਸ਼ੀਲ ਹੈ ਜਾਂ ਨਹੀਂ ਅਤੇ ਰਿਮੋਟ ਨੰਬਰ ਇੱਕ ਕਾਲ ਨਾਲ ਕਨੈਕਟ ਹੈ ਜਾਂ ਨਹੀਂ।"</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"ਸਿਸਟਮ ਰਾਹੀਂ ਕਾਲਾਂ ਰੂਟ ਕਰੋ"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"ਕਾਲ ਕਰਨ ਦੇ ਅਨੁਭਵ ਨੂੰ ਬਿਹਤਰ ਬਣਾਉਣ ਲਈ ਐਪ ਨੂੰ ਇਸਦੀਆਂ ਕਾਲਾਂ ਨੂੰ ਸਿਸਟਮ ਰਾਹੀਂ ਰੂਟ ਕਰਨ ਦੀ ਇਜਾਜ਼ਤ ਦਿੰਦੀ ਹੈ।"</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ਫ਼ੋਨ ਨੰਬਰ ਪੜ੍ਹੋ"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"ਐਪ ਨੂੰ ਡੀਵਾਈਸ ਦੇ ਫ਼ੋਨ ਨੰਬਰਾਂ \'ਤੇ ਪਹੁੰਚ ਕਰਨ ਦੀ ਇਜਾਜ਼ਤ ਦਿੰਦੀ ਹੈ।"</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ਟੈਬਲੈੱਟ ਨੂੰ ਸਲੀਪ ਤੇ ਜਾਣ ਤੋਂ ਰੋਕੋ"</string>
@@ -486,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"ਉਂਗਲ ਕਾਫ਼ੀ ਹੌਲੀ ਮੂਵ ਹੋਈ। ਕਿਰਪਾ ਕਰਕੇ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"ਪਛਾਣ ਨਹੀਂ ਹੋਈ"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"ਫਿੰਗਰਪ੍ਰਿੰਟ ਹਾਰਡਵੇਅਰ ਉਪਲਬਧ ਨਹੀਂ।"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"ਫਿੰਗਰਪ੍ਰਿੰਟ ਸਟੋਰ ਨਹੀਂ ਕੀਤਾ ਸਕਦਾ। ਕਿਰਪਾ ਕਰਕੇ ਇੱਕ ਮੌਜੂਦਾ ਫਿੰਗਰਪ੍ਰਿੰਟ ਹਟਾਓ।"</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"ਫਿੰਗਰਪ੍ਰਿੰਟ ਦਾ ਸਮਾਂ ਸਮਾਪਤ ਹੋ ਗਿਆ ਹੈ। ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"ਫਿੰਗਰ"</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"ਬਹੁਤ ਸਾਰੀਆਂ ਕੋਸ਼ਿਸ਼ਾਂ. ਬਾਅਦ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"ਹੱਦੋਂ ਵੱਧ ਕੋਸ਼ਿਸ਼ਾਂ। ਫਿੰਗਰਪ੍ਰਿੰਟ ਸੈਂਸਰ ਅਯੋਗ ਬਣਾਇਆ ਗਿਆ।"</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ."</string>
@@ -991,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"ਖੋਲ੍ਹੋ"</string>
<string name="sms" msgid="4560537514610063430">"ਸੁਨੇਹਾ ਭੇਜੋ"</string>
<string name="add_contact" msgid="7867066569670597203">"ਸ਼ਾਮਲ ਕਰੋ"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"ਸਟੋਰੇਜ ਦੀ ਜਗ੍ਹਾ ਖਤਮ ਹੋ ਰਹੀ ਹੈ"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"ਕੁਝ ਸਿਸਟਮ ਫੰਕਸ਼ਨ ਕੰਮ ਨਹੀਂ ਵੀ ਕਰ ਸਕਦੇ"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"ਸਿਸਟਮ ਲਈ ਲੋੜੀਂਦੀ ਸਟੋਰੇਜ ਨਹੀਂ ਹੈ। ਯਕੀਨੀ ਬਣਾਓ ਕਿ ਤੁਹਾਡੇ ਕੋਲ 250MB ਖਾਲੀ ਜਗ੍ਹਾ ਹੈ ਅਤੇ ਮੁੜ-ਚਾਲੂ ਕਰੋ।"</string>
@@ -1116,6 +1131,8 @@
<item quantity="other">ਉਪਲਬਧ ਵਾਈ-ਫਾਈ ਨੈੱਟਵਰਕ ਖੋਲ੍ਹੋ</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"ਖੁੱਲ੍ਹੇ ਵਾਈ‑ਫਾਈ ਨੈੱਟਵਰਕ ਨਾਲ ਕਨੈਕਟ ਹੋਵੋ"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"ਖੁੱਲ੍ਹੇ ਵਾਈ‑ਫਾਈ ਨੈੱਟਵਰਕ ਨਾਲ ਕਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"ਵਾਈ‑ਫਾਈ ਨੈੱਟਵਰਕ ਨਾਲ ਕਨੈਕਟ ਕੀਤਾ ਗਿਆ"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"ਵਾਈ‑ਫਾਈ ਨੈੱਟਵਰਕ ਨਾਲ ਕਨੈਕਟ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ"</string>
@@ -1125,10 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"ਵਾਈ‑ਫਾਈ ਸਵੈਚਲਿਤ ਤੌਰ \'ਤੇ ਚੱਲ ਪਵੇਗਾ"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"ਜਦੋਂ ਤੁਸੀਂ ਕਿਸੇ ਰੱਖਿਅਤ ਕੀਤੇ ਉੱਚ-ਗੁਣਵੱਤਾ ਵਾਲੇ ਨੈੱਟਵਰਕ ਦੇ ਨੇੜੇ ਹੋਵੋ"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"ਵਾਪਸ ਚਾਲੂ ਨਾ ਕਰੋ"</string>
- <!-- no translation found for wifi_wakeup_enabled_title (6534603733173085309) -->
- <skip />
- <!-- no translation found for wifi_wakeup_enabled_content (189330154407990583) -->
- <skip />
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"ਵਾਈ‑ਫਾਈ ਨੂੰ ਸਵੈਚਲਿਤ ਤੌਰ \'ਤੇ ਚਾਲੂ ਕੀਤਾ ਗਿਆ"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"ਤੁਸੀਂ ਕਿਸੇ ਰੱਖਿਅਤ ਕੀਤੇ ਨੈੱਟਵਰਕ ਦੇ ਨੇੜੇ ਹੋ: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"ਵਾਈ-ਫਾਈ ਨੈੱਟਵਰਕ \'ਤੇ ਸਾਈਨ-ਇਨ ਕਰੋ"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"ਨੈੱਟਵਰਕ \'ਤੇ ਸਾਈਨ-ਇਨ ਕਰੋ"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1416,6 +1431,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> ਤੋਂ ਵੱਧ ਨਿਰਦਿਸ਼ਟ ਸੀਮਾ।"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"ਪਿਛੋਕੜ ਡਾਟਾ ਪ੍ਰਤਿਬੰਧਿਤ"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"ਪਾਬੰਦੀ ਹਟਾਉਣ ਲਈ ਟੈਪ ਕਰੋ।"</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"ਜ਼ਿਆਦਾ ਡਾਟਾ ਵਰਤੋਂ"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"ਪਿਛਲੇ ਕੁਝ ਦਿਨਾਂ ਤੋਂ ਤੁਹਾਡੇ ਡਾਟੇ ਦੀ ਵਰਤੋਂ ਆਮ ਨਾਲੋਂ ਜ਼ਿਆਦਾ ਹੈ। ਵਰਤੋਂ ਅਤੇ ਸੈਟਿੰਗਾਂ ਦੇਖਣ ਲਈ ਟੈਪ ਕਰੋ।"</string>
<string name="ssl_certificate" msgid="6510040486049237639">"ਸੁਰੱਖਿਆ ਪ੍ਰਮਾਣ-ਪੱਤਰ"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"ਇਹ ਪ੍ਰਮਾਣ-ਪੱਤਰ ਵੈਧ ਹੈ।"</string>
<string name="issued_to" msgid="454239480274921032">"ਨੂੰ ਜਾਰੀ ਕੀਤਾ ਗਿਆ:"</string>
@@ -1692,7 +1709,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> ਤੱਕ"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> ਤੱਕ (ਅਗਲਾ ਅਲਾਰਮ)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"ਜਦੋਂ ਤੱਕ ਤੁਸੀਂ \'ਪਰੇਸ਼ਾਨ ਨਾ ਕਰੋ\' ਸੇਵਾ ਨੂੰ ਬੰਦ ਨਹੀਂ ਕਰਦੇ ਹੋ"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"ਜਦੋਂ ਤੱਕ ਤੁਸੀਂ ਬੰਦ ਨਹੀਂ ਕਰਦੇ ਹੋ"</string>
<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>
@@ -1741,9 +1758,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"ਸਾਰੀਆਂ ਭਾਸ਼ਾਵਾਂ"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"ਸਾਰੇ ਖੇਤਰ"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"ਖੋਜੋ"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"ਕੀ ਕਾਰਜ ਮੋਡ ਚਾਲੂ ਕਰੀਏ?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"ਇਸ ਨਾਲ ਐਪਾਂ, ਬੈਕਗ੍ਰਾਊਂਡ ਸਮਕਾਲੀਕਰਨ, ਅਤੇ ਸਬੰਧਿਤ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਸਮੇਤ ਤੁਹਾਡੇ ਕਾਰਜ ਪ੍ਰੋਫਾਈਲ ਨੂੰ ਚਾਲੂ ਕੀਤਾ ਜਾਵੇਗਾ"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"ਚਾਲੂ ਕਰੋ"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"ਤੁਹਾਨੂੰ ਨਵੇਂ ਸੁਨੇਹੇ ਪ੍ਰਾਪਤ ਹੋਏ ਹਨ"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"ਦੇਖਣ ਲਈ SMS ਐਪ ਖੋਲ੍ਹੋ"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"ਕੁਝ ਪ੍ਰਕਾਰਜਾਤਮਕਤਾ ਸੀਮਿਤ ਹੋ ਸਕਦੀ ਹੈ"</string>
@@ -1815,10 +1838,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"ਐਪ ਹਸਤਾਖਰ ਦਾ ਮੇਲ ਨਾ ਹੋਣ ਕਾਰਨ ਸ਼ਾਰਟਕੱਟ ਮੁੜ-ਬਹਾਲ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"ਸ਼ਾਰਟਕੱਟ ਮੁੜ-ਬਹਾਲ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"ਸ਼ਾਰਟਕੱਟ ਬੰਦ ਕੀਤਾ ਹੋਇਆ ਹੈ"</string>
- <!-- no translation found for harmful_app_warning_uninstall (3846265696369136266) -->
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
- <!-- no translation found for harmful_app_warning_launch_anyway (5784428382367400530) -->
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
<skip />
- <!-- no translation found for harmful_app_warning_title (2229996292333310435) -->
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
<skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> ਦੀ <xliff:g id="APP_2">%2$s</xliff:g> ਦੇ ਹਿੱਸੇ ਦਿਖਾਉਣ ਦੀ ਇੱਛਾ ਹੈ"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"ਸੰਪਾਦਨ ਕਰੋ"</string>
</resources>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 108b87b..952e55d 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -185,6 +185,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Twoja organizacja zarządza tym urządzeniem i może monitorować ruch w sieci. Kliknij, by dowiedzieć się więcej."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Twoje urządzenie zostanie wyczyszczone"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Tej aplikacji administratora nie można używać. Dane z urządzenia zostaną wykasowane.\n\nJeśli masz pytania, skontaktuj się z administratorem organizacji."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Drukowanie wyłączone przez: <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Ja"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opcje tabletu"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opcje telewizora"</string>
@@ -221,6 +222,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Alarmowy"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Zgłoszenie błędu"</string>
<string name="global_action_logout" msgid="935179188218826050">"Zakończ sesję"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Zrzut ekranu"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Zgłoś błąd"</string>
<string name="bugreport_message" msgid="398447048750350456">"Informacje o bieżącym stanie urządzenia zostaną zebrane i wysłane e-mailem. Przygotowanie zgłoszenia błędu do wysłania chwilę potrwa, więc zachowaj cierpliwość."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Raport interaktywny"</string>
@@ -268,8 +270,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Tryb awaryjny"</string>
<string name="android_system_label" msgid="6577375335728551336">"System Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Włącz profil osobisty"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Włącz profil do pracy"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontakty"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"dostęp do kontaktów"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Zezwalaj aplikacji <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> na dostęp do kontaktów"</string>
@@ -421,6 +425,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Pozwala aplikacji na dostęp do funkcji telefonicznych urządzenia. Aplikacja z tym uprawnieniem może odczytać numer telefonu i identyfikator urządzenia, sprawdzić, czy połączenie jest aktywne, oraz poznać numer, z którym jest nawiązane połączenie."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"przekazywanie połączeń przez system"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Zezwala aplikacji na przekazywanie połączeń przez system, by poprawić ich jakość."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"odczytywanie numerów telefonów"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Zezwala aplikacji na dostęp do numerów telefonów na urządzeniu."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"zapobieganie przechodzeniu tabletu do trybu uśpienia"</string>
@@ -490,10 +498,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Palec został obrócony zbyt wolno. Spróbuj ponownie."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nie rozpoznano odcisku palca."</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Czytnik linii papilarnych nie jest dostępny."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Nie można zapisać odcisku palca. Usuń istniejący odcisk palca."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Osiągnięto limit czasu odczytu linii papilarnych. Spróbuj ponownie."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Odczyt odcisku palca został anulowany."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Zbyt wiele prób. Spróbuj ponownie później."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Zbyt wiele prób. Czytnik linii papilarnych został wyłączony."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Spróbuj ponownie."</string>
@@ -1029,6 +1040,12 @@
<string name="browse" msgid="1245903488306147205">"Otwórz"</string>
<string name="sms" msgid="4560537514610063430">"Wyślij SMS-a"</string>
<string name="add_contact" msgid="7867066569670597203">"Dodaj"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Kończy się miejsce"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Niektóre funkcje systemu mogą nie działać"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Za mało pamięci w systemie. Upewnij się, że masz 250 MB wolnego miejsca i uruchom urządzenie ponownie."</string>
@@ -1158,6 +1175,8 @@
<item quantity="one">Dostępna jest otwarta sieć Wi-Fi</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Połącz się z otwartą siecią Wi-Fi"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Łączę się z otwartą siecią Wi-Fi"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Połączono z siecią Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Nie udało się połączyć z siecią Wi‑Fi"</string>
@@ -1167,6 +1186,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi włączy się automatycznie"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Gdy znajdziesz się w pobliżu zapisanej sieci o mocnym sygnale"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Nie włączaj ponownie"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi włączone automatycznie"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Jesteś w pobliżu zapisanej sieci: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Zaloguj się w sieci Wi-Fi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Zaloguj się do sieci"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1455,6 +1476,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> ponad określony limit"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Dane w tle są ograniczone"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Kliknij, by usunąć ograniczenie."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Duże użycie danych"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Od kilku dni przesyłasz więcej danych niż zwykle. Kliknij, by wyświetlić użycie i ustawienia."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Certyfikat zabezpieczeń"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Certyfikat jest ważny."</string>
<string name="issued_to" msgid="454239480274921032">"Wystawiony dla:"</string>
@@ -1751,7 +1774,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Do <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Do <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (następny alarm)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Do wyłączenia trybu Nie przeszkadzać"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Dopóki nie wyłączysz"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Do wyłączenia Nie przeszkadzać"</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">"Zwiń"</string>
@@ -1802,9 +1825,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Wszystkie języki"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Wszystkie kraje"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Szukaj"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Włączyć tryb do pracy?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Spowoduje to włączenie Twojego profilu do pracy, w tym aplikacji, synchronizacji w tle i innych funkcji."</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Włącz"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Masz nowe wiadomości"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Otwórz aplikację do SMS-ów, by wyświetlić wiadomość"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Niektóre funkcje mogą być niedostępne"</string>
@@ -1877,6 +1906,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Nie można przywrócić skrótu, bo aplikacja nie obsługuje tworzenia i przywracania kopii zapasowej"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Nie można przywrócić skrótu z powodu niezgodności podpisu aplikacji"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Nie można przywrócić skrótu"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Skrót jest wyłączony"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"Aplikacja <xliff:g id="APP_0">%1$s</xliff:g> chce pokazywać wycinki z aplikacji <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Edytuj"</string>
</resources>
diff --git a/core/res/res/values-pt-rBR/strings.xml b/core/res/res/values-pt-rBR/strings.xml
index 5201f14..11fc517 100644
--- a/core/res/res/values-pt-rBR/strings.xml
+++ b/core/res/res/values-pt-rBR/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Sua organização gerencia este dispositivo e pode monitorar o tráfego de rede. Toque para ver detalhes."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Seu dispositivo será limpo"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Não é possível usar o app para administrador. Seu dispositivo passará por uma limpeza agora.\n\nEm caso de dúvidas, entre em contato com o administrador da sua organização."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Impressão desativada por <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Eu"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opções do tablet"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opções de TV"</string>
@@ -263,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Modo de segurança"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Alternar para \"Pessoal\""</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Alternar para \"Trabalho\""</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Deslize até o perfil pessoal"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"Alternar para o perfil de trabalho"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Contatos"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"acesse seus contatos"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Permitir que <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acesse seus contatos"</string>
@@ -416,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Permite que o app acesse os recursos de telefonia do dispositivo. Esta permissão autoriza o app a determinar o número de telefone e IDs de dispositivo, quando uma chamada está ativa, e o número remoto conectado a uma chamada."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"encaminhar chamadas pelo sistema"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Permite que o app encaminhe suas chamadas por meio do sistema para melhorar a experiência com chamadas."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ler números de telefone"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Permite que o app acesse os número de telefone do dispositivo."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"impedir modo de inatividade do tablet"</string>
@@ -485,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"O movimento do dedo está muito lento. Tente novamente."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Não reconhecido"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hardware de impressão digital não disponível."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Não foi possível armazenar a impressão digital. Remova uma impressão digital já existente."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Tempo máximo para captura da impressão digital atingido. Tente novamente."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Operação de impressão digital cancelada."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Operação de impressão digital cancelada pelo usuário."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Excesso de tentativas. Tente novamente mais tarde."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Excesso de tentativas. Sensor de impressão digital desativado."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Tente novamente."</string>
@@ -990,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"Abrir"</string>
<string name="sms" msgid="4560537514610063430">"Mensagem"</string>
<string name="add_contact" msgid="7867066569670597203">"Adicionar"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Pouco espaço de armazenamento"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Algumas funções do sistema podem não funcionar"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Não há armazenamento suficiente para o sistema. Certifique-se de ter 250 MB de espaço livre e reinicie."</string>
@@ -1115,6 +1128,8 @@
<item quantity="other">Abrir redes Wi-Fi disponíveis</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Conectar-se a uma rede Wi‑Fi aberta"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Conectando-se a uma rede Wi‑Fi aberta"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Conectado a uma rede Wi‑Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Não foi possível conectar-se à rede Wi‑Fi"</string>
@@ -1412,6 +1427,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> acima do limite especificado."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Dados de segundo plano restritos"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Toque para remover a restrição."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Uso de dados excessivo"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Seu uso de dados nos últimos dias é maior que o normal. Toque para ver o uso e as configurações."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Certificado de segurança"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Este certificado é válido."</string>
<string name="issued_to" msgid="454239480274921032">"Emitido para:"</string>
@@ -1688,7 +1705,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Até às <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Até <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (próximo alarme)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Até que você desative \"Não perturbe\""</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Até você desativar"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Até que você desative \"Não perturbe\""</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">"Recolher"</string>
@@ -1737,9 +1754,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Todos os idiomas"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Todas as regiões"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Pesquisa"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Ativar modo de trabalho?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Isso ativará seu perfil de trabalho, incluindo apps, sincronização de segundo plano e recursos relacionados"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"Ativar o perfil de trabalho?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"Seus apps, notificações, dados e outros recursos do perfil de trabalho serão ativados"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Ativar"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Você tem mensagens novas"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Abra o app de SMS para ver"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Algumas funcionalidades são limitadas"</string>
@@ -1811,7 +1832,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Não foi possível restaurar o atalho devido à incompatibilidade de assinatura de apps"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Não foi possível restaurar o atalho"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"O atalho está desativado"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Desinstalar"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Iniciar mesmo assim"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Desinstalar app nocivo?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> quer mostrar partes do app <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Editar"</string>
</resources>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index d6b888a..a624066 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"A sua entidade gere este dispositivo e pode monitorizar o tráfego de rede. Toque para obter mais detalhes."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"O seu dispositivo será apagado"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Não é possível utilizar a aplicação de administração. O seu dispositivo será agora apagado.\n\nSe tiver questões, contacte o gestor da entidade."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Impressão desativada por <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Eu"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opções do tablet"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opções de TV"</string>
@@ -263,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Modo seguro"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Mudar para pessoal"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Mudar para trabalho"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Contactos"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"aceder aos contactos"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Permitir que a aplicação <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> aceda aos seus contactos"</string>
@@ -416,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Permite que a aplicação aceda às funcionalidades de telefone do dispositivo. Esta autorização permite que a aplicação determine o número de telefone e IDs do dispositivo, se alguma chamada está ativa e qual o número remoto ligado por uma chamada."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"encaminhar chamadas através do sistema"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Permite que a aplicação encaminhe as respetivas chamadas através do sistema de modo a melhorar a experiência da chamada."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ler os números de telefone"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Permite à aplicação aceder aos números de telefone do dispositivo."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"impedir que o tablet entre em inactividade"</string>
@@ -485,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Moveu o dedo demasiado lentamente. Tente novamente."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Não reconhecido"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hardware de impressão digital não disponível."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Não é possível armazenar a impressão digital. Remova uma impressão digital existente."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Foi atingido o limite de tempo da impressão digital. Tente novamente."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Operação de impressão digital cancelada."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Demasiadas tentativas. Tente novamente mais tarde."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Demasiadas tentativas. Sensor de impressões digitais desativado."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Tente novamente."</string>
@@ -990,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Abrir"</string>
<string name="sms" msgid="4560537514610063430">"Mensagem"</string>
<string name="add_contact" msgid="7867066569670597203">"Adicionar"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Está quase sem espaço de armazenamento"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Algumas funções do sistema poderão não funcionar"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Não existe armazenamento suficiente para o sistema. Certifique-se de que tem 250 MB de espaço livre e reinicie."</string>
@@ -1115,6 +1131,8 @@
<item quantity="one">Rede Wi-Fi aberta disponível</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Ligar à rede Wi-Fi aberta"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"A ligar à rede Wi-Fi aberta…"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Ligado à rede Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Não foi possível ligar à rede Wi-Fi"</string>
@@ -1412,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> acima do limite especificado."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Dados em seg. plano restringidos"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Toque para remover a restrição."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Elevada utilização de dados"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"A sua utilização de dados ao longo dos últimos dias é superior ao normal. Toque para ver a utilização e as definições."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Certificado de segurança"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Este certificado é válido."</string>
<string name="issued_to" msgid="454239480274921032">"Emitido para:"</string>
@@ -1688,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Até às <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Até <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (próximo alarme)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Até desativar Não incomodar"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Até ser desativado"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Até desativar Não incomodar"</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">"Reduzir"</string>
@@ -1737,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Todos os idiomas"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Todas as regiões"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Pesquisa"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Ativar o modo de trabalho?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Esta ação ativa o seu perfil de trabalho, incluindo as aplicações, a sincronização em segundo plano e as funcionalidades relacionadas"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Ativar"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Tem mensagens novas"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Abra a aplicação de SMS para ver"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Algumas funcionalid. limitadas"</string>
@@ -1811,7 +1837,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Não foi possível restaurar o atalho devido a uma falha de correspondência entre as assinaturas das aplicações."</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Não foi possível restaurar o atalho."</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"O atalho está desativado."</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Desinstalar"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Iniciar mesmo assim"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Pretende desinstalar a aplicação prejudicial?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"A aplicação <xliff:g id="APP_0">%1$s</xliff:g> pretende mostrar partes da aplicação <xliff:g id="APP_2">%2$s</xliff:g>."</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Editar"</string>
</resources>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 5201f14..11fc517 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Sua organização gerencia este dispositivo e pode monitorar o tráfego de rede. Toque para ver detalhes."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Seu dispositivo será limpo"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Não é possível usar o app para administrador. Seu dispositivo passará por uma limpeza agora.\n\nEm caso de dúvidas, entre em contato com o administrador da sua organização."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Impressão desativada por <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Eu"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opções do tablet"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opções de TV"</string>
@@ -263,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Modo de segurança"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Alternar para \"Pessoal\""</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Alternar para \"Trabalho\""</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Deslize até o perfil pessoal"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"Alternar para o perfil de trabalho"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Contatos"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"acesse seus contatos"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Permitir que <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> acesse seus contatos"</string>
@@ -416,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Permite que o app acesse os recursos de telefonia do dispositivo. Esta permissão autoriza o app a determinar o número de telefone e IDs de dispositivo, quando uma chamada está ativa, e o número remoto conectado a uma chamada."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"encaminhar chamadas pelo sistema"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Permite que o app encaminhe suas chamadas por meio do sistema para melhorar a experiência com chamadas."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ler números de telefone"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Permite que o app acesse os número de telefone do dispositivo."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"impedir modo de inatividade do tablet"</string>
@@ -485,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"O movimento do dedo está muito lento. Tente novamente."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Não reconhecido"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hardware de impressão digital não disponível."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Não foi possível armazenar a impressão digital. Remova uma impressão digital já existente."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Tempo máximo para captura da impressão digital atingido. Tente novamente."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Operação de impressão digital cancelada."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Operação de impressão digital cancelada pelo usuário."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Excesso de tentativas. Tente novamente mais tarde."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Excesso de tentativas. Sensor de impressão digital desativado."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Tente novamente."</string>
@@ -990,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"Abrir"</string>
<string name="sms" msgid="4560537514610063430">"Mensagem"</string>
<string name="add_contact" msgid="7867066569670597203">"Adicionar"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Pouco espaço de armazenamento"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Algumas funções do sistema podem não funcionar"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Não há armazenamento suficiente para o sistema. Certifique-se de ter 250 MB de espaço livre e reinicie."</string>
@@ -1115,6 +1128,8 @@
<item quantity="other">Abrir redes Wi-Fi disponíveis</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Conectar-se a uma rede Wi‑Fi aberta"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Conectando-se a uma rede Wi‑Fi aberta"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Conectado a uma rede Wi‑Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Não foi possível conectar-se à rede Wi‑Fi"</string>
@@ -1412,6 +1427,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> acima do limite especificado."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Dados de segundo plano restritos"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Toque para remover a restrição."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Uso de dados excessivo"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Seu uso de dados nos últimos dias é maior que o normal. Toque para ver o uso e as configurações."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Certificado de segurança"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Este certificado é válido."</string>
<string name="issued_to" msgid="454239480274921032">"Emitido para:"</string>
@@ -1688,7 +1705,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Até às <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Até <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (próximo alarme)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Até que você desative \"Não perturbe\""</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Até você desativar"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Até que você desative \"Não perturbe\""</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">"Recolher"</string>
@@ -1737,9 +1754,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Todos os idiomas"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Todas as regiões"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Pesquisa"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Ativar modo de trabalho?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Isso ativará seu perfil de trabalho, incluindo apps, sincronização de segundo plano e recursos relacionados"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"Ativar o perfil de trabalho?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"Seus apps, notificações, dados e outros recursos do perfil de trabalho serão ativados"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Ativar"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Você tem mensagens novas"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Abra o app de SMS para ver"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Algumas funcionalidades são limitadas"</string>
@@ -1811,7 +1832,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Não foi possível restaurar o atalho devido à incompatibilidade de assinatura de apps"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Não foi possível restaurar o atalho"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"O atalho está desativado"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Desinstalar"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Iniciar mesmo assim"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Desinstalar app nocivo?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> quer mostrar partes do app <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Editar"</string>
</resources>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 22b1bde..52995ae 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -183,6 +183,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Organizația dvs. gestionează acest dispozitiv și poate monitoriza traficul în rețea. Atingeți pentru mai multe detalii."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Datele de pe dispozitiv vor fi șterse"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Aplicația de administrare nu poate fi utilizată. Dispozitivul va fi șters.\n\nDacă aveți întrebări, contactați administratorul organizației dvs."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Printare dezactivată de <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Eu"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opțiuni tablet PC"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opțiuni TV"</string>
@@ -266,8 +267,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Mod sigur"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistemul Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Comutați la Personal"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Comutați la Serviciu"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Comutați la profilul personal"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"Comutați la profilul de serviciu"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Persoane de contact"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"acceseze persoanele de contact"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Permiteți <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> să vă acceseze agenda"</string>
@@ -419,6 +420,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Permite aplicației să acceseze funcțiile de telefon ale dispozitivului. Cu această permisiune aplicația stabilește numărul de telefon și ID-urile de dispozitiv, dacă un apel este activ, precum și numărul de la distanță conectat printr-un apel."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"să direcționeze apelurile prin intermediul sistemului"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Permiteți aplicației să direcționeze apelurile prin intermediul sistemului pentru a îmbunătăți calitatea apelurilor."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"să citească numerele de telefon"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Permite aplicației să acceseze numerele de telefon ale dispozitivului."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"împiedicarea computerului tablet PC să intre în repaus"</string>
@@ -488,10 +493,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Ați mișcat degetul prea lent. Încercați din nou."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nu este recunoscută"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hardware-ul pentru amprentă nu este disponibil."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Amprenta nu poate fi stocată. Eliminați o amprentă existentă."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Timpul pentru amprentare a expirat. Încercați din nou."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Operațiunea privind amprenta a fost anulată."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Operațiunea privind amprenta a fost anulată de utilizator."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Prea multe încercări. Încercați din nou mai târziu."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Prea multe încercări. Senzorul de amprentă este dezactivat."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Încercați din nou."</string>
@@ -1010,6 +1017,12 @@
<string name="browse" msgid="1245903488306147205">"Deschideți"</string>
<string name="sms" msgid="4560537514610063430">"Mesaj"</string>
<string name="add_contact" msgid="7867066569670597203">"Adăugați"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Spațiul de stocare aproape ocupat"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Este posibil ca unele funcții de sistem să nu funcționeze"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Spațiu de stocare insuficient pentru sistem. Asigurați-vă că aveți 250 MB de spațiu liber și reporniți."</string>
@@ -1137,6 +1150,8 @@
<item quantity="one">Rețea Wi-Fi deschisă disponibilă</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Conectați-vă la o rețea Wi‑Fi deschisă"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Se stabilește conexiunea la o rețea Wi‑Fi deschisă"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"S-a realizat conexiunea la rețeaua Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Nu s-a putut stabili conexiunea la rețeaua Wi-Fi"</string>
@@ -1435,6 +1450,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> peste limita specificată."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Datele de fundal restricționate"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Atingeți ca să eliminați restricția."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Utilizare mare a datelor"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Utilizarea datelor în ultimele zile este mai mare decât în mod normal. Atingeți pentru a vedea utilizarea și setările."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Certificat de securitate"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Certificatul este valid."</string>
<string name="issued_to" msgid="454239480274921032">"Emis către:"</string>
@@ -1721,7 +1738,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Până la <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Până la <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (următoarea alarmă)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Până când dezactivați „Nu deranja”"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Până când dezactivați"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Până când dezactivați „Nu deranja”"</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">"Restrângeți"</string>
@@ -1771,9 +1788,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Toate limbile"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Toate regiunile"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Căutați"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Activați modul de serviciu?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Astfel veți activa profilul de serviciu, inclusiv aplicațiile, sincronizarea în fundal și funcțiile asociate"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"Activați profilul de serviciu?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"Se vor activa aplicațiile dvs. de serviciu, notificările, datele și alte funcții ale profilului de serviciu"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Activați"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Aveți mesaje noi"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Deschideți aplicația pentru SMS-uri ca să vizualizați"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Unele funcții ar putea fi limitate"</string>
@@ -1846,7 +1867,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Nu s-a putut restabili comanda rapidă din cauza nepotrivirii semnăturii aplicației"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Nu s-a putut restabili comanda rapidă"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Comanda rapidă este dezactivată"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Dezinstalați"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Lansați oricum"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Dezinstalați aplicația dăunătoare?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> vrea să afișeze porțiuni din <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Editați"</string>
</resources>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 70dc651..0d62e75 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -185,6 +185,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Ваша организация управляет этим устройством и может отслеживать сетевой трафик. Подробнее…"</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Все данные с устройства будут удалены"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Невозможно использовать приложение для администрирования. С устройства будут удалены все данные.\n\nЕсли у вас возникли вопросы, обратитесь к администратору."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Функция печати отключена приложением \"<xliff:g id="OWNER_APP">%s</xliff:g>\""</string>
<string name="me" msgid="6545696007631404292">"Я"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Настройки планшетного ПК"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Настройки телевизора"</string>
@@ -269,8 +270,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Безопасный режим"</string>
<string name="android_system_label" msgid="6577375335728551336">"Система Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Перейти в личный профиль"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Перейти в рабочий профиль"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Контакты"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"доступ к контактам"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Разрешите приложению <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> доступ к контактам"</string>
@@ -422,6 +425,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Приложение получит доступ к функциям телефона на устройстве. Кроме того, оно сможет определять номера телефонов и серийные номера моделей, состояние активности вызова, а также удаленные номера, с которыми установлено соединение."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"перенаправлять звонки в системе"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Приложение сможет перенаправлять звонки в системе с целью улучшения качества связи."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"чтение номеров телефонов"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Разрешает приложению доступ к телефонным номерам устройства."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"Отключение спящего режима"</string>
@@ -491,10 +498,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Вы перемещали палец слишком медленно. Повторите попытку."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Не распознано"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Сканер недоступен"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Чтобы сохранить новый отпечаток, удалите существующий."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Превышено время ожидания. Повторите попытку."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Операция с отпечатком отменена."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Слишком много попыток. Повторите позже."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Слишком много попыток. Сканер отпечатков пальцев отключен."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Повторите попытку."</string>
@@ -1030,6 +1040,12 @@
<string name="browse" msgid="1245903488306147205">"Открыть"</string>
<string name="sms" msgid="4560537514610063430">"Написать SMS"</string>
<string name="add_contact" msgid="7867066569670597203">"Добавить"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Недостаточно памяти"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Некоторые функции могут не работать"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Недостаточно свободного места для системы. Освободите не менее 250 МБ дискового пространства и перезапустите устройство."</string>
@@ -1159,6 +1175,8 @@
<item quantity="other">Есть открытые сети Wi-Fi</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Подключитесь к открытой сети Wi‑Fi"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Подключение к открытой сети Wi‑Fi…"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Подключено к сети Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Не удалось подключиться к сети Wi‑Fi"</string>
@@ -1458,6 +1476,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"Лимит превышен на <xliff:g id="SIZE">%s</xliff:g>."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Фон. режим ограничен"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Нажмите, чтобы отменить ограничение."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Израсходовано много трафика"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"За последние несколько дней было использовано больше трафика, чем обычно. Нажмите, чтобы проверить его расход и настройки."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Сертификат безопасности"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Этот сертификат действителен."</string>
<string name="issued_to" msgid="454239480274921032">"Кому выдан:"</string>
@@ -1754,7 +1774,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"До <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"До <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (будильник)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Пока вы не отключите режим \"Не беспокоить\""</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Пока вы не отключите"</string>
<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>
@@ -1805,9 +1825,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Все языки"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Все регионы"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Поиск"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Включить рабочий режим?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Вы включите рабочий профиль, в том числе приложения, фоновую синхронизацию и связанные функции."</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Включить"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Новые сообщения"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Чтобы просмотреть, откройте приложение для обмена SMS"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Некоторые функции недоступны"</string>
@@ -1881,7 +1907,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Не удалось восстановить ярлык: некорректная подпись приложения"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Не удалось восстановить ярлык"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Ярлык отключен"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Удалить"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Запустить все равно"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Удалите опасное приложение"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"Приложение \"<xliff:g id="APP_0">%1$s</xliff:g>\" запрашивает разрешение на показ фрагментов приложения \"<xliff:g id="APP_2">%2$s</xliff:g>\"."</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Изменить"</string>
</resources>
diff --git a/core/res/res/values-si/strings.xml b/core/res/res/values-si/strings.xml
index 609f99f..846b0ee 100644
--- a/core/res/res/values-si/strings.xml
+++ b/core/res/res/values-si/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"ඔබගේ ආයතනය මෙම උපාංගය කළමනාකරණය කරන අතර එය ජාල තදබදය නිරීක්ෂණය කළ හැක. විස්තර සඳහා තට්ටු කරන්න."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"ඔබගේ උපාංගය මකා දැමෙනු ඇත"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"පරිපාලක යෙදුම භාවිතා කළ නොහැක. ඔබගේ උපාංගය දැන් මකා දමනු ඇත.\n\nඔබට ප්රශ්න තිබේ නම්, ඔබගේ සංවිධානයේ පරිපාලකව අමතන්න."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> විසින් මුද්රණය කිරීම අබල කර ඇත."</string>
<string name="me" msgid="6545696007631404292">"මම"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"ටැබ්ලට විකල්ප"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"රූපවාහිනී විකල්ප"</string>
@@ -263,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"ආරක්ෂිත ආකාරය"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android පද්ධතිය"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"පුද්ගලික වෙත මාරු වන්න"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"කාර්යාලය වෙත මාරු වන්න"</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"පුද්ගලික පැතිකඩ වෙත මාරුවන්න"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"කාර්යාල පැතිකඩ වෙත මාරු වන්න"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"සම්බන්ධතා"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"ඔබේ සම්බන්ධතාවලට පිවිසෙන්න"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> වෙත ඔබගේ සබඳතා ප්රවේශ කිරීමට අවසර දෙන්න"</string>
@@ -416,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"උපාංගයේ දුරකථන විශේෂාංග වෙත ප්රවේශයට යෙදුමට ඉඩ දෙයි. ඇමතුම සක්රිය වුවත්, සහ ඇමතුමකින් දුරස්ථ අංකය සම්බන්ධ වුවත් දුරකථන අංකය සහ උපාංග ID හඳුනා ගැනීමට මෙම අවසරය යෙදුමට ඉඩ දෙයි."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"පද්ධතිය හරහා ඇමතුම් මාර්ගගත කරන්න"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"ඇමතුම් අත්දැකීම වැඩිදියුණු කිරීම සඳහා යෙදුමට පද්ධතිය හරහා එහි ඇමතුම් මාර්ගගත කිරීමට ඉඩ දෙයි."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"දුරකථන අංක කියවන්න"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"උපාංගයේ දුරකථන අංක වෙත ප්රවේශයට යෙදුමට ඉඩ දෙයි."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ටැබ්ලටය නින්දෙන් වැළක්වීම"</string>
@@ -485,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"ඇඟිල්ල වඩා සෙමෙන් ගෙන යන ලදි. කරුණාකර නැවත උත්සාහ කරන්න."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"අඳුනාගත නොහැක"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"ඇඟිලි සලකුණු දෘඪාංගය ලද නොහැකිය."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"ඇඟිලි සලකුණ ගබඩා කළ නොහැක. දැනට පවතින ඇඟිලි සලකුණක් ඉවත් කරන්න."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"ඇඟිලි සලකුණු කාල නිමාව ළඟා විය. නැවත උත්සාහ කරන්න."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"ඇඟිලි සලකුණු මෙහෙයුම අවලංගු කරන ලදී."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"පරිශීලක විසින් ඇඟිලි සලකුණු මෙහෙයුම අවසන් කරන ලදී."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"උත්සාහයන් ඉතා වැඩි ගණනකි. කරුණාකර පසුව නැවත උත්සාහ කරන්න."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"උත්සාහයන් ඉතා වැඩි ගණනකි. ඇඟිලි සලකුණු සංවේදකය අබල කරන ලදී."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"නැවත උත්සාහ කරන්න."</string>
@@ -992,6 +999,12 @@
<string name="browse" msgid="1245903488306147205">"විවෘත කරන්න"</string>
<string name="sms" msgid="4560537514610063430">"පණිවිඩය"</string>
<string name="add_contact" msgid="7867066569670597203">"එක් කරන්න"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"ආචයනය ඉඩ ප්රමාණය අඩු වී ඇත"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"සමහර පද්ධති කාර්යයන් ක්රියා නොකරනු ඇත"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"පද්ධතිය සඳහා ප්රමාණවත් ඉඩ නොමැත. ඔබට 250MB නිදහස් ඉඩක් තිබෙන ඔබට තිබෙන බව සහතික කරගෙන නැවත උත්සාහ කරන්න."</string>
@@ -1117,6 +1130,8 @@
<item quantity="other">විවෘත Wi-Fi ජාල තිබේ</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"විවෘත Wi-Fi ජාලය වෙත සම්බන්ධ වෙන්න"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"විවෘත Wi-Fi ජාලය වෙත සම්බන්ධ වෙමින්"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Wi-Fi ජාලයක් වෙත සම්බන්ධ විය"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Wi-Fi ජාලයක් වෙත සම්බන්ධ විය නොහැකි විය"</string>
@@ -1414,6 +1429,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"සඳහන් කළ සීමාවට වඩා <xliff:g id="SIZE">%s</xliff:g> වැඩිය."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"පසුබිම් දත්ත සිමා කරන ලදි"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"සීමා කිරීම ඉවත් කිරීමට තට්ටු කරන්න."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"විශාල දත්ත භාවිතය"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"පසුගිය දින කිහිපය පුරා ඔබගේ දත්ත භාවිතය සාමාන්යයට වඩා වැඩිය. භාවිතය සහ සැකසීම් බැලීම සඳහා තට්ටු කරන්න."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"ආරක්ෂිත සහතිකය"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"මෙම සහතිකය වලංගුයි."</string>
<string name="issued_to" msgid="454239480274921032">"ලබාදුන්නේ:"</string>
@@ -1690,7 +1707,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> තෙක්"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> තෙක් (ඊළඟ එලාමය)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"බාධා නොකරන්න ඔබ අක්රිය කරන තුරු"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"ඔබ ක්රියාවිරහිත කරන තුරු"</string>
<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>
@@ -1739,9 +1756,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"සියලු භාෂා"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"සියලු ප්රදේශ"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"සෙවීම"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"කාර්යාල මෝඩය සක්රිය කරන්නද?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"මෙය මඟින් යෙදුම්, පසුබිම සමමුහුර්ත කිරීම, සහ සම්බන්ධිත විශේෂාංග ඇතුළුව, කාර්යාල පැතිකඩ සක්රිය කෙරේ"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"කාර්යාල පැතිකඩ ක්රියාත්මක කරන්නද?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"ඔබගේ වැඩ යෙදුම්, දැනුම්දීම්, දත්ත සහ වෙනත් කාර්යාල පැතිකඩ විශේෂාංග ක්රියාත්මක කරනු ඇත"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"ක්රියාත්මක කරන්න"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"ඔබට නව පණිවිඩ තිබේ"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"බැලීමට විවෘත SMS යෙදුම විවෘත කරන්න"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"ඇතැම් ක්රියාකාරිත්ව සීමිත විය හැකිය"</string>
@@ -1813,7 +1834,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"යෙදුම් අත්සන නොගැළපෙන බැවින් කෙටි මග ප්රතිසාධනය කළ නොහැකි විය"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"කෙටි මග ප්රතිසාධනය කළ නොහැකි විය"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"කෙටි මග අබල කර ඇත"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"අස්ථාපනය කරන්න"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"කෙසේ වුවත් ආරම්භ කරන්න"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"හානිකර යෙදුම අස්ථාපනය කරන්නද?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> හට කොටස් <xliff:g id="APP_2">%2$s</xliff:g>ක් පෙන්වීමට අවශ්යයි"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"සංස්කරණය"</string>
</resources>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 1fb90ff..8755d94 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -185,6 +185,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Vaša organizácia spravuje toto zariadenie a môže sledovať sieťovú premávku. Klepnutím zobrazíte podrobnosti."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Vaše zariadenie bude vymazané"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Daná aplikácia na správu sa nedá použiť. Vaše zariadenie bude vymazané.\n\nV prípade otázok kontaktujte správcu organizácie."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Tlač zakázala aplikácia <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Ja"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Možnosti tabletu"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Možnosti televízora"</string>
@@ -221,6 +222,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Tiesňové volanie"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Hlásenie o chybách"</string>
<string name="global_action_logout" msgid="935179188218826050">"Ukončiť reláciu"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Snímka obrazovky"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Vytvoriť hlásenie chyby"</string>
<string name="bugreport_message" msgid="398447048750350456">"Týmto zhromaždíte informácie o aktuálnom stave zariadenia. Informácie je potom možné odoslať e-mailom, chvíľu však potrvá, kým bude hlásenie chyby pripravené na odoslanie. Prosíme vás preto o trpezlivosť."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interaktívne nahlásenie"</string>
@@ -268,8 +270,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Núdzový režim"</string>
<string name="android_system_label" msgid="6577375335728551336">"Systém Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Prepnúť na osobný"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Prepnúť na pracovný"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontakty"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"prístup ku kontaktom"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Povoľte aplikácii <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> prístup k vašim kontaktom"</string>
@@ -421,6 +425,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Umožňuje aplikácii pristupovať k telefónnym funkciám zariadenia. Aplikácia s týmto povolením môže určiť telefónne číslo a ID zariadenia, či práve prebieha hovor, a vzdialené číslo, s ktorým je prostredníctvom hovoru nadviazané spojenie."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"presmerovanie hovorov cez systém"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Umožňuje aplikácii presmerovať hovory cez systém na účely zlepšenia kvality hovorov."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"čítanie telefónnych čísel"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Umožňuje aplikácii pristupovať k telefónnym číslam zariadenia."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"zabránenie prechodu tabletu do režimu spánku"</string>
@@ -490,10 +498,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Pohli ste prstom príliš pomaly. Skúste to znova."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nebol rozpoznaný"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hardvér na snímanie odtlačku prsta nie je k dispozícii"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Odtlačok prsta nie je možné uložiť. Odstráňte existujúci odtlačok."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Časový limit rozpoznania odtlačku vypršal. Skúste to znova."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Operácia týkajúca sa odtlačku prsta bola zrušená"</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Príliš veľa pokusov. Skúste to znova neskôr."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Príliš veľa pokusov. Senzor odtlačkov prstov bol deaktivovaný."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Skúste to znova"</string>
@@ -1029,6 +1040,12 @@
<string name="browse" msgid="1245903488306147205">"Otvoriť"</string>
<string name="sms" msgid="4560537514610063430">"Správa"</string>
<string name="add_contact" msgid="7867066569670597203">"Pridať"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Nedostatok ukladacieho priestoru"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Niektoré systémové funkcie nemusia fungovať"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"V úložisku nie je dostatok voľného miesta pre systém. Zaistite, aby ste mali 250 MB voľného miesta a zariadenie reštartujte."</string>
@@ -1158,6 +1175,8 @@
<item quantity="one">K dispozícii je verejná sieť Wi‑Fi</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Pripojenie k otvorenej sieti Wi‑Fi"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Pripája sa k otvorenej sieti Wi‑Fi"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Pripojenie k sieti Wi‑Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"K sieti Wi‑Fi sa nepodarilo pripojiť"</string>
@@ -1167,6 +1186,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi sa zapne automaticky"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Keď budete v blízkosti kvalitnej uloženej siete"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Znova nezapínať"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Pripojenie Wi‑Fi sa zaplo automaticky"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Ste v blízkosti uloženej siete: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Prihlásiť sa do siete Wi‑Fi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Prihlásenie do siete"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1455,6 +1476,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> nad stanovenou hranicou."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Dátové prenosy obmedzené"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Klepnutím odstránite obmedzenie."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Vysoká spotreba dát"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Vaša spotreba dát za niekoľko posledných dní je vyššia ako zvyčajne. Klepnutím zobrazíte spotrebu a nastavenia."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Certifikát zabezpečenia"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Certifikát je platný."</string>
<string name="issued_to" msgid="454239480274921032">"Vydané pre:"</string>
@@ -1751,7 +1774,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Do <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Do <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (ďalší budík)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Dokiaľ nevypnete režim Nerušiť"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Dokiaľ túto funkciu nevypnete"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Dokiaľ nevypnete režim Nerušiť"</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">"Zbaliť"</string>
@@ -1802,9 +1825,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Všetky jazyky"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Všetky regióny"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Vyhľadávanie"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Aktivovať pracovný režim?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Týmto aktivujete pracovný profil vrátane aplikácií, synchronizácie na pozadí a súvisiacich funkcií"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Zapnúť"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Máte nové správy."</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Otvorte aplikáciu pre SMS a zobrazte správu"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Niektoré funkcie môžu byť obmedzené"</string>
@@ -1877,6 +1906,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Odkaz sa nepodarilo obnoviť, pretože aplikácia nepodporuje zálohovanie a obnovu"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Odkaz sa nepodarilo obnoviť pre nesúlad podpisov aplikácie"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Odkaz sa nepodarilo obnoviť"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Skratka je zakázaná"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> chce zobrazovať rezy z aplikácie <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Upraviť"</string>
</resources>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 3c89e75..5657fe5 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -185,6 +185,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Vaša organizacija upravlja to napravo in lahko nadzira omrežni promet. Dotaknite se za podrobnosti."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Podatki v napravi bodo izbrisani"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Skrbniške aplikacije ni mogoče uporabljati. Podatki v napravi bodo izbrisani.\n\nČe imate vprašanja, se obrnite na skrbnika organizacije."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Tiskanje je onemogočil pravilnik <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Jaz"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Možnosti tabličnega računalnika"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Možnosti televizorja"</string>
@@ -269,8 +270,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Varni način"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistem Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Preklop na osebni profil"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Preklop na delovni profil"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Stiki"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"dostop do stikov"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Aplikaciji <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> omogočite dostop do stikov"</string>
@@ -422,6 +425,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Aplikaciji omogoča dostop do funkcij telefona v napravi. S tem dovoljenjem lahko aplikacija določi telefonsko številko in ID-je naprave, določi lahko tudi, ali je klic aktiven, in oddaljeno številko, s katero je klic povezan."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"Usmeri klice prek sistema"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Dovoli, da aplikacija usmeri klice prek sistema, da se tako izboljša izkušnja klicanja."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"branje telefonskih številk"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Aplikaciji dovoljuje dostop do telefonskih številk v napravi."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"preprečitev prehoda tabličnega računalnika v stanje pripravljenosti"</string>
@@ -491,10 +498,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Prepočasen premik prsta. Poskusite znova."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Ni prepoznano"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Strojna oprema za prstne odtise ni na voljo."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Prstnega odtisa ni mogoče shraniti. Odstranite obstoječi prstni odtis."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Dosežena časovna omejitev za prstni odtis. Poskusite znova."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Dejanje s prstnim odtisom je bilo preklicano."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Preveč poskusov. Poskusite znova pozneje."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Preveč poskusov. Tipalo prstnih odtisov je onemogočeno."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Poskusite znova."</string>
@@ -1030,6 +1040,12 @@
<string name="browse" msgid="1245903488306147205">"Odpri"</string>
<string name="sms" msgid="4560537514610063430">"Sporočilo"</string>
<string name="add_contact" msgid="7867066569670597203">"Dodaj"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Prostor za shranjevanje bo pošel"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Nekatere sistemske funkcije morda ne delujejo"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"V shrambi ni dovolj prostora za sistem. Sprostite 250 MB prostora in znova zaženite napravo."</string>
@@ -1159,6 +1175,8 @@
<item quantity="other">Na voljo so odprta omrežja Wi-Fi</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Vzpostavite povezavo z odprtim omrežjem Wi‑Fi"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Vzpostavljanje povezave z odprtim omrežjem Wi‑Fi"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Povezava z omrežjem Wi-Fi je vzpostavljena"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Povezave z omrežjem Wi-Fi ni bilo mogoče vzpostaviti"</string>
@@ -1458,6 +1476,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"Velikost <xliff:g id="SIZE">%s</xliff:g> presega omejitev"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Podatki v ozadju so omejeni"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Dotaknite se za odstr. omejitve."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Velika prenesena količina podatkov"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Prenesena količina podatkov v zadnjih nekaj dneh je večja kot običajno. Dotaknite se za ogled uporabe in nastavitev."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Varnostno potrdilo"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"To potrdilo je veljavno."</string>
<string name="issued_to" msgid="454239480274921032">"Izdano za:"</string>
@@ -1754,7 +1774,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Do <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Do <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (naslednji alarm)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Dokler ne izklopite načina »ne moti«"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Dokler ne izklopite"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Dokler ne izklopite načina »ne moti«"</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">"Strni"</string>
@@ -1805,9 +1825,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Vsi jeziki"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Vse regije"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Išči"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Želite vklopiti delovni način?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"S tem bo vklopljen delovni profil, vključno z aplikacijami, sinhronizacijo v ozadju in povezanimi funkcijami."</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Vklop"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Imate nova sporočila."</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Za ogled odprite aplikacijo za SMS-je"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Nekatere funkcije bodo omejene"</string>
@@ -1881,7 +1907,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Bližnjice ni bilo mogoče obnoviti zaradi neujemanja podpisa aplikacije"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Bližnjice ni bilo mogoče obnoviti"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Bližnjica je onemogočena"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Odstrani"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Vseeno zaženi"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Želite odstraniti škodljivo aplikacijo?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"Aplikacija <xliff:g id="APP_0">%1$s</xliff:g> želi prikazati izreze aplikacije <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Urejanje"</string>
</resources>
diff --git a/core/res/res/values-sq/strings.xml b/core/res/res/values-sq/strings.xml
index e6d60d4..8309fe9 100644
--- a/core/res/res/values-sq/strings.xml
+++ b/core/res/res/values-sq/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Organizata jote e menaxhon këtë pajisje dhe mund të monitorojë trafikun e rrjetit. Trokit për detaje."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Pajisja do të spastrohet"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Aplikacioni i administratorit nuk mund të përdoret. Pajisja jote tani do të fshihet.\n\nNëse ke pyetje, kontakto me administratorin e organizatës."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Printimi është çaktivizuar nga <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Unë"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opsionet e tabletit"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Opsionet e televizorit"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Urgjenca"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Raporti i defekteve në kod"</string>
<string name="global_action_logout" msgid="935179188218826050">"Jepi fund sesionit"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Pamja e ekranit"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Merr raportin e defekteve në kod"</string>
<string name="bugreport_message" msgid="398447048750350456">"Ky funksion mundëson mbledhjen e informacioneve mbi gjendjen aktuale të pajisjes për ta dërguar si mesazh mail-i. Do të duhet pak kohë nga nisja e raportit të defekteve në kod. Faleminderit për durimin."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Raport interaktiv"</string>
@@ -262,8 +264,8 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Modaliteti i sigurisë"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistemi Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Ndryshoje te \"Personale\""</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Ndryshoje te \"Puna\""</string>
+ <string name="user_owner_label" msgid="8836124313744349203">"Kalo te profili personal"</string>
+ <string name="managed_profile_label" msgid="8947929265267690522">"Kalo te profili i punës"</string>
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontaktet"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"qasu te kontaktet e tua"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Lejo që <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> të ketë qasje te kontaktet e tua"</string>
@@ -415,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Lejon aplikacionin të hyjë në funksionet telefonike të pajisjes. Kjo leje i mundëson aplikacionit të përcaktojë numrin e telefonit dhe ID-të e pajisjes, nëse një telefonatë është aktive apo nëse numri në distancë është i lidhur me një telefonatë."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"kalon telefonatat përmes sistemit"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Lejon që aplikacioni të kalojë telefonatat përmes sistemit për të përmirësuar përvojën e telefonatës."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"lexo numrat e telefonit"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Lejon që aplikacioni të ketë qasje te numrat e telefonit të pajisjes."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"parandalo kalimin e tabletit në fjetje"</string>
@@ -484,10 +490,12 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Gishti lëvizi shumë ngadalë. Provo përsëri."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Nuk njihet"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hardueri i gjurmës së gishtit nuk mundësohet."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Gjurma e gishtit nuk mund të ruhet. Hiq një gjurmë gishti ekzistuese."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Koha e veprimit për gjurmën e gishtit skadoi. Provo përsëri."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Operacioni i gjurmës së gishtit u anulua."</string>
+ <string name="fingerprint_error_user_canceled" msgid="7999639584615291494">"Veprimi i gjurmës së gishtit u anulua nga përdoruesi."</string>
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Keni bërë shumë tentativa. Provo përsëri më vonë."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Shumë përpjekje. Sensori i gjurmës së gishtit u çaktivizua."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Provo përsëri."</string>
@@ -989,6 +997,12 @@
<string name="browse" msgid="1245903488306147205">"Hap"</string>
<string name="sms" msgid="4560537514610063430">"Mesazh"</string>
<string name="add_contact" msgid="7867066569670597203">"Shto"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Hapësira ruajtëse po mbaron"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Disa funksione të sistemit mund të mos punojnë"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Nuk ka hapësirë të mjaftueshme ruajtjeje për sistemin. Sigurohu që të kesh 250 MB hapësirë të lirë dhe pastaj të rifillosh."</string>
@@ -1114,6 +1128,8 @@
<item quantity="one">Rrjet i hapur Wi-Fi në përdorim</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Lidhu me rrjetin e hapur Wi‑Fi"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Po lidhet me rrjetin e hapur Wi‑Fi"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Lidhur me rrjetin e hapur Wi‑Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Nuk mund të lidhet me rrjetin Wi‑Fi"</string>
@@ -1123,6 +1139,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi do të aktivizohet automatikisht"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Kur ndodhesh pranë një rrjeti të ruajtur me cilësi të lartë"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Mos e aktivizo përsëri"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi u aktivizua automatikisht"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Ndodhesh pranë një rrjeti të ruajtur: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Identifikohu në rrjetin Wi-Fi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Identifikohu në rrjet"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1410,6 +1428,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> mbi kufirin e përcaktuar."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Të dhënat e sfondit janë të kufizuara"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Trokit për të hequr kufizimin."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Përdorim i madh të dhënash"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Përdorimi i të dhënave të tua gjatë ditëve të fundit është më i madh se normalisht. Trokit për të parë përdorimin dhe cilësimet."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Certifikatë sigurie"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Certifikata është e vlefshme."</string>
<string name="issued_to" msgid="454239480274921032">"Lëshuar për:"</string>
@@ -1686,7 +1706,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Deri në <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Deri në <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (alarmi tjetër)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Deri sa të çaktivizosh \"Mos shqetëso\""</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Derisa ta çaktivizosh"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Deri sa të çaktivizosh gjendjen \"Mos shqetëso\""</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">"Shpalos"</string>
@@ -1735,9 +1755,13 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Të gjitha gjuhët"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Të gjitha rajonet"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Kërko"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Të aktivizohet modaliteti i punës?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Kjo do të aktivizojë profilin tënd të punës, duke përfshirë aplikacionet, sinkronizimin në sfond dhe funksionet e lidhura"</string>
+ <string name="work_mode_off_title" msgid="1118691887588435530">"Të aktivizohet profili i punës?"</string>
+ <string name="work_mode_off_message" msgid="5130856710614337649">"Aplikacionet e punës, njoftimet, të dhënat e tua dhe funksionet e tjera të profilit të punës do të aktivizohen"</string>
<string name="work_mode_turn_on" msgid="2062544985670564875">"Aktivizo"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Ke mesazhe të reja"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Hap aplikacionin SMS për ta parë"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Disa funksione mund të jenë të kufizuara"</string>
@@ -1808,6 +1832,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Nuk mund të restaurohej shkurtorja sepse aplikacioni nuk mbështet rezervimin dhe restaurimin"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Nuk mund të restaurohej shkurtorja për shkak të mospërputhjes së nënshkrimit të aplikacionit"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Nuk mund të restaurohej shkurtorja"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Shkurtorja është çaktivizuar"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> dëshiron të shfaqë pjesë të <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Modifiko"</string>
</resources>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 275db37..3dfebf5 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -183,6 +183,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Организација управља овим уређајем и може да надгледа мрежни саобраћај. Додирните за детаље."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Уређај ће бити обрисан"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Не можете да користите ову апликацију за администраторе. Уређај ће сада бити обрисан.\n\nАко имате питања, контактирајте администратора организације."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Штампање је онемогућила апликација <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Ја"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Опције за таблет"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Опције за ТВ"</string>
@@ -219,6 +220,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Хитни позив"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Извештај о грешци"</string>
<string name="global_action_logout" msgid="935179188218826050">"Заврши сесију"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Снимак екрана"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Направи извештај о грешци"</string>
<string name="bugreport_message" msgid="398447048750350456">"Овим ће се прикупити информације о тренутном стању уређаја како би биле послате у поруци е-поште. Од започињања извештаја о грешци до тренутка за његово слање проћи ће неко време; будите стрпљиви."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Интерактив. извештај"</string>
@@ -265,8 +267,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Безбедни режим"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android систем"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Пређи на Лични профил"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Пређи на профил за Work"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Контакти"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"приступи контактима"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Дозволите да <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> приступа контактима"</string>
@@ -418,6 +422,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Дозвољава апликацији да приступа функцијама телефона на уређају. Ова дозвола омогућава апликацији да утврди број телефона и ИД-ове уређаја, затим да ли је позив активан, као и број даљинског уређаја са којим је успостављен позив."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"преусмеравање позива преко система"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Дозвољава апликацији да преусмерава позиве преко система да би побољшала доживљај позивања."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"читање бројева телефона"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Дозвољава апликацији да приступа бројевима телефона на уређају."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"спречавање преласка таблета у стање спавања"</string>
@@ -487,10 +495,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Превише споро сте померили прст. Пробајте поново."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Није препознат"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Хардвер за отиске прстију није доступан."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Није могуће сачувати отисак прста. Уклоните неки од постојећих отисака прстију."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Временско ограничење за отисак прста је истекло. Пробајте поново."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Радња са отиском прста је отказана."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Превише покушаја. Пробајте поново касније."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Превише покушаја. Сензор за отисак прста је онемогућен."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Пробајте поново."</string>
@@ -1009,6 +1020,12 @@
<string name="browse" msgid="1245903488306147205">"Отвори"</string>
<string name="sms" msgid="4560537514610063430">"Пошаљи SMS"</string>
<string name="add_contact" msgid="7867066569670597203">"Додај"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Меморијски простор је на измаку"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Неке системске функције можда не функционишу"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Нема довољно меморијског простора за систем. Уверите се да имате 250 MB слободног простора и поново покрените."</string>
@@ -1136,6 +1153,8 @@
<item quantity="other">Отворене Wi-Fi мреже су доступне</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Повежите се са отвореном Wi‑Fi мрежом"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Повезујете се са отвореном Wi‑Fi мрежом"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Повезали сте се са Wi‑Fi мрежом"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Повезивање са Wi‑Fi мрежом није успело"</string>
@@ -1145,6 +1164,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi ће се аутоматски укључити"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Када сте у близини сачуване мреже високог квалитета"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Не укључуј поново"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi је аутоматски укључен"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"У близини сте сачуване мреже: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Пријављивање на Wi-Fi мрежу"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Пријавите се на мрежу"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1432,6 +1453,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> преко наведеног ограничења."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Позадински подаци су ограничени"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Додирните за уклањање ограничења."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Велика потрошња података"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Потрошња података током последњих пар дана је већа него обично. Додирните да бисте прегледали потрошњу и подешавања."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Безбедносни сертификат"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Овај сертификат је важећи."</string>
<string name="issued_to" msgid="454239480274921032">"Издато за:"</string>
@@ -1718,7 +1741,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"До <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"До <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (следећи аларм)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Док не искључите режим Не узнемиравај"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Док не искључите"</string>
<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>
@@ -1768,9 +1791,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Сви језици"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Сви региони"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Претражи"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Укључити режим за Work?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Ово ће укључити профил за Work, укључујући апликације, синхронизацију у позадини и сродне функције."</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Укључи"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Имате нове поруке"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Отворите апликацију за SMS да бисте прегледали"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Неке функције су можда ограничене"</string>
@@ -1842,6 +1871,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Враћање пречице није успело јер апликација не подржава прављење резервне копије и враћање"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Враћање пречице није успело јер се потписи апликација не подударају"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Враћање пречице није успело"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Пречица је онемогућена"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"Апликација <xliff:g id="APP_0">%1$s</xliff:g> жели да приказује исечке из апликације <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Измени"</string>
</resources>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 1633e43..fee1a32 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Organisationen hanterar den här enheten och kan övervaka nätverkstrafiken. Tryck om du vill veta mer."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Enheten kommer att rensas"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Det går inte att använda administratörsappen. Enheten rensas.\n\nKontakta organisationens administratör om du har några frågor."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Utskrift har inaktiverats av <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Jag"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Alternativ för surfplattan"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV-alternativ"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Nödsituation"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Felrapport"</string>
<string name="global_action_logout" msgid="935179188218826050">"Avsluta session"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Skärmdump"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Skapa felrapport"</string>
<string name="bugreport_message" msgid="398447048750350456">"Nu hämtas information om aktuell status för enheten, som sedan skickas i ett e-postmeddelade. Det tar en liten stund innan felrapporten är färdig och kan skickas, så vi ber dig ha tålamod."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interaktiv rapport"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Säkert läge"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-system"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Byt till din personliga profil"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Byt till jobbprofilen"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontakter"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"få tillgång till dina kontakter"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Ge <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> åtkomstbehörighet till dina kontakter"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Tillåter att appen kommer åt enhetens telefonfunktioner. Med den här behörigheten tillåts appen att identifiera mobilens telefonnummer och enhets-ID, om ett samtal pågår och vilket nummer samtalet är kopplat till."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"dirigera samtal via systemet"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Appen tillåts att dirigera samtal via systemet för att förbättra samtalsupplevelsen."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"läsa telefonnummer"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Appen beviljas åtkomst till enhetens telefonnummer."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"förhindra att surfplattan går in i viloläge"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Du rörde fingret för långsamt. Försök igen."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Identifierades inte"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Det finns ingen maskinvara för fingeravtryck."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Fingeravtrycket kan inte lagras. Ta bort ett befintligt fingeravtryck."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Tidsgränsen för fingeravtrycket har uppnåtts. Försök igen."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Fingeravtrycksåtgärden avbröts."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Du har gjort för många försök. Försök igen senare."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Du har försökt för många gånger. Fingeravtryckssensorn har inaktiverats."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Försök igen."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Öppna"</string>
<string name="sms" msgid="4560537514610063430">"Sms:a"</string>
<string name="add_contact" msgid="7867066569670597203">"Lägg till"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Lagringsutrymmet börjar ta slut"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Det kan hända att vissa systemfunktioner inte fungerar"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Det finns inte tillräckligt med utrymme för systemet. Kontrollera att du har ett lagringsutrymme på minst 250 MB och starta om."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Öppet Wi-Fi-nätverk är tillgängligt</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Anslut till ett öppet Wi-Fi-nätverk"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Ansluter till ett öppet Wi-Fi-nätverk"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Ansluten till Wi-Fi-nätverket"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Det gick inte att ansluta till Wi‑Fi-nätverket"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi-Fi aktiveras automatiskt"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"När du är i närheten av ett sparat nätverk av hög kvalitet"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Återaktivera inte"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi-Fi aktiverades automatiskt"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Du är i närheten av ett sparat nätverk: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Logga in på ett Wi-Fi-nätverk"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Logga in på nätverket"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> över angiven gräns."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Bakgrundsdata är begränsade"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Ta bort begränsning."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Hög dataanvändning"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Dataanvändningen har varit högre än vanligt under de senaste dagarna. Om du trycker här visas användningen och inställningarna."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Säkerhetscertifikat"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Certifikatet är giltigt."</string>
<string name="issued_to" msgid="454239480274921032">"Utfärdad till:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Till kl. <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Till <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (nästa alarm)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Tills du inaktiverar Stör ej"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Tills du stänger av"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Tills du inaktiverar Stör ej"</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">"Komprimera"</string>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Alla språk"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Alla regioner"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Söka"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Vill du aktivera jobbläge?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Detta aktiverar jobbprofilen, inklusive appar, bakgrundssynkronisering och tillhörande funktioner"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Aktivera"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Du har nya meddelanden"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Öppna sms-appen och visa meddelandet"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Vissa funktioner är begränsade"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Det gick inte att återställa genvägen eftersom appen inte har stöd för säkerhetskopiering och återställning"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Det gick inte att återställa genvägen eftersom appens signatur inte stämmer"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Det gick inte att återställa genvägen"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Genvägen är inaktiverad"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> vill kunna visa bitar av <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Redigera"</string>
</resources>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 748f812..32d91ea 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -179,6 +179,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Shirika lako linadhibiti kifaa hiki na huenda likafuatilia shughuli kwenye mtandao. Gusa ili upate maelezo zaidi."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Data iliyomo kwenye kifaa chako itafutwa"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Huwezi kutumia programu ya msimamizi. Sasa data iliyo kwenye kifaa chako itafutwa.\n\nIkiwa una maswali yoyote, wasiliana na msimamizi wa shirika lako."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Kipengele cha kuchapisha kimezimwa na <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Mimi"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Chaguo za kompyuta ndogo"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Chaguo za runinga"</string>
@@ -261,8 +262,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Mtindo salama"</string>
<string name="android_system_label" msgid="6577375335728551336">"Mfumo wa Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Badili uweke wasifu wa Binafsi"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Badili uweke wasifu wa Kazini"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Anwani"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"ifikie anwani zako"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Ruhusu <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ifikie anwani zako"</string>
@@ -414,6 +417,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Huruhusu programu kufikia vipengele vya simu vilivyo kwenye kifaa. Idhini hii inaruhusu programu kutambua nambari ya simu na kifaa, kama kuna simu inayopigwa, na nambari ya mbali iliyounganishwa kwenye simu."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"elekeza simu kupitia mfumo"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Huruhusu programu kuelekeza simu zake kupitia mfumo ili kuboresha hali ya kupiga simu."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"kusoma nambari za simu"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Inaruhusu programu kufikia nambari za simu zilizo kwenye kifaa."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"zuia kompyuta ndogo dhidi ya kulala"</string>
@@ -483,10 +490,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Kidole kilisogezwa polepole zaidi. Tafadhali jaribu tena."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Haitambuliwi"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Maunzi ya kitambulisho hayapatikani."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Kitambulisho hakiwezi kuhifadhiwa. Tafadhali ondoa kitambulisho kilichopo."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Muda wa kitambulisho umekwisha. Jaribu tena."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Utendaji wa kitambulisho imeghairiwa."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Majaribio mengi mno. Jaribu tena baadaye."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Majaribio mengi mno. Kitambua alama ya kidole kimezimwa."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Jaribu tena."</string>
@@ -988,6 +998,12 @@
<string name="browse" msgid="1245903488306147205">"Fungua"</string>
<string name="sms" msgid="4560537514610063430">"Ujumbe"</string>
<string name="add_contact" msgid="7867066569670597203">"Ongeza"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Nafasi ya kuhifadhi inakaribia kujaa"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Baadhi ya vipengee vya mfumo huenda visifanye kazi"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Hifadhi haitoshi kwa ajili ya mfumo. Hakikisha una MB 250 za nafasi ya hifadhi isiyotumika na uanzishe upya."</string>
@@ -1113,6 +1129,8 @@
<item quantity="one">Fungua mtandao wa Wi-Fi unaopatikana</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Unganisha kwenye mtandao wa Wi‑Fi unaotumiwa na mtu yeyote"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Inaunganisha kwenye mtandao wa Wi‑Fi unaotumiwa na mtu yeyote"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Imeunganisha kwenye mtandao wa Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Imeshindwa kuunganisha kwenye mtandao wa Wi‑Fi"</string>
@@ -1410,6 +1428,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> juu ya kikomo kilichobainishwa."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Data ya mandhari nyuma imezuiwa"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Gusa ili uondoe kizuizi."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Matumizi ya data nyingi"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Umetumia data nyingi mno katika siku chache zilizopita. Gusa ili uangalie matumizi na mipangilio."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Cheti cha usalama"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Cheti hiki ni halali."</string>
<string name="issued_to" msgid="454239480274921032">"Kimetolewa kwa:"</string>
@@ -1686,7 +1706,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Hadi <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Mpaka <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (kengele inayofuata)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Hadi utakapozima hali ya Usinisumbue"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Hadi utakapoizima"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Hadi utakapozima Usinisumbue"</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">"Kunja"</string>
@@ -1735,9 +1755,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Lugha zote"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Maeneo yote"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Tafuta"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Ungependa kuwasha hali ya kazini?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Hatua hii itafungua wasifu wa kazini, ikiwa ni pamoja na programu, usawazishaji wa chini chini na vipengele husika"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Washa"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Una ujumbe mpya"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Fungua programu ya SMS ili uweze kuangalia"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Huenda baadhi ya vipengele havifanyi kazi"</string>
@@ -1809,7 +1835,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Imeshindwa kurejesha njia ya mkato kwa sababu ufunguo wako wa kuambatisha cheti kwenye programu haulingani"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Imeshindwa kurejesha njia ya mkato"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Njia ya mkato imezimwa"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Ondoa"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Fungua tu"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Ungependa kuondoa programu hatari?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> inataka kuonyesha vipengee <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Badilisha"</string>
</resources>
diff --git a/core/res/res/values-ta/strings.xml b/core/res/res/values-ta/strings.xml
index 6014de4..3afdebd 100644
--- a/core/res/res/values-ta/strings.xml
+++ b/core/res/res/values-ta/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"உங்கள் நிறுவனம் இந்தச் சாதனத்தை நிர்வகிக்கும், அத்துடன் அது நெட்வொர்க் ட்ராஃபிக்கைக் கண்காணிக்கலாம். விவரங்களுக்கு, தட்டவும்."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"சாதனத் தரவு அழிக்கப்படும்"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"நிர்வாகிப் பயன்பாட்டைப் பயன்படுத்த முடியாது. இப்போது உங்கள் சாதனம் அழிக்கப்படும்.\n\nஏதேனும் கேள்விகள் இருப்பின், உங்கள் நிறுவனத்தின் நிர்வாகியைத் தொடர்புகொள்ளவும்."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"பிரிண்ட் செய்வதை <xliff:g id="OWNER_APP">%s</xliff:g> தடுத்துள்ளது."</string>
<string name="me" msgid="6545696007631404292">"நான்"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"டேப்லெட் விருப்பங்கள்"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"டிவி விருப்பங்கள்"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"அவசர அழைப்பு"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"பிழை அறிக்கை"</string>
<string name="global_action_logout" msgid="935179188218826050">"அமர்வை முடிக்கிறது"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"ஸ்கிரீன் ஷாட்"</string>
<string name="bugreport_title" msgid="2667494803742548533">"பிழை அறிக்கையை எடு"</string>
<string name="bugreport_message" msgid="398447048750350456">"உங்கள் நடப்புச் சாதன நிலையை மின்னஞ்சல் செய்தியாக அனுப்ப, அது குறித்த தகவலை இது சேகரிக்கும். பிழை அறிக்கையைத் தொடங்குவதில் இருந்து, அது அனுப்புவதற்குத் தயாராகும் வரை, இதற்குச் சிறிது நேரம் ஆகும்; பொறுமையாகக் காத்திருக்கவும்."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"ஊடாடத்தக்க அறிக்கை"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"பாதுகாப்பு பயன்முறை"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android அமைப்பு"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"தனிப்பட்ட சுயவிவரத்திற்கு மாறு"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"பணிச் சுயவிவரத்திற்கு மாறு"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"தொடர்புகள்"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"தொடர்புகளை அணுக வேண்டும்"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"தொடர்புகளை அணுக, <b><xliff:g id="APP_NAME">%1$s</xliff:g></b>க்கு அனுமதி வழங்கவும்"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"சாதனத்தின் மொபைல் அம்சங்களை அணுகப் பயன்பாட்டை அனுமதிக்கிறது. மொபைல் மற்றும் சாதன ஐடிகள், அழைப்பு செயலில் உள்ளதா மற்றும் அழைப்பு மூலம் இணைக்கப்பட்ட தொலைக் கட்டுப்பாட்டு எண் ஆகியவற்றைத் தீர்மானிக்க இந்த அனுமதி பயன்பாட்டை அனுமதிக்கிறது."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"சிஸ்டம் மூலம் அழைப்புகளை ரூட் செய்தல்"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"அழைக்கும் அனுபவத்தை மேம்படுத்தும் பொருட்டு, சிஸ்டம் மூலம் தனது அழைப்புகளை ரூட் செய்ய பயன்பாட்டை அனுமதிக்கும்."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ஃபோன் எண்களைப் படித்தல்"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"சாதனத்தின் ஃபோன் எண்களை அணுக, பயன்பாட்டை அனுமதிக்கும்."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"டேப்லெட் உறக்க நிலைக்குச் செல்வதைத் தடுத்தல்"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"விரலை மிகவும் மெதுவாக நகர்த்திவிட்டீர்கள். மீண்டும் முயற்சிக்கவும்."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"அறியப்படவில்லை"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"கைரேகை வன்பொருள் இல்லை."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"கைரேகையைச் சேமிக்க முடியவில்லை. ஏற்கனவே உள்ள கைரேகையை அகற்றவும்."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"கைரேகைக்கான நேரம் முடிந்தது. மீண்டும் முயலவும்."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"கைரேகை செயல்பாடு ரத்துசெய்யப்பட்டது."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"அதிகமான முயற்சிகள். பிறகு முயற்சிக்கவும்."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"பலமுறை முயன்றுவிட்டீர்கள். கைரேகை சென்சார் முடக்கப்பட்டது."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"மீண்டும் முயற்சிக்கவும்."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"திற"</string>
<string name="sms" msgid="4560537514610063430">"செய்தி"</string>
<string name="add_contact" msgid="7867066569670597203">"சேர்"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"சேமிப்பிடம் குறைகிறது"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"சில அமைப்பு செயல்பாடுகள் வேலை செய்யாமல் போகலாம்"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"முறைமையில் போதுமான சேமிப்பகம் இல்லை. 250மெ.பை. அளவு காலி இடவசதி இருப்பதை உறுதிசெய்து மீண்டும் தொடங்கவும்."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">பொது வைஃபை நெட்வொர்க் உள்ளது</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"திறந்த வைஃபை நெட்வொர்க்குடன் இணைக்கவும்"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"திறந்த வைஃபை நெட்வொர்க்குடன் இணைக்கிறது"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"வைஃபை நெட்வொர்க்குடன் இணைக்கப்பட்டது"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"வைஃபை நெட்வொர்க்குடன் இணைக்க முடியவில்லை"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"வைஃபை தானாக ஆன் ஆகும்"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"சேமித்த, உயர்தர நெட்வொர்க்கிற்கு அருகில் இருக்கும்போது"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"மீண்டும் ஆன் செய்யாதே"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"வைஃபை தானாகவே ஆன் செய்யப்பட்டது"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"<xliff:g id="NETWORK_SSID">%1$s</xliff:g> என்ற சேமிக்கப்பட்ட நெட்வொர்க் அருகில் உள்ளீர்கள்"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"வைஃபை நெட்வொர்க்கில் உள்நுழையவும்"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"நெட்வொர்க்கில் உள்நுழையவும்"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1410,6 +1431,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"குறிப்பிட்ட வரம்பைவிட <xliff:g id="SIZE">%s</xliff:g> கூடுதல்."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"பின்புல வரம்பு வரையறுக்கப்பட்டது"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"வரம்பை அகற்ற, தட்டவும்."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"அதிகப்படியான டேட்டா உபயோகம்"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"உங்களின் டேட்டா உபயோகம் கடந்த சில நாட்களில் வழக்கத்தை விட அதிகரித்துள்ளது. உபயோகம் மற்றும் அமைப்புகளைப் பார்க்க, தட்டவும்."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"பாதுகாப்பு சான்றிதழ்"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"இந்தச் சான்றிதழ் சரியானது."</string>
<string name="issued_to" msgid="454239480274921032">"இதற்கு வழங்கப்பட்டது:"</string>
@@ -1686,7 +1709,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> வரை"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> மணி (அடுத்த அலாரம்) வரை"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"\'தொந்தரவு செய்யாதே\' என்பதை முடக்கும் வரை"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"ஆஃப் செய்யும் வரை"</string>
<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>
@@ -1735,9 +1758,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"எல்லா மொழிகளும்"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"எல்லா மண்டலங்களும்"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"தேடு"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"பணிப் பயன்முறையை இயக்கவா?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"இவ்வாறு செய்தால், உங்கள் பணி விவரம் இயக்கப்படும். இதில் பயன்பாடுகள், பின்னணி ஒத்திசைவு, தொடர்புடைய அம்சங்கள் ஆகியவை அடங்கும்"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"இயக்கு"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"புதிய செய்திகள் வந்துள்ளன"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"பார்க்க, SMS பயன்பாட்டைத் திறக்கவும்"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"சில செயல்பாடு வரம்பிடப்பட்டிருக்கலாம்"</string>
@@ -1808,6 +1837,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"காப்புப் பிரதி மற்றும் மீட்டமைவைப் பயன்பாடு ஆதரிக்காத காரணத்தால், ஷார்ட்கட்டை மீட்டமைக்க முடியவில்லை"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"பயன்பாட்டுச் சான்றுகள் பொருந்தாத காரணத்தினால், ஷார்ட்கட்டை மீட்டமைக்க முடியவில்லை"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"ஷார்ட்கட்டை மீட்டமைக்க முடியவில்லை"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"குறுக்குவழி முடக்கப்பட்டுள்ளது"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_2">%2$s</xliff:g> பயன்பாட்டின் விழிப்பூட்டல்களைக் காண்பிக்க, <xliff:g id="APP_0">%1$s</xliff:g> அனுமதி கேட்கிறது"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"திருத்து"</string>
</resources>
diff --git a/core/res/res/values-te/strings.xml b/core/res/res/values-te/strings.xml
index 589ac91..183b3a2 100644
--- a/core/res/res/values-te/strings.xml
+++ b/core/res/res/values-te/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"మీ సంస్థ ఈ పరికరాన్ని నిర్వహిస్తుంది మరియు నెట్వర్క్ ట్రాఫిక్ని పర్యవేక్షించవచ్చు. వివరాల కోసం నొక్కండి."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"మీ పరికరంలోని డేటా తొలగించబడుతుంది"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"నిర్వాహక యాప్ ఉపయోగించడం సాధ్యపడదు. మీ డివైజ్లోని డేటా ఇప్పుడు తొలగించబడుతుంది.\n\nమీకు సందేహాలుంటే, మీ సంస్థ యొక్క నిర్వాహకులను సంప్రదించండి."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"ముద్రణ <xliff:g id="OWNER_APP">%s</xliff:g> ద్వారా నిలిపివేయబడింది."</string>
<string name="me" msgid="6545696007631404292">"నేను"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"టాబ్లెట్ ఎంపికలు"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"టీవీ ఎంపికలు"</string>
@@ -217,8 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"అత్యవసరం"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"బగ్ నివేదిక"</string>
<string name="global_action_logout" msgid="935179188218826050">"సెషన్ను ముగించు"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"స్క్రీన్షాట్"</string>
<string name="bugreport_title" msgid="2667494803742548533">"బగ్ నివేదికను సిద్ధం చేయి"</string>
<string name="bugreport_message" msgid="398447048750350456">"ఇది ఇ-మెయిల్ సందేశం రూపంలో పంపడానికి మీ ప్రస్తుత పరికర స్థితి గురించి సమాచారాన్ని సేకరిస్తుంది. బగ్ నివేదికను ప్రారంభించడం మొదలుకొని పంపడానికి సిద్ధం చేసే వరకు ఇందుకు కొంత సమయం పడుతుంది; దయచేసి ఓపిక పట్టండి."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"ప్రభావశీల నివేదిక"</string>
@@ -264,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"సురక్షిత మోడ్"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android సిస్టమ్"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"వ్యక్తిగతానికి మార్చు"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"కార్యాలయానికి మార్చు"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"పరిచయాలు"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"మీ పరిచయాలను యాక్సెస్ చేయడానికి"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>ని ఉపయోగించి, మీ పరిచయాలను యాక్సెస్ చేయండి"</string>
@@ -417,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"పరికరం యొక్క ఫోన్ ఫీచర్లను యాక్సెస్ చేయడానికి యాప్ను అనుమతిస్తుంది. ఈ అనుమతి ఫోన్ నంబర్ మరియు పరికరం IDలను, కాల్ సక్రియంగా ఉందా లేదా అనే విషయాన్ని మరియు కాల్ ద్వారా కనెక్ట్ చేయబడిన రిమోట్ నంబర్ను కనుగొనడానికి యాప్ను అనుమతిస్తుంది."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"కాల్లను సిస్టమ్ ద్వారా వెళ్లేలా చేయి"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"కాలింగ్ అనుభవాన్ని మెరుగుపరచడం కోసం తన కాల్లను సిస్టమ్ ద్వారా వెళ్లేలా చేయడానికి అనువర్తనాన్ని అనుమతిస్తుంది."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"ఫోన్ నంబర్లను చదువు"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"పరికరం యొక్క ఫోన్ నంబర్లను యాక్సెస్ చేయడానికి యాప్ను అనుమతిస్తుంది."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"టాబ్లెట్ను నిద్రావస్థకు వెళ్లనీయకుండా నిరోధించడం"</string>
@@ -486,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"వేలిని చాలా నెమ్మదిగా కదిలించారు. దయచేసి మళ్లీ ప్రయత్నించండి."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"గుర్తించలేదు"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"వేలిముద్ర హార్డ్వేర్ అందుబాటులో లేదు."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"వేలిముద్రను నిల్వ చేయడం సాధ్యపడదు. దయచేసి ఇప్పటికే ఉన్న వేలిముద్రను తీసివేయండి."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"వేలిముద్ర గడువు సమయం చేరుకుంది. మళ్లీ ప్రయత్నించండి."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"వేలిముద్ర కార్యకలాపం రద్దయింది."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"చాలా ఎక్కువ ప్రయత్నాలు చేసారు. తర్వాత మళ్లీ ప్రయత్నించండి."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"అనేకసార్లు ప్రయత్నించారు. వేలిముద్ర సెన్సార్ నిలిపివేయబడింది."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"మళ్లీ ప్రయత్నించండి."</string>
@@ -991,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"తెరవండి"</string>
<string name="sms" msgid="4560537514610063430">"సందేశం"</string>
<string name="add_contact" msgid="7867066569670597203">"జోడించండి"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"నిల్వ ఖాళీ అయిపోతోంది"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"కొన్ని సిస్టమ్ కార్యాచరణలు పని చేయకపోవచ్చు"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"సిస్టమ్ కోసం తగినంత నిల్వ లేదు. మీకు 250MB ఖాళీ స్థలం ఉందని నిర్ధారించుకుని, పునఃప్రారంభించండి."</string>
@@ -1116,6 +1131,8 @@
<item quantity="one">ఓపెన్ Wi-Fi నెట్వర్క్ అందుబాటులో ఉంది</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"బహిరంగ Wi‑Fi నెట్వర్క్కు కనెక్ట్ చేయండి"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"బహిరంగ Wi‑Fi నెట్వర్క్కు కనెక్ట్ చేస్తోంది"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Wi‑Fi నెట్వర్క్కు కనెక్ట్ చేయబడింది"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Wi‑Fi నెట్వర్క్కు కనెక్ట్ చేయడం సాధ్యపడలేదు"</string>
@@ -1125,10 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi స్వయంచాలకంగా ఆన్ అవుతుంది"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"మీరు అధిక నాణ్యత గల సేవ్ చేసిన నెట్వర్క్కు సమీపంగా ఉన్నప్పుడు"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"తిరిగి ఆన్ చేయవద్దు"</string>
- <!-- no translation found for wifi_wakeup_enabled_title (6534603733173085309) -->
- <skip />
- <!-- no translation found for wifi_wakeup_enabled_content (189330154407990583) -->
- <skip />
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi‑Fi స్వయంచాలకంగా ఆన్ చేయబడింది"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"మీరు సేవ్ చేసిన నెట్వర్క్కి సమీపంలో ఉన్నారు: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Wi-Fi నెట్వర్క్కి సైన్ ఇన్ చేయండి"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"నెట్వర్క్కి సైన్ ఇన్ చేయండి"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1416,6 +1431,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"పేర్కొన్న పరిమితి కంటే <xliff:g id="SIZE">%s</xliff:g> మించిపోయింది."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"నేపథ్య డేటా పరిమితం చేయబడింది"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"నియంత్రణ తీసివేయడానికి నొక్కండి."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"ఎక్కువ డేటా వినియోగం"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"గత కొన్ని రోజులుగా మీ డేటా వినియోగం సాధారణం కంటే ఎక్కువగా ఉంటోంది. వినియోగం మరియు సెట్టింగ్లను చూడడానికి నొక్కండి."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"భద్రతా సర్టిఫికెట్"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"ఈ సర్టిఫికెట్ చెల్లుబాటు అవుతుంది."</string>
<string name="issued_to" msgid="454239480274921032">"దీనికి జారీ చేయబడింది:"</string>
@@ -1692,7 +1709,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> వరకు"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (తర్వాత అలారం) వరకు"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"మీరు అంతరాయం కలిగించవద్దు ఎంపిక ఆఫ్ చేసే వరకు"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"మీరు ఆఫ్చేసే వరకు"</string>
<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>
@@ -1741,9 +1758,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"అన్ని భాషలు"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"అన్ని ప్రాంతాలు"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"వెతుకు"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"కార్యాలయ మోడ్ని ఆన్ చేయాలా?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"ఇది అనువర్తనాలు, నేపథ్య సమకాలీకరణ మరియు సంబంధిత లక్షణాలతో సహా మీ కార్యాలయ ప్రొఫైల్ను ఆన్ చేస్తుంది"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"ఆన్ చేయి"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"మీకు కొత్త సందేశాలు ఉన్నాయి"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"వీక్షించడానికి SMS అనువర్తనాన్ని తెరవండి"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"కొంత పనితనం పరిమితం కావచ్చు"</string>
@@ -1815,10 +1838,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"యాప్ సంతకం సరిపోలని కారణంగా సత్వరమార్గాన్ని పునరుద్ధరించడం సాధ్యపడలేదు"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"సత్వరమార్గాన్ని పునరుద్ధరించడం సాధ్యపడలేదు"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"షార్ట్కట్ నిలిపివేయబడింది"</string>
- <!-- no translation found for harmful_app_warning_uninstall (3846265696369136266) -->
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
- <!-- no translation found for harmful_app_warning_launch_anyway (5784428382367400530) -->
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
<skip />
- <!-- no translation found for harmful_app_warning_title (2229996292333310435) -->
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
<skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> <xliff:g id="APP_2">%2$s</xliff:g> స్లైస్లను చూపించాలనుకుంటోంది"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"సవరించు"</string>
</resources>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index d9a504b..2d85094 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"องค์กรของคุณจัดการอุปกรณ์นี้และอาจตรวจสอบการจราจรของข้อมูลในเครือข่าย แตะเพื่อดูรายละเอียด"</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"ระบบจะลบข้อมูลในอุปกรณ์ของคุณ"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"ไม่สามารถใช้แอปผู้ดูแลระบบนี้ ขณะนี้ระบบจะลบข้อมูลในอุปกรณ์ของคุณ\n\nโปรดติดต่อผู้ดูแลระบบขององค์กรหากมีคำถาม"</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> ปิดใช้การพิมพ์แล้ว"</string>
<string name="me" msgid="6545696007631404292">"ฉัน"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"ตัวเลือกของแท็บเล็ต"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"ตัวเลือกทีวี"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"เหตุฉุกเฉิน"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"รายงานข้อบกพร่อง"</string>
<string name="global_action_logout" msgid="935179188218826050">"จบเซสชัน"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"ภาพหน้าจอ"</string>
<string name="bugreport_title" msgid="2667494803742548533">"ใช้รายงานข้อบกพร่อง"</string>
<string name="bugreport_message" msgid="398447048750350456">"การดำเนินการนี้จะรวบรวมข้อมูลเกี่ยวกับสถานะปัจจุบันของอุปกรณ์ของคุณ โดยจะส่งไปในรูปแบบข้อความอีเมล อาจใช้เวลาสักครู่ตั้งแต่เริ่มการสร้างรายงานข้อบกพร่องจนกระทั่งเสร็จสมบูรณ์ โปรดอดทนรอ"</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"รายงานแบบอินเทอร์แอกทีฟ"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"โหมดปลอดภัย"</string>
<string name="android_system_label" msgid="6577375335728551336">"ระบบ Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"เปลี่ยนไปใช้โปรไฟล์ส่วนตัว"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"เปลี่ยนไปใช้โปรไฟล์งาน"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"รายชื่อติดต่อ"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"เข้าถึงรายชื่อติดต่อ"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"อนุญาตให้ <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> เข้าถึงรายชื่อติดต่อของคุณ"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"อนุญาตให้แอปพลิเคชันเข้าถึงฟีเจอร์โทรศัพท์ของอุปกรณ์ การอนุญาตนี้ทำให้แอปพลิเคชันสามารถตรวจสอบหมายเลขโทรศัพท์และรหัสอุปกรณ์ ตรวจสอบว่ามีการโทรที่ทำงานอยู่หรือไม่ และตรวจสอบหมายเลขระยะไกลที่เชื่อมต่อด้วยการโทร"</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"กำหนดเส้นทางการโทรผ่านระบบ"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"อนุญาตให้แอปกำหนดเส้นทางการโทรของแอปผ่านระบบเพื่อปรับปรุงประสบการณ์ในการโทร"</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"อ่านหมายเลขโทรศัพท์"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"อนุญาตให้แอปเข้าถึงหมายเลขโทรศัพท์ของอุปกรณ์นี้"</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ป้องกันไม่ให้แท็บเล็ตเข้าสู่โหมดสลีป"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"นิ้วเคลื่อนที่ช้าเกินไป โปรดลองอีกครั้ง"</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"ไม่รู้จัก"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"ฮาร์ดแวร์ลายนิ้วมือไม่พร้อมใช้งาน"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"ไม่สามารถเก็บลายนิ้วมือได้ โปรดนำลายนิ้วมือที่มีอยู่ออก"</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"หมดเวลาใช้ลายนิ้วมือแล้ว โปรดลองอีกครั้ง"</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"ยกเลิกการทำงานของลายนิ้วมือ"</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"ดำเนินการหลายครั้งเกินไป ลองอีกครั้งในภายหลัง"</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"ลองหลายครั้งเกินไป ปิดใช้เซ็นเซอร์ลายนิ้วมือแล้ว"</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"ลองอีกครั้ง"</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"เปิด"</string>
<string name="sms" msgid="4560537514610063430">"ข้อความ"</string>
<string name="add_contact" msgid="7867066569670597203">"เพิ่ม"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"พื้นที่จัดเก็บเหลือน้อย"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"บางฟังก์ชันระบบอาจไม่ทำงาน"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"พื้นที่เก็บข้อมูลไม่เพียงพอสำหรับระบบ โปรดตรวจสอบว่าคุณมีพื้นที่ว่าง 250 MB แล้วรีสตาร์ท"</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">มี 1 เครือข่าย Wi-Fi สาธารณะที่ใช้งานได้</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"เชื่อมต่อเครือข่าย Wi‑Fi แบบเปิด"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"กำลังเชื่อมต่อเครือข่าย Wi‑Fi แบบเปิด"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"เชื่อมต่อเครือข่าย Wi-Fi แล้ว"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"ไม่สามารถเชื่อมต่อเครือข่าย Wi‑Fi"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi จะเปิดโดยอัตโนมัติ"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"เมื่อคุณอยู่ใกล้เครือข่ายคุณภาพสูงที่บันทึกไว้"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"ไม่ต้องเปิดอีกครั้ง"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"เปิด Wi‑Fi โดยอัตโนมัติแล้ว"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"คุณอยู่ใกล้เครือข่ายที่บันทึกไว้ ซึ่งก็คือ <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"ลงชื่อเข้าใช้เครือข่าย WiFi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"ลงชื่อเข้าใช้เครือข่าย"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> เกินขีดจำกัดที่ระบุไว้"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"จำกัดข้อมูลแบ็กกราวด์"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"แตะเพื่อนำข้อจำกัดออก"</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"ปริมาณการใช้อินเทอร์เน็ตสูง"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"ปริมาณการใช้อินเทอร์เน็ตในช่วง 2-3 วันที่ผ่านมาสูงกว่าปกติ แตะเพื่อดูปริมาณการใช้และการตั้งค่า"</string>
<string name="ssl_certificate" msgid="6510040486049237639">"ใบรับรองความปลอดภัย"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"ใบรับรองนี้ใช้งานได้"</string>
<string name="issued_to" msgid="454239480274921032">"ออกให้แก่:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"จนถึงเวลา <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"จนถึงเวลา <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (การปลุกครั้งถัดไป)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"จนกว่าคุณจะปิดห้ามรบกวน"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"จนกว่าคุณจะปิด"</string>
<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>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"ทุกภาษา"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"ภูมิภาคทั้งหมด"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"ค้นหา"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"เปิดโหมดงานไหม"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"การดำเนินการนี้จะเปิดโปรไฟล์งานของคุณ รวมถึงแอป การซิงค์ในพื้นหลัง และฟีเจอร์ที่เกี่ยวข้อง"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"เปิด"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"คุณมีข้อความใหม่"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"เปิดแอป SMS เพื่อดู"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"อาจมีข้อจำกัดในบางฟังก์ชัน"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"คืนค่าทางลัดไม่ได้เนื่องจากแอปไม่รองรับการสำรองข้อมูลและคืนค่า"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"คืนค่าทางลัดไม่ได้เนื่องจากการลงนามแอปไม่ตรงกัน"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"คืนค่าทางลัดไม่ได้"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"ปิดใช้ทางลัดแล้ว"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> ต้องการแสดงส่วนต่างๆ ของ <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"แก้ไข"</string>
</resources>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 98e169e..cf185a4 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Pinamamahalaan ng iyong organisasyon ang device na ito, at maaari nitong subaybayan ang trapiko sa network. I-tap para sa mga detalye."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Buburahin ang iyong device"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Hindi magagamit ang admin app. Mabubura na ang iyong device.\n\nKung mayroon kang mga tanong, makipag-ugnayan sa admin ng iyong organisasyon."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Na-disable ng <xliff:g id="OWNER_APP">%s</xliff:g> ang pag-print."</string>
<string name="me" msgid="6545696007631404292">"Ako"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Mga pagpipilian sa tablet"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Mga opsyon sa TV"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Emergency"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Ulat sa bug"</string>
<string name="global_action_logout" msgid="935179188218826050">"Tapusin ang session"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Screenshot"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Kunin ang ulat sa bug"</string>
<string name="bugreport_message" msgid="398447048750350456">"Mangongolekta ito ng impormasyon tungkol sa kasalukuyang katayuan ng iyong device, na ipapadala bilang mensaheng e-mail. Gugugol ito ng kaunting oras mula sa pagsisimula ng ulat sa bug hanggang sa handa na itong maipadala; mangyaring magpasensya."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Interactive na ulat"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Safe mode"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android System"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Lumipat sa Personal"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Lumipat sa para sa Trabaho"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Mga Contact"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"i-access ang iyong mga contact"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Payagan ang <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> na i-access ang iyong mga contact"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Pinapayagan ang app na i-access ang mga tampok ng telepono ng device. Pinapayagan ng pahintulot na ito ang app na tukuyin ang numero ng telepono at mga ID ng device, kung aktibo man ang isang tawag, at ang malayuang numerong ikinonekta ng isang tawag."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"iruta ang mga tawag sa pamamagitan ng system"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Pinapayagan ang app na iruta ang mga tawag nito sa pamamagitan ng system upang mapahusay ang karanasan sa pagtawag."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"basahin ang mga numero ng telepono"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Pinapayagan ang app na i-access ang mga numero ng telepono ng device."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"pigilan ang tablet mula sa pag-sleep"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Masyadong mabagal ang paggalaw ng daliri. Pakisubukang muli."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Hindi nakilala"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Hindi available ang hardware na ginagamitan ng fingerprint."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Hindi maiimbak ang fingerprint. Mangyaring mag-alis ng umiiral nang fingerprint."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Nag-time out ang fingerprint. Subukang muli."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Nakansela ang operasyong ginagamitan ng fingerprint."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Masyadong maraming beses sumubok. Subukang muli sa ibang pagkakataon."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Masyadong maraming beses sumubok. Na-disable ang sensor para sa fingerprint."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Subukang muli."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Buksan"</string>
<string name="sms" msgid="4560537514610063430">"Padalhan ng Mensahe"</string>
<string name="add_contact" msgid="7867066569670597203">"Magdagdag"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Nauubusan na ang puwang ng storage"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Maaaring hindi gumana nang tama ang ilang paggana ng system"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Walang sapat na storage para sa system. Tiyaking mayroon kang 250MB na libreng espasyo at i-restart."</string>
@@ -1114,6 +1131,8 @@
<item quantity="other">Available ang mga bukas na Wi-Fi network</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Kumonekta sa bukas na Wi‑Fi network"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Kumokonekta sa bukas na Wi‑Fi network"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Nakakonekta sa Wi‑Fi network"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Hindi makakonekta sa Wi‑Fi network"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Awtomatikong mag-o-on ang Wi‑Fi"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Kapag malapit ka sa naka-save na network na mataas ang kalidad"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Huwag i-on muli"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Awtomatikong na-on ang Wi‑Fi"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Malapit ka sa isang naka-save na network: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Mag-sign in sa Wi-Fi network"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Mag-sign in sa network"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"Lampas ng <xliff:g id="SIZE">%s</xliff:g> sa tinukoy na limitasyon."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Pinaghihigpitan ang data ng background"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"I-tap upang alisin paghihigpit."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Malaking paggamit ng data"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Mas malaki kaysa sa karaniwan ang paggamit mo ng data sa nakalipas na ilang araw. I-tap upang matingnan ang paggamit at mga setting."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Certificate ng seguridad"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"May-bisa ang certificate na ito."</string>
<string name="issued_to" msgid="454239480274921032">"Ibinigay kay:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Hanggang <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Hanggang <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (susunod na alarm)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Hanggang sa i-off mo ang Huwag Istorbohin"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Hanggang sa i-off mo"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Hanggang sa i-off mo ang Huwag Istorbohin"</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">"I-collapse"</string>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Lahat ng wika"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Lahat ng rehiyon"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Maghanap"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"I-on ang work mode?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Io-on nito ang iyong profile sa trabaho, kasama ang mga app, pag-sync sa background, at mga kaugnay na feature"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"I-on"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Mayroon kang mga bagong mensahe"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Buksan ang SMS app upang tingnan"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Limitado ilang functionality"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Hindi ma-restore ang shortcut dahil hindi sinusuportahan ng app ang pag-back up at pag-restore"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Hindi ma-restore ang shortcut dahil hindi magkatugma ang signature ng app"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Hindi ma-restore ang shortcut"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Naka-disable ang shortcut"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"Gustong ipakita ng <xliff:g id="APP_0">%1$s</xliff:g> ang mga slice ng <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"I-edit"</string>
</resources>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index e2b1cb3..929991f 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Kuruluşunuz bu cihazı yönetmekte olup ağ trafiğini izleyebilir. Ayrıntılar için dokunun."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Cihazınız silinecek"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Yönetim uygulaması kullanılamıyor. Cihazınız şimdi silinecek.\n\nSorularınız varsa kuruluşunuzun yöneticisine başvurun."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Yazdırma işlemi <xliff:g id="OWNER_APP">%s</xliff:g> tarafından devre dışı bırakıldı."</string>
<string name="me" msgid="6545696007631404292">"Ben"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Tablet seçenekleri"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV seçenekleri"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Acil durum"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Hata raporu"</string>
<string name="global_action_logout" msgid="935179188218826050">"Oturumu sonlandır"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Ekran görüntüsü"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Hata raporu al"</string>
<string name="bugreport_message" msgid="398447048750350456">"Bu rapor, e-posta iletisi olarak göndermek üzere cihazınızın şu anki durumuyla ilgili bilgi toplar. Hata raporu başlatıldıktan sonra hazır olması biraz zaman alabilir, lütfen sabırlı olun."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Etkileşimli rapor"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Güvenli mod"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android Sistemi"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Kişisel Profile Geç"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"İş Profiline Geç"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kişiler"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"kişilerinize erişme"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> uygulamasının kişilerinize erişmesine izin verin"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Uygulamaya cihazdaki telefon özelliklerine erişme izni verir. Bu izin, uygulamanın telefon numarasını ve cihaz kimliğini, etkin bir çağrı olup olmadığını ve çağrıda bağlanılan karşı tarafın numarasını öğrenmesine olanak sağlar."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"çağrıları sistem üzerinden yönlendir"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Uygulamanın, çağrı deneyimini iyileştirmek için çağrılarını sistem üzerinden yönlendirmesine olanak tanır."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"telefon numaralarını oku"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Uygulamaya, cihazınızın telefon numaralarına erişme izni verir."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"tabletin uykuya geçmesini önle"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Parmak hareketi çok yavaştı. Lütfen tekrar deneyin."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Tanınmadı"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Parmak izi donanımı kullanılamıyor."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Parmak izi depolanamıyor. Lütfen mevcut parmak izlerinden birini kaldırın."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Parmak izi için zaman aşımı oluştu. Tekrar deneyin."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Parmak izi işlemi iptal edildi."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Çok fazla deneme yapıldı. Daha sonra tekrar deneyin."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Çok fazla deneme yapıldı. Parmak izi sensörü devre dışı bıraıldı."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Tekrar deneyin."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Aç"</string>
<string name="sms" msgid="4560537514610063430">"Mesaj"</string>
<string name="add_contact" msgid="7867066569670597203">"Ekle"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Depolama alanı bitiyor"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Bazı sistem işlevleri çalışmayabilir"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Sistem için yeterli depolama alanı yok. 250 MB boş alanınızın bulunduğundan emin olun ve yeniden başlatın."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Kullanılabilir Kablosuz ağı aç</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Açık kablosuz ağa bağlanın"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Açık kablosuz ağa bağlandı"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Kablosuz ağa bağlanıldı"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Kablosuz ağa bağlanamadı"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Kablosuz özelliği otomatik olarak açılacak"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Daha önce kaydedilmiş yüksek kaliteli bir ağın yakınında olduğunuzda"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Tekrar açılmasın"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Kablosuz ağ otomatik olarak açıldı"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Kayıtlı bir ağın yakınındasınız: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Kablosuz ağda oturum açın"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Ağda oturum açın"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g>, belirlenen limiti aşıyor."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Arka plan verileri kısıtlı"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Kısıtlamayı kaldır. için dokunun"</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Fazla veri kullanımı"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Son birkaç gün içindeki veri kullanımınız normalden fazla. Kullanımı ve ayarları görüntülemek için dokunun."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Güvenlik sertifikası"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Bu sertifika geçerli."</string>
<string name="issued_to" msgid="454239480274921032">"Verilen:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Şu saate kadar: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (sonraki alarma) saatine kadar"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Rahatsız Etmeyin ayarını kapatana kadar"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Siz kapatana kadar"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Rahatsız Etmeyin ayarını kapatana kadar"</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">"Daralt"</string>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Tüm diller"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Tüm bölgeler"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Ara"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"İş modu açılsın mı?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Bu işlem; uygulamalar, arka planda senkronizasyon ve ilgili özellikler dahil olmak üzere iş profilinizi açar."</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Aç"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Yeni mesajlarınız var"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Görüntülemek için SMS uygulamasını açın"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Bazı işlevler sınırlı olabilir"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Uygulama, yedekleme ve geri yüklemeyi desteklemediğinden kısayol geri yüklenemedi"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Uygulama imzası eşleşmediğinden kısayol geri yüklenemedi"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Kısayol geri yüklenemedi"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Kısayol devre dışı"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> uygulaması, <xliff:g id="APP_2">%2$s</xliff:g> dilimlerini göstermek istiyor"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Düzenle"</string>
</resources>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 0d70955..b028b36 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -185,6 +185,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Адміністратор вашої організації контролює цей пристрій і відстежує мережевий трафік. Торкніться, щоб дізнатися більше."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"З вашого пристрою буде стерто всі дані"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Не можна використовувати цей додаток адміністратора. На пристрої буде відновлено заводські налаштування.\n\nЯкщо у вас є запитання, зв’яжіться з адміністратором організації."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Додаток <xliff:g id="OWNER_APP">%s</xliff:g> вимкнув друк."</string>
<string name="me" msgid="6545696007631404292">"Я"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Парам. пристрою"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Параметри ТБ"</string>
@@ -269,8 +270,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Безпечний режим"</string>
<string name="android_system_label" msgid="6577375335728551336">"Система Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Перейти в особистий профіль"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Перейти в робочий профіль"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Контакти"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"отримувати доступ до контактів"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Надати додатку <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> доступ до контактів"</string>
@@ -422,6 +425,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Дозволяє програмі отримувати доступ до телефонних функцій пристрою. Такий дозвіл дає програмі змогу визначати номер телефону й ідентифікатори пристрою, активність виклику, а також віддалений номер, на який здійснюється виклик."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"маршрутизувати виклики через систему"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Дозволяє додатку маршрутизувати виклики через систему, щоб було зручніше телефонувати."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"переглядати номери телефону"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Надає додаткам доступ до номерів телефону на пристрої."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"не доп.перехід пристр.в реж.сну"</string>
@@ -491,10 +498,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Ви провели пальцем надто повільно. Повторіть спробу."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Не розпізнано"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Апаратне забезпечення для сканування відбитка недоступне."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Не вдалося зберегти відбиток. Видаліть наявний відбиток."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Час очікування відбитка минув. Повторіть спробу."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Дію з відбитком скасовано."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Забагато спроб. Спробуйте пізніше."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Забагато спроб. Сканер відбитків пальців вимкнено."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Повторіть спробу."</string>
@@ -1030,6 +1040,12 @@
<string name="browse" msgid="1245903488306147205">"Відкрити"</string>
<string name="sms" msgid="4560537514610063430">"Повідомлення"</string>
<string name="add_contact" msgid="7867066569670597203">"Додати"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Закінчується пам’ять"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Деякі системні функції можуть не працювати"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Недостатньо місця для системи. Переконайтесь, що на пристрої є 250 МБ вільного місця, і повторіть спробу."</string>
@@ -1159,6 +1175,8 @@
<item quantity="other">Відкриті мережі Wi-Fi доступні</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Під’єднайтеся до відкритої мережі Wi-Fi"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Під’єднання до відкритої мережі Wi-Fi"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Під’єднано до мережі Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Не вдалося під’єднатися до мережі Wi-Fi"</string>
@@ -1458,6 +1476,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> – понад указаний ліміт."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Викор-ня фонових даних обмежено"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Скасувати обмеження."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Надмірне використання трафіку"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"За останні кілька днів ви використовуєте більше трафіку, ніж зазвичай. Торкніться, щоб переглянути дані й налаштування."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Сертифікат безпеки"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Цей сертифікат дійсний."</string>
<string name="issued_to" msgid="454239480274921032">"Кому видано:"</string>
@@ -1754,7 +1774,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"До <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"До <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (наступний будильник)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Доки ввімкнено режим \"Не турбувати\""</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Доки ви не вимкнете"</string>
<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>
@@ -1805,9 +1825,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Усі мови"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Усі регіони"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Пошук"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Увімкнути робочий режим?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Буде ввімкнено робочий профіль, зокрема додатки, фонову синхронізацію та пов’язані функції"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Увімкнути"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"У вас є нові повідомлення"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Щоб переглянути, відкрийте додаток для SMS"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Деякі функції можуть не працювати"</string>
@@ -1881,7 +1907,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Не вдалося відновити ярлик, оскільки підписи додатків не збігаються"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Не вдалося відновити ярлик"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Ярлик вимкнено"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Видалити"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Усе одно запустити"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Видалити шкідливий додаток?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> хоче показати фрагменти додатка <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Редагувати"</string>
</resources>
diff --git a/core/res/res/values-ur/strings.xml b/core/res/res/values-ur/strings.xml
index 54b25b7..c241214 100644
--- a/core/res/res/values-ur/strings.xml
+++ b/core/res/res/values-ur/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"آپ کی تنظیم اس آلے کا نظم کرتی ہے اور وہ نیٹ ورک ٹریفک کی نگرانی کر سکتی ہے۔ تفاصیل کیلئے تھپتھپائیں۔"</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"آپ کا آلہ صاف کر دیا جائے گا"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"منتظم کی ایپ استعمال نہیں کی جا سکتی۔ آپ کا آلہ اب مٹا دیا جائے گا۔\n\nاگر آپ کے پاس سوالات ہیں، تو اپنی تنظیم کے منتظم سے رابطہ کریں۔"</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> نے پرنٹنگ کو غیر فعال کر دیا ہے۔"</string>
<string name="me" msgid="6545696007631404292">"میں"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"ٹیبلیٹ کے اختیارات"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV کے اختیارات"</string>
@@ -217,8 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"ایمرجنسی"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"بگ کی اطلاع"</string>
<string name="global_action_logout" msgid="935179188218826050">"سیشن ختم کریں"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"اسکرین شاٹ"</string>
<string name="bugreport_title" msgid="2667494803742548533">"بگ کی اطلاع لیں"</string>
<string name="bugreport_message" msgid="398447048750350456">"ایک ای میل پیغام کے بطور بھیجنے کیلئے، یہ آپ کے موجودہ آلہ کی حالت کے بارے میں معلومات جمع کرے گا۔ بگ کی اطلاع شروع کرنے سے لے کر بھیجنے کیلئے تیار ہونے تک اس میں تھوڑا وقت لگے گا؛ براہ کرم تحمل سے کام لیں۔"</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"متعامل رپورٹ"</string>
@@ -264,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>، <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"حفاظتی وضع"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android سسٹم"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"ذاتی پر سوئچ کریں"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"کام پر سوئچ کریں"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"رابطے"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"اپنے رابطوں تک رسائی حاصل کریں"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> کو اپنے رابطوں تک رسائی کی اجازت دیں"</string>
@@ -417,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"ایپ کو آلے کی فون والی خصوصیات تک رسائی حاصل کرنے کی اجازت دیتا ہے۔ یہ اجازت ایپ کو فون نمبر اور آلے کے IDs کا تعین کرنے، آیا کوئی کال فعال ہے، اور کال کے ذریعہ مربوط ریموٹ نمبر کا تعین کرنے دیتی ہے۔"</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"سسٹم کے ذریعہ کالز روٹ کریں"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"کالںگ کا تجربہ بہتر بنانے کے لیے سسٹم کے ذریعہ ایپ کو کالز روٹ کرنے کی اجازت دیتا ہے۔"</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"فون نمبرز پڑھیں"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"ایپ کو آلہ کے فون نمبرز تک رسائی کرنے دیتا ہے۔"</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ٹیبلیٹ کو سلیپ وضع میں جانے سے روکیں"</string>
@@ -486,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"انگلی کو بہت آہستہ ہٹایا گیا۔ براہ کرم دوبارہ کوشش کریں۔"</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"تسلیم شدہ نہیں ہے"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"فنگر پرنٹ ہارڈ ویئر دستیاب نہیں ہے۔"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"فنگر پرنٹ اسٹور نہیں کیا جا سکتا ہے۔ براہ کرم ایک موجودہ فنگر پرنٹ ہٹائیں۔"</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"فنگر پرنٹ کی میعاد ختم ہوگئی۔ دوبارہ کوشش کریں۔"</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"فنگر پرنٹ کی کارروائی منسوخ ہوگئی۔"</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"کافی زیادہ کوششیں کی گئیں۔ بعد میں دوبارہ کوشش کریں۔"</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"کافی زیادہ کوششیں۔ فنگر پرنٹ سینسر غیر فعال ہو گیا۔"</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"دوبارہ کوشش کریں۔"</string>
@@ -991,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"کھولیں"</string>
<string name="sms" msgid="4560537514610063430">"پیغام"</string>
<string name="add_contact" msgid="7867066569670597203">"شامل کریں"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"اسٹوریج کی جگہ ختم ہو رہی ہے"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"ممکن ہے سسٹم کے کچھ فنکشنز کام نہ کریں"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"سسٹم کیلئے کافی اسٹوریج نہیں ہے۔ اس بات کو یقینی بنائیں کہ آپ کے پاس 250MB خالی جگہ ہے اور دوبارہ شروع کریں۔"</string>
@@ -1116,6 +1131,8 @@
<item quantity="one">عوامی Wi-Fi نیٹ ورک دستیاب ہے</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"عوامی Wi‑Fi نیٹ ورک سے منسلک ہوں"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"عوامی Wi‑Fi نیٹ ورک سے منسلک ہو رہا ہے"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"عوامی Wi‑Fi نیٹ ورک سے منسلک ہو گيا"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Wi‑Fi نیٹ ورک سے منسلک نہیں ہو سکا"</string>
@@ -1125,10 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi از خود آن ہو جائے گا"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"جب آپ اعلی معیار کے محفوظ کردہ نیٹ ورک کے قریب ہوں"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"دوبارہ آن نہ کریں"</string>
- <!-- no translation found for wifi_wakeup_enabled_title (6534603733173085309) -->
- <skip />
- <!-- no translation found for wifi_wakeup_enabled_content (189330154407990583) -->
- <skip />
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi-Fi خود کار طور پر آن ہو گیا"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"آپ ایک محفوظ نیٹ ورک کے قریب ہیں: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Wi-Fi نیٹ ورک میں سائن ان کریں"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"نیٹ ورک میں سائن ان کریں"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1416,6 +1431,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> متعینہ حد سے زیادہ ہے۔"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"پس منظر ڈیٹا محدود ہے"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"حد بندی ہٹانے کیلئے تھپتھپائیں۔"</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"ڈیٹا کا زیادہ استعمال"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"پچھلے چند دنوں میں آپ کے ڈیٹا کا استعمال معمول سے زیادہ ہو گیا ہے۔ استعمال اور ترتیبات دیکھنے کیلئے تھپتھپائیں۔"</string>
<string name="ssl_certificate" msgid="6510040486049237639">"سیکیورٹی سرٹیفیکیٹ"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"یہ سرٹیفکیٹ درست ہے۔"</string>
<string name="issued_to" msgid="454239480274921032">"جاری کردہ بنام:"</string>
@@ -1692,7 +1709,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> تک"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> تک (اگلا الارم)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"جب تک آپ \'ڈسڑب نہ کریں\' کو آف نہیں کر دیتے"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"یہاں تک کہ آپ آف کر دیں"</string>
<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>
@@ -1741,9 +1758,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"سبھی زبانیں"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"تمام علاقے"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"تلاش"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"دفتری وضع آن کریں؟"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"اس سے آپ کا دفتری پروفائل آن ہو جائے گا، بشمول ایپس، پس منظر کی مطابقت پذیری اور متعلقہ خصوصیات"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"آن کریں"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"آپ کے پاس نئے پیغامات ہیں"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"دیکھنے کیلئے SMS ایپ کھولیں"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"کچھ فعالیت محدود ہو سکتی ہے"</string>
@@ -1815,10 +1838,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"ایپ دستخط غیر مماثل ہونے کی وجہ سے شارٹ کٹ کو بحال نہیں کیا جا سکا"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"شارٹ کٹ کو بحال نہیں کیا جا سکا"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"شارٹ کٹ غیر فعال ہے"</string>
- <!-- no translation found for harmful_app_warning_uninstall (3846265696369136266) -->
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
- <!-- no translation found for harmful_app_warning_launch_anyway (5784428382367400530) -->
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
<skip />
- <!-- no translation found for harmful_app_warning_title (2229996292333310435) -->
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
<skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> <xliff:g id="APP_2">%2$s</xliff:g> کے سلائسز دکھانا چاہتی ہے"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"ترمیم کریں"</string>
</resources>
diff --git a/core/res/res/values-uz/strings.xml b/core/res/res/values-uz/strings.xml
index ce8613f..2329a41 100644
--- a/core/res/res/values-uz/strings.xml
+++ b/core/res/res/values-uz/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Tashkilotingiz bu qurilmani boshqaradi va tarmoq trafigini nazorat qilishi mumkin. Tafsilotlar uchun bosing."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Qurilmangizdagi ma’lumotlar o‘chirib tashlanadi"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Administrator ilovasini ishlatib bo‘lmaydi. Qurilmada barcha ma’lumotlar o‘chirib tashlanadi.\n\nSavollaringiz bo‘lsa, administrator bilan bog‘laning."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Chop etish funksiyasi <xliff:g id="OWNER_APP">%s</xliff:g> tomonidan faolsizlantirilgan."</string>
<string name="me" msgid="6545696007631404292">"Men"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Planshet sozlamalari"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"TV tanlamalari"</string>
@@ -263,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Xavfsiz usul"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android tizimi"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Shaxsiy profilga o‘tish"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Ishchi profilga o‘tish"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontaktlar"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"kontaktlarga kirish"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> uchun kontaktlaringizga ruxsat berish"</string>
@@ -416,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Ilovaga qurilmangizdagi telefon xususiyatlariga kirishga ruxsat beradi. Bu ruxsat ilovaga telefon raqami va qurilma nomlari, qo‘ng‘iroq faol yoki faolsizligi va masofadagi raqam qo‘ng‘rioq orqali bog‘langanligini aniqlashga imkon beradi."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"chaqiruvlarni tizim orqali yo‘naltirish"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Ilova aloqa sifatini yaxshilash maqsadida chaqiruvlarni tizim orqali yo‘naltirishi mumkin."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"telefon raqamlarini o‘qish"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Ilovaga qurilmaning telefon raqamlaridan foydalanishiga ruxsat beradi."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"planshetni uyquga ketishiga yo‘l qo‘ymaslik"</string>
@@ -485,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Barmoq juda sekin harakatlandi. Qayta urinib ko‘ring."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Aniqlanmadi"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Barmoq izi skaneri ish holatida emas."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Barmoq izini saqlab bo‘lmadi. Mavjud barmoq izlaridan birini o‘chirib tashlang."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Barmoq izini aniqlash vaqti tugab qoldi. Qayta urinib ko‘ring."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Barmoq izi tekshiruvi bekor qilindi."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Urinishlar soni ko‘payib ketdi. Keyinroq qayta urinib ko‘ring."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Urinishlar soni ko‘payib ketdi. Barmoq izi skaneri bloklandi."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Qayta urinib ko‘ring."</string>
@@ -990,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Ochish"</string>
<string name="sms" msgid="4560537514610063430">"Xabar"</string>
<string name="add_contact" msgid="7867066569670597203">"Qo‘shish"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Xotirada bo‘sh joy tugamoqda"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Ba‘zi tizim funksiyalari ishlamasligi mumkin"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Tizim uchun xotirada joy yetarli emas. Avval 250 megabayt joy bo‘shatib, keyin qurilmani o‘chirib yoqing."</string>
@@ -1115,6 +1131,8 @@
<item quantity="one">Ochiq Wi-Fi tarmog‘i aniqlandi</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Ochiq Wi‑Fi tarmoqqa ulaning"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Ochiq Wi‑Fi tarmoqqa ulanilmoqda"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Wi‑Fi tarmoqqa ulanildi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Wi-Fi tarmoqqa ulanib bo‘lmadi"</string>
@@ -1413,6 +1431,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"Chegaradan <xliff:g id="SIZE">%s</xliff:g> oshib ketdi."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Fon rejimi cheklangan"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Cheklovni olib tashlash uchun bosing."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Ko‘p trafik sarflandi"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Oxirgi bir necha kunda odatdagidan ko‘proq trafik sarflandi. Trafik sarfi va sozlamalarni ko‘rish uchun bosing."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Xavfsizlik sertifikati"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Ushbu sertifikat - to‘g‘ri."</string>
<string name="issued_to" msgid="454239480274921032">"Tegishli:"</string>
@@ -1689,7 +1709,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> gacha"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> gacha (keyingi signal)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"“Bezovta qilinmasin” rejimi o‘chirilmaguncha"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"O‘chirib qo‘ymagunimcha"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"“Bezovta qilinmasin” rejimi o‘chirilmaguncha"</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">"Yig‘ish"</string>
@@ -1738,9 +1758,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Barcha tillar"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Barcha hududlar"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Qidiruv"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Ishchi rejim yoqilsinmi?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Bunda ishchi profilingiz, jumladan, ilovalar, fonda sinxronlash va aloqador funksiyalar yoqiladi"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Yoqish"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Sizga yangi SMS keldi"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Ko‘rish uchun SMS ilovasini oching"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Ba’zi funksiyalar cheklanishi m-n"</string>
@@ -1812,7 +1838,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Ilova imzosi mos kelmagani uchun yorliq tiklanmadi"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Yorliq tiklanmadi"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Yorliq faolsizlantirildi"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"O‘chirib tashlash"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Baribir ishga tushirilsin"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Zararli ilova o‘chirilsinmi?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> ilovasi <xliff:g id="APP_2">%2$s</xliff:g> ilovasidan fragmentlar ko‘rsatish uchun ruxsat so‘ramoqda"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Tahrirlash"</string>
</resources>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index f5a1972..7557acf 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Tổ chức của bạn sẽ quản lý thiết bị này và có thể theo dõi lưu lượng truy cập mạng. Nhấn để biết chi tiết."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Thiết bị của bạn sẽ bị xóa"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Không thể sử dụng ứng dụng quản trị. Bây giờ, thiết bị của bạn sẽ bị xóa.\n\nNếu bạn có thắc mắc, hãy liên hệ với quản trị viên của tổ chức bạn."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"<xliff:g id="OWNER_APP">%s</xliff:g> đã tắt tính năng in."</string>
<string name="me" msgid="6545696007631404292">"Tôi"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Tùy chọn máy tính bảng"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Tùy chọn TV"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"Khẩn cấp"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"Báo cáo lỗi"</string>
<string name="global_action_logout" msgid="935179188218826050">"Kết thúc phiên"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"Ảnh chụp màn hình"</string>
<string name="bugreport_title" msgid="2667494803742548533">"Nhận báo cáo lỗi"</string>
<string name="bugreport_message" msgid="398447048750350456">"Báo cáo này sẽ thu thập thông tin về tình trạng thiết bị hiện tại của bạn, để gửi dưới dạng thông báo qua email. Sẽ mất một chút thời gian kể từ khi bắt đầu báo cáo lỗi cho tới khi báo cáo sẵn sàng để gửi; xin vui lòng kiên nhẫn."</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"Báo cáo tương tác"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Chế độ an toàn"</string>
<string name="android_system_label" msgid="6577375335728551336">"Hệ thống Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Chuyển sang Cá nhân"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Chuyển sang Công việc"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Danh bạ"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"truy cập vào danh bạ của bạn"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Cho phép <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> truy cập vào danh bạ của bạn"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Cho phép ứng dụng truy cập vào các tính năng điện thoại của thiết bị. Quyền này cho phép ứng dụng xác định số điện thoại và ID thiết bị, cho dù cuộc gọi có hiện hoạt hay không và số từ xa có được kết nối bằng một cuộc gọi hay không."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"định tuyến cuộc gọi thông qua hệ thống"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Cho phép ứng dụng định tuyến cuộc gọi thông qua hệ thống nhằm cải thiện trải nghiệm gọi điện."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"đọc số điện thoại"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Cho phép ứng dụng truy cập số điện thoại của thiết bị."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ngăn máy tính bảng chuyển sang chế độ ngủ"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Di chuyển ngón tay quá chậm. Vui lòng thử lại."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Không nhận dạng được"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Phần cứng vân tay không khả dụng."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Không thể lưu vân tay. Vui lòng xóa vân tay hiện có."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Đã hết thời gian chờ vân tay. Hãy thử lại."</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Thao tác dùng dấu vân tay bị hủy."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Quá nhiều lần thử. Hãy thử lại sau."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Quá nhiều lần thử. Cảm biến vân tay đã bị tắt."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Thử lại."</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Mở"</string>
<string name="sms" msgid="4560537514610063430">"Gửi tin nhắn"</string>
<string name="add_contact" msgid="7867066569670597203">"Thêm"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Sắp hết dung lượng lưu trữ"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Một số chức năng hệ thống có thể không hoạt động"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Không đủ bộ nhớ cho hệ thống. Đảm bảo bạn có 250 MB dung lượng trống và khởi động lại."</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">Mở mạng Wi-Fi khả dụng</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Kết nối với mạng Wi-Fi đang mở"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Đang kết nối với mạng Wi‑Fi đang mở"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Đã kết nối với mạng Wi-Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Không thể kết nối với mạng Wi‑Fi"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi-Fi sẽ tự động bật"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"Khi bạn ở gần mạng đã lưu chất lượng cao"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"Không bật lại"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"Wi-Fi đã tự động bật"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"Bạn đang ở gần mạng đã lưu: <xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"Đăng nhập vào mạng Wi-Fi"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"Đăng nhập vào mạng"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> vượt quá g.hạn được chỉ định."</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Dữ liệu nền bị giới hạn"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Nhấn để xóa giới hạn."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Mức sử dụng dữ liệu lớn"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Mức sử dụng dữ liệu của bạn trong vài ngày qua lớn hơn bình thường. Hãy nhấn để xem mức sử dụng và cài đặt."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Chứng chỉ bảo mật"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Chứng chỉ này hợp lệ."</string>
<string name="issued_to" msgid="454239480274921032">"Cấp cho:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Cho đến <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Cho tới <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (cảnh báo tiếp theo)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Cho đến khi bạn tắt Không làm phiền"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Cho đến khi bạn tắt"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Cho đến khi bạn tắt Đừng làm phiền"</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">"Thu gọn"</string>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Tất cả ngôn ngữ"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Tất cả khu vực"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Tìm kiếm"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Bật chế độ làm việc?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Thao tác này sẽ bật hồ sơ công việc của bạn, bao gồm ứng dụng, đồng bộ hóa trong nền và các tính năng liên quan."</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Bật"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Bạn có tin nhắn mới"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Mở ứng dụng SMS để xem"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Một số chức năng có thể bị hạn chế"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Không thể khôi phục lối tắt do ứng dụng không hỗ trợ sao lưu và khôi phục"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Không thể khôi phục lối tắt do không khớp chữ ký ứng dụng"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Không thể khôi phục lối tắt"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Đã vô hiệu hóa lối tắt"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"<xliff:g id="APP_0">%1$s</xliff:g> muốn hiển thị các lát của <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Chỉnh sửa"</string>
</resources>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 70b299e..e52185e 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"贵单位会管理该设备,且可能会监控网络流量。点按即可了解详情。"</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"系统将清空您的设备"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"相关管理应用无法使用,系统现在将清空您的设备。\n\n如有疑问,请与您所在单位的管理员联系。"</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"“<xliff:g id="OWNER_APP">%s</xliff:g>”已停用打印功能。"</string>
<string name="me" msgid="6545696007631404292">"我"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"平板电脑选项"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"电视选项"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"紧急呼救"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"错误报告"</string>
<string name="global_action_logout" msgid="935179188218826050">"结束会话"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"屏幕截图"</string>
<string name="bugreport_title" msgid="2667494803742548533">"提交错误报告"</string>
<string name="bugreport_message" msgid="398447048750350456">"这会收集有关当前设备状态的信息,并以电子邮件的形式进行发送。从开始生成错误报告到准备好发送需要一点时间,请耐心等待。"</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"互动式报告"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>、<xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"安全模式"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android 系统"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"切换到“个人”"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"切换到“工作”"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"通讯录"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"访问您的通讯录"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"允许<b><xliff:g id="APP_NAME">%1$s</xliff:g></b>访问您的通讯录"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"允许该应用访问设备的电话功能。此权限可让该应用确定本机号码和设备 ID、是否正处于通话状态以及拨打的号码。"</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"通过系统转接来电"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"允许该应用通过系统转接来电,以改善通话体验。"</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"读取电话号码"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"允许该应用访问设备上的电话号码。"</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"阻止平板电脑进入休眠状态"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"手指移动太慢,请重试。"</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"无法识别"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"指纹硬件无法使用。"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"无法存储指纹。请移除一个现有的指纹。"</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"指纹录入操作超时,请重试。"</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"指纹操作已取消。"</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"尝试次数过多,请稍后重试。"</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"尝试次数过多。指纹传感器已停用。"</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"请重试。"</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"打开"</string>
<string name="sms" msgid="4560537514610063430">"发短信"</string>
<string name="add_contact" msgid="7867066569670597203">"添加"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"存储空间不足"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"某些系统功能可能无法正常使用"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"系统存储空间不足。请确保您有250MB的可用空间,然后重新启动。"</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">有可用的开放 WLAN 网络</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"连接到开放的 WLAN 网络"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"正在连接到开放的 WLAN 网络"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"已连接到 WLAN 网络"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"无法连接到 WLAN 网络"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"WLAN 将自动开启"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"当您位于已保存的高品质网络信号范围内时"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"不要重新开启"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"已自动开启 WLAN 网络"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"您位于已保存的网络 (<xliff:g id="NETWORK_SSID">%1$s</xliff:g>) 信号范围内"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"登录到WLAN网络"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"登录到网络"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"超出规定上限 <xliff:g id="SIZE">%s</xliff:g>。"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"后台流量受限制"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"点按即可取消限制。"</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"流量消耗较多"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"您过去几天的流量消耗超出了正常消耗量。点按即可查看流量消耗情况和设置。"</string>
<string name="ssl_certificate" msgid="6510040486049237639">"安全证书"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"该证书有效。"</string>
<string name="issued_to" msgid="454239480274921032">"颁发给:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"到<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"直到<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>(闹钟下次响铃时)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"直到您关闭“勿扰”模式"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"直到您将其关闭"</string>
<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>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"所有语言"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"所有国家/地区"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"搜索"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"要开启工作模式吗?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"这将开启您的工作资料(包括应用、后台同步和相关功能)"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"开启"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"您有新消息"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"打开短信应用查看"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"部分功能可能会受到限制"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"无法恢复快捷方式,因为应用不支持备份和恢复功能"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"无法恢复快捷方式,因为应用签名不相符"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"无法恢复快捷方式"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"快捷方式已停用"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"“<xliff:g id="APP_0">%1$s</xliff:g>”想要显示“<xliff:g id="APP_2">%2$s</xliff:g>”图块"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"编辑"</string>
</resources>
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index 3dad724..cba21c3 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"您的機構會管理此裝置,並可能會監控網絡流量。輕按即可瞭解詳情。"</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"您的裝置將被清除"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"管理員應用程式無法使用。系統會現在清除您的裝置資料。\n\n如有問題,請聯絡您的機構管理員。"</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"「<xliff:g id="OWNER_APP">%s</xliff:g>」暫停了列印。"</string>
<string name="me" msgid="6545696007631404292">"我本人"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"平板電腦選項"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"電視選項"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"緊急"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"錯誤報告"</string>
<string name="global_action_logout" msgid="935179188218826050">"結束工作階段"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"擷取螢幕畫面"</string>
<string name="bugreport_title" msgid="2667494803742548533">"取得錯誤報告"</string>
<string name="bugreport_message" msgid="398447048750350456">"這會收集您目前裝置狀態的相關資訊,並以電郵傳送給您。從開始建立錯誤報告到準備傳送需要一段時間,請耐心等候。"</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"互動報告"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>、<xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"安全模式"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android 系統"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"切換至個人設定檔"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"切換至工作設定檔"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"通訊錄"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"存取您的通訊錄"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"允許 <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> 存取您的聯絡人"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"允許應用程式使用裝置的電話功能。這項權限允許應用程式確定手機號碼和裝置編號、是否正在通話中,以及所撥打的對方號碼。"</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"透過系統轉接來電"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"允許應用程式透過系統轉接來電,以改善通話體驗。"</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"讀取電話號碼"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"允許應用程式存取裝置上的電話號碼。"</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"防止平板電腦進入休眠狀態"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"手指移動太慢,請重試。"</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"未能辨別"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"無法使用指紋軟件。"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"指紋無法儲存。請移除現有指紋。"</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"指紋已逾時。請再試一次。"</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"指紋操作已取消。"</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"嘗試次數過多,請稍後再試。"</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"嘗試次數過多,指紋感應器已停用。"</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"再試一次。"</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"開啟"</string>
<string name="sms" msgid="4560537514610063430">"短訊"</string>
<string name="add_contact" msgid="7867066569670597203">"新增"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"儲存空間即將用盡"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"部分系統功能可能無法運作"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"系統儲存空間不足。請確認裝置有 250 MB 的可用空間,然後重新啟動。"</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">有可用的公開 Wi-Fi 網絡</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"連線至開放的 Wi-Fi 網絡"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"正在連線至開放的 Wi-Fi 網絡"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"已連線至 Wi-Fi 網絡"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"無法連線至 Wi-Fi 網絡"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi-Fi 將會自動開啟"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"當您位於已儲存的高品質網絡信號範圍內時"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"不要重新開啟"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"已自動開啟 Wi‑Fi"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"您附近有已儲存的網絡:<xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"登入 Wi-Fi 網絡"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"登入網絡"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> 超過規定上限。"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"已限制背景資料"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"輕按即可移除限制。"</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"數據用量過多"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"您過去幾天的數據用量比平常多。輕按即可查看用量和設定。"</string>
<string name="ssl_certificate" msgid="6510040486049237639">"安全性憑證"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"憑證有效。"</string>
<string name="issued_to" msgid="454239480274921032">"發給:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"完成時間:<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"直至<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (下一次響鬧)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"直至您關閉「請勿騷擾」功能"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"直至您關閉為止"</string>
<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>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"所有語言"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"所有國家/地區"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"搜尋"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"要開啟工作模式嗎?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"您的工作設定檔將會開啟,當中包括應用程式、背景同步處理和相關功能"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"開啟"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"您有新的訊息"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"開啟短訊應用程式查看內容"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"部分功能可能會受到限制"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"由於應用程式不支援備份和還原功能,因此無法還原捷徑"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"由於應用程式簽署不相符,因此無法還原捷徑"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"無法還原捷徑"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"已停用捷徑"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"「<xliff:g id="APP_0">%1$s</xliff:g>」想顯示「<xliff:g id="APP_2">%2$s</xliff:g>」的快訊"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"編輯"</string>
</resources>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index d3ad7b0..2b4f6cb 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"貴機構會管理這個裝置,且可能監控網路流量。輕觸即可瞭解詳情。"</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"你的裝置資料將遭到清除"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"無法使用管理員應用程式,系統現在將清除你裝置中的資料。\n\n如有任何問題,請與貴機構的管理員聯絡。"</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"「<xliff:g id="OWNER_APP">%s</xliff:g>」已停用列印功能。"</string>
<string name="me" msgid="6545696007631404292">"我"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"平板電腦選項"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"電視選項"</string>
@@ -217,6 +218,7 @@
<string name="global_action_emergency" msgid="7112311161137421166">"緊急電話"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"錯誤報告"</string>
<string name="global_action_logout" msgid="935179188218826050">"結束"</string>
+ <string name="global_action_screenshot" msgid="8329831278085426283">"擷取螢幕畫面"</string>
<string name="bugreport_title" msgid="2667494803742548533">"取得錯誤報告"</string>
<string name="bugreport_message" msgid="398447048750350456">"這會收集你目前裝置狀態的相關資訊,以便透過電子郵件傳送。從錯誤報告開始建立到準備傳送的這段過程可能需要一點時間,敬請耐心等候。"</string>
<string name="bugreport_option_interactive_title" msgid="8635056131768862479">"互動式報告"</string>
@@ -262,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>、<xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"安全模式"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android 系統"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"切換至個人設定檔"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"切換至公司設定檔"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"聯絡人"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"存取你的聯絡人"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"允許「<xliff:g id="APP_NAME">%1$s</xliff:g>」存取你的聯絡人"</string>
@@ -415,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"允許應用程式使用裝置的電話功能。這項權限可讓應用程式判讀手機號碼和裝置 ID、是否正在通話中,以及所撥打的對方號碼。"</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"透過系統接通來電"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"允許應用程式透過系統接通來電,以改善通話品質。"</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"讀取電話號碼"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"允許應用程式存取裝置上的電話號碼資料。"</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"防止平板電腦進入休眠狀態"</string>
@@ -484,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"手指移動速度過慢,請再試一次。"</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"無法識別"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"指紋硬體無法使用。"</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"無法儲存指紋,請先移除現有指紋。"</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"指紋處理作業逾時,請再試一次。"</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"指紋作業已取消。"</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"嘗試次數過多,請稍後再試。"</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"嘗試次數過多,指紋感應器已停用。"</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"請再試一次。"</string>
@@ -989,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"開啟"</string>
<string name="sms" msgid="4560537514610063430">"訊息"</string>
<string name="add_contact" msgid="7867066569670597203">"新增"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"儲存空間即將用盡"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"部分系統功能可能無法運作"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"系統儲存空間不足。請確定你已釋出 250MB 的可用空間,然後重新啟動。"</string>
@@ -1114,6 +1131,8 @@
<item quantity="one">有多個可用的開放 Wi-Fi 網路</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"連線至開放的 Wi‑Fi 網路"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"正在連線至開放的 Wi‑Fi 網路"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"已連線至 Wi-Fi 網路"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"無法連線至 Wi‑Fi 網路"</string>
@@ -1123,6 +1142,8 @@
<string name="wifi_wakeup_onboarding_title" msgid="228772560195634292">"Wi‑Fi 將自動開啟"</string>
<string name="wifi_wakeup_onboarding_subtext" msgid="3989697580301186973">"當你位於已儲存的高品質網路範圍內時"</string>
<string name="wifi_wakeup_onboarding_action_disable" msgid="838648204200836028">"不要重新開啟"</string>
+ <string name="wifi_wakeup_enabled_title" msgid="6534603733173085309">"已自動開啟 Wi‑Fi"</string>
+ <string name="wifi_wakeup_enabled_content" msgid="189330154407990583">"你位於已儲存的網路範圍內:<xliff:g id="NETWORK_SSID">%1$s</xliff:g>"</string>
<string name="wifi_available_sign_in" msgid="9157196203958866662">"登入 Wi-Fi 網路"</string>
<string name="network_available_sign_in" msgid="1848877297365446605">"登入網路"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
@@ -1409,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> 超過規定上限。"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"已限制背景資料"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"輕觸即可移除限制。"</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"大量數據用量"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"你過去幾天的數據用量比平常來得多。輕觸即可查看用量和設定。"</string>
<string name="ssl_certificate" msgid="6510040486049237639">"安全性憑證"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"憑證有效。"</string>
<string name="issued_to" msgid="454239480274921032">"發佈至:"</string>
@@ -1685,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"結束時間:<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"到<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> 為止 (下一個鬧鐘)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"直到你關閉「零打擾」模式"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"直到你關閉為止"</string>
<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>
@@ -1734,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"所有語言"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"所有地區"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"搜尋"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"要啟用工作模式嗎?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"這樣做會啟用你的 Work 設定檔,包括應用程式、背景同步處理和相關功能"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"開啟"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"你有新訊息"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"開啟簡訊應用程式來查看內容"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"部分功能可能受到鎖定"</string>
@@ -1807,6 +1836,13 @@
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"應用程式不支援備份與還原功能,因此無法還原捷徑"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"應用程式簽署不相符,因此無法還原捷徑"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"無法還原捷徑"</string>
- <!-- no translation found for shortcut_disabled_reason_unknown (5276016910284687075) -->
+ <string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"捷徑已停用"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
<skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"「<xliff:g id="APP_0">%1$s</xliff:g>」想要顯示「<xliff:g id="APP_2">%2$s</xliff:g>」的區塊"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"編輯"</string>
</resources>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index e97f893..3f5d2b1 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -181,6 +181,7 @@
<string name="network_logging_notification_text" msgid="7930089249949354026">"Inhlangano yakho iphethe le divayisi futhi kungenzeka ingaqaphi ithrafikhi yenethiwekhi. Thephela imininingwane."</string>
<string name="factory_reset_warning" msgid="5423253125642394387">"Idivayisi yakho izosulwa"</string>
<string name="factory_reset_message" msgid="7972496262232832457">"Uhlelo lokusebenza lomlawuli alikwazi ukusetshenziswa. Idivayisi yakho manje izosuswa.\n\nUma unemibuzo, xhumana nomlawuli wezinhlangano zakho."</string>
+ <string name="printing_disabled_by" msgid="8936832919072486965">"Ukuphrinta kukhutshazwe nge-<xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="me" msgid="6545696007631404292">"Mina"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Okukhethwa kukho kwethebhulethi"</string>
<string name="power_dialog" product="tv" msgid="6153888706430556356">"Izinketho ze-TV"</string>
@@ -263,8 +264,10 @@
<string name="foreground_service_multiple_separator" msgid="4021901567939866542">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="2788228061547930246">"Imodi ephephile"</string>
<string name="android_system_label" msgid="6577375335728551336">"Uhlelo lwe-Android"</string>
- <string name="user_owner_label" msgid="1119010402169916617">"Shintshela komuntu siqu"</string>
- <string name="managed_profile_label" msgid="5289992269827577857">"Shintshela kumsebenzi"</string>
+ <!-- no translation found for user_owner_label (8836124313744349203) -->
+ <skip />
+ <!-- no translation found for managed_profile_label (8947929265267690522) -->
+ <skip />
<string name="permgrouplab_contacts" msgid="3657758145679177612">"Oxhumana nabo"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"finyelela koxhumana nabo"</string>
<string name="permgrouprequest_contacts" msgid="1601591667800538208">"Vumela i-<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ukuthi ithole ukufinyelela koxhumana nabo"</string>
@@ -416,6 +419,10 @@
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Ivumela uhlelo lokusebenza ukufinyelela izici zefoni zedivayisi. Le mvume ivumela uhlelo lokusebenza ukucacisa inombolo yefoni nobunikazi bedivayisi, ukuthi noma ikholi iyasebenza, futhi nenombolo yesilawuli kude zixhunywe ngekholi."</string>
<string name="permlab_manageOwnCalls" msgid="1503034913274622244">"yanza imizila yamakholi ngesistimu"</string>
<string name="permdesc_manageOwnCalls" msgid="6552974537554717418">"Ivumela uhlelo lokusebenza ukwenza imizila yamakholi ngesistimu ukuze ithuthukise umuzwa wokushaya."</string>
+ <!-- no translation found for permlab_acceptHandover (2661534649736022409) -->
+ <skip />
+ <!-- no translation found for permdesc_acceptHandovers (4570660484220539698) -->
+ <skip />
<string name="permlab_readPhoneNumbers" msgid="6108163940932852440">"funda izinombolo zefoni"</string>
<string name="permdesc_readPhoneNumbers" msgid="8559488833662272354">"Ivumela uhlelo lokusebenza ukufinyelela izinombolo zefoni zedivayisi."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"gwema ithebhulethi ukuba ingalali"</string>
@@ -485,10 +492,13 @@
<string name="fingerprint_acquired_too_slow" msgid="59250885689661653">"Umnwe uhanjiswe kancane kakhulu. Sicela uzame futhi."</string>
<string-array name="fingerprint_acquired_vendor">
</string-array>
+ <string name="fingerprint_not_recognized" msgid="2690661881608146617">"Akubonwa"</string>
<string name="fingerprint_error_hw_not_available" msgid="7955921658939936596">"Izingxenyekazi zekhompuyutha zezingxivizo zeminwe azitholakali."</string>
<string name="fingerprint_error_no_space" msgid="1055819001126053318">"Izigxivizo zeminwe azikwazi ukugcinwa. Sicela ususe izigxivizo zeminwe ezikhona."</string>
<string name="fingerprint_error_timeout" msgid="3927186043737732875">"Kufinyelelwe isikhathi sokuvala sezigxivizo zeminwe. Zama futhi"</string>
<string name="fingerprint_error_canceled" msgid="4402024612660774395">"Ukusebenza kwezingxivizo zeminwe kukhanseliwe."</string>
+ <!-- no translation found for fingerprint_error_user_canceled (7999639584615291494) -->
+ <skip />
<string name="fingerprint_error_lockout" msgid="5536934748136933450">"Imizamo eminingi kakhulu. Zama futhi emuva kwesikhathi."</string>
<string name="fingerprint_error_lockout_permanent" msgid="5033251797919508137">"Imizamo eminingi kakhulu. Inzwa yezigxivizo zeminwe ikhutshaziwe."</string>
<string name="fingerprint_error_unable_to_process" msgid="6107816084103552441">"Zama futhi."</string>
@@ -990,6 +1000,12 @@
<string name="browse" msgid="1245903488306147205">"Vula"</string>
<string name="sms" msgid="4560537514610063430">"Umlayezo"</string>
<string name="add_contact" msgid="7867066569670597203">"Engeza"</string>
+ <!-- no translation found for view_calendar (979609872939597838) -->
+ <skip />
+ <!-- no translation found for add_calendar_event (1953664627192056206) -->
+ <skip />
+ <!-- no translation found for view_flight (7691640491425680214) -->
+ <skip />
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Isikhala sokulondoloza siyaphela"</string>
<string name="low_internal_storage_view_text" msgid="6640505817617414371">"Eminye imisebenzi yohlelo ingahle ingasebenzi"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="6935190099204693424">"Akusona isitoreji esanele sesistimu. Qiniseka ukuthi unesikhala esikhululekile esingu-250MB uphinde uqalise kabusha."</string>
@@ -1115,6 +1131,8 @@
<item quantity="other">Vula amanethiwekhi we-Wi-Fi atholakalayo</item>
</plurals>
<string name="wifi_available_title" msgid="3817100557900599505">"Xhuma kunethiwekhi evulekile ye-Wi‑Fi"</string>
+ <!-- no translation found for wifi_available_carrier_network_title (4527932626916527897) -->
+ <skip />
<string name="wifi_available_title_connecting" msgid="1557292688310330032">"Ixhuma kunethiwekhi evulekile ye-Wi‑Fi"</string>
<string name="wifi_available_title_connected" msgid="7542672851522241548">"Kuxhumeke kunethiwekhi ye-Wi‑Fi"</string>
<string name="wifi_available_title_failed_to_connect" msgid="6861772233582618132">"Ayikwazanga ukuxhumeka kunethiwekhi ye-Wi-Fi"</string>
@@ -1412,6 +1430,8 @@
<string name="data_usage_limit_snoozed_body" msgid="7035490278298441767">"<xliff:g id="SIZE">%s</xliff:g> ngaphezu komkhawulo ocacisiwe"</string>
<string name="data_usage_restricted_title" msgid="5965157361036321914">"Imininingo egciniwe ivinjelwe"</string>
<string name="data_usage_restricted_body" msgid="469866376337242726">"Thepha ukuze ususe umkhawulo."</string>
+ <string name="data_usage_rapid_title" msgid="4579994056245665351">"Ukusetshenziswa okukhulu kwedatha"</string>
+ <string name="data_usage_rapid_body" msgid="4899922842674185567">"Ukusetshenziswa kwedatha yakho ezinsukwini zokugcina ezimbalwa yinkulu kunokujwayelekile. Thepha ukuze ubuke ukusetshenziswa nezilungiselelo."</string>
<string name="ssl_certificate" msgid="6510040486049237639">"Isitifiketi sokuvikeleka"</string>
<string name="ssl_certificate_is_valid" msgid="6825263250774569373">"Lesi sitifiketi silungile."</string>
<string name="issued_to" msgid="454239480274921032">"Ikhishelwe u:"</string>
@@ -1688,7 +1708,7 @@
</plurals>
<string name="zen_mode_until" msgid="7336308492289875088">"Kuze kube ngu-<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
<string name="zen_mode_alarm" msgid="9128205721301330797">"Kuze kube ngu-<xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (i-alamu elandelayo)"</string>
- <string name="zen_mode_forever" msgid="1916263162129197274">"Uze uvale ungaphazamisi"</string>
+ <string name="zen_mode_forever" msgid="931849471004038757">"Uze uvale isikrini"</string>
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"Uze uvale ungaphazamisi"</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">"Goqa"</string>
@@ -1737,9 +1757,15 @@
<string name="language_picker_section_all" msgid="3097279199511617537">"Zonke izilimi"</string>
<string name="region_picker_section_all" msgid="8966316787153001779">"Zonke izifunda"</string>
<string name="locale_search_menu" msgid="2560710726687249178">"Sesha"</string>
- <string name="work_mode_off_title" msgid="2615362773958585967">"Vula imodi yomsebenzi?"</string>
- <string name="work_mode_off_message" msgid="2961559609199223594">"Lokhu kuzovula iphrofayela yakho yomsebenzi, okufaka izinhlelo zokusebenza, ukuvumelanisa okungemuva, nezici ezihlobene"</string>
+ <!-- no translation found for work_mode_off_title (1118691887588435530) -->
+ <skip />
+ <!-- no translation found for work_mode_off_message (5130856710614337649) -->
+ <skip />
<string name="work_mode_turn_on" msgid="2062544985670564875">"Vula"</string>
+ <!-- no translation found for deprecated_target_sdk_message (1449696506742572767) -->
+ <skip />
+ <!-- no translation found for deprecated_target_sdk_app_store (5032340500368495077) -->
+ <skip />
<string name="new_sms_notification_title" msgid="8442817549127555977">"Unemilayezo emisha"</string>
<string name="new_sms_notification_content" msgid="7002938807812083463">"Vula uhlelo lokusebenza lwe-SMS ukuze ubuke"</string>
<string name="user_encrypted_title" msgid="9054897468831672082">"Okunye ukusebenza kungakhawulelwe"</string>
@@ -1811,7 +1837,12 @@
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Ayikwazanga ukubuyisa isinqamuleli ngoba isignisha yohlelo lokusebenza ayifani"</string>
<string name="shortcut_restore_unknown_issue" msgid="8703738064603262597">"Ayikwazanga ukubuyisa isinqamuleli"</string>
<string name="shortcut_disabled_reason_unknown" msgid="5276016910284687075">"Isinqamuleli sikhutshaziwe"</string>
- <string name="harmful_app_warning_uninstall" msgid="3846265696369136266">"Khipha"</string>
- <string name="harmful_app_warning_launch_anyway" msgid="5784428382367400530">"Qalisa noma kunjalo"</string>
- <string name="harmful_app_warning_title" msgid="2229996292333310435">"Khipha uhlelo lokusebenza oluyingozi?"</string>
+ <!-- no translation found for harmful_app_warning_uninstall (4837672735619532931) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_open_anyway (596432803680914321) -->
+ <skip />
+ <!-- no translation found for harmful_app_warning_title (8982527462829423432) -->
+ <skip />
+ <string name="slices_permission_request" msgid="8484943441501672932">"I-<xliff:g id="APP_0">%1$s</xliff:g> ifuna ukubonisa izingcezu ze-<xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="screenshot_edit" msgid="7867478911006447565">"Hlela"</string>
</resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 354d658..0543305 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -5878,6 +5878,13 @@
<attr name="insetBottom" format="fraction|dimension" />
</declare-styleable>
+ <!-- Drawable used to draw animated images (gif) -->
+ <declare-styleable name="AnimatedImageDrawable">
+ <!-- Identifier of the image file. This attribute is mandatory.
+ It must be an image file with multiple frames, e.g. gif or webp -->
+ <attr name="src" />
+ </declare-styleable>
+
<!-- Drawable used to draw bitmaps. -->
<declare-styleable name="BitmapDrawable">
<!-- Identifier of the bitmap file. This attribute is mandatory. -->
@@ -8766,6 +8773,16 @@
<attr name="fontProviderCerts" format="reference" />
</declare-styleable>
+ <!-- Attributes that are read when parsing a tag. -->
+ <declare-styleable name="VideoView2">
+ <attr name="enableControlView" format="boolean" />
+ <attr name="showSubtitle" format="boolean" />
+ <attr name="viewType" format="enum">
+ <enum name="surfaceView" value="0" />
+ <enum name="textureView" value="1" />
+ </attr>
+ </declare-styleable>
+
<!-- @hide -->
<declare-styleable name="RecyclerView">
<attr name="layoutManager" format="string" />
diff --git a/core/res/res/values/colors_material.xml b/core/res/res/values/colors_material.xml
index f8a77f8..ce4ac61 100644
--- a/core/res/res/values/colors_material.xml
+++ b/core/res/res/values/colors_material.xml
@@ -44,7 +44,8 @@
<color name="button_material_dark">#ff5a595b</color>
<color name="button_material_light">#ffd6d7d7</color>
- <color name="error_color_material">#F4511E</color>
+ <color name="error_color_material_dark">#ff7043</color><!-- deep orange 400 -->
+ <color name="error_color_material_light">#ff5722</color><!-- deep orange 500 -->
<color name="switch_thumb_normal_material_dark">#ffbdbdbd</color>
<color name="switch_thumb_normal_material_light">#fff1f1f1</color>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index c623c9a..a22ca87 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -436,7 +436,7 @@
0 = Not available.
1 = Available.
-->
- <integer translatable="false" name="config_wifi_wakeup_available">0</integer>
+ <integer translatable="false" name="config_wifi_wakeup_available">1</integer>
<!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering.
@@ -3244,6 +3244,10 @@
or empty if the default should be used. -->
<string translatable="false" name="config_deviceSpecificDevicePolicyManagerService"></string>
+ <!-- Class name of the device specific implementation to replace the AudioService
+ or empty if the default should be used. -->
+ <string translatable="false" name="config_deviceSpecificAudioService"></string>
+
<!-- Component name of media projection permission dialog -->
<string name="config_mediaProjectionPermissionDialogComponent" translateable="false">com.android.systemui/com.android.systemui.media.MediaProjectionPermissionActivity</string>
@@ -3253,8 +3257,8 @@
<dimen name="config_buttonCornerRadius">@dimen/control_corner_material</dimen>
<!-- Controls whether system buttons use all caps for text -->
<bool name="config_buttonTextAllCaps">true</bool>
- <!-- Name of the font family used for system buttons -->
- <string name="config_fontFamilyButton">@string/font_family_button_material</string>
+ <!-- Name of the font family used for system surfaces where the font should use medium weight -->
+ <string name="config_headlineFontFamilyMedium">@string/font_family_button_material</string>
<string translatable="false" name="config_batterySaverDeviceSpecificConfig"></string>
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 2c824ea0..e610efd 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -33,6 +33,10 @@
<dimen name="toast_y_offset">24dp</dimen>
<!-- Height of the status bar -->
<dimen name="status_bar_height">24dp</dimen>
+ <!-- Height of area above QQS where battery/time go -->
+ <dimen name="quick_qs_offset_height">48dp</dimen>
+ <!-- Total height of QQS (quick_qs_offset_height + 128) -->
+ <dimen name="quick_qs_total_height">176dp</dimen>
<!-- Height of the bottom navigation / system bar. -->
<dimen name="navigation_bar_height">48dp</dimen>
<!-- Height of the bottom navigation bar in portrait; often the same as @dimen/navigation_bar_height -->
@@ -523,7 +527,7 @@
<dimen name="content_rect_bottom_clip_allowance">20dp</dimen>
<!-- Magnifier dimensions -->
- <dimen name="magnifier_width">164dp</dimen>
+ <dimen name="magnifier_width">100dp</dimen>
<dimen name="magnifier_height">48dp</dimen>
<dimen name="magnifier_elevation">2dp</dimen>
<dimen name="magnifier_offset">42dp</dimen>
@@ -635,4 +639,26 @@
<!-- Size of thumbnail used in the cross profile apps animation -->
<dimen name="cross_profile_apps_thumbnail_size">72dp</dimen>
+ <!-- Padding between the title and content in the harmful app dialog -->
+ <dimen name="harmful_app_padding_top">10dp</dimen>
+ <!-- Bottom padding for the "app name" section of the harmful app dialog -->
+ <dimen name="harmful_app_name_padding_bottom">20dp</dimen>
+ <!-- Left padding for the "app name" section of the harmful app dialog -->
+ <dimen name="harmful_app_name_padding_left">24dp</dimen>
+ <!-- Right padding for the "app name" section of the harmful app dialog -->
+ <dimen name="harmful_app_name_padding_right">24dp</dimen>
+ <!-- Top padding for the "app name" section of the harmful app dialog -->
+ <dimen name="harmful_app_name_padding_top">8dp</dimen>
+ <!-- Padding between the icon and app name in the harmful app dialog -->
+ <dimen name="harmful_app_icon_name_padding">20dp</dimen>
+ <!-- The size of the icon on the harmful app dialog -->
+ <dimen name="harmful_app_icon_size">44dp</dimen>
+ <!-- Left padding for the message section of the harmful app dialog -->
+ <dimen name="harmful_app_message_padding_left">24dp</dimen>
+ <!-- Right padding for the message section of the harmful app dialog -->
+ <dimen name="harmful_app_message_padding_right">24dp</dimen>
+ <!-- Bottom padding for the message section of the harmful app dialog -->
+ <dimen name="harmful_app_message_padding_bottom">24dp</dimen>
+ <!-- Line spacing modifier for the message field of the harmful app dialog -->
+ <item name="harmful_app_message_line_spacing_modifier" type="dimen">1.22</item>
</resources>
diff --git a/core/res/res/values/ids.xml b/core/res/res/values/ids.xml
index b40117e..c90a0df 100644
--- a/core/res/res/values/ids.xml
+++ b/core/res/res/values/ids.xml
@@ -163,4 +163,9 @@
<!-- Action used to manually trigger an autofill request -->
<item type="id" name="autofill" />
+ <!-- Accessibility action identifier for {@link android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction#ACTION_SHOW_TOOLTIP}. -->
+ <item type="id" name="accessibilityActionShowTooltip" />
+
+ <!-- Accessibility action identifier for {@link android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction#ACTION_HIDE_TOOLTIP}. -->
+ <item type="id" name="accessibilityActionHideTooltip" />
</resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 9cdf553..30586d1 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2874,11 +2874,16 @@
</public-group>
<public-group type="id" first-id="0x01020044">
+ <public name="accessibilityActionShowTooltip" />
+ <public name="accessibilityActionHideTooltip" />
</public-group>
<public-group type="string" first-id="0x0104001b">
</public-group>
+ <!-- An interpolator which accelerates fast but decelerates extra slowly. -->
+ <public type="interpolator" name="fast_out_extra_slow_in" id="0x10c001a"/>
+
<!-- ===============================================================
DO NOT ADD UN-GROUPED ITEMS HERE
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 88549b5..3cde765 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -650,11 +650,11 @@
<!-- Label for the Android system components when they are shown to the user. -->
<string name="android_system_label">Android System</string>
- <!-- Label for the user owner in the intent forwarding app. -->
- <string name="user_owner_label">Switch to Personal</string>
+ <!-- "Switch" is a verb; it means to change user profile by tapping another user profile name. -->
+ <string name="user_owner_label">Switch to personal profile</string>
- <!-- Label for a corporate profile in the intent forwarding app. -->
- <string name="managed_profile_label">Switch to Work</string>
+ <!-- "Switch" is a verb; it means to change user profile by tapping another user profile name. -->
+ <string name="managed_profile_label">Switch to work profile</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_contacts">Contacts</string>
@@ -1128,6 +1128,17 @@
<string name="permdesc_manageOwnCalls">Allows the app to route its calls through the system in
order to improve the calling experience.</string>
+ <!-- Title of an application permission. When granted the user is giving access to a third
+ party app to continue a call which originated in another app. For example, the user
+ could be in a voice call over their carrier's mobile network, and a third party video
+ calling app wants to continue that voice call as a video call. -->
+ <string name="permlab_acceptHandover">continue a call from another app</string>
+ <!-- Description of an application permission. When granted the user is giving access to a
+ third party app to continue a call which originated in another app. For example, the user
+ could be in a voice call over their carrier's mobile network, and a third party video
+ calling app wants to continue that voice call as a video call -->
+ <string name="permdesc_acceptHandovers">Allows the app to continue a call which was started in another app.</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_readPhoneNumbers">read phone numbers</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
@@ -2715,6 +2726,15 @@
<!-- Label for item in the text selection menu to trigger adding a contact [CHAR LIMIT=20] -->
<string name="add_contact">Add</string>
+ <!-- Label for item in the text selection menu to view the calendar for the selected time/date [CHAR LIMIT=20] -->
+ <string name="view_calendar">View</string>
+
+ <!-- Label for item in the text selection menu to create a calendar event at the selected time/date [CHAR LIMIT=20] -->
+ <string name="add_calendar_event">Schedule</string>
+
+ <!-- Label for item in the text selection menu to track a selected flight number [CHAR LIMIT=20] -->
+ <string name="view_flight">Track</string>
+
<!-- If the device is getting low on internal storage, a notification is shown to the user. This is the title of that notification. -->
<string name="low_internal_storage_view_title">Storage space running out</string>
<!-- If the device is getting low on internal storage, a notification is shown to the user. This is the message of that notification. -->
@@ -3022,6 +3042,8 @@
<!-- Notification title for a nearby open wireless network.-->
<string name="wifi_available_title">Connect to open Wi\u2011Fi network</string>
+ <!-- Notification title for a nearby carrier wireless network.-->
+ <string name="wifi_available_carrier_network_title">Connect to carrier Wi\u2011Fi network</string>
<!-- Notification title when the system is connecting to the specified open network. The network name is specified in the notification content. -->
<string name="wifi_available_title_connecting">Connecting to open Wi\u2011Fi network</string>
<!-- Notification title when the system has connected to the open network. The network name is specified in the notification content. -->
@@ -4609,14 +4631,18 @@
<!-- Menu item in the locale menu [CHAR LIMIT=30] -->
<string name="locale_search_menu">Search</string>
- <!-- Title for dialog displayed when work profile is turned off. [CHAR LIMIT=30] -->
- <string name="work_mode_off_title">Turn on work mode?</string>
- <!-- Message displayed in dialog when work profile is turned off. [CHAR LIMIT=NONE] -->
- <string name="work_mode_off_message">This will turn on your work profile, including apps,
- background sync, and related features</string>
+ <!-- Title of a dialog. The string is asking if the user wants to turn on their work profile, which contains work apps that are managed by their employer. "Work" is an adjective. [CHAR LIMIT=30] -->
+ <string name="work_mode_off_title">Turn on work profile?</string>
+ <!-- Text in a dialog. This string describes what will happen if a user decides to turn on their work profile. "Work profile" is used as an adjective. [CHAR LIMIT=NONE] -->
+ <string name="work_mode_off_message">Your work apps, notifications, data, and other work profile features will be turned on</string>
<!-- Title for button to turn on work profile. [CHAR LIMIT=NONE] -->
<string name="work_mode_turn_on">Turn on</string>
+ <!-- Message displayed in dialog when app is too old to run on this verison of android. [CHAR LIMIT=NONE] -->
+ <string name="deprecated_target_sdk_message">This app was built for an older version of Android and may not work properly. Try checking for updates, or contact the developer.</string>
+ <!-- Title for button to see application detail in app store which it came from - it may allow user to update to newer version. [CHAR LIMIT=50] -->
+ <string name="deprecated_target_sdk_app_store">Check for update</string>
+
<!-- Notification title shown when new SMS/MMS is received while the device is locked [CHAR LIMIT=NONE] -->
<string name="new_sms_notification_title">You have new messages</string>
<!-- Notification content shown when new SMS/MMS is received while the device is locked [CHAR LIMIT=NONE] -->
@@ -4816,12 +4842,12 @@
<!--Battery saver warning. STOPSHIP: Remove it eventually. -->
<string name="battery_saver_warning_title" translatable="false">Extreme battery saver</string>
- <!-- Label for the uninstall button on the harmful app warning dialog. -->
- <string name="harmful_app_warning_uninstall">Uninstall</string>
- <!-- Label for the launch anyway button on the harmful app warning dialog. -->
- <string name="harmful_app_warning_launch_anyway">Launch anyway</string>
- <!-- Title for the harmful app warning dialog. -->
- <string name="harmful_app_warning_title">Uninstall harmful app?</string>
+ <!-- Label for the uninstall button on the harmful app warning dialog. [CHAR LIMIT=20] -->
+ <string name="harmful_app_warning_uninstall">UNINSTALL</string>
+ <!-- Label for the open anyway button on the harmful app warning dialog. [CHAR LIMIT=20] -->
+ <string name="harmful_app_warning_open_anyway">OPEN ANYWAY</string>
+ <!-- Title for the harmful app warning dialog. [CHAR LIMIT=40] -->
+ <string name="harmful_app_warning_title">Harmful app detected</string>
<!-- Text describing a permission request for one app to show another app's
slices [CHAR LIMIT=NONE] -->
diff --git a/core/res/res/values/styles_device_defaults.xml b/core/res/res/values/styles_device_defaults.xml
index 189b3b7..1a51c1d 100644
--- a/core/res/res/values/styles_device_defaults.xml
+++ b/core/res/res/values/styles_device_defaults.xml
@@ -225,7 +225,7 @@
<style name="TextAppearance.DeviceDefault.SearchResult.Subtitle" parent="TextAppearance.Material.SearchResult.Subtitle"/>
<style name="TextAppearance.DeviceDefault.Widget" parent="TextAppearance.Material.Widget"/>
<style name="TextAppearance.DeviceDefault.Widget.Button" parent="TextAppearance.Material.Widget.Button">
- <item name="fontFamily">@string/config_fontFamilyButton</item>
+ <item name="fontFamily">@string/config_headlineFontFamilyMedium</item>
<item name="textAllCaps">@bool/config_buttonTextAllCaps</item>
</style>
<style name="TextAppearance.DeviceDefault.Widget.IconMenu.Item" parent="TextAppearance.Material.Widget.IconMenu.Item"/>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 1711ec9..09d3121 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -460,6 +460,7 @@
<java-symbol type="bool" name="config_useDefaultFocusHighlight" />
<java-symbol type="array" name="config_deviceSpecificSystemServices" />
<java-symbol type="string" name="config_deviceSpecificDevicePolicyManagerService" />
+ <java-symbol type="string" name="config_deviceSpecificAudioService" />
<java-symbol type="integer" name="config_num_physical_slots" />
<java-symbol type="color" name="tab_indicator_text_v4" />
@@ -533,6 +534,9 @@
<java-symbol type="string" name="browse" />
<java-symbol type="string" name="sms" />
<java-symbol type="string" name="add_contact" />
+ <java-symbol type="string" name="view_calendar" />
+ <java-symbol type="string" name="add_calendar_event" />
+ <java-symbol type="string" name="view_flight" />
<java-symbol type="string" name="textSelectionCABTitle" />
<java-symbol type="string" name="BaMmi" />
<java-symbol type="string" name="CLIRDefaultOffNextCallOff" />
@@ -1632,6 +1636,7 @@
<java-symbol type="dimen" name="navigation_bar_height_landscape_car_mode" />
<java-symbol type="dimen" name="navigation_bar_width_car_mode" />
<java-symbol type="dimen" name="status_bar_height" />
+ <java-symbol type="dimen" name="quick_qs_total_height" />
<java-symbol type="drawable" name="ic_jog_dial_sound_off" />
<java-symbol type="drawable" name="ic_jog_dial_sound_on" />
<java-symbol type="drawable" name="ic_jog_dial_unlock" />
@@ -1911,6 +1916,7 @@
<java-symbol type="plurals" name="wifi_available" />
<java-symbol type="plurals" name="wifi_available_detailed" />
<java-symbol type="string" name="wifi_available_title" />
+ <java-symbol type="string" name="wifi_available_carrier_network_title" />
<java-symbol type="string" name="wifi_available_title_connecting" />
<java-symbol type="string" name="wifi_available_title_connected" />
<java-symbol type="string" name="wifi_available_title_failed_to_connect" />
@@ -2652,6 +2658,7 @@
<java-symbol type="id" name="aerr_report" />
<java-symbol type="id" name="aerr_restart" />
<java-symbol type="id" name="aerr_close" />
+ <java-symbol type="id" name="aerr_app_info" />
<java-symbol type="id" name="aerr_mute" />
<java-symbol type="string" name="status_bar_rotate" />
@@ -2700,6 +2707,9 @@
<java-symbol type="string" name="work_mode_off_message" />
<java-symbol type="string" name="work_mode_turn_on" />
+ <java-symbol type="string" name="deprecated_target_sdk_message" />
+ <java-symbol type="string" name="deprecated_target_sdk_app_store" />
+
<!-- New SMS notification while phone is locked. -->
<java-symbol type="string" name="new_sms_notification_title" />
<java-symbol type="string" name="new_sms_notification_content" />
@@ -3219,8 +3229,9 @@
<java-symbol type="string" name="shortcut_disabled_reason_unknown" />
<java-symbol type="string" name="harmful_app_warning_uninstall" />
- <java-symbol type="string" name="harmful_app_warning_launch_anyway" />
+ <java-symbol type="string" name="harmful_app_warning_open_anyway" />
<java-symbol type="string" name="harmful_app_warning_title" />
+ <java-symbol type="layout" name="harmful_app_warning_dialog" />
<java-symbol type="string" name="config_defaultAssistantAccessPackage" />
diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml
index 9e6b1ab..15d8fb7 100644
--- a/core/res/res/values/themes_material.xml
+++ b/core/res/res/values/themes_material.xml
@@ -51,7 +51,7 @@
<item name="primaryContentAlpha">@dimen/primary_content_alpha_material_dark</item>
<item name="secondaryContentAlpha">@dimen/secondary_content_alpha_material_dark</item>
<item name="backgroundDimAmount">0.6</item>
- <item name="colorError">@color/error_color_material</item>
+ <item name="colorError">@color/error_color_material_dark</item>
<!-- Text styles -->
<item name="textAppearance">@style/TextAppearance.Material</item>
@@ -420,6 +420,7 @@
<item name="primaryContentAlpha">@dimen/primary_content_alpha_material_light</item>
<item name="secondaryContentAlpha">@dimen/secondary_content_alpha_material_light</item>
<item name="backgroundDimAmount">0.6</item>
+ <item name="colorError">@color/error_color_material_light</item>
<!-- Text styles -->
<item name="textAppearance">@style/TextAppearance.Material</item>
@@ -811,6 +812,7 @@
<item name="colorBackground">@color/background_material_light</item>
<item name="colorBackgroundFloating">@color/background_floating_material_light</item>
<item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_light</item>
+ <item name="colorError">@color/error_color_material_light</item>
<item name="textColorPrimary">@color/text_color_primary</item>
<item name="textColorPrimaryInverse">@color/primary_text_material_dark</item>
@@ -844,6 +846,7 @@
<item name="colorBackground">@color/background_material_dark</item>
<item name="colorBackgroundFloating">@color/background_floating_material_dark</item>
<item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_dark</item>
+ <item name="colorError">@color/error_color_material_dark</item>
<item name="textColorPrimary">@color/text_color_primary</item>
<item name="textColorPrimaryInverse">@color/primary_text_material_light</item>
diff --git a/core/res/res/xml/default_zen_mode_config.xml b/core/res/res/xml/default_zen_mode_config.xml
index 1e4c03e..a446088 100644
--- a/core/res/res/xml/default_zen_mode_config.xml
+++ b/core/res/res/xml/default_zen_mode_config.xml
@@ -19,5 +19,6 @@
<!-- Default configuration for zen mode. See android.service.notification.ZenModeConfig. -->
<zen version="2">
- <allow alarms="true" media_system_other="true" calls="false" messages="false" reminders="false" events="false" />
+ <allow alarms="true" media_system_other="true" calls="false" messages="false" reminders="false"
+ events="false" />
</zen>
diff --git a/core/res/res/xml/power_profile.xml b/core/res/res/xml/power_profile.xml
index bc4b10f..d80c697 100644
--- a/core/res/res/xml/power_profile.xml
+++ b/core/res/res/xml/power_profile.xml
@@ -127,4 +127,11 @@
</array>
<item name="modem.controller.voltage">0</item>
+ <!-- GPS related values. Default is 0.-->
+ <array name="gps.signalqualitybased"> <!-- Strength 0 to 1 -->
+ <value>0</value>
+ <value>0</value>
+ </array>
+ <item name="gps.voltage">0</item>
+
</device>
diff --git a/core/tests/BroadcastRadioTests/src/android/hardware/radio/tests/functional/RadioTunerTest.java b/core/tests/BroadcastRadioTests/src/android/hardware/radio/tests/functional/RadioTunerTest.java
index 896fd15..370659e 100644
--- a/core/tests/BroadcastRadioTests/src/android/hardware/radio/tests/functional/RadioTunerTest.java
+++ b/core/tests/BroadcastRadioTests/src/android/hardware/radio/tests/functional/RadioTunerTest.java
@@ -122,6 +122,7 @@
private void resetCallback() {
verify(mCallback, atLeast(0)).onMetadataChanged(any());
+ verify(mCallback, atLeast(0)).onProgramInfoChanged(any());
verifyNoMoreInteractions(mCallback);
Mockito.reset(mCallback);
}
diff --git a/core/tests/benchmarks/src/com/android/internal/net/NetworkStatsFactoryBenchmark.java b/core/tests/benchmarks/src/com/android/internal/net/NetworkStatsFactoryBenchmark.java
index e62fbd6..c213464 100644
--- a/core/tests/benchmarks/src/com/android/internal/net/NetworkStatsFactoryBenchmark.java
+++ b/core/tests/benchmarks/src/com/android/internal/net/NetworkStatsFactoryBenchmark.java
@@ -53,7 +53,7 @@
stats, mStats.getAbsolutePath(), NetworkStats.UID_ALL,
// Looks like this was broken by change d0c5b9abed60b7bc056d026bf0f2b2235410fb70
// Fixed compilation problem but needs addressing properly.
- new String[0], 999);
+ new String[0], 999, false);
}
}
}
diff --git a/core/tests/coretests/Android.mk b/core/tests/coretests/Android.mk
index 47990a1..2ea1b46 100644
--- a/core/tests/coretests/Android.mk
+++ b/core/tests/coretests/Android.mk
@@ -52,6 +52,8 @@
org.apache.http.legacy \
android.test.base \
android.test.mock \
+ framework-oahl-backward-compatibility \
+ framework-atb-backward-compatibility \
LOCAL_PACKAGE_NAME := FrameworksCoreTests
LOCAL_COMPATIBILITY_SUITE := device-tests
diff --git a/core/tests/coretests/AndroidManifest.xml b/core/tests/coretests/AndroidManifest.xml
index e094772..7d5c60a 100644
--- a/core/tests/coretests/AndroidManifest.xml
+++ b/core/tests/coretests/AndroidManifest.xml
@@ -1044,6 +1044,13 @@
</intent-filter>
</activity>
+ <activity android:name="android.view.menu.ContextMenuActivity" android:label="ContextMenu" android:theme="@android:style/Theme.Material">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST" />
+ </intent-filter>
+ </activity>
+
<activity android:name="android.view.menu.MenuWith1Item" android:label="MenuWith1Item">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
diff --git a/core/tests/coretests/res/layout/context_menu.xml b/core/tests/coretests/res/layout/context_menu.xml
new file mode 100644
index 0000000..3b9e2bd
--- /dev/null
+++ b/core/tests/coretests/res/layout/context_menu.xml
@@ -0,0 +1,54 @@
+<?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.
+*/
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <LinearLayout
+ android:id="@+id/context_menu_target_ltr"
+ android:orientation="horizontal"
+ android:layoutDirection="ltr"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="50px"
+ android:layout_marginEnd="50px">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="LTR"/>
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/context_menu_target_rtl"
+ android:orientation="horizontal"
+ android:layoutDirection="rtl"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="50px"
+ android:layout_marginEnd="50px">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="RTL"/>
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/core/tests/coretests/src/android/content/pm/AndroidTestBaseUpdaterTest.java b/core/tests/coretests/src/android/content/pm/AndroidTestBaseUpdaterTest.java
new file mode 100644
index 0000000..dce22ce
--- /dev/null
+++ b/core/tests/coretests/src/android/content/pm/AndroidTestBaseUpdaterTest.java
@@ -0,0 +1,108 @@
+/*
+ * 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.pm;
+
+import static android.content.pm.PackageBuilder.builder;
+import static android.content.pm.SharedLibraryNames.ANDROID_TEST_BASE;
+
+import android.os.Build;
+import android.support.test.filters.SmallTest;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Test for {@link AndroidTestBaseUpdater}
+ */
+@SmallTest
+@RunWith(OptionalClassRunner.class)
+@OptionalClassRunner.OptionalClass("android.content.pm.AndroidTestBaseUpdater")
+public class AndroidTestBaseUpdaterTest extends PackageSharedLibraryUpdaterTest {
+
+ private static final String OTHER_LIBRARY = "other.library";
+
+ @Test
+ public void targeted_at_O() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O);
+
+ // Should add org.apache.http.legacy.
+ PackageBuilder after = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .requiredLibraries(ANDROID_TEST_BASE);
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ @Test
+ public void targeted_at_O_not_empty_usesLibraries() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .requiredLibraries(OTHER_LIBRARY);
+
+ // The org.apache.http.legacy jar should be added at the start of the list because it
+ // is not on the bootclasspath and the package targets pre-P.
+ PackageBuilder after = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .requiredLibraries(ANDROID_TEST_BASE, OTHER_LIBRARY);
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ @Test
+ public void targeted_at_O_in_usesLibraries() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .requiredLibraries(ANDROID_TEST_BASE);
+
+ // No change is required because although org.apache.http.legacy has been removed from
+ // the bootclasspath the package explicitly requests it.
+ checkBackwardsCompatibility(before, before);
+ }
+
+ @Test
+ public void targeted_at_O_in_usesOptionalLibraries() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .optionalLibraries(ANDROID_TEST_BASE);
+
+ // No change is required because although org.apache.http.legacy has been removed from
+ // the bootclasspath the package explicitly requests it.
+ checkBackwardsCompatibility(before, before);
+ }
+
+ @Test
+ public void in_usesLibraries() {
+ PackageBuilder before = builder().requiredLibraries(ANDROID_TEST_BASE);
+
+ // No change is required because the package explicitly requests org.apache.http.legacy
+ // and is targeted at the current version so does not need backwards compatibility.
+ checkBackwardsCompatibility(before, before);
+ }
+
+ @Test
+ public void in_usesOptionalLibraries() {
+ PackageBuilder before = builder().optionalLibraries(ANDROID_TEST_BASE);
+
+ // No change is required because the package explicitly requests org.apache.http.legacy
+ // and is targeted at the current version so does not need backwards compatibility.
+ checkBackwardsCompatibility(before, before);
+ }
+
+ private void checkBackwardsCompatibility(PackageBuilder before, PackageBuilder after) {
+ checkBackwardsCompatibility(before, after, AndroidTestBaseUpdater::new);
+ }
+}
diff --git a/core/tests/coretests/src/android/content/pm/AndroidTestRunnerSplitUpdaterTest.java b/core/tests/coretests/src/android/content/pm/AndroidTestRunnerSplitUpdaterTest.java
new file mode 100644
index 0000000..866de93
--- /dev/null
+++ b/core/tests/coretests/src/android/content/pm/AndroidTestRunnerSplitUpdaterTest.java
@@ -0,0 +1,62 @@
+/*
+ * 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.pm;
+
+import static android.content.pm.PackageBuilder.builder;
+import static android.content.pm.SharedLibraryNames.ANDROID_TEST_MOCK;
+import static android.content.pm.SharedLibraryNames.ANDROID_TEST_RUNNER;
+
+import android.content.pm.PackageBackwardCompatibility.AndroidTestRunnerSplitUpdater;
+import android.support.test.filters.SmallTest;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+/**
+ * Test for {@link AndroidTestRunnerSplitUpdater}
+ */
+@SmallTest
+@RunWith(JUnit4.class)
+public class AndroidTestRunnerSplitUpdaterTest extends PackageSharedLibraryUpdaterTest {
+
+ @Test
+ public void android_test_runner_in_usesOptionalLibraries() {
+ PackageBuilder before = builder().optionalLibraries(ANDROID_TEST_RUNNER);
+
+ PackageBuilder after = builder()
+ .optionalLibraries(ANDROID_TEST_MOCK, ANDROID_TEST_RUNNER);
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ @Test
+ public void android_test_runner_in_usesLibraries_android_test_mock_in_usesOptionalLibraries() {
+ PackageBuilder before = builder()
+ .requiredLibraries(ANDROID_TEST_RUNNER)
+ .optionalLibraries(ANDROID_TEST_MOCK);
+
+ PackageBuilder after = builder()
+ .requiredLibraries(ANDROID_TEST_RUNNER)
+ .optionalLibraries(ANDROID_TEST_MOCK);
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ private void checkBackwardsCompatibility(PackageBuilder before, PackageBuilder after) {
+ checkBackwardsCompatibility(before, after, AndroidTestRunnerSplitUpdater::new);
+ }
+}
diff --git a/core/tests/coretests/src/android/content/pm/OptionalClassRunner.java b/core/tests/coretests/src/android/content/pm/OptionalClassRunner.java
new file mode 100644
index 0000000..91697c0
--- /dev/null
+++ b/core/tests/coretests/src/android/content/pm/OptionalClassRunner.java
@@ -0,0 +1,141 @@
+/*
+ * 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.pm;
+
+import org.junit.Assume;
+import org.junit.runner.Description;
+import org.junit.runner.Runner;
+import org.junit.runner.notification.RunNotifier;
+import org.junit.runners.JUnit4;
+import org.junit.runners.ParentRunner;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.Statement;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Will run a test class, iff a class, specified by name in the {@link OptionalClass} annotation,
+ * exists on the class path.
+ *
+ * <p>It is an {@link InitializationError} if no {@link OptionalClass} annotation is specified on
+ * the class that has {@code @RunWith(OptionalClassRunner.class)}.
+ *
+ * <p>If the named class cannot be found then the test class is reported as having been ignored.
+ */
+public class OptionalClassRunner extends Runner {
+
+ private final Runner mDelegate;
+
+ public OptionalClassRunner(Class<?> testClass) throws InitializationError {
+ OptionalClass annotation = testClass.getAnnotation(OptionalClass.class);
+ if (annotation == null) {
+ throw new InitializationError(
+ "No " + OptionalClass.class.getName() + " annotation found on " + testClass);
+ }
+
+ String className = annotation.value();
+ Runner delegate;
+ try {
+ Class.forName(className);
+ // The class could be found so create a JUnit4 delegate for the class to run.
+ delegate = new JUnit4(testClass);
+ } catch (ClassNotFoundException e) {
+ // The class could not be found so create a Runner delegate that will treat the
+ // test as having failed a test assumption.
+ delegate = new ClassNotFoundRunner(testClass, className);
+ }
+
+ this.mDelegate = delegate;
+ }
+
+ @Override
+ public Description getDescription() {
+ return mDelegate.getDescription();
+ }
+
+ @Override
+ public void run(RunNotifier notifier) {
+ mDelegate.run(notifier);
+ }
+
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target(ElementType.TYPE)
+ public @interface OptionalClass {
+ String value();
+ }
+
+ /**
+ * Emulates a class containing a single test that fails due to an invalid assumption caused by
+ * the missing class.
+ */
+ private static class ClassNotFoundRunner extends ParentRunner<Runner> {
+
+ private List<Runner> mChildren;
+
+ ClassNotFoundRunner(Class<?> testClass, String className)
+ throws InitializationError {
+ super(testClass);
+ this.mChildren = Collections.singletonList(new ChildRunner(testClass, className));
+ }
+
+ @Override
+ protected List<Runner> getChildren() {
+ return mChildren;
+ }
+
+ @Override
+ protected Description describeChild(Runner child) {
+ return child.getDescription();
+ }
+
+ @Override
+ protected void runChild(Runner child, RunNotifier notifier) {
+ child.run(notifier);
+ }
+
+ private class ChildRunner extends Runner {
+
+ private final Class<?> mTestClass;
+
+ private final String mClassName;
+
+ ChildRunner(Class<?> testClass, String className) {
+ this.mTestClass = testClass;
+ this.mClassName = className;
+ }
+
+ @Override
+ public Description getDescription() {
+ return Description.createTestDescription(mTestClass, "classNotFound");
+ }
+
+ @Override
+ public void run(RunNotifier notifier) {
+ runLeaf(new Statement() {
+ @Override
+ public void evaluate() throws Throwable {
+ Assume.assumeTrue("Could not find class: " + mClassName, false);
+ }
+ }, getDescription(), notifier);
+ }
+ }
+ }
+}
diff --git a/core/tests/coretests/src/android/content/pm/OrgApacheHttpLegacyUpdaterTest.java b/core/tests/coretests/src/android/content/pm/OrgApacheHttpLegacyUpdaterTest.java
new file mode 100644
index 0000000..dcd2707
--- /dev/null
+++ b/core/tests/coretests/src/android/content/pm/OrgApacheHttpLegacyUpdaterTest.java
@@ -0,0 +1,108 @@
+/*
+ * 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.pm;
+
+import static android.content.pm.PackageBuilder.builder;
+import static android.content.pm.SharedLibraryNames.ORG_APACHE_HTTP_LEGACY;
+
+import android.os.Build;
+import android.support.test.filters.SmallTest;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Test for {@link OrgApacheHttpLegacyUpdater}
+ */
+@SmallTest
+@RunWith(OptionalClassRunner.class)
+@OptionalClassRunner.OptionalClass("android.content.pm.OrgApacheHttpLegacyUpdater")
+public class OrgApacheHttpLegacyUpdaterTest extends PackageSharedLibraryUpdaterTest {
+
+ private static final String OTHER_LIBRARY = "other.library";
+
+ @Test
+ public void targeted_at_O() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O);
+
+ // Should add org.apache.http.legacy.
+ PackageBuilder after = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .requiredLibraries(ORG_APACHE_HTTP_LEGACY);
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ @Test
+ public void targeted_at_O_not_empty_usesLibraries() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .requiredLibraries(OTHER_LIBRARY);
+
+ // The org.apache.http.legacy jar should be added at the start of the list because it
+ // is not on the bootclasspath and the package targets pre-P.
+ PackageBuilder after = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .requiredLibraries(ORG_APACHE_HTTP_LEGACY, OTHER_LIBRARY);
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ @Test
+ public void targeted_at_O_in_usesLibraries() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .requiredLibraries(ORG_APACHE_HTTP_LEGACY);
+
+ // No change is required because although org.apache.http.legacy has been removed from
+ // the bootclasspath the package explicitly requests it.
+ checkBackwardsCompatibility(before, before);
+ }
+
+ @Test
+ public void targeted_at_O_in_usesOptionalLibraries() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .optionalLibraries(ORG_APACHE_HTTP_LEGACY);
+
+ // No change is required because although org.apache.http.legacy has been removed from
+ // the bootclasspath the package explicitly requests it.
+ checkBackwardsCompatibility(before, before);
+ }
+
+ @Test
+ public void in_usesLibraries() {
+ PackageBuilder before = builder().requiredLibraries(ORG_APACHE_HTTP_LEGACY);
+
+ // No change is required because the package explicitly requests org.apache.http.legacy
+ // and is targeted at the current version so does not need backwards compatibility.
+ checkBackwardsCompatibility(before, before);
+ }
+
+ @Test
+ public void in_usesOptionalLibraries() {
+ PackageBuilder before = builder().optionalLibraries(ORG_APACHE_HTTP_LEGACY);
+
+ // No change is required because the package explicitly requests org.apache.http.legacy
+ // and is targeted at the current version so does not need backwards compatibility.
+ checkBackwardsCompatibility(before, before);
+ }
+
+ private void checkBackwardsCompatibility(PackageBuilder before, PackageBuilder after) {
+ checkBackwardsCompatibility(before, after, OrgApacheHttpLegacyUpdater::new);
+ }
+}
diff --git a/core/tests/coretests/src/android/content/pm/PackageBackwardCompatibilityTest.java b/core/tests/coretests/src/android/content/pm/PackageBackwardCompatibilityTest.java
index 63a5e4c..c64d520 100644
--- a/core/tests/coretests/src/android/content/pm/PackageBackwardCompatibilityTest.java
+++ b/core/tests/coretests/src/android/content/pm/PackageBackwardCompatibilityTest.java
@@ -16,151 +16,158 @@
package android.content.pm;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static android.content.pm.PackageBuilder.builder;
+import static android.content.pm.SharedLibraryNames.ANDROID_TEST_BASE;
+import static android.content.pm.SharedLibraryNames.ANDROID_TEST_MOCK;
+import static android.content.pm.SharedLibraryNames.ANDROID_TEST_RUNNER;
+import static android.content.pm.SharedLibraryNames.ORG_APACHE_HTTP_LEGACY;
-import android.content.pm.PackageParser.Package;
+import android.content.pm.PackageBackwardCompatibility.RemoveUnnecessaryAndroidTestBaseLibrary;
import android.os.Build;
import android.support.test.filters.SmallTest;
-import org.junit.Before;
+import org.junit.Assume;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import java.util.ArrayList;
-import java.util.Collections;
+import java.util.List;
@SmallTest
@RunWith(JUnit4.class)
-public class PackageBackwardCompatibilityTest {
-
- private static final String ORG_APACHE_HTTP_LEGACY = "org.apache.http.legacy";
-
- private static final String ANDROID_TEST_RUNNER = "android.test.runner";
-
- private static final String ANDROID_TEST_MOCK = "android.test.mock";
-
- private static final String OTHER_LIBRARY = "other.library";
-
- private Package mPackage;
-
- private static ArrayList<String> arrayList(String... strings) {
- ArrayList<String> list = new ArrayList<>();
- Collections.addAll(list, strings);
- return list;
- }
-
- @Before
- public void setUp() {
- mPackage = new Package("org.package.name");
- mPackage.applicationInfo.targetSdkVersion = Build.VERSION_CODES.CUR_DEVELOPMENT;
- }
+public class PackageBackwardCompatibilityTest extends PackageSharedLibraryUpdaterTest {
@Test
- public void null_usesLibraries() {
- PackageBackwardCompatibility.modifySharedLibraries(mPackage);
- assertNull("usesLibraries not updated correctly", mPackage.usesLibraries);
+ public void null_usesLibraries_and_usesOptionalLibraries() {
+ PackageBuilder before = builder();
+ PackageBuilder after = builder();
+
+ checkBackwardsCompatibility(before, after);
}
+ /**
+ * Detect when the org.apache.http.legacy is not on the bootclasspath.
+ *
+ * <p>This test will be ignored when org.apache.http.legacy is not on the bootclasspath and
+ * succeed otherwise. This allows a developer to ensure that the tests are being
+ */
@Test
- public void null_usesOptionalLibraries() {
- PackageBackwardCompatibility.modifySharedLibraries(mPackage);
- assertNull("usesOptionalLibraries not updated correctly", mPackage.usesOptionalLibraries);
+ public void detectWhenOAHLisOnBCP() {
+ Assume.assumeTrue(PackageBackwardCompatibility.bootClassPathContainsOAHL());
}
+ /**
+ * Detect when the android.test.base is not on the bootclasspath.
+ *
+ * <p>This test will be ignored when org.apache.http.legacy is not on the bootclasspath and
+ * succeed otherwise. This allows a developer to ensure that the tests are being
+ */
+ @Test
+ public void detectWhenATBisOnBCP() {
+ Assume.assumeTrue(PackageBackwardCompatibility.bootClassPathContainsATB());
+ }
+
+ /**
+ * Ensures that the {@link PackageBackwardCompatibility} uses {@link OrgApacheHttpLegacyUpdater}
+ * and {@link AndroidTestBaseUpdater} when necessary.
+ *
+ * <p>More comprehensive tests for that class can be found in
+ * {@link OrgApacheHttpLegacyUpdaterTest}.
+ */
@Test
public void targeted_at_O() {
- mPackage.applicationInfo.targetSdkVersion = Build.VERSION_CODES.O;
- PackageBackwardCompatibility.modifySharedLibraries(mPackage);
- assertEquals("usesLibraries not updated correctly",
- arrayList(ORG_APACHE_HTTP_LEGACY),
- mPackage.usesLibraries);
- assertNull("usesOptionalLibraries not updated correctly", mPackage.usesOptionalLibraries);
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O);
+
+ List<String> expected = new ArrayList<>();
+ if (!PackageBackwardCompatibility.bootClassPathContainsATB()) {
+ expected.add(ANDROID_TEST_BASE);
+ }
+ if (!PackageBackwardCompatibility.bootClassPathContainsOAHL()) {
+ expected.add(ORG_APACHE_HTTP_LEGACY);
+ }
+
+ PackageBuilder after = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .requiredLibraries(expected);
+
+ checkBackwardsCompatibility(before, after);
}
- @Test
- public void targeted_at_O_not_empty_usesLibraries() {
- mPackage.applicationInfo.targetSdkVersion = Build.VERSION_CODES.O;
- mPackage.usesLibraries = arrayList(OTHER_LIBRARY);
- PackageBackwardCompatibility.modifySharedLibraries(mPackage);
- // The org.apache.http.legacy jar should be added at the start of the list.
- assertEquals("usesLibraries not updated correctly",
- arrayList(ORG_APACHE_HTTP_LEGACY, OTHER_LIBRARY),
- mPackage.usesLibraries);
- assertNull("usesOptionalLibraries not updated correctly", mPackage.usesOptionalLibraries);
- }
-
- @Test
- public void targeted_at_O_org_apache_http_legacy_in_usesLibraries() {
- mPackage.applicationInfo.targetSdkVersion = Build.VERSION_CODES.O;
- mPackage.usesLibraries = arrayList(ORG_APACHE_HTTP_LEGACY);
- PackageBackwardCompatibility.modifySharedLibraries(mPackage);
- assertEquals("usesLibraries not updated correctly",
- arrayList(ORG_APACHE_HTTP_LEGACY),
- mPackage.usesLibraries);
- assertNull("usesOptionalLibraries not updated correctly", mPackage.usesOptionalLibraries);
- }
-
- @Test
- public void targeted_at_O_org_apache_http_legacy_in_usesOptionalLibraries() {
- mPackage.applicationInfo.targetSdkVersion = Build.VERSION_CODES.O;
- mPackage.usesOptionalLibraries = arrayList(ORG_APACHE_HTTP_LEGACY);
- PackageBackwardCompatibility.modifySharedLibraries(mPackage);
- assertNull("usesLibraries not updated correctly", mPackage.usesLibraries);
- assertEquals("usesOptionalLibraries not updated correctly",
- arrayList(ORG_APACHE_HTTP_LEGACY),
- mPackage.usesOptionalLibraries);
- }
-
+ /**
+ * Ensures that the {@link PackageBackwardCompatibility} uses
+ * {@link RemoveUnnecessaryOrgApacheHttpLegacyLibraryTest}
+ * when necessary.
+ *
+ * <p>More comprehensive tests for that class can be found in
+ * {@link RemoveUnnecessaryOrgApacheHttpLegacyLibraryTest}.
+ */
@Test
public void org_apache_http_legacy_in_usesLibraries() {
- mPackage.usesLibraries = arrayList(ORG_APACHE_HTTP_LEGACY);
- PackageBackwardCompatibility.modifySharedLibraries(mPackage);
- assertEquals("usesLibraries not updated correctly",
- arrayList(ORG_APACHE_HTTP_LEGACY),
- mPackage.usesLibraries);
- assertNull("usesOptionalLibraries not updated correctly", mPackage.usesOptionalLibraries);
+ Assume.assumeTrue("Test requires that "
+ + ORG_APACHE_HTTP_LEGACY + " is on the bootclasspath",
+ PackageBackwardCompatibility.bootClassPathContainsOAHL());
+
+ PackageBuilder before = builder()
+ .requiredLibraries(ORG_APACHE_HTTP_LEGACY);
+
+ // org.apache.http.legacy should be removed from the libraries because it is provided
+ // on the bootclasspath and providing both increases start up cost unnecessarily.
+ PackageBuilder after = builder();
+
+ checkBackwardsCompatibility(before, after);
}
+ /**
+ * Ensures that the {@link PackageBackwardCompatibility} uses
+ * {@link RemoveUnnecessaryAndroidTestBaseLibrary}
+ * when necessary.
+ *
+ * <p>More comprehensive tests for that class can be found in
+ * {@link RemoveUnnecessaryAndroidTestBaseLibraryTest}.
+ */
@Test
- public void org_apache_http_legacy_in_usesOptionalLibraries() {
- mPackage.usesOptionalLibraries = arrayList(ORG_APACHE_HTTP_LEGACY);
- PackageBackwardCompatibility.modifySharedLibraries(mPackage);
- assertNull("usesLibraries not updated correctly", mPackage.usesLibraries);
- assertEquals("usesOptionalLibraries not updated correctly",
- arrayList(ORG_APACHE_HTTP_LEGACY),
- mPackage.usesOptionalLibraries);
+ public void android_test_base_in_usesLibraries() {
+ Assume.assumeTrue("Test requires that "
+ + ANDROID_TEST_BASE + " is on the bootclasspath",
+ PackageBackwardCompatibility.bootClassPathContainsATB());
+
+ PackageBuilder before = builder()
+ .requiredLibraries(ANDROID_TEST_BASE);
+
+ // android.test.base should be removed from the libraries because it is provided
+ // on the bootclasspath and providing both increases start up cost unnecessarily.
+ PackageBuilder after = builder();
+
+ checkBackwardsCompatibility(before, after);
}
+ /**
+ * Ensures that the {@link PackageBackwardCompatibility} uses a
+ * {@link PackageBackwardCompatibility.AndroidTestRunnerSplitUpdater}.
+ *
+ * <p>More comprehensive tests for that class can be found in
+ * {@link AndroidTestRunnerSplitUpdaterTest}.
+ */
@Test
public void android_test_runner_in_usesLibraries() {
- mPackage.usesLibraries = arrayList(ANDROID_TEST_RUNNER);
- PackageBackwardCompatibility.modifySharedLibraries(mPackage);
- assertEquals("usesLibraries not updated correctly",
- arrayList(ANDROID_TEST_RUNNER, ANDROID_TEST_MOCK),
- mPackage.usesLibraries);
+ PackageBuilder before = builder().requiredLibraries(ANDROID_TEST_RUNNER);
+
+ List<String> expected = new ArrayList<>();
+ if (!PackageBackwardCompatibility.bootClassPathContainsATB()) {
+ expected.add(ANDROID_TEST_BASE);
+ }
+ expected.add(ANDROID_TEST_MOCK);
+ expected.add(ANDROID_TEST_RUNNER);
+
+ PackageBuilder after = builder()
+ .requiredLibraries(expected);
+
+ checkBackwardsCompatibility(before, after);
}
- @Test
- public void android_test_runner_in_usesOptionalLibraries() {
- mPackage.usesOptionalLibraries = arrayList(ANDROID_TEST_RUNNER);
- PackageBackwardCompatibility.modifySharedLibraries(mPackage);
- assertEquals("usesOptionalLibraries not updated correctly",
- arrayList(ANDROID_TEST_RUNNER, ANDROID_TEST_MOCK),
- mPackage.usesOptionalLibraries);
- }
-
- @Test
- public void android_test_runner_in_usesLibraries_android_test_mock_in_usesOptionalLibraries() {
- mPackage.usesLibraries = arrayList(ANDROID_TEST_RUNNER);
- mPackage.usesOptionalLibraries = arrayList(ANDROID_TEST_MOCK);
- PackageBackwardCompatibility.modifySharedLibraries(mPackage);
- assertEquals("usesLibraries not updated correctly",
- arrayList(ANDROID_TEST_RUNNER),
- mPackage.usesLibraries);
- assertEquals("usesOptionalLibraries not updated correctly",
- arrayList(ANDROID_TEST_MOCK),
- mPackage.usesOptionalLibraries);
+ private void checkBackwardsCompatibility(PackageBuilder before, PackageBuilder after) {
+ checkBackwardsCompatibility(before, after, PackageBackwardCompatibility::getInstance);
}
}
diff --git a/core/tests/coretests/src/android/content/pm/PackageBuilder.java b/core/tests/coretests/src/android/content/pm/PackageBuilder.java
new file mode 100644
index 0000000..4ceed83
--- /dev/null
+++ b/core/tests/coretests/src/android/content/pm/PackageBuilder.java
@@ -0,0 +1,95 @@
+/*
+ * 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.pm;
+
+import static org.junit.Assert.assertEquals;
+
+import android.os.Build;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Test support for building {@link PackageParser.Package} instances.
+ */
+class PackageBuilder {
+
+ private int mTargetSdkVersion = Build.VERSION_CODES.CUR_DEVELOPMENT;
+
+ private ArrayList<String> mRequiredLibraries;
+
+ private ArrayList<String> mOptionalLibraries;
+
+ public static PackageBuilder builder() {
+ return new PackageBuilder();
+ }
+
+ public PackageParser.Package build() {
+ PackageParser.Package pkg = new PackageParser.Package("org.package.name");
+ pkg.applicationInfo.targetSdkVersion = mTargetSdkVersion;
+ pkg.usesLibraries = mRequiredLibraries;
+ pkg.usesOptionalLibraries = mOptionalLibraries;
+ return pkg;
+ }
+
+ PackageBuilder targetSdkVersion(int version) {
+ this.mTargetSdkVersion = version;
+ return this;
+ }
+
+ PackageBuilder requiredLibraries(String... names) {
+ this.mRequiredLibraries = arrayListOrNull(names);
+ return this;
+ }
+
+ PackageBuilder requiredLibraries(List<String> names) {
+ this.mRequiredLibraries = arrayListOrNull(names.toArray(new String[names.size()]));
+ return this;
+ }
+
+ PackageBuilder optionalLibraries(String... names) {
+ this.mOptionalLibraries = arrayListOrNull(names);
+ return this;
+ }
+
+ /**
+ * Check that this matches the supplied {@link PackageParser.Package}.
+ *
+ * @param pkg the instance to compare with this.
+ */
+ public void check(PackageParser.Package pkg) {
+ assertEquals("targetSdkVersion should not be changed",
+ mTargetSdkVersion,
+ pkg.applicationInfo.targetSdkVersion);
+ assertEquals("usesLibraries not updated correctly",
+ mRequiredLibraries,
+ pkg.usesLibraries);
+ assertEquals("usesOptionalLibraries not updated correctly",
+ mOptionalLibraries,
+ pkg.usesOptionalLibraries);
+ }
+
+ private static ArrayList<String> arrayListOrNull(String... strings) {
+ if (strings == null || strings.length == 0) {
+ return null;
+ }
+ ArrayList<String> list = new ArrayList<>();
+ Collections.addAll(list, strings);
+ return list;
+ }
+
+}
diff --git a/core/tests/coretests/src/android/content/pm/PackageSharedLibraryUpdaterTest.java b/core/tests/coretests/src/android/content/pm/PackageSharedLibraryUpdaterTest.java
new file mode 100644
index 0000000..d5d3d7a
--- /dev/null
+++ b/core/tests/coretests/src/android/content/pm/PackageSharedLibraryUpdaterTest.java
@@ -0,0 +1,31 @@
+/*
+ * 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.pm;
+
+import java.util.function.Supplier;
+
+/**
+ * Helper for classes that test {@link PackageSharedLibraryUpdater}.
+ */
+abstract class PackageSharedLibraryUpdaterTest {
+
+ static void checkBackwardsCompatibility(PackageBuilder before, PackageBuilder after,
+ Supplier<PackageSharedLibraryUpdater> updaterSupplier) {
+ PackageParser.Package pkg = before.build();
+ updaterSupplier.get().updatePackage(pkg);
+ after.check(pkg);
+ }
+}
diff --git a/core/tests/coretests/src/android/content/pm/RemoveUnnecessaryAndroidTestBaseLibraryTest.java b/core/tests/coretests/src/android/content/pm/RemoveUnnecessaryAndroidTestBaseLibraryTest.java
new file mode 100644
index 0000000..3dba440
--- /dev/null
+++ b/core/tests/coretests/src/android/content/pm/RemoveUnnecessaryAndroidTestBaseLibraryTest.java
@@ -0,0 +1,131 @@
+/*
+ * 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.pm;
+
+import static android.content.pm.PackageBuilder.builder;
+import static android.content.pm.SharedLibraryNames.ANDROID_TEST_BASE;
+
+import android.content.pm.PackageBackwardCompatibility.RemoveUnnecessaryAndroidTestBaseLibrary;
+import android.os.Build;
+import android.support.test.filters.SmallTest;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+/**
+ * Test for {@link RemoveUnnecessaryAndroidTestBaseLibrary}
+ */
+@SmallTest
+@RunWith(JUnit4.class)
+public class RemoveUnnecessaryAndroidTestBaseLibraryTest
+ extends PackageSharedLibraryUpdaterTest {
+
+ private static final String OTHER_LIBRARY = "other.library";
+
+ @Test
+ public void targeted_at_O() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O);
+
+ // No change required.
+ checkBackwardsCompatibility(before, before);
+ }
+
+ @Test
+ public void targeted_at_O_not_empty_usesLibraries() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .requiredLibraries(OTHER_LIBRARY);
+
+ // No change required.
+ checkBackwardsCompatibility(before, before);
+ }
+
+ @Test
+ public void targeted_at_O_in_usesLibraries() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .requiredLibraries(ANDROID_TEST_BASE);
+
+ // android.test.base should be removed from the libraries because it is provided
+ // on the bootclasspath and providing both increases start up cost unnecessarily.
+ PackageBuilder after = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O);
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ @Test
+ public void targeted_at_O_in_usesOptionalLibraries() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .optionalLibraries(ANDROID_TEST_BASE);
+
+ // android.test.base should be removed from the libraries because it is provided
+ // on the bootclasspath and providing both increases start up cost unnecessarily.
+ PackageBuilder after = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O);
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ @Test
+ public void in_usesLibraries() {
+ PackageBuilder before = builder().requiredLibraries(ANDROID_TEST_BASE);
+
+ // android.test.base should be removed from the libraries because it is provided
+ // on the bootclasspath and providing both increases start up cost unnecessarily.
+ PackageBuilder after = builder();
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ @Test
+ public void in_usesOptionalLibraries() {
+ PackageBuilder before = builder().optionalLibraries(ANDROID_TEST_BASE);
+
+ // android.test.base should be removed from the libraries because it is provided
+ // on the bootclasspath and providing both increases start up cost unnecessarily.
+ PackageBuilder after = builder();
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ @Test
+ public void in_bothLibraries() {
+ PackageBuilder before = builder()
+ .requiredLibraries(ANDROID_TEST_BASE)
+ .optionalLibraries(ANDROID_TEST_BASE);
+
+ // android.test.base should be removed from the libraries because it is provided
+ // on the bootclasspath and providing both increases start up cost unnecessarily.
+ PackageBuilder after = builder();
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ private void checkBackwardsCompatibility(PackageBuilder before, PackageBuilder after) {
+ // TODO(b/72538146) - Cannot use constructor reference here because it is also used in
+ // PackageBackwardCompatibility and that seems to create a package-private lambda in
+ // android.content.pm which this then tries to reuse but fails because it cannot access
+ // package-private classes/members because the test is loaded by a different ClassLoader
+ // than the lambda.
+ checkBackwardsCompatibility(before, after,
+ () -> new RemoveUnnecessaryAndroidTestBaseLibrary());
+ }
+
+}
diff --git a/core/tests/coretests/src/android/content/pm/RemoveUnnecessaryOrgApacheHttpLegacyLibraryTest.java b/core/tests/coretests/src/android/content/pm/RemoveUnnecessaryOrgApacheHttpLegacyLibraryTest.java
new file mode 100644
index 0000000..15b27d7
--- /dev/null
+++ b/core/tests/coretests/src/android/content/pm/RemoveUnnecessaryOrgApacheHttpLegacyLibraryTest.java
@@ -0,0 +1,130 @@
+/*
+ * 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.pm;
+
+import static android.content.pm.PackageBuilder.builder;
+import static android.content.pm.SharedLibraryNames.ORG_APACHE_HTTP_LEGACY;
+
+import android.content.pm.PackageBackwardCompatibility.RemoveUnnecessaryOrgApacheHttpLegacyLibrary;
+import android.os.Build;
+import android.support.test.filters.SmallTest;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+/**
+ * Test for {@link RemoveUnnecessaryOrgApacheHttpLegacyLibrary}
+ */
+@SmallTest
+@RunWith(JUnit4.class)
+public class RemoveUnnecessaryOrgApacheHttpLegacyLibraryTest
+ extends PackageSharedLibraryUpdaterTest {
+
+ private static final String OTHER_LIBRARY = "other.library";
+
+ @Test
+ public void targeted_at_O() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O);
+
+ // No change required.
+ checkBackwardsCompatibility(before, before);
+ }
+
+ @Test
+ public void targeted_at_O_not_empty_usesLibraries() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .requiredLibraries(OTHER_LIBRARY);
+
+ // No change required.
+ checkBackwardsCompatibility(before, before);
+ }
+
+ @Test
+ public void targeted_at_O_in_usesLibraries() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .requiredLibraries(ORG_APACHE_HTTP_LEGACY);
+
+ // org.apache.http.legacy should be removed from the libraries because it is provided
+ // on the bootclasspath and providing both increases start up cost unnecessarily.
+ PackageBuilder after = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O);
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ @Test
+ public void targeted_at_O_in_usesOptionalLibraries() {
+ PackageBuilder before = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O)
+ .optionalLibraries(ORG_APACHE_HTTP_LEGACY);
+
+ // org.apache.http.legacy should be removed from the libraries because it is provided
+ // on the bootclasspath and providing both increases start up cost unnecessarily.
+ PackageBuilder after = builder()
+ .targetSdkVersion(Build.VERSION_CODES.O);
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ @Test
+ public void in_usesLibraries() {
+ PackageBuilder before = builder().requiredLibraries(ORG_APACHE_HTTP_LEGACY);
+
+ // org.apache.http.legacy should be removed from the libraries because it is provided
+ // on the bootclasspath and providing both increases start up cost unnecessarily.
+ PackageBuilder after = builder();
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ @Test
+ public void in_usesOptionalLibraries() {
+ PackageBuilder before = builder().optionalLibraries(ORG_APACHE_HTTP_LEGACY);
+
+ // org.apache.http.legacy should be removed from the libraries because it is provided
+ // on the bootclasspath and providing both increases start up cost unnecessarily.
+ PackageBuilder after = builder();
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ @Test
+ public void in_bothLibraries() {
+ PackageBuilder before = builder()
+ .requiredLibraries(ORG_APACHE_HTTP_LEGACY)
+ .optionalLibraries(ORG_APACHE_HTTP_LEGACY);
+
+ // org.apache.http.legacy should be removed from the libraries because it is provided
+ // on the bootclasspath and providing both increases start up cost unnecessarily.
+ PackageBuilder after = builder();
+
+ checkBackwardsCompatibility(before, after);
+ }
+
+ private void checkBackwardsCompatibility(PackageBuilder before, PackageBuilder after) {
+ // TODO(b/72538146) - Cannot use constructor reference here because it is also used in
+ // PackageBackwardCompatibility and that seems to create a package-private lambda in
+ // android.content.pm which this then tries to reuse but fails because it cannot access
+ // package-private classes/members because the test is loaded by a different ClassLoader
+ // than the lambda.
+ checkBackwardsCompatibility(before, after,
+ () -> new RemoveUnnecessaryOrgApacheHttpLegacyLibrary());
+ }
+}
diff --git a/core/tests/coretests/src/android/os/BrightnessLimit.java b/core/tests/coretests/src/android/os/BrightnessLimit.java
index 43cd373..fabcf3d 100644
--- a/core/tests/coretests/src/android/os/BrightnessLimit.java
+++ b/core/tests/coretests/src/android/os/BrightnessLimit.java
@@ -16,12 +16,9 @@
package android.os;
-import android.os.IPowerManager;
-
import android.app.Activity;
+import android.hardware.display.DisplayManager;
import android.os.Bundle;
-import android.os.RemoteException;
-import android.os.ServiceManager;
import android.provider.Settings;
import android.view.View;
import android.view.View.OnClickListener;
@@ -37,23 +34,16 @@
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
-
+
setContentView(R.layout.brightness_limit);
-
+
Button b = findViewById(R.id.go);
b.setOnClickListener(this);
}
public void onClick(View v) {
- IPowerManager power = IPowerManager.Stub.asInterface(
- ServiceManager.getService("power"));
- if (power != null) {
- try {
- power.setTemporaryScreenBrightnessSettingOverride(0);
- } catch (RemoteException darn) {
-
- }
- }
+ DisplayManager dm = getSystemService(DisplayManager.class);
+ dm.setTemporaryBrightness(0);
Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 0);
}
}
diff --git a/core/tests/coretests/src/android/os/PowerManagerTest.java b/core/tests/coretests/src/android/os/PowerManagerTest.java
index 9893c16..0d250b8 100644
--- a/core/tests/coretests/src/android/os/PowerManagerTest.java
+++ b/core/tests/coretests/src/android/os/PowerManagerTest.java
@@ -21,9 +21,9 @@
import android.test.suitebuilder.annotation.SmallTest;
public class PowerManagerTest extends AndroidTestCase {
-
+
private PowerManager mPm;
-
+
/**
* Setup any common data for the upcoming tests.
*/
@@ -32,10 +32,10 @@
super.setUp();
mPm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
}
-
+
/**
* Confirm that the setup is good.
- *
+ *
* @throws Exception
*/
@SmallTest
@@ -45,7 +45,7 @@
/**
* Confirm that we can create functional wakelocks.
- *
+ *
* @throws Exception
*/
@SmallTest
@@ -61,22 +61,19 @@
wl = mPm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "PARTIAL_WAKE_LOCK");
doTestWakeLock(wl);
-
- doTestSetBacklightBrightness();
- // TODO: Some sort of functional test (maybe not in the unit test here?)
+ // TODO: Some sort of functional test (maybe not in the unit test here?)
// that confirms that things are really happening e.g. screen power, keyboard power.
}
-
+
/**
* Confirm that we can't create dysfunctional wakelocks.
- *
+ *
* @throws Exception
*/
@SmallTest
public void testBadNewWakeLock() throws Exception {
-
- final int badFlags = PowerManager.SCREEN_BRIGHT_WAKE_LOCK
+ final int badFlags = PowerManager.SCREEN_BRIGHT_WAKE_LOCK
| PowerManager.SCREEN_DIM_WAKE_LOCK;
// wrap in try because we want the error here
try {
@@ -86,10 +83,10 @@
}
fail("Bad WakeLock flag was not caught.");
}
-
+
/**
* Apply a few tests to a wakelock to make sure it's healthy.
- *
+ *
* @param wl The wakelock to be tested.
*/
private void doTestWakeLock(PowerManager.WakeLock wl) {
@@ -98,7 +95,7 @@
assertTrue(wl.isHeld());
wl.release();
assertFalse(wl.isHeld());
-
+
// Try ref-counted acquire/release
wl.setReferenceCounted(true);
wl.acquire();
@@ -109,7 +106,7 @@
assertTrue(wl.isHeld());
wl.release();
assertFalse(wl.isHeld());
-
+
// Try non-ref-counted
wl.setReferenceCounted(false);
wl.acquire();
@@ -118,24 +115,7 @@
assertTrue(wl.isHeld());
wl.release();
assertFalse(wl.isHeld());
-
+
// TODO: Threaded test (needs handler) to make sure timed wakelocks work too
}
-
-
- /**
- * Test that calling {@link android.os.IHardwareService#setBacklights(int)} requires
- * permissions.
- * <p>Tests permission:
- * {@link android.Manifest.permission#DEVICE_POWER}
- */
- private void doTestSetBacklightBrightness() {
- try {
- mPm.setBacklightBrightness(0);
- fail("setBacklights did not throw SecurityException as expected");
- } catch (SecurityException e) {
- // expected
- }
- }
-
}
diff --git a/core/tests/coretests/src/android/os/WorkSourceTest.java b/core/tests/coretests/src/android/os/WorkSourceTest.java
index a427a2f..952a64d 100644
--- a/core/tests/coretests/src/android/os/WorkSourceTest.java
+++ b/core/tests/coretests/src/android/os/WorkSourceTest.java
@@ -349,6 +349,15 @@
assertEquals(100, wc.getAttributionUid());
}
+ public void testGetAttributionTag() {
+ WorkSource ws1 = new WorkSource();
+ WorkChain wc = ws1.createWorkChain();
+ wc.addNode(100, "tag");
+ assertEquals("tag", wc.getAttributionTag());
+ wc.addNode(200, "tag2");
+ assertEquals("tag", wc.getAttributionTag());
+ }
+
public void testRemove_fromChainedWorkSource() {
WorkSource ws1 = new WorkSource();
ws1.createWorkChain().addNode(50, "foo");
@@ -368,4 +377,25 @@
assertEquals(1, ws1.getWorkChains().size());
assertEquals(75, ws1.getWorkChains().get(0).getAttributionUid());
}
+
+ public void testTransferWorkChains() {
+ WorkSource ws1 = new WorkSource();
+ WorkChain wc1 = ws1.createWorkChain().addNode(100, "tag");
+ WorkChain wc2 = ws1.createWorkChain().addNode(200, "tag2");
+
+ WorkSource ws2 = new WorkSource();
+ ws2.transferWorkChains(ws1);
+
+ assertEquals(0, ws1.getWorkChains().size());
+ assertEquals(2, ws2.getWorkChains().size());
+ assertSame(wc1, ws2.getWorkChains().get(0));
+ assertSame(wc2, ws2.getWorkChains().get(1));
+
+ ws1.clear();
+ ws1.createWorkChain().addNode(300, "tag3");
+ ws1.transferWorkChains(ws2);
+ assertEquals(0, ws2.getWorkChains().size());
+ assertSame(wc1, ws1.getWorkChains().get(0));
+ assertSame(wc2, ws1.getWorkChains().get(1));
+ }
}
diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
index bc2d099..733f7a1 100644
--- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java
+++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
@@ -44,6 +44,12 @@
public class SettingsBackupTest {
/**
+ * see {@link com.google.android.systemui.power.EnhancedEstimatesGoogleImpl} for more details
+ */
+ public static final String HYBRID_SYSUI_BATTERY_WARNING_FLAGS =
+ "hybrid_sysui_battery_warning_flags";
+
+ /**
* The following blacklists contain settings that should *not* be backed up and restored to
* another device. As a general rule, anything that is not user configurable should be
* blacklisted (and conversely, things that *are* user configurable *should* be backed up)
@@ -114,6 +120,12 @@
Settings.Global.BATTERY_SAVER_DEVICE_SPECIFIC_CONSTANTS,
Settings.Global.BATTERY_STATS_CONSTANTS,
Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE,
+ Settings.Global.BLE_SCAN_LOW_POWER_WINDOW_MS,
+ Settings.Global.BLE_SCAN_LOW_POWER_INTERVAL_MS,
+ Settings.Global.BLE_SCAN_BALANCED_WINDOW_MS,
+ Settings.Global.BLE_SCAN_BALANCED_INTERVAL_MS,
+ Settings.Global.BLE_SCAN_LOW_LATENCY_WINDOW_MS,
+ Settings.Global.BLE_SCAN_LOW_LATENCY_INTERVAL_MS,
Settings.Global.BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX,
Settings.Global.BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX,
Settings.Global.BLUETOOTH_A2DP_SUPPORTS_OPTIONAL_CODECS_PREFIX,
@@ -226,6 +238,7 @@
Settings.Global.HDMI_SYSTEM_AUDIO_CONTROL_ENABLED,
Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED,
Settings.Global.HTTP_PROXY,
+ HYBRID_SYSUI_BATTERY_WARNING_FLAGS,
Settings.Global.INET_CONDITION_DEBOUNCE_DOWN_DELAY,
Settings.Global.INET_CONDITION_DEBOUNCE_UP_DELAY,
Settings.Global.INSTANT_APP_DEXOPT_ENABLED,
@@ -332,7 +345,9 @@
Settings.Global.SETUP_PREPAID_DETECTION_TARGET_URL,
Settings.Global.SHORTCUT_MANAGER_CONSTANTS,
Settings.Global.SHOW_FIRST_CRASH_DIALOG,
+ Settings.Global.SHOW_MUTE_IN_CRASH_DIALOG,
Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS,
+ Settings.Global.SHOW_RESTART_IN_CRASH_DIALOG,
Settings.Global.SHOW_TEMPERATURE_WARNING,
Settings.Global.SMART_SELECTION_UPDATE_CONTENT_URL,
Settings.Global.SMART_SELECTION_UPDATE_METADATA_URL,
@@ -362,6 +377,7 @@
Settings.Global.TETHER_SUPPORTED,
Settings.Global.TEXT_CLASSIFIER_CONSTANTS,
Settings.Global.THEATER_MODE_ON,
+ Settings.Global.TIME_ONLY_MODE_ENABLED,
Settings.Global.TRANSITION_ANIMATION_SCALE,
Settings.Global.TRUSTED_SOUND,
Settings.Global.TZINFO_UPDATE_CONTENT_URL,
@@ -428,7 +444,9 @@
Settings.Global.ZEN_MODE,
Settings.Global.ZEN_MODE_CONFIG_ETAG,
Settings.Global.ZEN_MODE_RINGER_LEVEL,
- Settings.Global.ZRAM_ENABLED);
+ Settings.Global.ZRAM_ENABLED,
+ Settings.Global.OVERRIDE_SETTINGS_PROVIDER_RESTORE_ANY_VERSION,
+ Settings.Global.CHAINED_BATTERY_ATTRIBUTION_ENABLED);
private static final Set<String> BACKUP_BLACKLISTED_SECURE_SETTINGS =
newHashSet(
@@ -480,6 +498,7 @@
Settings.Secure.INPUT_METHODS_SUBTYPE_HISTORY,
Settings.Secure.INSTALL_NON_MARKET_APPS,
Settings.Secure.LAST_SETUP_SHOWN,
+ Settings.Secure.LOCATION_CHANGER,
Settings.Secure.LOCATION_MODE,
Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, // Candidate?
Settings.Secure.LOCK_SCREEN_ALLOW_REMOTE_INPUT, // Candidate?
@@ -537,7 +556,8 @@
Settings.Secure.BACKUP_MANAGER_CONSTANTS,
Settings.Secure.KEYGUARD_SLICE_URI,
Settings.Secure.PARENTAL_CONTROL_ENABLED,
- Settings.Secure.PARENTAL_CONTROL_REDIRECT_URL);
+ Settings.Secure.PARENTAL_CONTROL_REDIRECT_URL,
+ Settings.Secure.BLUETOOTH_ON_WHILE_DRIVING);
@Test
public void systemSettingsBackedUpOrBlacklisted() {
diff --git a/core/tests/coretests/src/android/provider/SettingsValidatorsTest.java b/core/tests/coretests/src/android/provider/SettingsValidatorsTest.java
index 4c4aeaf..e750766 100644
--- a/core/tests/coretests/src/android/provider/SettingsValidatorsTest.java
+++ b/core/tests/coretests/src/android/provider/SettingsValidatorsTest.java
@@ -17,6 +17,8 @@
package android.provider;
import static org.junit.Assert.fail;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import android.platform.test.annotations.Presubmit;
import android.provider.SettingsValidators.Validator;
@@ -28,13 +30,101 @@
import java.util.Map;
-/** Tests that ensure all backed up settings have non-null validators. */
+/**
+ * Tests that ensure all backed up settings have non-null validators. Also, common validators
+ * are tested.
+ */
@Presubmit
@RunWith(AndroidJUnit4.class)
@SmallTest
public class SettingsValidatorsTest {
@Test
+ public void testNonNegativeIntegerValidator() {
+ assertTrue(SettingsValidators.NON_NEGATIVE_INTEGER_VALIDATOR.validate("1"));
+ assertTrue(SettingsValidators.NON_NEGATIVE_INTEGER_VALIDATOR.validate("0"));
+ assertFalse(SettingsValidators.NON_NEGATIVE_INTEGER_VALIDATOR.validate("-1"));
+ assertFalse(SettingsValidators.NON_NEGATIVE_INTEGER_VALIDATOR.validate("rectangle"));
+ }
+
+ @Test
+ public void testAnyIntegerValidator() {
+ assertTrue(SettingsValidators.ANY_INTEGER_VALIDATOR.validate("1"));
+ assertTrue(SettingsValidators.ANY_INTEGER_VALIDATOR.validate("0"));
+ assertTrue(SettingsValidators.ANY_INTEGER_VALIDATOR.validate("-1"));
+ assertFalse(SettingsValidators.ANY_INTEGER_VALIDATOR.validate("rectangle"));
+ }
+
+ @Test
+ public void testComponentNameValidator() {
+ assertTrue(SettingsValidators.COMPONENT_NAME_VALIDATOR.validate(
+ "android/com.android.internal.backup.LocalTransport"));
+ assertFalse(SettingsValidators.COMPONENT_NAME_VALIDATOR.validate("rectangle"));
+ }
+
+ @Test
+ public void testLocaleValidator() {
+ assertTrue(SettingsValidators.LOCALE_VALIDATOR.validate("en_US"));
+ assertTrue(SettingsValidators.LOCALE_VALIDATOR.validate("es"));
+ assertFalse(SettingsValidators.LOCALE_VALIDATOR.validate("rectangle"));
+ }
+
+ @Test
+ public void testPackageNameValidator() {
+ assertTrue(SettingsValidators.PACKAGE_NAME_VALIDATOR.validate(
+ "com.google.android"));
+ assertFalse(SettingsValidators.PACKAGE_NAME_VALIDATOR.validate("com.google.@android"));
+ assertFalse(SettingsValidators.PACKAGE_NAME_VALIDATOR.validate(".com.google.android"));
+ assertFalse(SettingsValidators.PACKAGE_NAME_VALIDATOR.validate(".com.google.5android"));
+ }
+
+ @Test
+ public void testDiscreteValueValidator() {
+ String[] beerTypes = new String[]{"Ale", "American IPA", "Stout"};
+ Validator v = new SettingsValidators.DiscreteValueValidator(beerTypes);
+ assertTrue(v.validate("Ale"));
+ assertTrue(v.validate("American IPA"));
+ assertTrue(v.validate("Stout"));
+ assertFalse(v.validate("Cider")); // just juice pretending to be beer
+ }
+
+ @Test
+ public void testInclusiveIntegerRangeValidator() {
+ Validator v = new SettingsValidators.InclusiveIntegerRangeValidator(0, 5);
+ assertTrue(v.validate("0"));
+ assertTrue(v.validate("2"));
+ assertTrue(v.validate("5"));
+ assertFalse(v.validate("-1"));
+ assertFalse(v.validate("6"));
+ }
+
+ @Test
+ public void testInclusiveFloatRangeValidator() {
+ Validator v = new SettingsValidators.InclusiveFloatRangeValidator(0.0f, 5.0f);
+ assertTrue(v.validate("0.0"));
+ assertTrue(v.validate("2.0"));
+ assertTrue(v.validate("5.0"));
+ assertFalse(v.validate("-1.0"));
+ assertFalse(v.validate("6.0"));
+ }
+
+ @Test
+ public void testComponentNameListValidator() {
+ Validator v = new SettingsValidators.ComponentNameListValidator(",");
+ assertTrue(v.validate("android/com.android.internal.backup.LocalTransport,"
+ + "com.google.android.gms/.backup.migrate.service.D2dTransport"));
+ assertFalse(v.validate("com.google.5android,android"));
+ }
+
+ @Test
+ public void testPackageNameListValidator() {
+ Validator v = new SettingsValidators.PackageNameListValidator(",");
+ assertTrue(v.validate("com.android.internal.backup.LocalTransport,com.google.android.gms"));
+ assertFalse(v.validate("5com.android.internal.backup.LocalTransport,android"));
+ }
+
+
+ @Test
public void ensureAllBackedUpSystemSettingsHaveValidators() {
String offenders = getOffenders(concat(Settings.System.SETTINGS_TO_BACKUP,
Settings.System.LEGACY_RESTORE_SETTINGS), Settings.System.VALIDATORS);
diff --git a/core/tests/coretests/src/android/text/MeasuredParagraphTest.java b/core/tests/coretests/src/android/text/MeasuredParagraphTest.java
index f6300ee..6f1d47d 100644
--- a/core/tests/coretests/src/android/text/MeasuredParagraphTest.java
+++ b/core/tests/coretests/src/android/text/MeasuredParagraphTest.java
@@ -132,7 +132,7 @@
public void buildForStaticLayout() {
MeasuredParagraph mt = null;
- mt = MeasuredParagraph.buildForStaticLayout(PAINT, "XXX", 0, 3, LTR, false, null);
+ mt = MeasuredParagraph.buildForStaticLayout(PAINT, "XXX", 0, 3, LTR, false, false, null);
assertNotNull(mt);
assertNotNull(mt.getChars());
assertEquals("XXX", charsToString(mt.getChars()));
@@ -147,7 +147,7 @@
// Recycle it
MeasuredParagraph mt2 =
- MeasuredParagraph.buildForStaticLayout(PAINT, "_VVV_", 1, 4, RTL, false, mt);
+ MeasuredParagraph.buildForStaticLayout(PAINT, "_VVV_", 1, 4, RTL, false, false, mt);
assertEquals(mt2, mt);
assertNotNull(mt2.getChars());
assertEquals("VVV", charsToString(mt.getChars()));
diff --git a/core/tests/coretests/src/android/util/PollingCheck.java b/core/tests/coretests/src/android/util/PollingCheck.java
new file mode 100644
index 0000000..468b9b2
--- /dev/null
+++ b/core/tests/coretests/src/android/util/PollingCheck.java
@@ -0,0 +1,104 @@
+/*
+ * 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 android.util;
+
+import org.junit.Assert;
+
+/**
+ * Utility used for testing that allows to poll for a certain condition to happen within a timeout.
+ *
+ * Code copied from com.android.compatibility.common.util.PollingCheck
+ */
+public abstract class PollingCheck {
+
+ private static final long DEFAULT_TIMEOUT = 3000;
+ private static final long TIME_SLICE = 50;
+ private final long mTimeout;
+
+ /**
+ * The condition that the PollingCheck should use to proceed successfully.
+ */
+ public interface PollingCheckCondition {
+
+ /**
+ * @return Whether the polling condition has been met.
+ */
+ boolean canProceed();
+ }
+
+ public PollingCheck(long timeout) {
+ mTimeout = timeout;
+ }
+
+ protected abstract boolean check();
+
+ /**
+ * Start running the polling check.
+ */
+ public void run() {
+ if (check()) {
+ return;
+ }
+
+ long timeout = mTimeout;
+ while (timeout > 0) {
+ try {
+ Thread.sleep(TIME_SLICE);
+ } catch (InterruptedException e) {
+ Assert.fail("unexpected InterruptedException");
+ }
+
+ if (check()) {
+ return;
+ }
+
+ timeout -= TIME_SLICE;
+ }
+
+ Assert.fail("unexpected timeout");
+ }
+
+ /**
+ * Instantiate and start polling for a given condition with a default 3000ms timeout.
+ *
+ * @param condition The condition to check for success.
+ */
+ public static void waitFor(final PollingCheckCondition condition) {
+ new PollingCheck(DEFAULT_TIMEOUT) {
+ @Override
+ protected boolean check() {
+ return condition.canProceed();
+ }
+ }.run();
+ }
+
+ /**
+ * Instantiate and start polling for a given condition.
+ *
+ * @param timeout Time out in ms
+ * @param condition The condition to check for success.
+ */
+ public static void waitFor(long timeout, final PollingCheckCondition condition) {
+ new PollingCheck(timeout) {
+ @Override
+ protected boolean check() {
+ return condition.canProceed();
+ }
+ }.run();
+ }
+}
+
diff --git a/core/tests/coretests/src/android/view/menu/ContextMenuActivity.java b/core/tests/coretests/src/android/view/menu/ContextMenuActivity.java
new file mode 100644
index 0000000..830b3d5
--- /dev/null
+++ b/core/tests/coretests/src/android/view/menu/ContextMenuActivity.java
@@ -0,0 +1,54 @@
+/*
+ * 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.view.menu;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.ContextMenu;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.View;
+
+import com.android.frameworks.coretests.R;
+
+public class ContextMenuActivity extends Activity {
+
+ static final String LABEL_ITEM = "Item";
+ static final String LABEL_SUBMENU = "Submenu";
+ static final String LABEL_SUBITEM = "Subitem";
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.context_menu);
+ registerForContextMenu(getTargetLtr());
+ registerForContextMenu(getTargetRtl());
+ }
+
+ @Override
+ public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
+ menu.add(LABEL_ITEM);
+ menu.addSubMenu(LABEL_SUBMENU).add(LABEL_SUBITEM);
+ }
+
+ View getTargetLtr() {
+ return findViewById(R.id.context_menu_target_ltr);
+ }
+
+ View getTargetRtl() {
+ return findViewById(R.id.context_menu_target_rtl);
+ }
+}
diff --git a/core/tests/coretests/src/android/view/menu/ContextMenuTest.java b/core/tests/coretests/src/android/view/menu/ContextMenuTest.java
new file mode 100644
index 0000000..59d4e55
--- /dev/null
+++ b/core/tests/coretests/src/android/view/menu/ContextMenuTest.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 android.view.menu;
+
+import android.content.Context;
+import android.graphics.Point;
+import android.support.test.filters.MediumTest;
+import android.test.ActivityInstrumentationTestCase;
+import android.util.PollingCheck;
+import android.view.Display;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.espresso.ContextMenuUtils;
+
+@MediumTest
+public class ContextMenuTest extends ActivityInstrumentationTestCase<ContextMenuActivity> {
+
+ public ContextMenuTest() {
+ super("com.android.frameworks.coretests", ContextMenuActivity.class);
+ }
+
+ public void testContextMenuPositionLtr() throws InterruptedException {
+ testMenuPosition(getActivity().getTargetLtr());
+ }
+
+ public void testContextMenuPositionRtl() throws InterruptedException {
+ testMenuPosition(getActivity().getTargetRtl());
+ }
+
+ private void testMenuPosition(View target) throws InterruptedException {
+ final int minScreenDimension = getMinScreenDimension();
+ if (minScreenDimension < 320) {
+ // Assume there is insufficient room for the context menu to be aligned properly.
+ return;
+ }
+
+ int offsetX = target.getWidth() / 2;
+ int offsetY = target.getHeight() / 2;
+
+ getInstrumentation().runOnMainSync(() -> target.performLongClick(offsetX, offsetY));
+
+ PollingCheck.waitFor(
+ () -> ContextMenuUtils.isMenuItemClickable(ContextMenuActivity.LABEL_SUBMENU));
+
+ ContextMenuUtils.assertContextMenuAlignment(target, offsetX, offsetY);
+
+ ContextMenuUtils.clickMenuItem(ContextMenuActivity.LABEL_SUBMENU);
+
+ PollingCheck.waitFor(
+ () -> ContextMenuUtils.isMenuItemClickable(ContextMenuActivity.LABEL_SUBITEM));
+
+ if (minScreenDimension < getCascadingMenuTreshold()) {
+ // A non-cascading submenu should be displayed at the same location as its parent.
+ // Not testing cascading submenu position, as it is positioned differently.
+ ContextMenuUtils.assertContextMenuAlignment(target, offsetX, offsetY);
+ }
+ }
+
+ /**
+ * Returns the minimum of the default display's width and height.
+ */
+ private int getMinScreenDimension() {
+ final WindowManager windowManager = (WindowManager) getActivity().getSystemService(
+ Context.WINDOW_SERVICE);
+ final Display display = windowManager.getDefaultDisplay();
+ final Point displaySize = new Point();
+ display.getRealSize(displaySize);
+ return Math.min(displaySize.x, displaySize.y);
+ }
+
+ /**
+ * Returns the minimum display size where cascading submenus are supported.
+ */
+ private int getCascadingMenuTreshold() {
+ // Use the same dimension resource as in MenuPopupHelper.createPopup().
+ return getActivity().getResources().getDimensionPixelSize(
+ com.android.internal.R.dimen.cascading_menus_min_smallest_width);
+ }
+}
diff --git a/core/tests/coretests/src/android/view/textclassifier/TextClassificationTest.java b/core/tests/coretests/src/android/view/textclassifier/TextClassificationTest.java
index 9ee7fac..8a81743 100644
--- a/core/tests/coretests/src/android/view/textclassifier/TextClassificationTest.java
+++ b/core/tests/coretests/src/android/view/textclassifier/TextClassificationTest.java
@@ -32,7 +32,9 @@
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.util.Calendar;
import java.util.Locale;
+import java.util.TimeZone;
@SmallTest
@RunWith(AndroidJUnit4.class)
@@ -146,8 +148,12 @@
@Test
public void testParcelOptions() {
+ Calendar referenceTime = Calendar.getInstance(TimeZone.getTimeZone("UTC"), Locale.US);
+ referenceTime.setTimeInMillis(946771200000L); // 2000-01-02
+
TextClassification.Options reference = new TextClassification.Options();
reference.setDefaultLocales(new LocaleList(Locale.US, Locale.GERMANY));
+ reference.setReferenceTime(referenceTime);
// Parcel and unparcel.
final Parcel parcel = Parcel.obtain();
@@ -157,5 +163,6 @@
parcel);
assertEquals("en-US,de-DE", result.getDefaultLocales().toLanguageTags());
+ assertEquals(referenceTime, result.getReferenceTime());
}
}
diff --git a/core/tests/coretests/src/android/widget/espresso/ContextMenuUtils.java b/core/tests/coretests/src/android/widget/espresso/ContextMenuUtils.java
index c8218aa..02ee9be 100644
--- a/core/tests/coretests/src/android/widget/espresso/ContextMenuUtils.java
+++ b/core/tests/coretests/src/android/widget/espresso/ContextMenuUtils.java
@@ -17,25 +17,33 @@
package android.widget.espresso;
import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.RootMatchers.withDecorView;
import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant;
import static android.support.test.espresso.matcher.ViewMatchers.hasFocus;
import static android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayingAtLeast;
import static android.support.test.espresso.matcher.ViewMatchers.isEnabled;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
+
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.not;
-import com.android.internal.view.menu.ListMenuItemView;
-
import android.support.test.espresso.NoMatchingRootException;
import android.support.test.espresso.NoMatchingViewException;
import android.support.test.espresso.ViewInteraction;
import android.support.test.espresso.matcher.ViewMatchers;
+import android.view.View;
import android.widget.MenuPopupWindow.MenuDropDownListView;
+import com.android.internal.view.menu.ListMenuItemView;
+
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+import org.hamcrest.TypeSafeMatcher;
+
/**
* Espresso utility methods for the context menu.
*/
@@ -82,10 +90,15 @@
private static void asssertContextMenuContainsItemWithEnabledState(String itemLabel,
boolean enabled) {
onContextMenu().check(matches(
- hasDescendant(allOf(
- isAssignableFrom(ListMenuItemView.class),
- enabled ? isEnabled() : not(isEnabled()),
- hasDescendant(withText(itemLabel))))));
+ hasDescendant(getVisibleMenuItemMatcher(itemLabel, enabled))));
+ }
+
+ private static Matcher<View> getVisibleMenuItemMatcher(String itemLabel, boolean enabled) {
+ return allOf(
+ isAssignableFrom(ListMenuItemView.class),
+ hasDescendant(withText(itemLabel)),
+ enabled ? isEnabled() : not(isEnabled()),
+ isDisplayingAtLeast(90));
}
/**
@@ -107,4 +120,70 @@
public static void assertContextMenuContainsItemDisabled(String itemLabel) {
asssertContextMenuContainsItemWithEnabledState(itemLabel, false);
}
+
+ /**
+ * Asserts that the context menu window is aligned to a given view with a given offset.
+ *
+ * @param anchor Anchor view.
+ * @param offsetX x offset
+ * @param offsetY y offset.
+ * @throws AssertionError if the assertion fails
+ */
+ public static void assertContextMenuAlignment(View anchor, int offsetX, int offsetY) {
+ int [] expectedLocation = new int[2];
+ anchor.getLocationOnScreen(expectedLocation);
+ expectedLocation[0] += offsetX;
+ expectedLocation[1] += offsetY;
+
+ final boolean rtl = anchor.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
+
+ onContextMenu().check(matches(new TypeSafeMatcher<View>() {
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("root view ");
+ description.appendText(rtl ? "right" : "left");
+ description.appendText("=");
+ description.appendText(Integer.toString(offsetX));
+ description.appendText(", top=");
+ description.appendText(Integer.toString(offsetY));
+ }
+
+ @Override
+ public boolean matchesSafely(View view) {
+ View rootView = view.getRootView();
+ int [] actualLocation = new int[2];
+ rootView.getLocationOnScreen(actualLocation);
+ if (rtl) {
+ actualLocation[0] += rootView.getWidth();
+ }
+ return expectedLocation[0] == actualLocation[0]
+ && expectedLocation[1] == actualLocation[1];
+ }
+ }));
+ }
+
+ /**
+ * Check is the menu item is clickable (i.e. visible and enabled).
+ *
+ * @param itemLabel Label of the item.
+ * @return True if the menu item is clickable.
+ */
+ public static boolean isMenuItemClickable(String itemLabel) {
+ try {
+ onContextMenu().check(matches(
+ hasDescendant(getVisibleMenuItemMatcher(itemLabel, true))));
+ return true;
+ } catch (NoMatchingRootException | NoMatchingViewException | AssertionError e) {
+ return false;
+ }
+ }
+
+ /**
+ * Click on a menu item with the specified label
+ * @param itemLabel Label of the item.
+ */
+ public static void clickMenuItem(String itemLabel) {
+ onView(getVisibleMenuItemMatcher(itemLabel, true))
+ .inRoot(withDecorView(hasFocus())).perform(click());
+ }
}
diff --git a/core/tests/coretests/src/com/android/internal/os/BatteryStatsNoteTest.java b/core/tests/coretests/src/com/android/internal/os/BatteryStatsNoteTest.java
index a55563a..82ac9da 100644
--- a/core/tests/coretests/src/com/android/internal/os/BatteryStatsNoteTest.java
+++ b/core/tests/coretests/src/com/android/internal/os/BatteryStatsNoteTest.java
@@ -23,10 +23,12 @@
import android.os.BatteryManager;
import android.os.BatteryStats;
import android.os.BatteryStats.HistoryItem;
+import android.os.BatteryStats.Uid.Sensor;
import android.os.WorkSource;
import android.support.test.filters.SmallTest;
import android.view.Display;
+import com.android.internal.os.BatteryStatsImpl.DualTimer;
import com.android.internal.os.BatteryStatsImpl.Uid;
import junit.framework.TestCase;
@@ -446,4 +448,52 @@
pkg = bi.getPackageStatsLocked(100, "com.foo.baz_alternate");
assertEquals(0, pkg.getWakeupAlarmStats().size());
}
+
+ @SmallTest
+ public void testNoteGpsChanged() {
+ final MockClocks clocks = new MockClocks(); // holds realtime and uptime in ms
+ MockBatteryStatsImpl bi = new MockBatteryStatsImpl(clocks);
+ bi.setRecordAllHistoryLocked(true);
+ bi.forceRecordAllHistory();
+ bi.mForceOnBattery = true;
+
+ bi.updateTimeBasesLocked(true, Display.STATE_OFF, 0, 0);
+ bi.noteUidProcessStateLocked(UID, ActivityManager.PROCESS_STATE_TOP);
+
+ WorkSource ws = new WorkSource();
+ ws.add(UID);
+
+ bi.noteGpsChangedLocked(new WorkSource(), ws);
+ DualTimer t = bi.getUidStatsLocked(UID).getSensorTimerLocked(Sensor.GPS, false);
+ assertNotNull(t);
+ assertTrue(t.isRunningLocked());
+
+ bi.noteGpsChangedLocked(ws, new WorkSource());
+ t = bi.getUidStatsLocked(UID).getSensorTimerLocked(Sensor.GPS, false);
+ assertFalse(t.isRunningLocked());
+ }
+
+ @SmallTest
+ public void testNoteGpsChanged_workSource() {
+ final MockClocks clocks = new MockClocks(); // holds realtime and uptime in ms
+ MockBatteryStatsImpl bi = new MockBatteryStatsImpl(clocks);
+ bi.setRecordAllHistoryLocked(true);
+ bi.forceRecordAllHistory();
+ bi.mForceOnBattery = true;
+
+ bi.updateTimeBasesLocked(true, Display.STATE_OFF, 0, 0);
+ bi.noteUidProcessStateLocked(UID, ActivityManager.PROCESS_STATE_TOP);
+
+ WorkSource ws = new WorkSource();
+ ws.createWorkChain().addNode(UID, "com.foo");
+
+ bi.noteGpsChangedLocked(new WorkSource(), ws);
+ DualTimer t = bi.getUidStatsLocked(UID).getSensorTimerLocked(Sensor.GPS, false);
+ assertNotNull(t);
+ assertTrue(t.isRunningLocked());
+
+ bi.noteGpsChangedLocked(ws, new WorkSource());
+ t = bi.getUidStatsLocked(UID).getSensorTimerLocked(Sensor.GPS, false);
+ assertFalse(t.isRunningLocked());
+ }
}
diff --git a/core/tests/coretests/src/com/android/internal/os/BstatsCpuTimesValidationTest.java b/core/tests/coretests/src/com/android/internal/os/BstatsCpuTimesValidationTest.java
index 4d34721..ce3ffb9 100644
--- a/core/tests/coretests/src/com/android/internal/os/BstatsCpuTimesValidationTest.java
+++ b/core/tests/coretests/src/com/android/internal/os/BstatsCpuTimesValidationTest.java
@@ -772,7 +772,8 @@
latch.countDown();
}
});
- launchIntent.putExtras(extras);
+ launchIntent.putExtras(extras)
+ .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
sContext.startActivity(launchIntent);
if (latch.await(START_ACTIVITY_TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
if (binders[0] == null) {
diff --git a/core/tests/overlaytests/device/AndroidManifest.xml b/core/tests/overlaytests/device/AndroidManifest.xml
new file mode 100644
index 0000000..e01caee
--- /dev/null
+++ b/core/tests/overlaytests/device/AndroidManifest.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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.server.om.test">
+
+ <uses-sdk android:minSdkVersion="21" />
+
+ <application>
+ <uses-library android:name="android.test.runner" />
+ </application>
+
+ <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.server.om.test" />
+
+</manifest>
diff --git a/core/tests/overlaytests/OverlayAppFiltered/Android.mk b/core/tests/overlaytests/device/OverlayAppFiltered/Android.mk
similarity index 100%
rename from core/tests/overlaytests/OverlayAppFiltered/Android.mk
rename to core/tests/overlaytests/device/OverlayAppFiltered/Android.mk
diff --git a/core/tests/overlaytests/OverlayAppFiltered/AndroidManifest.xml b/core/tests/overlaytests/device/OverlayAppFiltered/AndroidManifest.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayAppFiltered/AndroidManifest.xml
rename to core/tests/overlaytests/device/OverlayAppFiltered/AndroidManifest.xml
diff --git a/core/tests/overlaytests/OverlayAppFiltered/res/raw/lorem_ipsum.txt b/core/tests/overlaytests/device/OverlayAppFiltered/res/raw/lorem_ipsum.txt
similarity index 100%
rename from core/tests/overlaytests/OverlayAppFiltered/res/raw/lorem_ipsum.txt
rename to core/tests/overlaytests/device/OverlayAppFiltered/res/raw/lorem_ipsum.txt
diff --git a/core/tests/overlaytests/OverlayAppFiltered/res/values/config.xml b/core/tests/overlaytests/device/OverlayAppFiltered/res/values/config.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayAppFiltered/res/values/config.xml
rename to core/tests/overlaytests/device/OverlayAppFiltered/res/values/config.xml
diff --git a/core/tests/overlaytests/OverlayAppFiltered/res/xml/integer.xml b/core/tests/overlaytests/device/OverlayAppFiltered/res/xml/integer.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayAppFiltered/res/xml/integer.xml
rename to core/tests/overlaytests/device/OverlayAppFiltered/res/xml/integer.xml
diff --git a/core/tests/overlaytests/OverlayAppFirst/Android.mk b/core/tests/overlaytests/device/OverlayAppFirst/Android.mk
similarity index 100%
rename from core/tests/overlaytests/OverlayAppFirst/Android.mk
rename to core/tests/overlaytests/device/OverlayAppFirst/Android.mk
diff --git a/core/tests/overlaytests/OverlayAppFirst/AndroidManifest.xml b/core/tests/overlaytests/device/OverlayAppFirst/AndroidManifest.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayAppFirst/AndroidManifest.xml
rename to core/tests/overlaytests/device/OverlayAppFirst/AndroidManifest.xml
diff --git a/core/tests/overlaytests/OverlayAppFirst/res/drawable-nodpi/drawable.jpg b/core/tests/overlaytests/device/OverlayAppFirst/res/drawable-nodpi/drawable.jpg
similarity index 100%
rename from core/tests/overlaytests/OverlayAppFirst/res/drawable-nodpi/drawable.jpg
rename to core/tests/overlaytests/device/OverlayAppFirst/res/drawable-nodpi/drawable.jpg
Binary files differ
diff --git a/core/tests/overlaytests/OverlayAppFirst/res/raw/lorem_ipsum.txt b/core/tests/overlaytests/device/OverlayAppFirst/res/raw/lorem_ipsum.txt
similarity index 100%
rename from core/tests/overlaytests/OverlayAppFirst/res/raw/lorem_ipsum.txt
rename to core/tests/overlaytests/device/OverlayAppFirst/res/raw/lorem_ipsum.txt
diff --git a/core/tests/overlaytests/OverlayAppFirst/res/values-sv/config.xml b/core/tests/overlaytests/device/OverlayAppFirst/res/values-sv/config.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayAppFirst/res/values-sv/config.xml
rename to core/tests/overlaytests/device/OverlayAppFirst/res/values-sv/config.xml
diff --git a/core/tests/overlaytests/OverlayAppFirst/res/values/config.xml b/core/tests/overlaytests/device/OverlayAppFirst/res/values/config.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayAppFirst/res/values/config.xml
rename to core/tests/overlaytests/device/OverlayAppFirst/res/values/config.xml
diff --git a/core/tests/overlaytests/OverlayAppFirst/res/xml/integer.xml b/core/tests/overlaytests/device/OverlayAppFirst/res/xml/integer.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayAppFirst/res/xml/integer.xml
rename to core/tests/overlaytests/device/OverlayAppFirst/res/xml/integer.xml
diff --git a/core/tests/overlaytests/OverlayAppSecond/Android.mk b/core/tests/overlaytests/device/OverlayAppSecond/Android.mk
similarity index 100%
rename from core/tests/overlaytests/OverlayAppSecond/Android.mk
rename to core/tests/overlaytests/device/OverlayAppSecond/Android.mk
diff --git a/core/tests/overlaytests/OverlayAppSecond/AndroidManifest.xml b/core/tests/overlaytests/device/OverlayAppSecond/AndroidManifest.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayAppSecond/AndroidManifest.xml
rename to core/tests/overlaytests/device/OverlayAppSecond/AndroidManifest.xml
diff --git a/core/tests/overlaytests/OverlayAppSecond/res/raw/lorem_ipsum.txt b/core/tests/overlaytests/device/OverlayAppSecond/res/raw/lorem_ipsum.txt
similarity index 100%
rename from core/tests/overlaytests/OverlayAppSecond/res/raw/lorem_ipsum.txt
rename to core/tests/overlaytests/device/OverlayAppSecond/res/raw/lorem_ipsum.txt
diff --git a/core/tests/overlaytests/OverlayAppSecond/res/values-sv/config.xml b/core/tests/overlaytests/device/OverlayAppSecond/res/values-sv/config.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayAppSecond/res/values-sv/config.xml
rename to core/tests/overlaytests/device/OverlayAppSecond/res/values-sv/config.xml
diff --git a/core/tests/overlaytests/OverlayAppSecond/res/values/config.xml b/core/tests/overlaytests/device/OverlayAppSecond/res/values/config.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayAppSecond/res/values/config.xml
rename to core/tests/overlaytests/device/OverlayAppSecond/res/values/config.xml
diff --git a/core/tests/overlaytests/OverlayAppSecond/res/xml/integer.xml b/core/tests/overlaytests/device/OverlayAppSecond/res/xml/integer.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayAppSecond/res/xml/integer.xml
rename to core/tests/overlaytests/device/OverlayAppSecond/res/xml/integer.xml
diff --git a/core/tests/overlaytests/OverlayTest/Android.mk b/core/tests/overlaytests/device/OverlayTest/Android.mk
similarity index 100%
rename from core/tests/overlaytests/OverlayTest/Android.mk
rename to core/tests/overlaytests/device/OverlayTest/Android.mk
diff --git a/core/tests/overlaytests/OverlayTest/AndroidManifest.xml b/core/tests/overlaytests/device/OverlayTest/AndroidManifest.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayTest/AndroidManifest.xml
rename to core/tests/overlaytests/device/OverlayTest/AndroidManifest.xml
diff --git a/core/tests/overlaytests/OverlayTest/res/drawable-nodpi/drawable.jpg b/core/tests/overlaytests/device/OverlayTest/res/drawable-nodpi/drawable.jpg
similarity index 100%
rename from core/tests/overlaytests/OverlayTest/res/drawable-nodpi/drawable.jpg
rename to core/tests/overlaytests/device/OverlayTest/res/drawable-nodpi/drawable.jpg
Binary files differ
diff --git a/core/tests/overlaytests/OverlayTest/res/raw/lorem_ipsum.txt b/core/tests/overlaytests/device/OverlayTest/res/raw/lorem_ipsum.txt
similarity index 100%
rename from core/tests/overlaytests/OverlayTest/res/raw/lorem_ipsum.txt
rename to core/tests/overlaytests/device/OverlayTest/res/raw/lorem_ipsum.txt
diff --git a/core/tests/overlaytests/OverlayTest/res/values-sv/config.xml b/core/tests/overlaytests/device/OverlayTest/res/values-sv/config.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayTest/res/values-sv/config.xml
rename to core/tests/overlaytests/device/OverlayTest/res/values-sv/config.xml
diff --git a/core/tests/overlaytests/OverlayTest/res/values/config.xml b/core/tests/overlaytests/device/OverlayTest/res/values/config.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayTest/res/values/config.xml
rename to core/tests/overlaytests/device/OverlayTest/res/values/config.xml
diff --git a/core/tests/overlaytests/OverlayTest/res/xml/integer.xml b/core/tests/overlaytests/device/OverlayTest/res/xml/integer.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayTest/res/xml/integer.xml
rename to core/tests/overlaytests/device/OverlayTest/res/xml/integer.xml
diff --git a/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/OverlayBaseTest.java b/core/tests/overlaytests/device/OverlayTest/src/com/android/overlaytest/OverlayBaseTest.java
similarity index 100%
rename from core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/OverlayBaseTest.java
rename to core/tests/overlaytests/device/OverlayTest/src/com/android/overlaytest/OverlayBaseTest.java
diff --git a/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/WithMultipleOverlaysTest.java b/core/tests/overlaytests/device/OverlayTest/src/com/android/overlaytest/WithMultipleOverlaysTest.java
similarity index 100%
rename from core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/WithMultipleOverlaysTest.java
rename to core/tests/overlaytests/device/OverlayTest/src/com/android/overlaytest/WithMultipleOverlaysTest.java
diff --git a/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/WithOverlayTest.java b/core/tests/overlaytests/device/OverlayTest/src/com/android/overlaytest/WithOverlayTest.java
similarity index 100%
rename from core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/WithOverlayTest.java
rename to core/tests/overlaytests/device/OverlayTest/src/com/android/overlaytest/WithOverlayTest.java
diff --git a/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/WithoutOverlayTest.java b/core/tests/overlaytests/device/OverlayTest/src/com/android/overlaytest/WithoutOverlayTest.java
similarity index 100%
rename from core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/WithoutOverlayTest.java
rename to core/tests/overlaytests/device/OverlayTest/src/com/android/overlaytest/WithoutOverlayTest.java
diff --git a/core/tests/overlaytests/OverlayTestOverlay/Android.mk b/core/tests/overlaytests/device/OverlayTestOverlay/Android.mk
similarity index 100%
rename from core/tests/overlaytests/OverlayTestOverlay/Android.mk
rename to core/tests/overlaytests/device/OverlayTestOverlay/Android.mk
diff --git a/core/tests/overlaytests/OverlayTestOverlay/AndroidManifest.xml b/core/tests/overlaytests/device/OverlayTestOverlay/AndroidManifest.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayTestOverlay/AndroidManifest.xml
rename to core/tests/overlaytests/device/OverlayTestOverlay/AndroidManifest.xml
diff --git a/core/tests/overlaytests/OverlayTestOverlay/res/values/config.xml b/core/tests/overlaytests/device/OverlayTestOverlay/res/values/config.xml
similarity index 100%
rename from core/tests/overlaytests/OverlayTestOverlay/res/values/config.xml
rename to core/tests/overlaytests/device/OverlayTestOverlay/res/values/config.xml
diff --git a/core/tests/overlaytests/host/Android.mk b/core/tests/overlaytests/host/Android.mk
new file mode 100644
index 0000000..d8e1fc1
--- /dev/null
+++ b/core/tests/overlaytests/host/Android.mk
@@ -0,0 +1,32 @@
+# 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := $(call all-java-files-under,src)
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE := OverlayHostTests
+LOCAL_JAVA_LIBRARIES := tradefed
+LOCAL_COMPATIBILITY_SUITE := general-tests
+LOCAL_TARGET_REQUIRED_MODULES := \
+ OverlayHostTests_BadSignatureOverlay \
+ OverlayHostTests_PlatformSignatureStaticOverlay \
+ OverlayHostTests_PlatformSignatureOverlay \
+ OverlayHostTests_PlatformSignatureOverlayV2
+include $(BUILD_HOST_JAVA_LIBRARY)
+
+# Include to build test-apps.
+include $(call all-makefiles-under,$(LOCAL_PATH))
+
diff --git a/core/tests/overlaytests/host/AndroidTest.xml b/core/tests/overlaytests/host/AndroidTest.xml
new file mode 100644
index 0000000..6884623
--- /dev/null
+++ b/core/tests/overlaytests/host/AndroidTest.xml
@@ -0,0 +1,24 @@
+<?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="Host-driven test module config for OverlayHostTests">
+ <option name="test-tag" value="OverlayHostTests" />
+ <option name="test-suite-tag" value="apct" />
+
+ <test class="com.android.tradefed.testtype.HostTest">
+ <option name="class" value="com.android.server.om.hosttest.InstallOverlayTests" />
+ </test>
+</configuration>
diff --git a/core/tests/overlaytests/host/src/com/android/server/om/hosttest/InstallOverlayTests.java b/core/tests/overlaytests/host/src/com/android/server/om/hosttest/InstallOverlayTests.java
new file mode 100644
index 0000000..5093710
--- /dev/null
+++ b/core/tests/overlaytests/host/src/com/android/server/om/hosttest/InstallOverlayTests.java
@@ -0,0 +1,78 @@
+/*
+ * 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.om.hosttest;
+
+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 com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class InstallOverlayTests extends BaseHostJUnit4Test {
+
+ private static final String OVERLAY_PACKAGE_NAME =
+ "com.android.server.om.hosttest.signature_overlay";
+
+ @Test
+ public void failToInstallNonPlatformSignedOverlay() throws Exception {
+ try {
+ installPackage("OverlayHostTests_BadSignatureOverlay.apk");
+ fail("installed a non-platform signed overlay");
+ } catch (Exception e) {
+ // Expected.
+ }
+ assertFalse(overlayManagerContainsPackage());
+ }
+
+ @Test
+ public void failToInstallPlatformSignedStaticOverlay() throws Exception {
+ try {
+ installPackage("OverlayHostTests_PlatformSignatureStaticOverlay.apk");
+ fail("installed a static overlay");
+ } catch (Exception e) {
+ // Expected.
+ }
+ assertFalse(overlayManagerContainsPackage());
+ }
+
+ @Test
+ public void succeedToInstallPlatformSignedOverlay() throws Exception {
+ installPackage("OverlayHostTests_PlatformSignatureOverlay.apk");
+ assertTrue(overlayManagerContainsPackage());
+ }
+
+ @Test
+ public void succeedToInstallPlatformSignedOverlayAndUpdate() throws Exception {
+ installPackage("OverlayHostTests_PlatformSignatureOverlay.apk");
+ assertTrue(overlayManagerContainsPackage());
+ assertEquals("v1", getDevice().getAppPackageInfo(OVERLAY_PACKAGE_NAME).getVersionName());
+
+ installPackage("OverlayHostTests_PlatformSignatureOverlayV2.apk");
+ assertTrue(overlayManagerContainsPackage());
+ assertEquals("v2", getDevice().getAppPackageInfo(OVERLAY_PACKAGE_NAME).getVersionName());
+ }
+
+ private boolean overlayManagerContainsPackage() throws Exception {
+ return getDevice().executeShellCommand("cmd overlay list")
+ .contains(OVERLAY_PACKAGE_NAME);
+ }
+}
diff --git a/core/tests/overlaytests/host/test-apps/Android.mk b/core/tests/overlaytests/host/test-apps/Android.mk
new file mode 100644
index 0000000..5c7187e
--- /dev/null
+++ b/core/tests/overlaytests/host/test-apps/Android.mk
@@ -0,0 +1,16 @@
+# 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 $(call all-subdir-makefiles)
+
diff --git a/core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.mk b/core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.mk
new file mode 100644
index 0000000..b051a82
--- /dev/null
+++ b/core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.mk
@@ -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.
+
+LOCAL_PATH := $(call my-dir)
+
+my_package_prefix := com.android.server.om.hosttest.signature_overlay
+
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := tests
+LOCAL_PACKAGE_NAME := OverlayHostTests_BadSignatureOverlay
+LOCAL_COMPATIBILITY_SUITE := general-tests
+LOCAL_AAPT_FLAGS := --custom-package $(my_package_prefix)_bad
+include $(BUILD_PACKAGE)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := tests
+LOCAL_PACKAGE_NAME := OverlayHostTests_PlatformSignatureStaticOverlay
+LOCAL_COMPATIBILITY_SUITE := general-tests
+LOCAL_MANIFEST_FILE := static/AndroidManifest.xml
+LOCAL_AAPT_FLAGS := --custom-package $(my_package_prefix)_static
+include $(BUILD_PACKAGE)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := tests
+LOCAL_PACKAGE_NAME := OverlayHostTests_PlatformSignatureOverlay
+LOCAL_COMPATIBILITY_SUITE := general-tests
+LOCAL_CERTIFICATE := platform
+LOCAL_AAPT_FLAGS := --custom-package $(my_package_prefix)_v1
+LOCAL_AAPT_FLAGS += --version-code 1 --version-name v1
+include $(BUILD_PACKAGE)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := tests
+LOCAL_PACKAGE_NAME := OverlayHostTests_PlatformSignatureOverlayV2
+LOCAL_COMPATIBILITY_SUITE := general-tests
+LOCAL_CERTIFICATE := platform
+LOCAL_AAPT_FLAGS := --custom-package $(my_package_prefix)_v2
+LOCAL_AAPT_FLAGS += --version-code 2 --version-name v2
+include $(BUILD_PACKAGE)
+
+my_package_prefix :=
diff --git a/core/tests/overlaytests/host/test-apps/SignatureOverlay/AndroidManifest.xml b/core/tests/overlaytests/host/test-apps/SignatureOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..2d68439
--- /dev/null
+++ b/core/tests/overlaytests/host/test-apps/SignatureOverlay/AndroidManifest.xml
@@ -0,0 +1,20 @@
+<?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.server.om.hosttest.signature_overlay">
+ <overlay android:targetPackage="android" />
+</manifest>
diff --git a/core/tests/overlaytests/host/test-apps/SignatureOverlay/src/dummy b/core/tests/overlaytests/host/test-apps/SignatureOverlay/src/dummy
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/core/tests/overlaytests/host/test-apps/SignatureOverlay/src/dummy
diff --git a/core/tests/overlaytests/host/test-apps/SignatureOverlay/static/AndroidManifest.xml b/core/tests/overlaytests/host/test-apps/SignatureOverlay/static/AndroidManifest.xml
new file mode 100644
index 0000000..139dd96
--- /dev/null
+++ b/core/tests/overlaytests/host/test-apps/SignatureOverlay/static/AndroidManifest.xml
@@ -0,0 +1,20 @@
+<?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.server.om.hosttest.signature_overlay">
+ <overlay android:targetPackage="android" android:isStatic="true" />
+</manifest>
diff --git a/data/etc/platform.xml b/data/etc/platform.xml
index 09192f4..04006b1 100644
--- a/data/etc/platform.xml
+++ b/data/etc/platform.xml
@@ -179,6 +179,8 @@
<!-- This is a list of all the libraries available for application
code to link against. -->
+ <library name="android.test.base"
+ file="/system/framework/android.test.base.jar" />
<library name="android.test.mock"
file="/system/framework/android.test.mock.jar" />
<library name="android.test.runner"
diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml
index c0958cd..8addffbb 100644
--- a/data/etc/privapp-permissions-platform.xml
+++ b/data/etc/privapp-permissions-platform.xml
@@ -350,6 +350,7 @@
<permission name="android.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST"/>
<permission name="android.permission.CHANGE_OVERLAY_PACKAGES"/>
<permission name="android.permission.CONNECTIVITY_INTERNAL"/>
+ <permission name="android.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS"/>
<permission name="android.permission.CONTROL_VPN"/>
<permission name="android.permission.DUMP"/>
<permission name="android.permission.GET_APP_OPS_STATS"/>
diff --git a/docs/html/reference/images/text/style/clickablespan.png b/docs/html/reference/images/text/style/clickablespan.png
new file mode 100644
index 0000000..8e3e6bf
--- /dev/null
+++ b/docs/html/reference/images/text/style/clickablespan.png
Binary files differ
diff --git a/docs/html/reference/images/text/style/customquotespan.png b/docs/html/reference/images/text/style/customquotespan.png
new file mode 100644
index 0000000..27f521a
--- /dev/null
+++ b/docs/html/reference/images/text/style/customquotespan.png
Binary files differ
diff --git a/docs/html/reference/images/text/style/defaultquotespan.png b/docs/html/reference/images/text/style/defaultquotespan.png
new file mode 100644
index 0000000..6c5a41f
--- /dev/null
+++ b/docs/html/reference/images/text/style/defaultquotespan.png
Binary files differ
diff --git a/docs/html/reference/images/text/style/ltralignmentspan.png b/docs/html/reference/images/text/style/ltralignmentspan.png
new file mode 100644
index 0000000..6ee5943
--- /dev/null
+++ b/docs/html/reference/images/text/style/ltralignmentspan.png
Binary files differ
diff --git a/docs/html/reference/images/text/style/rtlalignmentspan.png b/docs/html/reference/images/text/style/rtlalignmentspan.png
new file mode 100644
index 0000000..952258d
--- /dev/null
+++ b/docs/html/reference/images/text/style/rtlalignmentspan.png
Binary files differ
diff --git a/graphics/java/android/graphics/BaseCanvas.java b/graphics/java/android/graphics/BaseCanvas.java
index 2d8c717..627d551 100644
--- a/graphics/java/android/graphics/BaseCanvas.java
+++ b/graphics/java/android/graphics/BaseCanvas.java
@@ -22,6 +22,8 @@
import android.annotation.Size;
import android.graphics.Canvas.VertexMode;
import android.text.GraphicsOperations;
+import android.text.MeasuredParagraph;
+import android.text.MeasuredText;
import android.text.SpannableString;
import android.text.SpannedString;
import android.text.TextUtils;
@@ -453,7 +455,8 @@
throwIfHasHwBitmapInSwMode(paint);
nDrawTextRun(mNativeCanvasWrapper, text, index, count, contextIndex, contextCount,
- x, y, isRtl, paint.getNativeInstance());
+ x, y, isRtl, paint.getNativeInstance(), 0 /* measured text */,
+ 0 /* measured text offset */);
}
public void drawTextRun(@NonNull CharSequence text, int start, int end, int contextStart,
@@ -483,8 +486,20 @@
int len = end - start;
char[] buf = TemporaryBuffer.obtain(contextLen);
TextUtils.getChars(text, contextStart, contextEnd, buf, 0);
+ long measuredTextPtr = 0;
+ int measuredTextOffset = 0;
+ if (text instanceof MeasuredText) {
+ MeasuredText mt = (MeasuredText) text;
+ int paraIndex = mt.findParaIndex(start);
+ if (end <= mt.getParagraphEnd(paraIndex)) {
+ // Only suppor the same paragraph.
+ measuredTextPtr = mt.getMeasuredParagraph(paraIndex).getNativePtr();
+ measuredTextOffset = start - mt.getParagraphStart(paraIndex);
+ }
+ }
nDrawTextRun(mNativeCanvasWrapper, buf, start - contextStart, len,
- 0, contextLen, x, y, isRtl, paint.getNativeInstance());
+ 0, contextLen, x, y, isRtl, paint.getNativeInstance(),
+ measuredTextPtr, measuredTextOffset);
TemporaryBuffer.recycle(buf);
}
}
@@ -623,7 +638,8 @@
int contextStart, int contextEnd, float x, float y, boolean isRtl, long nativePaint);
private static native void nDrawTextRun(long nativeCanvas, char[] text, int start, int count,
- int contextStart, int contextCount, float x, float y, boolean isRtl, long nativePaint);
+ int contextStart, int contextCount, float x, float y, boolean isRtl, long nativePaint,
+ long nativeMeasuredText, int measuredTextOffset);
private static native void nDrawTextOnPath(long nativeCanvas, char[] text, int index, int count,
long nativePath, float hOffset, float vOffset, int bidiFlags, long nativePaint);
diff --git a/graphics/java/android/graphics/ImageDecoder.java b/graphics/java/android/graphics/ImageDecoder.java
index 02d22be..bbf2145 100644
--- a/graphics/java/android/graphics/ImageDecoder.java
+++ b/graphics/java/android/graphics/ImageDecoder.java
@@ -148,7 +148,7 @@
throw new FileNotFoundException(mUri.toString());
}
- return createFromStream(is);
+ return createFromStream(is, true);
}
final FileDescriptor fd = assetFd.getFileDescriptor();
@@ -160,7 +160,7 @@
Os.lseek(fd, offset, SEEK_SET);
decoder = nCreate(fd);
} catch (ErrnoException e) {
- decoder = createFromStream(new FileInputStream(fd));
+ decoder = createFromStream(new FileInputStream(fd), true);
}
} finally {
if (decoder == null) {
@@ -180,7 +180,7 @@
try {
Os.lseek(fd, 0, SEEK_CUR);
} catch (ErrnoException e) {
- return createFromStream(stream);
+ return createFromStream(stream, true);
}
ImageDecoder decoder = null;
@@ -191,13 +191,15 @@
IoUtils.closeQuietly(stream);
} else {
decoder.mInputStream = stream;
+ decoder.mOwnsInputStream = true;
}
}
return decoder;
}
@NonNull
- private static ImageDecoder createFromStream(@NonNull InputStream is) throws IOException {
+ private static ImageDecoder createFromStream(@NonNull InputStream is,
+ boolean closeInputStream) throws IOException {
// Arbitrary size matches BitmapFactory.
byte[] storage = new byte[16 * 1024];
ImageDecoder decoder = null;
@@ -205,9 +207,12 @@
decoder = nCreate(is, storage);
} finally {
if (decoder == null) {
- IoUtils.closeQuietly(is);
+ if (closeInputStream) {
+ IoUtils.closeQuietly(is);
+ }
} else {
decoder.mInputStream = is;
+ decoder.mOwnsInputStream = closeInputStream;
decoder.mTempStorage = storage;
}
}
@@ -215,6 +220,9 @@
return decoder;
}
+ /**
+ * For backwards compatibility, this does *not* close the InputStream.
+ */
private static class InputStreamSource extends Source {
InputStreamSource(Resources res, InputStream is, int inputDensity) {
if (is == null) {
@@ -244,7 +252,7 @@
}
InputStream is = mInputStream;
mInputStream = null;
- return createFromStream(is);
+ return createFromStream(is, false);
}
}
}
@@ -293,6 +301,7 @@
IoUtils.closeQuietly(is);
} else {
decoder.mInputStream = is;
+ decoder.mOwnsInputStream = true;
}
}
return decoder;
@@ -339,6 +348,16 @@
public String getMimeType() {
return mDecoder.getMimeType();
}
+
+ /**
+ * Whether the image is animated.
+ *
+ * <p>Calling {@link #decodeDrawable} will return an
+ * {@link AnimatedImageDrawable}.</p>
+ */
+ public boolean isAnimated() {
+ return mDecoder.mAnimated;
+ }
};
/**
@@ -426,6 +445,7 @@
// Objects for interacting with the input.
private InputStream mInputStream;
+ private boolean mOwnsInputStream;
private byte[] mTempStorage;
private AssetFileDescriptor mAssetFd;
private final AtomicBoolean mClosed = new AtomicBoolean();
@@ -454,6 +474,10 @@
mCloseGuard.warnIfOpen();
}
+ // Avoid closing these in finalizer.
+ mInputStream = null;
+ mAssetFd = null;
+
close();
} finally {
super.finalize();
@@ -797,7 +821,9 @@
nClose(mNativePtr);
mNativePtr = 0;
- IoUtils.closeQuietly(mInputStream);
+ if (mOwnsInputStream) {
+ IoUtils.closeQuietly(mInputStream);
+ }
IoUtils.closeQuietly(mAssetFd);
mInputStream = null;
@@ -920,10 +946,6 @@
Resources res = src.getResources();
byte[] np = bm.getNinePatchChunk();
if (np != null && NinePatch.isNinePatchChunk(np)) {
- if (res != null) {
- bm.setDensity(res.getDisplayMetrics().densityDpi);
- }
-
Rect opticalInsets = new Rect();
bm.getOpticalInsets(opticalInsets);
Rect padding = new Rect();
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
index 317144a..5a80ee2 100644
--- a/graphics/java/android/graphics/Paint.java
+++ b/graphics/java/android/graphics/Paint.java
@@ -2742,7 +2742,7 @@
* @param offset index of caret position
* @return width measurement between start and offset
*/
- public float getRunAdvance(@NonNull CharSequence text, int start, int end, int contextStart,
+ public float getRunAdvance(CharSequence text, int start, int end, int contextStart,
int contextEnd, boolean isRtl, int offset) {
if (text == null) {
throw new IllegalArgumentException("text cannot be null");
diff --git a/graphics/java/android/graphics/drawable/AnimatedImageDrawable.java b/graphics/java/android/graphics/drawable/AnimatedImageDrawable.java
index da170c0..0ec19f9 100644
--- a/graphics/java/android/graphics/drawable/AnimatedImageDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimatedImageDrawable.java
@@ -20,14 +20,26 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.res.AssetFileDescriptor;
+import android.content.res.Resources;
+import android.content.res.Resources.Theme;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.view.InflateException;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.ImageDecoder;
import android.graphics.PixelFormat;
import android.graphics.Rect;
-import android.os.SystemClock;
+import android.os.Handler;
+import android.os.Looper;
import android.util.DisplayMetrics;
+import android.util.TypedValue;
+
+import com.android.internal.R;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
import libcore.io.IoUtils;
import libcore.util.NativeAllocationRegistry;
@@ -35,17 +47,38 @@
import java.io.IOException;
import java.io.InputStream;
import java.lang.Runnable;
+import java.util.ArrayList;
/**
- * @hide
+ * {@link Drawable} for drawing animated images (like GIF).
+ *
+ * <p>Created by {@link ImageDecoder#decodeDrawable}. A user needs to call
+ * {@link #start} to start the animation.</p>
*/
-public class AnimatedImageDrawable extends Drawable implements Animatable {
- private final long mNativePtr;
- private final InputStream mInputStream;
- private final AssetFileDescriptor mAssetFd;
+public class AnimatedImageDrawable extends Drawable implements Animatable2 {
+ private int mIntrinsicWidth;
+ private int mIntrinsicHeight;
- private final int mIntrinsicWidth;
- private final int mIntrinsicHeight;
+ private boolean mStarting;
+ private boolean mRunning;
+
+ private Handler mHandler;
+
+ private class State {
+ State(long nativePtr, InputStream is, AssetFileDescriptor afd) {
+ mNativePtr = nativePtr;
+ mInputStream = is;
+ mAssetFd = afd;
+ }
+
+ public final long mNativePtr;
+
+ // These just keep references so the native code can continue using them.
+ private final InputStream mInputStream;
+ private final AssetFileDescriptor mAssetFd;
+ }
+
+ private State mState;
private Runnable mRunnable = new Runnable() {
@Override
@@ -55,6 +88,95 @@
};
/**
+ * Pass this to {@link #setLoopCount} to loop infinitely.
+ *
+ * <p>{@link Animatable2.AnimationCallback#onAnimationEnd} will never be
+ * called unless there is an error.</p>
+ */
+ public static final int LOOP_INFINITE = -1;
+
+ /**
+ * Specify the number of times to loop the animation.
+ *
+ * <p>By default, the loop count in the encoded data is respected.</p>
+ */
+ public void setLoopCount(int loopCount) {
+ if (mState == null) {
+ throw new IllegalStateException("called setLoopCount on empty AnimatedImageDrawable");
+ }
+ nSetLoopCount(mState.mNativePtr, loopCount);
+ }
+
+ /**
+ * Create an empty AnimatedImageDrawable.
+ */
+ public AnimatedImageDrawable() {
+ mState = null;
+ }
+
+ @Override
+ public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme)
+ throws XmlPullParserException, IOException {
+ super.inflate(r, parser, attrs, theme);
+
+ final TypedArray a = obtainAttributes(r, theme, attrs, R.styleable.AnimatedImageDrawable);
+ updateStateFromTypedArray(a, mSrcDensityOverride);
+ }
+
+ private void updateStateFromTypedArray(TypedArray a, int srcDensityOverride)
+ throws XmlPullParserException {
+ final Resources r = a.getResources();
+ final int srcResId = a.getResourceId(R.styleable.AnimatedImageDrawable_src, 0);
+ if (srcResId != 0) {
+ // Follow the density handling in BitmapDrawable.
+ final TypedValue value = new TypedValue();
+ r.getValueForDensity(srcResId, srcDensityOverride, value, true);
+ if (srcDensityOverride > 0 && value.density > 0
+ && value.density != TypedValue.DENSITY_NONE) {
+ if (value.density == srcDensityOverride) {
+ value.density = r.getDisplayMetrics().densityDpi;
+ } else {
+ value.density =
+ (value.density * r.getDisplayMetrics().densityDpi) / srcDensityOverride;
+ }
+ }
+
+ int density = Bitmap.DENSITY_NONE;
+ if (value.density == TypedValue.DENSITY_DEFAULT) {
+ density = DisplayMetrics.DENSITY_DEFAULT;
+ } else if (value.density != TypedValue.DENSITY_NONE) {
+ density = value.density;
+ }
+
+ Drawable drawable = null;
+ try {
+ InputStream is = r.openRawResource(srcResId, value);
+ ImageDecoder.Source source = ImageDecoder.createSource(r, is, density);
+ drawable = ImageDecoder.decodeDrawable(source, (decoder, info, src) -> {
+ if (!info.isAnimated()) {
+ throw new IllegalArgumentException("image is not animated");
+ }
+ });
+ } catch (IOException e) {
+ throw new XmlPullParserException(a.getPositionDescription() +
+ ": <animated-image> requires a valid 'src' attribute", null, e);
+ }
+
+ if (!(drawable instanceof AnimatedImageDrawable)) {
+ throw new XmlPullParserException(a.getPositionDescription() +
+ ": <animated-image> did not decode animated");
+ }
+
+ // Transfer the state of other to this one. other will be discarded.
+ AnimatedImageDrawable other = (AnimatedImageDrawable) drawable;
+ mState = other.mState;
+ other.mState = null;
+ mIntrinsicWidth = other.mIntrinsicWidth;
+ mIntrinsicHeight = other.mIntrinsicHeight;
+ }
+ }
+
+ /**
* @hide
* This should only be called by ImageDecoder.
*
@@ -80,30 +202,14 @@
mIntrinsicHeight = cropRect.height();
}
- mNativePtr = nCreate(nativeImageDecoder, decoder, width, height, cropRect);
- mInputStream = inputStream;
- mAssetFd = afd;
+ mState = new State(nCreate(nativeImageDecoder, decoder, width, height, cropRect),
+ inputStream, afd);
// FIXME: Use the right size for the native allocation.
long nativeSize = 200;
NativeAllocationRegistry registry = new NativeAllocationRegistry(
AnimatedImageDrawable.class.getClassLoader(), nGetNativeFinalizer(), nativeSize);
- registry.registerNativeAllocation(this, mNativePtr);
- }
-
- @Override
- protected void finalize() throws Throwable {
- // FIXME: It's a shame that we have *both* a native finalizer and a Java
- // one. The native one is necessary to report how much memory is being
- // used natively, and this one is necessary to close the input. An
- // alternative might be to read the entire stream ahead of time, so we
- // can eliminate the Java finalizer.
- try {
- IoUtils.closeQuietly(mInputStream);
- IoUtils.closeQuietly(mAssetFd);
- } finally {
- super.finalize();
- }
+ registry.registerNativeAllocation(mState, mState.mNativePtr);
}
@Override
@@ -116,11 +222,35 @@
return mIntrinsicHeight;
}
+ // nDraw returns -2 if the animation is not running.
+ private static final int NOT_RUNNING = -2;
+
@Override
public void draw(@NonNull Canvas canvas) {
- long nextUpdate = nDraw(mNativePtr, canvas.getNativeCanvasWrapper(),
- SystemClock.uptimeMillis());
- scheduleSelf(mRunnable, nextUpdate);
+ if (mState == null) {
+ throw new IllegalStateException("called draw on empty AnimatedImageDrawable");
+ }
+
+ if (mStarting) {
+ mStarting = false;
+
+ postOnAnimationStart();
+
+ mRunning = true;
+ }
+
+ long nextUpdate = nDraw(mState.mNativePtr, canvas.getNativeCanvasWrapper());
+ // a value <= 0 indicates that the drawable is stopped or that renderThread
+ // will manage the animation
+ if (nextUpdate > 0) {
+ scheduleSelf(mRunnable, nextUpdate);
+ } else if (nextUpdate == NOT_RUNNING) {
+ // -2 means the animation ended, when drawn in software mode.
+ if (mRunning) {
+ postOnAnimationEnd();
+ mRunning = false;
+ }
+ }
}
@Override
@@ -129,18 +259,32 @@
throw new IllegalArgumentException("Alpha must be between 0 and"
+ " 255! provided " + alpha);
}
- nSetAlpha(mNativePtr, alpha);
+
+ if (mState == null) {
+ throw new IllegalStateException("called setAlpha on empty AnimatedImageDrawable");
+ }
+
+ nSetAlpha(mState.mNativePtr, alpha);
+ invalidateSelf();
}
@Override
public int getAlpha() {
- return nGetAlpha(mNativePtr);
+ if (mState == null) {
+ throw new IllegalStateException("called getAlpha on empty AnimatedImageDrawable");
+ }
+ return nGetAlpha(mState.mNativePtr);
}
@Override
public void setColorFilter(@Nullable ColorFilter colorFilter) {
+ if (mState == null) {
+ throw new IllegalStateException("called setColorFilter on empty AnimatedImageDrawable");
+ }
+
long nativeFilter = colorFilter == null ? 0 : colorFilter.getNativeInstance();
- nSetColorFilter(mNativePtr, nativeFilter);
+ nSetColorFilter(mState.mNativePtr, nativeFilter);
+ invalidateSelf();
}
@Override
@@ -148,37 +292,131 @@
return PixelFormat.TRANSLUCENT;
}
- // TODO: Add a Constant State?
- // @Override
- // public @Nullable ConstantState getConstantState() {}
-
-
// Animatable overrides
+ /**
+ * Return whether the animation is currently running.
+ *
+ * <p>When this drawable is created, this will return {@code false}. A client
+ * needs to call {@link #start} to start the animation.</p>
+ */
@Override
public boolean isRunning() {
- return nIsRunning(mNativePtr);
+ return mRunning;
}
+ /**
+ * Start the animation.
+ *
+ * <p>Does nothing if the animation is already running.
+ *
+ * <p>If the animation starts, this will call
+ * {@link Animatable2.AnimationCallback#onAnimationStart}.</p>
+ */
@Override
public void start() {
- nStart(mNativePtr);
+ if (mState == null) {
+ throw new IllegalStateException("called start on empty AnimatedImageDrawable");
+ }
+
+ if (nStart(mState.mNativePtr)) {
+ mStarting = true;
+ invalidateSelf();
+ }
+ }
+
+ /**
+ * Stop the animation.
+ *
+ * <p>If the animation is stopped, it will continue to display the frame
+ * it was displaying when stopped.</p>
+ */
+ @Override
+ public void stop() {
+ if (mState == null) {
+ throw new IllegalStateException("called stop on empty AnimatedImageDrawable");
+ }
+ nStop(mState.mNativePtr);
+ mRunning = false;
+ }
+
+ // Animatable2 overrides
+ private ArrayList<Animatable2.AnimationCallback> mAnimationCallbacks = null;
+
+ @Override
+ public void registerAnimationCallback(@NonNull AnimationCallback callback) {
+ if (callback == null) {
+ return;
+ }
+
+ if (mAnimationCallbacks == null) {
+ mAnimationCallbacks = new ArrayList<Animatable2.AnimationCallback>();
+ nSetOnAnimationEndListener(mState.mNativePtr, this);
+ }
+
+ mAnimationCallbacks.add(callback);
}
@Override
- public void stop() {
- nStop(mNativePtr);
+ public boolean unregisterAnimationCallback(@NonNull AnimationCallback callback) {
+ if (callback == null || mAnimationCallbacks == null) {
+ return false;
+ }
+
+ return mAnimationCallbacks.remove(callback);
}
+ @Override
+ public void clearAnimationCallbacks() {
+ mAnimationCallbacks = null;
+ }
+
+ private void postOnAnimationStart() {
+ if (mAnimationCallbacks == null) {
+ return;
+ }
+
+ getHandler().post(() -> {
+ for (Animatable2.AnimationCallback callback : mAnimationCallbacks) {
+ callback.onAnimationStart(this);
+ }
+ });
+ }
+
+ private void postOnAnimationEnd() {
+ if (mAnimationCallbacks == null) {
+ return;
+ }
+
+ getHandler().post(() -> {
+ for (Animatable2.AnimationCallback callback : mAnimationCallbacks) {
+ callback.onAnimationEnd(this);
+ }
+ });
+ }
+
+ private Handler getHandler() {
+ if (mHandler == null) {
+ mHandler = new Handler(Looper.getMainLooper());
+ }
+ return mHandler;
+ }
+
+
private static native long nCreate(long nativeImageDecoder,
@Nullable ImageDecoder decoder, int width, int height, Rect cropRect)
throws IOException;
private static native long nGetNativeFinalizer();
- private static native long nDraw(long nativePtr, long canvasNativePtr, long msecs);
+ private static native long nDraw(long nativePtr, long canvasNativePtr);
private static native void nSetAlpha(long nativePtr, int alpha);
private static native int nGetAlpha(long nativePtr);
private static native void nSetColorFilter(long nativePtr, long nativeFilter);
private static native boolean nIsRunning(long nativePtr);
- private static native void nStart(long nativePtr);
+ // Return whether the animation started.
+ private static native boolean nStart(long nativePtr);
private static native void nStop(long nativePtr);
+ private static native void nSetLoopCount(long nativePtr, int loopCount);
+ // Pass the drawable down to native so it can call onAnimationEnd.
+ private static native void nSetOnAnimationEndListener(long nativePtr,
+ @Nullable AnimatedImageDrawable drawable);
private static native long nNativeByteSize(long nativePtr);
}
diff --git a/graphics/java/android/graphics/drawable/BitmapDrawable.java b/graphics/java/android/graphics/drawable/BitmapDrawable.java
index 3a5f7b7..7ad062a 100644
--- a/graphics/java/android/graphics/drawable/BitmapDrawable.java
+++ b/graphics/java/android/graphics/drawable/BitmapDrawable.java
@@ -27,7 +27,6 @@
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
-import android.graphics.ImageDecoder;
import android.graphics.Insets;
import android.graphics.Matrix;
import android.graphics.Outline;
@@ -50,7 +49,6 @@
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -113,7 +111,7 @@
*/
@Deprecated
public BitmapDrawable() {
- init(new BitmapState((Bitmap) null), null);
+ mBitmapState = new BitmapState((Bitmap) null);
}
/**
@@ -126,7 +124,8 @@
@SuppressWarnings("unused")
@Deprecated
public BitmapDrawable(Resources res) {
- init(new BitmapState((Bitmap) null), res);
+ mBitmapState = new BitmapState((Bitmap) null);
+ mBitmapState.mTargetDensity = mTargetDensity;
}
/**
@@ -136,7 +135,7 @@
*/
@Deprecated
public BitmapDrawable(Bitmap bitmap) {
- init(new BitmapState(bitmap), null);
+ this(new BitmapState(bitmap), null);
}
/**
@@ -144,7 +143,8 @@
* the display metrics of the resources.
*/
public BitmapDrawable(Resources res, Bitmap bitmap) {
- init(new BitmapState(bitmap), res);
+ this(new BitmapState(bitmap), res);
+ mBitmapState.mTargetDensity = mTargetDensity;
}
/**
@@ -154,29 +154,21 @@
*/
@Deprecated
public BitmapDrawable(String filepath) {
- this(null, filepath);
+ this(new BitmapState(BitmapFactory.decodeFile(filepath)), null);
+ if (mBitmapState.mBitmap == null) {
+ android.util.Log.w("BitmapDrawable", "BitmapDrawable cannot decode " + filepath);
+ }
}
/**
* Create a drawable by opening a given file path and decoding the bitmap.
*/
- @SuppressWarnings("unused")
+ @SuppressWarnings({ "unused", "ChainingConstructorIgnoresParameter" })
public BitmapDrawable(Resources res, String filepath) {
- Bitmap bitmap = null;
- try (FileInputStream stream = new FileInputStream(filepath)) {
- bitmap = ImageDecoder.decodeBitmap(ImageDecoder.createSource(res, stream),
- (decoder, info, src) -> {
- decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE);
- });
- } catch (Exception e) {
- /* do nothing. This matches the behavior of BitmapFactory.decodeFile()
- If the exception happened on decode, mBitmapState.mBitmap will be null.
- */
- } finally {
- init(new BitmapState(bitmap), res);
- if (mBitmapState.mBitmap == null) {
- android.util.Log.w("BitmapDrawable", "BitmapDrawable cannot decode " + filepath);
- }
+ this(new BitmapState(BitmapFactory.decodeFile(filepath)), null);
+ mBitmapState.mTargetDensity = mTargetDensity;
+ if (mBitmapState.mBitmap == null) {
+ android.util.Log.w("BitmapDrawable", "BitmapDrawable cannot decode " + filepath);
}
}
@@ -187,29 +179,21 @@
*/
@Deprecated
public BitmapDrawable(java.io.InputStream is) {
- this(null, is);
+ this(new BitmapState(BitmapFactory.decodeStream(is)), null);
+ if (mBitmapState.mBitmap == null) {
+ android.util.Log.w("BitmapDrawable", "BitmapDrawable cannot decode " + is);
+ }
}
/**
* Create a drawable by decoding a bitmap from the given input stream.
*/
- @SuppressWarnings("unused")
+ @SuppressWarnings({ "unused", "ChainingConstructorIgnoresParameter" })
public BitmapDrawable(Resources res, java.io.InputStream is) {
- Bitmap bitmap = null;
- try {
- bitmap = ImageDecoder.decodeBitmap(ImageDecoder.createSource(res, is),
- (decoder, info, src) -> {
- decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE);
- });
- } catch (Exception e) {
- /* do nothing. This matches the behavior of BitmapFactory.decodeStream()
- If the exception happened on decode, mBitmapState.mBitmap will be null.
- */
- } finally {
- init(new BitmapState(bitmap), res);
- if (mBitmapState.mBitmap == null) {
- android.util.Log.w("BitmapDrawable", "BitmapDrawable cannot decode " + is);
- }
+ this(new BitmapState(BitmapFactory.decodeStream(is)), null);
+ mBitmapState.mTargetDensity = mTargetDensity;
+ if (mBitmapState.mBitmap == null) {
+ android.util.Log.w("BitmapDrawable", "BitmapDrawable cannot decode " + is);
}
}
@@ -828,19 +812,9 @@
}
}
- int density = Bitmap.DENSITY_NONE;
- if (value.density == TypedValue.DENSITY_DEFAULT) {
- density = DisplayMetrics.DENSITY_DEFAULT;
- } else if (value.density != TypedValue.DENSITY_NONE) {
- density = value.density;
- }
-
Bitmap bitmap = null;
try (InputStream is = r.openRawResource(srcResId, value)) {
- ImageDecoder.Source source = ImageDecoder.createSource(r, is, density);
- bitmap = ImageDecoder.decodeBitmap(source, (decoder, info, src) -> {
- decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE);
- });
+ bitmap = BitmapFactory.decodeResourceStream(r, value, is, null, null);
} catch (Exception e) {
// Do nothing and pick up the error below.
}
@@ -1039,21 +1013,14 @@
}
}
- private BitmapDrawable(BitmapState state, Resources res) {
- init(state, res);
- }
-
/**
- * The one helper to rule them all. This is called by all public & private
+ * The one constructor to rule them all. This is called by all public
* constructors to set the state and initialize local properties.
*/
- private void init(BitmapState state, Resources res) {
+ private BitmapDrawable(BitmapState state, Resources res) {
mBitmapState = state;
- updateLocalState(res);
- if (mBitmapState != null && res != null) {
- mBitmapState.mTargetDensity = mTargetDensity;
- }
+ updateLocalState(res);
}
/**
diff --git a/graphics/java/android/graphics/drawable/Drawable.java b/graphics/java/android/graphics/drawable/Drawable.java
index 36a4d26..f17cd76 100644
--- a/graphics/java/android/graphics/drawable/Drawable.java
+++ b/graphics/java/android/graphics/drawable/Drawable.java
@@ -37,7 +37,6 @@
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
-import android.graphics.ImageDecoder;
import android.graphics.Insets;
import android.graphics.NinePatch;
import android.graphics.Outline;
@@ -51,13 +50,11 @@
import android.os.Trace;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
-import android.util.Log;
import android.util.StateSet;
import android.util.TypedValue;
import android.util.Xml;
import android.view.View;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.WeakReference;
@@ -1178,10 +1175,6 @@
return null;
}
- if (opts == null) {
- return getBitmapDrawable(res, value, is);
- }
-
/* ugh. The decodeStream contract is that we have already allocated
the pad rect, but if the bitmap does not had a ninepatch chunk,
then the pad will be ignored. If we could change this to lazily
@@ -1214,33 +1207,6 @@
return null;
}
- private static Drawable getBitmapDrawable(Resources res, TypedValue value, InputStream is) {
- try {
- ImageDecoder.Source source = null;
- if (value != null) {
- int density = Bitmap.DENSITY_NONE;
- if (value.density == TypedValue.DENSITY_DEFAULT) {
- density = DisplayMetrics.DENSITY_DEFAULT;
- } else if (value.density != TypedValue.DENSITY_NONE) {
- density = value.density;
- }
- source = ImageDecoder.createSource(res, is, density);
- } else {
- source = ImageDecoder.createSource(res, is);
- }
-
- return ImageDecoder.decodeDrawable(source, (decoder, info, src) -> {
- decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE);
- });
- } catch (IOException e) {
- /* do nothing.
- If the exception happened on decode, the drawable will be null.
- */
- Log.e("Drawable", "Unable to decode stream: " + e);
- }
- return null;
- }
-
/**
* Create a drawable from an XML document. For more information on how to
* create resources in XML, see
@@ -1340,10 +1306,11 @@
}
Trace.traceBegin(Trace.TRACE_TAG_RESOURCES, pathName);
- try (FileInputStream stream = new FileInputStream(pathName)) {
- return getBitmapDrawable(null, null, stream);
- } catch(IOException e) {
- // Do nothing; we will just return null if the FileInputStream had an error
+ try {
+ Bitmap bm = BitmapFactory.decodeFile(pathName);
+ if (bm != null) {
+ return drawableFromBitmap(null, bm, null, null, null, pathName);
+ }
} finally {
Trace.traceEnd(Trace.TRACE_TAG_RESOURCES);
}
diff --git a/graphics/java/android/graphics/drawable/DrawableInflater.java b/graphics/java/android/graphics/drawable/DrawableInflater.java
index eea7048..0ee9071 100644
--- a/graphics/java/android/graphics/drawable/DrawableInflater.java
+++ b/graphics/java/android/graphics/drawable/DrawableInflater.java
@@ -185,6 +185,8 @@
return new BitmapDrawable();
case "nine-patch":
return new NinePatchDrawable();
+ case "animated-image":
+ return new AnimatedImageDrawable();
default:
return null;
}
diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java
index 6c3aea2..f5a6f49 100644
--- a/graphics/java/android/graphics/drawable/GradientDrawable.java
+++ b/graphics/java/android/graphics/drawable/GradientDrawable.java
@@ -42,6 +42,7 @@
import android.graphics.RectF;
import android.graphics.Shader;
import android.graphics.SweepGradient;
+import android.graphics.Xfermode;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.Log;
@@ -814,6 +815,16 @@
}
}
+ /**
+ * @param mode to draw this drawable with
+ * @hide
+ */
+ @Override
+ public void setXfermode(@Nullable Xfermode mode) {
+ super.setXfermode(mode);
+ mFillPaint.setXfermode(mode);
+ }
+
private void buildPathIfDirty() {
final GradientState st = mGradientState;
if (mPathIsDirty) {
diff --git a/graphics/java/android/graphics/drawable/RippleBackground.java b/graphics/java/android/graphics/drawable/RippleBackground.java
index 4571553..41d3698 100644
--- a/graphics/java/android/graphics/drawable/RippleBackground.java
+++ b/graphics/java/android/graphics/drawable/RippleBackground.java
@@ -63,15 +63,21 @@
}
}
- public void setState(boolean focused, boolean hovered, boolean animateChanged) {
+ public void setState(boolean focused, boolean hovered, boolean pressed) {
+ if (!mFocused) {
+ focused = focused && !pressed;
+ }
+ if (!mHovered) {
+ hovered = hovered && !pressed;
+ }
if (mHovered != hovered || mFocused != focused) {
mHovered = hovered;
mFocused = focused;
- onStateChanged(animateChanged);
+ onStateChanged();
}
}
- private void onStateChanged(boolean animateChanged) {
+ private void onStateChanged() {
float newOpacity = 0.0f;
if (mHovered) newOpacity += .25f;
if (mFocused) newOpacity += .75f;
@@ -79,14 +85,10 @@
mAnimator.cancel();
mAnimator = null;
}
- if (animateChanged) {
- mAnimator = ObjectAnimator.ofFloat(this, OPACITY, newOpacity);
- mAnimator.setDuration(OPACITY_DURATION);
- mAnimator.setInterpolator(LINEAR_INTERPOLATOR);
- mAnimator.start();
- } else {
- mOpacity = newOpacity;
- }
+ mAnimator = ObjectAnimator.ofFloat(this, OPACITY, newOpacity);
+ mAnimator.setDuration(OPACITY_DURATION);
+ mAnimator.setInterpolator(LINEAR_INTERPOLATOR);
+ mAnimator.start();
}
public void jumpToFinal() {
diff --git a/graphics/java/android/graphics/drawable/RippleDrawable.java b/graphics/java/android/graphics/drawable/RippleDrawable.java
index b883656..0da61c2 100644
--- a/graphics/java/android/graphics/drawable/RippleDrawable.java
+++ b/graphics/java/android/graphics/drawable/RippleDrawable.java
@@ -264,7 +264,7 @@
}
setRippleActive(enabled && pressed);
- setBackgroundActive(hovered, focused);
+ setBackgroundActive(hovered, focused, pressed);
return changed;
}
@@ -280,13 +280,13 @@
}
}
- private void setBackgroundActive(boolean hovered, boolean focused) {
+ private void setBackgroundActive(boolean hovered, boolean focused, boolean pressed) {
if (mBackground == null && (hovered || focused)) {
mBackground = new RippleBackground(this, mHotspotBounds, isBounded());
mBackground.setup(mState.mMaxRadius, mDensity);
}
if (mBackground != null) {
- mBackground.setState(focused, hovered, true);
+ mBackground.setState(focused, hovered, pressed);
}
}
@@ -878,7 +878,10 @@
// Grab the color for the current state and cut the alpha channel in
// half so that the ripple and background together yield full alpha.
- final int color = mState.mColor.getColorForState(getState(), Color.BLACK);
+ int color = mState.mColor.getColorForState(getState(), Color.BLACK);
+ if (Color.alpha(color) > 128) {
+ color = (color & 0x00FFFFFF) | 0x80000000;
+ }
final Paint p = mRipplePaint;
if (mMaskColorFilter != null) {
diff --git a/graphics/java/android/graphics/drawable/RippleForeground.java b/graphics/java/android/graphics/drawable/RippleForeground.java
index ecbf578..4129868 100644
--- a/graphics/java/android/graphics/drawable/RippleForeground.java
+++ b/graphics/java/android/graphics/drawable/RippleForeground.java
@@ -289,6 +289,7 @@
opacity.setInterpolator(LINEAR_INTERPOLATOR);
opacity.addListener(mAnimationListener);
opacity.setStartDelay(computeFadeOutDelay());
+ opacity.setStartValue(mOwner.getRipplePaint().getAlpha());
mPendingHwAnimators.add(opacity);
invalidateSelf();
}
diff --git a/keystore/java/android/security/KeyStore.java b/keystore/java/android/security/KeyStore.java
index e25386b..ded427e 100644
--- a/keystore/java/android/security/KeyStore.java
+++ b/keystore/java/android/security/KeyStore.java
@@ -38,6 +38,7 @@
import android.security.keystore.KeyExpiredException;
import android.security.keystore.KeyNotYetValidException;
import android.security.keystore.KeyPermanentlyInvalidatedException;
+import android.security.keystore.StrongBoxUnavailableException;
import android.security.keystore.UserNotAuthenticatedException;
import android.util.Log;
@@ -65,6 +66,7 @@
public static final int VALUE_CORRUPTED = 8;
public static final int UNDEFINED_ACTION = 9;
public static final int WRONG_PASSWORD = 10;
+ public static final int HARDWARE_TYPE_UNAVAILABLE = -68;
/**
* Per operation authentication is needed before this operation is valid.
@@ -123,7 +125,6 @@
*/
public static final int FLAG_STRONGBOX = 1 << 4;
-
// States
public enum State { UNLOCKED, LOCKED, UNINITIALIZED };
@@ -730,6 +731,58 @@
}
}
+ // Keep in sync with confirmationui/1.0/types.hal.
+ public static final int CONFIRMATIONUI_OK = 0;
+ public static final int CONFIRMATIONUI_CANCELED = 1;
+ public static final int CONFIRMATIONUI_ABORTED = 2;
+ public static final int CONFIRMATIONUI_OPERATION_PENDING = 3;
+ public static final int CONFIRMATIONUI_IGNORED = 4;
+ public static final int CONFIRMATIONUI_SYSTEM_ERROR = 5;
+ public static final int CONFIRMATIONUI_UNIMPLEMENTED = 6;
+ public static final int CONFIRMATIONUI_UNEXPECTED = 7;
+ public static final int CONFIRMATIONUI_UIERROR = 0x10000;
+ public static final int CONFIRMATIONUI_UIERROR_MISSING_GLYPH = 0x10001;
+ public static final int CONFIRMATIONUI_UIERROR_MESSAGE_TOO_LONG = 0x10002;
+ public static final int CONFIRMATIONUI_UIERROR_MALFORMED_UTF8_ENCODING = 0x10003;
+
+ /**
+ * Requests keystore call into the confirmationui HAL to display a prompt.
+ *
+ * @param listener the binder to use for callbacks.
+ * @param promptText the prompt to display.
+ * @param extraData extra data / nonce from application.
+ * @param locale the locale as a BCP 47 langauge tag.
+ * @param uiOptionsAsFlags the UI options to use, as flags.
+ * @return one of the {@code CONFIRMATIONUI_*} constants, for
+ * example {@code KeyStore.CONFIRMATIONUI_OK}.
+ */
+ public int presentConfirmationPrompt(IBinder listener, String promptText, byte[] extraData,
+ String locale, int uiOptionsAsFlags) {
+ try {
+ return mBinder.presentConfirmationPrompt(listener, promptText, extraData, locale,
+ uiOptionsAsFlags);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Cannot connect to keystore", e);
+ return CONFIRMATIONUI_SYSTEM_ERROR;
+ }
+ }
+
+ /**
+ * Requests keystore call into the confirmationui HAL to cancel displaying a prompt.
+ *
+ * @param listener the binder passed to the {@link #presentConfirmationPrompt} method.
+ * @return one of the {@code CONFIRMATIONUI_*} constants, for
+ * example {@code KeyStore.CONFIRMATIONUI_OK}.
+ */
+ public int cancelConfirmationPrompt(IBinder listener) {
+ try {
+ return mBinder.cancelConfirmationPrompt(listener);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Cannot connect to keystore", e);
+ return CONFIRMATIONUI_SYSTEM_ERROR;
+ }
+ }
+
/**
* Returns a {@link KeyStoreException} corresponding to the provided keystore/keymaster error
* code.
diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java b/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
index 379e177..f721ed3 100644
--- a/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
+++ b/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
@@ -290,6 +290,9 @@
spec.isUserAuthenticationValidWhileOnBody(),
spec.isInvalidatedByBiometricEnrollment(),
GateKeeper.INVALID_SECURE_USER_ID /* boundToSpecificSecureUserId */);
+ if (spec.isTrustedUserPresenceRequired()) {
+ args.addBoolean(KeymasterDefs.KM_TAG_TRUSTED_USER_PRESENCE_REQUIRED);
+ }
KeymasterUtils.addMinMacLengthAuthorizationIfNecessary(
args,
mKeymasterAlgorithm,
diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreKeyPairGeneratorSpi.java b/keystore/java/android/security/keystore/AndroidKeyStoreKeyPairGeneratorSpi.java
index dba3949..d1eb688 100644
--- a/keystore/java/android/security/keystore/AndroidKeyStoreKeyPairGeneratorSpi.java
+++ b/keystore/java/android/security/keystore/AndroidKeyStoreKeyPairGeneratorSpi.java
@@ -21,6 +21,7 @@
import android.security.GateKeeper;
import android.security.KeyPairGeneratorSpec;
import android.security.KeyStore;
+import android.security.KeyStoreException;
import android.security.keymaster.KeyCharacteristics;
import android.security.keymaster.KeymasterArguments;
import android.security.keymaster.KeymasterCertificateChain;
@@ -451,7 +452,7 @@
throw new IllegalStateException("Not initialized");
}
- final int flags = (mEncryptionAtRestRequired) ? KeyStore.FLAG_ENCRYPTED : 0;
+ int flags = (mEncryptionAtRestRequired) ? KeyStore.FLAG_ENCRYPTED : 0;
if (((flags & KeyStore.FLAG_ENCRYPTED) != 0)
&& (mKeyStore.state() != KeyStore.State.UNLOCKED)) {
throw new IllegalStateException(
@@ -459,6 +460,10 @@
+ ", but the user has not yet entered the credential");
}
+ if (mSpec.isStrongBoxBacked()) {
+ flags |= KeyStore.FLAG_STRONGBOX;
+ }
+
byte[] additionalEntropy =
KeyStoreCryptoOperationUtils.getRandomBytesToMixIntoKeystoreRng(
mRng, (mKeySizeBits + 7) / 8);
@@ -501,8 +506,12 @@
int errorCode = mKeyStore.generateKey(privateKeyAlias, args, additionalEntropy,
mEntryUid, flags, resultingKeyCharacteristics);
if (errorCode != KeyStore.NO_ERROR) {
- throw new ProviderException(
- "Failed to generate key pair", KeyStore.getKeyStoreException(errorCode));
+ if (errorCode == KeyStore.HARDWARE_TYPE_UNAVAILABLE) {
+ throw new StrongBoxUnavailableException("Failed to generate key pair");
+ } else {
+ throw new ProviderException(
+ "Failed to generate key pair", KeyStore.getKeyStoreException(errorCode));
+ }
}
}
diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreSecretKeyFactorySpi.java b/keystore/java/android/security/keystore/AndroidKeyStoreSecretKeyFactorySpi.java
index fdb885db..9df37f5 100644
--- a/keystore/java/android/security/keystore/AndroidKeyStoreSecretKeyFactorySpi.java
+++ b/keystore/java/android/security/keystore/AndroidKeyStoreSecretKeyFactorySpi.java
@@ -177,6 +177,9 @@
&& (keymasterSwEnforcedUserAuthenticators == 0);
boolean userAuthenticationValidWhileOnBody =
keyCharacteristics.hwEnforced.getBoolean(KeymasterDefs.KM_TAG_ALLOW_WHILE_ON_BODY);
+ boolean trustedUserPresenceRequred =
+ keyCharacteristics.hwEnforced.getBoolean(
+ KeymasterDefs.KM_TAG_TRUSTED_USER_PRESENCE_REQUIRED);
boolean invalidatedByBiometricEnrollment = false;
if (keymasterSwEnforcedUserAuthenticators == KeymasterDefs.HW_AUTH_FINGERPRINT
@@ -203,6 +206,7 @@
(int) userAuthenticationValidityDurationSeconds,
userAuthenticationRequirementEnforcedBySecureHardware,
userAuthenticationValidWhileOnBody,
+ trustedUserPresenceRequred,
invalidatedByBiometricEnrollment);
}
diff --git a/keystore/java/android/security/keystore/KeyGenParameterSpec.java b/keystore/java/android/security/keystore/KeyGenParameterSpec.java
index 1e2b873..a896c72 100644
--- a/keystore/java/android/security/keystore/KeyGenParameterSpec.java
+++ b/keystore/java/android/security/keystore/KeyGenParameterSpec.java
@@ -258,6 +258,7 @@
private final boolean mRandomizedEncryptionRequired;
private final boolean mUserAuthenticationRequired;
private final int mUserAuthenticationValidityDurationSeconds;
+ private final boolean mTrustedUserPresenceRequred;
private final byte[] mAttestationChallenge;
private final boolean mUniqueIdIncluded;
private final boolean mUserAuthenticationValidWhileOnBody;
@@ -287,6 +288,7 @@
boolean randomizedEncryptionRequired,
boolean userAuthenticationRequired,
int userAuthenticationValidityDurationSeconds,
+ boolean trustedUserPresenceRequired,
byte[] attestationChallenge,
boolean uniqueIdIncluded,
boolean userAuthenticationValidWhileOnBody,
@@ -332,6 +334,7 @@
mBlockModes = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(blockModes));
mRandomizedEncryptionRequired = randomizedEncryptionRequired;
mUserAuthenticationRequired = userAuthenticationRequired;
+ mTrustedUserPresenceRequred = trustedUserPresenceRequired;
mUserAuthenticationValidityDurationSeconds = userAuthenticationValidityDurationSeconds;
mAttestationChallenge = Utils.cloneIfNotNull(attestationChallenge);
mUniqueIdIncluded = uniqueIdIncluded;
@@ -562,6 +565,14 @@
}
/**
+ * Returns {@code true} if the key is authorized to be used only if a test of user presence has
+ * been performed between the {@code Signature.initSign()} and {@code Signature.sign()} calls.
+ */
+ public boolean isTrustedUserPresenceRequired() {
+ return mTrustedUserPresenceRequred;
+ }
+
+ /**
* Returns the attestation challenge value that will be placed in attestation certificate for
* this key pair.
*
@@ -658,6 +669,7 @@
private boolean mRandomizedEncryptionRequired = true;
private boolean mUserAuthenticationRequired;
private int mUserAuthenticationValidityDurationSeconds = -1;
+ private boolean mTrustedUserPresenceRequired = false;
private byte[] mAttestationChallenge = null;
private boolean mUniqueIdIncluded = false;
private boolean mUserAuthenticationValidWhileOnBody;
@@ -718,6 +730,7 @@
mUserAuthenticationRequired = sourceSpec.isUserAuthenticationRequired();
mUserAuthenticationValidityDurationSeconds =
sourceSpec.getUserAuthenticationValidityDurationSeconds();
+ mTrustedUserPresenceRequired = sourceSpec.isTrustedUserPresenceRequired();
mAttestationChallenge = sourceSpec.getAttestationChallenge();
mUniqueIdIncluded = sourceSpec.isUniqueIdIncluded();
mUserAuthenticationValidWhileOnBody = sourceSpec.isUserAuthenticationValidWhileOnBody();
@@ -1095,6 +1108,16 @@
}
/**
+ * Sets whether a test of user presence is required to be performed between the
+ * {@code Signature.initSign()} and {@code Signature.sign()} method calls.
+ */
+ @NonNull
+ public Builder setTrustedUserPresenceRequired(boolean required) {
+ mTrustedUserPresenceRequired = required;
+ return this;
+ }
+
+ /**
* Sets whether an attestation certificate will be generated for this key pair, and what
* challenge value will be placed in the certificate. The attestation certificate chain
* can be retrieved with with {@link java.security.KeyStore#getCertificateChain(String)}.
@@ -1221,6 +1244,7 @@
mRandomizedEncryptionRequired,
mUserAuthenticationRequired,
mUserAuthenticationValidityDurationSeconds,
+ mTrustedUserPresenceRequired,
mAttestationChallenge,
mUniqueIdIncluded,
mUserAuthenticationValidWhileOnBody,
diff --git a/keystore/java/android/security/keystore/KeyInfo.java b/keystore/java/android/security/keystore/KeyInfo.java
index f553319..864f62a 100644
--- a/keystore/java/android/security/keystore/KeyInfo.java
+++ b/keystore/java/android/security/keystore/KeyInfo.java
@@ -80,6 +80,7 @@
private final int mUserAuthenticationValidityDurationSeconds;
private final boolean mUserAuthenticationRequirementEnforcedBySecureHardware;
private final boolean mUserAuthenticationValidWhileOnBody;
+ private final boolean mTrustedUserPresenceRequired;
private final boolean mInvalidatedByBiometricEnrollment;
/**
@@ -101,6 +102,7 @@
int userAuthenticationValidityDurationSeconds,
boolean userAuthenticationRequirementEnforcedBySecureHardware,
boolean userAuthenticationValidWhileOnBody,
+ boolean trustedUserPresenceRequired,
boolean invalidatedByBiometricEnrollment) {
mKeystoreAlias = keystoreKeyAlias;
mInsideSecureHardware = insideSecureHardware;
@@ -121,6 +123,7 @@
mUserAuthenticationRequirementEnforcedBySecureHardware =
userAuthenticationRequirementEnforcedBySecureHardware;
mUserAuthenticationValidWhileOnBody = userAuthenticationValidWhileOnBody;
+ mTrustedUserPresenceRequired = trustedUserPresenceRequired;
mInvalidatedByBiometricEnrollment = invalidatedByBiometricEnrollment;
}
@@ -301,4 +304,12 @@
public boolean isInvalidatedByBiometricEnrollment() {
return mInvalidatedByBiometricEnrollment;
}
+
+ /**
+ * Returns {@code true} if the key can only be only be used if a test for user presence has
+ * succeeded since Signature.initSign() has been called.
+ */
+ public boolean isTrustedUserPresenceRequired() {
+ return mTrustedUserPresenceRequired;
+ }
}
diff --git a/keystore/java/android/security/keystore/ParcelableKeyGenParameterSpec.java b/keystore/java/android/security/keystore/ParcelableKeyGenParameterSpec.java
index 7cb8e37..e5fdea7 100644
--- a/keystore/java/android/security/keystore/ParcelableKeyGenParameterSpec.java
+++ b/keystore/java/android/security/keystore/ParcelableKeyGenParameterSpec.java
@@ -101,6 +101,7 @@
out.writeBoolean(mSpec.isUniqueIdIncluded());
out.writeBoolean(mSpec.isUserAuthenticationValidWhileOnBody());
out.writeBoolean(mSpec.isInvalidatedByBiometricEnrollment());
+ out.writeBoolean(mSpec.isTrustedUserPresenceRequired());
}
private static Date readDateOrNull(Parcel in) {
@@ -164,6 +165,7 @@
builder.setUniqueIdIncluded(in.readBoolean());
builder.setUserAuthenticationValidWhileOnBody(in.readBoolean());
builder.setInvalidatedByBiometricEnrollment(in.readBoolean());
+ builder.setTrustedUserPresenceRequired(in.readBoolean());
mSpec = builder.build();
}
diff --git a/keystore/java/android/security/keystore/StrongBoxUnavailableException.java b/keystore/java/android/security/keystore/StrongBoxUnavailableException.java
index ad41a58..66a77ed 100644
--- a/keystore/java/android/security/keystore/StrongBoxUnavailableException.java
+++ b/keystore/java/android/security/keystore/StrongBoxUnavailableException.java
@@ -16,6 +16,9 @@
package android.security.keystore;
+import android.security.KeyStore;
+import android.security.KeyStoreException;
+
import java.security.ProviderException;
/**
@@ -24,5 +27,13 @@
*/
public class StrongBoxUnavailableException extends ProviderException {
+ /**
+ * @hide
+ */
+ public StrongBoxUnavailableException(String message) {
+ super(message,
+ new KeyStoreException(KeyStore.HARDWARE_TYPE_UNAVAILABLE, "No StrongBox available")
+ );
+ }
}
diff --git a/keystore/java/android/security/keystore/UserPresenceUnavailableException.java b/keystore/java/android/security/keystore/UserPresenceUnavailableException.java
new file mode 100644
index 0000000..cf4099e
--- /dev/null
+++ b/keystore/java/android/security/keystore/UserPresenceUnavailableException.java
@@ -0,0 +1,48 @@
+/*
+ * 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.security.keystore;
+
+import java.security.InvalidAlgorithmParameterException;
+
+/**
+ * Indicates the condition that a proof of user-presence was
+ * requested but this proof was not presented.
+ */
+public class UserPresenceUnavailableException extends InvalidAlgorithmParameterException {
+ /**
+ * Constructs a {@code UserPresenceUnavailableException} without a detail message or cause.
+ */
+ public UserPresenceUnavailableException() {
+ super("No Strong Box available.");
+ }
+
+ /**
+ * Constructs a {@code UserPresenceUnavailableException} using the provided detail message
+ * but no cause.
+ */
+ public UserPresenceUnavailableException(String message) {
+ super(message);
+ }
+
+ /**
+ * Constructs a {@code UserPresenceUnavailableException} using the provided detail message
+ * and cause.
+ */
+ public UserPresenceUnavailableException(String message, Throwable cause) {
+ super(message, cause);
+ }
+}
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index 0485625..a5698af 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -73,6 +73,7 @@
const char* AssetManager::RESOURCES_FILENAME = "resources.arsc";
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::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 ecc5dc1..08da731 100644
--- a/libs/androidfw/include/androidfw/AssetManager.h
+++ b/libs/androidfw/include/androidfw/AssetManager.h
@@ -60,6 +60,7 @@
static const char* RESOURCES_FILENAME;
static const char* IDMAP_BIN;
static const char* OVERLAY_DIR;
+ static const char* PRODUCT_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/Android.bp b/libs/hwui/Android.bp
index 7cacaf6..17f9b7c 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -137,6 +137,7 @@
whole_static_libs: ["libskia"],
srcs: [
+ "hwui/AnimatedImageDrawable.cpp",
"hwui/Bitmap.cpp",
"font/CacheTexture.cpp",
"font/Font.cpp",
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp
index 4243e7e..6cd283a 100644
--- a/libs/hwui/Properties.cpp
+++ b/libs/hwui/Properties.cpp
@@ -61,6 +61,8 @@
bool Properties::skpCaptureEnabled = false;
bool Properties::enableRTAnimations = true;
+bool Properties::runningInEmulator = false;
+
static int property_get_int(const char* key, int defaultValue) {
char buf[PROPERTY_VALUE_MAX] = {
'\0',
@@ -135,6 +137,8 @@
skpCaptureEnabled = property_get_bool("ro.debuggable", false) &&
property_get_bool(PROPERTY_CAPTURE_SKP_ENABLED, false);
+ runningInEmulator = property_get_bool(PROPERTY_QEMU_KERNEL, false);
+
return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw) ||
(prevDebugStencilClip != debugStencilClip);
}
diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h
index af4b694..179b97b 100644
--- a/libs/hwui/Properties.h
+++ b/libs/hwui/Properties.h
@@ -180,6 +180,11 @@
*/
#define PROPERTY_CAPTURE_SKP_FILENAME "debug.hwui.skp_filename"
+/**
+ * Property for whether this is running in the emulator.
+ */
+#define PROPERTY_QEMU_KERNEL "ro.kernel.qemu"
+
///////////////////////////////////////////////////////////////////////////////
// Misc
///////////////////////////////////////////////////////////////////////////////
@@ -261,6 +266,8 @@
// Used for testing only to change the render pipeline.
static void overrideRenderPipelineType(RenderPipelineType);
+ static bool runningInEmulator;
+
private:
static ProfileType sProfileType;
static bool sDisableProfileBars;
diff --git a/libs/hwui/RecordingCanvas.cpp b/libs/hwui/RecordingCanvas.cpp
index fb7b246..e1df1e7 100644
--- a/libs/hwui/RecordingCanvas.cpp
+++ b/libs/hwui/RecordingCanvas.cpp
@@ -495,9 +495,9 @@
refPaint(paint), refBitmap(bitmap), refPatch(&patch)));
}
-void RecordingCanvas::drawAnimatedImage(SkAnimatedImage*, float left, float top,
- const SkPaint*) {
+double RecordingCanvas::drawAnimatedImage(AnimatedImageDrawable*) {
// Unimplemented
+ return 0;
}
// Text
diff --git a/libs/hwui/RecordingCanvas.h b/libs/hwui/RecordingCanvas.h
index dd06ada..e663402 100644
--- a/libs/hwui/RecordingCanvas.h
+++ b/libs/hwui/RecordingCanvas.h
@@ -183,8 +183,7 @@
virtual void drawNinePatch(Bitmap& bitmap, const android::Res_png_9patch& chunk, float dstLeft,
float dstTop, float dstRight, float dstBottom,
const SkPaint* paint) override;
- virtual void drawAnimatedImage(SkAnimatedImage*, float left, float top,
- const SkPaint* paint) override;
+ virtual double drawAnimatedImage(AnimatedImageDrawable*) override;
// Text
virtual bool drawTextAbsolutePos() const override { return false; }
diff --git a/libs/hwui/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp
index dc274cf..b2edd33 100644
--- a/libs/hwui/SkiaCanvas.cpp
+++ b/libs/hwui/SkiaCanvas.cpp
@@ -725,18 +725,8 @@
mCanvas->drawImageLattice(image.get(), lattice, dst, addFilter(paint, &tmpPaint, colorFilter));
}
-void SkiaCanvas::drawAnimatedImage(SkAnimatedImage* image, float left, float top,
- const SkPaint* paint) {
- sk_sp<SkPicture> pic(image->newPictureSnapshot());
- SkMatrix matrixStorage;
- SkMatrix* matrix;
- if (left == 0.0f && top == 0.0f) {
- matrix = nullptr;
- } else {
- matrixStorage = SkMatrix::MakeTrans(left, top);
- matrix = &matrixStorage;
- }
- mCanvas->drawPicture(pic.get(), matrix, paint);
+double SkiaCanvas::drawAnimatedImage(AnimatedImageDrawable* imgDrawable) {
+ return imgDrawable->drawStaging(mCanvas);
}
void SkiaCanvas::drawVectorDrawable(VectorDrawableRoot* vectorDrawable) {
diff --git a/libs/hwui/SkiaCanvas.h b/libs/hwui/SkiaCanvas.h
index 7137210..3efc22a 100644
--- a/libs/hwui/SkiaCanvas.h
+++ b/libs/hwui/SkiaCanvas.h
@@ -124,8 +124,7 @@
virtual void drawNinePatch(Bitmap& bitmap, const android::Res_png_9patch& chunk, float dstLeft,
float dstTop, float dstRight, float dstBottom,
const SkPaint* paint) override;
- virtual void drawAnimatedImage(SkAnimatedImage*, float left, float top,
- const SkPaint* paint) override;
+ virtual double drawAnimatedImage(AnimatedImageDrawable* imgDrawable) override;
virtual bool drawTextAbsolutePos() const override { return true; }
virtual void drawVectorDrawable(VectorDrawableRoot* vectorDrawable) override;
diff --git a/libs/hwui/hwui/AnimatedImageDrawable.cpp b/libs/hwui/hwui/AnimatedImageDrawable.cpp
new file mode 100644
index 0000000..e01bf3d
--- /dev/null
+++ b/libs/hwui/hwui/AnimatedImageDrawable.cpp
@@ -0,0 +1,161 @@
+/*
+ * 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 "AnimatedImageDrawable.h"
+
+#include "thread/Task.h"
+#include "thread/TaskManager.h"
+#include "thread/TaskProcessor.h"
+#include "utils/TraceUtils.h"
+
+#include <SkPicture.h>
+#include <SkRefCnt.h>
+#include <SkTime.h>
+#include <SkTLazy.h>
+
+namespace android {
+
+AnimatedImageDrawable::AnimatedImageDrawable(sk_sp<SkAnimatedImage> animatedImage)
+ : mSkAnimatedImage(std::move(animatedImage)) { }
+
+void AnimatedImageDrawable::syncProperties() {
+ mAlpha = mStagingAlpha;
+ mColorFilter = mStagingColorFilter;
+}
+
+bool AnimatedImageDrawable::start() {
+ SkAutoExclusive lock(mLock);
+ if (mSkAnimatedImage->isRunning()) {
+ return false;
+ }
+
+ if (!mSnapshot) {
+ mSnapshot.reset(mSkAnimatedImage->newPictureSnapshot());
+ }
+
+ // While stopped, update() does not decode, but it does advance the time.
+ // This prevents us from skipping ahead when we resume.
+ const double currentTime = SkTime::GetMSecs();
+ mSkAnimatedImage->update(currentTime);
+ mSkAnimatedImage->start();
+ return mSkAnimatedImage->isRunning();
+}
+
+void AnimatedImageDrawable::stop() {
+ SkAutoExclusive lock(mLock);
+ mSkAnimatedImage->stop();
+}
+
+bool AnimatedImageDrawable::isRunning() {
+ return mSkAnimatedImage->isRunning();
+}
+
+// This is really a Task<void> but that doesn't really work when Future<>
+// expects to be able to get/set a value
+class AnimatedImageDrawable::AnimatedImageTask : public uirenderer::Task<bool> {
+public:
+ AnimatedImageTask(AnimatedImageDrawable* animatedImageDrawable)
+ : mAnimatedImageDrawable(sk_ref_sp(animatedImageDrawable)) {}
+
+ sk_sp<AnimatedImageDrawable> mAnimatedImageDrawable;
+ bool mIsCompleted = false;
+};
+
+class AnimatedImageDrawable::AnimatedImageTaskProcessor : public uirenderer::TaskProcessor<bool> {
+public:
+ explicit AnimatedImageTaskProcessor(uirenderer::TaskManager* taskManager)
+ : uirenderer::TaskProcessor<bool>(taskManager) {}
+ ~AnimatedImageTaskProcessor() {}
+
+ virtual void onProcess(const sp<uirenderer::Task<bool>>& task) override {
+ ATRACE_NAME("Updating AnimatedImageDrawables");
+ AnimatedImageTask* t = static_cast<AnimatedImageTask*>(task.get());
+ t->mAnimatedImageDrawable->update();
+ t->mIsCompleted = true;
+ task->setResult(true);
+ };
+};
+
+void AnimatedImageDrawable::scheduleUpdate(uirenderer::TaskManager* taskManager) {
+ if (!mSkAnimatedImage->isRunning()
+ || (mDecodeTask.get() != nullptr && !mDecodeTask->mIsCompleted)) {
+ return;
+ }
+
+ if (!mDecodeTaskProcessor.get()) {
+ mDecodeTaskProcessor = new AnimatedImageTaskProcessor(taskManager);
+ }
+
+ // TODO get one frame ahead and only schedule updates when you need to replenish
+ mDecodeTask = new AnimatedImageTask(this);
+ mDecodeTaskProcessor->add(mDecodeTask);
+}
+
+void AnimatedImageDrawable::update() {
+ SkAutoExclusive lock(mLock);
+
+ if (!mSkAnimatedImage->isRunning()) {
+ return;
+ }
+
+ const double currentTime = SkTime::GetMSecs();
+ if (currentTime >= mNextFrameTime) {
+ mNextFrameTime = mSkAnimatedImage->update(currentTime);
+ mSnapshot.reset(mSkAnimatedImage->newPictureSnapshot());
+ mIsDirty = true;
+ }
+}
+
+void AnimatedImageDrawable::onDraw(SkCanvas* canvas) {
+ SkTLazy<SkPaint> lazyPaint;
+ if (mAlpha != SK_AlphaOPAQUE || mColorFilter.get()) {
+ lazyPaint.init();
+ lazyPaint.get()->setAlpha(mAlpha);
+ lazyPaint.get()->setColorFilter(mColorFilter);
+ lazyPaint.get()->setFilterQuality(kLow_SkFilterQuality);
+ }
+
+ SkAutoExclusive lock(mLock);
+ if (mSnapshot) {
+ canvas->drawPicture(mSnapshot, nullptr, lazyPaint.getMaybeNull());
+ } else {
+ // TODO: we could potentially keep the cached surface around if there is a paint and we know
+ // the drawable is attached to the view system
+ SkAutoCanvasRestore acr(canvas, false);
+ if (lazyPaint.isValid()) {
+ canvas->saveLayer(mSkAnimatedImage->getBounds(), lazyPaint.get());
+ }
+ mSkAnimatedImage->draw(canvas);
+ }
+
+ mIsDirty = false;
+}
+
+double AnimatedImageDrawable::drawStaging(SkCanvas* canvas) {
+ // update the drawable with the current time
+ double nextUpdate = mSkAnimatedImage->update(SkTime::GetMSecs());
+ SkAutoCanvasRestore acr(canvas, false);
+ if (mStagingAlpha != SK_AlphaOPAQUE || mStagingColorFilter.get()) {
+ SkPaint paint;
+ paint.setAlpha(mStagingAlpha);
+ paint.setColorFilter(mStagingColorFilter);
+ canvas->saveLayer(mSkAnimatedImage->getBounds(), &paint);
+ }
+ canvas->drawDrawable(mSkAnimatedImage.get());
+ return nextUpdate;
+}
+
+}; // namespace android
diff --git a/libs/hwui/hwui/AnimatedImageDrawable.h b/libs/hwui/hwui/AnimatedImageDrawable.h
new file mode 100644
index 0000000..df8a5e4
--- /dev/null
+++ b/libs/hwui/hwui/AnimatedImageDrawable.h
@@ -0,0 +1,108 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#include <cutils/compiler.h>
+#include <utils/RefBase.h>
+
+#include <SkAnimatedImage.h>
+#include <SkCanvas.h>
+#include <SkColorFilter.h>
+#include <SkDrawable.h>
+#include <SkMutex.h>
+
+class SkPicture;
+
+namespace android {
+
+namespace uirenderer {
+class TaskManager;
+}
+
+class OnAnimationEndListener {
+public:
+ virtual ~OnAnimationEndListener() {}
+
+ virtual void onAnimationEnd() = 0;
+};
+
+/**
+ * Native component of android.graphics.drawable.AnimatedImageDrawables.java. This class can be
+ * drawn into Canvas.h and maintains the state needed to drive the animation from the RenderThread.
+ */
+class ANDROID_API AnimatedImageDrawable : public SkDrawable {
+public:
+ AnimatedImageDrawable(sk_sp<SkAnimatedImage> animatedImage);
+
+ /**
+ * This returns true if the animation has updated and signals that the next draw will contain
+ * new content.
+ */
+ bool isDirty() const { return mIsDirty; }
+
+ int getStagingAlpha() const { return mStagingAlpha; }
+ void setStagingAlpha(int alpha) { mStagingAlpha = alpha; }
+ void setStagingColorFilter(sk_sp<SkColorFilter> filter) { mStagingColorFilter = filter; }
+ void syncProperties();
+
+ virtual SkRect onGetBounds() override {
+ return mSkAnimatedImage->getBounds();
+ }
+
+ double drawStaging(SkCanvas* canvas);
+
+ // Returns true if the animation was started; false otherwise (e.g. it was already running)
+ bool start();
+ void stop();
+ bool isRunning();
+ void setRepetitionCount(int count) {
+ mSkAnimatedImage->setRepetitionCount(count);
+ }
+
+ void setOnAnimationEndListener(std::unique_ptr<OnAnimationEndListener> listener) {
+ mEndListener = std::move(listener);
+ }
+
+ void scheduleUpdate(uirenderer::TaskManager* taskManager);
+
+protected:
+ virtual void onDraw(SkCanvas* canvas) override;
+
+private:
+ void update();
+
+ sk_sp<SkAnimatedImage> mSkAnimatedImage;
+ sk_sp<SkPicture> mSnapshot;
+ SkMutex mLock;
+
+ int mStagingAlpha = SK_AlphaOPAQUE;
+ sk_sp<SkColorFilter> mStagingColorFilter;
+
+ int mAlpha = SK_AlphaOPAQUE;
+ sk_sp<SkColorFilter> mColorFilter;
+ double mNextFrameTime = 0.0;
+ bool mIsDirty = false;
+
+ class AnimatedImageTask;
+ class AnimatedImageTaskProcessor;
+ sp<AnimatedImageTask> mDecodeTask;
+ sp<AnimatedImageTaskProcessor> mDecodeTaskProcessor;
+
+ std::unique_ptr<OnAnimationEndListener> mEndListener;
+};
+
+}; // namespace android
diff --git a/libs/hwui/hwui/Canvas.cpp b/libs/hwui/hwui/Canvas.cpp
index 75e414e..284fd83 100644
--- a/libs/hwui/hwui/Canvas.cpp
+++ b/libs/hwui/hwui/Canvas.cpp
@@ -158,12 +158,13 @@
void Canvas::drawText(const uint16_t* text, int start, int count, int contextCount, float x,
float y, minikin::Bidi bidiFlags, const Paint& origPaint,
- const Typeface* typeface) {
+ const Typeface* typeface, minikin::MeasuredText* mt, int mtOffset) {
// minikin may modify the original paint
Paint paint(origPaint);
minikin::Layout layout =
- MinikinUtils::doLayout(&paint, bidiFlags, typeface, text, start, count, contextCount);
+ MinikinUtils::doLayout(&paint, bidiFlags, typeface, text, start, count, contextCount,
+ mt, mtOffset);
x += MinikinUtils::xOffsetForTextAlign(&paint, layout);
@@ -211,7 +212,8 @@
const Typeface* typeface) {
Paint paintCopy(paint);
minikin::Layout layout =
- MinikinUtils::doLayout(&paintCopy, bidiFlags, typeface, text, 0, count, count);
+ MinikinUtils::doLayout(&paintCopy, bidiFlags, typeface, text, 0, count, count, nullptr,
+ 0);
hOffset += MinikinUtils::hOffsetForTextAlign(&paintCopy, layout, path);
// Set align to left for drawing, as we don't want individual
diff --git a/libs/hwui/hwui/Canvas.h b/libs/hwui/hwui/Canvas.h
index 5efd357..3ddf1c4 100644
--- a/libs/hwui/hwui/Canvas.h
+++ b/libs/hwui/hwui/Canvas.h
@@ -34,6 +34,7 @@
namespace minikin {
class Layout;
+class MeasuredText;
enum class Bidi : uint8_t;
}
@@ -73,6 +74,7 @@
typedef std::function<void(uint16_t* text, float* positions)> ReadGlyphFunc;
+class AnimatedImageDrawable;
class Bitmap;
class Paint;
struct Typeface;
@@ -238,8 +240,7 @@
float dstTop, float dstRight, float dstBottom,
const SkPaint* paint) = 0;
- virtual void drawAnimatedImage(SkAnimatedImage*, float left, float top,
- const SkPaint* paint) = 0;
+ virtual double drawAnimatedImage(AnimatedImageDrawable* imgDrawable) = 0;
/**
* Specifies if the positions passed to ::drawText are absolute or relative
@@ -260,7 +261,8 @@
* and delegating the final draw to virtual drawGlyphs method.
*/
void drawText(const uint16_t* text, int start, int count, int contextCount, float x, float y,
- minikin::Bidi bidiFlags, const Paint& origPaint, const Typeface* typeface);
+ minikin::Bidi bidiFlags, const Paint& origPaint, const Typeface* typeface,
+ minikin::MeasuredText* mt, int mtOffset);
void drawTextOnPath(const uint16_t* text, int count, minikin::Bidi bidiFlags,
const SkPath& path, float hOffset, float vOffset, const Paint& paint,
diff --git a/libs/hwui/hwui/MinikinUtils.cpp b/libs/hwui/hwui/MinikinUtils.cpp
index bad766c..ba877d3 100644
--- a/libs/hwui/hwui/MinikinUtils.cpp
+++ b/libs/hwui/hwui/MinikinUtils.cpp
@@ -20,6 +20,7 @@
#include <log/log.h>
+#include <minikin/MeasuredText.h>
#include "Paint.h"
#include "SkPathMeasure.h"
#include "Typeface.h"
@@ -49,11 +50,24 @@
minikin::Layout MinikinUtils::doLayout(const Paint* paint, minikin::Bidi bidiFlags,
const Typeface* typeface, const uint16_t* buf, size_t start,
- size_t count, size_t bufSize) {
+ size_t count, size_t bufSize, minikin::MeasuredText* mt,
+ int mtOffset) {
minikin::MinikinPaint minikinPaint = prepareMinikinPaint(paint, typeface);
+ const auto& fc = Typeface::resolveDefault(typeface)->fFontCollection;
minikin::Layout layout;
- layout.doLayout(buf, start, count, bufSize, bidiFlags, minikinPaint,
- Typeface::resolveDefault(typeface)->fFontCollection);
+
+ if (mt == nullptr) {
+ layout.doLayout(buf, start, count, bufSize, bidiFlags, minikinPaint, fc);
+ return layout;
+ }
+
+ if (mt->buildLayout(minikin::U16StringPiece(buf, bufSize),
+ minikin::Range(start, start + count),
+ minikinPaint, fc, bidiFlags, mtOffset, &layout)) {
+ return layout;
+ }
+
+ layout.doLayout(buf, start, count, bufSize, bidiFlags, minikinPaint, fc);
return layout;
}
@@ -64,7 +78,7 @@
const Typeface* resolvedTypeface = Typeface::resolveDefault(typeface);
return minikin::Layout::measureText(buf, start, count, bufSize, bidiFlags, minikinPaint,
resolvedTypeface->fFontCollection, advances,
- nullptr /* extent */, nullptr /* overhangs */);
+ nullptr /* extent */);
}
bool MinikinUtils::hasVariationSelector(const Typeface* typeface, uint32_t codepoint, uint32_t vs) {
diff --git a/libs/hwui/hwui/MinikinUtils.h b/libs/hwui/hwui/MinikinUtils.h
index 7036cbe..124fe4f 100644
--- a/libs/hwui/hwui/MinikinUtils.h
+++ b/libs/hwui/hwui/MinikinUtils.h
@@ -29,6 +29,11 @@
#include "MinikinSkia.h"
#include "Paint.h"
#include "Typeface.h"
+#include <log/log.h>
+
+namespace minikin {
+class MeasuredText;
+} // namespace minikin
namespace android {
@@ -39,7 +44,8 @@
ANDROID_API static minikin::Layout doLayout(const Paint* paint, minikin::Bidi bidiFlags,
const Typeface* typeface, const uint16_t* buf,
- size_t start, size_t count, size_t bufSize);
+ size_t start, size_t count, size_t bufSize,
+ minikin::MeasuredText* mt, int mtOffset);
ANDROID_API static float measureText(const Paint* paint, minikin::Bidi bidiFlags,
const Typeface* typeface, const uint16_t* buf,
diff --git a/libs/hwui/pipeline/skia/ShaderCache.cpp b/libs/hwui/pipeline/skia/ShaderCache.cpp
index c7a3014..2fa56f6 100644
--- a/libs/hwui/pipeline/skia/ShaderCache.cpp
+++ b/libs/hwui/pipeline/skia/ShaderCache.cpp
@@ -19,6 +19,7 @@
#include <log/log.h>
#include <thread>
#include "FileBlobCache.h"
+#include "Properties.h"
#include "utils/TraceUtils.h"
namespace android {
@@ -43,7 +44,11 @@
void ShaderCache::initShaderDiskCache() {
ATRACE_NAME("initShaderDiskCache");
std::lock_guard<std::mutex> lock(mMutex);
- if (mFilename.length() > 0) {
+
+ // Emulators can switch between different renders either as part of config
+ // or snapshot migration. Also, program binaries may not work well on some
+ // desktop / laptop GPUs. Thus, disable the shader disk cache for emulator builds.
+ if (!Properties::runningInEmulator && mFilename.length() > 0) {
mBlobCache.reset(new FileBlobCache(maxKeySize, maxValueSize, maxTotalSize, mFilename));
mInitialized = true;
}
diff --git a/libs/hwui/pipeline/skia/SkiaDisplayList.cpp b/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
index cb10901..cf0b6a4 100644
--- a/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
+++ b/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
@@ -31,6 +31,9 @@
for (auto& functor : mChildFunctors) {
functor.syncFunctor();
}
+ for (auto& animatedImage : mAnimatedImages) {
+ animatedImage->syncProperties();
+ }
for (auto& vectorDrawable : mVectorDrawables) {
vectorDrawable->syncProperties();
}
@@ -89,6 +92,18 @@
}
bool isDirty = false;
+ for (auto& animatedImage : mAnimatedImages) {
+ // If any animated image in the display list needs updated, then damage the node.
+ if (animatedImage->isDirty()) {
+ isDirty = true;
+ }
+ if (animatedImage->isRunning()) {
+ static_cast<SkiaPipeline*>(info.canvasContext.getRenderPipeline())
+ ->scheduleDeferredUpdate(animatedImage);
+ info.out.hasAnimations = true;
+ }
+ }
+
for (auto& vectorDrawable : mVectorDrawables) {
// If any vector drawable in the display list needs update, damage the node.
if (vectorDrawable->isDirty()) {
@@ -109,6 +124,7 @@
mMutableImages.clear();
mVectorDrawables.clear();
+ mAnimatedImages.clear();
mChildFunctors.clear();
mChildNodes.clear();
diff --git a/libs/hwui/pipeline/skia/SkiaDisplayList.h b/libs/hwui/pipeline/skia/SkiaDisplayList.h
index 6883d33..818ec11 100644
--- a/libs/hwui/pipeline/skia/SkiaDisplayList.h
+++ b/libs/hwui/pipeline/skia/SkiaDisplayList.h
@@ -17,6 +17,7 @@
#pragma once
#include "DisplayList.h"
+#include "hwui/AnimatedImageDrawable.h"
#include "GLFunctorDrawable.h"
#include "RenderNodeDrawable.h"
@@ -144,6 +145,7 @@
std::deque<GLFunctorDrawable> mChildFunctors;
std::vector<SkImage*> mMutableImages;
std::vector<VectorDrawableRoot*> mVectorDrawables;
+ std::vector<AnimatedImageDrawable*> mAnimatedImages;
SkLiteDL mDisplayList;
// mProjectionReceiver points to a child node (stored in mChildNodes) that is as a projection
diff --git a/libs/hwui/pipeline/skia/SkiaPipeline.cpp b/libs/hwui/pipeline/skia/SkiaPipeline.cpp
index 9db39d9..534782a 100644
--- a/libs/hwui/pipeline/skia/SkiaPipeline.cpp
+++ b/libs/hwui/pipeline/skia/SkiaPipeline.cpp
@@ -40,6 +40,7 @@
Vector3 SkiaPipeline::mLightCenter = {FLT_MIN, FLT_MIN, FLT_MIN};
SkiaPipeline::SkiaPipeline(RenderThread& thread) : mRenderThread(thread) {
+ mAnimatedImageDrawables.reserve(30);
mVectorDrawables.reserve(30);
}
@@ -326,6 +327,15 @@
ATRACE_NAME("flush commands");
surface->getCanvas()->flush();
+
+ // TODO move to another method
+ if (!mAnimatedImageDrawables.empty()) {
+ ATRACE_NAME("Update AnimatedImageDrawables");
+ for (auto animatedImage : mAnimatedImageDrawables) {
+ animatedImage->scheduleUpdate(getTaskManager());
+ }
+ mAnimatedImageDrawables.clear();
+ }
}
namespace {
diff --git a/libs/hwui/pipeline/skia/SkiaPipeline.h b/libs/hwui/pipeline/skia/SkiaPipeline.h
index 2709227..cc75e9c 100644
--- a/libs/hwui/pipeline/skia/SkiaPipeline.h
+++ b/libs/hwui/pipeline/skia/SkiaPipeline.h
@@ -18,6 +18,7 @@
#include <SkSurface.h>
#include "FrameBuilder.h"
+#include "hwui/AnimatedImageDrawable.h"
#include "renderthread/CanvasContext.h"
#include "renderthread/IRenderPipeline.h"
@@ -54,6 +55,12 @@
std::vector<VectorDrawableRoot*>* getVectorDrawables() { return &mVectorDrawables; }
+ void scheduleDeferredUpdate(AnimatedImageDrawable* imageDrawable) {
+ mAnimatedImageDrawables.push_back(imageDrawable);
+ }
+
+ std::vector<AnimatedImageDrawable*>* getAnimatingImages() { return &mAnimatedImageDrawables; }
+
static void destroyLayer(RenderNode* node);
static void prepareToDraw(const renderthread::RenderThread& thread, Bitmap* bitmap);
@@ -137,6 +144,11 @@
*/
std::vector<VectorDrawableRoot*> mVectorDrawables;
+ /**
+ * populated by prepareTree with images with active animations
+ */
+ std::vector<AnimatedImageDrawable*> mAnimatedImageDrawables;
+
// Block of properties used only for debugging to record a SkPicture and save it in a file.
/**
* mCapturedFile is used to enforce we don't capture more than once for a given name (cause
diff --git a/libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp b/libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp
index 035cea3..eabe2e8 100644
--- a/libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp
+++ b/libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp
@@ -246,6 +246,12 @@
}
}
+double SkiaRecordingCanvas::drawAnimatedImage(AnimatedImageDrawable* animatedImage) {
+ drawDrawable(animatedImage);
+ mDisplayList->mAnimatedImages.push_back(animatedImage);
+ return 0;
+}
+
}; // namespace skiapipeline
}; // namespace uirenderer
}; // namespace android
diff --git a/libs/hwui/pipeline/skia/SkiaRecordingCanvas.h b/libs/hwui/pipeline/skia/SkiaRecordingCanvas.h
index d35bbab..0e5dbdb 100644
--- a/libs/hwui/pipeline/skia/SkiaRecordingCanvas.h
+++ b/libs/hwui/pipeline/skia/SkiaRecordingCanvas.h
@@ -53,6 +53,7 @@
virtual void drawNinePatch(Bitmap& hwuiBitmap, const android::Res_png_9patch& chunk,
float dstLeft, float dstTop, float dstRight, float dstBottom,
const SkPaint* paint) override;
+ virtual double drawAnimatedImage(AnimatedImageDrawable* animatedImage) override;
virtual void drawRoundRect(uirenderer::CanvasPropertyPrimitive* left,
uirenderer::CanvasPropertyPrimitive* top,
diff --git a/libs/hwui/tests/common/TestUtils.cpp b/libs/hwui/tests/common/TestUtils.cpp
index 4a0d6ee..51cf772 100644
--- a/libs/hwui/tests/common/TestUtils.cpp
+++ b/libs/hwui/tests/common/TestUtils.cpp
@@ -125,7 +125,7 @@
SkPaint glyphPaint(paint);
glyphPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
canvas->drawText(utf16.get(), 0, strlen(text), strlen(text), x, y, minikin::Bidi::LTR,
- glyphPaint, nullptr);
+ glyphPaint, nullptr, nullptr /* measured text */, 0 /* measured text offset */);
}
void TestUtils::drawUtf8ToCanvas(Canvas* canvas, const char* text, const SkPaint& paint,
diff --git a/libs/services/Android.bp b/libs/services/Android.bp
index e5e865f..3d57fbd 100644
--- a/libs/services/Android.bp
+++ b/libs/services/Android.bp
@@ -19,6 +19,7 @@
srcs: [
":IDropBoxManagerService.aidl",
"src/os/DropBoxManager.cpp",
+ "src/os/StatsDimensionsValue.cpp",
"src/os/StatsLogEventWrapper.cpp",
],
diff --git a/libs/services/include/android/os/DropBoxManager.h b/libs/services/include/android/os/DropBoxManager.h
index 2ed203d..75b26c6 100644
--- a/libs/services/include/android/os/DropBoxManager.h
+++ b/libs/services/include/android/os/DropBoxManager.h
@@ -58,6 +58,10 @@
// are required from the system process. Returns NULL if the file can't be opened.
Status addFile(const String16& tag, const string& filename, int flags);
+ // Create a new Entry from an already opened file. Takes ownership of the
+ // file descriptor.
+ Status addFile(const String16& tag, int fd, int flags);
+
class Entry : public virtual RefBase, public Parcelable {
public:
Entry();
diff --git a/libs/services/include/android/os/StatsDimensionsValue.h b/libs/services/include/android/os/StatsDimensionsValue.h
new file mode 100644
index 0000000..cc0b056
--- /dev/null
+++ b/libs/services/include/android/os/StatsDimensionsValue.h
@@ -0,0 +1,70 @@
+/*
+ * 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 STATS_DIMENSIONS_VALUE_H
+#define STATS_DIMENSIONS_VALUE_H
+
+#include <binder/Parcel.h>
+#include <binder/Parcelable.h>
+#include <binder/Status.h>
+#include <utils/String16.h>
+#include <vector>
+
+namespace android {
+namespace os {
+
+// Represents a parcelable object. Used to send data from statsd to StatsCompanionService.java.
+class StatsDimensionsValue : public android::Parcelable {
+public:
+ StatsDimensionsValue();
+
+ StatsDimensionsValue(int32_t field, String16 value);
+ StatsDimensionsValue(int32_t field, int32_t value);
+ StatsDimensionsValue(int32_t field, int64_t value);
+ StatsDimensionsValue(int32_t field, bool value);
+ StatsDimensionsValue(int32_t field, float value);
+ StatsDimensionsValue(int32_t field, std::vector<StatsDimensionsValue> value);
+
+ virtual ~StatsDimensionsValue();
+
+ virtual android::status_t writeToParcel(android::Parcel* out) const override;
+ virtual android::status_t readFromParcel(const android::Parcel* in) override;
+
+private:
+ // Keep constants in sync with android/os/StatsDimensionsValue.java
+ // and stats_log.proto's DimensionValue.
+ static const int kStrValueType = 2;
+ static const int kIntValueType = 3;
+ static const int kLongValueType = 4;
+ static const int kBoolValueType = 5;
+ static const int kFloatValueType = 6;
+ static const int kTupleValueType = 7;
+
+ int32_t mField;
+ int32_t mValueType;
+
+ // This isn't very clever, but it isn't used for long-term storage, so it'll do.
+ String16 mStrValue;
+ int32_t mIntValue;
+ int64_t mLongValue;
+ bool mBoolValue;
+ float mFloatValue;
+ std::vector<StatsDimensionsValue> mTupleValue;
+};
+
+} // namespace os
+} // namespace android
+
+#endif // STATS_DIMENSIONS_VALUE_H
diff --git a/libs/services/src/os/DropBoxManager.cpp b/libs/services/src/os/DropBoxManager.cpp
index 1c760e8..f5685d9 100644
--- a/libs/services/src/os/DropBoxManager.cpp
+++ b/libs/services/src/os/DropBoxManager.cpp
@@ -202,7 +202,12 @@
ALOGW("DropboxManager: %s", message.c_str());
return Status::fromExceptionCode(Status::EX_ILLEGAL_STATE, message.c_str());
}
+ return addFile(tag, fd, flags);
+}
+Status
+DropBoxManager::addFile(const String16& tag, int fd, int flags)
+{
Entry entry(tag, flags, fd);
return add(entry);
}
diff --git a/libs/services/src/os/StatsDimensionsValue.cpp b/libs/services/src/os/StatsDimensionsValue.cpp
new file mode 100644
index 0000000..0052e0b
--- /dev/null
+++ b/libs/services/src/os/StatsDimensionsValue.cpp
@@ -0,0 +1,126 @@
+/*
+ * 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_TAG "StatsDimensionsValue"
+
+#include "android/os/StatsDimensionsValue.h"
+
+#include <cutils/log.h>
+
+using android::Parcel;
+using android::Parcelable;
+using android::status_t;
+using std::vector;
+
+namespace android {
+namespace os {
+
+StatsDimensionsValue::StatsDimensionsValue() {};
+
+StatsDimensionsValue::StatsDimensionsValue(int32_t field, String16 value) :
+ mField(field),
+ mValueType(kStrValueType),
+ mStrValue(value) {
+}
+StatsDimensionsValue::StatsDimensionsValue(int32_t field, int32_t value) :
+ mField(field),
+ mValueType(kIntValueType),
+ mIntValue(value) {
+}
+StatsDimensionsValue::StatsDimensionsValue(int32_t field, int64_t value) :
+ mField(field),
+ mValueType(kLongValueType),
+ mLongValue(value) {
+}
+StatsDimensionsValue::StatsDimensionsValue(int32_t field, bool value) :
+ mField(field),
+ mValueType(kBoolValueType),
+ mBoolValue(value) {
+}
+StatsDimensionsValue::StatsDimensionsValue(int32_t field, float value) :
+ mField(field),
+ mValueType(kFloatValueType),
+ mFloatValue(value) {
+}
+StatsDimensionsValue::StatsDimensionsValue(int32_t field, vector<StatsDimensionsValue> value) :
+ mField(field),
+ mValueType(kTupleValueType),
+ mTupleValue(value) {
+}
+
+StatsDimensionsValue::~StatsDimensionsValue() {}
+
+status_t
+StatsDimensionsValue::writeToParcel(Parcel* out) const {
+ status_t err ;
+
+ err = out->writeInt32(mField);
+ if (err != NO_ERROR) {
+ return err;
+ }
+ err = out->writeInt32(mValueType);
+ if (err != NO_ERROR) {
+ return err;
+ }
+ switch (mValueType) {
+ case kStrValueType:
+ err = out->writeString16(mStrValue);
+ break;
+ case kIntValueType:
+ err = out->writeInt32(mIntValue);
+ break;
+ case kLongValueType:
+ err = out->writeInt64(mLongValue);
+ break;
+ case kBoolValueType:
+ err = out->writeBool(mBoolValue);
+ break;
+ case kFloatValueType:
+ err = out->writeFloat(mFloatValue);
+ break;
+ case kTupleValueType:
+ {
+ int sz = mTupleValue.size();
+ err = out->writeInt32(sz);
+ if (err != NO_ERROR) {
+ return err;
+ }
+ for (int i = 0; i < sz; ++i) {
+ err = mTupleValue[i].writeToParcel(out);
+ if (err != NO_ERROR) {
+ return err;
+ }
+ }
+ }
+ break;
+ default:
+ err = UNKNOWN_ERROR;
+ break;
+ }
+ return err;
+}
+
+status_t
+StatsDimensionsValue::readFromParcel(const Parcel* in)
+{
+ // Implement me if desired. We don't currently use this.
+ ALOGE("Cannot do c++ StatsDimensionsValue.readFromParcel(); it is not implemented.");
+ (void)in; // To prevent compile error of unused parameter 'in'
+ return UNKNOWN_ERROR;
+}
+
+} // namespace os
+} // namespace android
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index 9db9d33..c33dce1 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -38,9 +38,12 @@
import android.os.Process;
import android.os.RemoteException;
import android.os.UserHandle;
+import android.provider.Settings;
+import android.text.TextUtils;
import android.util.Log;
import com.android.internal.location.ProviderProperties;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
@@ -1191,10 +1194,11 @@
@SystemApi
@RequiresPermission(WRITE_SECURE_SETTINGS)
public void setLocationEnabledForUser(boolean enabled, UserHandle userHandle) {
- try {
- mService.setLocationEnabledForUser(enabled, userHandle.getIdentifier());
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
+ for (String provider : getAllProviders()) {
+ if (provider.equals(PASSIVE_PROVIDER)) {
+ continue;
+ }
+ setProviderEnabledForUser(provider, enabled, userHandle);
}
}
@@ -1208,11 +1212,19 @@
*/
@SystemApi
public boolean isLocationEnabledForUser(UserHandle userHandle) {
- try {
- return mService.isLocationEnabledForUser(userHandle.getIdentifier());
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
+ final String allowedProviders = Settings.Secure.getStringForUser(
+ mContext.getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED,
+ userHandle.getIdentifier());
+ final List<String> providerList = Arrays.asList(allowedProviders.split(","));
+ for(String provider : getAllProviders()) {
+ if (provider.equals(PASSIVE_PROVIDER)) {
+ continue;
+ }
+ if (providerList.contains(provider)) {
+ return true;
+ }
}
+ return false;
}
/**
@@ -1236,13 +1248,7 @@
* @throws IllegalArgumentException if provider is null
*/
public boolean isProviderEnabled(String provider) {
- checkProvider(provider);
-
- try {
- return mService.isProviderEnabled(provider);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
+ return isProviderEnabledForUser(provider, Process.myUserHandle());
}
/**
@@ -1270,12 +1276,9 @@
@SystemApi
public boolean isProviderEnabledForUser(String provider, UserHandle userHandle) {
checkProvider(provider);
-
- try {
- return mService.isProviderEnabledForUser(provider, userHandle.getIdentifier());
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
+ String allowedProviders = Settings.Secure.getStringForUser(mContext.getContentResolver(),
+ Settings.Secure.LOCATION_PROVIDERS_ALLOWED, userHandle.getIdentifier());
+ return TextUtils.delimitedStringContains(allowedProviders, ',', provider);
}
/**
@@ -1294,13 +1297,16 @@
public boolean setProviderEnabledForUser(
String provider, boolean enabled, UserHandle userHandle) {
checkProvider(provider);
-
- try {
- return mService.setProviderEnabledForUser(
- provider, enabled, userHandle.getIdentifier());
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
+ // to ensure thread safety, we write the provider name with a '+' or '-'
+ // and let the SettingsProvider handle it rather than reading and modifying
+ // the list of enabled providers.
+ if (enabled) {
+ provider = "+" + provider;
+ } else {
+ provider = "-" + provider;
}
+ return Settings.Secure.putStringForUser(mContext.getContentResolver(),
+ Settings.Secure.LOCATION_PROVIDERS_ALLOWED, provider, userHandle.getIdentifier());
}
/**
diff --git a/location/lib/Android.mk b/location/lib/Android.mk
index 62f5677..8424601 100644
--- a/location/lib/Android.mk
+++ b/location/lib/Android.mk
@@ -22,9 +22,7 @@
LOCAL_MODULE:= com.android.location.provider
LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- $(call all-subdir-java-files) \
- $(call all-aidl-files-under, java)
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
include $(BUILD_JAVA_LIBRARY)
diff --git a/media/java/android/media/AudioAttributes.java b/media/java/android/media/AudioAttributes.java
index d7861e3..44a2ff9 100644
--- a/media/java/android/media/AudioAttributes.java
+++ b/media/java/android/media/AudioAttributes.java
@@ -880,7 +880,9 @@
}
/** @hide */
- public void toProto(ProtoOutputStream proto) {
+ public void writeToProto(ProtoOutputStream proto, long fieldId) {
+ final long token = proto.start(fieldId);
+
proto.write(AudioAttributesProto.USAGE, mUsage);
proto.write(AudioAttributesProto.CONTENT_TYPE, mContentType);
proto.write(AudioAttributesProto.FLAGS, mFlags);
@@ -892,6 +894,8 @@
}
}
// TODO: is the data in mBundle useful for debugging?
+
+ proto.end(token);
}
/** @hide */
diff --git a/media/java/android/media/AudioDeviceInfo.java b/media/java/android/media/AudioDeviceInfo.java
index 1a97b6b..41f9f09 100644
--- a/media/java/android/media/AudioDeviceInfo.java
+++ b/media/java/android/media/AudioDeviceInfo.java
@@ -142,7 +142,8 @@
TYPE_LINE_DIGITAL,
TYPE_FM,
TYPE_AUX_LINE,
- TYPE_IP }
+ TYPE_IP,
+ TYPE_BUS }
)
@Retention(RetentionPolicy.SOURCE)
public @interface AudioDeviceTypeOut {}
@@ -168,6 +169,7 @@
case TYPE_FM:
case TYPE_AUX_LINE:
case TYPE_IP:
+ case TYPE_BUS:
return true;
default:
return false;
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index 2ac4063..22fa620 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -400,6 +400,18 @@
public static final int ADJUST_TOGGLE_MUTE = 101;
/** @hide */
+ @IntDef(flag = false, prefix = "ADJUST", value = {
+ ADJUST_RAISE,
+ ADJUST_LOWER,
+ ADJUST_SAME,
+ ADJUST_MUTE,
+ ADJUST_UNMUTE,
+ ADJUST_TOGGLE_MUTE }
+ )
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface VolumeAdjustment {}
+
+ /** @hide */
public static final String adjustToString(int adj) {
switch (adj) {
case ADJUST_RAISE: return "ADJUST_RAISE";
@@ -2989,7 +3001,7 @@
final IAudioService service = getService();
try {
String regId = service.registerAudioPolicy(policy.getConfig(), policy.cb(),
- policy.hasFocusListener(), policy.isFocusPolicy());
+ policy.hasFocusListener(), policy.isFocusPolicy(), policy.isVolumeController());
if (regId == null) {
return ERROR;
} else {
diff --git a/media/java/android/media/AudioPort.java b/media/java/android/media/AudioPort.java
index 19bf51d..047db19 100644
--- a/media/java/android/media/AudioPort.java
+++ b/media/java/android/media/AudioPort.java
@@ -20,7 +20,7 @@
* 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.
* Examples of audio ports are an output device (speaker) or an output mix (see AudioMixPort).
- * All attributes that are relevant for applications to make routing selection are decribed
+ * All attributes that are relevant for applications to make routing selection are described
* in an AudioPort, in particular:
* - possible channel mask configurations.
* - audio format (PCM 16bit, PCM 24bit...)
@@ -173,6 +173,7 @@
/**
* Build a specific configuration of this audio port for use by methods
* like AudioManager.connectAudioPatch().
+ * @param samplingRate
* @param channelMask The desired channel mask. AudioFormat.CHANNEL_OUT_DEFAULT if no change
* from active configuration requested.
* @param format The desired audio format. AudioFormat.ENCODING_DEFAULT if no change
diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java
index 27784e9..eb6e830 100644
--- a/media/java/android/media/AudioRecord.java
+++ b/media/java/android/media/AudioRecord.java
@@ -32,6 +32,7 @@
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
+import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.util.ArrayMap;
@@ -1314,6 +1315,23 @@
return native_read_in_direct_buffer(audioBuffer, sizeInBytes, readMode == READ_BLOCKING);
}
+ /**
+ * Return Metrics data about the current AudioTrack instance.
+ *
+ * @return a {@link PersistableBundle} containing the set of attributes and values
+ * available for the media being handled by this instance of AudioRecord
+ * The attributes are descibed in {@link MetricsConstants}.
+ *
+ * Additional vendor-specific fields may also be present in
+ * the return value.
+ */
+ public PersistableBundle getMetrics() {
+ PersistableBundle bundle = native_getMetrics();
+ return bundle;
+ }
+
+ private native PersistableBundle native_getMetrics();
+
//--------------------------------------------------------------------------
// Initialization / configuration
//--------------------
@@ -1739,4 +1757,46 @@
private static void loge(String msg) {
Log.e(TAG, msg);
}
+
+ public static final class MetricsConstants
+ {
+ private MetricsConstants() {}
+
+ /**
+ * Key to extract the output format being recorded
+ * from the {@link AudioRecord#getMetrics} return value.
+ * The value is a String.
+ */
+ public static final String ENCODING = "android.media.audiorecord.encoding";
+
+ /**
+ * Key to extract the Source Type for this track
+ * from the {@link AudioRecord#getMetrics} return value.
+ * The value is a String.
+ */
+ public static final String SOURCE = "android.media.audiorecord.source";
+
+ /**
+ * Key to extract the estimated latency through the recording pipeline
+ * from the {@link AudioRecord#getMetrics} return value.
+ * This is in units of milliseconds.
+ * The value is an integer.
+ */
+ public static final String LATENCY = "android.media.audiorecord.latency";
+
+ /**
+ * Key to extract the sink sample rate for this record track in Hz
+ * from the {@link AudioRecord#getMetrics} return value.
+ * The value is an integer.
+ */
+ public static final String SAMPLERATE = "android.media.audiorecord.samplerate";
+
+ /**
+ * Key to extract the number of channels being recorded in this record track
+ * from the {@link AudioRecord#getMetrics} return value.
+ * The value is an integer.
+ */
+ public static final String CHANNELS = "android.media.audiorecord.channels";
+
+ }
}
diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java
index b4316ba..dcd37da 100644
--- a/media/java/android/media/AudioSystem.java
+++ b/media/java/android/media/AudioSystem.java
@@ -793,7 +793,7 @@
public static native int getPrimaryOutputFrameCount();
public static native int getOutputLatency(int stream);
- public static native int setLowRamDevice(boolean isLowRamDevice);
+ public static native int setLowRamDevice(boolean isLowRamDevice, long totalMemory);
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 5928d03..4e9ce8e 100644
--- a/media/java/android/media/AudioTrack.java
+++ b/media/java/android/media/AudioTrack.java
@@ -36,6 +36,7 @@
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
+import android.os.PersistableBundle;
import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -1718,6 +1719,23 @@
return ret;
}
+ /**
+ * Return Metrics data about the current AudioTrack instance.
+ *
+ * @return a {@link PersistableBundle} containing the set of attributes and values
+ * available for the media being handled by this instance of AudioTrack
+ * The attributes are descibed in {@link MetricsConstants}.
+ *
+ * Additional vendor-specific fields may also be present in
+ * the return value.
+ */
+ public PersistableBundle getMetrics() {
+ PersistableBundle bundle = native_getMetrics();
+ return bundle;
+ }
+
+ private native PersistableBundle native_getMetrics();
+
//--------------------------------------------------------------------------
// Initialization / configuration
//--------------------
@@ -3239,4 +3257,46 @@
private static void loge(String msg) {
Log.e(TAG, msg);
}
+
+ public final static class MetricsConstants
+ {
+ private MetricsConstants() {}
+
+ /**
+ * Key to extract the Stream Type for this track
+ * from the {@link AudioTrack#getMetrics} return value.
+ * The value is a String.
+ */
+ public static final String STREAMTYPE = "android.media.audiotrack.streamtype";
+
+ /**
+ * Key to extract the Content Type for this track
+ * from the {@link AudioTrack#getMetrics} return value.
+ * The value is a String.
+ */
+ public static final String CONTENTTYPE = "android.media.audiotrack.type";
+
+ /**
+ * Key to extract the Content Type for this track
+ * from the {@link AudioTrack#getMetrics} return value.
+ * The value is a String.
+ */
+ public static final String USAGE = "android.media.audiotrack.usage";
+
+ /**
+ * Key to extract the sample rate for this track in Hz
+ * from the {@link AudioTrack#getMetrics} return value.
+ * The value is an integer.
+ */
+ public static final String SAMPLERATE = "android.media.audiorecord.samplerate";
+
+ /**
+ * Key to extract the channel mask information for this track
+ * from the {@link AudioTrack#getMetrics} return value.
+ *
+ * The value is a Long integer.
+ */
+ public static final String CHANNELMASK = "android.media.audiorecord.channelmask";
+
+ }
}
diff --git a/media/java/android/media/DataSourceDesc.java b/media/java/android/media/DataSourceDesc.java
new file mode 100644
index 0000000..73fad7a
--- /dev/null
+++ b/media/java/android/media/DataSourceDesc.java
@@ -0,0 +1,465 @@
+/*
+ * 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.media;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.Context;
+import android.content.res.AssetFileDescriptor;
+import android.net.Uri;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import com.android.internal.util.Preconditions;
+
+import java.io.FileDescriptor;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.net.HttpCookie;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Structure for data source descriptor.
+ *
+ * Used by {@link MediaPlayer2#setDataSource(DataSourceDesc)}
+ * to set data source for playback.
+ *
+ * <p>Users should use {@link Builder} to change {@link DataSourceDesc}.
+ *
+ */
+public final class DataSourceDesc {
+ /* No data source has been set yet */
+ public static final int TYPE_NONE = 0;
+ /* data source is type of MediaDataSource */
+ public static final int TYPE_CALLBACK = 1;
+ /* data source is type of FileDescriptor */
+ public static final int TYPE_FD = 2;
+ /* data source is type of Uri */
+ public static final int TYPE_URI = 3;
+
+ // intentionally less than long.MAX_VALUE
+ public static final long LONG_MAX = 0x7ffffffffffffffL;
+
+ private int mType = TYPE_NONE;
+
+ private Media2DataSource mMedia2DataSource;
+
+ private FileDescriptor mFD;
+ private long mFDOffset = 0;
+ private long mFDLength = LONG_MAX;
+
+ private Uri mUri;
+ private Map<String, String> mUriHeader;
+ private List<HttpCookie> mUriCookies;
+ private Context mUriContext;
+
+ private long mId = 0;
+ private long mStartPositionMs = 0;
+ private long mEndPositionMs = LONG_MAX;
+
+ private DataSourceDesc() {
+ }
+
+ /**
+ * Return the Id of data source.
+ * @return the Id of data source
+ */
+ public long getId() {
+ return mId;
+ }
+
+ /**
+ * Return the position in milliseconds at which the playback will start.
+ * @return the position in milliseconds at which the playback will start
+ */
+ public long getStartPosition() {
+ return mStartPositionMs;
+ }
+
+ /**
+ * Return the position in milliseconds at which the playback will end.
+ * -1 means ending at the end of source content.
+ * @return the position in milliseconds at which the playback will end
+ */
+ public long getEndPosition() {
+ return mEndPositionMs;
+ }
+
+ /**
+ * Return the type of data source.
+ * @return the type of data source
+ */
+ public int getType() {
+ return mType;
+ }
+
+ /**
+ * Return the Media2DataSource of this data source.
+ * It's meaningful only when {@code getType} returns {@link #TYPE_CALLBACK}.
+ * @return the Media2DataSource of this data source
+ */
+ public Media2DataSource getMedia2DataSource() {
+ return mMedia2DataSource;
+ }
+
+ /**
+ * Return the FileDescriptor of this data source.
+ * It's meaningful only when {@code getType} returns {@link #TYPE_FD}.
+ * @return the FileDescriptor of this data source
+ */
+ public FileDescriptor getFileDescriptor() {
+ return mFD;
+ }
+
+ /**
+ * Return the offset associated with the FileDescriptor of this data source.
+ * It's meaningful only when {@code getType} returns {@link #TYPE_FD} and it has
+ * been set by the {@link Builder}.
+ * @return the offset associated with the FileDescriptor of this data source
+ */
+ public long getFileDescriptorOffset() {
+ return mFDOffset;
+ }
+
+ /**
+ * Return the content length associated with the FileDescriptor of this data source.
+ * It's meaningful only when {@code getType} returns {@link #TYPE_FD}.
+ * -1 means same as the length of source content.
+ * @return the content length associated with the FileDescriptor of this data source
+ */
+ public long getFileDescriptorLength() {
+ return mFDLength;
+ }
+
+ /**
+ * Return the Uri of this data source.
+ * It's meaningful only when {@code getType} returns {@link #TYPE_URI}.
+ * @return the Uri of this data source
+ */
+ public Uri getUri() {
+ return mUri;
+ }
+
+ /**
+ * Return the Uri headers of this data source.
+ * It's meaningful only when {@code getType} returns {@link #TYPE_URI}.
+ * @return the Uri headers of this data source
+ */
+ public Map<String, String> getUriHeaders() {
+ if (mUriHeader == null) {
+ return null;
+ }
+ return new HashMap<String, String>(mUriHeader);
+ }
+
+ /**
+ * Return the Uri cookies of this data source.
+ * It's meaningful only when {@code getType} returns {@link #TYPE_URI}.
+ * @return the Uri cookies of this data source
+ */
+ public List<HttpCookie> getUriCookies() {
+ if (mUriCookies == null) {
+ return null;
+ }
+ return new ArrayList<HttpCookie>(mUriCookies);
+ }
+
+ /**
+ * Return the Context used for resolving the Uri of this data source.
+ * It's meaningful only when {@code getType} returns {@link #TYPE_URI}.
+ * @return the Context used for resolving the Uri of this data source
+ */
+ public Context getUriContext() {
+ return mUriContext;
+ }
+
+ /**
+ * Builder class for {@link DataSourceDesc} objects.
+ * <p> Here is an example where <code>Builder</code> is used to define the
+ * {@link DataSourceDesc} to be used by a {@link MediaPlayer2} instance:
+ *
+ * <pre class="prettyprint">
+ * DataSourceDesc oldDSD = mediaplayer2.getDataSourceDesc();
+ * DataSourceDesc newDSD = new DataSourceDesc.Builder(oldDSD)
+ * .setStartPosition(1000)
+ * .setEndPosition(15000)
+ * .build();
+ * mediaplayer2.setDataSourceDesc(newDSD);
+ * </pre>
+ */
+ public static class Builder {
+ private int mType = TYPE_NONE;
+
+ private Media2DataSource mMedia2DataSource;
+
+ private FileDescriptor mFD;
+ private long mFDOffset = 0;
+ private long mFDLength = LONG_MAX;
+
+ private Uri mUri;
+ private Map<String, String> mUriHeader;
+ private List<HttpCookie> mUriCookies;
+ private Context mUriContext;
+
+ private long mId = 0;
+ private long mStartPositionMs = 0;
+ private long mEndPositionMs = LONG_MAX;
+
+ /**
+ * Constructs a new Builder with the defaults.
+ */
+ public Builder() {
+ }
+
+ /**
+ * Constructs a new Builder from a given {@link DataSourceDesc} instance
+ * @param dsd the {@link DataSourceDesc} object whose data will be reused
+ * in the new Builder.
+ */
+ public Builder(DataSourceDesc dsd) {
+ mType = dsd.mType;
+ mMedia2DataSource = dsd.mMedia2DataSource;
+ mFD = dsd.mFD;
+ mFDOffset = dsd.mFDOffset;
+ mFDLength = dsd.mFDLength;
+ mUri = dsd.mUri;
+ mUriHeader = dsd.mUriHeader;
+ mUriCookies = dsd.mUriCookies;
+ mUriContext = dsd.mUriContext;
+
+ mId = dsd.mId;
+ mStartPositionMs = dsd.mStartPositionMs;
+ mEndPositionMs = dsd.mEndPositionMs;
+ }
+
+ /**
+ * Combines all of the fields that have been set and return a new
+ * {@link DataSourceDesc} object. <code>IllegalStateException</code> will be
+ * thrown if there is conflict between fields.
+ *
+ * @return a new {@link DataSourceDesc} object
+ */
+ public DataSourceDesc build() {
+ if (mType != TYPE_CALLBACK
+ && mType != TYPE_FD
+ && mType != TYPE_URI) {
+ throw new IllegalStateException("Illegal type: " + mType);
+ }
+ if (mStartPositionMs > mEndPositionMs) {
+ throw new IllegalStateException("Illegal start/end position: "
+ + mStartPositionMs + " : " + mEndPositionMs);
+ }
+
+ DataSourceDesc dsd = new DataSourceDesc();
+ dsd.mType = mType;
+ dsd.mMedia2DataSource = mMedia2DataSource;
+ dsd.mFD = mFD;
+ dsd.mFDOffset = mFDOffset;
+ dsd.mFDLength = mFDLength;
+ dsd.mUri = mUri;
+ dsd.mUriHeader = mUriHeader;
+ dsd.mUriCookies = mUriCookies;
+ dsd.mUriContext = mUriContext;
+
+ dsd.mId = mId;
+ dsd.mStartPositionMs = mStartPositionMs;
+ dsd.mEndPositionMs = mEndPositionMs;
+
+ return dsd;
+ }
+
+ /**
+ * Sets the Id of this data source.
+ *
+ * @param id the Id of this data source
+ * @return the same Builder instance.
+ */
+ public Builder setId(long id) {
+ mId = id;
+ return this;
+ }
+
+ /**
+ * Sets the start position in milliseconds at which the playback will start.
+ * Any negative number is treated as 0.
+ *
+ * @param position the start position in milliseconds at which the playback will start
+ * @return the same Builder instance.
+ *
+ */
+ public Builder setStartPosition(long position) {
+ if (position < 0) {
+ position = 0;
+ }
+ mStartPositionMs = position;
+ return this;
+ }
+
+ /**
+ * Sets the end position in milliseconds at which the playback will end.
+ * Any negative number is treated as maximum length of the data source.
+ *
+ * @param position the end position in milliseconds at which the playback will end
+ * @return the same Builder instance.
+ */
+ public Builder setEndPosition(long position) {
+ if (position < 0) {
+ position = LONG_MAX;
+ }
+ mEndPositionMs = position;
+ return this;
+ }
+
+ /**
+ * Sets the data source (Media2DataSource) to use.
+ *
+ * @param m2ds the Media2DataSource for the media you want to play
+ * @return the same Builder instance.
+ * @throws NullPointerException if m2ds is null.
+ */
+ public Builder setDataSource(Media2DataSource m2ds) {
+ Preconditions.checkNotNull(m2ds);
+ resetDataSource();
+ mType = TYPE_CALLBACK;
+ mMedia2DataSource = m2ds;
+ return this;
+ }
+
+ /**
+ * Sets the data source (FileDescriptor) to use. The FileDescriptor must be
+ * seekable (N.B. a LocalSocket is not seekable). It is the caller's responsibility
+ * to close the file descriptor after the source has been used.
+ *
+ * @param fd the FileDescriptor for the file you want to play
+ * @return the same Builder instance.
+ * @throws NullPointerException if fd is null.
+ */
+ public Builder setDataSource(FileDescriptor fd) {
+ Preconditions.checkNotNull(fd);
+ resetDataSource();
+ mType = TYPE_FD;
+ mFD = fd;
+ return this;
+ }
+
+ /**
+ * Sets the data source (FileDescriptor) to use. The FileDescriptor must be
+ * seekable (N.B. a LocalSocket is not seekable). It is the caller's responsibility
+ * to close the file descriptor after the source has been used.
+ *
+ * Any negative number for offset is treated as 0.
+ * Any negative number for length is treated as maximum length of the data source.
+ *
+ * @param fd the FileDescriptor for the file you want to play
+ * @param offset the offset into the file where the data to be played starts, in bytes
+ * @param length the length in bytes of the data to be played
+ * @return the same Builder instance.
+ * @throws NullPointerException if fd is null.
+ */
+ public Builder setDataSource(FileDescriptor fd, long offset, long length) {
+ Preconditions.checkNotNull(fd);
+ if (offset < 0) {
+ offset = 0;
+ }
+ if (length < 0) {
+ length = LONG_MAX;
+ }
+ resetDataSource();
+ mType = TYPE_FD;
+ mFD = fd;
+ mFDOffset = offset;
+ mFDLength = length;
+ return this;
+ }
+
+ /**
+ * Sets the data source as a content Uri.
+ *
+ * @param context the Context to use when resolving the Uri
+ * @param uri the Content URI of the data you want to play
+ * @return the same Builder instance.
+ * @throws NullPointerException if context or uri is null.
+ */
+ public Builder setDataSource(@NonNull Context context, @NonNull Uri uri) {
+ Preconditions.checkNotNull(context, "context cannot be null");
+ Preconditions.checkNotNull(uri, "uri cannot be null");
+ resetDataSource();
+ mType = TYPE_URI;
+ mUri = uri;
+ mUriContext = context;
+ return this;
+ }
+
+ /**
+ * Sets the data source as a content Uri.
+ *
+ * To provide cookies for the subsequent HTTP requests, you can install your own default
+ * cookie handler and use other variants of setDataSource APIs instead. Alternatively, you
+ * can use this API to pass the cookies as a list of HttpCookie. If the app has not
+ * installed a CookieHandler already, {@link MediaPlayer2} will create a CookieManager
+ * and populates its CookieStore with the provided cookies when this data source is passed
+ * to {@link MediaPlayer2}. If the app has installed its own handler already, the handler
+ * is required to be of CookieManager type such that {@link MediaPlayer2} can update the
+ * manager’s CookieStore.
+ *
+ * <p><strong>Note</strong> that the cross domain redirection is allowed by default,
+ * but that can be changed with key/value pairs through the headers parameter with
+ * "android-allow-cross-domain-redirect" as the key and "0" or "1" as the value to
+ * disallow or allow cross domain redirection.
+ *
+ * @param context the Context to use when resolving the Uri
+ * @param uri the Content URI of the data you want to play
+ * @param headers the headers to be sent together with the request for the data
+ * The headers must not include cookies. Instead, use the cookies param.
+ * @param cookies the cookies to be sent together with the request
+ * @return the same Builder instance.
+ * @throws NullPointerException if context or uri is null.
+ */
+ public Builder setDataSource(@NonNull Context context, @NonNull Uri uri,
+ @Nullable Map<String, String> headers, @Nullable List<HttpCookie> cookies) {
+ Preconditions.checkNotNull(uri);
+ resetDataSource();
+ mType = TYPE_URI;
+ mUri = uri;
+ if (headers != null) {
+ mUriHeader = new HashMap<String, String>(headers);
+ }
+ if (cookies != null) {
+ mUriCookies = new ArrayList<HttpCookie>(cookies);
+ }
+ mUriContext = context;
+ return this;
+ }
+
+ private void resetDataSource() {
+ mType = TYPE_NONE;
+ mMedia2DataSource = null;
+ mFD = null;
+ mFDOffset = 0;
+ mFDLength = LONG_MAX;
+ mUri = null;
+ mUriHeader = null;
+ mUriCookies = null;
+ mUriContext = null;
+ }
+ }
+}
diff --git a/media/java/android/media/IAudioService.aidl b/media/java/android/media/IAudioService.aidl
index 6c65223..88d0a60 100644
--- a/media/java/android/media/IAudioService.aidl
+++ b/media/java/android/media/IAudioService.aidl
@@ -166,7 +166,8 @@
boolean isHdmiSystemAudioSupported();
String registerAudioPolicy(in AudioPolicyConfig policyConfig,
- in IAudioPolicyCallback pcb, boolean hasFocusListener, boolean isFocusPolicy);
+ in IAudioPolicyCallback pcb, boolean hasFocusListener, boolean isFocusPolicy,
+ boolean isVolumeController);
oneway void unregisterAudioPolicyAsync(in IAudioPolicyCallback pcb);
diff --git a/media/java/android/media/IMediaSession2.aidl b/media/java/android/media/IMediaSession2.aidl
deleted file mode 100644
index 078b611..0000000
--- a/media/java/android/media/IMediaSession2.aidl
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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.media;
-
-import android.media.session.PlaybackState;
-import android.media.IMediaSession2Callback;
-import android.os.Bundle;
-
-/**
- * Interface to MediaSession2. Framework MUST only call oneway APIs.
- *
- * @hide
- */
-// TODO(jaewan): Make this oneway interface.
-// Malicious app can fake session binder and holds commands from controller.
-interface IMediaSession2 {
- // TODO(jaewan): add onCommand() to send private command
- // TODO(jaewan): Due to the nature of oneway calls, APIs can be called in out of order
- // Add id for individual calls to address this.
-
- // TODO(jaewan): We may consider to add another binder just for the connection
- // not to expose other methods to the controller whose connection wasn't accepted.
- // But this would be enough for now because it's the same as existing
- // MediaBrowser and MediaBrowserService.
- oneway void connect(String callingPackage, IMediaSession2Callback callback);
- oneway void release(IMediaSession2Callback caller);
-
- //////////////////////////////////////////////////////////////////////////////////////////////
- // send command
- //////////////////////////////////////////////////////////////////////////////////////////////
- oneway void sendCommand(IMediaSession2Callback caller, in Bundle command, in Bundle args);
-
- PlaybackState getPlaybackState();
-
- //////////////////////////////////////////////////////////////////////////////////////////////
- // Get library service specific
- //////////////////////////////////////////////////////////////////////////////////////////////
- oneway void getBrowserRoot(IMediaSession2Callback callback, in Bundle rootHints);
-
- //////////////////////////////////////////////////////////////////////////////////////////////
- // Callbacks -- remove them
- //////////////////////////////////////////////////////////////////////////////////////////////
- /**
- * @param callbackBinder binder to be used to notify changes.
- * @param callbackFlag one of {@link MediaController2#FLAG_CALLBACK_PLAYBACK} or
- * {@link MediaController2#FLAG_CALLBACK_SESSION_ACTIVENESS}
- * @param requestCode If >= 0, this code will be called back by the callback after the callback
- * is registered.
- */
- // TODO(jaewan): Due to the nature of the binder, calls can be called out of order.
- // Need a way to ensure calling of unregisterCallback unregisters later
- // registerCallback.
- oneway void registerCallback(IMediaSession2Callback callbackBinder,
- int callbackFlag, int requestCode);
- oneway void unregisterCallback(IMediaSession2Callback callbackBinder, int callbackFlag);
-}
diff --git a/media/java/android/media/IMediaSession2Callback.aidl b/media/java/android/media/IMediaSession2Callback.aidl
deleted file mode 100644
index a63b6bf..0000000
--- a/media/java/android/media/IMediaSession2Callback.aidl
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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.media;
-
-import android.os.Bundle;
-import android.media.session.PlaybackState;
-import android.media.IMediaSession2;
-
-/**
- * Interface from MediaSession2 to MediaSession2Record.
- * <p>
- * Keep this interface oneway. Otherwise a malicious app may implement fake version of this,
- * and holds calls from session to make session owner(s) frozen.
- *
- * @hide
- */
-oneway interface IMediaSession2Callback {
- void onPlaybackStateChanged(in PlaybackState state);
-
- /**
- * Called only when the controller is created with service's token.
- *
- * @param sessionBinder {@code null} if the connect is rejected or is disconnected. a session
- * binder if the connect is accepted.
- * @param commands initially allowed commands.
- */
- // TODO(jaewan): Also need to pass flags for allowed actions for permission check.
- // For example, a media can allow setRating only for whitelisted apps
- // it's better for controller to know such information in advance.
- // Follow-up TODO: Add similar functions to the session.
- // TODO(jaewan): Is term 'accepted/rejected' correct? For permission, 'grant' is used.
- void onConnectionChanged(IMediaSession2 sessionBinder, in Bundle commandGroup);
-
- //////////////////////////////////////////////////////////////////////////////////////////////
- // Browser sepcific
- //////////////////////////////////////////////////////////////////////////////////////////////
- void onGetRootResult(in Bundle rootHints, String rootMediaId, in Bundle rootExtra);
-}
diff --git a/core/proto/android/os/batterymanager.proto b/media/java/android/media/ISessionTokensListener.aidl
similarity index 65%
copy from core/proto/android/os/batterymanager.proto
copy to media/java/android/media/ISessionTokensListener.aidl
index 669bf2d..c83a19e 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/media/java/android/media/ISessionTokensListener.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * 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.
@@ -14,16 +14,14 @@
* limitations under the License.
*/
-syntax = "proto2";
-package android.os;
+package android.media;
-option java_multiple_files = true;
+import android.os.Bundle;
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
+/**
+ * Listens for changes to the list of session tokens.
+ * @hide
+ */
+oneway interface ISessionTokensListener {
+ void onSessionTokensChanged(in List<Bundle> tokens);
}
diff --git a/media/java/android/media/Media2DataSource.java b/media/java/android/media/Media2DataSource.java
new file mode 100644
index 0000000..8ee4a70
--- /dev/null
+++ b/media/java/android/media/Media2DataSource.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 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 android.media;
+
+import java.io.Closeable;
+import java.io.IOException;
+
+/**
+ * For supplying media data to the framework. Implement this if your app has
+ * special requirements for the way media data is obtained.
+ *
+ * <p class="note">Methods of this interface may be called on multiple different
+ * threads. There will be a thread synchronization point between each call to ensure that
+ * modifications to the state of your Media2DataSource are visible to future calls. This means
+ * you don't need to do your own synchronization unless you're modifying the
+ * Media2DataSource from another thread while it's being used by the framework.</p>
+ *
+ */
+public abstract class Media2DataSource implements Closeable {
+ /**
+ * Called to request data from the given position.
+ *
+ * Implementations should should write up to {@code size} bytes into
+ * {@code buffer}, and return the number of bytes written.
+ *
+ * Return {@code 0} if size is zero (thus no bytes are read).
+ *
+ * Return {@code -1} to indicate that end of stream is reached.
+ *
+ * @param position the position in the data source to read from.
+ * @param buffer the buffer to read the data into.
+ * @param offset the offset within buffer to read the data into.
+ * @param size the number of bytes to read.
+ * @throws IOException on fatal errors.
+ * @return the number of bytes read, or -1 if there was an error.
+ */
+ public abstract int readAt(long position, byte[] buffer, int offset, int size)
+ throws IOException;
+
+ /**
+ * Called to get the size of the data source.
+ *
+ * @throws IOException on fatal errors
+ * @return the size of data source in bytes, or -1 if the size is unknown.
+ */
+ public abstract long getSize() throws IOException;
+}
diff --git a/media/java/android/media/Media2HTTPConnection.java b/media/java/android/media/Media2HTTPConnection.java
new file mode 100644
index 0000000..0d7825a
--- /dev/null
+++ b/media/java/android/media/Media2HTTPConnection.java
@@ -0,0 +1,385 @@
+/*
+ * Copyright 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 android.media;
+
+import android.net.NetworkUtils;
+import android.os.StrictMode;
+import android.util.Log;
+
+import java.io.BufferedInputStream;
+import java.io.InputStream;
+import java.io.IOException;
+import java.net.CookieHandler;
+import java.net.CookieManager;
+import java.net.Proxy;
+import java.net.URL;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.NoRouteToHostException;
+import java.net.ProtocolException;
+import java.net.UnknownServiceException;
+import java.util.HashMap;
+import java.util.Map;
+
+import static android.media.MediaPlayer2.MEDIA_ERROR_UNSUPPORTED;
+
+/** @hide */
+public class Media2HTTPConnection {
+ private static final String TAG = "Media2HTTPConnection";
+ private static final boolean VERBOSE = false;
+
+ // connection timeout - 30 sec
+ private static final int CONNECT_TIMEOUT_MS = 30 * 1000;
+
+ private long mCurrentOffset = -1;
+ private URL mURL = null;
+ private Map<String, String> mHeaders = null;
+ private HttpURLConnection mConnection = null;
+ private long mTotalSize = -1;
+ private InputStream mInputStream = null;
+
+ private boolean mAllowCrossDomainRedirect = true;
+ 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;
+
+ public Media2HTTPConnection() {
+ CookieHandler cookieHandler = CookieHandler.getDefault();
+ if (cookieHandler == null) {
+ Log.w(TAG, "Media2HTTPConnection: Unexpected. No CookieHandler found.");
+ }
+ }
+
+ public boolean connect(String uri, String headers) {
+ if (VERBOSE) {
+ Log.d(TAG, "connect: uri=" + uri + ", headers=" + headers);
+ }
+
+ try {
+ disconnect();
+ mAllowCrossDomainRedirect = true;
+ mURL = new URL(uri);
+ mHeaders = convertHeaderStringToMap(headers);
+ } catch (MalformedURLException e) {
+ return false;
+ }
+
+ return true;
+ }
+
+ private boolean parseBoolean(String val) {
+ try {
+ return Long.parseLong(val) != 0;
+ } catch (NumberFormatException e) {
+ return "true".equalsIgnoreCase(val) ||
+ "yes".equalsIgnoreCase(val);
+ }
+ }
+
+ /* returns true iff header is internal */
+ private boolean filterOutInternalHeaders(String key, String val) {
+ if ("android-allow-cross-domain-redirect".equalsIgnoreCase(key)) {
+ mAllowCrossDomainRedirect = parseBoolean(val);
+ // cross-protocol redirects are also controlled by this flag
+ mAllowCrossProtocolRedirect = mAllowCrossDomainRedirect;
+ } else {
+ return false;
+ }
+ return true;
+ }
+
+ private Map<String, String> convertHeaderStringToMap(String headers) {
+ HashMap<String, String> map = new HashMap<String, String>();
+
+ String[] pairs = headers.split("\r\n");
+ for (String pair : pairs) {
+ int colonPos = pair.indexOf(":");
+ if (colonPos >= 0) {
+ String key = pair.substring(0, colonPos);
+ String val = pair.substring(colonPos + 1);
+
+ if (!filterOutInternalHeaders(key, val)) {
+ map.put(key, val);
+ }
+ }
+ }
+
+ return map;
+ }
+
+ public void disconnect() {
+ teardownConnection();
+ mHeaders = null;
+ mURL = null;
+ }
+
+ private void teardownConnection() {
+ if (mConnection != null) {
+ if (mInputStream != null) {
+ try {
+ mInputStream.close();
+ } catch (IOException e) {
+ }
+ mInputStream = null;
+ }
+
+ mConnection.disconnect();
+ mConnection = null;
+
+ mCurrentOffset = -1;
+ }
+ }
+
+ private static final boolean isLocalHost(URL url) {
+ if (url == null) {
+ return false;
+ }
+
+ String host = url.getHost();
+
+ if (host == null) {
+ return false;
+ }
+
+ try {
+ if (host.equalsIgnoreCase("localhost")) {
+ return true;
+ }
+ if (NetworkUtils.numericToInetAddress(host).isLoopbackAddress()) {
+ return true;
+ }
+ } catch (IllegalArgumentException iex) {
+ }
+ return false;
+ }
+
+ private void seekTo(long offset) throws IOException {
+ teardownConnection();
+
+ try {
+ int response;
+ int redirectCount = 0;
+
+ URL url = mURL;
+
+ // do not use any proxy for localhost (127.0.0.1)
+ boolean noProxy = isLocalHost(url);
+
+ while (true) {
+ if (noProxy) {
+ mConnection = (HttpURLConnection)url.openConnection(Proxy.NO_PROXY);
+ } else {
+ mConnection = (HttpURLConnection)url.openConnection();
+ }
+ mConnection.setConnectTimeout(CONNECT_TIMEOUT_MS);
+
+ // handle redirects ourselves if we do not allow cross-domain redirect
+ mConnection.setInstanceFollowRedirects(mAllowCrossDomainRedirect);
+
+ if (mHeaders != null) {
+ for (Map.Entry<String, String> entry : mHeaders.entrySet()) {
+ mConnection.setRequestProperty(
+ entry.getKey(), entry.getValue());
+ }
+ }
+
+ if (offset > 0) {
+ mConnection.setRequestProperty(
+ "Range", "bytes=" + offset + "-");
+ }
+
+ response = mConnection.getResponseCode();
+ if (response != HttpURLConnection.HTTP_MULT_CHOICE &&
+ response != HttpURLConnection.HTTP_MOVED_PERM &&
+ response != HttpURLConnection.HTTP_MOVED_TEMP &&
+ response != HttpURLConnection.HTTP_SEE_OTHER &&
+ response != HTTP_TEMP_REDIRECT) {
+ // not a redirect, or redirect handled by HttpURLConnection
+ break;
+ }
+
+ if (++redirectCount > MAX_REDIRECTS) {
+ throw new NoRouteToHostException("Too many redirects: " + redirectCount);
+ }
+
+ String method = mConnection.getRequestMethod();
+ if (response == HTTP_TEMP_REDIRECT &&
+ !method.equals("GET") && !method.equals("HEAD")) {
+ // "If the 307 status code is received in response to a
+ // request other than GET or HEAD, the user agent MUST NOT
+ // automatically redirect the request"
+ throw new NoRouteToHostException("Invalid redirect");
+ }
+ String location = mConnection.getHeaderField("Location");
+ if (location == null) {
+ throw new NoRouteToHostException("Invalid redirect");
+ }
+ url = new URL(mURL /* TRICKY: don't use url! */, location);
+ if (!url.getProtocol().equals("https") &&
+ !url.getProtocol().equals("http")) {
+ throw new NoRouteToHostException("Unsupported protocol redirect");
+ }
+ boolean sameProtocol = mURL.getProtocol().equals(url.getProtocol());
+ if (!mAllowCrossProtocolRedirect && !sameProtocol) {
+ throw new NoRouteToHostException("Cross-protocol redirects are disallowed");
+ }
+ boolean sameHost = mURL.getHost().equals(url.getHost());
+ if (!mAllowCrossDomainRedirect && !sameHost) {
+ throw new NoRouteToHostException("Cross-domain redirects are disallowed");
+ }
+
+ if (response != HTTP_TEMP_REDIRECT) {
+ // update effective URL, unless it is a Temporary Redirect
+ mURL = url;
+ }
+ }
+
+ if (mAllowCrossDomainRedirect) {
+ // remember the current, potentially redirected URL if redirects
+ // were handled by HttpURLConnection
+ mURL = mConnection.getURL();
+ }
+
+ if (response == HttpURLConnection.HTTP_PARTIAL) {
+ // Partial content, we cannot just use getContentLength
+ // because what we want is not just the length of the range
+ // returned but the size of the full content if available.
+
+ String contentRange =
+ mConnection.getHeaderField("Content-Range");
+
+ mTotalSize = -1;
+ if (contentRange != null) {
+ // format is "bytes xxx-yyy/zzz
+ // where "zzz" is the total number of bytes of the
+ // content or '*' if unknown.
+
+ int lastSlashPos = contentRange.lastIndexOf('/');
+ if (lastSlashPos >= 0) {
+ String total =
+ contentRange.substring(lastSlashPos + 1);
+
+ try {
+ mTotalSize = Long.parseLong(total);
+ } catch (NumberFormatException e) {
+ }
+ }
+ }
+ } else if (response != HttpURLConnection.HTTP_OK) {
+ throw new IOException();
+ } else {
+ mTotalSize = mConnection.getContentLength();
+ }
+
+ if (offset > 0 && response != HttpURLConnection.HTTP_PARTIAL) {
+ // Some servers simply ignore "Range" requests and serve
+ // data from the start of the content.
+ throw new ProtocolException();
+ }
+
+ mInputStream =
+ new BufferedInputStream(mConnection.getInputStream());
+
+ mCurrentOffset = offset;
+ } catch (IOException e) {
+ mTotalSize = -1;
+ teardownConnection();
+ mCurrentOffset = -1;
+
+ throw e;
+ }
+ }
+
+ public int readAt(long offset, byte[] data, int size) {
+ StrictMode.ThreadPolicy policy =
+ new StrictMode.ThreadPolicy.Builder().permitAll().build();
+
+ StrictMode.setThreadPolicy(policy);
+
+ try {
+ if (offset != mCurrentOffset) {
+ seekTo(offset);
+ }
+
+ int n = mInputStream.read(data, 0, size);
+
+ if (n == -1) {
+ // InputStream signals EOS using a -1 result, our semantics
+ // are to return a 0-length read.
+ n = 0;
+ }
+
+ mCurrentOffset += n;
+
+ if (VERBOSE) {
+ Log.d(TAG, "readAt " + offset + " / " + size + " => " + n);
+ }
+
+ return n;
+ } catch (ProtocolException e) {
+ Log.w(TAG, "readAt " + offset + " / " + size + " => " + e);
+ return MEDIA_ERROR_UNSUPPORTED;
+ } catch (NoRouteToHostException e) {
+ Log.w(TAG, "readAt " + offset + " / " + size + " => " + e);
+ return MEDIA_ERROR_UNSUPPORTED;
+ } catch (UnknownServiceException e) {
+ Log.w(TAG, "readAt " + offset + " / " + size + " => " + e);
+ return MEDIA_ERROR_UNSUPPORTED;
+ } catch (IOException e) {
+ if (VERBOSE) {
+ Log.d(TAG, "readAt " + offset + " / " + size + " => -1");
+ }
+ return -1;
+ } catch (Exception e) {
+ if (VERBOSE) {
+ Log.d(TAG, "unknown exception " + e);
+ Log.d(TAG, "readAt " + offset + " / " + size + " => -1");
+ }
+ return -1;
+ }
+ }
+
+ public long getSize() {
+ if (mConnection == null) {
+ try {
+ seekTo(0);
+ } catch (IOException e) {
+ return -1;
+ }
+ }
+
+ return mTotalSize;
+ }
+
+ public String getMIMEType() {
+ if (mConnection == null) {
+ try {
+ seekTo(0);
+ } catch (IOException e) {
+ return "application/octet-stream";
+ }
+ }
+
+ return mConnection.getContentType();
+ }
+
+ public String getUri() {
+ return mURL.toString();
+ }
+}
diff --git a/media/java/android/media/Media2HTTPService.java b/media/java/android/media/Media2HTTPService.java
new file mode 100644
index 0000000..957acec
--- /dev/null
+++ b/media/java/android/media/Media2HTTPService.java
@@ -0,0 +1,98 @@
+/*
+ * 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 android.media;
+
+import android.util.Log;
+
+import java.net.CookieHandler;
+import java.net.CookieManager;
+import java.net.CookieStore;
+import java.net.HttpCookie;
+import java.util.List;
+
+/** @hide */
+public class Media2HTTPService {
+ private static final String TAG = "Media2HTTPService";
+ private List<HttpCookie> mCookies;
+ private Boolean mCookieStoreInitialized = new Boolean(false);
+
+ public Media2HTTPService(List<HttpCookie> cookies) {
+ mCookies = cookies;
+ Log.v(TAG, "Media2HTTPService(" + this + "): Cookies: " + cookies);
+ }
+
+ public Media2HTTPConnection makeHTTPConnection() {
+
+ synchronized (mCookieStoreInitialized) {
+ // Only need to do it once for all connections
+ if ( !mCookieStoreInitialized ) {
+ CookieHandler cookieHandler = CookieHandler.getDefault();
+ if (cookieHandler == null) {
+ cookieHandler = new CookieManager();
+ CookieHandler.setDefault(cookieHandler);
+ Log.v(TAG, "makeHTTPConnection: CookieManager created: " + cookieHandler);
+ } else {
+ Log.v(TAG, "makeHTTPConnection: CookieHandler (" + cookieHandler + ") exists.");
+ }
+
+ // Applying the bootstrapping cookies
+ if ( mCookies != null ) {
+ if ( cookieHandler instanceof CookieManager ) {
+ CookieManager cookieManager = (CookieManager)cookieHandler;
+ CookieStore store = cookieManager.getCookieStore();
+ for ( HttpCookie cookie : mCookies ) {
+ try {
+ store.add(null, cookie);
+ } catch ( Exception e ) {
+ Log.v(TAG, "makeHTTPConnection: CookieStore.add" + e);
+ }
+ //for extended debugging when needed
+ //Log.v(TAG, "MediaHTTPConnection adding Cookie[" + cookie.getName() +
+ // "]: " + cookie);
+ }
+ } else {
+ Log.w(TAG, "makeHTTPConnection: The installed CookieHandler is not a "
+ + "CookieManager. Can’t add the provided cookies to the cookie "
+ + "store.");
+ }
+ } // mCookies
+
+ mCookieStoreInitialized = true;
+
+ Log.v(TAG, "makeHTTPConnection(" + this + "): cookieHandler: " + cookieHandler +
+ " Cookies: " + mCookies);
+ } // mCookieStoreInitialized
+ } // synchronized
+
+ return new Media2HTTPConnection();
+ }
+
+ /* package private */ static Media2HTTPService createHTTPService(String path) {
+ return createHTTPService(path, null);
+ }
+
+ // when cookies are provided
+ static Media2HTTPService createHTTPService(String path, List<HttpCookie> cookies) {
+ if (path.startsWith("http://") || path.startsWith("https://")) {
+ return (new Media2HTTPService(cookies));
+ } else if (path.startsWith("widevine://")) {
+ Log.d(TAG, "Widevine classic is no longer supported");
+ }
+
+ return null;
+ }
+}
diff --git a/media/java/android/media/MediaActionSound.java b/media/java/android/media/MediaActionSound.java
index 983ca75..dcd4dce 100644
--- a/media/java/android/media/MediaActionSound.java
+++ b/media/java/android/media/MediaActionSound.java
@@ -47,11 +47,16 @@
private SoundPool mSoundPool;
private SoundState[] mSounds;
+ private static final String[] SOUND_DIRS = {
+ "/product/media/audio/ui/",
+ "/system/media/audio/ui/",
+ };
+
private static final String[] SOUND_FILES = {
- "/system/media/audio/ui/camera_click.ogg",
- "/system/media/audio/ui/camera_focus.ogg",
- "/system/media/audio/ui/VideoRecord.ogg",
- "/system/media/audio/ui/VideoStop.ogg"
+ "camera_click.ogg",
+ "camera_focus.ogg",
+ "VideoRecord.ogg",
+ "VideoStop.ogg"
};
private static final String TAG = "MediaActionSound";
@@ -132,12 +137,16 @@
}
private int loadSound(SoundState sound) {
- int id = mSoundPool.load(SOUND_FILES[sound.name], 1);
- if (id > 0) {
- sound.state = STATE_LOADING;
- sound.id = id;
+ final String soundFileName = SOUND_FILES[sound.name];
+ for (String soundDir : SOUND_DIRS) {
+ int id = mSoundPool.load(soundDir + soundFileName, 1);
+ if (id > 0) {
+ sound.state = STATE_LOADING;
+ sound.id = id;
+ return id;
+ }
}
- return id;
+ return 0;
}
/**
diff --git a/media/java/android/media/MediaBrowser2.java b/media/java/android/media/MediaBrowser2.java
index fa00902..5ad4313 100644
--- a/media/java/android/media/MediaBrowser2.java
+++ b/media/java/android/media/MediaBrowser2.java
@@ -16,12 +16,16 @@
package android.media;
+import android.annotation.CallbackExecutor;
+import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
import android.content.Context;
import android.media.update.ApiLoader;
import android.media.update.MediaBrowser2Provider;
import android.os.Bundle;
+import java.util.List;
import java.util.concurrent.Executor;
/**
@@ -35,7 +39,7 @@
/**
* Callback to listen events from {@link MediaLibraryService2}.
*/
- public abstract static class BrowserCallback extends MediaController2.ControllerCallback {
+ public static class BrowserCallback extends MediaController2.ControllerCallback {
/**
* Called with the result of {@link #getBrowserRoot(Bundle)}.
* <p>
@@ -46,24 +50,129 @@
* @param rootMediaId media id of the browser root. Can be {@code null}
* @param rootExtra extra of the browser root. Can be {@code null}
*/
- public abstract void onGetRootResult(Bundle rootHints, @Nullable String rootMediaId,
- @Nullable Bundle rootExtra);
+ public void onGetRootResult(Bundle rootHints, @Nullable String rootMediaId,
+ @Nullable Bundle rootExtra) { }
+
+ /**
+ * Called when the item has been returned by the library service for the previous
+ * {@link MediaBrowser2#getItem} call.
+ * <p>
+ * Result can be null if there had been error.
+ *
+ * @param mediaId media id
+ * @param result result. Can be {@code null}
+ */
+ public void onItemLoaded(@NonNull String mediaId, @Nullable MediaItem2 result) { }
+
+ /**
+ * Called when the list of items has been returned by the library service for the previous
+ * {@link MediaBrowser2#getChildren(String, int, int, Bundle)}.
+ *
+ * @param parentId parent id
+ * @param page page number that you've specified
+ * @param pageSize page size that you've specified
+ * @param options optional bundle that you've specified
+ * @param result result. Can be {@code null}
+ */
+ public void onChildrenLoaded(@NonNull String parentId, int page, int pageSize,
+ @Nullable Bundle options, @Nullable List<MediaItem2> result) { }
+
+ /**
+ * Called when there's change in the parent's children.
+ *
+ * @param parentId parent id that you've specified with subscribe
+ * @param options optional bundle that you've specified with subscribe
+ */
+ public void onChildrenChanged(@NonNull String parentId, @Nullable Bundle options) { }
+
+ /**
+ * Called when the search result has been returned by the library service for the previous
+ * {@link MediaBrowser2#search(String, int, int, Bundle)}.
+ * <p>
+ * Result can be null if there had been error.
+ *
+ * @param query query string that you've specified
+ * @param page page number that you've specified
+ * @param pageSize page size that you've specified
+ * @param options optional bundle that you've specified
+ * @param result result. Can be {@code null}
+ */
+ public void onSearchResult(@NonNull String query, int page, int pageSize,
+ @Nullable Bundle options, @Nullable List<MediaItem2> result) { }
}
- public MediaBrowser2(Context context, SessionToken token, BrowserCallback callback,
- Executor executor) {
- super(context, token, callback, executor);
+ public MediaBrowser2(@NonNull Context context, @NonNull SessionToken2 token,
+ @NonNull @CallbackExecutor Executor executor, @NonNull BrowserCallback callback) {
+ super(context, token, executor, callback);
mProvider = (MediaBrowser2Provider) getProvider();
}
@Override
- MediaBrowser2Provider createProvider(Context context, SessionToken token,
- ControllerCallback callback, Executor executor) {
+ MediaBrowser2Provider createProvider(Context context, SessionToken2 token,
+ Executor executor, ControllerCallback callback) {
return ApiLoader.getProvider(context)
- .createMediaBrowser2(this, context, token, (BrowserCallback) callback, executor);
+ .createMediaBrowser2(context, this, token, executor, (BrowserCallback) callback);
}
public void getBrowserRoot(Bundle rootHints) {
mProvider.getBrowserRoot_impl(rootHints);
}
+
+ /**
+ * Subscribe to a parent id for the change in its children. When there's a change,
+ * {@link BrowserCallback#onChildrenChanged(String, Bundle)} will be called with the bundle
+ * that you've specified. You should call {@link #getChildren(String, int, int, Bundle)} to get
+ * the actual contents for the parent.
+ *
+ * @param parentId parent id
+ * @param options optional bundle
+ */
+ public void subscribe(String parentId, @Nullable Bundle options) {
+ mProvider.subscribe_impl(parentId, options);
+ }
+
+ /**
+ * Unsubscribe for changes to the children of the parent, which was previously subscribed with
+ * {@link #subscribe(String, Bundle)}.
+ *
+ * @param parentId parent id
+ * @param options optional bundle
+ */
+ public void unsubscribe(String parentId, @Nullable Bundle options) {
+ mProvider.unsubscribe_impl(parentId, options);
+ }
+
+ /**
+ * Get the media item with the given media id. Result would be sent back asynchronously with the
+ * {@link BrowserCallback#onItemLoaded(String, MediaItem2)}.
+ *
+ * @param mediaId media id
+ */
+ public void getItem(String mediaId) {
+ mProvider.getItem_impl(mediaId);
+ }
+
+ /**
+ * Get list of children under the parent. Result would be sent back asynchronously with the
+ * {@link BrowserCallback#onChildrenLoaded(String, int, int, Bundle, List)}.
+ *
+ * @param parentId
+ * @param page
+ * @param pageSize
+ * @param options
+ */
+ public void getChildren(String parentId, int page, int pageSize, @Nullable Bundle options) {
+ mProvider.getChildren_impl(parentId, page, pageSize, options);
+ }
+
+ /**
+ *
+ * @param query search query deliminated by string
+ * @param page page number to get search result. Starts from {@code 1}
+ * @param pageSize page size. Should be greater or equal to {@code 1}
+ * @param extras extra bundle
+ */
+ public void search(String query, int page, int pageSize, Bundle extras) {
+ mProvider.search_impl(query, page, pageSize, extras);
+ }
}
diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java
index f41e33f..44d9099 100644
--- a/media/java/android/media/MediaCodecInfo.java
+++ b/media/java/android/media/MediaCodecInfo.java
@@ -2639,7 +2639,8 @@
/**
* Returns the supported range of quality values.
*
- * @hide
+ * Quality is implementation-specific. As a general rule, a higher quality
+ * setting results in a better image quality and a lower compression ratio.
*/
public Range<Integer> getQualityRange() {
return mQualityRange;
@@ -2751,7 +2752,7 @@
}
if (info.containsKey("feature-bitrate-modes")) {
for (String mode: info.getString("feature-bitrate-modes").split(",")) {
- mBitControl |= parseBitrateMode(mode);
+ mBitControl |= (1 << parseBitrateMode(mode));
}
}
diff --git a/media/java/android/media/MediaController2.java b/media/java/android/media/MediaController2.java
index 9112450..47dbde9 100644
--- a/media/java/android/media/MediaController2.java
+++ b/media/java/android/media/MediaController2.java
@@ -16,16 +16,25 @@
package android.media;
+import android.annotation.CallbackExecutor;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.app.PendingIntent;
import android.content.Context;
+import android.media.MediaSession2.Command;
+import android.media.MediaSession2.CommandButton;
import android.media.MediaSession2.CommandGroup;
import android.media.MediaSession2.ControllerInfo;
+import android.media.MediaSession2.PlaylistParams;
import android.media.session.MediaSessionManager;
-import android.media.session.PlaybackState;
import android.media.update.ApiLoader;
import android.media.update.MediaController2Provider;
-import android.os.Handler;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.ResultReceiver;
+
+import java.util.List;
import java.util.concurrent.Executor;
/**
@@ -33,7 +42,7 @@
* {@link MediaSessionService2} in any status. Media buttons and other commands can be sent to
* the session.
* <p>
- * When you're done, use {@link #release()} to clean up resources. This also helps session service
+ * When you're done, use {@link #close()} to clean up resources. This also helps session service
* to be destroyed when there's no controller associated with it.
* <p>
* When controlling {@link MediaSession2}, the controller will be available immediately after
@@ -47,7 +56,7 @@
* <p>
* A controller can be created through token from {@link MediaSessionManager} if you hold the
* signature|privileged permission "android.permission.MEDIA_CONTENT_CONTROL" permission or are
- * an enabled notification listener or by getting a {@link SessionToken} directly the
+ * an enabled notification listener or by getting a {@link SessionToken2} directly the
* the session owner.
* <p>
* MediaController2 objects are thread-safe.
@@ -56,9 +65,7 @@
* @see MediaSessionService2
* @hide
*/
-// TODO(jaewan): Unhide
-// TODO(jaewan): Revisit comments. Currently MediaBrowser case is missing.
-public class MediaController2 extends MediaPlayerBase {
+public class MediaController2 implements AutoCloseable {
/**
* Interface for listening to change in activeness of the {@link MediaSession2}. It's
* active if and only if it has set a player.
@@ -77,54 +84,200 @@
* the session. The controller becomes unavailable afterwards and the callback wouldn't
* be called.
* <p>
- * It will be also called after the {@link #release()}, so you can put clean up code here.
- * You don't need to call {@link #release()} after this.
+ * It will be also called after the {@link #close()}, so you can put clean up code here.
+ * You don't need to call {@link #close()} after this.
*/
public void onDisconnected() { }
+
+ /**
+ * Called when the session set the custom layout through the
+ * {@link MediaSession2#setCustomLayout(ControllerInfo, List)}.
+ * <p>
+ * Can be called before {@link #onConnected(CommandGroup)} is called.
+ *
+ * @param layout
+ */
+ public void onCustomLayoutChanged(List<CommandButton> layout) { }
+
+ /**
+ * Called when the session has changed anything related with the {@link PlaybackInfo}.
+ *
+ * @param info new playback info
+ */
+ public void onPlaybackInfoChanged(PlaybackInfo info) { }
+
+ /**
+ * Called when the allowed commands are changed by session.
+ *
+ * @param commands newly allowed commands
+ */
+ public void onAllowedCommandsChanged(CommandGroup commands) { }
+
+ /**
+ * Called when the session sent a custom command.
+ *
+ * @param command
+ * @param args
+ * @param receiver
+ */
+ public void onCustomCommand(Command command, @Nullable Bundle args,
+ @Nullable ResultReceiver receiver) { }
+
+ /**
+ * Called when the playlist is changed.
+ *
+ * @param playlist A new playlist set by the session.
+ */
+ public void onPlaylistChanged(@NonNull List<MediaItem2> playlist) { }
+
+ /**
+ * Called when the playback state is changed, or connection success.
+ *
+ * @param state latest playback state
+ */
+ public void onPlaybackStateChanged(@NonNull PlaybackState2 state) { }
+
+ /**
+ * Called when the playlist parameters are changed.
+ *
+ * @param params The new play list parameters.
+ */
+ public void onPlaylistParamsChanged(@NonNull PlaylistParams params) { }
+ }
+
+ /**
+ * Holds information about the current playback and how audio is handled for
+ * this session.
+ */
+ // The same as MediaController.PlaybackInfo
+ public static final class PlaybackInfo {
+ /**
+ * The session uses remote playback.
+ */
+ public static final int PLAYBACK_TYPE_REMOTE = 2;
+ /**
+ * The session uses local playback.
+ */
+ public static final int PLAYBACK_TYPE_LOCAL = 1;
+
+ private final int mVolumeType;
+ private final int mVolumeControl;
+ private final int mMaxVolume;
+ private final int mCurrentVolume;
+ private final AudioAttributes mAudioAttrs;
+
+ /**
+ * @hide
+ */
+ public PlaybackInfo(int type, AudioAttributes attrs, int control, int max, int current) {
+ mVolumeType = type;
+ mAudioAttrs = attrs;
+ mVolumeControl = control;
+ mMaxVolume = max;
+ mCurrentVolume = current;
+ }
+
+ /**
+ * Get the type of playback which affects volume handling. One of:
+ * <ul>
+ * <li>{@link #PLAYBACK_TYPE_LOCAL}</li>
+ * <li>{@link #PLAYBACK_TYPE_REMOTE}</li>
+ * </ul>
+ *
+ * @return The type of playback this session is using.
+ */
+ public int getPlaybackType() {
+ return mVolumeType;
+ }
+
+ /**
+ * Get the audio attributes for this session. The attributes will affect
+ * volume handling for the session. When the volume type is
+ * {@link PlaybackInfo#PLAYBACK_TYPE_REMOTE} these may be ignored by the
+ * remote volume handler.
+ *
+ * @return The attributes for this session.
+ */
+ public AudioAttributes getAudioAttributes() {
+ return mAudioAttrs;
+ }
+
+ /**
+ * Get the type of volume control that can be used. One of:
+ * <ul>
+ * <li>{@link VolumeProvider#VOLUME_CONTROL_ABSOLUTE}</li>
+ * <li>{@link VolumeProvider#VOLUME_CONTROL_RELATIVE}</li>
+ * <li>{@link VolumeProvider#VOLUME_CONTROL_FIXED}</li>
+ * </ul>
+ *
+ * @return The type of volume control that may be used with this
+ * session.
+ */
+ public int getVolumeControl() {
+ return mVolumeControl;
+ }
+
+ /**
+ * Get the maximum volume that may be set for this session.
+ *
+ * @return The maximum allowed volume where this session is playing.
+ */
+ public int getMaxVolume() {
+ return mMaxVolume;
+ }
+
+ /**
+ * Get the current volume for this session.
+ *
+ * @return The current volume where this session is playing.
+ */
+ public int getCurrentVolume() {
+ return mCurrentVolume;
+ }
}
private final MediaController2Provider mProvider;
/**
- * Create a {@link MediaController2} from the {@link SessionToken}. This connects to the session
+ * Create a {@link MediaController2} from the {@link SessionToken2}. This connects to the session
* and may wake up the service if it's not available.
*
* @param context Context
* @param token token to connect to
- * @param callback controller callback to receive changes in
* @param executor executor to run callbacks on.
+ * @param callback controller callback to receive changes in
*/
// TODO(jaewan): Put @CallbackExecutor to the constructor.
- public MediaController2(@NonNull Context context, @NonNull SessionToken token,
- @NonNull ControllerCallback callback, @NonNull Executor executor) {
+ public MediaController2(@NonNull Context context, @NonNull SessionToken2 token,
+ @NonNull @CallbackExecutor Executor executor, @NonNull ControllerCallback callback) {
super();
+ mProvider = createProvider(context, token, executor, callback);
// This also connects to the token.
// Explicit connect() isn't added on purpose because retrying connect() is impossible with
// session whose session binder is only valid while it's active.
// prevent a controller from reusable after the
// session is released and recreated.
- mProvider = createProvider(context, token, callback, executor);
+ mProvider.initialize();
}
MediaController2Provider createProvider(@NonNull Context context,
- @NonNull SessionToken token, @NonNull ControllerCallback callback,
- @NonNull Executor executor) {
+ @NonNull SessionToken2 token, @NonNull Executor executor,
+ @NonNull ControllerCallback callback) {
return ApiLoader.getProvider(context)
- .createMediaController2(this, context, token, callback, executor);
+ .createMediaController2(context, this, token, executor, callback);
}
/**
* Release this object, and disconnect from the session. After this, callbacks wouldn't be
* received.
*/
- public void release() {
- mProvider.release_impl();
+ @Override
+ public void close() {
+ mProvider.close_impl();
}
- /**
- * @hide
- */
+ @SystemApi
public MediaController2Provider getProvider() {
return mProvider;
}
@@ -133,7 +286,7 @@
* @return token
*/
public @NonNull
- SessionToken getSessionToken() {
+ SessionToken2 getSessionToken() {
return mProvider.getSessionToken_impl();
}
@@ -144,60 +297,344 @@
return mProvider.isConnected_impl();
}
- @Override
public void play() {
mProvider.play_impl();
}
- @Override
public void pause() {
mProvider.pause_impl();
}
- @Override
public void stop() {
mProvider.stop_impl();
}
- @Override
public void skipToPrevious() {
mProvider.skipToPrevious_impl();
}
- @Override
public void skipToNext() {
mProvider.skipToNext_impl();
}
- @Override
- public @Nullable PlaybackState getPlaybackState() {
+ /**
+ * Request that the player prepare its playback. In other words, other sessions can continue
+ * to play during the preparation of this session. This method can be used to speed up the
+ * start of the playback. Once the preparation is done, the session will change its playback
+ * state to {@link PlaybackState2#STATE_PAUSED}. Afterwards, {@link #play} can be called to
+ * start playback.
+ */
+ public void prepare() {
+ mProvider.prepare_impl();
+ }
+
+ /**
+ * Start fast forwarding. If playback is already fast forwarding this
+ * may increase the rate.
+ */
+ public void fastForward() {
+ mProvider.fastForward_impl();
+ }
+
+ /**
+ * Start rewinding. If playback is already rewinding this may increase
+ * the rate.
+ */
+ public void rewind() {
+ mProvider.rewind_impl();
+ }
+
+ /**
+ * Move to a new location in the media stream.
+ *
+ * @param pos Position to move to, in milliseconds.
+ */
+ public void seekTo(long pos) {
+ mProvider.seekTo_impl(pos);
+ }
+
+ /**
+ * Sets the index of current DataSourceDesc in the play list to be played.
+ *
+ * @param index the index of DataSourceDesc in the play list you want to play
+ * @throws IllegalArgumentException if the play list is null
+ * @throws NullPointerException if index is outside play list range
+ */
+ public void setCurrentPlaylistItem(int index) {
+ mProvider.setCurrentPlaylistItem_impl(index);
+ }
+
+ /**
+ * Sets the {@link PlaylistParams} for the current play list. Repeat/shuffle mode and metadata
+ * for the list can be set by calling this method.
+ *
+ * @param params A {@link PlaylistParams} object to set.
+ * @throws IllegalArgumentException if given {@param param} is null.
+ */
+ public void setPlaylistParams(PlaylistParams params) {
+ mProvider.setPlaylistParams_impl(params);
+ }
+
+ /**
+ * @hide
+ */
+ public void skipForward() {
+ // To match with KEYCODE_MEDIA_SKIP_FORWARD
+ }
+
+ /**
+ * @hide
+ */
+ public void skipBackward() {
+ // To match with KEYCODE_MEDIA_SKIP_BACKWARD
+ }
+
+ /**
+ * Request that the player start playback for a specific media id.
+ *
+ * @param mediaId The id of the requested media.
+ * @param extras Optional extras that can include extra information about the media item
+ * to be played.
+ */
+ public void playFromMediaId(@NonNull String mediaId, @Nullable Bundle extras) {
+ mProvider.playFromMediaId_impl(mediaId, extras);
+ }
+
+ /**
+ * Request that the player start playback for a specific search query.
+ * An empty or null query should be treated as a request to play any
+ * music.
+ *
+ * @param query The search query.
+ * @param extras Optional extras that can include extra information
+ * about the query.
+ */
+ public void playFromSearch(@NonNull String query, @Nullable Bundle extras) {
+ mProvider.playFromSearch_impl(query, extras);
+ }
+
+ /**
+ * Request that the player start playback for a specific {@link Uri}.
+ *
+ * @param uri The URI of the requested media.
+ * @param extras Optional extras that can include extra information about the media item
+ * to be played.
+ */
+ public void playFromUri(@NonNull String uri, @Nullable Bundle extras) {
+ mProvider.playFromUri_impl(uri, extras);
+ }
+
+
+ /**
+ * Request that the player prepare playback for a specific media id. In other words, other
+ * sessions can continue to play during the preparation of this session. This method can be
+ * used to speed up the start of the playback. Once the preparation is done, the session
+ * will change its playback state to {@link PlaybackState2#STATE_PAUSED}. Afterwards,
+ * {@link #play} can be called to start playback. If the preparation is not needed,
+ * {@link #playFromMediaId} can be directly called without this method.
+ *
+ * @param mediaId The id of the requested media.
+ * @param extras Optional extras that can include extra information about the media item
+ * to be prepared.
+ */
+ public void prepareFromMediaId(@NonNull String mediaId, @Nullable Bundle extras) {
+ mProvider.prepareMediaId_impl(mediaId, extras);
+ }
+
+ /**
+ * Request that the player prepare playback for a specific search query. An empty or null
+ * query should be treated as a request to prepare any music. In other words, other sessions
+ * can continue to play during the preparation of this session. This method can be used to
+ * speed up the start of the playback. Once the preparation is done, the session will
+ * change its playback state to {@link PlaybackState2#STATE_PAUSED}. Afterwards,
+ * {@link #play} can be called to start playback. If the preparation is not needed,
+ * {@link #playFromSearch} can be directly called without this method.
+ *
+ * @param query The search query.
+ * @param extras Optional extras that can include extra information
+ * about the query.
+ */
+ public void prepareFromSearch(@NonNull String query, @Nullable Bundle extras) {
+ mProvider.prepareFromSearch_impl(query, extras);
+ }
+
+ /**
+ * Request that the player prepare playback for a specific {@link Uri}. In other words,
+ * other sessions can continue to play during the preparation of this session. This method
+ * can be used to speed up the start of the playback. Once the preparation is done, the
+ * session will change its playback state to {@link PlaybackState2#STATE_PAUSED}. Afterwards,
+ * {@link #play} can be called to start playback. If the preparation is not needed,
+ * {@link #playFromUri} can be directly called without this method.
+ *
+ * @param uri The URI of the requested media.
+ * @param extras Optional extras that can include extra information about the media item
+ * to be prepared.
+ */
+ public void prepareFromUri(@NonNull Uri uri, @Nullable Bundle extras) {
+ mProvider.prepareFromUri_impl(uri, extras);
+ }
+
+ /**
+ * Set the volume of the output this session is playing on. The command will be ignored if it
+ * does not support {@link VolumeProvider#VOLUME_CONTROL_ABSOLUTE}.
+ * <p>
+ * If the session is local playback, this changes the device's volume with the stream that
+ * session's player is using. Flags will be specified for the {@link AudioManager}.
+ * <p>
+ * If the session is remote player (i.e. session has set volume provider), its volume provider
+ * will receive this request instead.
+ *
+ * @see #getPlaybackInfo()
+ * @param value The value to set it to, between 0 and the reported max.
+ * @param flags flags from {@link AudioManager} to include with the volume request for local
+ * playback
+ */
+ public void setVolumeTo(int value, int flags) {
+ mProvider.setVolumeTo_impl(value, flags);
+ }
+
+ /**
+ * Adjust the volume of the output this session is playing on. The direction
+ * must be one of {@link AudioManager#ADJUST_LOWER},
+ * {@link AudioManager#ADJUST_RAISE}, or {@link AudioManager#ADJUST_SAME}.
+ * The command will be ignored if the session does not support
+ * {@link VolumeProvider#VOLUME_CONTROL_RELATIVE} or
+ * {@link VolumeProvider#VOLUME_CONTROL_ABSOLUTE}.
+ * <p>
+ * If the session is local playback, this changes the device's volume with the stream that
+ * session's player is using. Flags will be specified for the {@link AudioManager}.
+ * <p>
+ * If the session is remote player (i.e. session has set volume provider), its volume provider
+ * will receive this request instead.
+ *
+ * @see #getPlaybackInfo()
+ * @param direction The direction to adjust the volume in.
+ * @param flags flags from {@link AudioManager} to include with the volume request for local
+ * playback
+ */
+ public void adjustVolume(int direction, int flags) {
+ mProvider.adjustVolume_impl(direction, flags);
+ }
+
+ /**
+ * Get the rating type supported by the session. One of:
+ * <ul>
+ * <li>{@link Rating2#RATING_NONE}</li>
+ * <li>{@link Rating2#RATING_HEART}</li>
+ * <li>{@link Rating2#RATING_THUMB_UP_DOWN}</li>
+ * <li>{@link Rating2#RATING_3_STARS}</li>
+ * <li>{@link Rating2#RATING_4_STARS}</li>
+ * <li>{@link Rating2#RATING_5_STARS}</li>
+ * <li>{@link Rating2#RATING_PERCENTAGE}</li>
+ * </ul>
+ *
+ * @return The supported rating type
+ */
+ public int getRatingType() {
+ return mProvider.getRatingType_impl();
+ }
+
+ /**
+ * Get an intent for launching UI associated with this session if one exists.
+ *
+ * @return A {@link PendingIntent} to launch UI or null.
+ */
+ public @Nullable PendingIntent getSessionActivity() {
+ return mProvider.getSessionActivity_impl();
+ }
+
+ /**
+ * Get the lastly cached {@link PlaybackState2} from
+ * {@link ControllerCallback#onPlaybackStateChanged(PlaybackState2)}.
+ * <p>
+ * It may return {@code null} before the first callback or session has sent {@code null}
+ * playback state.
+ *
+ * @return a playback state. Can be {@code null}
+ */
+ public @Nullable PlaybackState2 getPlaybackState() {
return mProvider.getPlaybackState_impl();
}
/**
- * Add a {@link PlaybackListener} to listen changes in the
- * {@link MediaSession2}.
+ * Get the current playback info for this session.
*
- * @param listener the listener that will be run
- * @param handler the Handler that will receive the listener
- * @throws IllegalArgumentException Called when either the listener or handler is {@code null}.
+ * @return The current playback info or null.
*/
- // TODO(jaewan): Match with the addSessionAvailabilityListener() that tells the current state
- // through the listener.
- // TODO(jaewan): Can handler be null? Follow the API guideline after it's finalized.
- @Override
- public void addPlaybackListener(@NonNull PlaybackListener listener, @NonNull Handler handler) {
- mProvider.addPlaybackListener_impl(listener, handler);
+ public @Nullable PlaybackInfo getPlaybackInfo() {
+ return mProvider.getPlaybackInfo_impl();
}
/**
- * Remove previously added {@link PlaybackListener}.
+ * Rate the current content. This will cause the rating to be set for
+ * the current user. The Rating type must match the type returned by
+ * {@link #getRatingType()}.
*
- * @param listener the listener to be removed
- * @throws IllegalArgumentException if the listener is {@code null}.
+ * @param rating The rating to set for the current content
*/
- @Override
- public void removePlaybackListener(@NonNull PlaybackListener listener) {
- mProvider.removePlaybackListener_impl(listener);
+ public void setRating(Rating2 rating) {
+ mProvider.setRating_impl(rating);
+ }
+
+ /**
+ * Send custom command to the session
+ *
+ * @param command custom command
+ * @param args optional argument
+ * @param cb optional result receiver
+ */
+ public void sendCustomCommand(@NonNull Command command, @Nullable Bundle args,
+ @Nullable ResultReceiver cb) {
+ mProvider.sendCustomCommand_impl(command, args, cb);
+ }
+
+ /**
+ * Return playlist from the session.
+ *
+ * @return playlist. Can be {@code null} if the controller doesn't have enough permission.
+ */
+ public @Nullable List<MediaItem2> getPlaylist() {
+ return mProvider.getPlaylist_impl();
+ }
+
+ /**
+ * Returns the {@link PlaylistParams} for the current play list.
+ * Can return {@code null} if the controller doesn't have enough permission, or if the session
+ * has not set the parameters.
+ */
+ public @Nullable PlaylistParams getPlaylistParams() {
+ return mProvider.getPlaylistParams_impl();
+ }
+
+ /**
+ * Removes the media item at index in the play list.
+ *<p>
+ * If index is same as the current index of the playlist, current playback
+ * will be stopped and playback moves to next source in the list.
+ *
+ * @return the removed DataSourceDesc at index in the play list
+ * @throws IllegalArgumentException if the play list is null
+ * @throws IndexOutOfBoundsException if index is outside play list range
+ */
+ // TODO(jaewan): Remove with index was previously rejected by council (b/36524925)
+ // TODO(jaewan): Should we also add movePlaylistItem from index to index?
+ public void removePlaylistItem(MediaItem2 item) {
+ mProvider.removePlaylistItem_impl(item);
+ }
+
+ /**
+ * Inserts the media item to the play list at position index.
+ * <p>
+ * This will not change the currently playing media item.
+ * If index is less than or equal to the current index of the play list,
+ * the current index of the play list will be incremented correspondingly.
+ *
+ * @param index the index you want to add dsd to the play list
+ * @param item the media item you want to add to the play list
+ * @throws IndexOutOfBoundsException if index is outside play list range
+ * @throws NullPointerException if dsd is null
+ */
+ public void addPlaylistItem(int index, MediaItem2 item) {
+ mProvider.addPlaylistItem_impl(index, item);
}
}
diff --git a/media/java/android/media/MediaDrm.java b/media/java/android/media/MediaDrm.java
index b908c21..90fcaab 100644
--- a/media/java/android/media/MediaDrm.java
+++ b/media/java/android/media/MediaDrm.java
@@ -679,12 +679,14 @@
private int mRequestType;
/**
- * Key request type is initial license request
+ * Key request type is initial license request. A license request
+ * is necessary to load keys.
*/
public static final int REQUEST_TYPE_INITIAL = 0;
/**
- * Key request type is license renewal
+ * Key request type is license renewal. A license request is
+ * necessary to prevent the keys from expiring.
*/
public static final int REQUEST_TYPE_RENEWAL = 1;
@@ -693,11 +695,25 @@
*/
public static final int REQUEST_TYPE_RELEASE = 2;
+ /**
+ * Keys are already loaded. No license request is necessary, and no
+ * key request data is returned.
+ */
+ public static final int REQUEST_TYPE_NONE = 3;
+
+ /**
+ * Keys have been loaded but an additional license request is needed
+ * to update their values.
+ */
+ public static final int REQUEST_TYPE_UPDATE = 4;
+
/** @hide */
@IntDef({
REQUEST_TYPE_INITIAL,
REQUEST_TYPE_RENEWAL,
REQUEST_TYPE_RELEASE,
+ REQUEST_TYPE_NONE,
+ REQUEST_TYPE_UPDATE,
})
@Retention(RetentionPolicy.SOURCE)
public @interface RequestType {}
@@ -738,7 +754,8 @@
/**
* Get the type of the request
* @return one of {@link #REQUEST_TYPE_INITIAL},
- * {@link #REQUEST_TYPE_RENEWAL} or {@link #REQUEST_TYPE_RELEASE}
+ * {@link #REQUEST_TYPE_RENEWAL}, {@link #REQUEST_TYPE_RELEASE},
+ * {@link #REQUEST_TYPE_NONE} or {@link #REQUEST_TYPE_UPDATE}
*/
@RequestType
public int getRequestType() { return mRequestType; }
@@ -925,43 +942,78 @@
throws DeniedByServerException;
/**
- * A means of enforcing limits on the number of concurrent streams per subscriber
- * across devices is provided via SecureStop. This is achieved by securely
- * monitoring the lifetime of sessions.
+ * Secure stops are a way to enforce limits on the number of concurrent
+ * streams per subscriber across devices. They provide secure monitoring of
+ * the lifetime of content decryption keys in MediaDrm sessions.
* <p>
- * Information from the server related to the current playback session is written
- * to persistent storage on the device when each MediaCrypto object is created.
+ * A secure stop is written to secure persistent memory when keys are loaded
+ * into a MediaDrm session. The secure stop state indicates that the keys
+ * are available for use. When playback completes and the keys are removed
+ * or the session is destroyed, the secure stop state is updated to indicate
+ * that keys are no longer usable.
* <p>
- * In the normal case, playback will be completed, the session destroyed and the
- * Secure Stops will be queried. The app queries secure stops and forwards the
- * secure stop message to the server which verifies the signature and notifies the
- * server side database that the session destruction has been confirmed. The persisted
- * record on the client is only removed after positive confirmation that the server
- * received the message using releaseSecureStops().
+ * After playback, the app can query the secure stop and send it in a
+ * message to the license server confirming that the keys are no longer
+ * active. The license server returns a secure stop release response
+ * message to the app which then deletes the secure stop from persistent
+ * memory using {@link #releaseSecureStops}.
+ * @return a list of all secure stops from secure persistent memory
*/
@NonNull
public native List<byte[]> getSecureStops();
/**
- * Access secure stop by secure stop ID.
+ * Return a list of all secure stop IDs currently in persistent memory.
*
- * @param ssid - The secure stop ID provided by the license server.
+ * @return a list of secure stop IDs
+ */
+ @NonNull
+ public native List<byte[]> getSecureStopIds();
+
+ /**
+ * Access a specific secure stop given its secure stop ID.
+ *
+ * @param ssid the ID of the secure stop to return
+ * @return the secure stop identified by ssid
*/
@NonNull
public native byte[] getSecureStop(@NonNull byte[] ssid);
/**
- * Process the SecureStop server response message ssRelease. After authenticating
- * the message, remove the SecureStops identified in the response.
+ * Process the secure stop server response message ssRelease. After
+ * authenticating the message, remove the secure stops identified in the
+ * response.
*
* @param ssRelease the server response indicating which secure stops to release
*/
public native void releaseSecureStops(@NonNull byte[] ssRelease);
/**
- * Remove all secure stops without requiring interaction with the server.
+ * Remove a specific secure stop without requiring a secure stop release message
+ * from the license server.
+ * @param ssid the ID of the secure stop to remove
*/
- public native void releaseAllSecureStops();
+ public native void removeSecureStop(@NonNull byte[] ssid);
+
+ /**
+ * Remove all secure stops without requiring a secure stop release message from
+ * the license server.
+ *
+ * This method was added in API 28. In API versions 18 through 27,
+ * {@link #releaseAllSecureStops} should be called instead. There is no need to
+ * do anything for API versions prior to 18.
+ */
+ public native void removeAllSecureStops();
+
+ /**
+ * Remove all secure stops without requiring a secure stop release message from
+ * the license server.
+ *
+ * @deprecated Remove all secure stops using {@link #removeAllSecureStops} instead.
+ */
+ public void releaseAllSecureStops() {
+ removeAllSecureStops();;
+ }
@Retention(RetentionPolicy.SOURCE)
@IntDef({HDCP_LEVEL_UNKNOWN, HDCP_NONE, HDCP_V1, HDCP_V2,
@@ -1236,8 +1288,6 @@
*
* Additional vendor-specific fields may also be present in
* the return value.
- *
- * @hide - not part of the public API at this time
*/
public PersistableBundle getMetrics() {
PersistableBundle bundle = getMetricsNative();
@@ -1554,8 +1604,6 @@
/**
* Definitions for the metrics that are reported via the
* {@link #getMetrics} call.
- *
- * @hide - not part of the public API at this time
*/
public final static class MetricsConstants
{
@@ -1565,16 +1613,350 @@
* Key to extract the number of successful {@link #openSession} calls
* from the {@link PersistableBundle} returned by a
* {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
*/
public static final String OPEN_SESSION_OK_COUNT
- = "/drm/mediadrm/open_session/ok/count";
+ = "drm.mediadrm.open_session.ok.count";
/**
* Key to extract the number of failed {@link #openSession} calls
* from the {@link PersistableBundle} returned by a
* {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
*/
public static final String OPEN_SESSION_ERROR_COUNT
- = "/drm/mediadrm/open_session/error/count";
+ = "drm.mediadrm.open_session.error.count";
+
+ /**
+ * Key to extract the list of error codes that were returned from
+ * {@link #openSession} calls. The key is used to lookup the list
+ * in the {@link PersistableBundle} returned by a {@link #getMetrics}
+ * call.
+ * The list is an array of Long values
+ * ({@link android.os.BaseBundle#getLongArray}).
+ */
+ public static final String OPEN_SESSION_ERROR_LIST
+ = "drm.mediadrm.open_session.error.list";
+
+ /**
+ * Key to extract the number of successful {@link #closeSession} calls
+ * from the {@link PersistableBundle} returned by a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String CLOSE_SESSION_OK_COUNT
+ = "drm.mediadrm.close_session.ok.count";
+
+ /**
+ * Key to extract the number of failed {@link #closeSession} calls
+ * from the {@link PersistableBundle} returned by a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String CLOSE_SESSION_ERROR_COUNT
+ = "drm.mediadrm.close_session.error.count";
+
+ /**
+ * Key to extract the list of error codes that were returned from
+ * {@link #closeSession} calls. The key is used to lookup the list
+ * in the {@link PersistableBundle} returned by a {@link #getMetrics}
+ * call.
+ * The list is an array of Long values
+ * ({@link android.os.BaseBundle#getLongArray}).
+ */
+ public static final String CLOSE_SESSION_ERROR_LIST
+ = "drm.mediadrm.close_session.error.list";
+
+ /**
+ * Key to extract the start times of sessions. Times are
+ * represented as milliseconds since epoch (1970-01-01T00:00:00Z).
+ * The start times are returned from the {@link PersistableBundle}
+ * from a {@link #getMetrics} call.
+ * The start times are returned as another {@link PersistableBundle}
+ * containing the session ids as keys and the start times as long
+ * values. Use {@link android.os.BaseBundle#keySet} to get the list of
+ * session ids, and then {@link android.os.BaseBundle#getLong} to get
+ * the start time for each session.
+ */
+ public static final String SESSION_START_TIMES_MS
+ = "drm.mediadrm.session_start_times_ms";
+
+ /**
+ * Key to extract the end times of sessions. Times are
+ * represented as milliseconds since epoch (1970-01-01T00:00:00Z).
+ * The end times are returned from the {@link PersistableBundle}
+ * from a {@link #getMetrics} call.
+ * The end times are returned as another {@link PersistableBundle}
+ * containing the session ids as keys and the end times as long
+ * values. Use {@link android.os.BaseBundle#keySet} to get the list of
+ * session ids, and then {@link android.os.BaseBundle#getLong} to get
+ * the end time for each session.
+ */
+ public static final String SESSION_END_TIMES_MS
+ = "drm.mediadrm.session_end_times_ms";
+
+ /**
+ * Key to extract the number of successful {@link #getKeyRequest} calls
+ * from the {@link PersistableBundle} returned by a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String GET_KEY_REQUEST_OK_COUNT
+ = "drm.mediadrm.get_key_request.ok.count";
+
+ /**
+ * Key to extract the number of failed {@link #getKeyRequest}
+ * calls from the {@link PersistableBundle} returned by a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String GET_KEY_REQUEST_ERROR_COUNT
+ = "drm.mediadrm.get_key_request.error.count";
+
+ /**
+ * Key to extract the list of error codes that were returned from
+ * {@link #getKeyRequest} calls. The key is used to lookup the list
+ * in the {@link PersistableBundle} returned by a {@link #getMetrics}
+ * call.
+ * The list is an array of Long values
+ * ({@link android.os.BaseBundle#getLongArray}).
+ */
+ public static final String GET_KEY_REQUEST_ERROR_LIST
+ = "drm.mediadrm.get_key_request.error.list";
+
+ /**
+ * Key to extract the average time in microseconds of calls to
+ * {@link #getKeyRequest}. The value is retrieved from the
+ * {@link PersistableBundle} returned from {@link #getMetrics}.
+ * The time is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String GET_KEY_REQUEST_OK_TIME_MICROS
+ = "drm.mediadrm.get_key_request.ok.average_time_micros";
+
+ /**
+ * Key to extract the number of successful {@link #provideKeyResponse}
+ * calls from the {@link PersistableBundle} returned by a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String PROVIDE_KEY_RESPONSE_OK_COUNT
+ = "drm.mediadrm.provide_key_response.ok.count";
+
+ /**
+ * Key to extract the number of failed {@link #provideKeyResponse}
+ * calls from the {@link PersistableBundle} returned by a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String PROVIDE_KEY_RESPONSE_ERROR_COUNT
+ = "drm.mediadrm.provide_key_response.error.count";
+
+ /**
+ * Key to extract the list of error codes that were returned from
+ * {@link #provideKeyResponse} calls. The key is used to lookup the
+ * list in the {@link PersistableBundle} returned by a
+ * {@link #getMetrics} call.
+ * The list is an array of Long values
+ * ({@link android.os.BaseBundle#getLongArray}).
+ */
+ public static final String PROVIDE_KEY_RESPONSE_ERROR_LIST
+ = "drm.mediadrm.provide_key_response.error.list";
+
+ /**
+ * Key to extract the average time in microseconds of calls to
+ * {@link #provideKeyResponse}. The valus is retrieved from the
+ * {@link PersistableBundle} returned from {@link #getMetrics}.
+ * The time is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String PROVIDE_KEY_RESPONSE_OK_TIME_MICROS
+ = "drm.mediadrm.provide_key_response.ok.average_time_micros";
+
+ /**
+ * Key to extract the number of successful {@link #getProvisionRequest}
+ * calls from the {@link PersistableBundle} returned by a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String GET_PROVISION_REQUEST_OK_COUNT
+ = "drm.mediadrm.get_provision_request.ok.count";
+
+ /**
+ * Key to extract the number of failed {@link #getProvisionRequest}
+ * calls from the {@link PersistableBundle} returned by a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String GET_PROVISION_REQUEST_ERROR_COUNT
+ = "drm.mediadrm.get_provision_request.error.count";
+
+ /**
+ * Key to extract the list of error codes that were returned from
+ * {@link #getProvisionRequest} calls. The key is used to lookup the
+ * list in the {@link PersistableBundle} returned by a
+ * {@link #getMetrics} call.
+ * The list is an array of Long values
+ * ({@link android.os.BaseBundle#getLongArray}).
+ */
+ public static final String GET_PROVISION_REQUEST_ERROR_LIST
+ = "drm.mediadrm.get_provision_request.error.list";
+
+ /**
+ * Key to extract the number of successful
+ * {@link #provideProvisionResponse} calls from the
+ * {@link PersistableBundle} returned by a {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String PROVIDE_PROVISION_RESPONSE_OK_COUNT
+ = "drm.mediadrm.provide_provision_response.ok.count";
+
+ /**
+ * Key to extract the number of failed
+ * {@link #provideProvisionResponse} calls from the
+ * {@link PersistableBundle} returned by a {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String PROVIDE_PROVISION_RESPONSE_ERROR_COUNT
+ = "drm.mediadrm.provide_provision_response.error.count";
+
+ /**
+ * Key to extract the list of error codes that were returned from
+ * {@link #provideProvisionResponse} calls. The key is used to lookup
+ * the list in the {@link PersistableBundle} returned by a
+ * {@link #getMetrics} call.
+ * The list is an array of Long values
+ * ({@link android.os.BaseBundle#getLongArray}).
+ */
+ public static final String PROVIDE_PROVISION_RESPONSE_ERROR_LIST
+ = "drm.mediadrm.provide_provision_response.error.list";
+
+ /**
+ * Key to extract the number of successful
+ * {@link #getPropertyByteArray} calls were made with the
+ * {@link #PROPERTY_DEVICE_UNIQUE_ID} value. The key is used to lookup
+ * the value in the {@link PersistableBundle} returned by a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String GET_DEVICE_UNIQUE_ID_OK_COUNT
+ = "drm.mediadrm.get_device_unique_id.ok.count";
+
+ /**
+ * Key to extract the number of failed
+ * {@link #getPropertyByteArray} calls were made with the
+ * {@link #PROPERTY_DEVICE_UNIQUE_ID} value. The key is used to lookup
+ * the value in the {@link PersistableBundle} returned by a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String GET_DEVICE_UNIQUE_ID_ERROR_COUNT
+ = "drm.mediadrm.get_device_unique_id.error.count";
+
+ /**
+ * Key to extract the list of error codes that were returned from
+ * {@link #getPropertyByteArray} calls with the
+ * {@link #PROPERTY_DEVICE_UNIQUE_ID} value. The key is used to lookup
+ * the list in the {@link PersistableBundle} returned by a
+ * {@link #getMetrics} call.
+ * The list is an array of Long values
+ * ({@link android.os.BaseBundle#getLongArray}).
+ */
+ public static final String GET_DEVICE_UNIQUE_ID_ERROR_LIST
+ = "drm.mediadrm.get_device_unique_id.error.list";
+
+ /**
+ * Key to extraact the count of {@link KeyStatus#STATUS_EXPIRED} events
+ * that occured. The count is extracted from the
+ * {@link PersistableBundle} returned from a {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String KEY_STATUS_EXPIRED_COUNT
+ = "drm.mediadrm.key_status.EXPIRED.count";
+
+ /**
+ * Key to extract the count of {@link KeyStatus#STATUS_INTERNAL_ERROR}
+ * events that occured. The count is extracted from the
+ * {@link PersistableBundle} returned from a {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String KEY_STATUS_INTERNAL_ERROR_COUNT
+ = "drm.mediadrm.key_status.INTERNAL_ERROR.count";
+
+ /**
+ * Key to extract the count of
+ * {@link KeyStatus#STATUS_OUTPUT_NOT_ALLOWED} events that occured.
+ * The count is extracted from the
+ * {@link PersistableBundle} returned from a {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String KEY_STATUS_OUTPUT_NOT_ALLOWED_COUNT
+ = "drm.mediadrm.key_status_change.OUTPUT_NOT_ALLOWED.count";
+
+ /**
+ * Key to extract the count of {@link KeyStatus#STATUS_PENDING}
+ * events that occured. The count is extracted from the
+ * {@link PersistableBundle} returned from a {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String KEY_STATUS_PENDING_COUNT
+ = "drm.mediadrm.key_status_change.PENDING.count";
+
+ /**
+ * Key to extract the count of {@link KeyStatus#STATUS_USABLE}
+ * events that occured. The count is extracted from the
+ * {@link PersistableBundle} returned from a {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String KEY_STATUS_USABLE_COUNT
+ = "drm.mediadrm.key_status_change.USABLE.count";
+
+ /**
+ * Key to extract the count of {@link OnEventListener#onEvent}
+ * calls of type PROVISION_REQUIRED occured. The count is
+ * extracted from the {@link PersistableBundle} returned from a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String EVENT_PROVISION_REQUIRED_COUNT
+ = "drm.mediadrm.event.PROVISION_REQUIRED.count";
+
+ /**
+ * Key to extract the count of {@link OnEventListener#onEvent}
+ * calls of type KEY_NEEDED occured. The count is
+ * extracted from the {@link PersistableBundle} returned from a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String EVENT_KEY_NEEDED_COUNT
+ = "drm.mediadrm.event.KEY_NEEDED.count";
+
+ /**
+ * Key to extract the count of {@link OnEventListener#onEvent}
+ * calls of type KEY_EXPIRED occured. The count is
+ * extracted from the {@link PersistableBundle} returned from a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String EVENT_KEY_EXPIRED_COUNT
+ = "drm.mediadrm.event.KEY_EXPIRED.count";
+
+ /**
+ * Key to extract the count of {@link OnEventListener#onEvent}
+ * calls of type VENDOR_DEFINED. The count is
+ * extracted from the {@link PersistableBundle} returned from a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String EVENT_VENDOR_DEFINED_COUNT
+ = "drm.mediadrm.event.VENDOR_DEFINED.count";
+
+ /**
+ * Key to extract the count of {@link OnEventListener#onEvent}
+ * calls of type SESSION_RECLAIMED. The count is
+ * extracted from the {@link PersistableBundle} returned from a
+ * {@link #getMetrics} call.
+ * The count is a Long value ({@link android.os.BaseBundle#getLong}).
+ */
+ public static final String EVENT_SESSION_RECLAIMED_COUNT
+ = "drm.mediadrm.event.SESSION_RECLAIMED.count";
}
}
diff --git a/media/java/android/media/MediaExtractor.java b/media/java/android/media/MediaExtractor.java
index 2c1b4b3..174d6a3 100644
--- a/media/java/android/media/MediaExtractor.java
+++ b/media/java/android/media/MediaExtractor.java
@@ -626,6 +626,12 @@
*/
public native long getSampleTime();
+ /**
+ * @return size of the current sample in bytes or -1 if no more
+ * samples are available.
+ */
+ public native long getSampleSize();
+
// Keep these in sync with their equivalents in NuMediaExtractor.h
/**
* The sample is a sync sample (or in {@link MediaCodec}'s terminology
diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java
index c6496eb..e9128e4 100644
--- a/media/java/android/media/MediaFormat.java
+++ b/media/java/android/media/MediaFormat.java
@@ -601,8 +601,6 @@
* codec specific, but lower values generally result in more efficient
* (smaller-sized) encoding.
*
- * @hide
- *
* @see MediaCodecInfo.EncoderCapabilities#getQualityRange()
*/
public static final String KEY_QUALITY = "quality";
diff --git a/media/java/android/media/MediaItem2.java b/media/java/android/media/MediaItem2.java
new file mode 100644
index 0000000..2e9894b
--- /dev/null
+++ b/media/java/android/media/MediaItem2.java
@@ -0,0 +1,161 @@
+/*
+ * 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.media;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.content.Context;
+import android.media.update.ApiLoader;
+import android.media.update.MediaItem2Provider;
+import android.os.Bundle;
+import android.text.TextUtils;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * A class with information on a single media item with the metadata information.
+ * Media item are application dependent so we cannot guarantee that they contain the right values.
+ * <p>
+ * When it's sent to a controller or browser, it's anonymized and data descriptor wouldn't be sent.
+ * <p>
+ * This object isn't a thread safe.
+ * @hide
+ */
+public class MediaItem2 {
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(flag=true, value = { FLAG_BROWSABLE, FLAG_PLAYABLE })
+ public @interface Flags { }
+
+ /**
+ * Flag: Indicates that the item has children of its own.
+ */
+ public static final int FLAG_BROWSABLE = 1 << 0;
+
+ /**
+ * Flag: Indicates that the item is playable.
+ * <p>
+ * The id of this item may be passed to
+ * {@link MediaController2#playFromMediaId(String, Bundle)}
+ */
+ public static final int FLAG_PLAYABLE = 1 << 1;
+
+ private final MediaItem2Provider mProvider;
+
+ /**
+ * Create a new media item.
+ *
+ * @param mediaId id of this item. It must be unique whithin this app
+ * @param metadata metadata with the media id.
+ * @param flags The flags for this item.
+ */
+ public MediaItem2(@NonNull Context context, @NonNull String mediaId,
+ @NonNull DataSourceDesc dsd, @Nullable MediaMetadata2 metadata,
+ @Flags int flags) {
+ mProvider = ApiLoader.getProvider(context).createMediaItem2Provider(
+ context, this, mediaId, dsd, metadata, flags);
+ }
+
+ /**
+ * Create a new media item
+ * @hide
+ */
+ @SystemApi
+ public MediaItem2(MediaItem2Provider provider) {
+ mProvider = provider;
+ }
+
+ /**
+ * Return this object as a bundle to share between processes.
+ *
+ * @return a new bundle instance
+ */
+ public Bundle toBundle() {
+ // TODO(jaewan): Fill here when we rebase.
+ return mProvider.toBundle_impl();
+ }
+
+ public static MediaItem2 fromBundle(Context context, Bundle bundle) {
+ return ApiLoader.getProvider(context).fromBundle_MediaItem2(context, bundle);
+ }
+
+ public String toString() {
+ return mProvider.toString_impl();
+ }
+
+ /**
+ * Gets the flags of the item.
+ */
+ public @Flags int getFlags() {
+ return mProvider.getFlags_impl();
+ }
+
+ /**
+ * Returns whether this item is browsable.
+ * @see #FLAG_BROWSABLE
+ */
+ public boolean isBrowsable() {
+ return mProvider.isBrowsable_impl();
+ }
+
+ /**
+ * Returns whether this item is playable.
+ * @see #FLAG_PLAYABLE
+ */
+ public boolean isPlayable() {
+ return mProvider.isPlayable_impl();
+ }
+
+ /**
+ * Set a metadata. Metadata shouldn't be {@code null} and its id should be match
+ * with this instance's id.
+ *
+ * @param metadata metadata to update
+ */
+ public void setMetadata(@NonNull MediaMetadata2 metadata) {
+ mProvider.setMetadata_impl(metadata);
+ }
+
+ /**
+ * Returns the metadata of the media.
+ */
+ public @NonNull MediaMetadata2 getMetadata() {
+ return mProvider.getMetadata_impl();
+ }
+
+ /**
+ * Returns the media id in the {@link MediaMetadata2} for this item.
+ * @see MediaMetadata2#METADATA_KEY_MEDIA_ID
+ */
+ public @Nullable String getMediaId() {
+ return mProvider.getMediaId_impl();
+ }
+
+ /**
+ * Return the {@link DataSourceDesc}
+ * <p>
+ * Can be {@code null} if the MediaItem2 came from another process and anonymized
+ *
+ * @return data source descriptor
+ */
+ public @Nullable DataSourceDesc getDataSourceDesc() {
+ return mProvider.getDataSourceDesc_impl();
+ }
+}
diff --git a/media/java/android/media/MediaLibraryService2.java b/media/java/android/media/MediaLibraryService2.java
index bbc9407..79b105f 100644
--- a/media/java/android/media/MediaLibraryService2.java
+++ b/media/java/android/media/MediaLibraryService2.java
@@ -16,15 +16,21 @@
package android.media;
+import android.annotation.CallbackExecutor;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.app.PendingIntent;
import android.content.Context;
import android.media.MediaSession2.BuilderBase;
import android.media.MediaSession2.ControllerInfo;
import android.media.update.ApiLoader;
+import android.media.update.MediaLibraryService2Provider.MediaLibrarySessionProvider;
+import android.media.update.MediaSession2Provider;
import android.media.update.MediaSessionService2Provider;
import android.os.Bundle;
-import android.service.media.MediaBrowserService.BrowserRoot;
+
+import java.util.List;
+import java.util.concurrent.Executor;
/**
* Base class for media library services.
@@ -47,7 +53,6 @@
* declare metadata in the manifest as follows.
* @hide
*/
-// TODO(jaewan): Unhide
public abstract class MediaLibraryService2 extends MediaSessionService2 {
/**
* This is the interface name that a service implementing a session service should say that it
@@ -59,14 +64,57 @@
* Session for the media library service.
*/
public class MediaLibrarySession extends MediaSession2 {
- MediaLibrarySession(Context context, MediaPlayerBase player, String id,
- SessionCallback callback) {
- super(context, player, id, callback);
+ private final MediaLibrarySessionProvider mProvider;
+
+ MediaLibrarySession(Context context, MediaPlayerInterface player, String id,
+ VolumeProvider volumeProvider, int ratingType, PendingIntent sessionActivity,
+ Executor callbackExecutor, SessionCallback callback) {
+ super(context, player, id, volumeProvider, ratingType, sessionActivity,
+ callbackExecutor, callback);
+ mProvider = (MediaLibrarySessionProvider) getProvider();
}
- // TODO(jaewan): Place public methods here.
+
+ @Override
+ MediaSession2Provider createProvider(Context context, MediaPlayerInterface player,
+ String id, VolumeProvider volumeProvider, int ratingType,
+ PendingIntent sessionActivity, Executor callbackExecutor,
+ SessionCallback callback) {
+ return ApiLoader.getProvider(context)
+ .createMediaLibraryService2MediaLibrarySession(context, this, player, id,
+ volumeProvider, ratingType, sessionActivity,
+ callbackExecutor, (MediaLibrarySessionCallback) callback);
+ }
+
+ /**
+ * Notify subscribed controller about change in a parent's children.
+ *
+ * @param controller controller to notify
+ * @param parentId
+ * @param options
+ */
+ public void notifyChildrenChanged(@NonNull ControllerInfo controller,
+ @NonNull String parentId, @NonNull Bundle options) {
+ mProvider.notifyChildrenChanged_impl(controller, parentId, options);
+ }
+
+ /**
+ * Notify subscribed controller about change in a parent's children.
+ *
+ * @param parentId parent id
+ * @param options optional bundle
+ */
+ // This is for the backward compatibility.
+ public void notifyChildrenChanged(@NonNull String parentId, @Nullable Bundle options) {
+ mProvider.notifyChildrenChanged_impl(parentId, options);
+ }
}
- public static abstract class MediaLibrarySessionCallback extends MediaSession2.SessionCallback {
+ public static class MediaLibrarySessionCallback extends MediaSession2.SessionCallback {
+
+ public MediaLibrarySessionCallback(Context context) {
+ super(context);
+ }
+
/**
* Called to get the root information for browsing by a particular client.
* <p>
@@ -85,8 +133,76 @@
* @see BrowserRoot#EXTRA_OFFLINE
* @see BrowserRoot#EXTRA_SUGGESTED
*/
- public abstract @Nullable BrowserRoot onGetRoot(
- @NonNull ControllerInfo controllerInfo, @Nullable Bundle rootHints);
+ public @Nullable BrowserRoot onGetRoot(@NonNull ControllerInfo controllerInfo,
+ @Nullable Bundle rootHints) {
+ return null;
+ }
+
+ /**
+ * Called to get the search result. Return search result here for the browser.
+ * <p>
+ * Return an empty list for no search result, and return {@code null} for the error.
+ *
+ * @param query The search query sent from the media browser. It contains keywords separated
+ * by space.
+ * @param extras The bundle of service-specific arguments sent from the media browser.
+ * @return search result. {@code null} for error.
+ */
+ public @Nullable List<MediaItem2> onSearch(@NonNull ControllerInfo controllerInfo,
+ @NonNull String query, @Nullable Bundle extras) {
+ return null;
+ }
+
+ /**
+ * Called to get the search result . Return result here for the browser.
+ * <p>
+ * Return an empty list for no search result, and return {@code null} for the error.
+ *
+ * @param itemId item id to get media item.
+ * @return media item2. {@code null} for error.
+ */
+ public @Nullable MediaItem2 onLoadItem(@NonNull ControllerInfo controllerInfo,
+ @NonNull String itemId) {
+ return null;
+ }
+
+ /**
+ * Called to get the search result. Return search result here for the browser.
+ * <p>
+ * Return an empty list for no search result, and return {@code null} for the error.
+ *
+ * @param parentId parent id to get children
+ * @param page number of page
+ * @param pageSize size of the page
+ * @param options
+ * @return list of children. Can be {@code null}.
+ */
+ public @Nullable List<MediaItem2> onLoadChildren(@NonNull ControllerInfo controller,
+ @NonNull String parentId, int page, int pageSize, @Nullable Bundle options) {
+ return null;
+ }
+
+ /**
+ * Called when a controller subscribes to the parent.
+ *
+ * @param controller controller
+ * @param parentId parent id
+ * @param options optional bundle
+ */
+ public void onSubscribed(@NonNull ControllerInfo controller,
+ String parentId, @Nullable Bundle options) {
+ }
+
+ /**
+ * Called when a controller unsubscribes to the parent.
+ *
+ * @param controller controller
+ * @param parentId parent id
+ * @param options optional bundle
+ */
+ public void onUnsubscribed(@NonNull ControllerInfo controller,
+ String parentId, @Nullable Bundle options) {
+ }
}
/**
@@ -96,24 +212,27 @@
public class MediaLibrarySessionBuilder
extends BuilderBase<MediaLibrarySessionBuilder, MediaLibrarySessionCallback> {
public MediaLibrarySessionBuilder(
- @NonNull Context context, @NonNull MediaPlayerBase player,
+ @NonNull Context context, @NonNull MediaPlayerInterface player,
+ @NonNull @CallbackExecutor Executor callbackExecutor,
@NonNull MediaLibrarySessionCallback callback) {
super(context, player);
- setSessionCallback(callback);
+ setSessionCallback(callbackExecutor, callback);
}
@Override
public MediaLibrarySessionBuilder setSessionCallback(
+ @NonNull @CallbackExecutor Executor callbackExecutor,
@NonNull MediaLibrarySessionCallback callback) {
if (callback == null) {
throw new IllegalArgumentException("MediaLibrarySessionCallback cannot be null");
}
- return super.setSessionCallback(callback);
+ return super.setSessionCallback(callbackExecutor, callback);
}
@Override
- public MediaLibrarySession build() throws IllegalStateException {
- return new MediaLibrarySession(mContext, mPlayer, mId, mCallback);
+ public MediaLibrarySession build() {
+ return new MediaLibrarySession(mContext, mPlayer, mId, mVolumeProvider, mRatingType,
+ mSessionActivity, mCallbackExecutor, mCallback);
}
}
@@ -141,4 +260,95 @@
*/
@Override
public @NonNull abstract MediaLibrarySession onCreateSession(String sessionId);
+
+ /**
+ * Contains information that the browser service needs to send to the client
+ * when first connected.
+ */
+ public static final class BrowserRoot {
+ /**
+ * The lookup key for a boolean that indicates whether the browser service should return a
+ * browser root for recently played media items.
+ *
+ * <p>When creating a media browser for a given media browser service, this key can be
+ * supplied as a root hint for retrieving media items that are recently played.
+ * If the media browser service can provide such media items, the implementation must return
+ * the key in the root hint when
+ * {@link MediaLibrarySessionCallback#onGetRoot(ControllerInfo, Bundle)} is called back.
+ *
+ * <p>The root hint may contain multiple keys.
+ *
+ * @see #EXTRA_OFFLINE
+ * @see #EXTRA_SUGGESTED
+ */
+ public static final String EXTRA_RECENT = "android.media.extra.RECENT";
+
+ /**
+ * The lookup key for a boolean that indicates whether the browser service should return a
+ * browser root for offline media items.
+ *
+ * <p>When creating a media browser for a given media browser service, this key can be
+ * supplied as a root hint for retrieving media items that are can be played without an
+ * internet connection.
+ * If the media browser service can provide such media items, the implementation must return
+ * the key in the root hint when
+ * {@link MediaLibrarySessionCallback#onGetRoot(ControllerInfo, Bundle)} is called back.
+ *
+ * <p>The root hint may contain multiple keys.
+ *
+ * @see #EXTRA_RECENT
+ * @see #EXTRA_SUGGESTED
+ */
+ public static final String EXTRA_OFFLINE = "android.media.extra.OFFLINE";
+
+ /**
+ * The lookup key for a boolean that indicates whether the browser service should return a
+ * browser root for suggested media items.
+ *
+ * <p>When creating a media browser for a given media browser service, this key can be
+ * supplied as a root hint for retrieving the media items suggested by the media browser
+ * service. The list of media items is considered ordered by relevance, first being the top
+ * suggestion.
+ * If the media browser service can provide such media items, the implementation must return
+ * the key in the root hint when
+ * {@link MediaLibrarySessionCallback#onGetRoot(ControllerInfo, Bundle)} is called back.
+ *
+ * <p>The root hint may contain multiple keys.
+ *
+ * @see #EXTRA_RECENT
+ * @see #EXTRA_OFFLINE
+ */
+ public static final String EXTRA_SUGGESTED = "android.media.extra.SUGGESTED";
+
+ final private String mRootId;
+ final private Bundle mExtras;
+
+ /**
+ * Constructs a browser root.
+ * @param rootId The root id for browsing.
+ * @param extras Any extras about the browser service.
+ */
+ public BrowserRoot(@NonNull String rootId, @Nullable Bundle extras) {
+ if (rootId == null) {
+ throw new IllegalArgumentException("The root id in BrowserRoot cannot be null. " +
+ "Use null for BrowserRoot instead.");
+ }
+ mRootId = rootId;
+ mExtras = extras;
+ }
+
+ /**
+ * Gets the root id for browsing.
+ */
+ public String getRootId() {
+ return mRootId;
+ }
+
+ /**
+ * Gets any extras about the browser service.
+ */
+ public Bundle getExtras() {
+ return mExtras;
+ }
+ }
}
diff --git a/media/java/android/media/MediaMetadata2.java b/media/java/android/media/MediaMetadata2.java
new file mode 100644
index 0000000..fcdb4f7
--- /dev/null
+++ b/media/java/android/media/MediaMetadata2.java
@@ -0,0 +1,816 @@
+/*
+ * 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.media;
+
+import android.annotation.Nullable;
+import android.annotation.StringDef;
+import android.graphics.Bitmap;
+import android.net.Uri;
+import android.os.Build;
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.text.TextUtils;
+import android.util.Log;
+import android.util.ArrayMap;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Set;
+
+/**
+ * Contains metadata about an item, such as the title, artist, etc.
+ *
+ * @hide
+ */
+// TODO(jaewan): Move this to updatable
+public final class MediaMetadata2 {
+ private static final String TAG = "MediaMetadata2";
+
+ /**
+ * The title of the media.
+ */
+ public static final String METADATA_KEY_TITLE = "android.media.metadata.TITLE";
+
+ /**
+ * The artist of the media.
+ */
+ public static final String METADATA_KEY_ARTIST = "android.media.metadata.ARTIST";
+
+ /**
+ * The duration of the media in ms. A negative duration indicates that the
+ * duration is unknown (or infinite).
+ */
+ public static final String METADATA_KEY_DURATION = "android.media.metadata.DURATION";
+
+ /**
+ * The album title for the media.
+ */
+ public static final String METADATA_KEY_ALBUM = "android.media.metadata.ALBUM";
+
+ /**
+ * The author of the media.
+ */
+ public static final String METADATA_KEY_AUTHOR = "android.media.metadata.AUTHOR";
+
+ /**
+ * The writer of the media.
+ */
+ public static final String METADATA_KEY_WRITER = "android.media.metadata.WRITER";
+
+ /**
+ * The composer of the media.
+ */
+ public static final String METADATA_KEY_COMPOSER = "android.media.metadata.COMPOSER";
+
+ /**
+ * The compilation status of the media.
+ */
+ public static final String METADATA_KEY_COMPILATION = "android.media.metadata.COMPILATION";
+
+ /**
+ * The date the media was created or published. The format is unspecified
+ * but RFC 3339 is recommended.
+ */
+ public static final String METADATA_KEY_DATE = "android.media.metadata.DATE";
+
+ /**
+ * The year the media was created or published as a long.
+ */
+ public static final String METADATA_KEY_YEAR = "android.media.metadata.YEAR";
+
+ /**
+ * The genre of the media.
+ */
+ public static final String METADATA_KEY_GENRE = "android.media.metadata.GENRE";
+
+ /**
+ * The track number for the media.
+ */
+ public static final String METADATA_KEY_TRACK_NUMBER = "android.media.metadata.TRACK_NUMBER";
+
+ /**
+ * The number of tracks in the media's original source.
+ */
+ public static final String METADATA_KEY_NUM_TRACKS = "android.media.metadata.NUM_TRACKS";
+
+ /**
+ * The disc number for the media's original source.
+ */
+ public static final String METADATA_KEY_DISC_NUMBER = "android.media.metadata.DISC_NUMBER";
+
+ /**
+ * The artist for the album of the media's original source.
+ */
+ public static final String METADATA_KEY_ALBUM_ARTIST = "android.media.metadata.ALBUM_ARTIST";
+
+ /**
+ * The artwork for the media as a {@link Bitmap}.
+ *
+ * The artwork should be relatively small and may be scaled down
+ * if it is too large. For higher resolution artwork
+ * {@link #METADATA_KEY_ART_URI} should be used instead.
+ */
+ public static final String METADATA_KEY_ART = "android.media.metadata.ART";
+
+ /**
+ * The artwork for the media as a Uri style String.
+ */
+ public static final String METADATA_KEY_ART_URI = "android.media.metadata.ART_URI";
+
+ /**
+ * The artwork for the album of the media's original source as a
+ * {@link Bitmap}.
+ * The artwork should be relatively small and may be scaled down
+ * if it is too large. For higher resolution artwork
+ * {@link #METADATA_KEY_ALBUM_ART_URI} should be used instead.
+ */
+ public static final String METADATA_KEY_ALBUM_ART = "android.media.metadata.ALBUM_ART";
+
+ /**
+ * The artwork for the album of the media's original source as a Uri style
+ * String.
+ */
+ public static final String METADATA_KEY_ALBUM_ART_URI = "android.media.metadata.ALBUM_ART_URI";
+
+ /**
+ * The user's rating for the media.
+ *
+ * @see Rating
+ */
+ public static final String METADATA_KEY_USER_RATING = "android.media.metadata.USER_RATING";
+
+ /**
+ * The overall rating for the media.
+ *
+ * @see Rating
+ */
+ public static final String METADATA_KEY_RATING = "android.media.metadata.RATING";
+
+ /**
+ * A title that is suitable for display to the user. This will generally be
+ * the same as {@link #METADATA_KEY_TITLE} but may differ for some formats.
+ * When displaying media described by this metadata this should be preferred
+ * if present.
+ */
+ public static final String METADATA_KEY_DISPLAY_TITLE = "android.media.metadata.DISPLAY_TITLE";
+
+ /**
+ * A subtitle that is suitable for display to the user. When displaying a
+ * second line for media described by this metadata this should be preferred
+ * to other fields if present.
+ */
+ public static final String METADATA_KEY_DISPLAY_SUBTITLE
+ = "android.media.metadata.DISPLAY_SUBTITLE";
+
+ /**
+ * A description that is suitable for display to the user. When displaying
+ * more information for media described by this metadata this should be
+ * preferred to other fields if present.
+ */
+ public static final String METADATA_KEY_DISPLAY_DESCRIPTION
+ = "android.media.metadata.DISPLAY_DESCRIPTION";
+
+ /**
+ * An icon or thumbnail that is suitable for display to the user. When
+ * displaying an icon for media described by this metadata this should be
+ * preferred to other fields if present. This must be a {@link Bitmap}.
+ *
+ * The icon should be relatively small and may be scaled down
+ * if it is too large. For higher resolution artwork
+ * {@link #METADATA_KEY_DISPLAY_ICON_URI} should be used instead.
+ */
+ public static final String METADATA_KEY_DISPLAY_ICON
+ = "android.media.metadata.DISPLAY_ICON";
+
+ /**
+ * An icon or thumbnail that is suitable for display to the user. When
+ * displaying more information for media described by this metadata the
+ * display description should be preferred to other fields when present.
+ * This must be a Uri style String.
+ */
+ public static final String METADATA_KEY_DISPLAY_ICON_URI
+ = "android.media.metadata.DISPLAY_ICON_URI";
+
+ /**
+ * A String key for identifying the content. This value is specific to the
+ * service providing the content. If used, this should be a persistent
+ * unique key for the underlying content. It may be used with
+ * {@link MediaController2#playFromMediaId(String, Bundle)}
+ * to initiate playback when provided by a {@link MediaBrowser2} connected to
+ * the same app.
+ */
+ public static final String METADATA_KEY_MEDIA_ID = "android.media.metadata.MEDIA_ID";
+
+ /**
+ * A Uri formatted String representing the content. This value is specific to the
+ * service providing the content. It may be used with
+ * {@link MediaController2#playFromUri(String, Bundle)}
+ * to initiate playback when provided by a {@link MediaBrowser2} connected to
+ * the same app.
+ */
+ public static final String METADATA_KEY_MEDIA_URI = "android.media.metadata.MEDIA_URI";
+
+ /**
+ * The bluetooth folder type of the media specified in the section 6.10.2.2 of the Bluetooth
+ * AVRCP 1.5. It should be one of the following:
+ * <ul>
+ * <li>{@link #BT_FOLDER_TYPE_MIXED}</li>
+ * <li>{@link #BT_FOLDER_TYPE_TITLES}</li>
+ * <li>{@link #BT_FOLDER_TYPE_ALBUMS}</li>
+ * <li>{@link #BT_FOLDER_TYPE_ARTISTS}</li>
+ * <li>{@link #BT_FOLDER_TYPE_GENRES}</li>
+ * <li>{@link #BT_FOLDER_TYPE_PLAYLISTS}</li>
+ * <li>{@link #BT_FOLDER_TYPE_YEARS}</li>
+ * </ul>
+ */
+ public static final String METADATA_KEY_BT_FOLDER_TYPE
+ = "android.media.metadata.BT_FOLDER_TYPE";
+
+ /**
+ * The type of folder that is unknown or contains media elements of mixed types as specified in
+ * the section 6.10.2.2 of the Bluetooth AVRCP 1.5.
+ */
+ public static final long BT_FOLDER_TYPE_MIXED = 0;
+
+ /**
+ * The type of folder that contains media elements only as specified in the section 6.10.2.2 of
+ * the Bluetooth AVRCP 1.5.
+ */
+ public static final long BT_FOLDER_TYPE_TITLES = 1;
+
+ /**
+ * The type of folder that contains folders categorized by album as specified in the section
+ * 6.10.2.2 of the Bluetooth AVRCP 1.5.
+ */
+ public static final long BT_FOLDER_TYPE_ALBUMS = 2;
+
+ /**
+ * The type of folder that contains folders categorized by artist as specified in the section
+ * 6.10.2.2 of the Bluetooth AVRCP 1.5.
+ */
+ public static final long BT_FOLDER_TYPE_ARTISTS = 3;
+
+ /**
+ * The type of folder that contains folders categorized by genre as specified in the section
+ * 6.10.2.2 of the Bluetooth AVRCP 1.5.
+ */
+ public static final long BT_FOLDER_TYPE_GENRES = 4;
+
+ /**
+ * The type of folder that contains folders categorized by playlist as specified in the section
+ * 6.10.2.2 of the Bluetooth AVRCP 1.5.
+ */
+ public static final long BT_FOLDER_TYPE_PLAYLISTS = 5;
+
+ /**
+ * The type of folder that contains folders categorized by year as specified in the section
+ * 6.10.2.2 of the Bluetooth AVRCP 1.5.
+ */
+ public static final long BT_FOLDER_TYPE_YEARS = 6;
+
+ /**
+ * Whether the media is an advertisement. A value of 0 indicates it is not an advertisement. A
+ * value of 1 or non-zero indicates it is an advertisement. If not specified, this value is set
+ * to 0 by default.
+ */
+ public static final String METADATA_KEY_ADVERTISEMENT = "android.media.metadata.ADVERTISEMENT";
+
+ /**
+ * The download status of the media which will be used for later offline playback. It should be
+ * one of the following:
+ *
+ * <ul>
+ * <li>{@link #STATUS_NOT_DOWNLOADED}</li>
+ * <li>{@link #STATUS_DOWNLOADING}</li>
+ * <li>{@link #STATUS_DOWNLOADED}</li>
+ * </ul>
+ */
+ public static final String METADATA_KEY_DOWNLOAD_STATUS =
+ "android.media.metadata.DOWNLOAD_STATUS";
+
+ /**
+ * The status value to indicate the media item is not downloaded.
+ *
+ * @see #METADATA_KEY_DOWNLOAD_STATUS
+ */
+ public static final long STATUS_NOT_DOWNLOADED = 0;
+
+ /**
+ * The status value to indicate the media item is being downloaded.
+ *
+ * @see #METADATA_KEY_DOWNLOAD_STATUS
+ */
+ public static final long STATUS_DOWNLOADING = 1;
+
+ /**
+ * The status value to indicate the media item is downloaded for later offline playback.
+ *
+ * @see #METADATA_KEY_DOWNLOAD_STATUS
+ */
+ public static final long STATUS_DOWNLOADED = 2;
+
+ /**
+ * A {@link Bundle} extra.
+ * @hide
+ */
+ public static final String METADATA_KEY_EXTRA = "android.media.metadata.EXTRA";
+
+ /**
+ * @hide
+ */
+ @StringDef({METADATA_KEY_TITLE, METADATA_KEY_ARTIST, METADATA_KEY_ALBUM, METADATA_KEY_AUTHOR,
+ METADATA_KEY_WRITER, METADATA_KEY_COMPOSER, METADATA_KEY_COMPILATION,
+ METADATA_KEY_DATE, METADATA_KEY_GENRE, METADATA_KEY_ALBUM_ARTIST, METADATA_KEY_ART_URI,
+ METADATA_KEY_ALBUM_ART_URI, METADATA_KEY_DISPLAY_TITLE, METADATA_KEY_DISPLAY_SUBTITLE,
+ METADATA_KEY_DISPLAY_DESCRIPTION, METADATA_KEY_DISPLAY_ICON_URI,
+ METADATA_KEY_MEDIA_ID, METADATA_KEY_MEDIA_URI})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface TextKey {}
+
+ /**
+ * @hide
+ */
+ @StringDef({METADATA_KEY_DURATION, METADATA_KEY_YEAR, METADATA_KEY_TRACK_NUMBER,
+ METADATA_KEY_NUM_TRACKS, METADATA_KEY_DISC_NUMBER, METADATA_KEY_BT_FOLDER_TYPE,
+ METADATA_KEY_ADVERTISEMENT, METADATA_KEY_DOWNLOAD_STATUS})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface LongKey {}
+
+ /**
+ * @hide
+ */
+ @StringDef({METADATA_KEY_ART, METADATA_KEY_ALBUM_ART, METADATA_KEY_DISPLAY_ICON})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface BitmapKey {}
+
+ /**
+ * @hide
+ */
+ @StringDef({METADATA_KEY_USER_RATING, METADATA_KEY_RATING})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface RatingKey {}
+
+ static final int METADATA_TYPE_LONG = 0;
+ static final int METADATA_TYPE_TEXT = 1;
+ static final int METADATA_TYPE_BITMAP = 2;
+ static final int METADATA_TYPE_RATING = 3;
+ static final ArrayMap<String, Integer> METADATA_KEYS_TYPE;
+
+ static {
+ METADATA_KEYS_TYPE = new ArrayMap<String, Integer>();
+ METADATA_KEYS_TYPE.put(METADATA_KEY_TITLE, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_ARTIST, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_DURATION, METADATA_TYPE_LONG);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_ALBUM, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_AUTHOR, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_WRITER, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_COMPOSER, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_COMPILATION, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_DATE, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_YEAR, METADATA_TYPE_LONG);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_GENRE, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_TRACK_NUMBER, METADATA_TYPE_LONG);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_NUM_TRACKS, METADATA_TYPE_LONG);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_DISC_NUMBER, METADATA_TYPE_LONG);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_ALBUM_ARTIST, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_ART, METADATA_TYPE_BITMAP);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_ART_URI, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_ALBUM_ART, METADATA_TYPE_BITMAP);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_ALBUM_ART_URI, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_USER_RATING, METADATA_TYPE_RATING);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_RATING, METADATA_TYPE_RATING);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_DISPLAY_TITLE, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_DISPLAY_SUBTITLE, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_DISPLAY_DESCRIPTION, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_DISPLAY_ICON, METADATA_TYPE_BITMAP);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_DISPLAY_ICON_URI, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_MEDIA_ID, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_BT_FOLDER_TYPE, METADATA_TYPE_LONG);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_MEDIA_URI, METADATA_TYPE_TEXT);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_ADVERTISEMENT, METADATA_TYPE_LONG);
+ METADATA_KEYS_TYPE.put(METADATA_KEY_DOWNLOAD_STATUS, METADATA_TYPE_LONG);
+ }
+
+ private static final @TextKey String[] PREFERRED_DESCRIPTION_ORDER = {
+ METADATA_KEY_TITLE,
+ METADATA_KEY_ARTIST,
+ METADATA_KEY_ALBUM,
+ METADATA_KEY_ALBUM_ARTIST,
+ METADATA_KEY_WRITER,
+ METADATA_KEY_AUTHOR,
+ METADATA_KEY_COMPOSER
+ };
+
+ private static final @BitmapKey String[] PREFERRED_BITMAP_ORDER = {
+ METADATA_KEY_DISPLAY_ICON,
+ METADATA_KEY_ART,
+ METADATA_KEY_ALBUM_ART
+ };
+
+ private static final @TextKey String[] PREFERRED_URI_ORDER = {
+ METADATA_KEY_DISPLAY_ICON_URI,
+ METADATA_KEY_ART_URI,
+ METADATA_KEY_ALBUM_ART_URI
+ };
+
+ final Bundle mBundle;
+
+ /**
+ * @hide
+ */
+ public MediaMetadata2(Bundle bundle) {
+ mBundle = new Bundle(bundle);
+ }
+
+ /**
+ * Returns true if the given key is contained in the metadata
+ *
+ * @param key a String key
+ * @return true if the key exists in this metadata, false otherwise
+ */
+ public boolean containsKey(String key) {
+ return mBundle.containsKey(key);
+ }
+
+ /**
+ * Returns the value associated with the given key, or null if no mapping of
+ * the desired type exists for the given key or a null value is explicitly
+ * associated with the key.
+ *
+ * @param key The key the value is stored under
+ * @return a CharSequence value, or null
+ */
+ public CharSequence getText(@TextKey String key) {
+ return mBundle.getCharSequence(key);
+ }
+
+ /**
+ * Returns the value associated with the given key, or null if no mapping of
+ * the desired type exists for the given key or a null value is explicitly
+ * associated with the key.
+ *
+ * @
+ * @return media id. Can be {@code null}
+ */
+ public @Nullable String getMediaId() {
+ return getString(METADATA_KEY_MEDIA_ID);
+ }
+
+ /**
+ * Returns the value associated with the given key, or null if no mapping of
+ * the desired type exists for the given key or a null value is explicitly
+ * associated with the key.
+ *
+ * @param key The key the value is stored under
+ * @return a String value, or null
+ */
+ public String getString(@TextKey String key) {
+ CharSequence text = mBundle.getCharSequence(key);
+ if (text != null) {
+ return text.toString();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the value associated with the given key, or 0L if no long exists
+ * for the given key.
+ *
+ * @param key The key the value is stored under
+ * @return a long value
+ */
+ public long getLong(@LongKey String key) {
+ return mBundle.getLong(key, 0);
+ }
+
+ /**
+ * Return a {@link Rating2} for the given key or null if no rating exists for
+ * the given key.
+ *
+ * @param key The key the value is stored under
+ * @return A {@link Rating2} or null
+ */
+ public Rating2 getRating(@RatingKey String key) {
+ // TODO(jaewan): Add backward compatibility
+ Rating2 rating = null;
+ try {
+ rating = Rating2.fromBundle(mBundle.getBundle(key));
+ } catch (Exception e) {
+ // ignore, value was not a rating
+ Log.w(TAG, "Failed to retrieve a key as Rating.", e);
+ }
+ return rating;
+ }
+
+ /**
+ * Return a {@link Bitmap} for the given key or null if no bitmap exists for
+ * the given key.
+ *
+ * @param key The key the value is stored under
+ * @return A {@link Bitmap} or null
+ */
+ public Bitmap getBitmap(@BitmapKey String key) {
+ Bitmap bmp = null;
+ try {
+ bmp = mBundle.getParcelable(key);
+ } catch (Exception e) {
+ // ignore, value was not a bitmap
+ Log.w(TAG, "Failed to retrieve a key as Bitmap.", e);
+ }
+ return bmp;
+ }
+
+ /**
+ * Get the extra {@link Bundle} from the metadata object.
+ *
+ * @return A {@link Bundle} or {@code null}
+ */
+ public Bundle getExtra() {
+ try {
+ return mBundle.getBundle(METADATA_KEY_EXTRA);
+ } catch (Exception e) {
+ // ignore, value was not an bundle
+ Log.w(TAG, "Failed to retrieve an extra");
+ }
+ return null;
+ }
+
+ /**
+ * Get the number of fields in this metadata.
+ *
+ * @return The number of fields in the metadata.
+ */
+ public int size() {
+ return mBundle.size();
+ }
+
+ /**
+ * Returns a Set containing the Strings used as keys in this metadata.
+ *
+ * @return a Set of String keys
+ */
+ public Set<String> keySet() {
+ return mBundle.keySet();
+ }
+
+ /**
+ * Gets the bundle backing the metadata object. This is available to support
+ * backwards compatibility. Apps should not modify the bundle directly.
+ *
+ * @return The Bundle backing this metadata.
+ */
+ public Bundle getBundle() {
+ return mBundle;
+ }
+
+ /**
+ * Use to build MediaMetadata2 objects. The system defined metadata keys must
+ * use the appropriate data type.
+ */
+ public static final class Builder {
+ private final Bundle mBundle;
+
+ /**
+ * Create an empty Builder. Any field that should be included in the
+ * {@link MediaMetadata2} must be added.
+ */
+ public Builder() {
+ mBundle = new Bundle();
+ }
+
+ /**
+ * Create a Builder using a {@link MediaMetadata2} instance to set the
+ * initial values. All fields in the source metadata will be included in
+ * the new metadata. Fields can be overwritten by adding the same key.
+ *
+ * @param source
+ */
+ public Builder(MediaMetadata2 source) {
+ mBundle = new Bundle(source.mBundle);
+ }
+
+ /**
+ * Create a Builder using a {@link MediaMetadata2} instance to set
+ * initial values, but replace bitmaps with a scaled down copy if they
+ * are larger than maxBitmapSize.
+ *
+ * @param source The original metadata to copy.
+ * @param maxBitmapSize The maximum height/width for bitmaps contained
+ * in the metadata.
+ * @hide
+ */
+ public Builder(MediaMetadata2 source, int maxBitmapSize) {
+ this(source);
+ for (String key : mBundle.keySet()) {
+ Object value = mBundle.get(key);
+ if (value instanceof Bitmap) {
+ Bitmap bmp = (Bitmap) value;
+ if (bmp.getHeight() > maxBitmapSize || bmp.getWidth() > maxBitmapSize) {
+ putBitmap(key, scaleBitmap(bmp, maxBitmapSize));
+ }
+ }
+ }
+ }
+
+ /**
+ * Put a CharSequence value into the metadata. Custom keys may be used,
+ * but if the METADATA_KEYs defined in this class are used they may only
+ * be one of the following:
+ * <ul>
+ * <li>{@link #METADATA_KEY_TITLE}</li>
+ * <li>{@link #METADATA_KEY_ARTIST}</li>
+ * <li>{@link #METADATA_KEY_ALBUM}</li>
+ * <li>{@link #METADATA_KEY_AUTHOR}</li>
+ * <li>{@link #METADATA_KEY_WRITER}</li>
+ * <li>{@link #METADATA_KEY_COMPOSER}</li>
+ * <li>{@link #METADATA_KEY_DATE}</li>
+ * <li>{@link #METADATA_KEY_GENRE}</li>
+ * <li>{@link #METADATA_KEY_ALBUM_ARTIST}</li>
+ * <li>{@link #METADATA_KEY_ART_URI}</li>
+ * <li>{@link #METADATA_KEY_ALBUM_ART_URI}</li>
+ * <li>{@link #METADATA_KEY_DISPLAY_TITLE}</li>
+ * <li>{@link #METADATA_KEY_DISPLAY_SUBTITLE}</li>
+ * <li>{@link #METADATA_KEY_DISPLAY_DESCRIPTION}</li>
+ * <li>{@link #METADATA_KEY_DISPLAY_ICON_URI}</li>
+ * </ul>
+ *
+ * @param key The key for referencing this value
+ * @param value The CharSequence value to store
+ * @return The Builder to allow chaining
+ */
+ public Builder putText(@TextKey String key, CharSequence value) {
+ if (METADATA_KEYS_TYPE.containsKey(key)) {
+ if (METADATA_KEYS_TYPE.get(key) != METADATA_TYPE_TEXT) {
+ throw new IllegalArgumentException("The " + key
+ + " key cannot be used to put a CharSequence");
+ }
+ }
+ mBundle.putCharSequence(key, value);
+ return this;
+ }
+
+ /**
+ * Put a String value into the metadata. Custom keys may be used, but if
+ * the METADATA_KEYs defined in this class are used they may only be one
+ * of the following:
+ * <ul>
+ * <li>{@link #METADATA_KEY_TITLE}</li>
+ * <li>{@link #METADATA_KEY_ARTIST}</li>
+ * <li>{@link #METADATA_KEY_ALBUM}</li>
+ * <li>{@link #METADATA_KEY_AUTHOR}</li>
+ * <li>{@link #METADATA_KEY_WRITER}</li>
+ * <li>{@link #METADATA_KEY_COMPOSER}</li>
+ * <li>{@link #METADATA_KEY_DATE}</li>
+ * <li>{@link #METADATA_KEY_GENRE}</li>
+ * <li>{@link #METADATA_KEY_ALBUM_ARTIST}</li>
+ * <li>{@link #METADATA_KEY_ART_URI}</li>
+ * <li>{@link #METADATA_KEY_ALBUM_ART_URI}</li>
+ * <li>{@link #METADATA_KEY_DISPLAY_TITLE}</li>
+ * <li>{@link #METADATA_KEY_DISPLAY_SUBTITLE}</li>
+ * <li>{@link #METADATA_KEY_DISPLAY_DESCRIPTION}</li>
+ * <li>{@link #METADATA_KEY_DISPLAY_ICON_URI}</li>
+ * </ul>
+ *
+ * @param key The key for referencing this value
+ * @param value The String value to store
+ * @return The Builder to allow chaining
+ */
+ public Builder putString(@TextKey String key, String value) {
+ if (METADATA_KEYS_TYPE.containsKey(key)) {
+ if (METADATA_KEYS_TYPE.get(key) != METADATA_TYPE_TEXT) {
+ throw new IllegalArgumentException("The " + key
+ + " key cannot be used to put a String");
+ }
+ }
+ mBundle.putCharSequence(key, value);
+ return this;
+ }
+
+ /**
+ * Put a long value into the metadata. Custom keys may be used, but if
+ * the METADATA_KEYs defined in this class are used they may only be one
+ * of the following:
+ * <ul>
+ * <li>{@link #METADATA_KEY_DURATION}</li>
+ * <li>{@link #METADATA_KEY_TRACK_NUMBER}</li>
+ * <li>{@link #METADATA_KEY_NUM_TRACKS}</li>
+ * <li>{@link #METADATA_KEY_DISC_NUMBER}</li>
+ * <li>{@link #METADATA_KEY_YEAR}</li>
+ * <li>{@link #METADATA_KEY_BT_FOLDER_TYPE}</li>
+ * <li>{@link #METADATA_KEY_ADVERTISEMENT}</li>
+ * <li>{@link #METADATA_KEY_DOWNLOAD_STATUS}</li>
+ * </ul>
+ *
+ * @param key The key for referencing this value
+ * @param value The String value to store
+ * @return The Builder to allow chaining
+ */
+ public Builder putLong(@LongKey String key, long value) {
+ if (METADATA_KEYS_TYPE.containsKey(key)) {
+ if (METADATA_KEYS_TYPE.get(key) != METADATA_TYPE_LONG) {
+ throw new IllegalArgumentException("The " + key
+ + " key cannot be used to put a long");
+ }
+ }
+ mBundle.putLong(key, value);
+ return this;
+ }
+
+ /**
+ * Put a {@link Rating2} into the metadata. Custom keys may be used, but
+ * if the METADATA_KEYs defined in this class are used they may only be
+ * one of the following:
+ * <ul>
+ * <li>{@link #METADATA_KEY_RATING}</li>
+ * <li>{@link #METADATA_KEY_USER_RATING}</li>
+ * </ul>
+ *
+ * @param key The key for referencing this value
+ * @param value The String value to store
+ * @return The Builder to allow chaining
+ */
+ public Builder putRating(@RatingKey String key, Rating2 value) {
+ if (METADATA_KEYS_TYPE.containsKey(key)) {
+ if (METADATA_KEYS_TYPE.get(key) != METADATA_TYPE_RATING) {
+ throw new IllegalArgumentException("The " + key
+ + " key cannot be used to put a Rating");
+ }
+ }
+ mBundle.putBundle(key, value.toBundle());
+
+ return this;
+ }
+
+ /**
+ * Put a {@link Bitmap} into the metadata. Custom keys may be used, but
+ * if the METADATA_KEYs defined in this class are used they may only be
+ * one of the following:
+ * <ul>
+ * <li>{@link #METADATA_KEY_ART}</li>
+ * <li>{@link #METADATA_KEY_ALBUM_ART}</li>
+ * <li>{@link #METADATA_KEY_DISPLAY_ICON}</li>
+ * </ul>
+ * Large bitmaps may be scaled down by the system when
+ * {@link android.media.session.MediaSession#setMetadata} is called.
+ * To pass full resolution images {@link Uri Uris} should be used with
+ * {@link #putString}.
+ *
+ * @param key The key for referencing this value
+ * @param value The Bitmap to store
+ * @return The Builder to allow chaining
+ */
+ public Builder putBitmap(@BitmapKey String key, Bitmap value) {
+ if (METADATA_KEYS_TYPE.containsKey(key)) {
+ if (METADATA_KEYS_TYPE.get(key) != METADATA_TYPE_BITMAP) {
+ throw new IllegalArgumentException("The " + key
+ + " key cannot be used to put a Bitmap");
+ }
+ }
+ mBundle.putParcelable(key, value);
+ return this;
+ }
+
+ /**
+ * Set an extra {@link Bundle} into the metadata.
+ */
+ public Builder setExtra(Bundle bundle) {
+ mBundle.putBundle(METADATA_KEY_EXTRA, bundle);
+ return this;
+ }
+
+ /**
+ * Creates a {@link MediaMetadata2} instance with the specified fields.
+ *
+ * @return The new MediaMetadata2 instance
+ */
+ public MediaMetadata2 build() {
+ return new MediaMetadata2(mBundle);
+ }
+
+ private Bitmap scaleBitmap(Bitmap bmp, int maxSize) {
+ float maxSizeF = maxSize;
+ float widthScale = maxSizeF / bmp.getWidth();
+ float heightScale = maxSizeF / bmp.getHeight();
+ float scale = Math.min(widthScale, heightScale);
+ int height = (int) (bmp.getHeight() * scale);
+ int width = (int) (bmp.getWidth() * scale);
+ return Bitmap.createScaledBitmap(bmp, width, height, true);
+ }
+ }
+}
+
diff --git a/media/java/android/media/MediaPlayer2.java b/media/java/android/media/MediaPlayer2.java
new file mode 100644
index 0000000..d84eedf
--- /dev/null
+++ b/media/java/android/media/MediaPlayer2.java
@@ -0,0 +1,2467 @@
+/*
+ * Copyright 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 android.media;
+
+import android.annotation.CallbackExecutor;
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.Context;
+import android.graphics.SurfaceTexture;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.Parcel;
+import android.os.PersistableBundle;
+import android.view.Surface;
+import android.view.SurfaceHolder;
+import android.media.MediaDrm;
+import android.media.MediaFormat;
+import android.media.MediaPlayer2Impl;
+import android.media.MediaTimeProvider;
+import android.media.PlaybackParams;
+import android.media.SubtitleController;
+import android.media.SubtitleController.Anchor;
+import android.media.SubtitleData;
+import android.media.SubtitleTrack.RenderingWidget;
+import android.media.SyncParams;
+
+import java.io.FileDescriptor;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.AutoCloseable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.net.InetSocketAddress;
+import java.util.concurrent.Executor;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+
+/**
+ * MediaPlayer2 class can be used to control playback
+ * of audio/video files and streams. An example on how to use the methods in
+ * this class can be found in {@link android.widget.VideoView}.
+ *
+ * <p>Topics covered here are:
+ * <ol>
+ * <li><a href="#StateDiagram">State Diagram</a>
+ * <li><a href="#Valid_and_Invalid_States">Valid and Invalid States</a>
+ * <li><a href="#Permissions">Permissions</a>
+ * <li><a href="#Callbacks">Register informational and error callbacks</a>
+ * </ol>
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For more information about how to use MediaPlayer2, read the
+ * <a href="{@docRoot}guide/topics/media/mediaplayer.html">Media Playback</a> developer guide.</p>
+ * </div>
+ *
+ * <a name="StateDiagram"></a>
+ * <h3>State Diagram</h3>
+ *
+ * <p>Playback control of audio/video files and streams is managed as a state
+ * machine. The following diagram shows the life cycle and the states of a
+ * MediaPlayer2 object driven by the supported playback control operations.
+ * The ovals represent the states a MediaPlayer2 object may reside
+ * in. The arcs represent the playback control operations that drive the object
+ * state transition. There are two types of arcs. The arcs with a single arrow
+ * head represent synchronous method calls, while those with
+ * a double arrow head represent asynchronous method calls.</p>
+ *
+ * <p><img src="../../../images/mediaplayer_state_diagram.gif"
+ * alt="MediaPlayer State diagram"
+ * border="0" /></p>
+ *
+ * <p>From this state diagram, one can see that a MediaPlayer2 object has the
+ * following states:</p>
+ * <ul>
+ * <li>When a MediaPlayer2 object is just created using <code>new</code> or
+ * after {@link #reset()} is called, it is in the <em>Idle</em> state; and after
+ * {@link #close()} is called, it is in the <em>End</em> state. Between these
+ * two states is the life cycle of the MediaPlayer2 object.
+ * <ul>
+ * <li> It is a programming error to invoke methods such
+ * as {@link #getCurrentPosition()},
+ * {@link #getDuration()}, {@link #getVideoHeight()},
+ * {@link #getVideoWidth()}, {@link #setAudioAttributes(AudioAttributes)},
+ * {@link #setVolume(float, float)}, {@link #pause()}, {@link #play()},
+ * {@link #seekTo(long, int)} or
+ * {@link #prepareAsync()} in the <em>Idle</em> state.
+ * <li>It is also recommended that once
+ * a MediaPlayer2 object is no longer being used, call {@link #close()} immediately
+ * so that resources used by the internal player engine associated with the
+ * MediaPlayer2 object can be released immediately. Resource may include
+ * singleton resources such as hardware acceleration components and
+ * failure to call {@link #close()} may cause subsequent instances of
+ * MediaPlayer2 objects to fallback to software implementations or fail
+ * altogether. Once the MediaPlayer2
+ * object is in the <em>End</em> state, it can no longer be used and
+ * there is no way to bring it back to any other state. </li>
+ * <li>Furthermore,
+ * the MediaPlayer2 objects created using <code>new</code> is in the
+ * <em>Idle</em> state.
+ * </li>
+ * </ul>
+ * </li>
+ * <li>In general, some playback control operation may fail due to various
+ * reasons, such as unsupported audio/video format, poorly interleaved
+ * audio/video, resolution too high, streaming timeout, and the like.
+ * Thus, error reporting and recovery is an important concern under
+ * these circumstances. Sometimes, due to programming errors, invoking a playback
+ * control operation in an invalid state may also occur. Under all these
+ * error conditions, the internal player engine invokes a user supplied
+ * EventCallback.onError() method if an EventCallback has been
+ * registered beforehand via
+ * {@link #registerEventCallback(Executor, EventCallback)}.
+ * <ul>
+ * <li>It is important to note that once an error occurs, the
+ * MediaPlayer2 object enters the <em>Error</em> state (except as noted
+ * above), even if an error listener has not been registered by the application.</li>
+ * <li>In order to reuse a MediaPlayer2 object that is in the <em>
+ * Error</em> state and recover from the error,
+ * {@link #reset()} can be called to restore the object to its <em>Idle</em>
+ * state.</li>
+ * <li>It is good programming practice to have your application
+ * register a OnErrorListener to look out for error notifications from
+ * the internal player engine.</li>
+ * <li>IllegalStateException is
+ * thrown to prevent programming errors such as calling
+ * {@link #prepareAsync()}, {@link #setDataSource(DataSourceDesc)}, or
+ * {@code setPlaylist} methods in an invalid state. </li>
+ * </ul>
+ * </li>
+ * <li>Calling
+ * {@link #setDataSource(DataSourceDesc)}, or
+ * {@code setPlaylist} transfers a
+ * MediaPlayer2 object in the <em>Idle</em> state to the
+ * <em>Initialized</em> state.
+ * <ul>
+ * <li>An IllegalStateException is thrown if
+ * setDataSource() or setPlaylist() is called in any other state.</li>
+ * <li>It is good programming
+ * practice to always look out for <code>IllegalArgumentException</code>
+ * and <code>IOException</code> that may be thrown from
+ * <code>setDataSource</code> and <code>setPlaylist</code> methods.</li>
+ * </ul>
+ * </li>
+ * <li>A MediaPlayer2 object must first enter the <em>Prepared</em> state
+ * before playback can be started.
+ * <ul>
+ * <li>There are an asynchronous way that the <em>Prepared</em> state can be reached:
+ * a call to {@link #prepareAsync()} (asynchronous) which
+ * first transfers the object to the <em>Preparing</em> state after the
+ * call returns (which occurs almost right way) while the internal
+ * player engine continues working on the rest of preparation work
+ * until the preparation work completes. When the preparation completes,
+ * the internal player engine then calls a user supplied callback method,
+ * onInfo() of the EventCallback interface with {@link #MEDIA_INFO_PREPARED}, if an
+ * EventCallback is registered beforehand via
+ * {@link #registerEventCallback(Executor, EventCallback)}.</li>
+ * <li>It is important to note that
+ * the <em>Preparing</em> state is a transient state, and the behavior
+ * of calling any method with side effect while a MediaPlayer2 object is
+ * in the <em>Preparing</em> state is undefined.</li>
+ * <li>An IllegalStateException is
+ * thrown if {@link #prepareAsync()} is called in
+ * any other state.</li>
+ * <li>While in the <em>Prepared</em> state, properties
+ * such as audio/sound volume, screenOnWhilePlaying, looping can be
+ * adjusted by invoking the corresponding set methods.</li>
+ * </ul>
+ * </li>
+ * <li>To start the playback, {@link #play()} must be called. After
+ * {@link #play()} returns successfully, the MediaPlayer2 object is in the
+ * <em>Started</em> state. {@link #isPlaying()} can be called to test
+ * whether the MediaPlayer2 object is in the <em>Started</em> state.
+ * <ul>
+ * <li>While in the <em>Started</em> state, the internal player engine calls
+ * a user supplied EventCallback.onBufferingUpdate() callback
+ * method if an EventCallback has been registered beforehand
+ * via {@link #registerEventCallback(Executor, EventCallback)}.
+ * This callback allows applications to keep track of the buffering status
+ * while streaming audio/video.</li>
+ * <li>Calling {@link #play()} has not effect
+ * on a MediaPlayer2 object that is already in the <em>Started</em> state.</li>
+ * </ul>
+ * </li>
+ * <li>Playback can be paused and stopped, and the current playback position
+ * can be adjusted. Playback can be paused via {@link #pause()}. When the call to
+ * {@link #pause()} returns, the MediaPlayer2 object enters the
+ * <em>Paused</em> state. Note that the transition from the <em>Started</em>
+ * state to the <em>Paused</em> state and vice versa happens
+ * asynchronously in the player engine. It may take some time before
+ * the state is updated in calls to {@link #isPlaying()}, and it can be
+ * a number of seconds in the case of streamed content.
+ * <ul>
+ * <li>Calling {@link #play()} to resume playback for a paused
+ * MediaPlayer2 object, and the resumed playback
+ * position is the same as where it was paused. When the call to
+ * {@link #play()} returns, the paused MediaPlayer2 object goes back to
+ * the <em>Started</em> state.</li>
+ * <li>Calling {@link #pause()} has no effect on
+ * a MediaPlayer2 object that is already in the <em>Paused</em> state.</li>
+ * </ul>
+ * </li>
+ * <li>The playback position can be adjusted with a call to
+ * {@link #seekTo(long, int)}.
+ * <ul>
+ * <li>Although the asynchronuous {@link #seekTo(long, int)}
+ * call returns right away, the actual seek operation may take a while to
+ * finish, especially for audio/video being streamed. When the actual
+ * seek operation completes, the internal player engine calls a user
+ * supplied EventCallback.onInfo() with {@link #MEDIA_INFO_COMPLETE_CALL_SEEK}
+ * if an EventCallback has been registered beforehand via
+ * {@link #registerEventCallback(Executor, EventCallback)}.</li>
+ * <li>Please
+ * note that {@link #seekTo(long, int)} can also be called in the other states,
+ * such as <em>Prepared</em>, <em>Paused</em> and <em>PlaybackCompleted
+ * </em> state. When {@link #seekTo(long, int)} is called in those states,
+ * one video frame will be displayed if the stream has video and the requested
+ * position is valid.
+ * </li>
+ * <li>Furthermore, the actual current playback position
+ * can be retrieved with a call to {@link #getCurrentPosition()}, which
+ * is helpful for applications such as a Music player that need to keep
+ * track of the playback progress.</li>
+ * </ul>
+ * </li>
+ * <li>When the playback reaches the end of stream, the playback completes.
+ * <ul>
+ * <li>If the looping mode was being set to one of the values of
+ * {@link #LOOPING_MODE_FULL}, {@link #LOOPING_MODE_SINGLE} or
+ * {@link #LOOPING_MODE_SHUFFLE} with
+ * {@link #setLoopingMode(int)}, the MediaPlayer2 object shall remain in
+ * the <em>Started</em> state.</li>
+ * <li>If the looping mode was set to <var>false
+ * </var>, the player engine calls a user supplied callback method,
+ * EventCallback.onCompletion(), if an EventCallback is registered
+ * beforehand via {@link #registerEventCallback(Executor, EventCallback)}.
+ * The invoke of the callback signals that the object is now in the <em>
+ * PlaybackCompleted</em> state.</li>
+ * <li>While in the <em>PlaybackCompleted</em>
+ * state, calling {@link #play()} can restart the playback from the
+ * beginning of the audio/video source.</li>
+ * </ul>
+ *
+ *
+ * <a name="Valid_and_Invalid_States"></a>
+ * <h3>Valid and invalid states</h3>
+ *
+ * <table border="0" cellspacing="0" cellpadding="0">
+ * <tr><td>Method Name </p></td>
+ * <td>Valid Sates </p></td>
+ * <td>Invalid States </p></td>
+ * <td>Comments </p></td></tr>
+ * <tr><td>attachAuxEffect </p></td>
+ * <td>{Initialized, Prepared, Started, Paused, Stopped, PlaybackCompleted} </p></td>
+ * <td>{Idle, Error} </p></td>
+ * <td>This method must be called after setDataSource or setPlaylist.
+ * Calling it does not change the object state. </p></td></tr>
+ * <tr><td>getAudioSessionId </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>This method can be called in any state and calling it does not change
+ * the object state. </p></td></tr>
+ * <tr><td>getCurrentPosition </p></td>
+ * <td>{Idle, Initialized, Prepared, Started, Paused, Stopped,
+ * PlaybackCompleted} </p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method in a valid state does not change the
+ * state. Calling this method in an invalid state transfers the object
+ * to the <em>Error</em> state. </p></td></tr>
+ * <tr><td>getDuration </p></td>
+ * <td>{Prepared, Started, Paused, Stopped, PlaybackCompleted} </p></td>
+ * <td>{Idle, Initialized, Error} </p></td>
+ * <td>Successful invoke of this method in a valid state does not change the
+ * state. Calling this method in an invalid state transfers the object
+ * to the <em>Error</em> state. </p></td></tr>
+ * <tr><td>getVideoHeight </p></td>
+ * <td>{Idle, Initialized, Prepared, Started, Paused, Stopped,
+ * PlaybackCompleted}</p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method in a valid state does not change the
+ * state. Calling this method in an invalid state transfers the object
+ * to the <em>Error</em> state. </p></td></tr>
+ * <tr><td>getVideoWidth </p></td>
+ * <td>{Idle, Initialized, Prepared, Started, Paused, Stopped,
+ * PlaybackCompleted}</p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method in a valid state does not change
+ * the state. Calling this method in an invalid state transfers the
+ * object to the <em>Error</em> state. </p></td></tr>
+ * <tr><td>isPlaying </p></td>
+ * <td>{Idle, Initialized, Prepared, Started, Paused, Stopped,
+ * PlaybackCompleted}</p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method in a valid state does not change
+ * the state. Calling this method in an invalid state transfers the
+ * object to the <em>Error</em> state. </p></td></tr>
+ * <tr><td>pause </p></td>
+ * <td>{Started, Paused, PlaybackCompleted}</p></td>
+ * <td>{Idle, Initialized, Prepared, Stopped, Error}</p></td>
+ * <td>Successful invoke of this method in a valid state transfers the
+ * object to the <em>Paused</em> state. Calling this method in an
+ * invalid state transfers the object to the <em>Error</em> state.</p></td></tr>
+ * <tr><td>prepareAsync </p></td>
+ * <td>{Initialized, Stopped} </p></td>
+ * <td>{Idle, Prepared, Started, Paused, PlaybackCompleted, Error} </p></td>
+ * <td>Successful invoke of this method in a valid state transfers the
+ * object to the <em>Preparing</em> state. Calling this method in an
+ * invalid state throws an IllegalStateException.</p></td></tr>
+ * <tr><td>release </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>After {@link #close()}, the object is no longer available. </p></td></tr>
+ * <tr><td>reset </p></td>
+ * <td>{Idle, Initialized, Prepared, Started, Paused, Stopped,
+ * PlaybackCompleted, Error}</p></td>
+ * <td>{}</p></td>
+ * <td>After {@link #reset()}, the object is like being just created.</p></td></tr>
+ * <tr><td>seekTo </p></td>
+ * <td>{Prepared, Started, Paused, PlaybackCompleted} </p></td>
+ * <td>{Idle, Initialized, Stopped, Error}</p></td>
+ * <td>Successful invoke of this method in a valid state does not change
+ * the state. Calling this method in an invalid state transfers the
+ * object to the <em>Error</em> state. </p></td></tr>
+ * <tr><td>setAudioAttributes </p></td>
+ * <td>{Idle, Initialized, Stopped, Prepared, Started, Paused,
+ * PlaybackCompleted}</p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method does not change the state. In order for the
+ * target audio attributes type to become effective, this method must be called before
+ * prepareAsync().</p></td></tr>
+ * <tr><td>setAudioSessionId </p></td>
+ * <td>{Idle} </p></td>
+ * <td>{Initialized, Prepared, Started, Paused, Stopped, PlaybackCompleted,
+ * Error} </p></td>
+ * <td>This method must be called in idle state as the audio session ID must be known before
+ * calling setDataSource or setPlaylist. Calling it does not change the object
+ * state. </p></td></tr>
+ * <tr><td>setAudioStreamType (deprecated)</p></td>
+ * <td>{Idle, Initialized, Stopped, Prepared, Started, Paused,
+ * PlaybackCompleted}</p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method does not change the state. In order for the
+ * target audio stream type to become effective, this method must be called before
+ * prepareAsync().</p></td></tr>
+ * <tr><td>setAuxEffectSendLevel </p></td>
+ * <td>any</p></td>
+ * <td>{} </p></td>
+ * <td>Calling this method does not change the object state. </p></td></tr>
+ * <tr><td>setDataSource </p></td>
+ * <td>{Idle} </p></td>
+ * <td>{Initialized, Prepared, Started, Paused, Stopped, PlaybackCompleted,
+ * Error} </p></td>
+ * <td>Successful invoke of this method in a valid state transfers the
+ * object to the <em>Initialized</em> state. Calling this method in an
+ * invalid state throws an IllegalStateException.</p></td></tr>
+ * <tr><td>setPlaylist </p></td>
+ * <td>{Idle} </p></td>
+ * <td>{Initialized, Prepared, Started, Paused, Stopped, PlaybackCompleted,
+ * Error} </p></td>
+ * <td>Successful invoke of this method in a valid state transfers the
+ * object to the <em>Initialized</em> state. Calling this method in an
+ * invalid state throws an IllegalStateException.</p></td></tr>
+ * <tr><td>setDisplay </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>This method can be called in any state and calling it does not change
+ * the object state. </p></td></tr>
+ * <tr><td>setSurface </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>This method can be called in any state and calling it does not change
+ * the object state. </p></td></tr>
+ * <tr><td>setLoopingMode </p></td>
+ * <td>{Idle, Initialized, Stopped, Prepared, Started, Paused,
+ * PlaybackCompleted}</p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method in a valid state does not change
+ * the state. Calling this method in an
+ * invalid state transfers the object to the <em>Error</em> state.</p></td></tr>
+ * <tr><td>isLooping </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>This method can be called in any state and calling it does not change
+ * the object state. </p></td></tr>
+ * <tr><td>registerDrmEventCallback </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>This method can be called in any state and calling it does not change
+ * the object state. </p></td></tr>
+ * <tr><td>registerEventCallback </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>This method can be called in any state and calling it does not change
+ * the object state. </p></td></tr>
+ * <tr><td>setPlaybackParams</p></td>
+ * <td>{Initialized, Prepared, Started, Paused, PlaybackCompleted, Error}</p></td>
+ * <td>{Idle, Stopped} </p></td>
+ * <td>This method will change state in some cases, depending on when it's called.
+ * </p></td></tr>
+ * <tr><td>setVolume </p></td>
+ * <td>{Idle, Initialized, Stopped, Prepared, Started, Paused,
+ * PlaybackCompleted}</p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method does not change the state.
+ * <tr><td>play </p></td>
+ * <td>{Prepared, Started, Paused, PlaybackCompleted}</p></td>
+ * <td>{Idle, Initialized, Stopped, Error}</p></td>
+ * <td>Successful invoke of this method in a valid state transfers the
+ * object to the <em>Started</em> state. Calling this method in an
+ * invalid state transfers the object to the <em>Error</em> state.</p></td></tr>
+ * <tr><td>stop </p></td>
+ * <td>{Prepared, Started, Stopped, Paused, PlaybackCompleted}</p></td>
+ * <td>{Idle, Initialized, Error}</p></td>
+ * <td>Successful invoke of this method in a valid state transfers the
+ * object to the <em>Stopped</em> state. Calling this method in an
+ * invalid state transfers the object to the <em>Error</em> state.</p></td></tr>
+ * <tr><td>getTrackInfo </p></td>
+ * <td>{Prepared, Started, Stopped, Paused, PlaybackCompleted}</p></td>
+ * <td>{Idle, Initialized, Error}</p></td>
+ * <td>Successful invoke of this method does not change the state.</p></td></tr>
+ * <tr><td>selectTrack </p></td>
+ * <td>{Prepared, Started, Stopped, Paused, PlaybackCompleted}</p></td>
+ * <td>{Idle, Initialized, Error}</p></td>
+ * <td>Successful invoke of this method does not change the state.</p></td></tr>
+ * <tr><td>deselectTrack </p></td>
+ * <td>{Prepared, Started, Stopped, Paused, PlaybackCompleted}</p></td>
+ * <td>{Idle, Initialized, Error}</p></td>
+ * <td>Successful invoke of this method does not change the state.</p></td></tr>
+ *
+ * </table>
+ *
+ * <a name="Permissions"></a>
+ * <h3>Permissions</h3>
+ * <p>One may need to declare a corresponding WAKE_LOCK permission {@link
+ * android.R.styleable#AndroidManifestUsesPermission <uses-permission>}
+ * element.
+ *
+ * <p>This class requires the {@link android.Manifest.permission#INTERNET} permission
+ * when used with network-based content.
+ *
+ * <a name="Callbacks"></a>
+ * <h3>Callbacks</h3>
+ * <p>Applications may want to register for informational and error
+ * events in order to be informed of some internal state update and
+ * possible runtime errors during playback or streaming. Registration for
+ * these events is done by properly setting the appropriate listeners (via calls
+ * to
+ * {@link #registerEventCallback(Executor, EventCallback)},
+ * {@link #registerDrmEventCallback(Executor, DrmEventCallback)}).
+ * In order to receive the respective callback
+ * associated with these listeners, applications are required to create
+ * MediaPlayer2 objects on a thread with its own Looper running (main UI
+ * thread by default has a Looper running).
+ *
+ */
+public abstract class MediaPlayer2 implements SubtitleController.Listener
+ , AudioRouting
+ , AutoCloseable
+{
+ /**
+ Constant to retrieve only the new metadata since the last
+ call.
+ // FIXME: unhide.
+ // FIXME: add link to getMetadata(boolean, boolean)
+ {@hide}
+ */
+ public static final boolean METADATA_UPDATE_ONLY = true;
+
+ /**
+ Constant to retrieve all the metadata.
+ // FIXME: unhide.
+ // FIXME: add link to getMetadata(boolean, boolean)
+ {@hide}
+ */
+ public static final boolean METADATA_ALL = false;
+
+ /**
+ Constant to enable the metadata filter during retrieval.
+ // FIXME: unhide.
+ // FIXME: add link to getMetadata(boolean, boolean)
+ {@hide}
+ */
+ public static final boolean APPLY_METADATA_FILTER = true;
+
+ /**
+ Constant to disable the metadata filter during retrieval.
+ // FIXME: unhide.
+ // FIXME: add link to getMetadata(boolean, boolean)
+ {@hide}
+ */
+ public static final boolean BYPASS_METADATA_FILTER = false;
+
+ /**
+ * Create a MediaPlayer2 object.
+ *
+ * @return A MediaPlayer2 object created
+ */
+ public static final MediaPlayer2 create() {
+ // TODO: load MediaUpdate APK
+ return new MediaPlayer2Impl();
+ }
+
+ /**
+ * @hide
+ */
+ // add hidden empty constructor so it doesn't show in SDK
+ public MediaPlayer2() { }
+
+ /**
+ * Create a request parcel which can be routed to the native media
+ * player using {@link #invoke(Parcel, Parcel)}. The Parcel
+ * returned has the proper InterfaceToken set. The caller should
+ * not overwrite that token, i.e it can only append data to the
+ * Parcel.
+ *
+ * @return A parcel suitable to hold a request for the native
+ * player.
+ * {@hide}
+ */
+ public Parcel newRequest() {
+ return null;
+ }
+
+ /**
+ * Invoke a generic method on the native player using opaque
+ * parcels for the request and reply. Both payloads' format is a
+ * convention between the java caller and the native player.
+ * Must be called after setDataSource or setPlaylist to make sure a native player
+ * exists. On failure, a RuntimeException is thrown.
+ *
+ * @param request Parcel with the data for the extension. The
+ * caller must use {@link #newRequest()} to get one.
+ *
+ * @param reply Output parcel with the data returned by the
+ * native player.
+ * {@hide}
+ */
+ public void invoke(Parcel request, Parcel reply) { }
+
+ /**
+ * Sets the {@link SurfaceHolder} to use for displaying the video
+ * portion of the media.
+ *
+ * Either a surface holder or surface must be set if a display or video sink
+ * is needed. Not calling this method or {@link #setSurface(Surface)}
+ * when playing back a video will result in only the audio track being played.
+ * A null surface holder or surface will result in only the audio track being
+ * played.
+ *
+ * @param sh the SurfaceHolder to use for video display
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized or has been released.
+ * @hide
+ */
+ public abstract void setDisplay(SurfaceHolder sh);
+
+ /**
+ * Sets the {@link Surface} to be used as the sink for the video portion of
+ * the media. Setting a
+ * Surface will un-set any Surface or SurfaceHolder that was previously set.
+ * A null surface will result in only the audio track being played.
+ *
+ * If the Surface sends frames to a {@link SurfaceTexture}, the timestamps
+ * returned from {@link SurfaceTexture#getTimestamp()} will have an
+ * unspecified zero point. These timestamps cannot be directly compared
+ * between different media sources, different instances of the same media
+ * source, or multiple runs of the same program. The timestamp is normally
+ * monotonically increasing and is unaffected by time-of-day adjustments,
+ * but it is reset when the position is set.
+ *
+ * @param surface The {@link Surface} to be used for the video portion of
+ * the media.
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized or has been released.
+ */
+ public abstract void setSurface(Surface surface);
+
+ /* Do not change these video scaling mode values below without updating
+ * their counterparts in system/window.h! Please do not forget to update
+ * {@link #isVideoScalingModeSupported} when new video scaling modes
+ * are added.
+ */
+ /**
+ * Specifies a video scaling mode. The content is stretched to the
+ * surface rendering area. When the surface has the same aspect ratio
+ * as the content, the aspect ratio of the content is maintained;
+ * otherwise, the aspect ratio of the content is not maintained when video
+ * is being rendered.
+ * There is no content cropping with this video scaling mode.
+ */
+ public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT = 1;
+
+ /**
+ * Specifies a video scaling mode. The content is scaled, maintaining
+ * its aspect ratio. The whole surface area is always used. When the
+ * aspect ratio of the content is the same as the surface, no content
+ * is cropped; otherwise, content is cropped to fit the surface.
+ * @hide
+ */
+ public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING = 2;
+
+ /**
+ * Sets video scaling mode. To make the target video scaling mode
+ * effective during playback, this method must be called after
+ * data source is set. If not called, the default video
+ * scaling mode is {@link #VIDEO_SCALING_MODE_SCALE_TO_FIT}.
+ *
+ * <p> The supported video scaling modes are:
+ * <ul>
+ * <li> {@link #VIDEO_SCALING_MODE_SCALE_TO_FIT}
+ * </ul>
+ *
+ * @param mode target video scaling mode. Must be one of the supported
+ * video scaling modes; otherwise, IllegalArgumentException will be thrown.
+ *
+ * @see MediaPlayer2#VIDEO_SCALING_MODE_SCALE_TO_FIT
+ * @hide
+ */
+ public void setVideoScalingMode(int mode) { }
+
+ /**
+ * Discards all pending commands.
+ */
+ public abstract void clearPendingCommands();
+
+ /**
+ * Sets the data source as described by a DataSourceDesc.
+ *
+ * @param dsd the descriptor of data source you want to play
+ * @throws IllegalStateException if it is called in an invalid state
+ * @throws NullPointerException if dsd is null
+ */
+ public abstract void setDataSource(@NonNull DataSourceDesc dsd) throws IOException;
+
+ /**
+ * Gets the current data source as described by a DataSourceDesc.
+ *
+ * @return the current DataSourceDesc
+ */
+ public abstract DataSourceDesc getCurrentDataSource();
+
+ /**
+ * Sets the play list.
+ *
+ * If startIndex falls outside play list range, it will be clamped to the nearest index
+ * in the play list.
+ *
+ * @param pl the play list of data source you want to play
+ * @param startIndex the index of the DataSourceDesc in the play list you want to play first
+ * @throws IllegalStateException if it is called in an invalid state
+ * @throws IllegalArgumentException if pl is null or empty, or pl contains null DataSourceDesc
+ */
+ public abstract void setPlaylist(@NonNull List<DataSourceDesc> pl, int startIndex)
+ throws IOException;
+
+ /**
+ * Gets a copy of the play list.
+ *
+ * @return a copy of the play list used by {@link MediaPlayer2}
+ */
+ public abstract List<DataSourceDesc> getPlaylist();
+
+ /**
+ * Sets the index of current DataSourceDesc in the play list to be played.
+ *
+ * @param index the index of DataSourceDesc in the play list you want to play
+ * @throws IllegalArgumentException if the play list is null
+ * @throws NullPointerException if index is outside play list range
+ */
+ public abstract void setCurrentPlaylistItem(int index);
+
+ /**
+ * Sets the index of next-to-be-played DataSourceDesc in the play list.
+ *
+ * @param index the index of next-to-be-played DataSourceDesc in the play list
+ * @throws IllegalArgumentException if the play list is null
+ * @throws NullPointerException if index is outside play list range
+ */
+ public abstract void setNextPlaylistItem(int index);
+
+ /**
+ * Gets the current index of play list.
+ *
+ * @return the index of the current DataSourceDesc in the play list
+ */
+ public abstract int getCurrentPlaylistItemIndex();
+
+ /**
+ * Specifies a playback looping mode. The source will not be played in looping mode.
+ */
+ public static final int LOOPING_MODE_NONE = 0;
+ /**
+ * Specifies a playback looping mode. The full list of source will be played in looping mode,
+ * and in the order specified in the play list.
+ */
+ public static final int LOOPING_MODE_FULL = 1;
+ /**
+ * Specifies a playback looping mode. The current DataSourceDesc will be played in looping mode.
+ */
+ public static final int LOOPING_MODE_SINGLE = 2;
+ /**
+ * Specifies a playback looping mode. The full list of source will be played in looping mode,
+ * and in a random order.
+ */
+ public static final int LOOPING_MODE_SHUFFLE = 3;
+
+ /** @hide */
+ @IntDef(
+ value = {
+ LOOPING_MODE_NONE,
+ LOOPING_MODE_FULL,
+ LOOPING_MODE_SINGLE,
+ LOOPING_MODE_SHUFFLE,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface LoopingMode {}
+
+ /**
+ * Sets the looping mode of the play list.
+ * The mode shall be one of {@link #LOOPING_MODE_NONE}, {@link #LOOPING_MODE_FULL},
+ * {@link #LOOPING_MODE_SINGLE}, {@link #LOOPING_MODE_SHUFFLE}.
+ *
+ * @param mode the mode in which the play list will be played
+ * @throws IllegalArgumentException if mode is not supported
+ */
+ public abstract void setLoopingMode(@LoopingMode int mode);
+
+ /**
+ * Gets the looping mode of play list.
+ *
+ * @return the looping mode of the play list
+ */
+ public abstract int getLoopingMode();
+
+ /**
+ * Moves the DataSourceDesc at indexFrom in the play list to indexTo.
+ *
+ * @throws IllegalArgumentException if the play list is null
+ * @throws IndexOutOfBoundsException if indexFrom or indexTo is outside play list range
+ */
+ public abstract void movePlaylistItem(int indexFrom, int indexTo);
+
+ /**
+ * Removes the DataSourceDesc at index in the play list.
+ *
+ * If index is same as the current index of the play list, current DataSourceDesc
+ * will be stopped and playback moves to next source in the list.
+ *
+ * @return the removed DataSourceDesc at index in the play list
+ * @throws IllegalArgumentException if the play list is null
+ * @throws IndexOutOfBoundsException if index is outside play list range
+ */
+ public abstract DataSourceDesc removePlaylistItem(int index);
+
+ /**
+ * Inserts the DataSourceDesc to the play list at position index.
+ *
+ * This will not change the DataSourceDesc currently being played.
+ * If index is less than or equal to the current index of the play list,
+ * the current index of the play list will be incremented correspondingly.
+ *
+ * @param index the index you want to add dsd to the play list
+ * @param dsd the descriptor of data source you want to add to the play list
+ * @throws IndexOutOfBoundsException if index is outside play list range
+ * @throws NullPointerException if dsd is null
+ */
+ public abstract void addPlaylistItem(int index, DataSourceDesc dsd);
+
+ /**
+ * replaces the DataSourceDesc at index in the play list with given dsd.
+ *
+ * When index is same as the current index of the play list, the current source
+ * will be stopped and the new source will be played, except that if new
+ * and old source only differ on end position and current media position is
+ * smaller then the new end position.
+ *
+ * This will not change the DataSourceDesc currently being played.
+ * If index is less than or equal to the current index of the play list,
+ * the current index of the play list will be incremented correspondingly.
+ *
+ * @param index the index you want to add dsd to the play list
+ * @param dsd the descriptor of data source you want to add to the play list
+ * @throws IndexOutOfBoundsException if index is outside play list range
+ * @throws NullPointerException if dsd is null
+ */
+ public abstract DataSourceDesc editPlaylistItem(int index, DataSourceDesc dsd);
+
+ /**
+ * Prepares the player for playback, synchronously.
+ *
+ * After setting the datasource and the display surface, you need to either
+ * call prepare() or prepareAsync(). For files, it is OK to call prepare(),
+ * which blocks until MediaPlayer2 is ready for playback.
+ *
+ * @throws IOException if source can not be accessed
+ * @throws IllegalStateException if it is called in an invalid state
+ * @hide
+ */
+ public void prepare() throws IOException { }
+
+ /**
+ * Prepares the player for playback, asynchronously.
+ *
+ * After setting the datasource and the display surface, you need to
+ * call prepareAsync().
+ *
+ * @throws IllegalStateException if it is called in an invalid state
+ */
+ public abstract void prepareAsync();
+
+ /**
+ * Starts or resumes playback. If playback had previously been paused,
+ * playback will continue from where it was paused. If playback had
+ * been stopped, or never started before, playback will start at the
+ * beginning.
+ *
+ * @throws IllegalStateException if it is called in an invalid state
+ */
+ public abstract void play();
+
+ /**
+ * Stops playback after playback has been started or paused.
+ *
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized.
+ * @hide
+ */
+ public void stop() { }
+
+ /**
+ * Pauses playback. Call play() to resume.
+ *
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized.
+ */
+ public abstract void pause();
+
+ //--------------------------------------------------------------------------
+ // Explicit Routing
+ //--------------------
+
+ /**
+ * Specifies an audio device (via an {@link AudioDeviceInfo} object) to route
+ * the output from this MediaPlayer2.
+ * @param deviceInfo The {@link AudioDeviceInfo} specifying the audio sink or source.
+ * If deviceInfo is null, default routing is restored.
+ * @return true if succesful, false if the specified {@link AudioDeviceInfo} is non-null and
+ * does not correspond to a valid audio device.
+ */
+ @Override
+ public abstract boolean setPreferredDevice(AudioDeviceInfo deviceInfo);
+
+ /**
+ * Returns the selected output specified by {@link #setPreferredDevice}. Note that this
+ * is not guaranteed to correspond to the actual device being used for playback.
+ */
+ @Override
+ public abstract AudioDeviceInfo getPreferredDevice();
+
+ /**
+ * Returns an {@link AudioDeviceInfo} identifying the current routing of this MediaPlayer2
+ * Note: The query is only valid if the MediaPlayer2 is currently playing.
+ * If the player is not playing, the returned device can be null or correspond to previously
+ * selected device when the player was last active.
+ */
+ @Override
+ public abstract AudioDeviceInfo getRoutedDevice();
+
+ /**
+ * Adds an {@link AudioRouting.OnRoutingChangedListener} to receive notifications of routing
+ * changes on this MediaPlayer2.
+ * @param listener The {@link AudioRouting.OnRoutingChangedListener} interface to receive
+ * notifications of rerouting events.
+ * @param handler Specifies the {@link Handler} object for the thread on which to execute
+ * the callback. If <code>null</code>, the handler on the main looper will be used.
+ */
+ @Override
+ public abstract void addOnRoutingChangedListener(AudioRouting.OnRoutingChangedListener listener,
+ Handler handler);
+
+ /**
+ * Removes an {@link AudioRouting.OnRoutingChangedListener} which has been previously added
+ * to receive rerouting notifications.
+ * @param listener The previously added {@link AudioRouting.OnRoutingChangedListener} interface
+ * to remove.
+ */
+ @Override
+ public abstract void removeOnRoutingChangedListener(AudioRouting.OnRoutingChangedListener listener);
+
+ /**
+ * Set the low-level power management behavior for this MediaPlayer2.
+ *
+ * <p>This function has the MediaPlayer2 access the low-level power manager
+ * service to control the device's power usage while playing is occurring.
+ * The parameter is a combination of {@link android.os.PowerManager} wake flags.
+ * Use of this method requires {@link android.Manifest.permission#WAKE_LOCK}
+ * permission.
+ * By default, no attempt is made to keep the device awake during playback.
+ *
+ * @param context the Context to use
+ * @param mode the power/wake mode to set
+ * @see android.os.PowerManager
+ * @hide
+ */
+ public abstract void setWakeMode(Context context, int mode);
+
+ /**
+ * Control whether we should use the attached SurfaceHolder to keep the
+ * screen on while video playback is occurring. This is the preferred
+ * method over {@link #setWakeMode} where possible, since it doesn't
+ * require that the application have permission for low-level wake lock
+ * access.
+ *
+ * @param screenOn Supply true to keep the screen on, false to allow it
+ * to turn off.
+ * @hide
+ */
+ public abstract void setScreenOnWhilePlaying(boolean screenOn);
+
+ /**
+ * Returns the width of the video.
+ *
+ * @return the width of the video, or 0 if there is no video,
+ * no display surface was set, or the width has not been determined
+ * yet. The {@code EventCallback} can be registered via
+ * {@link #registerEventCallback(Executor, EventCallback)} to provide a
+ * notification {@code EventCallback.onVideoSizeChanged} when the width is available.
+ */
+ public abstract int getVideoWidth();
+
+ /**
+ * Returns the height of the video.
+ *
+ * @return the height of the video, or 0 if there is no video,
+ * no display surface was set, or the height has not been determined
+ * yet. The {@code EventCallback} can be registered via
+ * {@link #registerEventCallback(Executor, EventCallback)} to provide a
+ * notification {@code EventCallback.onVideoSizeChanged} when the height is available.
+ */
+ public abstract int getVideoHeight();
+
+ /**
+ * Return Metrics data about the current player.
+ *
+ * @return a {@link PersistableBundle} containing the set of attributes and values
+ * available for the media being handled by this instance of MediaPlayer2
+ * The attributes are descibed in {@link MetricsConstants}.
+ *
+ * Additional vendor-specific fields may also be present in
+ * the return value.
+ */
+ public abstract PersistableBundle getMetrics();
+
+ /**
+ * Checks whether the MediaPlayer2 is playing.
+ *
+ * @return true if currently playing, false otherwise
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized or has been released.
+ */
+ public abstract boolean isPlaying();
+
+ /**
+ * Gets the current buffering management params used by the source component.
+ * Calling it only after {@code setDataSource} has been called.
+ * Each type of data source might have different set of default params.
+ *
+ * @return the current buffering management params used by the source component.
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized, or {@code setDataSource} has not been called.
+ * @hide
+ */
+ @NonNull
+ public BufferingParams getBufferingParams() {
+ return new BufferingParams.Builder().build();
+ }
+
+ /**
+ * Sets buffering management params.
+ * The object sets its internal BufferingParams to the input, except that the input is
+ * invalid or not supported.
+ * Call it only after {@code setDataSource} has been called.
+ * The input is a hint to MediaPlayer2.
+ *
+ * @param params the buffering management params.
+ *
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized or has been released, or {@code setDataSource} has not been called.
+ * @throws IllegalArgumentException if params is invalid or not supported.
+ * @hide
+ */
+ public void setBufferingParams(@NonNull BufferingParams params) { }
+
+ /**
+ * Change playback speed of audio by resampling the audio.
+ * <p>
+ * Specifies resampling as audio mode for variable rate playback, i.e.,
+ * resample the waveform based on the requested playback rate to get
+ * a new waveform, and play back the new waveform at the original sampling
+ * frequency.
+ * When rate is larger than 1.0, pitch becomes higher.
+ * When rate is smaller than 1.0, pitch becomes lower.
+ *
+ * @hide
+ */
+ public static final int PLAYBACK_RATE_AUDIO_MODE_RESAMPLE = 2;
+
+ /**
+ * Change playback speed of audio without changing its pitch.
+ * <p>
+ * Specifies time stretching as audio mode for variable rate playback.
+ * Time stretching changes the duration of the audio samples without
+ * affecting its pitch.
+ * <p>
+ * This mode is only supported for a limited range of playback speed factors,
+ * e.g. between 1/2x and 2x.
+ *
+ * @hide
+ */
+ public static final int PLAYBACK_RATE_AUDIO_MODE_STRETCH = 1;
+
+ /**
+ * Change playback speed of audio without changing its pitch, and
+ * possibly mute audio if time stretching is not supported for the playback
+ * speed.
+ * <p>
+ * Try to keep audio pitch when changing the playback rate, but allow the
+ * system to determine how to change audio playback if the rate is out
+ * of range.
+ *
+ * @hide
+ */
+ public static final int PLAYBACK_RATE_AUDIO_MODE_DEFAULT = 0;
+
+ /** @hide */
+ @IntDef(
+ value = {
+ PLAYBACK_RATE_AUDIO_MODE_DEFAULT,
+ PLAYBACK_RATE_AUDIO_MODE_STRETCH,
+ PLAYBACK_RATE_AUDIO_MODE_RESAMPLE,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface PlaybackRateAudioMode {}
+
+ /**
+ * Sets playback rate and audio mode.
+ *
+ * @param rate the ratio between desired playback rate and normal one.
+ * @param audioMode audio playback mode. Must be one of the supported
+ * audio modes.
+ *
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized.
+ * @throws IllegalArgumentException if audioMode is not supported.
+ *
+ * @hide
+ */
+ @NonNull
+ public PlaybackParams easyPlaybackParams(float rate, @PlaybackRateAudioMode int audioMode) {
+ return new PlaybackParams();
+ }
+
+ /**
+ * Sets playback rate using {@link PlaybackParams}. The object sets its internal
+ * PlaybackParams to the input, except that the object remembers previous speed
+ * when input speed is zero. This allows the object to resume at previous speed
+ * when play() is called. Calling it before the object is prepared does not change
+ * the object state. After the object is prepared, calling it with zero speed is
+ * equivalent to calling pause(). After the object is prepared, calling it with
+ * non-zero speed is equivalent to calling play().
+ *
+ * @param params the playback params.
+ *
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized or has been released.
+ * @throws IllegalArgumentException if params is not supported.
+ */
+ public abstract void setPlaybackParams(@NonNull PlaybackParams params);
+
+ /**
+ * Gets the playback params, containing the current playback rate.
+ *
+ * @return the playback params.
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized.
+ */
+ @NonNull
+ public abstract PlaybackParams getPlaybackParams();
+
+ /**
+ * Sets A/V sync mode.
+ *
+ * @param params the A/V sync params to apply
+ *
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized.
+ * @throws IllegalArgumentException if params are not supported.
+ */
+ public abstract void setSyncParams(@NonNull SyncParams params);
+
+ /**
+ * Gets the A/V sync mode.
+ *
+ * @return the A/V sync params
+ *
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized.
+ */
+ @NonNull
+ public abstract SyncParams getSyncParams();
+
+ /**
+ * Seek modes used in method seekTo(long, int) to move media position
+ * to a specified location.
+ *
+ * Do not change these mode values without updating their counterparts
+ * in include/media/IMediaSource.h!
+ */
+ /**
+ * This mode is used with {@link #seekTo(long, int)} to move media position to
+ * a sync (or key) frame associated with a data source that is located
+ * right before or at the given time.
+ *
+ * @see #seekTo(long, int)
+ */
+ public static final int SEEK_PREVIOUS_SYNC = 0x00;
+ /**
+ * This mode is used with {@link #seekTo(long, int)} to move media position to
+ * a sync (or key) frame associated with a data source that is located
+ * right after or at the given time.
+ *
+ * @see #seekTo(long, int)
+ */
+ public static final int SEEK_NEXT_SYNC = 0x01;
+ /**
+ * This mode is used with {@link #seekTo(long, int)} to move media position to
+ * a sync (or key) frame associated with a data source that is located
+ * closest to (in time) or at the given time.
+ *
+ * @see #seekTo(long, int)
+ */
+ public static final int SEEK_CLOSEST_SYNC = 0x02;
+ /**
+ * This mode is used with {@link #seekTo(long, int)} to move media position to
+ * a frame (not necessarily a key frame) associated with a data source that
+ * is located closest to or at the given time.
+ *
+ * @see #seekTo(long, int)
+ */
+ public static final int SEEK_CLOSEST = 0x03;
+
+ /** @hide */
+ @IntDef(
+ value = {
+ SEEK_PREVIOUS_SYNC,
+ SEEK_NEXT_SYNC,
+ SEEK_CLOSEST_SYNC,
+ SEEK_CLOSEST,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface SeekMode {}
+
+ /**
+ * Moves the media to specified time position by considering the given mode.
+ * <p>
+ * When seekTo is finished, the user will be notified via OnSeekComplete supplied by the user.
+ * There is at most one active seekTo processed at any time. If there is a to-be-completed
+ * seekTo, new seekTo requests will be queued in such a way that only the last request
+ * is kept. When current seekTo is completed, the queued request will be processed if
+ * that request is different from just-finished seekTo operation, i.e., the requested
+ * position or mode is different.
+ *
+ * @param msec the offset in milliseconds from the start to seek to.
+ * When seeking to the given time position, there is no guarantee that the data source
+ * has a frame located at the position. When this happens, a frame nearby will be rendered.
+ * If msec is negative, time position zero will be used.
+ * If msec is larger than duration, duration will be used.
+ * @param mode the mode indicating where exactly to seek to.
+ * Use {@link #SEEK_PREVIOUS_SYNC} if one wants to seek to a sync frame
+ * that has a timestamp earlier than or the same as msec. Use
+ * {@link #SEEK_NEXT_SYNC} if one wants to seek to a sync frame
+ * that has a timestamp later than or the same as msec. Use
+ * {@link #SEEK_CLOSEST_SYNC} if one wants to seek to a sync frame
+ * that has a timestamp closest to or the same as msec. Use
+ * {@link #SEEK_CLOSEST} if one wants to seek to a frame that may
+ * or may not be a sync frame but is closest to or the same as msec.
+ * {@link #SEEK_CLOSEST} often has larger performance overhead compared
+ * to the other options if there is no sync frame located at msec.
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized
+ * @throws IllegalArgumentException if the mode is invalid.
+ */
+ public abstract void seekTo(long msec, @SeekMode int mode);
+
+ /**
+ * Get current playback position as a {@link MediaTimestamp}.
+ * <p>
+ * The MediaTimestamp represents how the media time correlates to the system time in
+ * a linear fashion using an anchor and a clock rate. During regular playback, the media
+ * time moves fairly constantly (though the anchor frame may be rebased to a current
+ * system time, the linear correlation stays steady). Therefore, this method does not
+ * need to be called often.
+ * <p>
+ * To help users get current playback position, this method always anchors the timestamp
+ * to the current {@link System#nanoTime system time}, so
+ * {@link MediaTimestamp#getAnchorMediaTimeUs} can be used as current playback position.
+ *
+ * @return a MediaTimestamp object if a timestamp is available, or {@code null} if no timestamp
+ * is available, e.g. because the media player has not been initialized.
+ *
+ * @see MediaTimestamp
+ */
+ @Nullable
+ public abstract MediaTimestamp getTimestamp();
+
+ /**
+ * Gets the current playback position.
+ *
+ * @return the current position in milliseconds
+ */
+ public abstract int getCurrentPosition();
+
+ /**
+ * Gets the duration of the file.
+ *
+ * @return the duration in milliseconds, if no duration is available
+ * (for example, if streaming live content), -1 is returned.
+ */
+ public abstract int getDuration();
+
+ /**
+ * Gets the media metadata.
+ *
+ * @param update_only controls whether the full set of available
+ * metadata is returned or just the set that changed since the
+ * last call. See {@see #METADATA_UPDATE_ONLY} and {@see
+ * #METADATA_ALL}.
+ *
+ * @param apply_filter if true only metadata that matches the
+ * filter is returned. See {@see #APPLY_METADATA_FILTER} and {@see
+ * #BYPASS_METADATA_FILTER}.
+ *
+ * @return The metadata, possibly empty. null if an error occured.
+ // FIXME: unhide.
+ * {@hide}
+ */
+ public Metadata getMetadata(final boolean update_only,
+ final boolean apply_filter) {
+ return null;
+ }
+
+ /**
+ * Set a filter for the metadata update notification and update
+ * retrieval. The caller provides 2 set of metadata keys, allowed
+ * and blocked. The blocked set always takes precedence over the
+ * allowed one.
+ * Metadata.MATCH_ALL and Metadata.MATCH_NONE are 2 sets available as
+ * shorthands to allow/block all or no metadata.
+ *
+ * By default, there is no filter set.
+ *
+ * @param allow Is the set of metadata the client is interested
+ * in receiving new notifications for.
+ * @param block Is the set of metadata the client is not interested
+ * in receiving new notifications for.
+ * @return The call status code.
+ *
+ // FIXME: unhide.
+ * {@hide}
+ */
+ public int setMetadataFilter(Set<Integer> allow, Set<Integer> block) {
+ return 0;
+ }
+
+ /**
+ * Set the MediaPlayer2 to start when this MediaPlayer2 finishes playback
+ * (i.e. reaches the end of the stream).
+ * The media framework will attempt to transition from this player to
+ * the next as seamlessly as possible. The next player can be set at
+ * any time before completion, but shall be after setDataSource has been
+ * called successfully. The next player must be prepared by the
+ * app, and the application should not call play() on it.
+ * The next MediaPlayer2 must be different from 'this'. An exception
+ * will be thrown if next == this.
+ * The application may call setNextMediaPlayer(null) to indicate no
+ * next player should be started at the end of playback.
+ * If the current player is looping, it will keep looping and the next
+ * player will not be started.
+ *
+ * @param next the player to start after this one completes playback.
+ *
+ * @hide
+ */
+ public void setNextMediaPlayer(MediaPlayer2 next) { }
+
+ /**
+ * Resets the MediaPlayer2 to its uninitialized state. After calling
+ * this method, you will have to initialize it again by setting the
+ * data source and calling prepareAsync().
+ */
+ public abstract void reset();
+
+ /**
+ * Set up a timer for {@link #TimeProvider}. {@link #TimeProvider} will be
+ * notified when the presentation time reaches (becomes greater than or equal to)
+ * the value specified.
+ *
+ * @param mediaTimeUs presentation time to get timed event callback at
+ * @hide
+ */
+ public void notifyAt(long mediaTimeUs) { }
+
+ /**
+ * Sets the audio attributes for this MediaPlayer2.
+ * See {@link AudioAttributes} for how to build and configure an instance of this class.
+ * You must call this method before {@link #prepareAsync()} in order
+ * for the audio attributes to become effective thereafter.
+ * @param attributes a non-null set of audio attributes
+ * @throws IllegalArgumentException if the attributes are null or invalid.
+ */
+ public abstract void setAudioAttributes(AudioAttributes attributes);
+
+ /**
+ * Sets the player to be looping or non-looping.
+ *
+ * @param looping whether to loop or not
+ * @hide
+ */
+ public void setLooping(boolean looping) { }
+
+ /**
+ * Checks whether the MediaPlayer2 is looping or non-looping.
+ *
+ * @return true if the MediaPlayer2 is currently looping, false otherwise
+ * @hide
+ */
+ public boolean isLooping() {
+ return false;
+ }
+
+ /**
+ * Sets the volume on this player.
+ * This API is recommended for balancing the output of audio streams
+ * within an application. Unless you are writing an application to
+ * control user settings, this API should be used in preference to
+ * {@link AudioManager#setStreamVolume(int, int, int)} which sets the volume of ALL streams of
+ * a particular type. Note that the passed volume values are raw scalars in range 0.0 to 1.0.
+ * UI controls should be scaled logarithmically.
+ *
+ * @param leftVolume left volume scalar
+ * @param rightVolume right volume scalar
+ */
+ /*
+ * FIXME: Merge this into javadoc comment above when setVolume(float) is not @hide.
+ * The single parameter form below is preferred if the channel volumes don't need
+ * to be set independently.
+ */
+ public abstract void setVolume(float leftVolume, float rightVolume);
+
+ /**
+ * Similar, excepts sets volume of all channels to same value.
+ * @hide
+ */
+ public void setVolume(float volume) { }
+
+ /**
+ * Sets the audio session ID.
+ *
+ * @param sessionId the audio session ID.
+ * The audio session ID is a system wide unique identifier for the audio stream played by
+ * this MediaPlayer2 instance.
+ * The primary use of the audio session ID is to associate audio effects to a particular
+ * instance of MediaPlayer2: if an audio session ID is provided when creating an audio effect,
+ * this effect will be applied only to the audio content of media players within the same
+ * audio session and not to the output mix.
+ * When created, a MediaPlayer2 instance automatically generates its own audio session ID.
+ * However, it is possible to force this player to be part of an already existing audio session
+ * by calling this method.
+ * This method must be called before one of the overloaded <code> setDataSource </code> methods.
+ * @throws IllegalStateException if it is called in an invalid state
+ * @throws IllegalArgumentException if the sessionId is invalid.
+ */
+ public abstract void setAudioSessionId(int sessionId);
+
+ /**
+ * Returns the audio session ID.
+ *
+ * @return the audio session ID. {@see #setAudioSessionId(int)}
+ * Note that the audio session ID is 0 only if a problem occured when the MediaPlayer2 was contructed.
+ */
+ public abstract int getAudioSessionId();
+
+ /**
+ * Attaches an auxiliary effect to the player. A typical auxiliary effect is a reverberation
+ * effect which can be applied on any sound source that directs a certain amount of its
+ * energy to this effect. This amount is defined by setAuxEffectSendLevel().
+ * See {@link #setAuxEffectSendLevel(float)}.
+ * <p>After creating an auxiliary effect (e.g.
+ * {@link android.media.audiofx.EnvironmentalReverb}), retrieve its ID with
+ * {@link android.media.audiofx.AudioEffect#getId()} and use it when calling this method
+ * to attach the player to the effect.
+ * <p>To detach the effect from the player, call this method with a null effect id.
+ * <p>This method must be called after one of the overloaded <code> setDataSource </code>
+ * methods.
+ * @param effectId system wide unique id of the effect to attach
+ */
+ public abstract void attachAuxEffect(int effectId);
+
+
+ /**
+ * Sets the send level of the player to the attached auxiliary effect.
+ * See {@link #attachAuxEffect(int)}. The level value range is 0 to 1.0.
+ * <p>By default the send level is 0, so even if an effect is attached to the player
+ * this method must be called for the effect to be applied.
+ * <p>Note that the passed level value is a raw scalar. UI controls should be scaled
+ * logarithmically: the gain applied by audio framework ranges from -72dB to 0dB,
+ * so an appropriate conversion from linear UI input x to level is:
+ * x == 0 -> level = 0
+ * 0 < x <= R -> level = 10^(72*(x-R)/20/R)
+ * @param level send level scalar
+ */
+ public abstract void setAuxEffectSendLevel(float level);
+
+ /**
+ * Class for MediaPlayer2 to return each audio/video/subtitle track's metadata.
+ *
+ * @see android.media.MediaPlayer2#getTrackInfo
+ */
+ public abstract static class TrackInfo {
+ /**
+ * Gets the track type.
+ * @return TrackType which indicates if the track is video, audio, timed text.
+ */
+ public abstract int getTrackType();
+
+ /**
+ * Gets the language code of the track.
+ * @return a language code in either way of ISO-639-1 or ISO-639-2.
+ * When the language is unknown or could not be determined,
+ * ISO-639-2 language code, "und", is returned.
+ */
+ public abstract String getLanguage();
+
+ /**
+ * Gets the {@link MediaFormat} of the track. If the format is
+ * unknown or could not be determined, null is returned.
+ */
+ public abstract MediaFormat getFormat();
+
+ public static final int MEDIA_TRACK_TYPE_UNKNOWN = 0;
+ public static final int MEDIA_TRACK_TYPE_VIDEO = 1;
+ public static final int MEDIA_TRACK_TYPE_AUDIO = 2;
+
+ /** @hide */
+ public static final int MEDIA_TRACK_TYPE_TIMEDTEXT = 3;
+
+ public static final int MEDIA_TRACK_TYPE_SUBTITLE = 4;
+ public static final int MEDIA_TRACK_TYPE_METADATA = 5;
+
+ @Override
+ public abstract String toString();
+ };
+
+ /**
+ * Returns a List of track information.
+ *
+ * @return List of track info. The total number of tracks is the array length.
+ * Must be called again if an external timed text source has been added after
+ * addTimedTextSource method is called.
+ * @throws IllegalStateException if it is called in an invalid state.
+ */
+ public abstract List<TrackInfo> getTrackInfo();
+
+ /* Do not change these values without updating their counterparts
+ * in include/media/stagefright/MediaDefs.h and media/libstagefright/MediaDefs.cpp!
+ */
+ /**
+ * MIME type for SubRip (SRT) container. Used in addTimedTextSource APIs.
+ * @hide
+ */
+ public static final String MEDIA_MIMETYPE_TEXT_SUBRIP = "application/x-subrip";
+
+ /**
+ * MIME type for WebVTT subtitle data.
+ * @hide
+ */
+ public static final String MEDIA_MIMETYPE_TEXT_VTT = "text/vtt";
+
+ /**
+ * MIME type for CEA-608 closed caption data.
+ * @hide
+ */
+ public static final String MEDIA_MIMETYPE_TEXT_CEA_608 = "text/cea-608";
+
+ /**
+ * MIME type for CEA-708 closed caption data.
+ * @hide
+ */
+ public static final String MEDIA_MIMETYPE_TEXT_CEA_708 = "text/cea-708";
+
+ /** @hide */
+ public void setSubtitleAnchor(
+ SubtitleController controller,
+ SubtitleController.Anchor anchor) { }
+
+ /** @hide */
+ @Override
+ public void onSubtitleTrackSelected(SubtitleTrack track) { }
+
+ /** @hide */
+ public void addSubtitleSource(InputStream is, MediaFormat format) { }
+
+ /* TODO: Limit the total number of external timed text source to a reasonable number.
+ */
+ /**
+ * Adds an external timed text source file.
+ *
+ * Currently supported format is SubRip with the file extension .srt, case insensitive.
+ * Note that a single external timed text source may contain multiple tracks in it.
+ * One can find the total number of available tracks using {@link #getTrackInfo()} to see what
+ * additional tracks become available after this method call.
+ *
+ * @param path The file path of external timed text source file.
+ * @param mimeType The mime type of the file. Must be one of the mime types listed above.
+ * @throws IOException if the file cannot be accessed or is corrupted.
+ * @throws IllegalArgumentException if the mimeType is not supported.
+ * @throws IllegalStateException if called in an invalid state.
+ * @hide
+ */
+ public void addTimedTextSource(String path, String mimeType) throws IOException { }
+
+ /**
+ * Adds an external timed text source file (Uri).
+ *
+ * Currently supported format is SubRip with the file extension .srt, case insensitive.
+ * Note that a single external timed text source may contain multiple tracks in it.
+ * One can find the total number of available tracks using {@link #getTrackInfo()} to see what
+ * additional tracks become available after this method call.
+ *
+ * @param context the Context to use when resolving the Uri
+ * @param uri the Content URI of the data you want to play
+ * @param mimeType The mime type of the file. Must be one of the mime types listed above.
+ * @throws IOException if the file cannot be accessed or is corrupted.
+ * @throws IllegalArgumentException if the mimeType is not supported.
+ * @throws IllegalStateException if called in an invalid state.
+ * @hide
+ */
+ public void addTimedTextSource(Context context, Uri uri, String mimeType) throws IOException { }
+
+ /**
+ * Adds an external timed text source file (FileDescriptor).
+ *
+ * It is the caller's responsibility to close the file descriptor.
+ * It is safe to do so as soon as this call returns.
+ *
+ * Currently supported format is SubRip. Note that a single external timed text source may
+ * contain multiple tracks in it. One can find the total number of available tracks
+ * using {@link #getTrackInfo()} to see what additional tracks become available
+ * after this method call.
+ *
+ * @param fd the FileDescriptor for the file you want to play
+ * @param mimeType The mime type of the file. Must be one of the mime types listed above.
+ * @throws IllegalArgumentException if the mimeType is not supported.
+ * @throws IllegalStateException if called in an invalid state.
+ * @hide
+ */
+ public void addTimedTextSource(FileDescriptor fd, String mimeType) { }
+
+ /**
+ * Adds an external timed text file (FileDescriptor).
+ *
+ * It is the caller's responsibility to close the file descriptor.
+ * It is safe to do so as soon as this call returns.
+ *
+ * Currently supported format is SubRip. Note that a single external timed text source may
+ * contain multiple tracks in it. One can find the total number of available tracks
+ * using {@link #getTrackInfo()} to see what additional tracks become available
+ * after this method call.
+ *
+ * @param fd the FileDescriptor for the file you want to play
+ * @param offset the offset into the file where the data to be played starts, in bytes
+ * @param length the length in bytes of the data to be played
+ * @param mime The mime type of the file. Must be one of the mime types listed above.
+ * @throws IllegalArgumentException if the mimeType is not supported.
+ * @throws IllegalStateException if called in an invalid state.
+ * @hide
+ */
+ public abstract void addTimedTextSource(FileDescriptor fd, long offset, long length, String mime);
+
+ /**
+ * Returns the index of the audio, video, or subtitle track currently selected for playback,
+ * The return value is an index into the array returned by {@link #getTrackInfo()}, and can
+ * be used in calls to {@link #selectTrack(int)} or {@link #deselectTrack(int)}.
+ *
+ * @param trackType should be one of {@link TrackInfo#MEDIA_TRACK_TYPE_VIDEO},
+ * {@link TrackInfo#MEDIA_TRACK_TYPE_AUDIO}, or
+ * {@link TrackInfo#MEDIA_TRACK_TYPE_SUBTITLE}
+ * @return index of the audio, video, or subtitle track currently selected for playback;
+ * a negative integer is returned when there is no selected track for {@code trackType} or
+ * when {@code trackType} is not one of audio, video, or subtitle.
+ * @throws IllegalStateException if called after {@link #close()}
+ *
+ * @see #getTrackInfo()
+ * @see #selectTrack(int)
+ * @see #deselectTrack(int)
+ */
+ public abstract int getSelectedTrack(int trackType);
+
+ /**
+ * Selects a track.
+ * <p>
+ * If a MediaPlayer2 is in invalid state, it throws an IllegalStateException exception.
+ * If a MediaPlayer2 is in <em>Started</em> state, the selected track is presented immediately.
+ * If a MediaPlayer2 is not in Started state, it just marks the track to be played.
+ * </p>
+ * <p>
+ * In any valid state, if it is called multiple times on the same type of track (ie. Video,
+ * Audio, Timed Text), the most recent one will be chosen.
+ * </p>
+ * <p>
+ * The first audio and video tracks are selected by default if available, even though
+ * this method is not called. However, no timed text track will be selected until
+ * this function is called.
+ * </p>
+ * <p>
+ * Currently, only timed text tracks or audio tracks can be selected via this method.
+ * In addition, the support for selecting an audio track at runtime is pretty limited
+ * in that an audio track can only be selected in the <em>Prepared</em> state.
+ * </p>
+ * @param index the index of the track to be selected. The valid range of the index
+ * is 0..total number of track - 1. The total number of tracks as well as the type of
+ * each individual track can be found by calling {@link #getTrackInfo()} method.
+ * @throws IllegalStateException if called in an invalid state.
+ *
+ * @see android.media.MediaPlayer2#getTrackInfo
+ */
+ public abstract void selectTrack(int index);
+
+ /**
+ * Deselect a track.
+ * <p>
+ * Currently, the track must be a timed text track and no audio or video tracks can be
+ * deselected. If the timed text track identified by index has not been
+ * selected before, it throws an exception.
+ * </p>
+ * @param index the index of the track to be deselected. The valid range of the index
+ * is 0..total number of tracks - 1. The total number of tracks as well as the type of
+ * each individual track can be found by calling {@link #getTrackInfo()} method.
+ * @throws IllegalStateException if called in an invalid state.
+ *
+ * @see android.media.MediaPlayer2#getTrackInfo
+ */
+ public abstract void deselectTrack(int index);
+
+ /**
+ * Sets the target UDP re-transmit endpoint for the low level player.
+ * Generally, the address portion of the endpoint is an IP multicast
+ * address, although a unicast address would be equally valid. When a valid
+ * retransmit endpoint has been set, the media player will not decode and
+ * render the media presentation locally. Instead, the player will attempt
+ * to re-multiplex its media data using the Android@Home RTP profile and
+ * re-transmit to the target endpoint. Receiver devices (which may be
+ * either the same as the transmitting device or different devices) may
+ * instantiate, prepare, and start a receiver player using a setDataSource
+ * URL of the form...
+ *
+ * aahRX://<multicastIP>:<port>
+ *
+ * to receive, decode and render the re-transmitted content.
+ *
+ * setRetransmitEndpoint may only be called before setDataSource has been
+ * called; while the player is in the Idle state.
+ *
+ * @param endpoint the address and UDP port of the re-transmission target or
+ * null if no re-transmission is to be performed.
+ * @throws IllegalStateException if it is called in an invalid state
+ * @throws IllegalArgumentException if the retransmit endpoint is supplied,
+ * but invalid.
+ *
+ * {@hide} pending API council
+ */
+ public void setRetransmitEndpoint(InetSocketAddress endpoint) { }
+
+ /**
+ * Releases the resources held by this {@code MediaPlayer2} object.
+ *
+ * It is considered good practice to call this method when you're
+ * done using the MediaPlayer2. In particular, whenever an Activity
+ * of an application is paused (its onPause() method is called),
+ * or stopped (its onStop() method is called), this method should be
+ * invoked to release the MediaPlayer2 object, unless the application
+ * has a special need to keep the object around. In addition to
+ * unnecessary resources (such as memory and instances of codecs)
+ * being held, failure to call this method immediately if a
+ * MediaPlayer2 object is no longer needed may also lead to
+ * continuous battery consumption for mobile devices, and playback
+ * failure for other applications if no multiple instances of the
+ * same codec are supported on a device. Even if multiple instances
+ * of the same codec are supported, some performance degradation
+ * may be expected when unnecessary multiple instances are used
+ * at the same time.
+ *
+ * {@code close()} may be safely called after a prior {@code close()}.
+ * This class implements the Java {@code AutoCloseable} interface and
+ * may be used with try-with-resources.
+ */
+ @Override
+ public abstract void close();
+
+ /** @hide */
+ public MediaTimeProvider getMediaTimeProvider() {
+ return null;
+ }
+
+ /**
+ * Interface definition for callbacks to be invoked when the player has the corresponding
+ * events.
+ */
+ public abstract static class EventCallback {
+ /**
+ * Called to update status in buffering a media source received through
+ * progressive downloading. The received buffering percentage
+ * indicates how much of the content has been buffered or played.
+ * For example a buffering update of 80 percent when half the content
+ * has already been played indicates that the next 30 percent of the
+ * content to play has been buffered.
+ *
+ * @param mp the MediaPlayer2 the update pertains to
+ * @param srcId the Id of this data source
+ * @param percent the percentage (0-100) of the content
+ * that has been buffered or played thus far
+ */
+ public void onBufferingUpdate(MediaPlayer2 mp, long srcId, int percent) { }
+
+ /**
+ * Called to indicate the video size
+ *
+ * The video size (width and height) could be 0 if there was no video,
+ * no display surface was set, or the value was not determined yet.
+ *
+ * @param mp the MediaPlayer2 associated with this callback
+ * @param srcId the Id of this data source
+ * @param width the width of the video
+ * @param height the height of the video
+ */
+ public void onVideoSizeChanged(MediaPlayer2 mp, long srcId, int width, int height) { }
+
+ /**
+ * Called to indicate an avaliable timed text
+ *
+ * @param mp the MediaPlayer2 associated with this callback
+ * @param srcId the Id of this data source
+ * @param text the timed text sample which contains the text
+ * needed to be displayed and the display format.
+ * @hide
+ */
+ public void onTimedText(MediaPlayer2 mp, long srcId, TimedText text) { }
+
+ /**
+ * Called to indicate avaliable timed metadata
+ * <p>
+ * This method will be called as timed metadata is extracted from the media,
+ * in the same order as it occurs in the media. The timing of this event is
+ * not controlled by the associated timestamp.
+ * <p>
+ * Currently only HTTP live streaming data URI's embedded with timed ID3 tags generates
+ * {@link TimedMetaData}.
+ *
+ * @see MediaPlayer2#selectTrack(int)
+ * @see MediaPlayer2.OnTimedMetaDataAvailableListener
+ * @see TimedMetaData
+ *
+ * @param mp the MediaPlayer2 associated with this callback
+ * @param srcId the Id of this data source
+ * @param data the timed metadata sample associated with this event
+ */
+ public void onTimedMetaDataAvailable(MediaPlayer2 mp, long srcId, TimedMetaData data) { }
+
+ /**
+ * Called to indicate an error.
+ *
+ * @param mp the MediaPlayer2 the error pertains to
+ * @param srcId the Id of this data source
+ * @param what the type of error that has occurred:
+ * <ul>
+ * <li>{@link #MEDIA_ERROR_UNKNOWN}
+ * </ul>
+ * @param extra an extra code, specific to the error. Typically
+ * implementation dependent.
+ * <ul>
+ * <li>{@link #MEDIA_ERROR_IO}
+ * <li>{@link #MEDIA_ERROR_MALFORMED}
+ * <li>{@link #MEDIA_ERROR_UNSUPPORTED}
+ * <li>{@link #MEDIA_ERROR_TIMED_OUT}
+ * <li><code>MEDIA_ERROR_SYSTEM (-2147483648)</code> - low-level system error.
+ * </ul>
+ */
+ public void onError(MediaPlayer2 mp, long srcId, int what, int extra) { }
+
+ /**
+ * Called to indicate an info or a warning.
+ *
+ * @param mp the MediaPlayer2 the info pertains to.
+ * @param srcId the Id of this data source
+ * @param what the type of info or warning.
+ * <ul>
+ * <li>{@link #MEDIA_INFO_UNKNOWN}
+ * <li>{@link #MEDIA_INFO_STARTED_AS_NEXT}
+ * <li>{@link #MEDIA_INFO_VIDEO_RENDERING_START}
+ * <li>{@link #MEDIA_INFO_AUDIO_RENDERING_START}
+ * <li>{@link #MEDIA_INFO_PLAYBACK_COMPLETE}
+ * <li>{@link #MEDIA_INFO_PLAYLIST_END}
+ * <li>{@link #MEDIA_INFO_PREPARED}
+ * <li>{@link #MEDIA_INFO_COMPLETE_CALL_PLAY}
+ * <li>{@link #MEDIA_INFO_COMPLETE_CALL_PAUSE}
+ * <li>{@link #MEDIA_INFO_COMPLETE_CALL_SEEK}
+ * <li>{@link #MEDIA_INFO_VIDEO_TRACK_LAGGING}
+ * <li>{@link #MEDIA_INFO_BUFFERING_START}
+ * <li>{@link #MEDIA_INFO_BUFFERING_END}
+ * <li><code>MEDIA_INFO_NETWORK_BANDWIDTH (703)</code> -
+ * bandwidth information is available (as <code>extra</code> kbps)
+ * <li>{@link #MEDIA_INFO_BAD_INTERLEAVING}
+ * <li>{@link #MEDIA_INFO_NOT_SEEKABLE}
+ * <li>{@link #MEDIA_INFO_METADATA_UPDATE}
+ * <li>{@link #MEDIA_INFO_UNSUPPORTED_SUBTITLE}
+ * <li>{@link #MEDIA_INFO_SUBTITLE_TIMED_OUT}
+ * </ul>
+ * @param extra an extra code, specific to the info. Typically
+ * implementation dependent.
+ */
+ public void onInfo(MediaPlayer2 mp, long srcId, int what, int extra) { }
+ }
+
+ /**
+ * Register a callback to be invoked when the media source is ready
+ * for playback.
+ *
+ * @param eventCallback the callback that will be run
+ * @param executor the executor through which the callback should be invoked
+ */
+ public abstract void registerEventCallback(@NonNull @CallbackExecutor Executor executor,
+ @NonNull EventCallback eventCallback);
+
+ /**
+ * Unregisters an {@link EventCallback}.
+ *
+ * @param callback an {@link EventCallback} to unregister
+ */
+ public abstract void unregisterEventCallback(EventCallback callback);
+
+ /**
+ * Interface definition of a callback to be invoked when a
+ * track has data available.
+ *
+ * @hide
+ */
+ public interface OnSubtitleDataListener
+ {
+ public void onSubtitleData(MediaPlayer2 mp, SubtitleData data);
+ }
+
+ /**
+ * Register a callback to be invoked when a track has data available.
+ *
+ * @param listener the callback that will be run
+ *
+ * @hide
+ */
+ public void setOnSubtitleDataListener(OnSubtitleDataListener listener) { }
+
+
+ /* Do not change these values without updating their counterparts
+ * in include/media/mediaplayer2.h!
+ */
+ /** Unspecified media player error.
+ * @see android.media.MediaPlayer2.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
+ */
+ public static final int MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK = 200;
+
+ /** File or network related operation errors. */
+ public static final int MEDIA_ERROR_IO = -1004;
+ /** Bitstream is not conforming to the related coding standard or file spec. */
+ public static final int MEDIA_ERROR_MALFORMED = -1007;
+ /** Bitstream is conforming to the related coding standard or file spec, but
+ * the media framework does not support the feature. */
+ public static final int MEDIA_ERROR_UNSUPPORTED = -1010;
+ /** Some operation takes too long to complete, usually more than 3-5 seconds. */
+ public static final int MEDIA_ERROR_TIMED_OUT = -110;
+
+ /** Unspecified low-level system error. This value originated from UNKNOWN_ERROR in
+ * system/core/include/utils/Errors.h
+ * @see android.media.MediaPlayer2.EventCallback.onError
+ * @hide
+ */
+ public static final int MEDIA_ERROR_SYSTEM = -2147483648;
+
+
+ /* Do not change these values without updating their counterparts
+ * in include/media/mediaplayer2.h!
+ */
+ /** Unspecified media player info.
+ * @see android.media.MediaPlayer2.EventCallback.onInfo
+ */
+ public static final int MEDIA_INFO_UNKNOWN = 1;
+
+ /** The player switched to this datas source because it is the
+ * next-to-be-played in the play list.
+ * @see android.media.MediaPlayer2.EventCallback.onInfo
+ */
+ public static final int MEDIA_INFO_STARTED_AS_NEXT = 2;
+
+ /** The player just pushed the very first video frame for rendering.
+ * @see android.media.MediaPlayer2.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
+ */
+ 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
+ */
+ public static final int MEDIA_INFO_PLAYBACK_COMPLETE = 5;
+
+ /** The player just completed the playback of the full play list.
+ * @see android.media.MediaPlayer2.EventCallback.onInfo
+ */
+ public static final int MEDIA_INFO_PLAYLIST_END = 6;
+
+ /** The player just prepared a data source.
+ * This also serves as call completion notification for {@link #prepareAsync()}.
+ * @see android.media.MediaPlayer2.EventCallback.onInfo
+ */
+ public static final int MEDIA_INFO_PREPARED = 100;
+
+ /** The player just completed a call {@link #play()}.
+ * @see android.media.MediaPlayer2.EventCallback.onInfo
+ */
+ public static final int MEDIA_INFO_COMPLETE_CALL_PLAY = 101;
+
+ /** The player just completed a call {@link #pause()}.
+ * @see android.media.MediaPlayer2.EventCallback.onInfo
+ */
+ public static final int MEDIA_INFO_COMPLETE_CALL_PAUSE = 102;
+
+ /** The player just completed a call {@link #seekTo(long, int)}.
+ * @see android.media.MediaPlayer2.EventCallback.onInfo
+ */
+ public static final int MEDIA_INFO_COMPLETE_CALL_SEEK = 103;
+
+ /** 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
+ */
+ 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
+ */
+ public static final int MEDIA_INFO_BUFFERING_START = 701;
+
+ /** MediaPlayer2 is resuming playback after filling buffers.
+ * @see android.media.MediaPlayer2.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
+ * @hide
+ */
+ public static final int MEDIA_INFO_NETWORK_BANDWIDTH = 703;
+
+ /** 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
+ */
+ public static final int MEDIA_INFO_BAD_INTERLEAVING = 800;
+
+ /** The media cannot be seeked (e.g live stream)
+ * @see android.media.MediaPlayer2.EventCallback.onInfo
+ */
+ public static final int MEDIA_INFO_NOT_SEEKABLE = 801;
+
+ /** A new set of metadata is available.
+ * @see android.media.MediaPlayer2.EventCallback.onInfo
+ */
+ public static final int MEDIA_INFO_METADATA_UPDATE = 802;
+
+ /** A new set of external-only metadata is available. Used by
+ * JAVA framework to avoid triggering track scanning.
+ * @hide
+ */
+ public static final int MEDIA_INFO_EXTERNAL_METADATA_UPDATE = 803;
+
+ /** Informs that audio is not playing. Note that playback of the video
+ * is not interrupted.
+ * @see android.media.MediaPlayer2.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
+ */
+ public static final int MEDIA_INFO_VIDEO_NOT_PLAYING = 805;
+
+ /** Failed to handle timed text track properly.
+ * @see android.media.MediaPlayer2.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
+ */
+ public static final int MEDIA_INFO_UNSUPPORTED_SUBTITLE = 901;
+
+ /** Reading the subtitle track takes too long.
+ * @see android.media.MediaPlayer2.EventCallback.onInfo
+ */
+ public static final int MEDIA_INFO_SUBTITLE_TIMED_OUT = 902;
+
+
+ // Modular DRM begin
+
+ /**
+ * Interface definition of a callback to be invoked when the app
+ * can do DRM configuration (get/set properties) before the session
+ * is opened. This facilitates configuration of the properties, like
+ * 'securityLevel', which has to be set after DRM scheme creation but
+ * before the DRM session is opened.
+ *
+ * The only allowed DRM calls in this listener are {@code getDrmPropertyString}
+ * and {@code setDrmPropertyString}.
+ */
+ public interface OnDrmConfigHelper
+ {
+ /**
+ * Called to give the app the opportunity to configure DRM before the session is created
+ *
+ * @param mp the {@code MediaPlayer2} associated with this callback
+ */
+ public void onDrmConfig(MediaPlayer2 mp);
+ }
+
+ /**
+ * Register a callback to be invoked for configuration of the DRM object before
+ * the session is created.
+ * The callback will be invoked synchronously during the execution
+ * of {@link #prepareDrm(UUID uuid)}.
+ *
+ * @param listener the callback that will be run
+ */
+ public abstract void setOnDrmConfigHelper(OnDrmConfigHelper listener);
+
+ /**
+ * Interface definition for callbacks to be invoked when the player has the corresponding
+ * DRM events.
+ */
+ public abstract static class DrmEventCallback {
+ /**
+ * Called to indicate DRM info is available
+ *
+ * @param mp the {@code MediaPlayer2} associated with this callback
+ * @param drmInfo DRM info of the source including PSSH, and subset
+ * of crypto schemes supported by this device
+ */
+ public void onDrmInfo(MediaPlayer2 mp, DrmInfo drmInfo) { }
+
+ /**
+ * Called to notify the client that {@code prepareDrm} is finished and ready for key request/response.
+ *
+ * @param mp the {@code MediaPlayer2} associated with this callback
+ * @param status the result of DRM preparation which can be
+ * {@link #PREPARE_DRM_STATUS_SUCCESS},
+ * {@link #PREPARE_DRM_STATUS_PROVISIONING_NETWORK_ERROR},
+ * {@link #PREPARE_DRM_STATUS_PROVISIONING_SERVER_ERROR}, or
+ * {@link #PREPARE_DRM_STATUS_PREPARATION_ERROR}.
+ */
+ public void onDrmPrepared(MediaPlayer2 mp, @PrepareDrmStatusCode int status) { }
+
+ }
+
+ /**
+ * Register a callback to be invoked when the media source is ready
+ * for playback.
+ *
+ * @param eventCallback the callback that will be run
+ * @param executor the executor through which the callback should be invoked
+ */
+ public abstract void registerDrmEventCallback(@NonNull @CallbackExecutor Executor executor,
+ @NonNull DrmEventCallback eventCallback);
+
+ /**
+ * Unregisters a {@link DrmEventCallback}.
+ *
+ * @param callback a {@link DrmEventCallback} to unregister
+ */
+ public abstract void unregisterDrmEventCallback(DrmEventCallback callback);
+
+ /**
+ * The status codes for {@link DrmEventCallback#onDrmPrepared} listener.
+ * <p>
+ *
+ * DRM preparation has succeeded.
+ */
+ public static final int PREPARE_DRM_STATUS_SUCCESS = 0;
+
+ /**
+ * The device required DRM provisioning but couldn't reach the provisioning server.
+ */
+ public static final int PREPARE_DRM_STATUS_PROVISIONING_NETWORK_ERROR = 1;
+
+ /**
+ * The device required DRM provisioning but the provisioning server denied the request.
+ */
+ public static final int PREPARE_DRM_STATUS_PROVISIONING_SERVER_ERROR = 2;
+
+ /**
+ * The DRM preparation has failed .
+ */
+ public static final int PREPARE_DRM_STATUS_PREPARATION_ERROR = 3;
+
+
+ /** @hide */
+ @IntDef({
+ PREPARE_DRM_STATUS_SUCCESS,
+ PREPARE_DRM_STATUS_PROVISIONING_NETWORK_ERROR,
+ PREPARE_DRM_STATUS_PROVISIONING_SERVER_ERROR,
+ PREPARE_DRM_STATUS_PREPARATION_ERROR,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface PrepareDrmStatusCode {}
+
+ /**
+ * Retrieves the DRM Info associated with the current source
+ *
+ * @throws IllegalStateException if called before being prepared
+ */
+ public abstract DrmInfo getDrmInfo();
+
+ /**
+ * Prepares the DRM for the current source
+ * <p>
+ * If {@code OnDrmConfigHelper} is registered, it will be called during
+ * preparation to allow configuration of the DRM properties before opening the
+ * DRM session. Note that the callback is called synchronously in the thread that called
+ * {@code prepareDrm}. It should be used only for a series of {@code getDrmPropertyString}
+ * and {@code setDrmPropertyString} calls and refrain from any lengthy operation.
+ * <p>
+ * If the device has not been provisioned before, this call also provisions the device
+ * which involves accessing the provisioning server and can take a variable time to
+ * complete depending on the network connectivity.
+ * If {@code OnDrmPreparedListener} is registered, prepareDrm() runs in non-blocking
+ * mode by launching the provisioning in the background and returning. The listener
+ * will be called when provisioning and preparation has finished. If a
+ * {@code OnDrmPreparedListener} is not registered, prepareDrm() waits till provisioning
+ * and preparation has finished, i.e., runs in blocking mode.
+ * <p>
+ * If {@code OnDrmPreparedListener} is registered, it is called to indicate the DRM
+ * session being ready. The application should not make any assumption about its call
+ * sequence (e.g., before or after prepareDrm returns), or the thread context that will
+ * execute the listener (unless the listener is registered with a handler thread).
+ * <p>
+ *
+ * @param uuid The UUID of the crypto scheme. If not known beforehand, it can be retrieved
+ * from the source through {@code getDrmInfo} or registering a {@code onDrmInfoListener}.
+ *
+ * @throws IllegalStateException if called before being prepared or the DRM was
+ * prepared already
+ * @throws UnsupportedSchemeException if the crypto scheme is not supported
+ * @throws ResourceBusyException if required DRM resources are in use
+ * @throws ProvisioningNetworkErrorException if provisioning is required but failed due to a
+ * network error
+ * @throws ProvisioningServerErrorException if provisioning is required but failed due to
+ * the request denied by the provisioning server
+ */
+ public abstract void prepareDrm(@NonNull UUID uuid)
+ throws UnsupportedSchemeException, ResourceBusyException,
+ ProvisioningNetworkErrorException, ProvisioningServerErrorException;
+
+ /**
+ * Releases the DRM session
+ * <p>
+ * The player has to have an active DRM session and be in stopped, or prepared
+ * state before this call is made.
+ * A {@code reset()} call will release the DRM session implicitly.
+ *
+ * @throws NoDrmSchemeException if there is no active DRM session to release
+ */
+ public abstract void releaseDrm() throws NoDrmSchemeException;
+
+ /**
+ * A key request/response exchange occurs between the app and a license server
+ * to obtain or release keys used to decrypt encrypted content.
+ * <p>
+ * getKeyRequest() is used to obtain an opaque key request byte array that is
+ * delivered to the license server. The opaque key request byte array is returned
+ * in KeyRequest.data. The recommended URL to deliver the key request to is
+ * returned in KeyRequest.defaultUrl.
+ * <p>
+ * After the app has received the key request response from the server,
+ * it should deliver to the response to the DRM engine plugin using the method
+ * {@link #provideKeyResponse}.
+ *
+ * @param keySetId is the key-set identifier of the offline keys being released when keyType is
+ * {@link MediaDrm#KEY_TYPE_RELEASE}. It should be set to null for other key requests, when
+ * keyType is {@link MediaDrm#KEY_TYPE_STREAMING} or {@link MediaDrm#KEY_TYPE_OFFLINE}.
+ *
+ * @param initData is the container-specific initialization data when the keyType is
+ * {@link MediaDrm#KEY_TYPE_STREAMING} or {@link MediaDrm#KEY_TYPE_OFFLINE}. Its meaning is
+ * interpreted based on the mime type provided in the mimeType parameter. It could
+ * contain, for example, the content ID, key ID or other data obtained from the content
+ * metadata that is required in generating the key request.
+ * When the keyType is {@link MediaDrm#KEY_TYPE_RELEASE}, it should be set to null.
+ *
+ * @param mimeType identifies the mime type of the content
+ *
+ * @param keyType specifies the type of the request. The request may be to acquire
+ * keys for streaming, {@link MediaDrm#KEY_TYPE_STREAMING}, or for offline content
+ * {@link MediaDrm#KEY_TYPE_OFFLINE}, or to release previously acquired
+ * keys ({@link MediaDrm#KEY_TYPE_RELEASE}), which are identified by a keySetId.
+ *
+ * @param optionalParameters are included in the key request message to
+ * allow a client application to provide additional message parameters to the server.
+ * This may be {@code null} if no additional parameters are to be sent.
+ *
+ * @throws NoDrmSchemeException if there is no active DRM session
+ */
+ @NonNull
+ public abstract MediaDrm.KeyRequest getKeyRequest(@Nullable byte[] keySetId, @Nullable byte[] initData,
+ @Nullable String mimeType, @MediaDrm.KeyType int keyType,
+ @Nullable Map<String, String> optionalParameters)
+ throws NoDrmSchemeException;
+
+ /**
+ * A key response is received from the license server by the app, then it is
+ * provided to the DRM engine plugin using provideKeyResponse. When the
+ * response is for an offline key request, a key-set identifier is returned that
+ * can be used to later restore the keys to a new session with the method
+ * {@ link # restoreKeys}.
+ * When the response is for a streaming or release request, null is returned.
+ *
+ * @param keySetId When the response is for a release request, keySetId identifies
+ * the saved key associated with the release request (i.e., the same keySetId
+ * passed to the earlier {@ link # getKeyRequest} call. It MUST be null when the
+ * response is for either streaming or offline key requests.
+ *
+ * @param response the byte array response from the server
+ *
+ * @throws NoDrmSchemeException if there is no active DRM session
+ * @throws DeniedByServerException if the response indicates that the
+ * server rejected the request
+ */
+ public abstract byte[] provideKeyResponse(@Nullable byte[] keySetId, @NonNull byte[] response)
+ throws NoDrmSchemeException, DeniedByServerException;
+
+ /**
+ * Restore persisted offline keys into a new session. keySetId identifies the
+ * keys to load, obtained from a prior call to {@link #provideKeyResponse}.
+ *
+ * @param keySetId identifies the saved key set to restore
+ */
+ public abstract void restoreKeys(@NonNull byte[] keySetId)
+ throws NoDrmSchemeException;
+
+ /**
+ * Read a DRM engine plugin String property value, given the property name string.
+ * <p>
+ * @param propertyName the property name
+ *
+ * Standard fields names are:
+ * {@link MediaDrm#PROPERTY_VENDOR}, {@link MediaDrm#PROPERTY_VERSION},
+ * {@link MediaDrm#PROPERTY_DESCRIPTION}, {@link MediaDrm#PROPERTY_ALGORITHMS}
+ */
+ @NonNull
+ public abstract String getDrmPropertyString(@NonNull @MediaDrm.StringProperty String propertyName)
+ throws NoDrmSchemeException;
+
+ /**
+ * Set a DRM engine plugin String property value.
+ * <p>
+ * @param propertyName the property name
+ * @param value the property value
+ *
+ * Standard fields names are:
+ * {@link MediaDrm#PROPERTY_VENDOR}, {@link MediaDrm#PROPERTY_VERSION},
+ * {@link MediaDrm#PROPERTY_DESCRIPTION}, {@link MediaDrm#PROPERTY_ALGORITHMS}
+ */
+ public abstract void setDrmPropertyString(@NonNull @MediaDrm.StringProperty String propertyName,
+ @NonNull String value)
+ throws NoDrmSchemeException;
+
+ /**
+ * Encapsulates the DRM properties of the source.
+ */
+ public abstract static class DrmInfo {
+ /**
+ * Returns the PSSH info of the data source for each supported DRM scheme.
+ */
+ public abstract Map<UUID, byte[]> getPssh();
+
+ /**
+ * Returns the intersection of the data source and the device DRM schemes.
+ * It effectively identifies the subset of the source's DRM schemes which
+ * are supported by the device too.
+ */
+ public abstract List<UUID> getSupportedSchemes();
+ }; // DrmInfo
+
+ /**
+ * Thrown when a DRM method is called before preparing a DRM scheme through prepareDrm().
+ * Extends MediaDrm.MediaDrmException
+ */
+ public abstract static class NoDrmSchemeException extends MediaDrmException {
+ protected NoDrmSchemeException(String detailMessage) {
+ super(detailMessage);
+ }
+ }
+
+ /**
+ * Thrown when the device requires DRM provisioning but the provisioning attempt has
+ * failed due to a network error (Internet reachability, timeout, etc.).
+ * Extends MediaDrm.MediaDrmException
+ */
+ public abstract static class ProvisioningNetworkErrorException extends MediaDrmException {
+ protected ProvisioningNetworkErrorException(String detailMessage) {
+ super(detailMessage);
+ }
+ }
+
+ /**
+ * Thrown when the device requires DRM provisioning but the provisioning attempt has
+ * failed due to the provisioning server denying the request.
+ * Extends MediaDrm.MediaDrmException
+ */
+ public abstract static class ProvisioningServerErrorException extends MediaDrmException {
+ protected ProvisioningServerErrorException(String detailMessage) {
+ super(detailMessage);
+ }
+ }
+
+ public static final class MetricsConstants {
+ private MetricsConstants() {}
+
+ /**
+ * Key to extract the MIME type of the video track
+ * from the {@link MediaPlayer2#getMetrics} return value.
+ * The value is a String.
+ */
+ public static final String MIME_TYPE_VIDEO = "android.media.mediaplayer.video.mime";
+
+ /**
+ * Key to extract the codec being used to decode the video track
+ * from the {@link MediaPlayer2#getMetrics} return value.
+ * The value is a String.
+ */
+ public static final String CODEC_VIDEO = "android.media.mediaplayer.video.codec";
+
+ /**
+ * Key to extract the width (in pixels) of the video track
+ * from the {@link MediaPlayer2#getMetrics} return value.
+ * The value is an integer.
+ */
+ public static final String WIDTH = "android.media.mediaplayer.width";
+
+ /**
+ * Key to extract the height (in pixels) of the video track
+ * from the {@link MediaPlayer2#getMetrics} return value.
+ * The value is an integer.
+ */
+ public static final String HEIGHT = "android.media.mediaplayer.height";
+
+ /**
+ * Key to extract the count of video frames played
+ * from the {@link MediaPlayer2#getMetrics} return value.
+ * The value is an integer.
+ */
+ public static final String FRAMES = "android.media.mediaplayer.frames";
+
+ /**
+ * Key to extract the count of video frames dropped
+ * from the {@link MediaPlayer2#getMetrics} return value.
+ * The value is an integer.
+ */
+ public static final String FRAMES_DROPPED = "android.media.mediaplayer.dropped";
+
+ /**
+ * Key to extract the MIME type of the audio track
+ * from the {@link MediaPlayer2#getMetrics} return value.
+ * The value is a String.
+ */
+ public static final String MIME_TYPE_AUDIO = "android.media.mediaplayer.audio.mime";
+
+ /**
+ * Key to extract the codec being used to decode the audio track
+ * from the {@link MediaPlayer2#getMetrics} return value.
+ * The value is a String.
+ */
+ public static final String CODEC_AUDIO = "android.media.mediaplayer.audio.codec";
+
+ /**
+ * Key to extract the duration (in milliseconds) of the
+ * media being played
+ * from the {@link MediaPlayer2#getMetrics} return value.
+ * The value is a long.
+ */
+ public static final String DURATION = "android.media.mediaplayer.durationMs";
+
+ /**
+ * Key to extract the playing time (in milliseconds) of the
+ * media being played
+ * from the {@link MediaPlayer2#getMetrics} return value.
+ * The value is a long.
+ */
+ public static final String PLAYING = "android.media.mediaplayer.playingMs";
+
+ /**
+ * Key to extract the count of errors encountered while
+ * playing the media
+ * from the {@link MediaPlayer2#getMetrics} return value.
+ * The value is an integer.
+ */
+ public static final String ERRORS = "android.media.mediaplayer.err";
+
+ /**
+ * Key to extract an (optional) error code detected while
+ * playing the media
+ * from the {@link MediaPlayer2#getMetrics} return value.
+ * The value is an integer.
+ */
+ public static final String ERROR_CODE = "android.media.mediaplayer.errcode";
+
+ }
+}
diff --git a/media/java/android/media/MediaPlayer2Impl.java b/media/java/android/media/MediaPlayer2Impl.java
new file mode 100644
index 0000000..222c66e
--- /dev/null
+++ b/media/java/android/media/MediaPlayer2Impl.java
@@ -0,0 +1,4912 @@
+/*
+ * 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.media;
+
+import android.annotation.CallbackExecutor;
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.app.ActivityThread;
+import android.content.ContentProvider;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.res.AssetFileDescriptor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.Looper;
+import android.os.Message;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.os.PersistableBundle;
+import android.os.Process;
+import android.os.PowerManager;
+import android.os.SystemProperties;
+import android.provider.Settings;
+import android.system.ErrnoException;
+import android.system.Os;
+import android.system.OsConstants;
+import android.util.Log;
+import android.util.Pair;
+import android.util.ArrayMap;
+import android.view.Surface;
+import android.view.SurfaceHolder;
+import android.widget.VideoView;
+import android.graphics.SurfaceTexture;
+import android.media.AudioManager;
+import android.media.MediaDrm;
+import android.media.MediaFormat;
+import android.media.MediaPlayer2;
+import android.media.MediaTimeProvider;
+import android.media.PlaybackParams;
+import android.media.SubtitleController;
+import android.media.SubtitleController.Anchor;
+import android.media.SubtitleData;
+import android.media.SubtitleTrack.RenderingWidget;
+import android.media.SyncParams;
+
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.util.Preconditions;
+
+import dalvik.system.CloseGuard;
+
+import libcore.io.IoBridge;
+import libcore.io.Streams;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileDescriptor;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.AutoCloseable;
+import java.lang.Runnable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.ref.WeakReference;
+import java.net.CookieHandler;
+import java.net.CookieManager;
+import java.net.HttpCookie;
+import java.net.HttpURLConnection;
+import java.net.InetSocketAddress;
+import java.net.URL;
+import java.nio.ByteOrder;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.BitSet;
+import java.util.Collections;
+import java.util.concurrent.Executor;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Scanner;
+import java.util.Set;
+import java.util.UUID;
+import java.util.Vector;
+
+
+/**
+ * MediaPlayer2 class can be used to control playback
+ * of audio/video files and streams. An example on how to use the methods in
+ * this class can be found in {@link android.widget.VideoView}.
+ *
+ * <p>Topics covered here are:
+ * <ol>
+ * <li><a href="#StateDiagram">State Diagram</a>
+ * <li><a href="#Valid_and_Invalid_States">Valid and Invalid States</a>
+ * <li><a href="#Permissions">Permissions</a>
+ * <li><a href="#Callbacks">Register informational and error callbacks</a>
+ * </ol>
+ *
+ * <div class="special reference">
+ * <h3>Developer Guides</h3>
+ * <p>For more information about how to use MediaPlayer2, read the
+ * <a href="{@docRoot}guide/topics/media/mediaplayer.html">Media Playback</a> developer guide.</p>
+ * </div>
+ *
+ * <a name="StateDiagram"></a>
+ * <h3>State Diagram</h3>
+ *
+ * <p>Playback control of audio/video files and streams is managed as a state
+ * machine. The following diagram shows the life cycle and the states of a
+ * MediaPlayer2 object driven by the supported playback control operations.
+ * The ovals represent the states a MediaPlayer2 object may reside
+ * in. The arcs represent the playback control operations that drive the object
+ * state transition. There are two types of arcs. The arcs with a single arrow
+ * head represent synchronous method calls, while those with
+ * a double arrow head represent asynchronous method calls.</p>
+ *
+ * <p><img src="../../../images/mediaplayer_state_diagram.gif"
+ * alt="MediaPlayer State diagram"
+ * border="0" /></p>
+ *
+ * <p>From this state diagram, one can see that a MediaPlayer2 object has the
+ * following states:</p>
+ * <ul>
+ * <li>When a MediaPlayer2 object is just created using <code>new</code> or
+ * after {@link #reset()} is called, it is in the <em>Idle</em> state; and after
+ * {@link #close()} is called, it is in the <em>End</em> state. Between these
+ * two states is the life cycle of the MediaPlayer2 object.
+ * <ul>
+ * <li>There is a subtle but important difference between a newly constructed
+ * MediaPlayer2 object and the MediaPlayer2 object after {@link #reset()}
+ * is called. It is a programming error to invoke methods such
+ * as {@link #getCurrentPosition()},
+ * {@link #getDuration()}, {@link #getVideoHeight()},
+ * {@link #getVideoWidth()}, {@link #setAudioAttributes(AudioAttributes)},
+ * {@link #setLooping(boolean)},
+ * {@link #setVolume(float, float)}, {@link #pause()}, {@link #play()},
+ * {@link #seekTo(long, int)}, {@link #prepare()} or
+ * {@link #prepareAsync()} in the <em>Idle</em> state for both cases. If any of these
+ * methods is called right after a MediaPlayer2 object is constructed,
+ * the user supplied callback method OnErrorListener.onError() won't be
+ * called by the internal player engine and the object state remains
+ * unchanged; but if these methods are called right after {@link #reset()},
+ * the user supplied callback method OnErrorListener.onError() will be
+ * invoked by the internal player engine and the object will be
+ * transfered to the <em>Error</em> state. </li>
+ * <li>It is also recommended that once
+ * a MediaPlayer2 object is no longer being used, call {@link #close()} immediately
+ * so that resources used by the internal player engine associated with the
+ * MediaPlayer2 object can be released immediately. Resource may include
+ * singleton resources such as hardware acceleration components and
+ * failure to call {@link #close()} may cause subsequent instances of
+ * MediaPlayer2 objects to fallback to software implementations or fail
+ * altogether. Once the MediaPlayer2
+ * object is in the <em>End</em> state, it can no longer be used and
+ * there is no way to bring it back to any other state. </li>
+ * <li>Furthermore,
+ * the MediaPlayer2 objects created using <code>new</code> is in the
+ * <em>Idle</em> state.
+ * </li>
+ * </ul>
+ * </li>
+ * <li>In general, some playback control operation may fail due to various
+ * reasons, such as unsupported audio/video format, poorly interleaved
+ * audio/video, resolution too high, streaming timeout, and the like.
+ * Thus, error reporting and recovery is an important concern under
+ * these circumstances. Sometimes, due to programming errors, invoking a playback
+ * control operation in an invalid state may also occur. Under all these
+ * error conditions, the internal player engine invokes a user supplied
+ * EventCallback.onError() method if an EventCallback has been
+ * registered beforehand via
+ * {@link #registerEventCallback(Executor, EventCallback)}.
+ * <ul>
+ * <li>It is important to note that once an error occurs, the
+ * MediaPlayer2 object enters the <em>Error</em> state (except as noted
+ * above), even if an error listener has not been registered by the application.</li>
+ * <li>In order to reuse a MediaPlayer2 object that is in the <em>
+ * Error</em> state and recover from the error,
+ * {@link #reset()} can be called to restore the object to its <em>Idle</em>
+ * state.</li>
+ * <li>It is good programming practice to have your application
+ * register a OnErrorListener to look out for error notifications from
+ * the internal player engine.</li>
+ * <li>IllegalStateException is
+ * thrown to prevent programming errors such as calling {@link #prepare()},
+ * {@link #prepareAsync()}, {@link #setDataSource(DataSourceDesc)}, or
+ * {@code setPlaylist} methods in an invalid state. </li>
+ * </ul>
+ * </li>
+ * <li>Calling
+ * {@link #setDataSource(DataSourceDesc)}, or
+ * {@code setPlaylist} transfers a
+ * MediaPlayer2 object in the <em>Idle</em> state to the
+ * <em>Initialized</em> state.
+ * <ul>
+ * <li>An IllegalStateException is thrown if
+ * setDataSource() or setPlaylist() is called in any other state.</li>
+ * <li>It is good programming
+ * practice to always look out for <code>IllegalArgumentException</code>
+ * and <code>IOException</code> that may be thrown from
+ * <code>setDataSource</code> and <code>setPlaylist</code> methods.</li>
+ * </ul>
+ * </li>
+ * <li>A MediaPlayer2 object must first enter the <em>Prepared</em> state
+ * before playback can be started.
+ * <ul>
+ * <li>There are two ways (synchronous vs.
+ * asynchronous) that the <em>Prepared</em> state can be reached:
+ * either a call to {@link #prepare()} (synchronous) which
+ * transfers the object to the <em>Prepared</em> state once the method call
+ * returns, or a call to {@link #prepareAsync()} (asynchronous) which
+ * first transfers the object to the <em>Preparing</em> state after the
+ * call returns (which occurs almost right way) while the internal
+ * player engine continues working on the rest of preparation work
+ * until the preparation work completes. When the preparation completes or when {@link #prepare()} call returns,
+ * the internal player engine then calls a user supplied callback method,
+ * onPrepared() of the EventCallback interface, if an
+ * EventCallback is registered beforehand via {@link
+ * #registerEventCallback(Executor, EventCallback)}.</li>
+ * <li>It is important to note that
+ * the <em>Preparing</em> state is a transient state, and the behavior
+ * of calling any method with side effect while a MediaPlayer2 object is
+ * in the <em>Preparing</em> state is undefined.</li>
+ * <li>An IllegalStateException is
+ * thrown if {@link #prepare()} or {@link #prepareAsync()} is called in
+ * any other state.</li>
+ * <li>While in the <em>Prepared</em> state, properties
+ * such as audio/sound volume, screenOnWhilePlaying, looping can be
+ * adjusted by invoking the corresponding set methods.</li>
+ * </ul>
+ * </li>
+ * <li>To start the playback, {@link #play()} must be called. After
+ * {@link #play()} returns successfully, the MediaPlayer2 object is in the
+ * <em>Started</em> state. {@link #isPlaying()} can be called to test
+ * whether the MediaPlayer2 object is in the <em>Started</em> state.
+ * <ul>
+ * <li>While in the <em>Started</em> state, the internal player engine calls
+ * a user supplied EventCallback.onBufferingUpdate() callback
+ * method if an EventCallback has been registered beforehand
+ * via {@link #registerEventCallback(Executor, EventCallback)}.
+ * This callback allows applications to keep track of the buffering status
+ * while streaming audio/video.</li>
+ * <li>Calling {@link #play()} has not effect
+ * on a MediaPlayer2 object that is already in the <em>Started</em> state.</li>
+ * </ul>
+ * </li>
+ * <li>Playback can be paused and stopped, and the current playback position
+ * can be adjusted. Playback can be paused via {@link #pause()}. When the call to
+ * {@link #pause()} returns, the MediaPlayer2 object enters the
+ * <em>Paused</em> state. Note that the transition from the <em>Started</em>
+ * state to the <em>Paused</em> state and vice versa happens
+ * asynchronously in the player engine. It may take some time before
+ * the state is updated in calls to {@link #isPlaying()}, and it can be
+ * a number of seconds in the case of streamed content.
+ * <ul>
+ * <li>Calling {@link #play()} to resume playback for a paused
+ * MediaPlayer2 object, and the resumed playback
+ * position is the same as where it was paused. When the call to
+ * {@link #play()} returns, the paused MediaPlayer2 object goes back to
+ * the <em>Started</em> state.</li>
+ * <li>Calling {@link #pause()} has no effect on
+ * a MediaPlayer2 object that is already in the <em>Paused</em> state.</li>
+ * </ul>
+ * </li>
+ * <li>The playback position can be adjusted with a call to
+ * {@link #seekTo(long, int)}.
+ * <ul>
+ * <li>Although the asynchronuous {@link #seekTo(long, int)}
+ * call returns right away, the actual seek operation may take a while to
+ * finish, especially for audio/video being streamed. When the actual
+ * seek operation completes, the internal player engine calls a user
+ * supplied EventCallback.onSeekComplete() if an EventCallback
+ * has been registered beforehand via
+ * {@link #registerEventCallback(Executor, EventCallback)}.</li>
+ * <li>Please
+ * note that {@link #seekTo(long, int)} can also be called in the other states,
+ * such as <em>Prepared</em>, <em>Paused</em> and <em>PlaybackCompleted
+ * </em> state. When {@link #seekTo(long, int)} is called in those states,
+ * one video frame will be displayed if the stream has video and the requested
+ * position is valid.
+ * </li>
+ * <li>Furthermore, the actual current playback position
+ * can be retrieved with a call to {@link #getCurrentPosition()}, which
+ * is helpful for applications such as a Music player that need to keep
+ * track of the playback progress.</li>
+ * </ul>
+ * </li>
+ * <li>When the playback reaches the end of stream, the playback completes.
+ * <ul>
+ * <li>If the looping mode was being set to <var>true</var>with
+ * {@link #setLooping(boolean)}, the MediaPlayer2 object shall remain in
+ * the <em>Started</em> state.</li>
+ * <li>If the looping mode was set to <var>false
+ * </var>, the player engine calls a user supplied callback method,
+ * EventCallback.onCompletion(), if an EventCallback is registered
+ * beforehand via {@link #registerEventCallback(Executor, EventCallback)}.
+ * The invoke of the callback signals that the object is now in the <em>
+ * PlaybackCompleted</em> state.</li>
+ * <li>While in the <em>PlaybackCompleted</em>
+ * state, calling {@link #play()} can restart the playback from the
+ * beginning of the audio/video source.</li>
+ * </ul>
+ *
+ *
+ * <a name="Valid_and_Invalid_States"></a>
+ * <h3>Valid and invalid states</h3>
+ *
+ * <table border="0" cellspacing="0" cellpadding="0">
+ * <tr><td>Method Name </p></td>
+ * <td>Valid Sates </p></td>
+ * <td>Invalid States </p></td>
+ * <td>Comments </p></td></tr>
+ * <tr><td>attachAuxEffect </p></td>
+ * <td>{Initialized, Prepared, Started, Paused, Stopped, PlaybackCompleted} </p></td>
+ * <td>{Idle, Error} </p></td>
+ * <td>This method must be called after setDataSource or setPlaylist.
+ * Calling it does not change the object state. </p></td></tr>
+ * <tr><td>getAudioSessionId </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>This method can be called in any state and calling it does not change
+ * the object state. </p></td></tr>
+ * <tr><td>getCurrentPosition </p></td>
+ * <td>{Idle, Initialized, Prepared, Started, Paused, Stopped,
+ * PlaybackCompleted} </p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method in a valid state does not change the
+ * state. Calling this method in an invalid state transfers the object
+ * to the <em>Error</em> state. </p></td></tr>
+ * <tr><td>getDuration </p></td>
+ * <td>{Prepared, Started, Paused, Stopped, PlaybackCompleted} </p></td>
+ * <td>{Idle, Initialized, Error} </p></td>
+ * <td>Successful invoke of this method in a valid state does not change the
+ * state. Calling this method in an invalid state transfers the object
+ * to the <em>Error</em> state. </p></td></tr>
+ * <tr><td>getVideoHeight </p></td>
+ * <td>{Idle, Initialized, Prepared, Started, Paused, Stopped,
+ * PlaybackCompleted}</p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method in a valid state does not change the
+ * state. Calling this method in an invalid state transfers the object
+ * to the <em>Error</em> state. </p></td></tr>
+ * <tr><td>getVideoWidth </p></td>
+ * <td>{Idle, Initialized, Prepared, Started, Paused, Stopped,
+ * PlaybackCompleted}</p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method in a valid state does not change
+ * the state. Calling this method in an invalid state transfers the
+ * object to the <em>Error</em> state. </p></td></tr>
+ * <tr><td>isPlaying </p></td>
+ * <td>{Idle, Initialized, Prepared, Started, Paused, Stopped,
+ * PlaybackCompleted}</p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method in a valid state does not change
+ * the state. Calling this method in an invalid state transfers the
+ * object to the <em>Error</em> state. </p></td></tr>
+ * <tr><td>pause </p></td>
+ * <td>{Started, Paused, PlaybackCompleted}</p></td>
+ * <td>{Idle, Initialized, Prepared, Stopped, Error}</p></td>
+ * <td>Successful invoke of this method in a valid state transfers the
+ * object to the <em>Paused</em> state. Calling this method in an
+ * invalid state transfers the object to the <em>Error</em> state.</p></td></tr>
+ * <tr><td>prepare </p></td>
+ * <td>{Initialized, Stopped} </p></td>
+ * <td>{Idle, Prepared, Started, Paused, PlaybackCompleted, Error} </p></td>
+ * <td>Successful invoke of this method in a valid state transfers the
+ * object to the <em>Prepared</em> state. Calling this method in an
+ * invalid state throws an IllegalStateException.</p></td></tr>
+ * <tr><td>prepareAsync </p></td>
+ * <td>{Initialized, Stopped} </p></td>
+ * <td>{Idle, Prepared, Started, Paused, PlaybackCompleted, Error} </p></td>
+ * <td>Successful invoke of this method in a valid state transfers the
+ * object to the <em>Preparing</em> state. Calling this method in an
+ * invalid state throws an IllegalStateException.</p></td></tr>
+ * <tr><td>release </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>After {@link #close()}, the object is no longer available. </p></td></tr>
+ * <tr><td>reset </p></td>
+ * <td>{Idle, Initialized, Prepared, Started, Paused, Stopped,
+ * PlaybackCompleted, Error}</p></td>
+ * <td>{}</p></td>
+ * <td>After {@link #reset()}, the object is like being just created.</p></td></tr>
+ * <tr><td>seekTo </p></td>
+ * <td>{Prepared, Started, Paused, PlaybackCompleted} </p></td>
+ * <td>{Idle, Initialized, Stopped, Error}</p></td>
+ * <td>Successful invoke of this method in a valid state does not change
+ * the state. Calling this method in an invalid state transfers the
+ * object to the <em>Error</em> state. </p></td></tr>
+ * <tr><td>setAudioAttributes </p></td>
+ * <td>{Idle, Initialized, Stopped, Prepared, Started, Paused,
+ * PlaybackCompleted}</p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method does not change the state. In order for the
+ * target audio attributes type to become effective, this method must be called before
+ * prepare() or prepareAsync().</p></td></tr>
+ * <tr><td>setAudioSessionId </p></td>
+ * <td>{Idle} </p></td>
+ * <td>{Initialized, Prepared, Started, Paused, Stopped, PlaybackCompleted,
+ * Error} </p></td>
+ * <td>This method must be called in idle state as the audio session ID must be known before
+ * calling setDataSource or setPlaylist. Calling it does not change the object
+ * state. </p></td></tr>
+ * <tr><td>setAudioStreamType (deprecated)</p></td>
+ * <td>{Idle, Initialized, Stopped, Prepared, Started, Paused,
+ * PlaybackCompleted}</p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method does not change the state. In order for the
+ * target audio stream type to become effective, this method must be called before
+ * prepare() or prepareAsync().</p></td></tr>
+ * <tr><td>setAuxEffectSendLevel </p></td>
+ * <td>any</p></td>
+ * <td>{} </p></td>
+ * <td>Calling this method does not change the object state. </p></td></tr>
+ * <tr><td>setDataSource </p></td>
+ * <td>{Idle} </p></td>
+ * <td>{Initialized, Prepared, Started, Paused, Stopped, PlaybackCompleted,
+ * Error} </p></td>
+ * <td>Successful invoke of this method in a valid state transfers the
+ * object to the <em>Initialized</em> state. Calling this method in an
+ * invalid state throws an IllegalStateException.</p></td></tr>
+ * <tr><td>setPlaylist </p></td>
+ * <td>{Idle} </p></td>
+ * <td>{Initialized, Prepared, Started, Paused, Stopped, PlaybackCompleted,
+ * Error} </p></td>
+ * <td>Successful invoke of this method in a valid state transfers the
+ * object to the <em>Initialized</em> state. Calling this method in an
+ * invalid state throws an IllegalStateException.</p></td></tr>
+ * <tr><td>setDisplay </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>This method can be called in any state and calling it does not change
+ * the object state. </p></td></tr>
+ * <tr><td>setSurface </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>This method can be called in any state and calling it does not change
+ * the object state. </p></td></tr>
+ * <tr><td>setVideoScalingMode </p></td>
+ * <td>{Initialized, Prepared, Started, Paused, Stopped, PlaybackCompleted} </p></td>
+ * <td>{Idle, Error}</p></td>
+ * <td>Successful invoke of this method does not change the state.</p></td></tr>
+ * <tr><td>setLooping </p></td>
+ * <td>{Idle, Initialized, Stopped, Prepared, Started, Paused,
+ * PlaybackCompleted}</p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method in a valid state does not change
+ * the state. Calling this method in an
+ * invalid state transfers the object to the <em>Error</em> state.</p></td></tr>
+ * <tr><td>isLooping </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>This method can be called in any state and calling it does not change
+ * the object state. </p></td></tr>
+ * <tr><td>registerDrmEventCallback </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>This method can be called in any state and calling it does not change
+ * the object state. </p></td></tr>
+ * <tr><td>registerEventCallback </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>This method can be called in any state and calling it does not change
+ * the object state. </p></td></tr>
+ * <tr><td>setPlaybackParams</p></td>
+ * <td>{Initialized, Prepared, Started, Paused, PlaybackCompleted, Error}</p></td>
+ * <td>{Idle, Stopped} </p></td>
+ * <td>This method will change state in some cases, depending on when it's called.
+ * </p></td></tr>
+ * <tr><td>setScreenOnWhilePlaying</></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>This method can be called in any state and calling it does not change
+ * the object state. </p></td></tr>
+ * <tr><td>setVolume </p></td>
+ * <td>{Idle, Initialized, Stopped, Prepared, Started, Paused,
+ * PlaybackCompleted}</p></td>
+ * <td>{Error}</p></td>
+ * <td>Successful invoke of this method does not change the state.
+ * <tr><td>setWakeMode </p></td>
+ * <td>any </p></td>
+ * <td>{} </p></td>
+ * <td>This method can be called in any state and calling it does not change
+ * the object state.</p></td></tr>
+ * <tr><td>start </p></td>
+ * <td>{Prepared, Started, Paused, PlaybackCompleted}</p></td>
+ * <td>{Idle, Initialized, Stopped, Error}</p></td>
+ * <td>Successful invoke of this method in a valid state transfers the
+ * object to the <em>Started</em> state. Calling this method in an
+ * invalid state transfers the object to the <em>Error</em> state.</p></td></tr>
+ * <tr><td>stop </p></td>
+ * <td>{Prepared, Started, Stopped, Paused, PlaybackCompleted}</p></td>
+ * <td>{Idle, Initialized, Error}</p></td>
+ * <td>Successful invoke of this method in a valid state transfers the
+ * object to the <em>Stopped</em> state. Calling this method in an
+ * invalid state transfers the object to the <em>Error</em> state.</p></td></tr>
+ * <tr><td>getTrackInfo </p></td>
+ * <td>{Prepared, Started, Stopped, Paused, PlaybackCompleted}</p></td>
+ * <td>{Idle, Initialized, Error}</p></td>
+ * <td>Successful invoke of this method does not change the state.</p></td></tr>
+ * <tr><td>addTimedTextSource </p></td>
+ * <td>{Prepared, Started, Stopped, Paused, PlaybackCompleted}</p></td>
+ * <td>{Idle, Initialized, Error}</p></td>
+ * <td>Successful invoke of this method does not change the state.</p></td></tr>
+ * <tr><td>selectTrack </p></td>
+ * <td>{Prepared, Started, Stopped, Paused, PlaybackCompleted}</p></td>
+ * <td>{Idle, Initialized, Error}</p></td>
+ * <td>Successful invoke of this method does not change the state.</p></td></tr>
+ * <tr><td>deselectTrack </p></td>
+ * <td>{Prepared, Started, Stopped, Paused, PlaybackCompleted}</p></td>
+ * <td>{Idle, Initialized, Error}</p></td>
+ * <td>Successful invoke of this method does not change the state.</p></td></tr>
+ *
+ * </table>
+ *
+ * <a name="Permissions"></a>
+ * <h3>Permissions</h3>
+ * <p>One may need to declare a corresponding WAKE_LOCK permission {@link
+ * android.R.styleable#AndroidManifestUsesPermission <uses-permission>}
+ * element.
+ *
+ * <p>This class requires the {@link android.Manifest.permission#INTERNET} permission
+ * when used with network-based content.
+ *
+ * <a name="Callbacks"></a>
+ * <h3>Callbacks</h3>
+ * <p>Applications may want to register for informational and error
+ * events in order to be informed of some internal state update and
+ * possible runtime errors during playback or streaming. Registration for
+ * these events is done by properly setting the appropriate listeners (via calls
+ * to
+ * {@link #registerEventCallback(Executor, EventCallback)},
+ * {@link #registerDrmEventCallback(Executor, DrmEventCallback)}).
+ * In order to receive the respective callback
+ * associated with these listeners, applications are required to create
+ * MediaPlayer2 objects on a thread with its own Looper running (main UI
+ * thread by default has a Looper running).
+ *
+ * @hide
+ */
+public final class MediaPlayer2Impl extends MediaPlayer2 {
+ static {
+ System.loadLibrary("media2_jni");
+ native_init();
+ }
+
+ private final static String TAG = "MediaPlayer2Impl";
+
+ private long mNativeContext; // accessed by native methods
+ private long mNativeSurfaceTexture; // accessed by native methods
+ private int mListenerContext; // accessed by native methods
+ private SurfaceHolder mSurfaceHolder;
+ private EventHandler mEventHandler;
+ private PowerManager.WakeLock mWakeLock = null;
+ private boolean mScreenOnWhilePlaying;
+ private boolean mStayAwake;
+ private int mStreamType = AudioManager.USE_DEFAULT_STREAM_TYPE;
+ private int mUsage = -1;
+ private boolean mBypassInterruptionPolicy;
+ private final CloseGuard mGuard = CloseGuard.get();
+
+ private List<DataSourceDesc> mPlaylist;
+ private int mPLCurrentIndex = 0;
+ private int mPLNextIndex = -1;
+ private int mLoopingMode = LOOPING_MODE_NONE;
+
+ // Modular DRM
+ private UUID mDrmUUID;
+ private final Object mDrmLock = new Object();
+ private DrmInfoImpl mDrmInfoImpl;
+ private MediaDrm mDrmObj;
+ private byte[] mDrmSessionId;
+ private boolean mDrmInfoResolved;
+ private boolean mActiveDrmScheme;
+ private boolean mDrmConfigAllowed;
+ private boolean mDrmProvisioningInProgress;
+ private boolean mPrepareDrmInProgress;
+ private ProvisioningThread mDrmProvisioningThread;
+
+ /**
+ * Default constructor.
+ * <p>When done with the MediaPlayer2Impl, you should call {@link #close()},
+ * to free the resources. If not released, too many MediaPlayer2Impl instances may
+ * result in an exception.</p>
+ */
+ public MediaPlayer2Impl() {
+ Looper looper;
+ if ((looper = Looper.myLooper()) != null) {
+ mEventHandler = new EventHandler(this, looper);
+ } else if ((looper = Looper.getMainLooper()) != null) {
+ mEventHandler = new EventHandler(this, looper);
+ } else {
+ mEventHandler = null;
+ }
+
+ mTimeProvider = new TimeProvider(this);
+ mOpenSubtitleSources = new Vector<InputStream>();
+ mGuard.open("close");
+
+ /* Native setup requires a weak reference to our object.
+ * It's easier to create it here than in C++.
+ */
+ native_setup(new WeakReference<MediaPlayer2Impl>(this));
+ }
+
+ /*
+ * Update the MediaPlayer2Impl SurfaceTexture.
+ * Call after setting a new display surface.
+ */
+ private native void _setVideoSurface(Surface surface);
+
+ /* Do not change these values (starting with INVOKE_ID) without updating
+ * their counterparts in include/media/mediaplayer2.h!
+ */
+ private static final int INVOKE_ID_GET_TRACK_INFO = 1;
+ private static final int INVOKE_ID_ADD_EXTERNAL_SOURCE = 2;
+ private static final int INVOKE_ID_ADD_EXTERNAL_SOURCE_FD = 3;
+ private static final int INVOKE_ID_SELECT_TRACK = 4;
+ private static final int INVOKE_ID_DESELECT_TRACK = 5;
+ private static final int INVOKE_ID_SET_VIDEO_SCALE_MODE = 6;
+ private static final int INVOKE_ID_GET_SELECTED_TRACK = 7;
+
+ /**
+ * Create a request parcel which can be routed to the native media
+ * player using {@link #invoke(Parcel, Parcel)}. The Parcel
+ * returned has the proper InterfaceToken set. The caller should
+ * not overwrite that token, i.e it can only append data to the
+ * Parcel.
+ *
+ * @return A parcel suitable to hold a request for the native
+ * player.
+ * {@hide}
+ */
+ @Override
+ public Parcel newRequest() {
+ Parcel parcel = Parcel.obtain();
+ return parcel;
+ }
+
+ /**
+ * Invoke a generic method on the native player using opaque
+ * parcels for the request and reply. Both payloads' format is a
+ * convention between the java caller and the native player.
+ * Must be called after setDataSource or setPlaylist to make sure a native player
+ * exists. On failure, a RuntimeException is thrown.
+ *
+ * @param request Parcel with the data for the extension. The
+ * caller must use {@link #newRequest()} to get one.
+ *
+ * @param reply Output parcel with the data returned by the
+ * native player.
+ * {@hide}
+ */
+ @Override
+ public void invoke(Parcel request, Parcel reply) {
+ int retcode = native_invoke(request, reply);
+ reply.setDataPosition(0);
+ if (retcode != 0) {
+ throw new RuntimeException("failure code: " + retcode);
+ }
+ }
+
+ /**
+ * Sets the {@link SurfaceHolder} to use for displaying the video
+ * portion of the media.
+ *
+ * Either a surface holder or surface must be set if a display or video sink
+ * is needed. Not calling this method or {@link #setSurface(Surface)}
+ * when playing back a video will result in only the audio track being played.
+ * A null surface holder or surface will result in only the audio track being
+ * played.
+ *
+ * @param sh the SurfaceHolder to use for video display
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized or has been released.
+ * @hide
+ */
+ @Override
+ public void setDisplay(SurfaceHolder sh) {
+ mSurfaceHolder = sh;
+ Surface surface;
+ if (sh != null) {
+ surface = sh.getSurface();
+ } else {
+ surface = null;
+ }
+ _setVideoSurface(surface);
+ updateSurfaceScreenOn();
+ }
+
+ /**
+ * Sets the {@link Surface} to be used as the sink for the video portion of
+ * the media. This is similar to {@link #setDisplay(SurfaceHolder)}, but
+ * does not support {@link #setScreenOnWhilePlaying(boolean)}. Setting a
+ * Surface will un-set any Surface or SurfaceHolder that was previously set.
+ * A null surface will result in only the audio track being played.
+ *
+ * If the Surface sends frames to a {@link SurfaceTexture}, the timestamps
+ * returned from {@link SurfaceTexture#getTimestamp()} will have an
+ * unspecified zero point. These timestamps cannot be directly compared
+ * between different media sources, different instances of the same media
+ * source, or multiple runs of the same program. The timestamp is normally
+ * monotonically increasing and is unaffected by time-of-day adjustments,
+ * but it is reset when the position is set.
+ *
+ * @param surface The {@link Surface} to be used for the video portion of
+ * the media.
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized or has been released.
+ */
+ @Override
+ public void setSurface(Surface surface) {
+ if (mScreenOnWhilePlaying && surface != null) {
+ Log.w(TAG, "setScreenOnWhilePlaying(true) is ineffective for Surface");
+ }
+ mSurfaceHolder = null;
+ _setVideoSurface(surface);
+ updateSurfaceScreenOn();
+ }
+
+ /**
+ * Sets video scaling mode. To make the target video scaling mode
+ * effective during playback, this method must be called after
+ * data source is set. If not called, the default video
+ * scaling mode is {@link #VIDEO_SCALING_MODE_SCALE_TO_FIT}.
+ *
+ * <p> The supported video scaling modes are:
+ * <ul>
+ * <li> {@link #VIDEO_SCALING_MODE_SCALE_TO_FIT}
+ * <li> {@link #VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING}
+ * </ul>
+ *
+ * @param mode target video scaling mode. Must be one of the supported
+ * video scaling modes; otherwise, IllegalArgumentException will be thrown.
+ *
+ * @see MediaPlayer2#VIDEO_SCALING_MODE_SCALE_TO_FIT
+ * @see MediaPlayer2#VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING
+ * @hide
+ */
+ @Override
+ public void setVideoScalingMode(int mode) {
+ if (!isVideoScalingModeSupported(mode)) {
+ final String msg = "Scaling mode " + mode + " is not supported";
+ throw new IllegalArgumentException(msg);
+ }
+ Parcel request = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ try {
+ request.writeInt(INVOKE_ID_SET_VIDEO_SCALE_MODE);
+ request.writeInt(mode);
+ invoke(request, reply);
+ } finally {
+ request.recycle();
+ reply.recycle();
+ }
+ }
+
+ /**
+ * Discards all pending commands.
+ */
+ @Override
+ public void clearPendingCommands() {
+ }
+
+ /**
+ * Sets the data source as described by a DataSourceDesc.
+ *
+ * @param dsd the descriptor of data source you want to play
+ * @throws IllegalStateException if it is called in an invalid state
+ * @throws NullPointerException if dsd is null
+ */
+ @Override
+ public void setDataSource(@NonNull DataSourceDesc dsd) throws IOException {
+ Preconditions.checkNotNull(dsd, "the DataSourceDesc cannot be null");
+ mPlaylist = Collections.synchronizedList(new ArrayList<DataSourceDesc>(1));
+ mPlaylist.add(dsd);
+ mPLCurrentIndex = 0;
+ setDataSourcePriv(dsd);
+ }
+
+ /**
+ * Gets the current data source as described by a DataSourceDesc.
+ *
+ * @return the current DataSourceDesc
+ */
+ @Override
+ public DataSourceDesc getCurrentDataSource() {
+ if (mPlaylist == null) {
+ return null;
+ }
+ return mPlaylist.get(mPLCurrentIndex);
+ }
+
+ /**
+ * Sets the play list.
+ *
+ * If startIndex falls outside play list range, it will be clamped to the nearest index
+ * in the play list.
+ *
+ * @param pl the play list of data source you want to play
+ * @param startIndex the index of the DataSourceDesc in the play list you want to play first
+ * @throws IllegalStateException if it is called in an invalid state
+ * @throws IllegalArgumentException if pl is null or empty, or pl contains null DataSourceDesc
+ */
+ @Override
+ public void setPlaylist(@NonNull List<DataSourceDesc> pl, int startIndex)
+ throws IOException {
+ if (pl == null || pl.size() == 0) {
+ throw new IllegalArgumentException("play list cannot be null or empty.");
+ }
+ HashSet ids = new HashSet(pl.size());
+ for (DataSourceDesc dsd : pl) {
+ if (dsd == null) {
+ throw new IllegalArgumentException("DataSourceDesc in play list cannot be null.");
+ }
+ if (ids.add(dsd.getId()) == false) {
+ throw new IllegalArgumentException("DataSourceDesc Id in play list should be unique.");
+ }
+ }
+
+ if (startIndex < 0) {
+ startIndex = 0;
+ } else if (startIndex >= pl.size()) {
+ startIndex = pl.size() - 1;
+ }
+
+ mPlaylist = Collections.synchronizedList(new ArrayList(pl));
+ mPLCurrentIndex = startIndex;
+ setDataSourcePriv(mPlaylist.get(startIndex));
+ // TODO: handle the preparation of next source in the play list.
+ // It should be processed after current source is prepared.
+ }
+
+ /**
+ * Gets a copy of the play list.
+ *
+ * @return a copy of the play list used by {@link MediaPlayer2}
+ */
+ @Override
+ public List<DataSourceDesc> getPlaylist() {
+ if (mPlaylist == null) {
+ return null;
+ }
+ return new ArrayList(mPlaylist);
+ }
+
+ /**
+ * Sets the index of current DataSourceDesc in the play list to be played.
+ *
+ * @param index the index of DataSourceDesc in the play list you want to play
+ * @throws IllegalArgumentException if the play list is null
+ * @throws NullPointerException if index is outside play list range
+ */
+ @Override
+ public void setCurrentPlaylistItem(int index) {
+ if (mPlaylist == null) {
+ throw new IllegalArgumentException("play list has not been set yet.");
+ }
+ if (index < 0 || index >= mPlaylist.size()) {
+ throw new IndexOutOfBoundsException("index is out of play list range.");
+ }
+
+ if (index == mPLCurrentIndex) {
+ return;
+ }
+
+ // TODO: in playing state, stop current source and start to play source of index.
+ mPLCurrentIndex = index;
+ }
+
+ /**
+ * Sets the index of next-to-be-played DataSourceDesc in the play list.
+ *
+ * @param index the index of next-to-be-played DataSourceDesc in the play list
+ * @throws IllegalArgumentException if the play list is null
+ * @throws NullPointerException if index is outside play list range
+ */
+ @Override
+ public void setNextPlaylistItem(int index) {
+ if (mPlaylist == null) {
+ throw new IllegalArgumentException("play list has not been set yet.");
+ }
+ if (index < 0 || index >= mPlaylist.size()) {
+ throw new IndexOutOfBoundsException("index is out of play list range.");
+ }
+
+ if (index == mPLNextIndex) {
+ return;
+ }
+
+ // TODO: prepare the new next-to-be-played DataSourceDesc
+ mPLNextIndex = index;
+ }
+
+ /**
+ * Gets the current index of play list.
+ *
+ * @return the index of the current DataSourceDesc in the play list
+ */
+ @Override
+ public int getCurrentPlaylistItemIndex() {
+ return mPLCurrentIndex;
+ }
+
+ /**
+ * Sets the looping mode of the play list.
+ * The mode shall be one of {@link #LOOPING_MODE_NONE}, {@link #LOOPING_MODE_FULL},
+ * {@link #LOOPING_MODE_SINGLE}, {@link #LOOPING_MODE_SHUFFLE}.
+ *
+ * @param mode the mode in which the play list will be played
+ * @throws IllegalArgumentException if mode is not supported
+ */
+ @Override
+ public void setLoopingMode(@LoopingMode int mode) {
+ if (mode != LOOPING_MODE_NONE
+ && mode != LOOPING_MODE_FULL
+ && mode != LOOPING_MODE_SINGLE
+ && mode != LOOPING_MODE_SHUFFLE) {
+ throw new IllegalArgumentException("mode is not supported.");
+ }
+ mLoopingMode = mode;
+ if (mPlaylist == null) {
+ return;
+ }
+
+ // TODO: handle the new mode if necessary.
+ }
+
+ /**
+ * Gets the looping mode of play list.
+ *
+ * @return the looping mode of the play list
+ */
+ @Override
+ public int getLoopingMode() {
+ return mPLCurrentIndex;
+ }
+
+ /**
+ * Moves the DataSourceDesc at indexFrom in the play list to indexTo.
+ *
+ * @throws IllegalArgumentException if the play list is null
+ * @throws IndexOutOfBoundsException if indexFrom or indexTo is outside play list range
+ */
+ @Override
+ public void movePlaylistItem(int indexFrom, int indexTo) {
+ if (mPlaylist == null) {
+ throw new IllegalArgumentException("play list has not been set yet.");
+ }
+ // TODO: move the DataSourceDesc from indexFrom to indexTo.
+ }
+
+ /**
+ * Removes the DataSourceDesc at index in the play list.
+ *
+ * If index is same as the current index of the play list, current DataSourceDesc
+ * will be stopped and playback moves to next source in the list.
+ *
+ * @return the removed DataSourceDesc at index in the play list
+ * @throws IllegalArgumentException if the play list is null
+ * @throws IndexOutOfBoundsException if index is outside play list range
+ */
+ @Override
+ public DataSourceDesc removePlaylistItem(int index) {
+ if (mPlaylist == null) {
+ throw new IllegalArgumentException("play list has not been set yet.");
+ }
+
+ DataSourceDesc oldDsd = mPlaylist.remove(index);
+ // TODO: if index == mPLCurrentIndex, stop current source and move to next one.
+ // if index == mPLNextIndex, prepare the new next-to-be-played source.
+ return oldDsd;
+ }
+
+ /**
+ * Inserts the DataSourceDesc to the play list at position index.
+ *
+ * This will not change the DataSourceDesc currently being played.
+ * If index is less than or equal to the current index of the play list,
+ * the current index of the play list will be incremented correspondingly.
+ *
+ * @param index the index you want to add dsd to the play list
+ * @param dsd the descriptor of data source you want to add to the play list
+ * @throws IndexOutOfBoundsException if index is outside play list range
+ * @throws NullPointerException if dsd is null
+ */
+ @Override
+ public void addPlaylistItem(int index, DataSourceDesc dsd) {
+ Preconditions.checkNotNull(dsd, "the DataSourceDesc cannot be null");
+
+ if (mPlaylist == null) {
+ if (index == 0) {
+ mPlaylist = Collections.synchronizedList(new ArrayList<DataSourceDesc>());
+ mPlaylist.add(dsd);
+ mPLCurrentIndex = 0;
+ return;
+ }
+ throw new IllegalArgumentException("index should be 0 for first DataSourceDesc.");
+ }
+
+ long id = dsd.getId();
+ for (DataSourceDesc pldsd : mPlaylist) {
+ if (id == pldsd.getId()) {
+ throw new IllegalArgumentException("Id of dsd already exists in the play list.");
+ }
+ }
+
+ mPlaylist.add(index, dsd);
+ if (index <= mPLCurrentIndex) {
+ ++mPLCurrentIndex;
+ }
+ }
+
+ /**
+ * replaces the DataSourceDesc at index in the play list with given dsd.
+ *
+ * When index is same as the current index of the play list, the current source
+ * will be stopped and the new source will be played, except that if new
+ * and old source only differ on end position and current media position is
+ * smaller then the new end position.
+ *
+ * This will not change the DataSourceDesc currently being played.
+ * If index is less than or equal to the current index of the play list,
+ * the current index of the play list will be incremented correspondingly.
+ *
+ * @param index the index you want to add dsd to the play list
+ * @param dsd the descriptor of data source you want to add to the play list
+ * @throws IndexOutOfBoundsException if index is outside play list range
+ * @throws NullPointerException if dsd is null
+ */
+ @Override
+ public DataSourceDesc editPlaylistItem(int index, DataSourceDesc dsd) {
+ Preconditions.checkNotNull(dsd, "the DataSourceDesc cannot be null");
+ Preconditions.checkNotNull(mPlaylist, "the play list cannot be null");
+
+ long id = dsd.getId();
+ for (int i = 0; i < mPlaylist.size(); ++i) {
+ if (i == index) {
+ continue;
+ }
+ if (id == mPlaylist.get(i).getId()) {
+ throw new IllegalArgumentException("Id of dsd already exists in the play list.");
+ }
+ }
+
+ // TODO: if needed, stop playback of current source, and start new dsd.
+ DataSourceDesc oldDsd = mPlaylist.set(index, dsd);
+ return mPlaylist.set(index, dsd);
+ }
+
+ private void setDataSourcePriv(@NonNull DataSourceDesc dsd) throws IOException {
+ Preconditions.checkNotNull(dsd, "the DataSourceDesc cannot be null");
+
+ switch (dsd.getType()) {
+ case DataSourceDesc.TYPE_CALLBACK:
+ setDataSourcePriv(dsd.getId(),
+ dsd.getMedia2DataSource());
+ break;
+
+ case DataSourceDesc.TYPE_FD:
+ setDataSourcePriv(dsd.getId(),
+ dsd.getFileDescriptor(),
+ dsd.getFileDescriptorOffset(),
+ dsd.getFileDescriptorLength());
+ break;
+
+ case DataSourceDesc.TYPE_URI:
+ setDataSourcePriv(dsd.getId(),
+ dsd.getUriContext(),
+ dsd.getUri(),
+ dsd.getUriHeaders(),
+ dsd.getUriCookies());
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ /**
+ * To provide cookies for the subsequent HTTP requests, you can install your own default cookie
+ * handler and use other variants of setDataSource APIs instead. Alternatively, you can use
+ * this API to pass the cookies as a list of HttpCookie. If the app has not installed
+ * a CookieHandler already, this API creates a CookieManager and populates its CookieStore with
+ * the provided cookies. If the app has installed its own handler already, this API requires the
+ * handler to be of CookieManager type such that the API can update the manager’s CookieStore.
+ *
+ * <p><strong>Note</strong> that the cross domain redirection is allowed by default,
+ * but that can be changed with key/value pairs through the headers parameter with
+ * "android-allow-cross-domain-redirect" as the key and "0" or "1" as the value to
+ * disallow or allow cross domain redirection.
+ *
+ * @throws IllegalArgumentException if cookies are provided and the installed handler is not
+ * a CookieManager
+ * @throws IllegalStateException if it is called in an invalid state
+ * @throws NullPointerException if context or uri is null
+ * @throws IOException if uri has a file scheme and an I/O error occurs
+ */
+ private void setDataSourcePriv(long srcId, @NonNull Context context, @NonNull Uri uri,
+ @Nullable Map<String, String> headers, @Nullable List<HttpCookie> cookies)
+ throws IOException {
+ if (context == null) {
+ throw new NullPointerException("context param can not be null.");
+ }
+
+ if (uri == null) {
+ throw new NullPointerException("uri param can not be null.");
+ }
+
+ if (cookies != null) {
+ CookieHandler cookieHandler = CookieHandler.getDefault();
+ if (cookieHandler != null && !(cookieHandler instanceof CookieManager)) {
+ throw new IllegalArgumentException("The cookie handler has to be of CookieManager "
+ + "type when cookies are provided.");
+ }
+ }
+
+ // The context and URI usually belong to the calling user. Get a resolver for that user
+ // and strip out the userId from the URI if present.
+ final ContentResolver resolver = context.getContentResolver();
+ final String scheme = uri.getScheme();
+ final String authority = ContentProvider.getAuthorityWithoutUserId(uri.getAuthority());
+ if (ContentResolver.SCHEME_FILE.equals(scheme)) {
+ setDataSourcePriv(srcId, uri.getPath(), null, null);
+ return;
+ } else if (ContentResolver.SCHEME_CONTENT.equals(scheme)
+ && Settings.AUTHORITY.equals(authority)) {
+ // Try cached ringtone first since the actual provider may not be
+ // encryption aware, or it may be stored on CE media storage
+ final int type = RingtoneManager.getDefaultType(uri);
+ final Uri cacheUri = RingtoneManager.getCacheForType(type, context.getUserId());
+ final Uri actualUri = RingtoneManager.getActualDefaultRingtoneUri(context, type);
+ if (attemptDataSource(srcId, resolver, cacheUri)) {
+ return;
+ } else if (attemptDataSource(srcId, resolver, actualUri)) {
+ return;
+ } else {
+ setDataSourcePriv(srcId, uri.toString(), headers, cookies);
+ }
+ } else {
+ // Try requested Uri locally first, or fallback to media server
+ if (attemptDataSource(srcId, resolver, uri)) {
+ return;
+ } else {
+ setDataSourcePriv(srcId, uri.toString(), headers, cookies);
+ }
+ }
+ }
+
+ private boolean attemptDataSource(long srcId, ContentResolver resolver, Uri uri) {
+ try (AssetFileDescriptor afd = resolver.openAssetFileDescriptor(uri, "r")) {
+ if (afd.getDeclaredLength() < 0) {
+ setDataSourcePriv(srcId, afd.getFileDescriptor(), 0, DataSourceDesc.LONG_MAX);
+ } else {
+ setDataSourcePriv(srcId,
+ afd.getFileDescriptor(),
+ afd.getStartOffset(),
+ afd.getDeclaredLength());
+ }
+ return true;
+ } catch (NullPointerException | SecurityException | IOException ex) {
+ Log.w(TAG, "Couldn't open " + uri + ": " + ex);
+ return false;
+ }
+ }
+
+ private void setDataSourcePriv(
+ long srcId, String path, Map<String, String> headers, List<HttpCookie> cookies)
+ throws IOException, IllegalArgumentException, SecurityException, IllegalStateException
+ {
+ String[] keys = null;
+ String[] values = null;
+
+ if (headers != null) {
+ keys = new String[headers.size()];
+ values = new String[headers.size()];
+
+ int i = 0;
+ for (Map.Entry<String, String> entry: headers.entrySet()) {
+ keys[i] = entry.getKey();
+ values[i] = entry.getValue();
+ ++i;
+ }
+ }
+ setDataSourcePriv(srcId, path, keys, values, cookies);
+ }
+
+ private void setDataSourcePriv(long srcId, String path, String[] keys, String[] values,
+ List<HttpCookie> cookies)
+ throws IOException, IllegalArgumentException, SecurityException, IllegalStateException {
+ final Uri uri = Uri.parse(path);
+ final String scheme = uri.getScheme();
+ if ("file".equals(scheme)) {
+ path = uri.getPath();
+ } else if (scheme != null) {
+ // handle non-file sources
+ nativeSetDataSource(
+ Media2HTTPService.createHTTPService(path, cookies),
+ path,
+ keys,
+ values);
+ return;
+ }
+
+ final File file = new File(path);
+ if (file.exists()) {
+ FileInputStream is = new FileInputStream(file);
+ FileDescriptor fd = is.getFD();
+ setDataSourcePriv(srcId, fd, 0, DataSourceDesc.LONG_MAX);
+ is.close();
+ } else {
+ throw new IOException("setDataSourcePriv failed.");
+ }
+ }
+
+ private native void nativeSetDataSource(
+ Media2HTTPService httpService, String path, String[] keys, String[] values)
+ throws IOException, IllegalArgumentException, SecurityException, IllegalStateException;
+
+ /**
+ * Sets the data source (FileDescriptor) to use. The FileDescriptor must be
+ * seekable (N.B. a LocalSocket is not seekable). It is the caller's responsibility
+ * to close the file descriptor. It is safe to do so as soon as this call returns.
+ *
+ * @throws IllegalStateException if it is called in an invalid state
+ * @throws IllegalArgumentException if fd is not a valid FileDescriptor
+ * @throws IOException if fd can not be read
+ */
+ private void setDataSourcePriv(long srcId, FileDescriptor fd, long offset, long length)
+ throws IOException {
+ _setDataSource(fd, offset, length);
+ }
+
+ private native void _setDataSource(FileDescriptor fd, long offset, long length)
+ throws IOException;
+
+ /**
+ * @throws IllegalStateException if it is called in an invalid state
+ * @throws IllegalArgumentException if dataSource is not a valid Media2DataSource
+ */
+ private void setDataSourcePriv(long srcId, Media2DataSource dataSource) {
+ _setDataSource(dataSource);
+ }
+
+ private native void _setDataSource(Media2DataSource dataSource);
+
+ /**
+ * Prepares the player for playback, synchronously.
+ *
+ * After setting the datasource and the display surface, you need to either
+ * call prepare() or prepareAsync(). For files, it is OK to call prepare(),
+ * which blocks until MediaPlayer2 is ready for playback.
+ *
+ * @throws IOException if source can not be accessed
+ * @throws IllegalStateException if it is called in an invalid state
+ * @hide
+ */
+ @Override
+ public void prepare() throws IOException {
+ _prepare();
+ scanInternalSubtitleTracks();
+
+ // DrmInfo, if any, has been resolved by now.
+ synchronized (mDrmLock) {
+ mDrmInfoResolved = true;
+ }
+ }
+
+ private native void _prepare() throws IOException, IllegalStateException;
+
+ /**
+ * Prepares the player for playback, asynchronously.
+ *
+ * After setting the datasource and the display surface, you need to either
+ * call prepare() or prepareAsync(). For streams, you should call prepareAsync(),
+ * which returns immediately, rather than blocking until enough data has been
+ * buffered.
+ *
+ * @throws IllegalStateException if it is called in an invalid state
+ */
+ @Override
+ public native void prepareAsync();
+
+ /**
+ * Starts or resumes playback. If playback had previously been paused,
+ * playback will continue from where it was paused. If playback had
+ * been stopped, or never started before, playback will start at the
+ * beginning.
+ *
+ * @throws IllegalStateException if it is called in an invalid state
+ */
+ @Override
+ public void play() {
+ stayAwake(true);
+ _start();
+ }
+
+ private native void _start() throws IllegalStateException;
+
+
+ private int getAudioStreamType() {
+ if (mStreamType == AudioManager.USE_DEFAULT_STREAM_TYPE) {
+ mStreamType = _getAudioStreamType();
+ }
+ return mStreamType;
+ }
+
+ private native int _getAudioStreamType() throws IllegalStateException;
+
+ /**
+ * Stops playback after playback has been started or paused.
+ *
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized.
+ * #hide
+ */
+ @Override
+ public void stop() {
+ stayAwake(false);
+ _stop();
+ }
+
+ private native void _stop() throws IllegalStateException;
+
+ /**
+ * Pauses playback. Call play() to resume.
+ *
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized.
+ */
+ @Override
+ public void pause() {
+ stayAwake(false);
+ _pause();
+ }
+
+ private native void _pause() throws IllegalStateException;
+
+ //--------------------------------------------------------------------------
+ // Explicit Routing
+ //--------------------
+ private AudioDeviceInfo mPreferredDevice = null;
+
+ /**
+ * Specifies an audio device (via an {@link AudioDeviceInfo} object) to route
+ * the output from this MediaPlayer2.
+ * @param deviceInfo The {@link AudioDeviceInfo} specifying the audio sink or source.
+ * If deviceInfo is null, default routing is restored.
+ * @return true if succesful, false if the specified {@link AudioDeviceInfo} is non-null and
+ * does not correspond to a valid audio device.
+ */
+ @Override
+ public boolean setPreferredDevice(AudioDeviceInfo deviceInfo) {
+ if (deviceInfo != null && !deviceInfo.isSink()) {
+ return false;
+ }
+ int preferredDeviceId = deviceInfo != null ? deviceInfo.getId() : 0;
+ boolean status = native_setOutputDevice(preferredDeviceId);
+ if (status == true) {
+ synchronized (this) {
+ mPreferredDevice = deviceInfo;
+ }
+ }
+ return status;
+ }
+
+ /**
+ * Returns the selected output specified by {@link #setPreferredDevice}. Note that this
+ * is not guaranteed to correspond to the actual device being used for playback.
+ */
+ @Override
+ public AudioDeviceInfo getPreferredDevice() {
+ synchronized (this) {
+ return mPreferredDevice;
+ }
+ }
+
+ /**
+ * Returns an {@link AudioDeviceInfo} identifying the current routing of this MediaPlayer2
+ * Note: The query is only valid if the MediaPlayer2 is currently playing.
+ * If the player is not playing, the returned device can be null or correspond to previously
+ * selected device when the player was last active.
+ */
+ @Override
+ public AudioDeviceInfo getRoutedDevice() {
+ int deviceId = native_getRoutedDeviceId();
+ if (deviceId == 0) {
+ return null;
+ }
+ AudioDeviceInfo[] devices =
+ AudioManager.getDevicesStatic(AudioManager.GET_DEVICES_OUTPUTS);
+ for (int i = 0; i < devices.length; i++) {
+ if (devices[i].getId() == deviceId) {
+ return devices[i];
+ }
+ }
+ return null;
+ }
+
+ /*
+ * Call BEFORE adding a routing callback handler or AFTER removing a routing callback handler.
+ */
+ private void enableNativeRoutingCallbacksLocked(boolean enabled) {
+ if (mRoutingChangeListeners.size() == 0) {
+ native_enableDeviceCallback(enabled);
+ }
+ }
+
+ /**
+ * The list of AudioRouting.OnRoutingChangedListener interfaces added (with
+ * {@link #addOnRoutingChangedListener(android.media.AudioRouting.OnRoutingChangedListener, Handler)}
+ * by an app to receive (re)routing notifications.
+ */
+ @GuardedBy("mRoutingChangeListeners")
+ private ArrayMap<AudioRouting.OnRoutingChangedListener,
+ NativeRoutingEventHandlerDelegate> mRoutingChangeListeners = new ArrayMap<>();
+
+ /**
+ * Adds an {@link AudioRouting.OnRoutingChangedListener} to receive notifications of routing
+ * changes on this MediaPlayer2.
+ * @param listener The {@link AudioRouting.OnRoutingChangedListener} interface to receive
+ * notifications of rerouting events.
+ * @param handler Specifies the {@link Handler} object for the thread on which to execute
+ * the callback. If <code>null</code>, the handler on the main looper will be used.
+ */
+ @Override
+ public void addOnRoutingChangedListener(AudioRouting.OnRoutingChangedListener listener,
+ Handler handler) {
+ synchronized (mRoutingChangeListeners) {
+ if (listener != null && !mRoutingChangeListeners.containsKey(listener)) {
+ enableNativeRoutingCallbacksLocked(true);
+ mRoutingChangeListeners.put(
+ listener, new NativeRoutingEventHandlerDelegate(this, listener,
+ handler != null ? handler : mEventHandler));
+ }
+ }
+ }
+
+ /**
+ * Removes an {@link AudioRouting.OnRoutingChangedListener} which has been previously added
+ * to receive rerouting notifications.
+ * @param listener The previously added {@link AudioRouting.OnRoutingChangedListener} interface
+ * to remove.
+ */
+ @Override
+ public void removeOnRoutingChangedListener(AudioRouting.OnRoutingChangedListener listener) {
+ synchronized (mRoutingChangeListeners) {
+ if (mRoutingChangeListeners.containsKey(listener)) {
+ mRoutingChangeListeners.remove(listener);
+ enableNativeRoutingCallbacksLocked(false);
+ }
+ }
+ }
+
+ private native final boolean native_setOutputDevice(int deviceId);
+ private native final int native_getRoutedDeviceId();
+ private native final void native_enableDeviceCallback(boolean enabled);
+
+ /**
+ * Set the low-level power management behavior for this MediaPlayer2. This
+ * can be used when the MediaPlayer2 is not playing through a SurfaceHolder
+ * set with {@link #setDisplay(SurfaceHolder)} and thus can use the
+ * high-level {@link #setScreenOnWhilePlaying(boolean)} feature.
+ *
+ * <p>This function has the MediaPlayer2 access the low-level power manager
+ * service to control the device's power usage while playing is occurring.
+ * The parameter is a combination of {@link android.os.PowerManager} wake flags.
+ * Use of this method requires {@link android.Manifest.permission#WAKE_LOCK}
+ * permission.
+ * By default, no attempt is made to keep the device awake during playback.
+ *
+ * @param context the Context to use
+ * @param mode the power/wake mode to set
+ * @see android.os.PowerManager
+ * @hide
+ */
+ @Override
+ public void setWakeMode(Context context, int mode) {
+ boolean washeld = false;
+
+ /* Disable persistant wakelocks in media player based on property */
+ if (SystemProperties.getBoolean("audio.offload.ignore_setawake", false) == true) {
+ Log.w(TAG, "IGNORING setWakeMode " + mode);
+ return;
+ }
+
+ if (mWakeLock != null) {
+ if (mWakeLock.isHeld()) {
+ washeld = true;
+ mWakeLock.release();
+ }
+ mWakeLock = null;
+ }
+
+ PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
+ mWakeLock = pm.newWakeLock(mode|PowerManager.ON_AFTER_RELEASE, MediaPlayer2Impl.class.getName());
+ mWakeLock.setReferenceCounted(false);
+ if (washeld) {
+ mWakeLock.acquire();
+ }
+ }
+
+ /**
+ * Control whether we should use the attached SurfaceHolder to keep the
+ * screen on while video playback is occurring. This is the preferred
+ * method over {@link #setWakeMode} where possible, since it doesn't
+ * require that the application have permission for low-level wake lock
+ * access.
+ *
+ * @param screenOn Supply true to keep the screen on, false to allow it
+ * to turn off.
+ * @hide
+ */
+ @Override
+ public void setScreenOnWhilePlaying(boolean screenOn) {
+ if (mScreenOnWhilePlaying != screenOn) {
+ if (screenOn && mSurfaceHolder == null) {
+ Log.w(TAG, "setScreenOnWhilePlaying(true) is ineffective without a SurfaceHolder");
+ }
+ mScreenOnWhilePlaying = screenOn;
+ updateSurfaceScreenOn();
+ }
+ }
+
+ private void stayAwake(boolean awake) {
+ if (mWakeLock != null) {
+ if (awake && !mWakeLock.isHeld()) {
+ mWakeLock.acquire();
+ } else if (!awake && mWakeLock.isHeld()) {
+ mWakeLock.release();
+ }
+ }
+ mStayAwake = awake;
+ updateSurfaceScreenOn();
+ }
+
+ private void updateSurfaceScreenOn() {
+ if (mSurfaceHolder != null) {
+ mSurfaceHolder.setKeepScreenOn(mScreenOnWhilePlaying && mStayAwake);
+ }
+ }
+
+ /**
+ * Returns the width of the video.
+ *
+ * @return the width of the video, or 0 if there is no video,
+ * no display surface was set, or the width has not been determined
+ * yet. The {@code EventCallback} can be registered via
+ * {@link #registerEventCallback(Executor, EventCallback)} to provide a
+ * notification {@code EventCallback.onVideoSizeChanged} when the width is available.
+ */
+ @Override
+ public native int getVideoWidth();
+
+ /**
+ * Returns the height of the video.
+ *
+ * @return the height of the video, or 0 if there is no video,
+ * no display surface was set, or the height has not been determined
+ * yet. The {@code EventCallback} can be registered via
+ * {@link #registerEventCallback(Executor, EventCallback)} to provide a
+ * notification {@code EventCallback.onVideoSizeChanged} when the height is available.
+ */
+ @Override
+ public native int getVideoHeight();
+
+ /**
+ * Return Metrics data about the current player.
+ *
+ * @return a {@link PersistableBundle} containing the set of attributes and values
+ * available for the media being handled by this instance of MediaPlayer2
+ * The attributes are descibed in {@link MetricsConstants}.
+ *
+ * Additional vendor-specific fields may also be present in
+ * the return value.
+ */
+ @Override
+ public PersistableBundle getMetrics() {
+ PersistableBundle bundle = native_getMetrics();
+ return bundle;
+ }
+
+ private native PersistableBundle native_getMetrics();
+
+ /**
+ * Checks whether the MediaPlayer2 is playing.
+ *
+ * @return true if currently playing, false otherwise
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized or has been released.
+ */
+ @Override
+ public native boolean isPlaying();
+
+ /**
+ * Gets the current buffering management params used by the source component.
+ * Calling it only after {@code setDataSource} has been called.
+ * Each type of data source might have different set of default params.
+ *
+ * @return the current buffering management params used by the source component.
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized, or {@code setDataSource} has not been called.
+ * @hide
+ */
+ @Override
+ @NonNull
+ public native BufferingParams getBufferingParams();
+
+ /**
+ * Sets buffering management params.
+ * The object sets its internal BufferingParams to the input, except that the input is
+ * invalid or not supported.
+ * Call it only after {@code setDataSource} has been called.
+ * The input is a hint to MediaPlayer2.
+ *
+ * @param params the buffering management params.
+ *
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized or has been released, or {@code setDataSource} has not been called.
+ * @throws IllegalArgumentException if params is invalid or not supported.
+ * @hide
+ */
+ @Override
+ public native void setBufferingParams(@NonNull BufferingParams params);
+
+ /**
+ * Sets playback rate and audio mode.
+ *
+ * @param rate the ratio between desired playback rate and normal one.
+ * @param audioMode audio playback mode. Must be one of the supported
+ * audio modes.
+ *
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized.
+ * @throws IllegalArgumentException if audioMode is not supported.
+ *
+ * @hide
+ */
+ @Override
+ @NonNull
+ public PlaybackParams easyPlaybackParams(float rate, @PlaybackRateAudioMode int audioMode) {
+ PlaybackParams params = new PlaybackParams();
+ params.allowDefaults();
+ switch (audioMode) {
+ case PLAYBACK_RATE_AUDIO_MODE_DEFAULT:
+ params.setSpeed(rate).setPitch(1.0f);
+ break;
+ case PLAYBACK_RATE_AUDIO_MODE_STRETCH:
+ params.setSpeed(rate).setPitch(1.0f)
+ .setAudioFallbackMode(params.AUDIO_FALLBACK_MODE_FAIL);
+ break;
+ case PLAYBACK_RATE_AUDIO_MODE_RESAMPLE:
+ params.setSpeed(rate).setPitch(rate);
+ break;
+ default:
+ final String msg = "Audio playback mode " + audioMode + " is not supported";
+ throw new IllegalArgumentException(msg);
+ }
+ return params;
+ }
+
+ /**
+ * Sets playback rate using {@link PlaybackParams}. The object sets its internal
+ * PlaybackParams to the input, except that the object remembers previous speed
+ * when input speed is zero. This allows the object to resume at previous speed
+ * when play() is called. Calling it before the object is prepared does not change
+ * the object state. After the object is prepared, calling it with zero speed is
+ * equivalent to calling pause(). After the object is prepared, calling it with
+ * non-zero speed is equivalent to calling play().
+ *
+ * @param params the playback params.
+ *
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized or has been released.
+ * @throws IllegalArgumentException if params is not supported.
+ */
+ @Override
+ public native void setPlaybackParams(@NonNull PlaybackParams params);
+
+ /**
+ * Gets the playback params, containing the current playback rate.
+ *
+ * @return the playback params.
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized.
+ */
+ @Override
+ @NonNull
+ public native PlaybackParams getPlaybackParams();
+
+ /**
+ * Sets A/V sync mode.
+ *
+ * @param params the A/V sync params to apply
+ *
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized.
+ * @throws IllegalArgumentException if params are not supported.
+ */
+ @Override
+ public native void setSyncParams(@NonNull SyncParams params);
+
+ /**
+ * Gets the A/V sync mode.
+ *
+ * @return the A/V sync params
+ *
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized.
+ */
+ @Override
+ @NonNull
+ public native SyncParams getSyncParams();
+
+ private native final void _seekTo(long msec, int mode);
+
+ /**
+ * Moves the media to specified time position by considering the given mode.
+ * <p>
+ * When seekTo is finished, the user will be notified via OnSeekComplete supplied by the user.
+ * There is at most one active seekTo processed at any time. If there is a to-be-completed
+ * seekTo, new seekTo requests will be queued in such a way that only the last request
+ * is kept. When current seekTo is completed, the queued request will be processed if
+ * that request is different from just-finished seekTo operation, i.e., the requested
+ * position or mode is different.
+ *
+ * @param msec the offset in milliseconds from the start to seek to.
+ * When seeking to the given time position, there is no guarantee that the data source
+ * has a frame located at the position. When this happens, a frame nearby will be rendered.
+ * If msec is negative, time position zero will be used.
+ * If msec is larger than duration, duration will be used.
+ * @param mode the mode indicating where exactly to seek to.
+ * Use {@link #SEEK_PREVIOUS_SYNC} if one wants to seek to a sync frame
+ * that has a timestamp earlier than or the same as msec. Use
+ * {@link #SEEK_NEXT_SYNC} if one wants to seek to a sync frame
+ * that has a timestamp later than or the same as msec. Use
+ * {@link #SEEK_CLOSEST_SYNC} if one wants to seek to a sync frame
+ * that has a timestamp closest to or the same as msec. Use
+ * {@link #SEEK_CLOSEST} if one wants to seek to a frame that may
+ * or may not be a sync frame but is closest to or the same as msec.
+ * {@link #SEEK_CLOSEST} often has larger performance overhead compared
+ * to the other options if there is no sync frame located at msec.
+ * @throws IllegalStateException if the internal player engine has not been
+ * initialized
+ * @throws IllegalArgumentException if the mode is invalid.
+ */
+ @Override
+ public void seekTo(long msec, @SeekMode int mode) {
+ if (mode < SEEK_PREVIOUS_SYNC || mode > SEEK_CLOSEST) {
+ final String msg = "Illegal seek mode: " + mode;
+ throw new IllegalArgumentException(msg);
+ }
+ // TODO: pass long to native, instead of truncating here.
+ if (msec > Integer.MAX_VALUE) {
+ Log.w(TAG, "seekTo offset " + msec + " is too large, cap to " + Integer.MAX_VALUE);
+ msec = Integer.MAX_VALUE;
+ } else if (msec < Integer.MIN_VALUE) {
+ Log.w(TAG, "seekTo offset " + msec + " is too small, cap to " + Integer.MIN_VALUE);
+ msec = Integer.MIN_VALUE;
+ }
+ _seekTo(msec, mode);
+ }
+
+ /**
+ * Get current playback position as a {@link MediaTimestamp}.
+ * <p>
+ * The MediaTimestamp represents how the media time correlates to the system time in
+ * a linear fashion using an anchor and a clock rate. During regular playback, the media
+ * time moves fairly constantly (though the anchor frame may be rebased to a current
+ * system time, the linear correlation stays steady). Therefore, this method does not
+ * need to be called often.
+ * <p>
+ * To help users get current playback position, this method always anchors the timestamp
+ * to the current {@link System#nanoTime system time}, so
+ * {@link MediaTimestamp#getAnchorMediaTimeUs} can be used as current playback position.
+ *
+ * @return a MediaTimestamp object if a timestamp is available, or {@code null} if no timestamp
+ * is available, e.g. because the media player has not been initialized.
+ *
+ * @see MediaTimestamp
+ */
+ @Override
+ @Nullable
+ public MediaTimestamp getTimestamp()
+ {
+ try {
+ // TODO: get the timestamp from native side
+ return new MediaTimestamp(
+ getCurrentPosition() * 1000L,
+ System.nanoTime(),
+ isPlaying() ? getPlaybackParams().getSpeed() : 0.f);
+ } catch (IllegalStateException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Gets the current playback position.
+ *
+ * @return the current position in milliseconds
+ */
+ @Override
+ public native int getCurrentPosition();
+
+ /**
+ * Gets the duration of the file.
+ *
+ * @return the duration in milliseconds, if no duration is available
+ * (for example, if streaming live content), -1 is returned.
+ */
+ @Override
+ public native int getDuration();
+
+ /**
+ * Gets the media metadata.
+ *
+ * @param update_only controls whether the full set of available
+ * metadata is returned or just the set that changed since the
+ * last call. See {@see #METADATA_UPDATE_ONLY} and {@see
+ * #METADATA_ALL}.
+ *
+ * @param apply_filter if true only metadata that matches the
+ * filter is returned. See {@see #APPLY_METADATA_FILTER} and {@see
+ * #BYPASS_METADATA_FILTER}.
+ *
+ * @return The metadata, possibly empty. null if an error occured.
+ // FIXME: unhide.
+ * {@hide}
+ */
+ @Override
+ public Metadata getMetadata(final boolean update_only,
+ final boolean apply_filter) {
+ Parcel reply = Parcel.obtain();
+ Metadata data = new Metadata();
+
+ if (!native_getMetadata(update_only, apply_filter, reply)) {
+ reply.recycle();
+ return null;
+ }
+
+ // Metadata takes over the parcel, don't recycle it unless
+ // there is an error.
+ if (!data.parse(reply)) {
+ reply.recycle();
+ return null;
+ }
+ return data;
+ }
+
+ /**
+ * Set a filter for the metadata update notification and update
+ * retrieval. The caller provides 2 set of metadata keys, allowed
+ * and blocked. The blocked set always takes precedence over the
+ * allowed one.
+ * Metadata.MATCH_ALL and Metadata.MATCH_NONE are 2 sets available as
+ * shorthands to allow/block all or no metadata.
+ *
+ * By default, there is no filter set.
+ *
+ * @param allow Is the set of metadata the client is interested
+ * in receiving new notifications for.
+ * @param block Is the set of metadata the client is not interested
+ * in receiving new notifications for.
+ * @return The call status code.
+ *
+ // FIXME: unhide.
+ * {@hide}
+ */
+ @Override
+ public int setMetadataFilter(Set<Integer> allow, Set<Integer> block) {
+ // Do our serialization manually instead of calling
+ // Parcel.writeArray since the sets are made of the same type
+ // we avoid paying the price of calling writeValue (used by
+ // writeArray) which burns an extra int per element to encode
+ // the type.
+ Parcel request = newRequest();
+
+ // The parcel starts already with an interface token. There
+ // are 2 filters. Each one starts with a 4bytes number to
+ // store the len followed by a number of int (4 bytes as well)
+ // representing the metadata type.
+ int capacity = request.dataSize() + 4 * (1 + allow.size() + 1 + block.size());
+
+ if (request.dataCapacity() < capacity) {
+ request.setDataCapacity(capacity);
+ }
+
+ request.writeInt(allow.size());
+ for(Integer t: allow) {
+ request.writeInt(t);
+ }
+ request.writeInt(block.size());
+ for(Integer t: block) {
+ request.writeInt(t);
+ }
+ return native_setMetadataFilter(request);
+ }
+
+ /**
+ * Set the MediaPlayer2 to start when this MediaPlayer2 finishes playback
+ * (i.e. reaches the end of the stream).
+ * The media framework will attempt to transition from this player to
+ * the next as seamlessly as possible. The next player can be set at
+ * any time before completion, but shall be after setDataSource has been
+ * called successfully. The next player must be prepared by the
+ * app, and the application should not call play() on it.
+ * The next MediaPlayer2 must be different from 'this'. An exception
+ * will be thrown if next == this.
+ * The application may call setNextMediaPlayer(null) to indicate no
+ * next player should be started at the end of playback.
+ * If the current player is looping, it will keep looping and the next
+ * player will not be started.
+ *
+ * @param next the player to start after this one completes playback.
+ *
+ * @hide
+ */
+ @Override
+ public native void setNextMediaPlayer(MediaPlayer2 next);
+
+ /**
+ * Resets the MediaPlayer2 to its uninitialized state. After calling
+ * this method, you will have to initialize it again by setting the
+ * data source and calling prepare().
+ */
+ @Override
+ public void reset() {
+ mSelectedSubtitleTrackIndex = -1;
+ synchronized(mOpenSubtitleSources) {
+ for (final InputStream is: mOpenSubtitleSources) {
+ try {
+ is.close();
+ } catch (IOException e) {
+ }
+ }
+ mOpenSubtitleSources.clear();
+ }
+ if (mSubtitleController != null) {
+ mSubtitleController.reset();
+ }
+ if (mTimeProvider != null) {
+ mTimeProvider.close();
+ mTimeProvider = null;
+ }
+
+ synchronized (mEventCbLock) {
+ mEventCallbackRecords.clear();
+ }
+ synchronized (mDrmEventCbLock) {
+ mDrmEventCallbackRecords.clear();
+ }
+
+ stayAwake(false);
+ _reset();
+ // make sure none of the listeners get called anymore
+ if (mEventHandler != null) {
+ mEventHandler.removeCallbacksAndMessages(null);
+ }
+
+ synchronized (mIndexTrackPairs) {
+ mIndexTrackPairs.clear();
+ mInbandTrackIndices.clear();
+ };
+
+ resetDrmState();
+ }
+
+ private native void _reset();
+
+ /**
+ * Set up a timer for {@link #TimeProvider}. {@link #TimeProvider} will be
+ * notified when the presentation time reaches (becomes greater than or equal to)
+ * the value specified.
+ *
+ * @param mediaTimeUs presentation time to get timed event callback at
+ * @hide
+ */
+ @Override
+ public void notifyAt(long mediaTimeUs) {
+ _notifyAt(mediaTimeUs);
+ }
+
+ private native void _notifyAt(long mediaTimeUs);
+
+ // Keep KEY_PARAMETER_* in sync with include/media/mediaplayer2.h
+ private final static int KEY_PARAMETER_AUDIO_ATTRIBUTES = 1400;
+ /**
+ * Sets the parameter indicated by key.
+ * @param key key indicates the parameter to be set.
+ * @param value value of the parameter to be set.
+ * @return true if the parameter is set successfully, false otherwise
+ * {@hide}
+ */
+ private native boolean setParameter(int key, Parcel value);
+
+ /**
+ * Sets the audio attributes for this MediaPlayer2.
+ * See {@link AudioAttributes} for how to build and configure an instance of this class.
+ * You must call this method before {@link #prepare()} or {@link #prepareAsync()} in order
+ * for the audio attributes to become effective thereafter.
+ * @param attributes a non-null set of audio attributes
+ * @throws IllegalArgumentException if the attributes are null or invalid.
+ */
+ @Override
+ public void setAudioAttributes(AudioAttributes attributes) {
+ if (attributes == null) {
+ final String msg = "Cannot set AudioAttributes to null";
+ throw new IllegalArgumentException(msg);
+ }
+ mUsage = attributes.getUsage();
+ mBypassInterruptionPolicy = (attributes.getAllFlags()
+ & AudioAttributes.FLAG_BYPASS_INTERRUPTION_POLICY) != 0;
+ Parcel pattributes = Parcel.obtain();
+ attributes.writeToParcel(pattributes, AudioAttributes.FLATTEN_TAGS);
+ setParameter(KEY_PARAMETER_AUDIO_ATTRIBUTES, pattributes);
+ pattributes.recycle();
+ }
+
+ /**
+ * Sets the player to be looping or non-looping.
+ *
+ * @param looping whether to loop or not
+ * @hide
+ */
+ @Override
+ public native void setLooping(boolean looping);
+
+ /**
+ * Checks whether the MediaPlayer2 is looping or non-looping.
+ *
+ * @return true if the MediaPlayer2 is currently looping, false otherwise
+ * @hide
+ */
+ @Override
+ public native boolean isLooping();
+
+ /**
+ * Sets the volume on this player.
+ * This API is recommended for balancing the output of audio streams
+ * within an application. Unless you are writing an application to
+ * control user settings, this API should be used in preference to
+ * {@link AudioManager#setStreamVolume(int, int, int)} which sets the volume of ALL streams of
+ * a particular type. Note that the passed volume values are raw scalars in range 0.0 to 1.0.
+ * UI controls should be scaled logarithmically.
+ *
+ * @param leftVolume left volume scalar
+ * @param rightVolume right volume scalar
+ */
+ /*
+ * FIXME: Merge this into javadoc comment above when setVolume(float) is not @hide.
+ * The single parameter form below is preferred if the channel volumes don't need
+ * to be set independently.
+ */
+ @Override
+ public void setVolume(float leftVolume, float rightVolume) {
+ _setVolume(leftVolume, rightVolume);
+ }
+
+ private native void _setVolume(float leftVolume, float rightVolume);
+
+ /**
+ * Similar, excepts sets volume of all channels to same value.
+ * @hide
+ */
+ @Override
+ public void setVolume(float volume) {
+ setVolume(volume, volume);
+ }
+
+ /**
+ * Sets the audio session ID.
+ *
+ * @param sessionId the audio session ID.
+ * The audio session ID is a system wide unique identifier for the audio stream played by
+ * this MediaPlayer2 instance.
+ * The primary use of the audio session ID is to associate audio effects to a particular
+ * instance of MediaPlayer2: if an audio session ID is provided when creating an audio effect,
+ * this effect will be applied only to the audio content of media players within the same
+ * audio session and not to the output mix.
+ * When created, a MediaPlayer2 instance automatically generates its own audio session ID.
+ * However, it is possible to force this player to be part of an already existing audio session
+ * by calling this method.
+ * This method must be called before one of the overloaded <code> setDataSource </code> methods.
+ * @throws IllegalStateException if it is called in an invalid state
+ * @throws IllegalArgumentException if the sessionId is invalid.
+ */
+ @Override
+ public native void setAudioSessionId(int sessionId);
+
+ /**
+ * Returns the audio session ID.
+ *
+ * @return the audio session ID. {@see #setAudioSessionId(int)}
+ * Note that the audio session ID is 0 only if a problem occured when the MediaPlayer2 was contructed.
+ */
+ @Override
+ public native int getAudioSessionId();
+
+ /**
+ * Attaches an auxiliary effect to the player. A typical auxiliary effect is a reverberation
+ * effect which can be applied on any sound source that directs a certain amount of its
+ * energy to this effect. This amount is defined by setAuxEffectSendLevel().
+ * See {@link #setAuxEffectSendLevel(float)}.
+ * <p>After creating an auxiliary effect (e.g.
+ * {@link android.media.audiofx.EnvironmentalReverb}), retrieve its ID with
+ * {@link android.media.audiofx.AudioEffect#getId()} and use it when calling this method
+ * to attach the player to the effect.
+ * <p>To detach the effect from the player, call this method with a null effect id.
+ * <p>This method must be called after one of the overloaded <code> setDataSource </code>
+ * methods.
+ * @param effectId system wide unique id of the effect to attach
+ */
+ @Override
+ public native void attachAuxEffect(int effectId);
+
+
+ /**
+ * Sets the send level of the player to the attached auxiliary effect.
+ * See {@link #attachAuxEffect(int)}. The level value range is 0 to 1.0.
+ * <p>By default the send level is 0, so even if an effect is attached to the player
+ * this method must be called for the effect to be applied.
+ * <p>Note that the passed level value is a raw scalar. UI controls should be scaled
+ * logarithmically: the gain applied by audio framework ranges from -72dB to 0dB,
+ * so an appropriate conversion from linear UI input x to level is:
+ * x == 0 -> level = 0
+ * 0 < x <= R -> level = 10^(72*(x-R)/20/R)
+ * @param level send level scalar
+ */
+ @Override
+ public void setAuxEffectSendLevel(float level) {
+ _setAuxEffectSendLevel(level);
+ }
+
+ private native void _setAuxEffectSendLevel(float level);
+
+ /*
+ * @param request Parcel destinated to the media player.
+ * @param reply[out] Parcel that will contain the reply.
+ * @return The status code.
+ */
+ private native final int native_invoke(Parcel request, Parcel reply);
+
+
+ /*
+ * @param update_only If true fetch only the set of metadata that have
+ * changed since the last invocation of getMetadata.
+ * The set is built using the unfiltered
+ * notifications the native player sent to the
+ * MediaPlayer2Manager during that period of
+ * time. If false, all the metadatas are considered.
+ * @param apply_filter If true, once the metadata set has been built based on
+ * the value update_only, the current filter is applied.
+ * @param reply[out] On return contains the serialized
+ * metadata. Valid only if the call was successful.
+ * @return The status code.
+ */
+ private native final boolean native_getMetadata(boolean update_only,
+ boolean apply_filter,
+ Parcel reply);
+
+ /*
+ * @param request Parcel with the 2 serialized lists of allowed
+ * metadata types followed by the one to be
+ * dropped. Each list starts with an integer
+ * indicating the number of metadata type elements.
+ * @return The status code.
+ */
+ private native final int native_setMetadataFilter(Parcel request);
+
+ private static native final void native_init();
+ private native final void native_setup(Object mediaplayer2_this);
+ private native final void native_finalize();
+
+ /**
+ * Class for MediaPlayer2 to return each audio/video/subtitle track's metadata.
+ *
+ * @see android.media.MediaPlayer2#getTrackInfo
+ */
+ public static final class TrackInfoImpl extends TrackInfo {
+ /**
+ * Gets the track type.
+ * @return TrackType which indicates if the track is video, audio, timed text.
+ */
+ @Override
+ public int getTrackType() {
+ return mTrackType;
+ }
+
+ /**
+ * Gets the language code of the track.
+ * @return a language code in either way of ISO-639-1 or ISO-639-2.
+ * When the language is unknown or could not be determined,
+ * ISO-639-2 language code, "und", is returned.
+ */
+ @Override
+ public String getLanguage() {
+ String language = mFormat.getString(MediaFormat.KEY_LANGUAGE);
+ return language == null ? "und" : language;
+ }
+
+ /**
+ * Gets the {@link MediaFormat} of the track. If the format is
+ * unknown or could not be determined, null is returned.
+ */
+ @Override
+ public MediaFormat getFormat() {
+ if (mTrackType == MEDIA_TRACK_TYPE_TIMEDTEXT
+ || mTrackType == MEDIA_TRACK_TYPE_SUBTITLE) {
+ return mFormat;
+ }
+ return null;
+ }
+
+ final int mTrackType;
+ final MediaFormat mFormat;
+
+ TrackInfoImpl(Parcel in) {
+ mTrackType = in.readInt();
+ // TODO: parcel in the full MediaFormat; currently we are using createSubtitleFormat
+ // even for audio/video tracks, meaning we only set the mime and language.
+ String mime = in.readString();
+ String language = in.readString();
+ mFormat = MediaFormat.createSubtitleFormat(mime, language);
+
+ if (mTrackType == MEDIA_TRACK_TYPE_SUBTITLE) {
+ mFormat.setInteger(MediaFormat.KEY_IS_AUTOSELECT, in.readInt());
+ mFormat.setInteger(MediaFormat.KEY_IS_DEFAULT, in.readInt());
+ mFormat.setInteger(MediaFormat.KEY_IS_FORCED_SUBTITLE, in.readInt());
+ }
+ }
+
+ /** @hide */
+ TrackInfoImpl(int type, MediaFormat format) {
+ mTrackType = type;
+ mFormat = format;
+ }
+
+ /**
+ * Flatten this object in to a Parcel.
+ *
+ * @param dest The Parcel in which the object should be written.
+ * @param flags Additional flags about how the object should be written.
+ * May be 0 or {@link android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE}.
+ */
+ /* package private */ void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(mTrackType);
+ dest.writeString(getLanguage());
+
+ if (mTrackType == MEDIA_TRACK_TYPE_SUBTITLE) {
+ dest.writeString(mFormat.getString(MediaFormat.KEY_MIME));
+ dest.writeInt(mFormat.getInteger(MediaFormat.KEY_IS_AUTOSELECT));
+ dest.writeInt(mFormat.getInteger(MediaFormat.KEY_IS_DEFAULT));
+ dest.writeInt(mFormat.getInteger(MediaFormat.KEY_IS_FORCED_SUBTITLE));
+ }
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder out = new StringBuilder(128);
+ out.append(getClass().getName());
+ out.append('{');
+ switch (mTrackType) {
+ case MEDIA_TRACK_TYPE_VIDEO:
+ out.append("VIDEO");
+ break;
+ case MEDIA_TRACK_TYPE_AUDIO:
+ out.append("AUDIO");
+ break;
+ case MEDIA_TRACK_TYPE_TIMEDTEXT:
+ out.append("TIMEDTEXT");
+ break;
+ case MEDIA_TRACK_TYPE_SUBTITLE:
+ out.append("SUBTITLE");
+ break;
+ default:
+ out.append("UNKNOWN");
+ break;
+ }
+ out.append(", " + mFormat.toString());
+ out.append("}");
+ return out.toString();
+ }
+
+ /**
+ * Used to read a TrackInfoImpl from a Parcel.
+ */
+ /* package private */ static final Parcelable.Creator<TrackInfoImpl> CREATOR
+ = new Parcelable.Creator<TrackInfoImpl>() {
+ @Override
+ public TrackInfoImpl createFromParcel(Parcel in) {
+ return new TrackInfoImpl(in);
+ }
+
+ @Override
+ public TrackInfoImpl[] newArray(int size) {
+ return new TrackInfoImpl[size];
+ }
+ };
+
+ };
+
+ // We would like domain specific classes with more informative names than the `first` and `second`
+ // in generic Pair, but we would also like to avoid creating new/trivial classes. As a compromise
+ // we document the meanings of `first` and `second` here:
+ //
+ // Pair.first - inband track index; non-null iff representing an inband track.
+ // Pair.second - a SubtitleTrack registered with mSubtitleController; non-null iff representing
+ // an inband subtitle track or any out-of-band track (subtitle or timedtext).
+ private Vector<Pair<Integer, SubtitleTrack>> mIndexTrackPairs = new Vector<>();
+ private BitSet mInbandTrackIndices = new BitSet();
+
+ /**
+ * Returns a List of track information.
+ *
+ * @return List of track info. The total number of tracks is the array length.
+ * Must be called again if an external timed text source has been added after
+ * addTimedTextSource method is called.
+ * @throws IllegalStateException if it is called in an invalid state.
+ */
+ @Override
+ public List<TrackInfo> getTrackInfo() {
+ TrackInfoImpl trackInfo[] = getInbandTrackInfoImpl();
+ // add out-of-band tracks
+ synchronized (mIndexTrackPairs) {
+ TrackInfoImpl allTrackInfo[] = new TrackInfoImpl[mIndexTrackPairs.size()];
+ for (int i = 0; i < allTrackInfo.length; i++) {
+ Pair<Integer, SubtitleTrack> p = mIndexTrackPairs.get(i);
+ if (p.first != null) {
+ // inband track
+ allTrackInfo[i] = trackInfo[p.first];
+ } else {
+ SubtitleTrack track = p.second;
+ allTrackInfo[i] = new TrackInfoImpl(track.getTrackType(), track.getFormat());
+ }
+ }
+ return Arrays.asList(allTrackInfo);
+ }
+ }
+
+ private TrackInfoImpl[] getInbandTrackInfoImpl() throws IllegalStateException {
+ Parcel request = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ try {
+ request.writeInt(INVOKE_ID_GET_TRACK_INFO);
+ invoke(request, reply);
+ TrackInfoImpl trackInfo[] = reply.createTypedArray(TrackInfoImpl.CREATOR);
+ return trackInfo;
+ } finally {
+ request.recycle();
+ reply.recycle();
+ }
+ }
+
+ /*
+ * A helper function to check if the mime type is supported by media framework.
+ */
+ private static boolean availableMimeTypeForExternalSource(String mimeType) {
+ if (MEDIA_MIMETYPE_TEXT_SUBRIP.equals(mimeType)) {
+ return true;
+ }
+ return false;
+ }
+
+ private SubtitleController mSubtitleController;
+
+ /** @hide */
+ @Override
+ public void setSubtitleAnchor(
+ SubtitleController controller,
+ SubtitleController.Anchor anchor) {
+ // TODO: create SubtitleController in MediaPlayer2
+ mSubtitleController = controller;
+ mSubtitleController.setAnchor(anchor);
+ }
+
+ /**
+ * The private version of setSubtitleAnchor is used internally to set mSubtitleController if
+ * necessary when clients don't provide their own SubtitleControllers using the public version
+ * {@link #setSubtitleAnchor(SubtitleController, Anchor)} (e.g. {@link VideoView} provides one).
+ */
+ private synchronized void setSubtitleAnchor() {
+ if ((mSubtitleController == null) && (ActivityThread.currentApplication() != null)) {
+ final HandlerThread thread = new HandlerThread("SetSubtitleAnchorThread");
+ thread.start();
+ Handler handler = new Handler(thread.getLooper());
+ handler.post(new Runnable() {
+ @Override
+ public void run() {
+ Context context = ActivityThread.currentApplication();
+ mSubtitleController = new SubtitleController(context, mTimeProvider, MediaPlayer2Impl.this);
+ mSubtitleController.setAnchor(new Anchor() {
+ @Override
+ public void setSubtitleWidget(RenderingWidget subtitleWidget) {
+ }
+
+ @Override
+ public Looper getSubtitleLooper() {
+ return Looper.getMainLooper();
+ }
+ });
+ thread.getLooper().quitSafely();
+ }
+ });
+ try {
+ thread.join();
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ Log.w(TAG, "failed to join SetSubtitleAnchorThread");
+ }
+ }
+ }
+
+ private int mSelectedSubtitleTrackIndex = -1;
+ private Vector<InputStream> mOpenSubtitleSources;
+
+ private OnSubtitleDataListener mSubtitleDataListener = new OnSubtitleDataListener() {
+ @Override
+ public void onSubtitleData(MediaPlayer2 mp, SubtitleData data) {
+ int index = data.getTrackIndex();
+ synchronized (mIndexTrackPairs) {
+ for (Pair<Integer, SubtitleTrack> p : mIndexTrackPairs) {
+ if (p.first != null && p.first == index && p.second != null) {
+ // inband subtitle track that owns data
+ SubtitleTrack track = p.second;
+ track.onData(data);
+ }
+ }
+ }
+ }
+ };
+
+ /** @hide */
+ @Override
+ public void onSubtitleTrackSelected(SubtitleTrack track) {
+ if (mSelectedSubtitleTrackIndex >= 0) {
+ try {
+ selectOrDeselectInbandTrack(mSelectedSubtitleTrackIndex, false);
+ } catch (IllegalStateException e) {
+ }
+ mSelectedSubtitleTrackIndex = -1;
+ }
+ setOnSubtitleDataListener(null);
+ if (track == null) {
+ return;
+ }
+
+ synchronized (mIndexTrackPairs) {
+ for (Pair<Integer, SubtitleTrack> p : mIndexTrackPairs) {
+ if (p.first != null && p.second == track) {
+ // inband subtitle track that is selected
+ mSelectedSubtitleTrackIndex = p.first;
+ break;
+ }
+ }
+ }
+
+ if (mSelectedSubtitleTrackIndex >= 0) {
+ try {
+ selectOrDeselectInbandTrack(mSelectedSubtitleTrackIndex, true);
+ } catch (IllegalStateException e) {
+ }
+ setOnSubtitleDataListener(mSubtitleDataListener);
+ }
+ // no need to select out-of-band tracks
+ }
+
+ /** @hide */
+ @Override
+ public void addSubtitleSource(InputStream is, MediaFormat format)
+ throws IllegalStateException
+ {
+ final InputStream fIs = is;
+ final MediaFormat fFormat = format;
+
+ if (is != null) {
+ // Ensure all input streams are closed. It is also a handy
+ // way to implement timeouts in the future.
+ synchronized(mOpenSubtitleSources) {
+ mOpenSubtitleSources.add(is);
+ }
+ } else {
+ Log.w(TAG, "addSubtitleSource called with null InputStream");
+ }
+
+ getMediaTimeProvider();
+
+ // process each subtitle in its own thread
+ final HandlerThread thread = new HandlerThread("SubtitleReadThread",
+ Process.THREAD_PRIORITY_BACKGROUND + Process.THREAD_PRIORITY_MORE_FAVORABLE);
+ thread.start();
+ Handler handler = new Handler(thread.getLooper());
+ handler.post(new Runnable() {
+ private int addTrack() {
+ if (fIs == null || mSubtitleController == null) {
+ return MEDIA_INFO_UNSUPPORTED_SUBTITLE;
+ }
+
+ SubtitleTrack track = mSubtitleController.addTrack(fFormat);
+ if (track == null) {
+ return MEDIA_INFO_UNSUPPORTED_SUBTITLE;
+ }
+
+ // TODO: do the conversion in the subtitle track
+ Scanner scanner = new Scanner(fIs, "UTF-8");
+ String contents = scanner.useDelimiter("\\A").next();
+ synchronized(mOpenSubtitleSources) {
+ mOpenSubtitleSources.remove(fIs);
+ }
+ scanner.close();
+ synchronized (mIndexTrackPairs) {
+ mIndexTrackPairs.add(Pair.<Integer, SubtitleTrack>create(null, track));
+ }
+ Handler h = mTimeProvider.mEventHandler;
+ int what = TimeProvider.NOTIFY;
+ int arg1 = TimeProvider.NOTIFY_TRACK_DATA;
+ Pair<SubtitleTrack, byte[]> trackData = Pair.create(track, contents.getBytes());
+ Message m = h.obtainMessage(what, arg1, 0, trackData);
+ h.sendMessage(m);
+ return MEDIA_INFO_EXTERNAL_METADATA_UPDATE;
+ }
+
+ public void run() {
+ int res = addTrack();
+ if (mEventHandler != null) {
+ Message m = mEventHandler.obtainMessage(MEDIA_INFO, res, 0, null);
+ mEventHandler.sendMessage(m);
+ }
+ thread.getLooper().quitSafely();
+ }
+ });
+ }
+
+ private void scanInternalSubtitleTracks() {
+ setSubtitleAnchor();
+
+ populateInbandTracks();
+
+ if (mSubtitleController != null) {
+ mSubtitleController.selectDefaultTrack();
+ }
+ }
+
+ private void populateInbandTracks() {
+ TrackInfoImpl[] tracks = getInbandTrackInfoImpl();
+ synchronized (mIndexTrackPairs) {
+ for (int i = 0; i < tracks.length; i++) {
+ if (mInbandTrackIndices.get(i)) {
+ continue;
+ } else {
+ mInbandTrackIndices.set(i);
+ }
+
+ // newly appeared inband track
+ if (tracks[i].getTrackType() == TrackInfo.MEDIA_TRACK_TYPE_SUBTITLE) {
+ SubtitleTrack track = mSubtitleController.addTrack(
+ tracks[i].getFormat());
+ mIndexTrackPairs.add(Pair.create(i, track));
+ } else {
+ mIndexTrackPairs.add(Pair.<Integer, SubtitleTrack>create(i, null));
+ }
+ }
+ }
+ }
+
+ /* TODO: Limit the total number of external timed text source to a reasonable number.
+ */
+ /**
+ * Adds an external timed text source file.
+ *
+ * Currently supported format is SubRip with the file extension .srt, case insensitive.
+ * Note that a single external timed text source may contain multiple tracks in it.
+ * One can find the total number of available tracks using {@link #getTrackInfo()} to see what
+ * additional tracks become available after this method call.
+ *
+ * @param path The file path of external timed text source file.
+ * @param mimeType The mime type of the file. Must be one of the mime types listed above.
+ * @throws IOException if the file cannot be accessed or is corrupted.
+ * @throws IllegalArgumentException if the mimeType is not supported.
+ * @throws IllegalStateException if called in an invalid state.
+ * @hide
+ */
+ @Override
+ public void addTimedTextSource(String path, String mimeType)
+ throws IOException {
+ if (!availableMimeTypeForExternalSource(mimeType)) {
+ final String msg = "Illegal mimeType for timed text source: " + mimeType;
+ throw new IllegalArgumentException(msg);
+ }
+
+ File file = new File(path);
+ if (file.exists()) {
+ FileInputStream is = new FileInputStream(file);
+ FileDescriptor fd = is.getFD();
+ addTimedTextSource(fd, mimeType);
+ is.close();
+ } else {
+ // We do not support the case where the path is not a file.
+ throw new IOException(path);
+ }
+ }
+
+
+ /**
+ * Adds an external timed text source file (Uri).
+ *
+ * Currently supported format is SubRip with the file extension .srt, case insensitive.
+ * Note that a single external timed text source may contain multiple tracks in it.
+ * One can find the total number of available tracks using {@link #getTrackInfo()} to see what
+ * additional tracks become available after this method call.
+ *
+ * @param context the Context to use when resolving the Uri
+ * @param uri the Content URI of the data you want to play
+ * @param mimeType The mime type of the file. Must be one of the mime types listed above.
+ * @throws IOException if the file cannot be accessed or is corrupted.
+ * @throws IllegalArgumentException if the mimeType is not supported.
+ * @throws IllegalStateException if called in an invalid state.
+ * @hide
+ */
+ @Override
+ public void addTimedTextSource(Context context, Uri uri, String mimeType)
+ throws IOException {
+ String scheme = uri.getScheme();
+ if(scheme == null || scheme.equals("file")) {
+ addTimedTextSource(uri.getPath(), mimeType);
+ return;
+ }
+
+ AssetFileDescriptor fd = null;
+ try {
+ ContentResolver resolver = context.getContentResolver();
+ fd = resolver.openAssetFileDescriptor(uri, "r");
+ if (fd == null) {
+ return;
+ }
+ addTimedTextSource(fd.getFileDescriptor(), mimeType);
+ return;
+ } catch (SecurityException ex) {
+ } catch (IOException ex) {
+ } finally {
+ if (fd != null) {
+ fd.close();
+ }
+ }
+ }
+
+ /**
+ * Adds an external timed text source file (FileDescriptor).
+ *
+ * It is the caller's responsibility to close the file descriptor.
+ * It is safe to do so as soon as this call returns.
+ *
+ * Currently supported format is SubRip. Note that a single external timed text source may
+ * contain multiple tracks in it. One can find the total number of available tracks
+ * using {@link #getTrackInfo()} to see what additional tracks become available
+ * after this method call.
+ *
+ * @param fd the FileDescriptor for the file you want to play
+ * @param mimeType The mime type of the file. Must be one of the mime types listed above.
+ * @throws IllegalArgumentException if the mimeType is not supported.
+ * @throws IllegalStateException if called in an invalid state.
+ * @hide
+ */
+ @Override
+ public void addTimedTextSource(FileDescriptor fd, String mimeType) {
+ // intentionally less than LONG_MAX
+ addTimedTextSource(fd, 0, 0x7ffffffffffffffL, mimeType);
+ }
+
+ /**
+ * Adds an external timed text file (FileDescriptor).
+ *
+ * It is the caller's responsibility to close the file descriptor.
+ * It is safe to do so as soon as this call returns.
+ *
+ * Currently supported format is SubRip. Note that a single external timed text source may
+ * contain multiple tracks in it. One can find the total number of available tracks
+ * using {@link #getTrackInfo()} to see what additional tracks become available
+ * after this method call.
+ *
+ * @param fd the FileDescriptor for the file you want to play
+ * @param offset the offset into the file where the data to be played starts, in bytes
+ * @param length the length in bytes of the data to be played
+ * @param mime The mime type of the file. Must be one of the mime types listed above.
+ * @throws IllegalArgumentException if the mimeType is not supported.
+ * @throws IllegalStateException if called in an invalid state.
+ * @hide
+ */
+ @Override
+ public void addTimedTextSource(FileDescriptor fd, long offset, long length, String mime) {
+ if (!availableMimeTypeForExternalSource(mime)) {
+ throw new IllegalArgumentException("Illegal mimeType for timed text source: " + mime);
+ }
+
+ final FileDescriptor dupedFd;
+ try {
+ dupedFd = Os.dup(fd);
+ } catch (ErrnoException ex) {
+ Log.e(TAG, ex.getMessage(), ex);
+ throw new RuntimeException(ex);
+ }
+
+ final MediaFormat fFormat = new MediaFormat();
+ fFormat.setString(MediaFormat.KEY_MIME, mime);
+ fFormat.setInteger(MediaFormat.KEY_IS_TIMED_TEXT, 1);
+
+ // A MediaPlayer2 created by a VideoView should already have its mSubtitleController set.
+ if (mSubtitleController == null) {
+ setSubtitleAnchor();
+ }
+
+ if (!mSubtitleController.hasRendererFor(fFormat)) {
+ // test and add not atomic
+ Context context = ActivityThread.currentApplication();
+ mSubtitleController.registerRenderer(new SRTRenderer(context, mEventHandler));
+ }
+ final SubtitleTrack track = mSubtitleController.addTrack(fFormat);
+ synchronized (mIndexTrackPairs) {
+ mIndexTrackPairs.add(Pair.<Integer, SubtitleTrack>create(null, track));
+ }
+
+ getMediaTimeProvider();
+
+ final long offset2 = offset;
+ final long length2 = length;
+ final HandlerThread thread = new HandlerThread(
+ "TimedTextReadThread",
+ Process.THREAD_PRIORITY_BACKGROUND + Process.THREAD_PRIORITY_MORE_FAVORABLE);
+ thread.start();
+ Handler handler = new Handler(thread.getLooper());
+ handler.post(new Runnable() {
+ private int addTrack() {
+ final ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ try {
+ Os.lseek(dupedFd, offset2, OsConstants.SEEK_SET);
+ byte[] buffer = new byte[4096];
+ for (long total = 0; total < length2;) {
+ int bytesToRead = (int) Math.min(buffer.length, length2 - total);
+ int bytes = IoBridge.read(dupedFd, buffer, 0, bytesToRead);
+ if (bytes < 0) {
+ break;
+ } else {
+ bos.write(buffer, 0, bytes);
+ total += bytes;
+ }
+ }
+ Handler h = mTimeProvider.mEventHandler;
+ int what = TimeProvider.NOTIFY;
+ int arg1 = TimeProvider.NOTIFY_TRACK_DATA;
+ Pair<SubtitleTrack, byte[]> trackData = Pair.create(track, bos.toByteArray());
+ Message m = h.obtainMessage(what, arg1, 0, trackData);
+ h.sendMessage(m);
+ return MEDIA_INFO_EXTERNAL_METADATA_UPDATE;
+ } catch (Exception e) {
+ Log.e(TAG, e.getMessage(), e);
+ return MEDIA_INFO_TIMED_TEXT_ERROR;
+ } finally {
+ try {
+ Os.close(dupedFd);
+ } catch (ErrnoException e) {
+ Log.e(TAG, e.getMessage(), e);
+ }
+ }
+ }
+
+ public void run() {
+ int res = addTrack();
+ if (mEventHandler != null) {
+ Message m = mEventHandler.obtainMessage(MEDIA_INFO, res, 0, null);
+ mEventHandler.sendMessage(m);
+ }
+ thread.getLooper().quitSafely();
+ }
+ });
+ }
+
+ /**
+ * Returns the index of the audio, video, or subtitle track currently selected for playback,
+ * The return value is an index into the array returned by {@link #getTrackInfo()}, and can
+ * be used in calls to {@link #selectTrack(int)} or {@link #deselectTrack(int)}.
+ *
+ * @param trackType should be one of {@link TrackInfo#MEDIA_TRACK_TYPE_VIDEO},
+ * {@link TrackInfo#MEDIA_TRACK_TYPE_AUDIO}, or
+ * {@link TrackInfo#MEDIA_TRACK_TYPE_SUBTITLE}
+ * @return index of the audio, video, or subtitle track currently selected for playback;
+ * a negative integer is returned when there is no selected track for {@code trackType} or
+ * when {@code trackType} is not one of audio, video, or subtitle.
+ * @throws IllegalStateException if called after {@link #close()}
+ *
+ * @see #getTrackInfo()
+ * @see #selectTrack(int)
+ * @see #deselectTrack(int)
+ */
+ @Override
+ public int getSelectedTrack(int trackType) {
+ if (mSubtitleController != null
+ && (trackType == TrackInfo.MEDIA_TRACK_TYPE_SUBTITLE
+ || trackType == TrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT)) {
+ SubtitleTrack subtitleTrack = mSubtitleController.getSelectedTrack();
+ if (subtitleTrack != null) {
+ synchronized (mIndexTrackPairs) {
+ for (int i = 0; i < mIndexTrackPairs.size(); i++) {
+ Pair<Integer, SubtitleTrack> p = mIndexTrackPairs.get(i);
+ if (p.second == subtitleTrack && subtitleTrack.getTrackType() == trackType) {
+ return i;
+ }
+ }
+ }
+ }
+ }
+
+ Parcel request = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ try {
+ request.writeInt(INVOKE_ID_GET_SELECTED_TRACK);
+ request.writeInt(trackType);
+ invoke(request, reply);
+ int inbandTrackIndex = reply.readInt();
+ synchronized (mIndexTrackPairs) {
+ for (int i = 0; i < mIndexTrackPairs.size(); i++) {
+ Pair<Integer, SubtitleTrack> p = mIndexTrackPairs.get(i);
+ if (p.first != null && p.first == inbandTrackIndex) {
+ return i;
+ }
+ }
+ }
+ return -1;
+ } finally {
+ request.recycle();
+ reply.recycle();
+ }
+ }
+
+ /**
+ * Selects a track.
+ * <p>
+ * If a MediaPlayer2 is in invalid state, it throws an IllegalStateException exception.
+ * If a MediaPlayer2 is in <em>Started</em> state, the selected track is presented immediately.
+ * If a MediaPlayer2 is not in Started state, it just marks the track to be played.
+ * </p>
+ * <p>
+ * In any valid state, if it is called multiple times on the same type of track (ie. Video,
+ * Audio, Timed Text), the most recent one will be chosen.
+ * </p>
+ * <p>
+ * The first audio and video tracks are selected by default if available, even though
+ * this method is not called. However, no timed text track will be selected until
+ * this function is called.
+ * </p>
+ * <p>
+ * Currently, only timed text tracks or audio tracks can be selected via this method.
+ * In addition, the support for selecting an audio track at runtime is pretty limited
+ * in that an audio track can only be selected in the <em>Prepared</em> state.
+ * </p>
+ * @param index the index of the track to be selected. The valid range of the index
+ * is 0..total number of track - 1. The total number of tracks as well as the type of
+ * each individual track can be found by calling {@link #getTrackInfo()} method.
+ * @throws IllegalStateException if called in an invalid state.
+ *
+ * @see android.media.MediaPlayer2#getTrackInfo
+ */
+ @Override
+ public void selectTrack(int index) {
+ selectOrDeselectTrack(index, true /* select */);
+ }
+
+ /**
+ * Deselect a track.
+ * <p>
+ * Currently, the track must be a timed text track and no audio or video tracks can be
+ * deselected. If the timed text track identified by index has not been
+ * selected before, it throws an exception.
+ * </p>
+ * @param index the index of the track to be deselected. The valid range of the index
+ * is 0..total number of tracks - 1. The total number of tracks as well as the type of
+ * each individual track can be found by calling {@link #getTrackInfo()} method.
+ * @throws IllegalStateException if called in an invalid state.
+ *
+ * @see android.media.MediaPlayer2#getTrackInfo
+ */
+ @Override
+ public void deselectTrack(int index) {
+ selectOrDeselectTrack(index, false /* select */);
+ }
+
+ private void selectOrDeselectTrack(int index, boolean select)
+ throws IllegalStateException {
+ // handle subtitle track through subtitle controller
+ populateInbandTracks();
+
+ Pair<Integer,SubtitleTrack> p = null;
+ try {
+ p = mIndexTrackPairs.get(index);
+ } catch (ArrayIndexOutOfBoundsException e) {
+ // ignore bad index
+ return;
+ }
+
+ SubtitleTrack track = p.second;
+ if (track == null) {
+ // inband (de)select
+ selectOrDeselectInbandTrack(p.first, select);
+ return;
+ }
+
+ if (mSubtitleController == null) {
+ return;
+ }
+
+ if (!select) {
+ // out-of-band deselect
+ if (mSubtitleController.getSelectedTrack() == track) {
+ mSubtitleController.selectTrack(null);
+ } else {
+ Log.w(TAG, "trying to deselect track that was not selected");
+ }
+ return;
+ }
+
+ // out-of-band select
+ if (track.getTrackType() == TrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT) {
+ int ttIndex = getSelectedTrack(TrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT);
+ synchronized (mIndexTrackPairs) {
+ if (ttIndex >= 0 && ttIndex < mIndexTrackPairs.size()) {
+ Pair<Integer,SubtitleTrack> p2 = mIndexTrackPairs.get(ttIndex);
+ if (p2.first != null && p2.second == null) {
+ // deselect inband counterpart
+ selectOrDeselectInbandTrack(p2.first, false);
+ }
+ }
+ }
+ }
+ mSubtitleController.selectTrack(track);
+ }
+
+ private void selectOrDeselectInbandTrack(int index, boolean select)
+ throws IllegalStateException {
+ Parcel request = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ try {
+ request.writeInt(select? INVOKE_ID_SELECT_TRACK: INVOKE_ID_DESELECT_TRACK);
+ request.writeInt(index);
+ invoke(request, reply);
+ } finally {
+ request.recycle();
+ reply.recycle();
+ }
+ }
+
+ /**
+ * Sets the target UDP re-transmit endpoint for the low level player.
+ * Generally, the address portion of the endpoint is an IP multicast
+ * address, although a unicast address would be equally valid. When a valid
+ * retransmit endpoint has been set, the media player will not decode and
+ * render the media presentation locally. Instead, the player will attempt
+ * to re-multiplex its media data using the Android@Home RTP profile and
+ * re-transmit to the target endpoint. Receiver devices (which may be
+ * either the same as the transmitting device or different devices) may
+ * instantiate, prepare, and start a receiver player using a setDataSource
+ * URL of the form...
+ *
+ * aahRX://<multicastIP>:<port>
+ *
+ * to receive, decode and render the re-transmitted content.
+ *
+ * setRetransmitEndpoint may only be called before setDataSource has been
+ * called; while the player is in the Idle state.
+ *
+ * @param endpoint the address and UDP port of the re-transmission target or
+ * null if no re-transmission is to be performed.
+ * @throws IllegalStateException if it is called in an invalid state
+ * @throws IllegalArgumentException if the retransmit endpoint is supplied,
+ * but invalid.
+ *
+ * {@hide} pending API council
+ */
+ @Override
+ public void setRetransmitEndpoint(InetSocketAddress endpoint)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ String addrString = null;
+ int port = 0;
+
+ if (null != endpoint) {
+ addrString = endpoint.getAddress().getHostAddress();
+ port = endpoint.getPort();
+ }
+
+ int ret = native_setRetransmitEndpoint(addrString, port);
+ if (ret != 0) {
+ throw new IllegalArgumentException("Illegal re-transmit endpoint; native ret " + ret);
+ }
+ }
+
+ private native final int native_setRetransmitEndpoint(String addrString, int port);
+
+ /**
+ * Releases the resources held by this {@code MediaPlayer2} object.
+ *
+ * It is considered good practice to call this method when you're
+ * done using the MediaPlayer2. In particular, whenever an Activity
+ * of an application is paused (its onPause() method is called),
+ * or stopped (its onStop() method is called), this method should be
+ * invoked to release the MediaPlayer2 object, unless the application
+ * has a special need to keep the object around. In addition to
+ * unnecessary resources (such as memory and instances of codecs)
+ * being held, failure to call this method immediately if a
+ * MediaPlayer2 object is no longer needed may also lead to
+ * continuous battery consumption for mobile devices, and playback
+ * failure for other applications if no multiple instances of the
+ * same codec are supported on a device. Even if multiple instances
+ * of the same codec are supported, some performance degradation
+ * may be expected when unnecessary multiple instances are used
+ * at the same time.
+ *
+ * {@code close()} may be safely called after a prior {@code close()}.
+ * This class implements the Java {@code AutoCloseable} interface and
+ * may be used with try-with-resources.
+ */
+ @Override
+ public void close() {
+ synchronized (mGuard) {
+ release();
+ }
+ }
+
+ // Have to declare protected for finalize() since it is protected
+ // in the base class Object.
+ @Override
+ protected void finalize() throws Throwable {
+ if (mGuard != null) {
+ mGuard.warnIfOpen();
+ }
+
+ close();
+ native_finalize();
+ }
+
+ private void release() {
+ stayAwake(false);
+ updateSurfaceScreenOn();
+ synchronized (mEventCbLock) {
+ mEventCallbackRecords.clear();
+ }
+ if (mTimeProvider != null) {
+ mTimeProvider.close();
+ mTimeProvider = null;
+ }
+ mOnSubtitleDataListener = null;
+
+ // Modular DRM clean up
+ mOnDrmConfigHelper = null;
+ synchronized (mDrmEventCbLock) {
+ mDrmEventCallbackRecords.clear();
+ }
+ resetDrmState();
+
+ _release();
+ }
+
+ private native void _release();
+
+ /* Do not change these values without updating their counterparts
+ * in include/media/mediaplayer2.h!
+ */
+ private static final int MEDIA_NOP = 0; // interface test message
+ private static final int MEDIA_PREPARED = 1;
+ private static final int MEDIA_PLAYBACK_COMPLETE = 2;
+ private static final int MEDIA_BUFFERING_UPDATE = 3;
+ private static final int MEDIA_SEEK_COMPLETE = 4;
+ private static final int MEDIA_SET_VIDEO_SIZE = 5;
+ private static final int MEDIA_STARTED = 6;
+ private static final int MEDIA_PAUSED = 7;
+ private static final int MEDIA_STOPPED = 8;
+ private static final int MEDIA_SKIPPED = 9;
+ private static final int MEDIA_NOTIFY_TIME = 98;
+ private static final int MEDIA_TIMED_TEXT = 99;
+ private static final int MEDIA_ERROR = 100;
+ private static final int MEDIA_INFO = 200;
+ private static final int MEDIA_SUBTITLE_DATA = 201;
+ private static final int MEDIA_META_DATA = 202;
+ private static final int MEDIA_DRM_INFO = 210;
+ private static final int MEDIA_AUDIO_ROUTING_CHANGED = 10000;
+
+ private TimeProvider mTimeProvider;
+
+ /** @hide */
+ @Override
+ public MediaTimeProvider getMediaTimeProvider() {
+ if (mTimeProvider == null) {
+ mTimeProvider = new TimeProvider(this);
+ }
+ return mTimeProvider;
+ }
+
+ private class EventHandler extends Handler {
+ private MediaPlayer2Impl mMediaPlayer;
+
+ public EventHandler(MediaPlayer2Impl mp, Looper looper) {
+ super(looper);
+ mMediaPlayer = mp;
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ if (mMediaPlayer.mNativeContext == 0) {
+ Log.w(TAG, "mediaplayer2 went away with unhandled events");
+ return;
+ }
+ final int what = msg.arg1;
+ final int extra = msg.arg2;
+ switch(msg.what) {
+ case MEDIA_PREPARED:
+ try {
+ scanInternalSubtitleTracks();
+ } catch (RuntimeException e) {
+ // send error message instead of crashing;
+ // send error message instead of inlining a call to onError
+ // to avoid code duplication.
+ Message msg2 = obtainMessage(
+ MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, MEDIA_ERROR_UNSUPPORTED, null);
+ sendMessage(msg2);
+ }
+
+ synchronized (mEventCbLock) {
+ for (Pair<Executor, EventCallback> cb : mEventCallbackRecords) {
+ cb.first.execute(() -> cb.second.onInfo(
+ mMediaPlayer, 0, MEDIA_INFO_PREPARED, 0));
+ }
+ }
+ return;
+
+ case MEDIA_DRM_INFO:
+ if (msg.obj == null) {
+ Log.w(TAG, "MEDIA_DRM_INFO msg.obj=NULL");
+ } else if (msg.obj instanceof Parcel) {
+ // The parcel was parsed already in postEventFromNative
+ final DrmInfoImpl drmInfo;
+
+ synchronized (mDrmLock) {
+ if (mDrmInfoImpl != null) {
+ drmInfo = mDrmInfoImpl.makeCopy();
+ } else {
+ drmInfo = null;
+ }
+ }
+
+ // notifying the client outside the lock
+ if (drmInfo != null) {
+ synchronized (mEventCbLock) {
+ for (Pair<Executor, DrmEventCallback> cb : mDrmEventCallbackRecords) {
+ cb.first.execute(() -> cb.second.onDrmInfo(
+ mMediaPlayer, drmInfo));
+ }
+ }
+ }
+ } else {
+ Log.w(TAG, "MEDIA_DRM_INFO msg.obj of unexpected type " + msg.obj);
+ }
+ return;
+
+ case MEDIA_PLAYBACK_COMPLETE:
+ synchronized (mEventCbLock) {
+ for (Pair<Executor, EventCallback> cb : mEventCallbackRecords) {
+ cb.first.execute(() -> cb.second.onInfo(
+ mMediaPlayer, 0, MEDIA_INFO_PLAYBACK_COMPLETE, 0));
+ }
+ }
+ stayAwake(false);
+ return;
+
+ case MEDIA_STOPPED:
+ {
+ TimeProvider timeProvider = mTimeProvider;
+ if (timeProvider != null) {
+ timeProvider.onStopped();
+ }
+ }
+ break;
+
+ case MEDIA_STARTED:
+ case MEDIA_PAUSED:
+ {
+ TimeProvider timeProvider = mTimeProvider;
+ if (timeProvider != null) {
+ timeProvider.onPaused(msg.what == MEDIA_PAUSED);
+ }
+ }
+ break;
+
+ case MEDIA_BUFFERING_UPDATE:
+ final int percent = msg.arg1;
+ synchronized (mEventCbLock) {
+ for (Pair<Executor, EventCallback> cb : mEventCallbackRecords) {
+ cb.first.execute(() -> cb.second.onBufferingUpdate(
+ mMediaPlayer, 0, percent));
+ }
+ }
+ return;
+
+ case MEDIA_SEEK_COMPLETE:
+ synchronized (mEventCbLock) {
+ for (Pair<Executor, EventCallback> cb : mEventCallbackRecords) {
+ cb.first.execute(() -> cb.second.onInfo(
+ mMediaPlayer, 0, MEDIA_INFO_COMPLETE_CALL_SEEK, 0));
+ }
+ }
+ // fall through
+
+ case MEDIA_SKIPPED:
+ {
+ TimeProvider timeProvider = mTimeProvider;
+ if (timeProvider != null) {
+ timeProvider.onSeekComplete(mMediaPlayer);
+ }
+ }
+ return;
+
+ case MEDIA_SET_VIDEO_SIZE:
+ final int width = msg.arg1;
+ final int height = msg.arg2;
+ synchronized (mEventCbLock) {
+ for (Pair<Executor, EventCallback> cb : mEventCallbackRecords) {
+ cb.first.execute(() -> cb.second.onVideoSizeChanged(
+ mMediaPlayer, 0, width, height));
+ }
+ }
+ return;
+
+ case MEDIA_ERROR:
+ Log.e(TAG, "Error (" + msg.arg1 + "," + msg.arg2 + ")");
+ synchronized (mEventCbLock) {
+ for (Pair<Executor, EventCallback> cb : mEventCallbackRecords) {
+ cb.first.execute(() -> cb.second.onError(
+ mMediaPlayer, 0, what, extra));
+ cb.first.execute(() -> cb.second.onInfo(
+ mMediaPlayer, 0, MEDIA_INFO_PLAYBACK_COMPLETE, 0));
+ }
+ }
+ stayAwake(false);
+ return;
+
+ case MEDIA_INFO:
+ switch (msg.arg1) {
+ case MEDIA_INFO_VIDEO_TRACK_LAGGING:
+ Log.i(TAG, "Info (" + msg.arg1 + "," + msg.arg2 + ")");
+ break;
+
+ case MEDIA_INFO_METADATA_UPDATE:
+ try {
+ scanInternalSubtitleTracks();
+ } catch (RuntimeException e) {
+ Message msg2 = obtainMessage(
+ MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, MEDIA_ERROR_UNSUPPORTED,
+ null);
+ sendMessage(msg2);
+ }
+ // fall through
+
+ case MEDIA_INFO_EXTERNAL_METADATA_UPDATE:
+ msg.arg1 = MEDIA_INFO_METADATA_UPDATE;
+ // update default track selection
+ if (mSubtitleController != null) {
+ mSubtitleController.selectDefaultTrack();
+ }
+ break;
+
+ case MEDIA_INFO_BUFFERING_START:
+ case MEDIA_INFO_BUFFERING_END:
+ TimeProvider timeProvider = mTimeProvider;
+ if (timeProvider != null) {
+ timeProvider.onBuffering(msg.arg1 == MEDIA_INFO_BUFFERING_START);
+ }
+ break;
+ }
+
+ synchronized (mEventCbLock) {
+ for (Pair<Executor, EventCallback> cb : mEventCallbackRecords) {
+ cb.first.execute(() -> cb.second.onInfo(
+ mMediaPlayer, 0, what, extra));
+ }
+ }
+ // No real default action so far.
+ return;
+
+ case MEDIA_NOTIFY_TIME:
+ TimeProvider timeProvider = mTimeProvider;
+ if (timeProvider != null) {
+ timeProvider.onNotifyTime();
+ }
+ return;
+
+ case MEDIA_TIMED_TEXT:
+ final TimedText text;
+ if (msg.obj instanceof Parcel) {
+ Parcel parcel = (Parcel)msg.obj;
+ text = new TimedText(parcel);
+ parcel.recycle();
+ } else {
+ text = null;
+ }
+
+ synchronized (mEventCbLock) {
+ for (Pair<Executor, EventCallback> cb : mEventCallbackRecords) {
+ cb.first.execute(() -> cb.second.onTimedText(mMediaPlayer, 0, text));
+ }
+ }
+ return;
+
+ case MEDIA_SUBTITLE_DATA:
+ OnSubtitleDataListener onSubtitleDataListener = mOnSubtitleDataListener;
+ if (onSubtitleDataListener == null) {
+ return;
+ }
+ if (msg.obj instanceof Parcel) {
+ Parcel parcel = (Parcel) msg.obj;
+ SubtitleData data = new SubtitleData(parcel);
+ parcel.recycle();
+ onSubtitleDataListener.onSubtitleData(mMediaPlayer, data);
+ }
+ return;
+
+ case MEDIA_META_DATA:
+ final TimedMetaData data;
+ if (msg.obj instanceof Parcel) {
+ Parcel parcel = (Parcel) msg.obj;
+ data = TimedMetaData.createTimedMetaDataFromParcel(parcel);
+ parcel.recycle();
+ } else {
+ data = null;
+ }
+
+ synchronized (mEventCbLock) {
+ for (Pair<Executor, EventCallback> cb : mEventCallbackRecords) {
+ cb.first.execute(() -> cb.second.onTimedMetaDataAvailable(
+ mMediaPlayer, 0, data));
+ }
+ }
+ return;
+
+ case MEDIA_NOP: // interface test message - ignore
+ break;
+
+ case MEDIA_AUDIO_ROUTING_CHANGED:
+ AudioManager.resetAudioPortGeneration();
+ synchronized (mRoutingChangeListeners) {
+ for (NativeRoutingEventHandlerDelegate delegate
+ : mRoutingChangeListeners.values()) {
+ delegate.notifyClient();
+ }
+ }
+ return;
+
+ default:
+ Log.e(TAG, "Unknown message type " + msg.what);
+ return;
+ }
+ }
+ }
+
+ /*
+ * Called from native code when an interesting event happens. This method
+ * just uses the EventHandler system to post the event back to the main app thread.
+ * We use a weak reference to the original MediaPlayer2 object so that the native
+ * code is safe from the object disappearing from underneath it. (This is
+ * the cookie passed to native_setup().)
+ */
+ private static void postEventFromNative(Object mediaplayer2_ref,
+ int what, int arg1, int arg2, Object obj)
+ {
+ final MediaPlayer2Impl mp = (MediaPlayer2Impl)((WeakReference)mediaplayer2_ref).get();
+ if (mp == null) {
+ return;
+ }
+
+ switch (what) {
+ case MEDIA_INFO:
+ if (arg1 == MEDIA_INFO_STARTED_AS_NEXT) {
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ // this acquires the wakelock if needed, and sets the client side state
+ mp.play();
+ }
+ }).start();
+ Thread.yield();
+ }
+ break;
+
+ case MEDIA_DRM_INFO:
+ // We need to derive mDrmInfoImpl before prepare() returns so processing it here
+ // before the notification is sent to EventHandler below. EventHandler runs in the
+ // notification looper so its handleMessage might process the event after prepare()
+ // has returned.
+ Log.v(TAG, "postEventFromNative MEDIA_DRM_INFO");
+ if (obj instanceof Parcel) {
+ Parcel parcel = (Parcel)obj;
+ DrmInfoImpl drmInfo = new DrmInfoImpl(parcel);
+ synchronized (mp.mDrmLock) {
+ mp.mDrmInfoImpl = drmInfo;
+ }
+ } else {
+ Log.w(TAG, "MEDIA_DRM_INFO msg.obj of unexpected type " + obj);
+ }
+ break;
+
+ case MEDIA_PREPARED:
+ // By this time, we've learned about DrmInfo's presence or absence. This is meant
+ // mainly for prepareAsync() use case. For prepare(), this still can run to a race
+ // condition b/c MediaPlayerNative releases the prepare() lock before calling notify
+ // so we also set mDrmInfoResolved in prepare().
+ synchronized (mp.mDrmLock) {
+ mp.mDrmInfoResolved = true;
+ }
+ break;
+
+ }
+
+ if (mp.mEventHandler != null) {
+ Message m = mp.mEventHandler.obtainMessage(what, arg1, arg2, obj);
+ mp.mEventHandler.sendMessage(m);
+ }
+ }
+
+ private final Object mEventCbLock = new Object();
+ private ArrayList<Pair<Executor, EventCallback> > mEventCallbackRecords
+ = new ArrayList<Pair<Executor, EventCallback> >();
+
+ /**
+ * Register a callback to be invoked when the media source is ready
+ * for playback.
+ *
+ * @param eventCallback the callback that will be run
+ * @param executor the executor through which the callback should be invoked
+ */
+ @Override
+ public void registerEventCallback(@NonNull @CallbackExecutor Executor executor,
+ @NonNull EventCallback eventCallback) {
+ if (eventCallback == null) {
+ throw new IllegalArgumentException("Illegal null EventCallback");
+ }
+ if (executor == null) {
+ throw new IllegalArgumentException("Illegal null Executor for the EventCallback");
+ }
+ synchronized (mEventCbLock) {
+ mEventCallbackRecords.add(new Pair(executor, eventCallback));
+ }
+ }
+
+ /**
+ * Unregisters an {@link EventCallback}.
+ *
+ * @param callback an {@link EventCallback} to unregister
+ */
+ @Override
+ public void unregisterEventCallback(EventCallback callback) {
+ synchronized (mEventCbLock) {
+ for (Pair<Executor, EventCallback> cb : mEventCallbackRecords) {
+ if (cb.second == callback) {
+ mEventCallbackRecords.remove(cb);
+ }
+ }
+ }
+ }
+
+ /**
+ * Register a callback to be invoked when a track has data available.
+ *
+ * @param listener the callback that will be run
+ *
+ * @hide
+ */
+ @Override
+ public void setOnSubtitleDataListener(OnSubtitleDataListener listener) {
+ mOnSubtitleDataListener = listener;
+ }
+
+ private OnSubtitleDataListener mOnSubtitleDataListener;
+
+
+ // Modular DRM begin
+
+ /**
+ * Register a callback to be invoked for configuration of the DRM object before
+ * the session is created.
+ * The callback will be invoked synchronously during the execution
+ * of {@link #prepareDrm(UUID uuid)}.
+ *
+ * @param listener the callback that will be run
+ */
+ @Override
+ public void setOnDrmConfigHelper(OnDrmConfigHelper listener)
+ {
+ synchronized (mDrmLock) {
+ mOnDrmConfigHelper = listener;
+ } // synchronized
+ }
+
+ private OnDrmConfigHelper mOnDrmConfigHelper;
+
+ private final Object mDrmEventCbLock = new Object();
+ private ArrayList<Pair<Executor, DrmEventCallback> > mDrmEventCallbackRecords
+ = new ArrayList<Pair<Executor, DrmEventCallback> >();
+
+ /**
+ * Register a callback to be invoked when the media source is ready
+ * for playback.
+ *
+ * @param eventCallback the callback that will be run
+ * @param executor the executor through which the callback should be invoked
+ */
+ @Override
+ public void registerDrmEventCallback(@NonNull @CallbackExecutor Executor executor,
+ @NonNull DrmEventCallback eventCallback) {
+ if (eventCallback == null) {
+ throw new IllegalArgumentException("Illegal null EventCallback");
+ }
+ if (executor == null) {
+ throw new IllegalArgumentException("Illegal null Executor for the EventCallback");
+ }
+ synchronized (mDrmEventCbLock) {
+ mDrmEventCallbackRecords.add(new Pair(executor, eventCallback));
+ }
+ }
+
+ /**
+ * Unregisters a {@link DrmEventCallback}.
+ *
+ * @param callback a {@link DrmEventCallback} to unregister
+ */
+ @Override
+ public void unregisterDrmEventCallback(DrmEventCallback callback) {
+ synchronized (mDrmEventCbLock) {
+ for (Pair<Executor, DrmEventCallback> cb : mDrmEventCallbackRecords) {
+ if (cb.second == callback) {
+ mDrmEventCallbackRecords.remove(cb);
+ break;
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Retrieves the DRM Info associated with the current source
+ *
+ * @throws IllegalStateException if called before prepare()
+ */
+ @Override
+ public DrmInfo getDrmInfo() {
+ DrmInfoImpl drmInfo = null;
+
+ // there is not much point if the app calls getDrmInfo within an OnDrmInfoListenet;
+ // regardless below returns drmInfo anyway instead of raising an exception
+ synchronized (mDrmLock) {
+ if (!mDrmInfoResolved && mDrmInfoImpl == null) {
+ final String msg = "The Player has not been prepared yet";
+ Log.v(TAG, msg);
+ throw new IllegalStateException(msg);
+ }
+
+ if (mDrmInfoImpl != null) {
+ drmInfo = mDrmInfoImpl.makeCopy();
+ }
+ } // synchronized
+
+ return drmInfo;
+ }
+
+
+ /**
+ * Prepares the DRM for the current source
+ * <p>
+ * If {@code OnDrmConfigHelper} is registered, it will be called during
+ * preparation to allow configuration of the DRM properties before opening the
+ * DRM session. Note that the callback is called synchronously in the thread that called
+ * {@code prepareDrm}. It should be used only for a series of {@code getDrmPropertyString}
+ * and {@code setDrmPropertyString} calls and refrain from any lengthy operation.
+ * <p>
+ * If the device has not been provisioned before, this call also provisions the device
+ * which involves accessing the provisioning server and can take a variable time to
+ * complete depending on the network connectivity.
+ * If {@code OnDrmPreparedListener} is registered, prepareDrm() runs in non-blocking
+ * mode by launching the provisioning in the background and returning. The listener
+ * will be called when provisioning and preparation has finished. If a
+ * {@code OnDrmPreparedListener} is not registered, prepareDrm() waits till provisioning
+ * and preparation has finished, i.e., runs in blocking mode.
+ * <p>
+ * If {@code OnDrmPreparedListener} is registered, it is called to indicate the DRM
+ * session being ready. The application should not make any assumption about its call
+ * sequence (e.g., before or after prepareDrm returns), or the thread context that will
+ * execute the listener (unless the listener is registered with a handler thread).
+ * <p>
+ *
+ * @param uuid The UUID of the crypto scheme. If not known beforehand, it can be retrieved
+ * from the source through {@code getDrmInfo} or registering a {@code onDrmInfoListener}.
+ *
+ * @throws IllegalStateException if called before prepare(), or the DRM was
+ * prepared already
+ * @throws UnsupportedSchemeException if the crypto scheme is not supported
+ * @throws ResourceBusyException if required DRM resources are in use
+ * @throws ProvisioningNetworkErrorException if provisioning is required but failed due to a
+ * network error
+ * @throws ProvisioningServerErrorException if provisioning is required but failed due to
+ * the request denied by the provisioning server
+ */
+ @Override
+ public void prepareDrm(@NonNull UUID uuid)
+ throws UnsupportedSchemeException, ResourceBusyException,
+ ProvisioningNetworkErrorException, ProvisioningServerErrorException
+ {
+ Log.v(TAG, "prepareDrm: uuid: " + uuid + " mOnDrmConfigHelper: " + mOnDrmConfigHelper);
+
+ boolean allDoneWithoutProvisioning = false;
+
+ synchronized (mDrmLock) {
+
+ // only allowing if tied to a protected source; might relax for releasing offline keys
+ if (mDrmInfoImpl == null) {
+ final String msg = "prepareDrm(): Wrong usage: The player must be prepared and " +
+ "DRM info be retrieved before this call.";
+ Log.e(TAG, msg);
+ throw new IllegalStateException(msg);
+ }
+
+ if (mActiveDrmScheme) {
+ final String msg = "prepareDrm(): Wrong usage: There is already " +
+ "an active DRM scheme with " + mDrmUUID;
+ Log.e(TAG, msg);
+ throw new IllegalStateException(msg);
+ }
+
+ if (mPrepareDrmInProgress) {
+ final String msg = "prepareDrm(): Wrong usage: There is already " +
+ "a pending prepareDrm call.";
+ Log.e(TAG, msg);
+ throw new IllegalStateException(msg);
+ }
+
+ if (mDrmProvisioningInProgress) {
+ final String msg = "prepareDrm(): Unexpectd: Provisioning is already in progress.";
+ Log.e(TAG, msg);
+ throw new IllegalStateException(msg);
+ }
+
+ // shouldn't need this; just for safeguard
+ cleanDrmObj();
+
+ mPrepareDrmInProgress = true;
+
+ try {
+ // only creating the DRM object to allow pre-openSession configuration
+ prepareDrm_createDrmStep(uuid);
+ } catch (Exception e) {
+ Log.w(TAG, "prepareDrm(): Exception ", e);
+ mPrepareDrmInProgress = false;
+ throw e;
+ }
+
+ mDrmConfigAllowed = true;
+ } // synchronized
+
+
+ // call the callback outside the lock
+ if (mOnDrmConfigHelper != null) {
+ mOnDrmConfigHelper.onDrmConfig(this);
+ }
+
+ synchronized (mDrmLock) {
+ mDrmConfigAllowed = false;
+ boolean earlyExit = false;
+
+ try {
+ prepareDrm_openSessionStep(uuid);
+
+ mDrmUUID = uuid;
+ mActiveDrmScheme = true;
+
+ allDoneWithoutProvisioning = true;
+ } catch (IllegalStateException e) {
+ final String msg = "prepareDrm(): Wrong usage: The player must be " +
+ "in the prepared state to call prepareDrm().";
+ Log.e(TAG, msg);
+ earlyExit = true;
+ throw new IllegalStateException(msg);
+ } catch (NotProvisionedException e) {
+ Log.w(TAG, "prepareDrm: NotProvisionedException");
+
+ // handle provisioning internally; it'll reset mPrepareDrmInProgress
+ int result = HandleProvisioninig(uuid);
+
+ // if blocking mode, we're already done;
+ // if non-blocking mode, we attempted to launch background provisioning
+ if (result != PREPARE_DRM_STATUS_SUCCESS) {
+ earlyExit = true;
+ String msg;
+
+ switch (result) {
+ case PREPARE_DRM_STATUS_PROVISIONING_NETWORK_ERROR:
+ msg = "prepareDrm: Provisioning was required but failed " +
+ "due to a network error.";
+ Log.e(TAG, msg);
+ throw new ProvisioningNetworkErrorExceptionImpl(msg);
+
+ case PREPARE_DRM_STATUS_PROVISIONING_SERVER_ERROR:
+ msg = "prepareDrm: Provisioning was required but the request " +
+ "was denied by the server.";
+ Log.e(TAG, msg);
+ throw new ProvisioningServerErrorExceptionImpl(msg);
+
+ case PREPARE_DRM_STATUS_PREPARATION_ERROR:
+ default: // default for safeguard
+ msg = "prepareDrm: Post-provisioning preparation failed.";
+ Log.e(TAG, msg);
+ throw new IllegalStateException(msg);
+ }
+ }
+ // nothing else to do;
+ // if blocking or non-blocking, HandleProvisioninig does the re-attempt & cleanup
+ } catch (Exception e) {
+ Log.e(TAG, "prepareDrm: Exception " + e);
+ earlyExit = true;
+ throw e;
+ } finally {
+ if (!mDrmProvisioningInProgress) {// if early exit other than provisioning exception
+ mPrepareDrmInProgress = false;
+ }
+ if (earlyExit) { // cleaning up object if didn't succeed
+ cleanDrmObj();
+ }
+ } // finally
+ } // synchronized
+
+
+ // if finished successfully without provisioning, call the callback outside the lock
+ if (allDoneWithoutProvisioning) {
+ synchronized (mDrmEventCbLock) {
+ for (Pair<Executor, DrmEventCallback> cb : mDrmEventCallbackRecords) {
+ cb.first.execute(() -> cb.second.onDrmPrepared(
+ this, PREPARE_DRM_STATUS_SUCCESS));
+ }
+ }
+ }
+
+ }
+
+
+ private native void _releaseDrm();
+
+ /**
+ * Releases the DRM session
+ * <p>
+ * The player has to have an active DRM session and be in stopped, or prepared
+ * state before this call is made.
+ * A {@code reset()} call will release the DRM session implicitly.
+ *
+ * @throws NoDrmSchemeException if there is no active DRM session to release
+ */
+ @Override
+ public void releaseDrm()
+ throws NoDrmSchemeException
+ {
+ Log.v(TAG, "releaseDrm:");
+
+ synchronized (mDrmLock) {
+ if (!mActiveDrmScheme) {
+ Log.e(TAG, "releaseDrm(): No active DRM scheme to release.");
+ throw new NoDrmSchemeExceptionImpl("releaseDrm: No active DRM scheme to release.");
+ }
+
+ try {
+ // we don't have the player's state in this layer. The below call raises
+ // exception if we're in a non-stopped/prepared state.
+
+ // for cleaning native/mediaserver crypto object
+ _releaseDrm();
+
+ // for cleaning client-side MediaDrm object; only called if above has succeeded
+ cleanDrmObj();
+
+ mActiveDrmScheme = false;
+ } catch (IllegalStateException e) {
+ Log.w(TAG, "releaseDrm: Exception ", e);
+ throw new IllegalStateException("releaseDrm: The player is not in a valid state.");
+ } catch (Exception e) {
+ Log.e(TAG, "releaseDrm: Exception ", e);
+ }
+ } // synchronized
+ }
+
+
+ /**
+ * A key request/response exchange occurs between the app and a license server
+ * to obtain or release keys used to decrypt encrypted content.
+ * <p>
+ * getKeyRequest() is used to obtain an opaque key request byte array that is
+ * delivered to the license server. The opaque key request byte array is returned
+ * in KeyRequest.data. The recommended URL to deliver the key request to is
+ * returned in KeyRequest.defaultUrl.
+ * <p>
+ * After the app has received the key request response from the server,
+ * it should deliver to the response to the DRM engine plugin using the method
+ * {@link #provideKeyResponse}.
+ *
+ * @param keySetId is the key-set identifier of the offline keys being released when keyType is
+ * {@link MediaDrm#KEY_TYPE_RELEASE}. It should be set to null for other key requests, when
+ * keyType is {@link MediaDrm#KEY_TYPE_STREAMING} or {@link MediaDrm#KEY_TYPE_OFFLINE}.
+ *
+ * @param initData is the container-specific initialization data when the keyType is
+ * {@link MediaDrm#KEY_TYPE_STREAMING} or {@link MediaDrm#KEY_TYPE_OFFLINE}. Its meaning is
+ * interpreted based on the mime type provided in the mimeType parameter. It could
+ * contain, for example, the content ID, key ID or other data obtained from the content
+ * metadata that is required in generating the key request.
+ * When the keyType is {@link MediaDrm#KEY_TYPE_RELEASE}, it should be set to null.
+ *
+ * @param mimeType identifies the mime type of the content
+ *
+ * @param keyType specifies the type of the request. The request may be to acquire
+ * keys for streaming, {@link MediaDrm#KEY_TYPE_STREAMING}, or for offline content
+ * {@link MediaDrm#KEY_TYPE_OFFLINE}, or to release previously acquired
+ * keys ({@link MediaDrm#KEY_TYPE_RELEASE}), which are identified by a keySetId.
+ *
+ * @param optionalParameters are included in the key request message to
+ * allow a client application to provide additional message parameters to the server.
+ * This may be {@code null} if no additional parameters are to be sent.
+ *
+ * @throws NoDrmSchemeException if there is no active DRM session
+ */
+ @Override
+ @NonNull
+ public MediaDrm.KeyRequest getKeyRequest(@Nullable byte[] keySetId, @Nullable byte[] initData,
+ @Nullable String mimeType, @MediaDrm.KeyType int keyType,
+ @Nullable Map<String, String> optionalParameters)
+ throws NoDrmSchemeException
+ {
+ Log.v(TAG, "getKeyRequest: " +
+ " keySetId: " + keySetId + " initData:" + initData + " mimeType: " + mimeType +
+ " keyType: " + keyType + " optionalParameters: " + optionalParameters);
+
+ synchronized (mDrmLock) {
+ if (!mActiveDrmScheme) {
+ Log.e(TAG, "getKeyRequest NoDrmSchemeException");
+ throw new NoDrmSchemeExceptionImpl("getKeyRequest: Has to set a DRM scheme first.");
+ }
+
+ try {
+ byte[] scope = (keyType != MediaDrm.KEY_TYPE_RELEASE) ?
+ mDrmSessionId : // sessionId for KEY_TYPE_STREAMING/OFFLINE
+ keySetId; // keySetId for KEY_TYPE_RELEASE
+
+ HashMap<String, String> hmapOptionalParameters =
+ (optionalParameters != null) ?
+ new HashMap<String, String>(optionalParameters) :
+ null;
+
+ MediaDrm.KeyRequest request = mDrmObj.getKeyRequest(scope, initData, mimeType,
+ keyType, hmapOptionalParameters);
+ Log.v(TAG, "getKeyRequest: --> request: " + request);
+
+ return request;
+
+ } catch (NotProvisionedException e) {
+ Log.w(TAG, "getKeyRequest NotProvisionedException: " +
+ "Unexpected. Shouldn't have reached here.");
+ throw new IllegalStateException("getKeyRequest: Unexpected provisioning error.");
+ } catch (Exception e) {
+ Log.w(TAG, "getKeyRequest Exception " + e);
+ throw e;
+ }
+
+ } // synchronized
+ }
+
+
+ /**
+ * A key response is received from the license server by the app, then it is
+ * provided to the DRM engine plugin using provideKeyResponse. When the
+ * response is for an offline key request, a key-set identifier is returned that
+ * can be used to later restore the keys to a new session with the method
+ * {@ link # restoreKeys}.
+ * When the response is for a streaming or release request, null is returned.
+ *
+ * @param keySetId When the response is for a release request, keySetId identifies
+ * the saved key associated with the release request (i.e., the same keySetId
+ * passed to the earlier {@ link # getKeyRequest} call. It MUST be null when the
+ * response is for either streaming or offline key requests.
+ *
+ * @param response the byte array response from the server
+ *
+ * @throws NoDrmSchemeException if there is no active DRM session
+ * @throws DeniedByServerException if the response indicates that the
+ * server rejected the request
+ */
+ @Override
+ public byte[] provideKeyResponse(@Nullable byte[] keySetId, @NonNull byte[] response)
+ throws NoDrmSchemeException, DeniedByServerException
+ {
+ Log.v(TAG, "provideKeyResponse: keySetId: " + keySetId + " response: " + response);
+
+ synchronized (mDrmLock) {
+
+ if (!mActiveDrmScheme) {
+ Log.e(TAG, "getKeyRequest NoDrmSchemeException");
+ throw new NoDrmSchemeExceptionImpl("getKeyRequest: Has to set a DRM scheme first.");
+ }
+
+ try {
+ byte[] scope = (keySetId == null) ?
+ mDrmSessionId : // sessionId for KEY_TYPE_STREAMING/OFFLINE
+ keySetId; // keySetId for KEY_TYPE_RELEASE
+
+ byte[] keySetResult = mDrmObj.provideKeyResponse(scope, response);
+
+ Log.v(TAG, "provideKeyResponse: keySetId: " + keySetId + " response: " + response +
+ " --> " + keySetResult);
+
+
+ return keySetResult;
+
+ } catch (NotProvisionedException e) {
+ Log.w(TAG, "provideKeyResponse NotProvisionedException: " +
+ "Unexpected. Shouldn't have reached here.");
+ throw new IllegalStateException("provideKeyResponse: " +
+ "Unexpected provisioning error.");
+ } catch (Exception e) {
+ Log.w(TAG, "provideKeyResponse Exception " + e);
+ throw e;
+ }
+ } // synchronized
+ }
+
+
+ /**
+ * Restore persisted offline keys into a new session. keySetId identifies the
+ * keys to load, obtained from a prior call to {@link #provideKeyResponse}.
+ *
+ * @param keySetId identifies the saved key set to restore
+ */
+ @Override
+ public void restoreKeys(@NonNull byte[] keySetId)
+ throws NoDrmSchemeException
+ {
+ Log.v(TAG, "restoreKeys: keySetId: " + keySetId);
+
+ synchronized (mDrmLock) {
+
+ if (!mActiveDrmScheme) {
+ Log.w(TAG, "restoreKeys NoDrmSchemeException");
+ throw new NoDrmSchemeExceptionImpl("restoreKeys: Has to set a DRM scheme first.");
+ }
+
+ try {
+ mDrmObj.restoreKeys(mDrmSessionId, keySetId);
+ } catch (Exception e) {
+ Log.w(TAG, "restoreKeys Exception " + e);
+ throw e;
+ }
+
+ } // synchronized
+ }
+
+
+ /**
+ * Read a DRM engine plugin String property value, given the property name string.
+ * <p>
+ * @param propertyName the property name
+ *
+ * Standard fields names are:
+ * {@link MediaDrm#PROPERTY_VENDOR}, {@link MediaDrm#PROPERTY_VERSION},
+ * {@link MediaDrm#PROPERTY_DESCRIPTION}, {@link MediaDrm#PROPERTY_ALGORITHMS}
+ */
+ @Override
+ @NonNull
+ public String getDrmPropertyString(@NonNull @MediaDrm.StringProperty String propertyName)
+ throws NoDrmSchemeException
+ {
+ Log.v(TAG, "getDrmPropertyString: propertyName: " + propertyName);
+
+ String value;
+ synchronized (mDrmLock) {
+
+ if (!mActiveDrmScheme && !mDrmConfigAllowed) {
+ Log.w(TAG, "getDrmPropertyString NoDrmSchemeException");
+ throw new NoDrmSchemeExceptionImpl("getDrmPropertyString: Has to prepareDrm() first.");
+ }
+
+ try {
+ value = mDrmObj.getPropertyString(propertyName);
+ } catch (Exception e) {
+ Log.w(TAG, "getDrmPropertyString Exception " + e);
+ throw e;
+ }
+ } // synchronized
+
+ Log.v(TAG, "getDrmPropertyString: propertyName: " + propertyName + " --> value: " + value);
+
+ return value;
+ }
+
+
+ /**
+ * Set a DRM engine plugin String property value.
+ * <p>
+ * @param propertyName the property name
+ * @param value the property value
+ *
+ * Standard fields names are:
+ * {@link MediaDrm#PROPERTY_VENDOR}, {@link MediaDrm#PROPERTY_VERSION},
+ * {@link MediaDrm#PROPERTY_DESCRIPTION}, {@link MediaDrm#PROPERTY_ALGORITHMS}
+ */
+ @Override
+ public void setDrmPropertyString(@NonNull @MediaDrm.StringProperty String propertyName,
+ @NonNull String value)
+ throws NoDrmSchemeException
+ {
+ Log.v(TAG, "setDrmPropertyString: propertyName: " + propertyName + " value: " + value);
+
+ synchronized (mDrmLock) {
+
+ if ( !mActiveDrmScheme && !mDrmConfigAllowed ) {
+ Log.w(TAG, "setDrmPropertyString NoDrmSchemeException");
+ throw new NoDrmSchemeExceptionImpl("setDrmPropertyString: Has to prepareDrm() first.");
+ }
+
+ try {
+ mDrmObj.setPropertyString(propertyName, value);
+ } catch ( Exception e ) {
+ Log.w(TAG, "setDrmPropertyString Exception " + e);
+ throw e;
+ }
+ } // synchronized
+ }
+
+ /**
+ * Encapsulates the DRM properties of the source.
+ */
+ public static final class DrmInfoImpl extends DrmInfo {
+ private Map<UUID, byte[]> mapPssh;
+ private UUID[] supportedSchemes;
+
+ /**
+ * Returns the PSSH info of the data source for each supported DRM scheme.
+ */
+ @Override
+ public Map<UUID, byte[]> getPssh() {
+ return mapPssh;
+ }
+
+ /**
+ * Returns the intersection of the data source and the device DRM schemes.
+ * It effectively identifies the subset of the source's DRM schemes which
+ * are supported by the device too.
+ */
+ @Override
+ public List<UUID> getSupportedSchemes() {
+ return Arrays.asList(supportedSchemes);
+ }
+
+ private DrmInfoImpl(Map<UUID, byte[]> Pssh, UUID[] SupportedSchemes) {
+ mapPssh = Pssh;
+ supportedSchemes = SupportedSchemes;
+ }
+
+ private DrmInfoImpl(Parcel parcel) {
+ Log.v(TAG, "DrmInfoImpl(" + parcel + ") size " + parcel.dataSize());
+
+ int psshsize = parcel.readInt();
+ byte[] pssh = new byte[psshsize];
+ parcel.readByteArray(pssh);
+
+ Log.v(TAG, "DrmInfoImpl() PSSH: " + arrToHex(pssh));
+ mapPssh = parsePSSH(pssh, psshsize);
+ Log.v(TAG, "DrmInfoImpl() PSSH: " + mapPssh);
+
+ int supportedDRMsCount = parcel.readInt();
+ supportedSchemes = new UUID[supportedDRMsCount];
+ for (int i = 0; i < supportedDRMsCount; i++) {
+ byte[] uuid = new byte[16];
+ parcel.readByteArray(uuid);
+
+ supportedSchemes[i] = bytesToUUID(uuid);
+
+ Log.v(TAG, "DrmInfoImpl() supportedScheme[" + i + "]: " +
+ supportedSchemes[i]);
+ }
+
+ Log.v(TAG, "DrmInfoImpl() Parcel psshsize: " + psshsize +
+ " supportedDRMsCount: " + supportedDRMsCount);
+ }
+
+ private DrmInfoImpl makeCopy() {
+ return new DrmInfoImpl(this.mapPssh, this.supportedSchemes);
+ }
+
+ private String arrToHex(byte[] bytes) {
+ String out = "0x";
+ for (int i = 0; i < bytes.length; i++) {
+ out += String.format("%02x", bytes[i]);
+ }
+
+ return out;
+ }
+
+ private UUID bytesToUUID(byte[] uuid) {
+ long msb = 0, lsb = 0;
+ for (int i = 0; i < 8; i++) {
+ msb |= ( ((long)uuid[i] & 0xff) << (8 * (7 - i)) );
+ lsb |= ( ((long)uuid[i+8] & 0xff) << (8 * (7 - i)) );
+ }
+
+ return new UUID(msb, lsb);
+ }
+
+ private Map<UUID, byte[]> parsePSSH(byte[] pssh, int psshsize) {
+ Map<UUID, byte[]> result = new HashMap<UUID, byte[]>();
+
+ final int UUID_SIZE = 16;
+ final int DATALEN_SIZE = 4;
+
+ int len = psshsize;
+ int numentries = 0;
+ int i = 0;
+
+ while (len > 0) {
+ if (len < UUID_SIZE) {
+ Log.w(TAG, String.format("parsePSSH: len is too short to parse " +
+ "UUID: (%d < 16) pssh: %d", len, psshsize));
+ return null;
+ }
+
+ byte[] subset = Arrays.copyOfRange(pssh, i, i + UUID_SIZE);
+ UUID uuid = bytesToUUID(subset);
+ i += UUID_SIZE;
+ len -= UUID_SIZE;
+
+ // get data length
+ if (len < 4) {
+ Log.w(TAG, String.format("parsePSSH: len is too short to parse " +
+ "datalen: (%d < 4) pssh: %d", len, psshsize));
+ return null;
+ }
+
+ subset = Arrays.copyOfRange(pssh, i, i+DATALEN_SIZE);
+ int datalen = (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN) ?
+ ((subset[3] & 0xff) << 24) | ((subset[2] & 0xff) << 16) |
+ ((subset[1] & 0xff) << 8) | (subset[0] & 0xff) :
+ ((subset[0] & 0xff) << 24) | ((subset[1] & 0xff) << 16) |
+ ((subset[2] & 0xff) << 8) | (subset[3] & 0xff) ;
+ i += DATALEN_SIZE;
+ len -= DATALEN_SIZE;
+
+ if (len < datalen) {
+ Log.w(TAG, String.format("parsePSSH: len is too short to parse " +
+ "data: (%d < %d) pssh: %d", len, datalen, psshsize));
+ return null;
+ }
+
+ byte[] data = Arrays.copyOfRange(pssh, i, i+datalen);
+
+ // skip the data
+ i += datalen;
+ len -= datalen;
+
+ Log.v(TAG, String.format("parsePSSH[%d]: <%s, %s> pssh: %d",
+ numentries, uuid, arrToHex(data), psshsize));
+ numentries++;
+ result.put(uuid, data);
+ }
+
+ return result;
+ }
+
+ }; // DrmInfoImpl
+
+ /**
+ * Thrown when a DRM method is called before preparing a DRM scheme through prepareDrm().
+ * Extends MediaDrm.MediaDrmException
+ */
+ public static final class NoDrmSchemeExceptionImpl extends NoDrmSchemeException {
+ public NoDrmSchemeExceptionImpl(String detailMessage) {
+ super(detailMessage);
+ }
+ }
+
+ /**
+ * Thrown when the device requires DRM provisioning but the provisioning attempt has
+ * failed due to a network error (Internet reachability, timeout, etc.).
+ * Extends MediaDrm.MediaDrmException
+ */
+ public static final class ProvisioningNetworkErrorExceptionImpl
+ extends ProvisioningNetworkErrorException {
+ public ProvisioningNetworkErrorExceptionImpl(String detailMessage) {
+ super(detailMessage);
+ }
+ }
+
+ /**
+ * Thrown when the device requires DRM provisioning but the provisioning attempt has
+ * failed due to the provisioning server denying the request.
+ * Extends MediaDrm.MediaDrmException
+ */
+ public static final class ProvisioningServerErrorExceptionImpl
+ extends ProvisioningServerErrorException {
+ public ProvisioningServerErrorExceptionImpl(String detailMessage) {
+ super(detailMessage);
+ }
+ }
+
+
+ private native void _prepareDrm(@NonNull byte[] uuid, @NonNull byte[] drmSessionId);
+
+ // Modular DRM helpers
+
+ private void prepareDrm_createDrmStep(@NonNull UUID uuid)
+ throws UnsupportedSchemeException {
+ Log.v(TAG, "prepareDrm_createDrmStep: UUID: " + uuid);
+
+ try {
+ mDrmObj = new MediaDrm(uuid);
+ Log.v(TAG, "prepareDrm_createDrmStep: Created mDrmObj=" + mDrmObj);
+ } catch (Exception e) { // UnsupportedSchemeException
+ Log.e(TAG, "prepareDrm_createDrmStep: MediaDrm failed with " + e);
+ throw e;
+ }
+ }
+
+ private void prepareDrm_openSessionStep(@NonNull UUID uuid)
+ throws NotProvisionedException, ResourceBusyException {
+ Log.v(TAG, "prepareDrm_openSessionStep: uuid: " + uuid);
+
+ // TODO: don't need an open session for a future specialKeyReleaseDrm mode but we should do
+ // it anyway so it raises provisioning error if needed. We'd rather handle provisioning
+ // at prepareDrm/openSession rather than getKeyRequest/provideKeyResponse
+ try {
+ mDrmSessionId = mDrmObj.openSession();
+ Log.v(TAG, "prepareDrm_openSessionStep: mDrmSessionId=" + mDrmSessionId);
+
+ // Sending it down to native/mediaserver to create the crypto object
+ // This call could simply fail due to bad player state, e.g., after play().
+ _prepareDrm(getByteArrayFromUUID(uuid), mDrmSessionId);
+ Log.v(TAG, "prepareDrm_openSessionStep: _prepareDrm/Crypto succeeded");
+
+ } catch (Exception e) { //ResourceBusyException, NotProvisionedException
+ Log.e(TAG, "prepareDrm_openSessionStep: open/crypto failed with " + e);
+ throw e;
+ }
+
+ }
+
+ private class ProvisioningThread extends Thread {
+ public static final int TIMEOUT_MS = 60000;
+
+ private UUID uuid;
+ private String urlStr;
+ private Object drmLock;
+ private MediaPlayer2Impl mediaPlayer;
+ private int status;
+ private boolean finished;
+ public int status() {
+ return status;
+ }
+
+ public ProvisioningThread initialize(MediaDrm.ProvisionRequest request,
+ UUID uuid, MediaPlayer2Impl mediaPlayer) {
+ // lock is held by the caller
+ drmLock = mediaPlayer.mDrmLock;
+ this.mediaPlayer = mediaPlayer;
+
+ urlStr = request.getDefaultUrl() + "&signedRequest=" + new String(request.getData());
+ this.uuid = uuid;
+
+ status = PREPARE_DRM_STATUS_PREPARATION_ERROR;
+
+ Log.v(TAG, "HandleProvisioninig: Thread is initialised url: " + urlStr);
+ return this;
+ }
+
+ public void run() {
+
+ byte[] response = null;
+ boolean provisioningSucceeded = false;
+ try {
+ URL url = new URL(urlStr);
+ final HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ try {
+ connection.setRequestMethod("POST");
+ connection.setDoOutput(false);
+ connection.setDoInput(true);
+ connection.setConnectTimeout(TIMEOUT_MS);
+ connection.setReadTimeout(TIMEOUT_MS);
+
+ connection.connect();
+ response = Streams.readFully(connection.getInputStream());
+
+ Log.v(TAG, "HandleProvisioninig: Thread run: response " +
+ response.length + " " + response);
+ } catch (Exception e) {
+ status = PREPARE_DRM_STATUS_PROVISIONING_NETWORK_ERROR;
+ Log.w(TAG, "HandleProvisioninig: Thread run: connect " + e + " url: " + url);
+ } finally {
+ connection.disconnect();
+ }
+ } catch (Exception e) {
+ status = PREPARE_DRM_STATUS_PROVISIONING_NETWORK_ERROR;
+ Log.w(TAG, "HandleProvisioninig: Thread run: openConnection " + e);
+ }
+
+ if (response != null) {
+ try {
+ mDrmObj.provideProvisionResponse(response);
+ Log.v(TAG, "HandleProvisioninig: Thread run: " +
+ "provideProvisionResponse SUCCEEDED!");
+
+ provisioningSucceeded = true;
+ } catch (Exception e) {
+ status = PREPARE_DRM_STATUS_PROVISIONING_SERVER_ERROR;
+ Log.w(TAG, "HandleProvisioninig: Thread run: " +
+ "provideProvisionResponse " + e);
+ }
+ }
+
+ boolean succeeded = false;
+
+ boolean hasCallback = false;
+ synchronized (mDrmEventCbLock) {
+ hasCallback = !mDrmEventCallbackRecords.isEmpty();
+ }
+ // non-blocking mode needs the lock
+ if (hasCallback) {
+
+ synchronized (drmLock) {
+ // continuing with prepareDrm
+ if (provisioningSucceeded) {
+ succeeded = mediaPlayer.resumePrepareDrm(uuid);
+ status = (succeeded) ?
+ PREPARE_DRM_STATUS_SUCCESS :
+ PREPARE_DRM_STATUS_PREPARATION_ERROR;
+ }
+ mediaPlayer.mDrmProvisioningInProgress = false;
+ mediaPlayer.mPrepareDrmInProgress = false;
+ if (!succeeded) {
+ cleanDrmObj(); // cleaning up if it hasn't gone through while in the lock
+ }
+ } // synchronized
+
+ // calling the callback outside the lock
+ synchronized (mDrmEventCbLock) {
+ for (Pair<Executor, DrmEventCallback> cb : mDrmEventCallbackRecords) {
+ cb.first.execute(() -> cb.second.onDrmPrepared(mediaPlayer, status));
+ }
+ }
+ } else { // blocking mode already has the lock
+
+ // continuing with prepareDrm
+ if (provisioningSucceeded) {
+ succeeded = mediaPlayer.resumePrepareDrm(uuid);
+ status = (succeeded) ?
+ PREPARE_DRM_STATUS_SUCCESS :
+ PREPARE_DRM_STATUS_PREPARATION_ERROR;
+ }
+ mediaPlayer.mDrmProvisioningInProgress = false;
+ mediaPlayer.mPrepareDrmInProgress = false;
+ if (!succeeded) {
+ cleanDrmObj(); // cleaning up if it hasn't gone through
+ }
+ }
+
+ finished = true;
+ } // run()
+
+ } // ProvisioningThread
+
+ private int HandleProvisioninig(UUID uuid) {
+ // the lock is already held by the caller
+
+ if (mDrmProvisioningInProgress) {
+ Log.e(TAG, "HandleProvisioninig: Unexpected mDrmProvisioningInProgress");
+ return PREPARE_DRM_STATUS_PREPARATION_ERROR;
+ }
+
+ MediaDrm.ProvisionRequest provReq = mDrmObj.getProvisionRequest();
+ if (provReq == null) {
+ Log.e(TAG, "HandleProvisioninig: getProvisionRequest returned null.");
+ return PREPARE_DRM_STATUS_PREPARATION_ERROR;
+ }
+
+ Log.v(TAG, "HandleProvisioninig provReq " +
+ " data: " + provReq.getData() + " url: " + provReq.getDefaultUrl());
+
+ // networking in a background thread
+ mDrmProvisioningInProgress = true;
+
+ mDrmProvisioningThread = new ProvisioningThread().initialize(provReq, uuid, this);
+ mDrmProvisioningThread.start();
+
+ int result;
+
+ // non-blocking: this is not the final result
+ boolean hasCallback = false;
+ synchronized (mDrmEventCbLock) {
+ hasCallback = !mDrmEventCallbackRecords.isEmpty();
+ }
+ if (hasCallback) {
+ result = PREPARE_DRM_STATUS_SUCCESS;
+ } else {
+ // if blocking mode, wait till provisioning is done
+ try {
+ mDrmProvisioningThread.join();
+ } catch (Exception e) {
+ Log.w(TAG, "HandleProvisioninig: Thread.join Exception " + e);
+ }
+ result = mDrmProvisioningThread.status();
+ // no longer need the thread
+ mDrmProvisioningThread = null;
+ }
+
+ return result;
+ }
+
+ private boolean resumePrepareDrm(UUID uuid) {
+ Log.v(TAG, "resumePrepareDrm: uuid: " + uuid);
+
+ // mDrmLock is guaranteed to be held
+ boolean success = false;
+ try {
+ // resuming
+ prepareDrm_openSessionStep(uuid);
+
+ mDrmUUID = uuid;
+ mActiveDrmScheme = true;
+
+ success = true;
+ } catch (Exception e) {
+ Log.w(TAG, "HandleProvisioninig: Thread run _prepareDrm resume failed with " + e);
+ // mDrmObj clean up is done by the caller
+ }
+
+ return success;
+ }
+
+ private void resetDrmState() {
+ synchronized (mDrmLock) {
+ Log.v(TAG, "resetDrmState: " +
+ " mDrmInfoImpl=" + mDrmInfoImpl +
+ " mDrmProvisioningThread=" + mDrmProvisioningThread +
+ " mPrepareDrmInProgress=" + mPrepareDrmInProgress +
+ " mActiveDrmScheme=" + mActiveDrmScheme);
+
+ mDrmInfoResolved = false;
+ mDrmInfoImpl = null;
+
+ if (mDrmProvisioningThread != null) {
+ // timeout; relying on HttpUrlConnection
+ try {
+ mDrmProvisioningThread.join();
+ }
+ catch (InterruptedException e) {
+ Log.w(TAG, "resetDrmState: ProvThread.join Exception " + e);
+ }
+ mDrmProvisioningThread = null;
+ }
+
+ mPrepareDrmInProgress = false;
+ mActiveDrmScheme = false;
+
+ cleanDrmObj();
+ } // synchronized
+ }
+
+ private void cleanDrmObj() {
+ // the caller holds mDrmLock
+ Log.v(TAG, "cleanDrmObj: mDrmObj=" + mDrmObj + " mDrmSessionId=" + mDrmSessionId);
+
+ if (mDrmSessionId != null) {
+ mDrmObj.closeSession(mDrmSessionId);
+ mDrmSessionId = null;
+ }
+ if (mDrmObj != null) {
+ mDrmObj.release();
+ mDrmObj = null;
+ }
+ }
+
+ private static final byte[] getByteArrayFromUUID(@NonNull UUID uuid) {
+ long msb = uuid.getMostSignificantBits();
+ long lsb = uuid.getLeastSignificantBits();
+
+ byte[] uuidBytes = new byte[16];
+ for (int i = 0; i < 8; ++i) {
+ uuidBytes[i] = (byte)(msb >>> (8 * (7 - i)));
+ uuidBytes[8 + i] = (byte)(lsb >>> (8 * (7 - i)));
+ }
+
+ return uuidBytes;
+ }
+
+ // Modular DRM end
+
+ /*
+ * Test whether a given video scaling mode is supported.
+ */
+ private boolean isVideoScalingModeSupported(int mode) {
+ return (mode == VIDEO_SCALING_MODE_SCALE_TO_FIT ||
+ mode == VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING);
+ }
+
+ /** @hide */
+ static class TimeProvider implements MediaTimeProvider {
+ private static final String TAG = "MTP";
+ private static final long MAX_NS_WITHOUT_POSITION_CHECK = 5000000000L;
+ private static final long MAX_EARLY_CALLBACK_US = 1000;
+ private static final long TIME_ADJUSTMENT_RATE = 2; /* meaning 1/2 */
+ private long mLastTimeUs = 0;
+ private MediaPlayer2Impl mPlayer;
+ private boolean mPaused = true;
+ private boolean mStopped = true;
+ private boolean mBuffering;
+ private long mLastReportedTime;
+ // since we are expecting only a handful listeners per stream, there is
+ // no need for log(N) search performance
+ private MediaTimeProvider.OnMediaTimeListener mListeners[];
+ private long mTimes[];
+ private Handler mEventHandler;
+ private boolean mRefresh = false;
+ private boolean mPausing = false;
+ private boolean mSeeking = false;
+ private static final int NOTIFY = 1;
+ private static final int NOTIFY_TIME = 0;
+ private static final int NOTIFY_STOP = 2;
+ private static final int NOTIFY_SEEK = 3;
+ private static final int NOTIFY_TRACK_DATA = 4;
+ private HandlerThread mHandlerThread;
+
+ /** @hide */
+ public boolean DEBUG = false;
+
+ public TimeProvider(MediaPlayer2Impl mp) {
+ mPlayer = mp;
+ try {
+ getCurrentTimeUs(true, false);
+ } catch (IllegalStateException e) {
+ // we assume starting position
+ mRefresh = true;
+ }
+
+ Looper looper;
+ if ((looper = Looper.myLooper()) == null &&
+ (looper = Looper.getMainLooper()) == null) {
+ // Create our own looper here in case MP was created without one
+ mHandlerThread = new HandlerThread("MediaPlayer2MTPEventThread",
+ Process.THREAD_PRIORITY_FOREGROUND);
+ mHandlerThread.start();
+ looper = mHandlerThread.getLooper();
+ }
+ mEventHandler = new EventHandler(looper);
+
+ mListeners = new MediaTimeProvider.OnMediaTimeListener[0];
+ mTimes = new long[0];
+ mLastTimeUs = 0;
+ }
+
+ private void scheduleNotification(int type, long delayUs) {
+ // ignore time notifications until seek is handled
+ if (mSeeking && type == NOTIFY_TIME) {
+ return;
+ }
+
+ if (DEBUG) Log.v(TAG, "scheduleNotification " + type + " in " + delayUs);
+ mEventHandler.removeMessages(NOTIFY);
+ Message msg = mEventHandler.obtainMessage(NOTIFY, type, 0);
+ mEventHandler.sendMessageDelayed(msg, (int) (delayUs / 1000));
+ }
+
+ /** @hide */
+ public void close() {
+ mEventHandler.removeMessages(NOTIFY);
+ if (mHandlerThread != null) {
+ mHandlerThread.quitSafely();
+ mHandlerThread = null;
+ }
+ }
+
+ /** @hide */
+ protected void finalize() {
+ if (mHandlerThread != null) {
+ mHandlerThread.quitSafely();
+ }
+ }
+
+ /** @hide */
+ public void onNotifyTime() {
+ synchronized (this) {
+ if (DEBUG) Log.d(TAG, "onNotifyTime: ");
+ scheduleNotification(NOTIFY_TIME, 0 /* delay */);
+ }
+ }
+
+ /** @hide */
+ public void onPaused(boolean paused) {
+ synchronized(this) {
+ if (DEBUG) Log.d(TAG, "onPaused: " + paused);
+ if (mStopped) { // handle as seek if we were stopped
+ mStopped = false;
+ mSeeking = true;
+ scheduleNotification(NOTIFY_SEEK, 0 /* delay */);
+ } else {
+ mPausing = paused; // special handling if player disappeared
+ mSeeking = false;
+ scheduleNotification(NOTIFY_TIME, 0 /* delay */);
+ }
+ }
+ }
+
+ /** @hide */
+ public void onBuffering(boolean buffering) {
+ synchronized (this) {
+ if (DEBUG) Log.d(TAG, "onBuffering: " + buffering);
+ mBuffering = buffering;
+ scheduleNotification(NOTIFY_TIME, 0 /* delay */);
+ }
+ }
+
+ /** @hide */
+ public void onStopped() {
+ synchronized(this) {
+ if (DEBUG) Log.d(TAG, "onStopped");
+ mPaused = true;
+ mStopped = true;
+ mSeeking = false;
+ mBuffering = false;
+ scheduleNotification(NOTIFY_STOP, 0 /* delay */);
+ }
+ }
+
+ /** @hide */
+ public void onSeekComplete(MediaPlayer2Impl mp) {
+ synchronized(this) {
+ mStopped = false;
+ mSeeking = true;
+ scheduleNotification(NOTIFY_SEEK, 0 /* delay */);
+ }
+ }
+
+ /** @hide */
+ public void onNewPlayer() {
+ if (mRefresh) {
+ synchronized(this) {
+ mStopped = false;
+ mSeeking = true;
+ mBuffering = false;
+ scheduleNotification(NOTIFY_SEEK, 0 /* delay */);
+ }
+ }
+ }
+
+ private synchronized void notifySeek() {
+ mSeeking = false;
+ try {
+ long timeUs = getCurrentTimeUs(true, false);
+ if (DEBUG) Log.d(TAG, "onSeekComplete at " + timeUs);
+
+ for (MediaTimeProvider.OnMediaTimeListener listener: mListeners) {
+ if (listener == null) {
+ break;
+ }
+ listener.onSeek(timeUs);
+ }
+ } catch (IllegalStateException e) {
+ // we should not be there, but at least signal pause
+ if (DEBUG) Log.d(TAG, "onSeekComplete but no player");
+ mPausing = true; // special handling if player disappeared
+ notifyTimedEvent(false /* refreshTime */);
+ }
+ }
+
+ private synchronized void notifyTrackData(Pair<SubtitleTrack, byte[]> trackData) {
+ SubtitleTrack track = trackData.first;
+ byte[] data = trackData.second;
+ track.onData(data, true /* eos */, ~0 /* runID: keep forever */);
+ }
+
+ private synchronized void notifyStop() {
+ for (MediaTimeProvider.OnMediaTimeListener listener: mListeners) {
+ if (listener == null) {
+ break;
+ }
+ listener.onStop();
+ }
+ }
+
+ private int registerListener(MediaTimeProvider.OnMediaTimeListener listener) {
+ int i = 0;
+ for (; i < mListeners.length; i++) {
+ if (mListeners[i] == listener || mListeners[i] == null) {
+ break;
+ }
+ }
+
+ // new listener
+ if (i >= mListeners.length) {
+ MediaTimeProvider.OnMediaTimeListener[] newListeners =
+ new MediaTimeProvider.OnMediaTimeListener[i + 1];
+ long[] newTimes = new long[i + 1];
+ System.arraycopy(mListeners, 0, newListeners, 0, mListeners.length);
+ System.arraycopy(mTimes, 0, newTimes, 0, mTimes.length);
+ mListeners = newListeners;
+ mTimes = newTimes;
+ }
+
+ if (mListeners[i] == null) {
+ mListeners[i] = listener;
+ mTimes[i] = MediaTimeProvider.NO_TIME;
+ }
+ return i;
+ }
+
+ public void notifyAt(
+ long timeUs, MediaTimeProvider.OnMediaTimeListener listener) {
+ synchronized(this) {
+ if (DEBUG) Log.d(TAG, "notifyAt " + timeUs);
+ mTimes[registerListener(listener)] = timeUs;
+ scheduleNotification(NOTIFY_TIME, 0 /* delay */);
+ }
+ }
+
+ public void scheduleUpdate(MediaTimeProvider.OnMediaTimeListener listener) {
+ synchronized(this) {
+ if (DEBUG) Log.d(TAG, "scheduleUpdate");
+ int i = registerListener(listener);
+
+ if (!mStopped) {
+ mTimes[i] = 0;
+ scheduleNotification(NOTIFY_TIME, 0 /* delay */);
+ }
+ }
+ }
+
+ public void cancelNotifications(
+ MediaTimeProvider.OnMediaTimeListener listener) {
+ synchronized(this) {
+ int i = 0;
+ for (; i < mListeners.length; i++) {
+ if (mListeners[i] == listener) {
+ System.arraycopy(mListeners, i + 1,
+ mListeners, i, mListeners.length - i - 1);
+ System.arraycopy(mTimes, i + 1,
+ mTimes, i, mTimes.length - i - 1);
+ mListeners[mListeners.length - 1] = null;
+ mTimes[mTimes.length - 1] = NO_TIME;
+ break;
+ } else if (mListeners[i] == null) {
+ break;
+ }
+ }
+
+ scheduleNotification(NOTIFY_TIME, 0 /* delay */);
+ }
+ }
+
+ private synchronized void notifyTimedEvent(boolean refreshTime) {
+ // figure out next callback
+ long nowUs;
+ try {
+ nowUs = getCurrentTimeUs(refreshTime, true);
+ } catch (IllegalStateException e) {
+ // assume we paused until new player arrives
+ mRefresh = true;
+ mPausing = true; // this ensures that call succeeds
+ nowUs = getCurrentTimeUs(refreshTime, true);
+ }
+ long nextTimeUs = nowUs;
+
+ if (mSeeking) {
+ // skip timed-event notifications until seek is complete
+ return;
+ }
+
+ if (DEBUG) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("notifyTimedEvent(").append(mLastTimeUs).append(" -> ")
+ .append(nowUs).append(") from {");
+ boolean first = true;
+ for (long time: mTimes) {
+ if (time == NO_TIME) {
+ continue;
+ }
+ if (!first) sb.append(", ");
+ sb.append(time);
+ first = false;
+ }
+ sb.append("}");
+ Log.d(TAG, sb.toString());
+ }
+
+ Vector<MediaTimeProvider.OnMediaTimeListener> activatedListeners =
+ new Vector<MediaTimeProvider.OnMediaTimeListener>();
+ for (int ix = 0; ix < mTimes.length; ix++) {
+ if (mListeners[ix] == null) {
+ break;
+ }
+ if (mTimes[ix] <= NO_TIME) {
+ // ignore, unless we were stopped
+ } else if (mTimes[ix] <= nowUs + MAX_EARLY_CALLBACK_US) {
+ activatedListeners.add(mListeners[ix]);
+ if (DEBUG) Log.d(TAG, "removed");
+ mTimes[ix] = NO_TIME;
+ } else if (nextTimeUs == nowUs || mTimes[ix] < nextTimeUs) {
+ nextTimeUs = mTimes[ix];
+ }
+ }
+
+ if (nextTimeUs > nowUs && !mPaused) {
+ // schedule callback at nextTimeUs
+ if (DEBUG) Log.d(TAG, "scheduling for " + nextTimeUs + " and " + nowUs);
+ mPlayer.notifyAt(nextTimeUs);
+ } else {
+ mEventHandler.removeMessages(NOTIFY);
+ // no more callbacks
+ }
+
+ for (MediaTimeProvider.OnMediaTimeListener listener: activatedListeners) {
+ listener.onTimedEvent(nowUs);
+ }
+ }
+
+ public long getCurrentTimeUs(boolean refreshTime, boolean monotonic)
+ throws IllegalStateException {
+ synchronized (this) {
+ // we always refresh the time when the paused-state changes, because
+ // we expect to have received the pause-change event delayed.
+ if (mPaused && !refreshTime) {
+ return mLastReportedTime;
+ }
+
+ try {
+ mLastTimeUs = mPlayer.getCurrentPosition() * 1000L;
+ mPaused = !mPlayer.isPlaying() || mBuffering;
+ if (DEBUG) Log.v(TAG, (mPaused ? "paused" : "playing") + " at " + mLastTimeUs);
+ } catch (IllegalStateException e) {
+ if (mPausing) {
+ // if we were pausing, get last estimated timestamp
+ mPausing = false;
+ if (!monotonic || mLastReportedTime < mLastTimeUs) {
+ mLastReportedTime = mLastTimeUs;
+ }
+ mPaused = true;
+ if (DEBUG) Log.d(TAG, "illegal state, but pausing: estimating at " + mLastReportedTime);
+ return mLastReportedTime;
+ }
+ // TODO get time when prepared
+ throw e;
+ }
+ if (monotonic && mLastTimeUs < mLastReportedTime) {
+ /* have to adjust time */
+ if (mLastReportedTime - mLastTimeUs > 1000000) {
+ // schedule seeked event if time jumped significantly
+ // TODO: do this properly by introducing an exception
+ mStopped = false;
+ mSeeking = true;
+ scheduleNotification(NOTIFY_SEEK, 0 /* delay */);
+ }
+ } else {
+ mLastReportedTime = mLastTimeUs;
+ }
+
+ return mLastReportedTime;
+ }
+ }
+
+ private class EventHandler extends Handler {
+ public EventHandler(Looper looper) {
+ super(looper);
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ if (msg.what == NOTIFY) {
+ switch (msg.arg1) {
+ case NOTIFY_TIME:
+ notifyTimedEvent(true /* refreshTime */);
+ break;
+ case NOTIFY_STOP:
+ notifyStop();
+ break;
+ case NOTIFY_SEEK:
+ notifySeek();
+ break;
+ case NOTIFY_TRACK_DATA:
+ notifyTrackData((Pair<SubtitleTrack, byte[]>)msg.obj);
+ break;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/media/java/android/media/MediaPlayerBase.java b/media/java/android/media/MediaPlayerBase.java
deleted file mode 100644
index 980c70f..0000000
--- a/media/java/android/media/MediaPlayerBase.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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.media;
-
-import android.media.session.PlaybackState;
-import android.os.Handler;
-
-/**
- * Tentative interface for all media players that want media session.
- * APIs are named to avoid conflicts with MediaPlayer APIs.
- * All calls should be asynchrounous.
- *
- * @hide
- */
-// TODO(wjia) Finalize the list of MediaPlayer2, which MediaPlayerBase's APIs will be come from.
-public abstract class MediaPlayerBase {
- /**
- * Listens change in {@link PlaybackState}.
- */
- public interface PlaybackListener {
- /**
- * Called when {@link PlaybackState} for this player is changed.
- */
- void onPlaybackChanged(PlaybackState state);
- }
-
- // TODO(jaewan): setDataSources()?
- // TODO(jaewan): Add release() or do that in stop()?
-
- // TODO(jaewan): Add set/getSupportedActions().
- public abstract void play();
- public abstract void pause();
- public abstract void stop();
- public abstract void skipToPrevious();
- public abstract void skipToNext();
-
- // Currently PlaybackState's error message is the content title (for testing only)
- // TODO(jaewan): Add metadata support
- public abstract PlaybackState getPlaybackState();
-
- /**
- * Add a {@link PlaybackListener} to be invoked when the playback state is changed.
- *
- * @param listener the listener that will be run
- * @param handler the Handler that will receive the listener
- */
- public abstract void addPlaybackListener(PlaybackListener listener, Handler handler);
-
- /**
- * Remove previously added {@link PlaybackListener}.
- *
- * @param listener the listener to be removed
- */
- public abstract void removePlaybackListener(PlaybackListener listener);
-}
diff --git a/media/java/android/media/MediaPlayerInterface.java b/media/java/android/media/MediaPlayerInterface.java
new file mode 100644
index 0000000..78e2391
--- /dev/null
+++ b/media/java/android/media/MediaPlayerInterface.java
@@ -0,0 +1,91 @@
+/*
+ * 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.media;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.media.MediaSession2.PlaylistParams;
+
+import java.util.List;
+import java.util.concurrent.Executor;
+
+/**
+ * Base interfaces for all media players that want media session.
+ * @hide
+ */
+public interface MediaPlayerInterface {
+ /**
+ * Listens change in {@link PlaybackState2}.
+ */
+ interface PlaybackListener {
+ /**
+ * Called when {@link PlaybackState2} for this player is changed.
+ */
+ void onPlaybackChanged(PlaybackState2 state);
+ }
+
+ // Transport controls that session will send command directly to this player.
+ void play();
+ void prepare();
+ void pause();
+ void stop();
+ void skipToPrevious();
+ void skipToNext();
+ void seekTo(long pos);
+ void fastForward();
+ void rewind();
+
+ PlaybackState2 getPlaybackState();
+
+ /**
+ * Sets the {@link AudioAttributes} to be used during the playback of the media.
+ *
+ * @param attributes non-null <code>AudioAttributes</code>.
+ */
+ void setAudioAttributes(@NonNull AudioAttributes attributes);
+
+ /**
+ * Returns AudioAttributes that media player has.
+ */
+ @Nullable
+ AudioAttributes getAudioAttributes();
+
+ void addPlaylistItem(int index, MediaItem2 item);
+ void removePlaylistItem(MediaItem2 item);
+
+ void setPlaylist(List<MediaItem2> playlist);
+ List<MediaItem2> getPlaylist();
+
+ void setCurrentPlaylistItem(int index);
+ void setPlaylistParams(PlaylistParams params);
+ PlaylistParams getPlaylistParams();
+
+ /**
+ * Add a {@link PlaybackListener} to be invoked when the playback state is changed.
+ *
+ * @param executor the Handler that will receive the listener
+ * @param listener the listener that will be run
+ */
+ void addPlaybackListener(Executor executor, PlaybackListener listener);
+
+ /**
+ * Remove previously added {@link PlaybackListener}.
+ *
+ * @param listener the listener to be removed
+ */
+ void removePlaybackListener(PlaybackListener listener);
+}
diff --git a/media/java/android/media/MediaScanner.java b/media/java/android/media/MediaScanner.java
index cb4e46f..c309038 100644
--- a/media/java/android/media/MediaScanner.java
+++ b/media/java/android/media/MediaScanner.java
@@ -158,6 +158,7 @@
public static final String SCANNED_BUILD_PREFS_NAME = "MediaScanBuild";
public static final String LAST_INTERNAL_SCAN_FINGERPRINT = "lastScanFingerprint";
private static final String SYSTEM_SOUNDS_DIR = "/system/media/audio";
+ private static final String PRODUCT_SOUNDS_DIR = "/product/media/audio";
private static String sLastInternalScanFingerprint;
private static final String[] ID3_GENRES = {
@@ -1153,7 +1154,10 @@
private static boolean isSystemSoundWithMetadata(String path) {
if (path.startsWith(SYSTEM_SOUNDS_DIR + ALARMS_DIR)
|| path.startsWith(SYSTEM_SOUNDS_DIR + RINGTONES_DIR)
- || path.startsWith(SYSTEM_SOUNDS_DIR + NOTIFICATIONS_DIR)) {
+ || path.startsWith(SYSTEM_SOUNDS_DIR + NOTIFICATIONS_DIR)
+ || path.startsWith(PRODUCT_SOUNDS_DIR + ALARMS_DIR)
+ || path.startsWith(PRODUCT_SOUNDS_DIR + RINGTONES_DIR)
+ || path.startsWith(PRODUCT_SOUNDS_DIR + NOTIFICATIONS_DIR)) {
return true;
}
return false;
diff --git a/media/java/android/media/MediaSession2.java b/media/java/android/media/MediaSession2.java
index 33a5807..0ea1e86 100644
--- a/media/java/android/media/MediaSession2.java
+++ b/media/java/android/media/MediaSession2.java
@@ -16,23 +16,34 @@
package android.media;
+import android.annotation.CallbackExecutor;
+import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.app.PendingIntent;
import android.content.Context;
+import android.content.Intent;
+import android.media.MediaPlayerInterface.PlaybackListener;
import android.media.session.MediaSession;
import android.media.session.MediaSession.Callback;
import android.media.session.PlaybackState;
import android.media.update.ApiLoader;
import android.media.update.MediaSession2Provider;
+import android.media.update.MediaSession2Provider.CommandGroupProvider;
+import android.media.update.MediaSession2Provider.CommandProvider;
import android.media.update.MediaSession2Provider.ControllerInfoProvider;
+import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
-import android.os.Parcelable;
+import android.os.IInterface;
+import android.os.ResultReceiver;
import android.text.TextUtils;
-import android.util.ArraySet;
-import java.util.ArrayList;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.util.List;
+import java.util.concurrent.Executor;
/**
* Allows a media app to expose its transport controls and playback information in a process to
@@ -56,7 +67,8 @@
* session.
* <p>
* When a session receive transport control commands, the session sends the commands directly to
- * the the underlying media player set by {@link Builder} or {@link #setPlayer(MediaPlayerBase)}.
+ * the the underlying media player set by {@link Builder} or
+ * {@link #setPlayer(MediaPlayerInterface)}.
* <p>
* When an app is finished performing playback it must call {@link #close()} to clean up the session
* and notify any controllers.
@@ -66,24 +78,37 @@
* @see MediaSessionService2
* @hide
*/
-// TODO(jaewan): Unhide
-// TODO(jaewan): Revisit comments. Currently it's borrowed from the MediaSession.
-// TODO(jaewan): Add explicit release(), and make token @NonNull. Session will be active while the
-// session exists, and controllers will be invalidated when session becomes inactive.
-// TODO(jaewan): Should we support thread safe? It may cause tricky issue such as b/63797089
-// TODO(jaewan): Should we make APIs for MediaSessionService2 public? It's helpful for
-// developers that doesn't want to override from Browser, but user may not use this
-// correctly.
-public class MediaSession2 extends MediaPlayerBase {
+public class MediaSession2 implements AutoCloseable {
private final MediaSession2Provider mProvider;
// Note: Do not define IntDef because subclass can add more command code on top of these.
+ // TODO(jaewan): Shouldn't we pull out?
+ // TODO(jaewan): Should we also protect getPlaybackState()?
public static final int COMMAND_CODE_CUSTOM = 0;
public static final int COMMAND_CODE_PLAYBACK_START = 1;
public static final int COMMAND_CODE_PLAYBACK_PAUSE = 2;
public static final int COMMAND_CODE_PLAYBACK_STOP = 3;
public static final int COMMAND_CODE_PLAYBACK_SKIP_NEXT_ITEM = 4;
public static final int COMMAND_CODE_PLAYBACK_SKIP_PREV_ITEM = 5;
+ public static final int COMMAND_CODE_PLAYBACK_PREPARE = 6;
+ public static final int COMMAND_CODE_PLAYBACK_FAST_FORWARD = 7;
+ public static final int COMMAND_CODE_PLAYBACK_REWIND = 8;
+ public static final int COMMAND_CODE_PLAYBACK_SEEK_TO = 9;
+ public static final int COMMAND_CODE_PLAYBACK_SET_CURRENT_PLAYLIST_ITEM = 10;
+
+ public static final int COMMAND_CODE_PLAYLIST_GET = 11;
+ public static final int COMMAND_CODE_PLAYLIST_ADD = 12;
+ public static final int COMMAND_CODE_PLAYLIST_REMOVE = 13;
+
+ public static final int COMMAND_CODE_PLAY_FROM_MEDIA_ID = 14;
+ public static final int COMMAND_CODE_PLAY_FROM_URI = 15;
+ public static final int COMMAND_CODE_PLAY_FROM_SEARCH = 16;
+
+ public static final int COMMAND_CODE_PREPARE_FROM_MEDIA_ID = 17;
+ public static final int COMMAND_CODE_PREPARE_FROM_URI = 18;
+ public static final int COMMAND_CODE_PREPARE_FROM_SEARCH = 19;
+
+ public static final int COMMAND_CODE_PLAYBACK_SET_PLAYLIST_PARAMS = 20;
/**
* Define a command that a {@link MediaController2} can send to a {@link MediaSession2}.
@@ -94,43 +119,31 @@
*/
// TODO(jaewan): Move this into the updatable.
public static final class Command {
- private static final String KEY_COMMAND_CODE
- = "android.media.mediasession2.command.command_command";
- private static final String KEY_COMMAND_CUSTOM_COMMAND
- = "android.media.mediasession2.command.custom_command";
- private static final String KEY_COMMAND_EXTRA
- = "android.media.mediasession2.command.extra";
+ private final CommandProvider mProvider;
- private final int mCommandCode;
- // Nonnull if it's custom command
- private final String mCustomCommand;
- private final Bundle mExtra;
-
- public Command(int commandCode) {
- mCommandCode = commandCode;
- mCustomCommand = null;
- mExtra = null;
+ public Command(@NonNull Context context, int commandCode) {
+ mProvider = ApiLoader.getProvider(context)
+ .createMediaSession2Command(this, commandCode, null, null);
}
- public Command(@NonNull String action, @Nullable Bundle extra) {
+ public Command(@NonNull Context context, @NonNull String action, @Nullable Bundle extra) {
if (action == null) {
throw new IllegalArgumentException("action shouldn't be null");
}
- mCommandCode = COMMAND_CODE_CUSTOM;
- mCustomCommand = action;
- mExtra = extra;
+ mProvider = ApiLoader.getProvider(context)
+ .createMediaSession2Command(this, COMMAND_CODE_CUSTOM, action, extra);
}
public int getCommandCode() {
- return mCommandCode;
+ return mProvider.getCommandCode_impl();
}
public @Nullable String getCustomCommand() {
- return mCustomCommand;
+ return mProvider.getCustomCommand_impl();
}
public @Nullable Bundle getExtra() {
- return mExtra;
+ return mProvider.getExtra_impl();
}
/**
@@ -138,28 +151,7 @@
* @hide
*/
public Bundle toBundle() {
- Bundle bundle = new Bundle();
- bundle.putInt(KEY_COMMAND_CODE, mCommandCode);
- bundle.putString(KEY_COMMAND_CUSTOM_COMMAND, mCustomCommand);
- bundle.putBundle(KEY_COMMAND_EXTRA, mExtra);
- return bundle;
- }
-
- /**
- * @return a new Command instance from the Bundle
- * @hide
- */
- public static Command fromBundle(Bundle command) {
- int code = command.getInt(KEY_COMMAND_CODE);
- if (code != COMMAND_CODE_CUSTOM) {
- return new Command(code);
- } else {
- String customCommand = command.getString(KEY_COMMAND_CUSTOM_COMMAND);
- if (customCommand == null) {
- return null;
- }
- return new Command(customCommand, command.getBundle(KEY_COMMAND_EXTRA));
- }
+ return mProvider.toBundle_impl();
}
@Override
@@ -167,67 +159,62 @@
if (!(obj instanceof Command)) {
return false;
}
- Command other = (Command) obj;
- // TODO(jaewan): Should we also compare contents in bundle?
- // It may not be possible if the bundle contains private class.
- return mCommandCode == other.mCommandCode
- && TextUtils.equals(mCustomCommand, other.mCustomCommand);
+ return mProvider.equals_impl(((Command) obj).mProvider);
}
@Override
public int hashCode() {
- final int prime = 31;
- return ((mCustomCommand != null) ? mCustomCommand.hashCode() : 0) * prime + mCommandCode;
+ return mProvider.hashCode_impl();
+ }
+
+ /**
+ * @return a new Command instance from the Bundle
+ * @hide
+ */
+ public static Command fromBundle(@NonNull Context context, Bundle command) {
+ return ApiLoader.getProvider(context).fromBundle_MediaSession2Command(context, command);
}
}
/**
* Represent set of {@link Command}.
*/
- // TODO(jaewan): Move this to updatable
public static class CommandGroup {
- private static final String KEY_COMMANDS =
- "android.media.mediasession2.commandgroup.commands";
- private ArraySet<Command> mCommands = new ArraySet<>();
+ private final CommandGroupProvider mProvider;
- public CommandGroup() {
+ public CommandGroup(Context context) {
+ mProvider = ApiLoader.getProvider(context)
+ .createMediaSession2CommandGroup(context, this, null);
}
- public CommandGroup(CommandGroup others) {
- mCommands.addAll(others.mCommands);
+ public CommandGroup(Context context, CommandGroup others) {
+ mProvider = ApiLoader.getProvider(context)
+ .createMediaSession2CommandGroup(context, this, others);
}
public void addCommand(Command command) {
- mCommands.add(command);
+ mProvider.addCommand_impl(command);
}
public void addAllPredefinedCommands() {
- // TODO(jaewan): Is there any better way than this?
- mCommands.add(new Command(COMMAND_CODE_PLAYBACK_START));
- mCommands.add(new Command(COMMAND_CODE_PLAYBACK_PAUSE));
- mCommands.add(new Command(COMMAND_CODE_PLAYBACK_STOP));
- mCommands.add(new Command(COMMAND_CODE_PLAYBACK_SKIP_NEXT_ITEM));
- mCommands.add(new Command(COMMAND_CODE_PLAYBACK_SKIP_PREV_ITEM));
+ mProvider.addAllPredefinedCommands_impl();
}
public void removeCommand(Command command) {
- mCommands.remove(command);
+ mProvider.removeCommand_impl(command);
}
public boolean hasCommand(Command command) {
- return mCommands.contains(command);
+ return mProvider.hasCommand_impl(command);
}
public boolean hasCommand(int code) {
- if (code == COMMAND_CODE_CUSTOM) {
- throw new IllegalArgumentException("Use hasCommand(Command) for custom command");
- }
- for (int i = 0; i < mCommands.size(); i++) {
- if (mCommands.valueAt(i).getCommandCode() == code) {
- return true;
- }
- }
- return false;
+ return mProvider.hasCommand_impl(code);
+ }
+
+ @SystemApi
+ public CommandGroupProvider getProvider() {
+ return mProvider;
}
/**
@@ -235,40 +222,16 @@
* @hide
*/
public Bundle toBundle() {
- ArrayList<Bundle> list = new ArrayList<>();
- for (int i = 0; i < mCommands.size(); i++) {
- list.add(mCommands.valueAt(i).toBundle());
- }
- Bundle bundle = new Bundle();
- bundle.putParcelableArrayList(KEY_COMMANDS, list);
- return bundle;
+ return mProvider.toBundle_impl();
}
/**
* @return new instance of CommandGroup from the bundle
* @hide
*/
- public static @Nullable CommandGroup fromBundle(Bundle commands) {
- if (commands == null) {
- return null;
- }
- List<Parcelable> list = commands.getParcelableArrayList(KEY_COMMANDS);
- if (list == null) {
- return null;
- }
- CommandGroup commandGroup = new CommandGroup();
- for (int i = 0; i < list.size(); i++) {
- Parcelable parcelable = list.get(i);
- if (!(parcelable instanceof Bundle)) {
- continue;
- }
- Bundle commandBundle = (Bundle) parcelable;
- Command command = Command.fromBundle(commandBundle);
- if (command != null) {
- commandGroup.addCommand(command);
- }
- }
- return commandGroup;
+ public static @Nullable CommandGroup fromBundle(Context context, Bundle commands) {
+ return ApiLoader.getProvider(context)
+ .fromBundle_MediaSession2CommandGroup(context, commands);
}
}
@@ -280,6 +243,12 @@
*/
// TODO(jaewan): Can we move this inside of the updatable for default implementation.
public static class SessionCallback {
+ private final Context mContext;
+
+ public SessionCallback(Context context) {
+ mContext = context;
+ }
+
/**
* Called when a controller is created for this session. Return allowed commands for
* controller. By default it allows all connection requests and commands.
@@ -292,25 +261,140 @@
*/
// TODO(jaewan): Change return type. Once we do, null is for reject.
public @Nullable CommandGroup onConnect(@NonNull ControllerInfo controller) {
- CommandGroup commands = new CommandGroup();
+ CommandGroup commands = new CommandGroup(mContext);
commands.addAllPredefinedCommands();
return commands;
}
/**
- * Called when a controller sent a command to the session. You can also reject the request
- * by return {@code false}.
- * <p>
- * This method will be called on the session handler.
+ * Called when a controller is disconnected
+ *
+ * @param controller controller information
+ */
+ public void onDisconnected(@NonNull ControllerInfo controller) { }
+
+ /**
+ * Called when a controller sent a command to the session, and the command will be sent to
+ * the player directly unless you reject the request by {@code false}.
*
* @param controller controller information.
* @param command a command. This method will be called for every single command.
* @return {@code true} if you want to accept incoming command. {@code false} otherwise.
*/
+ // TODO(jaewan): Add more documentations (or make it clear) which commands can be filtered
+ // with this.
public boolean onCommandRequest(@NonNull ControllerInfo controller,
@NonNull Command command) {
return true;
}
+
+ /**
+ * Called when a controller set rating on the currently playing contents.
+ *
+ * @param controller controller information
+ * @param rating new rating from the controller
+ */
+ public void onSetRating(@NonNull ControllerInfo controller, @NonNull Rating2 rating) { }
+
+ /**
+ * Called when a controller sent a custom command.
+ *
+ * @param controller controller information
+ * @param customCommand custom command.
+ * @param args optional arguments
+ * @param cb optional result receiver
+ */
+ public void onCustomCommand(@NonNull ControllerInfo controller,
+ @NonNull Command customCommand, @Nullable Bundle args,
+ @Nullable ResultReceiver cb) { }
+
+ /**
+ * Override to handle requests to prepare for playing a specific mediaId.
+ * During the preparation, a session should not hold audio focus in order to allow other
+ * sessions play seamlessly. The state of playback should be updated to
+ * {@link PlaybackState#STATE_PAUSED} after the preparation is done.
+ * <p>
+ * The playback of the prepared content should start in the later calls of
+ * {@link MediaSession2#play()}.
+ * <p>
+ * Override {@link #onPlayFromMediaId} to handle requests for starting
+ * playback without preparation.
+ */
+ public void onPlayFromMediaId(@NonNull ControllerInfo controller,
+ @NonNull String mediaId, @Nullable Bundle extras) { }
+
+ /**
+ * Override to handle requests to prepare playback from a search query. An empty query
+ * indicates that the app may prepare any music. The implementation should attempt to make a
+ * smart choice about what to play. During the preparation, a session should not hold audio
+ * focus in order to allow other sessions play seamlessly. The state of playback should be
+ * updated to {@link PlaybackState#STATE_PAUSED} after the preparation is done.
+ * <p>
+ * The playback of the prepared content should start in the later calls of
+ * {@link MediaSession2#play()}.
+ * <p>
+ * Override {@link #onPlayFromSearch} to handle requests for starting playback without
+ * preparation.
+ */
+ public void onPlayFromSearch(@NonNull ControllerInfo controller,
+ @NonNull String query, @Nullable Bundle extras) { }
+
+ /**
+ * Override to handle requests to prepare a specific media item represented by a URI.
+ * During the preparation, a session should not hold audio focus in order to allow
+ * other sessions play seamlessly. The state of playback should be updated to
+ * {@link PlaybackState#STATE_PAUSED} after the preparation is done.
+ * <p>
+ * The playback of the prepared content should start in the later calls of
+ * {@link MediaSession2#play()}.
+ * <p>
+ * Override {@link #onPlayFromUri} to handle requests for starting playback without
+ * preparation.
+ */
+ public void onPlayFromUri(@NonNull ControllerInfo controller,
+ @NonNull String uri, @Nullable Bundle extras) { }
+
+ /**
+ * Override to handle requests to play a specific mediaId.
+ */
+ public void onPrepareFromMediaId(@NonNull ControllerInfo controller,
+ @NonNull String mediaId, @Nullable Bundle extras) { }
+
+ /**
+ * Override to handle requests to begin playback from a search query. An
+ * empty query indicates that the app may play any music. The
+ * implementation should attempt to make a smart choice about what to
+ * play.
+ */
+ public void onPrepareFromSearch(@NonNull ControllerInfo controller,
+ @NonNull String query, @Nullable Bundle extras) { }
+
+ /**
+ * Override to handle requests to play a specific media item represented by a URI.
+ */
+ public void onPrepareFromUri(@NonNull ControllerInfo controller,
+ @NonNull Uri uri, @Nullable Bundle extras) { }
+
+ /**
+ * Called when a controller wants to add a {@link MediaItem2} at the specified position
+ * in the play queue.
+ * <p>
+ * The item from the media controller wouldn't have valid data source descriptor because
+ * it would have been anonymized when it's sent to the remote process.
+ *
+ * @param item The media item to be inserted.
+ * @param index The index at which the item is to be inserted.
+ */
+ public void onAddPlaylistItem(@NonNull ControllerInfo controller,
+ @NonNull MediaItem2 item, int index) { }
+
+ /**
+ * Called when a controller wants to remove the {@link MediaItem2}
+ *
+ * @param item
+ */
+ // Can we do this automatically?
+ public void onRemovePlaylistItem(@NonNull MediaItem2 item) { }
};
/**
@@ -321,9 +405,13 @@
static abstract class BuilderBase
<T extends MediaSession2.BuilderBase<T, C>, C extends SessionCallback> {
final Context mContext;
- final MediaPlayerBase mPlayer;
+ final MediaPlayerInterface mPlayer;
String mId;
+ Executor mCallbackExecutor;
C mCallback;
+ VolumeProvider mVolumeProvider;
+ int mRatingType;
+ PendingIntent mSessionActivity;
/**
* Constructor.
@@ -334,17 +422,13 @@
* {@link MediaSession2} or {@link MediaController2}.
*/
// TODO(jaewan): Also need executor
- public BuilderBase(@NonNull Context context, @NonNull MediaPlayerBase player) {
+ public BuilderBase(@NonNull Context context, @NonNull MediaPlayerInterface player) {
if (context == null) {
throw new IllegalArgumentException("context shouldn't be null");
}
if (player == null) {
throw new IllegalArgumentException("player shouldn't be null");
}
- if (player instanceof MediaSession2 || player instanceof MediaController2) {
- throw new IllegalArgumentException("player doesn't accept MediaSession2 nor"
- + " MediaController2");
- }
mContext = context;
mPlayer = player;
// Ensure non-null
@@ -352,6 +436,50 @@
}
/**
+ * Set volume provider to configure this session to use remote volume handling.
+ * This must be called to receive volume button events, otherwise the system
+ * will adjust the appropriate stream volume for this session's player.
+ * <p>
+ * Set {@code null} to reset.
+ *
+ * @param volumeProvider The provider that will handle volume changes. Can be {@code null}
+ */
+ public T setVolumeProvider(@Nullable VolumeProvider volumeProvider) {
+ mVolumeProvider = volumeProvider;
+ return (T) this;
+ }
+
+ /**
+ * Set the style of rating used by this session. Apps trying to set the
+ * rating should use this style. Must be one of the following:
+ * <ul>
+ * <li>{@link Rating2#RATING_NONE}</li>
+ * <li>{@link Rating2#RATING_3_STARS}</li>
+ * <li>{@link Rating2#RATING_4_STARS}</li>
+ * <li>{@link Rating2#RATING_5_STARS}</li>
+ * <li>{@link Rating2#RATING_HEART}</li>
+ * <li>{@link Rating2#RATING_PERCENTAGE}</li>
+ * <li>{@link Rating2#RATING_THUMB_UP_DOWN}</li>
+ * </ul>
+ */
+ public T setRatingType(@Rating2.Style int type) {
+ mRatingType = type;
+ return (T) this;
+ }
+
+ /**
+ * Set an intent for launching UI for this Session. This can be used as a
+ * quick link to an ongoing media screen. The intent should be for an
+ * activity that may be started using {@link Context#startActivity(Intent)}.
+ *
+ * @param pi The intent to launch to show UI for this session.
+ */
+ public T setSessionActivity(@Nullable PendingIntent pi) {
+ mSessionActivity = pi;
+ return (T) this;
+ }
+
+ /**
* Set ID of the session. If it's not set, an empty string with used to create a session.
* <p>
* Use this if and only if your app supports multiple playback at the same time and also
@@ -370,12 +498,21 @@
}
/**
- * Set {@link SessionCallback}.
+ * Set callback for the session.
*
+ * @param executor callback executor
* @param callback session callback.
* @return
*/
- public T setSessionCallback(@Nullable C callback) {
+ public T setSessionCallback(@NonNull @CallbackExecutor Executor executor,
+ @NonNull C callback) {
+ if (executor == null) {
+ throw new IllegalArgumentException("executor shouldn't be null");
+ }
+ if (callback == null) {
+ throw new IllegalArgumentException("callback shouldn't be null");
+ }
+ mCallbackExecutor = executor;
mCallback = callback;
return (T) this;
}
@@ -387,7 +524,7 @@
* @throws IllegalStateException if the session with the same id is already exists for the
* package.
*/
- public abstract MediaSession2 build() throws IllegalStateException;
+ public abstract MediaSession2 build();
}
/**
@@ -400,23 +537,26 @@
// TODO(jaewan): Add setRatingType()
// TODO(jaewan): Add setSessionActivity()
public static final class Builder extends BuilderBase<Builder, SessionCallback> {
- public Builder(Context context, @NonNull MediaPlayerBase player) {
+ public Builder(Context context, @NonNull MediaPlayerInterface player) {
super(context, player);
}
@Override
- public MediaSession2 build() throws IllegalStateException {
- if (mCallback == null) {
- mCallback = new SessionCallback();
+ public MediaSession2 build() {
+ if (mCallbackExecutor == null) {
+ mCallbackExecutor = mContext.getMainExecutor();
}
- return new MediaSession2(mContext, mPlayer, mId, mCallback);
+ if (mCallback == null) {
+ mCallback = new SessionCallback(mContext);
+ }
+ return new MediaSession2(mContext, mPlayer, mId, mVolumeProvider, mRatingType,
+ mSessionActivity, mCallbackExecutor, mCallback);
}
}
/**
* Information of a controller.
*/
- // TODO(jaewan): Move implementation to the updatable.
public static final class ControllerInfo {
private final ControllerInfoProvider mProvider;
@@ -426,10 +566,10 @@
// TODO(jaewan): SystemApi
// TODO(jaewan): Also accept componentName to check notificaiton listener.
public ControllerInfo(Context context, int uid, int pid, String packageName,
- IMediaSession2Callback callback) {
+ IInterface callback) {
mProvider = ApiLoader.getProvider(context)
.createMediaSession2ControllerInfoProvider(
- this, context, uid, pid, packageName, callback);
+ context, this, uid, pid, packageName, callback);
}
/**
@@ -457,11 +597,7 @@
return mProvider.isTrusted_impl();
}
- /**
- * @hide
- * @return
- */
- // TODO(jaewan): SystemApi
+ @SystemApi
public ControllerInfoProvider getProvider() {
return mProvider;
}
@@ -482,12 +618,315 @@
@Override
public String toString() {
+ // TODO(jaewan): Move this to updatable.
return "ControllerInfo {pkg=" + getPackageName() + ", uid=" + getUid() + ", trusted="
+ isTrusted() + "}";
}
}
/**
+ * Button for a {@link Command} that will be shown by the controller.
+ * <p>
+ * It's up to the controller's decision to respect or ignore this customization request.
+ */
+ // TODO(jaewan): Move this to updatable.
+ public static class CommandButton {
+ private static final String KEY_COMMAND
+ = "android.media.media_session2.command_button.command";
+ private static final String KEY_ICON_RES_ID
+ = "android.media.media_session2.command_button.icon_res_id";
+ private static final String KEY_DISPLAY_NAME
+ = "android.media.media_session2.command_button.display_name";
+ private static final String KEY_EXTRA
+ = "android.media.media_session2.command_button.extra";
+ private static final String KEY_ENABLED
+ = "android.media.media_session2.command_button.enabled";
+
+ private Command mCommand;
+ private int mIconResId;
+ private String mDisplayName;
+ private Bundle mExtra;
+ private boolean mEnabled;
+
+ private CommandButton(@Nullable Command command, int iconResId,
+ @Nullable String displayName, Bundle extra, boolean enabled) {
+ mCommand = command;
+ mIconResId = iconResId;
+ mDisplayName = displayName;
+ mExtra = extra;
+ mEnabled = enabled;
+ }
+
+ /**
+ * Get command associated with this button. Can be {@code null} if the button isn't enabled
+ * and only providing placeholder.
+ *
+ * @return command or {@code null}
+ */
+ public @Nullable Command getCommand() {
+ return mCommand;
+ }
+
+ /**
+ * Resource id of the button in this package. Can be {@code 0} if the command is predefined
+ * and custom icon isn't needed.
+ *
+ * @return resource id of the icon. Can be {@code 0}.
+ */
+ public int getIconResId() {
+ return mIconResId;
+ }
+
+ /**
+ * Display name of the button. Can be {@code null} or empty if the command is predefined
+ * and custom name isn't needed.
+ *
+ * @return custom display name. Can be {@code null} or empty.
+ */
+ public @Nullable String getDisplayName() {
+ return mDisplayName;
+ }
+
+ /**
+ * Extra information of the button. It's private information between session and controller.
+ *
+ * @return
+ */
+ public @Nullable Bundle getExtra() {
+ return mExtra;
+ }
+
+ /**
+ * Return whether it's enabled
+ *
+ * @return {@code true} if enabled. {@code false} otherwise.
+ */
+ public boolean isEnabled() {
+ return mEnabled;
+ }
+
+ /**
+ * @hide
+ */
+ // TODO(jaewan): @SystemApi
+ public @NonNull Bundle toBundle() {
+ Bundle bundle = new Bundle();
+ bundle.putBundle(KEY_COMMAND, mCommand.toBundle());
+ bundle.putInt(KEY_ICON_RES_ID, mIconResId);
+ bundle.putString(KEY_DISPLAY_NAME, mDisplayName);
+ bundle.putBundle(KEY_EXTRA, mExtra);
+ bundle.putBoolean(KEY_ENABLED, mEnabled);
+ return bundle;
+ }
+
+ /**
+ * @hide
+ */
+ // TODO(jaewan): @SystemApi
+ public static @Nullable CommandButton fromBundle(Context context, Bundle bundle) {
+ Builder builder = new Builder();
+ builder.setCommand(Command.fromBundle(context, bundle.getBundle(KEY_COMMAND)));
+ builder.setIconResId(bundle.getInt(KEY_ICON_RES_ID, 0));
+ builder.setDisplayName(bundle.getString(KEY_DISPLAY_NAME));
+ builder.setExtra(bundle.getBundle(KEY_EXTRA));
+ builder.setEnabled(bundle.getBoolean(KEY_ENABLED));
+ try {
+ return builder.build();
+ } catch (IllegalStateException e) {
+ // Malformed or version mismatch. Return null for now.
+ return null;
+ }
+ }
+
+ /**
+ * Builder for {@link CommandButton}.
+ */
+ public static class Builder {
+ private Command mCommand;
+ private int mIconResId;
+ private String mDisplayName;
+ private Bundle mExtra;
+ private boolean mEnabled;
+
+ public Builder() {
+ mEnabled = true;
+ }
+
+ public Builder setCommand(Command command) {
+ mCommand = command;
+ return this;
+ }
+
+ public Builder setIconResId(int resId) {
+ mIconResId = resId;
+ return this;
+ }
+
+ public Builder setDisplayName(String displayName) {
+ mDisplayName = displayName;
+ return this;
+ }
+
+ public Builder setEnabled(boolean enabled) {
+ mEnabled = enabled;
+ return this;
+ }
+
+ public Builder setExtra(Bundle extra) {
+ mExtra = extra;
+ return this;
+ }
+
+ public CommandButton build() {
+ if (mEnabled && mCommand == null) {
+ throw new IllegalStateException("Enabled button needs Command"
+ + " for controller to invoke the command");
+ }
+ if (mCommand != null && mCommand.getCommandCode() == COMMAND_CODE_CUSTOM
+ && (mIconResId == 0 || TextUtils.isEmpty(mDisplayName))) {
+ throw new IllegalStateException("Custom commands needs icon and"
+ + " and name to display");
+ }
+ return new CommandButton(mCommand, mIconResId, mDisplayName, mExtra, mEnabled);
+ }
+ }
+ }
+
+ /**
+ * Parameter for the playlist.
+ */
+ public static class PlaylistParams {
+ /**
+ * @hide
+ */
+ @IntDef({REPEAT_MODE_NONE, REPEAT_MODE_ONE, REPEAT_MODE_ALL,
+ REPEAT_MODE_GROUP})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface RepeatMode {}
+
+ /**
+ * Playback will be stopped at the end of the playing media list.
+ */
+ public static final int REPEAT_MODE_NONE = 0;
+
+ /**
+ * Playback of the current playing media item will be repeated.
+ */
+ public static final int REPEAT_MODE_ONE = 1;
+
+ /**
+ * Playing media list will be repeated.
+ */
+ public static final int REPEAT_MODE_ALL = 2;
+
+ /**
+ * Playback of the playing media group will be repeated.
+ * A group is a logical block of media items which is specified in the section 5.7 of the
+ * Bluetooth AVRCP 1.6.
+ */
+ public static final int REPEAT_MODE_GROUP = 3;
+
+ /**
+ * @hide
+ */
+ @IntDef({SHUFFLE_MODE_NONE, SHUFFLE_MODE_ALL, SHUFFLE_MODE_GROUP})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ShuffleMode {}
+
+ /**
+ * Media list will be played in order.
+ */
+ public static final int SHUFFLE_MODE_NONE = 0;
+
+ /**
+ * Media list will be played in shuffled order.
+ */
+ public static final int SHUFFLE_MODE_ALL = 1;
+
+ /**
+ * Media group will be played in shuffled order.
+ * A group is a logical block of media items which is specified in the section 5.7 of the
+ * Bluetooth AVRCP 1.6.
+ */
+ public static final int SHUFFLE_MODE_GROUP = 2;
+
+ /**
+ * Keys used for converting a PlaylistParams object to a bundle object and vice versa.
+ */
+ private static final String KEY_REPEAT_MODE =
+ "android.media.session2.playlistparams2.repeat_mode";
+ private static final String KEY_SHUFFLE_MODE =
+ "android.media.session2.playlistparams2.shuffle_mode";
+ private static final String KEY_MEDIA_METADATA2_BUNDLE =
+ "android.media.session2.playlistparams2.metadata2_bundle";
+
+ private @RepeatMode int mRepeatMode;
+ private @ShuffleMode int mShuffleMode;
+
+ private MediaMetadata2 mPlaylistMetadata;
+
+ public PlaylistParams(@RepeatMode int repeatMode, @ShuffleMode int shuffleMode,
+ @Nullable MediaMetadata2 playlistMetadata) {
+ mRepeatMode = repeatMode;
+ mShuffleMode = shuffleMode;
+ mPlaylistMetadata = playlistMetadata;
+ }
+
+ public @RepeatMode int getRepeatMode() {
+ return mRepeatMode;
+ }
+
+ public @ShuffleMode int getShuffleMode() {
+ return mShuffleMode;
+ }
+
+ public MediaMetadata2 getPlaylistMetadata() {
+ return mPlaylistMetadata;
+ }
+
+ /**
+ * Returns this object as a bundle to share between processes.
+ *
+ * @hide
+ */
+ public Bundle toBundle() {
+ Bundle bundle = new Bundle();
+ bundle.putInt(KEY_REPEAT_MODE, mRepeatMode);
+ bundle.putInt(KEY_SHUFFLE_MODE, mShuffleMode);
+ if (mPlaylistMetadata != null) {
+ bundle.putBundle(KEY_MEDIA_METADATA2_BUNDLE, mPlaylistMetadata.getBundle());
+ }
+ return bundle;
+ }
+
+ /**
+ * Creates an instance from a bundle which is previously created by {@link #toBundle()}.
+ *
+ * @param bundle A bundle created by {@link #toBundle()}.
+ * @return A new {@link PlaylistParams} instance. Returns {@code null} if the given
+ * {@param bundle} is null, or if the {@param bundle} has no playlist parameters.
+ * @hide
+ */
+ public static PlaylistParams fromBundle(Bundle bundle) {
+ if (bundle == null) {
+ return null;
+ }
+ if (!bundle.containsKey(KEY_REPEAT_MODE) || !bundle.containsKey(KEY_SHUFFLE_MODE)) {
+ return null;
+ }
+
+ Bundle metadataBundle = bundle.getBundle(KEY_MEDIA_METADATA2_BUNDLE);
+ MediaMetadata2 metadata =
+ metadataBundle == null ? null : new MediaMetadata2(metadataBundle);
+
+ return new PlaylistParams(
+ bundle.getInt(KEY_REPEAT_MODE),
+ bundle.getInt(KEY_SHUFFLE_MODE),
+ metadata);
+ }
+ }
+
+ /**
* Constructor is hidden and apps can only instantiate indirectly through {@link Builder}.
* <p>
* This intended behavior and here's the reasons.
@@ -501,54 +940,77 @@
* framework had to add heuristics to figure out if an app is
* @hide
*/
- MediaSession2(Context context, MediaPlayerBase player, String id,
- SessionCallback callback) {
+ MediaSession2(Context context, MediaPlayerInterface player, String id,
+ VolumeProvider volumeProvider, int ratingType, PendingIntent sessionActivity,
+ Executor callbackExecutor, SessionCallback callback) {
super();
- mProvider = ApiLoader.getProvider(context)
- .createMediaSession2(this, context, player, id, callback);
+ mProvider = createProvider(context, player, id, volumeProvider, ratingType, sessionActivity,
+ callbackExecutor, callback);
+ mProvider.initialize();
}
- /**
- * @hide
- */
- // TODO(jaewan): SystemApi
+ MediaSession2Provider createProvider(Context context, MediaPlayerInterface player, String id,
+ VolumeProvider volumeProvider, int ratingType, PendingIntent sessionActivity,
+ Executor callbackExecutor, SessionCallback callback) {
+ return ApiLoader.getProvider(context)
+ .createMediaSession2(context, this, player, id, volumeProvider, ratingType,
+ sessionActivity, callbackExecutor, callback);
+ }
+
+ @SystemApi
public MediaSession2Provider getProvider() {
return mProvider;
}
/**
- * Set the underlying {@link MediaPlayerBase} for this session to dispatch incoming event to.
- * Events from the {@link MediaController2} will be sent directly to the underlying
+ * Set the underlying {@link MediaPlayerInterface} for this session to dispatch incoming event
+ * to. Events from the {@link MediaController2} will be sent directly to the underlying
* player on the {@link Handler} where the session is created on.
* <p>
* If the new player is successfully set, {@link PlaybackListener}
* will be called to tell the current playback state of the new player.
* <p>
- * Calling this method with {@code null} will disconnect binding connection between the
- * controllers and also release this object.
+ * You can also specify a volume provider. If so, playback in the player is considered as
+ * remote playback.
*
- * @param player a {@link MediaPlayerBase} that handles actual media playback in your app.
- * It shouldn't be {@link MediaSession2} nor {@link MediaController2}.
- * @throws IllegalArgumentException if the player is either {@link MediaSession2}
- * or {@link MediaController2}.
+ * @param player a {@link MediaPlayerInterface} that handles actual media playback in your app.
+ * @throws IllegalArgumentException if the player is {@code null}.
*/
- // TODO(jaewan): Add release instead of setPlayer(null).
- public void setPlayer(MediaPlayerBase player) throws IllegalArgumentException {
+ public void setPlayer(@NonNull MediaPlayerInterface player) {
mProvider.setPlayer_impl(player);
}
/**
+ * Set the underlying {@link MediaPlayerInterface} with the volume provider for remote playback.
+ *
+ * @param player a {@link MediaPlayerInterface} that handles actual media playback in your app.
+ * @param volumeProvider a volume provider
+ * @see #setPlayer(MediaPlayerInterface)
+ * @see Builder#setVolumeProvider(VolumeProvider)
+ */
+ public void setPlayer(@NonNull MediaPlayerInterface player,
+ @NonNull VolumeProvider volumeProvider) {
+ mProvider.setPlayer_impl(player, volumeProvider);
+ }
+
+ @Override
+ public void close() {
+ mProvider.close_impl();
+ }
+
+ /**
* @return player
*/
- public @Nullable MediaPlayerBase getPlayer() {
+ public @Nullable
+ MediaPlayerInterface getPlayer() {
return mProvider.getPlayer_impl();
}
/**
- * Returns the {@link SessionToken} for creating {@link MediaController2}.
+ * Returns the {@link SessionToken2} for creating {@link MediaController2}.
*/
public @NonNull
- SessionToken getToken() {
+ SessionToken2 getToken() {
return mProvider.getToken_impl();
}
@@ -556,51 +1018,234 @@
return mProvider.getConnectedControllers_impl();
}
- @Override
+ /**
+ * Sets which type of audio focus will be requested during the playback, or configures playback
+ * to not request audio focus. Valid values for focus requests are
+ * {@link AudioManager#AUDIOFOCUS_GAIN}, {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT},
+ * {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK}, and
+ * {@link AudioManager#AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE}. Or use
+ * {@link AudioManager#AUDIOFOCUS_NONE} to express that audio focus should not be
+ * requested when playback starts. You can for instance use this when playing a silent animation
+ * through this class, and you don't want to affect other audio applications playing in the
+ * background.
+ *
+ * @param focusGain the type of audio focus gain that will be requested, or
+ * {@link AudioManager#AUDIOFOCUS_NONE} to disable the use audio focus during
+ * playback.
+ */
+ public void setAudioFocusRequest(int focusGain) {
+ mProvider.setAudioFocusRequest_impl(focusGain);
+ }
+
+ /**
+ * Sets ordered list of {@link CommandButton} for controllers to build UI with it.
+ * <p>
+ * It's up to controller's decision how to represent the layout in its own UI.
+ * Here's the same way
+ * (layout[i] means a CommandButton at index i in the given list)
+ * For 5 icons row
+ * layout[3] layout[1] layout[0] layout[2] layout[4]
+ * For 3 icons row
+ * layout[1] layout[0] layout[2]
+ * For 5 icons row with overflow icon (can show +5 extra buttons with overflow button)
+ * expanded row: layout[5] layout[6] layout[7] layout[8] layout[9]
+ * main row: layout[3] layout[1] layout[0] layout[2] layout[4]
+ * <p>
+ * This API can be called in the {@link SessionCallback#onConnect(ControllerInfo)}.
+ *
+ * @param controller controller to specify layout.
+ * @param layout oredered list of layout.
+ */
+ public void setCustomLayout(@NonNull ControllerInfo controller,
+ @NonNull List<CommandButton> layout) {
+ mProvider.setCustomLayout_impl(controller, layout);
+ }
+
+ /**
+ * Set the new allowed command group for the controller
+ *
+ * @param controller controller to change allowed commands
+ * @param commands new allowed commands
+ */
+ public void setAllowedCommands(@NonNull ControllerInfo controller,
+ @NonNull CommandGroup commands) {
+ mProvider.setAllowedCommands_impl(controller, commands);
+ }
+
+ /**
+ * Notify changes in metadata of previously set playlist. Controller will get the whole set of
+ * playlist again.
+ */
+ public void notifyMetadataChanged() {
+ mProvider.notifyMetadataChanged_impl();
+ }
+
+ /**
+ * Send custom command to all connected controllers.
+ *
+ * @param command a command
+ * @param args optional argument
+ */
+ public void sendCustomCommand(@NonNull Command command, @Nullable Bundle args) {
+ mProvider.sendCustomCommand_impl(command, args);
+ }
+
+ /**
+ * Send custom command to a specific controller.
+ *
+ * @param command a command
+ * @param args optional argument
+ * @param receiver result receiver for the session
+ */
+ public void sendCustomCommand(@NonNull ControllerInfo controller, @NonNull Command command,
+ @Nullable Bundle args, @Nullable ResultReceiver receiver) {
+ // Equivalent to the MediaController.sendCustomCommand(Action action, ResultReceiver r);
+ mProvider.sendCustomCommand_impl(controller, command, args, receiver);
+ }
+
+ /**
+ * Play playback
+ */
public void play() {
mProvider.play_impl();
}
- @Override
+ /**
+ * Pause playback
+ */
public void pause() {
mProvider.pause_impl();
}
- @Override
+ /**
+ * Stop playback
+ */
public void stop() {
mProvider.stop_impl();
}
- @Override
+ /**
+ * Rewind playback
+ */
public void skipToPrevious() {
mProvider.skipToPrevious_impl();
}
- @Override
+ /**
+ * Rewind playback
+ */
public void skipToNext() {
mProvider.skipToNext_impl();
}
- @Override
- public @NonNull PlaybackState getPlaybackState() {
- return mProvider.getPlaybackState_impl();
+ /**
+ * Request that the player prepare its playback. In other words, other sessions can continue
+ * to play during the preparation of this session. This method can be used to speed up the
+ * start of the playback. Once the preparation is done, the session will change its playback
+ * state to {@link PlaybackState#STATE_PAUSED}. Afterwards, {@link #play} can be called to
+ * start playback.
+ */
+ public void prepare() {
+ mProvider.prepare_impl();
}
/**
- * Add a {@link PlaybackListener} to listen changes in the
- * underlying {@link MediaPlayerBase} which is previously set by
- * {@link #setPlayer(MediaPlayerBase)}.
+ * Start fast forwarding. If playback is already fast forwarding this may increase the rate.
+ */
+ public void fastForward() {
+ mProvider.fastForward_impl();
+ }
+
+ /**
+ * Start rewinding. If playback is already rewinding this may increase the rate.
+ */
+ public void rewind() {
+ mProvider.rewind_impl();
+ }
+
+ /**
+ * Move to a new location in the media stream.
+ *
+ * @param pos Position to move to, in milliseconds.
+ */
+ public void seekTo(long pos) {
+ mProvider.seekTo_impl(pos);
+ }
+
+ /**
+ * Sets the index of current DataSourceDesc in the play list to be played.
+ *
+ * @param index the index of DataSourceDesc in the play list you want to play
+ * @throws IllegalArgumentException if the play list is null
+ * @throws NullPointerException if index is outside play list range
+ */
+ public void setCurrentPlaylistItem(int index) {
+ mProvider.setCurrentPlaylistItem_impl(index);
+ }
+
+ /**
+ * @hide
+ */
+ public void skipForward() {
+ // To match with KEYCODE_MEDIA_SKIP_FORWARD
+ }
+
+ /**
+ * @hide
+ */
+ public void skipBackward() {
+ // To match with KEYCODE_MEDIA_SKIP_BACKWARD
+ }
+
+ /**
+ * Sets a list of {@link MediaItem2} as the current play list.
+ *
+ * @param playlist A list of {@link MediaItem2} objects to set as a play list.
+ * @throws IllegalArgumentException if given {@param playlist} is null.
+ */
+ public void setPlaylist(@NonNull List<MediaItem2> playlist) {
+ mProvider.setPlaylist_impl(playlist);
+ }
+
+ /**
+ * Returns the playlist which is lastly set.
+ */
+ public List<MediaItem2> getPlaylist() {
+ return mProvider.getPlaylist_impl();
+ }
+
+ /**
+ * Sets the {@link PlaylistParams} for the current play list. Repeat/shuffle mode and metadata
+ * for the list can be set by calling this method.
+ *
+ * @param params A {@link PlaylistParams} object to set.
+ * @throws IllegalArgumentException if given {@param param} is null.
+ */
+ public void setPlaylistParams(PlaylistParams params) {
+ mProvider.setPlaylistParams_impl(params);
+ }
+
+ /**
+ * Returns the {@link PlaylistParams} for the current play list.
+ * Returns {@code null} if not set.
+ */
+ public PlaylistParams getPlaylistParams() {
+ return mProvider.getPlaylistParams_impl();
+ }
+
+ /*
+ * Add a {@link PlaybackListener} to listen changes in the underlying
+ * {@link MediaPlayerInterface}. Listener will be called immediately to tell the current value.
* <p>
* Added listeners will be also called when the underlying player is changed.
*
+ * @param executor the call listener
* @param listener the listener that will be run
- * @param handler the Handler that will receive the listener
* @throws IllegalArgumentException when either the listener or handler is {@code null}.
*/
- // TODO(jaewan): Can handler be null? Follow API guideline after it's finalized.
- @Override
- public void addPlaybackListener(@NonNull PlaybackListener listener, @NonNull Handler handler) {
- mProvider.addPlaybackListener_impl(listener, handler);
+ public void addPlaybackListener(@NonNull @CallbackExecutor Executor executor,
+ @NonNull PlaybackListener listener) {
+ mProvider.addPlaybackListener_impl(executor, listener);
}
/**
@@ -609,8 +1254,16 @@
* @param listener the listener to be removed
* @throws IllegalArgumentException if the listener is {@code null}.
*/
- @Override
- public void removePlaybackListener(PlaybackListener listener) {
+ public void removePlaybackListener(@NonNull PlaybackListener listener) {
mProvider.removePlaybackListener_impl(listener);
}
+
+ /**
+ * Return the {@link PlaybackState2} from the player.
+ *
+ * @return playback state
+ */
+ public PlaybackState2 getPlaybackState() {
+ return mProvider.getPlaybackState_impl();
+ }
}
diff --git a/media/java/android/media/MediaSessionService2.java b/media/java/android/media/MediaSessionService2.java
index 1a12d68..6b2de06 100644
--- a/media/java/android/media/MediaSessionService2.java
+++ b/media/java/android/media/MediaSessionService2.java
@@ -23,7 +23,6 @@
import android.app.Service;
import android.content.Intent;
import android.media.MediaSession2.ControllerInfo;
-import android.media.session.PlaybackState;
import android.media.update.ApiLoader;
import android.media.update.MediaSessionService2Provider;
import android.os.IBinder;
@@ -89,7 +88,7 @@
* rejected, the controller will unbind. If it's accepted, the controller will be available to use
* and keep binding.
* <p>
- * When playback is started for this session service, {@link #onUpdateNotification(PlaybackState)}
+ * When playback is started for this session service, {@link #onUpdateNotification(PlaybackState2)}
* is called and service would become a foreground service. It's needed to keep playback after the
* controller is destroyed. The session service becomes background service when the playback is
* stopped.
@@ -99,20 +98,8 @@
* Any app can bind to the session service with controller, but the controller can be used only if
* the session service accepted the connection request through
* {@link MediaSession2.SessionCallback#onConnect(ControllerInfo)}.
- *
* @hide
*/
-// TODO(jaewan): Unhide
-// TODO(jaewan): Can we clean up sessions in onDestroy() automatically instead?
-// What about currently running SessionCallback when the onDestroy() is called?
-// TODO(jaewan): Protect this with system|privilleged permission - Q.
-// TODO(jaewan): Add permission check for the service to know incoming connection request.
-// Follow-up questions: What about asking a XML for list of white/black packages for
-// allowing enumeration?
-// We can read the information even when the service is started,
-// so SessionManager.getXXXXService() can only return apps
-// TODO(jaewan): Will be the black/white listing persistent?
-// In other words, can we cache the rejection?
public abstract class MediaSessionService2 extends Service {
private final MediaSessionService2Provider mProvider;
@@ -179,7 +166,7 @@
* @return a {@link MediaNotification}. If it's {@code null}, notification wouldn't be shown.
*/
// TODO(jaewan): Also add metadata
- public MediaNotification onUpdateNotification(PlaybackState state) {
+ public MediaNotification onUpdateNotification(PlaybackState2 state) {
return mProvider.onUpdateNotification_impl(state);
}
@@ -213,7 +200,7 @@
}
/**
- * Returned by {@link #onUpdateNotification(PlaybackState)} for making session service
+ * Returned by {@link #onUpdateNotification(PlaybackState2)} for making session service
* foreground service to keep playback running in the background. It's highly recommended to
* show media style notification here.
*/
diff --git a/media/java/android/media/PlaybackState2.java b/media/java/android/media/PlaybackState2.java
new file mode 100644
index 0000000..da776eb
--- /dev/null
+++ b/media/java/android/media/PlaybackState2.java
@@ -0,0 +1,255 @@
+/*
+ * 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.media;
+
+import android.annotation.IntDef;
+import android.os.Bundle;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Playback state for a {@link MediaPlayerInterface}, to be shared between {@link MediaSession2} and
+ * {@link MediaController2}. This includes a playback state {@link #STATE_PLAYING},
+ * the current playback position and extra.
+ * @hide
+ */
+public final class PlaybackState2 {
+ private static final String TAG = "PlaybackState2";
+
+ // TODO(jaewan): Replace states from MediaPlayer2
+ /**
+ * @hide
+ */
+ @IntDef({STATE_NONE, STATE_STOPPED, STATE_PREPARED, STATE_PAUSED, STATE_PLAYING,
+ STATE_FINISH, STATE_BUFFERING, STATE_ERROR})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface State {}
+
+ /**
+ * This is the default playback state and indicates that no media has been
+ * added yet, or the performer has been reset and has no content to play.
+ */
+ public final static int STATE_NONE = 0;
+
+ /**
+ * State indicating this item is currently stopped.
+ */
+ public final static int STATE_STOPPED = 1;
+
+ /**
+ * State indicating this item is currently prepared
+ */
+ public final static int STATE_PREPARED = 2;
+
+ /**
+ * State indicating this item is currently paused.
+ */
+ public final static int STATE_PAUSED = 3;
+
+ /**
+ * State indicating this item is currently playing.
+ */
+ public final static int STATE_PLAYING = 4;
+
+ /**
+ * State indicating the playback reaches the end of the item.
+ */
+ public final static int STATE_FINISH = 5;
+
+ /**
+ * State indicating this item is currently buffering and will begin playing
+ * when enough data has buffered.
+ */
+ public final static int STATE_BUFFERING = 6;
+
+ /**
+ * State indicating this item is currently in an error state. The error
+ * message should also be set when entering this state.
+ */
+ public final static int STATE_ERROR = 7;
+
+ /**
+ * Use this value for the position to indicate the position is not known.
+ */
+ public final static long PLAYBACK_POSITION_UNKNOWN = -1;
+
+ /**
+ * Keys used for converting a PlaybackState2 to a bundle object and vice versa.
+ */
+ private static final String KEY_STATE = "android.media.playbackstate2.state";
+ private static final String KEY_POSITION = "android.media.playbackstate2.position";
+ private static final String KEY_BUFFERED_POSITION =
+ "android.media.playbackstate2.buffered_position";
+ private static final String KEY_SPEED = "android.media.playbackstate2.speed";
+ private static final String KEY_ERROR_MESSAGE = "android.media.playbackstate2.error_message";
+ private static final String KEY_UPDATE_TIME = "android.media.playbackstate2.update_time";
+ private static final String KEY_ACTIVE_ITEM_ID = "android.media.playbackstate2.active_item_id";
+
+ private final int mState;
+ private final long mPosition;
+ private final long mUpdateTime;
+ private final float mSpeed;
+ private final long mBufferedPosition;
+ private final long mActiveItemId;
+ private final CharSequence mErrorMessage;
+
+ // TODO(jaewan): Better error handling?
+ // E.g. media item at #2 has issue, but continue playing #3
+ // login error. fire intent xxx to login
+ public PlaybackState2(int state, long position, long updateTime, float speed,
+ long bufferedPosition, long activeItemId, CharSequence error) {
+ mState = state;
+ mPosition = position;
+ mSpeed = speed;
+ mUpdateTime = updateTime;
+ mBufferedPosition = bufferedPosition;
+ mActiveItemId = activeItemId;
+ mErrorMessage = error;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder bob = new StringBuilder("PlaybackState {");
+ bob.append("state=").append(mState);
+ bob.append(", position=").append(mPosition);
+ bob.append(", buffered position=").append(mBufferedPosition);
+ bob.append(", speed=").append(mSpeed);
+ bob.append(", updated=").append(mUpdateTime);
+ bob.append(", active item id=").append(mActiveItemId);
+ bob.append(", error=").append(mErrorMessage);
+ bob.append("}");
+ return bob.toString();
+ }
+
+ /**
+ * Get the current state of playback. One of the following:
+ * <ul>
+ * <li> {@link PlaybackState2#STATE_NONE}</li>
+ * <li> {@link PlaybackState2#STATE_STOPPED}</li>
+ * <li> {@link PlaybackState2#STATE_PLAYING}</li>
+ * <li> {@link PlaybackState2#STATE_PAUSED}</li>
+ * <li> {@link PlaybackState2#STATE_BUFFERING}</li>
+ * <li> {@link PlaybackState2#STATE_ERROR}</li>
+ * </ul>
+ */
+ @State
+ public int getState() {
+ return mState;
+ }
+
+ /**
+ * Get the current playback position in ms.
+ */
+ public long getPosition() {
+ return mPosition;
+ }
+
+ /**
+ * Get the current buffered position in ms. This is the farthest playback
+ * point that can be reached from the current position using only buffered
+ * content.
+ */
+ public long getBufferedPosition() {
+ return mBufferedPosition;
+ }
+
+ /**
+ * Get the current playback speed as a multiple of normal playback. This
+ * should be negative when rewinding. A value of 1 means normal playback and
+ * 0 means paused.
+ *
+ * @return The current speed of playback.
+ */
+ public float getPlaybackSpeed() {
+ return mSpeed;
+ }
+
+ /**
+ * Get a user readable error message. This should be set when the state is
+ * {@link PlaybackState2#STATE_ERROR}.
+ */
+ public CharSequence getErrorMessage() {
+ return mErrorMessage;
+ }
+
+ /**
+ * Get the elapsed real time at which position was last updated. If the
+ * position has never been set this will return 0;
+ *
+ * @return The last time the position was updated.
+ */
+ public long getLastPositionUpdateTime() {
+ return mUpdateTime;
+ }
+
+ /**
+ * Get the id of the currently active item in the playlist.
+ *
+ * @return The id of the currently active item in the queue
+ */
+ public long getCurrentPlaylistItemIndex() {
+ return mActiveItemId;
+ }
+
+ /**
+ * Returns this object as a bundle to share between processes.
+ */
+ public Bundle toBundle() {
+ Bundle bundle = new Bundle();
+ bundle.putInt(KEY_STATE, mState);
+ bundle.putLong(KEY_POSITION, mPosition);
+ bundle.putLong(KEY_UPDATE_TIME, mUpdateTime);
+ bundle.putFloat(KEY_SPEED, mSpeed);
+ bundle.putLong(KEY_BUFFERED_POSITION, mBufferedPosition);
+ bundle.putLong(KEY_ACTIVE_ITEM_ID, mActiveItemId);
+ bundle.putCharSequence(KEY_ERROR_MESSAGE, mErrorMessage);
+ return bundle;
+ }
+
+ /**
+ * Creates an instance from a bundle which is previously created by {@link #toBundle()}.
+ *
+ * @param bundle A bundle created by {@link #toBundle()}.
+ * @return A new {@link PlaybackState2} instance. Returns {@code null} if the given
+ * {@param bundle} is null, or if the {@param bundle} has no playback state parameters.
+ */
+ public static PlaybackState2 fromBundle(Bundle bundle) {
+ if (bundle == null) {
+ return null;
+ }
+
+ if (!bundle.containsKey(KEY_STATE)
+ || !bundle.containsKey(KEY_POSITION)
+ || !bundle.containsKey(KEY_UPDATE_TIME)
+ || !bundle.containsKey(KEY_SPEED)
+ || !bundle.containsKey(KEY_BUFFERED_POSITION)
+ || !bundle.containsKey(KEY_ACTIVE_ITEM_ID)
+ || !bundle.containsKey(KEY_ERROR_MESSAGE)) {
+ return null;
+ }
+
+ return new PlaybackState2(
+ bundle.getInt(KEY_STATE),
+ bundle.getLong(KEY_POSITION),
+ bundle.getLong(KEY_UPDATE_TIME),
+ bundle.getFloat(KEY_SPEED),
+ bundle.getLong(KEY_BUFFERED_POSITION),
+ bundle.getLong(KEY_ACTIVE_ITEM_ID),
+ bundle.getCharSequence(KEY_ERROR_MESSAGE));
+ }
+}
\ No newline at end of file
diff --git a/media/java/android/media/Rating2.java b/media/java/android/media/Rating2.java
new file mode 100644
index 0000000..93aea6f
--- /dev/null
+++ b/media/java/android/media/Rating2.java
@@ -0,0 +1,303 @@
+/*
+ * 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.media;
+
+import android.annotation.IntDef;
+import android.os.Bundle;
+import android.util.Log;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * A class to encapsulate rating information used as content metadata.
+ * A rating is defined by its rating style (see {@link #RATING_HEART},
+ * {@link #RATING_THUMB_UP_DOWN}, {@link #RATING_3_STARS}, {@link #RATING_4_STARS},
+ * {@link #RATING_5_STARS} or {@link #RATING_PERCENTAGE}) and the actual rating value (which may
+ * be defined as "unrated"), both of which are defined when the rating instance is constructed
+ * through one of the factory methods.
+ * @hide
+ */
+public final class Rating2 {
+ private static final String TAG = "Rating2";
+
+ private static final String KEY_STYLE = "android.media.rating2.style";
+ private static final String KEY_VALUE = "android.media.rating2.value";
+
+ /**
+ * @hide
+ */
+ @IntDef({RATING_NONE, RATING_HEART, RATING_THUMB_UP_DOWN, RATING_3_STARS, RATING_4_STARS,
+ RATING_5_STARS, RATING_PERCENTAGE})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface Style {}
+
+ /**
+ * @hide
+ */
+ @IntDef({RATING_3_STARS, RATING_4_STARS, RATING_5_STARS})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface StarStyle {}
+
+ /**
+ * Indicates a rating style is not supported. A Rating2 will never have this
+ * type, but can be used by other classes to indicate they do not support
+ * Rating2.
+ */
+ public final static int RATING_NONE = 0;
+
+ /**
+ * A rating style with a single degree of rating, "heart" vs "no heart". Can be used to
+ * indicate the content referred to is a favorite (or not).
+ */
+ public final static int RATING_HEART = 1;
+
+ /**
+ * A rating style for "thumb up" vs "thumb down".
+ */
+ public final static int RATING_THUMB_UP_DOWN = 2;
+
+ /**
+ * A rating style with 0 to 3 stars.
+ */
+ public final static int RATING_3_STARS = 3;
+
+ /**
+ * A rating style with 0 to 4 stars.
+ */
+ public final static int RATING_4_STARS = 4;
+
+ /**
+ * A rating style with 0 to 5 stars.
+ */
+ public final static int RATING_5_STARS = 5;
+
+ /**
+ * A rating style expressed as a percentage.
+ */
+ public final static int RATING_PERCENTAGE = 6;
+
+ private final static float RATING_NOT_RATED = -1.0f;
+
+ private final int mRatingStyle;
+
+ private final float mRatingValue;
+
+ private Rating2(@Style int ratingStyle, float rating) {
+ mRatingStyle = ratingStyle;
+ mRatingValue = rating;
+ }
+
+ @Override
+ public String toString() {
+ return "Rating2:style=" + mRatingStyle + " rating="
+ + (mRatingValue < 0.0f ? "unrated" : String.valueOf(mRatingValue));
+ }
+
+ /**
+ * Create an instance from bundle object, previoulsy created by {@link #toBundle()}
+ *
+ * @param bundle bundle
+ * @return new Rating2 instance
+ */
+ public static Rating2 fromBundle(Bundle bundle) {
+ return new Rating2(bundle.getInt(KEY_STYLE), bundle.getFloat(KEY_VALUE));
+ }
+
+ /**
+ * Return bundle for this object to share across the process.
+ * @return bundle of this object
+ */
+ public Bundle toBundle() {
+ Bundle bundle = new Bundle();
+ bundle.putInt(KEY_STYLE, mRatingStyle);
+ bundle.putFloat(KEY_VALUE, mRatingValue);
+ return bundle;
+ }
+
+ /**
+ * Return a Rating2 instance with no rating.
+ * Create and return a new Rating2 instance with no rating known for the given
+ * rating style.
+ * @param ratingStyle one of {@link #RATING_HEART}, {@link #RATING_THUMB_UP_DOWN},
+ * {@link #RATING_3_STARS}, {@link #RATING_4_STARS}, {@link #RATING_5_STARS},
+ * or {@link #RATING_PERCENTAGE}.
+ * @return null if an invalid rating style is passed, a new Rating2 instance otherwise.
+ */
+ public static Rating2 newUnratedRating(@Style int ratingStyle) {
+ switch(ratingStyle) {
+ case RATING_HEART:
+ case RATING_THUMB_UP_DOWN:
+ case RATING_3_STARS:
+ case RATING_4_STARS:
+ case RATING_5_STARS:
+ case RATING_PERCENTAGE:
+ return new Rating2(ratingStyle, RATING_NOT_RATED);
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Return a Rating2 instance with a heart-based rating.
+ * Create and return a new Rating2 instance with a rating style of {@link #RATING_HEART},
+ * and a heart-based rating.
+ * @param hasHeart true for a "heart selected" rating, false for "heart unselected".
+ * @return a new Rating2 instance.
+ */
+ public static Rating2 newHeartRating(boolean hasHeart) {
+ return new Rating2(RATING_HEART, hasHeart ? 1.0f : 0.0f);
+ }
+
+ /**
+ * Return a Rating2 instance with a thumb-based rating.
+ * Create and return a new Rating2 instance with a {@link #RATING_THUMB_UP_DOWN}
+ * rating style, and a "thumb up" or "thumb down" rating.
+ * @param thumbIsUp true for a "thumb up" rating, false for "thumb down".
+ * @return a new Rating2 instance.
+ */
+ public static Rating2 newThumbRating(boolean thumbIsUp) {
+ return new Rating2(RATING_THUMB_UP_DOWN, thumbIsUp ? 1.0f : 0.0f);
+ }
+
+ /**
+ * Return a Rating2 instance with a star-based rating.
+ * Create and return a new Rating2 instance with one of the star-base rating styles
+ * and the given integer or fractional number of stars. Non integer values can for instance
+ * be used to represent an average rating value, which might not be an integer number of stars.
+ * @param starRatingStyle one of {@link #RATING_3_STARS}, {@link #RATING_4_STARS},
+ * {@link #RATING_5_STARS}.
+ * @param starRating a number ranging from 0.0f to 3.0f, 4.0f or 5.0f according to
+ * the rating style.
+ * @return null if the rating style is invalid, or the rating is out of range,
+ * a new Rating2 instance otherwise.
+ */
+ public static Rating2 newStarRating(@StarStyle int starRatingStyle, float starRating) {
+ float maxRating = -1.0f;
+ switch(starRatingStyle) {
+ case RATING_3_STARS:
+ maxRating = 3.0f;
+ break;
+ case RATING_4_STARS:
+ maxRating = 4.0f;
+ break;
+ case RATING_5_STARS:
+ maxRating = 5.0f;
+ break;
+ default:
+ Log.e(TAG, "Invalid rating style (" + starRatingStyle + ") for a star rating");
+ return null;
+ }
+ if ((starRating < 0.0f) || (starRating > maxRating)) {
+ Log.e(TAG, "Trying to set out of range star-based rating");
+ return null;
+ }
+ return new Rating2(starRatingStyle, starRating);
+ }
+
+ /**
+ * Return a Rating2 instance with a percentage-based rating.
+ * Create and return a new Rating2 instance with a {@link #RATING_PERCENTAGE}
+ * rating style, and a rating of the given percentage.
+ * @param percent the value of the rating
+ * @return null if the rating is out of range, a new Rating2 instance otherwise.
+ */
+ public static Rating2 newPercentageRating(float percent) {
+ if ((percent < 0.0f) || (percent > 100.0f)) {
+ Log.e(TAG, "Invalid percentage-based rating value");
+ return null;
+ } else {
+ return new Rating2(RATING_PERCENTAGE, percent);
+ }
+ }
+
+ /**
+ * Return whether there is a rating value available.
+ * @return true if the instance was not created with {@link #newUnratedRating(int)}.
+ */
+ public boolean isRated() {
+ return mRatingValue >= 0.0f;
+ }
+
+ /**
+ * Return the rating style.
+ * @return one of {@link #RATING_HEART}, {@link #RATING_THUMB_UP_DOWN},
+ * {@link #RATING_3_STARS}, {@link #RATING_4_STARS}, {@link #RATING_5_STARS},
+ * or {@link #RATING_PERCENTAGE}.
+ */
+ @Style
+ public int getRatingStyle() {
+ return mRatingStyle;
+ }
+
+ /**
+ * Return whether the rating is "heart selected".
+ * @return true if the rating is "heart selected", false if the rating is "heart unselected",
+ * if the rating style is not {@link #RATING_HEART} or if it is unrated.
+ */
+ public boolean hasHeart() {
+ if (mRatingStyle != RATING_HEART) {
+ return false;
+ } else {
+ return (mRatingValue == 1.0f);
+ }
+ }
+
+ /**
+ * Return whether the rating is "thumb up".
+ * @return true if the rating is "thumb up", false if the rating is "thumb down",
+ * if the rating style is not {@link #RATING_THUMB_UP_DOWN} or if it is unrated.
+ */
+ public boolean isThumbUp() {
+ if (mRatingStyle != RATING_THUMB_UP_DOWN) {
+ return false;
+ } else {
+ return (mRatingValue == 1.0f);
+ }
+ }
+
+ /**
+ * Return the star-based rating value.
+ * @return a rating value greater or equal to 0.0f, or a negative value if the rating style is
+ * not star-based, or if it is unrated.
+ */
+ public float getStarRating() {
+ switch (mRatingStyle) {
+ case RATING_3_STARS:
+ case RATING_4_STARS:
+ case RATING_5_STARS:
+ if (isRated()) {
+ return mRatingValue;
+ }
+ default:
+ return -1.0f;
+ }
+ }
+
+ /**
+ * Return the percentage-based rating value.
+ * @return a rating value greater or equal to 0.0f, or a negative value if the rating style is
+ * not percentage-based, or if it is unrated.
+ */
+ public float getPercentRating() {
+ if ((mRatingStyle != RATING_PERCENTAGE) || !isRated()) {
+ return -1.0f;
+ } else {
+ return mRatingValue;
+ }
+ }
+}
diff --git a/media/java/android/media/SessionPlayer2.java b/media/java/android/media/SessionPlayer2.java
new file mode 100644
index 0000000..60acf16
--- /dev/null
+++ b/media/java/android/media/SessionPlayer2.java
@@ -0,0 +1,152 @@
+/*
+ * 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.media;
+
+import android.annotation.SystemApi;
+import android.content.Context;
+import android.media.MediaSession2.PlaylistParams;
+import android.media.update.ApiLoader;
+import android.media.update.SessionPlayer2Provider;
+
+import java.util.List;
+import java.util.concurrent.Executor;
+
+/**
+ * Implementation of the {@link MediaPlayerInterface} which is backed by the {@link MediaPlayer2}
+ * @hide
+ */
+public class SessionPlayer2 implements MediaPlayerInterface {
+ private final SessionPlayer2Provider mProvider;
+
+ public SessionPlayer2(Context context) {
+ mProvider = ApiLoader.getProvider(context).createSessionPlayer2(context, this);
+ }
+
+ @Override
+ public void play() {
+ mProvider.play_impl();
+ }
+
+ @Override
+ public void prepare() {
+ mProvider.prepare_impl();
+ }
+
+ @Override
+ public void pause() {
+ mProvider.pause_impl();
+ }
+
+ @Override
+ public void stop() {
+ mProvider.stop_impl();
+ }
+
+ @Override
+ public void skipToPrevious() {
+ mProvider.skipToPrevious_impl();
+ }
+
+ @Override
+ public void skipToNext() {
+ mProvider.skipToNext_impl();
+ }
+
+ @Override
+ public void seekTo(long pos) {
+ mProvider.seekTo_impl(pos);
+ }
+
+ @Override
+ public void fastForward() {
+ mProvider.fastForward_impl();
+ }
+
+ @Override
+ public void rewind() {
+ mProvider.rewind_impl();
+ }
+
+ @Override
+ public PlaybackState2 getPlaybackState() {
+ return mProvider.getPlaybackState_impl();
+ }
+
+ @Override
+ public void setAudioAttributes(AudioAttributes attributes) {
+ mProvider.setAudioAttributes_impl(attributes);
+ }
+
+ @Override
+ public AudioAttributes getAudioAttributes() {
+ return mProvider.getAudioAttributes_impl();
+ }
+
+ @Override
+ public void setPlaylist(List<MediaItem2> playlist) {
+ mProvider.setPlaylist_impl(playlist);
+ }
+
+ @Override
+ public List<MediaItem2> getPlaylist() {
+ return mProvider.getPlaylist_impl();
+ }
+
+ @Override
+ public void setCurrentPlaylistItem(int index) {
+ mProvider.setCurrentPlaylistItem_impl(index);
+ }
+
+ @Override
+ public void setPlaylistParams(PlaylistParams params) {
+ mProvider.setPlaylistParams_impl(params);
+ }
+
+ @Override
+ public void addPlaylistItem(int index, MediaItem2 item) {
+ mProvider.addPlaylistItem_impl(index, item);
+ }
+
+ @Override
+ public void removePlaylistItem(MediaItem2 item) {
+ mProvider.removePlaylistItem_impl(item);
+ }
+
+ @Override
+ public PlaylistParams getPlaylistParams() {
+ return mProvider.getPlaylistParams_impl();
+ }
+
+ @Override
+ public void addPlaybackListener(Executor executor, PlaybackListener listener) {
+ mProvider.addPlaybackListener_impl(executor, listener);
+ }
+
+ @Override
+ public void removePlaybackListener(PlaybackListener listener) {
+ mProvider.removePlaybackListener_impl(listener);
+ }
+
+ public MediaPlayer2 getPlayer() {
+ return mProvider.getPlayer_impl();
+ }
+
+ @SystemApi
+ public SessionPlayer2Provider getProvider() {
+ return mProvider;
+ }
+}
diff --git a/media/java/android/media/SessionToken.java b/media/java/android/media/SessionToken.java
deleted file mode 100644
index 53fc24a..0000000
--- a/media/java/android/media/SessionToken.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * 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.media;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.media.session.MediaSessionManager;
-import android.os.Bundle;
-import android.os.IBinder;
-import android.text.TextUtils;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Represents an ongoing {@link MediaSession2} or a {@link MediaSessionService2}.
- * If it's representing a session service, it may not be ongoing.
- * <p>
- * This may be passed to apps by the session owner to allow them to create a
- * {@link MediaController2} to communicate with the session.
- * <p>
- * It can be also obtained by {@link MediaSessionManager}.
- * @hide
- */
-// TODO(jaewan): Unhide. SessionToken2?
-// TODO(jaewan): Move Token to updatable!
-// TODO(jaewan): Find better name for this (SessionToken or Session2Token)
-public final class SessionToken {
- @Retention(RetentionPolicy.SOURCE)
- @IntDef(value = {TYPE_SESSION, TYPE_SESSION_SERVICE, TYPE_LIBRARY_SERVICE})
- public @interface TokenType {
- }
-
- public static final int TYPE_SESSION = 0;
- public static final int TYPE_SESSION_SERVICE = 1;
- public static final int TYPE_LIBRARY_SERVICE = 2;
-
- private static final String KEY_TYPE = "android.media.token.type";
- private static final String KEY_PACKAGE_NAME = "android.media.token.package_name";
- private static final String KEY_SERVICE_NAME = "android.media.token.service_name";
- private static final String KEY_ID = "android.media.token.id";
- private static final String KEY_SESSION_BINDER = "android.media.token.session_binder";
-
- private final @TokenType int mType;
- private final String mPackageName;
- private final String mServiceName;
- private final String mId;
- private final IMediaSession2 mSessionBinder;
-
- /**
- * Constructor for the token.
- *
- * @hide
- * @param type type
- * @param packageName package name
- * @param id id
- * @param serviceName name of service. Can be {@code null} if it's not an service.
- * @param sessionBinder binder for this session. Can be {@code null} if it's service.
- * @hide
- */
- // TODO(jaewan): UID is also needed.
- // TODO(jaewan): Unhide
- public SessionToken(@TokenType int type, @NonNull String packageName, @NonNull String id,
- @Nullable String serviceName, @Nullable IMediaSession2 sessionBinder) {
- // TODO(jaewan): Add sanity check.
- mType = type;
- mPackageName = packageName;
- mId = id;
- mServiceName = serviceName;
- mSessionBinder = sessionBinder;
- }
-
- public int hashCode() {
- final int prime = 31;
- return mType
- + prime * (mPackageName.hashCode()
- + prime * (mId.hashCode()
- + prime * ((mServiceName != null ? mServiceName.hashCode() : 0)
- + prime * (mSessionBinder != null ? mSessionBinder.asBinder().hashCode() : 0))));
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- SessionToken other = (SessionToken) obj;
- if (!mPackageName.equals(other.getPackageName())
- || !mServiceName.equals(other.getServiceName())
- || !mId.equals(other.getId())
- || mType != other.getType()) {
- return false;
- }
- if (mSessionBinder == other.getSessionBinder()) {
- return true;
- } else if (mSessionBinder == null || other.getSessionBinder() == null) {
- return false;
- }
- return mSessionBinder.asBinder().equals(other.getSessionBinder().asBinder());
- }
-
- @Override
- public String toString() {
- return "SessionToken {pkg=" + mPackageName + " id=" + mId + " type=" + mType
- + " service=" + mServiceName + " binder=" + mSessionBinder + "}";
- }
-
- /**
- * @return package name
- */
- public String getPackageName() {
- return mPackageName;
- }
-
- /**
- * @return id
- */
- public String getId() {
- return mId;
- }
-
- /**
- * @return type of the token
- * @see #TYPE_SESSION
- * @see #TYPE_SESSION_SERVICE
- */
- public @TokenType int getType() {
- return mType;
- }
-
- /**
- * @return session binder.
- * @hide
- */
- public @Nullable IMediaSession2 getSessionBinder() {
- return mSessionBinder;
- }
-
- /**
- * @return service name if it's session service.
- * @hide
- */
- public @Nullable String getServiceName() {
- return mServiceName;
- }
-
- /**
- * Create a token from the bundle, exported by {@link #toBundle()}.
- *
- * @param bundle
- * @return
- */
- public static SessionToken fromBundle(@NonNull Bundle bundle) {
- if (bundle == null) {
- return null;
- }
- final @TokenType int type = bundle.getInt(KEY_TYPE, -1);
- final String packageName = bundle.getString(KEY_PACKAGE_NAME);
- final String serviceName = bundle.getString(KEY_SERVICE_NAME);
- final String id = bundle.getString(KEY_ID);
- final IBinder sessionBinder = bundle.getBinder(KEY_SESSION_BINDER);
-
- // Sanity check.
- switch (type) {
- case TYPE_SESSION:
- if (!(sessionBinder instanceof IMediaSession2)) {
- throw new IllegalArgumentException("Session needs sessionBinder");
- }
- break;
- case TYPE_SESSION_SERVICE:
- if (TextUtils.isEmpty(serviceName)) {
- throw new IllegalArgumentException("Session service needs service name");
- }
- if (sessionBinder != null && !(sessionBinder instanceof IMediaSession2)) {
- throw new IllegalArgumentException("Invalid session binder");
- }
- break;
- default:
- throw new IllegalArgumentException("Invalid type");
- }
- if (TextUtils.isEmpty(packageName) || id == null) {
- throw new IllegalArgumentException("Package name nor ID cannot be null.");
- }
- // TODO(jaewan): Revisit here when we add connection callback to the session for individual
- // controller's permission check. With it, sessionBinder should be available
- // if and only if for session, not session service.
- return new SessionToken(type, packageName, id, serviceName,
- sessionBinder != null ? IMediaSession2.Stub.asInterface(sessionBinder) : null);
- }
-
- /**
- * Create a {@link Bundle} from this token to share it across processes.
- *
- * @return Bundle
- * @hide
- */
- public Bundle toBundle() {
- Bundle bundle = new Bundle();
- bundle.putString(KEY_PACKAGE_NAME, mPackageName);
- bundle.putString(KEY_SERVICE_NAME, mServiceName);
- bundle.putString(KEY_ID, mId);
- bundle.putInt(KEY_TYPE, mType);
- bundle.putBinder(KEY_SESSION_BINDER,
- mSessionBinder != null ? mSessionBinder.asBinder() : null);
- return bundle;
- }
-}
diff --git a/media/java/android/media/SessionToken2.java b/media/java/android/media/SessionToken2.java
new file mode 100644
index 0000000..2c2090c
--- /dev/null
+++ b/media/java/android/media/SessionToken2.java
@@ -0,0 +1,160 @@
+/*
+ * 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.media;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.SystemApi;
+import android.content.Context;
+import android.media.session.MediaSessionManager;
+import android.media.update.ApiLoader;
+import android.media.update.SessionToken2Provider;
+import android.os.Bundle;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Represents an ongoing {@link MediaSession2} or a {@link MediaSessionService2}.
+ * If it's representing a session service, it may not be ongoing.
+ * <p>
+ * This may be passed to apps by the session owner to allow them to create a
+ * {@link MediaController2} to communicate with the session.
+ * <p>
+ * It can be also obtained by {@link MediaSessionManager}.
+ * @hide
+ */
+public final class SessionToken2 {
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(value = {TYPE_SESSION, TYPE_SESSION_SERVICE, TYPE_LIBRARY_SERVICE})
+ public @interface TokenType {
+ }
+
+ public static final int TYPE_SESSION = 0;
+ public static final int TYPE_SESSION_SERVICE = 1;
+ public static final int TYPE_LIBRARY_SERVICE = 2;
+
+ private final SessionToken2Provider mProvider;
+
+ // From the return value of android.os.Process.getUidForName(String) when error
+ private static final int UID_UNKNOWN = -1;
+
+ /**
+ * Constructor for the token. You can only create token for session service or library service
+ * to use by {@link MediaController2} or {@link MediaBrowser2}.
+ *
+ * @param context context
+ * @param packageName package name
+ * @param serviceName name of service. Can be {@code null} if it's not an service.
+ */
+ public SessionToken2(@NonNull Context context, @NonNull String packageName,
+ @NonNull String serviceName) {
+ this(context, packageName, serviceName, UID_UNKNOWN);
+ }
+
+ /**
+ * Constructor for the token. You can only create token for session service or library service
+ * to use by {@link MediaController2} or {@link MediaBrowser2}.
+ *
+ * @param context context
+ * @param packageName package name
+ * @param serviceName name of service. Can be {@code null} if it's not an service.
+ * @param uid uid of the app.
+ * @hide
+ */
+ public SessionToken2(@NonNull Context context, @NonNull String packageName,
+ @NonNull String serviceName, int uid) {
+ mProvider = ApiLoader.getProvider(context).createSessionToken2(
+ context, this, packageName, serviceName, uid);
+ }
+
+ /**
+ * Constructor for the token.
+ * @hide
+ */
+ @SystemApi
+ public SessionToken2(@NonNull SessionToken2Provider provider) {
+ mProvider = provider;
+ }
+
+ @Override
+ public int hashCode() {
+ return mProvider.hashCode_impl();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return mProvider.equals_impl(obj);
+ }
+
+ @Override
+ public String toString() {
+ return mProvider.toString_impl();
+ }
+
+ @SystemApi
+ public SessionToken2Provider getProvider() {
+ return mProvider;
+ }
+
+ /**
+ * @return uid of the session
+ */
+ public int getUid() {
+ return mProvider.getUid_impl();
+ }
+
+ /**
+ * @return package name
+ */
+ public String getPackageName() {
+ return mProvider.getPackageName_impl();
+ }
+
+ /**
+ * @return id
+ */
+ public String getId() {
+ return mProvider.getId_imp();
+ }
+
+ /**
+ * @return type of the token
+ * @see #TYPE_SESSION
+ * @see #TYPE_SESSION_SERVICE
+ */
+ public @TokenType int getType() {
+ return mProvider.getType_impl();
+ }
+
+ /**
+ * Create a token from the bundle, exported by {@link #toBundle()}.
+ * @param bundle
+ * @return
+ */
+ public static SessionToken2 fromBundle(@NonNull Context context, @NonNull Bundle bundle) {
+ return ApiLoader.getProvider(context).SessionToken2_fromBundle(context, bundle);
+ }
+
+ /**
+ * Create a {@link Bundle} from this token to share it across processes.
+ * @return Bundle
+ */
+ public Bundle toBundle() {
+ return mProvider.toBundle_impl();
+ }
+}
diff --git a/media/java/android/media/audiopolicy/AudioPolicy.java b/media/java/android/media/audiopolicy/AudioPolicy.java
index 7e88c27..4de731a 100644
--- a/media/java/android/media/audiopolicy/AudioPolicy.java
+++ b/media/java/android/media/audiopolicy/AudioPolicy.java
@@ -89,6 +89,8 @@
private AudioPolicyFocusListener mFocusListener;
+ private final AudioPolicyVolumeCallback mVolCb;
+
private Context mContext;
private AudioPolicyConfig mConfig;
@@ -99,12 +101,15 @@
public boolean hasFocusListener() { return mFocusListener != null; }
/** @hide */
public boolean isFocusPolicy() { return mIsFocusPolicy; }
+ /** @hide */
+ public boolean isVolumeController() { return mVolCb != null; }
/**
* The parameter is guaranteed non-null through the Builder
*/
private AudioPolicy(AudioPolicyConfig config, Context context, Looper looper,
- AudioPolicyFocusListener fl, AudioPolicyStatusListener sl, boolean isFocusPolicy) {
+ AudioPolicyFocusListener fl, AudioPolicyStatusListener sl, boolean isFocusPolicy,
+ AudioPolicyVolumeCallback vc) {
mConfig = config;
mStatus = POLICY_STATUS_UNREGISTERED;
mContext = context;
@@ -120,6 +125,7 @@
mFocusListener = fl;
mStatusListener = sl;
mIsFocusPolicy = isFocusPolicy;
+ mVolCb = vc;
}
/**
@@ -134,6 +140,7 @@
private AudioPolicyFocusListener mFocusListener;
private AudioPolicyStatusListener mStatusListener;
private boolean mIsFocusPolicy = false;
+ private AudioPolicyVolumeCallback mVolCb;
/**
* Constructs a new Builder with no audio mixes.
@@ -208,6 +215,22 @@
mStatusListener = l;
}
+ @SystemApi
+ /**
+ * Sets the callback to receive all volume key-related events.
+ * The callback will only be called if the device is configured to handle volume events
+ * in the PhoneWindowManager (see config_handleVolumeKeysInWindowManager)
+ * @param vc
+ * @return the same Builder instance.
+ */
+ public Builder setAudioPolicyVolumeCallback(@NonNull AudioPolicyVolumeCallback vc) {
+ if (vc == null) {
+ throw new IllegalArgumentException("Invalid null volume callback");
+ }
+ mVolCb = vc;
+ return this;
+ }
+
/**
* Combines all of the attributes that have been set on this {@code Builder} and returns a
* new {@link AudioPolicy} object.
@@ -229,7 +252,7 @@
+ "an AudioPolicyFocusListener");
}
return new AudioPolicy(new AudioPolicyConfig(mMixes), mContext, mLooper,
- mFocusListener, mStatusListener, mIsFocusPolicy);
+ mFocusListener, mStatusListener, mIsFocusPolicy, mVolCb);
}
}
@@ -455,6 +478,23 @@
public void onAudioFocusAbandon(AudioFocusInfo afi) {}
}
+ @SystemApi
+ /**
+ * Callback class to receive volume change-related events.
+ * See {@link #Builder.setAudioPolicyVolumeCallback(AudioPolicyCallback)} to configure the
+ * {@link AudioPolicy} to receive those events.
+ *
+ */
+ public static abstract class AudioPolicyVolumeCallback {
+ /** @hide */
+ public AudioPolicyVolumeCallback() {}
+ /**
+ * Called when volume key-related changes are triggered, on the key down event.
+ * @param adjustment the type of volume adjustment for the key.
+ */
+ public void onVolumeAdjustment(@AudioManager.VolumeAdjustment int adjustment) {}
+ }
+
private void onPolicyStatusChange() {
AudioPolicyStatusListener l;
synchronized (mLock) {
@@ -517,6 +557,13 @@
}
}
}
+
+ public void notifyVolumeAdjust(int adjustment) {
+ sendMsg(MSG_VOL_ADJUST, null /* ignored */, adjustment);
+ if (DEBUG) {
+ Log.v(TAG, "notifyVolumeAdjust: " + adjustment);
+ }
+ }
};
//==================================================
@@ -528,6 +575,7 @@
private final static int MSG_MIX_STATE_UPDATE = 3;
private final static int MSG_FOCUS_REQUEST = 4;
private final static int MSG_FOCUS_ABANDON = 5;
+ private final static int MSG_VOL_ADJUST = 6;
private class EventHandler extends Handler {
public EventHandler(AudioPolicy ap, Looper looper) {
@@ -571,6 +619,13 @@
Log.e(TAG, "Invalid null focus listener for focus abandon event");
}
break;
+ case MSG_VOL_ADJUST:
+ if (mVolCb != null) {
+ mVolCb.onVolumeAdjustment(msg.arg1);
+ } else { // should never be null, but don't crash
+ Log.e(TAG, "Invalid null volume event");
+ }
+ break;
default:
Log.e(TAG, "Unknown event " + msg.what);
}
diff --git a/media/java/android/media/audiopolicy/IAudioPolicyCallback.aidl b/media/java/android/media/audiopolicy/IAudioPolicyCallback.aidl
index 86abbb4..107e7cd 100644
--- a/media/java/android/media/audiopolicy/IAudioPolicyCallback.aidl
+++ b/media/java/android/media/audiopolicy/IAudioPolicyCallback.aidl
@@ -31,4 +31,7 @@
// callback for mix activity status update
void notifyMixStateUpdate(in String regId, int state);
+
+ // callback for volume events
+ void notifyVolumeAdjust(int adjustment);
}
diff --git a/media/java/android/media/session/ISessionManager.aidl b/media/java/android/media/session/ISessionManager.aidl
index b8463dd..2d365d0 100644
--- a/media/java/android/media/session/ISessionManager.aidl
+++ b/media/java/android/media/session/ISessionManager.aidl
@@ -17,7 +17,7 @@
import android.content.ComponentName;
import android.media.IRemoteVolumeController;
-import android.media.IMediaSession2;
+import android.media.ISessionTokensListener;
import android.media.session.IActiveSessionsListener;
import android.media.session.ICallback;
import android.media.session.IOnMediaKeyListener;
@@ -52,6 +52,11 @@
void setOnMediaKeyListener(in IOnMediaKeyListener listener);
// MediaSession2
- Bundle createSessionToken(String callingPackage, String id, IMediaSession2 binder);
+ boolean onSessionCreated(in Bundle sessionToken);
+ void onSessionDestroyed(in Bundle sessionToken);
List<Bundle> getSessionTokens(boolean activeSessionOnly, boolean sessionServiceOnly);
+
+ void addSessionTokensListener(in ISessionTokensListener listener, int userId,
+ String packageName);
+ void removeSessionTokensListener(in ISessionTokensListener listener);
}
diff --git a/media/java/android/media/session/MediaSessionManager.java b/media/java/android/media/session/MediaSessionManager.java
index 6a9f04a..454113c 100644
--- a/media/java/android/media/session/MediaSessionManager.java
+++ b/media/java/android/media/session/MediaSessionManager.java
@@ -16,6 +16,7 @@
package android.media.session;
+import android.annotation.CallbackExecutor;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
@@ -24,12 +25,11 @@
import android.content.ComponentName;
import android.content.Context;
import android.media.AudioManager;
-import android.media.IMediaSession2;
import android.media.IRemoteVolumeController;
+import android.media.ISessionTokensListener;
import android.media.MediaSession2;
import android.media.MediaSessionService2;
-import android.media.SessionToken;
-import android.media.session.ISessionManager;
+import android.media.SessionToken2;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
@@ -45,6 +45,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.concurrent.Executor;
/**
* Provides support for interacting with {@link MediaSession media sessions}
@@ -72,6 +73,8 @@
private final ArrayMap<OnActiveSessionsChangedListener, SessionsChangedWrapper> mListeners
= new ArrayMap<OnActiveSessionsChangedListener, SessionsChangedWrapper>();
+ private final ArrayMap<OnSessionTokensChangedListener, SessionTokensChangedWrapper>
+ mSessionTokensListener = new ArrayMap<>();
private final Object mLock = new Object();
private final ISessionManager mService;
@@ -338,37 +341,54 @@
/**
* Called when a {@link MediaSession2} is created.
- *
* @hide
*/
// TODO(jaewan): System API
- public SessionToken createSessionToken(@NonNull String callingPackage, @NonNull String id,
- @NonNull IMediaSession2 binder) {
+ public boolean onSessionCreated(@NonNull SessionToken2 token) {
+ if (token == null) {
+ return false;
+ }
try {
- Bundle bundle = mService.createSessionToken(callingPackage, id, binder);
- return SessionToken.fromBundle(bundle);
+ return mService.onSessionCreated(token.toBundle());
} catch (RemoteException e) {
Log.wtf(TAG, "Cannot communicate with the service.", e);
}
- return null;
+ return false;
+ }
+
+ /** Called when a {@link MediaSession2} is destroyed.
+ * @hide
+ */
+ // TODO(jaewan): System API
+ public void onSessionDestroyed(@NonNull SessionToken2 token) {
+ if (token == null) {
+ return;
+ }
+ try {
+ mService.onSessionDestroyed(token.toBundle());
+ } catch (RemoteException e) {
+ Log.wtf(TAG, "Cannot communicate with the service.", e);
+ }
}
/**
- * Get {@link List} of {@link SessionToken} whose sessions are active now. This list represents
+ * Get {@link List} of {@link SessionToken2} whose sessions are active now. This list represents
* active sessions regardless of whether they're {@link MediaSession2} or
* {@link MediaSessionService2}.
+ * <p>
+ * This requires the android.Manifest.permission.MEDIA_CONTENT_CONTROL permission be held by the
+ * calling app. You may also retrieve this list if your app is an enabled notification listener
+ * using the {@link NotificationListenerService} APIs.
*
- * @return list of Tokens
+ * @return list of tokens
* @hide
*/
// TODO(jaewan): Unhide
- // TODO(jaewan): Protect this with permission.
- // TODO(jaewna): Add listener for change in lists.
- public List<SessionToken> getActiveSessionTokens() {
+ public List<SessionToken2> getActiveSessionTokens() {
try {
List<Bundle> bundles = mService.getSessionTokens(
/* activeSessionOnly */ true, /* sessionServiceOnly */ false);
- return toTokenList(bundles);
+ return toTokenList(mContext, bundles);
} catch (RemoteException e) {
Log.wtf(TAG, "Cannot communicate with the service.", e);
return Collections.emptyList();
@@ -376,19 +396,22 @@
}
/**
- * Get {@link List} of {@link SessionToken} for {@link MediaSessionService2} regardless of their
+ * Get {@link List} of {@link SessionToken2} for {@link MediaSessionService2} regardless of their
* activeness. This list represents media apps that support background playback.
+ * <p>
+ * This requires the android.Manifest.permission.MEDIA_CONTENT_CONTROL permission be held by the
+ * calling app. You may also retrieve this list if your app is an enabled notification listener
+ * using the {@link NotificationListenerService} APIs.
*
- * @return list of Tokens
+ * @return list of tokens
* @hide
*/
// TODO(jaewan): Unhide
- // TODO(jaewna): Add listener for change in lists.
- public List<SessionToken> getSessionServiceTokens() {
+ public List<SessionToken2> getSessionServiceTokens() {
try {
List<Bundle> bundles = mService.getSessionTokens(
/* activeSessionOnly */ false, /* sessionServiceOnly */ true);
- return toTokenList(bundles);
+ return toTokenList(mContext, bundles);
} catch (RemoteException e) {
Log.wtf(TAG, "Cannot communicate with the service.", e);
return Collections.emptyList();
@@ -396,33 +419,115 @@
}
/**
- * Get all {@link SessionToken}s. This is the combined list of {@link #getActiveSessionTokens()}
+ * Get all {@link SessionToken2}s. This is the combined list of {@link #getActiveSessionTokens()}
* and {@link #getSessionServiceTokens}.
+ * <p>
+ * This requires the android.Manifest.permission.MEDIA_CONTENT_CONTROL permission be held by the
+ * calling app. You may also retrieve this list if your app is an enabled notification listener
+ * using the {@link NotificationListenerService} APIs.
*
- * @return list of Tokens
+ * @return list of tokens
* @see #getActiveSessionTokens
* @see #getSessionServiceTokens
* @hide
*/
// TODO(jaewan): Unhide
- // TODO(jaewan): Protect this with permission.
- // TODO(jaewna): Add listener for change in lists.
- public List<SessionToken> getAllSessionTokens() {
+ public List<SessionToken2> getAllSessionTokens() {
try {
List<Bundle> bundles = mService.getSessionTokens(
/* activeSessionOnly */ false, /* sessionServiceOnly */ false);
- return toTokenList(bundles);
+ return toTokenList(mContext, bundles);
} catch (RemoteException e) {
Log.wtf(TAG, "Cannot communicate with the service.", e);
return Collections.emptyList();
}
}
- private static List<SessionToken> toTokenList(List<Bundle> bundles) {
- List<SessionToken> tokens = new ArrayList<>();
+ /**
+ * Add a listener to be notified when the {@link #getAllSessionTokens()} changes.
+ * <p>
+ * This requires the android.Manifest.permission.MEDIA_CONTENT_CONTROL permission be held by the
+ * calling app. You may also retrieve this list if your app is an enabled notification listener
+ * using the {@link NotificationListenerService} APIs.
+ *
+ * @param executor executor to run this command
+ * @param listener The listener to add.
+ * @hide
+ */
+ // TODO(jaewan): Unhide
+ public void addOnSessionTokensChangedListener(@NonNull @CallbackExecutor Executor executor,
+ @NonNull OnSessionTokensChangedListener listener) {
+ addOnSessionTokensChangedListener(UserHandle.myUserId(), executor, listener);
+ }
+
+ /**
+ * Add a listener to be notified when the {@link #getAllSessionTokens()} changes.
+ * <p>
+ * This requires the android.Manifest.permission.MEDIA_CONTENT_CONTROL permission be held by the
+ * calling app. You may also retrieve this list if your app is an enabled notification listener
+ * using the {@link NotificationListenerService} APIs.
+ *
+ * @param userId The userId to listen for changes on.
+ * @param executor executor to run this command
+ * @param listener The listener to add.
+ * @hide
+ */
+ public void addOnSessionTokensChangedListener(int userId,
+ @NonNull @CallbackExecutor Executor executor,
+ @NonNull OnSessionTokensChangedListener listener) {
+ if (executor == null) {
+ throw new IllegalArgumentException("executor may not be null");
+ }
+ if (listener == null) {
+ throw new IllegalArgumentException("listener may not be null");
+ }
+ synchronized (mLock) {
+ if (mSessionTokensListener.get(listener) != null) {
+ Log.w(TAG, "Attempted to add session listener twice, ignoring.");
+ return;
+ }
+ SessionTokensChangedWrapper wrapper = new SessionTokensChangedWrapper(
+ mContext, executor, listener);
+ try {
+ mService.addSessionTokensListener(wrapper.mStub, userId, mContext.getPackageName());
+ mSessionTokensListener.put(listener, wrapper);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error in addSessionTokensListener.", e);
+ }
+ }
+ }
+
+ /**
+ * Stop receiving session token updates on the specified listener.
+ *
+ * @param listener The listener to remove.
+ * @hide
+ */
+ // TODO(jaewan): Unhide
+ public void removeOnSessionTokensChangedListener(
+ @NonNull OnSessionTokensChangedListener listener) {
+ if (listener == null) {
+ throw new IllegalArgumentException("listener may not be null");
+ }
+ synchronized (mLock) {
+ SessionTokensChangedWrapper wrapper = mSessionTokensListener.remove(listener);
+ if (wrapper != null) {
+ try {
+ mService.removeSessionTokensListener(wrapper.mStub);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error in removeSessionTokensListener.", e);
+ } finally {
+ wrapper.release();
+ }
+ }
+ }
+ }
+
+ private static List<SessionToken2> toTokenList(Context context, List<Bundle> bundles) {
+ List<SessionToken2> tokens = new ArrayList<>();
if (bundles != null) {
for (int i = 0; i < bundles.size(); i++) {
- SessionToken token = SessionToken.fromBundle(bundles.get(i));
+ SessionToken2 token = SessionToken2.fromBundle(context, bundles.get(i));
if (token != null) {
tokens.add(token);
}
@@ -553,6 +658,16 @@
}
/**
+ * Listens for changes to the {@link #getAllSessionTokens()}. This can be added
+ * using {@link #addOnActiveSessionsChangedListener}.
+ * @hide
+ */
+ // TODO(jaewan): Unhide
+ public interface OnSessionTokensChangedListener {
+ void onSessionTokensChanged(@NonNull List<SessionToken2> tokens);
+ }
+
+ /**
* Listens the volume key long-presses.
* @hide
*/
@@ -678,6 +793,35 @@
}
}
+ private static final class SessionTokensChangedWrapper {
+ private Context mContext;
+ private Executor mExecutor;
+ private OnSessionTokensChangedListener mListener;
+
+ public SessionTokensChangedWrapper(Context context, Executor executor,
+ OnSessionTokensChangedListener listener) {
+ mContext = context;
+ mExecutor = executor;
+ mListener = listener;
+ }
+
+ private final ISessionTokensListener.Stub mStub = new ISessionTokensListener.Stub() {
+ @Override
+ public void onSessionTokensChanged(final List<Bundle> bundles) {
+ mExecutor.execute(() -> {
+ List<SessionToken2> tokens = toTokenList(mContext, bundles);
+ mListener.onSessionTokensChanged(tokens);
+ });
+ }
+ };
+
+ private void release() {
+ mListener = null;
+ mContext = null;
+ mExecutor = null;
+ }
+ }
+
private static final class OnVolumeKeyLongPressListenerImpl
extends IOnVolumeKeyLongPressListener.Stub {
private OnVolumeKeyLongPressListener mListener;
diff --git a/media/java/android/media/update/MediaBrowser2Provider.java b/media/java/android/media/update/MediaBrowser2Provider.java
index 355dbc9..67680c7 100644
--- a/media/java/android/media/update/MediaBrowser2Provider.java
+++ b/media/java/android/media/update/MediaBrowser2Provider.java
@@ -16,6 +16,7 @@
package android.media.update;
+import android.annotation.SystemApi;
import android.os.Bundle;
/**
@@ -23,4 +24,11 @@
*/
public interface MediaBrowser2Provider extends MediaController2Provider {
void getBrowserRoot_impl(Bundle rootHints);
+
+ void subscribe_impl(String parentId, Bundle options);
+ void unsubscribe_impl(String parentId, Bundle options);
+
+ void getItem_impl(String mediaId);
+ void getChildren_impl(String parentId, int page, int pageSize, Bundle options);
+ void search_impl(String query, int page, int pageSize, Bundle extras);
}
diff --git a/media/java/android/media/update/MediaControlView2Provider.java b/media/java/android/media/update/MediaControlView2Provider.java
index 83763b4..95fe363 100644
--- a/media/java/android/media/update/MediaControlView2Provider.java
+++ b/media/java/android/media/update/MediaControlView2Provider.java
@@ -36,17 +36,10 @@
// TODO @SystemApi
public interface MediaControlView2Provider extends ViewProvider {
void setController_impl(MediaController controller);
- void show_impl();
- void show_impl(int timeout);
boolean isShowing_impl();
- void hide_impl();
- void showCCButton_impl();
- boolean isPlaying_impl();
- int getCurrentPosition_impl();
- int getBufferPercentage_impl();
- boolean canPause_impl();
- boolean canSeekBackward_impl();
- boolean canSeekForward_impl();
- void showSubtitle_impl();
- void hideSubtitle_impl();
+ void setButtonVisibility_impl(int button, int visibility);
+ void requestPlayButtonFocus_impl();
+ void onVisibilityAggregated_impl(boolean isVisible);
+ void setTimeout_impl(long timeout);
+ long getTimeout_impl();
}
diff --git a/media/java/android/media/update/MediaController2Provider.java b/media/java/android/media/update/MediaController2Provider.java
index b15d6db..05790c1 100644
--- a/media/java/android/media/update/MediaController2Provider.java
+++ b/media/java/android/media/update/MediaController2Provider.java
@@ -16,13 +16,53 @@
package android.media.update;
-import android.media.SessionToken;
+import android.annotation.SystemApi;
+import android.app.PendingIntent;
+import android.media.MediaController2.PlaybackInfo;
+import android.media.MediaItem2;
+import android.media.MediaSession2.Command;
+import android.media.MediaSession2.PlaylistParams;
+import android.media.PlaybackState2;
+import android.media.Rating2;
+import android.media.SessionToken2;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.ResultReceiver;
+
+import java.util.List;
/**
* @hide
*/
-public interface MediaController2Provider extends MediaPlayerBaseProvider {
- void release_impl();
- SessionToken getSessionToken_impl();
+public interface MediaController2Provider extends TransportControlProvider {
+ void initialize();
+
+ void close_impl();
+ SessionToken2 getSessionToken_impl();
boolean isConnected_impl();
+
+ PendingIntent getSessionActivity_impl();
+ int getRatingType_impl();
+
+ void setVolumeTo_impl(int value, int flags);
+ void adjustVolume_impl(int direction, int flags);
+ PlaybackInfo getPlaybackInfo_impl();
+
+ void prepareFromUri_impl(Uri uri, Bundle extras);
+ void prepareFromSearch_impl(String query, Bundle extras);
+ void prepareMediaId_impl(String mediaId, Bundle extras);
+ void playFromSearch_impl(String query, Bundle extras);
+ void playFromUri_impl(String uri, Bundle extras);
+ void playFromMediaId_impl(String mediaId, Bundle extras);
+
+ void setRating_impl(Rating2 rating);
+ void sendCustomCommand_impl(Command command, Bundle args, ResultReceiver cb);
+ List<MediaItem2> getPlaylist_impl();
+
+ void removePlaylistItem_impl(MediaItem2 index);
+ void addPlaylistItem_impl(int index, MediaItem2 item);
+
+ PlaylistParams getPlaylistParams_impl();
+ void setPlaylistParams_impl(PlaylistParams params);
+ PlaybackState2 getPlaybackState_impl();
}
diff --git a/media/java/android/media/update/MediaItem2Provider.java b/media/java/android/media/update/MediaItem2Provider.java
new file mode 100644
index 0000000..2970f0e
--- /dev/null
+++ b/media/java/android/media/update/MediaItem2Provider.java
@@ -0,0 +1,37 @@
+/*
+ * 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.media.update;
+
+import android.media.DataSourceDesc;
+import android.media.MediaMetadata2;
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+// TODO(jaewan): SystemApi
+public interface MediaItem2Provider {
+ Bundle toBundle_impl();
+ String toString_impl();
+ int getFlags_impl();
+ boolean isBrowsable_impl();
+ boolean isPlayable_impl();
+ void setMetadata_impl(MediaMetadata2 metadata);
+ MediaMetadata2 getMetadata_impl();
+ String getMediaId_impl();
+ DataSourceDesc getDataSourceDesc_impl();
+}
diff --git a/media/java/android/media/update/MediaLibraryService2Provider.java b/media/java/android/media/update/MediaLibraryService2Provider.java
index 7e3444f..a568839 100644
--- a/media/java/android/media/update/MediaLibraryService2Provider.java
+++ b/media/java/android/media/update/MediaLibraryService2Provider.java
@@ -16,9 +16,18 @@
package android.media.update;
+import android.annotation.SystemApi;
+import android.media.MediaSession2.ControllerInfo;
+import android.os.Bundle;
+
/**
* @hide
*/
public interface MediaLibraryService2Provider extends MediaSessionService2Provider {
// Nothing new for now
+
+ interface MediaLibrarySessionProvider extends MediaSession2Provider {
+ void notifyChildrenChanged_impl(ControllerInfo controller, String parentId, Bundle options);
+ void notifyChildrenChanged_impl(String parentId, Bundle options);
+ }
}
diff --git a/media/java/android/media/update/MediaSession2Provider.java b/media/java/android/media/update/MediaSession2Provider.java
index 36fd182..f9e29d9 100644
--- a/media/java/android/media/update/MediaSession2Provider.java
+++ b/media/java/android/media/update/MediaSession2Provider.java
@@ -16,24 +16,70 @@
package android.media.update;
-import android.media.MediaPlayerBase;
+import android.media.MediaItem2;
+import android.media.MediaPlayerInterface;
+import android.media.MediaPlayerInterface.PlaybackListener;
+import android.media.MediaSession2.Command;
+import android.media.MediaSession2.CommandButton;
+import android.media.MediaSession2.CommandGroup;
import android.media.MediaSession2.ControllerInfo;
-import android.media.SessionToken;
+import android.media.MediaSession2.PlaylistParams;
+import android.media.SessionToken2;
+import android.media.VolumeProvider;
+import android.os.Bundle;
+import android.os.ResultReceiver;
import java.util.List;
+import java.util.concurrent.Executor;
/**
* @hide
*/
-public interface MediaSession2Provider extends MediaPlayerBaseProvider {
- void setPlayer_impl(MediaPlayerBase player) throws IllegalArgumentException;
- MediaPlayerBase getPlayer_impl();
- SessionToken getToken_impl();
- List<ControllerInfo> getConnectedControllers_impl();
+// TODO: @SystemApi
+public interface MediaSession2Provider extends TransportControlProvider {
+ void initialize();
- /**
- * @hide
- */
+ void close_impl();
+ void setPlayer_impl(MediaPlayerInterface player);
+ void setPlayer_impl(MediaPlayerInterface player, VolumeProvider volumeProvider);
+ MediaPlayerInterface getPlayer_impl();
+ SessionToken2 getToken_impl();
+ List<ControllerInfo> getConnectedControllers_impl();
+ void setCustomLayout_impl(ControllerInfo controller, List<CommandButton> layout);
+ void setAudioFocusRequest_impl(int focusGain);
+
+ void setAllowedCommands_impl(ControllerInfo controller, CommandGroup commands);
+ void notifyMetadataChanged_impl();
+ void sendCustomCommand_impl(ControllerInfo controller, Command command, Bundle args,
+ ResultReceiver receiver);
+ void sendCustomCommand_impl(Command command, Bundle args);
+ void setPlaylist_impl(List<MediaItem2> playlist);
+ List<MediaItem2> getPlaylist_impl();
+ void setPlaylistParams_impl(PlaylistParams params);
+ PlaylistParams getPlaylistParams_impl();
+
+ void addPlaybackListener_impl(Executor executor, PlaybackListener listener);
+ void removePlaybackListener_impl(PlaybackListener listener);
+
+ interface CommandProvider {
+ int getCommandCode_impl();
+ String getCustomCommand_impl();
+ Bundle getExtra_impl();
+ Bundle toBundle_impl();
+
+ boolean equals_impl(Object ob);
+ int hashCode_impl();
+ }
+
+ interface CommandGroupProvider {
+ void addCommand_impl(Command command);
+ void addAllPredefinedCommands_impl();
+ void removeCommand_impl(Command command);
+ boolean hasCommand_impl(Command command);
+ boolean hasCommand_impl(int code);
+ Bundle toBundle_impl();
+ }
+
interface ControllerInfoProvider {
String getPackageName_impl();
int getUid_impl();
diff --git a/media/java/android/media/update/MediaSessionService2Provider.java b/media/java/android/media/update/MediaSessionService2Provider.java
index 1174915..9455da7 100644
--- a/media/java/android/media/update/MediaSessionService2Provider.java
+++ b/media/java/android/media/update/MediaSessionService2Provider.java
@@ -16,11 +16,11 @@
package android.media.update;
+import android.annotation.SystemApi;
import android.content.Intent;
import android.media.MediaSession2;
import android.media.MediaSessionService2.MediaNotification;
-import android.media.session.PlaybackState;
-import android.os.Handler;
+import android.media.PlaybackState2;
import android.os.IBinder;
/**
@@ -28,7 +28,7 @@
*/
public interface MediaSessionService2Provider {
MediaSession2 getSession_impl();
- MediaNotification onUpdateNotification_impl(PlaybackState state);
+ MediaNotification onUpdateNotification_impl(PlaybackState2 state);
// Service
void onCreate_impl();
diff --git a/media/java/android/media/update/SessionPlayer2Provider.java b/media/java/android/media/update/SessionPlayer2Provider.java
new file mode 100644
index 0000000..e068c21
--- /dev/null
+++ b/media/java/android/media/update/SessionPlayer2Provider.java
@@ -0,0 +1,55 @@
+/*
+ * 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.media.update;
+
+import android.media.AudioAttributes;
+import android.media.MediaItem2;
+import android.media.MediaPlayer2;
+import android.media.MediaPlayerInterface.PlaybackListener;
+import android.media.MediaSession2.PlaylistParams;
+import android.media.PlaybackState2;
+
+import java.util.List;
+import java.util.concurrent.Executor;
+
+/**
+ * @hide
+ */
+public interface SessionPlayer2Provider {
+ void play_impl();
+ void prepare_impl();
+ void pause_impl();
+ void stop_impl();
+ void skipToPrevious_impl();
+ void skipToNext_impl();
+ void seekTo_impl(long pos);
+ void fastForward_impl();
+ void rewind_impl();
+ PlaybackState2 getPlaybackState_impl();
+ void setAudioAttributes_impl(AudioAttributes attributes);
+ AudioAttributes getAudioAttributes_impl();
+ void addPlaylistItem_impl(int index, MediaItem2 item);
+ void removePlaylistItem_impl(MediaItem2 item);
+ void setPlaylist_impl(List<MediaItem2> playlist);
+ List<MediaItem2> getPlaylist_impl();
+ void setCurrentPlaylistItem_impl(int index);
+ void setPlaylistParams_impl(PlaylistParams params);
+ PlaylistParams getPlaylistParams_impl();
+ void addPlaybackListener_impl(Executor executor, PlaybackListener listener);
+ void removePlaybackListener_impl(PlaybackListener listener);
+ MediaPlayer2 getPlayer_impl();
+}
diff --git a/media/java/android/media/update/SessionToken2Provider.java b/media/java/android/media/update/SessionToken2Provider.java
new file mode 100644
index 0000000..95d6ce0
--- /dev/null
+++ b/media/java/android/media/update/SessionToken2Provider.java
@@ -0,0 +1,34 @@
+/*
+ * 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.media.update;
+
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+public interface SessionToken2Provider {
+ String getPackageName_impl();
+ String getId_imp();
+ int getType_impl();
+ int getUid_impl();
+ Bundle toBundle_impl();
+
+ int hashCode_impl();
+ boolean equals_impl(Object obj);
+ String toString_impl();
+}
diff --git a/media/java/android/media/update/StaticProvider.java b/media/java/android/media/update/StaticProvider.java
index fef2cbb..9648b27 100644
--- a/media/java/android/media/update/StaticProvider.java
+++ b/media/java/android/media/update/StaticProvider.java
@@ -17,17 +17,31 @@
package android.media.update;
import android.annotation.Nullable;
+import android.app.PendingIntent;
import android.content.Context;
-import android.media.IMediaSession2Callback;
+import android.media.DataSourceDesc;
import android.media.MediaBrowser2;
import android.media.MediaBrowser2.BrowserCallback;
import android.media.MediaController2;
import android.media.MediaController2.ControllerCallback;
+import android.media.MediaItem2;
import android.media.MediaLibraryService2;
-import android.media.MediaPlayerBase;
+import android.media.MediaLibraryService2.MediaLibrarySession;
+import android.media.MediaLibraryService2.MediaLibrarySessionCallback;
+import android.media.MediaMetadata2;
+import android.media.MediaPlayerInterface;
import android.media.MediaSession2;
+import android.media.MediaSession2.SessionCallback;
import android.media.MediaSessionService2;
-import android.media.SessionToken;
+import android.media.SessionPlayer2;
+import android.media.SessionToken2;
+import android.media.VolumeProvider;
+import android.media.update.MediaLibraryService2Provider.MediaLibrarySessionProvider;
+import android.media.update.MediaSession2Provider.CommandGroupProvider;
+import android.media.update.MediaSession2Provider.CommandProvider;
+import android.media.update.MediaSession2Provider.ControllerInfoProvider;
+import android.os.Bundle;
+import android.os.IInterface;
import android.util.AttributeSet;
import android.widget.MediaControlView2;
import android.widget.VideoView2;
@@ -39,10 +53,8 @@
*
* This interface provides access to constructors and static methods that are otherwise not directly
* accessible via an implementation object.
- *
* @hide
*/
-// TODO @SystemApi
public interface StaticProvider {
MediaControlView2Provider createMediaControlView2(
MediaControlView2 instance, ViewProvider superProvider);
@@ -50,19 +62,41 @@
VideoView2 instance, ViewProvider superProvider,
@Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes);
- MediaSession2Provider createMediaSession2(MediaSession2 mediaSession2, Context context,
- MediaPlayerBase player, String id, MediaSession2.SessionCallback callback);
- MediaSession2Provider.ControllerInfoProvider createMediaSession2ControllerInfoProvider(
- MediaSession2.ControllerInfo instance, Context context, int uid, int pid,
- String packageName, IMediaSession2Callback callback);
- MediaController2Provider createMediaController2(
- MediaController2 instance, Context context, SessionToken token,
- ControllerCallback callback, Executor executor);
- MediaBrowser2Provider createMediaBrowser2(
- MediaBrowser2 instance, Context context, SessionToken token,
- BrowserCallback callback, Executor executor);
- MediaSessionService2Provider createMediaSessionService2(
- MediaSessionService2 instance);
- MediaSessionService2Provider createMediaLibraryService2(
- MediaLibraryService2 instance);
+ MediaSession2Provider createMediaSession2(Context context, MediaSession2 instance,
+ MediaPlayerInterface player, String id, VolumeProvider volumeProvider, int ratingType,
+ PendingIntent sessionActivity, Executor executor, SessionCallback callback);
+ CommandProvider createMediaSession2Command(MediaSession2.Command instance,
+ int commandCode, String action, Bundle extra);
+ MediaSession2.Command fromBundle_MediaSession2Command(Context context, Bundle bundle);
+ CommandGroupProvider createMediaSession2CommandGroup(Context context,
+ MediaSession2.CommandGroup instance, MediaSession2.CommandGroup others);
+ MediaSession2.CommandGroup fromBundle_MediaSession2CommandGroup(Context context, Bundle bundle);
+ ControllerInfoProvider createMediaSession2ControllerInfoProvider(Context context,
+ MediaSession2.ControllerInfo instance, int uid, int pid,
+ String packageName, IInterface callback);
+
+
+ MediaController2Provider createMediaController2(Context context, MediaController2 instance,
+ SessionToken2 token, Executor executor, ControllerCallback callback);
+
+ MediaBrowser2Provider createMediaBrowser2(Context context, MediaBrowser2 instance,
+ SessionToken2 token, Executor executor, BrowserCallback callback);
+
+ MediaSessionService2Provider createMediaSessionService2(MediaSessionService2 instance);
+ MediaSessionService2Provider createMediaLibraryService2(MediaLibraryService2 instance);
+
+ MediaLibrarySessionProvider createMediaLibraryService2MediaLibrarySession(Context context,
+ MediaLibrarySession instance, MediaPlayerInterface player, String id,
+ VolumeProvider volumeProvider, int ratingType, PendingIntent sessionActivity,
+ Executor executor, MediaLibrarySessionCallback callback);
+
+ SessionToken2Provider createSessionToken2(Context context, SessionToken2 instance,
+ String packageName, String serviceName, int uid);
+ SessionToken2 SessionToken2_fromBundle(Context context, Bundle bundle);
+
+ SessionPlayer2Provider createSessionPlayer2(Context context, SessionPlayer2 instance);
+
+ MediaItem2Provider createMediaItem2Provider(Context context, MediaItem2 mediaItem2,
+ String mediaId, DataSourceDesc dsd, MediaMetadata2 metadata, int flags);
+ MediaItem2 fromBundle_MediaItem2(Context context, Bundle bundle);
}
diff --git a/media/java/android/media/update/MediaPlayerBaseProvider.java b/media/java/android/media/update/TransportControlProvider.java
similarity index 68%
rename from media/java/android/media/update/MediaPlayerBaseProvider.java
rename to media/java/android/media/update/TransportControlProvider.java
index 5b13e74..44f82b29 100644
--- a/media/java/android/media/update/MediaPlayerBaseProvider.java
+++ b/media/java/android/media/update/TransportControlProvider.java
@@ -16,21 +16,23 @@
package android.media.update;
-import android.media.MediaPlayerBase;
-import android.media.session.PlaybackState;
-import android.os.Handler;
+import android.media.PlaybackState2;
/**
* @hide
*/
-public interface MediaPlayerBaseProvider {
+public interface TransportControlProvider {
void play_impl();
void pause_impl();
void stop_impl();
void skipToPrevious_impl();
void skipToNext_impl();
- PlaybackState getPlaybackState_impl();
- void addPlaybackListener_impl(MediaPlayerBase.PlaybackListener listener, Handler handler);
- void removePlaybackListener_impl(MediaPlayerBase.PlaybackListener listener);
+ void prepare_impl();
+ void fastForward_impl();
+ void rewind_impl();
+ void seekTo_impl(long pos);
+ void setCurrentPlaylistItem_impl(int index);
+
+ PlaybackState2 getPlaybackState_impl();
}
diff --git a/media/java/android/media/update/VideoView2Provider.java b/media/java/android/media/update/VideoView2Provider.java
index b7a24e5..10f03d2 100644
--- a/media/java/android/media/update/VideoView2Provider.java
+++ b/media/java/android/media/update/VideoView2Provider.java
@@ -17,11 +17,17 @@
package android.media.update;
import android.media.AudioAttributes;
+import android.media.MediaPlayerInterface;
+import android.media.session.MediaController;
+import android.media.session.PlaybackState;
+import android.media.session.MediaSession;
import android.net.Uri;
import android.widget.MediaControlView2;
import android.widget.VideoView2;
+import java.util.List;
import java.util.Map;
+import java.util.concurrent.Executor;
/**
* Interface for connecting the public API to an updatable implementation.
@@ -39,30 +45,29 @@
// TODO @SystemApi
public interface VideoView2Provider extends ViewProvider {
void setMediaControlView2_impl(MediaControlView2 mediaControlView);
+ MediaController getMediaController_impl();
MediaControlView2 getMediaControlView2_impl();
- void start_impl();
- void pause_impl();
- int getDuration_impl();
- int getCurrentPosition_impl();
- void seekTo_impl(int msec);
- boolean isPlaying_impl();
- int getBufferPercentage_impl();
- int getAudioSessionId_impl();
- void showSubtitle_impl();
- void hideSubtitle_impl();
+ void showSubtitle_impl(boolean show);
+ // TODO: remove setSpeed_impl once MediaController2 is ready.
void setSpeed_impl(float speed);
- float getSpeed_impl();
void setAudioFocusRequest_impl(int focusGain);
void setAudioAttributes_impl(AudioAttributes attributes);
+ void setRouteAttributes_impl(List<String> routeCategories, MediaPlayerInterface player);
+ // TODO: remove setRouteAttributes_impl with MediaSession.Callback once MediaSession2 is ready.
+ void setRouteAttributes_impl(List<String> routeCategories, MediaSession.Callback sessionPlayer);
void setVideoPath_impl(String path);
- void setVideoURI_impl(Uri uri);
- void setVideoURI_impl(Uri uri, Map<String, String> headers);
+ void setVideoUri_impl(Uri uri);
+ void setVideoUri_impl(Uri uri, Map<String, String> headers);
void setViewType_impl(int viewType);
int getViewType_impl();
- void stopPlayback_impl();
- void setOnPreparedListener_impl(VideoView2.OnPreparedListener l);
- void setOnCompletionListener_impl(VideoView2.OnCompletionListener l);
- void setOnErrorListener_impl(VideoView2.OnErrorListener l);
- void setOnInfoListener_impl(VideoView2.OnInfoListener l);
- void setOnViewTypeChangedListener_impl(VideoView2.OnViewTypeChangedListener l);
+ void setCustomActions_impl(List<PlaybackState.CustomAction> actionList,
+ Executor executor, VideoView2.OnCustomActionListener listener);
+ void setOnPreparedListener_impl(Executor executor, VideoView2.OnPreparedListener l);
+ void setOnCompletionListener_impl(Executor executor, VideoView2.OnCompletionListener l);
+ void setOnErrorListener_impl(Executor executor, VideoView2.OnErrorListener l);
+ void setOnInfoListener_impl(Executor executor, VideoView2.OnInfoListener l);
+ void setOnViewTypeChangedListener_impl(
+ Executor executor, VideoView2.OnViewTypeChangedListener l);
+ void setFullScreenRequestListener_impl(
+ Executor executor, VideoView2.OnFullScreenRequestListener l);
}
diff --git a/media/java/android/media/update/ViewProvider.java b/media/java/android/media/update/ViewProvider.java
index 78c5b36..0dd8f38 100644
--- a/media/java/android/media/update/ViewProvider.java
+++ b/media/java/android/media/update/ViewProvider.java
@@ -17,8 +17,6 @@
package android.media.update;
import android.annotation.SystemApi;
-import android.graphics.Canvas;
-import android.view.KeyEvent;
import android.view.MotionEvent;
/**
@@ -42,8 +40,6 @@
CharSequence getAccessibilityClassName_impl();
boolean onTouchEvent_impl(MotionEvent ev);
boolean onTrackballEvent_impl(MotionEvent ev);
- boolean onKeyDown_impl(int keyCode, KeyEvent event);
void onFinishInflate_impl();
- boolean dispatchKeyEvent_impl(KeyEvent event);
void setEnabled_impl(boolean enabled);
}
diff --git a/media/jni/Android.bp b/media/jni/Android.bp
index 597336b..051c802 100644
--- a/media/jni/Android.bp
+++ b/media/jni/Android.bp
@@ -12,7 +12,6 @@
"android_media_MediaDrm.cpp",
"android_media_MediaExtractor.cpp",
"android_media_MediaHTTPConnection.cpp",
- "android_media_MediaMetricsJNI.cpp",
"android_media_MediaMetadataRetriever.cpp",
"android_media_MediaMuxer.cpp",
"android_media_MediaPlayer.cpp",
@@ -84,6 +83,94 @@
],
}
+cc_library_shared {
+ name: "libmedia2_jni",
+
+ srcs: [
+ "android_media_Media2HTTPConnection.cpp",
+ "android_media_Media2HTTPService.cpp",
+ "android_media_MediaCrypto.cpp",
+ "android_media_Media2DataSource.cpp",
+ "android_media_MediaDrm.cpp",
+ "android_media_MediaPlayer2.cpp",
+ "android_media_SyncParams.cpp",
+ ],
+
+ shared_libs: [
+ "android.hardware.cas@1.0", // for CasManager. VNDK???
+ "android.hardware.cas.native@1.0", // CasManager. VNDK???
+ "libandroid", // NDK
+ "libandroid_runtime", // ???
+ "libaudioclient", // for use of AudioTrack, AudioSystem. to be removed
+ "liblog", // NDK
+ "libdrmframework", // for FileSource, MediaHTTP
+ "libgui", // for VideoFrameScheduler
+ "libhidlbase", // VNDK???
+ "libmediandk", // NDK
+ "libpowermanager", // for JWakeLock. to be removed
+
+ "libutils", // Have to use shared lib to make libandroid_runtime behave correctly.
+ // Otherwise, AndroidRuntime::getJNIEnv() will return NULL.
+ ],
+
+ header_libs: ["libhardware_headers"],
+
+ static_libs: [
+ "libbacktrace",
+ "libbase",
+ "libbinder",
+ "libc_malloc_debug_backtrace",
+ "libcrypto",
+ "libcutils",
+ "libdexfile",
+ "liblzma",
+ "libmedia",
+ "libmedia_helper",
+ "libmedia_player2",
+ "libmedia_player2_util",
+ "libmediadrm",
+ "libmediaextractor",
+ "libmediametrics",
+ "libmediautils",
+ "libnativehelper",
+ "libnetd_client",
+ "libstagefright_esds",
+ "libstagefright_foundation",
+ "libstagefright_httplive",
+ "libstagefright_id3",
+ "libstagefright_mpeg2support",
+ "libstagefright_nuplayer2",
+ "libstagefright_player2",
+ "libstagefright_rtsp",
+ "libstagefright_timedtext",
+ "libunwindstack",
+ "libutilscallstack",
+ "libvndksupport",
+ "libz",
+ "libziparchive",
+ ],
+
+ group_static_libs: true,
+
+ include_dirs: [
+ "frameworks/base/core/jni",
+ "frameworks/native/include/media/openmax",
+ "system/media/camera/include",
+ ],
+
+ export_include_dirs: ["."],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-error=deprecated-declarations",
+ "-Wunused",
+ "-Wunreachable-code",
+ ],
+
+ ldflags: ["-Wl,--exclude-libs=ALL"],
+}
+
subdirs = [
"audioeffect",
"soundpool",
diff --git a/media/jni/android_media_Media2DataSource.cpp b/media/jni/android_media_Media2DataSource.cpp
new file mode 100644
index 0000000..bc3f6bd
--- /dev/null
+++ b/media/jni/android_media_Media2DataSource.cpp
@@ -0,0 +1,159 @@
+/*
+ * Copyright 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.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "JMedia2DataSource-JNI"
+#include <utils/Log.h>
+
+#include "android_media_Media2DataSource.h"
+
+#include "android_runtime/AndroidRuntime.h"
+#include "android_runtime/Log.h"
+#include "jni.h"
+#include <nativehelper/JNIHelp.h>
+
+#include <drm/drm_framework_common.h>
+#include <media/stagefright/foundation/ADebug.h>
+#include <nativehelper/ScopedLocalRef.h>
+
+namespace android {
+
+static const size_t kBufferSize = 64 * 1024;
+
+JMedia2DataSource::JMedia2DataSource(JNIEnv* env, jobject source)
+ : mJavaObjStatus(OK),
+ mSizeIsCached(false),
+ mCachedSize(0) {
+ mMedia2DataSourceObj = env->NewGlobalRef(source);
+ CHECK(mMedia2DataSourceObj != NULL);
+
+ ScopedLocalRef<jclass> media2DataSourceClass(env, env->GetObjectClass(mMedia2DataSourceObj));
+ CHECK(media2DataSourceClass.get() != NULL);
+
+ mReadAtMethod = env->GetMethodID(media2DataSourceClass.get(), "readAt", "(J[BII)I");
+ CHECK(mReadAtMethod != NULL);
+ mGetSizeMethod = env->GetMethodID(media2DataSourceClass.get(), "getSize", "()J");
+ CHECK(mGetSizeMethod != NULL);
+ mCloseMethod = env->GetMethodID(media2DataSourceClass.get(), "close", "()V");
+ CHECK(mCloseMethod != NULL);
+
+ ScopedLocalRef<jbyteArray> tmp(env, env->NewByteArray(kBufferSize));
+ mByteArrayObj = (jbyteArray)env->NewGlobalRef(tmp.get());
+ CHECK(mByteArrayObj != NULL);
+}
+
+JMedia2DataSource::~JMedia2DataSource() {
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+ env->DeleteGlobalRef(mMedia2DataSourceObj);
+ env->DeleteGlobalRef(mByteArrayObj);
+}
+
+status_t JMedia2DataSource::initCheck() const {
+ return OK;
+}
+
+ssize_t JMedia2DataSource::readAt(off64_t offset, void *data, size_t size) {
+ Mutex::Autolock lock(mLock);
+
+ if (mJavaObjStatus != OK) {
+ return -1;
+ }
+ if (size > kBufferSize) {
+ size = kBufferSize;
+ }
+
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+ jint numread = env->CallIntMethod(mMedia2DataSourceObj, mReadAtMethod,
+ (jlong)offset, mByteArrayObj, (jint)0, (jint)size);
+ if (env->ExceptionCheck()) {
+ ALOGW("An exception occurred in readAt()");
+ LOGW_EX(env);
+ env->ExceptionClear();
+ mJavaObjStatus = UNKNOWN_ERROR;
+ return -1;
+ }
+ if (numread < 0) {
+ if (numread != -1) {
+ ALOGW("An error occurred in readAt()");
+ mJavaObjStatus = UNKNOWN_ERROR;
+ return -1;
+ } else {
+ // numread == -1 indicates EOF
+ return 0;
+ }
+ }
+ if ((size_t)numread > size) {
+ ALOGE("readAt read too many bytes.");
+ mJavaObjStatus = UNKNOWN_ERROR;
+ return -1;
+ }
+
+ ALOGV("readAt %lld / %zu => %d.", (long long)offset, size, numread);
+ env->GetByteArrayRegion(mByteArrayObj, 0, numread, (jbyte*)data);
+ return numread;
+}
+
+status_t JMedia2DataSource::getSize(off64_t* size) {
+ Mutex::Autolock lock(mLock);
+
+ if (mJavaObjStatus != OK) {
+ return UNKNOWN_ERROR;
+ }
+ if (mSizeIsCached) {
+ *size = mCachedSize;
+ return OK;
+ }
+
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+ *size = env->CallLongMethod(mMedia2DataSourceObj, mGetSizeMethod);
+ if (env->ExceptionCheck()) {
+ ALOGW("An exception occurred in getSize()");
+ LOGW_EX(env);
+ env->ExceptionClear();
+ // After returning an error, size shouldn't be used by callers.
+ *size = UNKNOWN_ERROR;
+ mJavaObjStatus = UNKNOWN_ERROR;
+ return UNKNOWN_ERROR;
+ }
+
+ // The minimum size should be -1, which indicates unknown size.
+ if (*size < 0) {
+ *size = -1;
+ }
+
+ mCachedSize = *size;
+ mSizeIsCached = true;
+ return OK;
+}
+
+void JMedia2DataSource::close() {
+ Mutex::Autolock lock(mLock);
+
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+ env->CallVoidMethod(mMedia2DataSourceObj, mCloseMethod);
+ // The closed state is effectively the same as an error state.
+ mJavaObjStatus = UNKNOWN_ERROR;
+}
+
+String8 JMedia2DataSource::toString() {
+ return String8::format("JMedia2DataSource(pid %d, uid %d)", getpid(), getuid());
+}
+
+String8 JMedia2DataSource::getMIMEType() const {
+ return String8("application/octet-stream");
+}
+
+} // namespace android
diff --git a/media/jni/android_media_Media2DataSource.h b/media/jni/android_media_Media2DataSource.h
new file mode 100644
index 0000000..dc085f3
--- /dev/null
+++ b/media/jni/android_media_Media2DataSource.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright 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 _ANDROID_MEDIA_MEDIA2DATASOURCE_H_
+#define _ANDROID_MEDIA_MEDIA2DATASOURCE_H_
+
+#include "jni.h"
+
+#include <media/DataSource.h>
+#include <media/stagefright/foundation/ABase.h>
+#include <utils/Errors.h>
+#include <utils/Mutex.h>
+
+namespace android {
+
+// The native counterpart to a Java android.media.Media2DataSource. It inherits from
+// DataSource.
+//
+// If the java DataSource returns an error or throws an exception it
+// will be considered to be in a broken state, and the only further call this
+// will make is to close().
+class JMedia2DataSource : public DataSource {
+public:
+ JMedia2DataSource(JNIEnv *env, jobject source);
+ virtual ~JMedia2DataSource();
+
+ virtual status_t initCheck() const override;
+ virtual ssize_t readAt(off64_t offset, void *data, size_t size) override;
+ virtual status_t getSize(off64_t *size) override;
+
+ virtual String8 toString() override;
+ virtual String8 getMIMEType() const override;
+ virtual void close() override;
+private:
+ // Protect all member variables with mLock because this object will be
+ // accessed on different threads.
+ Mutex mLock;
+
+ // The status of the java DataSource. Set to OK unless an error occurred or
+ // close() was called.
+ status_t mJavaObjStatus;
+ // Only call the java getSize() once so the app can't change the size on us.
+ bool mSizeIsCached;
+ off64_t mCachedSize;
+
+ jobject mMedia2DataSourceObj;
+ jmethodID mReadAtMethod;
+ jmethodID mGetSizeMethod;
+ jmethodID mCloseMethod;
+ jbyteArray mByteArrayObj;
+
+ DISALLOW_EVIL_CONSTRUCTORS(JMedia2DataSource);
+};
+
+} // namespace android
+
+#endif // _ANDROID_MEDIA_MEDIA2DATASOURCE_H_
diff --git a/media/jni/android_media_Media2HTTPConnection.cpp b/media/jni/android_media_Media2HTTPConnection.cpp
new file mode 100644
index 0000000..60176e3
--- /dev/null
+++ b/media/jni/android_media_Media2HTTPConnection.cpp
@@ -0,0 +1,182 @@
+/*
+ * Copyright 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.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "Media2HTTPConnection-JNI"
+#include <utils/Log.h>
+
+#include <media/stagefright/foundation/ADebug.h>
+#include <nativehelper/ScopedLocalRef.h>
+
+#include "android_media_Media2HTTPConnection.h"
+#include "android_util_Binder.h"
+
+#include "android_runtime/AndroidRuntime.h"
+#include "android_runtime/Log.h"
+#include "jni.h"
+#include <nativehelper/JNIHelp.h>
+
+namespace android {
+
+static const size_t kBufferSize = 32768;
+
+JMedia2HTTPConnection::JMedia2HTTPConnection(JNIEnv *env, jobject thiz) {
+ mMedia2HTTPConnectionObj = env->NewGlobalRef(thiz);
+ CHECK(mMedia2HTTPConnectionObj != NULL);
+
+ ScopedLocalRef<jclass> media2HTTPConnectionClass(
+ env, env->GetObjectClass(mMedia2HTTPConnectionObj));
+ CHECK(media2HTTPConnectionClass.get() != NULL);
+
+ mConnectMethod = env->GetMethodID(
+ media2HTTPConnectionClass.get(),
+ "connect",
+ "(Ljava/lang/String;Ljava/lang/String;)Z");
+ CHECK(mConnectMethod != NULL);
+
+ mDisconnectMethod = env->GetMethodID(
+ media2HTTPConnectionClass.get(),
+ "disconnect",
+ "()V");
+ CHECK(mDisconnectMethod != NULL);
+
+ mReadAtMethod = env->GetMethodID(
+ media2HTTPConnectionClass.get(),
+ "readAt",
+ "(J[BI)I");
+ CHECK(mReadAtMethod != NULL);
+
+ mGetSizeMethod = env->GetMethodID(
+ media2HTTPConnectionClass.get(),
+ "getSize",
+ "()J");
+ CHECK(mGetSizeMethod != NULL);
+
+ mGetMIMETypeMethod = env->GetMethodID(
+ media2HTTPConnectionClass.get(),
+ "getMIMEType",
+ "()Ljava/lang/String;");
+ CHECK(mGetMIMETypeMethod != NULL);
+
+ mGetUriMethod = env->GetMethodID(
+ media2HTTPConnectionClass.get(),
+ "getUri",
+ "()Ljava/lang/String;");
+ CHECK(mGetUriMethod != NULL);
+
+ ScopedLocalRef<jbyteArray> tmp(
+ env, env->NewByteArray(kBufferSize));
+ mByteArrayObj = (jbyteArray)env->NewGlobalRef(tmp.get());
+ CHECK(mByteArrayObj != NULL);
+}
+
+JMedia2HTTPConnection::~JMedia2HTTPConnection() {
+ JNIEnv *env = AndroidRuntime::getJNIEnv();
+ env->DeleteGlobalRef(mMedia2HTTPConnectionObj);
+ env->DeleteGlobalRef(mByteArrayObj);
+}
+
+bool JMedia2HTTPConnection::connect(
+ const char *uri, const KeyedVector<String8, String8> *headers) {
+ String8 tmp("");
+ if (headers != NULL) {
+ for (size_t i = 0; i < headers->size(); ++i) {
+ tmp.append(headers->keyAt(i));
+ tmp.append(String8(": "));
+ tmp.append(headers->valueAt(i));
+ tmp.append(String8("\r\n"));
+ }
+ }
+
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+ jstring juri = env->NewStringUTF(uri);
+ jstring jheaders = env->NewStringUTF(tmp.string());
+
+ jboolean ret =
+ env->CallBooleanMethod(mMedia2HTTPConnectionObj, mConnectMethod, juri, jheaders);
+
+ env->DeleteLocalRef(juri);
+ env->DeleteLocalRef(jheaders);
+
+ return (bool)ret;
+}
+
+void JMedia2HTTPConnection::disconnect() {
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+ env->CallVoidMethod(mMedia2HTTPConnectionObj, mDisconnectMethod);
+}
+
+ssize_t JMedia2HTTPConnection::readAt(off64_t offset, void *data, size_t size) {
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+
+ if (size > kBufferSize) {
+ size = kBufferSize;
+ }
+
+ jint n = env->CallIntMethod(
+ mMedia2HTTPConnectionObj, mReadAtMethod, (jlong)offset, mByteArrayObj, (jint)size);
+
+ if (n > 0) {
+ env->GetByteArrayRegion(
+ mByteArrayObj,
+ 0,
+ n,
+ (jbyte *)data);
+ }
+
+ return n;
+}
+
+off64_t JMedia2HTTPConnection::getSize() {
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+ return (off64_t)(env->CallLongMethod(mMedia2HTTPConnectionObj, mGetSizeMethod));
+}
+
+status_t JMedia2HTTPConnection::getMIMEType(String8 *mimeType) {
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+ jstring jmime = (jstring)env->CallObjectMethod(mMedia2HTTPConnectionObj, mGetMIMETypeMethod);
+ jboolean flag = env->ExceptionCheck();
+ if (flag) {
+ env->ExceptionClear();
+ return UNKNOWN_ERROR;
+ }
+
+ const char *str = env->GetStringUTFChars(jmime, 0);
+ if (str != NULL) {
+ *mimeType = String8(str);
+ } else {
+ *mimeType = "application/octet-stream";
+ }
+ env->ReleaseStringUTFChars(jmime, str);
+ return OK;
+}
+
+status_t JMedia2HTTPConnection::getUri(String8 *uri) {
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+ jstring juri = (jstring)env->CallObjectMethod(mMedia2HTTPConnectionObj, mGetUriMethod);
+ jboolean flag = env->ExceptionCheck();
+ if (flag) {
+ env->ExceptionClear();
+ return UNKNOWN_ERROR;
+ }
+
+ const char *str = env->GetStringUTFChars(juri, 0);
+ *uri = String8(str);
+ env->ReleaseStringUTFChars(juri, str);
+ return OK;
+}
+
+} // namespace android
diff --git a/media/jni/android_media_Media2HTTPConnection.h b/media/jni/android_media_Media2HTTPConnection.h
new file mode 100644
index 0000000..14bc677
--- /dev/null
+++ b/media/jni/android_media_Media2HTTPConnection.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright 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 _ANDROID_MEDIA_MEDIA2HTTPCONNECTION_H_
+#define _ANDROID_MEDIA_MEDIA2HTTPCONNECTION_H_
+
+#include "jni.h"
+
+#include <media/MediaHTTPConnection.h>
+#include <media/stagefright/foundation/ABase.h>
+
+namespace android {
+
+struct JMedia2HTTPConnection : public MediaHTTPConnection {
+ JMedia2HTTPConnection(JNIEnv *env, jobject thiz);
+
+ virtual bool connect(
+ const char *uri, const KeyedVector<String8, String8> *headers) override;
+
+ virtual void disconnect() override;
+ virtual ssize_t readAt(off64_t offset, void *data, size_t size) override;
+ virtual off64_t getSize() override;
+ virtual status_t getMIMEType(String8 *mimeType) override;
+ virtual status_t getUri(String8 *uri) override;
+
+protected:
+ virtual ~JMedia2HTTPConnection();
+
+private:
+ jobject mMedia2HTTPConnectionObj;
+ jmethodID mConnectMethod;
+ jmethodID mDisconnectMethod;
+ jmethodID mReadAtMethod;
+ jmethodID mGetSizeMethod;
+ jmethodID mGetMIMETypeMethod;
+ jmethodID mGetUriMethod;
+
+ jbyteArray mByteArrayObj;
+
+ DISALLOW_EVIL_CONSTRUCTORS(JMedia2HTTPConnection);
+};
+
+} // namespace android
+
+#endif // _ANDROID_MEDIA_MEDIA2HTTPCONNECTION_H_
diff --git a/media/jni/android_media_Media2HTTPService.cpp b/media/jni/android_media_Media2HTTPService.cpp
new file mode 100644
index 0000000..382f099
--- /dev/null
+++ b/media/jni/android_media_Media2HTTPService.cpp
@@ -0,0 +1,61 @@
+/*
+ * Copyright 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.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "Media2HTTPService-JNI"
+#include <utils/Log.h>
+
+#include "android_media_Media2HTTPConnection.h"
+#include "android_media_Media2HTTPService.h"
+
+#include "android_runtime/AndroidRuntime.h"
+#include "android_runtime/Log.h"
+#include "jni.h"
+#include <nativehelper/JNIHelp.h>
+
+#include <media/stagefright/foundation/ADebug.h>
+#include <nativehelper/ScopedLocalRef.h>
+
+namespace android {
+
+JMedia2HTTPService::JMedia2HTTPService(JNIEnv *env, jobject thiz) {
+ mMedia2HTTPServiceObj = env->NewGlobalRef(thiz);
+ CHECK(mMedia2HTTPServiceObj != NULL);
+
+ ScopedLocalRef<jclass> media2HTTPServiceClass(env, env->GetObjectClass(mMedia2HTTPServiceObj));
+ CHECK(media2HTTPServiceClass.get() != NULL);
+
+ mMakeHTTPConnectionMethod = env->GetMethodID(
+ media2HTTPServiceClass.get(),
+ "makeHTTPConnection",
+ "()Landroid/media/Media2HTTPConnection;");
+ CHECK(mMakeHTTPConnectionMethod != NULL);
+}
+
+JMedia2HTTPService::~JMedia2HTTPService() {
+ JNIEnv *env = AndroidRuntime::getJNIEnv();
+ env->DeleteGlobalRef(mMedia2HTTPServiceObj);
+}
+
+sp<MediaHTTPConnection> JMedia2HTTPService::makeHTTPConnection() {
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+ jobject media2HTTPConnectionObj =
+ env->CallObjectMethod(mMedia2HTTPServiceObj, mMakeHTTPConnectionMethod);
+
+ return new JMedia2HTTPConnection(env, media2HTTPConnectionObj);
+}
+
+} // namespace android
diff --git a/media/jni/android_media_Media2HTTPService.h b/media/jni/android_media_Media2HTTPService.h
new file mode 100644
index 0000000..30d03f5
--- /dev/null
+++ b/media/jni/android_media_Media2HTTPService.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright 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 _ANDROID_MEDIA_MEDIA2HTTPSERVICE_H_
+#define _ANDROID_MEDIA_MEDIA2HTTPSERVICE_H_
+
+#include "jni.h"
+
+#include <media/MediaHTTPService.h>
+#include <media/stagefright/foundation/ABase.h>
+
+namespace android {
+
+struct JMedia2HTTPService : public MediaHTTPService {
+ JMedia2HTTPService(JNIEnv *env, jobject thiz);
+
+ virtual sp<MediaHTTPConnection> makeHTTPConnection() override;
+
+protected:
+ virtual ~JMedia2HTTPService();
+
+private:
+ jobject mMedia2HTTPServiceObj;
+
+ jmethodID mMakeHTTPConnectionMethod;
+
+ DISALLOW_EVIL_CONSTRUCTORS(JMedia2HTTPService);
+};
+
+} // namespace android
+
+#endif // _ANDROID_MEDIA_MEDIA2HTTPSERVICE_H_
diff --git a/media/jni/android_media_MediaDrm.cpp b/media/jni/android_media_MediaDrm.cpp
index bbed93d..4f06caa 100644
--- a/media/jni/android_media_MediaDrm.cpp
+++ b/media/jni/android_media_MediaDrm.cpp
@@ -114,6 +114,8 @@
jint kKeyRequestTypeInitial;
jint kKeyRequestTypeRenewal;
jint kKeyRequestTypeRelease;
+ jint kKeyRequestTypeNone;
+ jint kKeyRequestTypeUpdate;
} gKeyRequestTypes;
struct CertificateTypes {
@@ -692,6 +694,10 @@
gKeyRequestTypes.kKeyRequestTypeRenewal = env->GetStaticIntField(clazz, field);
GET_STATIC_FIELD_ID(field, clazz, "REQUEST_TYPE_RELEASE", "I");
gKeyRequestTypes.kKeyRequestTypeRelease = env->GetStaticIntField(clazz, field);
+ GET_STATIC_FIELD_ID(field, clazz, "REQUEST_TYPE_NONE", "I");
+ gKeyRequestTypes.kKeyRequestTypeNone = env->GetStaticIntField(clazz, field);
+ GET_STATIC_FIELD_ID(field, clazz, "REQUEST_TYPE_UPDATE", "I");
+ gKeyRequestTypes.kKeyRequestTypeUpdate = env->GetStaticIntField(clazz, field);
FIND_CLASS(clazz, "android/media/MediaDrm$ProvisionRequest");
GET_FIELD_ID(gFields.provisionRequest.data, clazz, "mData", "[B");
@@ -922,6 +928,15 @@
env->SetIntField(keyObj, gFields.keyRequest.requestType,
gKeyRequestTypes.kKeyRequestTypeRelease);
break;
+ case DrmPlugin::kKeyRequestType_None:
+ env->SetIntField(keyObj, gFields.keyRequest.requestType,
+ gKeyRequestTypes.kKeyRequestTypeNone);
+ break;
+ case DrmPlugin::kKeyRequestType_Update:
+ env->SetIntField(keyObj, gFields.keyRequest.requestType,
+ gKeyRequestTypes.kKeyRequestTypeUpdate);
+ break;
+
default:
throwStateException(env, "DRM plugin failure: unknown key request type",
ERROR_DRM_UNKNOWN);
@@ -1119,6 +1134,27 @@
return ListOfVectorsToArrayListOfByteArray(env, secureStops);
}
+static jobject android_media_MediaDrm_getSecureStopIds(
+ JNIEnv *env, jobject thiz) {
+ sp<IDrm> drm = GetDrm(env, thiz);
+
+ if (drm == NULL) {
+ jniThrowException(env, "java/lang/IllegalStateException",
+ "MediaDrm obj is null");
+ return NULL;
+ }
+
+ List<Vector<uint8_t> > secureStopIds;
+
+ status_t err = drm->getSecureStopIds(secureStopIds);
+
+ if (throwExceptionAsNecessary(env, err, "Failed to get secure stop Ids")) {
+ return NULL;
+ }
+
+ return ListOfVectorsToArrayListOfByteArray(env, secureStopIds);
+}
+
static jbyteArray android_media_MediaDrm_getSecureStop(
JNIEnv *env, jobject thiz, jbyteArray ssid) {
sp<IDrm> drm = GetDrm(env, thiz);
@@ -1153,7 +1189,22 @@
throwExceptionAsNecessary(env, err, "Failed to release secure stops");
}
-static void android_media_MediaDrm_releaseAllSecureStops(
+static void android_media_MediaDrm_removeSecureStop(
+ JNIEnv *env, jobject thiz, jbyteArray ssid) {
+ sp<IDrm> drm = GetDrm(env, thiz);
+
+ if (drm == NULL) {
+ jniThrowException(env, "java/lang/IllegalStateException",
+ "MediaDrm obj is null");
+ return;
+ }
+
+ status_t err = drm->removeSecureStop(JByteArrayToVector(env, ssid));
+
+ throwExceptionAsNecessary(env, err, "Failed to remove secure stop");
+}
+
+static void android_media_MediaDrm_removeAllSecureStops(
JNIEnv *env, jobject thiz) {
sp<IDrm> drm = GetDrm(env, thiz);
@@ -1161,9 +1212,9 @@
return;
}
- status_t err = drm->releaseAllSecureStops();
+ status_t err = drm->removeAllSecureStops();
- throwExceptionAsNecessary(env, err, "Failed to release all secure stops");
+ throwExceptionAsNecessary(env, err, "Failed to remove all secure stops");
}
@@ -1704,14 +1755,20 @@
{ "getSecureStops", "()Ljava/util/List;",
(void *)android_media_MediaDrm_getSecureStops },
+ { "getSecureStopIds", "()Ljava/util/List;",
+ (void *)android_media_MediaDrm_getSecureStopIds },
+
{ "getSecureStop", "([B)[B",
(void *)android_media_MediaDrm_getSecureStop },
{ "releaseSecureStops", "([B)V",
(void *)android_media_MediaDrm_releaseSecureStops },
- { "releaseAllSecureStops", "()V",
- (void *)android_media_MediaDrm_releaseAllSecureStops },
+ { "removeSecureStop", "([B)V",
+ (void *)android_media_MediaDrm_removeSecureStop },
+
+ { "removeAllSecureStops", "()V",
+ (void *)android_media_MediaDrm_removeAllSecureStops },
{ "getConnectedHdcpLevel", "()I",
(void *)android_media_MediaDrm_getConnectedHdcpLevel },
diff --git a/media/jni/android_media_MediaExtractor.cpp b/media/jni/android_media_MediaExtractor.cpp
index 5c90d00..a855526 100644
--- a/media/jni/android_media_MediaExtractor.cpp
+++ b/media/jni/android_media_MediaExtractor.cpp
@@ -244,6 +244,10 @@
return mImpl->getSampleTime(sampleTimeUs);
}
+status_t JMediaExtractor::getSampleSize(size_t *sampleSize) {
+ return mImpl->getSampleSize(sampleSize);
+}
+
status_t JMediaExtractor::getSampleFlags(uint32_t *sampleFlags) {
*sampleFlags = 0;
@@ -505,6 +509,28 @@
return (jlong) sampleTimeUs;
}
+static jlong android_media_MediaExtractor_getSampleSize(
+ JNIEnv *env, jobject thiz) {
+ sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
+
+ if (extractor == NULL) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return -1ll;
+ }
+
+ size_t sampleSize;
+ status_t err = extractor->getSampleSize(&sampleSize);
+
+ if (err == ERROR_END_OF_STREAM) {
+ return -1ll;
+ } else if (err != OK) {
+ jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
+ return -1ll;
+ }
+
+ return (jlong) sampleSize;
+}
+
static jint android_media_MediaExtractor_getSampleFlags(
JNIEnv *env, jobject thiz) {
sp<JMediaExtractor> extractor = getMediaExtractor(env, thiz);
@@ -884,6 +910,9 @@
{ "getSampleTime", "()J",
(void *)android_media_MediaExtractor_getSampleTime },
+ { "getSampleSize", "()J",
+ (void *)android_media_MediaExtractor_getSampleSize },
+
{ "getSampleFlags", "()I",
(void *)android_media_MediaExtractor_getSampleFlags },
diff --git a/media/jni/android_media_MediaExtractor.h b/media/jni/android_media_MediaExtractor.h
index a4638ac..aaa8421 100644
--- a/media/jni/android_media_MediaExtractor.h
+++ b/media/jni/android_media_MediaExtractor.h
@@ -60,6 +60,7 @@
status_t readSampleData(jobject byteBuf, size_t offset, size_t *sampleSize);
status_t getSampleTrackIndex(size_t *trackIndex);
status_t getSampleTime(int64_t *sampleTimeUs);
+ status_t getSampleSize(size_t *sampleSize);
status_t getSampleFlags(uint32_t *sampleFlags);
status_t getSampleMeta(sp<MetaData> *sampleMeta);
status_t getMetrics(Parcel *reply) const;
diff --git a/media/jni/android_media_MediaMetadataRetriever.cpp b/media/jni/android_media_MediaMetadataRetriever.cpp
index 42ebf6a..ff854c5 100644
--- a/media/jni/android_media_MediaMetadataRetriever.cpp
+++ b/media/jni/android_media_MediaMetadataRetriever.cpp
@@ -68,17 +68,26 @@
}
}
-static MediaMetadataRetriever* getRetriever(JNIEnv* env, jobject thiz)
+static sp<MediaMetadataRetriever> getRetriever(JNIEnv* env, jobject thiz)
{
// No lock is needed, since it is called internally by other methods that are protected
MediaMetadataRetriever* retriever = (MediaMetadataRetriever*) env->GetLongField(thiz, fields.context);
return retriever;
}
-static void setRetriever(JNIEnv* env, jobject thiz, MediaMetadataRetriever* retriever)
+static void setRetriever(JNIEnv* env, jobject thiz, const sp<MediaMetadataRetriever> &retriever)
{
// No lock is needed, since it is called internally by other methods that are protected
- env->SetLongField(thiz, fields.context, (jlong) retriever);
+
+ if (retriever != NULL) {
+ retriever->incStrong(thiz);
+ }
+ sp<MediaMetadataRetriever> old = getRetriever(env, thiz);
+ if (old != NULL) {
+ old->decStrong(thiz);
+ }
+
+ env->SetLongField(thiz, fields.context, (jlong) retriever.get());
}
static void
@@ -87,7 +96,7 @@
jobjectArray keys, jobjectArray values) {
ALOGV("setDataSource");
- MediaMetadataRetriever* retriever = getRetriever(env, thiz);
+ sp<MediaMetadataRetriever> retriever = getRetriever(env, thiz);
if (retriever == 0) {
jniThrowException(
env,
@@ -146,7 +155,7 @@
static void android_media_MediaMetadataRetriever_setDataSourceFD(JNIEnv *env, jobject thiz, jobject fileDescriptor, jlong offset, jlong length)
{
ALOGV("setDataSource");
- MediaMetadataRetriever* retriever = getRetriever(env, thiz);
+ sp<MediaMetadataRetriever> retriever = getRetriever(env, thiz);
if (retriever == 0) {
jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
return;
@@ -175,7 +184,7 @@
static void android_media_MediaMetadataRetriever_setDataSourceCallback(JNIEnv *env, jobject thiz, jobject dataSource)
{
ALOGV("setDataSourceCallback");
- MediaMetadataRetriever* retriever = getRetriever(env, thiz);
+ sp<MediaMetadataRetriever> retriever = getRetriever(env, thiz);
if (retriever == 0) {
jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
return;
@@ -325,7 +334,7 @@
{
ALOGV("getFrameAtTime: %lld us option: %d dst width: %d heigh: %d",
(long long)timeUs, option, dst_width, dst_height);
- MediaMetadataRetriever* retriever = getRetriever(env, thiz);
+ sp<MediaMetadataRetriever> retriever = getRetriever(env, thiz);
if (retriever == 0) {
jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
return NULL;
@@ -349,7 +358,7 @@
JNIEnv *env, jobject thiz, jint index)
{
ALOGV("getImageAtIndex: index %d", index);
- MediaMetadataRetriever* retriever = getRetriever(env, thiz);
+ sp<MediaMetadataRetriever> retriever = getRetriever(env, thiz);
if (retriever == 0) {
jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
return NULL;
@@ -373,7 +382,7 @@
JNIEnv *env, jobject thiz, jint frameIndex, jint numFrames)
{
ALOGV("getFrameAtIndex: frameIndex %d, numFrames %d", frameIndex, numFrames);
- MediaMetadataRetriever* retriever = getRetriever(env, thiz);
+ sp<MediaMetadataRetriever> retriever = getRetriever(env, thiz);
if (retriever == 0) {
jniThrowException(env,
"java/lang/IllegalStateException", "No retriever available");
@@ -411,7 +420,7 @@
JNIEnv *env, jobject thiz, jint pictureType)
{
ALOGV("getEmbeddedPicture: %d", pictureType);
- MediaMetadataRetriever* retriever = getRetriever(env, thiz);
+ sp<MediaMetadataRetriever> retriever = getRetriever(env, thiz);
if (retriever == 0) {
jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
return NULL;
@@ -446,7 +455,7 @@
static jobject android_media_MediaMetadataRetriever_extractMetadata(JNIEnv *env, jobject thiz, jint keyCode)
{
ALOGV("extractMetadata");
- MediaMetadataRetriever* retriever = getRetriever(env, thiz);
+ sp<MediaMetadataRetriever> retriever = getRetriever(env, thiz);
if (retriever == 0) {
jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
return NULL;
@@ -464,9 +473,7 @@
{
ALOGV("release");
Mutex::Autolock lock(sLock);
- MediaMetadataRetriever* retriever = getRetriever(env, thiz);
- delete retriever;
- setRetriever(env, thiz, (MediaMetadataRetriever*) 0);
+ setRetriever(env, thiz, NULL);
}
static void android_media_MediaMetadataRetriever_native_finalize(JNIEnv *env, jobject thiz)
@@ -533,7 +540,7 @@
static void android_media_MediaMetadataRetriever_native_setup(JNIEnv *env, jobject thiz)
{
ALOGV("native_setup");
- MediaMetadataRetriever* retriever = new MediaMetadataRetriever();
+ sp<MediaMetadataRetriever> retriever = new MediaMetadataRetriever();
if (retriever == 0) {
jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
return;
diff --git a/media/jni/android_media_MediaPlayer2.cpp b/media/jni/android_media_MediaPlayer2.cpp
new file mode 100644
index 0000000..90ee8a6
--- /dev/null
+++ b/media/jni/android_media_MediaPlayer2.cpp
@@ -0,0 +1,1463 @@
+/*
+**
+** Copyright 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.
+*/
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "MediaPlayer2-JNI"
+#include "utils/Log.h"
+
+#include <media/mediaplayer2.h>
+#include <media/AudioResamplerPublic.h>
+#include <media/MediaHTTPService.h>
+#include <media/MediaPlayer2Interface.h>
+#include <media/MediaAnalyticsItem.h>
+#include <media/NdkWrapper.h>
+#include <media/stagefright/foundation/ByteUtils.h> // for FOURCC definition
+#include <stdio.h>
+#include <assert.h>
+#include <limits.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <utils/threads.h>
+#include "jni.h"
+#include <nativehelper/JNIHelp.h>
+#include "android/native_window_jni.h"
+#include "android_runtime/Log.h"
+#include "utils/Errors.h" // for status_t
+#include "utils/KeyedVector.h"
+#include "utils/String8.h"
+#include "android_media_BufferingParams.h"
+#include "android_media_Media2HTTPService.h"
+#include "android_media_Media2DataSource.h"
+#include "android_media_MediaMetricsJNI.h"
+#include "android_media_PlaybackParams.h"
+#include "android_media_SyncParams.h"
+#include "android_media_VolumeShaper.h"
+
+#include "android_os_Parcel.h"
+#include "android_util_Binder.h"
+#include <binder/Parcel.h>
+
+// Modular DRM begin
+#define FIND_CLASS(var, className) \
+var = env->FindClass(className); \
+LOG_FATAL_IF(! (var), "Unable to find class " className);
+
+#define GET_METHOD_ID(var, clazz, fieldName, fieldDescriptor) \
+var = env->GetMethodID(clazz, fieldName, fieldDescriptor); \
+LOG_FATAL_IF(! (var), "Unable to find method " fieldName);
+
+struct StateExceptionFields {
+ jmethodID init;
+ jclass classId;
+};
+
+static StateExceptionFields gStateExceptionFields;
+// Modular DRM end
+
+// ----------------------------------------------------------------------------
+
+using namespace android;
+
+using media::VolumeShaper;
+
+// ----------------------------------------------------------------------------
+
+struct fields_t {
+ jfieldID context;
+ jfieldID surface_texture;
+
+ jmethodID post_event;
+
+ jmethodID proxyConfigGetHost;
+ jmethodID proxyConfigGetPort;
+ jmethodID proxyConfigGetExclusionList;
+};
+static fields_t fields;
+
+static BufferingParams::fields_t gBufferingParamsFields;
+static PlaybackParams::fields_t gPlaybackParamsFields;
+static SyncParams::fields_t gSyncParamsFields;
+static VolumeShaperHelper::fields_t gVolumeShaperFields;
+
+static Mutex sLock;
+
+static bool ConvertKeyValueArraysToKeyedVector(
+ JNIEnv *env, jobjectArray keys, jobjectArray values,
+ KeyedVector<String8, String8>* keyedVector) {
+
+ int nKeyValuePairs = 0;
+ bool failed = false;
+ if (keys != NULL && values != NULL) {
+ nKeyValuePairs = env->GetArrayLength(keys);
+ failed = (nKeyValuePairs != env->GetArrayLength(values));
+ }
+
+ if (!failed) {
+ failed = ((keys != NULL && values == NULL) ||
+ (keys == NULL && values != NULL));
+ }
+
+ if (failed) {
+ ALOGE("keys and values arrays have different length");
+ jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
+ return false;
+ }
+
+ for (int i = 0; i < nKeyValuePairs; ++i) {
+ // No need to check on the ArrayIndexOutOfBoundsException, since
+ // it won't happen here.
+ jstring key = (jstring) env->GetObjectArrayElement(keys, i);
+ jstring value = (jstring) env->GetObjectArrayElement(values, i);
+
+ const char* keyStr = env->GetStringUTFChars(key, NULL);
+ if (!keyStr) { // OutOfMemoryError
+ return false;
+ }
+
+ const char* valueStr = env->GetStringUTFChars(value, NULL);
+ if (!valueStr) { // OutOfMemoryError
+ env->ReleaseStringUTFChars(key, keyStr);
+ return false;
+ }
+
+ keyedVector->add(String8(keyStr), String8(valueStr));
+
+ env->ReleaseStringUTFChars(key, keyStr);
+ env->ReleaseStringUTFChars(value, valueStr);
+ env->DeleteLocalRef(key);
+ env->DeleteLocalRef(value);
+ }
+ return true;
+}
+
+// ----------------------------------------------------------------------------
+// ref-counted object for callbacks
+class JNIMediaPlayer2Listener: public MediaPlayer2Listener
+{
+public:
+ JNIMediaPlayer2Listener(JNIEnv* env, jobject thiz, jobject weak_thiz);
+ ~JNIMediaPlayer2Listener();
+ virtual void notify(int msg, int ext1, int ext2, const Parcel *obj = NULL);
+private:
+ JNIMediaPlayer2Listener();
+ jclass mClass; // Reference to MediaPlayer2 class
+ jobject mObject; // Weak ref to MediaPlayer2 Java object to call on
+};
+
+JNIMediaPlayer2Listener::JNIMediaPlayer2Listener(JNIEnv* env, jobject thiz, jobject weak_thiz)
+{
+
+ // Hold onto the MediaPlayer2 class for use in calling the static method
+ // that posts events to the application thread.
+ jclass clazz = env->GetObjectClass(thiz);
+ if (clazz == NULL) {
+ ALOGE("Can't find android/media/MediaPlayer2Impl");
+ jniThrowException(env, "java/lang/Exception", NULL);
+ return;
+ }
+ mClass = (jclass)env->NewGlobalRef(clazz);
+
+ // We use a weak reference so the MediaPlayer2 object can be garbage collected.
+ // The reference is only used as a proxy for callbacks.
+ mObject = env->NewGlobalRef(weak_thiz);
+}
+
+JNIMediaPlayer2Listener::~JNIMediaPlayer2Listener()
+{
+ // remove global references
+ JNIEnv *env = AndroidRuntime::getJNIEnv();
+ env->DeleteGlobalRef(mObject);
+ env->DeleteGlobalRef(mClass);
+}
+
+void JNIMediaPlayer2Listener::notify(int msg, int ext1, int ext2, const Parcel *obj)
+{
+ JNIEnv *env = AndroidRuntime::getJNIEnv();
+ if (obj && obj->dataSize() > 0) {
+ jobject jParcel = createJavaParcelObject(env);
+ if (jParcel != NULL) {
+ Parcel* nativeParcel = parcelForJavaObject(env, jParcel);
+ nativeParcel->setData(obj->data(), obj->dataSize());
+ env->CallStaticVoidMethod(mClass, fields.post_event, mObject,
+ msg, ext1, ext2, jParcel);
+ env->DeleteLocalRef(jParcel);
+ }
+ } else {
+ env->CallStaticVoidMethod(mClass, fields.post_event, mObject,
+ msg, ext1, ext2, NULL);
+ }
+ if (env->ExceptionCheck()) {
+ ALOGW("An exception occurred while notifying an event.");
+ LOGW_EX(env);
+ env->ExceptionClear();
+ }
+}
+
+// ----------------------------------------------------------------------------
+
+static sp<MediaPlayer2> getMediaPlayer(JNIEnv* env, jobject thiz)
+{
+ Mutex::Autolock l(sLock);
+ MediaPlayer2* const p = (MediaPlayer2*)env->GetLongField(thiz, fields.context);
+ return sp<MediaPlayer2>(p);
+}
+
+static sp<MediaPlayer2> setMediaPlayer(JNIEnv* env, jobject thiz, const sp<MediaPlayer2>& player)
+{
+ Mutex::Autolock l(sLock);
+ sp<MediaPlayer2> old = (MediaPlayer2*)env->GetLongField(thiz, fields.context);
+ if (player.get()) {
+ player->incStrong((void*)setMediaPlayer);
+ }
+ if (old != 0) {
+ old->decStrong((void*)setMediaPlayer);
+ }
+ env->SetLongField(thiz, fields.context, (jlong)player.get());
+ return old;
+}
+
+// If exception is NULL and opStatus is not OK, this method sends an error
+// event to the client application; otherwise, if exception is not NULL and
+// opStatus is not OK, this method throws the given exception to the client
+// application.
+static void process_media_player_call(JNIEnv *env, jobject thiz, status_t opStatus, const char* exception, const char *message)
+{
+ if (exception == NULL) { // Don't throw exception. Instead, send an event.
+ if (opStatus != (status_t) OK) {
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp != 0) mp->notify(MEDIA2_ERROR, opStatus, 0);
+ }
+ } else { // Throw exception!
+ if ( opStatus == (status_t) INVALID_OPERATION ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ } else if ( opStatus == (status_t) BAD_VALUE ) {
+ jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
+ } else if ( opStatus == (status_t) PERMISSION_DENIED ) {
+ jniThrowException(env, "java/lang/SecurityException", NULL);
+ } else if ( opStatus != (status_t) OK ) {
+ if (strlen(message) > 230) {
+ // if the message is too long, don't bother displaying the status code
+ jniThrowException( env, exception, message);
+ } else {
+ char msg[256];
+ // append the status code to the message
+ sprintf(msg, "%s: status=0x%X", message, opStatus);
+ jniThrowException( env, exception, msg);
+ }
+ }
+ }
+}
+
+static void
+android_media_MediaPlayer2_setDataSourceAndHeaders(
+ JNIEnv *env, jobject thiz, jobject httpServiceObj, jstring path,
+ jobjectArray keys, jobjectArray values) {
+
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+
+ if (path == NULL) {
+ jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
+ return;
+ }
+
+ const char *tmp = env->GetStringUTFChars(path, NULL);
+ if (tmp == NULL) { // Out of memory
+ return;
+ }
+ ALOGV("setDataSource: path %s", tmp);
+
+ String8 pathStr(tmp);
+ env->ReleaseStringUTFChars(path, tmp);
+ tmp = NULL;
+
+ // We build a KeyedVector out of the key and val arrays
+ KeyedVector<String8, String8> headersVector;
+ if (!ConvertKeyValueArraysToKeyedVector(
+ env, keys, values, &headersVector)) {
+ return;
+ }
+
+ sp<MediaHTTPService> httpService;
+ if (httpServiceObj != NULL) {
+ httpService = new JMedia2HTTPService(env, httpServiceObj);
+ }
+
+ status_t opStatus =
+ mp->setDataSource(
+ httpService,
+ pathStr,
+ headersVector.size() > 0? &headersVector : NULL);
+
+ process_media_player_call(
+ env, thiz, opStatus, "java/io/IOException",
+ "setDataSource failed." );
+}
+
+static void
+android_media_MediaPlayer2_setDataSourceFD(JNIEnv *env, jobject thiz, jobject fileDescriptor, jlong offset, jlong length)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+
+ if (fileDescriptor == NULL) {
+ jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
+ return;
+ }
+ int fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
+ ALOGV("setDataSourceFD: fd %d", fd);
+ process_media_player_call( env, thiz, mp->setDataSource(fd, offset, length), "java/io/IOException", "setDataSourceFD failed." );
+}
+
+static void
+android_media_MediaPlayer2_setDataSourceCallback(JNIEnv *env, jobject thiz, jobject dataSource)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+
+ if (dataSource == NULL) {
+ jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
+ return;
+ }
+ sp<DataSource> callbackDataSource = new JMedia2DataSource(env, dataSource);
+ process_media_player_call(env, thiz, mp->setDataSource(callbackDataSource), "java/lang/RuntimeException", "setDataSourceCallback failed." );
+}
+
+static sp<ANativeWindowWrapper>
+getVideoSurfaceTexture(JNIEnv* env, jobject thiz) {
+ ANativeWindow * const p = (ANativeWindow*)env->GetLongField(thiz, fields.surface_texture);
+ return new ANativeWindowWrapper(p);
+}
+
+static void
+decVideoSurfaceRef(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL) {
+ return;
+ }
+
+ ANativeWindow * const old_anw = (ANativeWindow*)env->GetLongField(thiz, fields.surface_texture);
+ if (old_anw != NULL) {
+ ANativeWindow_release(old_anw);
+ env->SetLongField(thiz, fields.surface_texture, (jlong)NULL);
+ }
+}
+
+static void
+setVideoSurface(JNIEnv *env, jobject thiz, jobject jsurface, jboolean mediaPlayerMustBeAlive)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL) {
+ if (mediaPlayerMustBeAlive) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ }
+ return;
+ }
+
+ decVideoSurfaceRef(env, thiz);
+
+ ANativeWindow* anw = NULL;
+ if (jsurface) {
+ anw = ANativeWindow_fromSurface(env, jsurface);
+ if (anw == NULL) {
+ jniThrowException(env, "java/lang/IllegalArgumentException",
+ "The surface has been released");
+ return;
+ }
+ }
+
+ env->SetLongField(thiz, fields.surface_texture, (jlong)anw);
+
+ // This will fail if the media player has not been initialized yet. This
+ // can be the case if setDisplay() on MediaPlayer2Impl.java has been called
+ // before setDataSource(). The redundant call to setVideoSurfaceTexture()
+ // in prepare/prepareAsync covers for this case.
+ mp->setVideoSurfaceTexture(new ANativeWindowWrapper(anw));
+}
+
+static void
+android_media_MediaPlayer2_setVideoSurface(JNIEnv *env, jobject thiz, jobject jsurface)
+{
+ setVideoSurface(env, thiz, jsurface, true /* mediaPlayerMustBeAlive */);
+}
+
+static jobject
+android_media_MediaPlayer2_getBufferingParams(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return NULL;
+ }
+
+ BufferingParams bp;
+ BufferingSettings &settings = bp.settings;
+ process_media_player_call(
+ env, thiz, mp->getBufferingSettings(&settings),
+ "java/lang/IllegalStateException", "unexpected error");
+ ALOGV("getBufferingSettings:{%s}", settings.toString().string());
+
+ return bp.asJobject(env, gBufferingParamsFields);
+}
+
+static void
+android_media_MediaPlayer2_setBufferingParams(JNIEnv *env, jobject thiz, jobject params)
+{
+ if (params == NULL) {
+ return;
+ }
+
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+
+ BufferingParams bp;
+ bp.fillFromJobject(env, gBufferingParamsFields, params);
+ ALOGV("setBufferingParams:{%s}", bp.settings.toString().string());
+
+ process_media_player_call(
+ env, thiz, mp->setBufferingSettings(bp.settings),
+ "java/lang/IllegalStateException", "unexpected error");
+}
+
+static void
+android_media_MediaPlayer2_prepare(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+
+ // Handle the case where the display surface was set before the mp was
+ // initialized. We try again to make it stick.
+ sp<ANativeWindowWrapper> st = getVideoSurfaceTexture(env, thiz);
+ mp->setVideoSurfaceTexture(st);
+
+ process_media_player_call( env, thiz, mp->prepare(), "java/io/IOException", "Prepare failed." );
+}
+
+static void
+android_media_MediaPlayer2_prepareAsync(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+
+ // Handle the case where the display surface was set before the mp was
+ // initialized. We try again to make it stick.
+ sp<ANativeWindowWrapper> st = getVideoSurfaceTexture(env, thiz);
+ mp->setVideoSurfaceTexture(st);
+
+ process_media_player_call( env, thiz, mp->prepareAsync(), "java/io/IOException", "Prepare Async failed." );
+}
+
+static void
+android_media_MediaPlayer2_start(JNIEnv *env, jobject thiz)
+{
+ ALOGV("start");
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+ process_media_player_call( env, thiz, mp->start(), NULL, NULL );
+}
+
+static void
+android_media_MediaPlayer2_stop(JNIEnv *env, jobject thiz)
+{
+ ALOGV("stop");
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+ process_media_player_call( env, thiz, mp->stop(), NULL, NULL );
+}
+
+static void
+android_media_MediaPlayer2_pause(JNIEnv *env, jobject thiz)
+{
+ ALOGV("pause");
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+ process_media_player_call( env, thiz, mp->pause(), NULL, NULL );
+}
+
+static jboolean
+android_media_MediaPlayer2_isPlaying(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return JNI_FALSE;
+ }
+ const jboolean is_playing = mp->isPlaying();
+
+ ALOGV("isPlaying: %d", is_playing);
+ return is_playing;
+}
+
+static void
+android_media_MediaPlayer2_setPlaybackParams(JNIEnv *env, jobject thiz, jobject params)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+
+ PlaybackParams pbp;
+ pbp.fillFromJobject(env, gPlaybackParamsFields, params);
+ ALOGV("setPlaybackParams: %d:%f %d:%f %d:%u %d:%u",
+ pbp.speedSet, pbp.audioRate.mSpeed,
+ pbp.pitchSet, pbp.audioRate.mPitch,
+ pbp.audioFallbackModeSet, pbp.audioRate.mFallbackMode,
+ pbp.audioStretchModeSet, pbp.audioRate.mStretchMode);
+
+ AudioPlaybackRate rate;
+ status_t err = mp->getPlaybackSettings(&rate);
+ if (err == OK) {
+ bool updatedRate = false;
+ if (pbp.speedSet) {
+ rate.mSpeed = pbp.audioRate.mSpeed;
+ updatedRate = true;
+ }
+ if (pbp.pitchSet) {
+ rate.mPitch = pbp.audioRate.mPitch;
+ updatedRate = true;
+ }
+ if (pbp.audioFallbackModeSet) {
+ rate.mFallbackMode = pbp.audioRate.mFallbackMode;
+ updatedRate = true;
+ }
+ if (pbp.audioStretchModeSet) {
+ rate.mStretchMode = pbp.audioRate.mStretchMode;
+ updatedRate = true;
+ }
+ if (updatedRate) {
+ err = mp->setPlaybackSettings(rate);
+ }
+ }
+ process_media_player_call(
+ env, thiz, err,
+ "java/lang/IllegalStateException", "unexpected error");
+}
+
+static jobject
+android_media_MediaPlayer2_getPlaybackParams(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return NULL;
+ }
+
+ PlaybackParams pbp;
+ AudioPlaybackRate &audioRate = pbp.audioRate;
+ process_media_player_call(
+ env, thiz, mp->getPlaybackSettings(&audioRate),
+ "java/lang/IllegalStateException", "unexpected error");
+ ALOGV("getPlaybackSettings: %f %f %d %d",
+ audioRate.mSpeed, audioRate.mPitch, audioRate.mFallbackMode, audioRate.mStretchMode);
+
+ pbp.speedSet = true;
+ pbp.pitchSet = true;
+ pbp.audioFallbackModeSet = true;
+ pbp.audioStretchModeSet = true;
+
+ return pbp.asJobject(env, gPlaybackParamsFields);
+}
+
+static void
+android_media_MediaPlayer2_setSyncParams(JNIEnv *env, jobject thiz, jobject params)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+
+ SyncParams scp;
+ scp.fillFromJobject(env, gSyncParamsFields, params);
+ ALOGV("setSyncParams: %d:%d %d:%d %d:%f %d:%f",
+ scp.syncSourceSet, scp.sync.mSource,
+ scp.audioAdjustModeSet, scp.sync.mAudioAdjustMode,
+ scp.toleranceSet, scp.sync.mTolerance,
+ scp.frameRateSet, scp.frameRate);
+
+ AVSyncSettings avsync;
+ float videoFrameRate;
+ status_t err = mp->getSyncSettings(&avsync, &videoFrameRate);
+ if (err == OK) {
+ bool updatedSync = scp.frameRateSet;
+ if (scp.syncSourceSet) {
+ avsync.mSource = scp.sync.mSource;
+ updatedSync = true;
+ }
+ if (scp.audioAdjustModeSet) {
+ avsync.mAudioAdjustMode = scp.sync.mAudioAdjustMode;
+ updatedSync = true;
+ }
+ if (scp.toleranceSet) {
+ avsync.mTolerance = scp.sync.mTolerance;
+ updatedSync = true;
+ }
+ if (updatedSync) {
+ err = mp->setSyncSettings(avsync, scp.frameRateSet ? scp.frameRate : -1.f);
+ }
+ }
+ process_media_player_call(
+ env, thiz, err,
+ "java/lang/IllegalStateException", "unexpected error");
+}
+
+static jobject
+android_media_MediaPlayer2_getSyncParams(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return NULL;
+ }
+
+ SyncParams scp;
+ scp.frameRate = -1.f;
+ process_media_player_call(
+ env, thiz, mp->getSyncSettings(&scp.sync, &scp.frameRate),
+ "java/lang/IllegalStateException", "unexpected error");
+
+ ALOGV("getSyncSettings: %d %d %f %f",
+ scp.sync.mSource, scp.sync.mAudioAdjustMode, scp.sync.mTolerance, scp.frameRate);
+
+ // sanity check params
+ if (scp.sync.mSource >= AVSYNC_SOURCE_MAX
+ || scp.sync.mAudioAdjustMode >= AVSYNC_AUDIO_ADJUST_MODE_MAX
+ || scp.sync.mTolerance < 0.f
+ || scp.sync.mTolerance >= AVSYNC_TOLERANCE_MAX) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return NULL;
+ }
+
+ scp.syncSourceSet = true;
+ scp.audioAdjustModeSet = true;
+ scp.toleranceSet = true;
+ scp.frameRateSet = scp.frameRate >= 0.f;
+
+ return scp.asJobject(env, gSyncParamsFields);
+}
+
+static void
+android_media_MediaPlayer2_seekTo(JNIEnv *env, jobject thiz, jlong msec, jint mode)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+ ALOGV("seekTo: %lld(msec), mode=%d", (long long)msec, mode);
+ process_media_player_call( env, thiz, mp->seekTo((int)msec, (MediaPlayer2SeekMode)mode), NULL, NULL );
+}
+
+static void
+android_media_MediaPlayer2_notifyAt(JNIEnv *env, jobject thiz, jlong mediaTimeUs)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+ ALOGV("notifyAt: %lld", (long long)mediaTimeUs);
+ process_media_player_call( env, thiz, mp->notifyAt((int64_t)mediaTimeUs), NULL, NULL );
+}
+
+static jint
+android_media_MediaPlayer2_getVideoWidth(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return 0;
+ }
+ int w;
+ if (0 != mp->getVideoWidth(&w)) {
+ ALOGE("getVideoWidth failed");
+ w = 0;
+ }
+ ALOGV("getVideoWidth: %d", w);
+ return (jint) w;
+}
+
+static jint
+android_media_MediaPlayer2_getVideoHeight(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return 0;
+ }
+ int h;
+ if (0 != mp->getVideoHeight(&h)) {
+ ALOGE("getVideoHeight failed");
+ h = 0;
+ }
+ ALOGV("getVideoHeight: %d", h);
+ return (jint) h;
+}
+
+static jobject
+android_media_MediaPlayer2_native_getMetrics(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return 0;
+ }
+
+ Parcel p;
+ int key = FOURCC('m','t','r','X');
+ status_t status = mp->getParameter(key, &p);
+ if (status != OK) {
+ ALOGD("getMetrics() failed: %d", status);
+ return (jobject) NULL;
+ }
+
+ p.setDataPosition(0);
+ MediaAnalyticsItem *item = new MediaAnalyticsItem;
+ item->readFromParcel(p);
+ jobject mybundle = MediaMetricsJNI::writeMetricsToBundle(env, item, NULL);
+
+ // housekeeping
+ delete item;
+ item = NULL;
+
+ return mybundle;
+}
+
+static jint
+android_media_MediaPlayer2_getCurrentPosition(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return 0;
+ }
+ int msec;
+ process_media_player_call( env, thiz, mp->getCurrentPosition(&msec), NULL, NULL );
+ ALOGV("getCurrentPosition: %d (msec)", msec);
+ return (jint) msec;
+}
+
+static jint
+android_media_MediaPlayer2_getDuration(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return 0;
+ }
+ int msec;
+ process_media_player_call( env, thiz, mp->getDuration(&msec), NULL, NULL );
+ ALOGV("getDuration: %d (msec)", msec);
+ return (jint) msec;
+}
+
+static void
+android_media_MediaPlayer2_reset(JNIEnv *env, jobject thiz)
+{
+ ALOGV("reset");
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+ process_media_player_call( env, thiz, mp->reset(), NULL, NULL );
+}
+
+static jint
+android_media_MediaPlayer2_getAudioStreamType(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return 0;
+ }
+ audio_stream_type_t streamtype;
+ process_media_player_call( env, thiz, mp->getAudioStreamType(&streamtype), NULL, NULL );
+ ALOGV("getAudioStreamType: %d (streamtype)", streamtype);
+ return (jint) streamtype;
+}
+
+static jboolean
+android_media_MediaPlayer2_setParameter(JNIEnv *env, jobject thiz, jint key, jobject java_request)
+{
+ ALOGV("setParameter: key %d", key);
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return false;
+ }
+
+ Parcel *request = parcelForJavaObject(env, java_request);
+ status_t err = mp->setParameter(key, *request);
+ if (err == OK) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+static void
+android_media_MediaPlayer2_setLooping(JNIEnv *env, jobject thiz, jboolean looping)
+{
+ ALOGV("setLooping: %d", looping);
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+ process_media_player_call( env, thiz, mp->setLooping(looping), NULL, NULL );
+}
+
+static jboolean
+android_media_MediaPlayer2_isLooping(JNIEnv *env, jobject thiz)
+{
+ ALOGV("isLooping");
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return JNI_FALSE;
+ }
+ return mp->isLooping() ? JNI_TRUE : JNI_FALSE;
+}
+
+static void
+android_media_MediaPlayer2_setVolume(JNIEnv *env, jobject thiz, jfloat leftVolume, jfloat rightVolume)
+{
+ ALOGV("setVolume: left %f right %f", (float) leftVolume, (float) rightVolume);
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+ process_media_player_call( env, thiz, mp->setVolume((float) leftVolume, (float) rightVolume), NULL, NULL );
+}
+
+// Sends the request and reply parcels to the media player via the
+// binder interface.
+static jint
+android_media_MediaPlayer2_invoke(JNIEnv *env, jobject thiz,
+ jobject java_request, jobject java_reply)
+{
+ sp<MediaPlayer2> media_player = getMediaPlayer(env, thiz);
+ if (media_player == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return UNKNOWN_ERROR;
+ }
+
+ Parcel *request = parcelForJavaObject(env, java_request);
+ Parcel *reply = parcelForJavaObject(env, java_reply);
+
+ request->setDataPosition(0);
+
+ // Don't use process_media_player_call which use the async loop to
+ // report errors, instead returns the status.
+ return (jint) media_player->invoke(*request, reply);
+}
+
+// Sends the new filter to the client.
+static jint
+android_media_MediaPlayer2_setMetadataFilter(JNIEnv *env, jobject thiz, jobject request)
+{
+ sp<MediaPlayer2> media_player = getMediaPlayer(env, thiz);
+ if (media_player == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return UNKNOWN_ERROR;
+ }
+
+ Parcel *filter = parcelForJavaObject(env, request);
+
+ if (filter == NULL ) {
+ jniThrowException(env, "java/lang/RuntimeException", "Filter is null");
+ return UNKNOWN_ERROR;
+ }
+
+ return (jint) media_player->setMetadataFilter(*filter);
+}
+
+static jboolean
+android_media_MediaPlayer2_getMetadata(JNIEnv *env, jobject thiz, jboolean update_only,
+ jboolean apply_filter, jobject reply)
+{
+ sp<MediaPlayer2> media_player = getMediaPlayer(env, thiz);
+ if (media_player == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return JNI_FALSE;
+ }
+
+ Parcel *metadata = parcelForJavaObject(env, reply);
+
+ if (metadata == NULL ) {
+ jniThrowException(env, "java/lang/RuntimeException", "Reply parcel is null");
+ return JNI_FALSE;
+ }
+
+ metadata->freeData();
+ // On return metadata is positioned at the beginning of the
+ // metadata. Note however that the parcel actually starts with the
+ // return code so you should not rewind the parcel using
+ // setDataPosition(0).
+ if (media_player->getMetadata(update_only, apply_filter, metadata) == OK) {
+ return JNI_TRUE;
+ } else {
+ return JNI_FALSE;
+ }
+}
+
+// This function gets some field IDs, which in turn causes class initialization.
+// It is called from a static block in MediaPlayer2, which won't run until the
+// first time an instance of this class is used.
+static void
+android_media_MediaPlayer2_native_init(JNIEnv *env)
+{
+ jclass clazz;
+
+ clazz = env->FindClass("android/media/MediaPlayer2Impl");
+ if (clazz == NULL) {
+ return;
+ }
+
+ fields.context = env->GetFieldID(clazz, "mNativeContext", "J");
+ if (fields.context == NULL) {
+ return;
+ }
+
+ fields.post_event = env->GetStaticMethodID(clazz, "postEventFromNative",
+ "(Ljava/lang/Object;IIILjava/lang/Object;)V");
+ if (fields.post_event == NULL) {
+ return;
+ }
+
+ fields.surface_texture = env->GetFieldID(clazz, "mNativeSurfaceTexture", "J");
+ if (fields.surface_texture == NULL) {
+ return;
+ }
+
+ env->DeleteLocalRef(clazz);
+
+ clazz = env->FindClass("android/net/ProxyInfo");
+ if (clazz == NULL) {
+ return;
+ }
+
+ fields.proxyConfigGetHost =
+ env->GetMethodID(clazz, "getHost", "()Ljava/lang/String;");
+
+ fields.proxyConfigGetPort =
+ env->GetMethodID(clazz, "getPort", "()I");
+
+ fields.proxyConfigGetExclusionList =
+ env->GetMethodID(clazz, "getExclusionListAsString", "()Ljava/lang/String;");
+
+ env->DeleteLocalRef(clazz);
+
+ gBufferingParamsFields.init(env);
+
+ // Modular DRM
+ FIND_CLASS(clazz, "android/media/MediaDrm$MediaDrmStateException");
+ if (clazz) {
+ GET_METHOD_ID(gStateExceptionFields.init, clazz, "<init>", "(ILjava/lang/String;)V");
+ gStateExceptionFields.classId = static_cast<jclass>(env->NewGlobalRef(clazz));
+
+ env->DeleteLocalRef(clazz);
+ } else {
+ ALOGE("JNI android_media_MediaPlayer2_native_init couldn't "
+ "get clazz android/media/MediaDrm$MediaDrmStateException");
+ }
+
+ gPlaybackParamsFields.init(env);
+ gSyncParamsFields.init(env);
+ gVolumeShaperFields.init(env);
+}
+
+static void
+android_media_MediaPlayer2_native_setup(JNIEnv *env, jobject thiz, jobject weak_this)
+{
+ ALOGV("native_setup");
+ sp<MediaPlayer2> mp = new MediaPlayer2();
+ if (mp == NULL) {
+ jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
+ return;
+ }
+
+ // create new listener and give it to MediaPlayer2
+ sp<JNIMediaPlayer2Listener> listener = new JNIMediaPlayer2Listener(env, thiz, weak_this);
+ mp->setListener(listener);
+
+ // Stow our new C++ MediaPlayer2 in an opaque field in the Java object.
+ setMediaPlayer(env, thiz, mp);
+}
+
+static void
+android_media_MediaPlayer2_release(JNIEnv *env, jobject thiz)
+{
+ ALOGV("release");
+ decVideoSurfaceRef(env, thiz);
+ sp<MediaPlayer2> mp = setMediaPlayer(env, thiz, 0);
+ if (mp != NULL) {
+ // this prevents native callbacks after the object is released
+ mp->setListener(0);
+ mp->disconnect();
+ }
+}
+
+static void
+android_media_MediaPlayer2_native_finalize(JNIEnv *env, jobject thiz)
+{
+ ALOGV("native_finalize");
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp != NULL) {
+ ALOGW("MediaPlayer2 finalized without being released");
+ }
+ android_media_MediaPlayer2_release(env, thiz);
+}
+
+static void android_media_MediaPlayer2_set_audio_session_id(JNIEnv *env, jobject thiz,
+ jint sessionId) {
+ ALOGV("set_session_id(): %d", sessionId);
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+ process_media_player_call( env, thiz, mp->setAudioSessionId((audio_session_t) sessionId), NULL,
+ NULL);
+}
+
+static jint android_media_MediaPlayer2_get_audio_session_id(JNIEnv *env, jobject thiz) {
+ ALOGV("get_session_id()");
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return 0;
+ }
+
+ return (jint) mp->getAudioSessionId();
+}
+
+static void
+android_media_MediaPlayer2_setAuxEffectSendLevel(JNIEnv *env, jobject thiz, jfloat level)
+{
+ ALOGV("setAuxEffectSendLevel: level %f", level);
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+ process_media_player_call( env, thiz, mp->setAuxEffectSendLevel(level), NULL, NULL );
+}
+
+static void android_media_MediaPlayer2_attachAuxEffect(JNIEnv *env, jobject thiz, jint effectId) {
+ ALOGV("attachAuxEffect(): %d", effectId);
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+ process_media_player_call( env, thiz, mp->attachAuxEffect(effectId), NULL, NULL );
+}
+
+static jint
+android_media_MediaPlayer2_setRetransmitEndpoint(JNIEnv *env, jobject thiz,
+ jstring addrString, jint port) {
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return INVALID_OPERATION;
+ }
+
+ const char *cAddrString = NULL;
+
+ if (NULL != addrString) {
+ cAddrString = env->GetStringUTFChars(addrString, NULL);
+ if (cAddrString == NULL) { // Out of memory
+ return NO_MEMORY;
+ }
+ }
+ ALOGV("setRetransmitEndpoint: %s:%d",
+ cAddrString ? cAddrString : "(null)", port);
+
+ status_t ret;
+ if (cAddrString && (port > 0xFFFF)) {
+ ret = BAD_VALUE;
+ } else {
+ ret = mp->setRetransmitEndpoint(cAddrString,
+ static_cast<uint16_t>(port));
+ }
+
+ if (NULL != addrString) {
+ env->ReleaseStringUTFChars(addrString, cAddrString);
+ }
+
+ if (ret == INVALID_OPERATION ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ }
+
+ return (jint) ret;
+}
+
+static void
+android_media_MediaPlayer2_setNextMediaPlayer(JNIEnv *env, jobject thiz, jobject java_player)
+{
+ ALOGV("setNextMediaPlayer");
+ sp<MediaPlayer2> thisplayer = getMediaPlayer(env, thiz);
+ if (thisplayer == NULL) {
+ jniThrowException(env, "java/lang/IllegalStateException", "This player not initialized");
+ return;
+ }
+ sp<MediaPlayer2> nextplayer = (java_player == NULL) ? NULL : getMediaPlayer(env, java_player);
+ if (nextplayer == NULL && java_player != NULL) {
+ jniThrowException(env, "java/lang/IllegalStateException", "That player not initialized");
+ return;
+ }
+
+ if (nextplayer == thisplayer) {
+ jniThrowException(env, "java/lang/IllegalArgumentException", "Next player can't be self");
+ return;
+ }
+ // tie the two players together
+ process_media_player_call(
+ env, thiz, thisplayer->setNextMediaPlayer(nextplayer),
+ "java/lang/IllegalArgumentException",
+ "setNextMediaPlayer failed." );
+ ;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////
+// Modular DRM begin
+
+// TODO: investigate if these can be shared with their MediaDrm counterparts
+static void throwDrmStateException(JNIEnv *env, const char *msg, status_t err)
+{
+ ALOGE("Illegal DRM state exception: %s (%d)", msg, err);
+
+ jobject exception = env->NewObject(gStateExceptionFields.classId,
+ gStateExceptionFields.init, static_cast<int>(err),
+ env->NewStringUTF(msg));
+ env->Throw(static_cast<jthrowable>(exception));
+}
+
+// TODO: investigate if these can be shared with their MediaDrm counterparts
+static bool throwDrmExceptionAsNecessary(JNIEnv *env, status_t err, const char *msg = NULL)
+{
+ const char *drmMessage = "Unknown DRM Msg";
+
+ switch (err) {
+ case ERROR_DRM_UNKNOWN:
+ drmMessage = "General DRM error";
+ break;
+ case ERROR_DRM_NO_LICENSE:
+ drmMessage = "No license";
+ break;
+ case ERROR_DRM_LICENSE_EXPIRED:
+ drmMessage = "License expired";
+ break;
+ case ERROR_DRM_SESSION_NOT_OPENED:
+ drmMessage = "Session not opened";
+ break;
+ case ERROR_DRM_DECRYPT_UNIT_NOT_INITIALIZED:
+ drmMessage = "Not initialized";
+ break;
+ case ERROR_DRM_DECRYPT:
+ drmMessage = "Decrypt error";
+ break;
+ case ERROR_DRM_CANNOT_HANDLE:
+ drmMessage = "Unsupported scheme or data format";
+ break;
+ case ERROR_DRM_TAMPER_DETECTED:
+ drmMessage = "Invalid state";
+ break;
+ default:
+ break;
+ }
+
+ String8 vendorMessage;
+ if (err >= ERROR_DRM_VENDOR_MIN && err <= ERROR_DRM_VENDOR_MAX) {
+ vendorMessage = String8::format("DRM vendor-defined error: %d", err);
+ drmMessage = vendorMessage.string();
+ }
+
+ if (err == BAD_VALUE) {
+ jniThrowException(env, "java/lang/IllegalArgumentException", msg);
+ return true;
+ } else if (err == ERROR_DRM_NOT_PROVISIONED) {
+ jniThrowException(env, "android/media/NotProvisionedException", msg);
+ return true;
+ } else if (err == ERROR_DRM_RESOURCE_BUSY) {
+ jniThrowException(env, "android/media/ResourceBusyException", msg);
+ return true;
+ } else if (err == ERROR_DRM_DEVICE_REVOKED) {
+ jniThrowException(env, "android/media/DeniedByServerException", msg);
+ return true;
+ } else if (err == DEAD_OBJECT) {
+ jniThrowException(env, "android/media/MediaDrmResetException",
+ "mediaserver died");
+ return true;
+ } else if (err != OK) {
+ String8 errbuf;
+ if (drmMessage != NULL) {
+ if (msg == NULL) {
+ msg = drmMessage;
+ } else {
+ errbuf = String8::format("%s: %s", msg, drmMessage);
+ msg = errbuf.string();
+ }
+ }
+ throwDrmStateException(env, msg, err);
+ return true;
+ }
+ return false;
+}
+
+static Vector<uint8_t> JByteArrayToVector(JNIEnv *env, jbyteArray const &byteArray)
+{
+ Vector<uint8_t> vector;
+ size_t length = env->GetArrayLength(byteArray);
+ vector.insertAt((size_t)0, length);
+ env->GetByteArrayRegion(byteArray, 0, length, (jbyte *)vector.editArray());
+ return vector;
+}
+
+static void android_media_MediaPlayer2_prepareDrm(JNIEnv *env, jobject thiz,
+ jbyteArray uuidObj, jbyteArray drmSessionIdObj)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+
+ if (uuidObj == NULL) {
+ jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
+ return;
+ }
+
+ Vector<uint8_t> uuid = JByteArrayToVector(env, uuidObj);
+
+ if (uuid.size() != 16) {
+ jniThrowException(
+ env,
+ "java/lang/IllegalArgumentException",
+ "invalid UUID size, expected 16 bytes");
+ return;
+ }
+
+ Vector<uint8_t> drmSessionId = JByteArrayToVector(env, drmSessionIdObj);
+
+ if (drmSessionId.size() == 0) {
+ jniThrowException(
+ env,
+ "java/lang/IllegalArgumentException",
+ "empty drmSessionId");
+ return;
+ }
+
+ status_t err = mp->prepareDrm(uuid.array(), drmSessionId);
+ if (err != OK) {
+ if (err == INVALID_OPERATION) {
+ jniThrowException(
+ env,
+ "java/lang/IllegalStateException",
+ "The player must be in prepared state.");
+ } else if (err == ERROR_DRM_CANNOT_HANDLE) {
+ jniThrowException(
+ env,
+ "android/media/UnsupportedSchemeException",
+ "Failed to instantiate drm object.");
+ } else {
+ throwDrmExceptionAsNecessary(env, err, "Failed to prepare DRM scheme");
+ }
+ }
+}
+
+static void android_media_MediaPlayer2_releaseDrm(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL ) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ return;
+ }
+
+ status_t err = mp->releaseDrm();
+ if (err != OK) {
+ if (err == INVALID_OPERATION) {
+ jniThrowException(
+ env,
+ "java/lang/IllegalStateException",
+ "Can not release DRM in an active player state.");
+ }
+ }
+}
+// Modular DRM end
+// ----------------------------------------------------------------------------
+
+/////////////////////////////////////////////////////////////////////////////////////
+// AudioRouting begin
+static jboolean android_media_MediaPlayer2_setOutputDevice(JNIEnv *env, jobject thiz, jint device_id)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL) {
+ return false;
+ }
+ return mp->setOutputDevice(device_id) == NO_ERROR;
+}
+
+static jint android_media_MediaPlayer2_getRoutedDeviceId(JNIEnv *env, jobject thiz)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL) {
+ return AUDIO_PORT_HANDLE_NONE;
+ }
+ return mp->getRoutedDeviceId();
+}
+
+static void android_media_MediaPlayer2_enableDeviceCallback(
+ JNIEnv* env, jobject thiz, jboolean enabled)
+{
+ sp<MediaPlayer2> mp = getMediaPlayer(env, thiz);
+ if (mp == NULL) {
+ return;
+ }
+
+ status_t status = mp->enableAudioDeviceCallback(enabled);
+ if (status != NO_ERROR) {
+ jniThrowException(env, "java/lang/IllegalStateException", NULL);
+ ALOGE("enable device callback failed: %d", status);
+ }
+}
+
+// AudioRouting end
+// ----------------------------------------------------------------------------
+
+static const JNINativeMethod gMethods[] = {
+ {
+ "nativeSetDataSource",
+ "(Landroid/media/Media2HTTPService;Ljava/lang/String;[Ljava/lang/String;"
+ "[Ljava/lang/String;)V",
+ (void *)android_media_MediaPlayer2_setDataSourceAndHeaders
+ },
+
+ {"_setDataSource", "(Ljava/io/FileDescriptor;JJ)V", (void *)android_media_MediaPlayer2_setDataSourceFD},
+ {"_setDataSource", "(Landroid/media/Media2DataSource;)V",(void *)android_media_MediaPlayer2_setDataSourceCallback },
+ {"_setVideoSurface", "(Landroid/view/Surface;)V", (void *)android_media_MediaPlayer2_setVideoSurface},
+ {"getBufferingParams", "()Landroid/media/BufferingParams;", (void *)android_media_MediaPlayer2_getBufferingParams},
+ {"setBufferingParams", "(Landroid/media/BufferingParams;)V", (void *)android_media_MediaPlayer2_setBufferingParams},
+ {"_prepare", "()V", (void *)android_media_MediaPlayer2_prepare},
+ {"prepareAsync", "()V", (void *)android_media_MediaPlayer2_prepareAsync},
+ {"_start", "()V", (void *)android_media_MediaPlayer2_start},
+ {"_stop", "()V", (void *)android_media_MediaPlayer2_stop},
+ {"getVideoWidth", "()I", (void *)android_media_MediaPlayer2_getVideoWidth},
+ {"getVideoHeight", "()I", (void *)android_media_MediaPlayer2_getVideoHeight},
+ {"native_getMetrics", "()Landroid/os/PersistableBundle;", (void *)android_media_MediaPlayer2_native_getMetrics},
+ {"setPlaybackParams", "(Landroid/media/PlaybackParams;)V", (void *)android_media_MediaPlayer2_setPlaybackParams},
+ {"getPlaybackParams", "()Landroid/media/PlaybackParams;", (void *)android_media_MediaPlayer2_getPlaybackParams},
+ {"setSyncParams", "(Landroid/media/SyncParams;)V", (void *)android_media_MediaPlayer2_setSyncParams},
+ {"getSyncParams", "()Landroid/media/SyncParams;", (void *)android_media_MediaPlayer2_getSyncParams},
+ {"_seekTo", "(JI)V", (void *)android_media_MediaPlayer2_seekTo},
+ {"_notifyAt", "(J)V", (void *)android_media_MediaPlayer2_notifyAt},
+ {"_pause", "()V", (void *)android_media_MediaPlayer2_pause},
+ {"isPlaying", "()Z", (void *)android_media_MediaPlayer2_isPlaying},
+ {"getCurrentPosition", "()I", (void *)android_media_MediaPlayer2_getCurrentPosition},
+ {"getDuration", "()I", (void *)android_media_MediaPlayer2_getDuration},
+ {"_release", "()V", (void *)android_media_MediaPlayer2_release},
+ {"_reset", "()V", (void *)android_media_MediaPlayer2_reset},
+ {"_getAudioStreamType", "()I", (void *)android_media_MediaPlayer2_getAudioStreamType},
+ {"setParameter", "(ILandroid/os/Parcel;)Z", (void *)android_media_MediaPlayer2_setParameter},
+ {"setLooping", "(Z)V", (void *)android_media_MediaPlayer2_setLooping},
+ {"isLooping", "()Z", (void *)android_media_MediaPlayer2_isLooping},
+ {"_setVolume", "(FF)V", (void *)android_media_MediaPlayer2_setVolume},
+ {"native_invoke", "(Landroid/os/Parcel;Landroid/os/Parcel;)I",(void *)android_media_MediaPlayer2_invoke},
+ {"native_setMetadataFilter", "(Landroid/os/Parcel;)I", (void *)android_media_MediaPlayer2_setMetadataFilter},
+ {"native_getMetadata", "(ZZLandroid/os/Parcel;)Z", (void *)android_media_MediaPlayer2_getMetadata},
+ {"native_init", "()V", (void *)android_media_MediaPlayer2_native_init},
+ {"native_setup", "(Ljava/lang/Object;)V", (void *)android_media_MediaPlayer2_native_setup},
+ {"native_finalize", "()V", (void *)android_media_MediaPlayer2_native_finalize},
+ {"getAudioSessionId", "()I", (void *)android_media_MediaPlayer2_get_audio_session_id},
+ {"setAudioSessionId", "(I)V", (void *)android_media_MediaPlayer2_set_audio_session_id},
+ {"_setAuxEffectSendLevel", "(F)V", (void *)android_media_MediaPlayer2_setAuxEffectSendLevel},
+ {"attachAuxEffect", "(I)V", (void *)android_media_MediaPlayer2_attachAuxEffect},
+ {"native_setRetransmitEndpoint", "(Ljava/lang/String;I)I", (void *)android_media_MediaPlayer2_setRetransmitEndpoint},
+ {"setNextMediaPlayer", "(Landroid/media/MediaPlayer2;)V", (void *)android_media_MediaPlayer2_setNextMediaPlayer},
+ // Modular DRM
+ { "_prepareDrm", "([B[B)V", (void *)android_media_MediaPlayer2_prepareDrm },
+ { "_releaseDrm", "()V", (void *)android_media_MediaPlayer2_releaseDrm },
+
+ // AudioRouting
+ {"native_setOutputDevice", "(I)Z", (void *)android_media_MediaPlayer2_setOutputDevice},
+ {"native_getRoutedDeviceId", "()I", (void *)android_media_MediaPlayer2_getRoutedDeviceId},
+ {"native_enableDeviceCallback", "(Z)V", (void *)android_media_MediaPlayer2_enableDeviceCallback},
+};
+
+// This function only registers the native methods
+static int register_android_media_MediaPlayer2Impl(JNIEnv *env)
+{
+ return AndroidRuntime::registerNativeMethods(env,
+ "android/media/MediaPlayer2Impl", gMethods, NELEM(gMethods));
+}
+
+jint JNI_OnLoad(JavaVM* vm, void* /* reserved */)
+{
+ JNIEnv* env = NULL;
+ jint result = -1;
+
+ if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
+ ALOGE("ERROR: GetEnv failed\n");
+ goto bail;
+ }
+ assert(env != NULL);
+
+ if (register_android_media_MediaPlayer2Impl(env) < 0) {
+ ALOGE("ERROR: MediaPlayer2 native registration failed\n");
+ goto bail;
+ }
+
+ /* success -- return valid version number */
+ result = JNI_VERSION_1_4;
+
+bail:
+ return result;
+}
+
+// KTHXBYE
diff --git a/media/lib/remotedisplay/Android.mk b/media/lib/remotedisplay/Android.mk
index ea1ac2b..e88c0f1 100644
--- a/media/lib/remotedisplay/Android.mk
+++ b/media/lib/remotedisplay/Android.mk
@@ -22,9 +22,7 @@
LOCAL_MODULE:= com.android.media.remotedisplay
LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, java) \
- $(call all-aidl-files-under, java)
+LOCAL_SRC_FILES := $(call all-java-files-under, java)
include $(BUILD_JAVA_LIBRARY)
diff --git a/media/lib/signer/Android.mk b/media/lib/signer/Android.mk
index b0d3177..69ca4d2 100644
--- a/media/lib/signer/Android.mk
+++ b/media/lib/signer/Android.mk
@@ -22,9 +22,7 @@
LOCAL_MODULE:= com.android.mediadrm.signer
LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, java) \
- $(call all-aidl-files-under, java)
+LOCAL_SRC_FILES := $(call all-java-files-under, java)
include $(BUILD_JAVA_LIBRARY)
diff --git a/media/lib/tvremote/Android.mk b/media/lib/tvremote/Android.mk
index 06838c2..1ffdd62 100644
--- a/media/lib/tvremote/Android.mk
+++ b/media/lib/tvremote/Android.mk
@@ -22,9 +22,7 @@
LOCAL_MODULE:= com.android.media.tv.remoteprovider
LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, java) \
- $(call all-aidl-files-under, java)
+LOCAL_SRC_FILES := $(call all-java-files-under, java)
LOCAL_DEX_PREOPT := false
@@ -45,4 +43,4 @@
LOCAL_SRC_FILES := $(LOCAL_MODULE)
-include $(BUILD_PREBUILT)
\ No newline at end of file
+include $(BUILD_PREBUILT)
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
index cf5882f..d8c975f 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
@@ -25,6 +25,7 @@
import android.hardware.camera2.ICameraDeviceUser;
import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.impl.CaptureResultExtras;
+import android.hardware.camera2.impl.PhysicalCaptureResultInfo;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
@@ -230,8 +231,8 @@
* android.hardware.camera2.CaptureResultExtras)
*/
@Override
- public void onResultReceived(CameraMetadataNative result, CaptureResultExtras resultExtras)
- throws RemoteException {
+ public void onResultReceived(CameraMetadataNative result, CaptureResultExtras resultExtras,
+ PhysicalCaptureResultInfo physicalResults[]) throws RemoteException {
// TODO Auto-generated method stub
}
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
index 4c96d89..30561ba 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
@@ -35,6 +35,7 @@
import android.hardware.camera2.ICameraDeviceUser;
import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.impl.CaptureResultExtras;
+import android.hardware.camera2.impl.PhysicalCaptureResultInfo;
import android.hardware.camera2.params.OutputConfiguration;
import android.hardware.camera2.utils.SubmitInfo;
import android.media.Image;
@@ -135,8 +136,8 @@
* android.hardware.camera2.impl.CameraMetadataNative,
* android.hardware.camera2.CaptureResultExtras)
*/
- public void onResultReceived(CameraMetadataNative result, CaptureResultExtras resultExtras)
- throws RemoteException {
+ public void onResultReceived(CameraMetadataNative result, CaptureResultExtras resultExtras,
+ PhysicalCaptureResultInfo physicalResults[]) throws RemoteException {
// TODO Auto-generated method stub
}
@@ -445,12 +446,14 @@
// Test both single request and streaming request.
verify(mMockCb, timeout(WAIT_FOR_COMPLETE_TIMEOUT_MS).times(1)).onResultReceived(
argThat(matcher),
- any(CaptureResultExtras.class));
+ any(CaptureResultExtras.class),
+ any(PhysicalCaptureResultInfo[].class));
verify(mMockCb, timeout(WAIT_FOR_COMPLETE_TIMEOUT_MS).atLeast(NUM_CALLBACKS_CHECKED))
.onResultReceived(
argThat(matcher),
- any(CaptureResultExtras.class));
+ any(CaptureResultExtras.class),
+ any(PhysicalCaptureResultInfo[].class));
}
@SmallTest
diff --git a/nfc-extras/tests/Android.mk b/nfc-extras/tests/Android.mk
index 34d6508..51396d3 100644
--- a/nfc-extras/tests/Android.mk
+++ b/nfc-extras/tests/Android.mk
@@ -19,7 +19,7 @@
LOCAL_MODULE_TAGS := tests
LOCAL_JAVA_LIBRARIES := \
- android.test.runner \
+ android.test.runner.stubs \
com.android.nfc_extras \
android.test.base.stubs
diff --git a/packages/BackupRestoreConfirmation/AndroidManifest.xml b/packages/BackupRestoreConfirmation/AndroidManifest.xml
index 8141fa7..e67b3be 100644
--- a/packages/BackupRestoreConfirmation/AndroidManifest.xml
+++ b/packages/BackupRestoreConfirmation/AndroidManifest.xml
@@ -30,6 +30,7 @@
android:title=""
android:windowSoftInputMode="stateAlwaysHidden"
android:excludeFromRecents="true"
+ android:launchMode="singleTop"
android:exported="true" >
</activity>
</application>
diff --git a/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java b/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java
index 9fa7a664..d6b6bf8 100644
--- a/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java
+++ b/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/BackupRestoreConfirmation.java
@@ -52,7 +52,9 @@
static final String TAG = "BackupRestoreConfirmation";
static final boolean DEBUG = true;
- static final String DID_ACKNOWLEDGE = "did_acknowledge";
+ static final String KEY_DID_ACKNOWLEDGE = "did_acknowledge";
+ static final String KEY_TOKEN = "token";
+ static final String KEY_ACTION = "action";
static final int MSG_START_BACKUP = 1;
static final int MSG_BACKUP_PACKAGE = 2;
@@ -69,6 +71,7 @@
int mToken;
boolean mIsEncrypted;
boolean mDidAcknowledge;
+ String mAction;
TextView mStatusView;
TextView mCurPassword;
@@ -134,26 +137,9 @@
super.onCreate(icicle);
final Intent intent = getIntent();
- final String action = intent.getAction();
- final int layoutId;
- final int titleId;
- if (action.equals(FullBackup.FULL_BACKUP_INTENT_ACTION)) {
- layoutId = R.layout.confirm_backup;
- titleId = R.string.backup_confirm_title;
- } else if (action.equals(FullBackup.FULL_RESTORE_INTENT_ACTION)) {
- layoutId = R.layout.confirm_restore;
- titleId = R.string.restore_confirm_title;
- } else {
- Slog.w(TAG, "Backup/restore confirmation activity launched with invalid action!");
- finish();
- return;
- }
-
- mToken = intent.getIntExtra(FullBackup.CONF_TOKEN_INTENT_EXTRA, -1);
- if (mToken < 0) {
- Slog.e(TAG, "Backup/restore confirmation requested but no token passed!");
- finish();
+ boolean tokenValid = setTokenOrFinish(intent, icicle);
+ if (!tokenValid) { // already called finish()
return;
}
@@ -169,6 +155,61 @@
mObserver.setHandler(mHandler);
}
+ setViews(intent, icicle);
+ }
+
+ @Override
+ public void onNewIntent(Intent intent) {
+ super.onNewIntent(intent);
+ setIntent(intent);
+
+ boolean tokenValid = setTokenOrFinish(intent, null);
+ if (!tokenValid) { // already called finish()
+ return;
+ }
+
+ setViews(intent, null);
+ }
+
+ private boolean setTokenOrFinish(Intent intent, Bundle icicle) {
+ mToken = intent.getIntExtra(FullBackup.CONF_TOKEN_INTENT_EXTRA, -1);
+
+ // for relaunch, we try to use the last token before exit
+ if (icicle != null) {
+ mToken = icicle.getInt(KEY_TOKEN, mToken);
+ }
+
+ if (mToken < 0) {
+ Slog.e(TAG, "Backup/restore confirmation requested but no token passed!");
+ finish();
+ return false;
+ }
+
+ return true;
+ }
+
+ private void setViews(Intent intent, Bundle icicle) {
+ mAction = intent.getAction();
+
+ // for relaunch, we try to use the last action before exit
+ if (icicle != null) {
+ mAction = icicle.getString(KEY_ACTION, mAction);
+ }
+
+ final int layoutId;
+ final int titleId;
+ if (mAction.equals(FullBackup.FULL_BACKUP_INTENT_ACTION)) {
+ layoutId = R.layout.confirm_backup;
+ titleId = R.string.backup_confirm_title;
+ } else if (mAction.equals(FullBackup.FULL_RESTORE_INTENT_ACTION)) {
+ layoutId = R.layout.confirm_restore;
+ titleId = R.string.restore_confirm_title;
+ } else {
+ Slog.w(TAG, "Backup/restore confirmation activity launched with invalid action!");
+ finish();
+ return;
+ }
+
setTitle(titleId);
setContentView(layoutId);
@@ -202,7 +243,7 @@
// if we're a relaunch we may need to adjust button enable state
if (icicle != null) {
- mDidAcknowledge = icicle.getBoolean(DID_ACKNOWLEDGE, false);
+ mDidAcknowledge = icicle.getBoolean(KEY_DID_ACKNOWLEDGE, false);
mAllowButton.setEnabled(!mDidAcknowledge);
mDenyButton.setEnabled(!mDidAcknowledge);
}
@@ -249,7 +290,9 @@
@Override
protected void onSaveInstanceState(Bundle outState) {
- outState.putBoolean(DID_ACKNOWLEDGE, mDidAcknowledge);
+ outState.putBoolean(KEY_DID_ACKNOWLEDGE, mDidAcknowledge);
+ outState.putInt(KEY_TOKEN, mToken);
+ outState.putString(KEY_ACTION, mAction);
}
void sendAcknowledgement(int token, boolean allow, IFullBackupRestoreObserver observer) {
diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java b/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java
index 6c74418..f6a259d 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/model/PrintSpoolerService.java
@@ -889,7 +889,7 @@
private PersistenceManager() {
mStatePersistFile = new AtomicFile(new File(getFilesDir(),
- PERSIST_FILE_NAME));
+ PERSIST_FILE_NAME), "print-spooler");
}
public void writeStateLocked() {
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java b/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java
index 7935440..5be0176 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/FusedPrintersProvider.java
@@ -547,7 +547,7 @@
private PersistenceManager(final Activity activity, final int internalLoaderId) {
mStatePersistFile = new AtomicFile(new File(activity.getFilesDir(),
- PERSIST_FILE_NAME));
+ PERSIST_FILE_NAME), "printer-history");
// Initialize enabled services to make sure they are set are the read task might be done
// before the loader updated the services the first time.
diff --git a/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java b/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java
index faa10cc..8b00ed0 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java
@@ -23,7 +23,6 @@
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
-
import com.android.printspooler.R;
/**
@@ -411,7 +410,7 @@
mPrintButton.offsetTopAndBottom(dy);
- mDraggableContent.notifyAccessibilitySubtreeChanged();
+ mDraggableContent.notifySubtreeAccessibilityStateChangedIfNeeded();
onDragProgress(progress);
}
diff --git a/packages/SettingsLib/res/values-af/strings.xml b/packages/SettingsLib/res/values-af/strings.xml
index 93c0e10..b3ea9fb 100644
--- a/packages/SettingsLib/res/values-af/strings.xml
+++ b/packages/SettingsLib/res/values-af/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Inligtingruiling"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Draadlose skermsertifisering"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Aktiveer Wi-Fi-woordryke aanmelding"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Laat altyd Wi-Fi-swerfskanderings toe"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Gekoppelde MAC-verewekansiging"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobiele data is altyd aktief"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Hardewareversnelling vir verbinding"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Wys Bluetooth-toestelle sonder name"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Voer gasheernaam van DNS-verskaffer in"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Wys opsies vir draadlose skermsertifisering"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Verhoog Wi-Fi-aantekeningvlak, wys per SSID RSSI in Wi‑Fi-kieser"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Laat toe of verbied Wi-Fi-swerfskanderings op grond van die hoeveelheid dataverkeer wat op die koppelvlak teenwoordig is"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Verewekansig MAC-adres wanneer daar aan Wi‑Fi-netwerke gekoppel word"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Loggerbuffer se groottes"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Kies loggergroottes per logbuffer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Maak logskrywer se aanhoudende berging skoon?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Geregistreer"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Nie geregistreer nie"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Onbeskikbaar"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d toestelle is gekoppel</item>
+ <item quantity="one">%1$d toestel is gekoppel</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Meer tyd."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Minder tyd."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-am/arrays.xml b/packages/SettingsLib/res/values-am/arrays.xml
index a5fb9cf..9e8749b 100644
--- a/packages/SettingsLib/res/values-am/arrays.xml
+++ b/packages/SettingsLib/res/values-am/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"ስዕሉ አልፎ የፈሰሰባቸው አካባቢዎችን አሳይ"</item>
<item msgid="2290859360633824369">"ቀይ እና አረንጓዴ የማይለይባቸው ቦታዎች አሳይ"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (ነባሪ)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"መደበኛ ወሰኖች"</item>
<item msgid="4071574792028999443">"ምንም የዳራ ሂደቶች የሉም"</item>
diff --git a/packages/SettingsLib/res/values-am/strings.xml b/packages/SettingsLib/res/values-am/strings.xml
index 83fd2af..466c01b 100644
--- a/packages/SettingsLib/res/values-am/strings.xml
+++ b/packages/SettingsLib/res/values-am/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"አውታረ መረብ"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"የገመድ አልባ ማሳያ እውቅና ማረጋገጫ"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"የWi‑Fi ተጨማሪ ቃላት ምዝግብ ማስታወሻ መያዝ"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"ሁልጊዜ የWi‑Fi ማንቀሳቀስ ቅኝቶችን ይፍቀዱ"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"የተገናኘ የማክ ዘፈቀደ መስሪያ"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"የተንቀሳቃሽ ስልክ ውሂብ ሁልጊዜ ገቢር ነው"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"የሃርድዌር ማቀላጠፊያን በማስተሳሰር ላይ"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"የብሉቱዝ መሣሪያዎችን ያለ ስሞች አሳይ"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"የዲኤንኤስ አቅራቢ አስተናጋጅ ስም ያስገቡ"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"የገመድ አልባ ማሳያ እውቅና ማረጋገጫ አማራጮችን አሳይ"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"የWi‑Fi ምዝግብ ማስታወሻ አያያዝ ደረጃ ጨምር፣ በWi‑Fi መምረጫ ውስጥ በአንድ SSID RSSI አሳይ"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"በበይነገጹ ላይ ባለው የውሂብ ትራፊክ መጠን ላይ ተመስርተው የWi‑Fi ማንቀሳቀስ ቅኝቶችን ይፍቀዱ/ይከልክሉ"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"ከWi-Fi አውታረ መረቦች ጋር ሲገናኙ የማክ አድራሻን በዘፈቀደ ይስሩ"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"የምዝግብ ማስታወሻ ያዥ መጠኖች"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"በአንድ ምዝግብ ማስታወሻ ቋጥ የሚኖረው የምዝግብ ማስታወሻ ያዥ መጠኖች ይምረጡ"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"የምዝግብ ማስታወሻ ያዢ ቋሚ ማከማቻ ይጽዳ?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"የሃርድዌር ንብርብሮች ዝማኔዎችን አሳይ"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"የሃርድዌር ንብርብሮች ሲዘምኑ አረንጓዴ አብራ"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"የጂፒዩ አልፎ መሳል አርም"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"የGPU አሳዪ አዘጋጅ"</string>
<string name="disable_overlays" msgid="2074488440505934665">"የHW ተደራቢዎችን አሰናክል"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"ለማያ ገጽ ማቀናበሪያ ሁልጊዜ GPU ተጠቀም"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"የቀለም ህዋ አስመስል"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"የተመዘገበ"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"አልተመዘገበም"</string>
<string name="status_unavailable" msgid="7862009036663793314">"አይገኝም"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d መሣሪያዎች ተገናኝተዋል</item>
+ <item quantity="other">%1$d መሣሪያዎች ተገናኝተዋል</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"ተጨማሪ ጊዜ።"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"ያነሰ ጊዜ።"</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"አብራ"</string>
+ <string name="cancel" msgid="6859253417269739139">"ይቅር"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"አትረብሽን አብራ"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"በጭራሽ"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"ቅድሚያ የሚሰጠው ብቻ"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>። <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ar/strings.xml b/packages/SettingsLib/res/values-ar/strings.xml
index a541cbd..3149af0 100644
--- a/packages/SettingsLib/res/values-ar/strings.xml
+++ b/packages/SettingsLib/res/values-ar/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"الشبكات"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"شهادة عرض شاشة لاسلكي"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"تمكين تسجيل Wi‑Fi Verbose"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"السماح دائمًا بعمليات فحص Wi-Fi للتجوال"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"اختيار عشوائي لعنوان MAC"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"بيانات الجوّال نشطة دائمًا"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"تسريع الأجهزة للتوصيل"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"عرض أجهزة البلوتوث بدون أسماء"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"أدخل اسم مضيف مزوّد نظام أسماء النطاقات"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"عرض خيارات شهادة عرض شاشة لاسلكي"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"زيادة مستوى تسجيل Wi-Fi، وعرض لكل SSID RSSI في منتقي Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"السماح/عدم السماح بعمليات فحص Wi-Fi للتجوال بناءً على حجم حركة البيانات في الواجهة"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"اختيار عشوائي لعنوان MAC عند الاتصال بشبكات Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"أحجام ذاكرة التخزين المؤقت للتسجيل"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"حدد أحجامًا أكبر لكل ذاكرة تخزين مؤقت للتسجيل"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"هل تريد محو سعة التخزين الدائمة للمسجِّل؟"</string>
@@ -403,4 +403,14 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"مُسجَّل"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"غير مُسجَّل"</string>
<string name="status_unavailable" msgid="7862009036663793314">"غير متاح"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="zero">عدد الأجهزة المتصلة %1$d</item>
+ <item quantity="two">عدد الأجهزة المتصلة %1$d</item>
+ <item quantity="few">عدد الأجهزة المتصلة %1$d</item>
+ <item quantity="many">عدد الأجهزة المتصلة %1$d</item>
+ <item quantity="other">عدد الأجهزة المتصلة %1$d</item>
+ <item quantity="one">عدد الأجهزة المتصلة %1$d</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"وقت أكثر."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"وقت أقل."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-az/arrays.xml b/packages/SettingsLib/res/values-az/arrays.xml
index 9048d93..b4ee3cc 100644
--- a/packages/SettingsLib/res/values-az/arrays.xml
+++ b/packages/SettingsLib/res/values-az/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Böyütmə sahələrini göstər"</item>
<item msgid="2290859360633824369">"Daltonizm üçün sahələri göstərin"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (Defolt)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Standart limit"</item>
<item msgid="4071574792028999443">"Fon proses yoxdur"</item>
diff --git a/packages/SettingsLib/res/values-az/strings.xml b/packages/SettingsLib/res/values-az/strings.xml
index 5b4e45c..80536e1 100644
--- a/packages/SettingsLib/res/values-az/strings.xml
+++ b/packages/SettingsLib/res/values-az/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Şəbəkələşmə"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Simsiz displey sertifikatlaşması"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Wi‑Fi Çoxsözlü Girişə icazə verin"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Wi‑Fi axtarışlarına həmişə icazə verin"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Qoşulmuş MAC Randomizasiyası"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobil data həmişə aktiv"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Birləşmə üçün avadanlıq akselerasiyası"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Bluetooth cihazlarını adsız göstərin"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS provayderinin host adını daxil edin"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Simsiz displey sertifikatlaşması üçün seçimləri göstərir"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi‑Fi giriş səviyyəsini qaldırın, Wi‑Fi seçəndə hər SSID RSSI üzrə göstərin"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Wi‑Fi Axtarışlarına data trafikinə əsasən İcazə verin/Qadağan edin"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Wi‑Fi şəbkələrinə qoşulan zaman ixtiyari MAC ünvanı seçin"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Logger bufer ölçüləri"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Hər jurnal buferinı Logger ölçüsü seçin"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Loqqerin davamlı yaddaşı silinsin?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Avadanlıq düzənlərinin güncəlləşməsini göstərin"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Onlar güncəllənəndən sonra avadanlıq qatlarında işartı olsun"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"GPU böyütməsini sazlayın"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU Renderi ayarlayın"</string>
<string name="disable_overlays" msgid="2074488440505934665">"HW overlay deaktiv edin"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Həmişə ekran kompozisiyası üçün GPU istifadə edin"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Rəng sahəsini simulyasiya edin"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Qeydiyyatlı"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Qeydiyyatsız"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Əlçatmazdır"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d cihaz qoşuludur</item>
+ <item quantity="one">%1$d cihaz qoşuludur</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Daha çox vaxt."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Daha az vaxt."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Aktiv edin"</string>
+ <string name="cancel" msgid="6859253417269739139">"Ləğv et"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"\"Narahat Etməyin\" rejimini aktiv edin"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Heç vaxt"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Yalnız prioritet"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</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 0545021..9ebb651 100644
--- a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
+++ b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Umrežavanje"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Sertifikacija bežičnog ekrana"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Omogući detaljniju evidenciju za Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Uvek dozvoli skeniranje Wi‑Fi-ja u romingu"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Nasumičan izbor MAC adrese tokom povezivanja"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobilni podaci su uvek aktivni"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Hardversko ubrzanje privezivanja"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Prikaži Bluetooth uređaje bez naziva"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Unesite ime hosta dobavljača usluge DNS-a"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Prikaz opcija za sertifikaciju bežičnog ekrana"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Povećava nivo evidentiranja za Wi‑Fi. Prikaz po SSID RSSI-u u biraču Wi‑Fi mreže"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Dozvoli/zabrani skeniranje Wi-Fi-ja u romingu na osnovu prisutnog protoka podataka na interfejsu"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Izaberi nasumičnu MAC adresu tokom povezivanja na Wi‑Fi mreže"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Veličine bafera podataka u programu za evidentiranje"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Izaberite veličine po baferu evidencije"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Želite li da obrišete stalni memorijski prostor programa za evidentiranje?"</string>
@@ -403,4 +403,11 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrovan je"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Nije registrovan"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Nedostupno"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">Povezan je %1$d uređaj</item>
+ <item quantity="few">Povezana su %1$d uređaja</item>
+ <item quantity="other">Povezano je %1$d uređaja</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Više vremena."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Manje vremena."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-be/arrays.xml b/packages/SettingsLib/res/values-be/arrays.xml
index ce5ca02..8253b39c 100644
--- a/packages/SettingsLib/res/values-be/arrays.xml
+++ b/packages/SettingsLib/res/values-be/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Паказаць вобласці з перабольшваннем"</item>
<item msgid="2290859360633824369">"Паказаць вобласці для дэйтэранамаліі"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (стандартны)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Стандартны ліміт"</item>
<item msgid="4071574792028999443">"Няма фонавых працэсаў"</item>
diff --git a/packages/SettingsLib/res/values-be/strings.xml b/packages/SettingsLib/res/values-be/strings.xml
index 05be2228..9ea825d 100644
--- a/packages/SettingsLib/res/values-be/strings.xml
+++ b/packages/SettingsLib/res/values-be/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Сеткі"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Сертыфікацыя бесправаднога дысплея"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Уключыць падрабязны журнал Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Заўсёды дазваляць роўмінгавае сканіраванне Wi‑Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Стварэнне выпадковых MAC-адрасоў пры падключэнні па Wi-Fi"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Мабільная перадача даных заўсёды актыўная"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Апаратнае паскарэнне ў рэжыме мадэма"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Паказваць прылады Bluetooth без назваў"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Увядзіце імя вузла аператара DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Паказаць опцыі сертыфікацыі бесправаднога дысплея"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Падвыс. узровень дэтал-цыі журнала Wi‑Fi у залежн. ад SSID RSSI у Wi‑Fi Picker"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Дазволіць/забараніць роўмінгавае сканіраванне Wi‑Fi ў залежнасці ад аб\'ёму трафіку даных у інтэрфейсе"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Генерыраваць выпадковы MAC-адрас пры падключэнні да сетак Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Памеры буфера для сродку вядзення журнала"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Выберыце памеры сродку вядзення журнала для буфераў журнала"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Ачысціць пастаяннае сховішча журнала?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Паказаць абнаўленнi апаратнага пласта"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Апаратныя пласты набываюць зялёны колер, калi абнаўляюцца"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Адладка перамалёўкі GPU"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Задаць рэндэрар графікі"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Адкл. апаратн. накладання"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Заўсёды выкарыстоўваць GPU для экраннай кампаноўкі"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Сімуляцыя каляр. прасторы"</string>
@@ -403,4 +402,18 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Зарэгістраваны"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Не зарэгістраваны"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Адсутнічае"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d прылада падключана</item>
+ <item quantity="few">%1$d прылады падключаны</item>
+ <item quantity="many">%1$d прылад падключана</item>
+ <item quantity="other">%1$d прылады падключана</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Больш часу."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Менш часу."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Уключыць"</string>
+ <string name="cancel" msgid="6859253417269739139">"Скасаваць"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Уключэнне рэжыму \"Не турбаваць\""</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Ніколі"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Толькі прыярытэтныя"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-bg/strings.xml b/packages/SettingsLib/res/values-bg/strings.xml
index ea67a98..8186a03 100644
--- a/packages/SettingsLib/res/values-bg/strings.xml
+++ b/packages/SettingsLib/res/values-bg/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Мрежи"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Безжичен дисплей"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"„Многословно“ регистр. на Wi‑Fi: Актив."</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Сканирането за роуминг на Wi-Fi да е разрешено винаги"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Рандомизиране на свързания MAC адрес"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Винаги активни мобилни данни"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Хардуерно ускорение за тетъринга"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Показване на устройствата с Bluetooth без имена"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Въведете името на хоста на DNS доставчика"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Показване на опциите за сертифициране на безжичния дисплей"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"По-подробно регистр. на Wi‑Fi – данни за RSSI на SSID в инстр. за избор на Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Разрешаване/забраняване на сканирането за роуминг на Wi-Fi въз основа на посочения в интерфейса обем на трафика на данни"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Рандомизиране на MAC адреса при свързване с Wi-Fi мрежи"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Размери на регистрац. буфери"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Размер на един рег. буфер: Избор"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Да се изчистят ли трайно съхраняваните регистрационни данни?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Регистрирано"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Не е регистрирано"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Няма данни"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d устройства са свързани</item>
+ <item quantity="one">%1$d устройство е свързано</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Повече време."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"По-малко време."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-bn/arrays.xml b/packages/SettingsLib/res/values-bn/arrays.xml
index 60869c4..a93a9aa 100644
--- a/packages/SettingsLib/res/values-bn/arrays.xml
+++ b/packages/SettingsLib/res/values-bn/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"অতিবর্ণনা এলাকা দেখান"</item>
<item msgid="2290859360633824369">"বর্ণান্ধতার জন্য এলাকা দেখান"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (ডিফল্ট)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"মানক সীমা"</item>
<item msgid="4071574792028999443">"কোন ব্যাকগ্রাউন্ড প্রক্রিয়া নেই"</item>
diff --git a/packages/SettingsLib/res/values-bn/strings.xml b/packages/SettingsLib/res/values-bn/strings.xml
index f30ed2b..2f6748f 100644
--- a/packages/SettingsLib/res/values-bn/strings.xml
+++ b/packages/SettingsLib/res/values-bn/strings.xml
@@ -142,7 +142,7 @@
<string name="tts_play_example_summary" msgid="8029071615047894486">"কথন সংশ্লেষণের উপর একটি ছোট ডেমো প্লে করুন"</string>
<string name="tts_install_data_title" msgid="4264378440508149986">"ভয়েস ডেটা ইনস্টল করুন"</string>
<string name="tts_install_data_summary" msgid="5742135732511822589">"বিবৃতি সংশ্লেষণের জন্য প্রয়োজনীয় ভয়েস ডেটা ইনস্টল করুন"</string>
- <string name="tts_engine_security_warning" msgid="8786238102020223650">"এই বিবৃতি সংশ্লেষণ ইঞ্জিন হয়তো পাসওয়ার্ড এবং ক্রেডিট কার্ড নম্বর সহ কথ্য সমস্ত টেক্সট সংগ্রহ করতে সক্ষম হতে পারে। এটি <xliff:g id="TTS_PLUGIN_ENGINE_NAME">%s</xliff:g> ইঞ্জিন থেকে আসে। এই বিবৃতি সংশ্লেষণ ইঞ্জিন সক্রিয় করবেন?"</string>
+ <string name="tts_engine_security_warning" msgid="8786238102020223650">"এই বিবৃতি সংশ্লেষণ ইঞ্জিন হয়ত পাসওয়ার্ড এবং ক্রেডিট কার্ড নম্বর সহ কথ্য সমস্ত টেক্সট সংগ্রহ করতে সক্ষম হতে পারে। এটি <xliff:g id="TTS_PLUGIN_ENGINE_NAME">%s</xliff:g> ইঞ্জিন থেকে আসে। এই বিবৃতি সংশ্লেষণ ইঞ্জিন সক্রিয় করবেন?"</string>
<string name="tts_engine_network_required" msgid="1190837151485314743">"পাঠ্য থেকে ভাষ্য আউটপুটের জন্য এই ভাষার একটি কাজ করছে এমন নেটওয়ার্ক সংযোগ প্রয়োজন।"</string>
<string name="tts_default_sample_string" msgid="4040835213373086322">"এটি হল ভাষ্য সংশ্লেষণের একটি উদাহরণ"</string>
<string name="tts_status_title" msgid="7268566550242584413">"ডিফল্ট ভাষা স্থিতি"</string>
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"নেটওয়ার্কিং"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"ওয়্যারলেস ডিসপ্লে সার্টিফিকেশন"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"ওয়াই-ফাই ভারবোস লগিং সক্ষম করুন"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"সর্বদা ওয়াই ফাই রোম স্ক্যানকে অনুমতি দিন"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"সংযুক্ত MAC র্যান্ডমাইজেশন"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"মোবাইল ডেটা সব সময় সক্রিয় থাক"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"টিথারিং হার্ডওয়্যার অ্যাক্সিলারেশন"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"নামহীন ব্লুটুথ ডিভাইসগুলি দেখুন"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"ডিএনএস প্রদানকারীর হোস্টনেম লিখুন"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"ওয়্যারলেস প্রদর্শন সার্টিফিকেশন জন্য বিকল্পগুলি দেখান"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"ওয়াই-ফাই লগিং স্তর বাড়ান, ওয়াই-ফাই চয়নকারীতে SSID RSSI অনুযায়ী দেখান"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"ইন্টারফেসে উপস্থিত ডেটা ট্রাফিকের পরিমাণের উপরে ভিত্তি করে ওয়াই-ফাই রোম স্ক্যানকে অনুমোদিত/অননুমোদিত করুন"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"ওয়াই-ফাই নেটওয়ার্কে সংযুক্ত করার সময় MAC অ্যাড্রেস র্যান্ডমাইজ করুন"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"লগার বাফারের আকারগুলি"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"লগ বাফার প্রতি অপেক্ষাকৃত বড় আকারগুলির বেছে নিন"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"লগারের স্টোরেজ সাফ করবেন?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"হার্ডওয়্যার স্তর আপডেটগুলি প্রদর্শন করুন"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"যখন হার্ডওয়্যার স্তরগুলি আপডেট হয় তখন সেগুলিকে সবুজ রঙে ফ্ল্যাশ করুন"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"ডিবাগ GPU ওভারড্র"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU রেন্ডারার সেট করুন"</string>
<string name="disable_overlays" msgid="2074488440505934665">"HW আচ্ছাদনগুলি অক্ষম করুন"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"সর্বদা স্ক্রীন কম্পোসিটিংয়ের জন্য GPU ব্যবহার করুন"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"রঙ স্থান নকল করুন"</string>
@@ -397,10 +396,22 @@
<string name="active_input_method_subtypes" msgid="3596398805424733238">"সক্রিয় ইনপুট পদ্ধতিগুলি"</string>
<string name="use_system_language_to_select_input_method_subtypes" msgid="5747329075020379587">"সিস্টেমের ভাষাগুলি ব্যবহার করুন"</string>
<string name="failed_to_open_app_settings_toast" msgid="1251067459298072462">"<xliff:g id="SPELL_APPLICATION_NAME">%1$s</xliff:g> জন্য সেটিংস খুলতে ব্যর্থ হয়েছে"</string>
- <string name="ime_security_warning" msgid="4135828934735934248">"এই ইনপুট পদ্ধতিটি হয়তো পাসওয়ার্ড এবং ক্রেডিট কার্ড নম্বর সহ আপনার টাইপ করা সমস্ত টেক্সট সংগ্রহ করতে সক্ষম হতে পারে। এটি <xliff:g id="IME_APPLICATION_NAME">%1$s</xliff:g> অ্যাপ থেকে এসেছে। এই ইনপুট পদ্ধতিটি ব্যবহার করবেন?"</string>
+ <string name="ime_security_warning" msgid="4135828934735934248">"এই ইনপুট পদ্ধতিটি হয়ত পাসওয়ার্ড এবং ক্রেডিট কার্ড নম্বর সহ আপনার টাইপ করা সমস্ত টেক্সট সংগ্রহ করতে সক্ষম হতে পারে। এটি <xliff:g id="IME_APPLICATION_NAME">%1$s</xliff:g> অ্যাপ থেকে এসেছে। এই ইনপুট পদ্ধতিটি ব্যবহার করবেন?"</string>
<string name="direct_boot_unaware_dialog_message" msgid="7870273558547549125">"দ্রষ্টব্য: পুনরায় চালু করার পরে, আপনি আপনার ফোন আনলক না করা পর্যন্ত এই অ্যাপটিকে চালু করতে পারবেন না"</string>
<string name="ims_reg_title" msgid="7609782759207241443">"IMS রেজিস্ট্রেশনের স্থিতি"</string>
<string name="ims_reg_status_registered" msgid="933003316932739188">"রেজিস্টার করা"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"রেজিস্টার করা নয়"</string>
<string name="status_unavailable" msgid="7862009036663793314">"অনুপলব্ধ"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$dটি ডিভাইস সংযুক্ত</item>
+ <item quantity="other">%1$dটি ডিভাইস সংযুক্ত</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"আরও বেশি।"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"আরও কম।"</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"চালু করুন"</string>
+ <string name="cancel" msgid="6859253417269739139">"বাতিল"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"\'বিরক্ত করবেন না\' মোড চালু করুন"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"কখনও নয়"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"শুধুমাত্র অগ্রাধিকার"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-bs/arrays.xml b/packages/SettingsLib/res/values-bs/arrays.xml
index af04a04..04cb9e9 100644
--- a/packages/SettingsLib/res/values-bs/arrays.xml
+++ b/packages/SettingsLib/res/values-bs/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Prikaži područja preklapanja"</item>
<item msgid="2290859360633824369">"Prikaži područja za Deuteranomaly"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (Zadano)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Standardno ograničenje"</item>
<item msgid="4071574792028999443">"Nema pozadinskih procesa"</item>
diff --git a/packages/SettingsLib/res/values-bs/strings.xml b/packages/SettingsLib/res/values-bs/strings.xml
index 915eb49..433bbdb 100644
--- a/packages/SettingsLib/res/values-bs/strings.xml
+++ b/packages/SettingsLib/res/values-bs/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Umrežavanje"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certifikacija bežičnog prikaza"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Omogućiti Wi-Fi Verbose zapisivanje"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Uvijek dopustiti Wi-Fi lutajuće skeniranje"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Povezana randomizacija MAC adrese"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobilna mreža za prijenos podataka je uvijek aktivna"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Hardversko ubrzavanje dijeljenja veze"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Prikaži Bluetooth uređaje bez naziva"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Unesite naziv host računara pružaoca DNS-a"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Pokaži opcije za certifikaciju Bežičnog prikaza"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Povećajte nivo Wi-Fi zapisivanja, pokazati po SSID RSSI Wi-Fi Picker"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Dozvoli/Zabrani Wi-Fi lutajuće skeniranje na osnovu količine podatkovnog saobraćaja prisutnog na interfejsu"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Nasumično odaberi MAC adresu prilikom povezivanja na Wi-Fi mreže"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Veličine bafera za zapisnik"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Odaberite veličine za Logger prema međumemoriji evidencije"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Želite li izbrisati trajnu pohranu zapisivača?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Prikaži dodatne informacije za ažuriranja za hardver"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Trepći hardverske slojeve zeleno kada se ažuriraju"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Otkl. greške GPU preklap."</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Postavite GPU renderer"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Onemog. HW preklapanja"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Uvijek koristi GPU za kompoziciju ekrana"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simuliraj prostor boje"</string>
@@ -403,4 +402,17 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrirano"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Nije registrirano"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Nije dostupno"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d povezan uređaj</item>
+ <item quantity="few">%1$d povezana uređaja</item>
+ <item quantity="other">%1$d povezanih uređaja</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Više vremena."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Manje vremena."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Uključi"</string>
+ <string name="cancel" msgid="6859253417269739139">"Otkaži"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Uključi način rada Ne ometaj"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Nikada"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Samo prioriteti"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ca/strings.xml b/packages/SettingsLib/res/values-ca/strings.xml
index d8c6693..60531f2 100644
--- a/packages/SettingsLib/res/values-ca/strings.xml
+++ b/packages/SettingsLib/res/values-ca/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Xarxes"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certificació de pantalla sense fil"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Activa el registre Wi‑Fi detallat"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Permet sempre cerca de Wi-Fi en ininerància"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Aleatorització de MAC amb connexió"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Dades mòbils sempre actives"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Acceleració per maquinari per compartir la xarxa"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Mostra els dispositius Bluetooth sense el nom"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Introdueix el nom d\'amfitrió del proveïdor de DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Mostra les opcions de certificació de pantalla sense fil"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Augmenta nivell de registre Wi‑Fi i mostra\'l per SSID RSSI al Selector de Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Permet/No permetis cerques de xarxes Wi-Fi en itinerància basades en la quantitat de dades presents a la interfície"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Aleatoritza l\'adreça MAC quan estiguis connectat a una xarxa Wi-Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Mides memòria intermèdia Logger"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Mida Logger per memòria intermèdia"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Vols esborrar l\'emmagatzematge persistent del registrador?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrat"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Sense registrar"</string>
<string name="status_unavailable" msgid="7862009036663793314">"No disponible"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d dispositius connectats</item>
+ <item quantity="one">%1$d dispositiu connectat</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Més temps"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Menys temps"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-cs/strings.xml b/packages/SettingsLib/res/values-cs/strings.xml
index 41ff8e2..058f6a7 100644
--- a/packages/SettingsLib/res/values-cs/strings.xml
+++ b/packages/SettingsLib/res/values-cs/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Sítě"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certifikace bezdrát. displeje"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Podrobné protokolování Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Vždy povolit Wi-Fi roaming"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Náhodné adresy MAC při připojení"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobilní data jsou vždy aktivní"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Hardwarová akcelerace tetheringu"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Zobrazovat zařízení Bluetooth bez názvů"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Zadejte název hostitele poskytovatele DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Zobrazit možnosti certifikace bezdrátového displeje"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Zvýšit úroveň protokolování Wi‑Fi zobrazenou v SSID a RSSI při výběru sítě Wi‑Fi."</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Povolí nebo zakáže Wi-Fi roaming na základě množství datového provozu na rozhraní."</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Při připojení k sítím Wi-Fi používat náhodnou adresu MAC"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Vyrovnávací paměť protokol. nástroje"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Velikost vyrovnávací paměti protokol. nástroje"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Vymazat trvalé úložiště protokolovacího nástroje?"</string>
@@ -403,4 +403,12 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrováno"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Neregistrováno"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Není k dispozici"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="few">Připojena %1$d zařízení</item>
+ <item quantity="many">Připojeno %1$d zařízení</item>
+ <item quantity="other">Připojeno %1$d zařízení</item>
+ <item quantity="one">Připojeno %1$d zařízení</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Delší doba"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Kratší doba"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-da/strings.xml b/packages/SettingsLib/res/values-da/strings.xml
index 17d1f08..98bbaa2 100644
--- a/packages/SettingsLib/res/values-da/strings.xml
+++ b/packages/SettingsLib/res/values-da/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Netværk"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certificering af trådløs skærm"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Aktivér detaljeret Wi-Fi-logføring"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Tillad altid scanning af Wi-Fi-roaming"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Forbindelse med tilfældig MAC-adresse"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobildata er altid aktiveret"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Hardwareacceleration ved netdeling"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Vis Bluetooth-enheder uden navne"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Angiv hostname for DNS-udbyder"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Vis valgmuligheder for certificering af trådløs skærm"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Øg mængden af Wi‑Fi-logføring. Vis opdelt efter SSID RSSI i Wi‑Fi-vælgeren"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Tillad/forbyd scanning i forbindelse med Wi-Fi-roaming afhængigt af mængden af datatrafik i grænsefladen"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Brug en tilfældig MAC-adresse, når der oprettes forbindelse til Wi‑Fi-netværk"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Størrelser for Logger-buffer"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Vælg Logger-størrelser pr. logbuffer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Vil du rydde det permanente lager for logger?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registreret"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Ikke registreret"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Utilgængelig"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d enhed er tilsluttet</item>
+ <item quantity="other">%1$d enheder er tilsluttet</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Mere tid."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Mindre tid."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-de/strings.xml b/packages/SettingsLib/res/values-de/strings.xml
index 2fbac93..cf8a1a2 100644
--- a/packages/SettingsLib/res/values-de/strings.xml
+++ b/packages/SettingsLib/res/values-de/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Netzwerke"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Kabellose Übertragung"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Ausführliche WLAN-Protokolle aktivieren"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"WLAN-Roamingsuchen immer zulassen"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Verbundene randomisierte MAC-Adresse"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobile Datennutzung immer aktiviert"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Hardwarebeschleunigung für Tethering"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Bluetooth-Geräte ohne Namen anzeigen"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Hostname des DNS-Anbieters eingeben"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Optionen zur Zertifizierung für kabellose Übertragung anzeigen"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Level für WLAN-Protokollierung erhöhen, in WiFi Picker pro SSID-RSSI anzeigen"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"WLAN-Roamingsuchen je nach Umfang des Datentraffics an der Schnittstelle zulassen bzw. nicht zulassen"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"MAC-Adresse randomisieren, wenn WLAN-Verbindungen hergestellt werden"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Logger-Puffergrößen"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Größe pro Protokollpuffer wählen"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Speicher der dauerhaften Protokollierung löschen?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registriert"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Nicht registriert"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Nicht verfügbar"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d Geräte verbunden</item>
+ <item quantity="one">%1$d Gerät verbunden</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Mehr Zeit."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Weniger Zeit."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-el/strings.xml b/packages/SettingsLib/res/values-el/strings.xml
index 25de914..95dd4cd 100644
--- a/packages/SettingsLib/res/values-el/strings.xml
+++ b/packages/SettingsLib/res/values-el/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Δικτύωση"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Πιστοποίηση ασύρματης οθόνης"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Ενεργοποίηση λεπτομερ. καταγραφής Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Να επιτρέπεται πάντα η σάρωση Wi-Fi κατά την περιαγωγή"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Τυχαιοποίηση συνδεδεμένης διεύθυνσης MAC"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Πάντα ενεργά δεδομένα κινητής τηλεφωνίας"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Σύνδεση επιτάχυνσης υλικού"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Εμφάνιση συσκευών Bluetooth χωρίς ονόματα"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Εισαγάγετε το όνομα κεντρικού υπολογιστή του παρόχου DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Εμφάνιση επιλογών για πιστοποίηση ασύρματης οθόνης"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Αύξηση επιπέδου καταγ. Wi-Fi, εμφάνιση ανά SSID RSSI στο εργαλείο επιλογής Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Να επιτρέπεται/να μην επιτρέπεται η σάρωση Wi-Fi κατά την περιαγωγή, βάσει της ποσότητας επισκεψιμότητας δεδομένων στη διεπαφή"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Τυχαιοποίηση διεύθυνσης MAC κατά τη σύνδεση σε δίκτυα Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Μέγεθος προσωρινής μνήμης για τη λειτουργία καταγραφής"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Μέγεθος αρχείων κατ/φής ανά προ/νή μνήμη αρχείου κατ/φής"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Διαγραφή αποθηκευτικού χώρου μόνιμων αρχείων καταγραφής;"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Εγγεγραμμένη"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Μη εγγεγραμμένη"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Μη διαθέσιμο"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d συσκευές συνδέθηκαν</item>
+ <item quantity="one">%1$d συσκευή συνδέθηκε</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Περισσότερη ώρα."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Λιγότερη ώρα."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-en-rAU/arrays.xml b/packages/SettingsLib/res/values-en-rAU/arrays.xml
index f4fceae..418b17c 100644
--- a/packages/SettingsLib/res/values-en-rAU/arrays.xml
+++ b/packages/SettingsLib/res/values-en-rAU/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Show overdraw areas"</item>
<item msgid="2290859360633824369">"Show areas for Deuteranomaly"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (Default)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Standard limit"</item>
<item msgid="4071574792028999443">"No background processes"</item>
diff --git a/packages/SettingsLib/res/values-en-rAU/strings.xml b/packages/SettingsLib/res/values-en-rAU/strings.xml
index 9f5353f..9b82b7c 100644
--- a/packages/SettingsLib/res/values-en-rAU/strings.xml
+++ b/packages/SettingsLib/res/values-en-rAU/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Networking"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Wireless display certification"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Enable Wi‑Fi verbose logging"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Always allow Wi‑Fi Roam Scans"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Connected MAC Randomisation"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobile data always active"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Tethering hardware acceleration"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Show Bluetooth devices without names"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Enter hostname of DNS provider"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Show options for wireless display certification"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Increase Wi‑Fi logging level, show per SSID RSSI in Wi‑Fi Picker"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Allow/Disallow Wi‑Fi Roam Scans based on the amount of data traffic present at the interface"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Randomise MAC address when connecting to Wi‑Fi networks"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Logger buffer sizes"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Select Logger sizes per log buffer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Clear logger persistent storage?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Show hardware layers updates"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Flash hardware layers green when they update"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Debug GPU overdraw"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Set GPU Renderer"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Disable HW overlays"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Always use GPU for screen compositing"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simulate colour space"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registered"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Not registered"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Unavailable"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d devices connected</item>
+ <item quantity="one">%1$d device connected</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"More time."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Less time."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Turn on"</string>
+ <string name="cancel" msgid="6859253417269739139">"Cancel"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Turn on Do Not Disturb"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Never"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Priority only"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-en-rCA/arrays.xml b/packages/SettingsLib/res/values-en-rCA/arrays.xml
index f4fceae..418b17c 100644
--- a/packages/SettingsLib/res/values-en-rCA/arrays.xml
+++ b/packages/SettingsLib/res/values-en-rCA/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Show overdraw areas"</item>
<item msgid="2290859360633824369">"Show areas for Deuteranomaly"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (Default)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Standard limit"</item>
<item msgid="4071574792028999443">"No background processes"</item>
diff --git a/packages/SettingsLib/res/values-en-rCA/strings.xml b/packages/SettingsLib/res/values-en-rCA/strings.xml
index 9f5353f..9b82b7c 100644
--- a/packages/SettingsLib/res/values-en-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-en-rCA/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Networking"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Wireless display certification"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Enable Wi‑Fi verbose logging"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Always allow Wi‑Fi Roam Scans"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Connected MAC Randomisation"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobile data always active"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Tethering hardware acceleration"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Show Bluetooth devices without names"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Enter hostname of DNS provider"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Show options for wireless display certification"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Increase Wi‑Fi logging level, show per SSID RSSI in Wi‑Fi Picker"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Allow/Disallow Wi‑Fi Roam Scans based on the amount of data traffic present at the interface"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Randomise MAC address when connecting to Wi‑Fi networks"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Logger buffer sizes"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Select Logger sizes per log buffer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Clear logger persistent storage?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Show hardware layers updates"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Flash hardware layers green when they update"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Debug GPU overdraw"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Set GPU Renderer"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Disable HW overlays"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Always use GPU for screen compositing"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simulate colour space"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registered"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Not registered"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Unavailable"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d devices connected</item>
+ <item quantity="one">%1$d device connected</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"More time."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Less time."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Turn on"</string>
+ <string name="cancel" msgid="6859253417269739139">"Cancel"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Turn on Do Not Disturb"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Never"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Priority only"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-en-rGB/arrays.xml b/packages/SettingsLib/res/values-en-rGB/arrays.xml
index f4fceae..418b17c 100644
--- a/packages/SettingsLib/res/values-en-rGB/arrays.xml
+++ b/packages/SettingsLib/res/values-en-rGB/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Show overdraw areas"</item>
<item msgid="2290859360633824369">"Show areas for Deuteranomaly"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (Default)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Standard limit"</item>
<item msgid="4071574792028999443">"No background processes"</item>
diff --git a/packages/SettingsLib/res/values-en-rGB/strings.xml b/packages/SettingsLib/res/values-en-rGB/strings.xml
index 9f5353f..9b82b7c 100644
--- a/packages/SettingsLib/res/values-en-rGB/strings.xml
+++ b/packages/SettingsLib/res/values-en-rGB/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Networking"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Wireless display certification"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Enable Wi‑Fi verbose logging"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Always allow Wi‑Fi Roam Scans"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Connected MAC Randomisation"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobile data always active"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Tethering hardware acceleration"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Show Bluetooth devices without names"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Enter hostname of DNS provider"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Show options for wireless display certification"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Increase Wi‑Fi logging level, show per SSID RSSI in Wi‑Fi Picker"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Allow/Disallow Wi‑Fi Roam Scans based on the amount of data traffic present at the interface"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Randomise MAC address when connecting to Wi‑Fi networks"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Logger buffer sizes"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Select Logger sizes per log buffer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Clear logger persistent storage?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Show hardware layers updates"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Flash hardware layers green when they update"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Debug GPU overdraw"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Set GPU Renderer"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Disable HW overlays"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Always use GPU for screen compositing"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simulate colour space"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registered"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Not registered"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Unavailable"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d devices connected</item>
+ <item quantity="one">%1$d device connected</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"More time."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Less time."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Turn on"</string>
+ <string name="cancel" msgid="6859253417269739139">"Cancel"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Turn on Do Not Disturb"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Never"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Priority only"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-en-rIN/arrays.xml b/packages/SettingsLib/res/values-en-rIN/arrays.xml
index f4fceae..418b17c 100644
--- a/packages/SettingsLib/res/values-en-rIN/arrays.xml
+++ b/packages/SettingsLib/res/values-en-rIN/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Show overdraw areas"</item>
<item msgid="2290859360633824369">"Show areas for Deuteranomaly"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (Default)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Standard limit"</item>
<item msgid="4071574792028999443">"No background processes"</item>
diff --git a/packages/SettingsLib/res/values-en-rIN/strings.xml b/packages/SettingsLib/res/values-en-rIN/strings.xml
index 9f5353f..9b82b7c 100644
--- a/packages/SettingsLib/res/values-en-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-en-rIN/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Networking"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Wireless display certification"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Enable Wi‑Fi verbose logging"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Always allow Wi‑Fi Roam Scans"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Connected MAC Randomisation"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobile data always active"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Tethering hardware acceleration"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Show Bluetooth devices without names"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Enter hostname of DNS provider"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Show options for wireless display certification"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Increase Wi‑Fi logging level, show per SSID RSSI in Wi‑Fi Picker"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Allow/Disallow Wi‑Fi Roam Scans based on the amount of data traffic present at the interface"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Randomise MAC address when connecting to Wi‑Fi networks"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Logger buffer sizes"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Select Logger sizes per log buffer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Clear logger persistent storage?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Show hardware layers updates"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Flash hardware layers green when they update"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Debug GPU overdraw"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Set GPU Renderer"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Disable HW overlays"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Always use GPU for screen compositing"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simulate colour space"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registered"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Not registered"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Unavailable"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d devices connected</item>
+ <item quantity="one">%1$d device connected</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"More time."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Less time."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Turn on"</string>
+ <string name="cancel" msgid="6859253417269739139">"Cancel"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Turn on Do Not Disturb"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Never"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Priority only"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-en-rXC/strings.xml b/packages/SettingsLib/res/values-en-rXC/strings.xml
index a8561fa..6c9be08 100644
--- a/packages/SettingsLib/res/values-en-rXC/strings.xml
+++ b/packages/SettingsLib/res/values-en-rXC/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Networking"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Wireless display certification"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Enable Wi‑Fi Verbose Logging"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Always allow Wi‑Fi Roam Scans"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Connected MAC Randomization"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobile data always active"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Tethering hardware acceleration"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Show Bluetooth devices without names"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Enter hostname of DNS provider"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Show options for wireless display certification"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Increase Wi‑Fi logging level, show per SSID RSSI in Wi‑Fi Picker"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Allow/Disallow Wi‑Fi Roam Scans based on the amount of data traffic present at the interface"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Randomize MAC address when connecting to Wi‑Fi networks"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Logger buffer sizes"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Select Logger sizes per log buffer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Clear logger persistent storage?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registered"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Not registered"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Unavailable"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d devices connected</item>
+ <item quantity="one">%1$d device connected</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"More time."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Less time."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-es-rUS/strings.xml b/packages/SettingsLib/res/values-es-rUS/strings.xml
index eeaf18f..5bc7594 100644
--- a/packages/SettingsLib/res/values-es-rUS/strings.xml
+++ b/packages/SettingsLib/res/values-es-rUS/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Redes"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certificación de pantalla inalámbrica"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Habilitar registro detallado de Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Permitir siempre búsquedas de Wi-Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Selección aleatoria de MAC conectada"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Datos móviles siempre activados"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Aceleración de hardware de conexión mediante dispositivo portátil"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Mostrar dispositivos Bluetooth sin nombre"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Ingresa el nombre de host del proveedor de DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Mostrar opciones de certificación de pantalla inalámbrica"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Aumentar nivel de registro Wi-Fi; mostrar por SSID RSSI en el selector de Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Permitir/no permitir las búsquedas de Wi-Fi basadas la cantidad de tráfico de datos presente en la interfaz"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Seleccionar la dirección MAC de forma aleatoria cuando se establezca conexión con redes Wi-Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Tamaños de búfer de Logger"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Selecciona el tamaño del Logger por búfer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"¿Borrar el almacenamiento persistente del registrador?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrado"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Sin registrar"</string>
<string name="status_unavailable" msgid="7862009036663793314">"No disponible"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d dispositivos conectados</item>
+ <item quantity="one">%1$d dispositivo conectado</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Más tiempo"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Menos tiempo"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-es/arrays.xml b/packages/SettingsLib/res/values-es/arrays.xml
index a752db9..7334237 100644
--- a/packages/SettingsLib/res/values-es/arrays.xml
+++ b/packages/SettingsLib/res/values-es/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Mostrar áreas sobredibujadas"</item>
<item msgid="2290859360633824369">"Mostrar áreas para deuteranomalía"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (predeterminado)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Límite estándar"</item>
<item msgid="4071574792028999443">"Sin procesos en segundo plano"</item>
diff --git a/packages/SettingsLib/res/values-es/strings.xml b/packages/SettingsLib/res/values-es/strings.xml
index 97d9a10..3301941 100644
--- a/packages/SettingsLib/res/values-es/strings.xml
+++ b/packages/SettingsLib/res/values-es/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Redes"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certificación de pantalla inalámbrica"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Habilitar registro Wi-Fi detallado"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Permitir siempre búsquedas de Wi-Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Orden aleatorio de direcciones MAC conectadas"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Datos móviles siempre activos"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Aceleración por hardware para conexión compartida"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Mostrar dispositivos Bluetooth sin nombre"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Introduce el nombre de host del proveedor de DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Mostrar opciones para la certificación de la pantalla inalámbrica"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Aumentar el nivel de registro de Wi-Fi, mostrar por SSID RSSI en el selector Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Permitir/No permitir búsquedas de Wi-Fi basadas en la cantidad de tráfico de datos presente en la interfaz"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Ordenar las direcciones MAC de forma aleatoria al conectarse a redes Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Tamaños de búfer de registrador"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Elige el tamaño del Logger por búfer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"¿Borrar almacenamiento continuo del registrador?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Ver actualizaciones capas HW"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Iluminar capas de hardware en verde al actualizarse"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Depurar sobredibujos de GPU"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Elegir procesador de GPU"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Inhabilitar superposiciones HW"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Usar siempre la GPU para combinar pantallas"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simular espacio de color"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrado"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"No registrado"</string>
<string name="status_unavailable" msgid="7862009036663793314">"No disponible"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d dispositivos conectados</item>
+ <item quantity="one">%1$d dispositivo conectado</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Más tiempo."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Menos tiempo."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Activar"</string>
+ <string name="cancel" msgid="6859253417269739139">"Cancelar"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Activar el modo No molestar"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Nunca"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Solo prioritarias"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-et/strings.xml b/packages/SettingsLib/res/values-et/strings.xml
index b680b84..3447680 100644
--- a/packages/SettingsLib/res/values-et/strings.xml
+++ b/packages/SettingsLib/res/values-et/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Võrgustik"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Juhtmeta ekraaniühenduse sertifitseerimine"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Luba WiFi paljusõnaline logimine"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Luba alati WiFi-rändluse skannimine"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Juhusliku MAC-aadressi määramine ühendamisel"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobiilne andmeside on alati aktiivne"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Jagamise riistvaraline kiirendus"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Kuva Bluetoothi seadmed ilma nimedeta"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Sisestage DNS-i teenusepakkuja hostinimi"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Juhtmeta ekraaniühenduse sertifitseerimisvalikute kuvamine"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Suurenda WiFi logimistaset, kuva WiFi valijas SSID RSSI järgi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Luba/keela WiFi-rändluse skannimine liidese andmeliikluse põhjal"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Määra WiFi-võrkudega ühenduse loomisel juhuslik MAC-aadress"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Logija puhvri suurused"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Vali logija suur. logipuhvri kohta"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Kas kustutada logija püsivalt salvestatud andmed?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registreeritud"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Ei ole registreeritud"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Pole saadaval"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d seadet on ühendatud</item>
+ <item quantity="one">%1$d seade on ühendatud</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Pikem aeg."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Lühem aeg."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-eu/arrays.xml b/packages/SettingsLib/res/values-eu/arrays.xml
index d4a5e6e..d573ab8 100644
--- a/packages/SettingsLib/res/values-eu/arrays.xml
+++ b/packages/SettingsLib/res/values-eu/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Erakutsi gainidatzi diren eremuak"</item>
<item msgid="2290859360633824369">"Erakutsi daltonismorako eremuak"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (lehenetsia)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Muga estandarra"</item>
<item msgid="4071574792028999443">"Ez dago atzeko planoko prozesurik"</item>
diff --git a/packages/SettingsLib/res/values-eu/strings.xml b/packages/SettingsLib/res/values-eu/strings.xml
index ca8ea03..41fee20 100644
--- a/packages/SettingsLib/res/values-eu/strings.xml
+++ b/packages/SettingsLib/res/values-eu/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Sareak"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Hari gabeko bistaratze-egiaztatzea"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Gaitu Wi-Fi sareetan saioa hasteko modu xehatua"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Onartu beti ibiltaritzan Wi-Fi sareak bilatzea"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Konektatutako MAC helbideak ausaz aukeratzea"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Datu mugikorrak beti aktibo"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Konexioa partekatzeko hardwarearen azelerazioa"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Erakutsi Bluetooth gailuak izenik gabe"</string>
@@ -217,12 +217,12 @@
<string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS pribatua"</string>
<string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Hautatu DNS pribatuaren modua"</string>
<string name="private_dns_mode_off" msgid="8236575187318721684">"Desaktibatuta"</string>
- <string name="private_dns_mode_opportunistic" msgid="7608409735589131766">"Aldakorra"</string>
+ <string name="private_dns_mode_opportunistic" msgid="7608409735589131766">"Ahal bada"</string>
<string name="private_dns_mode_provider" msgid="8354935160639360804">"DNS hornitzaile pribatuaren ostalari-izena"</string>
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Idatzi DNS hornitzailearen ostalari-izena"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Erakutsi hari gabeko bistaratze-egiaztapenaren aukerak"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Erakutsi datu gehiago Wi-Fi sareetan saioa hasterakoan. Erakutsi sarearen identifikatzailea eta seinalearen indarra Wi‑Fi sareen hautagailuan."</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Onartu edo debekatu ibiltaritzan Wi-Fi sareak bilatzea, interfazeko datu-trafikoaren arabera"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Aukeratu ausaz MAC helbideak Wi‑Fi sareetara konektatzean"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Erregistroen buffer-tamainak"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Hautatu erregistroen buffer-tamainak"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Erregistro iraunkorraren biltegia garbitu nahi duzu?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Hardware-geruzen eguneratzeak"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Eguneratu bitartean, hardware-geruzak berdez"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Araztu GPU gainidazketa"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Ezarri GPU errendatzailea"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Desgaitu HW gainjartzeak"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Erabili beti GPU pantaila-muntaietarako"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simulatu kolore-espazioa"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Erregistratuta"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Erregistratu gabe"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Ez dago erabilgarri"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d gailu daude konektatuta</item>
+ <item quantity="one">%1$d gailu dago konektatuta</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Denbora gehiago."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Denbora gutxiago."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Aktibatu"</string>
+ <string name="cancel" msgid="6859253417269739139">"Utzi"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Aktibatu \"Ez molestatu\" modua"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Inoiz ez"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Lehentasuna dutenak soilik"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-fa/strings.xml b/packages/SettingsLib/res/values-fa/strings.xml
index 675e382..34a3c31 100644
--- a/packages/SettingsLib/res/values-fa/strings.xml
+++ b/packages/SettingsLib/res/values-fa/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"شبکه"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"گواهینامه نمایش بیسیم"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"فعال کردن گزارشگیری طولانی Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"اسکنهای رومینگ Wi‑Fi همیشه مجاز است"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"تصادفیسازی MAC متصل"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"داده تلفن همراه همیشه فعال باشد"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"شتاب سختافزاری اتصال به اینترنت با تلفن همراه"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"نمایش دستگاههای بلوتوث بدون نام"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"نام میزبان ارائهدهنده DNS خصوصی را وارد کنید"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"نمایش گزینهها برای گواهینامه نمایش بیسیم"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"افزایش سطح گزارشگیری Wi‑Fi، نمایش به ازای SSID RSSI در انتخابکننده Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"مجاز/غیرمجاز کردن اسکنهای رومینگ Wi‑Fi براساس مقدار ترافیک داده موجود در واسط"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"تصادفی کردن نشانی MAC هنگام اتصال به شبکههای Wi-Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"اندازههای حافظه موقت ثبتکننده"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"انتخاب اندازه ثبتکننده در حافظه موقت ثبت"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"حافظه دائم ثبتکننده پاک شود؟"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"ثبتشده"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"ثبت نشده است"</string>
<string name="status_unavailable" msgid="7862009036663793314">"در دسترس نیست"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d دستگاه متصل</item>
+ <item quantity="other">%1$d دستگاه متصل</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"زمان بیشتر."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"زمان کمتر."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-fi/strings.xml b/packages/SettingsLib/res/values-fi/strings.xml
index ba7fcd3..be19ed6 100644
--- a/packages/SettingsLib/res/values-fi/strings.xml
+++ b/packages/SettingsLib/res/values-fi/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Yhteysominaisuudet"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Langattoman näytön sertifiointi"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Käytä Wi-Fin laajennettua lokikirjausta"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Salli Wi-Fi-verkkovierailuskannaus aina"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Yhdistetty MAC-satunnaistaminen"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobiilidata aina käytössä"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Laitteistokiihdytyksen yhteyden jakaminen"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Näytä nimettömät Bluetooth-laitteet"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Anna isäntänimi tai DNS-tarjoaja."</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Näytä langattoman näytön sertifiointiin liittyvät asetukset"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Lisää Wi‑Fin lokikirjaustasoa, näytä SSID RSSI -kohtaisesti Wi‑Fi-valitsimessa."</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Salli/estä Wi-Fi-verkkovierailuskannaus liittymässä esiintyvän dataliikenteen perusteella."</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Käytä satunnaista MAC-osoitetta, kun yhdistät Wi-Fi-verkkoon"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Lokipuskurien koot"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Valitse puskurikohtaiset lokikoot"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Tyhjennetäänkö lokityökalun pysyvä tallennustila?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Rekisteröity"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Ei rekisteröity"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Ei käytettävissä"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d laitetta liitetty</item>
+ <item quantity="one">%1$d laite liitetty</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Enemmän aikaa"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Vähemmän aikaa"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-fr-rCA/arrays.xml b/packages/SettingsLib/res/values-fr-rCA/arrays.xml
index be568ed..a6afcf8 100644
--- a/packages/SettingsLib/res/values-fr-rCA/arrays.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Afficher les zones de conflit"</item>
<item msgid="2290859360633824369">"Afficher les zones de deutéranomalie"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (par défaut)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Limite standard"</item>
<item msgid="4071574792028999443">"Aucun processus en arrière-plan"</item>
diff --git a/packages/SettingsLib/res/values-fr-rCA/strings.xml b/packages/SettingsLib/res/values-fr-rCA/strings.xml
index f266e2d..fa6006e 100644
--- a/packages/SettingsLib/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Réseautage"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certification de l\'affichage sans fil"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Autoriser enreg. données Wi-Fi détaillées"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Toujours autoriser la détection de réseaux Wi-Fi en itinérance"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Sélection aléatoire de l\'adresse MAC lors de la connexion"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Données cellulaires toujours actives"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Accélération matérielle pour le partage de connexion"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Afficher les appareils Bluetooth sans nom"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Entrez le nom d\'hôte du fournisseur DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Afficher les options pour la certification d\'affichage sans fil"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Détailler davantage les données Wi-Fi, afficher par SSID RSSI dans sélect. Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Autoriser ou non la détection de réseaux Wi-Fi en itinérance en fonction de l\'importance du transfert de données dans l\'interface"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Sélectionner l\'adresse MAC de manière aléatoire lors de la connexion aux réseaux Wi-Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Tailles des mémoires tampons d\'enregistreur"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Tailles enreg. par tampon journal"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Supprimer les données de l\'enregistreur?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Mises à jour couches mat."</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Couches matérielles en vert une fois mises à jour"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Déboguer les conflits GPU"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Chois. moteur rendu vidéo"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Désact. superpos. matér."</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Toujours utiliser le GPU pour la composition écran"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simuler esp. colorimétrique"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Enregistré"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Non enregistré"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Non accessible"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d appareil connecté</item>
+ <item quantity="other">%1$d appareils connectés</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Plus longtemps."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Moins longtemps."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Activer"</string>
+ <string name="cancel" msgid="6859253417269739139">"Annuler"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Activer la fonction « Ne pas déranger »"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Jamais"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Priorités seulement"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-fr/strings.xml b/packages/SettingsLib/res/values-fr/strings.xml
index 87f00d1..5bf43b6 100644
--- a/packages/SettingsLib/res/values-fr/strings.xml
+++ b/packages/SettingsLib/res/values-fr/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Mise en réseau"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certification affichage sans fil"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Autoriser enreg. infos Wi-Fi détaillées"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Toujours autoriser la détection de réseaux Wi-Fi en itinérance"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Sélection aléatoire de l\'adresse MAC lors de la connexion"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Données mobiles toujours actives"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Accélération matérielle pour le partage de connexion"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Afficher les appareils Bluetooth sans nom"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Saisissez le nom d\'hôte du fournisseur DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Afficher les options de la certification de l\'affichage sans fil"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Détailler plus infos Wi-Fi, afficher par RSSI de SSID dans outil sélection Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Autoriser ou non la détection de réseaux Wi-Fi en itinérance en fonction de l\'importance du trafic de données dans l\'interface"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Sélectionner l\'adresse MAC de manière aléatoire lors de la connexion aux réseaux Wi-Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Tailles mémoires tampons enregistr."</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Tailles enreg. par tampon journal"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Effacer l\'espace de stockage persistant de l\'enregistreur ?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Enregistré"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Non enregistré"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Non disponible"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d appareil connecté</item>
+ <item quantity="other">%1$d appareils connectés</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Plus longtemps."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Moins longtemps."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-gl/arrays.xml b/packages/SettingsLib/res/values-gl/arrays.xml
index d06fe9c..0f43c9ba 100644
--- a/packages/SettingsLib/res/values-gl/arrays.xml
+++ b/packages/SettingsLib/res/values-gl/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Mostrar áreas superpostas"</item>
<item msgid="2290859360633824369">"Mostrar áreas de deuteranomalía"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (Predeterminado)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Límite estándar"</item>
<item msgid="4071574792028999443">"Ningún proceso en segundo plano"</item>
diff --git a/packages/SettingsLib/res/values-gl/strings.xml b/packages/SettingsLib/res/values-gl/strings.xml
index 9026aab..afd350c 100644
--- a/packages/SettingsLib/res/values-gl/strings.xml
+++ b/packages/SettingsLib/res/values-gl/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Redes"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certificado de visualización sen fíos"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Activar rexistro detallado da wifi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Permitir sempre buscas de itinerancia da wifi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Selección aleatoria de enderezo MAC coa conexión"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Datos móbiles sempre activados"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Aceleración de hardware para conexión compartida"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Mostrar dispositivos Bluetooth sen nomes"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Introduce o nome de host de provedor de DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Mostra opcións para o certificado de visualización sen fíos"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Aumentar o nivel de rexistro da wifi, mostrar por SSID RSSI no selector de wifi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Permitir/Non permitir buscas de itinerancia da wifi baseadas na cantidade de tráfico de datos presente na interface"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Selecciona aleatoriamente o enderezo MAC cando te conectes a redes wifi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Tamaños de búfer de rexistrador"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Seleccionar tamaños por búfer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Queres borrar o almacenamento continuo do rexistrador?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Ver actualizacións capas"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Iluminar capas hardware en verde ao actualizarse"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Depurar superposición GPU"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Definir renderizador GPU"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Desact. superposicións HW"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Utilizar sempre GPU para a composición da pantalla"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simular o espazo da cor"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Rexistrado"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Non rexistrado"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Non dispoñible"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d dispositivos conectados</item>
+ <item quantity="one">%1$d dispositivo conectado</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Máis tempo."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Menos tempo."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Activar"</string>
+ <string name="cancel" msgid="6859253417269739139">"Cancelar"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Activar modo Non molestar"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Nunca"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Só prioridade"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-gu/arrays.xml b/packages/SettingsLib/res/values-gu/arrays.xml
index 00eb29c..61e497f 100644
--- a/packages/SettingsLib/res/values-gu/arrays.xml
+++ b/packages/SettingsLib/res/values-gu/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"ઓવરડ્રો ક્ષેત્રો બતાવો"</item>
<item msgid="2290859360633824369">"Deuteranomaly માટેના ક્ષેત્રો બતાવો"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (ડિફૉલ્ટ)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"માનક સીમા"</item>
<item msgid="4071574792028999443">"કોઈ બૅકગ્રાઉન્ડ પ્રક્રિયાઓ નથી"</item>
diff --git a/packages/SettingsLib/res/values-gu/strings.xml b/packages/SettingsLib/res/values-gu/strings.xml
index b1ee90b..13b2c4a 100644
--- a/packages/SettingsLib/res/values-gu/strings.xml
+++ b/packages/SettingsLib/res/values-gu/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"નેટવર્કિંગ"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"વાયરલેસ ડિસ્પ્લે પ્રમાણન"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"વાઇ-ફાઇ વર્બોઝ લૉગિંગ સક્ષમ કરો"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"હંમેશા વાઇ-ફાઇ રોમ સ્કૅન્સને મંજૂરી આપો"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"MAC ઍડ્રેસ રેન્ડમાઇઝ કરવું ચાલુ કર્યું"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"મોબાઇલ ડેટા હંમેશાં સક્રિય"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"ટિથરિંગ માટે હાર્ડવેર ગતિવૃદ્ધિ"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"નામ વિનાના બ્લૂટૂથ ઉપકરણો બતાવો"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS પ્રદાતાના હોસ્ટનું નામ દાખલ કરો"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"વાયરલેસ ડિસ્પ્લે પ્રમાણપત્ર માટેના વિકલ્પો બતાવો"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"વાઇ-ફાઇ લોગિંગ સ્તર વધારો, વાઇ-ફાઇ પીકરમાં SSID RSSI દીઠ બતાવો"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"ઇન્ટરફેસ પર હાજર ડેટા ટ્રાફિકના પ્રમાણનાં આધારે વાઇ-ફાઇ રોમ સ્કૅન્સને મંજૂરી આપો/નામંજૂર કરો"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"વાઇ-ફાઇ નેટવર્ક સાથે જ્યારે કનેક્ટ કરી રહ્યાં હોય ત્યારે MAC ઍડ્રેસને રેન્ડમાઇઝ કરો"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"લોગર બફર કદ"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"લૉગ દીઠ લૉગર કદ બફર પસંદ કરો"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"લૉગર નિરંતર સ્ટોરેજ સાફ કરીએ?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"હાર્ડવેર સ્તરોનાં અપડેટ્સ બતાવો"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"હાર્ડવેર સ્તરો અપડેટ થાય ત્યારે તેને લીલા રંગથી પ્રકાશિત કરો"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"GPU ઓવરડ્રો ડીબગ કરો"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU રેન્ડરર સેટ કરો"</string>
<string name="disable_overlays" msgid="2074488440505934665">"HW ઓવરલે અક્ષમ કરો"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"સ્ક્રીન જોડવા માટે હંમેશાં GPU નો ઉપયોગ કરો"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"રંગ સ્થાનનું અનુકરણ કરો"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"રજિસ્ટર કરેલ"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"રજિસ્ટર કરેલ નથી"</string>
<string name="status_unavailable" msgid="7862009036663793314">"અનુપલબ્ધ"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d ઉપકરણ કનેક્ટ કર્યું</item>
+ <item quantity="other">%1$d ઉપકરણો કનેક્ટ કર્યા</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"વધુ સમય."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"ઓછો સમય."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"ચાલુ કરો"</string>
+ <string name="cancel" msgid="6859253417269739139">"રદ કરો"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"ખલેલ પાડશો નહીં ચાલુ કરો"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"ક્યારેય નહીં"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"માત્ર પ્રાધાન્યતા"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-hi/strings.xml b/packages/SettingsLib/res/values-hi/strings.xml
index e235fc5..a7a6920 100644
--- a/packages/SettingsLib/res/values-hi/strings.xml
+++ b/packages/SettingsLib/res/values-hi/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"नेटवर्किंग"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"वायरलेस दिखाई देने के लिए प्रमाणन"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"वाई-फ़ाई वर्बोस लॉगिंग चालू करें"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"हमेशा वाई-फ़ाई रोम स्कैन करने दें"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"जुड़े हुए एमएसी (मैक) रैंडमाइज़ेशन (वाई-फ़ाई नेटवर्क से जुड़ते समय एमएसी पता बदले जाने की सुविधा)"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"मोबाइल डेटा हमेशा सक्रिय"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"हार्डवेयर से तेज़ी लाने के लिए टेदर करें"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"बिना नाम वाले ब्लूटूथ डिवाइस दिखाएं"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS सेवा देने वाले का होस्टनाम डालें"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"वायरलेस दिखाई देने के लिए प्रमाणन विकल्प दिखाएं"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"वाई-फ़ाई प्रवेश स्तर बढ़ाएं, वाई-फ़ाई पिकर में प्रति SSID RSSI दिखाएं"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"इंटरफ़ेस पर वर्तमान में मौजूद डेटा ट्रैफ़िक के आधार पर वाई-फ़ाई रोम स्कैन करने देता/नहीं देता है"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"वाई-फ़ाई से जुड़ते समय अलग-अलग एमएसी पते इस्तेमाल करें"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"लॉगर बफ़र आकार"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"प्रति लॉग बफ़र लॉगर आकार चुनें"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"लॉगर सतत मेमोरी साफ़ करें?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"रजिस्टर है"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"रजिस्टर नहीं है"</string>
<string name="status_unavailable" msgid="7862009036663793314">"अनुपलब्ध"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d डिवाइस जुड़े हैं</item>
+ <item quantity="other">%1$d डिवाइस जुड़े हैं</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"ज़्यादा समय."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"कम समय."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-hr/strings.xml b/packages/SettingsLib/res/values-hr/strings.xml
index a854987..6ca3e07 100644
--- a/packages/SettingsLib/res/values-hr/strings.xml
+++ b/packages/SettingsLib/res/values-hr/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Umrežavanje"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certifikacija bežičnog prikaza"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Omogući opširnu prijavu na Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Uvijek dopusti slobodno traženje Wi-Fi mreže"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Nasumični odabir MAC-a pri povezivanju"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobilni podaci uvijek aktivni"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Hardversko ubrzanje za modemsko povezivanje"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Prikaži Bluetooth uređaje bez naziva"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Unesite naziv hosta davatelja usluge DNS-a"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Prikaži opcije za certifikaciju bežičnog prikaza"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Povećana razina prijave na Wi‑Fi, prikaz po SSID RSSI-ju u Biraču Wi‑Fi-ja"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Dopustite ili blokirajte slobodno traženje Wi-Fi mreža na temelju količine podatkovnog prometa na sučelju."</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Nasumično odaberi MAC adresu pri povezivanju s Wi-Fi mrežama"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Veličine međuspremnika zapisnika"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Odaberite veličinu međuspremnika zapisnika"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Želite li izbrisati trajnu pohranu zapisivača?"</string>
@@ -403,4 +403,11 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrirano"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Nije registrirano"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Nije dostupno"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">Povezan je %1$d uređaj</item>
+ <item quantity="few">Povezana su %1$d uređaja</item>
+ <item quantity="other">Povezano je %1$d uređaja</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Više vremena."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Manje vremena."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-hu/strings.xml b/packages/SettingsLib/res/values-hu/strings.xml
index 553ed88..a842d06 100644
--- a/packages/SettingsLib/res/values-hu/strings.xml
+++ b/packages/SettingsLib/res/values-hu/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Hálózatok"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Vezeték nélküli kijelző tanúsítványa"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Részletes Wi-Fi-naplózás engedélyezése"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Wi‑Fi-roaming ellenőrzésének engedélyezése mindig"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Csatlakoztatott MAC-címek randomizálása"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"A mobilhálózati kapcsolat mindig aktív"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Internetmegosztás hardveres gyorsítása"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Név nélküli Bluetooth-eszközök megjelenítése"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Adja meg a DNS-szolgáltató gazdagépnevét"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Vezeték nélküli kijelző tanúsítványával kapcsolatos lehetőségek megjelenítése"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi‑Fi-naplózási szint növelése, RSSI/SSID megjelenítése a Wi‑Fi-választóban"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"A Wi-Fi-roaming ellenőrzésének engedélyezése vagy letiltása az interfészen jelen lévő adatforgalom mennyiségétől függően"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"MAC-cím véletlenszerű generálása Wi‑Fi-hálózatra való csatlakozáskor"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Naplózási puffer mérete"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Naplózási pufferméret kiválasztása"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Törli a naplózó program állandó tárhelyét?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Regisztrált"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Nem regisztrált"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Nem érhető el"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d eszköz csatlakozik</item>
+ <item quantity="one">%1$d eszköz csatlakozik</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Több idő."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Kevesebb idő."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-hy/arrays.xml b/packages/SettingsLib/res/values-hy/arrays.xml
index 7406554..e72bd77 100644
--- a/packages/SettingsLib/res/values-hy/arrays.xml
+++ b/packages/SettingsLib/res/values-hy/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Ցույց տալ գերազանցված հատվածները"</item>
<item msgid="2290859360633824369">"Ցույց տալ դալտոնիզմի ոլորտները"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (կանխադրված)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Սովորական սահման"</item>
<item msgid="4071574792028999443">"Հետնաշերտում գործողություններ չկան"</item>
diff --git a/packages/SettingsLib/res/values-hy/strings.xml b/packages/SettingsLib/res/values-hy/strings.xml
index dced49f5..7c3c3ad 100644
--- a/packages/SettingsLib/res/values-hy/strings.xml
+++ b/packages/SettingsLib/res/values-hy/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Ցանց"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Անլար էկրանի վկայագրում"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Միացնել Wi‑Fi մանրամասն գրանցամատյանները"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Միշտ թույլատրել Wi‑Fi ռոումինգի որոնումը"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"MAC հասցեների պատահական ընտրություն Wi-Fi-ին միանալիս"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Բջջային ինտերնետը միշտ ակտիվ է"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Սարքակազմի արագացման միացում"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Ցուցադրել Bluetooth սարքերն առանց անունների"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Մուտքագրեք DNS ծառայության մատակարարի խնամորդի անունը"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Ցույց տալ անլար էկրանի հավաստագրման ընտրանքները"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Բարձրացնել մակարդակը, Wi‑Fi ընտրիչում ամեն մի SSID-ի համար ցույց տալ RSSI"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Թույլատրել/արգելել Wi‑Fi ռոումինգի որոնումը՝ կախված միջերեսում տվյալների երթևեկի ծավալից"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Պատահականորեն ընտրել MAC հասցեն Wi-Fi ցանցերին միանալիս"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Տեղեկամատյանի պահնակի չափերը"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Ընտրեք տեղեկամատյանի չափը մեկ պահնակի համար"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Ջնջե՞լ մատյանի մշտական հիշողությունը:"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Գրանցված է"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Գրանցված չէ"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Անհասանելի"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">Միացված է %1$d սարք</item>
+ <item quantity="other">Միացված է %1$d սարք</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Ավելացնել ժամանակը:"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Պակասեցնել ժամանակը:"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-in/arrays.xml b/packages/SettingsLib/res/values-in/arrays.xml
index 0e2217d..724cb54 100644
--- a/packages/SettingsLib/res/values-in/arrays.xml
+++ b/packages/SettingsLib/res/values-in/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Tampilkan area overdraw"</item>
<item msgid="2290859360633824369">"Tampilkan area untuk Buta Warna"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (Default)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Batas standar"</item>
<item msgid="4071574792028999443">"Tanpa proses latar belakang"</item>
diff --git a/packages/SettingsLib/res/values-in/strings.xml b/packages/SettingsLib/res/values-in/strings.xml
index 5c06766..69a593c 100644
--- a/packages/SettingsLib/res/values-in/strings.xml
+++ b/packages/SettingsLib/res/values-in/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Jaringan"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Sertifikasi layar nirkabel"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Aktifkan Pencatatan Log Panjang Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Selalu izinkan Pemindaian Roaming Wi-Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Pengacakan MAC yang Terhubung"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Data seluler selalu aktif"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Akselerasi hardware tethering"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Tampilkan perangkat Bluetooth tanpa nama"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Masukkan hostname penyedia DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Tampilkan opsi untuk sertifikasi layar nirkabel"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Tingkatkan level pencatatan log Wi-Fi, tampilkan per SSID RSSI di Pemilih Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Izinkan/Larang Pemindaian Roaming Wi-Fi berdasarkan jumlah lalu lintas data yang ada di antarmuka"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Acak alamat MAC saat menghubungkan ke jaringan Wi-Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Ukuran penyangga pencatat log"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Ukuran Pencatat Log per penyangga log"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Hapus penyimpanan tetap pencatat log?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Tunjukkan pembaruan lapisan hardware"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Lapisan hardware berkedip hijau saat memperbarui"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Debug overdraw oleh GPU"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Setel Perender GPU"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Nonaktifkan lapisan HW"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Selalu gunakan GPU untuk pengomposisian layar"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simulasikan ruang warna"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Terdaftar"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Tidak terdaftar"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Tidak Tersedia"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d perangkat terhubung</item>
+ <item quantity="one">%1$d perangkat terhubung</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Lebih lama."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Lebih cepat."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Aktifkan"</string>
+ <string name="cancel" msgid="6859253417269739139">"Batal"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Aktifkan mode Jangan Ganggu"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Tidak pernah"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Hanya untuk prioritas"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-is/strings.xml b/packages/SettingsLib/res/values-is/strings.xml
index 21b8b0e..2c0a08b 100644
--- a/packages/SettingsLib/res/values-is/strings.xml
+++ b/packages/SettingsLib/res/values-is/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Netkerfi"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Vottun þráðlausra skjáa"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Kveikja á ítarlegri skráningu Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Leyfa alltaf reikileit með Wi-Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Slembival MAC-vistfanga við tengingu"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Alltaf kveikt á farsímagögnum"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Vélbúnaðarhröðun fyrir tjóðrun"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Sýna Bluetooth-tæki án heita"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Slá inn hýsilheiti DNS-veitu"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Sýna valkosti fyrir vottun þráðlausra skjáa"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Auka skráningarstig Wi-Fi, sýna RSSI fyrir hvert SSID í Wi-Fi vali"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Leyfa/banna reikileit með Wi-Fi á grunni þess hversu mikil gagnaumferð er fyrir hendi í viðmótinu"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Velja MAC-vistfang af handahófi þegar tengst er við Wi‑Fi net"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Annálsritastærðir biðminna"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Veldu annálsritastærðir á biðminni"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Hreinsa varanlega geymslu annálsrita?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Skráð"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Ekki skráð"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Ekki tiltækt"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d tæki tengt</item>
+ <item quantity="other">%1$d tæki tengd</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Meiri tími."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Minni tími."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-it/arrays.xml b/packages/SettingsLib/res/values-it/arrays.xml
index 42a246d..630fe3d 100644
--- a/packages/SettingsLib/res/values-it/arrays.xml
+++ b/packages/SettingsLib/res/values-it/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Mostra aree overdraw"</item>
<item msgid="2290859360633824369">"Mostra aree con deuteranomalia"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (predefinito)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Limite standard"</item>
<item msgid="4071574792028999443">"Nessun processo in background"</item>
diff --git a/packages/SettingsLib/res/values-it/strings.xml b/packages/SettingsLib/res/values-it/strings.xml
index 7408b25..da73e18 100644
--- a/packages/SettingsLib/res/values-it/strings.xml
+++ b/packages/SettingsLib/res/values-it/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Reti"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certificazione display wireless"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Attiva registrazione dettagliata Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Consenti sempre scansioni roaming Wi-Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Selezione casuale dell\'indirizzo MAC con connessione"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Dati mobili sempre attivi"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Tethering accelerazione hardware"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Mostra dispositivi Bluetooth senza nome"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Inserisci il nome host del provider DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Mostra opzioni per la certificazione display wireless"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Aumenta il livello di registrazione Wi-Fi, mostrando il SSID RSSI nel selettore Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Consenti/vieta scansioni roaming Wi-Fi basate sulla quantità di traffico dati presente a livello di interfaccia"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Seleziona indirizzo MAC casuale con reti Wi-Fi collegate"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Dimensioni buffer Logger"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Seleziona dimensioni Logger per buffer log"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Cancellare i dati nello spazio di archiviazione permanente del logger?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Aggiornam. livelli hardware"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Lampeggia verde se aggiornam. livelli hardware"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Debug overdraw GPU"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Imposta renderer GPU"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Disabilita overlay HW"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Usa sempre GPU per la composizione dello schermo"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simula spazio colore"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrato"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Non registrato"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Non disponibile"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d dispositivi connessi</item>
+ <item quantity="one">%1$d dispositivo connesso</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Più tempo."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Meno tempo."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Attiva"</string>
+ <string name="cancel" msgid="6859253417269739139">"Annulla"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Attiva Non disturbare"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Mai"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Solo con priorità"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-iw/strings.xml b/packages/SettingsLib/res/values-iw/strings.xml
index fceaacc..adfa890 100644
--- a/packages/SettingsLib/res/values-iw/strings.xml
+++ b/packages/SettingsLib/res/values-iw/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"תקשורת רשתות"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"אישור של תצוגת WiFi"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"הפעל רישום מפורט של Wi‑Fi ביומן"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"התר תמיד סריקות נדידה של Wi‑Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"חיבור כתובת MAC אקראית"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"חבילת הגלישה פעילה תמיד"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"שיפור מהירות באמצעות חומרה לצורך שיתוף אינטרנט בין ניידים"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"הצגת מכשירי Bluetooth ללא שמות"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"צריך להזין את שם המארח של ספק DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"הצג אפשרויות עבור אישור של תצוגת WiFi"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"העלה את רמת הרישום של Wi‑Fi ביומן, הצג לכל SSID RSSI ב-Wi‑Fi Picker"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"התר/מנע סריקות נדידה של Wi-Fi בהתבסס על נפח תנועת הנתונים הקיימת בממשק"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"יצירת כתובת MAC אקראית בהתחברות לרשתות Wi-Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"גדלי מאגר של יומן רישום"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"בחר גדלים של יוצר יומן לכל מאגר יומן"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"האם למחוק את אחסון המתעד המתמיד?"</string>
@@ -403,4 +403,12 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"רשום"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"לא רשום"</string>
<string name="status_unavailable" msgid="7862009036663793314">"לא זמין"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="two">%1$d מכשירים מחוברים</item>
+ <item quantity="many">%1$d מכשירים מחוברים</item>
+ <item quantity="other">%1$d מכשירים מחוברים</item>
+ <item quantity="one">מכשיר אחד מחובר</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"יותר זמן."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"פחות זמן."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ja/strings.xml b/packages/SettingsLib/res/values-ja/strings.xml
index 671320b..1c0a941 100644
--- a/packages/SettingsLib/res/values-ja/strings.xml
+++ b/packages/SettingsLib/res/values-ja/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"ネットワーク"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"ワイヤレスディスプレイ認証"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Wi-Fi詳細ログの有効化"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Wi‑Fiローミングスキャンを常に許可する"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"接続先 MAC のランダム化"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"モバイルデータを常に ON にする"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"テザリング時のハードウェア アクセラレーション"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Bluetooth デバイスを名前なしで表示"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS プロバイダのホスト名を入力"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"ワイヤレスディスプレイ認証のオプションを表示"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi-Fiログレベルを上げて、Wi-Fi選択ツールでSSID RSSIごとに表示します"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"インターフェースのデータトラフィック量に基づいたWi-Fiローミングスキャンを許可するかしないかを設定できます"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Wi-Fi ネットワーク接続時の MAC アドレスのランダム化"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"ログバッファのサイズ"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"各ログバッファのログサイズを選択"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"ログの永続ストレージを消去しますか?"</string>
@@ -405,4 +405,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"登録済み"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"未登録"</string>
<string name="status_unavailable" msgid="7862009036663793314">"不明"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d 台の端末が接続されています</item>
+ <item quantity="one">%1$d 台の端末が接続されています</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"長くします。"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"短くします。"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ka/strings.xml b/packages/SettingsLib/res/values-ka/strings.xml
index 1948460..6c08a98 100644
--- a/packages/SettingsLib/res/values-ka/strings.xml
+++ b/packages/SettingsLib/res/values-ka/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"ქსელი"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"უსადენო ეკრანის სერტიფიცირება"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Wi‑Fi-ს დაწვრილებითი აღრიცხვის ჩართვა"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Wi‑Fi Roam სკანირების მუდამ დაშვება"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"დაკავშირებულია MAC მისამართის შემთხვევითობა"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"მობილური ინტერნეტის ყოველთვის გააქტიურება"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"ტეტერინგის აპარატურული აჩქარება"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Bluetooth-მოწყობილობების ჩვენება სახელების გარეშე"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"შეიყვანეთ DNS პროვაიდერის სერვერის სახელი"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"უსადენო ეკრანის სერტიფიცირების ვარიანტების ჩვენება"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi‑Fi-ს აღრიცხვის დონის გაზრდა, Wi‑Fi ამომრჩეველში ყოველ SSID RSSI-ზე ჩვენება"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Wifi Roam სკანირების დაშვება/აკრძალვა, ინტერფეისზე არსებული მონაცემთა ტრაფიკზე დაფუძნებით"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"MAC მისამართის შემთხვევითობა ჩაირთოს, როცა Wi‑Fi-ქსელებთან დაკავშირება ხდება"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"ჟურნალიზაციის ბუფერის ზომები"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"აირჩიეთ ჟურნ. ზომა / ჟურნ. ბუფერზე"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"გსურთ მუდმივი ჟურნალირების მეხსიერების გასუფთავება?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"რეგისტრირებული"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"არარეგისტრირებული"</string>
<string name="status_unavailable" msgid="7862009036663793314">"მიუწვდომელია"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">დაკავშირებულია %1$d მოწყობილობა</item>
+ <item quantity="one">დაკავშირებულია %1$d მოწყობილობა</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"მეტი დრო."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"ნაკლები დრო."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-kk/arrays.xml b/packages/SettingsLib/res/values-kk/arrays.xml
index b0ba2ff..6d0ac63 100644
--- a/packages/SettingsLib/res/values-kk/arrays.xml
+++ b/packages/SettingsLib/res/values-kk/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Үстінен бастырылған аймақтарды көрсету"</item>
<item msgid="2290859360633824369">"Дейтераномалия аймақтарын көрсету"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (әдепкі)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Стандартты шектеу"</item>
<item msgid="4071574792028999443">"Фондық үрдістер жоқ"</item>
diff --git a/packages/SettingsLib/res/values-kk/strings.xml b/packages/SettingsLib/res/values-kk/strings.xml
index 2d03f7f..d9a7d03 100644
--- a/packages/SettingsLib/res/values-kk/strings.xml
+++ b/packages/SettingsLib/res/values-kk/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Желі орнату"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Сымсыз дисплей сертификаты"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Wi‑Fi егжей-тегжейлі журналға тір. қосу"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Wi‑Fi роумингін іздеулерге әрқашан рұқсат ету"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Қосылу кезінде MAC мекенжайларын еркін таңдау"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Мобильдік деректер әрқашан қосулы"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Тетерингтің аппараттық жеделдетуі"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Атаусыз Bluetooth құрылғыларын көрсету"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS провайдерінің хост атауын енгізіңіз"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Сымсыз дисплей растау опцияларын көрсету"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi‑Fi жур. тір. дең. арт., Wi‑Fi желісін таңдағышта әр SSID RSSI бойынша көрсету"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Интерфейсте бар деректер трафигінің мөлшерінің негізінде Wi-Fi роумингін іздеулерге рұқсат ету/тыйым салу"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Wi‑Fi желісіне қосылу кезінде MAC мекенжайларын еркін таңдау"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Журналға тіркеуші буферінің өлшемдері"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Әр журнал буфері үшін журналға тіркеуші өлшемдерін таңдау"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Тіркеуіштің тұрақты жадын тазарту керек пе?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Компьютерлік жабдықтама қабаттарының жаңартулары"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Жаңартылғанда компьютерлік жабдықтама қабаттарының жасыл шамы жануы"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Үстінен бастырылғанды жөндеу"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU бейне өңдеу құралын таңдау"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Жабдықпен үстінен бастыруды өшіру"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Экранды жасақтау үшін әрқашан графикалық процессор қолдану қажет"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Түстер аймағына еліктеу"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Тіркелген"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Тіркелмеген"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Қол жетімсіз"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d құрылғы қосылды</item>
+ <item quantity="one">%1$d құрылғы қосылды</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Көбірек уақыт."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Азырақ уақыт."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Қосу"</string>
+ <string name="cancel" msgid="6859253417269739139">"Бас тарту"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"\"Мазаламау\" режимін қосу"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Ешқашан"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Маңыздылары ғана"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-km/arrays.xml b/packages/SettingsLib/res/values-km/arrays.xml
index 3cbdc37..4328c18 100644
--- a/packages/SettingsLib/res/values-km/arrays.xml
+++ b/packages/SettingsLib/res/values-km/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"បង្ហាញតំបន់ដែលលើស"</item>
<item msgid="2290859360633824369">"បង្ហាញតំបន់សម្រាប់ Deuteranomaly"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (លំនាំដើម)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"ដែនកំណត់ស្តង់ដារ"</item>
<item msgid="4071574792028999443">"គ្មានដំណើរការក្នុងផ្ទៃខាងក្រោយ"</item>
diff --git a/packages/SettingsLib/res/values-km/strings.xml b/packages/SettingsLib/res/values-km/strings.xml
index 1d2476c..da55fbf 100644
--- a/packages/SettingsLib/res/values-km/strings.xml
+++ b/packages/SettingsLib/res/values-km/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"ការភ្ជាប់បណ្ដាញ"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"បង្ហាញការកំណត់រចនាសម្ព័ន្ធឥតខ្សែ"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"បើកកំណត់ហេតុរៀបរាប់វ៉ាយហ្វាយ"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"តែងតែអនុញ្ញាតការវិភាគរ៉ូមវ៉ាយហ្វាយ"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"ការជ្រើសរើស MAC ដោយចៃដន្យ នៅពេលបានភ្ជាប់"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"ទិន្នន័យទូរសព្ទចល័តដំណើរការជានិច្ច"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"ការបង្កើនល្បឿនផ្នែករឹងសម្រាប់ការភ្ជាប់"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"បង្ហាញឧបករណ៍ប្ល៊ូធូសគ្មានឈ្មោះ"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"បញ្ចូលឈ្មោះម៉ាស៊ីនរបស់ក្រុមហ៊ុនផ្ដល់សេវា DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"បង្ហាញជម្រើសសម្រាប់វិញ្ញាបនបត្របង្ហាញឥតខ្សែ"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"បង្កើនកម្រិតកំណត់ហេតុវ៉ាយហ្វាយបង្ហាញក្នុង SSID RSSI ក្នុងកម្មវិធីជ្រើសវ៉ាយហ្វាយ"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"អនុញ្ញាត/មិនអនុញ្ញាតការវិភាគរ៉ូមវ៉ាយហ្វាយផ្អែកលើចំនួនការបង្ហាញចរាចរណ៍ទិន្នន័យនៅចំណុចប្រទាក់"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"ជ្រើសរើសអាសយដ្ឋាន MAC ដោយចៃដន្យ នៅពេលភ្ជាប់បណ្តាញ Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"ទំហំ buffer របស់ Logger"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"ជ្រើសទំហំ Logger per log buffer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"ជម្រះទំហំផ្ទុក logger ដែលប្រើបានយូរឬ?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"បង្ហាញបច្ចុប្បន្នភាពស្រទាប់ផ្នែករឹង"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"ស្រទាប់ផ្នែករឹងបញ្ចេញពន្លឺបៃតង ពេលពួកវាធ្វើបច្ចុប្បន្នភាព"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"កែកំហុសការលើស GPU"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"កំណត់កម្មវិធីបំប្លែង GPU"</string>
<string name="disable_overlays" msgid="2074488440505934665">"បិទការត្រួត HW"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"ប្រើ GPU ជានិច្ចសម្រាប់ផ្សំអេក្រង់"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"ក្លែងធ្វើចន្លោះពណ៌"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"បានចុះឈ្មោះ"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"មិនបានចុះឈ្មោះ"</string>
<string name="status_unavailable" msgid="7862009036663793314">"មិនមាន"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">បានភ្ជាប់ឧបករណ៍ %1$d</item>
+ <item quantity="one">បានភ្ជាប់ឧបករណ៍ %1$d</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"រយៈពេលច្រើនជាង។"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"រយៈពេលតិចជាង។"</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"បើក"</string>
+ <string name="cancel" msgid="6859253417269739139">"បោះបង់"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"បើកមុខងារកុំរំខាន"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"កុំឱ្យសោះ"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"អាទិភាពប៉ុណ្ណោះ"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-kn/arrays.xml b/packages/SettingsLib/res/values-kn/arrays.xml
index 455b0a9..e1cc086 100644
--- a/packages/SettingsLib/res/values-kn/arrays.xml
+++ b/packages/SettingsLib/res/values-kn/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"ಓವರ್ಡ್ರಾ ಪ್ರದೇಶಗಳನ್ನು ತೋರಿಸು"</item>
<item msgid="2290859360633824369">"ಡ್ಯೂಟರ್ನೋಮಲಿಗಾಗಿ ಪ್ರದೇಶಗಳನ್ನು ತೋರಿಸು"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (ಡೀಫಾಲ್ಟ್)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"ಪ್ರಮಾಣಿತ ಮಿತಿ"</item>
<item msgid="4071574792028999443">"ಹಿನ್ನೆಲೆ ಪ್ರಕ್ರಿಯೆಗಳು ಇಲ್ಲ"</item>
diff --git a/packages/SettingsLib/res/values-kn/strings.xml b/packages/SettingsLib/res/values-kn/strings.xml
index 385308a..1e53b88 100644
--- a/packages/SettingsLib/res/values-kn/strings.xml
+++ b/packages/SettingsLib/res/values-kn/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"ನೆಟ್ವರ್ಕಿಂಗ್"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"ವೈರ್ಲೆಸ್ ಪ್ರದರ್ಶನ ಪ್ರಮಾಣೀಕರಣ"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Wi‑Fi ವೆರ್ಬೋಸ್ ಲಾಗಿಂಗ್ ಸಕ್ರಿಯಗೊಳಿಸಿ"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"ವೈ-ಫೈ ರೋಮ್ ಸ್ಕ್ಯಾನ್ಗಳನ್ನು ಯಾವಾಗಲೂ ಅನುಮತಿಸಿ"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"MAC ಯಾದೃಚ್ಛಿಕರಣವನ್ನು ಸಂಪರ್ಕಿಸಲಾಗಿದೆ"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"ಮೊಬೈಲ್ ಡೇಟಾ ಯಾವಾಗಲೂ ಸಕ್ರಿಯ"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"ಹಾರ್ಡ್ವೇರ್ನ ವೇಗವರ್ಧನೆಯನ್ನು ಟೆಥರಿಂಗ್ ಮಾಡಿ"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"ಹೆಸರುಗಳಿಲ್ಲದ ಬ್ಲೂಟೂತ್ ಸಾಧನಗಳನ್ನು ತೋರಿಸಿ"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS ಪೂರೈಕೆದಾರರ ಹೋಸ್ಟ್ಹೆಸರನ್ನು ನಮೂದಿಸಿ"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"ವೈರ್ಲೆಸ್ ಪ್ರದರ್ಶನ ಪ್ರಮಾಣೀಕರಣಕ್ಕಾಗಿ ಆಯ್ಕೆಗಳನ್ನು ತೋರಿಸು"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi‑Fi ಲಾಗಿಂಗ್ ಮಟ್ಟನ್ನು ಹೆಚ್ಚಿಸಿ, Wi‑Fi ಆಯ್ಕೆಯಲ್ಲಿ ಪ್ರತಿಯೊಂದು SSID RSSI ತೋರಿಸಿ"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"ಇಂಟರ್ಫೇಸ್ನಲ್ಲಿ ಲಭ್ಯವಿರುವ ಡೇಟಾ ಟ್ರಾಫಿಕ್ ಆಧಾರದ ಮೇಲೆ Wi‑Fi ರೋಮ್ ಸ್ಕ್ಯಾನ್ಗಳನ್ನು ಅನುಮತಿಸಿ/ನಿರಾಕರಿಸಿ"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"ವೈ-ಫೈ ನೆಟ್ವರ್ಕ್ಗಳು ಸಂಪರ್ಕಿಸುವಾಗ MAC ವಿಳಾಸವನ್ನು ಯಾದೃಚ್ಛಿಕಗೊಳಿಸಿ"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"ಲಾಗರ್ ಬಫರ್ ಗಾತ್ರಗಳು"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"ಪ್ರತಿ ಲಾಗ್ ಬಫರ್ಗೆ ಲಾಗರ್ ಗಾತ್ರಗಳನ್ನು ಆಯ್ಕೆಮಾಡಿ"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"ಶಾಶ್ವತವಾಗಿರುವ ಸಂಗ್ರಹಣೆ ಲಾಗರ್ ಅನ್ನು ತೆರವುಗೊಳಿಸುವುದೇ?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"ಹಾರ್ಡ್ವೇರ್ ಲೇಯರ್ ಅಪ್ಡೇಟ್"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"ಅವುಗಳು ನವೀಕರಿಸಿದಾಗ ಹಾರ್ಡ್ವೇರ್ ಲೇಯರ್ಗಳು ಹಸಿರು ಫ್ಲ್ಯಾಶ್ ಆಗುತ್ತದೆ"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"GPU ಓವರ್ಡ್ರಾ ಡೀಬಗ್"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU ರೆಂಡರರ್ ಹೊಂದಿಸಿ"</string>
<string name="disable_overlays" msgid="2074488440505934665">"HW ಓವರ್ಲೇ ನಿಷ್ಕ್ರಿಯ"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"ಸ್ಕ್ರೀನ್ ಸಂಯೋಜನೆಗಾಗಿ ಯಾವಾಗಲೂ GPU ಬಳಸಿ"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"ಬಣ್ಣದ ಸ್ಥಳ ಸಿಮ್ಯುಲೇಟ್"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"ನೋಂದಾಯಿಸಲಾಗಿದೆ"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"ನೋಂದಾಯಿಸಲಾಗಿಲ್ಲ"</string>
<string name="status_unavailable" msgid="7862009036663793314">"ಲಭ್ಯವಿಲ್ಲ"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d ಸಾಧನಗಳನ್ನು ಸಂಪರ್ಕಿಸಲಾಗಿದೆ</item>
+ <item quantity="other">%1$d ಸಾಧನಗಳನ್ನು ಸಂಪರ್ಕಿಸಲಾಗಿದೆ</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"ಹೆಚ್ಚು ಸಮಯ."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"ಕಡಿಮೆ ಸಮಯ."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"ಆನ್ ಮಾಡಿ"</string>
+ <string name="cancel" msgid="6859253417269739139">"ರದ್ದುಮಾಡಿ"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"ಅಡಚಣೆ ಮಾಡಬೇಡಿ ಅನ್ನು ಆನ್ ಮಾಡಿ"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"ಎಂದೂ ಇಲ್ಲ"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"ಆದ್ಯತೆ ಮಾತ್ರ"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ko/strings.xml b/packages/SettingsLib/res/values-ko/strings.xml
index e1be8dc..f2f952d 100644
--- a/packages/SettingsLib/res/values-ko/strings.xml
+++ b/packages/SettingsLib/res/values-ko/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"네트워크"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"무선 디스플레이 인증서"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Wi-Fi 상세 로깅 사용"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Wi‑Fi 로밍 스캔 항상 허용"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"연결된 MAC 임의 선택"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"항상 모바일 데이터 활성화"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"테더링 하드웨어 가속"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"이름이 없는 블루투스 기기 표시"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS 제공업체의 호스트 이름 입력"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"무선 디스플레이 인증서 옵션 표시"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi‑Fi 로깅 수준을 높이고, Wi‑Fi 선택도구에서 SSID RSSI당 값을 표시합니다."</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"인터페이스에 표시되는 데이터 트래픽의 양을 기반으로 Wi-Fi 로밍 스캔을 허용하거나 허용하지 않습니다."</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Wi‑Fi 네트워크에 연결할 때 MAC 주소 임의 선택"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"로거 버퍼 크기"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"로그 버퍼당 로거 크기 선택"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"로거 영구 저장소를 삭제하시겠습니까?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"등록됨"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"등록되지 않음"</string>
<string name="status_unavailable" msgid="7862009036663793314">"사용할 수 없음"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">기기 %1$d개 연결됨</item>
+ <item quantity="one">기기 %1$d개 연결됨</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"시간 늘리기"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"시간 줄이기"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ky/arrays.xml b/packages/SettingsLib/res/values-ky/arrays.xml
index 721bfaa7..7b1587a 100644
--- a/packages/SettingsLib/res/values-ky/arrays.xml
+++ b/packages/SettingsLib/res/values-ky/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Үстүнө тартуу аймагын көргөзүү"</item>
<item msgid="2290859360633824369">"Дейтераномалиялуулар үчүн мейкиндикти көргөзүү"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (Демейки)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Стандарттык чектөө"</item>
<item msgid="4071574792028999443">"Фондо процесстер жок"</item>
diff --git a/packages/SettingsLib/res/values-ky/strings.xml b/packages/SettingsLib/res/values-ky/strings.xml
index d323df2..1fc446f 100644
--- a/packages/SettingsLib/res/values-ky/strings.xml
+++ b/packages/SettingsLib/res/values-ky/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Тармактык байланыштарды кеңейтүү"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Зымсыз дисплейди аныктоо"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Wi‑Fi дайын-даректүү протоколун иштетүү"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Wi-Fi Роуминг Скандоо мүмкүнчүлүгүнө ар дайым уруксат берилсин"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Кокустан тандалган MAC дарегине туташты"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Мобилдик Интернет иштей берсин"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Тетерингдин иштешин тездетүү"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Аталышсыз Bluetooth түзмөктөрү көрсөтүлсүн"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS түйүндүн аталышын киргизиңиз"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Зымсыз дисплейди сертификатто мүмкүнчүлүктөрүн көргөзүү"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi-Fi Кармагычта Wi‑Fi протокол деңгээлин жогорулатуу жана ар бир SSID RSSI үчүн көрсөтүү."</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Интерфейстеги дайындар трафигинин көлөмүнө жараша Wi-Fi Роуминг скандоо мүмкүнчүлүгүн иштетүү/өчүрүү"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Wi‑Fi тармагына туташууда кокустан тандаган MAC дарегин колдонуу"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Каттагыч буферлеринин өлчөмдөрү"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Каттоо буфери үчүн Каттагычтын көлөмүн тандаңыз"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Таржымалдын туруктуу диски тазалансынбы?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Катмарлардын аппараттык жаңырышы"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Катмарлардын аппараттык жаңырышын жашыл м-н белг."</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"GPU үстүнө тартуусун жөндөө"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU өткөргүчүн жөндөө"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Аппар. катмарлаш-у өчүрүү"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Экранды калыптоодо ар дайым GPU колдонулсун"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Түс мейкиндигин эмуляциялоо"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Катталган"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Катталган эмес"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Жеткиликсиз"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d түзмөк туташып турат</item>
+ <item quantity="one">%1$d түзмөк туташып турат</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Көбүрөөк убакыт."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Азыраак убакыт."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Күйгүзүү"</string>
+ <string name="cancel" msgid="6859253417269739139">"Жокко чыгаруу"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"\"Тынчымды алба\" режимин күйгүзүү"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Эч качан"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Шашылыш эскертмелер гана"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-lo/arrays.xml b/packages/SettingsLib/res/values-lo/arrays.xml
index 6aa8ffc..d38f931 100644
--- a/packages/SettingsLib/res/values-lo/arrays.xml
+++ b/packages/SettingsLib/res/values-lo/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"ສະແດງຂອບເຂດການແຕ້ມທັບ"</item>
<item msgid="2290859360633824369">"ສະແດງພື້ນທີ່ສຳລັບ Deuteranomaly"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (ຄ່າເລີ່ມຕົ້ນ)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"ຂີດຈຳກັດມາດຕະຖານ"</item>
<item msgid="4071574792028999443">"ບໍ່ມີໂປຣເຊສພື້ນຫຼັງ"</item>
diff --git a/packages/SettingsLib/res/values-lo/strings.xml b/packages/SettingsLib/res/values-lo/strings.xml
index 1e58af1..f65d894 100644
--- a/packages/SettingsLib/res/values-lo/strings.xml
+++ b/packages/SettingsLib/res/values-lo/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"ການສ້າງເຄືອຂ່າຍ"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"ສະແດງການຮັບຮອງຂອງລະບົບໄຮ້ສາຍ"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"ເປີດນຳໃຊ້ການເກັບປະຫວັດ Verbose Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"ອະນຸຍາດການສະແກນການໂຣມ Wi‑Fi ສະເໝີ"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"ເຊື່ອມຕໍ່ການສຸ່ມ MAC ແລ້ວ"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"ເປີດໃຊ້ອິນເຕີເນັດມືຖືຕະຫຼອດເວລາ"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"ເປີດໃຊ້ການເລັ່ງຄວາມໄວດ້ວຍຮາດແວ"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"ສະແດງອຸປະກອນ Bluetooth ທີ່ບໍ່ມີຊື່"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"ລະບຸຊື່ໂຮສຂອງຜູ້ໃຫ້ບໍລິການ DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"ສະແດງໂຕເລືອກສຳລັບການສະແດງການຮັບຮອງລະບົບໄຮ້ສາຍ"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"ເພີ່ມລະດັບການເກັບປະຫວັດ Wi‑Fi, ສະແດງຕໍ່ SSID RSSI ໃນ Wi‑Fi Picker"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"ອະນຸຍາດ/ບໍ່ອະນຸຍາດການສະແກນການໂຣມ Wi-Fi ອີງຕາມຈຳນວນຂໍ້ມູນທີ່ເກີດຂຶ້ນໃນລະດັບສ່ວນຕິດຕໍ່"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"ສຸ່ມທີ່ຢູ່ MAC ເມື່ອເຊື່ອມຕໍ່ຫາເຄືອຂ່າຍ Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"ຂະໜາດບັບເຟີໂຕລັອກ"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"ເລືອກຂະໜາດລັອກຕໍ່ບັບເຟີ"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"ລຶບລ້າງບ່ອນຈັດເກັບຖາວອນຂອງຕົວບັນທຶກບໍ່?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"ສະແດງການອັບເດດເລເຢີຂອງຮາດແວ"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"ກະພິບເລເຢີຂອງຮາດແວໃຫ້ເປັນສີຂຽວເມື່ອມີການອັບເດດ"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"ແກ້ບັນຫາການແຕ້ມທັບຂອງ GPU"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"ກຳນົດຕົວເຣັນເດີ GPU"</string>
<string name="disable_overlays" msgid="2074488440505934665">"ປິດການເຮັດວຽກ HW overlays"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"ໃຊ້ GPU ໃນການວາງອົງປະກອບໜ້າຈໍສະເໝີ"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"ຈຳລອງ color space"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"ລົງທະບຽນແລ້ວ"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"ບໍ່ໄດ້ລົງທະບຽນ"</string>
<string name="status_unavailable" msgid="7862009036663793314">"ບໍ່ມີຂໍ້ມູນ"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">ເຊື່ອມຕໍ່ %1$d ອຸປະກອນແລ້ວ</item>
+ <item quantity="one">ເຊື່ອມຕໍ່ %1$d ອຸປະກອນແລ້ວ</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"ເພີ່ມເວລາ."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"ຫຼຸດເວລາ."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"ເປີດ"</string>
+ <string name="cancel" msgid="6859253417269739139">"ຍົກເລີກ"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"ເປີດໂໝດຫ້າມລົບກວນ"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"ບໍ່ໃຊ້"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"ສຳຄັນເທົ່ານັ້ນ"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-lt/strings.xml b/packages/SettingsLib/res/values-lt/strings.xml
index a35cd3c..879054e 100644
--- a/packages/SettingsLib/res/values-lt/strings.xml
+++ b/packages/SettingsLib/res/values-lt/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Tinklai"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Belaidžio rodymo sertifikavimas"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Įgal. „Wi‑Fi“ daugiaž. įraš. į žurnalą"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Visada leisti „Wi-Fi“ tarptiklinio ryšio nuskaitymą"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Atsitiktinis MAC adreso parinkimas prisijungiant"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobiliojo ryšio duomenys visada suaktyvinti"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Įrenginio kaip modemo naudojimo aparatinės įrangos spartinimas"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Rodyti „Bluetooth“ įrenginius be pavadinimų"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Įveskite DNS teikėjo prieglobos serverio pavadinimą"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Rodyti belaidžio rodymo sertifikavimo parinktis"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Padidinti „Wi‑Fi“ įrašymo į žurnalą lygį, rodyti SSID RSSI „Wi-Fi“ rinkiklyje"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Leisti / neleisti „Wi‑Fi“ tarptinklinio ryšio nuskaitymo, atsižvelgiant į sąsajos duomenų srauto kiekį"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Atsitiktinai parinkti MAC adresą prisijungiant prie „Wi‑Fi“ tinklų"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Registruotuvo buferio dydžiai"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Pasir. registr. dydž. žurn. bufer."</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Išvalyti nuolatinę registruotuvo saugyklą?"</string>
@@ -403,4 +403,12 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Užregistruota"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Neužregistruota"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Užimta"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">Prijungtas %1$d įrenginys</item>
+ <item quantity="few">Prijungti %1$d įrenginiai</item>
+ <item quantity="many">Prijungta %1$d įrenginio</item>
+ <item quantity="other">Prijungta %1$d įrenginių</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Daugiau laiko."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Mažiau laiko."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-lv/strings.xml b/packages/SettingsLib/res/values-lv/strings.xml
index 8239d9f..345d9af 100644
--- a/packages/SettingsLib/res/values-lv/strings.xml
+++ b/packages/SettingsLib/res/values-lv/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Tīklošana"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Bezvadu attēlošanas sertifikācija"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Iespējot Wi‑Fi detalizēto reģistrēšanu"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Vienmēr atļaut Wi‑Fi meklēšanu"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Nejaušu MAC adrešu izveide savienojuma laikā"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Vienmēr aktīvs mobilo datu savienojums"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Paātrināta aparatūras darbība piesaistei"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Rādīt Bluetooth ierīces bez nosaukumiem"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Ievadiet DNS pakalpojumu sniedzēja saimniekdatora nosaukumu"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Rādīt bezvadu attēlošanas sertifikācijas iespējas"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Palieliniet Wi‑Fi reģistrēšanas līmeni; rādīt katram SSID RSSI Wi‑Fi atlasītājā."</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Atļaujiet/neatļaujiet Wi‑Fi meklēšanu, pamatojoties uz saskarnē saņemto datplūsmas apjomu."</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Izveidot nejaušas MAC adreses, izveidojot savienojumu ar Wi‑Fi tīkliem"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Reģistrētāja buferu lielumi"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Atlasīt reģistrētāja bufera liel."</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Vai notīrīt reģistrētāja pastāvīgo krātuvi?"</string>
@@ -403,4 +403,11 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Reģistrēts"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Nav reģistrēts"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Nepieejams"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="zero">Pievienotas %1$d ierīces</item>
+ <item quantity="one">Pievienota %1$d ierīce</item>
+ <item quantity="other">Pievienotas %1$d ierīces</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Vairāk laika."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Mazāk laika."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-mk/arrays.xml b/packages/SettingsLib/res/values-mk/arrays.xml
index 2d9d73ce..e10b3fb 100644
--- a/packages/SettingsLib/res/values-mk/arrays.xml
+++ b/packages/SettingsLib/res/values-mk/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Прикажи пречекорени делови"</item>
<item msgid="2290859360633824369">"Прикажи делови за лица со девтераномалија"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (стандардно)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Стандардна граница"</item>
<item msgid="4071574792028999443">"Нема процеси во заднина"</item>
diff --git a/packages/SettingsLib/res/values-mk/strings.xml b/packages/SettingsLib/res/values-mk/strings.xml
index eaa5539..48c7bec 100644
--- a/packages/SettingsLib/res/values-mk/strings.xml
+++ b/packages/SettingsLib/res/values-mk/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Вмрежување"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Приказ на сертификација на безжична мрежа"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Овозможи преопширно пријавување Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Секогаш дозволувај Wi‑Fi скенирање во роаминг"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Поврзана MAC-рандомизација"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Мобилниот интернет е секогаш активен"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Хардверско забрзување за врзување"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Прикажувај уреди со Bluetooth без имиња"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Внесете име на хост на операторот на DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Покажи ги опциите за безжичен приказ на сертификат"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Зголеми Wi‑Fi ниво на пријавување, прикажи по SSID RSSI во Wi‑Fi бирач"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Дозволи/Забрани Wi‑Fi скенирање во роаминг според количината на постоечкиот податочен сообраќај на интерфејсот."</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Користи MAC-адреса по случаен избор при поврзување на Wi‑Fi мрежи"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Величини на меѓумеморија на забележувач"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Величина/меѓумеморија на дневник"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Да се избрише постојаната меморија на дневникот?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Ажурир. слоеви на хардвер"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Осветли слоеви на хардвер со зелено кога се ажур."</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Отстр. греш. на GPU"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Постави прикажувач на GPU"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Оневозможи HW преклопувања"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Секогаш користи GPU за составување екран"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Симулирај простор на бои"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Регистриран"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Не е регистриран"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Недостапен"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">Поврзан е %1$d уред</item>
+ <item quantity="other">Поврзани се %1$d уреди</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Повеќе време."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Помалку време."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Вклучи"</string>
+ <string name="cancel" msgid="6859253417269739139">"Откажи"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Исклучување на „Не вознемирувај“"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Никогаш"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Само приоритетно"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ml/arrays.xml b/packages/SettingsLib/res/values-ml/arrays.xml
index 121c287..615a020 100644
--- a/packages/SettingsLib/res/values-ml/arrays.xml
+++ b/packages/SettingsLib/res/values-ml/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"ഓവർഡ്രോ ഭാഗങ്ങൾ ദൃശ്യമാക്കുക"</item>
<item msgid="2290859360633824369">"വർണ്ണാന്ധതയ്ക്കായുള്ള ഭാഗങ്ങൾ ദൃശ്യമാക്കുക"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (ഡിഫോൾട്ട്)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"അടിസ്ഥാന പരിധി"</item>
<item msgid="4071574792028999443">"പശ്ചാത്തല പ്രോസസ്സുകൾ ഒന്നുമില്ല"</item>
diff --git a/packages/SettingsLib/res/values-ml/strings.xml b/packages/SettingsLib/res/values-ml/strings.xml
index 0ddfc79..93407ec 100644
--- a/packages/SettingsLib/res/values-ml/strings.xml
+++ b/packages/SettingsLib/res/values-ml/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"നെറ്റ്വര്ക്കിംഗ്"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"വയർലെസ് ഡിസ്പ്ലേ സർട്ടിഫിക്കേഷൻ"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"വൈഫൈ വെർബോസ് ലോഗിംഗ് പ്രവർത്തനക്ഷമമാക്കുക"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"എപ്പോഴും വൈഫൈ റോം സ്കാൻ അനുവദിക്കൂ"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"കണക്റ്റ് ചെയ്ത MAC ക്രമരഹിതമാക്കൽ"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"മൊബൈൽ ഡാറ്റ എല്ലായ്പ്പോഴും സജീവം"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"ടെതറിംഗ് ഹാർഡ്വെയർ ത്വരിതപ്പെടുത്തൽ"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"പേരില്ലാത്ത Bluetooth ഉപകരണങ്ങൾ കാണിക്കുക"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS ദാതാവിന്റെ ഹോസ്റ്റുനാമം നൽകുക"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"വയർലെസ് ഡിസ്പ്ലേ സർട്ടിഫിക്കേഷനായി ഓപ്ഷനുകൾ ദൃശ്യമാക്കുക"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"വൈഫൈ പിക്കറിൽ ഓരോ SSID RSSI പ്രകാരം കാണിക്കാൻ വൈഫൈ ലോഗിംഗ് നില വർദ്ധിപ്പിക്കുക"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"ഇന്റർഫേസിലെ ഡാറ്റ ട്രാഫിക്ക് സാന്നിദ്ധ്യത്തിന്റെ കണക്ക് അടിസ്ഥാനമാക്കി വൈഫൈ റോം സ്കാനുകൾ അനുവദിക്കുക/അനുവദിക്കാതിരിക്കുക"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"വൈഫൈ നെറ്റ്വർക്കുകളിലേക്ക് കണക്റ്റ് ചെയ്യുമ്പോൾ MAC വിലാസം ക്രമരഹിതമാക്കുക"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"ലോഗർ ബഫർ വലുപ്പം"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"ഓരോ ലോഗ് ബഫറിനും വലുപ്പം തിരഞ്ഞെടുക്കൂ"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"ലോഗർ സ്ഥിര സ്റ്റോറേജ് മായ്ക്കണോ?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"ഹാർഡ്വെയർ ലേയർ അപ്ഡേറ്റ് കാണിക്കൂ"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"ഹാർഡ്വെയർ ലേയറുകളുടെ അപ്ഡേറ്റുകൾ പൂർത്തിയാകുമ്പോൾ അവ പച്ച നിറത്തിൽ പ്രകാശിപ്പിക്കുക"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"GPU ഓവർഡ്രോ ഡീബഗ്ഗുചെയ്യുക"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU റെൻഡറർ സജ്ജീകരിക്കുക"</string>
<string name="disable_overlays" msgid="2074488440505934665">"HW ഓവർലേ നിഷ്ക്രിയമാക്കൂ"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"സ്ക്രീൻ കമ്പോസിറ്റുചെയ്യലിനായി എല്ലായ്പ്പോഴും GPU ഉപയോഗിക്കുക"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"വർണ്ണ സ്പെയ്സ് പ്രവർത്തിപ്പിക്കുക"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"രജിസ്റ്റർ ചെയ്തു"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"രജിസ്റ്റർ ചെയ്തിട്ടില്ല"</string>
<string name="status_unavailable" msgid="7862009036663793314">"ലഭ്യമല്ല"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d ഉപകരണങ്ങൾ കണക്റ്റ് ചെയ്തു</item>
+ <item quantity="one">%1$d ഉപകരണം കണക്റ്റ് ചെയ്തു</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"കൂടുതൽ സമയം."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"കുറഞ്ഞ സമയം."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"ഓണാക്കുക"</string>
+ <string name="cancel" msgid="6859253417269739139">"റദ്ദാക്കുക"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"\'ശല്യപ്പെടുത്തരുത്\' ഓണാക്കുക"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"ഒരിക്കലും ഇല്ല"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"മുൻഗണന മാത്രം"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-mn/strings.xml b/packages/SettingsLib/res/values-mn/strings.xml
index 67c6495..5652c8d 100644
--- a/packages/SettingsLib/res/values-mn/strings.xml
+++ b/packages/SettingsLib/res/values-mn/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Сүлжээ"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Утасгүй дэлгэцийн сертификат"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Wi‑Fi Verbose лог-г идэвхжүүлэх"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Wi‑Fi Роум сканыг байнга зөвшөөрөх"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Холбогдсон дурын MAC хаяг үүсгэлт (Randomization)"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Мобайл дата байнга идэвхтэй"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Модем болгох хардвер хурдасгуур"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Нэргүй Bluetooth төхөөрөмжийг харуулах"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS-н үйлчилгээ үзүүлэгчийн хостын нэрийг оруулах"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Утасгүй дэлгэцийн сертификатын сонголтыг харуулах"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi‑Fi лог-н түвшинг нэмэгдүүлэх, Wi‑Fi Сонгогч дээрх SSID-д ногдох RSSI-г харуулах"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Интерфэйс дээрх дата трафикын хэмжээнээс хамааран Wi‑Fi Роум Скан-г зөвшөөрөх/үл зөвшөөрөх"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Wi‑Fi сүлжээнд холбогдох үедээ шинэ дурын (random) MAC хаяг үүсгэх"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Логгерын буферын хэмжээ"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Лог буфер бүрт ногдох логгерын хэмжээг сонгоно уу"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Нэвтрэгчийн тогтмол санг устгах уу?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Бүртгэсэн"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Бүртгээгүй"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Байхгүй"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d төхөөрөмж холбосон</item>
+ <item quantity="one">%1$d төхөөрөмж холбосон</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Их хугацаа."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Бага хугацаа."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-mr/strings.xml b/packages/SettingsLib/res/values-mr/strings.xml
index eeb0a16..a15869e 100644
--- a/packages/SettingsLib/res/values-mr/strings.xml
+++ b/packages/SettingsLib/res/values-mr/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"नेटवर्किंग"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"वायरलेस डिस्प्ले प्रमाणीकरण"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"वाय-फाय व्हर्बोझ लॉगिंग सक्षम करा"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"वाय-फाय रोम स्कॅनला नेहमी अनुमती द्या"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"कनेक्ट केलेले MAC Randomization"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"मोबाइल डेटा नेहमी सक्रिय"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"टेदरिंग हार्डवेअर प्रवेग"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"नावांशिवाय ब्लूटूथ डिव्हाइस दाखवा"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS पुरवठादाराचे होस्टनाव टाका"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"वायरलेस डिस्प्ले प्रमाणिकरणाचे पर्याय दाखवा"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"वाय-फाय लॉगिंग स्तर वाढवा, वाय-फाय सिलेक्टरमध्ये प्रति SSID RSSI दर्शवा"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"वाय-फाय रोम स्कॅनला इंटरफेसवर उपस्थित असलेल्या रहदारी डेटाच्या प्रमाणावर आधारित अनुमती द्या/अनुमती देऊ नका"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"वाय-फाय नेटवर्कशी कनेक्ट करताना MAC अॅड्रेस रँडमाइझ करा"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"लॉगर बफर आकार"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"प्रति लॉग बफर लॉगर आकार निवडा"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"लॉगरवर सतत असणारा संचय साफ करायचा?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"नोंदवलेले"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"नोंदवलेले नाही"</string>
<string name="status_unavailable" msgid="7862009036663793314">"अनुपलब्ध"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d डिव्हाइस कनेक्ट केले आहे</item>
+ <item quantity="other">%1$d डिव्हाइस कनेक्ट केली आहेत</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"जास्त वेळ."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"कमी वेळ."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ms/strings.xml b/packages/SettingsLib/res/values-ms/strings.xml
index a69024c..713dc82 100644
--- a/packages/SettingsLib/res/values-ms/strings.xml
+++ b/packages/SettingsLib/res/values-ms/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Perangkaian"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Pensijilan paparan wayarles"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Dayakan Pengelogan Berjela-jela Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Sentiasa benarkan Imbasan Perayauan Wi-Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Perawakan MAC Tersambung"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Data mudah alih sentiasa aktif"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Pecutan perkakasan penambatan"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Tunjukkan peranti Bluetooth tanpa nama"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Masukkan nama hos pembekal DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Tunjukkan pilihan untuk pensijilan paparan wayarles"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Tingkatkan tahap pengelogan Wi-Fi, tunjuk setiap SSID RSSI dalam Pemilih Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Benarkan/Jangan benarkan Imbasan Perayauan Wi-Fi berdasarkan jumlah trafik data yang ada pada antara muka"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Rawakkan alamat MAC apabila menyambung ke rangkaian Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Saiz penimbal pengelog"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Pilih saiz Pengelog bagi setiap penimbal log"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Kosongkan storan gigih pengelog?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Berdaftar"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Tidak didaftarkan"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Tidak tersedia"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d peranti disambungkan</item>
+ <item quantity="one">%1$d peranti disambungkan</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Lagi masa."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Kurang masa."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-my/arrays.xml b/packages/SettingsLib/res/values-my/arrays.xml
index 8e3ed3f..435cdf5 100644
--- a/packages/SettingsLib/res/values-my/arrays.xml
+++ b/packages/SettingsLib/res/values-my/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"ရှိရင်းစွဲထက်ပိုသော ဧရိယာများကိုပြရန်"</item>
<item msgid="2290859360633824369">"အရောင်ရောနှောသောဧရိယာများပြရန်"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (မူရင်း)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"သတ်မှတ်စံနှုန်း"</item>
<item msgid="4071574792028999443">"နောက်ခံပြုလုပ်နေသောလုပ်ငန်းစဉ်မရှိ"</item>
diff --git a/packages/SettingsLib/res/values-my/strings.xml b/packages/SettingsLib/res/values-my/strings.xml
index 5e78249..22ac322 100644
--- a/packages/SettingsLib/res/values-my/strings.xml
+++ b/packages/SettingsLib/res/values-my/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"ချိတ်ဆက်ဆောင်ရွက်ခြင်း"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"ကြိုးမဲ့ပြသမှု အသိအမှတ်ပြုလက်မှတ်"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Wi‑Fi Verbose မှတ်တမ်းတင်ခြင်းအား ဖွင့်မည်"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Wi‑Fi ရွမ်းရှာဖွေမှုကို အမြဲတမ်း ခွင့်ပြုမည်"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"MAC ကျပန်းပြုလုပ်မှုကို ချိတ်ဆက်ထားခြင်း"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"မိုဘိုင်းဒေတာကို အမြဲဖွင့်ထားရန်"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"ဖုန်းကို မိုဒမ်အဖြစ်အသုံးပြုမှု စက်ပစ္စည်းဖြင့် အရှိန်မြှင့်တင်ခြင်း"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"အမည်မရှိသော ဘလူးတုသ်စက်ပစ္စည်းများကို ပြသရန်"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS ဝန်ဆောင်မှုပေးသူ၏ အင်တာနက်လက်ခံဝန်ဆောင်ပေးသူအမည်ကို ထည့်ပါ"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"ကြိုးမဲ့ အခင်းအကျင်း အသိအမှတ်ပြုလက်မှတ်အတွက် ရွေးချယ်စရာများပြရန်"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi‑Fi မှတ်တမ်းတင်ခြင်း နှုန်းအားမြင့်ကာ၊ Wi‑Fi ရွေးရာတွင် SSID RSSI ဖြင့်ပြပါ"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"မျက်နှာပြင်တွင် ဖော်ပြသည့် အချက်လက် အသွားအလာ ပမာဏပေါ်တွင် အခြေခံ၍ WIFI ရွမ်းရှာဖွေမှုအား ဖွင့်/ပိတ်မည်"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Wi‑Fi ကွန်ရက်များသို့ ချိတ်ဆက်သည့်အခါ MAC လိပ်စာ ကျပန်းပြုလုပ်ခြင်း"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"လော့ဂါး ဘာဖား ဆိုက်များ"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"လော့ ဘာဖားတွက် လော့ဂါးဆိုက် ရွေး"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"မှတ်တမ်းထိန်းသိမ်းပေးသည့် သိုလှောင်ခန်းကို ရှင်းလင်းမလား။"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"ဟာ့ဒ်ဝဲအလွှာများအဆင်မြှင့်မှုကိုပြရန်"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"အပ်ဒိတ်လုပ်ချိန် ဟာ့ဒ်ဝဲအလွှာများ အစိမ်းရောင်ပြပါ"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"GPU ပိုသုံးစွဲမှုအမှားရှာဖွေပြင်ဆင်ရန်"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU Renderer သတ်မှတ်ပါ"</string>
<string name="disable_overlays" msgid="2074488440505934665">"HWထပ်ဆင့်အရာများပိတ်ရန်"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"GPU ကိုမျက်နှာပြင်ခင်းကျင်းရာတွင် အမြဲသုံးပါ။"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"အရောင်နေရာတူအောင် ဖန်တီးသည်"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"မှတ်ပုံတင်ထားသည်"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"မှတ်ပုံတင်မထားပါ"</string>
<string name="status_unavailable" msgid="7862009036663793314">"မရရှိနိုင်ပါ။"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">စက် %1$d ခု ချိတ်ဆက်ထားသည်</item>
+ <item quantity="one">စက် %1$d ခု ချိတ်ဆက်ထားသည်</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"အချိန်တိုးရန်။"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"အချိန်လျှော့ရန်။"</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"ဖွင့်ရန်"</string>
+ <string name="cancel" msgid="6859253417269739139">"မလုပ်တော့"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"\'မနှောင့်ယှက်ရ\' ဖွင့်ခြင်း"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"ဘယ်တော့မှ"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"ဦးစားပေးများသာ"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>။ <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-nb/arrays.xml b/packages/SettingsLib/res/values-nb/arrays.xml
index 1882e2e..9c304b8 100644
--- a/packages/SettingsLib/res/values-nb/arrays.xml
+++ b/packages/SettingsLib/res/values-nb/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Vis overtrekksområder"</item>
<item msgid="2290859360633824369">"Vis områder for deuteranomali"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (standard)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Standard grense"</item>
<item msgid="4071574792028999443">"Ingen bakgrunnsprosesser"</item>
diff --git a/packages/SettingsLib/res/values-nb/strings.xml b/packages/SettingsLib/res/values-nb/strings.xml
index d45bbc3..c501596 100644
--- a/packages/SettingsLib/res/values-nb/strings.xml
+++ b/packages/SettingsLib/res/values-nb/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Nettverk"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Trådløs skjermsertifisering"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Aktiver detaljert Wi-Fi-loggføring"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Tillat alltid skanning for Wi-Fi-roaming"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Tilfeldig MAC-adresse ved tilkobling"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobildata er alltid aktiv"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Maskinvareakselerasjon for internettdeling"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Vis Bluetooth-enheter uten navn"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Skriv inn vertsnavnet til DNS-leverandøren"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Vis alternativer for sertifisering av trådløs skjerm"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Øk Wi-Fi-loggenivå – vis per SSID RSSI i Wi-Fi-velgeren"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Tillat / ikke tillat skanning for Wi-Fi-roaming basert på mengden datatrafikk til stede i grensesnittet"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Angi tilfeldig MAC-adresse når du kobler til Wi-Fi-nettverk"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Bufferstørrelser for logg"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Velg loggstørrelse per loggbuffer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Vil du tømme det varige logglageret?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrert"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Ikke registrert"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Ikke tilgjengelig"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d enheter er tilkoblet</item>
+ <item quantity="one">%1$d enhet er tilkoblet</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Mer tid."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Mindre tid."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ne/arrays.xml b/packages/SettingsLib/res/values-ne/arrays.xml
index de6b86e..cd016e0 100644
--- a/packages/SettingsLib/res/values-ne/arrays.xml
+++ b/packages/SettingsLib/res/values-ne/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"overdraw क्षेत्रहरू देखाउनुहोस्"</item>
<item msgid="2290859360633824369">"Deuteranomaly का लागि क्षेत्रहरू देखाउनुहोस्"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (पूर्वनिर्धारित मान)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"मानक सीमा"</item>
<item msgid="4071574792028999443">"कुनै पृष्ठभूमि प्रक्रियाहरू छैनन्"</item>
diff --git a/packages/SettingsLib/res/values-ne/strings.xml b/packages/SettingsLib/res/values-ne/strings.xml
index d26541c..a44ac29 100644
--- a/packages/SettingsLib/res/values-ne/strings.xml
+++ b/packages/SettingsLib/res/values-ne/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"नेटवर्किङ"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"ताररहित प्रदर्शन प्रमाणीकरण"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Wi-Fi वर्बोज लग सक्षम पार्नुहोस्"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Wi-Fi घुम्ने स्क्यान गर्न सधैँ अनुमति दिनुहोस्"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"जडान गरिएको MAC को अनियमितता"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"मोबाइल डेटा सधैँ सक्रिय राख्नुहोस्"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"टेदरिङको लागि हार्डवेयरको प्रवेग"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"नामकरण नगरिएका ब्लुटुथ यन्त्रहरू देखाउनुहोस्"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS प्रदायकको होस्टनाम प्रविष्ट गर्नुहोस्"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"ताररहित प्रदर्शन प्रमाणीकरणका लागि विकल्पहरू देखाउनुहोस्"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi-Fi लग स्तर बढाउनुहोस्, Wi-Fi चयनकर्तामा प्रति SSID RSSI देखाइन्छ"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Wi-Fi घुम्ने स्क्यान इन्टरफेसमा रहेको डेटा यातायातको मात्रामा आधारित अनुमति दिनुहोस्/नदिनुहोस्"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Wi‑Fi नेटवर्कहरूमा जडान गर्ने बेला MAC को ठेगाना अनियमित गर्नुहोस्"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"लगर बफर आकारहरू"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"लग बफर प्रति लगर आकार चयन गर्नुहोस्"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"लगरको निरन्तर भण्डारणलाई खाली गर्ने हो?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"हार्डवेयर तह अद्यावधिक देखाउनुहोस्"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"फ्ल्यास हार्डवेयर तहहरू अपडेट हुँदा हरिया हुन्छन्"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"GPU overdraw डिबग गर्नुहोस्"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU रेन्डरर सेट गर्नुहोस्"</string>
<string name="disable_overlays" msgid="2074488440505934665">"HW ओवरले असक्षम पार्नुहोस्"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"स्क्रिन कोम्पजिट गर्न लागि सधैँ GPU प्रयोग गर्नुहोस्"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"रंग स्पेस अनुकरण गर्नुहोस्"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"दर्ता गरिएको"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"दर्ता नगरिएको"</string>
<string name="status_unavailable" msgid="7862009036663793314">"अनुपलब्ध"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d यन्त्रहरू जडान गरिए</item>
+ <item quantity="one">%1$d यन्त्र जडान गरियो</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"थप समय।"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"कम समय।"</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"सक्रिय गर्नुहोस्"</string>
+ <string name="cancel" msgid="6859253417269739139">"रद्द गर्नुहोस्"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"बाधा नपुऱ्याउनुहोस् नामक मोडलाई सक्रिय गर्नुहोस्"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"कहिल्यै होइन"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"प्राथमिकता मात्र"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>। <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-nl/strings.xml b/packages/SettingsLib/res/values-nl/strings.xml
index ce25cc7..9fe32ff 100644
--- a/packages/SettingsLib/res/values-nl/strings.xml
+++ b/packages/SettingsLib/res/values-nl/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Netwerken"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certificering van draadloze weergave"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Uitgebreide wifi-logregistratie insch."</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Altijd roamingscans voor wifi toestaan"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Willekeurig MAC-adres bij verbinding"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobiele data altijd actief"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Hardwareversnelling voor tethering"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Bluetooth-apparaten zonder namen weergeven"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Geef hostnaam van DNS-provider op"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Opties weergeven voor certificering van draadloze weergave"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Logniveau voor wifi verhogen, weergeven per SSID RSSI in wifi-kiezer"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Roamingscans voor wifi (niet) toestaan op basis van de hoeveelheid dataverkeer die aanwezig is bij de interface"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Een willekeurig MAC-adres bij het maken van verbinding met wifi-netwerken"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Logger-buffergrootten"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Kies Logger-grootten per logbuffer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Persistente loggeropslag wissen?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Geregistreerd"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Niet geregistreerd"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Niet beschikbaar"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d apparaten verbonden</item>
+ <item quantity="one">%1$d apparaat verbonden</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Meer tijd."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Minder tijd."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-pa/arrays.xml b/packages/SettingsLib/res/values-pa/arrays.xml
index 750aee0..85e6f81 100644
--- a/packages/SettingsLib/res/values-pa/arrays.xml
+++ b/packages/SettingsLib/res/values-pa/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"ਓਵਰਡ੍ਰਾ ਖੇਤਰ ਦਿਖਾਓ"</item>
<item msgid="2290859360633824369">"Deuteranomaly ਲਈ ਖੇਤਰ ਦਿਖਾਓ"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (ਪੂਰਵ-ਨਿਰਧਾਰਤ)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"ਸਟੈਂਡਰਡ ਸੀਮਾ"</item>
<item msgid="4071574792028999443">"ਕੋਈ ਪਿਛੋਕੜ ਪ੍ਰਕਿਰਿਆਵਾਂ ਨਹੀਂ"</item>
diff --git a/packages/SettingsLib/res/values-pa/strings.xml b/packages/SettingsLib/res/values-pa/strings.xml
index d64c30f..863b17c 100644
--- a/packages/SettingsLib/res/values-pa/strings.xml
+++ b/packages/SettingsLib/res/values-pa/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"ਨੈੱਟਵਰਕਿੰਗ"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"ਵਾਇਰਲੈੱਸ ਡਿਸਪਲੇ ਪ੍ਰਮਾਣੀਕਰਨ"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"ਵਾਈ-ਫਾਈ ਵਰਬੋਸ ਲੌਗਿੰਗ ਚਾਲੂ ਕਰੋ"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"ਹਮੇਸ਼ਾਂ ਵਾਈ‑ਫਾਈ ਰੋਮ ਸਕੈਨਾਂ ਦੀ ਆਗਿਆ ਦਿਓ"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"ਬੇਤਰਤੀਬਵਾਰ ਕਨੈਕਟ ਕੀਤਾ ਹੋਇਆ MAC ਪਤਾ"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"ਮੋਬਾਈਲ ਡਾਟਾ ਹਮੇਸ਼ਾਂ ਕਿਰਿਆਸ਼ੀਲ"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"ਟੈਦਰਿੰਗ ਹਾਰਡਵੇਅਰ ਐਕਸੈੱਲਰੇਸ਼ਨ"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"ਅਨਾਮ ਬਲੂਟੁੱਥ ਡੀਵਾਈਸਾਂ ਦਿਖਾਓ"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS ਪ੍ਰਦਾਨਕ ਦਾ ਹੋਸਟਨਾਮ ਦਾਖਲ ਕਰੋ"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"ਵਾਇਰਲੈੱਸ ਡਿਸਪਲੇ ਪ੍ਰਮਾਣੀਕਰਨ ਲਈ ਚੋਣਾਂ ਪ੍ਰਦਰਸ਼ਿਤ ਕਰੋ"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"ਵਾਈ‑ਫਾਈ ਲੌਗਿੰਗ ਪੱਧਰ ਵਧਾਓ, ਵਾਈ‑ਫਾਈ Picker ਵਿੱਚ ਪ੍ਰਤੀ SSID RSSI ਦਿਖਾਓ"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"ਇੰਟਰਫੇਸ ਤੇ ਮੌਜੂਦ ਡਾਟਾ ਟ੍ਰੈਫਿਕ ਦੀ ਮਾਤਰਾ ਦੇ ਆਧਾਰ ਤੇ ਵਾਈ-ਫਾਈ ਰੋਮ ਸਕੈਨ ਦੀ ਆਗਿਆ ਦਿਓ/ਅਸਵੀਕਾਰ ਕਰੋ"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"ਵਾਈ-ਫਾਈ ਨੈੱਟਵਰਕਾਂ ਨਾਲ ਕਨੈਕਟ ਹੋਣ \'ਤੇ MAC ਪਤਾ ਬੇਤਰਤੀਬਵਾਰ ਚੁਣੋ"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"ਲੌਗਰ ਬਫ਼ਰ ਆਕਾਰ"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"ਪ੍ਰਤੀ ਲੌਗ ਬਫ਼ਰ ਲੌਗਰ ਆਕਾਰ ਚੁਣੋ"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"ਕੀ ਲੌਗਰ ਪ੍ਰਸਿੱਸਟੈਂਟ ਸਟੋਰੇਜ ਨੂੰ ਸਾਫ਼ ਕਰਨਾ ਹੈ?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"ਹਾਰਡਵੇਅਰ ਲੇਅਰਾਂ ਦੇ ਅੱਪਡੇਟਾਂ ਦਿਖਾਓ"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"ਹਾਰਡਵੇਅਰ ਲੇਅਰਾਂ ਅੱਪਡੇਟ ਹੋਣ \'ਤੇ ਉਨ੍ਹਾਂ ਨੂੰ ਹਰਾ ਕਰੋ"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"GPU ਓਵਰਡ੍ਰਾ ਡੀਬੱਗ ਕਰੋ"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU ਰੈਂਡਰਰ ਸੈੱਟ ਕਰੋ"</string>
<string name="disable_overlays" msgid="2074488440505934665">"HW ਓਵਰਲੇਜ ਨੂੰ ਅਸਮਰੱਥ ਬਣਾਓ"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"ਸਕ੍ਰੀਨ ਕੰਪੋਜਿਟਿੰਗ ਲਈ ਹਮੇਸ਼ਾਂ GPU ਵਰਤੋ"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"ਰੰਗ ਸਪੇਸ ਦੀ ਨਕਲ ਕਰੋ"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"ਰਜਿਸਟਰ ਕੀਤੀ ਗਈ"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"ਰਜਿਸਟਰ ਨਹੀਂ ਕੀਤੀ ਗਈ"</string>
<string name="status_unavailable" msgid="7862009036663793314">"ਅਣਉਪਲਬਧ"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d ਡੀਵਾਈਸ ਕਨੈਕਟ ਕੀਤਾ ਗਿਆ</item>
+ <item quantity="other">%1$d ਡੀਵਾਈਸ ਕਨੈਕਟ ਕੀਤੇ ਗਏ</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"ਹੋਰ ਸਮਾਂ।"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"ਘੱਟ ਸਮਾਂ।"</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"ਚਾਲੂ ਕਰੋ"</string>
+ <string name="cancel" msgid="6859253417269739139">"ਰੱਦ ਕਰੋ"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"\'ਪਰੇਸ਼ਾਨ ਨਾ ਕਰੋ\' ਨੂੰ ਚਾਲੂ ਕਰੋ"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"ਕਦੇ ਵੀ ਨਹੀਂ"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"ਸਿਰਫ਼ ਤਰਜੀਹੀ"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>। <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-pl/arrays.xml b/packages/SettingsLib/res/values-pl/arrays.xml
index c0427c8..3141219 100644
--- a/packages/SettingsLib/res/values-pl/arrays.xml
+++ b/packages/SettingsLib/res/values-pl/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Pokaż przerysowywane obszary"</item>
<item msgid="2290859360633824369">"Pokaż obszary dostosowane do deuteranomalii"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (domyślnie)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Standardowy limit"</item>
<item msgid="4071574792028999443">"Brak procesów w tle"</item>
diff --git a/packages/SettingsLib/res/values-pl/strings.xml b/packages/SettingsLib/res/values-pl/strings.xml
index d50528d..a363ee2 100644
--- a/packages/SettingsLib/res/values-pl/strings.xml
+++ b/packages/SettingsLib/res/values-pl/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Sieci"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Wyświetlacz bezprzewodowy"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Szczegółowy dziennik Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Zawsze szukaj Wi-Fi w roamingu"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Losowe generowanie adresu MAC przy łączeniu"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobilna transmisja danych zawsze aktywna"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Akceleracja sprzętowa tetheringu"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Pokaż urządzenia Bluetooth bez nazw"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Wpisz nazwę hosta dostawcy DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Pokaż opcje certyfikacji wyświetlacza bezprzewodowego"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Zwiększ poziom rejestrowania Wi‑Fi, pokazuj według RSSI SSID w selektorze Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Zezwalaj/nie zezwalaj na wyszukiwanie sieci Wi-Fi w roamingu w zależności od natężenia ruchu"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Wygeneruj losowo adres MAC podczas łączenia z siecią Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Rozmiary bufora Rejestratora"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Wybierz rozmiary Rejestratora/bufor dziennika"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Wyczyścić pamięć trwałych dzienników?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Pokaż zmiany warstw sprzęt."</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Oznaczaj aktualizowane warstwy sprzętowe na zielono"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Debuguj przerysowania GPU"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Ustaw mech. render. GPU"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Wyłącz nakładki HW"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Zawsze używaj GPU do komponowania ekranu"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Symuluj przestrzeń kolorów"</string>
@@ -403,4 +402,18 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Zarejestrowane"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Niezarejestrowane"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Niedostępny"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="few">%1$d urządzenia podłączone</item>
+ <item quantity="many">%1$d urządzeń podłączonych</item>
+ <item quantity="other">%1$d urządzenia podłączonego</item>
+ <item quantity="one">%1$d urządzenie podłączone</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Więcej czasu."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Mniej czasu."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Włącz"</string>
+ <string name="cancel" msgid="6859253417269739139">"Anuluj"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Włącz tryb Nie przeszkadzać"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Nigdy"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Tylko priorytet"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-pt-rBR/arrays.xml b/packages/SettingsLib/res/values-pt-rBR/arrays.xml
index 4695829..aa5aed0 100644
--- a/packages/SettingsLib/res/values-pt-rBR/arrays.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Mostrar áreas de overdraw"</item>
<item msgid="2290859360633824369">"Mostrar áreas para daltonismo"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (padrão)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Limite padrão"</item>
<item msgid="4071574792028999443">"Sem processos em segundo plano"</item>
diff --git a/packages/SettingsLib/res/values-pt-rBR/strings.xml b/packages/SettingsLib/res/values-pt-rBR/strings.xml
index 67fda03..b13a9c0 100644
--- a/packages/SettingsLib/res/values-pt-rBR/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Redes"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certificação de Display sem fio"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Ativar registro extenso de Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Sempre permitir verif. de roaming de Wi-Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Escolha aleatória de MAC conectado"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Dados móveis sempre ativos"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Aceleração de hardware de tethering"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Mostrar dispositivos Bluetooth sem nomes"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Informe o nome do host do provedor de DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Mostrar opções de certificação de Display sem fio"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Aumentar o nível de registro do Wi-Fi; mostrar conforme o RSSI de SSID na Seleção de Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Permitir/proibir verificações de roaming de Wi-Fi com base no volume do tráfego de dados presente na interface"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Escolher o endereço MAC de forma aleatória quando estiver conectado a redes Wi-Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Tamanhos de buffer de logger"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Sel. tam. de logger/buffer de log"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Limpar armazenamento de logger constante?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Atual. camad. de hardware"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Piscar camadas de hardware em verde ao atualizar"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Depurar overdraw da GPU"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Definir renderiz. de GPU"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Desativar sobreposição HW"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Sempre usar a GPU para composição de tela"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simular espaço de cores"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrado"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Não registrado"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Não disponível"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d dispositivo conectado</item>
+ <item quantity="other">%1$d dispositivos conectados</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Mais tempo."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Menos tempo."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Ativar"</string>
+ <string name="cancel" msgid="6859253417269739139">"Cancelar"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Ativar o \"Não perturbe\""</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Nunca"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Somente prioridade"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-pt-rPT/strings.xml b/packages/SettingsLib/res/values-pt-rPT/strings.xml
index d7496454c4..16e3d2b 100644
--- a/packages/SettingsLib/res/values-pt-rPT/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rPT/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Redes"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certificação de display sem fios"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Ativar o registo verboso de Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Permitir sempre a deteção de Wi-Fi em roaming"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Seleção aleatória do MAC ligado"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Dados móveis sempre ativos"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Aceleração de hardware para ligação (à Internet) via telemóvel"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Mostrar dispositivos Bluetooth sem nomes"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Introduza o nome de anfitrião do fornecedor DNS."</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Mostrar opções da certificação de display sem fios"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Aumentar o nível de reg. de Wi-Fi, mostrar por RSSI de SSID no Selec. de Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Permitir/impedir a deteção de Wi-Fi em roaming com base na quantidade de tráfego de dados presente na interface"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Selecionar aleatoriamente o endereço MAC quando estabelecer ligação a redes Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Tamanhos da memória intermédia do registo"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Selec. tam. reg. p/ mem. int. reg."</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Pretende limpar o armazenamento persistente do registo?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registado"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Não registado"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Indisponível"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d dispositivos ligados</item>
+ <item quantity="one">%1$d dispositivo ligado</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Mais tempo."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Menos tempo."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-pt/arrays.xml b/packages/SettingsLib/res/values-pt/arrays.xml
index 4695829..aa5aed0 100644
--- a/packages/SettingsLib/res/values-pt/arrays.xml
+++ b/packages/SettingsLib/res/values-pt/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Mostrar áreas de overdraw"</item>
<item msgid="2290859360633824369">"Mostrar áreas para daltonismo"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (padrão)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Limite padrão"</item>
<item msgid="4071574792028999443">"Sem processos em segundo plano"</item>
diff --git a/packages/SettingsLib/res/values-pt/strings.xml b/packages/SettingsLib/res/values-pt/strings.xml
index 67fda03..b13a9c0 100644
--- a/packages/SettingsLib/res/values-pt/strings.xml
+++ b/packages/SettingsLib/res/values-pt/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Redes"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certificação de Display sem fio"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Ativar registro extenso de Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Sempre permitir verif. de roaming de Wi-Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Escolha aleatória de MAC conectado"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Dados móveis sempre ativos"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Aceleração de hardware de tethering"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Mostrar dispositivos Bluetooth sem nomes"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Informe o nome do host do provedor de DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Mostrar opções de certificação de Display sem fio"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Aumentar o nível de registro do Wi-Fi; mostrar conforme o RSSI de SSID na Seleção de Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Permitir/proibir verificações de roaming de Wi-Fi com base no volume do tráfego de dados presente na interface"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Escolher o endereço MAC de forma aleatória quando estiver conectado a redes Wi-Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Tamanhos de buffer de logger"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Sel. tam. de logger/buffer de log"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Limpar armazenamento de logger constante?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Atual. camad. de hardware"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Piscar camadas de hardware em verde ao atualizar"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Depurar overdraw da GPU"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Definir renderiz. de GPU"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Desativar sobreposição HW"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Sempre usar a GPU para composição de tela"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simular espaço de cores"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrado"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Não registrado"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Não disponível"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d dispositivo conectado</item>
+ <item quantity="other">%1$d dispositivos conectados</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Mais tempo."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Menos tempo."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Ativar"</string>
+ <string name="cancel" msgid="6859253417269739139">"Cancelar"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Ativar o \"Não perturbe\""</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Nunca"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Somente prioridade"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ro/arrays.xml b/packages/SettingsLib/res/values-ro/arrays.xml
index b62014e..e30e6d5 100644
--- a/packages/SettingsLib/res/values-ro/arrays.xml
+++ b/packages/SettingsLib/res/values-ro/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Afișați zonele cu suprapunere"</item>
<item msgid="2290859360633824369">"Afișați zonele de deuteranomalie"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (prestabilit)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Limita standard"</item>
<item msgid="4071574792028999443">"Nu există procese de fundal"</item>
diff --git a/packages/SettingsLib/res/values-ro/strings.xml b/packages/SettingsLib/res/values-ro/strings.xml
index 1e91d82..9c3f0902 100644
--- a/packages/SettingsLib/res/values-ro/strings.xml
+++ b/packages/SettingsLib/res/values-ro/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Conectare la rețele"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certificare Ecran wireless"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Înregistrare prin Wi-Fi de volume mari de date"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Se permite întotdeauna scanarea traficului Wi-Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Afișare aleatorie a dispozitivului MAC conectat"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Date mobile permanent active"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Accelerare hardware pentru tethering"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Afișați dispozitivele Bluetooth fără nume"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Introduceți numele de gazdă al furnizorului de DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Afișați opțiunile pentru certificarea Ecran wireless"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Măriți niv. de înr. prin Wi‑Fi, afișați în fcț. de SSID RSSI în Selectorul Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Permiteți/Nu permiteți scanarea traficului Wi-Fi în funcție de traficul de date din interfață"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Afișează aleatoriu adresa MAC când te conectezi la rețele Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Dimensiunile tamponului jurnalului"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Dimensiuni jurnal / tampon jurnal"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Ștergeți stocarea permanentă a jurnalului?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Actualiz. strat. hardware"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Straturile hardware clipesc verde la actualizare"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Depanați suprapunerea"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Setați GPU pentru redare"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Dezactivați suprapun. HW"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Utilizați mereu GPU pentru compunerea ecranului"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simulați spațiu culoare"</string>
@@ -403,4 +402,17 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Înregistrat"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Neînregistrat"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Indisponibilă"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="few">%1$d dispozitive conectate</item>
+ <item quantity="other">%1$d de dispozitive conectate</item>
+ <item quantity="one">%1$d dispozitiv conectat</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Mai mult timp."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Mai puțin timp."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Activați"</string>
+ <string name="cancel" msgid="6859253417269739139">"Anulați"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Activați Nu deranja"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Niciodată"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Numai cu prioritate"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ru/strings.xml b/packages/SettingsLib/res/values-ru/strings.xml
index 693332f..bdf8a4a 100644
--- a/packages/SettingsLib/res/values-ru/strings.xml
+++ b/packages/SettingsLib/res/values-ru/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Сети"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Серт. беспроводн. мониторов"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Подробный журнал Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Всегда включать поиск сетей Wi-Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Создание случайных MAC-адресов при подключении по Wi-Fi"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Не отключать мобильный Интернет"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Аппаратное ускорение в режиме модема"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Показывать Bluetooth-устройства без названий"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Введите имя хоста поставщика услуг DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Показывать параметры сертификации беспроводных мониторов"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"При выборе Wi‑Fi указывать в журнале RSSI для каждого SSID"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Включать или отключать поиск сетей Wi-Fi во время передачи данных в зависимости от объема трафика"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Генерировать случайные MAC-адреса при подключении к сетям Wi-Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Размер буфера журнала"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Выберите размер буфера журнала"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Очистить постоянный диск журнала?"</string>
@@ -403,4 +403,12 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Зарегистрирован"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Не зарегистрирован"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Недоступно"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">Подключено %1$d устройство</item>
+ <item quantity="few">Подключено %1$d устройства</item>
+ <item quantity="many">Подключено %1$d устройств</item>
+ <item quantity="other">Подключено %1$d устройства</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Увеличить продолжительность"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Уменьшить продолжительность"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-si/arrays.xml b/packages/SettingsLib/res/values-si/arrays.xml
index 2808ba3..b056a9c 100644
--- a/packages/SettingsLib/res/values-si/arrays.xml
+++ b/packages/SettingsLib/res/values-si/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"වැඩිකොට දක්වනවා ඇති ප්රදේශ පෙන්වන්න"</item>
<item msgid="2290859360633824369">"අපවිෂවීම සඳහා ප්රදේශ පෙන්වන්න"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (පෙරනිමි)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"සම්මත සීමාව"</item>
<item msgid="4071574792028999443">"පසුබිම් ක්රියාවලි නොමැත"</item>
diff --git a/packages/SettingsLib/res/values-si/strings.xml b/packages/SettingsLib/res/values-si/strings.xml
index 6abd14d..38dbe0a 100644
--- a/packages/SettingsLib/res/values-si/strings.xml
+++ b/packages/SettingsLib/res/values-si/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"ජාලකරණය"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"නොරැහැන් සංදර්ශක සහතිකය"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"විස්තරාත්මක Wi‑Fi ලොග් කිරීම සබල කරන්න"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Wi‑Fi රෝම් පරිලෝකන වෙතට සැමවිට අවසර දෙන්න"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"සම්බන්ධිත MAC සසම්භාවීකරණය"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"ජංගම දත්ත සැමවිට ක්රියාකාරීය"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"ටෙදරින් දෘඪාංග ත්වරණය"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"නම් නොමැති බ්ලූටූත් උපාංග පෙන්වන්න"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS සැපයුම්කරුගේ සත්කාරක නම ඇතුළු කරන්න"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"නොරැහැන් සංදර්ශක සහතිකය සඳහා විකල්ප පෙන්වන්න"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi‑Fi ලොග් මට්ටම වැඩි කරන්න, Wi‑Fi තෝරනයෙහි SSID RSSI අනුව පෙන්වන්න"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"අතුරු මුහුණතෙහි ඇති දත්ත තදබදය අනුව Wi‑Fi රෝම් පරිලෝකන වෙත ඉඩ දෙන්න/නොදෙන්න"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Wi-Fi ජාලවලට සම්බන්ධ වීමේදී MAC ලිපිනය සසම්භාවීකරණය"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"ලෝගයේ අන්තරාවක ප්රමාණය"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"ලොග අන්තරාවකට ලෝගයේ ප්රමාණය තෝරන්න"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"ලොගකරු නොනවතින ගබඩාව හිස් කරන්නද?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"දෘඨාංග ස්ථර යාවත්කාලීන"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"යාවත්කාලින වන විට දෘඩාංග තලය කොළ පහන් දැල්වෙන්න"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"GPU වැඩිකොට දැක්වීම නිදොස් කරන්න"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU විදැහුම සකසන්න"</string>
<string name="disable_overlays" msgid="2074488440505934665">"HW වසාලන අක්රිය කරන්න"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"තිර සංයුක්ත කිරීමට සැමවිටම GPU භාවිතා කරන්න"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"වර්ණ අවකාශය අනුකරණය කරන්න"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"ලියාපදිංචි වී ඇත"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"ලියාපදිංචි වී නැත"</string>
<string name="status_unavailable" msgid="7862009036663793314">"ලබාගත නොහැක"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">උපාංග %1$dක් සම්බන්ධ කරන ලදී</item>
+ <item quantity="other">උපාංග %1$dක් සම්බන්ධ කරන ලදී</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"වේලාව වැඩියෙන්."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"වේලාව අඩුවෙන්."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"ක්රියාත්මක කරන්න"</string>
+ <string name="cancel" msgid="6859253417269739139">"අවලංගු කරන්න"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"බාධා නොකරන්න ක්රියාත්මක කරන්න"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"කිසි විටක නැත"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"ප්රමුඛතා පමණි"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-sk/strings.xml b/packages/SettingsLib/res/values-sk/strings.xml
index 8cc2dac..3d7cf28 100644
--- a/packages/SettingsLib/res/values-sk/strings.xml
+++ b/packages/SettingsLib/res/values-sk/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Siete"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certifikácia bezdrôtového zobrazenia"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Podrobné denníky Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Vždy povoliť funkciu Wi‑Fi Roam Scans"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Randomizácia pripojených adries MAC"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobilné dáta ponechať vždy aktívne"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Hardvérovú akcelerácia pre tethering"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Zobrazovať zariadenia Bluetooth bez názvov"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Zadajte názov hostiteľa poskytovateľa DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Zobraziť možnosti certifikácie bezdrôtového zobrazenia"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Zvýšiť úroveň denníkov Wi‑Fi, zobrazovať podľa SSID RSSI pri výbere siete Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Povoliť alebo zakázať funkciu Wifi Roam Scans na základe objemu prenosu údajov v rozhraní"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Randomizovať adresu MAC pri pripájaní k sieťam Wi-Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Vyrovnávacia pamäť nástroja denníkov"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Veľkosť vyrovnávacej pamäte nástroja denníkov"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Vymazať trvalé úložisko zapisovača do denníka?"</string>
@@ -403,4 +403,12 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrované"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Neregistrované"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Nie je k dispozícii"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="few">%1$d pripojené zariadenia</item>
+ <item quantity="many">%1$d pripojeného zariadenia</item>
+ <item quantity="other">%1$d pripojených zariadení</item>
+ <item quantity="one">%1$d pripojené zariadenie</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Dlhší čas."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Kratší čas."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-sl/arrays.xml b/packages/SettingsLib/res/values-sl/arrays.xml
index a924bdb..2d1cb55 100644
--- a/packages/SettingsLib/res/values-sl/arrays.xml
+++ b/packages/SettingsLib/res/values-sl/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Pokaži risanje zunaj vidnega območja"</item>
<item msgid="2290859360633824369">"Pokaži območja za devteranomalijo"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (privzeto)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Standardna omejitev"</item>
<item msgid="4071574792028999443">"Ni postopkov v ozadju"</item>
diff --git a/packages/SettingsLib/res/values-sl/strings.xml b/packages/SettingsLib/res/values-sl/strings.xml
index af8eb6e..fecc548 100644
--- a/packages/SettingsLib/res/values-sl/strings.xml
+++ b/packages/SettingsLib/res/values-sl/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Omrežja"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Potrdilo brezžičnega zaslona"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Omogoči podrob. zapis. dnevnika za Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Vedno omogoči iskanje omrežij Wi-Fi za gostovanje"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Dodelitev naključnega naslova MAC ob vzpostavitvi povezave"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Prenos podatkov v mobilnem omrežju je vedno aktiven"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Strojno pospeševanje za internetno povezavo prek mobilnega telefona"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Naprave Bluetooth prikaži brez imen"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Vnesite ime gostitelja pri ponudniku strežnika DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Pokaži možnosti za potrdilo brezžičnega zaslona"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Povečaj raven zapis. dnev. za Wi-Fi; v izbir. Wi‑Fi-ja pokaži glede na SSID RSSI"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Omogoči/onemogoči iskanje omrežij Wi-Fi za gostovanje glede na količino podatkovnega prometa pri vmesniku"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Dodelitev naključnega naslova MAC pri povezovanju z omrežji Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Velikosti medpomn. zapisov. dnevnika"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Izberite velikost medpomnilnika dnevnika"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Želite izbrisati trajno shranjevanje dnevniškega orodja?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Pokaži pos. sl. str. opr."</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Obarvaj sloje strojne opreme zeleno ob posodobitvi"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Prekoračitev območja GPE"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Nastavi upodabljalnik GPE"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Onem. strojni medp."</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Za sestavljanje slike vedno uporabi graf. procesor"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simul. barvnega prostora"</string>
@@ -403,4 +402,18 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrirana"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Ni registrirana"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Ni na voljo"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">Povezana je %1$d naprava</item>
+ <item quantity="two">Povezani sta %1$d napravi</item>
+ <item quantity="few">Povezane so %1$d naprave</item>
+ <item quantity="other">Povezanih je %1$d naprav</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Daljši čas."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Krajši čas."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Vklopi"</string>
+ <string name="cancel" msgid="6859253417269739139">"Prekliči"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Vklop načina »ne moti«"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Nikoli"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Samo prednostno"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-sq/arrays.xml b/packages/SettingsLib/res/values-sq/arrays.xml
index 244a534..5bd5b1d 100644
--- a/packages/SettingsLib/res/values-sq/arrays.xml
+++ b/packages/SettingsLib/res/values-sq/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Shfaq zonat e konfliktit"</item>
<item msgid="2290859360633824369">"Shfaq zonat për deuteranomalinë"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (e parazgjedhur)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Kufizim standard"</item>
<item msgid="4071574792028999443">"Nuk ka procese në sfond"</item>
diff --git a/packages/SettingsLib/res/values-sq/strings.xml b/packages/SettingsLib/res/values-sq/strings.xml
index 88b1057..0999b75 100644
--- a/packages/SettingsLib/res/values-sq/strings.xml
+++ b/packages/SettingsLib/res/values-sq/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Rrjetet"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certifikimi i ekranit valor"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Aktivizo hyrjen Wi-Fi Verbose"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Lejo gjithmonë skanimet për Wi-Fi edhe kur je në lëvizje"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Zgjedhja e rastësishme e MAC të lidhur"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Të dhënat celulare gjithmonë aktive"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Përshpejtimi i harduerit për ndarjen"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Shfaq pajisjet me Bluetooth pa emra"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Fut emrin e pritësit të ofruesit të DNS-së"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Shfaq opsionet për certifikimin e ekranit valor"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Rrit nivelin regjistrues të Wi‑Fi duke shfaqur SSID RSSI-në te Zgjedhësi i Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Lejo/Ndalo skanimet për Wi‑Fi në roaming, bazuar në sasinë e trafikut të të dhënave të pranishme në ndërfaqe"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Zgjidh rastësisht adresën MAC kur lidhesh me rrjete Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Madhësitë e regjistruesit"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Përzgjidh madhësitë e regjistruesit"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Do të pastrosh hapësirën ruajtëse të vazhdueshme të regjistruesit?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Shfaq përditësimet e shtresave të harduerit"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Ndriço në të gjelbër shtresat e harduerit që përditësohen"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Korrigjo konfliktet e GPU-së"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Cakto interpret. e GPU-së"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Çaktivizo mbishtresimin e HW-së"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Përdor gjithmonë GPU-në për përbërjen e ekranit"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Simulo hapësirën e ngjyrës"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Regjistruar"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Paregjistruar"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Nuk ofrohet"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d pajisje të lidhura</item>
+ <item quantity="one">%1$d pajisje e lidhur</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Më shumë kohë."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Më pak kohë."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Aktivizo"</string>
+ <string name="cancel" msgid="6859253417269739139">"Anulo"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Aktivizo \"Mos shqetëso\""</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Asnjëherë"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Vetëm me prioritet"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-sr/strings.xml b/packages/SettingsLib/res/values-sr/strings.xml
index 362fc1f..226315b 100644
--- a/packages/SettingsLib/res/values-sr/strings.xml
+++ b/packages/SettingsLib/res/values-sr/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Умрежавање"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Сертификација бежичног екрана"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Омогући детаљнију евиденцију за Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Увек дозволи скенирање Wi‑Fi-ја у ромингу"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Насумичан избор MAC адресе током повезивања"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Мобилни подаци су увек активни"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Хардверско убрзање привезивања"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Прикажи Bluetooth уређаје без назива"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Унесите име хоста добављача услуге DNS-а"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Приказ опција за сертификацију бежичног екрана"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Повећава ниво евидентирања за Wi‑Fi. Приказ по SSID RSSI-у у бирачу Wi‑Fi мреже"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Дозволи/забрани скенирање Wi-Fi-ја у ромингу на основу присутног протока података на интерфејсу"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Изабери насумичну MAC адресу током повезивања на Wi‑Fi мреже"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Величине бафера података у програму за евидентирање"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Изаберите величине по баферу евиденције"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Желите ли да обришете стални меморијски простор програма за евидентирање?"</string>
@@ -403,4 +403,11 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Регистрован je"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Није регистрован"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Недоступно"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">Повезан је %1$d уређај</item>
+ <item quantity="few">Повезана су %1$d уређаја</item>
+ <item quantity="other">Повезано је %1$d уређаја</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Више времена."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Мање времена."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-sv/strings.xml b/packages/SettingsLib/res/values-sv/strings.xml
index 230dfee..874294f 100644
--- a/packages/SettingsLib/res/values-sv/strings.xml
+++ b/packages/SettingsLib/res/values-sv/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Nätverk"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certifiering för Wi-Fi-skärmdelning"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Aktivera utförlig loggning för Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Tillåt alltid sökning efter Wi-Fi-roaming"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Ansluten MAC-slumpgenerering"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobildata alltid aktiverad"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Maskinvaruacceleration för internetdelning"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Visa namnlösa Bluetooth-enheter"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Ange värdnamn för DNS-leverantör"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Visa certifieringsalternativ för Wi-Fi-skärmdelning"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Öka loggningsnivån för Wi-Fi, visa per SSID RSSI i Wi‑Fi Picker"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Tillåt/tillåt inte sökning efter Wi-Fi-roaming utifrån mängden datatrafik i gränssnittet"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Generera en slumpmässig MAC-adress när du ansluter till Wi‑Fi-nätverk"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Buffertstorlekar för logg"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Välj loggstorlekar per loggbuffert"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Vill du rensa lagringsutrymmet för loggar?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrerad"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Ej registrerad"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Inte tillgängligt"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d enheter är anslutna</item>
+ <item quantity="one">%1$d enhet är ansluten</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Längre tid."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Kortare tid."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-sw/arrays.xml b/packages/SettingsLib/res/values-sw/arrays.xml
index b694687..c320aeb 100644
--- a/packages/SettingsLib/res/values-sw/arrays.xml
+++ b/packages/SettingsLib/res/values-sw/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Onyesha maeneo yaliyoondolewa"</item>
<item msgid="2290859360633824369">"Onyesha sehemu za Upofu Rangi Kijani"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (Chaguo-msingi)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Kiwango cha wastani"</item>
<item msgid="4071574792028999443">"Hakuna mchakato wa mandari nyuma"</item>
diff --git a/packages/SettingsLib/res/values-sw/strings.xml b/packages/SettingsLib/res/values-sw/strings.xml
index 1d46260..72850d4 100644
--- a/packages/SettingsLib/res/values-sw/strings.xml
+++ b/packages/SettingsLib/res/values-sw/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Mtandao"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Chaguo za cheti cha kuonyesha pasiwaya"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Washa Uwekaji kumbukumbu za WiFi kutumia Sauti"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Ruhusu Uchanganuzi wa Matumizi ya Mitandao mingine"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Anwani za MAC Zinazowekwa kwa Nasibu"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Iendelee kutumia data ya simu"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Kuongeza kasi kwa kutumia maunzi ili kusambaza mtandao"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Onyesha vifaa vya Bluetooth visivyo na majina"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Weka jina la mpangishi wa huduma za DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Onyesha chaguo za cheti cha kuonyesha pasiwaya"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Ongeza hatua ya uwekaji kumbukumbu ya Wi-Fi, onyesha kwa kila SSID RSSI kwenye Kichukuzi cha Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Ruhusu au Zuia Uchanganuzi wa Matumizi ya Mitandao mingine ya Wifi kulingana na kiasi cha trafiki ya data kilicho kwenye kiolesura"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Weka anwani ya MAC kwa nasibu wakati unaunganisha kwenye mitandao ya Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Ukubwa wa kiweka bafa ya kumbukumbu"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Chagua ukubwa wa kila Kumbukumbu"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Ungependa kufuta data iliyo kwenye hifadhi ya kiweka kumbukumbu za mara kwa mara?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Onyesha sasisho za safu za maunzi"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Angaza kijani safu za maunzi zinaposasisha"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"Tatua uondoaji wa GPU"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"Weka Kiwasilishaji cha GPU"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Lemaza miekeleo ya HW"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Daima tumia GPU kwa mchanganyiko wa skrini"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Kuiga nafasi ya rangi"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Imesajiliwa"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Haijasajiliwa"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Hapatikani"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">Imeunganisha vifaa %1$d</item>
+ <item quantity="one">Imeunganisha kifaa %1$d</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Muda zaidi."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Muda kidogo."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Washa"</string>
+ <string name="cancel" msgid="6859253417269739139">"Ghairi"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Washa kipengele cha Usinisumbue"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Kamwe"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Kipaumbele tu"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ta/arrays.xml b/packages/SettingsLib/res/values-ta/arrays.xml
index 2d75c01..aa24fde 100644
--- a/packages/SettingsLib/res/values-ta/arrays.xml
+++ b/packages/SettingsLib/res/values-ta/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"ஓவர்டிரா பகுதிகளைக் காட்டு"</item>
<item msgid="2290859360633824369">"நிறக்குருடின் பகுதிகளைக் காட்டு"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (இயல்பு)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"நிலையான வரம்பு"</item>
<item msgid="4071574792028999443">"பின்புலச் செயல்முறைகள் இல்லை"</item>
diff --git a/packages/SettingsLib/res/values-ta/strings.xml b/packages/SettingsLib/res/values-ta/strings.xml
index e9fd79b..64bc434 100644
--- a/packages/SettingsLib/res/values-ta/strings.xml
+++ b/packages/SettingsLib/res/values-ta/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"நெட்வொர்க்கிங்"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"வயர்லெஸ் காட்சிக்கான சான்றிதழ்"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"வைஃபை அதிவிவர நுழைவை இயக்கு"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"எப்போதும் வைஃபை ரோமிங் ஸ்கேன்களை அனுமதி"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"இணைக்கப்பட்ட MAC Randomization"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"மொபைல் டேட்டாவை எப்போதும் இயக்கத்திலேயே வை"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"வன்பொருள் விரைவுப்படுத்துதல் இணைப்பு முறை"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"பெயர்கள் இல்லாத புளூடூத் சாதனங்களைக் காட்டு"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS வழங்குநரின் ஹோஸ்ட் பெயரை உள்ளிடவும்"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"வயர்லெஸ் காட்சி சான்றுக்கான விருப்பங்களைக் காட்டு"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wifi நுழைவு அளவை அதிகரித்து, வைஃபை தேர்வியில் ஒவ்வொன்றிற்கும் SSID RSSI ஐ காட்டுக"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"இடைமுகத்தில் உள்ள ட்ராஃபிக் தரவின் அளவைப் பொறுத்து வைஃபை ரோமிங் ஸ்கேன்களை அனுமதி/அனுமதிக்காதே"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Wi‑Fi நெட்வொர்க்குகளில் இணைக்கும்போது Randomize MAC இன் முகவரி"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"லாகர் பஃபர் அளவுகள்"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"லாக் பஃபர் ஒன்றிற்கு லாகர் அளவுகளைத் தேர்வுசெய்க"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"லாகரின் நிலையான சேமிப்பகத்தை அழிக்கவா?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"வன்பொருள் லேயர்களின் புதுப்பிப்புகளைக் காட்டு"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"வன்பொருள் லேயர்களைப் புதுப்பிக்கும்போது, அவற்றைப் பச்சை நிறத்தில் காட்டு"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"GPU ஓவர்டிராவைப் பிழைதிருத்து"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU ரெண்டரரை அமை"</string>
<string name="disable_overlays" msgid="2074488440505934665">"HW மேலடுக்குகளை முடக்கு"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"திரைத் தொகுத்தலுக்கு எப்போதும் GPU ஐப் பயன்படுத்து"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"வண்ணத்தின் இடைவெளியை உருவகப்படுத்து"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"பதிவு செய்யப்பட்டது"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"பதிவு செய்யப்படவில்லை"</string>
<string name="status_unavailable" msgid="7862009036663793314">"கிடைக்கவில்லை"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d சாதனங்கள் இணைக்கப்பட்டன</item>
+ <item quantity="one">%1$d சாதனம் இணைக்கப்பட்டது</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"நேரத்தை அதிகரிக்கும்."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"நேரத்தைக் குறைக்கும்."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"ஆன் செய்"</string>
+ <string name="cancel" msgid="6859253417269739139">"ரத்துசெய்"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"தொந்தரவு செய்ய வேண்டாம் என்பதை ஆன் செய்யும்"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"ஒருபோதும் வேண்டாம்"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"முக்கியமானவை மட்டும்"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-te/arrays.xml b/packages/SettingsLib/res/values-te/arrays.xml
index 39d84dd..ce99f63 100644
--- a/packages/SettingsLib/res/values-te/arrays.xml
+++ b/packages/SettingsLib/res/values-te/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"ఓవర్డ్రా ప్రాంతాలను చూపండి"</item>
<item msgid="2290859360633824369">"డ్యూటెరానోమలీ కోసం ప్రాంతాలను చూపండి"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (డిఫాల్ట్)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"ప్రామాణిక పరిమితి"</item>
<item msgid="4071574792028999443">"నేపథ్య ప్రాసెస్లు లేవు"</item>
diff --git a/packages/SettingsLib/res/values-te/strings.xml b/packages/SettingsLib/res/values-te/strings.xml
index c2b738a..2e00dfb 100644
--- a/packages/SettingsLib/res/values-te/strings.xml
+++ b/packages/SettingsLib/res/values-te/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"నెట్వర్కింగ్"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"వైర్లెస్ ప్రదర్శన ప్రమాణీకరణ"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Wi‑Fi విశదీకృత లాగింగ్ను ప్రారంభించండి"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Wi‑Fi సంచార స్కాన్లను ఎల్లప్పుడూ అనుమతించు"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"MAC యాదృచ్ఛికతకు కనెక్ట్ చేయబడింది"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"మొబైల్ డేటాని ఎల్లప్పుడూ సక్రియంగా ఉంచు"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"టెథెరింగ్ హార్డ్వేర్ వేగవృద్ధి"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"పేర్లు లేని బ్లూటూత్ పరికరాలు చూపించు"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS ప్రదాత యొక్క హోస్ట్పేరును నమోదు చేయండి"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"వైర్లెస్ ప్రదర్శన సర్టిఫికెట్ కోసం ఎంపికలను చూపు"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi‑Fi ఎంపికలో SSID RSSI ప్రకారం చూపబడే Wi‑Fi లాగింగ్ స్థాయిని పెంచండి"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"ఇంటర్ఫేస్లో ఉండే డేటా ట్రాఫిక్ పరిమాణం ఆధారంగా Wi‑Fi సంచార స్కాన్లను అనుమతించు/నిరాకరించు"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Wi-Fi నెట్వర్క్కు కనెక్ట్ చేస్తున్నప్పుడు MAC చిరునామాను యాదృచ్ఛికం చేయండి"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"లాగర్ బఫర్ పరిమాణాలు"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"లాగ్ బఫర్కి లాగర్ పరిమా. ఎంచుకోండి"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"లాగర్ నిరంతర నిల్వలోని డేటాను తీసివేయాలా?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"హార్డ్వేర్ లేయర్ల అప్డేట్లను చూపండి"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"హార్డ్వేర్ లేయర్లు నవీకరించబడినప్పుడు వాటిని ఆకుపచ్చ రంగులో ఫ్లాష్ చేయండి"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"GPU ఓవర్డ్రాను డీబగ్ చేయండి"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU Rendererని సెట్ చేయండి"</string>
<string name="disable_overlays" msgid="2074488440505934665">"HW అతివ్యాప్తులను నిలిపివేయి"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"స్క్రీన్ కంపోజిషనింగ్ కోసం ఎల్లప్పుడూ GPUని ఉపయోగించు"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"రంగు అంతరాన్ని అనుకరించు"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"నమోదు చేయబడింది"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"నమోదు కాలేదు"</string>
<string name="status_unavailable" msgid="7862009036663793314">"అందుబాటులో లేదు"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d పరికరాలు కనెక్ట్ చేయబడ్డాయి</item>
+ <item quantity="one">%1$d పరికరం కనెక్ట్ చేయబడింది</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"ఎక్కువ సమయం."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"తక్కువ సమయం."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"ఆన్ చేయండి"</string>
+ <string name="cancel" msgid="6859253417269739139">"రద్దు చేయి"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"అంతరాయం కలిగించవద్దును ఆన్ చేయండి"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"ఎప్పటికీ"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"ప్రాధాన్యత మాత్రమే"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-th/strings.xml b/packages/SettingsLib/res/values-th/strings.xml
index 57b12a5..9f7bc73 100644
--- a/packages/SettingsLib/res/values-th/strings.xml
+++ b/packages/SettingsLib/res/values-th/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"เครือข่าย"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"การรับรองการแสดงผลแบบไร้สาย"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"เปิดใช้การบันทึกรายละเอียด Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"ใช้การสแกน Wi-Fi ข้ามเครือข่ายเสมอ"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"การสุ่ม MAC ที่เชื่อมต่อ"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"เปิดใช้อินเทอร์เน็ตมือถือเสมอ"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"การเร่งฮาร์ดแวร์การเชื่อมต่ออินเทอร์เน็ตผ่านมือถือ"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"แสดงอุปกรณ์บลูทูธที่ไม่มีชื่อ"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"ป้อนชื่อโฮสต์ของผู้ให้บริการ DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"แสดงตัวเลือกสำหรับการรับรองการแสดงผล แบบไร้สาย"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"เพิ่มระดับการบันทึก Wi‑Fi แสดงต่อ SSID RSSI ในตัวเลือก Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"อนุญาต/ไม่อนุญาตการสแกน Wi-Fi ข้ามเครือข่าย ตามปริมาณข้อมูลการเข้าชมที่ปรากฏในอินเทอร์เฟซ"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"สุ่มที่อยู่ MAC เมื่อเชื่อมต่อกับเครือข่าย Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"ขนาดบัฟเฟอร์ของ Logger"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"เลือกขนาด Logger ต่อบัฟเฟอร์ไฟล์บันทึก"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"ล้างพื้นที่เก็บข้อมูลถาวรของตัวบันทึกไหม"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"ลงทะเบียนแล้ว"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"ไม่ได้ลงทะเบียน"</string>
<string name="status_unavailable" msgid="7862009036663793314">"ไม่ว่าง"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">มีอุปกรณ์ที่เชื่อมต่อ %1$d เครื่อง</item>
+ <item quantity="one">มีอุปกรณ์ที่เชื่อมต่อ %1$d เครื่อง</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"เวลามากขึ้น"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"เวลาน้อยลง"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-tl/strings.xml b/packages/SettingsLib/res/values-tl/strings.xml
index 72261af..1b5eb2f 100644
--- a/packages/SettingsLib/res/values-tl/strings.xml
+++ b/packages/SettingsLib/res/values-tl/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Networking"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Certification ng wireless display"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"I-enable ang Pagla-log sa Wi‑Fi Verbose"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Palaging payagan ang Mga Pag-scan sa Roaming ng Wi‑Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Nakakonektang MAC Randomization"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Palaging aktibo ang mobile data"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Hardware acceleration para sa pag-tether"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Ipakita ang mga Bluetooth device na walang pangalan"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Ilagay ang hostname ng DNS provider"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Ipakita ang mga opsyon para sa certification ng wireless display"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Pataasin ang antas ng Wi‑Fi logging, ipakita sa bawat SSID RSSI sa Wi‑Fi Picker"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Payagan/Huwag payagan ang Mga Pag-scan sa Roaming ng Wi‑Fi batay sa dami ng trapiko ng data na mayroon sa interface"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"I-randomize ang MAC address kapag kumokonekta sa mga Wi‑Fi network"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Mga laki ng buffer ng Logger"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Pumili ng mga laki ng Logger bawat log buffer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"I-clear ang tuluy-tuloy na storage ng logger?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Nakarehistro"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Hindi nakarehistro"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Hindi available"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d device ang nakakonekta</item>
+ <item quantity="other">%1$d na device ang nakakonekta</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Dagdagan ang oras."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Bawasan ang oras."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-tr/strings.xml b/packages/SettingsLib/res/values-tr/strings.xml
index 948e4e5..b570e88 100644
--- a/packages/SettingsLib/res/values-tr/strings.xml
+++ b/packages/SettingsLib/res/values-tr/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Ağ işlemleri"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Kablosuz ekran sertifikası"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Kablosuz Ayrıntılı Günlük Kaydını etkinleştir"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Kablosuz Dolaşım Taramalarına daima izin ver"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Bağlı MAC Rastgele Seçimi"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobil veri her zaman etkin"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Tethering donanım hızlandırıcısı"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Adsız Bluetooth cihazlarını göster"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS sağlayıcının ana makine adını gir"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Kablosuz ekran sertifikası seçeneklerini göster"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Kablosuz günlük kaydı seviyesini artır. Kablosuz Seçici\'de her bir SSID RSSI için göster."</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Arayüzde mevcut veri trafiği miktarına bağlı olarak Kablosuz Dolaşım Taramalarına İzin Verin/Vermeyin"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Kablosuz ağlara bağlanırken MAC adresini rastgele seç"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Günlük Kaydedici arabellek boyutları"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Gün. arabel. başına Gün. Kayd. boyutunu seç"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Günlük kaydedici kalıcı depolama alanı silinsin mi?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Kaydettirildi"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Kaydettirilmedi"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Kullanılamıyor"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d cihaz bağlı</item>
+ <item quantity="one">%1$d cihaz bağlı</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Daha uzun süre."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Daha kısa süre."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-uk/strings.xml b/packages/SettingsLib/res/values-uk/strings.xml
index 664fda7..e9f6c06 100644
--- a/packages/SettingsLib/res/values-uk/strings.xml
+++ b/packages/SettingsLib/res/values-uk/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Мережі"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Сертифікація бездрот. екрана"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Докладний запис у журнал Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Завжди шукати мережі Wi-Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Довільний вибір MAC-адрес під час з’єднання"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Не вимикати мобільне передавання даних"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Апаратне прискорення під час використання телефона в режимі модема"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Показувати пристрої Bluetooth без назв"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Введіть ім’я хосту постачальника послуг DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Показати параметри сертифікації бездротового екрана"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Показувати в журналі RSSI для кожного SSID під час вибору Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Дозволити чи заборонити Wi-Fi шукати роумінг на основі обсягу трафіку даних в інтерфейсі"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Довільно вибирати MAC-адресу під час з’єднання з мережами Wi-Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Розміри буфера журналу"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Виберіть розміри буфера журналу"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Очистити постійну пам’ять журналу?"</string>
@@ -403,4 +403,12 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Зареєстровано"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Не зареєстровано"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Недоступно"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">Під’єднано %1$d пристрій</item>
+ <item quantity="few">Під’єднано %1$d пристрої</item>
+ <item quantity="many">Під’єднано %1$d пристроїв</item>
+ <item quantity="other">Під’єднано %1$d пристрою</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Більше часу."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Менше часу."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ur/arrays.xml b/packages/SettingsLib/res/values-ur/arrays.xml
index 8d46582..5efc872 100644
--- a/packages/SettingsLib/res/values-ur/arrays.xml
+++ b/packages/SettingsLib/res/values-ur/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"اوور ڈرا والے حصے دکھائیں"</item>
<item msgid="2290859360633824369">"Deuteranomaly کیلئے حصے دکھائیں"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (ڈیفالٹ)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"معیاری حد"</item>
<item msgid="4071574792028999443">"کوئی پس منظر والے پروسیسز نہیں ہیں"</item>
diff --git a/packages/SettingsLib/res/values-ur/strings.xml b/packages/SettingsLib/res/values-ur/strings.xml
index 226b862..41ec303 100644
--- a/packages/SettingsLib/res/values-ur/strings.xml
+++ b/packages/SettingsLib/res/values-ur/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"نیٹ ورکنگ"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"وائرلیس ڈسپلے سرٹیفیکیشن"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Wi‑Fi وربوس لاگنگ فعال کریں"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"ہمیشہ Wi‑Fi روم اسکینز کی اجازت دیں"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"منسلک کردہ MAC رینڈمائزیشن"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"موبائل ڈیٹا ہمیشہ فعال رکھیں"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"ٹیدرنگ ہارڈویئر سرعت کاری"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"بغیر نام والے بلوٹوتھ آلات دکھائیں"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS فراہم کنندہ کے میزبان کا نام درج کریں"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"وائرلیس ڈسپلے سرٹیفیکیشن کیلئے اختیارات دکھائیں"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi‑Fi لاگنگ لیول میں اضافہ کریں، Wi‑Fi منتخب کنندہ میں فی SSID RSSI دکھائیں"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"انٹرفیس پر موجود ڈیٹا ٹریفک کی مقدار کی بنیاد پر Wi‑Fi روم اسکینز کی اجازت دیں/اجازت نہ دیں"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Wi-Fi نیٹ ورکس سے منسلک کرتے وقت MAC پتے کو غیر مرتب کریں"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"لاگر بفر کے سائز"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"فی لاگ بفر لاگر کے سائز منتخب کریں"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"لاگر مستقل اسٹوریج صاف کریں؟"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"ہارڈویئر پرتوں کی اپ ڈیٹس دکھائیں"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"ہارڈویئر پرتیں اپ ڈیٹ ہونے پر سبز رنگ میں جھلملائیں"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"GPU اوور ڈرا کو ڈیبگ کریں"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU رینڈرر سیٹ کریں"</string>
<string name="disable_overlays" msgid="2074488440505934665">"HW اوور لیز غیر فعال کریں"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"سکرین کی ساخت بنانے کیلئے ہمیشہ GPU استعمال کریں"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"رنگ کی جگہ کو تحریک دیں"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"رجسٹر شدہ"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"رجسٹر نہیں ہے"</string>
<string name="status_unavailable" msgid="7862009036663793314">"غیر دستیاب"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d آلات منسلک ہیں</item>
+ <item quantity="one">%1$d آلہ منسلک ہے</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"زیادہ وقت۔"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"کم وقت۔"</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"آن کریں"</string>
+ <string name="cancel" msgid="6859253417269739139">"منسوخ کریں"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"\'ڈسٹرب نہ کریں\' کو آن کریں"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"کبھی نہیں"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"صرف ترجیحی"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-uz/arrays.xml b/packages/SettingsLib/res/values-uz/arrays.xml
index 16d325fe..813c44f 100644
--- a/packages/SettingsLib/res/values-uz/arrays.xml
+++ b/packages/SettingsLib/res/values-uz/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"Ortiqcha chizilgan joylarni ko‘rsatish"</item>
<item msgid="2290859360633824369">"Muayyan rangdagi hududlarni ajratib belgilash"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL (standart)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"Standard cheklov"</item>
<item msgid="4071574792028999443">"Fondagi jarayonlarsiz"</item>
diff --git a/packages/SettingsLib/res/values-uz/strings.xml b/packages/SettingsLib/res/values-uz/strings.xml
index fdb3ef4..0a65c13 100644
--- a/packages/SettingsLib/res/values-uz/strings.xml
+++ b/packages/SettingsLib/res/values-uz/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Tarmoqlar"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Simsiz monitor sertifikatlari"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Batafsil Wi-Fi jurnali"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Wi-Fi tarmoqlarini qidirishga doim ruxsat"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Ulangan MAC randomizatsiyasi"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobil internet doim yoniq tursin"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Modem rejimida apparatli tezlashtirish"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Bluetooth qurilmalarini nomlarisiz ko‘rsatish"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"DNS provayderining host nomini kiriting"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Simsiz monitorlarni sertifikatlash parametrini ko‘rsatish"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Wi-Fi ulanishini tanlashda har bir SSID uchun jurnalda ko‘rsatilsin"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Ma’lumotlarni uzatish vaqtida trafik hajmiga qarab Wi-Fi tarmoqlarni qidirish funksiyasini yoqish yoki o‘chirish"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Wi-Fi tarmoqlarga ulanishda MAC manzilini tasodifiy tanlash"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Jurnal buferi hajmi"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Jurnal xotirasi hajmini tanlang"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Jurnalning doimiy xotirasi tozalansinmi?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"Apparatli yangilanishlarni ko‘rsatish"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Yangilanganda apparatli darajalarni yashil bilan belgilash"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"GPU ortiqcha chiziqlarini o‘chirish"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"GPU renderlash vositasi"</string>
<string name="disable_overlays" msgid="2074488440505934665">"Apparatli qatlamlarni o‘ch. qo‘yish"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"Ekranda tasvirlarni biriktirish uchun doim GPU ishlatilsin"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"Rang maydonini simulyatsiyalash"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registratsiya qilingan"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Registratsiya qilinmagan"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Mavjud emas"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d ta qurilma ulangan</item>
+ <item quantity="one">%1$d ta qurilma ulangan</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Ko‘proq vaqt."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Kamroq vaqt."</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"Yoqish"</string>
+ <string name="cancel" msgid="6859253417269739139">"Bekor qilish"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"Bezovta qilinmasin rejimini yoqing"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"Hech qachon"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"Faqat muhimlari"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-vi/strings.xml b/packages/SettingsLib/res/values-vi/strings.xml
index a7a5855..5d8f543 100644
--- a/packages/SettingsLib/res/values-vi/strings.xml
+++ b/packages/SettingsLib/res/values-vi/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Mạng"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Chứng nhận hiển thị không dây"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Bật ghi nhật ký chi tiết Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Luôn cho phép quét chuyển vùng Wi‑Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Lựa chọn ngẫu nhiên địa chỉ MAC khi kết nối"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Dữ liệu di động luôn hiện hoạt"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Tăng tốc phần cứng cho chia sẻ kết nối"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Hiển thị các thiết bị Bluetooth không có tên"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Nhập tên máy chủ của nhà cung cấp DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Hiển thị tùy chọn chứng nhận hiển thị không dây"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"Tăng mức ghi nhật ký Wi‑Fi, hiển thị mỗi SSID RSSI trong bộ chọn Wi‑Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Cho phép/Không cho phép quét chuyển vùng Wi‑Fi dựa trên lưu lượng truy cập dữ liệu có tại giao diện"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Lựa chọn ngẫu nhiên địa chỉ MAC khi kết nối với mạng Wi‑Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Kích cỡ tải trình ghi"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Chọn kích thước Trình ghi/lần tải nhật ký"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Xóa bộ nhớ ổn định trong trình ghi nhật ký?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Đã đăng ký"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Chưa được đăng ký"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Không có"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d thiết bị được kết nối</item>
+ <item quantity="one">%1$d thiết bị được kết nối</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Nhiều thời gian hơn."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Ít thời gian hơn."</string>
</resources>
diff --git a/packages/SettingsLib/res/values-zh-rCN/arrays.xml b/packages/SettingsLib/res/values-zh-rCN/arrays.xml
index dc24afd..7b451ae 100644
--- a/packages/SettingsLib/res/values-zh-rCN/arrays.xml
+++ b/packages/SettingsLib/res/values-zh-rCN/arrays.xml
@@ -234,10 +234,6 @@
<item msgid="7688197031296835369">"显示过度绘制区域"</item>
<item msgid="2290859360633824369">"显示适合绿色弱视患者查看的区域"</item>
</string-array>
- <string-array name="debug_hw_renderer_entries">
- <item msgid="2578620445459945681">"OpenGL(默认)"</item>
- <item msgid="2839130076198120436">"OpenGL (Skia)"</item>
- </string-array>
<string-array name="app_process_limit_entries">
<item msgid="3401625457385943795">"标准限制"</item>
<item msgid="4071574792028999443">"不允许后台进程"</item>
diff --git a/packages/SettingsLib/res/values-zh-rCN/strings.xml b/packages/SettingsLib/res/values-zh-rCN/strings.xml
index 5a1d067..7bd7e7d 100644
--- a/packages/SettingsLib/res/values-zh-rCN/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rCN/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"网络"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"无线显示认证"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"启用WLAN详细日志记录功能"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"一律允许WLAN漫游扫描"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"连接时随机选择 MAC 网址"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"始终开启移动数据网络"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"网络共享硬件加速"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"显示没有名称的蓝牙设备"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"输入 DNS 提供商的主机名"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"显示无线显示认证选项"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"提升WLAN日志记录级别(在WLAN选择器中显示每个SSID的RSSI)"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"根据接口中目前的数据流量允许/禁止WLAN漫游扫描"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"连接到 WLAN 网络时随机选择 MAC 地址"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"日志记录器缓冲区大小"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"选择每个日志缓冲区的日志记录器大小"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"要清除永久存储的日志记录器数据吗?"</string>
@@ -275,7 +275,6 @@
<string name="show_hw_layers_updates" msgid="5645728765605699821">"显示硬件层更新"</string>
<string name="show_hw_layers_updates_summary" msgid="5296917233236661465">"Flash 硬件层在进行更新时会显示为绿色"</string>
<string name="debug_hw_overdraw" msgid="2968692419951565417">"调试 GPU 过度绘制"</string>
- <string name="debug_hw_renderer" msgid="7568529019431785816">"设置 GPU 渲染程序"</string>
<string name="disable_overlays" msgid="2074488440505934665">"停用 HW 叠加层"</string>
<string name="disable_overlays_summary" msgid="3578941133710758592">"始终使用 GPU 进行屏幕合成"</string>
<string name="simulate_color_space" msgid="6745847141353345872">"模拟颜色空间"</string>
@@ -403,4 +402,16 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"已注册"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"未注册"</string>
<string name="status_unavailable" msgid="7862009036663793314">"无法获取"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">已连接 %1$d 个设备</item>
+ <item quantity="one">已连接 %1$d 个设备</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"增加时间。"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"减少时间。"</string>
+ <string name="zen_mode_enable_dialog_turn_on" msgid="8287824809739581837">"开启"</string>
+ <string name="cancel" msgid="6859253417269739139">"取消"</string>
+ <string name="zen_mode_settings_turn_on_dialog_title" msgid="2297134204747331078">"开启“勿扰”模式"</string>
+ <string name="zen_mode_settings_summary_off" msgid="6119891445378113334">"永不"</string>
+ <string name="zen_interruption_level_priority" msgid="2078370238113347720">"仅限优先事项"</string>
+ <string name="zen_mode_and_condition" msgid="4927230238450354412">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>。<xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-zh-rHK/strings.xml b/packages/SettingsLib/res/values-zh-rHK/strings.xml
index acc3bb8..695990d 100644
--- a/packages/SettingsLib/res/values-zh-rHK/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rHK/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"網絡"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"無線螢幕分享認證"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"啟用 Wi‑Fi 詳細記錄"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"永遠允許 Wi-Fi 漫遊掃描"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"已連線的 MAC 隨機化處理"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"一律保持啟用流動數據"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"網絡共享硬件加速"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"顯示沒有名稱的藍牙裝置"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"輸入網域名稱系統 (DNS) 供應商的主機名稱"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"顯示無線螢幕分享認證的選項"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"讓 Wi‑Fi 記錄功能升級,在 Wi‑Fi 選擇器中依每個 SSID RSSI 顯示 Wi‑Fi 詳細紀錄"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"根據介面中目前的數據流量允許/禁止 WiFi 漫遊掃描"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"連線至 Wi‑Fi 網絡時隨機產生 MAC 位址"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"記錄器緩衝區空間"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"選取每個記錄緩衝區的記錄器空間"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"要清除記錄器的持久儲存空間嗎?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"已註冊"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"未註冊"</string>
<string name="status_unavailable" msgid="7862009036663793314">"無法使用"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d 部已連線的裝置</item>
+ <item quantity="one">%1$d 部已連線的裝置</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"增加時間。"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"減少時間。"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-zh-rTW/strings.xml b/packages/SettingsLib/res/values-zh-rTW/strings.xml
index 775b928..6b7d7e8 100644
--- a/packages/SettingsLib/res/values-zh-rTW/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rTW/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"網路連線"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"無線螢幕分享認證"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"啟用 Wi‑Fi 詳細紀錄設定"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"一律允許 Wi-Fi 漫遊掃描"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"已連線的 MAC 隨機化處理"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"行動數據連線一律保持啟用狀態"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"數據連線硬體加速"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"顯示沒有名稱的藍牙裝置"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"輸入 DNS 供應商的主機名稱"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"顯示無線螢幕分享認證的選項"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"讓 Wi‑Fi 記錄功能升級,在 Wi‑Fi 選擇器中依每個 SSID RSSI 顯示 Wi‑Fi 詳細紀錄"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"根據介面中目前的數據流量允許/禁止 Wi-Fi 漫遊掃描"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"連線至 Wi‑Fi 網路時隨機化 MAC 位址"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"紀錄器緩衝區空間"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"選取每個紀錄緩衝區的紀錄器空間"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"要清除永久儲存的記錄器資料嗎?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"已註冊"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"未註冊"</string>
<string name="status_unavailable" msgid="7862009036663793314">"無法取得"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="other">%1$d 個已連線的裝置</item>
+ <item quantity="one">%1$d 個已連線的裝置</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"增加時間。"</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"減少時間。"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-zu/strings.xml b/packages/SettingsLib/res/values-zu/strings.xml
index 13b1603..c5d6627 100644
--- a/packages/SettingsLib/res/values-zu/strings.xml
+++ b/packages/SettingsLib/res/values-zu/strings.xml
@@ -196,7 +196,7 @@
<string name="debug_networking_category" msgid="7044075693643009662">"Ukunethiwekha"</string>
<string name="wifi_display_certification" msgid="8611569543791307533">"Ukunikezwa isitifiketi sokubukeka okungenantambo"</string>
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Nika amandlaukungena kwe-Wi-Fi Verbose"</string>
- <string name="wifi_allow_scan_with_traffic" msgid="3601853081178265786">"Vumela njalo ukuskena kokuzula kwe-Wi-Fi"</string>
+ <string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Okungahleliwe kwe-MAC exhunyiwe"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Idatha yeselula ihlala isebenza"</string>
<string name="tethering_hardware_offload" msgid="7470077827090325814">"I-Tethering hardware acceleration"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Bonisa amadivayisi e-Bluetooth ngaphandle kwamagama"</string>
@@ -222,7 +222,7 @@
<string name="private_dns_mode_provider_hostname_hint" msgid="2487492386970928143">"Faka igama lomsingathi womhlinzeki we-DNS"</string>
<string name="wifi_display_certification_summary" msgid="1155182309166746973">"Bonisa izinketho zokunikeza isitifiketi ukubukeka okungenantambo"</string>
<string name="wifi_verbose_logging_summary" msgid="6615071616111731958">"khuphula izinga lokungena le-Wi-Fi, bonisa nge-SSID RSSI engayodwana kusikhethi se-Wi-Fi"</string>
- <string name="wifi_allow_scan_with_traffic_summary" msgid="2575101424972686310">"Vumela/Ungavumeli ukuskena kokuzula kwe-Wi-Fi okususelwa kunani ledatha yethrafikhi ekhona ekusebenzisaneni"</string>
+ <string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Ungahleli ikheli le-MAC uma kuxhumeke kumanethiwekhi e-Wi-Fi"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Amasayizi weloga ngebhafa"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Khetha amasayizi weloga ngebhafa ngayinye yelogu"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Sula isitoreji seloga eqhubekayo?"</string>
@@ -403,4 +403,10 @@
<string name="ims_reg_status_registered" msgid="933003316932739188">"Kubhalisiwe"</string>
<string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Akubhalisiwe"</string>
<string name="status_unavailable" msgid="7862009036663793314">"Ayitholakali"</string>
+ <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
+ <item quantity="one">%1$d amadivayisi axhunyiwe</item>
+ <item quantity="other">%1$d amadivayisi axhunyiwe</item>
+ </plurals>
+ <string name="accessibility_manual_zen_more_time" msgid="1636187409258564291">"Isikhathi esiningi."</string>
+ <string name="accessibility_manual_zen_less_time" msgid="6590887204171164991">"Isikhathi esincane."</string>
</resources>
diff --git a/packages/SettingsLib/res/values/arrays.xml b/packages/SettingsLib/res/values/arrays.xml
index 77df02b..c926e1f 100644
--- a/packages/SettingsLib/res/values/arrays.xml
+++ b/packages/SettingsLib/res/values/arrays.xml
@@ -468,18 +468,6 @@
<item>show_deuteranomaly</item>
</string-array>
- <!-- Titles for debug renderer preference. [CHAR LIMIT=50] -->
- <string-array name="debug_hw_renderer_entries">
- <item>OpenGL (Default)</item>
- <item>OpenGL (Skia)</item>
- </string-array>
-
- <!-- Values for debug renderer preference. -->
- <string-array name="debug_hw_renderer_values" translatable="false" >
- <item>opengl</item>
- <item>skiagl</item>
- </string-array>
-
<!-- Titles for app process limit preference. [CHAR LIMIT=35] -->
<string-array name="app_process_limit_entries">
<item>Standard limit</item>
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index 5dcc927..486a9bb 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -679,9 +679,6 @@
<!-- UI debug setting: show the amount of overdraw in apps using the GPU [CHAR LIMIT=25] -->
<string name="debug_hw_overdraw">Debug GPU overdraw</string>
- <!-- UI debug setting: select the renderer to use by RenderThread [CHAR LIMIT=25] -->
- <string name="debug_hw_renderer">Set GPU Renderer</string>
-
<!-- UI debug setting: disable use of overlays? [CHAR LIMIT=25] -->
<string name="disable_overlays">Disable HW overlays</string>
<!-- UI debug setting: disable use of overlays summary [CHAR LIMIT=50] -->
@@ -1030,4 +1027,17 @@
<!-- Content description of zen mode time condition minus button (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_manual_zen_less_time">Less time.</string>
+ <!-- Do not disturb: Label for button in enable zen dialog that will turn on zen mode. [CHAR LIMIT=30] -->
+ <string name="zen_mode_enable_dialog_turn_on">Turn on</string>
+ <!-- Button label for generic cancel action [CHAR LIMIT=20] -->
+ <string name="cancel">Cancel</string>
+ <!-- Do not disturb: Title for the Do not Disturb dialog to turn on Do not disturb. [CHAR LIMIT=50]-->
+ <string name="zen_mode_settings_turn_on_dialog_title">Turn on Do Not Disturb</string>
+ <!-- Sound: Summary for the Do not Disturb option when there is no automatic rules turned on. [CHAR LIMIT=NONE]-->
+ <string name="zen_mode_settings_summary_off">Never</string>
+ <!--[CHAR LIMIT=40] Zen Interruption level: Priority. -->
+ <string name="zen_interruption_level_priority">Priority only</string>
+ <!-- [CHAR LIMIT=20] Accessibility string for current zen mode and selected exit condition. A template that simply concatenates existing mode string and the current condition description. -->
+ <string name="zen_mode_and_condition"><xliff:g id="zen_mode" example="Priority interruptions only">%1$s</xliff:g>. <xliff:g id="exit_condition" example="For one hour">%2$s</xliff:g></string>
+
</resources>
diff --git a/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtils.java b/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtils.java
index fce5dd9..7728f66 100644
--- a/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtils.java
@@ -363,6 +363,26 @@
}
/**
+ * Check if {@param packageName} is restricted by the profile or device owner from using
+ * metered data.
+ *
+ * @return EnforcedAdmin object containing the enforced admin component and admin user details,
+ * or {@code null} if the {@param packageName} is not restricted.
+ */
+ public static EnforcedAdmin checkIfMeteredDataRestricted(Context context,
+ String packageName, int userId) {
+ final EnforcedAdmin enforcedAdmin = getProfileOrDeviceOwner(context, userId);
+ if (enforcedAdmin == null) {
+ return null;
+ }
+
+ final DevicePolicyManager dpm = (DevicePolicyManager) context.getSystemService(
+ Context.DEVICE_POLICY_SERVICE);
+ return dpm.isMeteredDataDisabledForUser(enforcedAdmin.component, packageName, userId)
+ ? enforcedAdmin : null;
+ }
+
+ /**
* Checks if {@link android.app.admin.DevicePolicyManager#setAutoTimeRequired} is enforced
* on the device.
*
diff --git a/packages/SettingsLib/src/com/android/settingslib/Utils.java b/packages/SettingsLib/src/com/android/settingslib/Utils.java
index d001e66..1f67dfb 100644
--- a/packages/SettingsLib/src/com/android/settingslib/Utils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/Utils.java
@@ -44,7 +44,11 @@
com.android.internal.R.drawable.ic_wifi_signal_4
};
- public static void updateLocationEnabled(Context context, boolean enabled, int userId) {
+ public static void updateLocationEnabled(Context context, boolean enabled, int userId,
+ int source) {
+ Settings.Secure.putIntForUser(
+ context.getContentResolver(), Settings.Secure.LOCATION_CHANGER, source,
+ userId);
Intent intent = new Intent(LocationManager.MODE_CHANGING_ACTION);
final int oldMode = Settings.Secure.getIntForUser(context.getContentResolver(),
@@ -62,7 +66,11 @@
wrapper.setLocationEnabledForUser(enabled, UserHandle.of(userId));
}
- public static boolean updateLocationMode(Context context, int oldMode, int newMode, int userId) {
+ public static boolean updateLocationMode(Context context, int oldMode, int newMode, int userId,
+ int source) {
+ Settings.Secure.putIntForUser(
+ context.getContentResolver(), Settings.Secure.LOCATION_CHANGER, source,
+ userId);
Intent intent = new Intent(LocationManager.MODE_CHANGING_ACTION);
intent.putExtra(CURRENT_MODE_KEY, oldMode);
intent.putExtra(NEW_MODE_KEY, newMode);
diff --git a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
index 5c73d54..3a0ae9f 100644
--- a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
+++ b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
@@ -48,6 +48,7 @@
import android.os.SystemClock;
import android.os.UserHandle;
import android.os.UserManager;
+import android.support.annotation.VisibleForTesting;
import android.text.format.Formatter;
import android.util.IconDrawableFactory;
import android.util.Log;
@@ -1282,7 +1283,8 @@
// A location where extra info can be placed to be used by custom filters.
public Object extraInfo;
- AppEntry(Context context, ApplicationInfo info, long id) {
+ @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
+ public AppEntry(Context context, ApplicationInfo info, long id) {
apkFile = new File(info.sourceDir);
this.id = id;
this.info = info;
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
index 9b69304..6b99024 100755
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
@@ -219,8 +219,8 @@
return true;
}
BluetoothCodecConfig codecConfig = null;
- if (mServiceWrapper.getCodecStatus() != null) {
- codecConfig = mServiceWrapper.getCodecStatus().getCodecConfig();
+ if (mServiceWrapper.getCodecStatus(device) != null) {
+ codecConfig = mServiceWrapper.getCodecStatus(device).getCodecConfig();
}
if (codecConfig != null) {
return !codecConfig.isMandatoryCodec();
@@ -238,9 +238,9 @@
return;
}
if (enabled) {
- mService.enableOptionalCodecs();
+ mService.enableOptionalCodecs(device);
} else {
- mService.disableOptionalCodecs();
+ mService.disableOptionalCodecs(device);
}
}
@@ -253,8 +253,8 @@
// We want to get the highest priority codec, since that's the one that will be used with
// this device, and see if it is high-quality (ie non-mandatory).
BluetoothCodecConfig[] selectable = null;
- if (mServiceWrapper.getCodecStatus() != null) {
- selectable = mServiceWrapper.getCodecStatus().getCodecsSelectableCapabilities();
+ if (mServiceWrapper.getCodecStatus(device) != null) {
+ selectable = mServiceWrapper.getCodecStatus(device).getCodecsSelectableCapabilities();
// To get the highest priority, we sort in reverse.
Arrays.sort(selectable,
(a, b) -> {
diff --git a/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/EventLogWriter.java b/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/EventLogWriter.java
new file mode 100644
index 0000000..7227304
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/EventLogWriter.java
@@ -0,0 +1,110 @@
+/*
+ * 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.
+ */
+
+package com.android.settingslib.core.instrumentation;
+
+import android.content.Context;
+import android.metrics.LogMaker;
+import android.util.Log;
+import android.util.Pair;
+
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.nano.MetricsProto;
+
+/**
+ * {@link LogWriter} that writes data to eventlog.
+ */
+public class EventLogWriter implements LogWriter {
+
+ private final MetricsLogger mMetricsLogger = new MetricsLogger();
+
+ public void visible(Context context, int source, int category) {
+ final LogMaker logMaker = new LogMaker(category)
+ .setType(MetricsProto.MetricsEvent.TYPE_OPEN)
+ .addTaggedData(MetricsProto.MetricsEvent.FIELD_CONTEXT, source);
+ MetricsLogger.action(logMaker);
+ }
+
+ public void hidden(Context context, int category) {
+ MetricsLogger.hidden(context, category);
+ }
+
+ public void action(int category, int value, Pair<Integer, Object>... taggedData) {
+ if (taggedData == null || taggedData.length == 0) {
+ mMetricsLogger.action(category, value);
+ } else {
+ final LogMaker logMaker = new LogMaker(category)
+ .setType(MetricsProto.MetricsEvent.TYPE_ACTION)
+ .setSubtype(value);
+ for (Pair<Integer, Object> pair : taggedData) {
+ logMaker.addTaggedData(pair.first, pair.second);
+ }
+ mMetricsLogger.write(logMaker);
+ }
+ }
+
+ public void action(int category, boolean value, Pair<Integer, Object>... taggedData) {
+ action(category, value ? 1 : 0, taggedData);
+ }
+
+ public void action(Context context, int category, Pair<Integer, Object>... taggedData) {
+ action(context, category, "", taggedData);
+ }
+
+ public void actionWithSource(Context context, int source, int category) {
+ final LogMaker logMaker = new LogMaker(category)
+ .setType(MetricsProto.MetricsEvent.TYPE_ACTION);
+ if (source != MetricsProto.MetricsEvent.VIEW_UNKNOWN) {
+ logMaker.addTaggedData(MetricsProto.MetricsEvent.FIELD_CONTEXT, source);
+ }
+ MetricsLogger.action(logMaker);
+ }
+
+ /** @deprecated use {@link #action(int, int, Pair[])} */
+ @Deprecated
+ public void action(Context context, int category, int value) {
+ MetricsLogger.action(context, category, value);
+ }
+
+ /** @deprecated use {@link #action(int, boolean, Pair[])} */
+ @Deprecated
+ public void action(Context context, int category, boolean value) {
+ MetricsLogger.action(context, category, value);
+ }
+
+ public void action(Context context, int category, String pkg,
+ Pair<Integer, Object>... taggedData) {
+ if (taggedData == null || taggedData.length == 0) {
+ MetricsLogger.action(context, category, pkg);
+ } else {
+ final LogMaker logMaker = new LogMaker(category)
+ .setType(MetricsProto.MetricsEvent.TYPE_ACTION)
+ .setPackageName(pkg);
+ for (Pair<Integer, Object> pair : taggedData) {
+ logMaker.addTaggedData(pair.first, pair.second);
+ }
+ MetricsLogger.action(logMaker);
+ }
+ }
+
+ public void count(Context context, String name, int value) {
+ MetricsLogger.count(context, name, value);
+ }
+
+ public void histogram(Context context, String name, int bucket) {
+ MetricsLogger.histogram(context, name, bucket);
+ }
+}
diff --git a/core/proto/android/os/batterymanager.proto b/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/Instrumentable.java
similarity index 61%
copy from core/proto/android/os/batterymanager.proto
copy to packages/SettingsLib/src/com/android/settingslib/core/instrumentation/Instrumentable.java
index 669bf2d..dbc61c2 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/Instrumentable.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * 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.
@@ -14,16 +14,15 @@
* limitations under the License.
*/
-syntax = "proto2";
-package android.os;
+package com.android.settingslib.core.instrumentation;
-option java_multiple_files = true;
+public interface Instrumentable {
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
+ int METRICS_CATEGORY_UNKNOWN = 0;
+
+ /**
+ * Instrumented name for a view as defined in
+ * {@link com.android.internal.logging.nano.MetricsProto.MetricsEvent}.
+ */
+ int getMetricsCategory();
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/LogWriter.java b/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/LogWriter.java
new file mode 100644
index 0000000..4b9f572
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/LogWriter.java
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ */
+package com.android.settingslib.core.instrumentation;
+
+import android.content.Context;
+import android.util.Pair;
+
+/**
+ * Generic log writer interface.
+ */
+public interface LogWriter {
+
+ /**
+ * Logs a visibility event when view becomes visible.
+ */
+ void visible(Context context, int source, int category);
+
+ /**
+ * Logs a visibility event when view becomes hidden.
+ */
+ void hidden(Context context, int category);
+
+ /**
+ * Logs a user action.
+ */
+ void action(int category, int value, Pair<Integer, Object>... taggedData);
+
+ /**
+ * Logs a user action.
+ */
+ void action(int category, boolean value, Pair<Integer, Object>... taggedData);
+
+ /**
+ * Logs an user action.
+ */
+ void action(Context context, int category, Pair<Integer, Object>... taggedData);
+
+ /**
+ * Logs an user action.
+ */
+ void actionWithSource(Context context, int source, int category);
+
+ /**
+ * Logs an user action.
+ * @deprecated use {@link #action(int, int, Pair[])}
+ */
+ @Deprecated
+ void action(Context context, int category, int value);
+
+ /**
+ * Logs an user action.
+ * @deprecated use {@link #action(int, boolean, Pair[])}
+ */
+ @Deprecated
+ void action(Context context, int category, boolean value);
+
+ /**
+ * Logs an user action.
+ */
+ void action(Context context, int category, String pkg, Pair<Integer, Object>... taggedData);
+
+ /**
+ * Logs a count.
+ */
+ void count(Context context, String name, int value);
+
+ /**
+ * Logs a histogram event.
+ */
+ void histogram(Context context, String name, int bucket);
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/MetricsFeatureProvider.java b/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/MetricsFeatureProvider.java
new file mode 100644
index 0000000..1e5b378
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/MetricsFeatureProvider.java
@@ -0,0 +1,159 @@
+/*
+ * 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.
+ */
+package com.android.settingslib.core.instrumentation;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.text.TextUtils;
+import android.util.Pair;
+
+import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * FeatureProvider for metrics.
+ */
+public class MetricsFeatureProvider {
+ private List<LogWriter> mLoggerWriters;
+
+ public MetricsFeatureProvider() {
+ mLoggerWriters = new ArrayList<>();
+ installLogWriters();
+ }
+
+ protected void installLogWriters() {
+ mLoggerWriters.add(new EventLogWriter());
+ }
+
+ public void visible(Context context, int source, int category) {
+ for (LogWriter writer : mLoggerWriters) {
+ writer.visible(context, source, category);
+ }
+ }
+
+ public void hidden(Context context, int category) {
+ for (LogWriter writer : mLoggerWriters) {
+ writer.hidden(context, category);
+ }
+ }
+
+ public void actionWithSource(Context context, int source, int category) {
+ for (LogWriter writer : mLoggerWriters) {
+ writer.actionWithSource(context, source, category);
+ }
+ }
+
+ /**
+ * Logs a user action. Includes the elapsed time since the containing
+ * fragment has been visible.
+ */
+ public void action(VisibilityLoggerMixin visibilityLogger, int category, int value) {
+ for (LogWriter writer : mLoggerWriters) {
+ writer.action(category, value,
+ sinceVisibleTaggedData(visibilityLogger.elapsedTimeSinceVisible()));
+ }
+ }
+
+ /**
+ * Logs a user action. Includes the elapsed time since the containing
+ * fragment has been visible.
+ */
+ public void action(VisibilityLoggerMixin visibilityLogger, int category, boolean value) {
+ for (LogWriter writer : mLoggerWriters) {
+ writer.action(category, value,
+ sinceVisibleTaggedData(visibilityLogger.elapsedTimeSinceVisible()));
+ }
+ }
+
+ public void action(Context context, int category, Pair<Integer, Object>... taggedData) {
+ for (LogWriter writer : mLoggerWriters) {
+ writer.action(context, category, taggedData);
+ }
+ }
+
+ /** @deprecated use {@link #action(VisibilityLoggerMixin, int, int)} */
+ @Deprecated
+ public void action(Context context, int category, int value) {
+ for (LogWriter writer : mLoggerWriters) {
+ writer.action(context, category, value);
+ }
+ }
+
+ /** @deprecated use {@link #action(VisibilityLoggerMixin, int, boolean)} */
+ @Deprecated
+ public void action(Context context, int category, boolean value) {
+ for (LogWriter writer : mLoggerWriters) {
+ writer.action(context, category, value);
+ }
+ }
+
+ public void action(Context context, int category, String pkg,
+ Pair<Integer, Object>... taggedData) {
+ for (LogWriter writer : mLoggerWriters) {
+ writer.action(context, category, pkg, taggedData);
+ }
+ }
+
+ public void count(Context context, String name, int value) {
+ for (LogWriter writer : mLoggerWriters) {
+ writer.count(context, name, value);
+ }
+ }
+
+ public void histogram(Context context, String name, int bucket) {
+ for (LogWriter writer : mLoggerWriters) {
+ writer.histogram(context, name, bucket);
+ }
+ }
+
+ public int getMetricsCategory(Object object) {
+ if (object == null || !(object instanceof Instrumentable)) {
+ return MetricsEvent.VIEW_UNKNOWN;
+ }
+ return ((Instrumentable) object).getMetricsCategory();
+ }
+
+ public void logDashboardStartIntent(Context context, Intent intent,
+ int sourceMetricsCategory) {
+ if (intent == null) {
+ return;
+ }
+ final ComponentName cn = intent.getComponent();
+ if (cn == null) {
+ final String action = intent.getAction();
+ if (TextUtils.isEmpty(action)) {
+ // Not loggable
+ return;
+ }
+ action(context, MetricsEvent.ACTION_SETTINGS_TILE_CLICK, action,
+ Pair.create(MetricsEvent.FIELD_CONTEXT, sourceMetricsCategory));
+ return;
+ } else if (TextUtils.equals(cn.getPackageName(), context.getPackageName())) {
+ // Going to a Setting internal page, skip click logging in favor of page's own
+ // visibility logging.
+ return;
+ }
+ action(context, MetricsEvent.ACTION_SETTINGS_TILE_CLICK, cn.flattenToString(),
+ Pair.create(MetricsEvent.FIELD_CONTEXT, sourceMetricsCategory));
+ }
+
+ private Pair<Integer, Object> sinceVisibleTaggedData(long timestamp) {
+ return Pair.create(MetricsEvent.NOTIFICATION_SINCE_VISIBLE_MILLIS, timestamp);
+ }
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/SharedPreferencesLogger.java b/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/SharedPreferencesLogger.java
new file mode 100644
index 0000000..facce4e
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/SharedPreferencesLogger.java
@@ -0,0 +1,259 @@
+/*
+ * 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.
+ */
+
+package com.android.settingslib.core.instrumentation;
+
+import android.annotation.Nullable;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.content.pm.PackageManager;
+import android.os.AsyncTask;
+import android.support.annotation.VisibleForTesting;
+import android.text.TextUtils;
+import android.util.Log;
+import android.util.Pair;
+
+import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentSkipListSet;
+
+public class SharedPreferencesLogger implements SharedPreferences {
+
+ private static final String LOG_TAG = "SharedPreferencesLogger";
+
+ private final String mTag;
+ private final Context mContext;
+ private final MetricsFeatureProvider mMetricsFeature;
+ private final Set<String> mPreferenceKeySet;
+
+ public SharedPreferencesLogger(Context context, String tag,
+ MetricsFeatureProvider metricsFeature) {
+ mContext = context;
+ mTag = tag;
+ mMetricsFeature = metricsFeature;
+ mPreferenceKeySet = new ConcurrentSkipListSet<>();
+ }
+
+ @Override
+ public Map<String, ?> getAll() {
+ return null;
+ }
+
+ @Override
+ public String getString(String key, @Nullable String defValue) {
+ return defValue;
+ }
+
+ @Override
+ public Set<String> getStringSet(String key, @Nullable Set<String> defValues) {
+ return defValues;
+ }
+
+ @Override
+ public int getInt(String key, int defValue) {
+ return defValue;
+ }
+
+ @Override
+ public long getLong(String key, long defValue) {
+ return defValue;
+ }
+
+ @Override
+ public float getFloat(String key, float defValue) {
+ return defValue;
+ }
+
+ @Override
+ public boolean getBoolean(String key, boolean defValue) {
+ return defValue;
+ }
+
+ @Override
+ public boolean contains(String key) {
+ return false;
+ }
+
+ @Override
+ public Editor edit() {
+ return new EditorLogger();
+ }
+
+ @Override
+ public void registerOnSharedPreferenceChangeListener(
+ OnSharedPreferenceChangeListener listener) {
+ }
+
+ @Override
+ public void unregisterOnSharedPreferenceChangeListener(
+ OnSharedPreferenceChangeListener listener) {
+ }
+
+ private void logValue(String key, Object value) {
+ logValue(key, value, false /* forceLog */);
+ }
+
+ private void logValue(String key, Object value, boolean forceLog) {
+ final String prefKey = buildPrefKey(mTag, key);
+ if (!forceLog && !mPreferenceKeySet.contains(prefKey)) {
+ // Pref key doesn't exist in set, this is initial display so we skip metrics but
+ // keeps track of this key.
+ mPreferenceKeySet.add(prefKey);
+ return;
+ }
+ // TODO: Remove count logging to save some resource.
+ mMetricsFeature.count(mContext, buildCountName(prefKey, value), 1);
+
+ final Pair<Integer, Object> valueData;
+ if (value instanceof Long) {
+ final Long longVal = (Long) value;
+ final int intVal;
+ if (longVal > Integer.MAX_VALUE) {
+ intVal = Integer.MAX_VALUE;
+ } else if (longVal < Integer.MIN_VALUE) {
+ intVal = Integer.MIN_VALUE;
+ } else {
+ intVal = longVal.intValue();
+ }
+ valueData = Pair.create(MetricsEvent.FIELD_SETTINGS_PREFERENCE_CHANGE_INT_VALUE,
+ intVal);
+ } else if (value instanceof Integer) {
+ valueData = Pair.create(MetricsEvent.FIELD_SETTINGS_PREFERENCE_CHANGE_INT_VALUE,
+ value);
+ } else if (value instanceof Boolean) {
+ valueData = Pair.create(MetricsEvent.FIELD_SETTINGS_PREFERENCE_CHANGE_INT_VALUE,
+ (Boolean) value ? 1 : 0);
+ } else if (value instanceof Float) {
+ valueData = Pair.create(MetricsEvent.FIELD_SETTINGS_PREFERENCE_CHANGE_FLOAT_VALUE,
+ value);
+ } else if (value instanceof String) {
+ Log.d(LOG_TAG, "Tried to log string preference " + prefKey + " = " + value);
+ valueData = null;
+ } else {
+ Log.w(LOG_TAG, "Tried to log unloggable object" + value);
+ valueData = null;
+ }
+ if (valueData != null) {
+ // Pref key exists in set, log it's change in metrics.
+ mMetricsFeature.action(mContext, MetricsEvent.ACTION_SETTINGS_PREFERENCE_CHANGE,
+ Pair.create(MetricsEvent.FIELD_SETTINGS_PREFERENCE_CHANGE_NAME, prefKey),
+ valueData);
+ }
+ }
+
+ @VisibleForTesting
+ void logPackageName(String key, String value) {
+ final String prefKey = mTag + "/" + key;
+ mMetricsFeature.action(mContext, MetricsEvent.ACTION_SETTINGS_PREFERENCE_CHANGE, value,
+ Pair.create(MetricsEvent.FIELD_SETTINGS_PREFERENCE_CHANGE_NAME, prefKey));
+ }
+
+ private void safeLogValue(String key, String value) {
+ new AsyncPackageCheck().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, key, value);
+ }
+
+ public static String buildCountName(String prefKey, Object value) {
+ return prefKey + "|" + value;
+ }
+
+ public static String buildPrefKey(String tag, String key) {
+ return tag + "/" + key;
+ }
+
+ private class AsyncPackageCheck extends AsyncTask<String, Void, Void> {
+ @Override
+ protected Void doInBackground(String... params) {
+ String key = params[0];
+ String value = params[1];
+ PackageManager pm = mContext.getPackageManager();
+ try {
+ // Check if this might be a component.
+ ComponentName name = ComponentName.unflattenFromString(value);
+ if (value != null) {
+ value = name.getPackageName();
+ }
+ } catch (Exception e) {
+ }
+ try {
+ pm.getPackageInfo(value, PackageManager.MATCH_ANY_USER);
+ logPackageName(key, value);
+ } catch (PackageManager.NameNotFoundException e) {
+ // Clearly not a package, and it's unlikely this preference is in prefSet, so
+ // lets force log it.
+ logValue(key, value, true /* forceLog */);
+ }
+ return null;
+ }
+ }
+
+ public class EditorLogger implements Editor {
+ @Override
+ public Editor putString(String key, @Nullable String value) {
+ safeLogValue(key, value);
+ return this;
+ }
+
+ @Override
+ public Editor putStringSet(String key, @Nullable Set<String> values) {
+ safeLogValue(key, TextUtils.join(",", values));
+ return this;
+ }
+
+ @Override
+ public Editor putInt(String key, int value) {
+ logValue(key, value);
+ return this;
+ }
+
+ @Override
+ public Editor putLong(String key, long value) {
+ logValue(key, value);
+ return this;
+ }
+
+ @Override
+ public Editor putFloat(String key, float value) {
+ logValue(key, value);
+ return this;
+ }
+
+ @Override
+ public Editor putBoolean(String key, boolean value) {
+ logValue(key, value);
+ return this;
+ }
+
+ @Override
+ public Editor remove(String key) {
+ return this;
+ }
+
+ @Override
+ public Editor clear() {
+ return this;
+ }
+
+ @Override
+ public boolean commit() {
+ return true;
+ }
+
+ @Override
+ public void apply() {
+ }
+ }
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/VisibilityLoggerMixin.java b/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/VisibilityLoggerMixin.java
new file mode 100644
index 0000000..7983896
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/core/instrumentation/VisibilityLoggerMixin.java
@@ -0,0 +1,96 @@
+/*
+ * 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.
+ */
+
+package com.android.settingslib.core.instrumentation;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+
+import android.os.SystemClock;
+import com.android.internal.logging.nano.MetricsProto;
+import com.android.settingslib.core.lifecycle.LifecycleObserver;
+import com.android.settingslib.core.lifecycle.events.OnPause;
+import com.android.settingslib.core.lifecycle.events.OnResume;
+
+import static com.android.settingslib.core.instrumentation.Instrumentable.METRICS_CATEGORY_UNKNOWN;
+
+/**
+ * Logs visibility change of a fragment.
+ */
+public class VisibilityLoggerMixin implements LifecycleObserver, OnResume, OnPause {
+
+ private static final String TAG = "VisibilityLoggerMixin";
+
+ private final int mMetricsCategory;
+
+ private MetricsFeatureProvider mMetricsFeature;
+ private int mSourceMetricsCategory = MetricsProto.MetricsEvent.VIEW_UNKNOWN;
+ private long mVisibleTimestamp;
+
+ /**
+ * The metrics category constant for logging source when a setting fragment is opened.
+ */
+ public static final String EXTRA_SOURCE_METRICS_CATEGORY = ":settings:source_metrics";
+
+ private VisibilityLoggerMixin() {
+ mMetricsCategory = METRICS_CATEGORY_UNKNOWN;
+ }
+
+ public VisibilityLoggerMixin(int metricsCategory, MetricsFeatureProvider metricsFeature) {
+ mMetricsCategory = metricsCategory;
+ mMetricsFeature = metricsFeature;
+ }
+
+ @Override
+ public void onResume() {
+ mVisibleTimestamp = SystemClock.elapsedRealtime();
+ if (mMetricsFeature != null && mMetricsCategory != METRICS_CATEGORY_UNKNOWN) {
+ mMetricsFeature.visible(null /* context */, mSourceMetricsCategory, mMetricsCategory);
+ }
+ }
+
+ @Override
+ public void onPause() {
+ mVisibleTimestamp = 0;
+ if (mMetricsFeature != null && mMetricsCategory != METRICS_CATEGORY_UNKNOWN) {
+ mMetricsFeature.hidden(null /* context */, mMetricsCategory);
+ }
+ }
+
+ /**
+ * Sets source metrics category for this logger. Source is the caller that opened this UI.
+ */
+ public void setSourceMetricsCategory(Activity activity) {
+ if (mSourceMetricsCategory != MetricsProto.MetricsEvent.VIEW_UNKNOWN || activity == null) {
+ return;
+ }
+ final Intent intent = activity.getIntent();
+ if (intent == null) {
+ return;
+ }
+ mSourceMetricsCategory = intent.getIntExtra(EXTRA_SOURCE_METRICS_CATEGORY,
+ MetricsProto.MetricsEvent.VIEW_UNKNOWN);
+ }
+
+ /** Returns elapsed time since onResume() */
+ public long elapsedTimeSinceVisible() {
+ if (mVisibleTimestamp == 0) {
+ return 0;
+ }
+ return SystemClock.elapsedRealtime() - mVisibleTimestamp;
+ }
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/notification/EnableZenModeDialog.java b/packages/SettingsLib/src/com/android/settingslib/notification/EnableZenModeDialog.java
new file mode 100644
index 0000000..a20f687
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/notification/EnableZenModeDialog.java
@@ -0,0 +1,439 @@
+package com.android.settingslib.notification;
+
+/*
+ * 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.
+ */
+
+import android.app.ActivityManager;
+import android.app.AlarmManager;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.NotificationManager;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.net.Uri;
+import android.provider.Settings;
+import android.service.notification.Condition;
+import android.service.notification.ZenModeConfig;
+import android.text.TextUtils;
+import android.util.Log;
+import android.util.Slog;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.CompoundButton;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+import android.widget.ScrollView;
+import android.widget.TextView;
+
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.nano.MetricsProto;
+import com.android.internal.policy.PhoneWindow;
+import com.android.settingslib.R;
+
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.Objects;
+
+public class EnableZenModeDialog {
+
+ private static final String TAG = "QSEnableZenModeDialog";
+ private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
+
+ private static final int[] MINUTE_BUCKETS = ZenModeConfig.MINUTE_BUCKETS;
+ private static final int MIN_BUCKET_MINUTES = MINUTE_BUCKETS[0];
+ private static final int MAX_BUCKET_MINUTES = MINUTE_BUCKETS[MINUTE_BUCKETS.length - 1];
+ private static final int DEFAULT_BUCKET_INDEX = Arrays.binarySearch(MINUTE_BUCKETS, 60);
+
+ private static final int FOREVER_CONDITION_INDEX = 0;
+ private static final int COUNTDOWN_CONDITION_INDEX = 1;
+ private static final int COUNTDOWN_ALARM_CONDITION_INDEX = 2;
+
+ private static final int SECONDS_MS = 1000;
+ private static final int MINUTES_MS = 60 * SECONDS_MS;
+
+ private Uri mForeverId;
+ private int mBucketIndex = -1;
+
+ private AlarmManager mAlarmManager;
+ private int mUserId;
+ private boolean mAttached;
+
+ private Context mContext;
+ private RadioGroup mZenRadioGroup;
+ private LinearLayout mZenRadioGroupContent;
+ private int MAX_MANUAL_DND_OPTIONS = 3;
+
+ public EnableZenModeDialog(Context context) {
+ mContext = context;
+ }
+
+ public Dialog createDialog() {
+ NotificationManager noMan = (NotificationManager) mContext.
+ getSystemService(Context.NOTIFICATION_SERVICE);
+ mForeverId = Condition.newId(mContext).appendPath("forever").build();
+ mAlarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);
+ mUserId = mContext.getUserId();
+ mAttached = false;
+
+ final AlertDialog.Builder builder = new AlertDialog.Builder(mContext)
+ .setTitle(R.string.zen_mode_settings_turn_on_dialog_title)
+ .setNegativeButton(R.string.cancel, null)
+ .setPositiveButton(R.string.zen_mode_enable_dialog_turn_on,
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ int checkedId = mZenRadioGroup.getCheckedRadioButtonId();
+ ConditionTag tag = getConditionTagAt(checkedId);
+
+ if (isForever(tag.condition)) {
+ MetricsLogger.action(mContext,
+ MetricsProto.MetricsEvent.
+ NOTIFICATION_ZEN_MODE_TOGGLE_ON_FOREVER);
+ } else if (isAlarm(tag.condition)) {
+ MetricsLogger.action(mContext,
+ MetricsProto.MetricsEvent.
+ NOTIFICATION_ZEN_MODE_TOGGLE_ON_ALARM);
+ } else if (isCountdown(tag.condition)) {
+ MetricsLogger.action(mContext,
+ MetricsProto.MetricsEvent.
+ NOTIFICATION_ZEN_MODE_TOGGLE_ON_COUNTDOWN);
+ } else {
+ Slog.d(TAG, "Invalid manual condition: " + tag.condition);
+ }
+ // always triggers priority-only dnd with chosen condition
+ noMan.setZenMode(Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS,
+ getRealConditionId(tag.condition), TAG);
+ }
+ });
+
+ View contentView = getContentView();
+ bindConditions(forever());
+ builder.setView(contentView);
+ return builder.create();
+ }
+
+ private void hideAllConditions() {
+ final int N = mZenRadioGroupContent.getChildCount();
+ for (int i = 0; i < N; i++) {
+ mZenRadioGroupContent.getChildAt(i).setVisibility(View.GONE);
+ }
+ }
+
+ protected View getContentView() {
+ final LayoutInflater inflater = new PhoneWindow(mContext).getLayoutInflater();
+ View contentView = inflater.inflate(R.layout.zen_mode_turn_on_dialog_container, null);
+ ScrollView container = (ScrollView) contentView.findViewById(R.id.container);
+
+ mZenRadioGroup = container.findViewById(R.id.zen_radio_buttons);
+ mZenRadioGroupContent = container.findViewById(R.id.zen_radio_buttons_content);
+
+ for (int i = 0; i < MAX_MANUAL_DND_OPTIONS; i++) {
+ final View radioButton = inflater.inflate(R.layout.zen_mode_radio_button,
+ mZenRadioGroup, false);
+ mZenRadioGroup.addView(radioButton);
+ radioButton.setId(i);
+
+ final View radioButtonContent = inflater.inflate(R.layout.zen_mode_condition,
+ mZenRadioGroupContent, false);
+ radioButtonContent.setId(i + MAX_MANUAL_DND_OPTIONS);
+ mZenRadioGroupContent.addView(radioButtonContent);
+ }
+ hideAllConditions();
+ return contentView;
+ }
+
+ private void bind(final Condition condition, final View row, final int rowId) {
+ if (condition == null) throw new IllegalArgumentException("condition must not be null");
+ final boolean enabled = condition.state == Condition.STATE_TRUE;
+ final ConditionTag tag = row.getTag() != null ? (ConditionTag) row.getTag() :
+ new ConditionTag();
+ row.setTag(tag);
+ final boolean first = tag.rb == null;
+ if (tag.rb == null) {
+ tag.rb = (RadioButton) mZenRadioGroup.getChildAt(rowId);
+ }
+ tag.condition = condition;
+ final Uri conditionId = getConditionId(tag.condition);
+ if (DEBUG) Log.d(TAG, "bind i=" + mZenRadioGroupContent.indexOfChild(row) + " first="
+ + first + " condition=" + conditionId);
+ tag.rb.setEnabled(enabled);
+ tag.rb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ if (isChecked) {
+ tag.rb.setChecked(true);
+ if (DEBUG) Log.d(TAG, "onCheckedChanged " + conditionId);
+ MetricsLogger.action(mContext,
+ MetricsProto.MetricsEvent.QS_DND_CONDITION_SELECT);
+ announceConditionSelection(tag);
+ }
+ }
+ });
+
+ updateUi(tag, row, condition, enabled, rowId, conditionId);
+ row.setVisibility(View.VISIBLE);
+ }
+
+ private ConditionTag getConditionTagAt(int index) {
+ return (ConditionTag) mZenRadioGroupContent.getChildAt(index).getTag();
+ }
+
+ private void bindConditions(Condition c) {
+ // forever
+ bind(forever(), mZenRadioGroupContent.getChildAt(FOREVER_CONDITION_INDEX),
+ FOREVER_CONDITION_INDEX);
+ if (c == null) {
+ bindGenericCountdown();
+ bindNextAlarm(getTimeUntilNextAlarmCondition());
+ } else if (isForever(c)) {
+ getConditionTagAt(FOREVER_CONDITION_INDEX).rb.setChecked(true);
+ bindGenericCountdown();
+ bindNextAlarm(getTimeUntilNextAlarmCondition());
+ } else {
+ if (isAlarm(c)) {
+ bindGenericCountdown();
+ bindNextAlarm(c);
+ getConditionTagAt(COUNTDOWN_ALARM_CONDITION_INDEX).rb.setChecked(true);
+ } else if (isCountdown(c)) {
+ bindNextAlarm(getTimeUntilNextAlarmCondition());
+ bind(c, mZenRadioGroupContent.getChildAt(COUNTDOWN_CONDITION_INDEX),
+ COUNTDOWN_CONDITION_INDEX);
+ getConditionTagAt(COUNTDOWN_CONDITION_INDEX).rb.setChecked(true);
+ } else {
+ Slog.d(TAG, "Invalid manual condition: " + c);
+ }
+ }
+ }
+
+ public static Uri getConditionId(Condition condition) {
+ return condition != null ? condition.id : null;
+ }
+
+ public Condition forever() {
+ Uri foreverId = Condition.newId(mContext).appendPath("forever").build();
+ return new Condition(foreverId, foreverSummary(mContext), "", "", 0 /*icon*/,
+ Condition.STATE_TRUE, 0 /*flags*/);
+ }
+
+ public long getNextAlarm() {
+ final AlarmManager.AlarmClockInfo info = mAlarmManager.getNextAlarmClock(mUserId);
+ return info != null ? info.getTriggerTime() : 0;
+ }
+
+ private boolean isAlarm(Condition c) {
+ return c != null && ZenModeConfig.isValidCountdownToAlarmConditionId(c.id);
+ }
+
+ private boolean isCountdown(Condition c) {
+ return c != null && ZenModeConfig.isValidCountdownConditionId(c.id);
+ }
+
+ private boolean isForever(Condition c) {
+ return c != null && mForeverId.equals(c.id);
+ }
+
+ private Uri getRealConditionId(Condition condition) {
+ return isForever(condition) ? null : getConditionId(condition);
+ }
+
+ private String foreverSummary(Context context) {
+ return context.getString(com.android.internal.R.string.zen_mode_forever);
+ }
+
+ private static void setToMidnight(Calendar calendar) {
+ calendar.set(Calendar.HOUR_OF_DAY, 0);
+ calendar.set(Calendar.MINUTE, 0);
+ calendar.set(Calendar.SECOND, 0);
+ calendar.set(Calendar.MILLISECOND, 0);
+ }
+
+ // Returns a time condition if the next alarm is within the next week.
+ private Condition getTimeUntilNextAlarmCondition() {
+ GregorianCalendar weekRange = new GregorianCalendar();
+ setToMidnight(weekRange);
+ weekRange.add(Calendar.DATE, 6);
+ final long nextAlarmMs = getNextAlarm();
+ if (nextAlarmMs > 0) {
+ GregorianCalendar nextAlarm = new GregorianCalendar();
+ nextAlarm.setTimeInMillis(nextAlarmMs);
+ setToMidnight(nextAlarm);
+
+ if (weekRange.compareTo(nextAlarm) >= 0) {
+ return ZenModeConfig.toNextAlarmCondition(mContext, nextAlarmMs,
+ ActivityManager.getCurrentUser());
+ }
+ }
+ return null;
+ }
+
+ private void bindGenericCountdown() {
+ mBucketIndex = DEFAULT_BUCKET_INDEX;
+ Condition countdown = ZenModeConfig.toTimeCondition(mContext,
+ MINUTE_BUCKETS[mBucketIndex], ActivityManager.getCurrentUser());
+ if (!mAttached || getConditionTagAt(COUNTDOWN_CONDITION_INDEX).condition == null) {
+ bind(countdown, mZenRadioGroupContent.getChildAt(COUNTDOWN_CONDITION_INDEX),
+ COUNTDOWN_CONDITION_INDEX);
+ }
+ }
+
+ private void updateUi(ConditionTag tag, View row, Condition condition,
+ boolean enabled, int rowId, Uri conditionId) {
+ if (tag.lines == null) {
+ tag.lines = row.findViewById(android.R.id.content);
+ }
+ if (tag.line1 == null) {
+ tag.line1 = (TextView) row.findViewById(android.R.id.text1);
+ }
+
+ if (tag.line2 == null) {
+ tag.line2 = (TextView) row.findViewById(android.R.id.text2);
+ }
+
+ final String line1 = !TextUtils.isEmpty(condition.line1) ? condition.line1
+ : condition.summary;
+ final String line2 = condition.line2;
+ tag.line1.setText(line1);
+ if (TextUtils.isEmpty(line2)) {
+ tag.line2.setVisibility(View.GONE);
+ } else {
+ tag.line2.setVisibility(View.VISIBLE);
+ tag.line2.setText(line2);
+ }
+ tag.lines.setEnabled(enabled);
+ tag.lines.setAlpha(enabled ? 1 : .4f);
+
+ tag.lines.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ tag.rb.setChecked(true);
+ }
+ });
+
+ // minus button
+ final ImageView button1 = (ImageView) row.findViewById(android.R.id.button1);
+ button1.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ onClickTimeButton(row, tag, false /*down*/, rowId);
+ }
+ });
+
+ // plus button
+ final ImageView button2 = (ImageView) row.findViewById(android.R.id.button2);
+ button2.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ onClickTimeButton(row, tag, true /*up*/, rowId);
+ }
+ });
+
+ final long time = ZenModeConfig.tryParseCountdownConditionId(conditionId);
+ if (rowId == COUNTDOWN_CONDITION_INDEX && time > 0) {
+ button1.setVisibility(View.VISIBLE);
+ button2.setVisibility(View.VISIBLE);
+ if (mBucketIndex > -1) {
+ button1.setEnabled(mBucketIndex > 0);
+ button2.setEnabled(mBucketIndex < MINUTE_BUCKETS.length - 1);
+ } else {
+ final long span = time - System.currentTimeMillis();
+ button1.setEnabled(span > MIN_BUCKET_MINUTES * MINUTES_MS);
+ final Condition maxCondition = ZenModeConfig.toTimeCondition(mContext,
+ MAX_BUCKET_MINUTES, ActivityManager.getCurrentUser());
+ button2.setEnabled(!Objects.equals(condition.summary, maxCondition.summary));
+ }
+
+ button1.setAlpha(button1.isEnabled() ? 1f : .5f);
+ button2.setAlpha(button2.isEnabled() ? 1f : .5f);
+ } else {
+ button1.setVisibility(View.GONE);
+ button2.setVisibility(View.GONE);
+ }
+ }
+
+ private void bindNextAlarm(Condition c) {
+ View alarmContent = mZenRadioGroupContent.getChildAt(COUNTDOWN_ALARM_CONDITION_INDEX);
+ ConditionTag tag = (ConditionTag) alarmContent.getTag();
+
+ if (c != null && (!mAttached || tag == null || tag.condition == null)) {
+ bind(c, alarmContent, COUNTDOWN_ALARM_CONDITION_INDEX);
+ }
+
+ // hide the alarm radio button if there isn't a "next alarm condition"
+ tag = (ConditionTag) alarmContent.getTag();
+ boolean showAlarm = tag != null && tag.condition != null;
+ mZenRadioGroup.getChildAt(COUNTDOWN_ALARM_CONDITION_INDEX).setVisibility(
+ showAlarm ? View.VISIBLE : View.GONE);
+ alarmContent.setVisibility(showAlarm ? View.VISIBLE : View.GONE);
+ }
+
+ private void onClickTimeButton(View row, ConditionTag tag, boolean up, int rowId) {
+ MetricsLogger.action(mContext, MetricsProto.MetricsEvent.QS_DND_TIME, up);
+ Condition newCondition = null;
+ final int N = MINUTE_BUCKETS.length;
+ if (mBucketIndex == -1) {
+ // not on a known index, search for the next or prev bucket by time
+ final Uri conditionId = getConditionId(tag.condition);
+ final long time = ZenModeConfig.tryParseCountdownConditionId(conditionId);
+ final long now = System.currentTimeMillis();
+ for (int i = 0; i < N; i++) {
+ int j = up ? i : N - 1 - i;
+ final int bucketMinutes = MINUTE_BUCKETS[j];
+ final long bucketTime = now + bucketMinutes * MINUTES_MS;
+ if (up && bucketTime > time || !up && bucketTime < time) {
+ mBucketIndex = j;
+ newCondition = ZenModeConfig.toTimeCondition(mContext,
+ bucketTime, bucketMinutes, ActivityManager.getCurrentUser(),
+ false /*shortVersion*/);
+ break;
+ }
+ }
+ if (newCondition == null) {
+ mBucketIndex = DEFAULT_BUCKET_INDEX;
+ newCondition = ZenModeConfig.toTimeCondition(mContext,
+ MINUTE_BUCKETS[mBucketIndex], ActivityManager.getCurrentUser());
+ }
+ } else {
+ // on a known index, simply increment or decrement
+ mBucketIndex = Math.max(0, Math.min(N - 1, mBucketIndex + (up ? 1 : -1)));
+ newCondition = ZenModeConfig.toTimeCondition(mContext,
+ MINUTE_BUCKETS[mBucketIndex], ActivityManager.getCurrentUser());
+ }
+ bind(newCondition, row, rowId);
+ tag.rb.setChecked(true);
+ announceConditionSelection(tag);
+ }
+
+ private void announceConditionSelection(ConditionTag tag) {
+ // condition will always be priority-only
+ String modeText = mContext.getString(R.string.zen_interruption_level_priority);
+ if (tag.line1 != null) {
+ mZenRadioGroupContent.announceForAccessibility(mContext.getString(
+ R.string.zen_mode_and_condition, modeText, tag.line1.getText()));
+ }
+ }
+
+ // used as the view tag on condition rows
+ private static class ConditionTag {
+ public RadioButton rb;
+ public View lines;
+ public TextView line1;
+ public TextView line2;
+ public Condition condition;
+ }
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/suggestions/SuggestionController.java b/packages/SettingsLib/src/com/android/settingslib/suggestions/SuggestionController.java
new file mode 100644
index 0000000..f740f7c
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/suggestions/SuggestionController.java
@@ -0,0 +1,174 @@
+/*
+ * 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.settingslib.suggestions;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.service.settings.suggestions.ISuggestionService;
+import android.service.settings.suggestions.Suggestion;
+import android.support.annotation.Nullable;
+import android.support.annotation.WorkerThread;
+import android.util.Log;
+
+import java.util.List;
+
+/**
+ * A controller class to access suggestion data.
+ */
+public class SuggestionController {
+
+ /**
+ * Callback interface when service is connected/disconnected.
+ */
+ public interface ServiceConnectionListener {
+ /**
+ * Called when service is connected.
+ */
+ void onServiceConnected();
+
+ /**
+ * Called when service is disconnected.
+ */
+ void onServiceDisconnected();
+ }
+
+ private static final String TAG = "SuggestionController";
+ private static final boolean DEBUG = false;
+
+ private final Context mContext;
+ private final Intent mServiceIntent;
+
+ private ServiceConnection mServiceConnection;
+ private ISuggestionService mRemoteService;
+ private ServiceConnectionListener mConnectionListener;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @param context caller context
+ * @param service The component name for service.
+ * @param listener listener to receive service connected/disconnected event.
+ */
+ public SuggestionController(Context context, ComponentName service,
+ ServiceConnectionListener listener) {
+ mContext = context.getApplicationContext();
+ mConnectionListener = listener;
+ mServiceIntent = new Intent().setComponent(service);
+ mServiceConnection = createServiceConnection();
+ }
+
+ /**
+ * Start the controller.
+ */
+ public void start() {
+ mContext.bindServiceAsUser(mServiceIntent, mServiceConnection, Context.BIND_AUTO_CREATE,
+ android.os.Process.myUserHandle());
+ }
+
+ /**
+ * Stop the controller.
+ */
+ public void stop() {
+ if (mRemoteService != null) {
+ mRemoteService = null;
+ mContext.unbindService(mServiceConnection);
+ }
+ }
+
+ /**
+ * Get setting suggestions.
+ */
+ @Nullable
+ @WorkerThread
+ public List<Suggestion> getSuggestions() {
+ if (!isReady()) {
+ return null;
+ }
+ try {
+ return mRemoteService.getSuggestions();
+ } catch (NullPointerException e) {
+ Log.w(TAG, "mRemote service detached before able to query", e);
+ return null;
+ } catch (RemoteException e) {
+ Log.w(TAG, "Error when calling getSuggestion()", e);
+ return null;
+ }
+ }
+
+ public void dismissSuggestions(Suggestion suggestion) {
+ if (!isReady()) {
+ Log.w(TAG, "SuggestionController not ready, cannot dismiss " + suggestion.getId());
+ return;
+ }
+ try {
+ mRemoteService.dismissSuggestion(suggestion);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Error when calling dismissSuggestion()", e);
+ }
+ }
+
+ public void launchSuggestion(Suggestion suggestion) {
+ if (!isReady()) {
+ Log.w(TAG, "SuggestionController not ready, cannot launch " + suggestion.getId());
+ return;
+ }
+
+ try {
+ mRemoteService.launchSuggestion(suggestion);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Error when calling launchSuggestion()", e);
+ }
+ }
+
+ /**
+ * Whether or not the manager is ready
+ */
+ private boolean isReady() {
+ return mRemoteService != null;
+ }
+
+ /**
+ * Create a new {@link ServiceConnection} object to handle service connect/disconnect event.
+ */
+ private ServiceConnection createServiceConnection() {
+ return new ServiceConnection() {
+
+ @Override
+ public void onServiceConnected(ComponentName name, IBinder service) {
+ if (DEBUG) {
+ Log.d(TAG, "Service is connected");
+ }
+ mRemoteService = ISuggestionService.Stub.asInterface(service);
+ if (mConnectionListener != null) {
+ mConnectionListener.onServiceConnected();
+ }
+ }
+
+ @Override
+ public void onServiceDisconnected(ComponentName name) {
+ if (mConnectionListener != null) {
+ mRemoteService = null;
+ mConnectionListener.onServiceDisconnected();
+ }
+ }
+ };
+ }
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/suggestions/SuggestionControllerMixin.java b/packages/SettingsLib/src/com/android/settingslib/suggestions/SuggestionControllerMixin.java
new file mode 100644
index 0000000..46fc32f
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/suggestions/SuggestionControllerMixin.java
@@ -0,0 +1,140 @@
+/*
+ * 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.settingslib.suggestions;
+
+import android.app.LoaderManager;
+import android.arch.lifecycle.OnLifecycleEvent;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Loader;
+import android.os.Bundle;
+import android.service.settings.suggestions.Suggestion;
+import android.support.annotation.Nullable;
+import android.util.Log;
+
+import com.android.settingslib.core.lifecycle.Lifecycle;
+
+import java.util.List;
+
+/**
+ * Manages IPC communication to SettingsIntelligence for suggestion related services.
+ */
+public class SuggestionControllerMixin implements SuggestionController.ServiceConnectionListener,
+ android.arch.lifecycle.LifecycleObserver, LoaderManager.LoaderCallbacks<List<Suggestion>> {
+
+ public interface SuggestionControllerHost {
+ /**
+ * Called when suggestion data fetching is ready.
+ */
+ void onSuggestionReady(List<Suggestion> data);
+
+ /**
+ * Returns {@link LoaderManager} associated with the host. If host is not attached to
+ * activity then return null.
+ */
+ @Nullable
+ LoaderManager getLoaderManager();
+ }
+
+ private static final String TAG = "SuggestionCtrlMixin";
+ private static final boolean DEBUG = false;
+
+ private final Context mContext;
+ private final SuggestionController mSuggestionController;
+ private final SuggestionControllerHost mHost;
+
+ private boolean mSuggestionLoaded;
+
+ public SuggestionControllerMixin(Context context, SuggestionControllerHost host,
+ Lifecycle lifecycle, ComponentName componentName) {
+ mContext = context.getApplicationContext();
+ mHost = host;
+ mSuggestionController = new SuggestionController(mContext, componentName,
+ this /* serviceConnectionListener */);
+ if (lifecycle != null) {
+ lifecycle.addObserver(this);
+ }
+ }
+
+ @OnLifecycleEvent(Lifecycle.Event.ON_START)
+ public void onStart() {
+ if (DEBUG) {
+ Log.d(TAG, "SuggestionController started");
+ }
+ mSuggestionController.start();
+ }
+
+ @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
+ public void onStop() {
+ if (DEBUG) {
+ Log.d(TAG, "SuggestionController stopped.");
+ }
+ mSuggestionController.stop();
+ }
+
+ @Override
+ public void onServiceConnected() {
+ final LoaderManager loaderManager = mHost.getLoaderManager();
+ if (loaderManager != null) {
+ loaderManager.restartLoader(SuggestionLoader.LOADER_ID_SUGGESTIONS,
+ null /* args */, this /* callback */);
+ }
+ }
+
+ @Override
+ public void onServiceDisconnected() {
+ if (DEBUG) {
+ Log.d(TAG, "SuggestionService disconnected");
+ }
+ final LoaderManager loaderManager = mHost.getLoaderManager();
+ if (loaderManager != null) {
+ loaderManager.destroyLoader(SuggestionLoader.LOADER_ID_SUGGESTIONS);
+ }
+ }
+
+ @Override
+ public Loader<List<Suggestion>> onCreateLoader(int id, Bundle args) {
+ if (id == SuggestionLoader.LOADER_ID_SUGGESTIONS) {
+ mSuggestionLoaded = false;
+ return new SuggestionLoader(mContext, mSuggestionController);
+ }
+ throw new IllegalArgumentException("This loader id is not supported " + id);
+ }
+
+ @Override
+ public void onLoadFinished(Loader<List<Suggestion>> loader, List<Suggestion> data) {
+ mSuggestionLoaded = true;
+ mHost.onSuggestionReady(data);
+ }
+
+ @Override
+ public void onLoaderReset(Loader<List<Suggestion>> loader) {
+ mSuggestionLoaded = false;
+ }
+
+ public boolean isSuggestionLoaded() {
+ return mSuggestionLoaded;
+ }
+
+ public void dismissSuggestion(Suggestion suggestion) {
+ mSuggestionController.dismissSuggestions(suggestion);
+ }
+
+ public void launchSuggestion(Suggestion suggestion) {
+ mSuggestionController.launchSuggestion(suggestion);
+ }
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/suggestions/SuggestionLoader.java b/packages/SettingsLib/src/com/android/settingslib/suggestions/SuggestionLoader.java
new file mode 100644
index 0000000..9c1af1e
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/suggestions/SuggestionLoader.java
@@ -0,0 +1,54 @@
+/*
+ * 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.settingslib.suggestions;
+
+import android.content.Context;
+import android.service.settings.suggestions.Suggestion;
+import android.util.Log;
+
+import com.android.settingslib.utils.AsyncLoader;
+
+import java.util.List;
+
+public class SuggestionLoader extends AsyncLoader<List<Suggestion>> {
+
+ public static final int LOADER_ID_SUGGESTIONS = 42;
+ private static final String TAG = "SuggestionLoader";
+
+ private final SuggestionController mSuggestionController;
+
+ public SuggestionLoader(Context context, SuggestionController controller) {
+ super(context);
+ mSuggestionController = controller;
+ }
+
+ @Override
+ protected void onDiscardResult(List<Suggestion> result) {
+
+ }
+
+ @Override
+ public List<Suggestion> loadInBackground() {
+ final List<Suggestion> data = mSuggestionController.getSuggestions();
+ if (data == null) {
+ Log.d(TAG, "data is null");
+ } else {
+ Log.d(TAG, "data size " + data.size());
+ }
+ return data;
+ }
+}
\ No newline at end of file
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
index 754b881..e11017c 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
@@ -32,7 +32,6 @@
import android.net.NetworkScoreManager;
import android.net.NetworkScorerAppData;
import android.net.ScoredNetwork;
-import android.net.WifiKey;
import android.net.wifi.IWifiManager;
import android.net.wifi.ScanResult;
import android.net.wifi.WifiConfiguration;
@@ -43,6 +42,7 @@
import android.net.wifi.WifiNetworkScoreCache;
import android.net.wifi.hotspot2.PasspointConfiguration;
import android.os.Bundle;
+import android.os.Parcelable;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
@@ -52,6 +52,7 @@
import android.text.SpannableString;
import android.text.TextUtils;
import android.text.style.TtsSpan;
+import android.util.ArraySet;
import android.util.Log;
import com.android.internal.annotations.VisibleForTesting;
@@ -60,11 +61,11 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import java.util.Objects;
-import java.util.concurrent.ConcurrentHashMap;
+import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
@@ -91,6 +92,9 @@
*/
public static final int HIGHER_FREQ_5GHZ = 5900;
+ /** The key which identifies this AccessPoint grouping. */
+ private String mKey;
+
@IntDef({Speed.NONE, Speed.SLOW, Speed.MODERATE, Speed.FAST, Speed.VERY_FAST})
@Retention(RetentionPolicy.SOURCE)
public @interface Speed {
@@ -116,14 +120,8 @@
int VERY_FAST = 30;
}
- /**
- * Experimental: we should be able to show the user the list of BSSIDs and bands
- * for that SSID.
- * For now this data is used only with Verbose Logging so as to show the band and number
- * of BSSIDs on which that network is seen.
- */
- private final ConcurrentHashMap<String, ScanResult> mScanResultCache =
- new ConcurrentHashMap<String, ScanResult>(32);
+ /** The underlying set of scan results comprising this AccessPoint. */
+ private final ArraySet<ScanResult> mScanResults = new ArraySet<>();
/**
* Map of BSSIDs to scored networks for individual bssids.
@@ -133,17 +131,13 @@
*/
private final Map<String, TimestampedScoredNetwork> mScoredNetworkCache = new HashMap<>();
- /** Maximum age of scan results to hold onto while actively scanning. **/
- private static final long MAX_SCAN_RESULT_AGE_MILLIS = 25000;
-
static final String KEY_NETWORKINFO = "key_networkinfo";
static final String KEY_WIFIINFO = "key_wifiinfo";
- static final String KEY_SCANRESULT = "key_scanresult";
static final String KEY_SSID = "key_ssid";
static final String KEY_SECURITY = "key_security";
static final String KEY_SPEED = "key_speed";
static final String KEY_PSKTYPE = "key_psktype";
- static final String KEY_SCANRESULTCACHE = "key_scanresultcache";
+ static final String KEY_SCANRESULTS = "key_scanresults";
static final String KEY_SCOREDNETWORKCACHE = "key_scorednetworkcache";
static final String KEY_CONFIG = "key_config";
static final String KEY_FQDN = "key_fqdn";
@@ -216,7 +210,10 @@
public AccessPoint(Context context, Bundle savedState) {
mContext = context;
- mConfig = savedState.getParcelable(KEY_CONFIG);
+
+ if (savedState.containsKey(KEY_CONFIG)) {
+ mConfig = savedState.getParcelable(KEY_CONFIG);
+ }
if (mConfig != null) {
loadConfig(mConfig);
}
@@ -236,12 +233,11 @@
if (savedState.containsKey(KEY_NETWORKINFO)) {
mNetworkInfo = savedState.getParcelable(KEY_NETWORKINFO);
}
- if (savedState.containsKey(KEY_SCANRESULTCACHE)) {
- ArrayList<ScanResult> scanResultArrayList =
- savedState.getParcelableArrayList(KEY_SCANRESULTCACHE);
- mScanResultCache.clear();
- for (ScanResult result : scanResultArrayList) {
- mScanResultCache.put(result.BSSID, result);
+ if (savedState.containsKey(KEY_SCANRESULTS)) {
+ Parcelable[] scanResults = savedState.getParcelableArray(KEY_SCANRESULTS);
+ mScanResults.clear();
+ for (Parcelable result : scanResults) {
+ mScanResults.add((ScanResult) result);
}
}
if (savedState.containsKey(KEY_SCOREDNETWORKCACHE)) {
@@ -268,8 +264,10 @@
}
update(mConfig, mInfo, mNetworkInfo);
- // Do not evict old scan results on initial creation
+ // Calculate required fields
+ updateKey();
updateRssi();
+
mId = sLastId.incrementAndGet();
}
@@ -295,30 +293,75 @@
copyFrom(other);
}
- AccessPoint(Context context, ScanResult result) {
+ AccessPoint(Context context, Collection<ScanResult> results) {
mContext = context;
- initWithScanResult(result);
+
+ if (results.isEmpty()) {
+ throw new IllegalArgumentException("Cannot construct with an empty ScanResult list");
+ }
+ mScanResults.addAll(results);
+
+ // Information derived from scan results
+ ScanResult firstResult = results.iterator().next();
+ ssid = firstResult.SSID;
+ bssid = firstResult.BSSID;
+ security = getSecurity(firstResult);
+ if (security == SECURITY_PSK) {
+ pskType = getPskType(firstResult);
+ }
+ updateKey();
+ updateRssi();
+
+ // Passpoint Info
+ mIsCarrierAp = firstResult.isCarrierAp;
+ mCarrierApEapType = firstResult.carrierApEapType;
+ mCarrierName = firstResult.carrierName;
+
mId = sLastId.incrementAndGet();
}
+ @VisibleForTesting void loadConfig(WifiConfiguration config) {
+ ssid = (config.SSID == null ? "" : removeDoubleQuotes(config.SSID));
+ bssid = config.BSSID;
+ security = getSecurity(config);
+ updateKey();
+ networkId = config.networkId;
+ mConfig = config;
+ }
+
+ /** Updates {@link #mKey} and should only called upon object creation/initialization. */
+ private void updateKey() {
+ // TODO(sghuman): Consolidate Key logic on ScanResultMatchInfo
+
+ StringBuilder builder = new StringBuilder();
+
+ if (TextUtils.isEmpty(getSsidStr())) {
+ builder.append(getBssid());
+ } else {
+ builder.append(getSsidStr());
+ }
+
+ builder.append(',').append(getSecurity());
+ mKey = builder.toString();
+ }
+
/**
* Copy accesspoint information. NOTE: We do not copy tag information because that is never
* set on the internal copy.
- * @param that
*/
void copyFrom(AccessPoint that) {
- that.evictOldScanResults();
this.ssid = that.ssid;
this.bssid = that.bssid;
this.security = that.security;
+ this.mKey = that.mKey;
this.networkId = that.networkId;
this.pskType = that.pskType;
this.mConfig = that.mConfig; //TODO: Watch out, this object is mutated.
this.mRssi = that.mRssi;
this.mInfo = that.mInfo;
this.mNetworkInfo = that.mNetworkInfo;
- this.mScanResultCache.clear();
- this.mScanResultCache.putAll(that.mScanResultCache);
+ this.mScanResults.clear();
+ this.mScanResults.addAll(that.mScanResults);
this.mScoredNetworkCache.clear();
this.mScoredNetworkCache.putAll(that.mScoredNetworkCache);
this.mId = that.mId;
@@ -426,7 +469,7 @@
if (WifiTracker.sVerboseLogging) {
builder.append(",rssi=").append(mRssi);
- builder.append(",scan cache size=").append(mScanResultCache.size());
+ builder.append(",scan cache size=").append(mScanResults.size());
}
return builder.append(')').toString();
@@ -468,7 +511,7 @@
*/
private boolean updateScores(WifiNetworkScoreCache scoreCache, long maxScoreCacheAgeMillis) {
long nowMillis = SystemClock.elapsedRealtime();
- for (ScanResult result : mScanResultCache.values()) {
+ for (ScanResult result : mScanResults) {
ScoredNetwork score = scoreCache.getScoredNetwork(result);
if (score == null) {
continue;
@@ -555,7 +598,7 @@
mIsScoredNetworkMetered |= score.meteredHint;
}
} else {
- for (ScanResult result : mScanResultCache.values()) {
+ for (ScanResult result : mScanResults) {
ScoredNetwork score = scoreCache.getScoredNetwork(result);
if (score == null) {
continue;
@@ -566,19 +609,21 @@
return oldMetering == mIsScoredNetworkMetered;
}
- private void evictOldScanResults() {
- long nowMs = SystemClock.elapsedRealtime();
- for (Iterator<ScanResult> iter = mScanResultCache.values().iterator(); iter.hasNext(); ) {
- ScanResult result = iter.next();
- // result timestamp is in microseconds
- if (nowMs - result.timestamp / 1000 > MAX_SCAN_RESULT_AGE_MILLIS) {
- iter.remove();
- }
+ public static String getKey(ScanResult result) {
+ StringBuilder builder = new StringBuilder();
+
+ if (TextUtils.isEmpty(result.SSID)) {
+ builder.append(result.BSSID);
+ } else {
+ builder.append(result.SSID);
}
+
+ builder.append(',').append(getSecurity(result));
+ return builder.toString();
}
- public boolean matches(ScanResult result) {
- return ssid.equals(result.SSID) && security == getSecurity(result);
+ public String getKey() {
+ return mKey;
}
public boolean matches(WifiConfiguration config) {
@@ -622,9 +667,12 @@
return mRssi;
}
- public ConcurrentHashMap<String, ScanResult> getScanResults() {
- return mScanResultCache;
- }
+ /**
+ * Returns the underlying scan result set.
+ *
+ * <p>Callers should not modify this set.
+ */
+ public Set<ScanResult> getScanResults() { return mScanResults; }
public Map<String, TimestampedScoredNetwork> getScoredNetworkCache() {
return mScoredNetworkCache;
@@ -645,7 +693,7 @@
}
int rssi = UNREACHABLE_RSSI;
- for (ScanResult result : mScanResultCache.values()) {
+ for (ScanResult result : mScanResults) {
if (result.level > rssi) {
rssi = result.level;
}
@@ -853,7 +901,6 @@
}
if (WifiTracker.sVerboseLogging) {
- evictOldScanResults();
summary.append(WifiUtils.buildLoggingSummary(this, config));
}
@@ -950,28 +997,6 @@
mConfig.allowedKeyManagement.set(KeyMgmt.NONE);
}
- void loadConfig(WifiConfiguration config) {
- ssid = (config.SSID == null ? "" : removeDoubleQuotes(config.SSID));
- bssid = config.BSSID;
- security = getSecurity(config);
- networkId = config.networkId;
- mConfig = config;
- }
-
- private void initWithScanResult(ScanResult result) {
- ssid = result.SSID;
- bssid = result.BSSID;
- security = getSecurity(result);
- if (security == SECURITY_PSK)
- pskType = getPskType(result);
-
- mScanResultCache.put(result.BSSID, result);
- updateRssi();
- mIsCarrierAp = result.isCarrierAp;
- mCarrierApEapType = result.carrierApEapType;
- mCarrierName = result.carrierName;
- }
-
public void saveWifiState(Bundle savedState) {
if (ssid != null) savedState.putString(KEY_SSID, getSsidStr());
savedState.putInt(KEY_SECURITY, security);
@@ -979,9 +1004,8 @@
savedState.putInt(KEY_PSKTYPE, pskType);
if (mConfig != null) savedState.putParcelable(KEY_CONFIG, mConfig);
savedState.putParcelable(KEY_WIFIINFO, mInfo);
- evictOldScanResults();
- savedState.putParcelableArrayList(KEY_SCANRESULTCACHE,
- new ArrayList<ScanResult>(mScanResultCache.values()));
+ savedState.putParcelableArray(KEY_SCANRESULTS,
+ mScanResults.toArray(new Parcelable[mScanResults.size()]));
savedState.putParcelableArrayList(KEY_SCOREDNETWORKCACHE,
new ArrayList<>(mScoredNetworkCache.values()));
if (mNetworkInfo != null) {
@@ -1003,49 +1027,58 @@
}
/**
- * Update the AP with the given scan result.
+ * Sets {@link #mScanResults} to the given collection.
*
- * @param result the ScanResult to add to the AccessPoint scan cache
- * @param evictOldScanResults whether stale scan results should be removed
- * from the cache during this update process
- * @return true if the scan result update caused a change in state which would impact ranking
- * or AccessPoint rendering (e.g. wifi level, security)
+ * @param scanResults a collection of scan results to add to the internal set
+ * @throws IllegalArgumentException if any of the given ScanResults did not belong to this AP
*/
- boolean update(ScanResult result, boolean evictOldScanResults) {
- if (matches(result)) {
- int oldLevel = getLevel();
+ void setScanResults(Collection<ScanResult> scanResults) {
- /* Add or update the scan result for the BSSID */
- mScanResultCache.put(result.BSSID, result);
- if (evictOldScanResults) evictOldScanResults();
- updateRssi();
- int newLevel = getLevel();
-
- if (newLevel > 0 && newLevel != oldLevel) {
- // Only update labels on visible rssi changes
- updateSpeed();
- if (mAccessPointListener != null) {
- mAccessPointListener.onLevelChanged(this);
- }
+ // Validate scan results are for current AP only
+ String key = getKey();
+ for (ScanResult result : scanResults) {
+ String scanResultKey = AccessPoint.getKey(result);
+ if (!mKey.equals(scanResultKey)) {
+ throw new IllegalArgumentException(
+ String.format("ScanResult %s\nkey of %s did not match current AP key %s",
+ result, scanResultKey, key));
}
+ }
+
+
+ int oldLevel = getLevel();
+ mScanResults.clear();
+ mScanResults.addAll(scanResults);
+ updateRssi();
+ int newLevel = getLevel();
+
+ // If newLevel is 0, there will be no displayed Preference since the AP is unreachable
+ if (newLevel > 0 && newLevel != oldLevel) {
+ // Only update labels on visible rssi changes
+ updateSpeed();
+ if (mAccessPointListener != null) {
+ mAccessPointListener.onLevelChanged(this);
+ }
+ }
+
+ if (mAccessPointListener != null) {
+ mAccessPointListener.onAccessPointChanged(this);
+ }
+
+ if (!scanResults.isEmpty()) {
+ ScanResult result = scanResults.iterator().next();
+
// This flag only comes from scans, is not easily saved in config
if (security == SECURITY_PSK) {
pskType = getPskType(result);
}
- if (mAccessPointListener != null) {
- mAccessPointListener.onAccessPointChanged(this);
- }
-
// The carrier info in the ScanResult is set by the platform based on the SSID and will
// always be the same for all matching scan results.
mIsCarrierAp = result.isCarrierAp;
mCarrierApEapType = result.carrierApEapType;
mCarrierName = result.carrierName;
-
- return true;
}
- return false;
}
/** Attempt to update the AccessPoint and return true if an update occurred. */
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java
index dd55188..109eb97 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java
@@ -77,19 +77,6 @@
private int mDefaultIconResId;
private int mWifiSpeed = Speed.NONE;
- public static String generatePreferenceKey(AccessPoint accessPoint) {
- StringBuilder builder = new StringBuilder();
-
- if (TextUtils.isEmpty(accessPoint.getSsidStr())) {
- builder.append(accessPoint.getBssid());
- } else {
- builder.append(accessPoint.getSsidStr());
- }
-
- builder.append(',').append(accessPoint.getSecurity());
- return builder.toString();
- }
-
@Nullable
private static StateListDrawable getFrictionStateListDrawable(Context context) {
TypedArray frictionSld;
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/TestAccessPointBuilder.java b/packages/SettingsLib/src/com/android/settingslib/wifi/TestAccessPointBuilder.java
index 3dec1d3..2993a0d 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/TestAccessPointBuilder.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/TestAccessPointBuilder.java
@@ -23,6 +23,7 @@
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiInfo;
import android.os.Bundle;
+import android.os.Parcelable;
import android.support.annotation.Keep;
import com.android.settingslib.wifi.AccessPoint.Speed;
@@ -58,7 +59,7 @@
private String mCarrierName = null;
Context mContext;
- private ArrayList<ScanResult> mScanResultCache;
+ private ArrayList<ScanResult> mScanResults;
private ArrayList<TimestampedScoredNetwork> mScoredNetworkCache;
@Keep
@@ -84,8 +85,9 @@
if (mProviderFriendlyName != null) {
bundle.putString(AccessPoint.KEY_PROVIDER_FRIENDLY_NAME, mProviderFriendlyName);
}
- if (mScanResultCache != null) {
- bundle.putParcelableArrayList(AccessPoint.KEY_SCANRESULTCACHE, mScanResultCache);
+ if (mScanResults != null) {
+ bundle.putParcelableArray(AccessPoint.KEY_SCANRESULTS,
+ mScanResults.toArray(new Parcelable[mScanResults.size()]));
}
if (mScoredNetworkCache != null) {
bundle.putParcelableArrayList(AccessPoint.KEY_SCOREDNETWORKCACHE, mScoredNetworkCache);
@@ -229,8 +231,8 @@
return this;
}
- public TestAccessPointBuilder setScanResultCache(ArrayList<ScanResult> scanResultCache) {
- mScanResultCache = scanResultCache;
+ public TestAccessPointBuilder setScanResults(ArrayList<ScanResult> scanResults) {
+ mScanResults = scanResults;
return this;
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
index c56e1da..1ac56a9 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
@@ -39,11 +39,13 @@
import android.os.Looper;
import android.os.Message;
import android.os.Process;
+import android.os.SystemClock;
import android.provider.Settings;
import android.support.annotation.GuardedBy;
import android.support.annotation.NonNull;
import android.support.annotation.VisibleForTesting;
import android.text.format.DateUtils;
+import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Log;
import android.util.SparseArray;
@@ -78,6 +80,9 @@
*/
private static final long DEFAULT_MAX_CACHED_SCORE_AGE_MILLIS = 20 * DateUtils.MINUTE_IN_MILLIS;
+ /** Maximum age of scan results to hold onto while actively scanning. **/
+ private static final long MAX_SCAN_RESULT_AGE_MILLIS = 25000;
+
private static final String TAG = "WifiTracker";
private static final boolean DBG() {
return Log.isLoggable(TAG, Log.DEBUG);
@@ -142,6 +147,8 @@
= new AccessPointListenerAdapter();
private final HashMap<String, Integer> mSeenBssids = new HashMap<>();
+
+ // TODO(sghuman): Change this to be keyed on AccessPoint.getKey
private final HashMap<String, ScanResult> mScanResultCache = new HashMap<>();
private Integer mScanId = 0;
@@ -455,34 +462,42 @@
}
private Collection<ScanResult> updateScanResultCache(final List<ScanResult> newResults) {
- mScanId++;
+ // TODO(sghuman): Delete this and replace it with the Map of Ap Keys to ScanResults
for (ScanResult newResult : newResults) {
if (newResult.SSID == null || newResult.SSID.isEmpty()) {
continue;
}
mScanResultCache.put(newResult.BSSID, newResult);
- mSeenBssids.put(newResult.BSSID, mScanId);
}
- if (mScanId > NUM_SCANS_TO_CONFIRM_AP_LOSS) {
- if (DBG()) Log.d(TAG, "------ Dumping SSIDs that were expired on this scan ------");
- Integer threshold = mScanId - NUM_SCANS_TO_CONFIRM_AP_LOSS;
- for (Iterator<Map.Entry<String, Integer>> it = mSeenBssids.entrySet().iterator();
- it.hasNext(); /* nothing */) {
- Map.Entry<String, Integer> e = it.next();
- if (e.getValue() < threshold) {
- ScanResult result = mScanResultCache.get(e.getKey());
- if (DBG()) Log.d(TAG, "Removing " + e.getKey() + ":(" + result.SSID + ")");
- mScanResultCache.remove(e.getKey());
- it.remove();
- }
- }
- if (DBG()) Log.d(TAG, "---- Done Dumping SSIDs that were expired on this scan ----");
+ // Don't evict old results if no new scan results
+ if (!mStaleScanResults) {
+ evictOldScans();
}
+ // TODO(sghuman): Update a Map<ApKey, List<ScanResults>> variable to be reused later after
+ // double threads have been removed.
+
return mScanResultCache.values();
}
+ /**
+ * Remove old scan results from the cache.
+ *
+ * <p>Should only ever be invoked from {@link #updateScanResultCache(List)} when
+ * {@link #mStaleScanResults} is false.
+ */
+ private void evictOldScans() {
+ long nowMs = SystemClock.elapsedRealtime();
+ for (Iterator<ScanResult> iter = mScanResultCache.values().iterator(); iter.hasNext(); ) {
+ ScanResult result = iter.next();
+ // result timestamp is in microseconds
+ if (nowMs - result.timestamp / 1000 > MAX_SCAN_RESULT_AGE_MILLIS) {
+ iter.remove();
+ }
+ }
+ }
+
private WifiConfiguration getWifiConfigurationForNetworkId(
int networkId, final List<WifiConfiguration> configs) {
if (configs != null) {
@@ -541,10 +556,12 @@
/* Lookup table to more quickly update AccessPoints by only considering objects with the
* correct SSID. Maps SSID -> List of AccessPoints with the given SSID. */
- Multimap<String, AccessPoint> apMap = new Multimap<String, AccessPoint>();
+ Multimap<String, AccessPoint> existingApMap = new Multimap<String, AccessPoint>();
final Collection<ScanResult> results = updateScanResultCache(newScanResults);
+ // TODO(sghuman): This entire block only exists to populate the WifiConfiguration for
+ // APs, remove and refactor
if (configs != null) {
for (WifiConfiguration config : configs) {
if (config.selfAdded && config.numAssociation == 0) {
@@ -568,7 +585,7 @@
accessPoint.setUnreachable();
}
accessPoints.add(accessPoint);
- apMap.put(accessPoint.getSsidStr(), accessPoint);
+ existingApMap.put(accessPoint.getSsidStr(), accessPoint);
} else {
// If we aren't using saved networks, drop them into the cache so that
// we have access to their saved info.
@@ -579,6 +596,9 @@
final List<NetworkKey> scoresToRequest = new ArrayList<>();
if (results != null) {
+ // TODO(sghuman): Move this loop to updateScanResultCache and make instance variable
+ // after double handlers are removed.
+ ArrayMap<String, List<ScanResult>> scanResultsByApKey = new ArrayMap<>();
for (ScanResult result : results) {
// Ignore hidden and ad-hoc networks.
if (result.SSID == null || result.SSID.length() == 0 ||
@@ -591,27 +611,45 @@
scoresToRequest.add(key);
}
- boolean found = false;
- for (AccessPoint accessPoint : apMap.getAll(result.SSID)) {
- // We want to evict old scan results if are current results are not stale
- if (accessPoint.update(result, !mStaleScanResults)) {
- found = true;
- break;
- }
+ String apKey = AccessPoint.getKey(result);
+ List<ScanResult> resultList;
+ if (scanResultsByApKey.containsKey(apKey)) {
+ resultList = scanResultsByApKey.get(apKey);
+ } else {
+ resultList = new ArrayList<>();
+ scanResultsByApKey.put(apKey, resultList);
}
- if (!found && mIncludeScans) {
- AccessPoint accessPoint = getCachedOrCreate(result, cachedAccessPoints);
+
+ resultList.add(result);
+ }
+
+ for (Map.Entry<String, List<ScanResult>> entry : scanResultsByApKey.entrySet()) {
+ // List can not be empty as it is dynamically constructed on each iteration
+ ScanResult firstResult = entry.getValue().get(0);
+ boolean found = false;
+ for (AccessPoint accessPoint : existingApMap.getAll(firstResult.SSID)) {
+ accessPoint.setScanResults(entry.getValue());
+ found = true;
+ break;
+ }
+
+ // Only create a new AP / add to the list if it wasn't already in the saved configs
+ if (!found) {
+ AccessPoint accessPoint =
+ getCachedOrCreate(entry.getValue(), cachedAccessPoints);
if (mLastInfo != null && mLastNetworkInfo != null) {
accessPoint.update(connectionConfig, mLastInfo, mLastNetworkInfo);
}
- if (result.isPasspointNetwork()) {
+ // TODO(sghuman): Move isPasspointNetwork logic into AccessPoint.java
+ if (firstResult.isPasspointNetwork()) {
// Retrieve a WifiConfiguration for a Passpoint provider that matches
// the given ScanResult. This is used for showing that a given AP
// (ScanResult) is available via a Passpoint provider (provider friendly
// name).
try {
- WifiConfiguration config = mWifiManager.getMatchingWifiConfig(result);
+ WifiConfiguration config =
+ mWifiManager.getMatchingWifiConfig(firstResult);
if (config != null) {
accessPoint.update(config);
}
@@ -621,7 +659,6 @@
}
accessPoints.add(accessPoint);
- apMap.put(accessPoint.getSsidStr(), accessPoint);
}
}
}
@@ -662,17 +699,18 @@
}
@VisibleForTesting
- AccessPoint getCachedOrCreate(ScanResult result, List<AccessPoint> cache) {
+ AccessPoint getCachedOrCreate(
+ List<ScanResult> scanResults,
+ List<AccessPoint> cache) {
final int N = cache.size();
for (int i = 0; i < N; i++) {
- if (cache.get(i).matches(result)) {
+ if (cache.get(i).getKey().equals(AccessPoint.getKey(scanResults.get(0)))) {
AccessPoint ret = cache.remove(i);
- // evict old scan results only if we have fresh results
- ret.update(result, !mStaleScanResults);
+ ret.setScanResults(scanResults);
return ret;
}
}
- final AccessPoint accessPoint = new AccessPoint(mContext, result);
+ final AccessPoint accessPoint = new AccessPoint(mContext, scanResults);
accessPoint.setListener(mAccessPointListenerAdapter);
return accessPoint;
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java
index 932c6fd..fd48eea 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java
@@ -109,7 +109,7 @@
// TODO: sort list by RSSI or age
long nowMs = SystemClock.elapsedRealtime();
- for (ScanResult result : accessPoint.getScanResults().values()) {
+ for (ScanResult result : accessPoint.getScanResults()) {
if (result.frequency >= AccessPoint.LOWER_FREQ_5GHZ
&& result.frequency <= AccessPoint.HIGHER_FREQ_5GHZ) {
// Strictly speaking: [4915, 5825]
diff --git a/packages/SettingsLib/src/com/android/settingslib/wrapper/BluetoothA2dpWrapper.java b/packages/SettingsLib/src/com/android/settingslib/wrapper/BluetoothA2dpWrapper.java
index 4c52a9f..17e3401 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wrapper/BluetoothA2dpWrapper.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wrapper/BluetoothA2dpWrapper.java
@@ -43,8 +43,8 @@
/**
* Wraps {@code BluetoothA2dp.getCodecStatus}
*/
- public BluetoothCodecStatus getCodecStatus() {
- return mService.getCodecStatus();
+ public BluetoothCodecStatus getCodecStatus(BluetoothDevice device) {
+ return mService.getCodecStatus(device);
}
/**
diff --git a/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java b/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
index ec594a6..1440311 100644
--- a/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
+++ b/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
@@ -40,6 +40,7 @@
import android.net.wifi.hotspot2.PasspointConfiguration;
import android.net.wifi.hotspot2.pps.HomeSp;
import android.os.Bundle;
+import android.os.Parcelable;
import android.os.SystemClock;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
@@ -277,7 +278,8 @@
scanResult.BSSID = "bssid";
scanResult.timestamp = SystemClock.elapsedRealtime() * 1000;
scanResult.capabilities = "";
- assertThat(ap.update(scanResult, true /* evict old scan results */)).isTrue();
+
+ ap.setScanResults(Collections.singletonList(scanResult));
assertThat(ap.getRssi()).isEqualTo(expectedRssi);
}
@@ -477,7 +479,7 @@
result.carrierApEapType = WifiEnterpriseConfig.Eap.SIM;
result.carrierName = carrierName;
- AccessPoint ap = new AccessPoint(mContext, result);
+ AccessPoint ap = new AccessPoint(mContext, Collections.singletonList(result));
assertThat(ap.getSummary()).isEqualTo(String.format(mContext.getString(
R.string.available_via_carrier), carrierName));
assertThat(ap.isCarrierAp()).isEqualTo(true);
@@ -513,7 +515,7 @@
}
@Test
- public void testUpdateScanResultWithCarrierInfo() {
+ public void testSetScanResultWithCarrierInfo() {
String ssid = "ssid";
AccessPoint ap = new TestAccessPointBuilder(mContext).setSsid(ssid).build();
assertThat(ap.isCarrierAp()).isEqualTo(false);
@@ -529,8 +531,9 @@
scanResult.isCarrierAp = true;
scanResult.carrierApEapType = carrierApEapType;
scanResult.carrierName = carrierName;
- assertThat(ap.update(scanResult, true /* evictOldScanresults */)).isTrue();
+
+ ap.setScanResults(Collections.singletonList(scanResult));
assertThat(ap.isCarrierAp()).isEqualTo(true);
assertThat(ap.getCarrierApEapType()).isEqualTo(carrierApEapType);
assertThat(ap.getCarrierName()).isEqualTo(carrierName);
@@ -552,7 +555,9 @@
private AccessPoint createAccessPointWithScanResultCache() {
Bundle bundle = new Bundle();
- bundle.putParcelableArrayList(AccessPoint.KEY_SCANRESULTCACHE, SCAN_RESULTS);
+ bundle.putParcelableArray(
+ AccessPoint.KEY_SCANRESULTS,
+ SCAN_RESULTS.toArray(new Parcelable[SCAN_RESULTS.size()]));
return new AccessPoint(mContext, bundle);
}
@@ -903,7 +908,7 @@
.setActive(true)
.setNetworkId(networkId)
.setSsid(TEST_SSID)
- .setScanResultCache(scanResults)
+ .setScanResults(scanResults)
.setWifiInfo(info)
.build();
@@ -990,7 +995,7 @@
.setActive(true)
.setScoredNetworkCache(
new ArrayList(Arrays.asList(recentScore)))
- .setScanResultCache(SCAN_RESULTS)
+ .setScanResults(SCAN_RESULTS)
.build();
when(mockWifiNetworkScoreCache.getScoredNetwork(any(ScanResult.class)))
@@ -1018,7 +1023,7 @@
.setActive(true)
.setScoredNetworkCache(
new ArrayList(Arrays.asList(recentScore)))
- .setScanResultCache(SCAN_RESULTS)
+ .setScanResults(SCAN_RESULTS)
.build();
int newSpeed = Speed.MODERATE;
diff --git a/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java b/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
index 6615b8c..b36dda9 100644
--- a/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
+++ b/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
@@ -29,6 +29,7 @@
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
@@ -57,9 +58,9 @@
import android.os.SystemClock;
import android.provider.Settings;
import android.support.test.InstrumentationRegistry;
+import android.support.test.filters.FlakyTest;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
-import android.support.test.filters.FlakyTest;
import org.junit.After;
import org.junit.Before;
@@ -76,7 +77,9 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
+import java.util.Collections;
import java.util.List;
+import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -399,7 +402,8 @@
WifiTracker tracker = new WifiTracker(
InstrumentationRegistry.getTargetContext(), null, true, true);
- AccessPoint result = tracker.getCachedOrCreate(scanResult, new ArrayList<AccessPoint>());
+ AccessPoint result = tracker.getCachedOrCreate(
+ Collections.singletonList(scanResult), new ArrayList<AccessPoint>());
assertTrue(result.mAccessPointListener != null);
}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java
index 327c1c8..5459fb7 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java
@@ -84,23 +84,31 @@
mContext,
Secure.LOCATION_MODE_OFF,
Secure.LOCATION_MODE_HIGH_ACCURACY,
- currentUserId);
+ currentUserId,
+ Settings.Secure.LOCATION_CHANGER_QUICK_SETTINGS);
verify(mContext).sendBroadcastAsUser(
argThat(actionMatches(LocationManager.MODE_CHANGING_ACTION)),
ArgumentMatchers.eq(UserHandle.of(currentUserId)),
ArgumentMatchers.eq(WRITE_SECURE_SETTINGS));
+ assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.LOCATION_CHANGER, Settings.Secure.LOCATION_CHANGER_UNKNOWN))
+ .isEqualTo(Settings.Secure.LOCATION_CHANGER_QUICK_SETTINGS);
}
@Test
public void testUpdateLocationEnabled_sendBroadcast() {
int currentUserId = ActivityManager.getCurrentUser();
- Utils.updateLocationEnabled(mContext, true, currentUserId);
+ Utils.updateLocationEnabled(mContext, true, currentUserId,
+ Settings.Secure.LOCATION_CHANGER_QUICK_SETTINGS);
verify(mContext).sendBroadcastAsUser(
argThat(actionMatches(LocationManager.MODE_CHANGING_ACTION)),
ArgumentMatchers.eq(UserHandle.of(currentUserId)),
ArgumentMatchers.eq(WRITE_SECURE_SETTINGS));
+ assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.LOCATION_CHANGER, Settings.Secure.LOCATION_CHANGER_UNKNOWN))
+ .isEqualTo(Settings.Secure.LOCATION_CHANGER_QUICK_SETTINGS);
}
@Test
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 ece0d51..590bc90 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
@@ -123,7 +123,7 @@
when(mBluetoothA2dp.getConnectionState(any())).thenReturn(
BluetoothProfile.STATE_CONNECTED);
BluetoothCodecStatus status = mock(BluetoothCodecStatus.class);
- when(mBluetoothA2dpWrapper.getCodecStatus()).thenReturn(status);
+ when(mBluetoothA2dpWrapper.getCodecStatus(mDevice)).thenReturn(status);
BluetoothCodecConfig config = mock(BluetoothCodecConfig.class);
when(status.getCodecConfig()).thenReturn(config);
when(config.isMandatoryCodec()).thenReturn(false);
@@ -186,7 +186,7 @@
BluetoothCodecStatus status = mock(BluetoothCodecStatus.class);
BluetoothCodecConfig config = mock(BluetoothCodecConfig.class);
BluetoothCodecConfig[] configs = {config};
- when(mBluetoothA2dpWrapper.getCodecStatus()).thenReturn(status);
+ when(mBluetoothA2dpWrapper.getCodecStatus(mDevice)).thenReturn(status);
when(status.getCodecsSelectableCapabilities()).thenReturn(configs);
when(config.isMandatoryCodec()).thenReturn(true);
@@ -201,7 +201,7 @@
BluetoothCodecStatus status = mock(BluetoothCodecStatus.class);
BluetoothCodecConfig config = mock(BluetoothCodecConfig.class);
BluetoothCodecConfig[] configs = {config};
- when(mBluetoothA2dpWrapper.getCodecStatus()).thenReturn(status);
+ when(mBluetoothA2dpWrapper.getCodecStatus(mDevice)).thenReturn(status);
when(status.getCodecsSelectableCapabilities()).thenReturn(configs);
when(config.isMandatoryCodec()).thenReturn(false);
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/instrumentation/MetricsFeatureProviderTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/instrumentation/MetricsFeatureProviderTest.java
new file mode 100644
index 0000000..8bea51d
--- /dev/null
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/instrumentation/MetricsFeatureProviderTest.java
@@ -0,0 +1,132 @@
+/*
+ * 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.
+ */
+package com.android.settingslib.core.instrumentation;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
+import static org.mockito.Mockito.when;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.util.Pair;
+
+import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+import com.android.settingslib.TestConfig;
+import com.android.settingslib.SettingsLibRobolectricTestRunner;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+import org.robolectric.util.ReflectionHelpers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@RunWith(SettingsLibRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class MetricsFeatureProviderTest {
+ private static int CATEGORY = 10;
+ private static boolean SUBTYPE_BOOLEAN = true;
+ private static int SUBTYPE_INTEGER = 1;
+ private static long ELAPSED_TIME = 1000;
+
+ @Mock private LogWriter mockLogWriter;
+ @Mock private VisibilityLoggerMixin mockVisibilityLogger;
+
+ private Context mContext;
+ private MetricsFeatureProvider mProvider;
+
+ @Captor
+ private ArgumentCaptor<Pair> mPairCaptor;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ mContext = RuntimeEnvironment.application;
+ mProvider = new MetricsFeatureProvider();
+ List<LogWriter> writers = new ArrayList<>();
+ writers.add(mockLogWriter);
+ ReflectionHelpers.setField(mProvider, "mLoggerWriters", writers);
+
+ when(mockVisibilityLogger.elapsedTimeSinceVisible()).thenReturn(ELAPSED_TIME);
+ }
+
+ @Test
+ public void logDashboardStartIntent_intentEmpty_shouldNotLog() {
+ mProvider.logDashboardStartIntent(mContext, null /* intent */,
+ MetricsEvent.SETTINGS_GESTURES);
+
+ verifyNoMoreInteractions(mockLogWriter);
+ }
+
+ @Test
+ public void logDashboardStartIntent_intentHasNoComponent_shouldLog() {
+ final Intent intent = new Intent(Intent.ACTION_ASSIST);
+
+ mProvider.logDashboardStartIntent(mContext, intent, MetricsEvent.SETTINGS_GESTURES);
+
+ verify(mockLogWriter).action(
+ eq(mContext),
+ eq(MetricsEvent.ACTION_SETTINGS_TILE_CLICK),
+ anyString(),
+ eq(Pair.create(MetricsEvent.FIELD_CONTEXT, MetricsEvent.SETTINGS_GESTURES)));
+ }
+
+ @Test
+ public void logDashboardStartIntent_intentIsExternal_shouldLog() {
+ final Intent intent = new Intent().setComponent(new ComponentName("pkg", "cls"));
+
+ mProvider.logDashboardStartIntent(mContext, intent, MetricsEvent.SETTINGS_GESTURES);
+
+ verify(mockLogWriter).action(
+ eq(mContext),
+ eq(MetricsEvent.ACTION_SETTINGS_TILE_CLICK),
+ anyString(),
+ eq(Pair.create(MetricsEvent.FIELD_CONTEXT, MetricsEvent.SETTINGS_GESTURES)));
+ }
+
+ @Test
+ public void action_BooleanLogsElapsedTime() {
+ mProvider.action(mockVisibilityLogger, CATEGORY, SUBTYPE_BOOLEAN);
+ verify(mockLogWriter).action(eq(CATEGORY), eq(SUBTYPE_BOOLEAN), mPairCaptor.capture());
+
+ Pair value = mPairCaptor.getValue();
+ assertThat(value.first instanceof Integer).isTrue();
+ assertThat((int) value.first).isEqualTo(MetricsEvent.NOTIFICATION_SINCE_VISIBLE_MILLIS);
+ assertThat(value.second).isEqualTo(ELAPSED_TIME);
+ }
+
+ @Test
+ public void action_IntegerLogsElapsedTime() {
+ mProvider.action(mockVisibilityLogger, CATEGORY, SUBTYPE_INTEGER);
+ verify(mockLogWriter).action(eq(CATEGORY), eq(SUBTYPE_INTEGER), mPairCaptor.capture());
+
+ Pair value = mPairCaptor.getValue();
+ assertThat(value.first instanceof Integer).isTrue();
+ assertThat((int) value.first).isEqualTo(MetricsEvent.NOTIFICATION_SINCE_VISIBLE_MILLIS);
+ assertThat(value.second).isEqualTo(ELAPSED_TIME);
+ }
+}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/instrumentation/SharedPreferenceLoggerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/instrumentation/SharedPreferenceLoggerTest.java
new file mode 100644
index 0000000..d558a64
--- /dev/null
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/instrumentation/SharedPreferenceLoggerTest.java
@@ -0,0 +1,181 @@
+/*
+ * 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.
+ */
+package com.android.settingslib.core.instrumentation;
+
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.ACTION_SETTINGS_PREFERENCE_CHANGE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_SETTINGS_PREFERENCE_CHANGE_FLOAT_VALUE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_SETTINGS_PREFERENCE_CHANGE_INT_VALUE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_SETTINGS_PREFERENCE_CHANGE_NAME;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.argThat;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.util.Pair;
+
+import com.android.settingslib.TestConfig;
+import com.android.settingslib.SettingsLibRobolectricTestRunner;
+
+import com.google.common.truth.Platform;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Answers;
+import org.mockito.ArgumentMatcher;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.annotation.Config;
+
+@RunWith(SettingsLibRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class SharedPreferenceLoggerTest {
+
+ private static final String TEST_TAG = "tag";
+ private static final String TEST_KEY = "key";
+
+ @Mock(answer = Answers.RETURNS_DEEP_STUBS)
+ private Context mContext;
+
+ private ArgumentMatcher<Pair<Integer, Object>> mNamePairMatcher;
+ @Mock
+ private MetricsFeatureProvider mMetricsFeature;
+ private SharedPreferencesLogger mSharedPrefLogger;
+
+ @Before
+ public void init() {
+ MockitoAnnotations.initMocks(this);
+ mSharedPrefLogger = new SharedPreferencesLogger(mContext, TEST_TAG, mMetricsFeature);
+ mNamePairMatcher = pairMatches(FIELD_SETTINGS_PREFERENCE_CHANGE_NAME, String.class);
+ }
+
+ @Test
+ public void putInt_shouldNotLogInitialPut() {
+ final SharedPreferences.Editor editor = mSharedPrefLogger.edit();
+ editor.putInt(TEST_KEY, 1);
+ editor.putInt(TEST_KEY, 1);
+ editor.putInt(TEST_KEY, 1);
+ editor.putInt(TEST_KEY, 2);
+ editor.putInt(TEST_KEY, 2);
+ editor.putInt(TEST_KEY, 2);
+ editor.putInt(TEST_KEY, 2);
+
+ verify(mMetricsFeature, times(6)).action(any(Context.class), anyInt(),
+ argThat(mNamePairMatcher),
+ argThat(pairMatches(FIELD_SETTINGS_PREFERENCE_CHANGE_INT_VALUE, Integer.class)));
+ }
+
+ @Test
+ public void putBoolean_shouldNotLogInitialPut() {
+ final SharedPreferences.Editor editor = mSharedPrefLogger.edit();
+ editor.putBoolean(TEST_KEY, true);
+ editor.putBoolean(TEST_KEY, true);
+ editor.putBoolean(TEST_KEY, false);
+ editor.putBoolean(TEST_KEY, false);
+ editor.putBoolean(TEST_KEY, false);
+
+
+ verify(mMetricsFeature).action(any(Context.class), anyInt(),
+ argThat(mNamePairMatcher),
+ argThat(pairMatches(FIELD_SETTINGS_PREFERENCE_CHANGE_INT_VALUE, true)));
+ verify(mMetricsFeature, times(3)).action(any(Context.class), anyInt(),
+ argThat(mNamePairMatcher),
+ argThat(pairMatches(FIELD_SETTINGS_PREFERENCE_CHANGE_INT_VALUE, false)));
+ }
+
+ @Test
+ public void putLong_shouldNotLogInitialPut() {
+ final SharedPreferences.Editor editor = mSharedPrefLogger.edit();
+ editor.putLong(TEST_KEY, 1);
+ editor.putLong(TEST_KEY, 1);
+ editor.putLong(TEST_KEY, 1);
+ editor.putLong(TEST_KEY, 1);
+ editor.putLong(TEST_KEY, 2);
+
+ verify(mMetricsFeature, times(4)).action(any(Context.class), anyInt(),
+ argThat(mNamePairMatcher),
+ argThat(pairMatches(FIELD_SETTINGS_PREFERENCE_CHANGE_INT_VALUE, Integer.class)));
+ }
+
+ @Test
+ public void putLong_biggerThanIntMax_shouldLogIntMax() {
+ final SharedPreferences.Editor editor = mSharedPrefLogger.edit();
+ final long veryBigNumber = 500L + Integer.MAX_VALUE;
+ editor.putLong(TEST_KEY, 1);
+ editor.putLong(TEST_KEY, veryBigNumber);
+
+ verify(mMetricsFeature).action(any(Context.class), anyInt(),
+ argThat(mNamePairMatcher),
+ argThat(pairMatches(
+ FIELD_SETTINGS_PREFERENCE_CHANGE_INT_VALUE, Integer.MAX_VALUE)));
+ }
+
+ @Test
+ public void putLong_smallerThanIntMin_shouldLogIntMin() {
+ final SharedPreferences.Editor editor = mSharedPrefLogger.edit();
+ final long veryNegativeNumber = -500L + Integer.MIN_VALUE;
+ editor.putLong(TEST_KEY, 1);
+ editor.putLong(TEST_KEY, veryNegativeNumber);
+
+ verify(mMetricsFeature).action(any(Context.class), anyInt(),
+ argThat(mNamePairMatcher),
+ argThat(pairMatches(
+ FIELD_SETTINGS_PREFERENCE_CHANGE_INT_VALUE, Integer.MIN_VALUE)));
+ }
+
+ @Test
+ public void putFloat_shouldNotLogInitialPut() {
+ final SharedPreferences.Editor editor = mSharedPrefLogger.edit();
+ editor.putFloat(TEST_KEY, 1);
+ editor.putFloat(TEST_KEY, 1);
+ editor.putFloat(TEST_KEY, 1);
+ editor.putFloat(TEST_KEY, 1);
+ editor.putFloat(TEST_KEY, 2);
+
+ verify(mMetricsFeature, times(4)).action(any(Context.class), anyInt(),
+ argThat(mNamePairMatcher),
+ argThat(pairMatches(FIELD_SETTINGS_PREFERENCE_CHANGE_FLOAT_VALUE, Float.class)));
+ }
+
+ @Test
+ public void logPackage_shouldUseLogPackageApi() {
+ mSharedPrefLogger.logPackageName("key", "com.android.settings");
+ verify(mMetricsFeature).action(any(Context.class),
+ eq(ACTION_SETTINGS_PREFERENCE_CHANGE),
+ eq("com.android.settings"),
+ any(Pair.class));
+ }
+
+ private ArgumentMatcher<Pair<Integer, Object>> pairMatches(int tag, Class clazz) {
+ return pair -> pair.first == tag && Platform.isInstanceOfType(pair.second, clazz);
+ }
+
+ private ArgumentMatcher<Pair<Integer, Object>> pairMatches(int tag, boolean bool) {
+ return pair -> pair.first == tag
+ && Platform.isInstanceOfType(pair.second, Integer.class)
+ && pair.second.equals((bool ? 1 : 0));
+ }
+
+ private ArgumentMatcher<Pair<Integer, Object>> pairMatches(int tag, int val) {
+ return pair -> pair.first == tag
+ && Platform.isInstanceOfType(pair.second, Integer.class)
+ && pair.second.equals(val);
+ }
+}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/instrumentation/VisibilityLoggerMixinTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/instrumentation/VisibilityLoggerMixinTest.java
new file mode 100644
index 0000000..a264886
--- /dev/null
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/instrumentation/VisibilityLoggerMixinTest.java
@@ -0,0 +1,122 @@
+/*
+ * 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.
+ */
+package com.android.settingslib.core.instrumentation;
+
+import static com.android.settingslib.core.instrumentation.Instrumentable.METRICS_CATEGORY_UNKNOWN;
+
+import static org.mockito.ArgumentMatchers.nullable;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.eq;
+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.Activity;
+import android.content.Context;
+import android.content.Intent;
+
+import com.android.internal.logging.nano.MetricsProto;
+import com.android.settingslib.SettingsLibRobolectricTestRunner;
+import com.android.settingslib.TestConfig;
+
+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;
+
+
+@RunWith(SettingsLibRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
+public class VisibilityLoggerMixinTest {
+
+ @Mock
+ private MetricsFeatureProvider mMetricsFeature;
+
+ private VisibilityLoggerMixin mMixin;
+
+ @Before
+ public void init() {
+ MockitoAnnotations.initMocks(this);
+ mMixin = new VisibilityLoggerMixin(TestInstrumentable.TEST_METRIC, mMetricsFeature);
+ }
+
+ @Test
+ public void shouldLogVisibleOnResume() {
+ mMixin.onResume();
+
+ verify(mMetricsFeature, times(1))
+ .visible(nullable(Context.class), eq(MetricsProto.MetricsEvent.VIEW_UNKNOWN),
+ eq(TestInstrumentable.TEST_METRIC));
+ }
+
+ @Test
+ public void shouldLogVisibleWithSource() {
+ final Intent sourceIntent = new Intent()
+ .putExtra(VisibilityLoggerMixin.EXTRA_SOURCE_METRICS_CATEGORY,
+ MetricsProto.MetricsEvent.SETTINGS_GESTURES);
+ final Activity activity = mock(Activity.class);
+ when(activity.getIntent()).thenReturn(sourceIntent);
+ mMixin.setSourceMetricsCategory(activity);
+ mMixin.onResume();
+
+ verify(mMetricsFeature, times(1))
+ .visible(nullable(Context.class), eq(MetricsProto.MetricsEvent.SETTINGS_GESTURES),
+ eq(TestInstrumentable.TEST_METRIC));
+ }
+
+ @Test
+ public void shouldLogHideOnPause() {
+ mMixin.onPause();
+
+ verify(mMetricsFeature, times(1))
+ .hidden(nullable(Context.class), eq(TestInstrumentable.TEST_METRIC));
+ }
+
+ @Test
+ public void shouldNotLogIfMetricsFeatureIsNull() {
+ mMixin = new VisibilityLoggerMixin(TestInstrumentable.TEST_METRIC, null);
+ mMixin.onResume();
+ mMixin.onPause();
+
+ verify(mMetricsFeature, never())
+ .hidden(nullable(Context.class), anyInt());
+ }
+
+ @Test
+ public void shouldNotLogIfMetricsCategoryIsUnknown() {
+ mMixin = new VisibilityLoggerMixin(METRICS_CATEGORY_UNKNOWN, mMetricsFeature);
+
+ mMixin.onResume();
+ mMixin.onPause();
+
+ verify(mMetricsFeature, never())
+ .hidden(nullable(Context.class), anyInt());
+ }
+
+ private final class TestInstrumentable implements Instrumentable {
+
+ public static final int TEST_METRIC = 12345;
+
+ @Override
+ public int getMetricsCategory() {
+ return TEST_METRIC;
+ }
+ }
+}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/suggestions/ShadowSuggestionController.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/suggestions/ShadowSuggestionController.java
new file mode 100644
index 0000000..61bc83b
--- /dev/null
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/suggestions/ShadowSuggestionController.java
@@ -0,0 +1,61 @@
+/*
+ * 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.settingslib.suggestions;
+
+import android.service.settings.suggestions.Suggestion;
+
+import org.robolectric.annotation.Implementation;
+import org.robolectric.annotation.Implements;
+
+import java.util.List;
+
+@Implements(SuggestionController.class)
+public class ShadowSuggestionController {
+
+ public static boolean sStartCalled;
+ public static boolean sStopCalled;
+ public static boolean sGetSuggestionCalled;
+
+ public static List<Suggestion> sSuggestions;
+
+ public static void reset() {
+ sStartCalled = false;
+ sStopCalled = false;
+ sGetSuggestionCalled = false;
+ sSuggestions = null;
+ }
+
+ @Implementation
+ public void start() {
+ sStartCalled = true;
+ }
+
+ @Implementation
+ public void stop() {
+ sStopCalled = true;
+ }
+
+ public static void setSuggestion(List<Suggestion> suggestions) {
+ sSuggestions = suggestions;
+ }
+
+ @Implementation
+ public List<Suggestion> getSuggestions() {
+ sGetSuggestionCalled = true;
+ return sSuggestions;
+ }
+}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/suggestions/SuggestionControllerMixinTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/suggestions/SuggestionControllerMixinTest.java
new file mode 100644
index 0000000..ed1c405
--- /dev/null
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/suggestions/SuggestionControllerMixinTest.java
@@ -0,0 +1,132 @@
+/*
+ * 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.settingslib.suggestions;
+
+import static android.arch.lifecycle.Lifecycle.Event.ON_START;
+import static android.arch.lifecycle.Lifecycle.Event.ON_STOP;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.app.LoaderManager;
+import android.arch.lifecycle.LifecycleOwner;
+import android.content.ComponentName;
+import android.content.Context;
+
+import com.android.settingslib.TestConfig;
+import com.android.settingslib.SettingsLibRobolectricTestRunner;
+import com.android.settingslib.core.lifecycle.Lifecycle;
+
+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.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+
+@RunWith(SettingsLibRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION,
+ shadows = {
+ ShadowSuggestionController.class
+ })
+public class SuggestionControllerMixinTest {
+
+ @Mock
+ private SuggestionControllerMixin.SuggestionControllerHost mHost;
+
+ private Context mContext;
+ private LifecycleOwner mLifecycleOwner;
+ private Lifecycle mLifecycle;
+ private SuggestionControllerMixin mMixin;
+ private ComponentName mComponentName;
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ mContext = RuntimeEnvironment.application;
+ mLifecycleOwner = () -> mLifecycle;
+ mLifecycle = new Lifecycle(mLifecycleOwner);
+ mComponentName = new ComponentName(
+ "com.android.settings.intelligence",
+ "com.android.settings.intelligence.suggestions.SuggestionService");
+ }
+
+ @After
+ public void tearDown() {
+ ShadowSuggestionController.reset();
+ }
+
+ @Test
+ public void goThroughLifecycle_onStartStop_shouldStartStopController() {
+ mMixin = new SuggestionControllerMixin(mContext, mHost, mLifecycle, mComponentName);
+
+ mLifecycle.handleLifecycleEvent(ON_START);
+ assertThat(ShadowSuggestionController.sStartCalled).isTrue();
+
+ mLifecycle.handleLifecycleEvent(ON_STOP);
+ assertThat(ShadowSuggestionController.sStopCalled).isTrue();
+ }
+
+ @Test
+ public void onServiceConnected_shouldGetSuggestion() {
+ final LoaderManager loaderManager = mock(LoaderManager.class);
+ when(mHost.getLoaderManager()).thenReturn(loaderManager);
+
+ mMixin = new SuggestionControllerMixin(mContext, mHost, mLifecycle, mComponentName);
+ mMixin.onServiceConnected();
+
+ verify(loaderManager).restartLoader(SuggestionLoader.LOADER_ID_SUGGESTIONS,
+ null /* args */, mMixin /* callback */);
+ }
+
+ @Test
+ public void onServiceConnected_hostNotAttached_shouldDoNothing() {
+ when(mHost.getLoaderManager()).thenReturn(null);
+
+ mMixin = new SuggestionControllerMixin(mContext, mHost, mLifecycle, mComponentName);
+ mMixin.onServiceConnected();
+
+ verify(mHost).getLoaderManager();
+ }
+
+ @Test
+ public void onServiceDisconnected_hostNotAttached_shouldDoNothing() {
+ when(mHost.getLoaderManager()).thenReturn(null);
+
+ mMixin = new SuggestionControllerMixin(mContext, mHost, mLifecycle, mComponentName);
+ mMixin.onServiceDisconnected();
+
+ verify(mHost).getLoaderManager();
+ }
+
+ @Test
+ public void doneLoadingg_shouldSetSuggestionLoaded() {
+ mMixin = new SuggestionControllerMixin(mContext, mHost, mLifecycle, mComponentName);
+
+ mMixin.onLoadFinished(mock(SuggestionLoader.class), null);
+
+ assertThat(mMixin.isSuggestionLoaded()).isTrue();
+
+ mMixin.onLoaderReset(mock(SuggestionLoader.class));
+
+ assertThat(mMixin.isSuggestionLoaded()).isFalse();
+ }
+}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/AccessPointPreferenceTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/AccessPointPreferenceTest.java
index a4c821f..3fee16b 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/AccessPointPreferenceTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/AccessPointPreferenceTest.java
@@ -61,34 +61,6 @@
}
@Test
- public void generatePreferenceKey_returnsSsidPlusSecurity() {
- String ssid = "ssid";
- String bssid = "00:00:00:00:00:00";
- int security = AccessPoint.SECURITY_WEP;
- String expectedKey = ssid + ',' + security;
-
- TestAccessPointBuilder builder = new TestAccessPointBuilder(mContext);
- builder.setBssid(bssid).setSsid(ssid).setSecurity(security);
-
- assertThat(AccessPointPreference.generatePreferenceKey(builder.build()))
- .isEqualTo(expectedKey);
- }
-
- @Test
- public void generatePreferenceKey_emptySsidReturnsBssidPlusSecurity() {
- String ssid = "";
- String bssid = "00:00:00:00:00:00";
- int security = AccessPoint.SECURITY_WEP;
- String expectedKey = bssid + ',' + security;
-
- TestAccessPointBuilder builder = new TestAccessPointBuilder(mContext);
- builder.setBssid(bssid).setSsid(ssid).setSecurity(security);
-
- assertThat(AccessPointPreference.generatePreferenceKey(builder.build()))
- .isEqualTo(expectedKey);
- }
-
- @Test
public void refresh_openNetwork_updateContentDescription() {
final String ssid = "ssid";
final String summary = "connected";
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/WifiUtilsTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/WifiUtilsTest.java
index c5795d3..9310b73 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/WifiUtilsTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/WifiUtilsTest.java
@@ -29,6 +29,7 @@
import android.net.wifi.ScanResult;
import android.net.wifi.WifiNetworkScoreCache;
import android.os.Bundle;
+import android.os.Parcelable;
import android.os.SystemClock;
import android.text.format.DateUtils;
@@ -72,7 +73,8 @@
Bundle bundle = new Bundle();
ArrayList<ScanResult> scanResults = buildScanResultCache();
- bundle.putParcelableArrayList(AccessPoint.KEY_SCANRESULTCACHE, scanResults);
+ bundle.putParcelableArray(AccessPoint.KEY_SCANRESULTS,
+ scanResults.toArray(new Parcelable[scanResults.size()]));
AccessPoint ap = new AccessPoint(mContext, bundle);
when(mockWifiNetworkScoreCache.getScoredNetwork(any(ScanResult.class)))
diff --git a/packages/SettingsProvider/AndroidManifest.xml b/packages/SettingsProvider/AndroidManifest.xml
index fd4d296..9bc2d75 100644
--- a/packages/SettingsProvider/AndroidManifest.xml
+++ b/packages/SettingsProvider/AndroidManifest.xml
@@ -12,8 +12,6 @@
android:icon="@mipmap/ic_launcher_settings"
android:defaultToDeviceProtectedStorage="true"
android:directBootAware="true">
- <uses-library android:name="android.test.runner" />
-
<provider android:name="SettingsProvider"
android:authorities="settings"
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
index c7ba4d6..dd89df1 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
@@ -35,6 +35,7 @@
import android.os.ParcelFileDescriptor;
import android.os.UserHandle;
import android.provider.Settings;
+import android.provider.SettingsValidators.Validator;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.BackupUtils;
@@ -155,6 +156,9 @@
new ArraySet<String>(Arrays.asList(new String[] {
KEY_NETWORK_POLICIES,
KEY_WIFI_NEW_CONFIG,
+ KEY_SYSTEM,
+ KEY_SECURE,
+ KEY_GLOBAL,
}));
private SettingsHelper mSettingsHelper;
@@ -223,6 +227,15 @@
Log.d(TAG, "onRestore(): appVersionCode: " + appVersionCode
+ "; Build.VERSION.SDK_INT: " + Build.VERSION.SDK_INT);
}
+
+ boolean overrideRestoreAnyVersion = Settings.Global.getInt(getContentResolver(),
+ Settings.Global.OVERRIDE_SETTINGS_PROVIDER_RESTORE_ANY_VERSION, 0) == 1;
+ if ((appVersionCode > Build.VERSION.SDK_INT) && overrideRestoreAnyVersion) {
+ Log.w(TAG, "Ignoring restore from API" + appVersionCode + " to API"
+ + Build.VERSION.SDK_INT + " due to settings flag override.");
+ return;
+ }
+
// versionCode of com.android.providers.settings corresponds to SDK_INT
mRestoredFromSdkInt = appVersionCode;
@@ -571,15 +584,19 @@
// Figure out the white list and redirects to the global table. We restore anything
// in either the backup whitelist or the legacy-restore whitelist for this table.
final String[] whitelist;
+ Map<String, Validator> validators = null;
if (contentUri.equals(Settings.Secure.CONTENT_URI)) {
whitelist = concat(Settings.Secure.SETTINGS_TO_BACKUP,
Settings.Secure.LEGACY_RESTORE_SETTINGS);
+ validators = Settings.Secure.VALIDATORS;
} else if (contentUri.equals(Settings.System.CONTENT_URI)) {
whitelist = concat(Settings.System.SETTINGS_TO_BACKUP,
Settings.System.LEGACY_RESTORE_SETTINGS);
+ validators = Settings.System.VALIDATORS;
} else if (contentUri.equals(Settings.Global.CONTENT_URI)) {
whitelist = concat(Settings.Global.SETTINGS_TO_BACKUP,
Settings.Global.LEGACY_RESTORE_SETTINGS);
+ validators = Settings.Global.VALIDATORS;
} else {
throw new IllegalArgumentException("Unknown URI: " + contentUri);
}
@@ -627,6 +644,13 @@
continue;
}
+ // only restore the settings that have valid values
+ if (!isValidSettingValue(key, value, validators)) {
+ Log.w(TAG, "Attempted restore of " + key + " setting, but its value didn't pass"
+ + " validation, value: " + value);
+ continue;
+ }
+
final Uri destination = (movedToGlobal != null && movedToGlobal.contains(key))
? Settings.Global.CONTENT_URI
: contentUri;
@@ -639,6 +663,15 @@
}
}
+ private boolean isValidSettingValue(String key, String value,
+ Map<String, Validator> validators) {
+ if (key == null || validators == null) {
+ return false;
+ }
+ Validator validator = validators.get(key);
+ return (validator != null) && validator.validate(value);
+ }
+
private final String[] concat(String[] first, @Nullable String[] second) {
if (second == null || second.length == 0) {
return first;
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
index cfd33a1..91957e1 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
@@ -30,6 +30,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
+import android.hardware.display.DisplayManager;
import android.icu.util.ULocale;
import android.location.LocationManager;
import android.media.AudioManager;
@@ -306,15 +307,7 @@
}
private void setBrightness(int brightness) {
- try {
- IPowerManager power = IPowerManager.Stub.asInterface(
- ServiceManager.getService("power"));
- if (power != null) {
- power.setTemporaryScreenBrightnessSettingOverride(brightness);
- }
- } catch (RemoteException doe) {
-
- }
+ mContext.getSystemService(DisplayManager.class).setTemporaryBrightness(brightness);
}
/* package */ byte[] getLocaleData() {
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
index 55f7a0a..b286f89 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.os.UserHandle;
import android.provider.Settings;
+import android.provider.Settings.Global;
import android.providers.settings.GlobalSettingsProto;
import android.providers.settings.SecureSettingsProto;
import android.providers.settings.SettingProto;
@@ -102,21 +103,6 @@
Settings.Global.THEATER_MODE_ON,
GlobalSettingsProto.THEATER_MODE_ON);
dumpSetting(s, p,
- Settings.Global.RADIO_BLUETOOTH,
- GlobalSettingsProto.RADIO_BLUETOOTH);
- dumpSetting(s, p,
- Settings.Global.RADIO_WIFI,
- GlobalSettingsProto.RADIO_WIFI);
- dumpSetting(s, p,
- Settings.Global.RADIO_WIMAX,
- GlobalSettingsProto.RADIO_WIMAX);
- dumpSetting(s, p,
- Settings.Global.RADIO_CELL,
- GlobalSettingsProto.RADIO_CELL);
- dumpSetting(s, p,
- Settings.Global.RADIO_NFC,
- GlobalSettingsProto.RADIO_NFC);
- dumpSetting(s, p,
Settings.Global.AIRPLANE_MODE_RADIOS,
GlobalSettingsProto.AIRPLANE_MODE_RADIOS);
dumpSetting(s, p,
@@ -591,6 +577,9 @@
Settings.Global.WIFI_VERBOSE_LOGGING_ENABLED,
GlobalSettingsProto.WIFI_VERBOSE_LOGGING_ENABLED);
dumpSetting(s, p,
+ Settings.Global.WIFI_CONNECTED_MAC_RANDOMIZATION_ENABLED,
+ GlobalSettingsProto.WIFI_CONNECTED_MAC_RANDOMIZATION_ENABLED);
+ dumpSetting(s, p,
Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT,
GlobalSettingsProto.WIFI_MAX_DHCP_RETRY_COUNT);
dumpSetting(s, p,
@@ -1066,6 +1055,9 @@
Settings.Global.STORAGE_SETTINGS_CLOBBER_THRESHOLD,
GlobalSettingsProto.STORAGE_SETTINGS_CLOBBER_THRESHOLD);
dumpSetting(s, p,
+ Global.CHAINED_BATTERY_ATTRIBUTION_ENABLED,
+ GlobalSettingsProto.CHAINED_BATTERY_ATTRIBUTION_ENABLED);
+ dumpSetting(s, p,
Settings.Global.MULTI_SIM_VOICE_CALL_SUBSCRIPTION,
GlobalSettingsProto.MULTI_SIM_VOICE_CALL_SUBSCRIPTION);
dumpSetting(s, p,
@@ -1120,8 +1112,8 @@
Settings.Global.NOTIFICATION_SNOOZE_OPTIONS,
GlobalSettingsProto.NOTIFICATION_SNOOZE_OPTIONS);
dumpSetting(s, p,
- Settings.Global.ZRAM_ENABLED,
- GlobalSettingsProto.ZRAM_ENABLED);
+ Settings.Global.ZRAM_ENABLED,
+ GlobalSettingsProto.ZRAM_ENABLED);
dumpSetting(s, p,
Settings.Global.ENABLE_SMART_REPLIES_IN_NOTIFICATIONS,
GlobalSettingsProto.ENABLE_SMART_REPLIES_IN_NOTIFICATIONS);
@@ -1129,8 +1121,13 @@
Settings.Global.SHOW_FIRST_CRASH_DIALOG,
GlobalSettingsProto.SHOW_FIRST_CRASH_DIALOG);
dumpSetting(s, p,
- Settings.Global.WIFI_CONNECTED_MAC_RANDOMIZATION_ENABLED,
- GlobalSettingsProto.WIFI_CONNECTED_MAC_RANDOMIZATION_ENABLED);
+ Settings.Global.SHOW_RESTART_IN_CRASH_DIALOG,
+ GlobalSettingsProto.SHOW_RESTART_IN_CRASH_DIALOG);
+ dumpSetting(s, p,
+ Settings.Global.SHOW_MUTE_IN_CRASH_DIALOG,
+ GlobalSettingsProto.SHOW_MUTE_IN_CRASH_DIALOG);
+
+ // Please insert new settings using the same order as in Settings.Global.
}
/** Dump a single {@link SettingsState.Setting} to a proto buf */
@@ -1755,6 +1752,11 @@
dumpSetting(s, p,
Settings.Secure.BACKUP_MANAGER_CONSTANTS,
SecureSettingsProto.BACKUP_MANAGER_CONSTANTS);
+ dumpSetting(s, p,
+ Settings.Secure.BLUETOOTH_ON_WHILE_DRIVING,
+ SecureSettingsProto.BLUETOOTH_ON_WHILE_DRIVING);
+
+ // Please insert new settings using the same order as in Settings.Secure.
}
private static void dumpProtoSystemSettingsLocked(
@@ -2013,5 +2015,7 @@
SystemSettingsProto.WHEN_TO_MAKE_WIFI_CALLS);
// The rest of the settings were moved to Settings.Secure, and are thus excluded here since
// they're deprecated from Settings.System.
+
+ // Please insert new settings using the same order as in Settings.System.
}
}
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 2a697b8..d1459bb 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -1647,6 +1647,15 @@
restriction = UserManager.DISALLOW_AIRPLANE_MODE;
break;
+ case Settings.Secure.DOZE_ENABLED:
+ case Settings.Secure.DOZE_ALWAYS_ON:
+ case Settings.Secure.DOZE_PULSE_ON_PICK_UP:
+ case Settings.Secure.DOZE_PULSE_ON_LONG_PRESS:
+ case Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP:
+ if ("0".equals(value)) return false;
+ restriction = UserManager.DISALLOW_AMBIENT_DISPLAY;
+ break;
+
default:
if (setting != null && setting.startsWith(Settings.Global.DATA_ROAMING)) {
if ("0".equals(value)) return false;
@@ -2892,11 +2901,14 @@
for (int i = 0; i < users.size(); i++) {
final int userId = users.get(i).id;
+ // Do we have to increment the generation for users that are not running?
+ // Yeah let's assume so...
+ final int key = makeKey(SETTINGS_TYPE_SECURE, userId);
+ mGenerationRegistry.incrementGeneration(key);
+
if (!mUserManager.isUserRunning(UserHandle.of(userId))) {
continue;
}
-
- final int key = makeKey(SETTINGS_TYPE_GLOBAL, userId);
final Uri uri = getNotificationUriFor(key, Secure.LOCATION_PROVIDERS_ALLOWED);
mHandler.obtainMessage(MyHandler.MSG_NOTIFY_URI_CHANGED,
@@ -3003,7 +3015,7 @@
}
private final class UpgradeController {
- private static final int SETTINGS_VERSION = 151;
+ private static final int SETTINGS_VERSION = 152;
private final int mUserId;
@@ -3608,6 +3620,19 @@
currentVersion = 151;
}
+ if (currentVersion == 151) {
+ // Version 152: Reset wifi wake available for upgrading users
+ final SettingsState globalSettings = getGlobalSettingsLocked();
+ final int defaultValue = getContext().getResources().getInteger(
+ com.android.internal.R.integer.config_wifi_wakeup_available);
+ globalSettings.insertSettingLocked(
+ Settings.Global.WIFI_WAKEUP_AVAILABLE,
+ String.valueOf(defaultValue),
+ null, true, SettingsState.SYSTEM_PACKAGE_NAME);
+
+ currentVersion = 152;
+ }
+
// vXXX: Add new settings above this point.
if (currentVersion != newVersion) {
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
index a8a67ab..f158a65 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
@@ -166,6 +166,9 @@
@GuardedBy("mLock")
private final File mStatePersistFile;
+ @GuardedBy("mLock")
+ private final String mStatePersistTag;
+
private final Setting mNullSetting = new Setting(null, null, false, null, null) {
@Override
public boolean isNull() {
@@ -250,6 +253,7 @@
mContext = context;
mLock = lock;
mStatePersistFile = file;
+ mStatePersistTag = "settings-" + getTypeFromKey(key) + "-" + getUserIdFromKey(key);
mKey = key;
mHandler = new MyHandler(looper);
if (maxBytesPerAppPackage == MAX_BYTES_PER_APP_PACKAGE_LIMITED) {
@@ -634,7 +638,7 @@
Slog.i(LOG_TAG, "[PERSIST START]");
}
- AtomicFile destination = new AtomicFile(mStatePersistFile);
+ AtomicFile destination = new AtomicFile(mStatePersistFile, mStatePersistTag);
FileOutputStream out = null;
try {
out = destination.startWrite();
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index 4b2e62c..9613a6a 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -72,6 +72,7 @@
<uses-permission android:name="android.permission.PEERS_MAC_ADDRESS"/>
<!-- Physical hardware -->
<uses-permission android:name="android.permission.MANAGE_USB" />
+ <uses-permission android:name="android.permission.CONTROL_DISPLAY_BRIGHTNESS" />
<uses-permission android:name="android.permission.DEVICE_POWER" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.MASTER_CLEAR" />
@@ -198,6 +199,9 @@
<!-- to access instant apps -->
<uses-permission android:name="android.permission.ACCESS_INSTANT_APPS" />
+ <!-- to control remote app transitions -->
+ <uses-permission android:name="android.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS" />
+
<!-- to change themes - light or dark -->
<uses-permission android:name="android.permission.CHANGE_OVERLAY_PACKAGES" />
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java
index 903ff72..4b3afdc 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java
@@ -99,6 +99,9 @@
public ComponentName effectsSuppressor;
public String effectsSuppressorName;
public int activeStream = NO_ACTIVE_STREAM;
+ public boolean disallowAlarms;
+ public boolean disallowMedia;
+ public boolean disallowRinger;
public State copy() {
final State rt = new State();
@@ -113,6 +116,9 @@
}
rt.effectsSuppressorName = effectsSuppressorName;
rt.activeStream = activeStream;
+ rt.disallowAlarms = disallowAlarms;
+ rt.disallowMedia = disallowMedia;
+ rt.disallowRinger = disallowRinger;
return rt;
}
@@ -142,6 +148,9 @@
sep(sb, indent); sb.append("effectsSuppressor:").append(effectsSuppressor);
sep(sb, indent); sb.append("effectsSuppressorName:").append(effectsSuppressorName);
sep(sb, indent); sb.append("activeStream:").append(activeStream);
+ sep(sb, indent); sb.append("disallowAlarms:").append(disallowAlarms);
+ sep(sb, indent); sb.append("disallowMedia:").append(disallowMedia);
+ sep(sb, indent); sb.append("disallowRinger:").append(disallowRinger);
if (indent > 0) sep(sb, indent);
return sb.append('}').toString();
}
@@ -172,5 +181,6 @@
void onScreenOff();
void onShowSafetyWarning(int flags);
void onAccessibilityModeChanged(Boolean showA11yStream);
+ void onConnectedDeviceChanged(String deviceName);
}
}
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QS.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QS.java
index a648345e..30d1352 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QS.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QS.java
@@ -14,6 +14,7 @@
package com.android.systemui.plugins.qs;
+import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
@@ -65,6 +66,18 @@
default void setHasNotifications(boolean hasNotifications) {
}
+ /**
+ * We need this to handle nested scrolling for QS..
+ * Normally we would do this with requestDisallowInterceptTouchEvent, but when both the
+ * scroll containers are using the same touch slop, they try to start scrolling at the
+ * same time and NotificationPanelView wins, this lets QS win.
+ *
+ * TODO: Do this using NestedScroll capabilities.
+ */
+ default boolean onInterceptTouchEvent(MotionEvent event) {
+ return isCustomizing();
+ }
+
@ProvidesInterface(version = HeightListener.VERSION)
interface HeightListener {
int VERSION = 1;
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTileView.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTileView.java
index 18d27bb..53f7e44 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTileView.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTileView.java
@@ -26,14 +26,26 @@
@DependsOn(target = QSIconView.class)
@DependsOn(target = QSTile.class)
public abstract class QSTileView extends LinearLayout {
- public static final int VERSION = 1;
+ public static final int VERSION = 2;
public QSTileView(Context context) {
super(context);
}
public abstract View updateAccessibilityOrder(View previousView);
+
+ /**
+ * Returns a {@link QSIconView} containing only the icon for this tile. Use
+ * {@link #getIconWithBackground()} to retrieve the entire tile (background & peripherals
+ * included).
+ */
public abstract QSIconView getIcon();
+
+ /**
+ * Returns a {@link View} containing the icon for this tile along with the accompanying
+ * background circle/peripherals. To retrieve only the inner icon, use {@link #getIcon()}.
+ */
+ public abstract View getIconWithBackground();
public abstract void init(QSTile tile);
public abstract void onStateChanged(State state);
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
index eda8c69..faa2c17 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
@@ -31,6 +31,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/widget_vertical_padding"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/keyguard_clock_container"
@@ -63,7 +64,6 @@
<include layout="@layout/keyguard_status_area"
android:id="@+id/keyguard_status_area"
android:layout_marginTop="20dp"
- android:layout_marginBottom="@dimen/widget_vertical_padding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/clock_separator" />
diff --git a/packages/SystemUI/res-keyguard/values/dimens.xml b/packages/SystemUI/res-keyguard/values/dimens.xml
index 5aca7f9..28a0935 100644
--- a/packages/SystemUI/res-keyguard/values/dimens.xml
+++ b/packages/SystemUI/res-keyguard/values/dimens.xml
@@ -75,7 +75,7 @@
<dimen name="password_char_padding">8dp</dimen>
<!-- The vertical margin between the date and the owner info. -->
- <dimen name="date_owner_info_margin">6dp</dimen>
+ <dimen name="date_owner_info_margin">2dp</dimen>
<!-- The translation for disappearing security views after having solved them. -->
<dimen name="disappear_y_translation">-32dp</dimen>
diff --git a/packages/SystemUI/res/drawable/ic_chevron_up.xml b/packages/SystemUI/res/drawable/ic_chevron_up.xml
new file mode 100644
index 0000000..835d0ad
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_chevron_up.xml
@@ -0,0 +1,24 @@
+<!--
+ ~ 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
+ -->
+<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="@android:color/white"
+ android:pathData="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_swap.xml b/packages/SystemUI/res/drawable/ic_swap.xml
new file mode 100644
index 0000000..30da2a9
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_swap.xml
@@ -0,0 +1,25 @@
+<!--
+ 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:tint="?android:attr/colorForeground">
+ <path
+ android:pathData="M6.99,11L3,15l3.99,4v-3H14v-2H6.99v-3zM21,9l-3.99,-4v3H10v2h7.01v3L21,9z"
+ android:fillColor="#FFFFFF"/>
+</vector>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/back.xml b/packages/SystemUI/res/layout/back.xml
index 43bec91..6843db9 100644
--- a/packages/SystemUI/res/layout/back.xml
+++ b/packages/SystemUI/res/layout/back.xml
@@ -24,8 +24,8 @@
systemui:keyCode="4"
android:scaleType="fitCenter"
android:contentDescription="@string/accessibility_back"
- android:paddingTop="15dp"
- android:paddingBottom="15dp"
+ android:paddingTop="@dimen/home_padding"
+ android:paddingBottom="@dimen/home_padding"
android:paddingStart="@dimen/navigation_key_padding"
android:paddingEnd="@dimen/navigation_key_padding"
/>
diff --git a/packages/SystemUI/res/layout/fingerprint_dialog.xml b/packages/SystemUI/res/layout/fingerprint_dialog.xml
index e5f62b3..161f13f 100644
--- a/packages/SystemUI/res/layout/fingerprint_dialog.xml
+++ b/packages/SystemUI/res/layout/fingerprint_dialog.xml
@@ -99,6 +99,7 @@
android:layout_height="@dimen/fingerprint_dialog_fp_icon_size"
android:layout_gravity="center_horizontal"
android:scaleType="centerInside"
+ android:contentDescription="@string/accessibility_fingerprint_dialog_fingerprint_icon"
android:src="@drawable/fingerprint_icon"/>
<TextView
@@ -112,6 +113,8 @@
android:textSize="12sp"
android:visibility="invisible"
android:gravity="center_horizontal"
+ android:accessibilityLiveRegion="polite"
+ android:contentDescription="@string/accessibility_fingerprint_dialog_help_area"
android:textColor="@color/fingerprint_error_message_color"/>
<LinearLayout android:id="@+id/buttonPanel"
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
index 7b30d6a..cd1be15 100644
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -40,7 +40,7 @@
<LinearLayout android:id="@+id/system_icons_super_container"
android:layout_width="wrap_content"
- android:layout_height="@dimen/status_bar_header_height"
+ android:layout_height="@*android:dimen/quick_qs_total_height"
android:layout_toStartOf="@id/multi_user_switch"
android:layout_alignWithParentIfMissing="true"
android:layout_marginStart="@dimen/system_icons_super_container_margin_start"
diff --git a/packages/SystemUI/res/layout/output_chooser.xml b/packages/SystemUI/res/layout/output_chooser.xml
index b96f447..b9f7b15 100644
--- a/packages/SystemUI/res/layout/output_chooser.xml
+++ b/packages/SystemUI/res/layout/output_chooser.xml
@@ -15,47 +15,56 @@
limitations under the License.
-->
<!-- extends LinearLayout -->
-<com.android.systemui.volume.OutputChooserLayout
+<com.android.systemui.HardwareUiLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:sysui="http://schemas.android.com/apk/res-auto"
- android:id="@+id/output_chooser"
- android:minWidth="320dp"
- android:minHeight="320dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical"
- android:padding="20dp" >
-
- <TextView
- android:id="@+id/title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textDirection="locale"
- android:textAppearance="@style/TextAppearance.QS.DetailHeader"
- android:layout_marginBottom="20dp" />
-
- <com.android.systemui.qs.AutoSizingList
- android:id="@android:id/list"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_marginBottom="0dp"
+ android:clipToPadding="false"
+ android:theme="@style/qs_theme"
+ android:clipChildren="false">
+ <com.android.systemui.volume.OutputChooserLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:sysui="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/output_chooser"
+ android:layout_width="@dimen/output_chooser_panel_width"
+ android:layout_height="@dimen/output_chooser_panel_width"
+ android:layout_gravity="center_vertical|end"
android:orientation="vertical"
- sysui:itemHeight="@dimen/qs_detail_item_height"
- style="@style/AutoSizingList"/>
-
- <LinearLayout
- android:id="@android:id/empty"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center"
- android:gravity="center"
- android:orientation="vertical">
+ android:translationZ="8dp"
+ android:padding="20dp" >
<TextView
- android:id="@+id/empty_text"
+ android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textDirection="locale"
- android:layout_marginTop="20dp"
- android:textAppearance="@style/TextAppearance.QS.DetailEmpty"/>
- </LinearLayout>
-</com.android.systemui.volume.OutputChooserLayout>
+ android:textAppearance="@style/TextAppearance.QS.DetailHeader"
+ android:layout_marginBottom="20dp" />
+
+ <com.android.systemui.qs.AutoSizingList
+ android:id="@android:id/list"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ sysui:itemHeight="@dimen/qs_detail_item_height"
+ style="@style/AutoSizingList"/>
+
+ <LinearLayout
+ android:id="@android:id/empty"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/empty_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textDirection="locale"
+ android:layout_marginTop="20dp"
+ android:textAppearance="@style/TextAppearance.QS.DetailEmpty"/>
+ </LinearLayout>
+ </com.android.systemui.volume.OutputChooserLayout>
+</com.android.systemui.HardwareUiLayout>
diff --git a/packages/SystemUI/res/layout/qs_panel.xml b/packages/SystemUI/res/layout/qs_panel.xml
index 5bcb7fd..1dab761 100644
--- a/packages/SystemUI/res/layout/qs_panel.xml
+++ b/packages/SystemUI/res/layout/qs_panel.xml
@@ -33,7 +33,7 @@
<View
android:id="@+id/quick_settings_status_bar_background"
android:layout_width="match_parent"
- android:layout_height="@dimen/qs_header_system_icons_area_height"
+ android:layout_height="@*android:dimen/quick_qs_offset_height"
android:clipToPadding="false"
android:clipChildren="false"
android:background="#ff000000" />
@@ -43,7 +43,7 @@
android:id="@+id/quick_settings_gradient_view"
android:layout_width="match_parent"
android:layout_height="126dp"
- android:layout_marginTop="@dimen/qs_header_system_icons_area_height"
+ android:layout_marginTop="@*android:dimen/quick_qs_offset_height"
android:clipToPadding="false"
android:clipChildren="false"
android:background="@drawable/qs_bg_gradient" />
@@ -51,7 +51,7 @@
<com.android.systemui.qs.QSPanel
android:id="@+id/quick_settings_panel"
- android:layout_marginTop="@dimen/qs_header_system_icons_area_height"
+ android:layout_marginTop="@*android:dimen/quick_qs_offset_height"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="48dp"
diff --git a/packages/SystemUI/res/layout/quick_qs_status_icons.xml b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
index e0f0ed9..cd3271f 100644
--- a/packages/SystemUI/res/layout/quick_qs_status_icons.xml
+++ b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
@@ -13,13 +13,25 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<View
+<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/quick_qs_status_icons"
android:layout_width="match_parent"
android:layout_height="20dp"
- android:layout_marginBottom="22dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="14dp"
android:layout_below="@id/quick_status_bar_system_icons"
>
-</View>
+ <com.android.systemui.statusbar.phone.StatusIconContainer
+ android:id="@+id/statusIcons"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1" />
+
+ <include layout="@layout/signal_cluster_view"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginStart="@dimen/signal_cluster_margin_start" />
+
+</LinearLayout>
diff --git a/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml b/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
index dacc3f9..cc79d0d 100644
--- a/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
+++ b/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
@@ -20,7 +20,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/header"
android:layout_width="match_parent"
- android:layout_height="@dimen/status_bar_header_height"
+ android:layout_height="@*android:dimen/quick_qs_total_height"
android:layout_gravity="@integer/notification_panel_layout_gravity"
android:baselineAligned="false"
android:clickable="false"
diff --git a/packages/SystemUI/res/layout/quick_status_bar_header_system_icons.xml b/packages/SystemUI/res/layout/quick_status_bar_header_system_icons.xml
index 2c69501..f38129f 100644
--- a/packages/SystemUI/res/layout/quick_status_bar_header_system_icons.xml
+++ b/packages/SystemUI/res/layout/quick_status_bar_header_system_icons.xml
@@ -19,7 +19,7 @@
xmlns:systemui="http://schemas.android.com/apk/res-auto"
android:id="@+id/quick_status_bar_system_icons"
android:layout_width="match_parent"
- android:layout_height="@dimen/qs_header_system_icons_area_height"
+ android:layout_height="@*android:dimen/quick_qs_offset_height"
android:layout_alignParentEnd="true"
android:clipChildren="false"
android:clipToPadding="false"
diff --git a/packages/SystemUI/res/layout/recent_apps.xml b/packages/SystemUI/res/layout/recent_apps.xml
index c84d280..6b08cea 100644
--- a/packages/SystemUI/res/layout/recent_apps.xml
+++ b/packages/SystemUI/res/layout/recent_apps.xml
@@ -23,8 +23,8 @@
android:layout_weight="0"
android:scaleType="fitCenter"
android:contentDescription="@string/accessibility_recent"
- android:paddingTop="15dp"
- android:paddingBottom="15dp"
+ android:paddingTop="@dimen/home_padding"
+ android:paddingBottom="@dimen/home_padding"
android:paddingStart="@dimen/navigation_key_padding"
android:paddingEnd="@dimen/navigation_key_padding"
/>
diff --git a/packages/SystemUI/res/layout/recents_swipe_up_onboarding.xml b/packages/SystemUI/res/layout/recents_swipe_up_onboarding.xml
new file mode 100644
index 0000000..b3d5c90
--- /dev/null
+++ b/packages/SystemUI/res/layout/recents_swipe_up_onboarding.xml
@@ -0,0 +1,46 @@
+<?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_height="48dp"
+ android:layout_width="match_parent"
+ android:background="@android:color/black"
+ android:layout_gravity="center">
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:background="?android:attr/listDivider"
+ android:gravity="top"/>
+ <TextView
+ android:id="@+id/onboarding_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:text="@string/recents_swipe_up_onboarding"
+ android:textColor="@android:color/white"
+ android:textSize="16sp"
+ android:drawableBottom="@drawable/ic_chevron_up"/>
+ <ImageView
+ android:id="@+id/dismiss"
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:padding="12dp"
+ android:layout_marginEnd="6dp"
+ android:src="@drawable/ic_close_white"
+ android:background="?android:attr/selectableItemBackgroundBorderless"
+ android:layout_gravity="center_vertical|end"/>
+</FrameLayout>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/volume_dialog.xml b/packages/SystemUI/res/layout/volume_dialog.xml
index 5108f58..117cd14 100644
--- a/packages/SystemUI/res/layout/volume_dialog.xml
+++ b/packages/SystemUI/res/layout/volume_dialog.xml
@@ -41,6 +41,7 @@
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:background="@drawable/rounded_bg_full"
+ android:translationZ="8dp"
android:orientation="horizontal" >
<!-- volume rows added and removed here! :-) -->
</LinearLayout>
@@ -57,6 +58,7 @@
android:background="@drawable/rounded_bg_full"
android:gravity="center"
android:layout_gravity="end"
+ android:translationZ="8dp"
android:orientation="vertical" >
<TextView
diff --git a/packages/SystemUI/res/layout/volume_dialog_row.xml b/packages/SystemUI/res/layout/volume_dialog_row.xml
index 3590b76..1d1f95b 100644
--- a/packages/SystemUI/res/layout/volume_dialog_row.xml
+++ b/packages/SystemUI/res/layout/volume_dialog_row.xml
@@ -38,23 +38,34 @@
android:maxLines="1"
android:textColor="?android:attr/colorControlNormal"
android:textAppearance="?android:attr/textAppearanceSmall" />
- <TextView
- android:id="@+id/volume_row_connected_device"
- android:visibility="gone"
+ <LinearLayout
+ android:id="@+id/output_chooser"
+ android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:ellipsize="end"
- android:maxLines="1"
- android:textAppearance="@style/TextAppearance.QS.DetailItemSecondary" />
- <com.android.keyguard.AlphaOptimizedImageButton
- android:id="@+id/output_chooser"
- style="@style/VolumeButtons"
+ android:minWidth="48dp"
+ android:minHeight="48dp"
+ android:paddingTop="10dp"
android:background="?android:selectableItemBackgroundBorderless"
- android:layout_width="@dimen/volume_button_size"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:src="@drawable/ic_volume_expand_animation"
- android:soundEffectsEnabled="false" />
+ android:gravity="center">
+ <TextView
+ android:id="@+id/volume_row_connected_device"
+ android:visibility="gone"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:maxLines="1"
+ android:textAppearance="@style/TextAppearance.QS.DetailItemSecondary" />
+ <com.android.keyguard.AlphaOptimizedImageButton
+ android:id="@+id/output_chooser_button"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:background="?android:selectableItemBackgroundBorderless"
+ style="@style/VolumeButtons"
+ android:layout_centerVertical="true"
+ android:src="@drawable/ic_swap"
+ android:soundEffectsEnabled="false" />
+ </LinearLayout>
</LinearLayout>
<FrameLayout
android:id="@+id/volume_row_slider_frame"
diff --git a/packages/SystemUI/res/layout/wireless_charging_layout.xml b/packages/SystemUI/res/layout/wireless_charging_layout.xml
new file mode 100644
index 0000000..113282b
--- /dev/null
+++ b/packages/SystemUI/res/layout/wireless_charging_layout.xml
@@ -0,0 +1,56 @@
+<?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.
+*/
+-->
+
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <!-- Circle animation -->
+ <com.android.systemui.charging.WirelessChargingView
+ android:id="@+id/wireless_charging_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:elevation="4dp"/>
+
+ <!-- Text inside circle -->
+ <LinearLayout
+ android:id="@+id/wireless_charging_text_layout"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/wireless_charging_percentage"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:textSize="32sp"
+ android:textColor="?attr/wallpaperTextColor"/>
+
+ <TextView
+ android:id="@+id/wireless_charging_secondary_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:textColor="?attr/wallpaperTextColor"/>
+ </LinearLayout>
+
+</FrameLayout>
\ No newline at end of file
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index 8b2ab81..5242029 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Tuis"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Kieslys"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Toeganklikheid"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Draai skerm"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Oorsig"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Deursoek"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"maak kamera oop"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Kies nuwe taakuitleg"</string>
<string name="cancel" msgid="6442560571259935130">"Kanselleer"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Versoenbaarheid-zoem se knoppie."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoem kleiner na groter skerm."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth gekoppel."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Luitoestel stil."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Werkmodus"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Maak <xliff:g id="APP">%s</xliff:g> toe."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> verwerp."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Alle onlangse programme is toegemaak."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> toestelle)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth af"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Geen saamgebinde toestelle beskikbaar nie"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> batterykrag"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Oudio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Kopstuk"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Invoer"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Helderheid"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Outo-draai"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Outodraai skerm"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Koppel tans …"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"USB-verbinding"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Warmkol"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Kennisgewings"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Flitslig"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobiele data"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> gebruik"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g>-limiet"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> waarskuwing"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Werkmodus"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Aandbeligting"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Aan by sonsondergang"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Tot sonsopkoms"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Aan om <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Tot <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC is gedeaktiveer"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC is geaktiveer"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> is in veiligmodus gedeaktiveer."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Vee alles uit"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Trek hier om verdeelde skerm te gebruik"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Verdeel horisontaal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Verdeel vertikaal"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Verdeel gepasmaak"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Met kragkennisgewingkontroles kan jy \'n belangrikheidvlak van 0 tot 5 vir \'n program se kennisgewings stel. \n\n"<b>"Vlak 5"</b>" \n- Wys aan die bokant van die kennisgewinglys \n- Laat volskermonderbreking toe \n- Wys altyd opspringkennisgewings \n\n"<b>"Vlak 4"</b>" \n- Verhoed volskermonderbreking \n- Wys altyd opspringkennisgewings \n\n"<b>"Vlak 3"</b>" \n- Verhoed volskermonderbreking \n- Verhoed opspringkennisgewings \n\n"<b>"Vlak 2"</b>" \n- Verhoed volskermonderbreking \n- Verhoed opspringkennisgewings \n- Moet nooit \'n klank maak of vibreer nie \n\n"<b>"Vlak 1"</b>" \n- Verhoed volskermonderbreking \n- Verhoed opspringkennisgewings \n- Moet nooit \'n klank maak of vibreer nie \n- Versteek van sluitskerm en statusbalk \n- Wys aan die onderkant van die kennisgewinglys \n\n"<b>"Vlak 0"</b>" \n- Blokkeer alle kennisgewings van die program af"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Kennisgewings"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Jy sal nie meer hierdie kennisgewings sien nie"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Hou aan om hierdie kennisgewings te wys?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Stop kennisgewings"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Hou aan wys"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Knipbord"</item>
<item msgid="5742013440802239414">"Sleutelkode"</item>
<item msgid="8802889973626281575">"Sleutelbordwisselaar"</item>
- <item msgid="8175437057325747277">"Geen"</item>
+ <item msgid="7095517796293767867">"Rotasievoorstel"</item>
+ <item msgid="8494159969042135235">"Geen"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normaal"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Tik vir besonderhede oor battery- en datagebruik"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Skakel mobiele data af?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Instellings kan nie jou antwoord verifieer nie omdat \'n program \'n toestemmingversoek verberg."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Laat <xliff:g id="APP_0">%1$s</xliff:g> toe om <xliff:g id="APP_2">%2$s</xliff:g>-skyfies te wys?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– Dit kan inligting van <xliff:g id="APP">%1$s</xliff:g> af lees"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– Dit kan handelinge binne <xliff:g id="APP">%1$s</xliff:g> uitvoer"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Laat <xliff:g id="APP">%1$s</xliff:g> toe om skyfies uit enige program te gebruik"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Laat toe"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Weier"</string>
</resources>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index e548cae..f08c71e 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"ማያ ገጹን አዙር"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"አጠቃላይ ዕይታ"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"ፈልግ"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"ካሜራ"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"ካሜራ ክፈት"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"የአዲስ ተግባር አቀማመጥን ይምረጡ"</string>
<string name="cancel" msgid="6442560571259935130">"ይቅር"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"የተኳኋኝአጉላ አዝራር።"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"አነስተኛውን ማያ ወደ ትልቅ አጉላ።"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"ብሉቱዝ ተያይዟል።"</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"የስልክ ጥሪ ፀጥታ።"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"የሥራ ሁነታ"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> አስወግድ።"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ተሰናብቷል::"</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"ሁሉም የቅርብ ጊዜ ማመልከቻዎች ተሰናብተዋል።"</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"ብሉቱዝ (<xliff:g id="NUMBER">%d</xliff:g> መሣሪያዎች)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"ብሉቱዝ ጠፍቷል"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"ምንም የተጣመሩ መሣሪያዎች አይገኝም"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ባትሪ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"ኦዲዮ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"ማዳመጫ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"ግቤት"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"ብሩህነት"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"በራስ ሰር አሽከርክር"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"ማያ ገጽን በራስ-አሽከርክር"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"በማገናኘት ላይ..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"በማገናኘት ላይ"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"መገናኛ ነጥብ"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"ማሳወቂያዎች"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"የባትሪ ብርሃን"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"የተንቀሳቃሽ ስልክ ውሂብ"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> ጥቅም ላይ ውሏል"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> ገደብ"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"የ<xliff:g id="DATA_LIMIT">%s</xliff:g> ማስጠንቀቂያ"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"የሥራ ሁነታ"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"የምሽት ብርሃን"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"ጸሐይ ስትጠልቅ ይበራል"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"ጸሐይ እስክትወጣ ድረስ"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g> ላይ ይበራል"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"እስከ <xliff:g id="TIME">%s</xliff:g> ድረስ"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"ኤንኤፍሲ"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"ኤንኤፍሲ ተሰናክሏል"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"ኤንኤፍሲ ነቅቷል"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> በጥንቃቄ ሁነታ ውስጥ ታግዷል።"</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"ሁሉንም አጽዳ"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"የተከፈለ ማያ ገጽን ለመጠቀም እዚህ ላይ ይጎትቱ"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"አግድም ክፈል"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"ቁልቁል ክፈል"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"በብጁ ክፈል"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"በኃይል ማሳወቂያ መቆጣጠሪያዎች አማካኝነት የአንድ መተግበሪያ ማሳወቂያዎች የአስፈላጊነት ደረጃ ከ0 እስከ 5 ድረስ ማዘጋጀት ይችላሉ። \n\n"<b>"ደረጃ 5"</b>" \n- በማሳወቂያ ዝርዝሩ አናት ላይ አሳይ \n- የሙሉ ማያ ገጽ ማቋረጥን ፍቀድ \n- ሁልጊዜ አጮልቀው ይመልከቱ \n\n"<b>"ደረጃ 4"</b>" \n- የሙሉ ማያ ገጽ ማቋረጥን ከልክል \n- ሁልጊዜ አጮልቀው ይመልከቱ \n\n"<b>"ደረጃ 3"</b>" \n- የሙሉ ማያ ገጽ ማቋረጥን ከልክል \n- በፍጹም አጮልቀው አይምልከቱ \n\n"<b>"ደረጃ 2"</b>" \n- የሙሉ ማያ ገጽ ማቋረጥን ይከልክሉ \n- በፍጹም አጮልቀው አይመልከቱ \n- ድምፅ እና ንዝረትን በፍጹም አይኑር \n\n"<b>"ደረጃ 1"</b>" \n- የሙሉ ማያ ገጽ ማቋረጥን ይከልክሉ \n- በፍጹም አጮልቀው አይመልከቱ \n- ድምፅ ወይም ንዝረትን በፍጹም አያደርጉ \n- ከመቆለፊያ ገጽ እና የሁኔታ አሞሌ ይደብቁ \n- በማሳወቂያ ዝርዝር ግርጌ ላይ አሳይ \n\n"<b>"ደረጃ 0"</b>" \n- ሁሉንም የመተግበሪያው ማሳወቂያዎች ያግዱ"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"ማሳወቂያዎች"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"እነዚህን ማሳወቂያዎችን ከእንግዲህ አይመለከቷቸውም"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"እነዚህን ማሳወቂያዎች ማሳየት ይቀጥሉ?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"ማሳወቂያዎችን አስቁም"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"ማሳየትን ቀጥል"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"የቅንጥብ ሰሌዳ"</item>
<item msgid="5742013440802239414">"የቁልፍ ኮድ"</item>
<item msgid="8802889973626281575">"የቁልፍ ሰሌዳ መቀየሪያ"</item>
- <item msgid="8175437057325747277">"ምንም የለም"</item>
+ <item msgid="7095517796293767867">"የማዞር አስተያየት ጥቆማ"</item>
+ <item msgid="8494159969042135235">"ምንም"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"መደበኛ"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"በባትሪ እና ውሂብ አጠቃቀም ላይ ዝርዝሮችን ለማግኘት መታ ያድርጉ"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"የተንቀሳቃሽ ስልክ ውሂብ ይጥፋ?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"አንድ መተግበሪያ የፍቃድ ጥያቄ እያገደ ስለሆነ ቅንብሮች ጥያቄዎን ማረጋገጥ አይችሉም።"</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> የ<xliff:g id="APP_2">%2$s</xliff:g> ቁራጮችን እንዲያሳይ ይፈቀድለት?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- ከ<xliff:g id="APP">%1$s</xliff:g> የመጣ መረጃን ማንበብ ይችላል"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- በ<xliff:g id="APP">%1$s</xliff:g> ውስጥ እርምጃዎችን መውሰድ ይችላል"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g> ከማንኛውም መተግበሪያ የመጡ ቁራጮችን እንዲያሳይ ፍቀድለት"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"ፍቀድ"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"ከልክል"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index a2a0f06..1087b99 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -92,6 +92,7 @@
<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_rotate_button" msgid="7402949513740253006">"تدوير الشاشة"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"النظرة عامة"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"بحث"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"الكاميرا"</string>
@@ -106,6 +107,12 @@
<string name="camera_label" msgid="7261107956054836961">"فتح الكاميرا"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"تحديد تنسيق جديد للمهمة"</string>
<string name="cancel" msgid="6442560571259935130">"إلغاء"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"زر تكبير/تصغير للتوافق."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"استخدام التكبير/التصغير لتحويل شاشة صغيرة إلى شاشة أكبر"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"تم توصيل البلوتوث."</string>
@@ -182,7 +189,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"رنين صامت."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"وضع العمل"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"إزالة <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"تمت إزالة <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"تم تجاهل كل التطبيقات المستخدمة مؤخرًا."</string>
@@ -283,6 +291,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"بلوتوث (<xliff:g id="NUMBER">%d</xliff:g> من الأجهزة)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"إيقاف البلوتوث"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"لا يتوفر أي أجهزة مقترنة"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"مستوى طاقة البطارية <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"صوت"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"سماعة الرأس"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"الإدخال"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"السطوع"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"دوران تلقائي"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"التدوير التلقائي للشاشة"</string>
@@ -323,6 +335,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"جارٍ الاتصال..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"النطاق"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"نقطة اتصال"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"الإشعارات"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"الفلاش"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"بيانات الجوّال"</string>
@@ -332,8 +347,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> مستخدَمة"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"قيد <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"تحذير <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"وضع العمل"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"إضاءة ليلية"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"تفعيل عند غروب الشمس"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"حتى شروق الشمس"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"تفعيل الإعداد في <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"حتى <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"الاتصال القريب المدى (NFC)"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"تم تعطيل الاتصال القريب المدى"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"تم تمكين الاتصال القريب المدى"</string>
@@ -346,6 +368,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"تم تعطيل <xliff:g id="APP">%s</xliff:g> في الوضع الآمن."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"مسح الكل"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"اسحب هنا لاستخدام وضع تقسيم الشاشة"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"تقسيم أفقي"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"تقسيم رأسي"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"تقسيم مخصص"</string>
@@ -570,6 +594,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"باستخدام عناصر التحكم في إشعار التشغيل، يمكنك تعيين مستوى الأهمية من 0 إلى 5 لإشعارات التطبيق. \n\n"<b>"المستوى 5"</b>" \n- العرض أعلى قائمة الإشعارات \n- يسمح بمقاطعة ملء الشاشة \n- الظهور الخاطف دائمًا \n\n"<b>"المستوى 4"</b>" \n- منع مقاطعة ملء الشاشة \n- الظهور الخاطف دائمًا \n\n"<b>"المستوى 3"</b>" \n- منع مقاطعة ملء الشاشة \n- عدم الظهور الخاطف أبدًا \n\n"<b>"المستوى 2"</b>" \n- منع مقاطعة ملء الشاشة \n- عدم الظهور الخاطف أبدًا \n- عدم إصدار أصوات واهتزاز \n\n"<b>"المستوى 1"</b>" \n- منع مقاطعة ملء الشاشة \n- عدم الظهور الخاطف أبدًا \n- عدم إصدار أصوات أو اهتزاز أبدًا \n- الإخفاء من شاشة التأمين وشريط الحالة \n- العرض أسفل قائمة الإشعارات \n\n"<b>"المستوى 0"</b>" \n- حظر جميع الإشعارات من التطبيق"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"الإشعارات"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"لن تتلقى هذه الإشعارات بعد الآن."</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"هل تريد الاستمرار في تلقي هذه الإشعارات؟"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"إيقاف الإشعارات"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"الاستمرار في تلقّي الإشعارات"</string>
@@ -672,7 +698,8 @@
<item msgid="1545641631806817203">"الحافظة"</item>
<item msgid="5742013440802239414">"رمز المفتاح"</item>
<item msgid="8802889973626281575">"مفتاح تبديل لوحة المفاتيح"</item>
- <item msgid="8175437057325747277">"بدون"</item>
+ <item msgid="7095517796293767867">"اقتراح حول أزرار التنقل"</item>
+ <item msgid="8494159969042135235">"بدون"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"عادي"</item>
@@ -796,4 +823,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"انقر للحصول على تفاصيل حول البطارية واستخدام البيانات"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"هل تريد إيقاف تشغيل بيانات الجوال؟"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"لا يمكن للإعدادات التحقق من ردك لأن هناك تطبيقًا يحجب طلب الإذن."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"هل تريد السماح لتطبيق <xliff:g id="APP_0">%1$s</xliff:g> بعرض شرائح <xliff:g id="APP_2">%2$s</xliff:g>؟"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- يستطيع قراءة المعلومات من <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- يستطيع اتخاذ إجراءات داخل <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"السماح لتطبيق <xliff:g id="APP">%1$s</xliff:g> بعرض شرائح من أي تطبيق"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"سماح"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"رفض"</string>
</resources>
diff --git a/packages/SystemUI/res/values-az/strings.xml b/packages/SystemUI/res/values-az/strings.xml
index e73cc86..17d7718 100644
--- a/packages/SystemUI/res/values-az/strings.xml
+++ b/packages/SystemUI/res/values-az/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Ana səhifə"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menyu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Əlçatımlılıq"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Ekranı fırladın"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"İcmal"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Axtar"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"kemaranı açın"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Yeni tapşırıq sxemi seçin"</string>
<string name="cancel" msgid="6442560571259935130">"Ləğv et"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Uyğunluq zoom düyməsi."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Daha böyük ekranda uzaqlaşdır."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth qoşulub."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Zəngvuran səssiz."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"İş rejimi"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> kənarlaşdırın."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> çıxarıldı."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Bütün son tətbiqlər kənarlaşdırıldı."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Cihaz)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth bağlıdır"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Heç bir cütlənmiş cihaz əlçatan deyil"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> batareya"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Qulaqlıq"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Giriş"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Parlaqlıq"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Avtodönüş"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Ekran avtodönüşü"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Qoşulur..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Birləşmə"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Bildirişlər"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"İşartı"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobil data"</string>
@@ -324,8 +339,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> işlənib"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> limit"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> xəbərdarlığı"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"İş rejimi"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"İş profili"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"Bildiriş və tətbiqlər deaktivdir"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Gecə işığı"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Qürubda aktiv ediləcək"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Şəfəq vaxtına qədər"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g> olduqda aktiv ediləcək"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> vaxtına qədər"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC deaktiv edilib"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC aktiv edilib"</string>
@@ -338,6 +358,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> güvənli rejimdə deaktiv edildi."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Hamısını silin"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Ekranı bölmək üçün bura sürüşdürün"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Tətbiqi dəyişmək üçün yuxarı sürüşdürün"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Üfüqi Böl"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Şaquli Böl"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Fərdi Böl"</string>
@@ -562,6 +583,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Enerji bildiriş nəzarəti ilə, tətbiq bildirişləri üçün əhəmiyyət səviyyəsini 0-dan 5-ə kimi ayarlaya bilərsiniz. \n\n"<b>"Səviyyə 5"</b>" \n- Bildiriş siyahısının yuxarı hissəsində göstərin \n- Tam ekran kəsintisinə icazə verin \n- Hər zaman izləyin \n\n"<b>"Səviyyə 4"</b>" \n- Tam ekran kəsintisinin qarşısını alın \n- Hər zaman izləyin \n\n"<b>"Level 3"</b>" \n- Tam ekran kəsintisinin qarşısını alın \n- Heç vaxt izləməyin \n\n"<b>"Level 2"</b>" \n- Tam ekran kəsintisinin qarşısını alın \n- Heç vaxt izləməyin \n- Heç vaxt səsliyə və ya vibrasiyaya qoymayın \n\n"<b>"Səviyyə 1"</b>" \n- Prevent full screen interruption \n- Heç vaxt izləməyin \n- Heç vaxt səsliyə və ya vibrasiyaya qoymayın \n- Ekran kilidi və ya status panelindən gizlədin \n- Bildiriş siyahısının yuxarı hissəsində göstərin \n\n"<b>"Səviyyə 0"</b>" \n- Bütün bildirişləri tətbiqdən blok edin"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Bildirişlər"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Artıq bu bildirişləri görməyəcəkəsiniz"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Bu bildirişlər göstərilməyə davam edilsin?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Bildirişləri dayandırın"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Göstərməyə davam edin"</string>
@@ -656,7 +679,8 @@
<item msgid="1545641631806817203">"Mübadilə buferi"</item>
<item msgid="5742013440802239414">"Açar kodu"</item>
<item msgid="8802889973626281575">"Klaviatura dəyişdirici"</item>
- <item msgid="8175437057325747277">"Heç bir"</item>
+ <item msgid="7095517796293767867">"Naviqasiya təklifləri"</item>
+ <item msgid="8494159969042135235">"Yoxdur"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -780,4 +804,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Batareya və data istifadəsi haqqında ətraflı məlumat üçün klikləyin"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Mobil data söndürülsün?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Tətbiq icazə sorğusunu gizlətdiyi üçün Ayarlar cavabınızı doğrulaya bilməz."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> tətbiqinə <xliff:g id="APP_2">%2$s</xliff:g> hissələrini göstərmək üçün icazə verilsin?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- <xliff:g id="APP">%1$s</xliff:g> tətbiqindən məlumat oxuya bilər"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- <xliff:g id="APP">%1$s</xliff:g> daxilində əməliyyatlar edə bilər"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g> tətbiqinə istənilən tətbiqdən hissə göstərmək icazəsi verin"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"İcazə verin"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Rədd edin"</string>
</resources>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings.xml b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
index 3c203b1..9c188ff 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
@@ -89,6 +89,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Početna"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Meni"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Pristupačnost"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Rotirajte ekran"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Pregled"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Pretražite"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -103,6 +104,12 @@
<string name="camera_label" msgid="7261107956054836961">"otvori kameru"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Izaberi novi raspored zadataka"</string>
<string name="cancel" msgid="6442560571259935130">"Otkaži"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Dugme Zum kompatibilnosti."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zumiranje sa manjeg na veći ekran."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth je priključen."</string>
@@ -179,7 +186,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Nečujno zvono."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Režim rada"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Odbacite <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Aplikacija <xliff:g id="APP">%s</xliff:g> je odbačena."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Sve nedavno korišćene aplikacije su odbačene."</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> uređaja)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth isključen"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Nije dostupan nijedan upareni uređaj"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Nivo baterije je <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Slušalice"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Unos"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Osvetljenost"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Automatska rotacija"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Automatsko rotiranje ekrana"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Povezuje se..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Povezivanje"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Obaveštenja"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Lampa"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobilni podaci"</string>
@@ -326,8 +341,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Iskoristili ste <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Ograničenje od <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Upozorenje za <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Režim rada"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Noćno svetlo"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Uključuje se po zalasku sunca"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Do izlaska sunca"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Uključuje se u <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Do <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC je onemogućen"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC je omogućen"</string>
@@ -340,6 +362,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Aplikacija <xliff:g id="APP">%s</xliff:g> je onemogućena u bezbednom režimu."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Obriši sve"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Prevucite ovde da biste koristili razdeljeni ekran"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Podeli horizontalno"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Podeli vertikalno"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Prilagođeno deljenje"</string>
@@ -564,6 +588,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Pomoću naprednih kontrola za obaveštenja možete da podesite nivo važnosti od 0. do 5. za obaveštenja aplikacije. \n\n"<b>"5. nivo"</b>" \n– Prikazuju se u vrhu liste obaveštenja \n- Dozvoli prekid režima celog ekrana \n– Uvek zaviruj \n\n"<b>"4. nivo"</b>" \n– Spreči prekid režima celog ekrana \n– Uvek zaviruj \n\n"<b>"3. nivo"</b>" \n– Spreči prekid režima celog ekrana \n– Nikada ne zaviruj \n\n"<b>"2. nivo"</b>" \n– Spreči prekid režima celog ekrana \n– Nikada ne zaviruj \n– Nikada ne proizvodi zvuk ili vibraciju \n\n"<b>"1. nivo"</b>" \n– Spreči prekid režima celog ekrana \n– Nikada ne zaviruj \n– Nikada ne proizvodi zvuk ili vibraciju \n– Sakrij na zaključanom ekranu i statusnoj traci \n– Prikazuju se u dnu liste obaveštenja \n\n"<b>"0. nivo"</b>" \n– Blokiraj sva obaveštenja iz aplikacije"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Obaveštenja"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Više nećete videti ova obaveštenja"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Želite li da se ova obaveštenja i dalje prikazuju?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Prestani da prikazuješ obaveštenja"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Nastavi da prikazuješ"</string>
@@ -660,7 +686,8 @@
<item msgid="1545641631806817203">"Memorija"</item>
<item msgid="5742013440802239414">"Kôd tastera"</item>
<item msgid="8802889973626281575">"Prebacivač za tastaturu"</item>
- <item msgid="8175437057325747277">"Ništa"</item>
+ <item msgid="7095517796293767867">"Predlog za rotaciju"</item>
+ <item msgid="8494159969042135235">"Ništa"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normalni"</item>
@@ -784,4 +811,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Dodirnite za detalje o bateriji i potrošnji podataka"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Želite da onemogućite mobilne podatke?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Podešavanja ne mogu da verifikuju vaš odgovor jer aplikacija skriva zahtev za dozvolu."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Želite li da dozvolite aplikaciji <xliff:g id="APP_0">%1$s</xliff:g> da prikazuje isečke iz aplikacije <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– Može da čita podatke iz aplikacije <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– Može da obavlja radnje u aplikaciji <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Dozvolite aplikaciji <xliff:g id="APP">%1$s</xliff:g> da prikazuje isečke iz bilo koje aplikacije"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Dozvoli"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Odbij"</string>
</resources>
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index 41ce823..6115de3 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -80,7 +80,7 @@
<string name="screenshot_saved_text" msgid="7574667448002050363">"Дакраніцеся, каб прагледзець здымак экрана"</string>
<string name="screenshot_failed_title" msgid="9096484883063264803">"Не атрымалася зрабіць здымак экрана"</string>
<string name="screenshot_failed_to_save_unknown_text" msgid="8844781948876286488">"Падчас захавання здымка экрана адбылася памылка"</string>
- <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"Немагчыма захаваць здымак экрана, бо мала месца ў сховішчу"</string>
+ <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"Немагчыма захаваць здымак экрана, бо мала месца ў сховішчы"</string>
<string name="screenshot_failed_to_capture_text" msgid="173674476457581486">"Рабіць здымкі экрана не дазваляе праграма ці ваша арганізацыя"</string>
<string name="usb_preference_title" msgid="6551050377388882787">"Парам. перадачы файлаў па USB"</string>
<string name="use_mtp_button_title" msgid="4333504413563023626">"Падлучыць як медыяпрайгравальнік (ССП)"</string>
@@ -90,6 +90,7 @@
<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_rotate_button" msgid="7402949513740253006">"Павярнуць экран"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Агляд"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Пошук"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -104,6 +105,12 @@
<string name="camera_label" msgid="7261107956054836961">"адкрыць камеру"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Выберыце новы макет заданняў"</string>
<string name="cancel" msgid="6442560571259935130">"Скасаваць"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Кнопка сумяшчальнасці маштаба."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Маштабаванне малых элементаў для большага экрана."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth-сувязь."</string>
@@ -182,7 +189,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Маўклівы выклік."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Рэжым працы"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Выдаліць <xliff:g id="APP">%s</xliff:g> са спіса апошніх."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> выдалены."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Усе апошнія праграмы адхілены."</string>
@@ -281,6 +289,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (прылады: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth выключаны"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Няма даступных спалучаных прылад"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Узровень зараду: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Гук"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Гарнітура"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Увод"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Яркасць"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Аўтапаварот"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Аўтаматычны паварот экрана"</string>
@@ -321,6 +333,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Падлучэнне..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Мадэм"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Кропка доступу"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Апавяшчэнні"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Ліхтарык"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Мабільная перадача даных"</string>
@@ -330,8 +345,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Выкарыстана <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Ліміт <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Папярэджанне: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Рэжым працы"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Начная падсветка"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Уключаць увечары"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Да ўсходу сонца"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Уключыць у <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Да <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC адключаны"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC уключаны"</string>
@@ -344,6 +366,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> адключана ў бяспечным рэжыме."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Ачысціць усё"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Перацягніце сюды, каб перайсці ў рэжым падзеленага экрана"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Падзяліць гарызантальна"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Падзяліць вертыкальна"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Падзяліць іншым чынам"</string>
@@ -567,12 +591,14 @@
<string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"Выключана"</string>
<string name="power_notification_controls_description" msgid="4372459941671353358">"З дапамогай пашыранага кіравання апавяшчэннямі вы можаце задаваць узровень важнасці апавяшчэнняў праграмы ад 0 да 5. \n\n"<b>"Узровень 5"</b>" \n- Паказваць уверсе спіса апавяшчэнняў \n- Дазваляць перапыняць рэжым поўнага экрана \n- Заўсёды дазваляць кароткі паказ \n\n"<b>"Узровень 4"</b>" \n- Забараняць перапыняць рэжым поўнага экрана \n- Заўсёды дазваляць кароткі паказ \n\n"<b>"Узровень 3"</b>" \n- Забараняць перапыняць рэжым поўнага экрана \n- Ніколі не дазваляць кароткі паказ \n\n"<b>"Узровень 2"</b>" \n- Забараняць перапыняць рэжым поўнага экрана \n- Ніколі не дазваляць кароткі паказ \n- Ніколі не прайграваць гук і не вібрыраваць \n\n"<b>"Узровень 1"</b>" \n- Забараняць перапыняць рэжым поўнага экрана \n- Ніколі не дазваляць кароткі паказ \n- Ніколі не прайграваць гук і не вібрыраваць \n- Хаваць з экрана блакіроўкі і панэлі стану \n- Паказваць унізе спіса апавяшчэнняў \n\n"<b>"Узровень 0"</b>" \n- Блакіраваць усе апавяшчэнні ад праграмы"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Апавяшчэнні"</string>
- <string name="notification_channel_disabled" msgid="344536703863700565">"Вы больш не будзеце бачыць гэты апавяшчэнні"</string>
+ <string name="notification_channel_disabled" msgid="344536703863700565">"Вы больш не будзеце бачыць гэтыя апавяшчэнні"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Працягваць паказваць гэтыя апавяшчэнні?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Спыніць апавяшчэнні"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Працягваць паказваць"</string>
<string name="inline_keep_showing_app" msgid="1723113469580031041">"Працягваць паказваць апавяшчэнні гэтай праграмы?"</string>
- <string name="notification_unblockable_desc" msgid="1037434112919403708">"Немагчыма адключыць гэты апавяшчэнні"</string>
+ <string name="notification_unblockable_desc" msgid="1037434112919403708">"Немагчыма адключыць гэтыя апавяшчэнні"</string>
<string name="notification_channel_controls_opened_accessibility" msgid="6553950422055908113">"Кіраванне апавяшчэннямі для <xliff:g id="APP_NAME">%1$s</xliff:g> адкрыта"</string>
<string name="notification_channel_controls_closed_accessibility" msgid="7521619812603693144">"Кіраванне апавяшчэннямі для <xliff:g id="APP_NAME">%1$s</xliff:g> закрыта"</string>
<string name="notification_channel_switch_accessibility" msgid="3420796005601900717">"Дазволіць апавяшчэнні з гэтага канала"</string>
@@ -666,7 +692,8 @@
<item msgid="1545641631806817203">"Буфер абмену"</item>
<item msgid="5742013440802239414">"Код клавішы"</item>
<item msgid="8802889973626281575">"Пераключальнік клавіятуры"</item>
- <item msgid="8175437057325747277">"Няма"</item>
+ <item msgid="7095517796293767867">"Паварот"</item>
+ <item msgid="8494159969042135235">"Няма"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Звычайная"</item>
@@ -790,4 +817,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Дакраніцеся, каб даведацца пра выкарыстанне трафіка і акумулятара"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Выключыць мабільную перадачу даных?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Праграма хавае запыт на дазвол, таму ваш адказ немагчыма спраўдзіць у Наладах."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Дазволіць праграме <xliff:g id="APP_0">%1$s</xliff:g> паказваць зрэзы праграмы <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Можа счытваць інфармацыю з праграмы <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Можа выконваць дзеянні ў праграме <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Дазволіць праграме <xliff:g id="APP">%1$s</xliff:g> паказваць зрэзы з усіх праграм"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Дазволіць"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Адмовіць"</string>
</resources>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index fbdf93c..2a5ee20 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"Завъртане на екрана"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Общ преглед"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Търсене"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"отваряне на камерата"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Избиране на ново оформление за задачите"</string>
<string name="cancel" msgid="6442560571259935130">"Отказ"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Бутон за промяна на мащаба с цел съвместимост."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Промяна на мащаба на екрана от по-малък до по-голям."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth е включен."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Звънът е заглушен."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Работен режим"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Отхвърляне на <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Приложението <xliff:g id="APP">%s</xliff:g> е отхвърлено."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Всички скорошни приложения са отхвърлени."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> устройства)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth е изключен"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Няма налични сдвоени устройства"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Батерия: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Аудио"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Слушалки"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Вход"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Яркост"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Автоматична ориентация"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Автоматично завъртане на екрана"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Установява се връзка..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Тетъринг"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Точка за достъп"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Известия"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Фенерче"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Мобилни данни"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Използвано: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Ограничение от <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Предупреждение: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Работен режим"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Нощно осветление"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Ще се вкл. по залез"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"До изгрев"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Ще се включи в <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"До <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"КБП"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"КБП е деактивирана"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"КБП е активирана"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Приложението <xliff:g id="APP">%s</xliff:g> е деактивирано в безопасния режим."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Изчистване на всичко"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Преместете тук с плъзгане, за да използвате режим за разделен екран"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Хоризонтално разделяне"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Вертикално разделяне"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Персонализирано разделяне"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"С помощта на контролите за известията можете да зададете ниво на важност от 0 до 5 за известията от дадено приложение. \n\n"<b>"Ниво 5"</b>" \n– Показване най-горе в списъка с известия. \n– Разрешаване на прекъсването на цял екран. \n– Известията винаги се показват мимолетно. \n\n"<b>"Ниво 4"</b>" \n– Предотвратяване на прекъсването на цял екран. \n– Известията винаги се показват мимолетно. \n\n"<b>"Ниво 3"</b>" \n– Предотвратяване на прекъсването на цял екран. \n– Известията никога не се показват мимолетно. \n\n"<b>"Ниво 2"</b>" \n– Предотвратяване на прекъсването на цял екран. \n– Известията никога не се показват мимолетно. \n– Без издаване на звуков сигнал и вибриране. \n\n"<b>"Ниво 1"</b>" \n– Предотвратяване на прекъсването на цял екран. \n– Известията никога не се показват мимолетно. \n– Без издаване на звуков сигнал и вибриране. \n– Скриване от заключения екран и лентата на състоянието. \n– Показване най-долу в списъка с известия. \n\n"<b>"Ниво 0"</b>" \n– Блокиране на всички известия от приложението."</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Известия"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Вече няма да виждате тези известия"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Тези известия да продължат ли да се показват?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Спиране на известията"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Да продължат да се показват"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Буферна памет"</item>
<item msgid="5742013440802239414">"Клавишен код"</item>
<item msgid="8802889973626281575">"Превключвател на клавиатурата"</item>
- <item msgid="8175437057325747277">"Няма"</item>
+ <item msgid="7095517796293767867">"Предложение за завъртане"</item>
+ <item msgid="8494159969042135235">"Без"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Нормално"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Докоснете за информация относно използването на батерията и преноса на данни"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Да се изключат ли мобилните данни?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"От Настройки не може да се получи потвърждение за отговора ви, защото заявката за разрешение се прикрива от приложение."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Искате ли да разрешите на <xliff:g id="APP_0">%1$s</xliff:g> да показва части от <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– Може да чете информация от <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– Може да предприема действия в/ъв <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Разрешаване на <xliff:g id="APP">%1$s</xliff:g> да показва части от което и да е приложение"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Разрешаване"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Отказ"</string>
</resources>
diff --git a/packages/SystemUI/res/values-bn/strings.xml b/packages/SystemUI/res/values-bn/strings.xml
index a8e0c2b..4cbb5ed 100644
--- a/packages/SystemUI/res/values-bn/strings.xml
+++ b/packages/SystemUI/res/values-bn/strings.xml
@@ -33,13 +33,10 @@
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"চলতে-থাকা"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"বিজ্ঞপ্তিগুলি"</string>
<string name="battery_low_title" msgid="6456385927409742437">"ব্যাটারি কম"</string>
- <!-- no translation found for battery_low_title_hybrid (6268991275887381595) -->
- <skip />
+ <string name="battery_low_title_hybrid" msgid="6268991275887381595">"চার্জ কম। ব্যাটারি সেভার চালু করুন"</string>
<string name="battery_low_percent_format" msgid="2900940511201380775">"<xliff:g id="PERCENTAGE">%s</xliff:g> অবশিষ্ট আছে"</string>
- <!-- no translation found for battery_low_percent_format_hybrid (6838677459286775617) -->
- <skip />
- <!-- no translation found for battery_low_percent_format_hybrid_short (9025795469949145586) -->
- <skip />
+ <string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"<xliff:g id="PERCENTAGE">%s</xliff:g> বাকি আছে, বর্তমান ব্যবহারের ভিত্তিতে আর <xliff:g id="TIME">%s</xliff:g> চলবে"</string>
+ <string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"<xliff:g id="PERCENTAGE">%s</xliff:g> বাকি আছে, আর <xliff:g id="TIME">%s</xliff:g> চলবে"</string>
<string name="battery_low_percent_format_saver_started" msgid="7879389868952879166">"<xliff:g id="PERCENTAGE">%s</xliff:g> অবশিষ্ট আছে। ব্যাটারি সেভার চালু আছে।"</string>
<string name="invalid_charger" msgid="4549105996740522523">"USB চার্জিং সমর্থিত নয়৷\nকেবলমাত্র সরবহারকৃত চার্জার ব্যবহার করুন৷"</string>
<string name="invalid_charger_title" msgid="3515740382572798460">"USB চার্জিং সমর্থিত নয়।"</string>
@@ -73,22 +70,15 @@
<string name="usb_debugging_secondary_user_message" msgid="6067122453571699801">"ব্যবহারকারী এখন এই ডিভাইসে সাইন-ইন করেছেন তাই USB ডিবাগিং চালু করা যাবে না। এই বৈশিষ্ট্যটি ব্যবহার করতে, প্রাথমিক ব্যবহারকারীতে পাল্টে নিন।"</string>
<string name="compat_mode_on" msgid="6623839244840638213">"স্ক্রীণ পূরণ করতে জুম করুন"</string>
<string name="compat_mode_off" msgid="4434467572461327898">"ফুল স্ক্রিন করুন"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"স্ক্রিনশট নিন"</string>
<string name="screenshot_saving_ticker" msgid="7403652894056693515">"স্ক্রিনশট সেভ করা হচ্ছে..."</string>
<string name="screenshot_saving_title" msgid="8242282144535555697">"স্ক্রিনশট সেভ করা হচ্ছে..."</string>
- <!-- no translation found for screenshot_saving_text (2545047868936087248) -->
- <skip />
- <!-- no translation found for screenshot_saved_title (5637073968117370753) -->
- <skip />
- <!-- no translation found for screenshot_saved_text (7574667448002050363) -->
- <skip />
- <!-- no translation found for screenshot_failed_title (9096484883063264803) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_unknown_text (8844781948876286488) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_text (3041612585107107310) -->
- <skip />
+ <string name="screenshot_saving_text" msgid="2545047868936087248">"স্ক্রিনশট সেভ করা হচ্ছে"</string>
+ <string name="screenshot_saved_title" msgid="5637073968117370753">"স্ক্রিনশট সেভ করা হয়েছে"</string>
+ <string name="screenshot_saved_text" msgid="7574667448002050363">"স্ক্রিনশটটি দেখতে ট্যাপ করুন"</string>
+ <string name="screenshot_failed_title" msgid="9096484883063264803">"স্ক্রিনশট নেওয়া যায়নি"</string>
+ <string name="screenshot_failed_to_save_unknown_text" msgid="8844781948876286488">"স্ক্রিনশট সেভ করার সময় সমস্যা হয়েছে"</string>
+ <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"বেশি জায়গা নেই তাই স্ক্রিনশটটি সেভ করা যাবে না৷"</string>
<string name="screenshot_failed_to_capture_text" msgid="173674476457581486">"এই অ্যাপ বা আপনার প্রতিষ্ঠান স্ক্রিনশট নেওয়ার অনুমতি দেয়নি"</string>
<string name="usb_preference_title" msgid="6551050377388882787">"USB ফাইল স্থানান্তরের বিকল্পগুলি"</string>
<string name="use_mtp_button_title" msgid="4333504413563023626">"একটি মিডিয়া প্লেয়ার হিসেবে মাউন্ট করুন (MTP)"</string>
@@ -98,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"স্ক্রিন ঘোরান"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"এক নজরে"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"খুঁজুন"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"ক্যামেরা"</string>
@@ -112,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"ক্যামেরা খুলুন"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"নতুন কার্য লেআউট বেছে নিন"</string>
<string name="cancel" msgid="6442560571259935130">"বাতিল করুন"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"সামঞ্জস্যের জুম বোতাম৷"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ছোট থেকে বৃহৎ স্ক্রীণে জুম করুন৷"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"ব্লুটুথ সংযুক্ত হয়েছে৷"</string>
@@ -188,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"রিং বাজানো বন্ধ করুন৷"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"কাজের মোড"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> খারিজ করুন।"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> খারিজ করা হয়েছে৷"</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"সমস্ত সাম্প্রতিক অ্যাপ্লিকেশন খারিজ করা হয়েছে।"</string>
@@ -285,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"ব্লুটুথ (<xliff:g id="NUMBER">%d</xliff:g> টি ডিভাইস)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"ব্লুটুথ বন্ধ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"চেনা কোনও ডিভাইস নেই"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"চার্জ <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"অডিও"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"হেডসেট"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"ইনপুট"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"উজ্জ্বলতা"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"স্বতঃ ঘূর্ণায়মান"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"স্বতঃ-ঘূর্ণায়মান স্ক্রিন"</string>
@@ -325,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"সংযুক্ত হচ্ছে..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"টেদারিং"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"হটস্পট"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"বিজ্ঞপ্তিগুলি"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"ফ্ল্যাশলাইট"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"মোবাইল ডেটা"</string>
@@ -334,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> ব্যবহৃত হয়েছে"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"সীমা <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> সতর্কতা"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"কাজের মোড"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"নাইট লাইট"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"সূর্যাস্তে চালু হবে"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"সূর্যোদয় পর্যন্ত"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g> এ চালু হবে"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> পর্যন্ত"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC অক্ষম করা আছে"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC সক্ষম করা আছে"</string>
@@ -348,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"নিরাপদ মোডে <xliff:g id="APP">%s</xliff:g> অক্ষম করা হয়েছে৷"</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"সবকিছু সাফ করুন"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"বিভক্ত স্ক্রীন ব্যবহার করতে এখানে টেনে আনুন"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"অনুভূমিক স্প্লিট"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"উল্লম্ব স্প্লিট"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"কাস্টম স্প্লিট করুন"</string>
@@ -571,27 +585,21 @@
<string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"বন্ধ আছে"</string>
<string name="power_notification_controls_description" msgid="4372459941671353358">"পাওয়ার বিজ্ঞপ্তির নিয়ন্ত্রণগুলি ব্যহবার করে, আপনি কোনও অ্যাপ্লিকেশনের বিজ্ঞপ্তির জন্য ০ থেকে ৫ পর্যন্ত একটি গুরুত্বের লেভেলকে সেট করতে পারবেন৷ \n\n"<b>"লেভেল ৫"</b>" \n- বিজ্ঞপ্তি তালিকার শীর্ষে দেখায় \n- পূর্ণ স্ক্রিনের বাধাকে অনুমতি দেয় \n- সর্বদা স্ক্রিনে উপস্থিত হয় \n\n"<b>"লেভেল ৪"</b>" \n- পূর্ণ স্ক্রিনের বাধাকে আটকায় \n- সর্বদা স্ক্রিনে উপস্থিত হয় \n\n"<b>"লেভেল ৩"</b>" \n- পূর্ণ স্ক্রিনের বাধাকে আটকায় \n- কখনওই স্ক্রিনে উপস্থিত হয় না \n\n"<b>"লেভেল ২"</b>" \n- পূর্ণ স্ক্রিনের বাধাকে আটকায় \n- কখনওই স্ক্রিনে উপস্থিত হয় না \n- কখনওই শব্দ এবং কম্পন করে না \n\n"<b>"লেভেল ১"</b>" \n- পূর্ণ স্ক্রিনের বাধাকে আটকায় \n- কখনওই স্ক্রিনে উপস্থিত হয় না \n- কখনওই শব্দ এবং কম্পন করে না \n- লক স্ক্রিন এবং স্ট্যাটাস বার থেকে লুকায় \n- বিজ্ঞপ্তি তালিকার নীচের দিকে দেখায় \n\n"<b>"লেভেল ০"</b>" \n- অ্যাপ্লিকেশন থেকে সমস্ত বিজ্ঞপ্তিকে অবরূদ্ধ করে"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"বিজ্ঞপ্তি"</string>
- <!-- no translation found for notification_channel_disabled (344536703863700565) -->
+ <string name="notification_channel_disabled" msgid="344536703863700565">"এই বিজ্ঞপ্তিগুলি আপনাকে আর দেখানো হবে না"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
<skip />
- <!-- no translation found for inline_keep_showing (8945102997083836858) -->
- <skip />
- <!-- no translation found for inline_stop_button (4172980096860941033) -->
- <skip />
- <!-- no translation found for inline_keep_button (6665940297019018232) -->
- <skip />
- <!-- no translation found for inline_keep_showing_app (1723113469580031041) -->
- <skip />
- <!-- no translation found for notification_unblockable_desc (1037434112919403708) -->
- <skip />
+ <string name="inline_keep_showing" msgid="8945102997083836858">"এই বিজ্ঞপ্তিগুলি পরেও দেখে যেতে চান?"</string>
+ <string name="inline_stop_button" msgid="4172980096860941033">"বিজ্ঞপ্তি বন্ধ করুন"</string>
+ <string name="inline_keep_button" msgid="6665940297019018232">"দেখতে থাকুন"</string>
+ <string name="inline_keep_showing_app" msgid="1723113469580031041">"এই অ্যাপের বিজ্ঞপ্তি পরেও দেখে যেতে চান?"</string>
+ <string name="notification_unblockable_desc" msgid="1037434112919403708">"এই বিজ্ঞপ্তিগুলি বন্ধ করা যাবে না"</string>
<string name="notification_channel_controls_opened_accessibility" msgid="6553950422055908113">"<xliff:g id="APP_NAME">%1$s</xliff:g> খোলা থাকলে বিজ্ঞপ্তি নিয়ন্ত্রণ"</string>
<string name="notification_channel_controls_closed_accessibility" msgid="7521619812603693144">"<xliff:g id="APP_NAME">%1$s</xliff:g> বন্ধ থাকলে বিজ্ঞপ্তি নিয়ন্ত্রণ"</string>
<string name="notification_channel_switch_accessibility" msgid="3420796005601900717">"এই চ্যানেল থেকে বিজ্ঞপ্তি আসতে দেয়"</string>
<string name="notification_more_settings" msgid="816306283396553571">"আরও সেটিংস"</string>
- <!-- no translation found for notification_app_settings (420348114670768449) -->
- <skip />
+ <string name="notification_app_settings" msgid="420348114670768449">"কাস্টমাইজ করুন"</string>
<string name="notification_done" msgid="5279426047273930175">"সম্পন্ন"</string>
- <!-- no translation found for inline_undo (558916737624706010) -->
- <skip />
+ <string name="inline_undo" msgid="558916737624706010">"আগের অবস্থায় ফিরে যান"</string>
<string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
<string name="notification_menu_gear_description" msgid="2204480013726775108">"বিজ্ঞপ্তির নিয়ন্ত্রণগুলি"</string>
<string name="notification_menu_snooze_description" msgid="3653669438131034525">"বিজ্ঞপ্তি মনে করিয়ে দেওয়ার বিকল্পগুলি"</string>
@@ -674,7 +682,8 @@
<item msgid="1545641631806817203">"ক্লিপবোর্ড"</item>
<item msgid="5742013440802239414">"কীকোড"</item>
<item msgid="8802889973626281575">"কিবোর্ড স্যুইচার"</item>
- <item msgid="8175437057325747277">"কোনো কিছুই নয়"</item>
+ <item msgid="7095517796293767867">"ঘুরিয়ে দেখার বিষয়ে প্রস্তাবনা"</item>
+ <item msgid="8494159969042135235">"কোনওটিই নয়"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"সাধারণ"</item>
@@ -798,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"ব্যাটারি এবং ডেটার ব্যবহারের বিশদ বিবরণের জন্য ট্যাপ করুন"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"মোবাইল ডেটা বন্ধ করবেন?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"একটি অ্যাপ কোনও অনুমোদনের অনুরোধকে ঢেকে দিচ্ছে, তাই সেটিংস থেকে আপনার প্রতিক্রিয়া যাচাই করা যাচ্ছে না।"</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> অ্যাপটিকে <xliff:g id="APP_2">%2$s</xliff:g> এর অংশ দেখানোর অনুমতি দেবেন?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- এটি <xliff:g id="APP">%1$s</xliff:g> এর তথ্য অ্যাক্সেস করতে পারবে"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- এটি <xliff:g id="APP">%1$s</xliff:g> এর মধ্যে কাজ করতে পারবে"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g> অ্যাপটিকে যেকোনও অ্যাপের অংশ দেখাতে দিন"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"অনুমতি দিন"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"খারিজ করুন"</string>
</resources>
diff --git a/packages/SystemUI/res/values-bs/strings.xml b/packages/SystemUI/res/values-bs/strings.xml
index 69b8fbe..7f8d001 100644
--- a/packages/SystemUI/res/values-bs/strings.xml
+++ b/packages/SystemUI/res/values-bs/strings.xml
@@ -74,7 +74,7 @@
<string name="global_action_screenshot" msgid="8329831278085426283">"Snimak ekrana"</string>
<string name="screenshot_saving_ticker" msgid="7403652894056693515">"Spašavanje snimka ekrana..."</string>
<string name="screenshot_saving_title" msgid="8242282144535555697">"Spašavanje snimka ekrana..."</string>
- <string name="screenshot_saving_text" msgid="2545047868936087248">"Snimak ekrana se čuva"</string>
+ <string name="screenshot_saving_text" msgid="2545047868936087248">"Snimak ekrana se pohranjuje"</string>
<string name="screenshot_saved_title" msgid="5637073968117370753">"Snimak ekrana je sačuvan"</string>
<string name="screenshot_saved_text" msgid="7574667448002050363">"Dodirnite za prikaz snimka ekrana"</string>
<string name="screenshot_failed_title" msgid="9096484883063264803">"Pravljenje snimka ekrana nije uspjelo"</string>
@@ -89,6 +89,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Dugme za početnu stranicu"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Dugme Meni"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Pristupačnost"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Rotiraj ekran"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Pregled"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Traži"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -103,6 +104,12 @@
<string name="camera_label" msgid="7261107956054836961">"otvori kameru"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Odaberite novi raspored zadataka"</string>
<string name="cancel" msgid="6442560571259935130">"Otkaži"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Dugme za uvećavanje u slučaju nekompatibilnosti."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Uvećani prikaz manjeg ekrana na većem ekranu."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth je povezan."</string>
@@ -179,7 +186,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Zvuk zvona nečujan."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Poslovni režim"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Odbaci aplikaciju <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Aplikacija <xliff:g id="APP">%s</xliff:g> uklonjena."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Sve nedavno korištene aplikacije su odbačene."</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (broj uređaja: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth isključen."</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Nema dostupnih uparenih uređaja"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> baterije"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Zvuk"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Slušalice"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Ulaz"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Osvjetljenje"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Automatsko rotiranje"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Automatsko rotiranje ekrana"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Povezivanje..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Dijeljenje veze"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Pristupna tačka"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Obavještenja"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Svjetiljka"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Prijenos podataka na mobilnoj mreži"</string>
@@ -326,8 +341,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Iskorišteno <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Ograničenje <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Upozorenje <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Poslovni režim"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Noćno svjetlo"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Uključuje se u suton"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Do svitanja"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Uključuje se u <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Do <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC je onemogućen"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC je omogućen"</string>
@@ -340,6 +362,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> je onemogućena u sigurnom načinu rada."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Obriši sve"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Povucite ovdje za korištenje podijeljenog ekrana"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Podjela po horizontali"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Podjela po vertikali"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Prilagođena podjela"</string>
@@ -566,6 +590,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Uz kontrolu obavještenja o napajanju, možete postaviti nivo značaja obavještenja iz aplikacije, i to od nivoa 0 do 5. \n\n"<b>"Nivo 5"</b>" \n- Prikaži na vrhu liste obavještenja \n- Dopusti prekid prikaza cijelog ekrana \n- Uvijek izviruj \n\n"<b>"Nvio 4"</b>" \n- Spriječi prekid prikaza cijelog ekrana \n- Uvijek izviruj \n\n"<b>"Nivo 3"</b>" \n- Spriječi prekid prikaza cijelog ekrana \n- Nikad ne izviruj \n\n"<b>"Nivo 2"</b>" \n- Spriječi prekid prikaza cijelog ekrana \n- Nikad ne izviruj \n- Nikada ne puštaj zvuk ili vibraciju \n\n"<b>"Nivo 1"</b>" \n- Spriječi prekid prikaza cijelog ekrana \n- Nikada ne izviruj \n- Nikada ne puštaj zvuk ili vibraciju \n- Sakrij sa ekrana za zaključavanje i statusne trake \n- Prikaži na dnu liste obavještenja \n\n"<b>"Nivo 0"</b>" \n- Blokiraj sva obavještenja iz aplikacije"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Obavještenja"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Nećete više vidjeti ova obavještenja"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Nastaviti prikazivanje ovih obavještenja?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Zaustavi obavještenja"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Nastavi prikazivanje"</string>
@@ -662,7 +688,8 @@
<item msgid="1545641631806817203">"Međumemorija"</item>
<item msgid="5742013440802239414">"Kôd tipke"</item>
<item msgid="8802889973626281575">"Prebacivač tastatura"</item>
- <item msgid="8175437057325747277">"Ništa"</item>
+ <item msgid="7095517796293767867">"Prijedlog rotacije"</item>
+ <item msgid="8494159969042135235">"Nema"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normalna"</item>
@@ -786,4 +813,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Dodirnite za detalje o potrošnji baterije i prijenosa podataka"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Želite li isključiti prijenos podataka na mobilnoj mreži?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Postavke ne mogu potvrditi vaš odgovor jer aplikacija zaklanja zahtjev za odobrenje."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Dozvoliti aplikaciji <xliff:g id="APP_0">%1$s</xliff:g> prikazivanje isječaka aplikacije <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Može čitati informacije iz aplikacije <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Može poduzeti radnje unutar aplikacije <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Dozvoli aplikaciji <xliff:g id="APP">%1$s</xliff:g> prikazivanje isječaka iz svake aplikacije"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Dozvoli"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Odbij"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index d61d15e..8d61a9a 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Pàgina d\'inici"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menú"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accessibilitat"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Gira la pantalla"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Aplicacions recents"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Cerca"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Càmera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"obre la càmera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Selecciona el disseny de la tasca nova"</string>
<string name="cancel" msgid="6442560571259935130">"Cancel·la"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Botó de zoom de compatibilitat."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Amplia menys com més gran sigui la pantalla."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth connectat."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Mode silenci."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Mode de feina"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Ignora <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"S\'ha omès <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"S\'han descartat totes les aplicacions recents."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispositius)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth desactivat"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"No hi ha dispositius vinculats disponibles"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> de bateria"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Àudio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Auriculars"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Entrada"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brillantor"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Gira automàticament"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Gira la pantalla automàticament"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"S\'està connectant..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Compartició de xarxa"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Punt d\'accés Wi-Fi"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notificacions"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Llanterna"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Dades mòbils"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Utilitzats: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Límit: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Advertiment: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Mode de feina"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Llum nocturna"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"A la posta de sol"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Fins a l\'alba"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"S\'activarà a les <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Fins a les <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"L\'NFC està desactivada"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"L\'NFC està activada"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"En mode segur, l\'aplicació <xliff:g id="APP">%s</xliff:g> està desactivada."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Esborra-ho tot"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Arrossega-ho aquí per utilitzar la pantalla dividida"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Divisió horitzontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Divisió vertical"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Divisió personalitzada"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Amb els controls de notificació millorats, pots establir un nivell d\'importància d\'entre 0 i 5 per a les notificacions d\'una aplicació. \n\n"<b>"Nivell 5"</b>" \n- Mostra les notificacions a la part superior de la llista \n- Permet la interrupció de la pantalla completa \n- Permet sempre la previsualització \n\n"<b>"Nivell 4"</b>" \n- No permet la interrupció de la pantalla completa \n- Permet sempre la previsualització \n\n"<b>"Nivell 3"</b>" \n- No permet la interrupció de la pantalla completa \n- No permet mai la previsualització \n\n"<b>"Nivell 2"</b>" \n- No permet la interrupció de la pantalla completa \n- No permet mai la previsualització \n- Les notificacions no poden emetre sons ni vibracions \n\n"<b>"Nivell 1"</b>" \n- No permet la interrupció de la pantalla completa \n- No permet mai la previsualització \n- No activa mai el so ni la vibració \n- Amaga les notificacions de la pantalla de bloqueig i de la barra d\'estat \n- Mostra les notificacions a la part inferior de la llista \n\n"<b>"Nivell 0"</b>" \n- Bloqueja totes les notificacions de l\'aplicació"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notificacions"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Ja no veuràs aquestes notificacions"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Vols continuar rebent aquestes notificacions?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Deixa d\'enviar notificacions"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Continua rebent"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Porta-retalls"</item>
<item msgid="5742013440802239414">"Codi de tecla"</item>
<item msgid="8802889973626281575">"Commutador del teclat"</item>
- <item msgid="8175437057325747277">"Cap"</item>
+ <item msgid="7095517796293767867">"Suggeriment de rotació"</item>
+ <item msgid="8494159969042135235">"Cap"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Toca per obtenir informació sobre l\'ús de dades i de bateria"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Vols desactivar les dades mòbils?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Com que hi ha una aplicació que oculta una sol·licitud de permís, no es pot verificar la teva resposta des de la configuració."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Vols permetre que <xliff:g id="APP_0">%1$s</xliff:g> mostri porcions de l\'aplicació <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Pot llegir informació de l\'aplicació <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Pot dur a terme accions dins de l\'aplicació <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Permet que <xliff:g id="APP">%1$s</xliff:g> mostri porcions de qualsevol aplicació"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Permet"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Denega"</string>
</resources>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index bb0d362..3c3e1d4 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -90,6 +90,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Domů"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Přístupnost"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Otočení obrazovky"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Přehled"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Hledat"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparát"</string>
@@ -104,6 +105,12 @@
<string name="camera_label" msgid="7261107956054836961">"spustit fotoaparát"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Vybrat nové rozvržení úkolů"</string>
<string name="cancel" msgid="6442560571259935130">"Zrušit"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Tlačítko úpravy velikosti z důvodu kompatibility"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zvětšit menší obrázek na větší obrazovku."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Rozhraní Bluetooth je připojeno."</string>
@@ -182,7 +189,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Tiché vyzvánění."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Pracovní režim"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Zavřít aplikaci <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Aplikace <xliff:g id="APP">%s</xliff:g> byla odebrána."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Všechny naposledy použité aplikace byly odstraněny."</string>
@@ -281,6 +289,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> zařízení)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Rozhraní Bluetooth je vypnuto"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Nejsou dostupná žádná spárovaná zařízení"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Baterie: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Zvuk"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Náhlavní souprava"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Vstup"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Jas"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Automatické otáčení"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Automatické otočení obrazovky"</string>
@@ -321,6 +333,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Připojování..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Sdílené připojení"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Oznámení"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Svítilna"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobilní data"</string>
@@ -330,8 +345,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Využito: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Limit: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Upozornění při <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Pracovní režim"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Noční režim"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Zapnout při soumraku"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Do svítání"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Zapnout v <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Do <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC je vypnuto"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC je zapnuto"</string>
@@ -344,6 +366,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Aplikace <xliff:g id="APP">%s</xliff:g> je v nouzovém režimu zakázána."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Vymazat vše"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Rozdělenou obrazovku můžete použít přetažením zde"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Vodorovné rozdělení"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Vertikální rozdělení"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Vlastní rozdělení"</string>
@@ -568,6 +592,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Rozšířené ovládací prvky oznámení umožňují nastavit úroveň důležitosti oznámení aplikace od 0 do 5. \n\n"<b>"Úroveň 5"</b>" \n– Zobrazit na začátku seznamu oznámení \n– Povolit vyrušení na celou obrazovku \n– Vždy zobrazit náhled \n\n"<b>"Úroveň 4"</b>" \n– Zabránit vyrušení na celou obrazovku \n– Vždy zobrazit náhled \n\n"<b>"Úroveň 3"</b>" \n– Zabránit vyrušení na celou obrazovku \n– Nikdy nezobrazovat náhled \n\n"<b>"Úroveň 2"</b>" \n– Zabránit vyrušení na celou obrazovku \n– Nikdy nezobrazovat náhled \n– Nikdy nevydávat žádný zvukový signál ani nevibrovat \n\n"<b>"Úroveň 1"</b>" \n– Zabránit vyrušení na celou obrazovku \n– Nikdy nezobrazovat náhled \n– Nikdy nevydávat zvukový signál ani nevibrovat \n– Skrýt z obrazovky uzamčení a stavového řádku \n– Zobrazovat na konci seznamu oznámení \n\n"<b>";Úroveň 0"</b>" \n– Blokovat všechna oznámení z aplikace"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Oznámení"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Tato oznámení již nebudete dostávat"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Mají se tato oznámení nadále zobrazovat?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Přestat zobrazovat oznámení"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Nadále zobrazovat"</string>
@@ -666,7 +692,8 @@
<item msgid="1545641631806817203">"Schránka"</item>
<item msgid="5742013440802239414">"Klávesa"</item>
<item msgid="8802889973626281575">"Přepínač klávesnice"</item>
- <item msgid="8175437057325747277">"Žádné"</item>
+ <item msgid="7095517796293767867">"Doporučené otočení"</item>
+ <item msgid="8494159969042135235">"Žádné"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normální"</item>
@@ -790,4 +817,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Klepnutím zobrazíte podrobnosti o využití baterie a dat"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Vypnout mobilní data?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Žádost o oprávnění je blokována jinou aplikací. Nastavení proto vaši odpověď nemůže ověřit."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Povolit aplikaci <xliff:g id="APP_0">%1$s</xliff:g> zobrazovat ukázky z aplikace <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– Může číst informace z aplikace <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– Může provádět akce v aplikaci <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Povolit aplikaci <xliff:g id="APP">%1$s</xliff:g> zobrazovat ukázky z libovolné aplikace"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Povolit"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Zamítnout"</string>
</resources>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index e2ff065..39895acb 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Startskærm"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Hjælpefunktioner"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Roter skærmen"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Oversigt"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Søg"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"åbn kamera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Vælg nyt opgavelayout"</string>
<string name="cancel" msgid="6442560571259935130">"Annuller"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Knap for kompatibilitetszoom."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom mindre til større skærm."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth tilsluttet."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Lydløs."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Arbejdstilstand"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Afvis <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> er annulleret."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Alle de seneste applikationer er lukket."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> enheder)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth slået fra"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Der er ingen tilgængelige parrede enheder"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> batteri"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Lyd"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Headset"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Input"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Lysstyrke"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Roter automatisk"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Roter skærmen automatisk"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Opretter forbindelse…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Netdeling"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Underretninger"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Lommelygte"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobildata"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> brugt"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Grænse: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Advarsel ved <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Arbejdstilstand"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Nattelys"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Tænd ved solnedgang"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Indtil solopgang"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Tænd kl. <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Indtil kl. <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC er deaktiveret"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC er aktiveret"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> er deaktiveret i sikker tilstand."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Ryd alle"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Træk hertil for at bruge delt skærm"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Opdel vandret"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Opdel lodret"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Opdel brugerdefineret"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Med kontrolelementer til underretninger om strøm kan du konfigurere et vigtighedsniveau fra 0 til 5 for en apps underretninger. \n\n"<b>"Niveau 5"</b>\n"- Vis øverst på listen over underretninger \n- Tillad afbrydelse af fuld skærm \n- Se altid smugkig \n\n"<b>"Niveau 4"</b>\n"- Ingen afbrydelse af fuld skærm \n- Se altid smugkig \n\n"<b>"Niveau 3"</b>\n"- Ingen afbrydelse af fuld skærm \n- Se aldrig smugkig \n\n"<b>"Niveau 2"</b>\n"- Ingen afbrydelse af fuld skærm \n Se aldrig smugkig \n- Ingen lyd og vibration \n\n"<b>"Niveau 1"</b>\n"- Ingen afbrydelse af fuld skærm \n- Se aldrig smugkig \n- Ingen lyd eller vibration \n- Skjul fra låseskærm og statusbjælke \n- Vis nederst på listen over underretninger \n\n"<b>"Niveau 0"</b>\n"- Bloker alle underretninger fra appen."</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Underretninger"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Du får ikke længere vist disse underretninger"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Vil du fortsætte med at se disse underretninger?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Stop underretninger"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Fortsæt med at vise underretninger"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Udklipsholder"</item>
<item msgid="5742013440802239414">"Tastekode"</item>
<item msgid="8802889973626281575">"Tastaturskifter"</item>
- <item msgid="8175437057325747277">"Ingen"</item>
+ <item msgid="7095517796293767867">"Rotationsforslag"</item>
+ <item msgid="8494159969042135235">"Ingen"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Tryk for at se oplysninger om batteri- og dataforbrug"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Vil du deaktivere mobildata?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Indstillinger kan ikke bekræfte dit svar, da en app dækker for en anmodning om tilladelse."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Vil du give <xliff:g id="APP_0">%1$s</xliff:g> tilladelse til at vise eksempler fra <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Den kan læse oplysninger fra <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Den kan foretage handlinger i <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Tillad, at <xliff:g id="APP">%1$s</xliff:g> viser eksempler fra enhver app"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Tillad"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Afvis"</string>
</resources>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 53bf7d8..dd258e1 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Startbildschirm"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menü"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Bedienungshilfen"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Bildschirm drehen"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Übersicht"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Suchen"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"Kamera öffnen"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Neues Aufgabenlayout auswählen"</string>
<string name="cancel" msgid="6442560571259935130">"Abbrechen"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Schaltfläche für Kompatibilitätszoom"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom auf einen größeren Bildschirm"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Mit Bluetooth verbunden"</string>
@@ -182,7 +189,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Klingelton lautlos"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Arbeitsmodus"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> beenden"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> entfernt"</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Alle kürzlich verwendeten Apps wurden entfernt."</string>
@@ -279,6 +287,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Geräte)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth aus"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Keine gekoppelten Geräte verfügbar"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Akkustand: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Headset"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Eingabe"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Helligkeit"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Automatisch drehen"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Bildschirm automatisch drehen"</string>
@@ -319,6 +331,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Verbindung wird hergestellt…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tethering"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Benachrichtigungen"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Taschenlampe"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobile Daten"</string>
@@ -328,8 +343,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> verwendet"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> Datenlimit"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Warnung für <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Arbeitsmodus"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Nachtlicht"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"An bei Sonnenuntergang"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Bis Sonnenaufgang"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"An um <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Bis <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC ist deaktiviert"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC ist aktiviert"</string>
@@ -342,6 +364,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> ist im abgesicherten Modus deaktiviert."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Alle schließen"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Hierher ziehen, um den Bildschirm zu teilen"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Geteilte Schaltfläche – horizontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Geteilte Schaltfläche – vertikal"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Geteilte Schaltfläche – benutzerdefiniert"</string>
@@ -566,6 +590,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Mit den erweiterten Benachrichtigungseinstellungen kannst du für App-Benachrichtigungen eine Wichtigkeitsstufe von 0 bis 5 festlegen. \n\n"<b>"Stufe 5"</b>" \n- Auf der Benachrichtigungsleiste ganz oben anzeigen \n- Vollbildunterbrechung zulassen \n- Immer kurz einblenden \n\n"<b>"Stufe 4"</b>" \n- Keine Vollbildunterbrechung \n- Immer kurz einblenden \n\n"<b>"Stufe 3"</b>" \n- Keine Vollbildunterbrechung \n- Nie kurz einblenden \n\n"<b>"Stufe 2"</b>" \n- Keine Vollbildunterbrechung \n- Nie kurz einblenden \n- Weder Ton noch Vibration \n\n"<b>"Stufe 1"</b>" \n- Keine Vollbildunterbrechung \n- Nie kurz einblenden \n- Weder Ton noch Vibration \n- Auf Sperrbildschirm und Statusleiste verbergen \n- Auf der Benachrichtigungsleiste ganz unten anzeigen \n\n"<b>"Stufe 0"</b>" \n- Alle Benachrichtigungen der App sperren"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Benachrichtigungen"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Du erhältst diese Benachrichtigungen nicht mehr"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Diese Benachrichtigungen weiterhin anzeigen?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Benachrichtigungen nicht mehr anzeigen"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Weiterhin anzeigen"</string>
@@ -660,7 +686,8 @@
<item msgid="1545641631806817203">"Zwischenablage"</item>
<item msgid="5742013440802239414">"Keycode"</item>
<item msgid="8802889973626281575">"Tastaturwechsler"</item>
- <item msgid="8175437057325747277">"Keine"</item>
+ <item msgid="7095517796293767867">"Drehvorschlag"</item>
+ <item msgid="8494159969042135235">"Keine"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Mittig"</item>
@@ -784,4 +811,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Für Details zur Akku- und Datennutzung tippen"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Mobile Daten deaktivieren?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Deine Eingabe wird von \"Einstellungen\" nicht erkannt, weil die Berechtigungsanfrage von einer App verdeckt wird."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> erlauben, Teile von <xliff:g id="APP_2">%2$s</xliff:g> anzuzeigen?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– Darf Informationen aus <xliff:g id="APP">%1$s</xliff:g> lesen"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– Darf Aktionen in <xliff:g id="APP">%1$s</xliff:g> ausführen"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g> darf Teile aus jeder beliebigen App anzeigen"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Zulassen"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Ablehnen"</string>
</resources>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index 663191c..8c30521 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"Περιστροφή οθόνης"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Επισκόπηση"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Αναζήτηση"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Φωτογραφική μηχανή"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"άνοιγμα φωτογραφικής μηχανής"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Επιλέξτε τη νέα διάταξη εργασίας"</string>
<string name="cancel" msgid="6442560571259935130">"Ακύρωση"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Κουμπί εστίασης συμβατότητας."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Ζουμ από μικρότερη σε μεγαλύτερη οθόνη."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Το Bluetooth είναι συνδεδεμένο."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Ειδοποίηση ήχου στο αθόρυβο."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Λειτουργία εργασίας"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Παράβλεψη <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Απορρίφθηκαν <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Έγινε παράβλεψη όλων των πρόσφατων εφαρμογών."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> συσκευές)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Απενεργοποιημένο Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Δεν υπάρχουν διαθέσιμες συσκευές σε σύζευξη"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Μπαταρία <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Ήχος"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Ακουστικά"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Είσοδος"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Φωτεινότητα"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Αυτόματη περιστροφή"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Αυτόματη περιστροφή οθόνης"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Σύνδεση…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Πρόσδεση"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Σημείο πρόσβασης Wi-Fi"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Ειδοποιήσεις"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Φακός"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Δεδομένα κινητής τηλεφωνίας"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Χρησιμοποιούνται <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Όριο <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Προειδοποίηση για <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Λειτουργία εργασίας"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Νυχτερινός φωτισμός"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Κατά τη δύση"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Μέχρι την ανατολή"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Ενεργοποίηση στις <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Έως τις <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"Το NFC είναι απενεργοποιημένο"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"Το NFC είναι ενεργοποιημένο"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Η εφαρμογή <xliff:g id="APP">%s</xliff:g> έχει απενεργοποιηθεί στην ασφαλή λειτουργία."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Διαγραφή όλων"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Σύρετε εδώ για να χρησιμοποιήσετε τον διαχωρισμό οθόνης"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Οριζόντιος διαχωρισμός"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Κάθετος διαχωρισμός"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Προσαρμοσμένος διαχωρισμός"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Με τα στοιχεία ελέγχου ειδοποίησης ισχύος, μπορείτε να ορίσετε ένα επίπεδο βαρύτητας από 0 έως 5 για τις ειδοποιήσεις μιας εφαρμογής. \n\n"<b>"Επίπεδο 5"</b>" \n- Εμφάνιση στην κορυφή της λίστας ειδοποιήσεων \n- Να επιτρέπεται η διακοπή πλήρους οθόνης \n- Να γίνεται πάντα σύντομη προβολή \n\n"<b>"Επίπεδο 4"</b>" \n- Αποτροπή διακοπής πλήρους οθόνης \n- Να γίνεται πάντα σύντομη προβολή \n\n"<b>"Επίπεδο 3"</b>" \n- Αποτροπή διακοπής πλήρους οθόνης \n- Να μην γίνεται ποτέ σύντομη προβολή \n\n"<b>"Επίπεδο 2"</b>" \n- Αποτροπή διακοπής πλήρους οθόνης \n- Να μην γίνεται ποτέ σύντομη προβολή \n- Να μην χρησιμοποιείται ποτέ ήχος και δόνηση \n\n"<b>"Επίπεδο 1"</b>" \n- Αποτροπή διακοπής πλήρους οθόνης \n- Να μην γίνεται ποτέ σύντομη προβολή \n- Να μην χρησιμοποιείται ποτέ ήχος και δόνηση \n- Απόκρυψη από την οθόνη κλειδώματος και τη γραμμή κατάστασης \n- Εμφάνιση στο κάτω μέρος της λίστας ειδοποιήσεων \n\n"<b>"Επίπεδο 0"</b>" \n- Αποκλεισμός όλων των ειδοποιήσεων από την εφαρμογή"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Ειδοποιήσεις"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Δεν θα βλέπετε πλέον αυτές τις ειδοποιήσεις"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Να συνεχίσουν να εμφανίζονται αυτές οι ειδοποιήσεις;"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Διακοπή ειδοποιήσεων"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Συνέχιση εμφάνισης"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Πρόχειρο"</item>
<item msgid="5742013440802239414">"Κωδικός-πλήκτρο"</item>
<item msgid="8802889973626281575">"Εναλλαγή πληκτρολογίων"</item>
- <item msgid="8175437057325747277">"Κανένα"</item>
+ <item msgid="7095517796293767867">"Πρόταση περιστροφής"</item>
+ <item msgid="8494159969042135235">"Κανένα"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Κανονική"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Πατήστε για λεπτομέρειες σχετικά με τη χρήση μπαταρίας και δεδομένων"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Απενεργοποίηση δεδομένων κινητής τηλεφωνίας;"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Επειδή μια εφαρμογή αποκρύπτει ένα αίτημα άδειας, δεν είναι δυνατή η επαλήθευση της απάντησής σας από τις Ρυθμίσεις."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Να επιτρέπεται στην εφαρμογή <xliff:g id="APP_0">%1$s</xliff:g> να εμφανίζει τμήματα της εφαρμογής <xliff:g id="APP_2">%2$s</xliff:g>;"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Μπορεί να διαβάζει πληροφορίες από την εφαρμογή <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Μπορεί να εκτελεί ενέργειες εντός της εφαρμογής <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Να επιτρέπεται στην εφαρμογή <xliff:g id="APP">%1$s</xliff:g> να εμφανίζει τμήματα από οποιαδήποτε εφαρμογή"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Επιτρέπεται"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Δεν επιτρέπεται"</string>
</resources>
diff --git a/packages/SystemUI/res/values-en-rAU/strings.xml b/packages/SystemUI/res/values-en-rAU/strings.xml
index ab759ed..3f6d5e5 100644
--- a/packages/SystemUI/res/values-en-rAU/strings.xml
+++ b/packages/SystemUI/res/values-en-rAU/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accessibility"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Rotate screen"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Overview"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Search"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"open camera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Select new task layout"</string>
<string name="cancel" msgid="6442560571259935130">"Cancel"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Compatibility zoom button."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom smaller to larger screen."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth connected."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Ringer silent."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Work mode"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Dismiss <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> dismissed."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"All recent applications dismissed."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Devices)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth Off"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"No paired devices available"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> battery"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Headset"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Input"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brightness"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Auto-rotate"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Auto-rotate screen"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Connecting..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tethering"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notifications"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Torch"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobile data"</string>
@@ -324,8 +339,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> used"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> limit"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> warning"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Work mode"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"Work profile"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"Notifications & apps are off"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Night Light"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"On at sunset"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Until sunrise"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"On at <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Until <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC is disabled"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC is enabled"</string>
@@ -338,6 +358,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> is disabled in safe-mode."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Clear all"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Drag here to use split screen"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Swipe up to switch apps"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Split Horizontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Split Vertical"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Split Customised"</string>
@@ -562,6 +583,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"With power notification controls, you can set an importance level from 0 to 5 for an app\'s notifications. \n\n"<b>"Level 5"</b>" \n- Show at the top of the notification list \n- Allow full screen interruption \n- Always peek \n\n"<b>"Level 4"</b>" \n- Prevent full screen interruption \n- Always peek \n\n"<b>"Level 3"</b>" \n- Prevent full screen interruption \n- Never peek \n\n"<b>"Level 2"</b>" \n- Prevent full screen interruption \n- Never peek \n- Never make sound and vibration \n\n"<b>"Level 1"</b>" \n- Prevent full screen interruption \n- Never peek \n- Never make sound or vibrate \n- Hide from lock screen and status bar \n- Show at the bottom of the notification list \n\n"<b>"Level 0"</b>" \n- Block all notifications from the app"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notifications"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"You won\'t see these notifications anymore"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Keep showing these notifications?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Stop notifications"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Keep showing"</string>
@@ -656,7 +679,8 @@
<item msgid="1545641631806817203">"Clipboard"</item>
<item msgid="5742013440802239414">"Keycode"</item>
<item msgid="8802889973626281575">"Keyboard switcher"</item>
- <item msgid="8175437057325747277">"None"</item>
+ <item msgid="7095517796293767867">"Rotation suggestion"</item>
+ <item msgid="8494159969042135235">"None"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -780,4 +804,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Tap for details on battery and data usage"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Turn off mobile data?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Because an app is obscuring a permission request, Settings can’t verify your response."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Allow <xliff:g id="APP_0">%1$s</xliff:g> to show <xliff:g id="APP_2">%2$s</xliff:g> slices?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– It can read information from <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– It can take actions inside <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Allow <xliff:g id="APP">%1$s</xliff:g> to show slices from any app"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Allow"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Deny"</string>
</resources>
diff --git a/packages/SystemUI/res/values-en-rCA/strings.xml b/packages/SystemUI/res/values-en-rCA/strings.xml
index 1bd101f..d49c25a 100644
--- a/packages/SystemUI/res/values-en-rCA/strings.xml
+++ b/packages/SystemUI/res/values-en-rCA/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accessibility"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Rotate screen"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Overview"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Search"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"open camera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Select new task layout"</string>
<string name="cancel" msgid="6442560571259935130">"Cancel"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Compatibility zoom button."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom smaller to larger screen."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth connected."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Ringer silent."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Work mode"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Dismiss <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> dismissed."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"All recent applications dismissed."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Devices)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth Off"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"No paired devices available"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> battery"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Headset"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Input"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brightness"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Auto-rotate"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Auto-rotate screen"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Connecting..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tethering"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notifications"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Flashlight"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobile data"</string>
@@ -324,8 +339,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> used"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> limit"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> warning"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Work mode"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"Work profile"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"Notifications & apps are off"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Night Light"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"On at sunset"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Until sunrise"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"On at <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Until <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC is disabled"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC is enabled"</string>
@@ -338,6 +358,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> is disabled in safe-mode."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Clear all"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Drag here to use split screen"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Swipe up to switch apps"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Split Horizontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Split Vertical"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Split Customised"</string>
@@ -562,6 +583,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"With power notification controls, you can set an importance level from 0 to 5 for an app\'s notifications. \n\n"<b>"Level 5"</b>" \n- Show at the top of the notification list \n- Allow full screen interruption \n- Always peek \n\n"<b>"Level 4"</b>" \n- Prevent full screen interruption \n- Always peek \n\n"<b>"Level 3"</b>" \n- Prevent full screen interruption \n- Never peek \n\n"<b>"Level 2"</b>" \n- Prevent full screen interruption \n- Never peek \n- Never make sound and vibration \n\n"<b>"Level 1"</b>" \n- Prevent full screen interruption \n- Never peek \n- Never make sound or vibrate \n- Hide from lock screen and status bar \n- Show at the bottom of the notification list \n\n"<b>"Level 0"</b>" \n- Block all notifications from the app"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notifications"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"You won\'t see these notifications anymore"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Keep showing these notifications?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Stop notifications"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Keep showing"</string>
@@ -656,7 +679,8 @@
<item msgid="1545641631806817203">"Clipboard"</item>
<item msgid="5742013440802239414">"Keycode"</item>
<item msgid="8802889973626281575">"Keyboard switcher"</item>
- <item msgid="8175437057325747277">"None"</item>
+ <item msgid="7095517796293767867">"Rotation suggestion"</item>
+ <item msgid="8494159969042135235">"None"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -780,4 +804,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Tap for details on battery and data usage"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Turn off mobile data?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Because an app is obscuring a permission request, Settings can’t verify your response."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Allow <xliff:g id="APP_0">%1$s</xliff:g> to show <xliff:g id="APP_2">%2$s</xliff:g> slices?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– It can read information from <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– It can take actions inside <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Allow <xliff:g id="APP">%1$s</xliff:g> to show slices from any app"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Allow"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Deny"</string>
</resources>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index ab759ed..3f6d5e5 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accessibility"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Rotate screen"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Overview"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Search"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"open camera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Select new task layout"</string>
<string name="cancel" msgid="6442560571259935130">"Cancel"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Compatibility zoom button."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom smaller to larger screen."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth connected."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Ringer silent."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Work mode"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Dismiss <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> dismissed."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"All recent applications dismissed."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Devices)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth Off"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"No paired devices available"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> battery"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Headset"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Input"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brightness"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Auto-rotate"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Auto-rotate screen"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Connecting..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tethering"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notifications"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Torch"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobile data"</string>
@@ -324,8 +339,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> used"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> limit"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> warning"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Work mode"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"Work profile"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"Notifications & apps are off"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Night Light"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"On at sunset"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Until sunrise"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"On at <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Until <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC is disabled"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC is enabled"</string>
@@ -338,6 +358,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> is disabled in safe-mode."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Clear all"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Drag here to use split screen"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Swipe up to switch apps"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Split Horizontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Split Vertical"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Split Customised"</string>
@@ -562,6 +583,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"With power notification controls, you can set an importance level from 0 to 5 for an app\'s notifications. \n\n"<b>"Level 5"</b>" \n- Show at the top of the notification list \n- Allow full screen interruption \n- Always peek \n\n"<b>"Level 4"</b>" \n- Prevent full screen interruption \n- Always peek \n\n"<b>"Level 3"</b>" \n- Prevent full screen interruption \n- Never peek \n\n"<b>"Level 2"</b>" \n- Prevent full screen interruption \n- Never peek \n- Never make sound and vibration \n\n"<b>"Level 1"</b>" \n- Prevent full screen interruption \n- Never peek \n- Never make sound or vibrate \n- Hide from lock screen and status bar \n- Show at the bottom of the notification list \n\n"<b>"Level 0"</b>" \n- Block all notifications from the app"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notifications"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"You won\'t see these notifications anymore"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Keep showing these notifications?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Stop notifications"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Keep showing"</string>
@@ -656,7 +679,8 @@
<item msgid="1545641631806817203">"Clipboard"</item>
<item msgid="5742013440802239414">"Keycode"</item>
<item msgid="8802889973626281575">"Keyboard switcher"</item>
- <item msgid="8175437057325747277">"None"</item>
+ <item msgid="7095517796293767867">"Rotation suggestion"</item>
+ <item msgid="8494159969042135235">"None"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -780,4 +804,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Tap for details on battery and data usage"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Turn off mobile data?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Because an app is obscuring a permission request, Settings can’t verify your response."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Allow <xliff:g id="APP_0">%1$s</xliff:g> to show <xliff:g id="APP_2">%2$s</xliff:g> slices?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– It can read information from <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– It can take actions inside <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Allow <xliff:g id="APP">%1$s</xliff:g> to show slices from any app"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Allow"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Deny"</string>
</resources>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index ab759ed..3f6d5e5 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accessibility"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Rotate screen"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Overview"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Search"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"open camera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Select new task layout"</string>
<string name="cancel" msgid="6442560571259935130">"Cancel"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Compatibility zoom button."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom smaller to larger screen."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth connected."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Ringer silent."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Work mode"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Dismiss <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> dismissed."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"All recent applications dismissed."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Devices)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth Off"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"No paired devices available"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> battery"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Headset"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Input"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brightness"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Auto-rotate"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Auto-rotate screen"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Connecting..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tethering"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notifications"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Torch"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobile data"</string>
@@ -324,8 +339,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> used"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> limit"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> warning"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Work mode"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"Work profile"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"Notifications & apps are off"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Night Light"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"On at sunset"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Until sunrise"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"On at <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Until <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC is disabled"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC is enabled"</string>
@@ -338,6 +358,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> is disabled in safe-mode."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Clear all"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Drag here to use split screen"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Swipe up to switch apps"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Split Horizontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Split Vertical"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Split Customised"</string>
@@ -562,6 +583,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"With power notification controls, you can set an importance level from 0 to 5 for an app\'s notifications. \n\n"<b>"Level 5"</b>" \n- Show at the top of the notification list \n- Allow full screen interruption \n- Always peek \n\n"<b>"Level 4"</b>" \n- Prevent full screen interruption \n- Always peek \n\n"<b>"Level 3"</b>" \n- Prevent full screen interruption \n- Never peek \n\n"<b>"Level 2"</b>" \n- Prevent full screen interruption \n- Never peek \n- Never make sound and vibration \n\n"<b>"Level 1"</b>" \n- Prevent full screen interruption \n- Never peek \n- Never make sound or vibrate \n- Hide from lock screen and status bar \n- Show at the bottom of the notification list \n\n"<b>"Level 0"</b>" \n- Block all notifications from the app"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notifications"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"You won\'t see these notifications anymore"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Keep showing these notifications?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Stop notifications"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Keep showing"</string>
@@ -656,7 +679,8 @@
<item msgid="1545641631806817203">"Clipboard"</item>
<item msgid="5742013440802239414">"Keycode"</item>
<item msgid="8802889973626281575">"Keyboard switcher"</item>
- <item msgid="8175437057325747277">"None"</item>
+ <item msgid="7095517796293767867">"Rotation suggestion"</item>
+ <item msgid="8494159969042135235">"None"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -780,4 +804,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Tap for details on battery and data usage"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Turn off mobile data?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Because an app is obscuring a permission request, Settings can’t verify your response."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Allow <xliff:g id="APP_0">%1$s</xliff:g> to show <xliff:g id="APP_2">%2$s</xliff:g> slices?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– It can read information from <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– It can take actions inside <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Allow <xliff:g id="APP">%1$s</xliff:g> to show slices from any app"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Allow"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Deny"</string>
</resources>
diff --git a/packages/SystemUI/res/values-en-rXC/strings.xml b/packages/SystemUI/res/values-en-rXC/strings.xml
index ad39146..0571c1f 100644
--- a/packages/SystemUI/res/values-en-rXC/strings.xml
+++ b/packages/SystemUI/res/values-en-rXC/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accessibility"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Rotate screen"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Overview"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Search"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"open camera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Select new task layout"</string>
<string name="cancel" msgid="6442560571259935130">"Cancel"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Compatibility zoom button."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom smaller to larger screen."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth connected."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Ringer silent."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Work mode"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Dismiss <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> dismissed."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"All recent applications dismissed."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Devices)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth Off"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"No paired devices available"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> battery"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Headset"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Input"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brightness"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Auto-rotate"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Auto-rotate screen"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Connecting..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tethering"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notifications"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Flashlight"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobile data"</string>
@@ -324,8 +339,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> used"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> limit"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> warning"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Work mode"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"Work profile"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"Notifications & apps are off"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Night Light"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"On at sunset"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Until sunrise"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"On at <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Until <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC is disabled"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC is enabled"</string>
@@ -338,6 +358,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> is disabled in safe-mode."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Clear all"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Drag here to use split screen"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Swipe up to switch apps"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Split Horizontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Split Vertical"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Split Custom"</string>
@@ -562,6 +583,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"With power notification controls, you can set an importance level from 0 to 5 for an app\'s notifications. \n\n"<b>"Level 5"</b>" \n- Show at the top of the notification list \n- Allow full screen interruption \n- Always peek \n\n"<b>"Level 4"</b>" \n- Prevent full screen interruption \n- Always peek \n\n"<b>"Level 3"</b>" \n- Prevent full screen interruption \n- Never peek \n\n"<b>"Level 2"</b>" \n- Prevent full screen interruption \n- Never peek \n- Never make sound and vibration \n\n"<b>"Level 1"</b>" \n- Prevent full screen interruption \n- Never peek \n- Never make sound or vibrate \n- Hide from lock screen and status bar \n- Show at the bottom of the notification list \n\n"<b>"Level 0"</b>" \n- Block all notifications from the app"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notifications"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"You won\'t see these notifications anymore"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Keep showing these notifications?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Stop notifications"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Keep showing"</string>
@@ -656,7 +679,8 @@
<item msgid="1545641631806817203">"Clipboard"</item>
<item msgid="5742013440802239414">"Keycode"</item>
<item msgid="8802889973626281575">"Keyboard switcher"</item>
- <item msgid="8175437057325747277">"None"</item>
+ <item msgid="7095517796293767867">"Rotation suggestion"</item>
+ <item msgid="8494159969042135235">"None"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -780,4 +804,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Tap for details on battery and data usage"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Turn off mobile data?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Because an app is obscuring a permission request, Settings can’t verify your response."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Allow <xliff:g id="APP_0">%1$s</xliff:g> to show <xliff:g id="APP_2">%2$s</xliff:g> slices?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- It can read information from <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- It can take actions inside <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Allow <xliff:g id="APP">%1$s</xliff:g> to show slices from any app"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Allow"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Deny"</string>
</resources>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index cdb432b..d02ce1c 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Página principal"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menú"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accesibilidad"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Girar pantalla"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Recientes"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Buscar"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Cámara"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"abrir cámara"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Selecciona el nuevo diseño de la tarea."</string>
<string name="cancel" msgid="6442560571259935130">"Cancelar"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Botón de zoom de compatibilidad"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom de pantalla más pequeña a más grande"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth conectado"</string>
@@ -180,7 +187,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Timbre en silencio"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Modo de trabajo"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Rechazar <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> descartada."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Se descartaron todas las aplicaciones recientes."</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispositivos)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth desactivado"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"No hay dispositivos sincronizados disponibles"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> de batería"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Auriculares"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Entrada"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brillo"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Rotación automática"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Girar la pantalla automáticamente"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Conectando…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Anclaje a red"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Zona"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notificaciones"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Linterna"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Datos móviles"</string>
@@ -326,8 +341,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Utilizados: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Límite de <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Advertencia de <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Modo de trabajo"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Luz nocturna"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Al atardecer"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Hasta el amanecer"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"A la(s) <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Hasta la(s) <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"La tecnología NFC está inhabilitada"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"La tecnología NFC está habilitada"</string>
@@ -340,6 +362,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> está inhabilitada en modo seguro."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Borrar todo"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Arrastra hasta aquí para usar la pantalla dividida"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"División horizontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"División vertical"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"División personalizada"</string>
@@ -564,6 +588,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Con los controles de activación de notificaciones, puedes establecer un nivel de importancia para las notificaciones de una app. \n\n"<b>"Nivel 5"</b>" \n- Mostrar en la parte superior de la lista de notificaciones. \n- Permitir interrupción en la pantalla completa. \n- Mostrar siempre. \n\n"<b>"Nivel 4"</b>" \n- No permitir interrupción en la pantalla completa. \n- Mostrar siempre. \n\n"<b>"Nivel 3"</b>" \n- No permitir interrupción en la pantalla completa. \n- No mostrar. \n\n"<b>"Nivel 2"</b>" \n- No permitir interrupción en la pantalla completa. \n- No mostrar. \n- No sonar ni vibrar. \n\n"<b>"Nivel 1"</b>" \n- No permitir interrupción en la pantalla completa. \n- No mostrar. \n- No sonar ni vibrar. \n- Ocultar de la pantalla bloqueada y la barra de estado. \n- Mostrar al final de la lista de notificaciones. \n\n"<b>"Nivel 0"</b>" \n- Bloquear todas las notificaciones de la app."</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notificaciones"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Ya no verás estas notificaciones"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"¿Quieres seguir viendo estas notificaciones?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Detener notificaciones"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Seguir viendo"</string>
@@ -658,7 +684,8 @@
<item msgid="1545641631806817203">"Portapapeles"</item>
<item msgid="5742013440802239414">"Clave de código"</item>
<item msgid="8802889973626281575">"Cambio de teclado"</item>
- <item msgid="8175437057325747277">"Ninguno"</item>
+ <item msgid="7095517796293767867">"Sugerencia de rotación"</item>
+ <item msgid="8494159969042135235">"Ninguno"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -782,4 +809,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Presiona para obtener información sobre el uso de datos y de la batería"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"¿Deseas desactivar los datos móviles?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Como una app está bloqueando una solicitud de permiso, Configuración no puede verificar tu respuesta."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"¿Permitir que <xliff:g id="APP_0">%1$s</xliff:g> muestre fragmentos de <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Puede leer información sobre <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Puede realizar acciones en <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Permitir que <xliff:g id="APP">%1$s</xliff:g> muestre fragmentos de cualquier app"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Permitir"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Rechazar"</string>
</resources>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index b467b38..5cc6ab6 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Inicio"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menú"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accesibilidad"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Girar la pantalla"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Aplicaciones recientes"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Buscar"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Cámara"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"abrir cámara"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Seleccionar diseño de tarea nueva"</string>
<string name="cancel" msgid="6442560571259935130">"Cancelar"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Botón de zoom de compatibilidad"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom de pantalla más pequeña a más grande"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth conectado"</string>
@@ -180,7 +187,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Modo silencio"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Modo de trabajo"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Descartar <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Se ha eliminado <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Se han ignorado todas las aplicaciones recientes."</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispositivos)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth desactivado"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"No hay dispositivos vinculados disponibles"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> de batería"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Auriculares"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Entrada"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brillo"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Girar automáticamente"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Girar pantalla automáticamente"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Conectando..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Compartir conexión"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Zona Wi-Fi"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notificaciones"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Linterna"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Datos móviles"</string>
@@ -326,8 +341,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> usado"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Límite de <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Advertencia de <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Modo de trabajo"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Luz nocturna"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Al atardecer"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Hasta el amanecer"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Hora: <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Hasta: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"La conexión NFC está inhabilitada"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"La conexión NFC está habilitada"</string>
@@ -340,6 +362,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"La aplicación <xliff:g id="APP">%s</xliff:g> se ha inhabilitado en modo seguro."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Borrar todo"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Arrastra hasta aquí para utilizar la pantalla dividida"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"División horizontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"División vertical"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"División personalizada"</string>
@@ -564,6 +588,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Los controles de energía de las notificaciones permiten establecer un nivel de importancia de 0 a 5 para las notificaciones de las aplicaciones. \n\n"<b>"Nivel 5"</b>" \n- Mostrar en la parte superior de la lista de notificaciones \n- Permitir interrumpir en el modo de pantalla completa \n- Mostrar siempre \n\n"<b>"Nivel 4"</b>" \n- Evitar interrumpir en el modo de pantalla completa \n- Mostrar siempre \n\n"<b>"Nivel 3"</b>" \n- Evitar interrumpir en el modo de pantalla completa \n- No mostrar nunca \n\n"<b>"Nivel 2"</b>" \n- Evitar interrumpir en el modo de pantalla completa\n- No mostrar nunca \n- No emitir sonido ni vibrar nunca \n\n"<b>"Nivel 1"</b>" \n- Evitar interrumpir en el modo de pantalla completa \n- No mostrar nunca \n- No emitir sonido ni vibrar nunca \n- Ocultar de la pantalla de bloqueo y de la barra de estado \n- Mostrar en la parte inferior de la lista de notificaciones \n\n"<b>"Nivel 0"</b>" \n- Bloquear todas las notificaciones de la aplicación"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notificaciones"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"No volverás a ver estas notificaciones"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"¿Quieres seguir viendo estas notificaciones?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Detener las notificaciones"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Seguir mostrando"</string>
@@ -658,7 +684,8 @@
<item msgid="1545641631806817203">"Portapapeles"</item>
<item msgid="5742013440802239414">"Código de teclado"</item>
<item msgid="8802889973626281575">"Cambio de teclado"</item>
- <item msgid="8175437057325747277">"Ninguno"</item>
+ <item msgid="7095517796293767867">"Sugerencia de rotación"</item>
+ <item msgid="8494159969042135235">"Ninguna"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -782,4 +809,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Toca para ver información detallada sobre el uso de datos y de la batería"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"¿Desactivar los datos móviles?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Una aplicación impide ver una solicitud de permiso, por lo que Ajustes no puede verificar tu respuesta."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"¿Quieres permitir que <xliff:g id="APP_0">%1$s</xliff:g> muestre fragmentos de <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Puede leer información de <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Puede realizar acciones en <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Permitir que <xliff:g id="APP">%1$s</xliff:g> muestre fragmentos de cualquier aplicación"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Permitir"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Denegar"</string>
</resources>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index 1b8ad65..eac4814 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Kodu"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menüü"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Juurdepääsetavus"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Pöörake ekraani"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Ülevaade"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Otsing"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kaamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"ava kaamera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Uue toimingu paigutuse valimine"</string>
<string name="cancel" msgid="6442560571259935130">"Tühista"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Sobivussuumi nupp."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Suumi suuremale ekraanile vähem."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth on ühendatud."</string>
@@ -180,7 +187,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Vaikne kõlisti."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Töörežiim"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Rakendusest <xliff:g id="APP">%s</xliff:g> loobumine."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Loobusite rakendusest <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Kõikidest hiljutistest rakendustest on loobutud"</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> seadet)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth on väljas"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Ühtegi seotud seadet pole saadaval"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> akut"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Heli"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Peakomplekt"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Sisend"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Heledus"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Automaatne pööramine"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Pööra ekraani automaatselt"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Ühenduse loomine ..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Jagamine"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Kuumkoht"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Märguanded"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Taskulamp"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobiilne andmeside"</string>
@@ -326,8 +341,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> on kasutatud"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Limiit: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> hoiatus"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Töörežiim"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Öövalgus"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Sissel. päikeselooj."</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Kuni päikesetõusuni"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Sisselülitam. kell <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Kuni <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC on keelatud"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC on lubatud"</string>
@@ -340,6 +362,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Rakendus <xliff:g id="APP">%s</xliff:g> on turvarežiimis keelatud."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Kustuta kõik"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Jagatud ekraani kasutamiseks lohistage siia"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Horisontaalne poolitamine"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Vertikaalne poolitamine"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Kohandatud poolitamine"</string>
@@ -564,6 +588,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Toite märguannete juhtnuppudega saate määrata rakenduse märguannete tähtsuse taseme vahemikus 0–5. \n\n"<b>"5. tase"</b>" \n- Kuva märguannete loendi ülaosas\n- Luba täisekraanil häirimine \n- Kuva alati ekraani servas \n\n"<b>"4. tase"</b>" \n- Keela täisekraanil häirimine \n- Kuva alati ekraani servas \n\n"<b>"3. tase"</b>" \n- Keela täisekraanil häirimine \n- Ära kunagi kuva ekraani servas \n\n"<b>"2. tase"</b>" \n- Keela täisekraanil häirimine \n- Ära kunagi kuva ekraani servas \n- Ära kunagi helise ega vibreeri \n\n"<b>"1. tase"</b>" \n- Keela täisekraanil häirimine \n- Ära kunagi kuva ekraani servas \n- Ära kunagi helise ega vibreeri \n- Peida lukustuskuval ja olekuribal \n- Kuva märguannete loendi allosas \n\n"<b>"Tase 0"</b>" \n- Blokeeri kõik rakenduse märguanded"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Märguanded"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Te ei näe enam neid märguandeid"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Kas soovite nende märguannete kuvamist jätkata?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Peata märguanded"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Jätka kuvamist"</string>
@@ -658,7 +684,8 @@
<item msgid="1545641631806817203">"Lõikelaud"</item>
<item msgid="5742013440802239414">"Võtmekood"</item>
<item msgid="8802889973626281575">"Klaviatuuri vahetaja"</item>
- <item msgid="8175437057325747277">"Mitte ükski"</item>
+ <item msgid="7095517796293767867">"Pööramise soovitus"</item>
+ <item msgid="8494159969042135235">"Puudub"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Tavaline"</item>
@@ -782,4 +809,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Aku ja andmekasutuse üksikasjade nägemiseks puudutage"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Kas lülitada mobiilne andmeside välja?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Seaded ei saa teie vastust kinnitada, sest rakendus varjab loataotlust."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Kas lubada rakendusel <xliff:g id="APP_0">%1$s</xliff:g> näidata rakenduse <xliff:g id="APP_2">%2$s</xliff:g> lõike?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- See saab lugeda teavet rakendusest <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- See saab rakenduses <xliff:g id="APP">%1$s</xliff:g> toiminguid teha"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Luba rakendus <xliff:g id="APP">%1$s</xliff:g>, et kuvada lõike mis tahes rakendusest"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Luba"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Keela"</string>
</resources>
diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml
index 1d49b3b..1c46eba 100644
--- a/packages/SystemUI/res/values-eu/strings.xml
+++ b/packages/SystemUI/res/values-eu/strings.xml
@@ -78,7 +78,7 @@
<string name="screenshot_saved_text" msgid="7574667448002050363">"Sakatu pantaila-argazkia ikusteko"</string>
<string name="screenshot_failed_title" msgid="9096484883063264803">"Ezin izan da atera pantaila-argazkia"</string>
<string name="screenshot_failed_to_save_unknown_text" msgid="8844781948876286488">"Arazo bat izan da pantaila-argazkia gordetzean"</string>
- <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"Ezin da atera pantaila-argazkia ez delako gelditzen tokirik"</string>
+ <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"Ezin da gorde pantaila-argazkia ez delako gelditzen tokirik"</string>
<string name="screenshot_failed_to_capture_text" msgid="173674476457581486">"Aplikazioak edo erakundeak ez du onartzen pantaila-argazkiak ateratzea"</string>
<string name="usb_preference_title" msgid="6551050377388882787">"USB fitxategiak transferitzeko aukerak"</string>
<string name="use_mtp_button_title" msgid="4333504413563023626">"Muntatu multimedia-erreproduzigailu gisa (MTP)"</string>
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Hasiera"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menua"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Erabilerraztasuna"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Biratu pantaila"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Ikuspegi orokorra"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Bilatu"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"ireki kamera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Hautatu zereginen diseinua"</string>
<string name="cancel" msgid="6442560571259935130">"Utzi"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Zoom-bateragarritasunaren botoia."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Handiagotu pantaila txikia."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetootha konektatuta."</string>
@@ -180,7 +187,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Tonu-jotzailea isilik."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Lan modua"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Baztertu <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> baztertu da."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Azken aplikazio guztiak baztertu da."</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetootha (<xliff:g id="NUMBER">%d</xliff:g> gailu)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetootha desaktibatuta"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Ez dago parekatutako gailurik erabilgarri"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Bateria: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audioa"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Entzungailua"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Sarrera"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Distira"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Biratze automatikoa"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Biratu pantaila automatikoki"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Konektatzen…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Konexioa partekatzea"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Sare publikoa"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Jakinarazpenak"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Linterna"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Datu mugikorrak"</string>
@@ -326,8 +341,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> erabilita"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Muga: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Abisua: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Lan modua"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Gaueko argia"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Ilunabarrean"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Ilunabarrera arte"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Aktibatze-ordua: <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> arte"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"Desgaituta dago NFC"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"Gaituta dago NFC"</string>
@@ -340,6 +362,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> desgaituta dago modu seguruan."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Garbitu guztiak"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Arrastatu hau pantaila zatitzeko"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Zatitze horizontala"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Zatitze bertikala"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Zatitze pertsonalizatua"</string>
@@ -564,6 +588,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Bateria-mailaren arabera jakinarazpenak kontrolatzeko aukerekin, 0 eta 5 bitarteko garrantzi-mailetan sailka ditzakezu aplikazioen jakinarazpenak. \n\n"<b>"5. maila"</b>" \n- Erakutsi jakinarazpenen zerrendaren goialdean. \n- Baimendu etetea pantaila osoko moduan zaudenean. \n- Agerrarazi beti jakinarazpenak. \n\n"<b>"4. maila"</b>" \n- Galarazi etetea pantaila osoko moduan zaudenean. \n- Agerrarazi beti jakinarazpenak. \n\n"<b>"3. maila"</b>" \n- Galarazi etetea pantaila osoko moduan zaudenean. \n- Ez agerrarazi jakinarazpenik inoiz. \n\n"<b>"2. maila"</b>" \n- Galarazi etetea pantaila osoko moduan zaudenean. \n- Ez agerrarazi jakinarazpenik inoiz. \n- Ez egin soinurik edo dardararik inoiz. \n\n"<b>"1. maila"</b>" \n- Galarazi etetea pantaila osoko moduan zaudenean. \n- Ez agerrarazi jakinarazpenik inoiz. \n- Ez egin soinurik edo dardararik inoiz. \n- Ezkutatu pantaila blokeatutik eta egoera-barratik. \n- Erakutsi jakinarazpenen zerrendaren behealdean. \n\n"<b>"0. maila"</b>" \n- Blokeatu aplikazioaren jakinarazpen guztiak."</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Jakinarazpenak"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Aurrerantzean ez duzu ikusiko horrelako jakinarazpenik"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Jakinarazpenak erakusten jarraitzea nahi duzu?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Blokeatu jakinarazpenak"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Jarraitu erakusten"</string>
@@ -658,7 +684,8 @@
<item msgid="1545641631806817203">"Arbela"</item>
<item msgid="5742013440802239414">"Tekla-kodea"</item>
<item msgid="8802889973626281575">"Teklatu-aldatzailea"</item>
- <item msgid="8175437057325747277">"Bat ere ez"</item>
+ <item msgid="7095517796293767867">"Biratzeko iradokizuna"</item>
+ <item msgid="8494159969042135235">"Bat ere ez"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normala"</item>
@@ -782,4 +809,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Sakatu bateria eta datuen erabilerari buruzko xehetasunak ikusteko"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Datu-konexioa desaktibatu nahi duzu?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Aplikazio bat baimen-eskaera oztopatzen ari denez, ezarpenek ezin dute egiaztatu erantzuna."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> aplikazioari <xliff:g id="APP_2">%2$s</xliff:g> aplikazioaren zatiak erakustea baimendu nahi diozu?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- <xliff:g id="APP">%1$s</xliff:g> aplikazioaren informazioa irakur dezake."</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- <xliff:g id="APP">%1$s</xliff:g> aplikazioan ekintzak gauza ditzake."</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Baimendu <xliff:g id="APP">%1$s</xliff:g> aplikazioari edozein aplikazioren zatiak erakustea"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Baimendu"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Ukatu"</string>
</resources>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index e597569..a5543d3 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"چرخاندن صفحه"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"نمای کلی"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"جستجو"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"دوربین"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"باز کردن دوربین"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"انتخاب طرحبندی جدید کار"</string>
<string name="cancel" msgid="6442560571259935130">"لغو"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"دکمه بزرگنمایی سازگار."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"بزرگنمایی از صفحههای کوچک تا بزرگ."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"بلوتوث متصل است."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"زنگ بیصدا."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"حالت کار"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"رد کردن <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> نادیده گرفته شد."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"همه برنامههای اخیر رد شدند."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"بلوتوث ( <xliff:g id="NUMBER">%d</xliff:g> دستگاه)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"بلوتوث خاموش"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"هیچ دستگاه مرتبط شدهای موجود نیست"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"شارژ باتری <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"صوت"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"هدست"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"ورودی"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"روشنایی"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"چرخش خودکار"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"چرخش خودکار صفحهنمایش"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"در حال اتصال..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"اتصال به اینترنت با تلفن همراه"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"نقطه اتصال"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"اعلانها"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"چراغ قوه"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"داده تلفن همراه"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> استفاده شده"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> محدودیت"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"هشدار <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"حالت کار"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"نور شب"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"غروب روشن میشود"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"تا طلوع"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"ساعت <xliff:g id="TIME">%s</xliff:g> روشن میشود"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"تا <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC غیرفعال است"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC فعال است"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> در حالت ایمن غیرفعال است."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"پاک کردن همه"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"برای استفاده از تقسیم صفحه، به اینجا بکشید"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"تقسیم افقی"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"تقسیم عمودی"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"سفارشی کردن تقسیم"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"با کنترلهای قدرتمند اعلان میتوانید سطح اهمیت اعلانهای هر برنامه را از ۰ تا ۵ تعیین کنید. \n\n"<b>"سطح ۵"</b>" \n- در صدر فهرست اعلانها نشان داده میشود \n- وقفه برای نمایش تمامصفحه مجاز است \n- همیشه اجمالی نشان داده میشود \n\n"<b>"سطح ۴"</b>" \n- وقفه برای نمایش تمامصفحه مجاز نیست \n- همیشه اجمالی نشان داده میشود \n\n"<b>"سطح ۳"</b>" \n- وقفه برای نمایش تمامصفحه مجاز نیست \n- هیچوقت اجمالی نشان داده نمیشود \n\n"<b>"سطح ۲"</b>" \n- وقفه برای نمایش تمامصفحه مجاز نیست \n- هیچوقت اجمالی نشان داده نمیشود \n- هیچوقت صدا و لرزش ایجاد نمیکند \n\n"<b>"سطح ۱"</b>" \n- نمایش تمام صفحه مجاز نیست \n- هیچوقت اجمالی نشان داده نمیشود \n- هیچوقت صدا یا لرزش ایجاد نمیکند \n- در قفل صفحه و نوار وضعیت پنهان است \n- در پایین فهرست اعلانها نشان داده میشود \n\n"<b>"سطح ۰"</b>" \n- همه اعلانهای این برنامه مسدود است"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"اعلانها"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"دیگر این اعلانها را نخواهید دید"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"نمایش این اعلانها ادامه یابد؟"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"توقف اعلانها"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"همچنان نشان داده شود"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"بریدهدان"</item>
<item msgid="5742013440802239414">"کد کلید"</item>
<item msgid="8802889973626281575">"تغییردهنده صفحهکلید"</item>
- <item msgid="8175437057325747277">"هیچکدام"</item>
+ <item msgid="7095517796293767867">"پیشنهاد چرخش"</item>
+ <item msgid="8494159969042135235">"هیچکدام"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"معمولی"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"برای جزئیات مربوط به مصرف باتری و داده، ضربه بزنید"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"داده شبکه تلفن همراه خاموش شود؟"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"چون برنامهای درحال ایجاد تداخل در درخواست مجوز است، «تنظیمات» نمیتواند پاسخ شما را تأیید کند."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"به <xliff:g id="APP_0">%1$s</xliff:g> اجازه داده شود تکههای <xliff:g id="APP_2">%2$s</xliff:g> را نشان دهد؟"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- میتواند اطلاعات <xliff:g id="APP">%1$s</xliff:g> را بخواند"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- میتواند در <xliff:g id="APP">%1$s</xliff:g> اقدام انجام دهد"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"به <xliff:g id="APP">%1$s</xliff:g> اجازه داده شود تکههایی از برنامهها نشان دهد"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"مجاز"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"رد کردن"</string>
</resources>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 59327c6..34072db 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Aloituspainike"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Valikko"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Esteettömyys"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Näytön kääntäminen"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Viimeisimmät"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Haku"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"avaa kamera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Valitse uusi tehtävien asettelu"</string>
<string name="cancel" msgid="6442560571259935130">"Peruuta"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Yhteensopivuuszoomaus-painike."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoomaa pienemmältä suuremmalle ruudulle."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth yhdistetty."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Soittoääni: äänetön."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Työtila"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Hylätään <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> hylättiin."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Kaikki viimeisimmät sovellukset on hylätty."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> laitetta)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth pois käytöstä"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Laitepareja ei ole käytettävissä"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Akun taso <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Ääni"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Headset"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Syöttölaite"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Kirkkaus"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Automaattinen kääntö"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Käännä näyttöä automaattisesti."</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Yhdistetään…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Jaettu yhteys"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Ilmoitukset"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Taskulamppu"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobiilidata"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"käytetty <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"kiintiö <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> – varoitus"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Työtila"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Yövalo"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Auringon laskiessa"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Auringonnousuun"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Käyttöön klo <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> saakka"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC on poistettu käytöstä"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC on käytössä"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> on poistettu käytöstä vikasietotilassa."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Tyhjennä kaikki"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Jaa näyttö vetämällä tähän."</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Vaakasuuntainen jako"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Pystysuuntainen jako"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Muokattu jako"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Ilmoitusten tehohallinnan avulla voit määrittää sovelluksen ilmoituksille tärkeystason väliltä 0–5. \n\n"<b>"Taso 5"</b>" \n– Ilmoitukset näytetään ilmoitusluettelon yläosassa \n– Näkyminen koko näytön tilassa sallitaan \n– Ilmoitukset kurkistavat aina näytölle\n\n"<b>"Taso 4"</b>" \n– Näkyminen koko näytön tilassa estetään \n– Ilmoitukset kurkistavat aina näytölle \n\n"<b>"Taso 3"</b>" \n– Näkyminen koko näytön tilassa estetään \n– Ei kurkistamista \n\n"<b>"Taso 2"</b>" \n– Näkyminen koko näytön tilassa estetään \n– Ei kurkistamista \n– Ei ääniä eikä värinää \n\n"<b>"Taso 1"</b>" \n– Näkyminen koko näytön tilassa estetään \n– Ei kurkistamista \n– Ei ääniä eikä värinää \n– Ilmoitukset piilotetaan lukitusnäytöltä ja tilapalkista \n– Ilmoitukset näytetään ilmoitusluettelon alaosassa \n\n"<b>"Taso 0"</b>" \n– Kaikki sovelluksen ilmoitukset estetään"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Ilmoitukset"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Et näe näitä ilmoituksia enää"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Jatketaanko näiden ilmoitusten näyttämistä?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Lopeta ilmoitukset"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Jatka näyttämistä"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Leikepöytä"</item>
<item msgid="5742013440802239414">"Näppäinkoodi"</item>
<item msgid="8802889973626281575">"Näppäimistövalitsin"</item>
- <item msgid="8175437057325747277">"Ei mitään"</item>
+ <item msgid="7095517796293767867">"Kiertoehdotus"</item>
+ <item msgid="8494159969042135235">"Ei mitään"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normaali"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Katso lisätietoja akun ja datan käytöstä napauttamalla"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Poistetaanko mobiilidata käytöstä?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Sovellus peittää käyttöoikeuspyynnön, joten Asetukset ei voi vahvistaa valintaasi."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Saako <xliff:g id="APP_0">%1$s</xliff:g> näyttää osia sovelluksesta <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– Se voi lukea tietoja sovelluksesta <xliff:g id="APP">%1$s</xliff:g>."</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– Se voi suorittaa toimintoja sovelluksessa <xliff:g id="APP">%1$s</xliff:g>."</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Salli sovelluksen <xliff:g id="APP">%1$s</xliff:g> näyttää osia mistä tahansa sovelluksesta"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Salli"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Estä"</string>
</resources>
diff --git a/packages/SystemUI/res/values-gl/strings.xml b/packages/SystemUI/res/values-gl/strings.xml
index 23a22e6..8f049cd 100644
--- a/packages/SystemUI/res/values-gl/strings.xml
+++ b/packages/SystemUI/res/values-gl/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Inicio"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menú"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accesibilidade"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Xira a pantalla"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Visión xeral"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Buscar"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Cámara"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"abrir cámara"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Seleccionar novo deseño de tarefas"</string>
<string name="cancel" msgid="6442560571259935130">"Cancelar"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Botón de zoom de compatibilidade"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom de compatibilidade co tamaño da pantalla."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth conectado"</string>
@@ -180,7 +187,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Timbre silenciado"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Modo de traballo"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Rexeitar <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Rexeitouse <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Rexeitáronse todas as aplicacións recentes."</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispositivos)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth desactivado"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Non hai dispositivos sincronizados dispoñibles"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> de batería"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Auriculares"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Entrada"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brillo"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Xirar automaticamente"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Xirar a pantalla automaticamente"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Conectando..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Conexión compartida"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Zona wifi"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notificacións"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Lanterna"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Datos móbiles"</string>
@@ -326,8 +341,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> usados"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Límite de <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Advertencia <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Modo de traballo"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Luz nocturna"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Activación ao solpor"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Ata o amencer"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Activación (<xliff:g id="TIME">%s</xliff:g>)"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Ata: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"A opción NFC está desactivada"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"A opción NFC está activada"</string>
@@ -340,6 +362,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"A aplicación <xliff:g id="APP">%s</xliff:g> está desactivada no modo seguro"</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Borrar todo"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Arrastrar aquí para usar a pantalla dividida"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Dividir en horizontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Dividir en vertical"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Dividir de xeito personalizado"</string>
@@ -564,6 +588,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Cos controis de notificacións mellorados, podes asignarlles un nivel de importancia comprendido entre 0 e 5 ás notificacións dunha aplicación determinada. \n\n"<b>"Nivel 5"</b>" \n- Mostrar na parte superior da lista de notificacións. \n- Permitir interrupcións no modo de pantalla completa. \n- Mostrar sempre. \n\n"<b>"Nivel 4"</b>" \n- Impedir interrupcións no modo de pantalla completa. \n- Mostrar sempre. \n\n"<b>"Nivel 3"</b>" \n- Impedir interrupcións no modo de pantalla completa. \n- Non mostrar nunca. \n\n"<b>"Nivel 2"</b>" \n- Impedir interrupcións no modo de pantalla completa. \n- Non mostrar nunca. \n- Non soar nin vibrar nunca. \n\n"<b>"Nivel 1"</b>" \n- Impedir interrupcións no modo de pantalla completa. \n- Non mostrar nunca. \n- Non soar nin vibrar nunca. \n- Ocultar na pantalla de bloqueo e na barra de estado. \n- Mostrar na parte inferior da lista de notificacións. \n\n"<b>"Nivel 0"</b>" \n- Bloquear todas as notificacións da aplicación."</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notificacións"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Deixarás de ver estas notificacións"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Queres seguir mostrando estas notificacións?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Deter notificacións"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Continuar mostrando notificacións"</string>
@@ -658,7 +684,8 @@
<item msgid="1545641631806817203">"Portapapeis"</item>
<item msgid="5742013440802239414">"Código de teclas"</item>
<item msgid="8802889973626281575">"Conmutador do teclado"</item>
- <item msgid="8175437057325747277">"Ningún"</item>
+ <item msgid="7095517796293767867">"Suxestión de rotación"</item>
+ <item msgid="8494159969042135235">"Ningún tipo"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -782,4 +809,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Toca para obter información sobre o uso de datos e a batería"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Queres desactivar os datos móbiles?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Dado que unha aplicación se superpón sobre unha solicitude de permiso, a configuración non pode verificar a túa resposta."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Queres permitir que a aplicación <xliff:g id="APP_0">%1$s</xliff:g> mostre partes de <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Pode ler información da aplicación <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Pode levar a cabo accións dentro da aplicación <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Permitir que a aplicación <xliff:g id="APP">%1$s</xliff:g> mostre partes de calquera aplicación"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Permitir"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Denegar"</string>
</resources>
diff --git a/packages/SystemUI/res/values-gu/strings.xml b/packages/SystemUI/res/values-gu/strings.xml
index 22966a7..27d3ba8 100644
--- a/packages/SystemUI/res/values-gu/strings.xml
+++ b/packages/SystemUI/res/values-gu/strings.xml
@@ -33,13 +33,10 @@
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"ચાલુ"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"નોટિફિકેશનો"</string>
<string name="battery_low_title" msgid="6456385927409742437">"બૅટરી ઓછી છે"</string>
- <!-- no translation found for battery_low_title_hybrid (6268991275887381595) -->
- <skip />
+ <string name="battery_low_title_hybrid" msgid="6268991275887381595">"બૅટરી ઓછી છે. બૅટરી સેવર ચાલુ કરો"</string>
<string name="battery_low_percent_format" msgid="2900940511201380775">"<xliff:g id="PERCENTAGE">%s</xliff:g> બાકી"</string>
- <!-- no translation found for battery_low_percent_format_hybrid (6838677459286775617) -->
- <skip />
- <!-- no translation found for battery_low_percent_format_hybrid_short (9025795469949145586) -->
- <skip />
+ <string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"<xliff:g id="PERCENTAGE">%s</xliff:g> બાકી, તમારા વપરાશના આધારે લગભગ <xliff:g id="TIME">%s</xliff:g> બાકી છે"</string>
+ <string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"<xliff:g id="PERCENTAGE">%s</xliff:g> બાકી, લગભગ <xliff:g id="TIME">%s</xliff:g> બાકી"</string>
<string name="battery_low_percent_format_saver_started" msgid="7879389868952879166">"<xliff:g id="PERCENTAGE">%s</xliff:g> બાકી. બૅટરી સેવર ચાલુ છે."</string>
<string name="invalid_charger" msgid="4549105996740522523">"USB ચાર્જિંગ સમર્થિત નથી.\nફક્ત આપવામાં આવેલ ચાર્જરનો ઉપયોગ કરો."</string>
<string name="invalid_charger_title" msgid="3515740382572798460">"USB ચાર્જિંગ સમર્થિત નથી."</string>
@@ -73,22 +70,15 @@
<string name="usb_debugging_secondary_user_message" msgid="6067122453571699801">"હાલમાં આ ઉપકરણમાં સાઇન ઇન થયેલ વપરાશકર્તા USB ડિબગીંગ ચાલુ કરી શકતા નથી. આ સુવિધાનો ઉપયોગ કરવા માટે પ્રાથમિક વપરાશકર્તા પર સ્વિચ કરો."</string>
<string name="compat_mode_on" msgid="6623839244840638213">"સ્ક્રીન ભરવા માટે ઝૂમ કરો"</string>
<string name="compat_mode_off" msgid="4434467572461327898">"સ્ક્રીન ભરવા માટે ખેંચો"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"સ્ક્રીનશૉટ"</string>
<string name="screenshot_saving_ticker" msgid="7403652894056693515">"સ્ક્રીનશોટ સાચવી રહ્યું છે…"</string>
<string name="screenshot_saving_title" msgid="8242282144535555697">"સ્ક્રીનશોટ સાચવી રહ્યું છે…"</string>
- <!-- no translation found for screenshot_saving_text (2545047868936087248) -->
- <skip />
- <!-- no translation found for screenshot_saved_title (5637073968117370753) -->
- <skip />
- <!-- no translation found for screenshot_saved_text (7574667448002050363) -->
- <skip />
- <!-- no translation found for screenshot_failed_title (9096484883063264803) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_unknown_text (8844781948876286488) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_text (3041612585107107310) -->
- <skip />
+ <string name="screenshot_saving_text" msgid="2545047868936087248">"સ્ક્રીનશૉટ સાચવવામાં આવી રહ્યો છે"</string>
+ <string name="screenshot_saved_title" msgid="5637073968117370753">"સ્ક્રીનશૉટ સાચવ્યો"</string>
+ <string name="screenshot_saved_text" msgid="7574667448002050363">"તમારા સ્ક્રીનશૉટને જોવા માટે ટૅપ કરો"</string>
+ <string name="screenshot_failed_title" msgid="9096484883063264803">"સ્ક્રીનશૉટ કૅપ્ચર કરી શકાયો નથી"</string>
+ <string name="screenshot_failed_to_save_unknown_text" msgid="8844781948876286488">"સ્ક્રીનશૉટ સાચવવામાં સમસ્યા આવી"</string>
+ <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"મર્યાદિત સ્ટોરેજ સ્પેસને કારણે સ્ક્રીનશૉટ સાચવી શકાતો નથી"</string>
<string name="screenshot_failed_to_capture_text" msgid="173674476457581486">"ઍપ્લિકેશન કે તમારી સંસ્થા દ્વારા સ્ક્રીનશૉટ લેવાની મંજૂરી નથી"</string>
<string name="usb_preference_title" msgid="6551050377388882787">"USB ફાઇલ ટ્રાન્સફર વિકલ્પો"</string>
<string name="use_mtp_button_title" msgid="4333504413563023626">"મીડિયા પ્લેયર તરીકે માઉન્ટ કરો (MTP)"</string>
@@ -98,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"સ્ક્રીન ફેરવો"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"ઝલક"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"શોધો"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"કૅમેરો"</string>
@@ -112,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"કૅમેરો ખોલો"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"નવું કાર્ય લેઆઉટ પસંદ કરો"</string>
<string name="cancel" msgid="6442560571259935130">"રદ કરો"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"સુસંગતતા ઝૂમ બટન."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"નાનીથી મોટી સ્ક્રીન પર ઝૂમ કરો."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"બ્લૂટૂથ કનેક્ટ થયું."</string>
@@ -188,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"રિંગર શાંત છે."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"કાર્ય મોડ"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> કાઢી નાખો."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> કાઢી નાખી."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"તમામ તાજેતરની ઍપ્લિકેશનો કાઢી નાખી."</string>
@@ -285,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"બ્લૂટૂથ (<xliff:g id="NUMBER">%d</xliff:g> ઉપકરણો)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"બ્લૂટૂથ બંધ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"કોઈ જોડી કરેલ ઉપકરણો ઉપલબ્ધ નથી"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> બૅટરી"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"ઑડિઓ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"હૅડસેટ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"ઇનપુટ"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"તેજ"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"આપમેળે ફેરવો"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"સ્ક્રીનને આપમેળે ફેરવો"</string>
@@ -325,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"કનેક્ટ કરી રહ્યું છે..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"ટિથરિંગ"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"હૉટસ્પૉટ"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"નોટિફિકેશનો"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"ફ્લેશલાઇટ"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"મોબાઇલ ડેટા"</string>
@@ -334,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> વાપર્યો"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> મર્યાદા"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> ચેતવણી"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"કાર્ય મોડ"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"રાત્રિ પ્રકાશ"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"સૂર્યાસ્ત વખતે"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"સૂર્યોદય સુધી"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g> વાગ્યે"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> સુધી"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC અક્ષમ કરેલ છે"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC સક્ષમ કરેલ છે"</string>
@@ -348,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"સુરક્ષિત મોડમાં <xliff:g id="APP">%s</xliff:g> અક્ષમ કરેલ છે."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"બધું સાફ કરો"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"વિભાજિત સ્ક્રીનનો ઉપયોગ કરવા માટે અહીં ખેંચો"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"આડું વિભક્ત કરો"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"ઊભું વિભક્ત કરો"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"કસ્ટમ વિભક્ત કરો"</string>
@@ -571,27 +585,21 @@
<string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"બંધ"</string>
<string name="power_notification_controls_description" msgid="4372459941671353358">"પાવર સૂચના નિયંત્રણો સાથે, તમે ઍપની સૂચનાઓ માટે 0 થી 5 સુધીના મહત્વના સ્તરને સેટ કરી શકો છો. \n\n"<b>"સ્તર 5"</b>" \n- સૂચના સૂચિની ટોચ પર બતાવો \n- પૂર્ણ સ્ક્રીન અવરોધની મંજૂરી આપો \n- હંમેશાં ત્વરિત દૃષ્ટિ કરો \n\n"<b>"સ્તર 4"</b>" \n- પૂર્ણ સ્ક્રીન અવરોધ અટકાવો \n- હંમેશાં ત્વરિત દૃષ્ટિ કરો \n\n"<b>"સ્તર 3"</b>" \n- પૂર્ણ સ્ક્રીન અવરોધ અટકાવો \n- ક્યારેય ત્વરિત દૃષ્ટિ કરશો નહીં \n\n"<b>"સ્તર 2"</b>" \n- પૂર્ણ સ્ક્રીન અવરોધ અટકાવો \n- ક્યારેય ત્વરિત દૃષ્ટિ કરશો નહીં \n- ક્યારેય અવાજ અથવા વાઇબ્રેટ કરશો નહીં \n\n"<b>"સ્તર 1"</b>" \n- પૂર્ણ સ્ક્રીન અવરોધની મંજૂરી આપો \n- ક્યારેય ત્વરિત દૃષ્ટિ કરશો નહીં \n- ક્યારેય અવાજ અથવા વાઇબ્રેટ કરશો નહીં \n- લૉક સ્ક્રીન અને સ્ટેટસ બારથી છુપાવો \n- સૂચના સૂચિના તળિયા પર બતાવો \n\n"<b>"સ્તર 0"</b>" \n- ઍપની તમામ સૂચનાઓને બ્લૉક કરો"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"નોટિફિકેશનો"</string>
- <!-- no translation found for notification_channel_disabled (344536703863700565) -->
+ <string name="notification_channel_disabled" msgid="344536703863700565">"તમને હવેથી આ નોટિફિકેશન દેખાશે નહીં"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
<skip />
- <!-- no translation found for inline_keep_showing (8945102997083836858) -->
- <skip />
- <!-- no translation found for inline_stop_button (4172980096860941033) -->
- <skip />
- <!-- no translation found for inline_keep_button (6665940297019018232) -->
- <skip />
- <!-- no translation found for inline_keep_showing_app (1723113469580031041) -->
- <skip />
- <!-- no translation found for notification_unblockable_desc (1037434112919403708) -->
- <skip />
+ <string name="inline_keep_showing" msgid="8945102997083836858">"આ નોટિફિકેશન બતાવવાનું ચાલુ રાખીએ?"</string>
+ <string name="inline_stop_button" msgid="4172980096860941033">"નોટિફિકેશન બંધ કરો"</string>
+ <string name="inline_keep_button" msgid="6665940297019018232">"બતાવવાનું ચાલુ રાખો"</string>
+ <string name="inline_keep_showing_app" msgid="1723113469580031041">"આ ઍપમાંથી નોટિફિકેશન બતાવવાનું ચાલુ રાખીએ?"</string>
+ <string name="notification_unblockable_desc" msgid="1037434112919403708">"આ નોટિફિકેશન બંધ કરી શકશો નહીં"</string>
<string name="notification_channel_controls_opened_accessibility" msgid="6553950422055908113">"<xliff:g id="APP_NAME">%1$s</xliff:g> માટે સૂચના નિયંત્રણો ચાલુ છે"</string>
<string name="notification_channel_controls_closed_accessibility" msgid="7521619812603693144">"<xliff:g id="APP_NAME">%1$s</xliff:g> માટે સૂચના નિયંત્રણો બંધ છે"</string>
<string name="notification_channel_switch_accessibility" msgid="3420796005601900717">"આ ચૅનલની સૂચનાઓને મંજૂરી આપો"</string>
<string name="notification_more_settings" msgid="816306283396553571">"વધુ સેટિંગ્સ"</string>
- <!-- no translation found for notification_app_settings (420348114670768449) -->
- <skip />
+ <string name="notification_app_settings" msgid="420348114670768449">"કસ્ટમાઇઝ કરો"</string>
<string name="notification_done" msgid="5279426047273930175">"થઈ ગયું"</string>
- <!-- no translation found for inline_undo (558916737624706010) -->
- <skip />
+ <string name="inline_undo" msgid="558916737624706010">"રદ કરો"</string>
<string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
<string name="notification_menu_gear_description" msgid="2204480013726775108">"સૂચના નિયંત્રણો"</string>
<string name="notification_menu_snooze_description" msgid="3653669438131034525">"સૂચના સ્નૂઝ કરવાના વિકલ્પો"</string>
@@ -674,7 +682,8 @@
<item msgid="1545641631806817203">"ક્લિપબોર્ડ"</item>
<item msgid="5742013440802239414">"કીકોડ"</item>
<item msgid="8802889973626281575">"કીબોર્ડ સ્વિચર"</item>
- <item msgid="8175437057325747277">"કોઈ નહીં"</item>
+ <item msgid="7095517796293767867">"રોટેશન માટે સૂચન"</item>
+ <item msgid="8494159969042135235">"કોઈ નહીં"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"સામાન્ય"</item>
@@ -798,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"બૅટરી અને ડેટા વપરાશ વિશેની વિગતો માટે ટૅપ કરો"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"મોબાઇલ ડેટા બંધ કરીએ?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"એક ઍપ પરવાનગી વિનંતીને અસ્પષ્ટ કરતી હોવાને કારણે, સેટિંગ્સ તમારા પ્રતિસાદને ચકાસી શકતી નથી."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g>ને <xliff:g id="APP_2">%2$s</xliff:g> સ્લાઇસ બતાવવાની મંજૂરી આપીએ?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- મારાથી <xliff:g id="APP">%1$s</xliff:g>ની માહિતી વાંચી શકાતી નથી"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- મારાથી <xliff:g id="APP">%1$s</xliff:g>ની અંદર ક્રિયાઓ કરી શકાતી નથી"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g>ને કોઈપણ ઍપના સ્લાઇસ બતાવવાની મંજૂરી આપો"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"મંજૂરી આપો"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"નકારો"</string>
</resources>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index ec37855..bb2e897 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"स्क्रीन घुमाएं"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"खास जानकारी"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"सर्च करें"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"कैमरा"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"कैमरा खोलें"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"नया कार्य लेआउट चुनें"</string>
<string name="cancel" msgid="6442560571259935130">"रद्द करें"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"संगतता ज़ूम बटन."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"छोटी से बड़ी स्क्रीन पर ज़ूम करें."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"ब्लूटूथ कनेक्ट किया गया."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"रिंगर मौन."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"कार्य मोड"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> को ख़ारिज करें."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> खा़रिज कर दिया गया."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"हाल ही के सभी ऐप्लिकेशन ख़ारिज कर दिए गए."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"ब्लूटूथ (<xliff:g id="NUMBER">%d</xliff:g> डिवाइस)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"ब्लूटूथ बंद"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"कोई भी युग्मित डिवाइस उपलब्ध नहीं"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> बैटरी"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"ऑडियो"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"हेडसेट"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"इनपुट"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"स्क्रीन की रोशनी"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"स्वत: घुमाएं"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"स्क्रीन स्वत: घुमाएं"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"कनेक्ट हो रहा है..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"टेदरिंग"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"हॉटस्पॉट"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"सूचनाएं"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"फ़्लैशलाइट"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"मोबाइल डेटा"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> उपयोग किया गया"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> सीमा"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> चेतावनी"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"कार्य मोड"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"नाइट लाइट"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"शाम को चालू की जाएगी"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"सुबह तक चालू रहेगी"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g> पर चालू की जाएगी"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> तक"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC बंद है"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC चालू है"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> को सुरक्षित-मोड में बंद किया गया."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Clear all"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"स्क्रीन के दो हिस्से में बंट जाने, स्पिल्ट स्क्रीन, का इस्तेमाल करने के लिए यहां खींचें और छोडें"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"क्षैतिज रूप से विभाजित करें"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"लम्बवत रूप से विभाजित करें"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"अपने मुताबिक बांटें"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"पावर सूचना नियंत्रण के ज़रिये, आप किसी ऐप की सूचना को उसकी अहमियत के हिसाब से 0 से 5 के लेवल पर सेट कर सकते हैं.\n\n"<b>"लेवल 5"</b>" \n- सूचना सूची में सबसे ऊपर दिखाएं \n- पूरे स्क्रीन को ढंकने की अनुमति दें \n- लगातार देखते रहें \n\n"<b>" लेवल 4"</b>" \n- पूरे स्क्रीन को ढंकें \n- लगातार देखते रहें \n\n"<b>"लेवल 3"</b>" \n- पूरे स्क्रीन को ढंकने से रोकें \n-कभी भी न देखें \n\n"<b>"लेवल 2"</b>" \n- पूरे स्क्रीन को ढंकने से रोकें \n- कभी भी देखें \n- कभी भी आवाज़ या कंपन (वाइब्रेशन) न करें \n\n"<b>"लेवल 1"</b>" \n- पूरे स्क्रीन को ढंकने से रोकें \n- कभी भी न देखें \n- कभी भी आवाज़ या कंपन (वाइब्रेशन) न करें \n- लॉक स्क्रीन और स्टेटस बार से छिपाएं \n- सूचना सूची के नीचे दिखाएं \n\n"<b>"लेवल 0"</b>" \n- ऐप्लिकेशन की सभी सूचनाएं रोक दें"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"सूचना"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"अब आपको ये सूचनाएं दिखाई नहीं देंगी"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"ये सूचनाएं दिखाना जारी रखें?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"सूचनाएं दिखाना बंद करें"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"दिखाना जारी रखें"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"क्लिपबोर्ड"</item>
<item msgid="5742013440802239414">"कुंजी कोड"</item>
<item msgid="8802889973626281575">"कीबोर्ड स्विचर"</item>
- <item msgid="8175437057325747277">"कोई नहीं"</item>
+ <item msgid="7095517796293767867">"घुमाने के सुझाव"</item>
+ <item msgid="8494159969042135235">"कोई नहीं"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"सामान्य"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"बैटरी और डेटा खर्च की जानकारी के लिए छूएं"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"मोबाइल डेटा बंद करना चाहते हैं?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"ऐप की वजह से मंज़ूरी के अनुरोध को समझने में दिक्कत हो रही है, इसलिए सेटिंग से आपके जवाब की पुष्टि नहीं हो पा रही है."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> को <xliff:g id="APP_2">%2$s</xliff:g> से हिस्से (स्लाइस) दिखाने की मंज़ूरी दें?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- यह <xliff:g id="APP">%1$s</xliff:g> से सूचना पढ़ सकता है"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- यह <xliff:g id="APP">%1$s</xliff:g> में कार्रवाई कर सकता है"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g> को किसी भी ऐप्लिकेशन से हिस्से (स्लाइस) दिखाने की मंज़ूरी दें."</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"मंज़ूरी दें"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"नामंज़ूर करें"</string>
</resources>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index cb62834..e8096f5 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -89,6 +89,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Početna"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Izbornik"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Pristupačnost"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Zakretanje zaslona"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Pregled"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Pretraži"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparat"</string>
@@ -103,6 +104,12 @@
<string name="camera_label" msgid="7261107956054836961">"otvaranje fotoaparata"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Odaberite novi izgled zadataka"</string>
<string name="cancel" msgid="6442560571259935130">"Odustani"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Gumb za kompatibilnost zumiranja."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zumiranje manjeg zaslona na veći."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth povezan."</string>
@@ -179,7 +186,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Softver zvona utišan."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Način rada"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Odbacivanje aplikacije <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Aplikacija <xliff:g id="APP">%s</xliff:g> odbačena je."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Odbačene su sve nedavne aplikacije."</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (broj uređaja: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth isključen"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Upareni uređaji nisu dostupni"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> baterije"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Slušalice"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Unos"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Svjetlina"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Automatsko izmjenjivanje"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Automatsko zakretanje zaslona"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Povezivanje..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Dijeljenje veze"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Žarišna točka"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Obavijesti"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Svjetiljka"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobilni podaci"</string>
@@ -326,8 +341,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> iskorišteno"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Ograničenje od <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Upozorenje <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Način rada"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Noćno svjetlo"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Uključuje se u suton"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Do izlaska sunca"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Uključuje se u <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Do <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC je onemogućen"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC je omogućen"</string>
@@ -340,6 +362,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Aplikacija <xliff:g id="APP">%s</xliff:g> onemogućena je u sigurnom načinu."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Izbriši sve"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Povucite ovdje da biste upotrebljavali podijeljeni zaslon"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Podijeli vodoravno"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Podijeli okomito"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Podijeli prilagođeno"</string>
@@ -564,6 +588,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Napredne kontrole obavijesti omogućuju vam da postavite razinu važnosti za obavijesti aplikacije od 0 do 5. \n\n"<b>"Razina 5"</b>" \n– prikaži na vrhu popisa obavijesti \n– dopusti prekide prikaza na cijelom zaslonu \n– uvijek dopusti brzi pregled \n\n"<b>"Razina 4"</b>" \n– onemogući prekid prikaza na cijelom zaslonu \n– uvijek dopusti brzi pregled \n\n"<b>"Razina 3"</b>" \n– onemogući prekid prikaza na cijelom zaslonu \n– nikad ne dopusti brzi pregled\n\n"<b>"Razina 2"</b>" \n– onemogući prekid prikaza na cijelom zaslonu \n– nikad ne dopusti brzi pregled \n– nikad ne emitiraj zvuk ni vibraciju \n\n"<b>"Razina 1"</b>" \n– onemogući prekid prikaza na cijelom zaslonu \n– nikad ne dopusti brzi pregled \n– nikad ne emitiraj zvuk ni vibraciju \n– ne prikazuj na zaključanom zaslonu i traci statusa \n– prikaži na dnu popisa obavijesti \n\n"<b>"Razina 0"</b>" \n– blokiraj sve obavijesti aplikacije"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Obavijesti"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Te vam se obavijesti više neće prikazivati"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Želite li da se obavijesti nastave prikazivati?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Zaustavi obavijesti"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Nastavi prikazivati"</string>
@@ -660,7 +686,8 @@
<item msgid="1545641631806817203">"Međuspremnik"</item>
<item msgid="5742013440802239414">"Kôd tipke"</item>
<item msgid="8802889973626281575">"Izmjena tipkovnice"</item>
- <item msgid="8175437057325747277">"Ništa"</item>
+ <item msgid="7095517796293767867">"Predložena rotacija"</item>
+ <item msgid="8494159969042135235">"Ništa"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Uobičajen"</item>
@@ -784,4 +811,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Dodirnite da biste vidjeli pojedinosti o potrošnji baterije i podatkovnom prometu"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Isključiti mobilne podatke?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Budući da aplikacija prekriva zahtjev za dopuštenje, Postavke ne mogu potvrditi vaš odgovor."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Želite li dopustiti aplikaciji <xliff:g id="APP_0">%1$s</xliff:g> da prikazuje isječke aplikacije <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– može čitati informacije aplikacije <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– može vršiti radnje u aplikaciji <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Dopusti aplikaciji <xliff:g id="APP">%1$s</xliff:g> da prikazuje isječke iz bilo koje aplikacije"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Dopusti"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Odbij"</string>
</resources>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 2069952..fa173d6 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Főoldal"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menü"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Kisegítő lehetőségek"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Képernyő elforgatása"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Áttekintés"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Keresés"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"kamera megnyitása"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Új feladatelrendezés kiválasztása"</string>
<string name="cancel" msgid="6442560571259935130">"Mégse"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Kompatibilitási zoom gomb."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Kicsinyítsen a nagyobb képernyőhöz."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth csatlakoztatva."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Csengő néma."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Munka mód"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"A(z) <xliff:g id="APP">%s</xliff:g> elvetése."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> eltávolítva."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Az összes alkalmazás eltávolítva a nemrég használtak közül."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> eszköz)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth kikapcsolva"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Nem áll rendelkezésre párosított eszköz"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Akkumulátor: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Hang"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Headset"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Bevitel"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Fényerő"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Automatikus elforgatás"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Automatikus képernyőforgatás"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Csatlakozás…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Megosztás"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Értesítések"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Zseblámpa"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobiladatok"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> felhasználva"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> korlát"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Figyelem! <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Munka mód"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Éjszakai fény"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Be: naplemente"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Napfelkeltéig"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Bekapcsolás: <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Eddig: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"Az NFC ki van kapcsolva"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"Az NFC be van kapcsolva"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"A(z) <xliff:g id="APP">%s</xliff:g> csökkentett módban ki van kapcsolva."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Összes törlése"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Húzza ide az osztott képernyő használatához"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Osztott vízszintes"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Osztott függőleges"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Osztott egyéni"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Az értesítési beállítások révén 0-tól 5-ig állíthatja be a fontossági szintet az alkalmazás értesítéseinél. \n\n"<b>"5. szint"</b>" \n– Megjelenítés az értesítési lista tetején \n– Teljes képernyő megszakításának engedélyezése \n– Mindig felugrik \n\n"<b>"4. szint"</b>" \n– Teljes képernyő megszakításának megakadályozása \n– Mindig felugrik \n\n"<b>"3. szint"</b>" \n– Teljes képernyő megszakításának megakadályozása \n– Soha nem ugrik fel \n\n"<b>"2. szint"</b>" \n– Teljes képernyő megszakításának megakadályozása \n– Soha nem ugrik fel \n– Soha nincs hangjelzés és rezgés \n\n"<b>"1. szint"</b>" \n– Teljes képernyő megszakításának megakadályozása \n– Soha nem ugrik fel \n– Soha nincs hangjelzés vagy rezgés \n– Elrejtés a lezárási képernyőről és az állapotsávról \n– Megjelenítés az értesítési lista alján \n\n"<b>"0. szint"</b>" \n– Az alkalmazás összes értesítésének letiltása"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Értesítések"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Többé nem jelennek meg ezek az értesítések"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Továbbra is megjelenjenek ezek az értesítések?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Értesítések letiltása"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Megjelenítés továbbra is"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Vágólap"</item>
<item msgid="5742013440802239414">"Billentyűkód"</item>
<item msgid="8802889973626281575">"Billentyűzetváltó"</item>
- <item msgid="8175437057325747277">"Nincs"</item>
+ <item msgid="7095517796293767867">"Forgatási javaslat"</item>
+ <item msgid="8494159969042135235">"Nincs"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normál"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Koppintson az akkumulátor- és adathasználat részleteinek megtekintéséhez"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Kikapcsolja a mobiladatokat?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Mivel az egyik alkalmazás eltakarja az engedélykérést, a Beállítások alkalmazás nem tudja ellenőrizni az Ön válaszát."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Engedélyezi a(z) <xliff:g id="APP_0">%1$s</xliff:g> alkalmazásnak, hogy részleteket mutasson a(z) <xliff:g id="APP_2">%2$s</xliff:g> alkalmazásból?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– Információkat olvashat a(z) <xliff:g id="APP">%1$s</xliff:g> alkalmazásból"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– Műveleteket végezhet a(z) <xliff:g id="APP">%1$s</xliff:g> alkalmazáson belül"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Engedélyezi a(z) <xliff:g id="APP">%1$s</xliff:g> alkalmazásnak, hogy bármely alkalmazásból részletet jelenítsen meg"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Engedélyezés"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Elutasítás"</string>
</resources>
diff --git a/packages/SystemUI/res/values-hy/strings.xml b/packages/SystemUI/res/values-hy/strings.xml
index 0656f0c..33d8821 100644
--- a/packages/SystemUI/res/values-hy/strings.xml
+++ b/packages/SystemUI/res/values-hy/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"Պտտել էկրանը"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Համատեսք"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Որոնել"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Տեսախցիկ"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"բացել ֆոտոխցիկը"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Ընտրել առաջադրանքի նոր դասավորություն"</string>
<string name="cancel" msgid="6442560571259935130">"Չեղարկել"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Համատեղելիության խոշորացման կոճակը:"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Դիտափոխել փոքրից ավելի մեծ էկրան:"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth-ը միացված է:"</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Զանգակը լռեցված է:"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Աշխատանքային ռեժիմ"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Անտեսել <xliff:g id="APP">%s</xliff:g>-ը:"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g>-ը անտեսված է:"</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Բոլոր վերջին հավելվածները հեռացվել են ցուցակից:"</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> սարք)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth-ն անջատված է"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Զուգակցված սարքեր չկան"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Մարտկոցի լիցքը՝ <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Աուդիո"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Ականջակալ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Մուտքագրում"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Պայծառություն"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Ինքնապտտում"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Ավտոմատ պտտել էկրանը"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Միանում է..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Մոդեմի ռեժիմ"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Թեժ կետ"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Ծանուցումներ"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Լապտեր"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Բջջային ինտերնետ"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Օգտագործված է՝ <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Սահմանաչափ՝ <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> զգուշացում"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Աշխատանքային ռեժիմ"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Գիշերային լույս"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Կմիացվի մայրամուտին"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Մինչև լուսաբաց"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Կմիացվի ժամը <xliff:g id="TIME">%s</xliff:g>-ին"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Մինչև <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC-ն անջատված է"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC-ն միացված է"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> հավելվածը անվտանգ ռեժիմում անջատված է:"</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Մաքրել բոլորը"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Քաշեք այստեղ՝ էկրանի տրոհումն օգտագործելու համար"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Հորիզոնական տրոհում"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Ուղղահայաց տրոհում"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Հատուկ տրոհում"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Ծանուցումների ընդլայնված կառավարման օգնությամբ կարող եք յուրաքանչյուր հավելվածի ծանուցումների համար նշանակել կարևորության աստիճան՝ 0-5 սահմաններում: \n\n"<b>"5-րդ աստիճան"</b>" \n- Ցուցադրել ծանուցումների ցանկի վերևում \n- Թույլատրել լիաէկրան ընդհատումները \n- Միշտ ցուցադրել կարճ ծանուցումները \n\n"<b>"4-րդ աստիճան"</b>" \n- Արգելել լիաէկրան ընդհատումները \n- Միշտ ցուցադրել կարճ ծանուցումները \n\n"<b>"3-րդ աստիճան"</b>" \n- Արգելել լիաէկրան ընդհատումները \n- Արգելել կարճ ծանուցումների ցուցադրումը \n\n"<b>"2-րդ աստիճան"</b>" \n- Արգելել լիաէկրան ընդհատումները \n- Արգելել կարճ ծանուցումների ցուցադրումը \n- Անջատել ձայնը և թրթռումը \n\n"<b>"1-ին աստիճան"</b>" \n- Արգելել լիաէկրան ընդհատումները \n- Արգելել կարճ ծանուցումների ցուցադրումը \n- Անջատել ձայնը և թրթռումը \n- Չցուցադրել կողպէկրանում և կարգավիճակի գոտում \n- Ցուցադրել ծանուցումների ցանկի ներքևում \n\n"<b>"0-րդ աստիճան"</b>\n"- Արգելափակել հավելվածի բոլոր ծանուցումները"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Ծանուցումներ"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Դուք այլևս չեք ստանա այս ծանուցումները"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Ցուցադրե՞լ այս ծանուցումները։"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Չցուցադրել ծանուցումներ"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Ցուցադրել"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Սեղմատախտակ"</item>
<item msgid="5742013440802239414">"Ստեղնային կոդ"</item>
<item msgid="8802889973626281575">"Ստեղնաշարի փոխարկիչ"</item>
- <item msgid="8175437057325747277">"Չկան"</item>
+ <item msgid="7095517796293767867">"Պտույտ"</item>
+ <item msgid="8494159969042135235">"Ոչ մեկը"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Սովորական"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Հպեք՝ մարտկոցի և թրաֆիկի մանրամասները տեսնելու համար"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Անջատե՞լ բջջային ինտերնետը։"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Քանի որ ներածումն արգելափակված է ինչ-որ հավելվածի կողմից, Կարգավորումները չեն կարող հաստատել ձեր պատասխանը:"</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Թույլատրե՞լ <xliff:g id="APP_0">%1$s</xliff:g> հավելվածին ցուցադրել հատվածներ <xliff:g id="APP_2">%2$s</xliff:g> հավելվածից"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Կարող է կարդալ տեղեկություններ <xliff:g id="APP">%1$s</xliff:g> հավելվածից"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Կարող է կատարել գործողություններ <xliff:g id="APP">%1$s</xliff:g> հավելվածում"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Թույլատրել <xliff:g id="APP">%1$s</xliff:g> հավելվածին ցուցադրել հատվածներ ցանկացած հավելվածից"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Թույլատրել"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Մերժել"</string>
</resources>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 6d08308..7ed6234 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Utama"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Aksesibilitas"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Putar layar"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Ringkasan"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Telusuri"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"buka kamera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Pilih tata letak tugas baru"</string>
<string name="cancel" msgid="6442560571259935130">"Batal"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Tombol perbesar/perkecil kompatibilitas."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Perbesar dari layar kecil ke besar."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth tersambung."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Pendering senyap."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Mode kerja"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Menyingkirkan <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> disingkirkan."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Semua aplikasi terbaru telah ditutup."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Perangkat)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth Mati"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Perangkat yang disandingkan tak tersedia"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Baterai <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Headset"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Masukan"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Kecerahan"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Rotasi otomatis"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Putar layar otomatis"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Menyambung..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Menambatkan"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notifikasi"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Lampu senter"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Data seluler"</string>
@@ -324,8 +339,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> digunakan"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Batas <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Peringatan <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Mode kerja"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"Profil kerja"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"Notifikasi & aplikasi dinonaktifkan"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Cahaya Malam"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Aktif saat matahari terbenam"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Sampai matahari terbit"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Aktif pada <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Sampai <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC dinonaktifkan"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC diaktifkan"</string>
@@ -337,7 +357,8 @@
<string name="recents_launch_error_message" msgid="2969287838120550506">"Tidak dapat memulai <xliff:g id="APP">%s</xliff:g>."</string>
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> dinonaktifkan dalam mode aman."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Hapus semua"</string>
- <string name="recents_drag_hint_message" msgid="2649739267073203985">"Seret ke sini untuk menggunakan layar terpisah"</string>
+ <string name="recents_drag_hint_message" msgid="2649739267073203985">"Tarik ke sini untuk menggunakan layar terpisah"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Geser ke atas untuk beralih aplikasi"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Pisahkan Horizontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Pisahkan Vertikal"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Pisahkan Khusus"</string>
@@ -562,6 +583,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Dengan kontrol notifikasi daya, Anda dapt menyetel level kepentingan notifikasi aplikasi dari 0 sampai 5. \n\n"<b>"Level 5"</b>" \n- Muncul di atas daftar notifikasi \n- Izinkan interupsi layar penuh \n- Selalu intip pesan \n\n"<b>"Level 4"</b>" \n- Jangan interupsi layar penuh \n- Selalu intip pesan \n\n"<b>"Level 3"</b>" \n- Jangan interupsi layar penuh \n- Tak pernah intip pesan \n\n"<b>"Level 2"</b>" \n- Jangan interupsi layar penuh \n- Tak pernah intip pesan \n- Tanpa suara dan getaran \n\n"<b>"Level 1"</b>" \n- Jangan interupsi layar penuh \n- Tak pernah intip pesan \n- Tanpa suara atau getaran \n- Sembunyikan dari layar kunci dan bilah status \n- Muncul di bawah daftar notifikasi \n\n"<b>"Level 0"</b>" \n- Blokir semua notifikasi dari aplikasi"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notifikasi"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Anda tidak akan melihat notifikasi ini lagi"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Terus tampilkan notifikasi ini?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Hentikan notifikasi"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Terus tampilkan"</string>
@@ -656,7 +679,8 @@
<item msgid="1545641631806817203">"Papan klip"</item>
<item msgid="5742013440802239414">"Kode tombol"</item>
<item msgid="8802889973626281575">"Pengalih keyboard"</item>
- <item msgid="8175437057325747277">"Tidak ada"</item>
+ <item msgid="7095517796293767867">"Saran rotasi"</item>
+ <item msgid="8494159969042135235">"Tak Ada"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Biasa"</item>
@@ -674,8 +698,8 @@
<string name="right_keycode" msgid="708447961000848163">"Kode tombol kanan"</string>
<string name="left_icon" msgid="3096287125959387541">"Ikon kiri"</string>
<string name="right_icon" msgid="3952104823293824311">"Ikon kanan"</string>
- <string name="drag_to_add_tiles" msgid="7058945779098711293">"Seret untuk menambahkan ubin"</string>
- <string name="drag_to_remove_tiles" msgid="3361212377437088062">"Seret ke sini untuk menghapus"</string>
+ <string name="drag_to_add_tiles" msgid="7058945779098711293">"Tarik untuk menambahkan ubin"</string>
+ <string name="drag_to_remove_tiles" msgid="3361212377437088062">"Tarik ke sini untuk menghapus"</string>
<string name="qs_edit" msgid="2232596095725105230">"Edit"</string>
<string name="tuner_time" msgid="6572217313285536011">"Waktu"</string>
<string-array name="clock_options">
@@ -729,7 +753,7 @@
<string name="pip_phone_minimize" msgid="1079119422589131792">"Minimalkan"</string>
<string name="pip_phone_close" msgid="8416647892889710330">"Tutup"</string>
<string name="pip_phone_settings" msgid="8080777499521528521">"Setelan"</string>
- <string name="pip_phone_dismiss_hint" msgid="6351678169095923899">"Seret ke bawah untuk menutup"</string>
+ <string name="pip_phone_dismiss_hint" msgid="6351678169095923899">"Tarik ke bawah untuk menutup"</string>
<string name="pip_menu_title" msgid="4707292089961887657">"Menu"</string>
<string name="pip_notification_title" msgid="3204024940158161322">"<xliff:g id="NAME">%s</xliff:g> adalah picture-in-picture"</string>
<string name="pip_notification_message" msgid="5619512781514343311">"Jika Anda tidak ingin <xliff:g id="NAME">%s</xliff:g> menggunakan fitur ini, tap untuk membuka setelan dan menonaktifkannya."</string>
@@ -780,4 +804,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Tap untuk melihat detail penggunaan baterai dan data"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Nonaktifkan data seluler?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Karena sebuah aplikasi menghalangi permintaan izin, Setelan tidak dapat memverifikasi respons Anda."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Izinkan <xliff:g id="APP_0">%1$s</xliff:g> menampilkan potongan <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Dapat membaca informasi dari <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Dapat mengambil tindakan di dalam <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Izinkan <xliff:g id="APP">%1$s</xliff:g> menampilkan potongan dari aplikasi apa pun"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Izinkan"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Tolak"</string>
</resources>
diff --git a/packages/SystemUI/res/values-is/strings.xml b/packages/SystemUI/res/values-is/strings.xml
index dbdb273..1e0cd63 100644
--- a/packages/SystemUI/res/values-is/strings.xml
+++ b/packages/SystemUI/res/values-is/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Heim"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Valmynd"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Aðgengi"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Snúa skjánum"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Yfirlit"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Leita"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Myndavél"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"opna myndavél"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Velja nýtt útlit verkefna"</string>
<string name="cancel" msgid="6442560571259935130">"Hætta við"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Hnappur fyrir samhæfisaðdrátt."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Aðlaga forrit fyrir lítinn skjá að stærri skjá."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth tengt."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Engin hringing."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Vinnustilling"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Hunsa <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> vísað frá."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Öll nýleg forrit fjarlægð."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> tæki)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Slökkt á Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Engin pöruð tæki til staðar"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> rafhlöðuhleðsla"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Hljóð"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Höfuðtól"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Inntak"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Birtustig"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Sjálfvirkur snúningur"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Snúa skjá sjálfkrafa"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Tengist..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tjóðrun"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Heitur reitur"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Tilkynningar"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Vasaljós"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Farsímagögn"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> notuð"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> hámark"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> viðvörun"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Vinnustilling"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Næturljós"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Kveikt við sólsetur"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Til sólarupprásar"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Kveikt klukkan <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Til klukkan <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"Slökkt á NFC"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"Kveikt á NFC"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Slökkt er á <xliff:g id="APP">%s</xliff:g> í öruggri stillingu."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Hreinsa allt"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Dragðu hingað til að skipta skjánum"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Lárétt skipting"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Lóðrétt skipting"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Sérsniðin skipting"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Með orkutilkynningastýringum geturðu stillt mikilvægi frá 0 upp í 5 fyrir tilkynningar forrita. \n\n"<b>"Stig 5"</b>" \n- Sýna efst á tilkynningalista \n- Leyfa truflun þegar birt er á öllum skjánum \n- Kíkja alltaf \n\n"<b>"Stig 4"</b>" \n- Hindra truflun við birtingu á öllum skjánum \n- Kíkja alltaf \n\n"<b>"Stig 3"</b>" \n- Hindra truflun við birtingu á öllum skjánum \n- Kíkja aldrei \n\n"<b>"Stig 2"</b>" \n- Hindra truflun við birtingu á öllum skjánum \n- Kíkja aldrei \n- Slökkva á hljóði og titringi \n\n"<b>"Stig 1"</b>" \n- Hindra truflun við birtingu á öllum skjánum \n- Kíkja aldrei \n- Slökkva á hljóði og titringi \n- Fela á lásskjá og stöðustiku \n- Sýna neðst á tilkynningalista \n\n"<b>"Stig 0"</b>" \n- Setja allar tilkynningar frá forriti á bannlista"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Tilkynningar"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Þú munt ekki sjá þessar tilkynningar aftur"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Sýna áfram þessar tilkynningar?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Stöðva tilkynningar"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Sýna áfram"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Klippiborð"</item>
<item msgid="5742013440802239414">"Lykilkóði"</item>
<item msgid="8802889973626281575">"Lyklaborðsval"</item>
- <item msgid="8175437057325747277">"Ekkert"</item>
+ <item msgid="7095517796293767867">"Tillaga um snúning"</item>
+ <item msgid="8494159969042135235">"Ekkert"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Venjulegt"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Ýttu til að fá upplýsingar um rafhlöðu- og gagnanotkun"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Slökkva á farsímagögnum?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Stillingar geta ekki staðfest svarið þitt vegna þess að forrit er að fela heimildarbeiðni."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Viltu leyfa <xliff:g id="APP_0">%1$s</xliff:g> að sýna sneiðar úr <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Það getur lesið upplýsingar úr <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Það getur gripið til aðgerða í <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Leyfa <xliff:g id="APP">%1$s</xliff:g> að sýna sneiðar úr hvaða forriti sem er"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Leyfa"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Hafna"</string>
</resources>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 642a8dc..880da63 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accessibilità"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Ruota lo schermo"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Panoramica"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Cerca"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Fotocamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"apri fotocamera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Seleziona un nuovo layout per le attività"</string>
<string name="cancel" msgid="6442560571259935130">"Annulla"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Pulsante zoom compatibilità."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom inferiore per schermo più grande."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth collegato."</string>
@@ -180,7 +187,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Suoneria silenziosa."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Modalità Lavoro"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Elimina <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> eliminata."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Tutte le applicazioni recenti sono state rimosse."</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispositivi)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth spento"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Nessun dispositivo accoppiato disponibile"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Batteria: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Auricolare"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Ingresso"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Luminosità"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Rotazione automatica"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Rotazione automatica dello schermo"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Connessione..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tethering"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notifiche"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Torcia"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Dati mobili"</string>
@@ -326,8 +341,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> utilizzati"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Limite di <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Avviso <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Modalità Lavoro"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"Profilo di lavoro"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"Le app e le notifiche sono disattivate"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Luminosità notturna"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Attivata al tramonto"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Fino all\'alba"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Attivata alle ore <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Fino alle ore <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC non attiva"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC attiva"</string>
@@ -340,6 +360,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"L\'app <xliff:g id="APP">%s</xliff:g> è stata disattivata in modalità provvisoria."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Cancella tutto"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Trascina qui per utilizzare la modalità Schermo diviso"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Scorri verso l\'alto per passare ad altre app"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Divisione in orizzontale"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Divisione in verticale"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Divisione personalizzata"</string>
@@ -564,6 +585,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"I controlli di gestione delle notifiche ti consentono di impostare un livello di importanza compreso tra 0 e 5 per le notifiche di un\'app. \n\n"<b>"Livello 5"</b>" \n- Mostra in cima all\'elenco di notifiche \n- Consenti l\'interruzione a schermo intero \n- Visualizza sempre \n\n"<b>"Livello 4"</b>" \n- Impedisci l\'interruzione a schermo intero \n- Visualizza sempre \n\n"<b>"Livello 3"</b>" \n- Impedisci l\'interruzione a schermo intero \n- Non visualizzare mai \n\n"<b>"Livello 2"</b>" \n- Impedisci l\'interruzione a schermo intero \n- Non visualizzare mai \n- Non emettere mai suoni e vibrazioni \n\n"<b>"Livello 1"</b>" \n- Impedisci l\'interruzione a schermo intero \n- Non visualizzare mai \n- Non emettere mai suoni e vibrazioni \n- Nascondi da schermata di blocco e barra di stato \n- Mostra in fondo all\'elenco di notifiche \n\n"<b>"Livello 0"</b>" \n- Blocca tutte le notifiche dell\'app"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notifiche"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Non vedrai più queste notifiche"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Continuare a ricevere queste notifiche?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Interrompi la ricezione di notifiche"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Continua a mostrare"</string>
@@ -658,7 +681,8 @@
<item msgid="1545641631806817203">"Appunti"</item>
<item msgid="5742013440802239414">"Keycode"</item>
<item msgid="8802889973626281575">"Selettore tastiera"</item>
- <item msgid="8175437057325747277">"Nessuno"</item>
+ <item msgid="7095517796293767867">"Suggerimento per la rotazione"</item>
+ <item msgid="8494159969042135235">"Nessuno"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normale"</item>
@@ -782,4 +806,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Tocca per conoscere i dettagli sull\'utilizzo dei dati e della batteria"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Disattivare i dati mobili?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Un\'app sta oscurando una richiesta di autorizzazione, pertanto Impostazioni non può verificare la tua risposta."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Vuoi consentire all\'app <xliff:g id="APP_0">%1$s</xliff:g> di mostrare porzioni dell\'app <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Può leggere informazioni dell\'app <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Può compiere azioni nell\'app <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Consenti all\'app <xliff:g id="APP">%1$s</xliff:g> di mostrare porzioni di qualsiasi app"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Consenti"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Nega"</string>
</resources>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 4fd68c2..b6a153e 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -35,7 +35,7 @@
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"מתמשך"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"הודעות"</string>
<string name="battery_low_title" msgid="6456385927409742437">"עוצמת הסוללה נמוכה"</string>
- <string name="battery_low_title_hybrid" msgid="6268991275887381595">"עוצמת הסוללה נמוכה. כדאי להפעיל את מצב החיסכון בסוללה"</string>
+ <string name="battery_low_title_hybrid" msgid="6268991275887381595">"הסוללה חלשה: כדאי להפעיל את מצב החיסכון בסוללה"</string>
<string name="battery_low_percent_format" msgid="2900940511201380775">"נותרו <xliff:g id="PERCENTAGE">%s</xliff:g>"</string>
<string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"נותרו <xliff:g id="PERCENTAGE">%s</xliff:g>, נשארו בערך <xliff:g id="TIME">%s</xliff:g> על סמך השימוש במכשיר"</string>
<string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"נותרו <xliff:g id="PERCENTAGE">%s</xliff:g>, נשארו בערך <xliff:g id="TIME">%s</xliff:g>"</string>
@@ -78,9 +78,9 @@
<string name="screenshot_saving_text" msgid="2545047868936087248">"מתבצעת שמירה של צילום המסך"</string>
<string name="screenshot_saved_title" msgid="5637073968117370753">"צילום המסך נשמר"</string>
<string name="screenshot_saved_text" msgid="7574667448002050363">"אפשר להקיש כדי להציג את צילום המסך"</string>
- <string name="screenshot_failed_title" msgid="9096484883063264803">"לא ניתן לבצע צילום מסך"</string>
+ <string name="screenshot_failed_title" msgid="9096484883063264803">"לא ניתן היה לבצע צילום מסך"</string>
<string name="screenshot_failed_to_save_unknown_text" msgid="8844781948876286488">"התגלתה בעיה בשמירת צילום המסך"</string>
- <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"לא ניתן לשמור צילום מסך עקב שטח אחסון מוגבל"</string>
+ <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"לא היה מספיק מקום לשמור את צילום המסך"</string>
<string name="screenshot_failed_to_capture_text" msgid="173674476457581486">"האפליקציה או הארגון שלך אינם מתירים ליצור צילומי מסך"</string>
<string name="usb_preference_title" msgid="6551050377388882787">"אפשרויות העברת קבצים ב-USB"</string>
<string name="use_mtp_button_title" msgid="4333504413563023626">"טען כנגן מדיה (MTP)"</string>
@@ -90,6 +90,7 @@
<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_rotate_button" msgid="7402949513740253006">"סיבוב המסך"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"סקירה"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"חיפוש"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"מצלמה"</string>
@@ -104,6 +105,12 @@
<string name="camera_label" msgid="7261107956054836961">"פתח את המצלמה"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"בחר פריסה חדשה להצגת משימות"</string>
<string name="cancel" msgid="6442560571259935130">"ביטול"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"לחצן מרחק מתצוגה של תאימות."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"שנה מרחק מתצוגה של מסך קטן לגדול יותר."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth מחובר."</string>
@@ -180,7 +187,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"צלצול שקט."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"מצב עבודה"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"סגור את <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> נדחה."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"כל האפליקציות האחרונות נסגרו."</string>
@@ -279,6 +287,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> מכשירים)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth מופסק"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"אין מכשירים מותאמים זמינים"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> סוללה"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"אודיו"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"אוזניות"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"קלט"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"בהירות"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"סיבוב אוטומטי"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"סיבוב אוטומטי של המסך"</string>
@@ -319,6 +331,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"מתחבר..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"שיתוף אינטרנט בין ניידים"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"נקודה לשיתוף אינטרנט"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"הודעות"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"פנס"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"חבילת גלישה"</string>
@@ -328,8 +343,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> בשימוש"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"הגבלה של <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"אזהרה - <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"מצב עבודה"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"תאורת לילה"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"מופעל בשקיעה"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"עד הזריחה"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"מופעל בשעה <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"עד <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC מושבת"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC מופעל"</string>
@@ -342,6 +364,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> מושבת במצב בטוח."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"נקה הכל"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"גרור לכאן כדי להשתמש במסך מפוצל"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"פיצול אופקי"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"פיצול אנכי"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"פיצול מותאם אישית"</string>
@@ -565,11 +589,13 @@
<string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"כבוי"</string>
<string name="power_notification_controls_description" msgid="4372459941671353358">"בעזרת פקדים של הודעות הפעלה, תוכל להגדיר רמת חשיבות מ-0 עד 5 להודעות אפליקציה. \n\n"<b>"רמה 5"</b>" \n- הצג בראש רשימת ההודעות \n- אפשר הפרעה במסך מלא \n- תמיד אפשר הצצה \n\n"<b>"רמה 4"</b>" \n- מנע הפרעה במסך מלא \n- תמיד אפשר הצצה \n\n"<b>"רמה 3"</b>" \n- מנע הפרעה במסך מלא \n- אף פעם אל תאפשר הצצה \n\n"<b>"רמה 2"</b>" \n- מנע הפרעה במסך מלא \n- אף פעם אל תאפשר הצצה \n- אף פעם אל תאפשר קול ורטט \n\n"<b>"רמה 1"</b>" \n- מנע הפרעה במסך מלא \n- אף פעם אל תאפשר הצצה \n- אף פעם אל תאפשר קול ורטט \n- הסתר ממסך הנעילה ומשורת הסטטוס \n- הצג בתחתית רשימת ההודעות \n\n"<b>"רמה 0"</b>" \n- חסום את כל ההודעות מהאפליקציה"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"הודעות"</string>
- <string name="notification_channel_disabled" msgid="344536703863700565">"לא תראה יותר את ההודעות האלה"</string>
- <string name="inline_keep_showing" msgid="8945102997083836858">"להמשיך להציג את ההודעות האלה?"</string>
- <string name="inline_stop_button" msgid="4172980096860941033">"הפסקת הודעות"</string>
- <string name="inline_keep_button" msgid="6665940297019018232">"להמשיך להציג"</string>
- <string name="inline_keep_showing_app" msgid="1723113469580031041">"להמשיך להציג הודעות מהאפליקציה הזאת?"</string>
+ <string name="notification_channel_disabled" msgid="344536703863700565">"ההודעות האלה לא יוצגו לך יותר"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
+ <string name="inline_keep_showing" msgid="8945102997083836858">"שנמשיך להציג לך את ההודעות האלה?"</string>
+ <string name="inline_stop_button" msgid="4172980096860941033">"לא, אל תמשיכו"</string>
+ <string name="inline_keep_button" msgid="6665940297019018232">"כן, המשיכו"</string>
+ <string name="inline_keep_showing_app" msgid="1723113469580031041">"שנמשיך להציג לך הודעות מהאפליקציה הזאת?"</string>
<string name="notification_unblockable_desc" msgid="1037434112919403708">"לא ניתן לכבות את ההודעות האלה"</string>
<string name="notification_channel_controls_opened_accessibility" msgid="6553950422055908113">"פקדי ההודעות של <xliff:g id="APP_NAME">%1$s</xliff:g> נפתחו"</string>
<string name="notification_channel_controls_closed_accessibility" msgid="7521619812603693144">"פקדי ההודעות של <xliff:g id="APP_NAME">%1$s</xliff:g> נסגרו"</string>
@@ -664,7 +690,8 @@
<item msgid="1545641631806817203">"לוח"</item>
<item msgid="5742013440802239414">"קוד מפתח"</item>
<item msgid="8802889973626281575">"מחליף מקלדת"</item>
- <item msgid="8175437057325747277">"ללא"</item>
+ <item msgid="7095517796293767867">"הצעת סיבוב"</item>
+ <item msgid="8494159969042135235">"אף אחת"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"רגילה"</item>
@@ -788,4 +815,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"הקש לקבלת פרטים על צריכה של נתונים וסוללה"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"לכבות את חבילת הגלישה?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"יש אפליקציה שמסתירה את בקשת ההרשאה, ולכן להגדרות אין אפשרות לאמת את התשובה."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"האם לאפשר ל-<xliff:g id="APP_0">%1$s</xliff:g> להציג חלקים מ-<xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- תהיה לה אפשרות לקרוא מידע מ-<xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- תהיה לה יכולת לנקוט פעולה בתוך <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"יש לאשר ל-<xliff:g id="APP">%1$s</xliff:g> להראות חלקים מכל אפליציה שהיא"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"אני רוצה לאשר"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"אני לא מרשה"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ka/strings.xml b/packages/SystemUI/res/values-ka/strings.xml
index 09c978f..3a7fc50 100644
--- a/packages/SystemUI/res/values-ka/strings.xml
+++ b/packages/SystemUI/res/values-ka/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"ეკრანის შეტრიალება"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"მიმოხილვა"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"ძიება"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"კამერა"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"კამერის გახსნა"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"ახალი ამოცანის განლაგების არჩევა"</string>
<string name="cancel" msgid="6442560571259935130">"გაუქმება"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"თავსებადი მასშტაბირების ღილაკი."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"შეცვალეთ პატარა ეკრანი უფრო დიდით."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth დაკავშირებულია."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"უხმო რეჟიმი."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"სამსახურის რეჟიმი"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g>-ის უგულებელყოფა."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ამოშლილია სიიდან."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"ყველა ბოლო აპლიკაცია გაუქმდა."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> მოწყობილობა)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth გამორთულია"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"დაწყვილებული მოწყობილობები მიუწვდომელია"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ბატარეა"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"აუდიო"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"ყურსაცვამი"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"შეყვანა"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"სიკაშკაშე"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"ავტოროტაცია"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"ეკრანის ავტომატური შეტრიალება"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"დაკავშირება..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"ტეტერინგი"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"წვდომის წერტილი"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"შეტყობინებები"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"ფანარი"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"მობილური ინტერნეტი"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"გამოყენებულია: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"ლიმიტი: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> გაფრთხილება"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"სამსახურის რეჟიმი"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"ღამის განათება"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"ჩაირთოს მზის ჩასვლისას"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"მზის ამოსვლამდე"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"ჩაირთოს <xliff:g id="TIME">%s</xliff:g>-ზე"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g>-მდე"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC გათიშულია"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC ჩართულია"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> გათიშულია უსაფრთხო რეჟიმში."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"ყველას გასუფთავება"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"ეკრანის გასაყოფად, ჩავლებით გადმოიტანეთ აქ"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"ჰორიზონტალური გაყოფა"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"ვერტიკალური გაყოფა"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"ინდივიდუალური გაყობა"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"შეტყობინებების მართვის საშუალებების მეშვეობით, შეგიძლიათ განსაზღვროთ აპის შეტყობინებების მნიშვნელობის დონე 0-დან 5-მდე დიაპაზონში. \n\n"<b>"დონე 5"</b>" \n— შეტყობინებათა სიის თავში ჩვენება \n— სრულეკრანიანი რეჟიმის შეფერხების დაშვება \n— ეკრანზე ყოველთვის გამოჩენა \n\n"<b>"დონე 4"</b>" \n— სრულეკრანიანი რეჟიმის შეფერხების აღკვეთა \n— ეკრანზე ყოველთვის გამოჩენა \n\n"<b>"დონე 3"</b>" \n— სრულეკრანიანი რეჟიმის შეფერხების აღკვეთა \n— ეკრანზე გამოჩენის აღკვეთა \n\n"<b>"დონე 2"</b>" \n— სრულეკრანიანი რეჟიმის შეფერხების აღკვეთა \n— ეკრანზე გამოჩენის აღკვეთა \n— ხმისა და ვიბრაციის აღკვეთა \n\n"<b>"დონე 1"</b>" \n— სრულეკრანიანი რეჟიმის შეფერხების აღკვეთა \n— ეკრანზე გამოჩენის აღკვეთა \n— ხმისა და ვიბრაციის აღკვეთა \n— ჩაკეტილი ეკრანიდან და სტატუსის ზოლიდან დამალვა \n— შეტყობინებათა სიის ბოლოში ჩვენება \n\n"<b>"დონე 0"</b>" \n— აპის ყველა შეტყობინების დაბლოკვა"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"შეტყობინებები"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"ამ შეტყობინებებს აღარ დაინახავთ"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"გაგრძელდეს ამ შეტყობინებათა ჩვენება?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"შეტყობინებების შეწყვეტა"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"ჩვენების გაგრძელება"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"გაცვლის ბუფერი"</item>
<item msgid="5742013440802239414">"კლავიშის კოდი"</item>
<item msgid="8802889973626281575">"კლავიატურის გადამრთველი"</item>
- <item msgid="8175437057325747277">"არცერთი"</item>
+ <item msgid="7095517796293767867">"შეტრიალების შეთავაზება"</item>
+ <item msgid="8494159969042135235">"არც ერთი"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"ჩვეულებრივი"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"შეეხეთ ბატარეისა და მონაცემების მოხმარების შესახებ დეტალური ინფორმაციისთვის"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"გსურთ მობილური ინტერნეტის გამორთვა?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"ვინაიდან აპი ფარავს ნებართვის მოთხოვნას, პარამეტრების მიერ თქვენი პასუხი ვერ დასტურდება."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"ანიჭებთ ნებართვას <xliff:g id="APP_0">%1$s</xliff:g>-ს, აჩვენოს <xliff:g id="APP_2">%2$s</xliff:g>-ის ფრაგმენტები?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- მას შეუძლია ინფორმაციის <xliff:g id="APP">%1$s</xliff:g>-დან წაკითხვა"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- მას შეუძლია ქმედებების <xliff:g id="APP">%1$s</xliff:g>-ში განხორციელება"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g>-ისთვის ფრაგმენტების ნებისმიერი აპიდან ჩვენების ნების დართვა"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"დაშვება"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"უარყოფა"</string>
</resources>
diff --git a/packages/SystemUI/res/values-kk/strings.xml b/packages/SystemUI/res/values-kk/strings.xml
index 061a926..15d109c 100644
--- a/packages/SystemUI/res/values-kk/strings.xml
+++ b/packages/SystemUI/res/values-kk/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Үй"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Mәзір"</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>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"камераны ашу"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Жаңа тапсырма пішімін таңдау"</string>
<string name="cancel" msgid="6442560571259935130">"Бас тарту"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Үйлесімділік ұлғайту түймесі."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Үлкендеу экранда кішірейту."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth қосылған."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Қоңырау үнсіз."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Жұмыс режимі"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> қолданбасынан бас тарту."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> алынып тасталған."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Барлық жақындағы қабылданбаған қолданбалар."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> құрылғылары)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth өшірулі"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Жұптасқан құрылғылар жоқ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Батарея деңгейі: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Aудио"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Гарнитура"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Кіріс"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Жарықтығы"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Автоматты түрде бұру"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Автоматты айналатын экран"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Қосылуда…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Тетеринг"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Хот-спот"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Хабарландырулар"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Қалта шам"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Мобильдік деректер"</string>
@@ -324,8 +339,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> пайдаланылған"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> шегі"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> туралы ескерту"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Жұмыс режимі"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"Жұмыс профилі"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"Хабарландырулар мен қолданбалар өшірулі"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Түнгі жарық"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Күн батқанда қосу"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Күн шыққанға дейін"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Қосылу уақыты: <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> дейін"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC өшірулі"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC қосулы"</string>
@@ -338,6 +358,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> қауіпсіз режимде өшіріледі."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Барлығын тазалау"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Бөлінген экранды пайдалану үшін осында сүйреңіз"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Қолданбаларға ауысу үшін жоғары сырғытыңыз"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Бөлінген көлденең"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Бөлінген тік"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Бөлінген теңшелетін"</string>
@@ -562,6 +583,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Қуат хабарландыруының басқару элементтерімен қолданбаның хабарландырулары үшін 0-ден бастап 5-ке дейін маңыздылық деңгейін орнатуға болады. \n\n"<b>"5-деңгей"</b>" \n- Хабарландыру тізімінің ең басында көрсету \n- Толық экранға ашылуын рұқсат ету \n- Әрдайым қалқымалы хабарландыру түрінде көрсету \n\n"<b>"4-деңгей"</b>" \n- Толық экранға шығармау \n- Әрдайым қалқымалы хабарландыру түрінде көрсету \n\n"<b>"3-деңгей"</b>" \n- Толық экранға шығармау \n- Ешқашан қалқымалы хабарландыру түрінде көрсетпеу \n\n"<b>"2-деңгей"</b>" \n- Толық экранға шығармау \n- Ешқашан қалқымалы хабарландыру түрінде көрсетпеу \n- Ешқашан дыбыс және діріл шығармау \n\n"<b>"1-деңгей"</b>" \n- Толық экранға шығармау \n- Ешқашан қалқымалы хабарландыру түрінде көрсетпеу \n- Ешқашан дыбыс немесе діріл шығармау \n- Құлыпталған экраннан және күйін көрсету жолағынан жасыру \n- Хабарландыру тізімінің ең астында көрсету \n\n"<b>"0-деңгей"</b>" \n- Қолданбадағы барлық хабарландыруларға тыйым салу"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Хабарландырулар"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Хабарландырулар бұдан былай көрсетілмейді"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Хабарландырулар көрсетілсін бе?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Хабарландыруларға тыйым салу"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Көрсету"</string>
@@ -656,7 +679,8 @@
<item msgid="1545641631806817203">"Буфер"</item>
<item msgid="5742013440802239414">"Перне коды"</item>
<item msgid="8802889973626281575">"Пернетақта ауыстырғышы"</item>
- <item msgid="8175437057325747277">"Ешқандай"</item>
+ <item msgid="7095517796293767867">"Бұру ұсынысы"</item>
+ <item msgid="8494159969042135235">"Ешқайсысы"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Орташа"</item>
@@ -780,4 +804,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Батарея мен деректер трафигі туралы білу үшін түртіңіз"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Мобильдік деректер өшірілсін бе?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Басқа қолданба рұқсат сұрауын жасырып тұрғандықтан, параметрлер жауабыңызды растай алмайды."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> қолданбасына <xliff:g id="APP_2">%2$s</xliff:g> қолданбасының үзінділерін көрсетуге рұқсат берілсін бе?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Бұл <xliff:g id="APP">%1$s</xliff:g> қолданбасындағы ақпаратты оқи алады"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Бұл <xliff:g id="APP">%1$s</xliff:g> қолданбасында әрекет ете алады"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g> қолданбасына кез келген қолданбаның үзіндісін көрсетуге рұқсат беру"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Рұқсат беру"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Тыйым салу"</string>
</resources>
diff --git a/packages/SystemUI/res/values-km/strings.xml b/packages/SystemUI/res/values-km/strings.xml
index 175e10c..77fc137 100644
--- a/packages/SystemUI/res/values-km/strings.xml
+++ b/packages/SystemUI/res/values-km/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"បង្វិលអេក្រង់"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"ទិដ្ឋភាព"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"ស្វែងរក"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"ម៉ាស៊ីនថត"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"បើកម៉ាស៊ីនថត"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"ជ្រើសប្លង់ភារកិច្ចថ្មី"</string>
<string name="cancel" msgid="6442560571259935130">"បោះបង់"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"ប៊ូតុងពង្រីកត្រូវគ្នា។"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ពង្រីក/បង្រួមអេក្រង់ពីទៅធំ"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"បានតភ្ជាប់ប៊្លូធូស។"</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"កម្មវិធីរោទ៍ស្ងាត់។"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"របៀបការងារ"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"បោះបង់ <xliff:g id="APP">%s</xliff:g> ។"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> បដិសេធ។"</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"កម្មវិធីថ្មីៗទាំងអស់ត្រូវបានបោះបង់។"</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"ប៊្លូធូស (ឧបករណ៍ <xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"ប៊្លូធូសបានបិទ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"មិនមានឧបករណ៍ផ្គូផ្គងដែលអាចប្រើបាន"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"ថ្ម <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"សំឡេង"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"កាស"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"បញ្ចូល"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"ពន្លឺ"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"បង្វិលស្វ័យប្រវត្តិ"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"បង្វិលអេក្រង់ស្វ័យប្រវត្តិ"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"កំពុងតភ្ជាប់..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"ការភ្ជាប់"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"ហតស្ប៉ត"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"ការជូនដំណឹង"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"ពិល"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"ទិន្នន័យទូរសព្ទចល័ត"</string>
@@ -324,8 +339,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"បានប្រើ <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"ដែនកំណត់ <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> ការព្រមាន"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"របៀបការងារ"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"កម្រងព័ត៌មានការងារ"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"ការជូនដំណឹង និងកម្មវិធីត្រូវបានបិទ"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"ពន្លឺពេលយប់"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"បើកនៅពេលថ្ងៃលិច"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"រហូតដល់ពេលថ្ងៃរះ"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"បើកនៅម៉ោង <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"រហូតដល់ម៉ោង <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"បានបិទ NFC"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"បានបើក NFC"</string>
@@ -338,6 +358,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> ត្រូវបានបិទដំណើរការក្នុងរបៀបសុវត្ថិភាព"</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"សម្អាតទាំងអស់"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"អូសនៅទីនេះដើម្បីប្រើអេក្រង់បំបែក"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"អូសឡើងលើដើម្បីប្តូរកម្មវិធី"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"បំបែកផ្តេក"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"បំបែកបញ្ឈរ"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"បំបែកផ្ទាល់ខ្លួន"</string>
@@ -562,10 +583,12 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"ជាមួយអង្គគ្រប់គ្រងការជូនដំណឹងថាមពល អ្នកអាចកំណត់កម្រិតសំខាន់ពី 0 ទៅ 5 សម្រាប់ការជូនដំណឹងរបស់កម្មវិធី។ \n\n"<b>"កម្រិត 5"</b>" \n- បង្ហាញនៅផ្នែកខាងលើបញ្ជីជូនដំណឹង \n- អនុញ្ញាតការរំខានលើអេក្រង់ពេញ \n- លោតឡើងជានិច្ច \n\n"<b>"កម្រិត 4"</b>" \n- រារាំងការរំខានលើអេក្រង់ពេញ \n- លោតឡើងជានិច្ច \n\n"<b>"កម្រិត 3"</b>" \n- រារាំងការរំខានលើអេក្រង់ពេញ \n- លោតឡើងជានិច្ច \n\n"<b>"កម្រិត 2"</b>" \n- រារាំងការរំខានលើអេក្រង់ពេញ \n- លោតឡើងជានិច្ច \n- មិនបន្លឺសំឡេង ឬញ័រ \n\n"<b>"កម្រិត 1"</b>" \n- រារាំងការរំខានលើអេក្រង់ពេញ \n- លោតឡើងជានិច្ច \n- មិនបន្លឺសំឡេង ឬញ័រ \n- លាក់ពីអេក្រង់ចាក់សោ និងរបារស្ថានភាព \n- បង្ហាញនៅផ្នែកខាងក្រោមបញ្ជីជូនដំណឹង \n\n"<b>"កម្រិត 0"</b>" \n- រារាំងការជូនដំណឹងទាំងអស់ពីកម្មវិធី"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"ការជូនដំណឹង"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"អ្នកនឹងមិនឃើញការជូនដំណឹងទាំងនេះទៀតទេ"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"បន្តបង្ហាញការជូនដំណឹងទាំងនេះ?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"បញ្ឈប់ការជូនដំណឹង"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"បន្តបង្ហាញ"</string>
- <string name="inline_keep_showing_app" msgid="1723113469580031041">"បន្តបង្ហាញការជូនដំណឹងសម្រាប់កម្មវិធីនេះ?"</string>
+ <string name="inline_keep_showing_app" msgid="1723113469580031041">"បន្តបង្ហាញការជូនដំណឹងពីកម្មវិធីនេះ?"</string>
<string name="notification_unblockable_desc" msgid="1037434112919403708">"មិនអាចបិទការជូនដំណឹងទាំងនេះបានទេ"</string>
<string name="notification_channel_controls_opened_accessibility" msgid="6553950422055908113">"ការគ្រប់គ្រងការជូនដំណឹងសម្រាប់ <xliff:g id="APP_NAME">%1$s</xliff:g> បានបើក"</string>
<string name="notification_channel_controls_closed_accessibility" msgid="7521619812603693144">"ការគ្រប់គ្រងការជូនដំណឹងសម្រាប់ <xliff:g id="APP_NAME">%1$s</xliff:g> បានបិទ"</string>
@@ -656,7 +679,8 @@
<item msgid="1545641631806817203">"អង្គចងចាំ"</item>
<item msgid="5742013440802239414">"លេខកូដគ្រាប់ចុច"</item>
<item msgid="8802889973626281575">"កម្មវិធីប្តូរក្តារចុច"</item>
- <item msgid="8175437057325747277">"គ្មាន"</item>
+ <item msgid="7095517796293767867">"ការណែនាំការបង្វិល"</item>
+ <item msgid="8494159969042135235">"គ្មាន"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"ធម្មតា"</item>
@@ -780,4 +804,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"ចុចដើម្បីមើលព័ត៌មានលម្អិតអំពីការប្រើប្រាស់ទិន្នន័យ និងថ្ម"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"បិទទិន្នន័យចល័ត?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"ការកំណត់មិនអាចផ្ទៀងផ្ទាត់ការឆ្លើយតបរបស់អ្នកបានទេ ដោយសារកម្មវិធីកំពុងបាំងសំណើសុំការអនុញ្ញាត។"</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"អនុញ្ញាតឱ្យ <xliff:g id="APP_0">%1$s</xliff:g> បង្ហាញស្ថិតិប្រើប្រាស់របស់ <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- វាអាចអានព័ត៌មានពី <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- វាអាចធ្វើសកម្មភាពនៅក្នុង <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"អនុញ្ញាតឱ្យ <xliff:g id="APP">%1$s</xliff:g> បង្ហាញស្ថិតិប្រើប្រាស់ពីកម្មវិធីនានា"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"អនុញ្ញាត"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"បដិសេធ"</string>
</resources>
diff --git a/packages/SystemUI/res/values-kn/strings.xml b/packages/SystemUI/res/values-kn/strings.xml
index 3ce5e76..a8b3007 100644
--- a/packages/SystemUI/res/values-kn/strings.xml
+++ b/packages/SystemUI/res/values-kn/strings.xml
@@ -33,13 +33,10 @@
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"ಚಾಲ್ತಿಯಲ್ಲಿರುವ"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"ಅಧಿಸೂಚನೆಗಳು"</string>
<string name="battery_low_title" msgid="6456385927409742437">"ಬ್ಯಾಟರಿ ಕಡಿಮೆ ಇದೆ"</string>
- <!-- no translation found for battery_low_title_hybrid (6268991275887381595) -->
- <skip />
+ <string name="battery_low_title_hybrid" msgid="6268991275887381595">"ಬ್ಯಾಟರಿ ಕಡಿಮೆ ಇದೆ. ಬ್ಯಾಟರಿ ಸೇವರ್ ಆನ್ ಮಾಡಿ"</string>
<string name="battery_low_percent_format" msgid="2900940511201380775">"<xliff:g id="PERCENTAGE">%s</xliff:g> ಉಳಿದಿದೆ"</string>
- <!-- no translation found for battery_low_percent_format_hybrid (6838677459286775617) -->
- <skip />
- <!-- no translation found for battery_low_percent_format_hybrid_short (9025795469949145586) -->
- <skip />
+ <string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"<xliff:g id="PERCENTAGE">%s</xliff:g> ಬಾಕಿ ಉಳಿದಿದೆ, ನಿಮ್ಮ ಬಳಕೆಯ ಆಧಾರದ ಮೇಲೆ <xliff:g id="TIME">%s</xliff:g> ಉಳಿದಿದೆ"</string>
+ <string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"<xliff:g id="PERCENTAGE">%s</xliff:g> ಬಾಕಿ ಉಳಿದಿದೆ, <xliff:g id="TIME">%s</xliff:g> ಉಳಿದಿದೆ"</string>
<string name="battery_low_percent_format_saver_started" msgid="7879389868952879166">"<xliff:g id="PERCENTAGE">%s</xliff:g> ಉಳಿದಿದೆ. ಬ್ಯಾಟರಿ ಉಳಿತಾಯ ಆನ್ ಆಗಿದೆ."</string>
<string name="invalid_charger" msgid="4549105996740522523">"USB ಚಾರ್ಜಿಂಗ್ ಬೆಂಬಲಿತವಾಗಿಲ್ಲ.\nಒದಗಿಸಿರುವ ಚಾರ್ಜರ್ ಮಾತ್ರ ಬಳಸಿ."</string>
<string name="invalid_charger_title" msgid="3515740382572798460">"USB ಚಾರ್ಜಿಂಗ್ ಬೆಂಬಲಿತವಾಗಿಲ್ಲ."</string>
@@ -73,22 +70,15 @@
<string name="usb_debugging_secondary_user_message" msgid="6067122453571699801">"ಬಳಕೆದಾರರು ಪ್ರಸ್ತುತ ಈ ಸಾಧನಕ್ಕೆ ಸೈನ್ ಇನ್ ಮಾಡಿದ್ದಾರೆ USB ಡೀಬಗ್ ಮಾಡುವುದನ್ನು ಆನ್ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ. ಈ ವೈಶಿಷ್ಟ್ಯವನ್ನು ಬಳಸಲು, ಪ್ರಾಥಮಿಕ ಬಳಕೆದಾರರಿಗೆ ಬದಲಾಯಿಸಿ."</string>
<string name="compat_mode_on" msgid="6623839244840638213">"ಪರದೆ ತುಂಬಿಸಲು ಝೂಮ್ ಮಾಡು"</string>
<string name="compat_mode_off" msgid="4434467572461327898">"ಪರದೆ ತುಂಬಿಸಲು ವಿಸ್ತಾರಗೊಳಿಸು"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"ಸ್ಕ್ರೀನ್ಶಾಟ್"</string>
<string name="screenshot_saving_ticker" msgid="7403652894056693515">"ಸ್ಕ್ರೀನ್ಶಾಟ್ ಉಳಿಸಲಾಗುತ್ತಿದೆ…"</string>
<string name="screenshot_saving_title" msgid="8242282144535555697">"ಸ್ಕ್ರೀನ್ಶಾಟ್ ಉಳಿಸಲಾಗುತ್ತಿದೆ…"</string>
- <!-- no translation found for screenshot_saving_text (2545047868936087248) -->
- <skip />
- <!-- no translation found for screenshot_saved_title (5637073968117370753) -->
- <skip />
- <!-- no translation found for screenshot_saved_text (7574667448002050363) -->
- <skip />
- <!-- no translation found for screenshot_failed_title (9096484883063264803) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_unknown_text (8844781948876286488) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_text (3041612585107107310) -->
- <skip />
+ <string name="screenshot_saving_text" msgid="2545047868936087248">"ಸ್ಕ್ರೀನ್ಶಾಟ್ ಉಳಿಸಲಾಗುತ್ತಿದೆ"</string>
+ <string name="screenshot_saved_title" msgid="5637073968117370753">"ಸ್ಕ್ರೀನ್ಶಾಟ್ ಅನ್ನು ಉಳಿಸಲಾಗಿದೆ"</string>
+ <string name="screenshot_saved_text" msgid="7574667448002050363">"ನಿಮ್ಮ ಸ್ಕ್ರೀನ್ಶಾಟ್ ವೀಕ್ಷಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
+ <string name="screenshot_failed_title" msgid="9096484883063264803">"ಸ್ಕ್ರೀನ್ಶಾಟ್ ಸೆರೆಹಿಡಿಯಲು ಸಾಧ್ಯವಾಗುತ್ತಿಲ್ಲ"</string>
+ <string name="screenshot_failed_to_save_unknown_text" msgid="8844781948876286488">"ಸ್ಕ್ರೀನ್ಶಾಟ್ ಉಳಿಸುವಲ್ಲಿ ಸಮಸ್ಯೆ ಎದುರಾಗಿದೆ"</string>
+ <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"ಪರಿಮಿತ ಸಂಗ್ರಹಣೆ ಸ್ಥಳದ ಕಾರಣದಿಂದಾಗಿ ಸ್ಕ್ರೀನ್ಶಾಟ್ ಉಳಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ"</string>
<string name="screenshot_failed_to_capture_text" msgid="173674476457581486">"ಅಪ್ಲಿಕೇಶನ್ ಅಥವಾ ಸಂಸ್ಥೆಯು ಸ್ಕ್ರೀನ್ಶಾಟ್ಗಳನ್ನು ತೆಗೆಯುವುದನ್ನು ಅನುಮತಿಸುವುದಿಲ್ಲ"</string>
<string name="usb_preference_title" msgid="6551050377388882787">"USB ಫೈಲ್ ವರ್ಗಾವಣೆ ಆಯ್ಕೆಗಳು"</string>
<string name="use_mtp_button_title" msgid="4333504413563023626">"ಮೀಡಿಯಾ ಪ್ಲೇಯರ್ ರೂಪದಲ್ಲಿ ಅಳವಡಿಸಿ (MTP)"</string>
@@ -98,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"ಪರದೆಯನ್ನು ತಿರುಗಿಸಿ"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"ಸಮಗ್ರ ನೋಟ"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"ಹುಡುಕಿ"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"ಕ್ಯಾಮರಾ"</string>
@@ -112,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"ಕ್ಯಾಮರಾ ತೆರೆಯಿರಿ"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"ಹೊಸ ಕಾರ್ಯ ವಿನ್ಯಾಸವನ್ನು ಆಯ್ಕೆಮಾಡಿ"</string>
<string name="cancel" msgid="6442560571259935130">"ರದ್ದುಮಾಡಿ"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"ಹೊಂದಾಣಿಕೆಯ ಝೂಮ್ ಬಟನ್."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ಚಿಕ್ಕ ಪರದೆಯಿಂದ ದೊಡ್ಡ ಪರದೆಗೆ ಝೂಮ್ ಮಾಡು."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"ಬ್ಲೂಟೂತ್ ಸಂಪರ್ಕಗೊಂಡಿದೆ."</string>
@@ -188,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"ರಿಂಗರ್ ಶಾಂತ."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"ಕೆಲಸದ ಮೋಡ್"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> ವಜಾಗೊಳಿಸಿ."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ವಜಾಗೊಳಿಸಲಾಗಿದೆ."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"ಇತ್ತೀಚಿನ ಎಲ್ಲಾ ಅಪ್ಲಿಕೇಶನ್ಗಳನ್ನು ವಜಾಗೊಳಿಸಲಾಗಿದೆ."</string>
@@ -285,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"ಬ್ಲೂಟೂತ್ (<xliff:g id="NUMBER">%d</xliff:g> ಸಾಧನಗಳು)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"ಬ್ಲೂಟೂತ್ ಆಫ್"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"ಯಾವುದೇ ಜೋಡಿಸಲಾದ ಸಾಧನಗಳು ಲಭ್ಯವಿಲ್ಲ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ಬ್ಯಾಟರಿ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"ಆಡಿಯೋ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"ಹೆಡ್ಸೆಟ್"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"ಇನ್ಪುಟ್"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"ಪ್ರಕಾಶಮಾನ"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"ಸ್ವಯಂ-ತಿರುಗುವಿಕೆ"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"ಪರದೆಯನ್ನು ಸ್ವಯಂ-ತಿರುಗಿಸಿ"</string>
@@ -325,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"ಸಂಪರ್ಕಿಸಲಾಗುತ್ತಿದೆ..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"ಟೆಥರಿಂಗ್"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"ಹಾಟ್ಸ್ಪಾಟ್"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"ಅಧಿಸೂಚನೆಗಳು"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"ಫ್ಲಾಶ್ಲೈಟ್"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"ಮೊಬೈಲ್ ಡೇಟಾ"</string>
@@ -334,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> ಬಳಸಲಾಗಿದೆ"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> ಮಿತಿ"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> ಎಚ್ಚರಿಕೆ"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"ಕೆಲಸದ ಮೋಡ್"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"ನೈಟ್ ಲೈಟ್"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"ಸೂರ್ಯಾಸ್ತದಲ್ಲಿ"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"ಸೂರ್ಯೋದಯದ ತನಕ"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g> ಸಮಯದಲ್ಲಿ"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> ವರೆಗೂ"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC ನಿಷ್ಕ್ರಿಯಗೊಂಡಿದೆ"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC ಸಕ್ರಿಯಗೊಂಡಿದೆ"</string>
@@ -348,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> ಅನ್ನು ಸುರಕ್ಷಿತ ಮೋಡ್ನಲ್ಲಿ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"ಎಲ್ಲವನ್ನೂ ತೆರವುಗೊಳಿಸಿ"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"ವಿಭಜಿತ ಪರದೆಯನ್ನು ಬಳಸಲು ಇಲ್ಲಿ ಡ್ರ್ಯಾಗ್ ಮಾಡಿ"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"ಅಡ್ಡಲಾಗಿ ವಿಭಜಿಸಿದ"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"ಲಂಬವಾಗಿ ವಿಭಜಿಸಿದ"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"ಕಸ್ಟಮ್ ವಿಭಜಿಸಿದ"</string>
@@ -571,27 +585,21 @@
<string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"ಆಫ್"</string>
<string name="power_notification_controls_description" msgid="4372459941671353358">"ಪವರ್ ಅಧಿಸೂಚನೆ ನಿಯಂತ್ರಣಗಳ ಮೂಲಕ, ನೀವು ಅಪ್ಲಿಕೇಶನ್ಗಳ ಅಧಿಸೂಚನೆಗಳನ್ನು 0 ರಿಂದ 5 ರವರೆಗಿನ ಹಂತಗಳ ಪ್ರಾಮುಖ್ಯತೆಯನ್ನು ಹೊಂದಿಸಬಹುದು. \n\n"<b>"ಹಂತ 5"</b>" \n- ಮೇಲಿನ ಅಧಿಸೂಚನೆ ಪಟ್ಟಿಯನ್ನು ತೋರಿಸಿ \n- ಪೂರ್ಣ ಪರದೆ ಅಡಚಣೆಯನ್ನು ಅನುಮತಿಸಿ \n- ಯಾವಾಗಲು ಇಣುಕು ನೋಟ \n\n"<b>"ಹಂತ 4"</b>" \n- ಪೂರ್ಣ ಪರದೆ ಅಡಚಣೆಯನ್ನು ತಡೆಯಿರಿ \n- ಯಾವಾಗಲು ಇಣುಕು ನೋಟ\n\n"<b>"ಹಂತ 3"</b>" \n- ಪೂರ್ಣ ಪರದೆ ಅಡಚಣೆಯನ್ನು ತಡೆಯಿರಿ \n- ಎಂದಿಗೂ ಇಣುಕು ನೋಟ ಬೇಡ \n\n"<b>"ಹಂತ 2"</b>" \n- ಪೂರ್ಣ ಪರದೆ ಅಡಚಣೆಯನ್ನು ತಡೆಯಿರಿ \n- ಎಂದಿಗೂ ಇಣುಕು ನೋಟ ಬೇಡ \n- ಶಬ್ದ ಮತ್ತು ವೈಬ್ರೇಷನ್ ಎಂದಿಗೂ ಮಾಡಬೇಡಿ \n\n"<b>"ಹಂತ 1"</b>" \n- ಪೂರ್ಣ ಪರದೆ ಅಡಚಣೆಯನ್ನು ತಡೆಯಿರಿ \n- ಎಂದಿಗೂ ಇಣುಕು ನೋಟ ಬೇಡ \n- ಶಬ್ದ ಮತ್ತು ವೈಬ್ರೇಷನ್ ಎಂದಿಗೂ ಮಾಡಬೇಡಿ \n- ಸ್ಥಿತಿ ಪಟ್ಟಿ ಮತ್ತು ಲಾಕ್ ಪರದೆಯಿಂದ ಮರೆಮಾಡಿ \n- ಕೆಳಗಿನ ಅಧಿಸೂಚನೆ ಪಟ್ಟಿಯನ್ನು ತೋರಿಸಿ \n\n"<b>"ಹಂತ 0"</b>" \n- ಅಪ್ಲಿಕೇಶನ್ನಿಂದ ಎಲ್ಲಾ ಅಧಿಸೂಚನೆಗಳನ್ನು ನಿರ್ಬಂಧಿಸಿ"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"ಅಧಿಸೂಚನೆಗಳು"</string>
- <!-- no translation found for notification_channel_disabled (344536703863700565) -->
+ <string name="notification_channel_disabled" msgid="344536703863700565">"ನೀವು ಈ ಅಧಿಸೂಚನೆಗಳನ್ನು ಇನ್ನು ಮುಂದೆ ನೋಡುವುದಿಲ್ಲ"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
<skip />
- <!-- no translation found for inline_keep_showing (8945102997083836858) -->
- <skip />
- <!-- no translation found for inline_stop_button (4172980096860941033) -->
- <skip />
- <!-- no translation found for inline_keep_button (6665940297019018232) -->
- <skip />
- <!-- no translation found for inline_keep_showing_app (1723113469580031041) -->
- <skip />
- <!-- no translation found for notification_unblockable_desc (1037434112919403708) -->
- <skip />
+ <string name="inline_keep_showing" msgid="8945102997083836858">"ಈ ಅಧಿಸೂಚನೆಗಳನ್ನು ತೋರಿಸುತ್ತಲೇ ಇರಬೇಕೆ?"</string>
+ <string name="inline_stop_button" msgid="4172980096860941033">"ಅಧಿಸೂಚನೆಗಳನ್ನು ನಿಲ್ಲಿಸಿ"</string>
+ <string name="inline_keep_button" msgid="6665940297019018232">"ತೋರಿಸುತ್ತಲಿರಿ"</string>
+ <string name="inline_keep_showing_app" msgid="1723113469580031041">"ಈ ಅಪ್ಲಿಕೇಶನ್ನಿಂದ ಅಧಿಸೂಚನೆಗಳನ್ನು ತೋರಿಸುತ್ತಲೇ ಇರಬೇಕೆ?"</string>
+ <string name="notification_unblockable_desc" msgid="1037434112919403708">"ಈ ಅಧಿಸೂಚನೆಗಳನ್ನು ಆಫ್ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ"</string>
<string name="notification_channel_controls_opened_accessibility" msgid="6553950422055908113">"<xliff:g id="APP_NAME">%1$s</xliff:g> ನ ಅಧಿಸೂಚನೆ ನಿಯಂತ್ರಣಗಳನ್ನು ತೆರೆಯಲಾಗಿದೆ"</string>
<string name="notification_channel_controls_closed_accessibility" msgid="7521619812603693144">"<xliff:g id="APP_NAME">%1$s</xliff:g> ನ ಅಧಿಸೂಚನೆ ನಿಯಂತ್ರಣಗಳನ್ನು ಮುಚ್ಚಲಾಗಿದೆ"</string>
<string name="notification_channel_switch_accessibility" msgid="3420796005601900717">"ಈ ಚಾನಲ್ನ ಅಧಿಸೂಚನೆಗಳಿಗೆ ಅನುಮತಿ ನೀಡಿ"</string>
<string name="notification_more_settings" msgid="816306283396553571">"ಹೆಚ್ಚಿನ ಸೆಟ್ಟಿಂಗ್ಗಳು"</string>
- <!-- no translation found for notification_app_settings (420348114670768449) -->
- <skip />
+ <string name="notification_app_settings" msgid="420348114670768449">"ಕಸ್ಟಮೈಜ್ ಮಾಡಿ"</string>
<string name="notification_done" msgid="5279426047273930175">"ಮುಗಿದಿದೆ"</string>
- <!-- no translation found for inline_undo (558916737624706010) -->
- <skip />
+ <string name="inline_undo" msgid="558916737624706010">"ರದ್ದುಮಾಡಿ"</string>
<string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
<string name="notification_menu_gear_description" msgid="2204480013726775108">"ಅಧಿಸೂಚನೆ ನಿಯಂತ್ರಣಗಳು"</string>
<string name="notification_menu_snooze_description" msgid="3653669438131034525">"ಅಧಿಸೂಚನೆ ಸ್ನೂಜ್ ಆಯ್ಕೆಗಳು"</string>
@@ -674,7 +682,8 @@
<item msgid="1545641631806817203">"ಕ್ಲಿಪ್ಬೋರ್ಡ್"</item>
<item msgid="5742013440802239414">"ಕೀಕೋಡ್"</item>
<item msgid="8802889973626281575">"ಕೀಬೋರ್ಡ್ ಬದಲಾಯಿಸುವಿಕೆ"</item>
- <item msgid="8175437057325747277">"ಯಾವುದೂ ಅಲ್ಲ"</item>
+ <item msgid="7095517796293767867">"ತಿರುಗಿಸುವಿಕೆ ಸಲಹೆ"</item>
+ <item msgid="8494159969042135235">"ಯಾವುದೂ ಅಲ್ಲ"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"ಸಾಮಾನ್ಯ"</item>
@@ -798,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"ಬ್ಯಾಟರಿ,ಡೇಟಾ ಬಳಕೆಯ ವಿವರಗಳಿಗಾಗಿ ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"ಮೊಬೈಲ್ ಡೇಟಾ ಆಫ್ ಮಾಡಬೇಕೆ?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"ಅನುಮತಿ ವಿನಂತಿಯನ್ನು ಅಪ್ಲಿಕೇಶನ್ ಮರೆಮಾಚುತ್ತಿರುವ ಕಾರಣ, ಸೆಟ್ಟಿಂಗ್ಗಳಿಗೆ ನಿಮ್ಮ ಪ್ರತಿಕ್ರಿಯೆಯನ್ನು ಪರಿಶೀಲಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_2">%2$s</xliff:g> ಸ್ಲೈಸ್ಗಳನ್ನು ತೋರಿಸಲು <xliff:g id="APP_0">%1$s</xliff:g> ಅನ್ನು ಅನುಮತಿಸುವುದೇ?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- ಇದು <xliff:g id="APP">%1$s</xliff:g> ನಿಂದ ಮಾಹಿತಿಯನ್ನು ಓದಬಹುದು"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- ಇದು <xliff:g id="APP">%1$s</xliff:g> ಒಳಗಡೆ ಕ್ರಿಯೆಗಳನ್ನು ತೆಗೆದುಕೊಳ್ಳಬಹುದು"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"ಯಾವುದೇ ಅಪ್ಲಿಕೇಶನ್ನಿಂದ ಸ್ಲೈಸ್ಗಳನ್ನು ತೋರಿಸಲು <xliff:g id="APP">%1$s</xliff:g> ಅನ್ನು ಅನುಮತಿಸಿ"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"ಅನುಮತಿಸಿ"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"ನಿರಾಕರಿಸಿ"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 285c569..b42d0b5 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"화면 회전"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"최근 사용"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"검색"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"카메라"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"카메라 열기"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"새 작업 레이아웃 선택"</string>
<string name="cancel" msgid="6442560571259935130">"취소"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"호환성 확대/축소 버튼입니다."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"작은 화면을 큰 화면으로 확대합니다."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"블루투스가 연결되었습니다."</string>
@@ -180,7 +187,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"벨소리가 무음입니다."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"작업 모드"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g>을(를) 숨깁니다."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g>이(가) 제거되었습니다."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"최근 사용한 애플리케이션을 모두 닫았습니다."</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"블루투스(<xliff:g id="NUMBER">%d</xliff:g>개의 기기)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"블루투스 사용 안함"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"페어링된 기기가 없습니다"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"배터리 <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"오디오"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"헤드셋"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"입력"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"밝기"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"자동 회전"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"화면 자동 회전"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"연결 중..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"테더링"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"핫스팟"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"알림"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"손전등"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"모바일 데이터"</string>
@@ -326,8 +341,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> 사용됨"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"한도: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> 경고"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"작업 모드"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"야간 조명"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"일몰에"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"일출까지"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g>에"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g>까지"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC 사용 중지됨"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC 사용 설정됨"</string>
@@ -340,6 +362,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g>은(는) 안전 모드에서 사용 중지됩니다."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"모두 지우기"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"여기를 드래그하여 분할 화면 사용하기"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"수평 분할"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"수직 분할"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"맞춤 분할"</string>
@@ -564,6 +588,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"전원 알림 컨트롤을 사용하면 앱 알림 관련 중요도를 0부터 5까지로 설정할 수 있습니다. \n\n"<b>"레벨 5"</b>" \n- 알림 목록 상단에 표시 \n- 전체 화면일 경우 알림 표시 허용 \n- 항상 엿보기 표시 \n\n"<b>"레벨 4"</b>" \n- 전체 화면에 알림 표시 금지 \n- 항상 엿보기 표시 \n\n"<b>"레벨 3"</b>" \n- 전체 화면에 알림 표시 금지 \n- 엿보기 표시 안함 \n\n"<b>"레벨 2"</b>" \n- 전체 화면에 알림 표시 금지 \n- 엿보기 표시 안함 \n- 소리나 진동으로 알리지 않음 \n\n"<b>"레벨 1"</b>" \n- 전체 화면에 알림 표시 금지 \n- 엿보기 표시 안함 \n- 소리나 진동으로 알리지 않음 \n- 잠금 화면 및 상태 표시줄에서 숨김 \n- 알림 목록 하단에 표시 \n\n"<b>"레벨 0"</b>" \n- 앱의 모든 알림 차단"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"알림"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"더 이상 다음의 알림을 받지 않습니다"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"이 알림을 계속 표시하시겠습니까?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"알림 중지"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"계속 표시하기"</string>
@@ -658,7 +684,8 @@
<item msgid="1545641631806817203">"클립보드"</item>
<item msgid="5742013440802239414">"키 코드"</item>
<item msgid="8802889973626281575">"키보드 전환 도구"</item>
- <item msgid="8175437057325747277">"없음"</item>
+ <item msgid="7095517796293767867">"추천 항목 회전"</item>
+ <item msgid="8494159969042135235">"없음"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"보통"</item>
@@ -782,4 +809,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"탭하여 배터리 및 데이터 사용량 확인"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"모바일 데이터를 사용 중지하시겠습니까?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"앱이 권한 요청을 가리고 있기 때문에 설정에서 내 응답을 확인할 수 없습니다."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g>에서 <xliff:g id="APP_2">%2$s</xliff:g>의 슬라이스를 표시하도록 허용하시겠습니까?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- <xliff:g id="APP">%1$s</xliff:g>의 정보를 읽을 수 있음"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- <xliff:g id="APP">%1$s</xliff:g>에서 작업할 수 있음"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g>에서 모든 앱의 슬라이스를 표시하도록 허용"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"허용"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"거부"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ky/strings.xml b/packages/SystemUI/res/values-ky/strings.xml
index 0687c2d..a1e1415 100644
--- a/packages/SystemUI/res/values-ky/strings.xml
+++ b/packages/SystemUI/res/values-ky/strings.xml
@@ -67,7 +67,7 @@
<string name="usb_debugging_message" msgid="2220143855912376496">"Компүтердин RSA ачкычынын контролдук суммасы:\n<xliff:g id="FINGERPRINT">%1$s</xliff:g>"</string>
<string name="usb_debugging_always" msgid="303335496705863070">"Бул компүтерден дайыма уруксат берилсин"</string>
<string name="usb_debugging_secondary_user_title" msgid="6353808721761220421">"USB мүчүлүштүктөрүн оңдоого уруксат жок"</string>
- <string name="usb_debugging_secondary_user_message" msgid="6067122453571699801">"Учурда бул түзмөккө каттоо эсеби менен кирген колдонуучу USB мүчүлүштүктөрүн оңдоо функциясын күйгүзө албай жатат. Бул функцияны колдонуу үчүн негизги колдонуучунун каттоо эсебине которулуңуз."</string>
+ <string name="usb_debugging_secondary_user_message" msgid="6067122453571699801">"Учурда бул аккаунтта USB аркылуу мүчүлүштүктөрдү оңдоо функциясын иштетүүгө болбойт. Негизги колдонуучунун аккаунтуна кириңиз."</string>
<string name="compat_mode_on" msgid="6623839244840638213">"Экрнд тлтр ү. чен өлч өзг"</string>
<string name="compat_mode_off" msgid="4434467572461327898">"Экранды толтуруу ү-н чоюу"</string>
<string name="global_action_screenshot" msgid="8329831278085426283">"Скриншот"</string>
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"Экранды буруу"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Көз жүгүртүү"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Издөө"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"камераны ачуу"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Жаңы тапшырманын планын тандаңыз"</string>
<string name="cancel" msgid="6442560571259935130">"Жокко чыгаруу"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Масштабды сыйыштыруу баскычы."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Кичинекейди чоң экранга масштабдоо."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth байланышта"</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Үнсүз шыңгыроо."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Иштөө режими"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> этибарга албоо."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> жок болду."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Акыркы колдонмолордун баары көз жаздымда калтырылды."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> түзмөк)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth өчүк"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Жупташкан түзмөктөр жок"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Батареянын деңгээли <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Аудио"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Гарнитура"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Киргизүү"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Жарыктыгы"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Автоматтык бурулуу"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Экрандын авто-айлануусу"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Туташууда…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Тетеринг"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Туташуу чекити"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Эскертмелер"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Кол чырак"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Мобилдик Интернет"</string>
@@ -324,8 +339,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> колдонулду"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> чектөө"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> эскертүү"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Иштөө режими"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"Жумуш профили"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"Эскертмелер менен колдонмолор өчүрүлгөн"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Түнкү жарык"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Күн батканда күйөт"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Күн чыкканга чейин"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Саат <xliff:g id="TIME">%s</xliff:g> күйөт"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> чейин"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC өчүрүлгөн"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC иштетилген"</string>
@@ -338,6 +358,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> коопсуз режиминде өчүрүлдү."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Баарын тазалоо"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Экранды бөлүү үчүн бул жерге сүйрөңүз"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Колдонмолорду которуштуруу үчүн өйдө сүрүңүз"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Туурасынан бөлүү"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Тигинен бөлүү"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Ыңгайлаштырылган бөлүү"</string>
@@ -562,6 +583,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Бул функциянын жардамы менен ар бир колдонмо үчүн эскертменин маанилүүлүк деңгээлин 0дон 5ке чейин койсоңуз болот. \n\n"<b>"5-деңгээл"</b>" \n- Эскертмелер тизмесинин башында көрсөтүлсүн \n- Эскертмелер толук экранда көрсөтүлсүн \n- Калкып чыгуучу эскертмелерге уруксат берилсин \n\n"<b>"4-деңгээл"</b>" \n- Эскертмелер толук экранда көрсөтүлбөсүн \n- Калкып чыгуучу эскертмелерге уруксат берилсин \n\n"<b>"3-деңгээл"</b>" \n- Эскертмелер толук экранда көрсөтүлбөсүн \n- Калкып чыгуучу эскертмелерге тыюу салынсын \n\n"<b>"2-деңгээл"</b>" \n- Эскертмелер толук экранда көрсөтүлбөсүн \n- Калкып чыгуучу эскертмелерге тыюу салынсын \n- Эч качан добуш чыгып же дирилдебесин \n\n"<b>"1-деңгээл"</b>" \n- Эскертмелер толук экранда көрсөтүлбөсүн \n- Калкып чыгуучу эскертмелерге тыюу салынсын \n- Эч качан добуш чыгып же дирилдебесин \n- Кулпуланган экрандан жана абал тилкесинен жашырылсын \n- Эскертмелер тизмесинин аягында көрсөтүлсүн \n\n"<b>"0-деңгээл"</b>" \n- Колдонмодон алынган бардык эскертмелер бөгөттөлсүн"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Эскертмелер"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Мындан ары бул эскертмелер сизге көрсөтүлбөйт"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Бул эскертмелер көрсөтүлө берсинби?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Эскертмелерди токтотуу"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Көрсөтүлө берсин"</string>
@@ -656,7 +679,8 @@
<item msgid="1545641631806817203">"Алмашуу буфери"</item>
<item msgid="5742013440802239414">"Баскыч коду"</item>
<item msgid="8802889973626281575">"Баскычтоп которуштургуч"</item>
- <item msgid="8175437057325747277">"Эч бири"</item>
+ <item msgid="7095517796293767867">"Буруу сунушу"</item>
+ <item msgid="8494159969042135235">"Эч бири"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Кадимки"</item>
@@ -718,7 +742,7 @@
<string name="accessibility_quick_settings_expand" msgid="2375165227880477530">"Ыкчам жөндөөлөрдү ачуу."</string>
<string name="accessibility_quick_settings_collapse" msgid="1792625797142648105">"Ыкчам жөндөөлөрдү жабуу."</string>
<string name="accessibility_quick_settings_alarm_set" msgid="1863000242431528676">"Ойготкуч коюлду."</string>
- <string name="accessibility_quick_settings_user" msgid="1567445362870421770">"<xliff:g id="ID_1">%s</xliff:g> каттоо эсеби аркылуу кирди"</string>
+ <string name="accessibility_quick_settings_user" msgid="1567445362870421770">"<xliff:g id="ID_1">%s</xliff:g> аккаунту менен кирди"</string>
<string name="accessibility_quick_settings_no_internet" msgid="31890692343084075">"Интернет жок."</string>
<string name="accessibility_quick_settings_open_details" msgid="4230931801728005194">"Чоо-жайын ачуу."</string>
<string name="accessibility_quick_settings_open_settings" msgid="7806613775728380737">"<xliff:g id="ID_1">%s</xliff:g> жөндөөлөрүн ачуу."</string>
@@ -780,4 +804,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Батареянын кубаты жана трафиктин көлөмү жөнүндө билүү үчүн таптап коюңуз"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Мобилдик Интернетти өчүрөсүзбү?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Уруксат берүү сурамыңыз көрүнбөй калгандыктан, Жөндөөлөр жообуңузду ырастай албай жатат."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> колдонмосуна <xliff:g id="APP_2">%2$s</xliff:g> үлгүлөрүн көрсөтүүгө уруксат берилсинби?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- <xliff:g id="APP">%1$s</xliff:g> колдонмосунун маалыматын окуйт"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- <xliff:g id="APP">%1$s</xliff:g> колдонмосунда аракеттерди аткарат"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g> бардык колдонмолордун үлгүлөрүн көрсөтүүгө уруксат берүү"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Уруксат берүү"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Жок"</string>
</resources>
diff --git a/packages/SystemUI/res/values-lo/strings.xml b/packages/SystemUI/res/values-lo/strings.xml
index 587686f..338da6c 100644
--- a/packages/SystemUI/res/values-lo/strings.xml
+++ b/packages/SystemUI/res/values-lo/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"ໝຸນໜ້າຈໍ"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"ພາບຮວມ"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"ຊອກຫາ"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"ກ້ອງ"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"ເປີດກ້ອງ"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"ເລືອກແຜນຜັງໜ້າວຽກໃໝ່"</string>
<string name="cancel" msgid="6442560571259935130">"ຍົກເລີກ"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"ປຸ່ມຊູມທີ່ໃຊ້ຮ່ວມກັນໄດ້."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ຊູມຈໍນ້ອຍໄປເປັນຈໍຂະຫນາດໃຫຍ່."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"ເຊື່ອມຕໍ່ Bluetooth ແລ້ວ."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"ປິດສຽງ."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"ໂໝດການເຮັດວຽກ"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"ປິດ <xliff:g id="APP">%s</xliff:g> ໄວ້."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"ປິດ <xliff:g id="APP">%s</xliff:g> ແລ້ວ."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"ທຸກແອັບພລິເຄຊັນບໍ່ດົນມານີ້ຖືກປ່ອຍໄປ."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> ອຸປະກອນ)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth ປິດ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"ບໍ່ມີອຸປະກອນທີ່ສາມາດຈັບຄູ່ໄດ້"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"ແບັດເຕີຣີ <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"ສຽງ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"ຊຸດຫູຟັງ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"ການປ້ອນຂໍ້ມູນ"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"ຄວາມສະຫວ່າງ"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"ໝຸນອັດຕະໂນມັດ"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"ໝຸນໜ້າຈໍອັດຕະໂນມັດ"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"ກຳລັງເຊື່ອມຕໍ່..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"ການປ່ອນສັນຍານ"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"ຮັອດສະປອດ"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"ການແຈ້ງເຕືອນ"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"ໄຟສາຍ"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"ອິນເຕີເນັດມືຖື"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"ໃຊ້ໄປແລ້ວ <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"ຈຳກັດ <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"ຄຳເຕືອນ <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"ໂໝດການເຮັດວຽກ"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"ແສງກາງຄືນ"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"ເປີດຕອນຕາເວັນຕົກ"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"ຈົນກວ່າຕາເວັນຂຶ້ນ"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"ເປີດຕອນ <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"ຈົນກວ່າຈະຮອດ <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC is disabled"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC is enabled"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> ຖືກປິດໃຊ້ໃນໂໝດຄວາມມປອດໄພ."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"ລຶບລ້າງທັງໝົດ"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"ລາກມາບ່ອນນີ້ເພື່ອໃຊ້ການແບ່ງໜ້າຈໍ"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"ການແຍກລວງຂວາງ"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"ການແຍກລວງຕັ້ງ"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"ການແຍກກຳນົດເອງ"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"ດ້ວຍການຄວບຄຸມການແຈ້ງເຕືອນ, ທ່ານສາມາດຕັ້ງລະດັບຄວາມສຳຄັນຈາກ 0 ຮອດ 5 ໃຫ້ກັບການແຈ້ງເຕືອນແອັບໃດໜຶ່ງໄດ້. \n\n"<b>"ລະດັບ 5"</b>" \n- ສະແດງຢູ່ເທິງສຸດຂອງລາຍການແຈ້ງເຕືອນ \n- ອະນຸຍາດໃຫ້ຂັດຈັງຫວະຕອນເປີດເຕັມຈໍ \n- ແນມເບິ່ງທຸກເທື່ອ \n\n"<b>"ລະດັບ 4"</b>" \n- ກັນບໍ່ໃຫ້ຂັດຈັງຫວະຕອນເປີດເຕັມຈໍ \n- ແນມເບິ່ງທຸກເທື່ອ \n\n"<b>"ລະດັບ 3"</b>" \n- ກັນບໍ່ໃຫ້ຂັດຈັງຫວະຕອນເປີດເຕັມຈໍ \n- ບໍ່ແນມເບິ່ງ \n\n"<b>"ລະດັບ 2"</b>" \n- ກັນບໍ່ໃຫ້ຂັດຈັງຫວະຕອນເປີດເຕັມຈໍ \n- ບໍ່ແນມເບິ່ງ \n- ບໍ່ມີສຽງ ແລະ ບໍ່ມີການສັ່ນເຕືອນ \n\n"<b>"ລະດັບ 1"</b>" \n- ກັນບໍ່ໃຫ້ຂັດຈັງຫວະຕອນເປີດເຕັມຈໍ \n- ບໍ່ແນມເບິ່ງ \n- ບໍ່ມີສຽງ ແລະ ບໍ່ມີການສັ່ນເຕືອນ \n- ເຊື່ອງຈາກໜ້າຈໍລັອກ ແລະ ແຖບສະຖານະ \n- ສະແດງຢູ່ລຸ່ມສຸດຂອງລາຍການແຈ້ງເຕືອນ \n\n"<b>"ລະດັບ 0"</b>" \n- ປິດກັ້ນການແຈ້ງເຕືອນທັງໝົດຈາກແອັບ"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"ການແຈ້ງເຕືອນ"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"ທ່ານຈະບໍ່ໄດ້ຮັບການແຈ້ງເຕືອນເຫຼົ່ານີ້ອີກຕໍ່ໄປ"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"ສະແດງການແຈ້ງເຕືອນເຫຼົ່ານີ້ຕໍ່ໄປບໍ?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"ຢຸດການແຈ້ງເຕືອນ"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"ສະແດງຕໍ່ໄປ"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"ຄລິບບອດ"</item>
<item msgid="5742013440802239414">"ລະຫັດກະແຈ"</item>
<item msgid="8802889973626281575">"ຕົວສະຫຼັບແປ້ນພິມ"</item>
- <item msgid="8175437057325747277">"ບໍ່ໃຊ້"</item>
+ <item msgid="7095517796293767867">"ການແນະນຳການໝຸນ"</item>
+ <item msgid="8494159969042135235">"ບໍ່ມີ"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"ປົກກະຕິ"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"ແຕະເພື່ອເບິ່ງລາຍລະອຽດການນຳໃຊ້ແບັດເຕີຣີ ແລະ ອິນເຕີເນັດ"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"ປິດອິນເຕີເນັດມືຖືໄວ້ບໍ?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"ເນື່ອງຈາກມີແອັບໃດໜຶ່ງກຳລັງຂັດຂວາງການຂໍອະນຸຍາດ, ການຕັ້ງຄ່າຈຶ່ງບໍ່ສາມາດຢັ້ງຢືນການຕອບຮັບຂອງທ່ານໄດ້."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"ອະນຸຍາດ <xliff:g id="APP_0">%1$s</xliff:g> ໃຫ້ສະແດງ <xliff:g id="APP_2">%2$s</xliff:g> ສະໄລ້ບໍ?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- ມັນສາມາດອ່ານຂໍ້ມູນຈາກ <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- ມັນສາມາດໃຊ້ຄຳສັ່ງພາຍໃນ <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"ອະນຸຍາດ <xliff:g id="APP">%1$s</xliff:g> ເພື່ອສະແດງສະໄລ້ຈາກແອັບ"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"ອະນຸຍາດ"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"ປະຕິເສດ"</string>
</resources>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index a613b23..cc0f8ab 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -90,6 +90,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Pagrindinis"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Meniu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Pritaikymas neįgaliesiems"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Pasukti ekraną"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Apžvalga"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Ieškoti"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparatas"</string>
@@ -104,6 +105,12 @@
<string name="camera_label" msgid="7261107956054836961">"atidaryti fotoaparatą"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Pasirinkti naują užduoties išdėstymą"</string>
<string name="cancel" msgid="6442560571259935130">"Atšaukti"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Suderinamumo priartinimo mygtukas."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Padidinti ekraną."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"„Bluetooth“ prijungtas."</string>
@@ -180,7 +187,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Skambutis tylus."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Darbo režimas"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Atsisakyti <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Atsisakyta programos „<xliff:g id="APP">%s</xliff:g>“."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Atsisakyta visų naujausių programų."</string>
@@ -279,6 +287,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"„Bluetooth“ (<xliff:g id="NUMBER">%d</xliff:g> įreng.)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"„Bluetooth“ išjungta"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Nėra pasiekiamų susietų įrenginių"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Akumuliatorius: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Garsas"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Virtualiosios realybės įrenginys"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Įvestis"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Šviesumas"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Automatinis pasukimas"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Automatiškai sukti ekraną"</string>
@@ -319,6 +331,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Prisijungiama..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Susiejimas"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Viešosios interneto prieigos taškas"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Pranešimai"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Žibintuvėlis"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobiliojo ryšio duomenys"</string>
@@ -328,8 +343,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Išnaudota: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Limitas: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> įspėjimas"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Darbo režimas"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Nakties šviesa"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Per saulėlydį"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Iki saulėtekio"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Iki <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"ALR"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"ALR išjungtas"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"ALR įjungtas"</string>
@@ -342,6 +364,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Programa „<xliff:g id="APP">%s</xliff:g>“ išjungta saugos režimu."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Išvalyti viską"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Vilkite čia, kad naudotumėte skaidytą ekraną"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Horizontalus skaidymas"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Vertikalus skaidymas"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Tinkintas skaidymas"</string>
@@ -566,6 +590,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Naudodami pranešimų valdiklius galite nustatyti programos pranešimų svarbos lygį nuo 0 iki 5. \n\n"<b>"5 lygis"</b>" \n– Rodyti pranešimų sąrašo viršuje \n– Leisti pertraukti, kai veikia viso ekrano režimas \n– Visada rodyti pranešimus \n\n"<b>"4 lygis"</b>" \n– Neleisti pertraukti viso ekrano režimo \n– Visada rodyti pranešimus \n\n"<b>"3 lygis"</b>" \n– Neleisti pertraukti viso ekrano režimo \n– Niekada nerodyti pranešimų \n\n"<b>"2 lygis"</b>" \n– Neleisti pertraukti viso ekrano režimo \n– Niekada nerodyti pranešimų \n– Niekada neleisti garso ir nevibruoti \n\n"<b>"1 lygis"</b>" \n– Neleisti pertraukti viso ekrano režimo \n– Niekada nerodyti pranešimų \n– Niekada neleisti garso ir nevibruoti \n– Slėpti užrakinimo ekrane ir būsenos juostoje \n– Rodyti pranešimų sąrašo apačioje \n\n"<b>"0 lygis"</b>" \n– Blokuoti visus programos pranešimus"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Pranešimai"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Nebematysite šių pranešimų"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Toliau rodyti šiuos pranešimus?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Sustabdyti pranešimus"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Toliau rodyti"</string>
@@ -664,7 +690,8 @@
<item msgid="1545641631806817203">"Iškarpinė"</item>
<item msgid="5742013440802239414">"Klavišo kodas"</item>
<item msgid="8802889973626281575">"Klaviatūros perjungiklis"</item>
- <item msgid="8175437057325747277">"Nėra"</item>
+ <item msgid="7095517796293767867">"Pasukimo pasiūlymas"</item>
+ <item msgid="8494159969042135235">"Nėra"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Įprastas"</item>
@@ -788,4 +815,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Palieskite ir sužinokite išsamios informacijos apie akumuliatoriaus bei duomenų naudojimą"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Išjungti mobiliojo ryšio duomenis?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Kadangi programa užstoja leidimo užklausą, nustatymuose negalima patvirtinti jūsų atsakymo."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Leisti „<xliff:g id="APP_0">%1$s</xliff:g>“ rodyti „<xliff:g id="APP_2">%2$s</xliff:g>“ fragmentus?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Gali nuskaityti informaciją iš „<xliff:g id="APP">%1$s</xliff:g>“"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Gali imtis veiksmų programoje „<xliff:g id="APP">%1$s</xliff:g>“"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Leisti „<xliff:g id="APP">%1$s</xliff:g>“ rodyti bet kurios programos fragmentus"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Leisti"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Neleisti"</string>
</resources>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index a02a20b..1d0d57a 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -89,6 +89,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Sākums"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Izvēlne"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Pieejamība"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Pagriezt ekrānu"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Pārskats"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Meklēt"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -103,6 +104,12 @@
<string name="camera_label" msgid="7261107956054836961">"atvērt kameru"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Atlasiet jaunu uzdevumu izkārtojumu"</string>
<string name="cancel" msgid="6442560571259935130">"Atcelt"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Saderības tālummaiņas poga."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Veikt tālummaiņu no mazāka ekrāna uz lielāku."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth savienojums ir izveidots."</string>
@@ -179,7 +186,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Zvana signāls — kluss."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Darba režīms"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Nerādīt lietotni <xliff:g id="APP">%s</xliff:g>"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Lietotne <xliff:g id="APP">%s</xliff:g> vairs netiek rādīta."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Visas nesen izmantotās lietojumprogrammas tika noņemtas."</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> ierīce(-es))"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth savienojums ir izslēgts."</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Nav pieejama neviena pārī savienota ierīce."</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Akumulators: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Austiņas"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Ievade"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Spilgtums"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Automātiska pagriešana"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Automātiska ekrāna pagriešana"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Notiek savienojuma izveide…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Piesaiste"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Tīklājs"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Paziņojumi"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Zibspuldze"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobilie dati"</string>
@@ -326,8 +341,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Tiek izmantots: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Ierobežojums: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> brīdinājums"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Darba režīms"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Nakts režīms"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Saulrietā"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Līdz saullēktam"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Plkst. <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Līdz plkst. <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC ir atspējoti"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC ir iespējoti"</string>
@@ -340,6 +362,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Lietotne <xliff:g id="APP">%s</xliff:g> ir atspējota drošajā režīmā."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Notīrīt visu"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Velciet šeit, lai izmantotu ekrāna sadalīšanu"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Horizontāls dalījums"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Vertikāls dalījums"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Pielāgots dalījums"</string>
@@ -564,6 +588,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Izmantojot barošanas paziņojumu vadīklas, varat lietotnes paziņojumiem iestatīt svarīguma līmeni (no 0 līdz 5). \n\n"<b>"5. līmenis"</b>" \n- Tiek rādīts paziņojumu saraksta augšdaļā \n- Tiek atļauta pilnekrāna režīma pārtraukšana \n- Ieskats vienmēr atļauts \n\n"<b>"4. līmenis"</b>" \n- Tiek novērsta pilnekrāna režīma pārtraukšana \n- Ieskats vienmēr atļauts \n\n"<b>"3. līmenis"</b>" \n- Tiek novērsta pilnekrāna režīma pārtraukšana \n- Ieskats nav atļauts \n\n"<b>"2. līmenis"</b>" \n- Tiek novērsta pilnekrāna režīma pārtraukšana \n- Ieskats nav atļauts \n- Nav atļautas skaņas un vibrosignāls \n\n"<b>"1. līmenis"</b>" \n- Tiek novērsta pilnekrāna režīma pārtraukšana \n- Ieskats nav atļauts \n- Nav atļautas skaņas un vibrosignāls \n- Paziņojumi tiek paslēpti bloķēšanas ekrānā un statusa joslā \n- Paziņojumi tiek rādīti paziņojumu saraksta apakšdaļā \n\n"<b>"0. līmenis"</b>" \n- Visi lietotnes paziņojumi tiek bloķēti"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Paziņojumi"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Jūs vairs neredzēsiet šos paziņojumus."</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Vai turpināt rādīt šos paziņojumus?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Apturēt paziņojumu rādīšanu"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Turpināt rādīt"</string>
@@ -660,7 +686,8 @@
<item msgid="1545641631806817203">"Starpliktuve"</item>
<item msgid="5742013440802239414">"Taustiņu kods"</item>
<item msgid="8802889973626281575">"Tastatūras pārslēdzējs"</item>
- <item msgid="8175437057325747277">"Neviens"</item>
+ <item msgid="7095517796293767867">"Rotācijas ieteikums"</item>
+ <item msgid="8494159969042135235">"Nav"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normāls"</item>
@@ -784,4 +811,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Pieskarieties, lai skatītu detalizētu informāciju par akumulatora un datu lietojumu"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Vai izslēgt mobilos datus?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Lietotne Iestatījumi nevar verificēt jūsu atbildi, jo cita lietotne aizsedz atļaujas pieprasījumu."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Vai atļaut lietotnei <xliff:g id="APP_0">%1$s</xliff:g> rādīt lietotnes <xliff:g id="APP_2">%2$s</xliff:g> sadaļas?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Var lasīt informāciju no lietotnes <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Var veikt darbības lietotnē <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Atļaut lietotnei <xliff:g id="APP">%1$s</xliff:g> rādīt sadaļas no jebkuras lietotnes"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Atļaut"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Neatļaut"</string>
</resources>
diff --git a/packages/SystemUI/res/values-mk/strings.xml b/packages/SystemUI/res/values-mk/strings.xml
index 886e083..9808ab6 100644
--- a/packages/SystemUI/res/values-mk/strings.xml
+++ b/packages/SystemUI/res/values-mk/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"Ротирај екран"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Краток преглед"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Пребарај"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"отвори камера"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Изберете нов распоред на задача"</string>
<string name="cancel" msgid="6442560571259935130">"Откажи"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Копче за компатибилност на зум."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Зумот е помал на поголем екран."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth е поврзан."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Ѕвонче на тивко."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Режим на работа"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Отфрли <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> е отфрлена."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Сите неодамнешни апликации се отфрлени."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> уреди)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth е исклучен"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Нема достапни спарени уреди"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> батерија"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Аудио"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Слушалки"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Влез"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Осветленост"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Автоматско ротирање"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Автоматско ротирање на екранот"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Се поврзува..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Поврзување"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Точка на пристап"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Известувања"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Светилка"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Мобилен интернет"</string>
@@ -324,8 +339,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Искористено: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Лимит: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Предупредување за <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Режим на работа"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"Работен профил"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"Известувањата и апликациите се исклучени"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Ноќно светло"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Вклуч. на зајдисонце"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"До изгрејсонце"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Ќе се вклучи во <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"До <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC е оневозможено"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC е овозможено"</string>
@@ -338,6 +358,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> е оневозможен во безбеден режим."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Исчисти ги сите"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Повлечете тука за да користите поделен екран"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Повлечете нагоре за да се префрлите од една на друга апликација"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Раздели хоризонтално"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Раздели вертикално"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Раздели прилагодено"</string>
@@ -562,6 +583,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Со контролите за известувањата за напојување, може да поставите ниво на важност од 0 до 5 за известувањата на која било апликација. \n\n"<b>"Ниво 5"</b>" \n- Прикажувај на врвот на списокот со известувања \n- Дозволи прекин во цел екран \n- Секогаш користи појавување \n\n"<b>"Ниво 4"</b>" \n- Спречи прекин во цел екран \n- Секогаш користи појавување \n\n"<b>"Ниво 3"</b>" \n- Спречи прекин во цел екран \n- Без појавување \n\n"<b>"Ниво 2"</b>" \n- Спречи прекин во цел екран \n- Без појавување \n- Без звук и вибрации \n\n"<b>"Ниво 1"</b>" \n- Спречи прекин во цел екран \n- Без појавување \n- Без звук и вибрации \n- Сокриј од заклучен екран и статусна лента \n- Прикажувај на дното на списокот со известувања \n\n"<b>"Ниво 0"</b>" \n- Блокирај ги сите известувања од апликацијата"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Известувања"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Веќе нема да ги гледате овие известувања"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Дали да продолжат да се прикажуваат известувањава?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Запри ги известувањата"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Продолжи да ги прикажуваш"</string>
@@ -656,7 +679,8 @@
<item msgid="1545641631806817203">"Табла со исечоци"</item>
<item msgid="5742013440802239414">"Код на копче"</item>
<item msgid="8802889973626281575">"Менувач на тастатура"</item>
- <item msgid="8175437057325747277">"Ништо"</item>
+ <item msgid="7095517796293767867">"Предлог за ротација"</item>
+ <item msgid="8494159969042135235">"Нема"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Нормални"</item>
@@ -780,4 +804,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Допрете за детали за батеријата и потрошениот сообраќај"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Да се исклучи мобилниот интернет?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Бидејќи апликацијата го прикрива барањето за дозвола, „Поставките“ не може да го потврдат вашиот одговор."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Дали да се дозволи <xliff:g id="APP_0">%1$s</xliff:g> да прикажува делови од <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Може да чита информации од <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Може да презема дејства во <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Дозволете <xliff:g id="APP">%1$s</xliff:g> да прикажува делови од која било апликација"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Дозволи"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Одбиј"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ml/strings.xml b/packages/SystemUI/res/values-ml/strings.xml
index f3fa9e9..446f0e4 100644
--- a/packages/SystemUI/res/values-ml/strings.xml
+++ b/packages/SystemUI/res/values-ml/strings.xml
@@ -33,13 +33,10 @@
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"നടന്നുകൊണ്ടിരിക്കുന്നവ"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"അറിയിപ്പുകൾ"</string>
<string name="battery_low_title" msgid="6456385927409742437">"ബാറ്ററി കുറവാണ്"</string>
- <!-- no translation found for battery_low_title_hybrid (6268991275887381595) -->
- <skip />
+ <string name="battery_low_title_hybrid" msgid="6268991275887381595">"ബാറ്ററി ചാർജ് കുറവാണ്. ബാറ്ററി ലാഭിക്കൽ ഓണാക്കുക"</string>
<string name="battery_low_percent_format" msgid="2900940511201380775">"<xliff:g id="PERCENTAGE">%s</xliff:g> ശേഷിക്കുന്നു"</string>
- <!-- no translation found for battery_low_percent_format_hybrid (6838677459286775617) -->
- <skip />
- <!-- no translation found for battery_low_percent_format_hybrid_short (9025795469949145586) -->
- <skip />
+ <string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"<xliff:g id="PERCENTAGE">%s</xliff:g> അവശേഷിക്കുന്നു, ഉപയോഗം അടിസ്ഥാനമാക്കി ഏകദേശം <xliff:g id="TIME">%s</xliff:g> ശേഷിക്കുന്നു"</string>
+ <string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"<xliff:g id="PERCENTAGE">%s</xliff:g> അവശേഷിക്കുന്നു, ഏകദേശം <xliff:g id="TIME">%s</xliff:g> ശേഷിക്കുന്നു"</string>
<string name="battery_low_percent_format_saver_started" msgid="7879389868952879166">"<xliff:g id="PERCENTAGE">%s</xliff:g> ശേഷിക്കുന്നു. ബാറ്ററി ലാഭിക്കൽ ഓണാണ്."</string>
<string name="invalid_charger" msgid="4549105996740522523">"USB ചാർജ്ജുചെയ്യൽ പിന്തുണയ്ക്കുന്നില്ല.\nഅതിന്റെ അനുബന്ധ ചാർജ്ജർ മാത്രം ഉപയോഗിക്കുക."</string>
<string name="invalid_charger_title" msgid="3515740382572798460">"USB ചാർജ്ജുചെയ്യൽ പിന്തുണച്ചില്ല."</string>
@@ -73,22 +70,15 @@
<string name="usb_debugging_secondary_user_message" msgid="6067122453571699801">"ഉപകരണത്തിൽ ഇപ്പോൾ സൈൻ ഇൻ ചെയ്തിരിക്കുന്ന ഉപയോക്താവിന് USB ഡീബഗ്ഗിംഗ് ഓണാക്കാനാകില്ല. ഈ ഫീച്ചർ ഉപയോഗിക്കാൻ പ്രാഥമിക ഉപയോക്താവിലേക്ക് മാറുക."</string>
<string name="compat_mode_on" msgid="6623839244840638213">"സ്ക്രീനിൽ ഉൾക്കൊള്ളിക്കാൻ സൂം ചെയ്യുക"</string>
<string name="compat_mode_off" msgid="4434467572461327898">"സ്ക്രീനിൽ ഉൾക്കൊള്ളിക്കാൻ വലിച്ചുനീട്ടുക"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"സ്ക്രീൻഷോട്ട്"</string>
<string name="screenshot_saving_ticker" msgid="7403652894056693515">"സ്ക്രീൻഷോട്ട് സംരക്ഷിക്കുന്നു..."</string>
<string name="screenshot_saving_title" msgid="8242282144535555697">"സ്ക്രീൻഷോട്ട് സംരക്ഷിക്കുന്നു..."</string>
- <!-- no translation found for screenshot_saving_text (2545047868936087248) -->
- <skip />
- <!-- no translation found for screenshot_saved_title (5637073968117370753) -->
- <skip />
- <!-- no translation found for screenshot_saved_text (7574667448002050363) -->
- <skip />
- <!-- no translation found for screenshot_failed_title (9096484883063264803) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_unknown_text (8844781948876286488) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_text (3041612585107107310) -->
- <skip />
+ <string name="screenshot_saving_text" msgid="2545047868936087248">"സ്ക്രീൻഷോട്ട് സംരക്ഷിക്കുന്നു"</string>
+ <string name="screenshot_saved_title" msgid="5637073968117370753">"സ്ക്രീൻഷോട്ട് സംരക്ഷിച്ചു"</string>
+ <string name="screenshot_saved_text" msgid="7574667448002050363">"സ്ക്രീൻഷോട്ട് കാണാൻ ടാപ്പ് ചെയ്യുക"</string>
+ <string name="screenshot_failed_title" msgid="9096484883063264803">"സ്ക്രീൻഷോട്ട് എടുക്കാനായില്ല"</string>
+ <string name="screenshot_failed_to_save_unknown_text" msgid="8844781948876286488">"സ്ക്രീൻഷോട്ട് സംരക്ഷിമ്പോൾ പ്രശ്നം നേരിട്ടു"</string>
+ <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"സ്റ്റോറേജ് ഇടം പരിമിതമായതിനാൽ സ്ക്രീൻഷോട്ട് സംരക്ഷിക്കാനാകുന്നില്ല"</string>
<string name="screenshot_failed_to_capture_text" msgid="173674476457581486">"സ്ക്രീൻഷോട്ടുകൾ എടുക്കുന്നത് ആപ്പോ നിങ്ങളുടെ സ്ഥാപനമോ അനുവദിക്കുന്നില്ല"</string>
<string name="usb_preference_title" msgid="6551050377388882787">"USB ഫയൽ കൈമാറൽ ഓപ്ഷനുകൾ"</string>
<string name="use_mtp_button_title" msgid="4333504413563023626">"ഒരു മീഡിയ പ്ലേയറായി (MTP) മൗണ്ടുചെയ്യുക"</string>
@@ -98,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"സ്ക്രീൻ തിരിക്കുക"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"അവലോകനം"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"തിരയൽ"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"ക്യാമറ"</string>
@@ -112,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"ക്യാമറ തുറക്കുക"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"പുതിയ ടാസ്ക് ലേഔട്ട് തിരഞ്ഞെടുക്കുക"</string>
<string name="cancel" msgid="6442560571259935130">"റദ്ദാക്കുക"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"അനുയോജ്യതാ സൂം ബട്ടൺ."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ചെറുതിൽ നിന്ന് വലിയ സ്ക്രീനിലേക്ക് സൂം ചെയ്യുക."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"ബ്ലൂടൂത്ത് കണക്റ്റുചെയ്തു."</string>
@@ -188,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"റിംഗർ നിശ്ശബ്ദമാണ്."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"പ്രവർത്തന മോഡ്"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> നിരസിക്കുക."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> നിരസിച്ചു."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"അടുത്തിടെയുള്ള എല്ലാ അപ്ലിക്കേഷനും നിരസിച്ചു."</string>
@@ -285,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"ബ്ലൂടൂത്ത് (<xliff:g id="NUMBER">%d</xliff:g> ഉപകരണങ്ങൾ)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"ബ്ലൂടൂത്ത് ഓഫുചെയ്യുക"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"ജോടിയാക്കിയ ഉപകരണങ്ങളൊന്നും ലഭ്യമല്ല"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ബാറ്ററി"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"ഓഡിയോ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"ഹെഡ്സെറ്റ്"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"ഇൻപുട്ട്"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"തെളിച്ചം"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"ആവശ്യാനുസരണം തിരിയുക"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"സ്ക്രീൻ സ്വയമേ തിരിക്കുക"</string>
@@ -325,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"കണക്റ്റുചെയ്യുന്നു..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"ടെതറിംഗ്"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"ഹോട്ട്സ്പോട്ട്"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"അറിയിപ്പുകൾ"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"ടോർച്ച്"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"മൊബൈൽ ഡാറ്റ"</string>
@@ -334,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> ഉപയോഗിച്ചു"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> പരിധി"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> മുന്നറിയിപ്പ്"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"പ്രവർത്തന മോഡ്"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"നൈറ്റ് ലൈറ്റ്"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"സൂര്യാസ്തമയത്തിന്"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"സൂര്യോദയം വരെ"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g>-ന്"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> വരെ"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC പ്രവർത്തനരഹിതമാക്കി"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC പ്രവർത്തനക്ഷമമാക്കി"</string>
@@ -348,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"സുരക്ഷിത മോഡിൽ <xliff:g id="APP">%s</xliff:g> പ്രവർത്തനരഹിതമാക്കിയിരിക്കുന്നു."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"എല്ലാം മായ്ക്കുക"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"സ്പ്ലിറ്റ് സ്ക്രീൻ ഉപയോഗിക്കുന്നതിന് ഇവിടെ വലിച്ചിടുക"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"തിരശ്ചീനമായി വേർതിരിക്കുക"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"ലംബമായി വേർതിരിക്കുക"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"ഇഷ്ടാനുസൃതമായി വേർതിരിക്കുക"</string>
@@ -571,27 +585,21 @@
<string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"ഓഫ്"</string>
<string name="power_notification_controls_description" msgid="4372459941671353358">"പവർ അറിയിപ്പ് നിയന്ത്രണം ഉപയോഗിച്ച്, ഒരു ആപ്പിനായുള്ള അറിയിപ്പുകൾക്ക് 0 മുതൽ 5 വരെയുള്ള പ്രാധാന്യ ലെവലുകളിലൊന്ന് നിങ്ങൾക്ക് സജ്ജമാക്കാവുന്നതാണ്. \n\n"<b>"ലെവൽ 5"</b>" \n- അറിയിപ്പ് ലിസ്റ്റിന്റെ മുകളിൽ കാണിക്കുക \n- മുഴുവൻ സ്ക്രീൻ തടസ്സം അനുവദിക്കുക \n- എല്ലായ്പ്പോഴും ദൃശ്യമാക്കുക \n\n"<b>"ലെവൽ 4"</b>" \n- മുഴുവൻ സ്ക്രീൻ തടസ്സം തടയുക \n- എല്ലായ്പ്പോഴും ദൃശ്യമാക്കുക \n\n"<b>"ലെവൽ 3"</b>" \n- മുഴുവൻ സ്ക്രീൻ തടസ്സം തടയുക \n- ഒരിക്കലും സൃശ്യമാക്കരുത് \n\n"<b>"ലെവൽ 2"</b>" \n- മുഴുവൻ സ്ക്രീൻ തടസ്സം തടയുക \n- ഒരിക്കലും ദൃശ്യമാക്കരുത് \n- ഒരിക്കലും ശബ്ദവും വൈബ്രേഷനും ഉണ്ടാക്കരുത് \n\n"<b>"ലെവൽ 1"</b>" \n- മുഴുവൻ സ്ക്രീൻ തടസ്സം തടയുക \n- ഒരിക്കലും ദൃശ്യമാക്കരുത് \n- ഒരിക്കലും ശബ്ദവും വൈബ്രേഷനും ഉണ്ടാക്കരുത് \n- ലോക്ക് സ്ക്രീനിൽ നിന്നും സ്റ്റാറ്റസ് ബാറിൽ നിന്നും മറയ്ക്കുക \n- അറിയിപ്പ് ലിസ്റ്റിന്റെ അടിയിൽ കാണിക്കുക \n\n"<b>"ലെവൽ 0"</b>" \n- ആപ്പിൽ നിന്നുള്ള എല്ലാ അറിയിപ്പുകളും ബ്ലോക്കുചെയ്യുക"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"അറിയിപ്പുകൾ"</string>
- <!-- no translation found for notification_channel_disabled (344536703863700565) -->
+ <string name="notification_channel_disabled" msgid="344536703863700565">"നിങ്ങൾ ഇനി ഈ അറിയിപ്പുകൾ കാണില്ല"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
<skip />
- <!-- no translation found for inline_keep_showing (8945102997083836858) -->
- <skip />
- <!-- no translation found for inline_stop_button (4172980096860941033) -->
- <skip />
- <!-- no translation found for inline_keep_button (6665940297019018232) -->
- <skip />
- <!-- no translation found for inline_keep_showing_app (1723113469580031041) -->
- <skip />
- <!-- no translation found for notification_unblockable_desc (1037434112919403708) -->
- <skip />
+ <string name="inline_keep_showing" msgid="8945102997083836858">"ഈ അറിയിപ്പുകൾ തുടർന്നും കാണിക്കണോ?"</string>
+ <string name="inline_stop_button" msgid="4172980096860941033">"അറിയിപ്പുകൾ നിർത്തുക"</string>
+ <string name="inline_keep_button" msgid="6665940297019018232">"തുടർന്നും കാണിക്കുക"</string>
+ <string name="inline_keep_showing_app" msgid="1723113469580031041">"ഈ ആപ്പിൽ നിന്നുള്ള അറിയിപ്പുകൾ തുടർന്നും കാണിക്കണോ?"</string>
+ <string name="notification_unblockable_desc" msgid="1037434112919403708">"ഈ അറിയിപ്പുകൾ ഓഫാക്കാനാവില്ല"</string>
<string name="notification_channel_controls_opened_accessibility" msgid="6553950422055908113">"<xliff:g id="APP_NAME">%1$s</xliff:g> ആപ്പിന്റെ അറിയിപ്പ് നിയന്ത്രണങ്ങൾ തുറന്നു"</string>
<string name="notification_channel_controls_closed_accessibility" msgid="7521619812603693144">"<xliff:g id="APP_NAME">%1$s</xliff:g> ആപ്പിന്റെ അറിയിപ്പ് നിയന്ത്രണങ്ങൾ അടച്ചു"</string>
<string name="notification_channel_switch_accessibility" msgid="3420796005601900717">"ഈ ചാനലിൽ നിന്നുള്ള അറിയിപ്പുകൾ അനുവദിക്കുക"</string>
<string name="notification_more_settings" msgid="816306283396553571">"കൂടുതൽ ക്രമീകരണം"</string>
- <!-- no translation found for notification_app_settings (420348114670768449) -->
- <skip />
+ <string name="notification_app_settings" msgid="420348114670768449">"ഇഷ്ടാനുസൃതമാക്കുക"</string>
<string name="notification_done" msgid="5279426047273930175">"പൂർത്തിയായി"</string>
- <!-- no translation found for inline_undo (558916737624706010) -->
- <skip />
+ <string name="inline_undo" msgid="558916737624706010">"പഴയപടിയാക്കുക"</string>
<string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
<string name="notification_menu_gear_description" msgid="2204480013726775108">"അറിയിപ്പ് നിയന്ത്രണങ്ങൾ"</string>
<string name="notification_menu_snooze_description" msgid="3653669438131034525">"അറിയിപ്പ് സ്നൂസ് ഓപ്ഷനുകൾ"</string>
@@ -674,7 +682,8 @@
<item msgid="1545641631806817203">"ക്ലിപ്പ്ബോർഡ്"</item>
<item msgid="5742013440802239414">"കീകോഡ്"</item>
<item msgid="8802889973626281575">"കീബോർഡ് സ്വിച്ചർ"</item>
- <item msgid="8175437057325747277">"ഒന്നുമില്ല"</item>
+ <item msgid="7095517796293767867">"തിരിക്കൽ നിർദ്ദേശം"</item>
+ <item msgid="8494159969042135235">"ഒന്നുമില്ല"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"സാധാരണ വേഗത്തിൽ"</item>
@@ -798,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"ബാറ്ററി, ഡാറ്റ ഉപയോഗം എന്നിവയുടെ വിശദാംശങ്ങളറിയാൻ ടാപ്പുചെയ്യുക"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"മൊബൈൽ ഡാറ്റ ഓഫാക്കണോ?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"അനുമതി അഭ്യർത്ഥനയെ ഒരു ആപ്പ് മറയ്ക്കുന്നതിനാൽ, ക്രമീകരണത്തിന് നിങ്ങളുടെ പ്രതികരണം പരിശോധിച്ചുറപ്പിക്കാനാകില്ല."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_2">%2$s</xliff:g> സ്ലൈസുകൾ കാണിക്കാൻ <xliff:g id="APP_0">%1$s</xliff:g>-നെ അനുവദിക്കണോ?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- ഇതിന് <xliff:g id="APP">%1$s</xliff:g>-ൽ നിന്ന് വിവരങ്ങൾ വായിക്കാനാകും"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- ഇതിന് <xliff:g id="APP">%1$s</xliff:g>-നുള്ളിൽ പ്രവർത്തനങ്ങൾ ചെയ്യാനാകും"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"ഏത് ആപ്പിൽ നിന്നും സ്ലൈസുകൾ കാണിക്കാൻ <xliff:g id="APP">%1$s</xliff:g>-നെ അനുവദിക്കുക"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"അനുവദിക്കുക"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"നിരസിക്കുക"</string>
</resources>
diff --git a/packages/SystemUI/res/values-mn/strings.xml b/packages/SystemUI/res/values-mn/strings.xml
index c8aba01..f1d0c18 100644
--- a/packages/SystemUI/res/values-mn/strings.xml
+++ b/packages/SystemUI/res/values-mn/strings.xml
@@ -86,6 +86,7 @@
<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_rotate_button" msgid="7402949513740253006">"Дэлгэцийг эргүүлэх"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Тойм"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Хайх"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Камер"</string>
@@ -100,6 +101,12 @@
<string name="camera_label" msgid="7261107956054836961">"камер нээх"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Шинэ ажиллах талбарыг сонгоно уу"</string>
<string name="cancel" msgid="6442560571259935130">"Цуцлах"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Тохиромжтой өсгөх товч."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Жижгээс том дэлгэцрүү өсгөх."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth холбогдсон."</string>
@@ -176,7 +183,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Хонхыг хаах."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Ажлын горим"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g>-г хаах."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> байхгүй."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Хамгийн сүүлийн бүх програмыг арилгасан байна."</string>
@@ -273,6 +281,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> төхөөрөмж)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth унтраалттай"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Хослуулсан төхөөрөмж байхгүй"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> батерей"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Аудио"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Чихэвч"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Оролт"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Тодрол"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Автоматаар эргэх"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Дэлгэцийг автоматаар эргүүлэх"</string>
@@ -313,6 +325,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Холбогдож байна..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Модем болгох"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Сүлжээний цэг"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Мэдэгдэл"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Гар чийдэн"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Мобайл дата"</string>
@@ -322,8 +337,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> ашигласан"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> хязгаар"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> анхааруулга"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Ажлын горим"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Шөнийн гэрэл"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Нар жаргах үед"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Нар мандах хүртэл"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g>-д"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> хүртэл"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC-г цуцалсан"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC-г идэвхжүүлсэн"</string>
@@ -336,6 +358,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g>-г аюулгүй горимд идэвхгүй болгосон."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Бүгдийг арилгах"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Хуваагдсан дэлгэцийг ашиглахын тулд энд чирэх"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Хэвтээ чиглэлд хуваах"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Босоо чиглэлд хуваах"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Хүссэн хэлбэрээр хуваах"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Тэжээлийн мэдэгдлийн удирдлагын тусламжтайгаар та апп-н мэдэгдэлд 0-5 хүртэлх ач холбогдлын түвшин тогтоох боломжтой. \n\n"<b>"5-р түвшин"</b>" \n- Мэдэгдлийн жагсаалтын хамгийн дээр харуулна \n- Бүтэн дэлгэцэд саад болно \n- Дэлгэцэд тогтмол гарч ирнэ \n\n"<b>"4-р түвшин"</b>" \n- Бүтэн дэлгэцэд саад болохоос сэргийлнэ \n- Дэлгэцэд тогтмол гарч ирнэ \n\n"<b>"3-р түвшин"</b>" \n- Бүтэн дэлгэцэд саад болохоос сэргийлнэ \n- Дэлгэцэд хэзээ ч гарч ирэхгүй \n\n"<b>"2-р түвшин"</b>" \n- Бүтэн дэлгэцэд саад болохоос сэргийлнэ \n- Дэлгэцэд хэзээ ч гарч ирэхгүй \n- Дуу болон чичиргээ хэзээ ч гаргахгүй \n\n"<b>"1-р түвшин"</b>" \n- Бүтэн дэлгэцэд саад болохоос сэргийлнэ \n- Дэлгэцэд хэзээ ч гарч ирэхгүй \n- Дуу болон чичиргээ хэзээ ч гаргахгүй \n- Түгжигдсэн дэлгэц болон статусын самбараас нууна \n- Мэдэгдлийн жагсаалтын доор харуулна \n\n"<b>"0-р түвшин"</b>" \n- Энэ апп-н бүх мэдэгдлийг блоклоно"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Мэдэгдэл"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Та эдгээр мэдэгдлийг цаашид харахгүй"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Эдгээр мэдэгдлийг харуулсан хэвээр байх уу?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Мэдэгдлийг зогсоох"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Харуулсан хэвээр байх"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Түр санах ой"</item>
<item msgid="5742013440802239414">"Түлхүүр код"</item>
<item msgid="8802889973626281575">"Гар солигч"</item>
- <item msgid="8175437057325747277">"Хоосон"</item>
+ <item msgid="7095517796293767867">"Эргүүлэлтийн зөвлөмж"</item>
+ <item msgid="8494159969042135235">"Байхгүй"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Энгийн"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Батерей, дата ашиглалтын талаар дэлгэрэнгүйг харахын тулд товшино уу"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Мобайл датаг унтраах уу?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Апп нь зөвшөөрлийн хүсэлтийг танихгүй байгаа тул Тохиргооноос таны хариултыг баталгаажуулах боломжгүй байна."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g>-д <xliff:g id="APP_2">%2$s</xliff:g>-н хэсгүүдийг (slices) харуулахыг зөвшөөрөх үү?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Энэ нь <xliff:g id="APP">%1$s</xliff:g>-с мэдээлэл унших боломжтой"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Энэ нь <xliff:g id="APP">%1$s</xliff:g>-д үйлдэл хийх боломжтой"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g>-д дурын аппаас хэсэг харуулахыг зөвшөөрөх"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Зөвшөөрөх"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Татгалзах"</string>
</resources>
diff --git a/packages/SystemUI/res/values-mr/strings.xml b/packages/SystemUI/res/values-mr/strings.xml
index 803366f..804e916 100644
--- a/packages/SystemUI/res/values-mr/strings.xml
+++ b/packages/SystemUI/res/values-mr/strings.xml
@@ -33,13 +33,10 @@
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"सुरु असलेले"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"सूचना"</string>
<string name="battery_low_title" msgid="6456385927409742437">"बॅटरी कमी आहे"</string>
- <!-- no translation found for battery_low_title_hybrid (6268991275887381595) -->
- <skip />
+ <string name="battery_low_title_hybrid" msgid="6268991275887381595">"बॅटरी कमी आहे. बॅटरी सेव्हर चालू करा"</string>
<string name="battery_low_percent_format" msgid="2900940511201380775">"<xliff:g id="PERCENTAGE">%s</xliff:g> शिल्लक"</string>
- <!-- no translation found for battery_low_percent_format_hybrid (6838677459286775617) -->
- <skip />
- <!-- no translation found for battery_low_percent_format_hybrid_short (9025795469949145586) -->
- <skip />
+ <string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"<xliff:g id="PERCENTAGE">%s</xliff:g> बाकी, तुमच्या वापरावर आधारित सुमारे <xliff:g id="TIME">%s</xliff:g> शिल्लक"</string>
+ <string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"<xliff:g id="PERCENTAGE">%s</xliff:g> बाकी, सुमारे <xliff:g id="TIME">%s</xliff:g> शिल्लक"</string>
<string name="battery_low_percent_format_saver_started" msgid="7879389868952879166">"<xliff:g id="PERCENTAGE">%s</xliff:g> शिल्लक. बॅटरी सेव्हर चालू आहे."</string>
<string name="invalid_charger" msgid="4549105996740522523">"USB चार्जिंग समर्थित नाही.\nफक्त पुरवठा केलेले चार्जर वापरा."</string>
<string name="invalid_charger_title" msgid="3515740382572798460">"USB चार्जिंग समर्थित नाही."</string>
@@ -73,22 +70,15 @@
<string name="usb_debugging_secondary_user_message" msgid="6067122453571699801">"सध्या या डीव्हाइसमध्ये साइन इन केलेला वापरकर्ता USB डीबग करणे चालू करू शकत नाही. हे वैशिष्ट्य वापरण्यासाठी, प्राथमिक वापरकर्त्यावर स्विच करा."</string>
<string name="compat_mode_on" msgid="6623839244840638213">"स्क्रीन भरण्यासाठी झूम करा"</string>
<string name="compat_mode_off" msgid="4434467572461327898">"स्क्रीन भरण्यासाठी ताणा"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"स्क्रीनशॉट"</string>
<string name="screenshot_saving_ticker" msgid="7403652894056693515">"स्क्रीनशॉट जतन करत आहे…"</string>
<string name="screenshot_saving_title" msgid="8242282144535555697">"स्क्रीनशॉट जतन करत आहे…"</string>
- <!-- no translation found for screenshot_saving_text (2545047868936087248) -->
- <skip />
- <!-- no translation found for screenshot_saved_title (5637073968117370753) -->
- <skip />
- <!-- no translation found for screenshot_saved_text (7574667448002050363) -->
- <skip />
- <!-- no translation found for screenshot_failed_title (9096484883063264803) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_unknown_text (8844781948876286488) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_text (3041612585107107310) -->
- <skip />
+ <string name="screenshot_saving_text" msgid="2545047868936087248">"स्क्रीनशॉट सेव्ह केला जात आहे"</string>
+ <string name="screenshot_saved_title" msgid="5637073968117370753">"स्क्रीनशॉट सेव्ह केला"</string>
+ <string name="screenshot_saved_text" msgid="7574667448002050363">"तुमचा स्क्रीनशॉट पाहण्यासाठी टॅप करा"</string>
+ <string name="screenshot_failed_title" msgid="9096484883063264803">"स्क्रीनशॉट कॅप्चर करता आला नाही"</string>
+ <string name="screenshot_failed_to_save_unknown_text" msgid="8844781948876286488">"स्क्रीनशॉट सेव्ह करताना समस्या आली"</string>
+ <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"मर्यादित स्टोरेज जागेमुळे स्क्रीनशॉट सेव्ह करू शकत नाही"</string>
<string name="screenshot_failed_to_capture_text" msgid="173674476457581486">"अॅप किंवा आपल्या संस्थेद्वारे स्क्रीनशॉट घेण्याची अनुमती नाही"</string>
<string name="usb_preference_title" msgid="6551050377388882787">"USB फाईल स्थानांतरण पर्याय"</string>
<string name="use_mtp_button_title" msgid="4333504413563023626">"मीडिया प्लेअर म्हणून माउंट करा (MTP)"</string>
@@ -98,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"स्क्रीन फिरवा"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"अवलोकन"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"शोधा"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"कॅमेरा"</string>
@@ -112,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"कॅमेरा उघडा"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"नवीन कार्य लेआउट निवडा"</string>
<string name="cancel" msgid="6442560571259935130">"रद्द करा"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"सुसंगतता झूम बटण."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"लहानपासून मोठ्या स्क्रीनवर झूम करा."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"ब्लूटूथ कनेक्ट केले."</string>
@@ -188,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"रिंगर मूक."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"कार्य मोड"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> डिसमिस करा."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> डिसमिस केला."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"अलीकडील सर्व अॅप्लिकेशन डिसमिस झाले."</string>
@@ -285,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"ब्लूटूथ (<xliff:g id="NUMBER">%d</xliff:g> डिव्हाइस)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"ब्लूटूथ बंद"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"कोणतेही जोडलेले डिव्हाइसेस उपलब्ध नाहीत"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> बॅटरी"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"ऑडिओ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"हेडसेट"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"इनपुट"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"चमक"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"स्वयं-फिरवा"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"स्वयं-फिरणारी स्क्रीन"</string>
@@ -325,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"कनेक्ट करत आहे..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"टेदरिंग"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"हॉटस्पॉट"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"सूचना"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"फ्लॅशलाइट"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"मोबाइल डेटा"</string>
@@ -334,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> वापरले"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> मर्यादा"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> चेतावणी"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"कार्य मोड"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"रात्रीचा प्रकाश"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"संध्याकाळी चालू असते"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"सूर्योदयापर्यंत"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g> वाजता चालू"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> पर्यंत"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC अक्षम केले आहे"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC सक्षम केले आहे"</string>
@@ -348,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> सुरक्षित-मोडमध्ये अक्षम केला आहे."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"सर्व साफ करा"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"विभाजित स्क्रीन वापर करण्यासाठी येथे ड्रॅग करा"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"क्षैतिज विभाजित करा"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"अनुलंब विभाजित करा"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"सानुकूल विभाजित करा"</string>
@@ -571,27 +585,21 @@
<string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"बंद"</string>
<string name="power_notification_controls_description" msgid="4372459941671353358">"पॉवर सूचना नियंत्रणांच्या साहाय्याने तुम्ही अॅप सूचनांसाठी 0 ते 5 असे महत्त्व स्तर सेट करू शकता. \n\n"<b>"स्तर 5"</b>" \n- सूचना सूचीच्या शीर्षस्थानी दाखवा \n- पूर्ण स्क्रीन व्यत्ययास अनुमती द्या \n- नेहमी डोकावून पहा \n\n"<b>"स्तर 4"</b>\n" - पूर्ण स्क्रीन व्यत्ययास प्रतिबंधित करा \n- नेहमी डोकावून पहा \n\n"<b>"स्तर 3"</b>" \n- पूर्ण स्क्रीन व्यत्ययास प्रतिबंधित करा \n- कधीही डोकावून पाहू नका \n\n"<b>"स्तर 2"</b>" \n- पूर्ण स्क्रीन व्यत्ययास प्रतिबंधित करा \n- कधीही डोकावून पाहू नका \n- कधीही ध्वनी किंवा कंपन करू नका \n\n"<b>"स्तर 1"</b>\n"- पूर्ण स्क्रीन व्यत्ययास प्रतिबंधित करा \n- कधीही डोकावून पाहू नका \n- कधीही ध्वनी किंवा कंपन करू नका \n- लॉक स्क्रीन आणि स्टेटस बार मधून लपवा \n- सूचना सूचीच्या तळाशी दर्शवा \n\n"<b>"स्तर 0"</b>" \n- अॅपमधील सर्व सूचना ब्लॉक करा"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"सूचना"</string>
- <!-- no translation found for notification_channel_disabled (344536703863700565) -->
+ <string name="notification_channel_disabled" msgid="344536703863700565">"आता तुम्हाला या सूचना दिसणार नाहीत"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
<skip />
- <!-- no translation found for inline_keep_showing (8945102997083836858) -->
- <skip />
- <!-- no translation found for inline_stop_button (4172980096860941033) -->
- <skip />
- <!-- no translation found for inline_keep_button (6665940297019018232) -->
- <skip />
- <!-- no translation found for inline_keep_showing_app (1723113469580031041) -->
- <skip />
- <!-- no translation found for notification_unblockable_desc (1037434112919403708) -->
- <skip />
+ <string name="inline_keep_showing" msgid="8945102997083836858">"या सूचना दाखवणे सुरू ठेवायचे?"</string>
+ <string name="inline_stop_button" msgid="4172980096860941033">"सूचना थांबवा"</string>
+ <string name="inline_keep_button" msgid="6665940297019018232">"दाखवणे सुरू ठेवा"</string>
+ <string name="inline_keep_showing_app" msgid="1723113469580031041">"या अॅपकडील सूचना दाखवणे सुरू ठेवायचे?"</string>
+ <string name="notification_unblockable_desc" msgid="1037434112919403708">"या सूचना बंद करता येत नाहीत"</string>
<string name="notification_channel_controls_opened_accessibility" msgid="6553950422055908113">"<xliff:g id="APP_NAME">%1$s</xliff:g> साठी सूचना नियंत्रणे खुली आहेत"</string>
<string name="notification_channel_controls_closed_accessibility" msgid="7521619812603693144">"<xliff:g id="APP_NAME">%1$s</xliff:g> साठी सूचना नियंत्रणे बंद आहेत"</string>
<string name="notification_channel_switch_accessibility" msgid="3420796005601900717">"या चॅनेलकडील सूचनांना मान्यता द्या"</string>
<string name="notification_more_settings" msgid="816306283396553571">"अधिक सेटिंग्ज"</string>
- <!-- no translation found for notification_app_settings (420348114670768449) -->
- <skip />
+ <string name="notification_app_settings" msgid="420348114670768449">"कस्टमाइझ करा"</string>
<string name="notification_done" msgid="5279426047273930175">"पूर्ण झाले"</string>
- <!-- no translation found for inline_undo (558916737624706010) -->
- <skip />
+ <string name="inline_undo" msgid="558916737624706010">"पहिल्यासारखे करा"</string>
<string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
<string name="notification_menu_gear_description" msgid="2204480013726775108">"सूचना नियंत्रणे"</string>
<string name="notification_menu_snooze_description" msgid="3653669438131034525">"सूचना स्नूझ पर्याय"</string>
@@ -674,7 +682,8 @@
<item msgid="1545641631806817203">"क्लिपबोर्ड"</item>
<item msgid="5742013440802239414">"कीकोड"</item>
<item msgid="8802889973626281575">"कीबोर्ड स्विचर"</item>
- <item msgid="8175437057325747277">"काहीही नाही"</item>
+ <item msgid="7095517796293767867">"रोटेशन सूचना"</item>
+ <item msgid="8494159969042135235">"काहीही नाही"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"सामान्य"</item>
@@ -798,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"बॅटरी आणि डेटा वापराच्या तपशीलांसाठी टॅप करा"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"मोबाइल डेटा बंद करायचा?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"अॅप परवानगी विनंती अस्पष्ट करत असल्याने, सेटिंग्ज तुमचा प्रतिसाद पडताळू शकत नाहीत."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> ला <xliff:g id="APP_2">%2$s</xliff:g> चे तुकडे दाखवण्याची अनुमती द्यायची का?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- ते <xliff:g id="APP">%1$s</xliff:g> ची माहिती वाचू शकते"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- ते <xliff:g id="APP">%1$s</xliff:g> मध्ये कृती करू शकते"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g> ला कुठल्याही अॅपमधील तुकडे दाखवण्याची अनुमती द्या"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"अनुमती द्या"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"नकार द्या"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index 399be8b..d2674ae 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Rumah"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Kebolehaksesan"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Putar skrin"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Ikhtisar"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Cari"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"buka kamera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Pilih reka letak tugas baharu"</string>
<string name="cancel" msgid="6442560571259935130">"Batal"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Butang zum keserasian."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Skrin zum lebih kecil kepada lebih besar."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth disambungkan."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Pendering senyap."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Mod kerja"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Ketepikan <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ditolak."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Semua aplikasi terbaharu diketepikan."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Peranti)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth Dimatikan"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Tiada peranti berpasangan tersedia"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> bateri"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Set Kepala"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Input"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Kecerahan"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Autoputar"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Autoputar skrin"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Menyambung..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Penambatan"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Tempat liputan"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Pemberitahuan"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Lampu suluh"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Data mudah alih"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> digunakan"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> had"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Amaran <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Mod kerja"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Cahaya Malam"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Dihidupkan pd senja"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Hingga matahari terbit"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Dihidupkan pada <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Hingga <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC dilumpuhkan"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC didayakan"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> dilumpuhkan dalam mod selamat."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Kosongkan semua"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Seret ke sini untuk menggunakan skrin pisah"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Mendatar Terpisah"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Menegak Terpisah"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Tersuai Terpisah"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Dengan kawalan pemberitahuan berkuasa, anda boleh menetapkan tahap kepentingan dari 0 hingga 5 untuk pemberitahuan apl. \n\n"<b>"Tahap 5"</b>" \n- Tunjukkan pada bahagian atas senarai pemberitahuan \n- Benarkan gangguan skrin penuh \n- Sentiasa intai \n\n"<b>"Tahap 4"</b>" \n- Halang gangguan skrin penuh \n- Sentiasa intai \n\n"<b>"Tahap 3"</b>" \n- Halang gangguan skrin penuh \n- Jangan intai \n\n"<b>"Tahap 2"</b>" \n- Halang gangguan skrin penuh \n- Jangan intai \n- Jangan berbunyi dan bergetar \n\n"<b>"Tahap 1"</b>" \n- Halang gangguan skrin penuh \n- Jangan intai \n- Jangan berbunyi atau bergetar \n- Sembunyikan daripada skrin kunci dan bar status \n- Tunjukkan di bahagian bawah senarai pemberitahuan \n\n"<b>"Tahap 0"</b>" \n- Sekat semua pemberitahuan daripada apl"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Pemberitahuan"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Anda tidak akan melihat pemberitahuan ini lagi"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Terus tunjukkan pemberitahuan ini?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Hentikan pemberitahuan"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Terus tunjukkan"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Papan Keratan"</item>
<item msgid="5742013440802239414">"Kod Kunci"</item>
<item msgid="8802889973626281575">"Penukar papan kekunci"</item>
- <item msgid="8175437057325747277">"Tiada"</item>
+ <item msgid="7095517796293767867">"Cadangan putaran"</item>
+ <item msgid="8494159969042135235">"Tiada"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Biasa"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Ketik untuk mendapatkan butiran tentang penggunaan kuasa bateri dan data"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Matikan data mudah alih?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Oleh sebab apl melindungi permintaan kebenaran, Tetapan tidak dapat mengesahkan jawapan anda."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Benarkan <xliff:g id="APP_0">%1$s</xliff:g> menunjukkan <xliff:g id="APP_2">%2$s</xliff:g> hirisan?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Hos hirisan boleh membaca maklumat daripada <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Hos hirisan boleh mengambil tindakan dalam <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Benarkan <xliff:g id="APP">%1$s</xliff:g> menunjukkan hirisan daripada mana-mana apl"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Benarkan"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Tolak"</string>
</resources>
diff --git a/packages/SystemUI/res/values-my/strings.xml b/packages/SystemUI/res/values-my/strings.xml
index ac6adb8..972f4ee 100644
--- a/packages/SystemUI/res/values-my/strings.xml
+++ b/packages/SystemUI/res/values-my/strings.xml
@@ -73,10 +73,10 @@
<string name="global_action_screenshot" msgid="8329831278085426283">"ဖန်သားပြင်ဓာတ်ပုံ"</string>
<string name="screenshot_saving_ticker" msgid="7403652894056693515">"ဖန်သားပြင်ဓါတ်ပုံသိမ်းစဉ်.."</string>
<string name="screenshot_saving_title" msgid="8242282144535555697">"ဖန်သားပြင်ဓါတ်ပုံရိုက်ခြင်းအား သိမ်းဆည်းပါမည်"</string>
- <string name="screenshot_saving_text" msgid="2545047868936087248">"ဖန်သားပြင်ဓါတ်ပုံကို သိမ်းနေသည်"</string>
+ <string name="screenshot_saving_text" msgid="2545047868936087248">"ဖန်သားပြင်ဓာတ်ပုံကို သိမ်းနေသည်"</string>
<string name="screenshot_saved_title" msgid="5637073968117370753">"ဖန်သားပြင်ဓာတ်ပုံကို သိမ်းပြီးပါပြီ"</string>
<string name="screenshot_saved_text" msgid="7574667448002050363">"ဖန်သားပြင်ဓာတ်ပုံကို ကြည့်ရန် တို့ပါ"</string>
- <string name="screenshot_failed_title" msgid="9096484883063264803">"ဖန်သားပြင်ဓါတ်ပုံ ရိုက်၍မရပါ"</string>
+ <string name="screenshot_failed_title" msgid="9096484883063264803">"ဖန်သားပြင်ဓာတ်ပုံ ရိုက်၍မရပါ"</string>
<string name="screenshot_failed_to_save_unknown_text" msgid="8844781948876286488">"ဖန်သားပြင်ဓာတ်ပုံကို သိမ်းရာတွင် ပြဿနာရှိနေသည်"</string>
<string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"သိုလှောင်ခန်းနေရာ အကန့်အသတ်ရှိသောကြောင့် ဖန်သားပြင်ဓာတ်ပုံကို သိမ်းဆည်း၍မရပါ"</string>
<string name="screenshot_failed_to_capture_text" msgid="173674476457581486">"ဖန်သားပြင်ဓာတ်ပုံရိုက်ကူးခြင်းကို ဤအက်ပ် သို့မဟုတ် သင်၏အဖွဲ့အစည်းက ခွင့်မပြုပါ"</string>
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"မျက်နှာပြင် လှည့်ရန်"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"ခြုံကြည့်မှု။"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"ရှာဖွေရန်"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"ကင်မရာ"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"ကင်မရာ ဖွင့်ရန်"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"အလုပ်သစ်စီစဥ်မှုကို ရွေးပါ။"</string>
<string name="cancel" msgid="6442560571259935130">"မလုပ်တော့"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"အံဝင်ခွင်ကျ ဇူးမ်ခလုတ်"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ဖန်သားပြင်ပေါ်တွင် အသေးမှအကြီးသို့ ဇူးမ်ဆွဲခြင်း"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"ဘလူးတုသ်ချိတ်ဆက်ထားမှု"</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"ဖုန်းမြည်သံပိတ်သည်။"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"အလုပ် မုဒ်"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> ကို ပယ်ရန်"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ထုတ်ထားသည်။"</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"မကြာသေးမီက အပလီကေးရှင်းများအားလုံး ဖယ်ထုတ်ပြီးပါပြီ။"</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"ဘလူးတုသ် (<xliff:g id="NUMBER">%d</xliff:g> စက်များ)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"ဘလူးတုသ် ပိတ်ထားရန်"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"ချိတ်တွဲထားသည့် ကိရိယာများ မရှိ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ဘက်ထရီ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"အသံ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"မိုက်ခွက်ပါနားကြပ်"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"အဝင်"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"အလင်းတောက်ပမှု"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"အော်တို-လည်"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"မျက်နှာပြင်အား အလိုအလျောက်လှည့်ခြင်း"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"ဆက်သွယ်နေ..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"တွဲချီပေးခြင်း"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"ဟော့စပေါ့"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"အကြောင်းကြားချက်များ"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"ဖလက်ရှ်မီး"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"မိုဘိုင်းဒေတာ"</string>
@@ -324,8 +339,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> သုံးထား"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> ကန့်သတ်ချက်"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> သတိပေးချက်"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"အလုပ် မုဒ်"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"အလုပ်ပရိုဖိုင်"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"အကြောင်းကြားချက်နှင့် အက်ပ်များကို ပိတ်ထားသည်"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"ညအလင်းရောင်"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"နေဝင်ချိန်၌ ဖွင့်ရန်"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"နေထွက်ချိန် အထိ"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g> တွင် ဖွင့်ရန်"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> အထိ"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC ကို ပိတ်ထားသည်"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC ကို ဖွင့်ထားသည်"</string>
@@ -338,6 +358,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> ကို ဘေးကင်းလုံခြုံသည့်မုဒ်တွင် ပိတ်ထားပါသည်။"</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"အားလုံး ဖယ်ရှားပါ"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"မျက်နှာပြင် ခွဲခြမ်းပြသခြင်းကို အသုံးပြုရန် ဤနေရာသို့ ပွတ်၍ဆွဲထည့်ပါ"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"အက်ပ်များကို ဖွင့်ရန် အပေါ်သို့ ပွတ်ဆွဲပါ"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"ရေပြင်ညီ ပိုင်းမည်"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"ဒေါင်လိုက်ပိုင်းမည်"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"စိတ်ကြိုက် ပိုင်းမည်"</string>
@@ -562,6 +583,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"ပါဝါအကြောင်းကြားချက် ထိန်းချုပ်မှုများကိုအသုံးပြုပြီး အက်ပ်တစ်ခု၏ အကြောင်းကြားချက် အရေးပါမှု ၀ မှ ၅ အထိသတ်မှတ်ပေးနိုင်သည်။ \n\n"<b>"အဆင့် ၅"</b>" \n- အကြောင်းကြားချက်စာရင်း၏ ထိပ်ဆုံးတွင် ပြသည် \n- မျက်နှာပြင်အပြည့် ကြားဖြတ်ဖော်ပြခြင်းကို ခွင့်ပြုသည် \n- အမြဲတမ်း ခေတ္တပြပါမည် \n\n"<b>"အဆင့် ၄"</b>" \n- မျက်နှာပြင်အပြည့် ကြားဖြတ်ဖော်ပြခြင်း မရှိစေရန် ကာကွယ်ပေးသည် \n- အမြဲတမ်း ခေတ္တပြပါမည် \n\n"<b>"အဆင့် ၃"</b>" \n- မျက်နှာပြင်အပြည့် ကြားဖြတ်ဖော်ပြခြင်း မရှိစေရန် ကာကွယ်ပေးသည် \n- ဘယ်တော့မှ ခေတ္တပြခြင်း မရှိပါ \n\n"<b>"အဆင့် ၂"</b>" \n- မျက်နှာပြင်အပြည့် ကြားဖြတ်ဖော်ပြခြင်း မရှိစေရန် ကာကွယ်ပေးသည် \n- ဘယ်တော့မှ ခေတ္တပြခြင်း မရှိပါ \n- အသံမြည်ခြင်းနှင့် တုန်ခါခြင်းများ ဘယ်တော့မှ မပြုလုပ်ပါ \n\n"<b>"အဆင့် ၁"</b>" \n- မျက်နှာပြင်အပြည့် ကြားဖြတ်ဖော်ပြခြင်း မရှိစေရန် ကာကွယ်ပေးသည် \n- ဘယ်တော့မှ ခေတ္တပြခြင်း မရှိပါ \n- အသံမြည်ခြင်းနှင့် တုန်ခါခြင်းများ ဘယ်တော့မှ မပြုလုပ်ပါ \n- လော့ခ်ချထားသည့် မျက်နှာပြင်နှင့် အခြေအနေဘားတန်းတို့တွင် မပြပါ \n- အကြောင်းကြားချက်စာရင်း အောက်ဆုံးတွင်ပြသည် \n\n"<b>"အဆင့် ၀"</b>" \n- အက်ပ်မှ အကြောင်းကြားချက်များ အားလုံးကို ပိတ်ဆို့သည်"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"အကြောင်းကြားချက်များ"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"ဤအကြောင်းကြားချက်များကို မြင်ရတော့မည် မဟုတ်ပါ"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"ဤအကြောင်းကြားချက်များကို ဆက်ပြလိုပါသလား။"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"အကြောင်းကြားချက်များကို ရပ်ရန်"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"ဆက်ပြရန်"</string>
@@ -656,7 +679,8 @@
<item msgid="1545641631806817203">"ကလစ်ဘုတ်"</item>
<item msgid="5742013440802239414">"ကီးကုဒ်"</item>
<item msgid="8802889973626281575">"ကီးဘုတ် ပြောင်းလဲပေးသည့်စနစ်"</item>
- <item msgid="8175437057325747277">"တစ်ခုမျှမရှိ"</item>
+ <item msgid="7095517796293767867">"လှည့်မှု အကြံပြုချက်"</item>
+ <item msgid="8494159969042135235">"တစ်ခုမျှမရှိ"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"ပုံမှန်"</item>
@@ -780,4 +804,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"ဘက်ထရီနှင့် ဒေတာအသုံးပြုမှု အသေးစိတ်ကို ကြည့်ရန် တို့ပါ"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"မိုဘိုင်းဒေတာကို ပိတ်လိုပါသလား။"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"အပလီကေးရှင်းတစ်ခုက ခွင့်ပြုချက်တောင်းခံမှုကို ပိတ်ထားသောကြောင့် ဆက်တင်များသည် သင်၏ လုပ်ဆောင်ကို တုံ့ပြန်နိုင်ခြင်းမရှိပါ။"</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> အား <xliff:g id="APP_2">%2$s</xliff:g> ၏အချပ်များ ပြသခွင့်ပြုပါသလား။"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- ၎င်းသည် <xliff:g id="APP">%1$s</xliff:g> မှ အချက်အလက်ကို ဖတ်နိုင်သည်"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- ၎င်းသည် <xliff:g id="APP">%1$s</xliff:g> အတွင်း လုပ်ဆောင်ချက်များ ပြုလုပ်နိုင်သည်"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"မည်သည့်အက်ပ်မဆိုမှ အချပ်များ ပြသရန်အတွက် <xliff:g id="APP">%1$s</xliff:g> ကို ခွင့်ပြုရန်"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"ခွင့်ပြုရန်"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"ငြင်းပယ်ရန်"</string>
</resources>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index 0e7447a..d4d6160 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Startside"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Meny"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Tilgjengelighet"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Rotér skjermen"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Oversikt"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Søk"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"åpne kamera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Velg en ny utforming for oppgaver"</string>
<string name="cancel" msgid="6442560571259935130">"Avbryt"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Zoomknapp for kompatibilitet."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom fra mindre til større skjerm."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth er tilkoblet."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Stille modus."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Arbeidsmodus"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Avvis <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> avvist."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Alle nylig brukte apper er avvist."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> enheter)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth er slått av"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Ingen sammenkoblede enheter er tilgjengelige"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> batteri"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Lyd"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Hodetelefoner"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Innenhet"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Lysstyrke"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Rotér automatisk"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Rotér skjermen automatisk"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Kobler til …"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Internettdeling"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Wi-Fi-sone"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Varsler"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Lommelykt"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobildata"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> brukt"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Grense på <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Advarsel for <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Arbeidsmodus"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Nattlys"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"På ved solnedgang"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Til soloppgang"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"På kl. <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Til <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC er slått av"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC er slått på"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> er slått av i sikker modus."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Tøm alt"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Dra hit for å bruke delt skjerm"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Del horisontalt"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Del vertikalt"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Del tilpasset"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Med effektive varselinnstillinger kan du angi viktighetsnivåer fra 0 til 5 for appvarsler. \n\n"<b>"Nivå 5"</b>" \n– Vis øverst på varsellisten \n– Tillat forstyrrelser ved fullskjermmodus \n– Vis alltid raskt \n\n"<b>"Nivå 4"</b>" \n– Forhindre forstyrrelser ved fullskjermmodus \n– Vis alltid raskt \n\n"<b>"Nivå 3"</b>" \n– Forhindre forstyrrelser ved fullskjermmodus \n– Vis aldri raskt \n\n"<b>"Nivå 2"</b>" \n– Forhindre forstyrrelser ved fullskjermmodus \n– Vis aldri fort \n– Tillat aldri lyder eller vibrering \n\n"<b>"Nivå 1"</b>" \n– Forhindre forstyrrelser ved fullskjermmodus \n– Vis aldri raskt \n– Tillat aldri lyder eller vibrering \n– Skjul fra låseskjermen og statusfeltet \n– Vis nederst på varsellisten \n\n"<b>"Nivå 0"</b>" \n– Blokkér alle varsler fra appen"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Varsler"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Du ser ikke disse varslene lenger"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Vil du fortsette å vise disse varslene?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Stopp varsler"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Fortsett å vise"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Utklippstavle"</item>
<item msgid="5742013440802239414">"Tastkode"</item>
<item msgid="8802889973626281575">"Bytteknapp for tastatur"</item>
- <item msgid="8175437057325747277">"Ingen"</item>
+ <item msgid="7095517796293767867">"Forslag til rotasjon"</item>
+ <item msgid="8494159969042135235">"Ingen"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Trykk for detaljer om batteri- og databruk"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Vil du slå av mobildata?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Fordi en app skjuler tillatelsesforespørselen, kan ikke Innstillinger bekrefte svaret ditt."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Vil du tillate at <xliff:g id="APP_0">%1$s</xliff:g> viser <xliff:g id="APP_2">%2$s</xliff:g>-utsnitt?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– Den kan lese informasjon fra <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– Den kan utføre handlinger i <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Tillat at <xliff:g id="APP">%1$s</xliff:g> viser utsnitt fra alle apper"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Tillat"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Avvis"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ne/strings.xml b/packages/SystemUI/res/values-ne/strings.xml
index 5814542..e3efe1b 100644
--- a/packages/SystemUI/res/values-ne/strings.xml
+++ b/packages/SystemUI/res/values-ne/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"स्क्रिन घुमाउनुहोस्"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"सारांश"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"खोज्नुहोस्"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"क्यामेरा"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"क्यामेरा खोल्नुहोस्"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"नयाँ कार्य लेआउट चयन गर्नुहोस्"</string>
<string name="cancel" msgid="6442560571259935130">"रद्द गर्नुहोस्"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"मिलाउने जुम बटन।"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"स्क्रिनलाई सानोबाट ठूलो पार्नुहोस्।"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"ब्लुटुथ जडान भयो।"</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"घन्टी मौन।"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"कार्य मोड"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> खारेज गर्नुहोस्।"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> खारेज गरिएको छ।"</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"सबै हालका अनुप्रयोगहरू खारेज गरियो।"</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"ब्लुटुथ (<xliff:g id="NUMBER">%d</xliff:g> उपकरणहरू)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"ब्लुटुथ बन्द"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"जोडी उपकरणहरू उपलब्ध छैन"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ब्याट्री"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"अडियो"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"हेडसेट"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"इनपुट"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"चमक"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"स्वतःघुम्ने"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"स्क्रिन स्वतःघुम्ने"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"जडान हुँदै..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"टेदर गर्दै"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"हटस्पट"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"अधिसूचनाहरू"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"फ्ल्यासलाइट"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"मोबाइल डेटा"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> प्रयोग गरियो"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> सीमा"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> चेतावनी दिँदै"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"कार्य मोड"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"रात्रिको प्रकाश"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"सूर्यास्तमा सक्रिय"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"सूर्योदयसम्म"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g> मा सक्रिय"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> सम्म"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC लाई असक्षम पारिएको छ"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC लाई सक्षम पारिएको छ"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> लाई सुरक्षित-मोडमा असक्षम गरिएको छ।"</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"सबै हटाउनुहोस्"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"विभाजित स्क्रिनको प्रयोग गर्नका लागि यहाँ तान्नुहोस्"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"तेर्सो रूपमा विभाजन गर्नुहोस्"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"ठाडो रूपमा विभाजन गर्नुहोस्"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"आफू अनुकूल विभाजन गर्नुहोस्"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"सशक्त सूचना नियन्त्रणहरू मार्फत तपाईं अनुप्रयाेगका सूचनाहरूका लागि ० देखि ५ सम्मको महत्व सम्बन्धी स्तर सेट गर्न सक्नुहुन्छ। \n\n"<b>"स्तर ५"</b>" \n- सूचनाको सूचीको माथिल्लो भागमा देखाउने \n- पूर्ण स्क्रिनमा अवरोधका लागि अनुमति दिने \n- सधैँ चियाउने \n\n"<b>"स्तर ४"</b>" \n- पूर्ण स्क्रिनमा अवरोधलाई रोक्ने \n- सधैँ चियाउने \n\n"<b>"स्तर ३"</b>" \n- पूर्ण स्क्रिनमा अवरोधलाई रोक्ने \n- कहिल्यै नचियाउने \n\n"<b>"स्तर २"</b>" \n- पूर्ण स्क्रिनमा अवरोधलाई रोक्ने \n- कहिल्यै नचियाउने \n- कहिल्यै पनि आवाज ननिकाल्ने र कम्पन नगर्ने \n\n"<b>"स्तर १"</b>" \n- पूर्ण स्क्रिनमा अवरोध रोक्ने \n- कहिल्यै नचियाउने \n- कहिल्यै पनि आवाज ननिकाल्ने वा कम्पन नगर्ने \n- लक स्क्रिन र वस्तुस्थिति पट्टीबाट लुकाउने \n- सूचनाको सूचीको तल्लो भागमा देखाउने \n\n"<b>"स्तर ०"</b>" \n- अनुप्रयोगका सबै सूचनाहरूलाई रोक्ने"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"सूचनाहरू"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"तपाईं अब उप्रान्त यी सूचनाहरू देख्नु हुने छैन"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"यी सूचनाहरू देखाउने क्रम जारी राख्ने हो?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"सूचनाहरू देखाउन छाड्नुहोस्"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"देखाउने क्रम जारी राख्नुहोस्"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"क्लिपबोर्ड"</item>
<item msgid="5742013440802239414">"किकोड"</item>
<item msgid="8802889973626281575">"किबोर्ड स्विचर"</item>
- <item msgid="8175437057325747277">"कुनै पनि होइन"</item>
+ <item msgid="7095517796293767867">"परिक्रमासम्बन्धी सुझाव"</item>
+ <item msgid="8494159969042135235">"कुनै पनि होइन"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"साधारण"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"ब्याट्री र डेटाका प्रयोग सम्बन्धी विवरणहरूका लागि ट्याप गर्नुहोस्"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"मोबाइल डेटा निष्क्रिय पार्ने हो?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"कुनै अनुप्रयोगको कारणले अनुमतिसम्बन्धी अनुरोध बुझ्न गाह्रो भइरहेकोले सेटिङहरूले तपाईंको प्रतिक्रिया प्रमाणित गर्न सक्दैनन्।"</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> लाई <xliff:g id="APP_2">%2$s</xliff:g> का स्लाइसहरू देखाउन अनुमति दिने हो?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- यसले <xliff:g id="APP">%1$s</xliff:g> बाट जानकारी पढ्न सक्छ"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- यसले <xliff:g id="APP">%1$s</xliff:g> भित्र कारबाही गर्न सक्छ"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"अन्य अनुप्रयोगबाट <xliff:g id="APP">%1$s</xliff:g> मा स्लाइसहरू देखाउन अनुमति दिनुहोस्"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"अनुमति दिनुहोस्"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"अस्वीकार गर्नु…"</string>
</resources>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 55a6cb88..896d156 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Homepage"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Toegankelijkheid"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Scherm draaien"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Overzicht"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Zoeken"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"camera openen"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Nieuwe taakindeling selecteren"</string>
<string name="cancel" msgid="6442560571259935130">"Annuleren"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Knop voor compatibiliteitszoom."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Kleiner scherm uitzoomen naar groter scherm."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth-verbinding ingesteld."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Belsoftware stil."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Werkmodus"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> sluiten."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> verwijderd."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Alle recente apps gesloten."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> apparaten)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth uit"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Geen gekoppelde apparaten beschikbaar"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> batterijniveau"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Headset"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Invoer"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Helderheid"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Automatisch draaien"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Scherm automatisch draaien"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Verbinding maken…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tethering"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Meldingen"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Zaklamp"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobiele data"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> gebruikt"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Limiet van <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Waarschuwing voor <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Werkmodus"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Nachtverlichting"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Aan bij zonsondergang"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Tot zonsopgang"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Aan om <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Tot <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC is uitgeschakeld"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC is ingeschakeld"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> is uitgeschakeld in de veilige modus"</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Alles wissen"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Sleep hier naartoe om het scherm te splitsen"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Horizontaal splitsen"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Verticaal splitsen"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Aangepast splitsen"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Met beheeropties voor meldingen met betrekking tot stroomverbruik kun je een belangrijkheidsniveau van 0 tot 5 instellen voor de meldingen van een app. \n\n"<b>"Niveau 5"</b>" \n- Boven aan de lijst met meldingen weergeven \n- Onderbreking op volledig scherm toestaan \n- Altijd korte weergave \n\n"<b>"Niveau 4"</b>" \n- Geen onderbreking op volledig scherm \n- Altijd korte weergave \n\n"<b>"Niveau 3"</b>" \n- Geen onderbreking op volledig scherm \n- Nooit korte weergave \n\n"<b>"Niveau 2"</b>" \n- Geen onderbreking op volledig scherm \n- Nooit korte weergave \n- Nooit geluid laten horen of trillen \n\n"<b>"Niveau 1"</b>" \n- Geen onderbreking op volledig scherm \n- Nooit korte weergave \n- Nooit geluid laten horen of trillen \n- Verbergen op vergrendelingsscherm en statusbalk \n- Onder aan de lijst met meldingen weergeven \n\n"<b>"Niveau 0"</b>" \n- Alle meldingen van de app blokkeren"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Meldingen"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Deze meldingen worden niet meer weergegeven"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Deze meldingen blijven weergeven?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Meldingen stoppen"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Blijven weergeven"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Klembord"</item>
<item msgid="5742013440802239414">"Toetscode"</item>
<item msgid="8802889973626281575">"Toetsenbordschakelaar"</item>
- <item msgid="8175437057325747277">"Geen"</item>
+ <item msgid="7095517796293767867">"Rotatiesuggestie"</item>
+ <item msgid="8494159969042135235">"Geen"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normaal"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Tik voor batterij- en datagebruik"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Mobiele data uitschakelen?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Aangezien een app een toestemmingsverzoek afdekt, kan Instellingen je reactie niet verifiëren."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> toestaan om segmenten van <xliff:g id="APP_2">%2$s</xliff:g> weer te geven?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Deze kan informatie lezen van <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Deze kan acties uitvoeren in <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g> toestaan om segmenten van apps weer te geven"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Toestaan"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Weigeren"</string>
</resources>
diff --git a/packages/SystemUI/res/values-pa/strings.xml b/packages/SystemUI/res/values-pa/strings.xml
index b65ce97..4e39106 100644
--- a/packages/SystemUI/res/values-pa/strings.xml
+++ b/packages/SystemUI/res/values-pa/strings.xml
@@ -33,13 +33,10 @@
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"ਜਾਰੀ"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"ਸੂਚਨਾਵਾਂ"</string>
<string name="battery_low_title" msgid="6456385927409742437">"ਬੈਟਰੀ ਘੱਟ ਹੈ"</string>
- <!-- no translation found for battery_low_title_hybrid (6268991275887381595) -->
- <skip />
+ <string name="battery_low_title_hybrid" msgid="6268991275887381595">"ਬੈਟਰੀ ਘੱਟ ਹੈ। ਬੈਟਰੀ ਸੇਵਰ ਚਾਲੂ ਕਰੋ"</string>
<string name="battery_low_percent_format" msgid="2900940511201380775">"<xliff:g id="PERCENTAGE">%s</xliff:g> ਬਾਕੀ"</string>
- <!-- no translation found for battery_low_percent_format_hybrid (6838677459286775617) -->
- <skip />
- <!-- no translation found for battery_low_percent_format_hybrid_short (9025795469949145586) -->
- <skip />
+ <string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"<xliff:g id="PERCENTAGE">%s</xliff:g> ਬਾਕੀ, ਤੁਹਾਡੀ ਵਰਤੋਂ ਦੇ ਆਧਾਰ \'ਤੇ ਲਗਭਗ <xliff:g id="TIME">%s</xliff:g> ਬਾਕੀ"</string>
+ <string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"<xliff:g id="PERCENTAGE">%s</xliff:g> ਬਾਕੀ, ਲਗਭਗ <xliff:g id="TIME">%s</xliff:g> ਬਾਕੀ"</string>
<string name="battery_low_percent_format_saver_started" msgid="7879389868952879166">"<xliff:g id="PERCENTAGE">%s</xliff:g> ਬਾਕੀ। ਬੈਟਰੀ ਸੇਵਰ ਚਾਲੂ ਹੈ।"</string>
<string name="invalid_charger" msgid="4549105996740522523">"USB ਚਾਰਜਿੰਗ ਸਮਰਥਿਤ ਨਹੀਂ ਹੈ।\nਕੇਵਲ ਸਪਲਾਈ ਕੀਤਾ ਚਾਰਜਰ ਵਰਤੋ।"</string>
<string name="invalid_charger_title" msgid="3515740382572798460">"USB ਚਾਰਜਿੰਗ ਸਮਰਥਿਤ ਨਹੀਂ ਹੈ।"</string>
@@ -73,22 +70,15 @@
<string name="usb_debugging_secondary_user_message" msgid="6067122453571699801">"The user currently signed in to this device can\'t turn on USB debugging. To use this feature, switch to the primary user."</string>
<string name="compat_mode_on" msgid="6623839244840638213">"ਸਕ੍ਰੀਨ ਭਰਨ ਲਈ ਜ਼ੂਮ ਕਰੋ"</string>
<string name="compat_mode_off" msgid="4434467572461327898">"ਸਕ੍ਰੀਨ ਭਰਨ ਲਈ ਸਟ੍ਰੈਚ ਕਰੋ"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"ਸਕ੍ਰੀਨਸ਼ਾਟ"</string>
<string name="screenshot_saving_ticker" msgid="7403652894056693515">"ਸਕ੍ਰੀਨਸ਼ਾਟ ਸੁਰੱਖਿਅਤ ਕਰ ਰਿਹਾ ਹੈ…"</string>
<string name="screenshot_saving_title" msgid="8242282144535555697">"ਸਕ੍ਰੀਨਸ਼ਾਟ ਸੁਰੱਖਿਅਤ ਕਰ ਰਿਹਾ ਹੈ…"</string>
- <!-- no translation found for screenshot_saving_text (2545047868936087248) -->
- <skip />
- <!-- no translation found for screenshot_saved_title (5637073968117370753) -->
- <skip />
- <!-- no translation found for screenshot_saved_text (7574667448002050363) -->
- <skip />
- <!-- no translation found for screenshot_failed_title (9096484883063264803) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_unknown_text (8844781948876286488) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_text (3041612585107107310) -->
- <skip />
+ <string name="screenshot_saving_text" msgid="2545047868936087248">"ਸਕ੍ਰੀਨਸ਼ਾਟ ਰੱਖਿਅਤ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ"</string>
+ <string name="screenshot_saved_title" msgid="5637073968117370753">"ਸਕ੍ਰੀਨਸ਼ਾਟ ਰੱਖਿਅਤ ਕੀਤਾ ਗਿਆ"</string>
+ <string name="screenshot_saved_text" msgid="7574667448002050363">"ਆਪਣਾ ਸਕ੍ਰੀਨਸ਼ਾਟ ਦੇਖਣ ਲਈ ਟੈਪ ਕਰੋ"</string>
+ <string name="screenshot_failed_title" msgid="9096484883063264803">"ਸਕ੍ਰੀਨਸ਼ਾਟ ਕੈਪਚਰ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ"</string>
+ <string name="screenshot_failed_to_save_unknown_text" msgid="8844781948876286488">"ਸਕ੍ਰੀਨਸ਼ਾਟ ਰੱਖਿਅਤ ਕਰਨ ਦੌਰਾਨ ਸਮੱਸਿਆ ਆਈ"</string>
+ <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"ਸੀਮਿਤ ਸਟੋਰੇਜ ਹੋਣ ਕਾਰਨ ਸਕ੍ਰੀਨਸ਼ਾਟ ਰੱਖਿਅਤ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ"</string>
<string name="screenshot_failed_to_capture_text" msgid="173674476457581486">"ਐਪ ਜਾਂ ਤੁਹਾਡੀ ਸੰਸਥਾ ਵੱਲੋਂ ਸਕ੍ਰੀਨਸ਼ਾਟ ਲੈਣ ਦੀ ਇਜਾਜ਼ਤ ਨਹੀਂ ਦਿੱਤੀ ਗਈ ਹੈ"</string>
<string name="usb_preference_title" msgid="6551050377388882787">"USB ਫਾਈਲ ਟ੍ਰਾਂਸਫਰ ਚੋਣਾਂ"</string>
<string name="use_mtp_button_title" msgid="4333504413563023626">"ਇੱਕ ਮੀਡੀਆ ਪਲੇਅਰ (MTP) ਦੇ ਤੌਰ ਤੇ ਮਾਊਂਟ ਕਰੋ"</string>
@@ -98,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"ਸਕ੍ਰੀਨ ਘੁਮਾਓ"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"ਰੂਪ-ਰੇਖਾ"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"ਖੋਜੋ"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"ਕੈਮਰਾ"</string>
@@ -112,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"ਕੈਮਰਾ ਖੋਲ੍ਹੋ"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"ਨਵਾਂ ਕੰਮ ਲੇਆਉਟ ਚੁਣੋ"</string>
<string name="cancel" msgid="6442560571259935130">"ਰੱਦ ਕਰੋ"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"ਅਨੁਰੂਪਤਾ ਜ਼ੂਮ ਬਟਨ।"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ਵੱਡੀ ਸਕ੍ਰੀਨ ਤੇ ਛੋਟਾ ਜ਼ੂਮ ਕਰੋ।"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth ਕਨੈਕਟ ਕੀਤੀ।"</string>
@@ -188,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"ਰਿੰਗਰ ਸਾਈਲੈਂਟ।"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"ਕੰਮ ਮੋਡ"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> ਨੂੰ ਖਾਰਜ ਕਰੋ।"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ਰੱਦ ਕੀਤਾ।"</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"ਸਾਰੀਆਂ ਹਾਲੀਆ ਐਪਲੀਕੇਸ਼ਨਾਂ ਰੱਦ ਕੀਤੀਆਂ।"</string>
@@ -285,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> ਡਿਵਾਈਸਾਂ)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth ਬੰਦ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"ਕੋਈ ਜੋੜਾਬੱਧ ਕੀਤੀਆਂ ਡੀਵਾਈਸਾਂ ਉਪਲਬਧ ਨਹੀਂ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ਬੈਟਰੀ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"ਆਡੀਓ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"ਹੈੱਡਸੈੱਟ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"ਇਨਪੁੱਟ"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"ਚਮਕ"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"ਆਟੋ-ਰੋਟੇਟ"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"ਸਕ੍ਰੀਨ ਨੂੰ ਆਪਣੇ ਆਪ ਘੁੰਮਾਓ"</string>
@@ -325,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"ਕਨੈਕਟ ਕਰ ਰਿਹਾ ਹੈ..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"ਟੈਦਰਿੰਗ"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"ਹੌਟਸਪੌਟ"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"ਸੂਚਨਾਵਾਂ"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"ਫਲੈਸ਼ਲਾਈਟ"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"ਮੋਬਾਈਲ ਡਾਟਾ"</string>
@@ -334,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> ਵਰਤਿਆ"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> ਸੀਮਾ"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> ਚਿਤਾਵਨੀ"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"ਕੰਮ ਮੋਡ"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"ਰਾਤਰੀ ਲਾਈਟ"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"ਸੂਰਜ ਛਿਪਣ \'ਤੇ ਚਾਲੂ"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"ਸੂਰਜ ਚੜ੍ਹਨ ਤੱਕ"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g> ਵਜੇ ਚਾਲੂ"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> ਤੱਕ"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC ਨੂੰ ਅਯੋਗ ਬਣਾਇਆ ਗਿਆ ਹੈ"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC ਨੂੰ ਯੋਗ ਬਣਾਇਆ ਗਿਆ ਹੈ"</string>
@@ -348,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> ਨੂੰ ਸੁਰੱਖਿਅਤ-ਮੋਡ ਵਿੱਚ ਅਯੋਗ ਬਣਾਇਆ ਗਿਆ ਹੈ।"</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"ਸਭ ਕਲੀਅਰ ਕਰੋ"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"ਸਪਲਿਟ ਸਕ੍ਰੀਨ ਦੀ ਵਰਤੋਂ ਕਰਨ ਲਈ ਇੱਥੇ ਘਸੀਟੋ"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"ਹੌਰੀਜ਼ੌਂਟਲ ਸਪਲਿਟ"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"ਵਰਟੀਕਲ ਸਪਲਿਟ"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"ਵਿਉਂਂਤੀ ਸਪਲਿਟ"</string>
@@ -571,27 +585,21 @@
<string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"ਬੰਦ"</string>
<string name="power_notification_controls_description" msgid="4372459941671353358">"ਪਾਵਰ ਸੂਚਨਾ ਕੰਟਰੋਲਾਂ ਨਾਲ, ਤੁਸੀਂ ਕਿਸੇ ਐਪ ਦੀਆਂ ਸੂਚਨਾਵਾਂ ਲਈ ਮਹੱਤਤਾ ਪੱਧਰ ਨੂੰ 0 ਤੋਂ 5 ਤੱਕ ਸੈੱਟ ਕਰ ਸਕਦੇ ਹੋ। \n\n"<b>"ਪੱਧਰ 5"</b>" \n- ਸੂਚਨਾ ਸੂਚੀ ਦੇ ਸਿਖਰ \'ਤੇ ਦਿਖਾਓ \n- ਪੂਰੀ ਸਕ੍ਰੀਨ ਰੁਕਾਵਟ ਦੀ ਆਗਿਆ ਦਿਓ \n- ਹਮੇਸ਼ਾਂ ਝਲਕ ਦਿਖਾਓ \n\n"<b>"ਪੱਧਰ 4"</b>" \n- ਪੂਰੀ ਸਕ੍ਰੀਨ ਰੁਕਾਵਟ ਨੂੰ ਰੋਕੋ \n- ਹਮੇਸ਼ਾਂ ਝਲਕ ਦਿਖਾਓ \n\n"<b>"ਪੱਧਰ 3"</b>" \n- ਪੂਰੀ ਸਕ੍ਰੀਨ ਰੁਕਾਵਟ ਨੂੰ ਰੋਕੋ \n- ਕਦੇ ਝਲਕ ਨਾ ਦਿਖਾਓ \n\n"<b>"ਪੱਧਰ 2"</b>" \n- ਪੂਰੀ ਸਕ੍ਰੀਨ ਰੁਕਾਵਟ ਨੂੰ ਰੋਕੋ \n- ਕਦੇ ਝਲਕ ਨਾ ਦਿਖਾਓ \n- ਕਦੇ ਵੀ ਧੁਨੀ ਜਾਂ ਥਰਥਰਾਹਟ ਨਾ ਕਰੋ \n\n"<b>"ਪੱਧਰ 1"</b>" \n- ਪੂਰੀ ਸਕ੍ਰੀਨ ਰੁਕਾਵਟ ਨੂੰ ਰੋਕੋ \n- ਕਦੇ ਝਲਕ ਨਾ ਦਿਖਾਓ \n- ਕਦੇ ਧੁਨੀ ਜਾਂ ਥਰਥਰਾਹਟ ਨਾ ਕਰੋ \n- ਲਾਕ ਸਕ੍ਰੀਨ ਅਤੇ ਸਥਿਤੀ ਪੱਟੀ ਤੋਂ ਲੁਕਾਓ \n- ਸੂਚਨਾ ਸੂਚੀ ਦੇ ਹੇਠਾਂ ਦਿਖਾਓ \n\n"<b>"ਪੱਧਰ 0"</b>" \n- ਐਪ ਤੋਂ ਸਾਰੀਆਂ ਸੂਚਨਾਵਾਂ ਨੂੰ ਬਲਾਕ ਕਰੋ"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"ਸੂਚਨਾਵਾਂ"</string>
- <!-- no translation found for notification_channel_disabled (344536703863700565) -->
+ <string name="notification_channel_disabled" msgid="344536703863700565">"ਤੁਹਾਨੂੰ ਹੁਣ ਇਹ ਸੂਚਨਾਵਾਂ ਦਿਖਾਈ ਨਹੀਂ ਦੇਣਗੀਆਂ"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
<skip />
- <!-- no translation found for inline_keep_showing (8945102997083836858) -->
- <skip />
- <!-- no translation found for inline_stop_button (4172980096860941033) -->
- <skip />
- <!-- no translation found for inline_keep_button (6665940297019018232) -->
- <skip />
- <!-- no translation found for inline_keep_showing_app (1723113469580031041) -->
- <skip />
- <!-- no translation found for notification_unblockable_desc (1037434112919403708) -->
- <skip />
+ <string name="inline_keep_showing" msgid="8945102997083836858">"ਕੀ ਇਨ੍ਹਾਂ ਸੂਚਨਾਵਾਂ ਨੂੰ ਦਿਖਾਉਣਾ ਜਾਰੀ ਰੱਖਣਾ ਹੈ?"</string>
+ <string name="inline_stop_button" msgid="4172980096860941033">"ਸੂਚਨਾਵਾਂ ਬੰਦ ਕਰੋ"</string>
+ <string name="inline_keep_button" msgid="6665940297019018232">"ਦਿਖਾਉਣਾ ਜਾਰੀ ਰੱਖੋ"</string>
+ <string name="inline_keep_showing_app" msgid="1723113469580031041">"ਕੀ ਇਸ ਐਪ ਤੋਂ ਸੂਚਨਾਵਾਂ ਨੂੰ ਦਿਖਾਉਣਾ ਜਾਰੀ ਰੱਖਣਾ ਹੈ?"</string>
+ <string name="notification_unblockable_desc" msgid="1037434112919403708">"ਇਨ੍ਹਾਂ ਸੂਚਨਾਵਾਂ ਨੂੰ ਬੰਦ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ"</string>
<string name="notification_channel_controls_opened_accessibility" msgid="6553950422055908113">"<xliff:g id="APP_NAME">%1$s</xliff:g> ਲਈ ਸੂਚਨਾ ਕੰਟਰੋਲਾਂ ਨੂੰ ਖੋਲ੍ਹਿਆ ਗਿਆ"</string>
<string name="notification_channel_controls_closed_accessibility" msgid="7521619812603693144">"<xliff:g id="APP_NAME">%1$s</xliff:g> ਲਈ ਸੂਚਨਾ ਕੰਟਰੋਲਾਂ ਨੂੰ ਬੰਦ ਕੀਤਾ ਗਿਆ"</string>
<string name="notification_channel_switch_accessibility" msgid="3420796005601900717">"ਇਸ ਚੈਨਲ ਤੋਂ ਸੂਚਨਾਵਾਂ ਨੂੰ ਇਜਾਜ਼ਤ ਦਿਓ"</string>
<string name="notification_more_settings" msgid="816306283396553571">"ਹੋਰ ਸੈਟਿੰਗਾਂ"</string>
- <!-- no translation found for notification_app_settings (420348114670768449) -->
- <skip />
+ <string name="notification_app_settings" msgid="420348114670768449">"ਵਿਉਂਤਬੱਧ ਕਰੋ"</string>
<string name="notification_done" msgid="5279426047273930175">"ਹੋ ਗਿਆ"</string>
- <!-- no translation found for inline_undo (558916737624706010) -->
- <skip />
+ <string name="inline_undo" msgid="558916737624706010">"ਅਣਕੀਤਾ ਕਰੋ"</string>
<string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
<string name="notification_menu_gear_description" msgid="2204480013726775108">"ਸੂਚਨਾ ਕੰਟਰੋਲ"</string>
<string name="notification_menu_snooze_description" msgid="3653669438131034525">"ਸੂਚਨਾ ਸਨੂਜ਼ ਵਿਕਲਪ"</string>
@@ -674,7 +682,8 @@
<item msgid="1545641631806817203">"ਕਲਿੱਪਬੋਰਡ"</item>
<item msgid="5742013440802239414">"ਕੀ-ਕੋਡ"</item>
<item msgid="8802889973626281575">"ਕੀ-ਬੋਰਡ ਸਵਿੱਚਰ"</item>
- <item msgid="8175437057325747277">"ਕੋਈ ਨਹੀਂ"</item>
+ <item msgid="7095517796293767867">"ਘੁਮਾਅ ਸੰਬੰਧੀ ਸੁਝਾਅ"</item>
+ <item msgid="8494159969042135235">"ਕੋਈ ਨਹੀਂ"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"ਸਧਾਰਨ"</item>
@@ -798,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"ਬੈਟਰੀ ਅਤੇ ਡਾਟਾ ਵਰਤੋਂ ਸਬੰਧੀ ਵੇਰਵਿਆਂ ਲਈ ਟੈਪ ਕਰੋ"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"ਮੋਬਾਈਲ ਡਾਟਾ ਬੰਦ ਕਰਨਾ ਹੈ?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"ਕਿਸੇ ਐਪ ਵੱਲੋਂ ਇਜਾਜ਼ਤ ਬੇਨਤੀ ਨੂੰ ਢਕੇ ਜਾਣ ਕਾਰਨ ਸੈਟਿੰਗਾਂ ਤੁਹਾਡੇ ਜਵਾਬ ਦੀ ਪੁਸ਼ਟੀ ਨਹੀਂ ਕਰ ਸਕਦੀਆਂ।"</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"ਕੀ <xliff:g id="APP_0">%1$s</xliff:g> ਨੂੰ <xliff:g id="APP_2">%2$s</xliff:g> ਦੇ ਹਿੱਸੇ ਦਿਖਾਉਣ ਦੇਣੇ ਹਨ?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- ਇਹ <xliff:g id="APP">%1$s</xliff:g> ਵਿੱਚੋਂ ਜਾਣਕਾਰੀ ਪੜ੍ਹ ਸਕਦਾ ਹੈ"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- ਇਸ <xliff:g id="APP">%1$s</xliff:g> ਦੇ ਅੰਦਰ ਕਾਰਵਾਈਆਂ ਕਰ ਸਕਦਾ ਹੈ"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g> ਨੂੰ ਕਿਸੇ ਵੀ ਐਪ ਵਿੱਚੋਂ ਹਿੱਸੇ ਦਿਖਾਉਣ ਦਿਓ"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"ਕਰਨ ਦਿਓ"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"ਅਸਵੀਕਾਰ ਕਰੋ"</string>
</resources>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 0c4b71e..d2a863a 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -90,6 +90,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Ekran główny"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Ułatwienia dostępu"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Obracanie ekranu"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Przegląd"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Szukaj"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Aparat"</string>
@@ -104,6 +105,12 @@
<string name="camera_label" msgid="7261107956054836961">"otwórz aparat"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Wybierz nowy układ zadań"</string>
<string name="cancel" msgid="6442560571259935130">"Anuluj"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Przycisk powiększenia na potrzeby zgodności."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Powiększa mniejszy ekran do większego."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth połączony."</string>
@@ -180,7 +187,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Dzwonek wyciszony."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Tryb pracy"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Usuń stąd <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g>: zamknięto."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Wszystkie ostatnie aplikacje zostały zamknięte."</string>
@@ -279,6 +287,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (urządzenia: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth wył."</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Brak dostępnych sparowanych urządzeń"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> naładowania baterii"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Dźwięk"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Zestaw słuchawkowy"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Wejście"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Jasność"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Autoobracanie"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Autoobracanie ekranu"</string>
@@ -319,6 +331,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Łączę..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Powiązanie"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Powiadomienia"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Latarka"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobilna transmisja danych"</string>
@@ -328,8 +343,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Wykorzystano <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Limit <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Ostrzeżenie: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Tryb pracy"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Podświetlenie nocne"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Włącz o zachodzie"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Do wschodu słońca"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Włącz o <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Do <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"Komunikacja NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"Komunikacja NFC jest wyłączona"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"Komunikacja NFC jest włączona"</string>
@@ -342,6 +364,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Aplikacja <xliff:g id="APP">%s</xliff:g> została wyłączona w trybie bezpiecznym."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Wyczyść wszystko"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Przeciągnij tutaj, by podzielić ekran"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Podziel poziomo"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Podziel pionowo"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Podziel niestandardowo"</string>
@@ -566,6 +590,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Dzięki zaawansowanym ustawieniom możesz określić poziom ważności powiadomień z aplikacji w skali od 0 do 5. \n\n"<b>"Poziom 5"</b>" \n– Pokazuj u góry listy powiadomień \n– Zezwalaj na powiadomienia na pełnym ekranie \n– Zawsze pokazuj podgląd \n\n"<b>"Poziom 4"</b>" \n– Wyłącz powiadomienia na pełnym ekranie \n– Zawsze pokazuj podgląd \n\n"<b>"Poziom 3"</b>" \n– Wyłącz powiadomienia na pełnym ekranie \n– Nigdy nie pokazuj podglądu \n\n"<b>"Poziom 2"</b>" \n– Wyłącz powiadomienia na pełnym ekranie \n– Nigdy nie pokazuj podglądu \n– NIgdy nie powiadamiaj dźwiękiem ani wibracjami \n\n"<b>"Poziom 1"</b>" \n– Wyłącz powiadomienia na pełnym ekranie \n– Nigdy nie pokazuj podglądu \n– NIgdy nie powiadamiaj dźwiękiem ani wibracjami \n– Ukrywaj na ekranie blokady i pasku stanu \n– Pokazuj u dołu listy powiadomień \n\n"<b>"Poziom 0"</b>" \n– Blokuj wszystkie powiadomienia aplikacji"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Powiadomienia"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Te powiadomienia nie będą już wyświetlane"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Nadal pokazywać te powiadomienia?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Zatrzymaj powiadomienia"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Pokazuj nadal"</string>
@@ -664,7 +690,8 @@
<item msgid="1545641631806817203">"Schowek"</item>
<item msgid="5742013440802239414">"Klawisz"</item>
<item msgid="8802889973626281575">"Przełączanie klawiatury"</item>
- <item msgid="8175437057325747277">"Brak"</item>
+ <item msgid="7095517796293767867">"Sugestia obrotu"</item>
+ <item msgid="8494159969042135235">"Brak"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normalny"</item>
@@ -788,4 +815,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Kliknij, by wyświetlić szczegóły wykorzystania baterii i użycia danych"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Wyłączyć mobilną transmisję danych?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Aplikacja Ustawienia nie może zweryfikować Twojej odpowiedzi, ponieważ inna aplikacja zasłania prośbę o udzielenie uprawnień."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Zezwolić aplikacji <xliff:g id="APP_0">%1$s</xliff:g> na pokazywanie wycinków z aplikacji <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Może odczytywać informacje z aplikacji <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Może wykonywać działania w aplikacji <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Zezwalaj aplikacji <xliff:g id="APP">%1$s</xliff:g> na pokazywanie wycinków z dowolnych aplikacji"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Zezwól"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Odmów"</string>
</resources>
diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml
index 5fb7b19..3472d1d 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Página inicial"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Acessibilidade"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Girar a tela"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Visão geral"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Pesquisar"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Câmera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"abrir câmera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Selecionar novo layout da tarefa"</string>
<string name="cancel" msgid="6442560571259935130">"Cancelar"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Botão de zoom da compatibilidade."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Aumentar a tela com zoom."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth conectado."</string>
@@ -180,7 +187,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Campainha silenciosa."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Modo de trabalho"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Descartar <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> descartado."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Todos os apps recentes foram dispensados."</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispositivos)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth desativado"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Não há dispositivos pareados disponíveis"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Bateria: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Áudio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Fone de ouvido"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Entrada"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brilho"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Girar automaticamente"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Girar tela automaticamente"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Conectando..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tethering"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Ponto de acesso"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notificações"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Lanterna"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Dados móveis"</string>
@@ -326,8 +341,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Usados: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Limite: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Aviso de <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Modo de trabalho"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"Perfil de trabalho"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"As notificações e os apps estão desativados"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Modo noturno"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Ativ. ao pôr do sol"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Até o nascer do sol"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Ativado às <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Até <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"A NFC está desativada"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"A NFC está ativada"</string>
@@ -340,6 +360,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"O app <xliff:g id="APP">%s</xliff:g> está desativado no modo de segurança."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Limpar tudo"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Arraste aqui para usar a tela dividida"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Deslize para cima para alternar entre os apps"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Divisão horizontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Divisão vertical"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Divisão personalizada"</string>
@@ -564,6 +585,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Com controles de ativação de notificações, é possível definir o nível de importância de 0 a 5 para as notificações de um app. \n\n"<b>"Nível 5"</b>" \n- Exibir na parte superior da lista de notificações \n- Permitir interrupção em tela cheia \n- Sempre exibir \n\n"<b>"Nível 4"</b>" \n- Impedir interrupções em tela cheia \n- Sempre exibir \n\n"<b>"Nível 3"</b>" \n- Impedir interrupções em tela cheia \n- Nunca exibir \n\n"<b>"Nível 2"</b>" \n- Impedir interrupções em tela cheia \n- Nunca exibir \n- Nunca emitir som ou vibrar \n\n"<b>"Nível 1"</b>" \n- Impedir interrupções em tela cheia \n- Nunca exibir \n- Nunca emitir som ou vibrar \n- Ocultar da tela de bloqueio e barra de status \n- Exibir na parte inferior da lista de notificações \n\n"<b>"Nível 0"</b>" \n- Bloquear todas as notificações do app"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notificações"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Você deixará de ver essas notificações"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Continuar mostrando essas notificações?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Bloquear notificações"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Continuar mostrando"</string>
@@ -658,7 +681,8 @@
<item msgid="1545641631806817203">"Área de transferência"</item>
<item msgid="5742013440802239414">"Código de tecla"</item>
<item msgid="8802889973626281575">"Alternador de teclado"</item>
- <item msgid="8175437057325747277">"Nenhum"</item>
+ <item msgid="7095517796293767867">"Sugestão de rotação"</item>
+ <item msgid="8494159969042135235">"Nenhum"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -782,4 +806,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Tocar para ver detalhes sobre a bateria e o uso de dados"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Desativar os dados móveis?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Como um app está ocultando uma solicitação de permissão, as configurações não podem verificar sua resposta."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Permitir que <xliff:g id="APP_0">%1$s</xliff:g> mostre partes do app <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Pode ler informações do app <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Pode realizar ações no app <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Permitir que <xliff:g id="APP">%1$s</xliff:g> mostre partes de qualquer app"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Permitir"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Negar"</string>
</resources>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index 23a2f988..a631fcc 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Página inicial"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Acessibilidade"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Rodar ecrã"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Visão geral"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Pesquisar"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Câmara"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"abrir câmara"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Selecionar novo esquema de tarefa"</string>
<string name="cancel" msgid="6442560571259935130">"Cancelar"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Botão zoom de compatibilidade."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom menor para ecrã maior."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth ligado."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Campainha em silêncio."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Modo de trabalho"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Ignorar <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ignorado."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Todas as aplicações recentes foram ignoradas."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Dispositivos)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth desat."</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Sem dispositivos sincronizados disponíveis"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> de bateria"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Áudio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Ausc. c/ mic. integ."</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Entrada"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brilho"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Rotação automática"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Rodar o ecrã automaticamente"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"A ligar..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Associação"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Zona Wi-Fi"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notificações"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Lanterna"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Dados móveis"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> utilizado(s)"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Limite de <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Aviso de <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Modo de trabalho"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Luz noturna"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Ativ. ao pôr-do-sol"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Até ao nascer do sol"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Ativada à(s) <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Até à(s) <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"O NFC está desativado"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"O NFC está ativado"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"O <xliff:g id="APP">%s</xliff:g> está desativado no modo de segurança."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Limpar tudo"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Arraste aqui para utilizar o ecrã dividido"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Divisão horizontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Divisão vertical"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Divisão personalizada"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Com os controlos de notificações do consumo de energia, pode definir um nível de importância de 0 a 5 para as notificações de aplicações. \n\n"<b>"Nível 5"</b>" \n- Mostrar no início da lista de notificações \n- Permitir a interrupção do ecrã inteiro \n- Aparecer rapidamente sempre \n\n"<b>"Nível 4"</b>" \n- Impedir a interrupção do ecrã inteiro \n- Aparecer rapidamente sempre\n\n"<b>"Nível 3"</b>" \n- Impedir a interrupção do ecrã inteiro \n- Nunca aparecer rapidamente \n\n"<b>"Nível 2"</b>" \n- Impedir a interrupção do ecrã inteiro \n- Nunca aparecer rapidamente \n- Nunca tocar nem vibrar \n\n"<b>"Nível 1"</b>" \n- Impedir a interrupção do ecrã inteiro \n- Nunca aparecer rapidamente \n- Nunca tocar nem vibrar \n- Ocultar do ecrã de bloqueio e da barra de estado \n- Mostrar no fim da lista de notificações \n\n"<b>"Nível 0"</b>" \n- Bloquear todas as notificações da aplicação"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notificações"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Nunca mais verá estas notificações."</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Pretende continuar a ver estas notificações?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Parar notificações"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Continuar a mostrar"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Área de transferência"</item>
<item msgid="5742013440802239414">"Código de tecla"</item>
<item msgid="8802889973626281575">"Comutador de teclado"</item>
- <item msgid="8175437057325747277">"Nenhum"</item>
+ <item msgid="7095517796293767867">"Sugestão de rotação"</item>
+ <item msgid="8494159969042135235">"Nenhum"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Toque para obter detalhes acerca da utilização da bateria e dos dados"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Pretende desativar os dados móveis?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Uma vez que uma aplicação está a ocultar um pedido de autorização, as Definições não conseguem validar a sua resposta."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Pretende permitir que a aplicação <xliff:g id="APP_0">%1$s</xliff:g> mostre partes da aplicação <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Pode ler informações da aplicação <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Pode realizar ações na aplicação <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Permitir que a aplicação <xliff:g id="APP">%1$s</xliff:g> mostre partes de qualquer aplicação"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Permitir"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Recusar"</string>
</resources>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 5fb7b19..3472d1d 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Página inicial"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Acessibilidade"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Girar a tela"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Visão geral"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Pesquisar"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Câmera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"abrir câmera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Selecionar novo layout da tarefa"</string>
<string name="cancel" msgid="6442560571259935130">"Cancelar"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Botão de zoom da compatibilidade."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Aumentar a tela com zoom."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth conectado."</string>
@@ -180,7 +187,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Campainha silenciosa."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Modo de trabalho"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Descartar <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> descartado."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Todos os apps recentes foram dispensados."</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispositivos)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth desativado"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Não há dispositivos pareados disponíveis"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Bateria: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Áudio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Fone de ouvido"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Entrada"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brilho"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Girar automaticamente"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Girar tela automaticamente"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Conectando..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tethering"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Ponto de acesso"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notificações"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Lanterna"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Dados móveis"</string>
@@ -326,8 +341,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Usados: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Limite: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Aviso de <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Modo de trabalho"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"Perfil de trabalho"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"As notificações e os apps estão desativados"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Modo noturno"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Ativ. ao pôr do sol"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Até o nascer do sol"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Ativado às <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Até <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"A NFC está desativada"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"A NFC está ativada"</string>
@@ -340,6 +360,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"O app <xliff:g id="APP">%s</xliff:g> está desativado no modo de segurança."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Limpar tudo"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Arraste aqui para usar a tela dividida"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Deslize para cima para alternar entre os apps"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Divisão horizontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Divisão vertical"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Divisão personalizada"</string>
@@ -564,6 +585,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Com controles de ativação de notificações, é possível definir o nível de importância de 0 a 5 para as notificações de um app. \n\n"<b>"Nível 5"</b>" \n- Exibir na parte superior da lista de notificações \n- Permitir interrupção em tela cheia \n- Sempre exibir \n\n"<b>"Nível 4"</b>" \n- Impedir interrupções em tela cheia \n- Sempre exibir \n\n"<b>"Nível 3"</b>" \n- Impedir interrupções em tela cheia \n- Nunca exibir \n\n"<b>"Nível 2"</b>" \n- Impedir interrupções em tela cheia \n- Nunca exibir \n- Nunca emitir som ou vibrar \n\n"<b>"Nível 1"</b>" \n- Impedir interrupções em tela cheia \n- Nunca exibir \n- Nunca emitir som ou vibrar \n- Ocultar da tela de bloqueio e barra de status \n- Exibir na parte inferior da lista de notificações \n\n"<b>"Nível 0"</b>" \n- Bloquear todas as notificações do app"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notificações"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Você deixará de ver essas notificações"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Continuar mostrando essas notificações?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Bloquear notificações"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Continuar mostrando"</string>
@@ -658,7 +681,8 @@
<item msgid="1545641631806817203">"Área de transferência"</item>
<item msgid="5742013440802239414">"Código de tecla"</item>
<item msgid="8802889973626281575">"Alternador de teclado"</item>
- <item msgid="8175437057325747277">"Nenhum"</item>
+ <item msgid="7095517796293767867">"Sugestão de rotação"</item>
+ <item msgid="8494159969042135235">"Nenhum"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -782,4 +806,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Tocar para ver detalhes sobre a bateria e o uso de dados"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Desativar os dados móveis?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Como um app está ocultando uma solicitação de permissão, as configurações não podem verificar sua resposta."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Permitir que <xliff:g id="APP_0">%1$s</xliff:g> mostre partes do app <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Pode ler informações do app <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Pode realizar ações no app <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Permitir que <xliff:g id="APP">%1$s</xliff:g> mostre partes de qualquer app"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Permitir"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Negar"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index f30f6d3..58b6b75 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -89,6 +89,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Ecranul de pornire"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Meniu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Accesibilitate"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Rotiți ecranul"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Vizualizare generală"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Căutați"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Cameră foto"</string>
@@ -103,6 +104,12 @@
<string name="camera_label" msgid="7261107956054836961">"deschideți camera foto"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Selectați noul aspect pentru activitate"</string>
<string name="cancel" msgid="6442560571259935130">"Anulați"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Buton zoom pentru compatibilitate."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Faceți zoom de la o imagine mai mică la una mai mare."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Conectat prin Bluetooth."</string>
@@ -181,7 +188,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Sonerie silențioasă."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Modul de lucru"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Închideți <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> a fost eliminată."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Toate aplicațiile recente au fost închise."</string>
@@ -279,6 +287,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> dispozitive)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth dezactivat"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Niciun dispozitiv conectat disponibil"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Nivelul bateriei: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Căști"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Intrare"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Luminozitate"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Rotire automată"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Rotirea automată a ecranului"</string>
@@ -319,6 +331,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Se conectează..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tethering"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Notificări"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Lanternă"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Date mobile"</string>
@@ -328,8 +343,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> utilizați"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Limită de <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Avertizare: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Modul de lucru"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"Profil de serviciu"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"Notificările și aplicațiile sunt dezactivate"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Lumină de noapte"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Activată la apus"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Până la răsărit"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Activată la <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Până la <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"Serviciul NFC este dezactivat"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"Serviciul NFC este activat"</string>
@@ -342,6 +362,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Aplicația <xliff:g id="APP">%s</xliff:g> este dezactivată în modul sigur."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Ștergeți tot"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Trageți aici pentru a folosi ecranul împărțit"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Glisați în sus pentru a comuta între aplicații"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Divizare pe orizontală"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Divizare pe verticală"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Divizare personalizată"</string>
@@ -566,6 +587,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Folosind comenzile de gestionare a notificărilor, puteți să setați un nivel de importanță de la 0 la 5 pentru notificările unei aplicații. \n\n"<b>"Nivelul 5"</b>" \n– Se afișează la începutul listei de notificări \n– Se permite întreruperea pe ecranul complet \n– Se afișează întotdeauna scurt \n\n"<b>"Nivelul 4"</b>" \n– Se împiedică întreruperea pe ecranul complet \n– Se afișează întotdeauna scurt \n\n"<b>"Nivelul 3"</b>" \n– Se împiedică întreruperea pe ecranul complet \n– Nu se afișează niciodată scurt \n\n"<b>"Nivelul 2"</b>" \n– Se împiedică întreruperea pe ecranul complet \n– Nu se afișează niciodată scurt \n– Nu se emit sunete și nu vibrează niciodată \n\n"<b>"Nivelul 1"</b>" \n– Se împiedică întreruperea pe ecranul complet \n– Nu se afișează niciodată scurt \n– Nu se emit sunete și nu vibrează niciodată \n– Se ascunde în ecranul de blocare și în bara de stare \n– Se afișează la finalul listei de notificări \n\n"<b>"Nivelul 0"</b>" \n– Se blochează toate notificările din aplicație"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Notificări"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Nu veți mai vedea aceste notificări"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Doriți să continuați afișarea acestor notificări?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Opriți notificările"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Continuați afișarea"</string>
@@ -662,7 +685,8 @@
<item msgid="1545641631806817203">"Clipboard"</item>
<item msgid="5742013440802239414">"Cod de tastă"</item>
<item msgid="8802889973626281575">"Comutator tastatură"</item>
- <item msgid="8175437057325747277">"Niciunul"</item>
+ <item msgid="7095517796293767867">"Sugestie de rotire"</item>
+ <item msgid="8494159969042135235">"Niciunul"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -786,4 +810,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Atingeți pentru mai multe detalii privind bateria și utilizarea datelor"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Dezactivați datele mobile?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Deoarece o aplicație acoperă o solicitare de permisiune, Setările nu vă pot verifica răspunsul."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Permiteți <xliff:g id="APP_0">%1$s</xliff:g> să afișeze porțiuni din <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Poate citi informații din <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Poate efectua acțiuni în <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Permiteți <xliff:g id="APP">%1$s</xliff:g> să afișeze porțiuni din orice aplicație"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Permiteți"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Refuzați"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 4be72ed..3bda5eb 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -90,6 +90,7 @@
<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_rotate_button" msgid="7402949513740253006">"Поворот экрана"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Обзор."</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Поиск"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -104,6 +105,12 @@
<string name="camera_label" msgid="7261107956054836961">"Открыть камеру."</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Выберите другой макет"</string>
<string name="cancel" msgid="6442560571259935130">"Отмена"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Кнопка масштабирования (режим совместимости)"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Уменьшение изображения для увеличения свободного места на экране."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth-соединение установлено."</string>
@@ -182,7 +189,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Беззвучный режим."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Рабочий режим"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Удаление приложения <xliff:g id="APP">%s</xliff:g> из списка."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Приложение \"<xliff:g id="APP">%s</xliff:g>\" удалено из списка."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Все недавние приложения закрыты."</string>
@@ -281,6 +289,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth выкл."</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Нет доступных сопряженных устройств"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Уровень заряда: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Аудиоустройство"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Гарнитура"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Устройство ввода"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Яркость"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Автоповорот"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Автоповорот экрана"</string>
@@ -321,6 +333,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Соединение..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Режим модема"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Точка доступа"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Уведомления"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Фонарик"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Мобильный Интернет"</string>
@@ -330,8 +345,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Использовано: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Ограничение: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Предупреждение: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Рабочий режим"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Ночной режим"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Включить на закате"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"До рассвета"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Включить в <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"До <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"Модуль NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"Модуль NFC отключен"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"Модуль NFC включен"</string>
@@ -344,6 +366,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Приложение \"<xliff:g id="APP">%s</xliff:g>\" отключено в безопасном режиме."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Очистить все"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Перетащите сюда, чтобы разделить экран"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Разделить по горизонтали"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Разделить по вертикали"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Разделить по-другому"</string>
@@ -568,6 +592,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"С помощью этой функции вы можете устанавливать уровень важности уведомлений от 0 до 5 для каждого приложения.\n\n"<b>"Уровень 5"</b>\n"‒ Помещать уведомления в начало списка.\n‒ Показывать полноэкранные уведомления.\n‒ Показывать всплывающие уведомления.\nУровень 4\n"<b></b>\n"‒ Не показывать полноэкранные уведомления.\n‒ Показывать всплывающие уведомления.\nУровень 3\n"<b></b>\n"‒ Не показывать полноэкранные уведомления.\n‒ Не показывать всплывающие уведомления.\nУровень 2\n"<b></b>\n"‒ Не показывать полноэкранные уведомления.\n‒ Не показывать всплывающие уведомления.\n‒ Не использовать звук и вибрацию.\nУровень 1\n"<b></b>\n"‒ Не показывать полноэкранные уведомления.\n‒ Не показывать всплывающие уведомления.\n‒ Не использовать звук и вибрацию.\n‒ Не показывать на экране блокировки и в строке состояния.\n‒ Помещать уведомления в конец списка.\nУровень 0\n"<b></b>\n"‒ Блокировать все уведомления приложения."</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Уведомления"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Вы больше не будете получать эти уведомления."</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Показывать эти уведомления?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Отключить уведомления"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Показывать"</string>
@@ -666,7 +692,8 @@
<item msgid="1545641631806817203">"Буфер обмена"</item>
<item msgid="5742013440802239414">"Код клавиши"</item>
<item msgid="8802889973626281575">"Переключение раскладки"</item>
- <item msgid="8175437057325747277">"Нет"</item>
+ <item msgid="7095517796293767867">"Поворот"</item>
+ <item msgid="8494159969042135235">"Нет"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Обычная"</item>
@@ -790,4 +817,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Нажмите, чтобы проверить энергопотребление и трафик"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Отключить мобильный Интернет?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Невозможно принять ваше согласие, поскольку запрос скрыт другим приложением."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Разрешить приложению \"<xliff:g id="APP_0">%1$s</xliff:g>\" показывать фрагменты приложения \"<xliff:g id="APP_2">%2$s</xliff:g>\"?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– Ему станут доступны данные из приложения \"<xliff:g id="APP">%1$s</xliff:g>\"."</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– Оно сможет совершать действия в приложении \"<xliff:g id="APP">%1$s</xliff:g>\"."</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Разрешить приложению \"<xliff:g id="APP">%1$s</xliff:g>\" показывать фрагменты других приложений"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Да"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Нет"</string>
</resources>
diff --git a/packages/SystemUI/res/values-si/strings.xml b/packages/SystemUI/res/values-si/strings.xml
index f072b73..8c9208b 100644
--- a/packages/SystemUI/res/values-si/strings.xml
+++ b/packages/SystemUI/res/values-si/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"තිරය කරකවන්න"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"දළ විශ්ලේෂණය"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"සොයන්න"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"කැමරාව"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"කැමරාව විවෘත කරන්න"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"නව කාර්යය සැකැස්ම තෝරන්න"</string>
<string name="cancel" msgid="6442560571259935130">"අවලංගු කරන්න"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"ගැළපෙන විශාලන බොත්තම."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"විශාල තිරය වෙත කුඩාව විශාලනය කරන්න."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"බ්ලූටූත් සම්බන්ධිතයි."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"හඬ නඟනය නිශ්ශබ්දයි."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"වැඩ ප්රකාරය"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> ඉවතලන්න."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> අස් කර ඇත."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"සියලුම මෑත යෙඳුම් අස් කරන ලදි."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"බ්ලූටූත් (උපාංග <xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"බ්ලූටූත් අක්රියයි"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"යුගල කළ උපාංග නොතිබේ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"බැටරිය <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"ශ්රව්ය"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"හෙඩ්සෙටය"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"ආදානය"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"දීප්තිය"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"ස්වයංක්රීය කරකැවීම"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"ස්වයංක්රීයව-භ්රමණය වන තිරය"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"සම්බන්ධ වෙමින්..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"ටෙදරින්"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"හොට්ස්පොට්"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"දැනුම්දීම්"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"සැණෙළි ආලෝකය"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"ජංගම දත්ත"</string>
@@ -324,8 +339,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> භාවිතා කර තිබේ"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> සීමිත"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> අවවාද කිරීම"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"වැඩ ප්රකාරය"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"කාර්යාල පැතිකඩ"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"දැනුම්දීම් සහ යෙදුම් ක්රියාවිරහිතයි"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"රාත්රී ආලෝකය"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"හිරු බැසීමේදී ක්රි."</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"හිරු නගින තෙක්"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g>ට ක්රියාත්මකයි"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> තෙක්"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC අබලයි"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC සබලයි"</string>
@@ -338,6 +358,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> ආරක්ෂිත ප්රකාරය තුළ අබලයි."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"සියල්ල හිස් කරන්න"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"බෙදුම් තිරය භාවිත කිරීමට මෙතැනට අදින්න"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"යෙදුම් මාරු කිරීමට ස්වයිප් කරන්න"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"තිරස්ව වෙන් කරන්න"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"සිරස්ව වෙන් කරන්න"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"අභිමත ලෙස වෙන් කරන්න"</string>
@@ -562,6 +583,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"බල දැනුම්දීම් පාලන සමගින්, ඔබට යෙදුමක දැනුම්දීම් සඳහා වැදගත්කම 0 සිට 5 දක්වා සැකසිය හැකිය. \n\n"<b>"5 මට්ටම"</b>" \n- දැනුම්දීම් ලැයිස්තුවේ ඉහළින්ම පෙන්වන්න \n- පූර්ණ තිර බාධාවට ඉඩ දෙන්න \n- සැම විට එබී බලන්න \n\n"<b>"4 මට්ටම"</b>" \n- පූර්ණ තිර බාධාව වළක්වන්න \n- සැම විට එබී බලන්න \n\n"<b>"3 මට්ටම"</b>" \n- පූර්ණ තිර බාධාව වළක්වන්න \n- කිසි විටක එබී නොබලන්න \n\n"<b>"2 මට්ටම"</b>" \n- පූර්ණ තිර බාධාව වළක්වන්න \n- කිසි විටක එබී නොබලන්න \n- කිසි විටක හඬ සහ කම්පනය සිදු නොකරන්න \n\n"<b>"1 මට්ටම"</b>" \n- පූර්ණ තිර බාධාව වළක්වන්න \n- කිසි විටක එබී නොබලන්න \n- කිසි විටක හඬ සහ කම්පනය සිදු නොකරන්න \n- අගුලු තිරය සහ තත්ත්ව තීරුව වෙතින් සඟවන්න \n- දැනුම්දීම් ලැයිස්තුවේ පහළින්ම පෙන්වන්න \n\n"<b>"0 මට්ටම"</b>" \n- යෙදුම වෙතින් වන සියලු දැනුම් දීම් සඟවන්න."</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"දැනුම් දීම්"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"ඔබට තවදුරටත් මෙම දැනුම්දීම් නොදකිනු ඇත"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"මෙම දැනුම්දීම් පෙන්වමින් තබන්නද?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"දැනුම්දීම් නවත්වන්න"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"පෙන්වමින් තබන්න"</string>
@@ -656,7 +679,8 @@
<item msgid="1545641631806817203">"පසුරු පුවරුව"</item>
<item msgid="5742013440802239414">"යතුරු කේතය"</item>
<item msgid="8802889973626281575">"යතුරු පුවරු මාරුව"</item>
- <item msgid="8175437057325747277">"කිසිවක් නැත"</item>
+ <item msgid="7095517796293767867">"කැරකීමේ යෝජනාව"</item>
+ <item msgid="8494159969042135235">"කිසිවක් නැත"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"සාමාන්ය"</item>
@@ -780,4 +804,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"බැටරි හා දත්ත භාවිතය පිළිබඳව විස්තර සඳහා තට්ටු කරන්න"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"ජංගම දත්ත ක්රියාවිරහිත කරන්නද?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"යෙදුමක් අවසර ඉල්ලීමක් කරන නිසා, සැකසීම්වලට ඔබගේ ප්රතිචාරය සත්යාපනය කළ නොහැකිය."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> හට කොටස් <xliff:g id="APP_2">%2$s</xliff:g>ක් පෙන්වීමට ඉඩ දෙන්නද?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- එයට <xliff:g id="APP">%1$s</xliff:g> වෙතින් තොරතුරු කියවිය හැකිය"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- එයට <xliff:g id="APP">%1$s</xliff:g> ඇතුළත ක්රියාමාර්ග ගත හැකිය"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"ඕනෑම යෙදුමකින් කොටස් පෙන්වීමට <xliff:g id="APP">%1$s</xliff:g> හට ඉඩ දෙන්න"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"ඉඩ දෙන්න"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"ප්රතික්ෂේප කර."</string>
</resources>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 618c950..e9b4e9f 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -90,6 +90,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Plocha"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Dostupnosť"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Otočenie obrazovky"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Prehľad"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Hľadať"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparát"</string>
@@ -104,6 +105,12 @@
<string name="camera_label" msgid="7261107956054836961">"spustiť fotoaparát"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Vyberte nové rozloženie úlohy"</string>
<string name="cancel" msgid="6442560571259935130">"Zrušiť"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Tlačidlo úpravy veľkosti z dôvodu kompatibility."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zväčšiť menší obrázok na väčšiu obrazovku."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth pripojené."</string>
@@ -182,7 +189,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Tiché zvonenie."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Pracovný režim"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Zavrieť aplikáciu <xliff:g id="APP">%s</xliff:g>"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Aplikácia <xliff:g id="APP">%s</xliff:g> bola zrušená."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Všetky nedávne aplikácie boli odmietnuté."</string>
@@ -281,6 +289,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Rozhranie Bluetooth (počet zariadení: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Rozhranie Bluetooth je vypnuté"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Nie sú k dispozícii žiadne spárované zariadenia"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Batéria: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Zvuk"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Náhlavná súprava"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Vstup"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Jas"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Automatické otáčanie"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Automatické otáčanie obrazovky"</string>
@@ -321,6 +333,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Pripája sa..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Zdieľané pripojenie"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Upozornenia"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Baterka"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobilné dáta"</string>
@@ -330,8 +345,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Využité: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Limit: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Upozornenie pri <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Pracovný režim"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Nočný režim"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Zapne sa pri západe slnka"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Do východu slnka"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Zapne sa o <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Do <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC je deaktivované"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC je aktivované"</string>
@@ -344,6 +366,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Aplikácia <xliff:g id="APP">%s</xliff:g> je v núdzovom režime zakázaná."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Vymazať všetko"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Presuňte okno sem a použite tak rozdelenú obrazovku"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Rozdeliť vodorovné"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Rozdeliť zvislé"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Rozdeliť vlastné"</string>
@@ -568,6 +592,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Pomocou ovládacích prvkov zobrazovania upozornení môžete nastaviť pre upozornenia aplikácie úroveň dôležitosti od 0 do 5. \n\n"<b>"Úroveň 5"</b>" \n– Zobrazovať v hornej časti zoznamu upozornení. \n– Povoliť prerušenia na celú obrazovku. \n– Vždy zobrazovať čiastočne. \n\n"<b>"Úroveň 4"</b>" \n– Zabrániť prerušeniam na celú obrazovku. \n– Vždy zobrazovať čiastočne. \n\n"<b>"Úroveň 3"</b>" \n– Zabrániť prerušeniam na celú obrazovku. \n– Nikdy nezobrazovať čiastočne. \n\n"<b>"Úroveň 2"</b>" \n– Zabrániť prerušeniam na celú obrazovku. \n– Nikdy nezobrazovať čiastočne. \n– Nikdy nespúšťať zvuk ani vibrácie. \n\n"<b>"Úroveň 1"</b>" \n– Zabrániť prerušeniam na celú obrazovku. \n– Nikdy nezobrazovať čiastočne. \n– Nikdy nespúšťať zvuk ani vibrácie. \n– Skryť na uzamknutej obrazovke a v stavovom riadku. \n– Zobraziť v dolnej časti zoznamu upozornení. \n\n"<b>"Úroveň 0"</b>" \n– Blokovať všetky upozornenia z aplikácie."</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Upozornenia"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Tieto upozornenia sa už nebudú zobrazovať"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Majú sa tieto upozornenia naďalej zobrazovať?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Prestať zobrazovať upozornenia"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Naďalej zobrazovať"</string>
@@ -666,7 +692,8 @@
<item msgid="1545641631806817203">"Schránka"</item>
<item msgid="5742013440802239414">"Kód klávesnice"</item>
<item msgid="8802889973626281575">"Prepínač klávesnice"</item>
- <item msgid="8175437057325747277">"Žiadne"</item>
+ <item msgid="7095517796293767867">"Návrh otáčania"</item>
+ <item msgid="8494159969042135235">"Žiadne"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Štandardná"</item>
@@ -790,4 +817,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Klepnutím zobrazíte podrobnosti o batérii a spotrebe dát"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Vypnúť mobilné dáta?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Nastavenia nemôžu overiť vašu odpoveď, pretože určitá aplikácia blokuje žiadosť o povolenie."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Povoliť aplikácii <xliff:g id="APP_0">%1$s</xliff:g> zobrazovať rezy z aplikácie <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– Môže čítať informácie z aplikácie <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– Môže vykonávať akcie v aplikácii <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Povoliť aplikácii <xliff:g id="APP">%1$s</xliff:g> zobrazovať rezy z ľubovoľnej aplikácie"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Povoliť"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Zamietnuť"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index e52a43a..65164cc 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -90,6 +90,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Začetni zaslon"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Meni"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Funkcije za ljudi s posebnimi potrebami"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Sukanje zaslona"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Pregled"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Iskanje"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparat"</string>
@@ -104,6 +105,12 @@
<string name="camera_label" msgid="7261107956054836961">"odpri fotoaparat"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Izberite novo postavitev opravil"</string>
<string name="cancel" msgid="6442560571259935130">"Prekliči"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Gumb povečave za združljivost."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Povečava manjšega na večji zaslon."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Povezava Bluetooth vzpostavljena."</string>
@@ -182,7 +189,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Zvonjenje izklopljeno."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Način za delo"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Opusti aplikacijo <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Aplikacija <xliff:g id="APP">%s</xliff:g> je bila odstranjena."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Vse nedavne aplikacije so bile opuščene."</string>
@@ -281,6 +289,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (št. naprav: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth izklopljen"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Na voljo ni nobene seznanjene naprave"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Akumulator na <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Zvok"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Slušalke z mikrofonom"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Vhodna naprava"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Svetlost"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Samodejno sukanje"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Samodejno sukanje zaslona"</string>
@@ -321,6 +333,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Vzpostavljanje povezave ..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Internet prek mobilne naprave"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Dostopna točka"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Obvestila"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Svetilka"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Prenos podatkov v mobilnem omrežju"</string>
@@ -330,8 +345,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Porabljeno: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Omejitev: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Opozorilo – <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Način za delo"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Nočna svetloba"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Ob sončnem zahodu"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Do sončnega vzhoda"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Vklop ob <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Do <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"Tehnologija NFC je onemogočena"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"Tehnologija NFC je omogočena"</string>
@@ -344,6 +366,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Aplikacija <xliff:g id="APP">%s</xliff:g> je v varnem načinu onemogočena."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Izbriši vse"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Povlecite sem za razdeljeni zaslon"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Razdeli vodoravno"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Razdeli navpično"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Razdeli po meri"</string>
@@ -568,6 +592,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"S kontrolniki za pomebnost obvestila je mogoče za obvestila aplikacije nastaviti stopnjo pomembnosti od 0 do 5. \n\n"<b>"Stopnja 5"</b>" \n– Prikaz na vrhu seznama obvestil \n– Omogočanje prekinitev v celozaslonskem načinu \n– Vedno prikaži hitre predoglede \n\n"<b>"Stopnja 4"</b>" \n– Preprečevanje prekinitev v celozaslonskem načinu \n– Vedno prikaži hitre predoglede \n\n"<b>"Stopnja 3"</b>" \n– Preprečevanje prekinitev v celozaslonskem načinu \n– Nikoli ne prikaži hitrih predogledov \n\n"<b>"Stopnja 2"</b>" \n– Preprečevanje prekinitev v celozaslonskem načinu \n– Nikoli ne prikaži hitrih predogledov \n– Nikoli ne uporabi zvoka in vibriranja \n\n"<b>"Stopnja 1"</b>" \n– Preprečevanje prekinitev v celozaslonskem načinu \n– Nikoli ne prikaži hitrih predogledov \n– Nikoli ne uporabi zvoka in vibriranja \n– Skrivanje na zaklenjenem zaslonu in v vrstici stanja \n– Prikaz na dnu seznama obvestil \n\n"<b>"Stopnja 0"</b>" \n– Blokiranje vseh obvestil aplikacije"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Obvestila"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Ta obvestila ne bodo več prikazana"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Želite, da so ta obvestila še naprej prikazana?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Ustavi prikazovanje obvestil"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Prikazuj še naprej"</string>
@@ -666,7 +692,8 @@
<item msgid="1545641631806817203">"Odložišče"</item>
<item msgid="5742013440802239414">"Koda tipke"</item>
<item msgid="8802889973626281575">"Preklopnik tipkovnice"</item>
- <item msgid="8175437057325747277">"Brez"</item>
+ <item msgid="7095517796293767867">"Predlog za vrtenje"</item>
+ <item msgid="8494159969042135235">"Brez"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Običajna"</item>
@@ -790,4 +817,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Dotaknite se za prikaz podrobnosti porabe akumulatorja in prenosa podatkov"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Želite izklopiti prenos podatkov v mobilnih omrežjih?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Ker aplikacija zakriva zahtevo za dovoljenje, z nastavitvami ni mogoče preveriti vašega odziva."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Želite dovoliti, da aplikacija <xliff:g id="APP_0">%1$s</xliff:g> prikaže izreze aplikacije <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– lahko bere podatke v aplikaciji <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– lahko izvaja dejanja v aplikaciji <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Dovoli, da aplikacija <xliff:g id="APP">%1$s</xliff:g> prikaže izreze iz poljubne aplikacije"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Dovoli"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Zavrni"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sq/strings.xml b/packages/SystemUI/res/values-sq/strings.xml
index 61f1c86..7634902 100644
--- a/packages/SystemUI/res/values-sq/strings.xml
+++ b/packages/SystemUI/res/values-sq/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Faqja bazë"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menyja"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Qasshmëria"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Rrotullo ekranin"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Përmbledhje"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Kërko"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"hap kamerën"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Zgjidh strukturën e re të detyrës"</string>
<string name="cancel" msgid="6442560571259935130">"Anulo"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Butoni i zmadhimit të pajtueshmërisë."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zmadho nga një ekran i vogël në të madh."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Pajisja është lidhur me \"bluetooth\"."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Zilja është heshtur."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Modaliteti i punës"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Largo <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> është hequr."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Të gjitha aplikacionet e fundit u larguan."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"\"Bluetooth-i\" (<xliff:g id="NUMBER">%d</xliff:g> pajisje)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"\"Bluetooth-i\" është i çaktivizuar"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Nuk ofrohet për përdorim asnjë pajisje e çiftuar"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> bateri"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Kufje me mikrofon"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Hyrja"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Ndriçimi"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Rrotullim automatik"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Ekran me rrotullim automatik"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Po lidhet..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Lidhje çiftimi"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Qasje në zona publike interneti"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Njoftimet"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Elektriku"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Të dhënat celulare"</string>
@@ -324,8 +339,13 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Të përdorura: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Kufiri: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Paralajmërim për kufirin prej <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Modaliteti i punës"</string>
+ <string name="quick_settings_work_mode_on_label" msgid="3421274215098764735">"Profili i punës"</string>
+ <string name="quick_settings_work_mode_off_label" msgid="8856918707867192186">"Njoftimet dhe aplikacionet janë joaktive"</string>
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Drita e natës"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Në perëndim të diellit"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Deri në lindje të diellit"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Aktive në <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Deri në <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC është çaktivizuar"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC është aktivizuar"</string>
@@ -338,6 +358,7 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> është i çaktivizuar në modalitetin e sigurt."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Pastroji të gjitha"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Zvarrit këtu për të përdorur ekranin e ndarë"</string>
+ <string name="recents_swipe_up_onboarding" msgid="3824607135920170001">"Rrëshqit shpejt lart për të ndërruar aplikacionet"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Ndaje horizontalisht"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Ndaj vertikalisht"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Ndaj të personalizuarën"</string>
@@ -562,6 +583,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Me kontrollet e njoftimit të energjisë, mund të caktosh një nivel rëndësie nga 0 në 5 për njoftimet e një aplikacioni. \n\n"<b>"Niveli 5"</b>" \n- Shfaq në krye të listës së njoftimeve \n- Lejo ndërprerjen e ekranit të plotë \n- Gjithmonë shfaq shpejt \n\n"<b>"Niveli 4"</b>" \n- Parandalo ndërprerjen e ekranit të plotë \n- Gijthmonë shfaq shpejt \n\n"<b>"Niveli 3"</b>" \n- Parandalo ndërprerjen e ekranit të plotë \n- Asnjëherë mos shfaq shpejt \n\n"<b>"Niveli 2"</b>" \n- Parandalo ndërprerjen e ekranit të plotë \n- Asnjëherë mos shfaq shpejt \n- Asnjëherë mos lësho tingull dhe dridhje \n\n"<b>"Niveli 1"</b>" \n- Parandalo ndërprerjen e ekranit të plotë \n- Asnjëherë mos shfaq shpejt \n- Asnjëherë mos lësho tingull ose dridhje \n- Fshih nga ekrani i kyçjes dhe shiriti i statusit \n- Shfaq në fund të listës së njoftimeve \n\n"<b>"Niveli 0"</b>" \n- Blloko të gjitha njoftimet nga aplikacioni"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Njoftime"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Nuk do t\'i shikosh më këto njoftime"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Do të vazhdosh t\'i shfaqësh këto njoftime?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Ndalo njoftimet"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Vazhdo të shfaqësh"</string>
@@ -656,7 +679,8 @@
<item msgid="1545641631806817203">"Kujtesa e fragmenteve"</item>
<item msgid="5742013440802239414">"Kodi i tasteve"</item>
<item msgid="8802889973626281575">"Ndërruesi i tastierës"</item>
- <item msgid="8175437057325747277">"Asnjë"</item>
+ <item msgid="7095517796293767867">"Sugjerimi i rrotullimit"</item>
+ <item msgid="8494159969042135235">"Asnjë"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normale"</item>
@@ -780,4 +804,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Trokit për detaje mbi baterinë dhe përdorimin e të dhënave"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Të çaktivizohen të dhënat celulare?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Duke qenë se një aplikacion po bllokon një kërkesë për leje, \"Cilësimet\" nuk mund të verifikojnë përgjigjen tënde."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Të lejohet <xliff:g id="APP_0">%1$s</xliff:g> që të shfaqë pjesë të <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Mund të lexojë informacion nga <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Mund të ndërmarrë veprime brenda <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Lejo <xliff:g id="APP">%1$s</xliff:g> për të shfaqur pjesë nga çdo aplikacion"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Lejo"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Refuzo"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 7eb86c2..aa97eb2 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -89,6 +89,7 @@
<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_rotate_button" msgid="7402949513740253006">"Ротирајте екран"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Преглед"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Претражите"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -103,6 +104,12 @@
<string name="camera_label" msgid="7261107956054836961">"отвори камеру"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Изабери нови распоред задатака"</string>
<string name="cancel" msgid="6442560571259935130">"Откажи"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Дугме Зум компатибилности."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Зумирање са мањег на већи екран."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth је прикључен."</string>
@@ -179,7 +186,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Нечујно звоно."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Режим рада"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Одбаците <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Апликација <xliff:g id="APP">%s</xliff:g> је одбачена."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Све недавно коришћене апликације су одбачене."</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> уређаја)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth искључен"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Није доступан ниједан упарени уређај"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Ниво батерије је <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Аудио"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Слушалице"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Унос"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Осветљеност"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Аутоматска ротација"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Аутоматско ротирање екрана"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Повезује се..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Повезивање"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Хотспот"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Обавештења"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Лампа"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Мобилни подаци"</string>
@@ -326,8 +341,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Искористили сте <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Ограничење од <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Упозорење за <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Режим рада"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Ноћно светло"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Укључује се по заласку сунца"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"До изласка сунца"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Укључује се у <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"До <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC је онемогућен"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC је омогућен"</string>
@@ -340,6 +362,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Апликација <xliff:g id="APP">%s</xliff:g> је онемогућена у безбедном режиму."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Обриши све"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Превуците овде да бисте користили раздељени екран"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Подели хоризонтално"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Подели вертикално"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Прилагођено дељење"</string>
@@ -564,6 +588,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Помоћу напредних контрола за обавештења можете да подесите ниво важности од 0. до 5. за обавештења апликације. \n\n"<b>"5. ниво"</b>" \n– Приказују се у врху листе обавештења \n- Дозволи прекид режима целог екрана \n– Увек завируј \n\n"<b>"4. ниво"</b>" \n– Спречи прекид режима целог екрана \n– Увек завируј \n\n"<b>"3. ниво"</b>" \n– Спречи прекид режима целог екрана \n– Никада не завируј \n\n"<b>"2. ниво"</b>" \n– Спречи прекид режима целог екрана \n– Никада не завируј \n– Никада не производи звук или вибрацију \n\n"<b>"1. ниво"</b>" \n– Спречи прекид режима целог екрана \n– Никада не завируј \n– Никада не производи звук или вибрацију \n– Сакриј на закључаном екрану и статусној траци \n– Приказују се у дну листе обавештења \n\n"<b>"0. ниво"</b>" \n– Блокирај сва обавештења из апликације"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Обавештења"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Више нећете видети ова обавештења"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Желите ли да се ова обавештења и даље приказују?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Престани да приказујеш обавештења"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Настави да приказујеш"</string>
@@ -660,7 +686,8 @@
<item msgid="1545641631806817203">"Меморија"</item>
<item msgid="5742013440802239414">"Кôд тастера"</item>
<item msgid="8802889973626281575">"Пребацивач за тастатуру"</item>
- <item msgid="8175437057325747277">"Ништа"</item>
+ <item msgid="7095517796293767867">"Предлог за ротацију"</item>
+ <item msgid="8494159969042135235">"Ништа"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Нормални"</item>
@@ -784,4 +811,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Додирните за детаље о батерији и потрошњи података"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Желите да онемогућите мобилне податке?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Подешавања не могу да верификују ваш одговор јер апликација скрива захтев за дозволу."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Желите ли да дозволите апликацији <xliff:g id="APP_0">%1$s</xliff:g> да приказује исечке из апликације <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– Може да чита податке из апликације <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– Може да обавља радње у апликацији <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Дозволите апликацији <xliff:g id="APP">%1$s</xliff:g> да приказује исечке из било које апликације"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Дозволи"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Одбиј"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index d2da3b7..e5ae211 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -31,7 +31,7 @@
</plurals>
<string name="status_bar_no_notifications_title" msgid="4755261167193833213">"Inga aviseringar"</string>
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"Pågående"</string>
- <string name="status_bar_latest_events_title" msgid="6594767438577593172">"Meddelanden"</string>
+ <string name="status_bar_latest_events_title" msgid="6594767438577593172">"Aviseringar"</string>
<string name="battery_low_title" msgid="6456385927409742437">"Lågt batteri"</string>
<string name="battery_low_title_hybrid" msgid="6268991275887381595">"Batterinivån är låg. Aktivera batterisparläge"</string>
<string name="battery_low_percent_format" msgid="2900940511201380775">"<xliff:g id="PERCENTAGE">%s</xliff:g> kvar"</string>
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Startsida"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Meny"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Tillgänglighet"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Rotera skärmen"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Översikt"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Sök"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"öppna kameran"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Välj en ny layout för uppgiften"</string>
<string name="cancel" msgid="6442560571259935130">"Avbryt"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Knapp för kompatibilitetszoom."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zooma mindre skärm till större."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth ansluten."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Tyst ringsignal."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Arbetsläge"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Ta bort <xliff:g id="APP">%s</xliff:g> från listan."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> togs bort permanent."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Alla appar har tagits bort från listan Senaste."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> enheter)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth av"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Det finns inga kopplade enheter tillgängliga"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> batteri"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Ljud"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Headset"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Ingång"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Ljusstyrka"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Rotera automatiskt"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Rotera skärmen automatiskt"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Ansluter ..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Internetdelning"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Surfzon"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Aviseringar"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Ficklampa"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobildata"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> används"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Gräns: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Varning <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Arbetsläge"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Nattljus"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"På från solnedgången"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Till soluppgången"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"På från <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Till <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC är inaktiverat"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC är aktiverat"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> är inaktiverad i säkert läge."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Rensa alla"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Dra hit för att dela upp skärmen"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Dela horisontellt"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Dela vertikalt"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Dela anpassad"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Med aviseringsinställningarna kan du ange prioritetsnivå från 0 till 5 för aviseringar från en app. \n\n"<b>"Nivå 5"</b>" \n– Visa högst upp i aviseringslistan\n– Tillåt avbrott i helskärmsläge \n– Snabbvisa alltid \n\n"<b>"Nivå 4"</b>" \n– Tillåt inte avbrott i helskärmsläge \n– Snabbvisa alltid \n\n"<b>"Nivå 3"</b>" \n- Tillåt inte avbrott i helskärmsläge \n– Snabbvisa aldrig \n\n"<b>"Nivå 2"</b>" \n– Tillåt inte avbrott i helskärmsläge \n– Snabbvisa aldrig \n– Aldrig med ljud eller vibration \n\n"<b>"Nivå 1"</b>" \n– Tillåt inte avbrott i helskärmsläge \n– Snabbvisa aldrig \n– Aldrig med ljud eller vibration \n– Visa inte på låsskärmen och i statusfältet \n– Visa längst ned i aviseringslistan \n\n"<b>"Nivå 0"</b>" \n– Blockera alla aviseringar från appen"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Aviseringar"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"De här aviseringarna visas inte längre"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Vill du fortsätta visa de här aviseringarna?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Stoppa aviseringar"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Fortsätt visa"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Urklipp"</item>
<item msgid="5742013440802239414">"Tangentkod"</item>
<item msgid="8802889973626281575">"Byt mellan meny/tangentbord"</item>
- <item msgid="8175437057325747277">"Ingen"</item>
+ <item msgid="7095517796293767867">"Rotationsförslag"</item>
+ <item msgid="8494159969042135235">"Inga"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Tryck för information om batteri- och dataanvändning"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Vill du inaktivera mobildatan?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Svaret kan inte verifieras av Inställningar eftersom en app skymmer en begäran om behörighet."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Tillåter du att bitar av <xliff:g id="APP_2">%2$s</xliff:g> visas i <xliff:g id="APP_0">%1$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– Kan läsa information från <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– Kan vidta åtgärder i <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Tillåt att bitar av vilken app som helst visas i <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Tillåt"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Neka"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index 8cae1c4..3880540 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Nyumbani"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menyu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Zana za walio na matatizo ya kuona au kusikia"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Zungusha skrini"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Muhtasari"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Tafuta"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"fungua kamera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Chagua muundo mpya wa kazi"</string>
<string name="cancel" msgid="6442560571259935130">"Ghairi"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Kichupo cha kukuza kwa utangamanifu"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Kuza kidogo kwa skrini kubwa."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth imeunganishwa."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Mlio wa simu uko kimya."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Hali ya kazi"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Ondoa <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> imeondolewa."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Programu za hivi majuzi zimeondolewa."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (Vifaa <xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth Imezimwa"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Hakuna vifaa vilivyooanishwa vinavyopatikana"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Chaji ya betri ni <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Sauti"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Vifaa vya sauti"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Vifaa vya kuingiza sauti"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Ung\'avu"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Zungusha kiotomatiki"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Skrini ijizungushe kiotomatiki"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Inaunganisha..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Kusambaza mtandao"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Mtandao-hewa"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Arifa"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Tochi"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Data ya mtandao wa simu"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> imetumika"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"kikomo <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Onyo <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Hali ya kazi"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Mwanga wa Usiku"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Itawashwa machweo"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Hadi macheo"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Itawashwa saa <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Hadi <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC imezimwa"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC imewashwa"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> imezimwa katika hali salama."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Futa zote"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Buruta hapa ili utumie skrini iliyogawanywa"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Gawanya Mlalo"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Gawanya Wima"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Maalum Iliyogawanywa"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Ukiwa na udhibiti wa arifa, unaweza kuweka kiwango cha umuhimu wa arifa za programu kuanzia 0 hadi 5. \n\n"<b>"Kiwango cha 5"</b>" \n- Onyesha katika sehemu ya juu ya orodha ya arifa \n- Ruhusu ukatizaji wa skrini nzima \n- Ruhusu arifa za kuchungulia kila wakati\n\n"<b>"Kiwango cha 4"</b>" \n- Zuia ukatizaji wa skrini nzima\n- Ruhusu arifa za kuchungulia kila wakati \n\n"<b>"Kiwango cha 3"</b>" \n- Zuia ukatizaji wa skrini nzima\n- Usiruhusu kamwe arifa za kuchungulia\n\n"<b>"Kiwango cha 2"</b>" \n- Zuia ukatizaji wa skrini nzima\n- Usiruhusu kamwe arifa za kuchungulia \n- Usiruhusu kamwe sauti au mtetemo \n\n"<b>"Kiwango cha 1"</b>" \n- Zuia ukatizaji wa skrini nzima \n- Usiruhusu kamwe arifa za kuchungulia \n- Usiruhusu kamwe sauti na mtetemo \n- Usionyeshe skrini iliyofungwa na sehemu ya arifa \n- Onyesha katika sehemu ya chini ya orodha ya arifa \n\n"<b>"Kiwango cha 0"</b>" \n- Zuia arifa zote kutoka programu"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Arifa"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Hutaona tena arifa hizi"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Ungependa kuendelea kuonyesha arifa hizi?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Acha kuonyesha arifa"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Endelea kuonyesha"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Ubao wa kunakili"</item>
<item msgid="5742013440802239414">"Msimbo wa ufunguo"</item>
<item msgid="8802889973626281575">"Kibadilishaji cha kibodi"</item>
- <item msgid="8175437057325747277">"Hamna"</item>
+ <item msgid="7095517796293767867">"Mapendekezo ya kuzungusha"</item>
+ <item msgid="8494159969042135235">"Hamna"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Ya Kawaida"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Gusa ili upate maelezo kuhusu betri na matumizi ya data"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Ungependa kuzima data ya mtandao wa simu?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Kwa sababu programu nyingine inazuia ombi la ruhusa, hatuwezi kuthibitisha jibu lako katika Mipangilio."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Ungependa kuruhusu <xliff:g id="APP_0">%1$s</xliff:g> ionyeshe vipengee <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Inaweza kusoma maelezo kutoka <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Inaweza kuchukua hatua ndani ya <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Ruhusu <xliff:g id="APP">%1$s</xliff:g> ionyeshe vipengee kutoka programu yoyote"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Ruhusu"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Kataa"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index 268fdec..e95d9fe 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -97,4 +97,7 @@
<!-- The offsets the tasks animate from when recents is launched while docking -->
<dimen name="recents_task_stack_animation_launched_while_docking_offset">192dp</dimen>
+
+ <!-- Home button padding for sizing -->
+ <dimen name="home_padding">0dp</dimen>
</resources>
diff --git a/packages/SystemUI/res/values-ta/strings.xml b/packages/SystemUI/res/values-ta/strings.xml
index 5a209b0..774b2f2 100644
--- a/packages/SystemUI/res/values-ta/strings.xml
+++ b/packages/SystemUI/res/values-ta/strings.xml
@@ -33,13 +33,10 @@
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"செயலில் இருக்கும்"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"அறிவிப்புகள்"</string>
<string name="battery_low_title" msgid="6456385927409742437">"பேட்டரி குறைவு"</string>
- <!-- no translation found for battery_low_title_hybrid (6268991275887381595) -->
- <skip />
+ <string name="battery_low_title_hybrid" msgid="6268991275887381595">"பேட்டரி குறைவாக உள்ளது. பேட்டரி சேமிப்பானை ஆன் செய்யவும்"</string>
<string name="battery_low_percent_format" msgid="2900940511201380775">"<xliff:g id="PERCENTAGE">%s</xliff:g> உள்ளது"</string>
- <!-- no translation found for battery_low_percent_format_hybrid (6838677459286775617) -->
- <skip />
- <!-- no translation found for battery_low_percent_format_hybrid_short (9025795469949145586) -->
- <skip />
+ <string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"<xliff:g id="PERCENTAGE">%s</xliff:g> பேட்டரி மீதமுள்ளது. உங்கள் உபயோகத்தைப் பொறுத்து, இதைச் சுமார் <xliff:g id="TIME">%s</xliff:g> மணி நேரத்திற்குப் பயன்படுத்தலாம்"</string>
+ <string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"<xliff:g id="PERCENTAGE">%s</xliff:g> மீதமுள்ளது, இதைச் சுமார் <xliff:g id="TIME">%s</xliff:g> மணி நேரத்திற்குப் பயன்படுத்தலாம்"</string>
<string name="battery_low_percent_format_saver_started" msgid="7879389868952879166">"<xliff:g id="PERCENTAGE">%s</xliff:g> மீதமுள்ளது. பேட்டரி சேமிப்பான் ஆன் செய்யப்பட்டுள்ளது."</string>
<string name="invalid_charger" msgid="4549105996740522523">"USB மூலம் சார்ஜ் செய்வது ஆதரிக்கப்படவில்லை.\nவழங்கப்பட்ட சார்ஜரை மட்டும் பயன்படுத்தவும்."</string>
<string name="invalid_charger_title" msgid="3515740382572798460">"USB சார்ஜிங் ஆதரிக்கப்படவில்லை."</string>
@@ -73,22 +70,15 @@
<string name="usb_debugging_secondary_user_message" msgid="6067122453571699801">"தற்போது இந்தச் சாதனத்தில் உள்நுழைந்துள்ள பயனரால் USB பிழைத்திருத்தத்தை இயக்க முடியாது. இந்த அம்சத்தை இயக்க, முதன்மைப் பயனருக்கு மாறவும்."</string>
<string name="compat_mode_on" msgid="6623839244840638213">"திரையை நிரப்ப அளவை மாற்று"</string>
<string name="compat_mode_off" msgid="4434467572461327898">"திரையை நிரப்ப இழு"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"ஸ்கிரீன் ஷாட்"</string>
<string name="screenshot_saving_ticker" msgid="7403652894056693515">"ஸ்க்ரீன் ஷாட்டைச் சேமிக்கிறது…"</string>
<string name="screenshot_saving_title" msgid="8242282144535555697">"ஸ்க்ரீன் ஷாட்டைச் சேமிக்கிறது…"</string>
- <!-- no translation found for screenshot_saving_text (2545047868936087248) -->
- <skip />
- <!-- no translation found for screenshot_saved_title (5637073968117370753) -->
- <skip />
- <!-- no translation found for screenshot_saved_text (7574667448002050363) -->
- <skip />
- <!-- no translation found for screenshot_failed_title (9096484883063264803) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_unknown_text (8844781948876286488) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_text (3041612585107107310) -->
- <skip />
+ <string name="screenshot_saving_text" msgid="2545047868936087248">"ஸ்கிரீன் ஷாட் சேமிக்கப்படுகிறது"</string>
+ <string name="screenshot_saved_title" msgid="5637073968117370753">"ஸ்கிரீன் ஷாட் சேமிக்கப்பட்டது"</string>
+ <string name="screenshot_saved_text" msgid="7574667448002050363">"ஸ்கிரீன்ஷாட்டைப் பார்க்க, தட்டவும்"</string>
+ <string name="screenshot_failed_title" msgid="9096484883063264803">"ஸ்கிரீன் ஷாட் எடுக்க முடியவில்லை"</string>
+ <string name="screenshot_failed_to_save_unknown_text" msgid="8844781948876286488">"ஸ்கிரீன்ஷாட்டைச் சேமிப்பதில் சிக்கல் ஏற்பட்டது"</string>
+ <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"போதுமான சேமிப்பிடம் இல்லாததால் ஸ்கிரீன்ஷாட்டைச் சேமிக்க முடியவில்லை"</string>
<string name="screenshot_failed_to_capture_text" msgid="173674476457581486">"ஸ்கிரீன் ஷாட்டுகளை எடுப்பதை, பயன்பாடு அல்லது உங்கள் நிறுவனம் அனுமதிக்கவில்லை"</string>
<string name="usb_preference_title" msgid="6551050377388882787">"USB கோப்பு இடமாற்ற விருப்பங்கள்"</string>
<string name="use_mtp_button_title" msgid="4333504413563023626">"(MTP) மீடியா பிளேயராக ஏற்று"</string>
@@ -98,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"திரையைச் சுழற்று"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"மேலோட்டப் பார்வை"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"தேடு"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"கேமரா"</string>
@@ -112,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"கேமராவைத் திற"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"புதிய பணி தளவமைப்பைத் தேர்ந்தெடுக்கவும்"</string>
<string name="cancel" msgid="6442560571259935130">"ரத்துசெய்"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"பொருந்துமாறு அளவை மாற்றும் பொத்தான்."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"சிறியதிலிருந்து பெரிய திரைக்கு அளவை மாற்றும்."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"புளூடூத் இணைக்கப்பட்டது."</string>
@@ -188,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"ரிங்கர் நிசப்தம்."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"பணிப் பயன்முறை"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> ஐ நிராகரி."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> விலக்கப்பட்டது."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"எல்லா சமீபத்திய பயன்பாடுகளும் விலக்கப்பட்டன."</string>
@@ -285,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"புளூடூத் (<xliff:g id="NUMBER">%d</xliff:g> சாதனங்கள்)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"புளூடூத் ஐ முடக்கு"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"இணைக்கப்பட்ட சாதனங்கள் இல்லை"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> பேட்டரி"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"ஆடியோ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"ஹெட்செட்"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"உள்ளீடு"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"ஒளிர்வு"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"தானாகச் சுழற்று"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"திரையைத் தானாகச் சுழற்று"</string>
@@ -325,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"இணைக்கிறது..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"டெதெரிங்"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"ஹாட்ஸ்பாட்"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"அறிவிப்புகள்"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"டார்ச் லைட்"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"மொபைல் டேட்டா"</string>
@@ -334,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"பயன்படுத்தியது - <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> வரம்பு"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> எச்சரிக்கை"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"பணிப் பயன்முறை"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"இரவு ஒளி"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"மாலையில் ஆன் செய்"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"சூரிய உதயம் வரை"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g>க்கு ஆன் செய்"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> மணி வரை"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC முடக்கப்பட்டது"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC இயக்கப்பட்டது"</string>
@@ -348,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"பாதுகாப்புப் பயன்முறையில் <xliff:g id="APP">%s</xliff:g> முடக்கப்பட்டது."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"அனைத்தையும் அழி"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"திரைப் பிரிப்பைப் பயன்படுத்த, இங்கே இழுக்கவும்"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"கிடைமட்டமாகப் பிரி"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"செங்குத்தாகப் பிரி"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"தனிவிருப்பத்தில் பிரி"</string>
@@ -571,27 +585,21 @@
<string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"ஆஃப்"</string>
<string name="power_notification_controls_description" msgid="4372459941671353358">"ஆற்றல்மிக்க அறிவிப்புக் கட்டுப்பாடுகள் மூலம், பயன்பாட்டின் அறிவிப்புகளுக்கு முக்கியத்துவ நிலையை (0-5) அமைக்கலாம். \n\n"<b>"நிலை 5"</b>" \n- அறிவிப்புப் பட்டியலின் மேலே காட்டும் \n- முழுத் திரைக் குறுக்கீட்டை அனுமதிக்கும் \n- எப்போதும் நடப்புத் திரையின் மேல் பகுதியில் அறிவிப்புகளைக் காட்டும் \n\n"<b>"நிலை 4"</b>" \n- முழுத் திரைக் குறுக்கீட்டைத் தடுக்கும் \n- எப்போதும் நடப்புத் திரையின் மேல் பகுதியில் அறிவிப்புகளைக் காட்டும் \n\n"<b>"நிலை 3"</b>" \n- முழுத் திரைக் குறுக்கீட்டைத் தடுக்கும் \n- ஒருபோதும் நடப்புத் திரையின் மேல் பகுதியில் அறிவிப்புகளைக் காட்டாது \n\n"<b>"நிலை 2"</b>" \n- முழுத் திரைக் குறுக்கீட்டைத் தடுக்கும் \n- ஒருபோதும் நடப்புத் திரையின் மேல் பகுதியில் அறிவிப்புகளைக் காட்டாது \n- ஒருபோதும் ஒலி எழுப்பாது, அதிர்வுறாது \n\n"<b>"நிலை 1"</b>" \n- முழுத் திரைக் குறுக்கீட்டைத் தடுக்கும் \n- ஒருபோதும் நடப்புத் திரையின் மேல் பகுதியில் அறிவிப்புகளைக் காட்டாது \n- ஒருபோதும் ஒலி எழுப்பாது அல்லது அதிர்வுறாது \n- பூட்டுத்திரை மற்றும் நிலைப்பட்டியிலிருந்து மறைக்கும் \n- அறிவிப்புகள் பட்டியலின் கீழே காட்டும் \n\n"<b>"நிலை 0"</b>" \n- பயன்பாட்டின் எல்லா அறிவிப்புகளையும் தடுக்கும்"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"அறிவிப்புகள்"</string>
- <!-- no translation found for notification_channel_disabled (344536703863700565) -->
+ <string name="notification_channel_disabled" msgid="344536703863700565">"இந்த அறிவிப்புகளை இனி பார்க்கமாட்டீர்கள்"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
<skip />
- <!-- no translation found for inline_keep_showing (8945102997083836858) -->
- <skip />
- <!-- no translation found for inline_stop_button (4172980096860941033) -->
- <skip />
- <!-- no translation found for inline_keep_button (6665940297019018232) -->
- <skip />
- <!-- no translation found for inline_keep_showing_app (1723113469580031041) -->
- <skip />
- <!-- no translation found for notification_unblockable_desc (1037434112919403708) -->
- <skip />
+ <string name="inline_keep_showing" msgid="8945102997083836858">"இந்த அறிவிப்புகளைத் தொடர்ந்து காட்டவா?"</string>
+ <string name="inline_stop_button" msgid="4172980096860941033">"அறிவிப்புகளை நிறுத்து"</string>
+ <string name="inline_keep_button" msgid="6665940297019018232">"அறிவிப்புகளைத் தொடர்ந்து காட்டு"</string>
+ <string name="inline_keep_showing_app" msgid="1723113469580031041">"இந்தப் பயன்பாட்டின் அறிவிப்புகளைத் தொடர்ந்து காட்டவா?"</string>
+ <string name="notification_unblockable_desc" msgid="1037434112919403708">"இந்த அறிவிப்புகளை ஆஃப் செய்ய முடியாது"</string>
<string name="notification_channel_controls_opened_accessibility" msgid="6553950422055908113">"<xliff:g id="APP_NAME">%1$s</xliff:g>க்கான அறிவிப்புக் கட்டுப்பாடுகள் திறக்கப்பட்டன"</string>
<string name="notification_channel_controls_closed_accessibility" msgid="7521619812603693144">"<xliff:g id="APP_NAME">%1$s</xliff:g>க்கான அறிவிப்புக் கட்டுப்பாடுகள் மூடப்பட்டன"</string>
<string name="notification_channel_switch_accessibility" msgid="3420796005601900717">"இந்தச் சேனலிலிருந்து அறிவிப்புகளைப் பெறுவதை அனுமதிக்கும்"</string>
<string name="notification_more_settings" msgid="816306283396553571">"மேலும் அமைப்புகள்"</string>
- <!-- no translation found for notification_app_settings (420348114670768449) -->
- <skip />
+ <string name="notification_app_settings" msgid="420348114670768449">"தனிப்பயனாக்கு"</string>
<string name="notification_done" msgid="5279426047273930175">"முடிந்தது"</string>
- <!-- no translation found for inline_undo (558916737624706010) -->
- <skip />
+ <string name="inline_undo" msgid="558916737624706010">"செயல்தவிர்"</string>
<string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
<string name="notification_menu_gear_description" msgid="2204480013726775108">"அறிவிப்புக் கட்டுப்பாடுகள்"</string>
<string name="notification_menu_snooze_description" msgid="3653669438131034525">"அறிவிப்பை உறக்கநிலையாக்கும் விருப்பங்கள்"</string>
@@ -674,7 +682,8 @@
<item msgid="1545641631806817203">"கிளிப்போர்டு"</item>
<item msgid="5742013440802239414">"விசைக்குறியீடு"</item>
<item msgid="8802889973626281575">"விசைப்பலகை மாற்றி"</item>
- <item msgid="8175437057325747277">"ஏதுமில்லை"</item>
+ <item msgid="7095517796293767867">"சுழற்சிப் பரிந்துரை"</item>
+ <item msgid="8494159969042135235">"ஏதுமில்லை"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"இயல்பானது"</item>
@@ -798,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"பேட்டரி மற்றும் தரவு உபயோக விவரங்களைக் காண, தட்டவும்"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"மொபைல் டேட்டாவை முடக்கவா?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"அனுமதிக் கோரிக்கையைப் பயன்பாடு மறைப்பதால், அமைப்புகளால் உங்கள் பதிலைச் சரிபார்க்க முடியாது."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> பயன்பாட்டை, <xliff:g id="APP_2">%2$s</xliff:g> பயன்பாட்டின் விழிப்பூட்டல்களைக் காண்பிக்க அனுமதிக்கவா?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- இது, <xliff:g id="APP">%1$s</xliff:g> பயன்பாட்டிலிருந்து தகவலைப் படிக்கும்"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- இது, <xliff:g id="APP">%1$s</xliff:g> பயன்பாட்டிற்குள் சென்று செயல்பாடுகளில் ஈடுபடும்"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"எல்லா பயன்பாட்டிலிருந்தும் விழிப்பூட்டல்களைக் காண்பிக்க, <xliff:g id="APP">%1$s</xliff:g> பயன்பாட்டை அனுமதி"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"அனுமதி"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"நிராகரி"</string>
</resources>
diff --git a/packages/SystemUI/res/values-te/strings.xml b/packages/SystemUI/res/values-te/strings.xml
index f8a14d0..e143b90 100644
--- a/packages/SystemUI/res/values-te/strings.xml
+++ b/packages/SystemUI/res/values-te/strings.xml
@@ -33,13 +33,10 @@
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"కొనసాగుతున్నవి"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"నోటిఫికేషన్లు"</string>
<string name="battery_low_title" msgid="6456385927409742437">"బ్యాటరీ తక్కువగా ఉంది"</string>
- <!-- no translation found for battery_low_title_hybrid (6268991275887381595) -->
- <skip />
+ <string name="battery_low_title_hybrid" msgid="6268991275887381595">"బ్యాటరీ తక్కువగా ఉంది. బ్యాటరీ సేవర్ని ఆన్ చేయండి"</string>
<string name="battery_low_percent_format" msgid="2900940511201380775">"<xliff:g id="PERCENTAGE">%s</xliff:g> మిగిలి ఉంది"</string>
- <!-- no translation found for battery_low_percent_format_hybrid (6838677459286775617) -->
- <skip />
- <!-- no translation found for battery_low_percent_format_hybrid_short (9025795469949145586) -->
- <skip />
+ <string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"<xliff:g id="PERCENTAGE">%s</xliff:g> మిగిలి ఉంది, మీ ఉపయోగం ఆధారంగా దాదాపు <xliff:g id="TIME">%s</xliff:g> ఉండవచ్చు"</string>
+ <string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"<xliff:g id="PERCENTAGE">%s</xliff:g> మిగిలి ఉంది, దాదాపు <xliff:g id="TIME">%s</xliff:g> ఉండవచ్చు"</string>
<string name="battery_low_percent_format_saver_started" msgid="7879389868952879166">"<xliff:g id="PERCENTAGE">%s</xliff:g> మిగిలి ఉంది. బ్యాటరీ సేవర్ ఆన్లో ఉంది."</string>
<string name="invalid_charger" msgid="4549105996740522523">"USB ఛార్జింగ్కు మద్దతు లేదు.\nఅందించిన ఛార్జర్ను మాత్రమే ఉపయోగించండి."</string>
<string name="invalid_charger_title" msgid="3515740382572798460">"USB ఛార్జింగ్కి మద్దతు లేదు."</string>
@@ -73,22 +70,15 @@
<string name="usb_debugging_secondary_user_message" msgid="6067122453571699801">"ఈ పరికరానికి ప్రస్తుతం సైన్ ఇన్ చేసిన వినియోగదారు USB డీబగ్గింగ్ ఆన్ చేయలేరు. ఈ ఫీచర్ ఉపయోగించడానికి, ప్రాథమిక వినియోగదారుకి మారాలి."</string>
<string name="compat_mode_on" msgid="6623839244840638213">"స్క్రీన్కు నింపేలా జూమ్ చేయండి"</string>
<string name="compat_mode_off" msgid="4434467572461327898">"స్క్రీన్కు నింపేలా విస్తరించండి"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"స్క్రీన్షాట్"</string>
<string name="screenshot_saving_ticker" msgid="7403652894056693515">"స్క్రీన్షాట్ను సేవ్ చేస్తోంది…"</string>
<string name="screenshot_saving_title" msgid="8242282144535555697">"స్క్రీన్షాట్ను సేవ్ చేస్తోంది…"</string>
- <!-- no translation found for screenshot_saving_text (2545047868936087248) -->
- <skip />
- <!-- no translation found for screenshot_saved_title (5637073968117370753) -->
- <skip />
- <!-- no translation found for screenshot_saved_text (7574667448002050363) -->
- <skip />
- <!-- no translation found for screenshot_failed_title (9096484883063264803) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_unknown_text (8844781948876286488) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_text (3041612585107107310) -->
- <skip />
+ <string name="screenshot_saving_text" msgid="2545047868936087248">"స్క్రీన్షాట్ సేవ్ చేయబడుతోంది"</string>
+ <string name="screenshot_saved_title" msgid="5637073968117370753">"స్క్రీన్షాట్ సేవ్ చేయబడింది"</string>
+ <string name="screenshot_saved_text" msgid="7574667448002050363">"మీ స్క్రీన్షాట్ను వీక్షించడానికి నొక్కండి"</string>
+ <string name="screenshot_failed_title" msgid="9096484883063264803">"స్క్రీన్షాట్ను క్యాప్చర్ చేయడం సాధ్యపడలేదు"</string>
+ <string name="screenshot_failed_to_save_unknown_text" msgid="8844781948876286488">"స్క్రీన్షాట్ని సేవ్ చేస్తున్నప్పుడు సమస్య ఏర్పడింది"</string>
+ <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"నిల్వ స్థలం పరిమితంగా ఉన్న కారణంగా స్క్రీన్షాట్ను సేవ్ చేయడం సాధ్యపడదు"</string>
<string name="screenshot_failed_to_capture_text" msgid="173674476457581486">"స్క్రీన్షాట్లు తీయడానికి యాప్ లేదా మీ సంస్థ అనుమతించలేదు"</string>
<string name="usb_preference_title" msgid="6551050377388882787">"USB ఫైల్ బదిలీ ఎంపికలు"</string>
<string name="use_mtp_button_title" msgid="4333504413563023626">"మీడియా ప్లేయర్గా (MTP) మౌంట్ చేయి"</string>
@@ -98,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"స్క్రీన్ను తిప్పండి"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"అవలోకనం"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"వెతుకు"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"కెమెరా"</string>
@@ -112,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"కెమెరాను తెరువు"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"కొత్త విధి లేఅవుట్ను ఎంచుకోండి"</string>
<string name="cancel" msgid="6442560571259935130">"రద్దు చేయి"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"అనుకూలత జూమ్ బటన్."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"చిన్న స్క్రీన్ నుండి పెద్దదానికి జూమ్ చేయండి."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"బ్లూటూత్ కనెక్ట్ చేయబడింది."</string>
@@ -188,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"రింగర్ నిశ్శబ్దంలో ఉంది."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"పని మోడ్"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g>ని తీసివేయండి."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> తీసివేయబడింది."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"అన్ని ఇటీవలి అనువర్తనాలు తీసివేయబడ్డాయి."</string>
@@ -285,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"బ్లూటూత్ (<xliff:g id="NUMBER">%d</xliff:g> పరికరాలు)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"బ్లూటూత్ ఆఫ్లో ఉంది"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"జత చేసిన పరికరాలు ఏవీ అందుబాటులో లేవు"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> బ్యాటరీ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"ఆడియో"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"హెడ్సెట్"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"ఇన్పుట్"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"ప్రకాశం"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"స్వయంచాలకంగా తిప్పడం"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"స్క్రీన్ను స్వయంచాలకంగా తిప్పు"</string>
@@ -325,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"కనెక్ట్ అవుతోంది..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"టీథరింగ్"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"హాట్స్పాట్"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"నోటిఫికేషన్లు"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"ఫ్లాష్లైట్"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"మొబైల్ డేటా"</string>
@@ -334,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> వినియోగించబడింది"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> పరిమితి"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> హెచ్చరిక"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"పని మోడ్"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"రాత్రి కాంతి"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"సూర్యాస్తమయానికి"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"సూర్యోదయం వరకు"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g>కి"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> వరకు"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC నిలిపివేయబడింది"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC ప్రారంభించబడింది"</string>
@@ -348,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> సురక్షిత-మోడ్లో నిలిపివేయబడింది."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"అన్నీ తీసివేయి"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"విభజన స్క్రీన్ను ఉపయోగించడానికి ఇక్కడ లాగండి"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"సమతలంగా విభజించు"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"లంబంగా విభజించు"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"అనుకూలంగా విభజించు"</string>
@@ -571,27 +585,21 @@
<string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"ఆఫ్లో ఉన్నాయి"</string>
<string name="power_notification_controls_description" msgid="4372459941671353358">"పవర్ నోటిఫికేషన్ నియంత్రణలతో, మీరు యాప్ నోటిఫికేషన్ల కోసం ప్రాముఖ్యత స్థాయిని 0 నుండి 5 వరకు సెట్ చేయవచ్చు. \n\n"<b>"స్థాయి 5"</b>" \n- నోటిఫికేషన్ జాబితా పైభాగంలో చూపబడతాయి \n- పూర్తి స్క్రీన్ అంతరాయం అనుమతించబడుతుంది \n- ఎల్లప్పుడూ త్వరిత వీక్షణ అందించబడుతుంది \n\n"<b>"స్థాయి 4"</b>\n"- పూర్తి స్క్రీన్ అంతరాయం నిరోధించబడుతుంది \n- ఎల్లప్పుడూ త్వరిత వీక్షణ అందించబడుతుంది \n\n"<b>"స్థాయి 3"</b>" \n- పూర్తి స్క్రీన్ అంతరాయం నిరోధించబడుతుంది \n- ఎప్పుడూ త్వరిత వీక్షణ అందించబడదు \n\n"<b>"స్థాయి 2"</b>" \n- పూర్తి స్క్రీన్ అంతరాయం నిరోధించబడుతుంది \n- ఎప్పుడూ త్వరిత వీక్షణ అందించబడదు \n- ఎప్పుడూ శబ్దం మరియు వైబ్రేషన్ చేయవు \n\n"<b>"స్థాయి 1"</b>" \n- పూర్తి స్క్రీన్ అంతరాయం నిరోధించబడుతుంది \n- ఎప్పుడూ త్వరిత వీక్షణ అందించబడదు \n- ఎప్పుడూ శబ్దం లేదా వైబ్రేట్ చేయవు \n- లాక్ స్క్రీన్ మరియు స్థితి పట్టీ నుండి దాచబడతాయి \n- నోటిఫికేషన్ జాబితా దిగువ భాగంలో చూపబడతాయి \n\n"<b>"స్థాయి 0"</b>" \n- యాప్ నుండి అన్ని నోటిఫికేషన్లు బ్లాక్ చేయబడతాయి"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"నోటిఫికేషన్లు"</string>
- <!-- no translation found for notification_channel_disabled (344536703863700565) -->
+ <string name="notification_channel_disabled" msgid="344536703863700565">"ఇకపై మీకు ఈ నోటిఫికేషన్లు కనిపించవు"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
<skip />
- <!-- no translation found for inline_keep_showing (8945102997083836858) -->
- <skip />
- <!-- no translation found for inline_stop_button (4172980096860941033) -->
- <skip />
- <!-- no translation found for inline_keep_button (6665940297019018232) -->
- <skip />
- <!-- no translation found for inline_keep_showing_app (1723113469580031041) -->
- <skip />
- <!-- no translation found for notification_unblockable_desc (1037434112919403708) -->
- <skip />
+ <string name="inline_keep_showing" msgid="8945102997083836858">"ఈ నోటిఫికేషన్లను చూపిస్తూ ఉండాలా?"</string>
+ <string name="inline_stop_button" msgid="4172980096860941033">"నోటిఫికేషన్లను ఆపివేయి"</string>
+ <string name="inline_keep_button" msgid="6665940297019018232">"చూపిస్తూనే ఉండు"</string>
+ <string name="inline_keep_showing_app" msgid="1723113469580031041">"ఈ యాప్ నుండి నోటిఫికేషన్లను చూపిస్తూ ఉండాలా?"</string>
+ <string name="notification_unblockable_desc" msgid="1037434112919403708">"ఈ నోటిఫికేషన్లను ఆఫ్ చేయలేరు"</string>
<string name="notification_channel_controls_opened_accessibility" msgid="6553950422055908113">"<xliff:g id="APP_NAME">%1$s</xliff:g> యొక్క నోటిఫికేషన్ నియంత్రణలు తెరవబడ్డాయి"</string>
<string name="notification_channel_controls_closed_accessibility" msgid="7521619812603693144">"<xliff:g id="APP_NAME">%1$s</xliff:g> యొక్క నోటిఫికేషన్ నియంత్రణలు మూసివేయబడ్డాయి"</string>
<string name="notification_channel_switch_accessibility" msgid="3420796005601900717">"ఈ ఛానెల్ యొక్క నోటిఫికేషన్లను అనుమతించండి"</string>
<string name="notification_more_settings" msgid="816306283396553571">"మరిన్ని సెట్టింగ్లు"</string>
- <!-- no translation found for notification_app_settings (420348114670768449) -->
- <skip />
+ <string name="notification_app_settings" msgid="420348114670768449">"అనుకూలపరచండి"</string>
<string name="notification_done" msgid="5279426047273930175">"పూర్తయింది"</string>
- <!-- no translation found for inline_undo (558916737624706010) -->
- <skip />
+ <string name="inline_undo" msgid="558916737624706010">"చర్యరద్దు చేయి"</string>
<string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g> <xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
<string name="notification_menu_gear_description" msgid="2204480013726775108">"నోటిఫికేషన్ నియంత్రణలు"</string>
<string name="notification_menu_snooze_description" msgid="3653669438131034525">"నోటిఫికేషన్ తాత్కాలిక ఆపివేత ఎంపికలు"</string>
@@ -674,7 +682,8 @@
<item msgid="1545641631806817203">"క్లిప్బోర్డ్"</item>
<item msgid="5742013440802239414">"కీకోడ్"</item>
<item msgid="8802889973626281575">"కీబోర్డ్ స్విచర్"</item>
- <item msgid="8175437057325747277">"ఏదీ వద్దు"</item>
+ <item msgid="7095517796293767867">"భ్రమణ సూచన"</item>
+ <item msgid="8494159969042135235">"ఏదీ కాదు"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"సాధారణం"</item>
@@ -798,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"బ్యాటరీ మరియు డేటా వినియోగ వివరాల కోసం నొక్కండి"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"మొబైల్ డేటాని ఆఫ్ చేయాలా?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"అనుమతి అభ్యర్థనకు ఒక యాప్ అడ్డు తగులుతున్నందున సెట్టింగ్లు మీ ప్రతిస్పందనను ధృవీకరించలేకపోయాయి."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_2">%2$s</xliff:g> స్లైస్లను చూపించడానికి <xliff:g id="APP_0">%1$s</xliff:g>ని అనుమతించండి?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- ఇది <xliff:g id="APP">%1$s</xliff:g> నుండి సమాచారాన్ని చదువుతుంది"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- ఇది <xliff:g id="APP">%1$s</xliff:g> లోపల చర్యలు తీసుకుంటుంది"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"ఏ యాప్ నుండి అయినా స్లైస్లను చూపించడానికి <xliff:g id="APP">%1$s</xliff:g>ని అనుమతించండి"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"అనుమతించు"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"తిరస్కరించు"</string>
</resources>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index 01b75e3..ac4fbc9 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"หมุนหน้าจอ"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"ภาพรวม"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"ค้นหา"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"กล้องถ่ายรูป"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"เปิดกล้อง"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"เลือกรูปแบบงานใหม่"</string>
<string name="cancel" msgid="6442560571259935130">"ยกเลิก"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"ปุ่มซูมที่ใช้งานร่วมกันได้"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ซูมหน้าจอให้มีขนาดใหญ่ขึ้น"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"เชื่อมต่อบลูทูธแล้ว"</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"เสียงเรียกเข้าแบบปิดเสียง"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"โหมดการทำงาน"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"ยกเลิก <xliff:g id="APP">%s</xliff:g>"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ถูกลบไปแล้ว"</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"ปิดแอปพลิเคชันล่าสุดทั้งหมดแล้ว"</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"บลูทูธ (<xliff:g id="NUMBER">%d</xliff:g> อุปกรณ์)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"ปิดบลูทูธ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"ไม่มีอุปกรณ์ที่จับคู่ที่สามารถใช้ได้"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"แบตเตอรี่ <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"เสียง"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"ชุดหูฟัง"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"อินพุต"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"ความสว่าง"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"หมุนอัตโนมัติ"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"หมุนหน้าจออัตโนมัติ"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"กำลังเชื่อมต่อ..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"การปล่อยสัญญาณ"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"ฮอตสปอต"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"การแจ้งเตือน"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"ไฟฉาย"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"อินเทอร์เน็ตมือถือ"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"ใช้ไปแล้ว <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"ขีดจำกัด <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"คำเตือน <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"โหมดการทำงาน"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"แสงตอนกลางคืน"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"เปิดตอนพระอาทิตย์ตก"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"จนพระอาทิตย์ขึ้น"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"เปิดเวลา <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"จนถึง <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC ถูกปิดใช้งาน"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"เปิดใช้งาน NFC แล้ว"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> ปิดใช้ในโหมดปลอดภัย"</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"ล้างทั้งหมด"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"ลากมาที่นี่เพื่อใช้การแยกหน้าจอ"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"แยกในแนวนอน"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"แยกในแนวตั้ง"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"แยกแบบกำหนดเอง"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"ส่วนควบคุมการแจ้งเตือนแบบเปิด/ปิดช่วยให้คุณตั้งค่าระดับความสำคัญสำหรับการแจ้งเตือนของแอปได้ตั้งแต่ระดับ 0-5 \n\n"<b>"ระดับ 5"</b>" \n- แสดงที่ด้านบนของรายการแจ้งเตือน \n- อนุญาตให้รบกวนแบบเต็มหน้าจอ \n- อนุญาตให้แสดงชั่วครู่ \n\n"<b>"ระดับ 4"</b>" \n- ป้องกันการรบกวนแบบเต็มหน้าจอ \n- แสดงชั่วครู่เสมอ \n\n"<b>"ระดับ 3"</b>" \n- ป้องกันการรบกวนแบบเต็มหน้าจอ \n- ไม่แสดงชั่วครู่เลย \n\n"<b>"ระดับ 2"</b>" \n- ป้องกันการรบกวนแบบเต็มหน้าจอ \n- ไม่แสดงชั่วครู่เลย \n- ไม่ส่งเสียงหรือสั่นเลย \n\n"<b>"ระดับ 1"</b>" \n- ป้องกันการรบกวนแบบเต็มหน้าจอ \n- ไม่แสดงชั่วครู่เลย \n- ไม่ส่งเสียงหรือสั่นเลย \n- ซ่อนจากหน้าจอล็อกและแถบสถานะ \n- แสดงที่ด้านล่างของรายการแจ้งเตือน \n\n"<b>"ระดับ 0"</b>" \n- บล็อกการแจ้งเตือนทั้งหมดจากแอป"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"การแจ้งเตือน"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"คุณจะไม่เห็นการแจ้งเตือนเหล่านี้อีก"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"แสดงการแจ้งเตือนเหล่านี้ต่อไปไหม"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"ปิดการแจ้งเตือน"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"แสดงต่อไป"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"คลิปบอร์ด"</item>
<item msgid="5742013440802239414">"Keycode"</item>
<item msgid="8802889973626281575">"ปุ่มสลับแป้นพิมพ์"</item>
- <item msgid="8175437057325747277">"ไม่มี"</item>
+ <item msgid="7095517796293767867">"คำแนะนำในการหมุน"</item>
+ <item msgid="8494159969042135235">"ไม่มี"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"ปกติ"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"แตะเพื่อดูรายละเอียดเกี่ยวกับแบตเตอรี่และปริมาณการใช้อินเทอร์เน็ต"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"ปิดอินเทอร์เน็ตมือถือไหม"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"เนื่องจากแอปหนึ่งได้บดบังคำขอสิทธิ์ ระบบจึงไม่สามารถยืนยันคำตอบของคุณสำหรับการตั้งค่าได้"</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"อนุญาตให้ <xliff:g id="APP_0">%1$s</xliff:g> แสดงส่วนต่างๆ ของ <xliff:g id="APP_2">%2$s</xliff:g>"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- อ่านข้อมูลจาก <xliff:g id="APP">%1$s</xliff:g> ได้"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- ดำเนินการใน <xliff:g id="APP">%1$s</xliff:g> ได้"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"อนุญาตให้ <xliff:g id="APP">%1$s</xliff:g> แสดงส่วนต่างๆ จากแอปใดก็ได้"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"อนุญาต"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"ปฏิเสธ"</string>
</resources>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 5352cf0..97e332b 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Home"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Pagiging Naa-access"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"I-rotate ang screen"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Overview"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Hanapin"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"buksan ang camera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Pumili ng bagong layout ng gawain"</string>
<string name="cancel" msgid="6442560571259935130">"Kanselahin"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Button ng zoom ng pagiging tugma."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Mag-zoom nang mas maliit sa mas malaking screen."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Nakakonekta ang Bluetooth."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Naka-silent ang ringer."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Work mode"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"I-dismiss ang <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Hindi pinansin ang <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Na-dismiss ang lahat ng kamakailang application."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> (na) Device)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Naka-off ang Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Walang available na mga magkapares na device"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> na baterya"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Headset"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Input"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brightness"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Awtomatikong i-rotate"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Awtomatikong i-rotate ang screen"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Kumokonekta..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Nagte-tether"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Mga Notification"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Flashlight"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobile data"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> ang nagamit"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> ang limitasyon"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Babala sa <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Work mode"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Night Light"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Mao-on sa sunset"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Hanggang mag-umaga"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Mao-on sa ganap na <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Hanggang <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"Naka-disable ang NFC"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"Naka-enable ang NFC"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Naka-disable ang <xliff:g id="APP">%s</xliff:g> sa safe-mode."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"I-clear lahat"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"I-drag dito upang magamit ang split screen"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Split Horizontal"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Split Vertical"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Split Custom"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Sa pamamagitan ng mga kontrol sa notification ng power, magagawa mong itakda ang antas ng kahalagahan ng mga notification ng isang app mula 0 hanggang 5. \n\n"<b>"Antas 5"</b>" \n- Ipakita sa itaas ng listahan ng notification \n- Payagan ang pag-istorbo kapag full screen \n- Palaging sumilip \n\n"<b>"Antas 4"</b>" \n- Pigilan ang pag-istorbo kapag full screen \n- Palaging sumilip \n\n"<b>"Antas 3"</b>" \n- Pigilan ang pag-istorbo kapag full screen \n- Huwag kailanman sumilip \n\n"<b>"Antas 2"</b>" \n- Pigilan ang pag-istorbo kapag full screen \n- Huwag kailanman sumilip \n- Huwag kailanman tumunog o mag-vibrate \n\n"<b>"Antas 1"</b>" \n- Pigilan ang pag-istorbo kapag full screen \n- Huwag kailanman sumilip \n- Huwag kailanman tumunog o mag-vibrate \n- Itago sa lock screen at status bar \n- Ipakita sa ibaba ng listahan ng notification \n\n"<b>"Antas 0"</b>" \n- I-block ang lahat ng notification mula sa app"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Mga Notification"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Hindi mo na makikita ang mga notification na ito"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Patuloy na ipakita ang mga notification na ito?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Ihinto ang mga notification"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Patuloy na ipakita"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Clipboard"</item>
<item msgid="5742013440802239414">"Keycode"</item>
<item msgid="8802889973626281575">"Keyboard switcher"</item>
- <item msgid="8175437057325747277">"Wala"</item>
+ <item msgid="7095517796293767867">"Suhestyon sa pag-rotate"</item>
+ <item msgid="8494159969042135235">"Wala"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Karaniwan"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"I-tap para sa mga detalye tungkol sa paggamit ng baterya at data"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"I-off ang mobile data?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Hindi ma-verify ng Mga Setting ang iyong tugon dahil may app na tumatakip sa isang kahilingan sa pagpapahintulot."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Payagan ang <xliff:g id="APP_0">%1$s</xliff:g> na ipakita ang mga slice ng <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Nakakabasa ito ng impormasyon mula sa <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Nakakagawa ito ng mga pagkilos sa loob ng <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Payagan ang <xliff:g id="APP">%1$s</xliff:g> na ipakita ang mga slice mula sa anumang app"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Payagan"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Tanggihan"</string>
</resources>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index 092cfa5..8a289be 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Ana sayfa"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menü"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Erişilebilirlik"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Ekranı döndür"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Genel Bakış"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Ara"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"kamerayı aç"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Yeni görev düzenini seçin"</string>
<string name="cancel" msgid="6442560571259935130">"İptal"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Uyumluluk zum düğmesi."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Daha büyük ekrana daha küçük yakınlaştır."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth bağlandı."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Telefon zili sessiz."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Çalışma modu"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> uygulamasını kapat."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> kaldırıldı."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Tüm son uygulamalar kapatıldı."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> Cihaz)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth Kapalı"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Kullanılabilir eşlenmiş cihaz yok"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Pil düzeyi <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Ses"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Mikrofonlu kulaklık"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Giriş"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Parlaklık"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Otomatik döndür"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Ekranı otomatik döndür"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Bağlanılıyor..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Tethering"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Bildirimler"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Fener"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobil veri"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> kullanıldı"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Sınır: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> uyarısı"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Çalışma modu"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Gece Işığı"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Gün batımı açılacak"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Gün doğumuna kadar"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Şu saatte açılacak: <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Şu saate kadar: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC devre dışı"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC etkin"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g>, güvenli modda devre dışıdır."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Tümünü temizle"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Ekranı bölünmüş olarak kullanmak için burayı sürükleyin"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Yatay Ayırma"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Dikey Ayırma"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Özel Ayırma"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Güç bildirim kontrolleriyle, bir uygulamanın bildirimleri için 0 ile 5 arasında bir önem düzeyi ayarlayabilirsiniz. \n\n"<b>"5. Düzey"</b>" \n- Bildirim listesinin en üstünde gösterilsin \n- Tam ekran kesintisine izin verilsin \n- Ekranda her zaman kısaca belirsin \n\n"<b>"4. Düzey"</b>" \n- Tam ekran kesintisi engellensin \n- Ekranda her zaman kısaca belirsin \n\n"<b>"3. Düzey"</b>" \n- Tam ekran kesintisi engellensin \n- Ekranda hiçbir zaman kısaca belirmesin \n\n"<b>"2. Düzey"</b>" \n- Tam ekran kesintisi engellensin \n- Ekranda hiçbir zaman belirmesin \n- Hiçbir zaman ses çıkarmasın ve titreştirmesin \n\n"<b>"1. Düzey"</b>" \n- Tam ekran kesintisi engellensin \n- Ekranda hiçbir zaman kısaca belirmesin \n- Hiçbir zaman ses çıkarmasın veya titreştirmesin \n- Kilit ekranından ve durum çubuğundan gizlensin \n- Bildirim listesinin en altında gösterilsin \n\n"<b>"0. Düzey"</b>" \n- Uygulamadan gelen tüm bildirimler engellensin"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Bildirimler"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Bu bildirimleri artık görmeyeceksiniz"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Bu bildirimler gösterilmeye devam edilsin mi?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Bildirimleri durdur"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Göstermeye devam et"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Pano"</item>
<item msgid="5742013440802239414">"Tuş kodu"</item>
<item msgid="8802889973626281575">"Klavye değiştirici"</item>
- <item msgid="8175437057325747277">"Yok"</item>
+ <item msgid="7095517796293767867">"Rotasyon önerisi"</item>
+ <item msgid="8494159969042135235">"Yok"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Normal"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Pil ve veri kullanımı ile ilgili ayrıntılar için dokunun"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Mobil veri kapatılsın mı?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Bir uygulama bir izin isteğinin anlaşılmasını engellediğinden, Ayarlar, yanıtınızı doğrulayamıyor."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> uygulamasının, <xliff:g id="APP_2">%2$s</xliff:g> dilimlerini göstermesine izin verilsin mi?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- <xliff:g id="APP">%1$s</xliff:g> uygulamasından bilgileri okuyabilir"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- <xliff:g id="APP">%1$s</xliff:g> uygulamasında işlem yapabilir"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g> uygulamasının tüm uygulamalardan dilimleri göstermesine izin ver"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"İzin ver"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Reddet"</string>
</resources>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index 0790847..f296143 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -90,6 +90,7 @@
<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_rotate_button" msgid="7402949513740253006">"Обернути екран"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Огляд"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Пошук"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
@@ -104,6 +105,12 @@
<string name="camera_label" msgid="7261107956054836961">"відкрити камеру"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Виберіть новий макет завдання"</string>
<string name="cancel" msgid="6442560571259935130">"Скасувати"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Кнопка масштабування сумісності."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Збільшення екрана."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth під’єднано."</string>
@@ -182,7 +189,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Дзвінок беззвучний."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Робочий режим"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Видалити додаток <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Програму <xliff:g id="APP">%s</xliff:g> закрито."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Усі останні додатки закрито."</string>
@@ -281,6 +289,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (пристроїв: <xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth вимкнено"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Немає спарених пристроїв"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> заряду акумулятора"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Аудіопристрій"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Гарнітура"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Джерело сигналу"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Яскравість"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Автоматичне обертання"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Автоматично обертати екран"</string>
@@ -321,6 +333,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"З’єднання…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Режим модема"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Точка доступу"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Сповіщення"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Ліхтарик"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Мобільне передавання даних"</string>
@@ -330,8 +345,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Використовується: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Обмеження: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Застереження: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Робочий режим"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Нічний режим"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Вмикається ввечері"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"До сходу сонця"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Вмикається о <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"До <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC вимкнено"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC ввімкнено"</string>
@@ -344,6 +366,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Додаток <xliff:g id="APP">%s</xliff:g> вимкнено в безпечному режимі."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Очистити все"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Перетягніть сюди, щоб увімкнути режим розділеного екрана"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Розділити горизонтально"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Розділити вертикально"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Розділити (власний варіант)"</string>
@@ -568,6 +592,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"За допомогою елементів керування сповіщеннями ви можете налаштувати пріоритет сповіщень додатка – від 0 до 5 рівня. \n\n"<b>"Рівень 5"</b>\n"- Показувати сповіщення вгорі списку \n- Виводити на весь екран \n- Завжди показувати короткі сповіщення \n\n"<b>"Рівень 4"</b>\n"- Не виводити на весь екран \n- Завжди показувати короткі сповіщення \n\n"<b>"Рівень 3"</b>\n"- Не виводити на весь екран \n- Не показувати короткі сповіщення \n\n"<b>"Рівень 2"</b>\n"- Не виводити на весь екран \n- Не показувати короткі сповіщення \n- Вимкнути звук і вібросигнал \n\n"<b>"Рівень 1"</b>\n"- Не виводити на весь екран \n- Не показувати короткі сповіщення \n- Вимкнути звук і вібросигнал \n- Не показувати на заблокованому екрані та в рядку стану \n- Показувати сповіщення внизу списку \n\n"<b>"Рівень 0"</b>\n"- Блокувати всі сповіщення з додатка"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Сповіщення"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Ви більше не бачитимете цих сповіщень"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Чи показувати ці сповіщення надалі?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Не показувати сповіщення"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Показувати надалі"</string>
@@ -666,7 +692,8 @@
<item msgid="1545641631806817203">"Буфер обміну"</item>
<item msgid="5742013440802239414">"Код клавіші"</item>
<item msgid="8802889973626281575">"Вибір клавіатури"</item>
- <item msgid="8175437057325747277">"Немає"</item>
+ <item msgid="7095517796293767867">"Пропозиція щодо обертання"</item>
+ <item msgid="8494159969042135235">"Немає"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Звичайна панель"</item>
@@ -790,4 +817,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Торкніться, щоб перевірити використання акумулятора й трафік"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Вимкнути мобільний трафік?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Не вдається підтвердити вашу відповідь у налаштуваннях, оскільки інший додаток заступає запит на дозвіл."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Дозволити додатку <xliff:g id="APP_0">%1$s</xliff:g> показувати фрагменти додатка <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Має доступ до інформації з додатка <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Може виконувати дії в додатку <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Дозволити додатку <xliff:g id="APP">%1$s</xliff:g> показувати фрагменти будь-якого додатка"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Дозволити"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Відмовити"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ur/strings.xml b/packages/SystemUI/res/values-ur/strings.xml
index ffcb60a..8099ef4 100644
--- a/packages/SystemUI/res/values-ur/strings.xml
+++ b/packages/SystemUI/res/values-ur/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"اسکرین کو گھمائیں"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"مجموعی جائزہ"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"تلاش کریں"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"کیمرا"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"کیمرا کھولیں"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"نئے کام کا لے آؤٹ منتخب کریں"</string>
<string name="cancel" msgid="6442560571259935130">"منسوخ کریں"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"مطابقت پذیری زوم بٹن۔"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"چھوٹی سے بڑی اسکرین پر زوم کریں۔"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"بلوٹوتھ مربوط ہے۔"</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"رنگر خاموش۔"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"کام موڈ"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> کو مسترد کریں۔"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> کو ہٹا دیا گیا۔"</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"سبھی حالیہ ایپلیکیشنز کو برخاست کر دیا گیا۔"</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"بلوٹوتھ (<xliff:g id="NUMBER">%d</xliff:g> آلات)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"بلوٹوتھ آف ہے"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"کوئی جوڑا بنائے ہوئے آلات دستیاب نہیں ہیں"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> بیٹری"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"آڈیو"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"ہیڈ سیٹ"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"ان پٹ"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"چمکیلا پن"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"خود کار طور پر گھمائیں"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"اسکرین کو خود کار طور پر گھمائیں"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"مربوط ہو رہا ہے…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"ٹیدرنگ"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"ہاٹ اسپاٹ"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"اطلاعات"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"فلیش لائٹ"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"موبائل ڈیٹا"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> استعمال کردہ"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> حد"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> وارننگ"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"کام موڈ"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"نائٹ لائٹ"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"غروب آفتاب کے وقت آن ہوگی"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"طلوع آفتاب تک"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"آن ہوگی بوقت <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> بجے تک"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC غیر فعال ہے"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC فعال ہے"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"محفوظ موڈ میں <xliff:g id="APP">%s</xliff:g> غیر فعال ہوتی ہے۔"</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"سبھی کو صاف کریں"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"اسپلٹ اسکرین استعمال کرنے کیلئے یہاں گھسیٹیں"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"بلحاظ افقی الگ کریں"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"بلحاظ عمودی الگ کریں"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"بلحاظ حسب ضرورت الگ کریں"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"پاور اطلاع کنٹرولز کے ساتھ آپ کسی ایپ کی اطلاعات کیلئے 0 سے 5 تک اہمیت کی سطح سیٹ کر سکتے ہیں۔ \n\n"<b>"سطح 5"</b>\n"- اطلاعات کی فہرست کے اوپر دکھائیں \n- پوری اسکرین کی مداخلت کی اجازت دیں \n- ہمیشہ جھانکنا\n\n"<b>"سطح 4"</b>\n"- پوری اسکرین کی مداخلت کو روکیں \n- ہمیشہ جھانکنا\n\n"<b>"سطح 3"</b>\n"- پوری اسکرین کی مداخلت کو روکیں \n- کبھی نہ جھانکنا \n\n"<b>"سطح 2"</b>\n"- پوری اسکرین کی مداخلت کو روکیں \n- کبھی نہ جھانکنا \n- کبھی آواز اور ارتعاش پیدا نہ کرنا \n\n"<b>" سطح 1"</b>\n"- پوری اسکرین کی مداخلت کو روکنا \n- کبھی نہ جھانکنا \n- کبھی بھی آواز یا ارتعاش پیدا نہ کرنا\n- مقفل اسکرین اور اسٹیٹس بار سے چھپانا \n - اطلاع کی فہرست کی نیچے دکھانا \n\n"<b>"سطح 0"</b>\n"- ایپ سے تمام اطلاعات مسدود کریں"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"اطلاعات"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"آپ کو یہ اطلاعات مزید دکھائی نہیں دیں گی"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"یہ اطلاعات دکھانا جاری رکھیں؟"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"اطلاعات روک دیں"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"دکھانا جاری رکھیں"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"کلپ بورڈ"</item>
<item msgid="5742013440802239414">"کی کوڈ"</item>
<item msgid="8802889973626281575">"کی بورڈ سوئچر"</item>
- <item msgid="8175437057325747277">"کوئی نہیں"</item>
+ <item msgid="7095517796293767867">"گردش کی تجویز"</item>
+ <item msgid="8494159969042135235">"کوئی نہیں"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"حسب معمول"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"بیٹری اور ڈیٹا استعمال کے بارے میں تفصیلات کے لیے تھپتھپائیں"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"موبائل ڈیٹا آف کریں؟"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"چونکہ ایک ایپ اجازت کی درخواست کو مبہم کر رہی ہے، لہذا ترتیبات آپ کے جواب کی توثیق نہیں کر سکتی ہیں۔"</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> کو <xliff:g id="APP_2">%2$s</xliff:g> کے سلائسز دکھانے کی اجازت دیں؟"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- یہ <xliff:g id="APP">%1$s</xliff:g> کی معلومات پڑھ سکتا ہے"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- یہ <xliff:g id="APP">%1$s</xliff:g> کے اندر کارروائیاں کر سکتا ہے"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g> کو کسی بھی ایپ سے سلائسز دکھانے کی اجازت دیں"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"اجازت دیں"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"مسترد کریں"</string>
</resources>
diff --git a/packages/SystemUI/res/values-uz/strings.xml b/packages/SystemUI/res/values-uz/strings.xml
index a8b5e54..612859b 100644
--- a/packages/SystemUI/res/values-uz/strings.xml
+++ b/packages/SystemUI/res/values-uz/strings.xml
@@ -75,7 +75,7 @@
<string name="screenshot_saving_title" msgid="8242282144535555697">"Skrinshot saqlanmoqda…"</string>
<string name="screenshot_saving_text" msgid="2545047868936087248">"Skrinshot saqlanmoqda"</string>
<string name="screenshot_saved_title" msgid="5637073968117370753">"Skrinshot saqlandi"</string>
- <string name="screenshot_saved_text" msgid="7574667448002050363">"Skrinshotni ko‘rish uchun bosing"</string>
+ <string name="screenshot_saved_text" msgid="7574667448002050363">"Skrinshotni ochish uchun bosing"</string>
<string name="screenshot_failed_title" msgid="9096484883063264803">"Skrinshot saqlanmadi"</string>
<string name="screenshot_failed_to_save_unknown_text" msgid="8844781948876286488">"Skrinshotni saqlashda muammo yuz berdi"</string>
<string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"Xotirada joy kamligi uchun skrinshot saqlanmadi"</string>
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Uyga"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menyu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Maxsus imkoniyatlar"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Ekranni burish"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Umumiy nazar"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Qidirish"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"kamerani ochish"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Yangi vazifa tartibini tanlash"</string>
<string name="cancel" msgid="6442560571259935130">"Bekor qilish"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Kattalashtirish tugmasi mosligi."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Kattaroq ekran uchun kichikroqni kattalashtirish."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth ulandi."</string>
@@ -180,7 +187,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Ovozsiz qo‘ng‘iroq."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Ish rejimi"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Olib tashlash: <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> olib tashlangan."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Yaqinda ishlatilgan barcha ilovalar olib tashlandi."</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g>ta qurilma)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Bluetooth o‘chirilgan"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Ulangan qurilmalar topilmadi"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"Batareya quvvati: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Audio"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Garnitura"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Matn kiritish"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Yorqinlik"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Avtomatik burilish"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Ekranning avtomatik burilishi"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Ulanmoqda…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Modem rejimi"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Bildirishnomalar"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Fonar"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Mobil internet"</string>
@@ -326,8 +341,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> ishlatilgan"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Cheklov: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Ogohlantirish: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Ish rejimi"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Tungi rejim"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Kunbotarda yoqish"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Quyosh chiqqunicha"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"<xliff:g id="TIME">%s</xliff:g> da yoqish"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"<xliff:g id="TIME">%s</xliff:g> gacha"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC o‘chiq"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC yoniq"</string>
@@ -340,6 +362,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"Xavfsiz rejimda <xliff:g id="APP">%s</xliff:g> ilovasi o‘chirib qo‘yildi."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Hammasini tozalash"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Ekranni bo‘lish xususiyatidan foydalanish uchun bu yerga torting"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Gorizontal yo‘nalishda bo‘lish"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Vertikal yo‘nalishda bo‘lish"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Boshqa usulda bo‘lish"</string>
@@ -563,12 +587,14 @@
<string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"O‘chiq"</string>
<string name="power_notification_controls_description" msgid="4372459941671353358">"Bildirishnomalar uchun kengaytirilgan boshqaruv yordamida ilova bildirishnomalarining muhimlik darajasini (0-5) sozlash mumkin. \n\n"<b>"5-daraja"</b>" \n- Bildirishnomani ro‘yxatning boshida ko‘rsatish \n- To‘liq ekranli bildirishnomalarni ko‘rsatish \n- Qalqib chiquvchi bildirishnomalarni ko‘rsatish \n\n"<b>"4-daraja"</b>" \n- To‘liq ekranli bildirishnomalarni ko‘rsatmaslik \n- Qalqib chiquvchi bildirishnomalarni ko‘rsatish \n\n"<b>"3-daraja"</b>" \n- To‘liq ekranli bildirishnomalarni ko‘rsatmaslik \n- Qalqib chiquvchi bildirishnomalarni ko‘rsatmaslik \n\n"<b>"2-daraja"</b>" \n- To‘liq ekranli bildirishnomalarni ko‘rsatmaslik \n- Qalqib chiquvchi bildirishnomalarni ko‘rsatmaslik \n- Ovoz va tebranishdan foydalanmaslik \n\n"<b>"1-daraja"</b>" \n- To‘liq ekranli bildirishnomalarni ko‘rsatmaslik \n- Qalqib chiquvchi bildirishnomalarni ko‘rsatmaslik \n- Ovoz va tebranishdan foydalanmaslik \n- Ekran qulfi va holat qatorida ko‘rsatmaslik \n- Bildirishnomani ro‘yxatning oxirida ko‘rsatish \n\n"<b>"0-daraja"</b>" \n- Ilovadan keladigan barcha bildirishnomalarni bloklash"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Bildirishnomalar"</string>
- <string name="notification_channel_disabled" msgid="344536703863700565">"Ushbu bildirishnomalar endi ko‘rsatilmaydi"</string>
- <string name="inline_keep_showing" msgid="8945102997083836858">"Mazkur bildirishnomalar ko‘rsatishda davom etilsinmi?"</string>
- <string name="inline_stop_button" msgid="4172980096860941033">"Bildirishnomalarni to‘xtatish"</string>
- <string name="inline_keep_button" msgid="6665940297019018232">"Ko‘rsatilsin"</string>
- <string name="inline_keep_showing_app" msgid="1723113469580031041">"Bu ilovadan keladigan bildirishnomalar ko‘rsatishda davom etilsinmi?"</string>
- <string name="notification_unblockable_desc" msgid="1037434112919403708">"Ushbu bildirishnomalarni o‘chirib bo‘lmaydi"</string>
+ <string name="notification_channel_disabled" msgid="344536703863700565">"Bu bildirishnomalar endi chiqmaydi"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
+ <string name="inline_keep_showing" msgid="8945102997083836858">"Mazkur bildirishnomalar chiqaversinmi?"</string>
+ <string name="inline_stop_button" msgid="4172980096860941033">"Chiqmasin"</string>
+ <string name="inline_keep_button" msgid="6665940297019018232">"Ha"</string>
+ <string name="inline_keep_showing_app" msgid="1723113469580031041">"Bu ilovadan keladigan bildirishnomalar chiqaversinmi?"</string>
+ <string name="notification_unblockable_desc" msgid="1037434112919403708">"Bu bildirishnomalarni chiqmaydigan qilish imkonsiz"</string>
<string name="notification_channel_controls_opened_accessibility" msgid="6553950422055908113">"<xliff:g id="APP_NAME">%1$s</xliff:g> uchun bildirishnoma sozlamalari ochildi"</string>
<string name="notification_channel_controls_closed_accessibility" msgid="7521619812603693144">"<xliff:g id="APP_NAME">%1$s</xliff:g> uchun bildirishnoma sozlamalari yopildi"</string>
<string name="notification_channel_switch_accessibility" msgid="3420796005601900717">"Bu kanaldan keladigan bildirishnomalarga ruxsat berish"</string>
@@ -658,7 +684,8 @@
<item msgid="1545641631806817203">"Vaqtinchalik xotira"</item>
<item msgid="5742013440802239414">"Tugma kodi"</item>
<item msgid="8802889973626281575">"Klaviaturani almashtirish"</item>
- <item msgid="8175437057325747277">"Hech biri"</item>
+ <item msgid="7095517796293767867">"Burilish"</item>
+ <item msgid="8494159969042135235">"Hech biri"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Odatiy"</item>
@@ -782,4 +809,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Batareya va trafik sarfi tafsilotlari uchun ustiga bosing"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Mobil internet o‘chirib qo‘yilsinmi?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Ilova ruxsatnoma so‘roviga xalaqit qilayotgani tufayli, “Sozlamalar” ilovasi javobingizni tekshira olmaydi."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"<xliff:g id="APP_0">%1$s</xliff:g> ilovasiga <xliff:g id="APP_2">%2$s</xliff:g> ilovasidan fragmentlar ko‘rsatishga ruxsat berilsinmi?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"– <xliff:g id="APP">%1$s</xliff:g> ma’lumotlarini o‘qiy oladi"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"– <xliff:g id="APP">%1$s</xliff:g> ichida amallar bajara oladi"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"<xliff:g id="APP">%1$s</xliff:g> ilovasiga boshqa ilovalardan fragmentlarni ko‘rsatishga ruxsat berish"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Ruxsat"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Rad etish"</string>
</resources>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index e5c25dc..83bcae5 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Trang chủ"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Menu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Trợ năng"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Xoay màn hình"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Tổng quan"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Tìm kiếm"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Máy ảnh"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"mở máy ảnh"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Chọn bố cục tác vụ mới"</string>
<string name="cancel" msgid="6442560571259935130">"Hủy"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Nút thu phóng khả năng tương thích."</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Thu phóng màn hình lớn hơn hoặc nhỏ hơn."</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Đã kết nối bluetooth."</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Chuông im lặng."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Chế độ làm việc"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Xóa bỏ <xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> đã bị loại bỏ."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Đã bỏ qua tất cả các ứng dụng gần đây."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> thiết bị)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"Đã tắt Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Không có thiết bị nào được ghép nối"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> pin"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Âm thanh"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Tai nghe"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Thiết bị đầu vào"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Độ sáng"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Tự động xoay"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Tự động xoay màn hình"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Đang kết nối..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Đang dùng làm điểm truy cập Internet"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"Điểm phát sóng"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Thông báo"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"Đèn pin"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Dữ liệu di động"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Đã sử dụng <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Giới hạn <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Cảnh báo <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Chế độ làm việc"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Đèn đọc sách"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Bật khi trời tối"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Cho đến khi trời sáng"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Bật vào lúc <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Cho đến <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC đã được tắt"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC đã được bật"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> bị tắt ở chế độ an toàn."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Xóa tất cả"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Kéo vào đây để sử dụng chế độ chia đôi màn hình"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Phân tách ngang"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Phân tách dọc"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Tùy chỉnh phân tách"</string>
@@ -564,6 +588,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Với các kiểm soát thông báo nguồn, bạn có thể đặt cấp độ quan trọng từ 0 đến 5 cho các thông báo của ứng dụng. \n\n"<b>"Cấp 5"</b>" \n- Hiển thị ở đầu danh sách thông báo \n- Cho phép gián đoạn ở chế độ toàn màn hình \n- Luôn xem nhanh \n\n"<b>"Cấp 4"</b>" \n- Ngăn gián đoạn ở chế độ toàn màn hình \n- Luôn xem nhanh \n\n"<b>"Cấp 3"</b>" \n- Ngăn gián đoạn ở chế độ toàn màn hình \n- Không bao giờ xem nhanh \n\n"<b>"Cấp 2"</b>" \n- Ngăn gián đoạn ở chế độ toàn màn hình \n- Không bao giờ xem nhanh \n- Không bao giờ có âm báo và rung \n\n"<b>"Cấp 1"</b>" \n- Ngăn gián đoạn ở chế độ toàn màn hình \n- Không bao giờ xem nhanh \n- Không bao giờ có âm báo và rung \n- Ẩn khỏi màn hình khóa và thanh trạng thái \n- Hiển thị ở cuối danh sách thông báo \n\n"<b>"Cấp 0"</b>" \n- Chặn tất cả các thông báo từ ứng dụng"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Thông báo"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Bạn sẽ không thấy các thông báo này nữa"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Tiếp tục hiển thị các thông báo này?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Dừng thông báo"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Tiếp tục hiển thị"</string>
@@ -658,7 +684,8 @@
<item msgid="1545641631806817203">"Khay nhớ tạm"</item>
<item msgid="5742013440802239414">"Mã phím"</item>
<item msgid="8802889973626281575">"Trình chuyển đổi bàn phím"</item>
- <item msgid="8175437057325747277">"Không có"</item>
+ <item msgid="7095517796293767867">"Đề xuất xoay"</item>
+ <item msgid="8494159969042135235">"Không có"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Bình thường"</item>
@@ -782,4 +809,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Nhấn để biết chi tiết về mức sử dụng dữ liệu và pin"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Tắt dữ liệu di động?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Vì ứng dụng đang che khuất yêu cầu cấp quyền nên Cài đặt không thể xác minh câu trả lời của bạn."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Cho phép <xliff:g id="APP_0">%1$s</xliff:g> hiển thị các lát của <xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Có thể đọc thông tin từ <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Có thể thực hiện hành động bên trong <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Cho phép <xliff:g id="APP">%1$s</xliff:g> hiển thị các lát từ mọi ứng dụng"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Cho phép"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Từ chối"</string>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 94a9961..559b2ea 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -33,13 +33,10 @@
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"正在进行的"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"通知"</string>
<string name="battery_low_title" msgid="6456385927409742437">"电池电量偏低"</string>
- <!-- no translation found for battery_low_title_hybrid (6268991275887381595) -->
- <skip />
+ <string name="battery_low_title_hybrid" msgid="6268991275887381595">"电池电量不足,请开启省电模式"</string>
<string name="battery_low_percent_format" msgid="2900940511201380775">"剩余<xliff:g id="PERCENTAGE">%s</xliff:g>"</string>
- <!-- no translation found for battery_low_percent_format_hybrid (6838677459286775617) -->
- <skip />
- <!-- no translation found for battery_low_percent_format_hybrid_short (9025795469949145586) -->
- <skip />
+ <string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"剩余电量:<xliff:g id="PERCENTAGE">%s</xliff:g>;根据您的使用情况,大约还可使用 <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"剩余电量:<xliff:g id="PERCENTAGE">%s</xliff:g>;大约还可使用 <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="battery_low_percent_format_saver_started" msgid="7879389868952879166">"剩余 <xliff:g id="PERCENTAGE">%s</xliff:g>。省电模式已开启。"</string>
<string name="invalid_charger" msgid="4549105996740522523">"不支持USB充电功能。\n只能使用随附的充电器充电。"</string>
<string name="invalid_charger_title" msgid="3515740382572798460">"不支持USB充电。"</string>
@@ -73,22 +70,15 @@
<string name="usb_debugging_secondary_user_message" msgid="6067122453571699801">"目前已登录此设备的用户无法开启 USB 调试功能。要使用此功能,请切换为主要用户的帐号。"</string>
<string name="compat_mode_on" msgid="6623839244840638213">"缩放以填满屏幕"</string>
<string name="compat_mode_off" msgid="4434467572461327898">"拉伸以填满屏幕"</string>
- <!-- no translation found for global_action_screenshot (8329831278085426283) -->
- <skip />
+ <string name="global_action_screenshot" msgid="8329831278085426283">"屏幕截图"</string>
<string name="screenshot_saving_ticker" msgid="7403652894056693515">"正在保存屏幕截图..."</string>
<string name="screenshot_saving_title" msgid="8242282144535555697">"正在保存屏幕截图..."</string>
- <!-- no translation found for screenshot_saving_text (2545047868936087248) -->
- <skip />
- <!-- no translation found for screenshot_saved_title (5637073968117370753) -->
- <skip />
- <!-- no translation found for screenshot_saved_text (7574667448002050363) -->
- <skip />
- <!-- no translation found for screenshot_failed_title (9096484883063264803) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_unknown_text (8844781948876286488) -->
- <skip />
- <!-- no translation found for screenshot_failed_to_save_text (3041612585107107310) -->
- <skip />
+ <string name="screenshot_saving_text" msgid="2545047868936087248">"正在保存屏幕截图"</string>
+ <string name="screenshot_saved_title" msgid="5637073968117370753">"已保存屏幕截图"</string>
+ <string name="screenshot_saved_text" msgid="7574667448002050363">"点按即可查看您的屏幕截图"</string>
+ <string name="screenshot_failed_title" msgid="9096484883063264803">"无法抓取屏幕截图"</string>
+ <string name="screenshot_failed_to_save_unknown_text" msgid="8844781948876286488">"保存屏幕截图时出现问题"</string>
+ <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"由于存储空间有限,无法保存屏幕截图"</string>
<string name="screenshot_failed_to_capture_text" msgid="173674476457581486">"此应用或您所在的单位不允许进行屏幕截图"</string>
<string name="usb_preference_title" msgid="6551050377388882787">"USB文件传输选项"</string>
<string name="use_mtp_button_title" msgid="4333504413563023626">"作为媒体播放器(MTP)装载"</string>
@@ -98,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"旋转屏幕"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"概览"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"搜索"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"相机"</string>
@@ -112,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"打开相机"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"选择新的任务布局"</string>
<string name="cancel" msgid="6442560571259935130">"取消"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"兼容性缩放按钮。"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"将小屏幕的图片放大在较大屏幕上显示。"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"蓝牙已连接。"</string>
@@ -188,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"振铃器静音。"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"工作模式"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"移除<xliff:g id="APP">%s</xliff:g>。"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"已删除<xliff:g id="APP">%s</xliff:g>"</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"已关闭所有最近用过的应用。"</string>
@@ -285,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"蓝牙(<xliff:g id="NUMBER">%d</xliff:g> 台设备)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"蓝牙:关闭"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"没有可用的配对设备"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"电池电量:<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"音频"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"耳机"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"输入"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"亮度"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"自动旋转"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"自动旋转屏幕"</string>
@@ -325,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"正在连接…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"网络共享"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"热点"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"通知"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"手电筒"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"移动数据"</string>
@@ -334,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"已使用<xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"上限为<xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g>警告"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"工作模式"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"夜间模式"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"在日落时开启"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"在日出时关闭"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"在<xliff:g id="TIME">%s</xliff:g> 开启"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"在<xliff:g id="TIME">%s</xliff:g> 关闭"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC 已停用"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC 已启用"</string>
@@ -348,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g>已在安全模式下停用。"</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"全部清除"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"在此处拖动即可使用分屏功能"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"水平分割"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"垂直分割"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"自定义分割"</string>
@@ -571,27 +585,21 @@
<string name="tuner_full_importance_settings_off" msgid="8208165412614935229">"关闭"</string>
<string name="power_notification_controls_description" msgid="4372459941671353358">"利用高级通知设置,您可以为应用通知设置从 0 级到 5 级的重要程度等级。\n\n"<b>"5 级"</b>" \n- 在通知列表顶部显示 \n- 允许全屏打扰 \n- 一律短暂显示通知 \n\n"<b>"4 级"</b>" \n- 禁止全屏打扰 \n- 一律短暂显示通知 \n\n"<b>"3 级"</b>" \n- 禁止全屏打扰 \n- 一律不短暂显示通知 \n\n"<b>"2 级"</b>" \n- 禁止全屏打扰 \n- 一律不短暂显示通知 \n- 一律不发出声音或振动 \n\n"<b>"1 级"</b>" \n- 禁止全屏打扰 \n- 一律不短暂显示通知 \n- 一律不发出声音或振动 \n- 不在锁定屏幕和状态栏中显示 \n- 在通知列表底部显示 \n\n"<b>"0 级"</b>" \n- 屏蔽应用的所有通知"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"通知"</string>
- <!-- no translation found for notification_channel_disabled (344536703863700565) -->
+ <string name="notification_channel_disabled" msgid="344536703863700565">"您将不会再看到这些通知"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
<skip />
- <!-- no translation found for inline_keep_showing (8945102997083836858) -->
- <skip />
- <!-- no translation found for inline_stop_button (4172980096860941033) -->
- <skip />
- <!-- no translation found for inline_keep_button (6665940297019018232) -->
- <skip />
- <!-- no translation found for inline_keep_showing_app (1723113469580031041) -->
- <skip />
- <!-- no translation found for notification_unblockable_desc (1037434112919403708) -->
- <skip />
+ <string name="inline_keep_showing" msgid="8945102997083836858">"要继续显示这些通知吗?"</string>
+ <string name="inline_stop_button" msgid="4172980096860941033">"停止通知"</string>
+ <string name="inline_keep_button" msgid="6665940297019018232">"继续显示"</string>
+ <string name="inline_keep_showing_app" msgid="1723113469580031041">"要继续显示来自此应用的通知吗?"</string>
+ <string name="notification_unblockable_desc" msgid="1037434112919403708">"无法关闭这些通知"</string>
<string name="notification_channel_controls_opened_accessibility" msgid="6553950422055908113">"<xliff:g id="APP_NAME">%1$s</xliff:g>的通知控件已打开"</string>
<string name="notification_channel_controls_closed_accessibility" msgid="7521619812603693144">"<xliff:g id="APP_NAME">%1$s</xliff:g>的通知控件已关闭"</string>
<string name="notification_channel_switch_accessibility" msgid="3420796005601900717">"允许接收来自此频道的通知"</string>
<string name="notification_more_settings" msgid="816306283396553571">"更多设置"</string>
- <!-- no translation found for notification_app_settings (420348114670768449) -->
- <skip />
+ <string name="notification_app_settings" msgid="420348114670768449">"自定义"</string>
<string name="notification_done" msgid="5279426047273930175">"完成"</string>
- <!-- no translation found for inline_undo (558916737624706010) -->
- <skip />
+ <string name="inline_undo" msgid="558916737624706010">"撤消"</string>
<string name="notification_menu_accessibility" msgid="2046162834248888553">"<xliff:g id="APP_NAME">%1$s</xliff:g><xliff:g id="MENU_DESCRIPTION">%2$s</xliff:g>"</string>
<string name="notification_menu_gear_description" msgid="2204480013726775108">"通知设置"</string>
<string name="notification_menu_snooze_description" msgid="3653669438131034525">"通知延后选项"</string>
@@ -674,7 +682,8 @@
<item msgid="1545641631806817203">"剪贴板"</item>
<item msgid="5742013440802239414">"键码"</item>
<item msgid="8802889973626281575">"键盘切换器"</item>
- <item msgid="8175437057325747277">"无"</item>
+ <item msgid="7095517796293767867">"旋转建议"</item>
+ <item msgid="8494159969042135235">"无"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"一般"</item>
@@ -798,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"点按即可详细了解电量和流量消耗情况"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"要关闭移动数据网络吗?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"由于某个应用遮挡了权限请求界面,因此“设置”应用无法验证您的回应。"</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"要允许“<xliff:g id="APP_0">%1$s</xliff:g>”显示“<xliff:g id="APP_2">%2$s</xliff:g>”图块吗?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- 可以读取“<xliff:g id="APP">%1$s</xliff:g>”中的信息"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- 可以在“<xliff:g id="APP">%1$s</xliff:g>”内执行操作"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"允许“<xliff:g id="APP">%1$s</xliff:g>”显示任何应用的图块"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"允许"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"拒绝"</string>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index 3e624f2..0283092 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"旋轉螢幕"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"概覽"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"搜尋"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"相機"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"開啟相機"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"選取新的工作版面配置"</string>
<string name="cancel" msgid="6442560571259935130">"取消"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"相容性縮放按鈕。"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"將較小螢幕的畫面放大在較大螢幕上顯示。"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"藍牙連線已建立。"</string>
@@ -180,7 +187,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"鈴聲靜音。"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"工作模式"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"關閉「<xliff:g id="APP">%s</xliff:g>」。"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"「<xliff:g id="APP">%s</xliff:g>」已關閉。"</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"所有最近使用的應用程式均已關閉。"</string>
@@ -277,6 +285,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"藍牙 (<xliff:g id="NUMBER">%d</xliff:g> 部裝置)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"藍牙關閉"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"找不到配對的裝置"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"電量:<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"音訊"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"耳機"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"輸入"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"亮度"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"自動旋轉"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"自動旋轉螢幕"</string>
@@ -317,6 +329,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"正在連線…"</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"網絡共享"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"熱點"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"通知"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"閃光燈"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"流動數據"</string>
@@ -326,8 +341,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"已使用 <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"上限為 <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> 警告"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"工作模式"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"夜燈模式"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"在日落時開啟"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"在日出時關閉"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"在<xliff:g id="TIME">%s</xliff:g>開啟"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"在<xliff:g id="TIME">%s</xliff:g>關閉"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC 已停用"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC 已啟用"</string>
@@ -340,6 +362,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"「<xliff:g id="APP">%s</xliff:g>」已在安全模式中停用。"</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"全部清除"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"在這裡拖曳即可分割螢幕"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"水平分割"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"垂直分割"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"自訂分割"</string>
@@ -564,6 +588,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"通知控制項讓您設定應用程式通知的重要性 (0 至 5 級)。\n\n"<b>"第 5 級"</b>" \n- 在通知清單頂部顯示 \n- 允許全螢幕騷擾 \n- 一律顯示通知 \n\n"<b>"第 4 級"</b>" \n- 阻止全螢幕騷擾 \n- 一律顯示通知 \n\n"<b>"第 3 級"</b>" \n- 阻止全螢幕騷擾 \n- 永不顯示通知 \n\n"<b>"第 2 級"</b>" \n- 阻止全螢幕騷擾 \n- 永不顯示通知 \n- 永不發出聲響和震動 \n\n"<b>"第 1 級"</b>" \n- 阻止全螢幕騷擾 \n- 永不顯示通知 \n- 永不發出聲響和震動 \n- 從上鎖畫面和狀態列中隱藏 \n- 在通知清單底部顯示 \n\n"<b>"第 0 級"</b>" \n- 封鎖所有應用程式通知"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"通知"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"您不會再看到這些通知"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"要繼續顯示這些通知嗎?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"停止通知"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"繼續顯示"</string>
@@ -658,7 +684,8 @@
<item msgid="1545641631806817203">"剪貼簿"</item>
<item msgid="5742013440802239414">"按鍵碼"</item>
<item msgid="8802889973626281575">"鍵盤切換工具"</item>
- <item msgid="8175437057325747277">"無"</item>
+ <item msgid="7095517796293767867">"旋轉建議"</item>
+ <item msgid="8494159969042135235">"無"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"一般"</item>
@@ -782,4 +809,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"輕按即可查看電池和數據用量詳情"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"要關閉流動數據嗎?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"由於某個應用程式已阻擋權限要求畫面,因此「設定」應用程式無法驗證您的回應。"</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"要允許「<xliff:g id="APP_0">%1$s</xliff:g>」顯示「<xliff:g id="APP_2">%2$s</xliff:g>」的快訊嗎?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- 可以讀取「<xliff:g id="APP">%1$s</xliff:g>」中的資料"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- 可以在「<xliff:g id="APP">%1$s</xliff:g>」內執行操作"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"允許「<xliff:g id="APP">%1$s</xliff:g>」顯示任何應用程式的快訊"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"允許"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"拒絕"</string>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index e6ff9d7..e08bf69 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -33,7 +33,7 @@
<string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"進行中"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"通知"</string>
<string name="battery_low_title" msgid="6456385927409742437">"電池電力不足"</string>
- <string name="battery_low_title_hybrid" msgid="6268991275887381595">"電池電力不足,請開啟節約耗電量模式"</string>
+ <string name="battery_low_title_hybrid" msgid="6268991275887381595">"電池電量偏低,請開啟節約耗電量模式"</string>
<string name="battery_low_percent_format" msgid="2900940511201380775">"僅剩 <xliff:g id="PERCENTAGE">%s</xliff:g>"</string>
<string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"電力剩餘 <xliff:g id="PERCENTAGE">%s</xliff:g>,根據你的使用情形,剩餘時間大約還有 <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"電力剩餘 <xliff:g id="PERCENTAGE">%s</xliff:g>,剩餘時間大約還有 <xliff:g id="TIME">%s</xliff:g>"</string>
@@ -88,6 +88,7 @@
<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_rotate_button" msgid="7402949513740253006">"旋轉螢幕"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"總覽"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"搜尋"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"相機"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"開啟攝影機"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"選取新工作版面配置"</string>
<string name="cancel" msgid="6442560571259935130">"取消"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"相容性縮放按鈕。"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"將較小螢幕的畫面放大在較大螢幕上顯示。"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"藍牙連線已建立。"</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"鈴聲靜音。"</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"工作模式"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"關閉「<xliff:g id="APP">%s</xliff:g>」。"</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"「<xliff:g id="APP">%s</xliff:g>」已關閉。"</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"最近使用的應用程式已全部關閉。"</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"藍牙 (<xliff:g id="NUMBER">%d</xliff:g> 個裝置)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"關閉藍牙"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"找不到配對的裝置"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"電量:<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"音訊"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"耳機"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"輸入"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"亮度"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"自動旋轉"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"自動旋轉螢幕"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"連線中..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"網路共用"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"無線基地台"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"通知"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"手電筒"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"行動數據"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"已使用 <xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"上限為 <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> 警告"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"工作模式"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"夜燈"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"於日落時開啟"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"於日出時關閉"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"開啟時間:<xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"關閉時間:<xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"NFC 已停用"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"NFC 已啟用"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"「<xliff:g id="APP">%s</xliff:g>」在安全模式中為停用狀態。"</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"全部清除"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"拖曳到這裡即可使用分割畫面"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"水平分割"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"垂直分割"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"自訂分割"</string>
@@ -562,8 +586,10 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"只要使用電源通知控制項,你就能為應用程式通知設定從 0 到 5 的重要性等級。\n\n"<b>"等級 5"</b>" \n- 顯示在通知清單頂端 \n- 允許全螢幕通知 \n- 一律允許短暫顯示通知 \n\n"<b>"等級 4"</b>" \n- 禁止全螢幕通知 \n- 一律允許短暫顯示通知 \n\n"<b>"等級 3"</b>" \n- 禁止全螢幕通知 \n- 一律不允許短暫顯示通知 \n\n"<b>"等級 2"</b>" \n- 禁止全螢幕通知 \n- 一律不允許短暫顯示通知 \n- 一律不發出音效或震動 \n\n"<b>"等級 1"</b>" \n- 禁止全螢幕通知 \n- 一律不允許短暫顯示通知 \n- 一律不發出音效或震動 \n- 在鎖定畫面和狀態列中隱藏 \n- 顯示在通知清單底端 \n\n"<b>"等級 0"</b>" \n- 封鎖應用程式的所有通知"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"通知"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"你不會再看到這些通知"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"要繼續顯示這些通知嗎?"</string>
- <string name="inline_stop_button" msgid="4172980096860941033">"停止通知"</string>
+ <string name="inline_stop_button" msgid="4172980096860941033">"停止顯示通知"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"繼續顯示"</string>
<string name="inline_keep_showing_app" msgid="1723113469580031041">"要繼續顯示這個應用程式的通知嗎?"</string>
<string name="notification_unblockable_desc" msgid="1037434112919403708">"無法關閉這些通知"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"剪貼簿"</item>
<item msgid="5742013440802239414">"按鍵碼"</item>
<item msgid="8802889973626281575">"鍵盤切換工具"</item>
- <item msgid="8175437057325747277">"無"</item>
+ <item msgid="7095517796293767867">"旋轉建議"</item>
+ <item msgid="8494159969042135235">"無"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"一般"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"輕觸即可查看電池和數據用量詳情"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"要關閉行動數據嗎?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"由於某個應用程式覆蓋了權限要求畫面,因此「設定」應用程式無法驗證你的回應。"</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"要允許「<xliff:g id="APP_0">%1$s</xliff:g>」顯示「<xliff:g id="APP_2">%2$s</xliff:g>」的區塊嗎?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- 它可以讀取「<xliff:g id="APP">%1$s</xliff:g>」的資訊"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- 它可以在「<xliff:g id="APP">%1$s</xliff:g>」內執行操作"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"允許「<xliff:g id="APP">%1$s</xliff:g>」顯示任何應用程式的區塊"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"允許"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"拒絕"</string>
</resources>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index a0eb56f..a99b8cc 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -88,6 +88,7 @@
<string name="accessibility_home" msgid="8217216074895377641">"Ekhaya"</string>
<string name="accessibility_menu" msgid="316839303324695949">"Imenyu"</string>
<string name="accessibility_accessibility_button" msgid="7601252764577607915">"Ukufinyeleleka"</string>
+ <string name="accessibility_rotate_button" msgid="7402949513740253006">"Zungezisa isikrini"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"Buka konke"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"Sesha"</string>
<string name="accessibility_camera_button" msgid="8064671582820358152">"Ikhamela"</string>
@@ -102,6 +103,12 @@
<string name="camera_label" msgid="7261107956054836961">"vula ikhamera"</string>
<string name="recents_caption_resize" msgid="3517056471774958200">"Khetha isakhiwo somsebenzi omusha"</string>
<string name="cancel" msgid="6442560571259935130">"Khansela"</string>
+ <!-- no translation found for accessibility_fingerprint_dialog_fingerprint_icon (3125122495414253226) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_app_icon (3228052542929174609) -->
+ <skip />
+ <!-- no translation found for accessibility_fingerprint_dialog_help_area (5730471601819225159) -->
+ <skip />
<string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Inkinobho evumelekile yokusondeza"</string>
<string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Sondeza kancane esikrinini esikhudlwana"</string>
<string name="accessibility_bluetooth_connected" msgid="2707027633242983370">"Bluetooth ixhunyiwe"</string>
@@ -178,7 +185,8 @@
<string name="accessibility_ringer_silent" msgid="9061243307939135383">"Isikhali sithulile."</string>
<!-- no translation found for accessibility_casting (6887382141726543668) -->
<skip />
- <string name="accessibility_work_mode" msgid="2478631941714607225">"Imodi yomsebenzi"</string>
+ <!-- no translation found for accessibility_work_mode (702887484664647430) -->
+ <skip />
<string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Cashisa i-<xliff:g id="APP">%s</xliff:g>."</string>
<string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ivaliwe."</string>
<string name="accessibility_recents_all_items_dismissed" msgid="4464697366179168836">"Zonke izinhlelo zokusebenza zakamuva zicashisiwe."</string>
@@ -275,6 +283,10 @@
<string name="quick_settings_bluetooth_multiple_devices_label" msgid="3912245565613684735">"I-Bluetooth (<xliff:g id="NUMBER">%d</xliff:g> amadivayisi)"</string>
<string name="quick_settings_bluetooth_off_label" msgid="8159652146149219937">"I-Bluetooth ivaliwe"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="4910015762433302860">"Awekho amadivayisi abhanqiwe atholakalayo"</string>
+ <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="7106697106764717416">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ibhethri"</string>
+ <string name="quick_settings_bluetooth_secondary_label_audio" msgid="5673845963301132071">"Umsindo"</string>
+ <string name="quick_settings_bluetooth_secondary_label_headset" msgid="1880572731276240588">"Ihedisethi"</string>
+ <string name="quick_settings_bluetooth_secondary_label_input" msgid="2173322305072945905">"Okokufaka"</string>
<string name="quick_settings_brightness_label" msgid="6968372297018755815">"Ukugqama"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="7305323031808150099">"Ukuphenduka okuzenzakalelayo"</string>
<string name="accessibility_quick_settings_rotation" msgid="4231661040698488779">"Phendula iskrini ngokuzenzakalela"</string>
@@ -315,6 +327,9 @@
<string name="quick_settings_connecting" msgid="47623027419264404">"Iyaxhuma..."</string>
<string name="quick_settings_tethering_label" msgid="7153452060448575549">"Ukusebenzisa njengemodemu"</string>
<string name="quick_settings_hotspot_label" msgid="6046917934974004879">"I-Hotspot"</string>
+ <!-- no translation found for quick_settings_hotspot_secondary_label_transient (7161046712706277215) -->
+ <skip />
+ <!-- no translation found for quick_settings_hotspot_secondary_label_num_devices (2324635800672199428) -->
<string name="quick_settings_notifications_label" msgid="4818156442169154523">"Izaziso"</string>
<string name="quick_settings_flashlight_label" msgid="2133093497691661546">"I-Flashlight"</string>
<string name="quick_settings_cellular_detail_title" msgid="3661194685666477347">"Idatha yeselula"</string>
@@ -324,8 +339,15 @@
<string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"<xliff:g id="DATA_USED">%s</xliff:g> isetshenzisiwe"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"<xliff:g id="DATA_LIMIT">%s</xliff:g> umkhawulo"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"<xliff:g id="DATA_LIMIT">%s</xliff:g> isexwayiso"</string>
- <string name="quick_settings_work_mode_label" msgid="6244915274350490429">"Imodi yomsebenzi"</string>
+ <!-- no translation found for quick_settings_work_mode_on_label (3421274215098764735) -->
+ <skip />
+ <!-- no translation found for quick_settings_work_mode_off_label (8856918707867192186) -->
+ <skip />
<string name="quick_settings_night_display_label" msgid="3577098011487644395">"Ukukhanya kwasebusuku"</string>
+ <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="8483259341596943314">"Kuvulwe ekushoneni kwelanga"</string>
+ <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4453017157391574402">"Kuze kube sekuphumeni kwelanga"</string>
+ <string name="quick_settings_night_secondary_label_on_at" msgid="6256314040368487637">"Kuvulwe ngo-<xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="quick_settings_night_secondary_label_until" msgid="8664820079774824618">"Kuze kube ngu-<xliff:g id="TIME">%s</xliff:g>"</string>
<string name="quick_settings_nfc_label" msgid="9012153754816969325">"I-NFC"</string>
<string name="quick_settings_nfc_off" msgid="6883274004315134333">"I-NFC ikhutshaziwe"</string>
<string name="quick_settings_nfc_on" msgid="6680317193676884311">"I-NFC inikwe amandla"</string>
@@ -338,6 +360,8 @@
<string name="recents_launch_disabled_message" msgid="1624523193008871793">"I-<xliff:g id="APP">%s</xliff:g> ikhutshaziwe kumodi yokuphepha."</string>
<string name="recents_stack_action_button_label" msgid="6593727103310426253">"Sula konke"</string>
<string name="recents_drag_hint_message" msgid="2649739267073203985">"Hudulela lapha ukuze usebenzise ukuhlukanisa kwesikrini"</string>
+ <!-- no translation found for recents_swipe_up_onboarding (3824607135920170001) -->
+ <skip />
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Hlukanisa okuvundlile"</string>
<string name="recents_multistack_add_stack_dialog_split_vertical" msgid="9075292233696180813">"Hlukanisa okumile"</string>
<string name="recents_multistack_add_stack_dialog_split_custom" msgid="4177837597513701943">"Hlukanisa kwezifiso"</string>
@@ -562,6 +586,8 @@
<string name="power_notification_controls_description" msgid="4372459941671353358">"Ngezilawuli zesaziso zamandla, ungasetha ileveli ebalulekile kusuka ku-0 kuya ku-5 kusuka kuzaziso zohlelo lokusebenza. \n\n"<b>"Ileveli 5"</b>" \n- Ibonisa phezulu kuhlu lwesaziso \n- Vumela ukuphazamiseka kwesikrini esigcwele \n- Ukuhlola njalo \n\n"<b>"Ileveli 4"</b>" \n- Gwema ukuphazamiseka kwesikrini esigcwele \n- Ukuhlola njalo \n\n"<b>"Ileveli 3"</b>" \n- Gwema ukuphazamiseka kwesikrini esigcwele \n- Ukungahloli \n\n"<b>"Ileveli 2"</b>" \n- Gwema ukuphazamiseka kwesikrini esigcwele \n- Ukungahloli \n- Ungenzi umsindo nokudlidliza \n\n"<b>"Ileveli 1"</b>" \n- Gwema ukuphazamiseka kwesikrini esigcwele \n- Ukungahloli \n- Ungenzi umsindo noma ukudlidliza \n- Fihla kusuka kusikrini sokukhiya nebha yesimo \n- Bonisa phansi kohlu lwesaziso \n\n"<b>"Ileveli 0"</b>" \n- Vimbela zonke izaziso kusuka kuhlelo lokusebenza"</string>
<string name="notification_header_default_channel" msgid="7506845022070889909">"Izaziso"</string>
<string name="notification_channel_disabled" msgid="344536703863700565">"Ngeke usabona lezi zaziso"</string>
+ <!-- no translation found for inline_blocking_helper (3055064577771478591) -->
+ <skip />
<string name="inline_keep_showing" msgid="8945102997083836858">"Qhubeka nokubonisa lezi zaziso?"</string>
<string name="inline_stop_button" msgid="4172980096860941033">"Misa izaziso"</string>
<string name="inline_keep_button" msgid="6665940297019018232">"Qhubeka nokubonisa"</string>
@@ -656,7 +682,8 @@
<item msgid="1545641631806817203">"Ibhodi lokumanathisela"</item>
<item msgid="5742013440802239414">"Ikhodi yokhiye"</item>
<item msgid="8802889973626281575">"Isishintshi sekhibhodi"</item>
- <item msgid="8175437057325747277">"Akunalutho"</item>
+ <item msgid="7095517796293767867">"Isiphakamiso sokuzungezisa"</item>
+ <item msgid="8494159969042135235">"Lutho"</item>
</string-array>
<string-array name="nav_bar_layouts">
<item msgid="8077901629964902399">"Okujwayelekile"</item>
@@ -780,4 +807,10 @@
<string name="running_foreground_services_msg" msgid="6326247670075574355">"Thepha ngemininingwane ekusetshenzisweni kwebhethri nedatha"</string>
<string name="data_usage_disable_mobile" msgid="5116269981510015864">"Vala idatha yeselula?"</string>
<string name="touch_filtered_warning" msgid="8671693809204767551">"Ngoba uhlelo lokusebenza lusitha isicelo semvume, Izilungiselelo azikwazi ukuqinisekisa impendulo yakho."</string>
+ <string name="slice_permission_title" msgid="7465009437851044444">"Vumela i-<xliff:g id="APP_0">%1$s</xliff:g> ukuthi ibonise izingcezu ze-<xliff:g id="APP_2">%2$s</xliff:g>?"</string>
+ <string name="slice_permission_text_1" msgid="3514586565609596523">"- Ingafunda ulwazi kusukela ku-<xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_text_2" msgid="3146758297471143723">"- Ingenza izenzo ngaphakathi kwe-<xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="slice_permission_checkbox" msgid="7986504458640562900">"Vumela i-<xliff:g id="APP">%1$s</xliff:g> ukuthi ikubonise izingcezu kusukela kunoma iluphi uhlelo lokusebenza"</string>
+ <string name="slice_permission_allow" msgid="2340244901366722709">"Vumela"</string>
+ <string name="slice_permission_deny" msgid="7683681514008048807">"Yenqaba"</string>
</resources>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index b749a18..3db79d7 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -214,9 +214,6 @@
<!-- Amount of close_handle that will NOT overlap the notification list -->
<dimen name="close_handle_underlap">32dp</dimen>
- <!-- Height of the status bar header bar -->
- <dimen name="status_bar_header_height">178dp</dimen>
-
<!-- Height of the status bar header bar in the car setting. -->
<dimen name="car_status_bar_header_height">128dp</dimen>
@@ -267,6 +264,8 @@
<dimen name="volume_dialog_panel_width">120dp</dimen>
+ <dimen name="output_chooser_panel_width">320dp</dimen>
+
<!-- Gravity for the notification panel -->
<integer name="notification_panel_layout_gravity">0x31</integer><!-- center_horizontal|top -->
@@ -334,6 +333,8 @@
<dimen name="qs_footer_padding_end">24dp</dimen>
<dimen name="qs_footer_icon_size">16dp</dimen>
+ <dimen name="qs_notif_collapsed_space">64dp</dimen>
+
<!-- Desired qs icon overlay size. -->
<dimen name="qs_detail_icon_overlay_size">24dp</dimen>
@@ -873,7 +874,7 @@
<dimen name="rounded_corner_radius">0dp</dimen>
<dimen name="rounded_corner_content_padding">0dp</dimen>
<dimen name="nav_content_padding">0dp</dimen>
- <dimen name="nav_quick_scrub_track_edge_padding">32dp</dimen>
+ <dimen name="nav_quick_scrub_track_edge_padding">42dp</dimen>
<dimen name="nav_quick_scrub_track_thickness">2dp</dimen>
<!-- Intended corner radius when drawing the mobile signal -->
@@ -893,4 +894,12 @@
<dimen name="fingerprint_dialog_icon_size">44dp</dimen>
<dimen name="fingerprint_dialog_fp_icon_size">60dp</dimen>
<dimen name="fingerprint_dialog_animation_translation_offset">350dp</dimen>
+
+ <!-- WirelessCharging Animation values -->
+ <!-- Starting text size of batteryLevel for wireless charging animation -->
+ <dimen name="config_batteryLevelTextSizeStart" format="float">5.0</dimen>
+ <!-- Ending text size of batteryLevel for wireless charging animation -->
+ <dimen name="config_batteryLevelTextSizeEnd" format="float">32.0</dimen>
+ <!-- Wireless Charging battery level text animation duration -->
+ <integer name="config_batteryLevelTextAnimationDuration">400</integer>
</resources>
diff --git a/packages/SystemUI/res/values/donottranslate.xml b/packages/SystemUI/res/values/donottranslate.xml
index 351a1fd..38f469e 100644
--- a/packages/SystemUI/res/values/donottranslate.xml
+++ b/packages/SystemUI/res/values/donottranslate.xml
@@ -20,4 +20,6 @@
<!-- Date format for display: should match the lockscreen in /policy. -->
<string name="system_ui_date_pattern">@*android:string/system_ui_date_pattern</string>
+ <!-- Date format for the always on display. -->
+ <item type="string" name="system_ui_aod_date_pattern">eeeMMMd</item>
</resources>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index edf19fd..9b6af43 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -259,6 +259,13 @@
<!-- Button name for "Cancel". [CHAR LIMIT=NONE] -->
<string name="cancel">Cancel</string>
+ <!-- Content description of the fingerprint icon when the system-provided fingerprint dialog is showing, for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+ <string name="accessibility_fingerprint_dialog_fingerprint_icon">Fingerprint icon</string>
+ <!-- Content description of the application icon when the system-provided fingerprint dialog is showing, for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+ <string name="accessibility_fingerprint_dialog_app_icon">Application icon</string>
+ <!-- Content description for the error/help message are when the system-provided fingerprint dialog is showing, for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+ <string name="accessibility_fingerprint_dialog_help_area">Help message area</string>
+
<!-- Content description of the compatibility zoom button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_compatibility_zoom_button">Compatibility zoom button.</string>
@@ -459,7 +466,7 @@
<string name="accessibility_casting">@string/quick_settings_casting</string>
<!-- Content description of the work mode icon in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
- <string name="accessibility_work_mode">Work mode</string>
+ <string name="accessibility_work_mode">@string/quick_settings_work_mode_on_label</string>
<!-- Content description to tell the user that this button will remove an application from recents -->
<string name="accessibility_recents_item_will_be_dismissed">Dismiss <xliff:g id="app" example="Calendar">%s</xliff:g>.</string>
@@ -764,8 +771,10 @@
<string name="quick_settings_tethering_label">Tethering</string>
<!-- QuickSettings: Hotspot. [CHAR LIMIT=NONE] -->
<string name="quick_settings_hotspot_label">Hotspot</string>
+ <!-- QuickSettings: Hotspot. Secondary label shown when the hotspot is being enabled [CHAR LIMIT=NONE] -->
+ <string name="quick_settings_hotspot_secondary_label_transient">Turning on...</string>
<!-- QuickSettings: Hotspot: Secondary label for how many devices are connected to the hotspot [CHAR LIMIT=NONE] -->
- <plurals name="quick_settings_hotspot_num_devices">
+ <plurals name="quick_settings_hotspot_secondary_label_num_devices">
<item quantity="one">%d device</item>
<item quantity="other">%d devices</item>
</plurals>
@@ -787,8 +796,14 @@
<string name="quick_settings_cellular_detail_data_limit"><xliff:g id="data_limit" example="2.0 GB">%s</xliff:g> limit</string>
<!-- QuickSettings: Cellular detail panel, data warning format string [CHAR LIMIT=NONE] -->
<string name="quick_settings_cellular_detail_data_warning"><xliff:g id="data_limit" example="2.0 GB">%s</xliff:g> warning</string>
- <!-- QuickSettings: Work mode [CHAR LIMIT=NONE] -->
- <string name="quick_settings_work_mode_label">Work mode</string>
+ <!-- QuickSettings: This string is in the easy-to-view settings that a user can pull down from
+ the top of their phone's screen. This is a label for a toggle to turn the work profile on and
+ off. "Work profile" means a separate profile on a user's phone that's specifically for their
+ work apps and managed by their company. "Work" is used as an adjective. [CHAR LIMIT=NONE] -->
+ <string name="quick_settings_work_mode_on_label">Work profile</string>
+ <!-- QuickSettings: This is a label for a toggle to turn the work profile on and off and this is
+ shown when work profile is off. [CHAR LIMIT=NONE] -->
+ <string name="quick_settings_work_mode_off_label">Notifications & apps are off</string>
<!-- QuickSettings: Label for the toggle to activate Night display (renamed "Night Light" with title caps). [CHAR LIMIT=20] -->
<string name="quick_settings_night_display_label">Night Light</string>
<!-- QuickSettings: Secondary text for when the Night Light will be enabled at sunset. [CHAR LIMIT=20] -->
@@ -825,6 +840,8 @@
<string name="recents_stack_action_button_label">Clear all</string>
<!-- Recents: Hint text that shows on the drop targets to start multiwindow. [CHAR LIMIT=NONE] -->
<string name="recents_drag_hint_message">Drag here to use split screen</string>
+ <!-- Recents: Text that shows above the nav bar after launching a few apps. [CHAR LIMIT=NONE] -->
+ <string name="recents_swipe_up_onboarding">Swipe up to switch apps</string>
<!-- Recents: MultiStack add stack split horizontal radio button. [CHAR LIMIT=NONE] -->
<string name="recents_multistack_add_stack_dialog_split_horizontal">Split Horizontal</string>
@@ -1491,6 +1508,10 @@
<string name="notification_channel_disabled">You won\'t see these notifications anymore</string>
<!-- Notification Inline controls: continue receiving notifications prompt, channel level -->
+ <string name="inline_blocking_helper">You usually dismiss these notifications.
+ \nKeep showing them?</string>
+
+ <!-- Notification Inline controls: continue receiving notifications prompt, channel level -->
<string name="inline_keep_showing">Keep showing these notifications?</string>
<!-- Notification inline controls: block notifications button -->
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index bcce6d1..2497d20 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -306,6 +306,7 @@
<item name="darkIconTheme">@style/DualToneDarkTheme</item>
<item name="wallpaperTextColor">@*android:color/primary_text_material_dark</item>
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_dark</item>
+ <item name="android:colorError">@*android:color/error_color_material_dark</item>
<item name="android:colorControlHighlight">@*android:color/primary_text_material_dark</item>
<item name="*android:lockPatternStyle">@style/LockPatternStyle</item>
<item name="passwordStyle">@style/PasswordTheme</item>
@@ -317,6 +318,7 @@
<style name="Theme.SystemUI.Light" parent="@*android:style/Theme.DeviceDefault.QuickSettings">
<item name="wallpaperTextColor">@*android:color/primary_text_material_light</item>
<item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_light</item>
+ <item name="android:colorError">@*android:color/error_color_material_light</item>
<item name="android:colorControlHighlight">@*android:color/primary_text_material_light</item>
<item name="passwordStyle">@style/PasswordTheme.Light</item>
</style>
diff --git a/packages/SystemUI/shared/Android.mk b/packages/SystemUI/shared/Android.mk
index 5f75f7d..21b0ed8 100644
--- a/packages/SystemUI/shared/Android.mk
+++ b/packages/SystemUI/shared/Android.mk
@@ -30,7 +30,7 @@
include $(CLEAR_VARS)
-LOCAL_PACKAGE_NAME := SystemUISharedLib
+LOCAL_PACKAGE_NAME := SysUISharedLib
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_JAVA_LIBRARIES := SystemUISharedLib
@@ -39,4 +39,4 @@
include $(BUILD_PACKAGE)
-include $(call all-makefiles-under,$(LOCAL_PATH))
\ No newline at end of file
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl
index cc4bc58..98ede4e 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl
@@ -29,4 +29,14 @@
*/
GraphicBufferCompat screenshot(in Rect sourceCrop, int width, int height, int minLayer,
int maxLayer, boolean useIdentityTransform, int rotation);
+
+ /**
+ * Begins screen pinning on the provided {@param taskId}.
+ */
+ void startScreenPinning(int taskId);
+
+ /**
+ * Called when the overview service has started the recents animation.
+ */
+ void onRecentsAnimationStarted();
}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java
index 1c99d38..f9e1069 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java
@@ -30,7 +30,9 @@
import android.app.ActivityOptions;
import android.app.AppGlobals;
import android.app.IAssistDataReceiver;
+import android.app.WindowConfiguration.ActivityType;
import android.content.Context;
+import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
@@ -47,7 +49,10 @@
import android.os.UserHandle;
import android.util.IconDrawableFactory;
import android.util.Log;
+import android.view.IRecentsAnimationController;
+import android.view.IRecentsAnimationRunner;
+import android.view.RemoteAnimationTarget;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.Task.TaskKey;
import com.android.systemui.shared.recents.model.ThumbnailData;
@@ -96,11 +101,14 @@
* @return the top running task (can be {@code null}).
*/
public ActivityManager.RunningTaskInfo getRunningTask() {
+ return getRunningTask(ACTIVITY_TYPE_RECENTS /* ignoreActivityType */);
+ }
+
+ public ActivityManager.RunningTaskInfo getRunningTask(@ActivityType int ignoreActivityType) {
// Note: The set of running tasks from the system is ordered by recency
try {
List<ActivityManager.RunningTaskInfo> tasks =
- ActivityManager.getService().getFilteredTasks(1,
- ACTIVITY_TYPE_RECENTS /* ignoreActivityType */,
+ ActivityManager.getService().getFilteredTasks(1, ignoreActivityType,
WINDOWING_MODE_PINNED /* ignoreWindowingMode */);
if (tasks.isEmpty()) {
return null;
@@ -239,10 +247,9 @@
/**
* Starts the recents activity. The caller should manage the thread on which this is called.
*/
- public void startRecentsActivity(AssistDataReceiverCompat assistDataReceiver, Bundle options,
- ActivityOptions opts, int userId, Consumer<Boolean> resultCallback,
+ public void startRecentsActivity(Intent intent, AssistDataReceiver assistDataReceiver,
+ RecentsAnimationListener animationHandler, Consumer<Boolean> resultCallback,
Handler resultCallbackHandler) {
- Bundle activityOptions = opts != null ? opts.toBundle() : null;
try {
IAssistDataReceiver receiver = null;
if (assistDataReceiver != null) {
@@ -255,8 +262,24 @@
}
};
}
- ActivityManager.getService().startRecentsActivity(receiver, options, activityOptions,
- userId);
+ IRecentsAnimationRunner runner = null;
+ if (animationHandler != null) {
+ runner = new IRecentsAnimationRunner.Stub() {
+ public void onAnimationStart(IRecentsAnimationController controller,
+ RemoteAnimationTarget[] apps) {
+ final RecentsAnimationControllerCompat controllerCompat =
+ new RecentsAnimationControllerCompat(controller);
+ final RemoteAnimationTargetCompat[] appsCompat =
+ RemoteAnimationTargetCompat.wrap(apps);
+ animationHandler.onAnimationStart(controllerCompat, appsCompat);
+ }
+
+ public void onAnimationCanceled() {
+ animationHandler.onAnimationCanceled();
+ }
+ };
+ }
+ ActivityManager.getService().startRecentsActivity(intent, receiver, runner);
if (resultCallback != null) {
resultCallbackHandler.post(new Runnable() {
@Override
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/AssistDataReceiverCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/AssistDataReceiver.java
similarity index 80%
rename from packages/SystemUI/shared/src/com/android/systemui/shared/system/AssistDataReceiverCompat.java
rename to packages/SystemUI/shared/src/com/android/systemui/shared/system/AssistDataReceiver.java
index cd943f6..7cd6c51 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/AssistDataReceiverCompat.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/AssistDataReceiver.java
@@ -22,7 +22,7 @@
/**
* Abstract class for assist data receivers.
*/
-public abstract class AssistDataReceiverCompat {
- public abstract void onHandleAssistData(Bundle resultData);
- public abstract void onHandleAssistScreenshot(Bitmap screenshot);
+public abstract class AssistDataReceiver {
+ public void onHandleAssistData(Bundle resultData) {}
+ public void onHandleAssistScreenshot(Bitmap screenshot) {}
}
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/InputConsumerController.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/InputConsumerController.java
similarity index 70%
rename from packages/SystemUI/src/com/android/systemui/pip/phone/InputConsumerController.java
rename to packages/SystemUI/shared/src/com/android/systemui/shared/system/InputConsumerController.java
index db4f988..38b8ae8 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/InputConsumerController.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/InputConsumerController.java
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-package com.android.systemui.pip.phone;
+package com.android.systemui.shared.system;
import static android.view.WindowManager.INPUT_CONSUMER_PIP;
+import static android.view.WindowManager.INPUT_CONSUMER_RECENTS_ANIMATION;
import android.os.Binder;
import android.os.IBinder;
@@ -29,11 +30,12 @@
import android.view.InputEvent;
import android.view.IWindowManager;
import android.view.MotionEvent;
+import android.view.WindowManagerGlobal;
import java.io.PrintWriter;
/**
- * Manages the input consumer that allows the SystemUI to control the PiP.
+ * Manages the input consumer that allows the SystemUI to directly receive touch input.
*/
public class InputConsumerController {
@@ -55,12 +57,12 @@
}
/**
- * Input handler used for the PiP input consumer. Input events are batched and consumed with the
+ * Input handler used for the input consumer. Input events are batched and consumed with the
* SurfaceFlinger vsync.
*/
- private final class PipInputEventReceiver extends BatchedInputEventReceiver {
+ private final class InputEventReceiver extends BatchedInputEventReceiver {
- public PipInputEventReceiver(InputChannel inputChannel, Looper looper) {
+ public InputEventReceiver(InputChannel inputChannel, Looper looper) {
super(inputChannel, looper, Choreographer.getSfInstance());
}
@@ -68,7 +70,6 @@
public void onInputEvent(InputEvent event, int displayId) {
boolean handled = true;
try {
- // To be implemented for input handling over Pip windows
if (mListener != null && event instanceof MotionEvent) {
MotionEvent ev = (MotionEvent) event;
handled = mListener.onTouchEvent(ev);
@@ -81,15 +82,35 @@
private final IWindowManager mWindowManager;
private final IBinder mToken;
+ private final String mName;
- private PipInputEventReceiver mInputEventReceiver;
+ private InputEventReceiver mInputEventReceiver;
private TouchListener mListener;
private RegistrationListener mRegistrationListener;
- public InputConsumerController(IWindowManager windowManager) {
+ /**
+ * @param name the name corresponding to the input consumer that is defined in the system.
+ */
+ public InputConsumerController(IWindowManager windowManager, String name) {
mWindowManager = windowManager;
mToken = new Binder();
- registerInputConsumer();
+ mName = name;
+ }
+
+ /**
+ * @return A controller for the pip input consumer.
+ */
+ public static InputConsumerController getPipInputConsumer() {
+ return new InputConsumerController(WindowManagerGlobal.getWindowManagerService(),
+ INPUT_CONSUMER_PIP);
+ }
+
+ /**
+ * @return A controller for the recents animation input consumer.
+ */
+ public static InputConsumerController getRecentsAnimationInputConsumer() {
+ return new InputConsumerController(WindowManagerGlobal.getWindowManagerService(),
+ INPUT_CONSUMER_RECENTS_ANIMATION);
}
/**
@@ -125,12 +146,12 @@
if (mInputEventReceiver == null) {
final InputChannel inputChannel = new InputChannel();
try {
- mWindowManager.destroyInputConsumer(INPUT_CONSUMER_PIP);
- mWindowManager.createInputConsumer(mToken, INPUT_CONSUMER_PIP, inputChannel);
+ mWindowManager.destroyInputConsumer(mName);
+ mWindowManager.createInputConsumer(mToken, mName, inputChannel);
} catch (RemoteException e) {
- Log.e(TAG, "Failed to create PIP input consumer", e);
+ Log.e(TAG, "Failed to create input consumer", e);
}
- mInputEventReceiver = new PipInputEventReceiver(inputChannel, Looper.myLooper());
+ mInputEventReceiver = new InputEventReceiver(inputChannel, Looper.myLooper());
if (mRegistrationListener != null) {
mRegistrationListener.onRegistrationChanged(true /* isRegistered */);
}
@@ -143,9 +164,9 @@
public void unregisterInputConsumer() {
if (mInputEventReceiver != null) {
try {
- mWindowManager.destroyInputConsumer(INPUT_CONSUMER_PIP);
+ mWindowManager.destroyInputConsumer(mName);
} catch (RemoteException e) {
- Log.e(TAG, "Failed to destroy PIP input consumer", e);
+ Log.e(TAG, "Failed to destroy input consumer", e);
}
mInputEventReceiver.dispose();
mInputEventReceiver = null;
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationControllerCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationControllerCompat.java
new file mode 100644
index 0000000..9a7abf8
--- /dev/null
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationControllerCompat.java
@@ -0,0 +1,61 @@
+/*
+ * 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.app.ActivityManager.TaskSnapshot;
+import android.os.RemoteException;
+import android.util.Log;
+import android.view.IRecentsAnimationController;
+
+import com.android.systemui.shared.recents.model.ThumbnailData;
+
+public class RecentsAnimationControllerCompat {
+
+ private static final String TAG = RecentsAnimationControllerCompat.class.getSimpleName();
+
+ private IRecentsAnimationController mAnimationController;
+
+ public RecentsAnimationControllerCompat(IRecentsAnimationController animationController) {
+ mAnimationController = animationController;
+ }
+
+ public ThumbnailData screenshotTask(int taskId) {
+ try {
+ TaskSnapshot snapshot = mAnimationController.screenshotTask(taskId);
+ return snapshot != null ? new ThumbnailData(snapshot) : new ThumbnailData();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Failed to screenshot task", e);
+ return new ThumbnailData();
+ }
+ }
+
+ public void setInputConsumerEnabled(boolean enabled) {
+ try {
+ mAnimationController.setInputConsumerEnabled(enabled);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Failed to set input consumer enabled state", e);
+ }
+ }
+
+ public void finish(boolean toHome) {
+ try {
+ mAnimationController.finish(toHome);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Failed to finish recents animation", e);
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/AssistDataReceiverCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationListener.java
similarity index 60%
copy from packages/SystemUI/shared/src/com/android/systemui/shared/system/AssistDataReceiverCompat.java
copy to packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationListener.java
index cd943f6..bf6179d 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/AssistDataReceiverCompat.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationListener.java
@@ -16,13 +16,16 @@
package com.android.systemui.shared.system;
-import android.graphics.Bitmap;
-import android.os.Bundle;
+public interface RecentsAnimationListener {
-/**
- * Abstract class for assist data receivers.
- */
-public abstract class AssistDataReceiverCompat {
- public abstract void onHandleAssistData(Bundle resultData);
- public abstract void onHandleAssistScreenshot(Bitmap screenshot);
-}
+ /**
+ * Called when the animation into Recents can start. This call is made on the binder thread.
+ */
+ void onAnimationStart(RecentsAnimationControllerCompat controller,
+ RemoteAnimationTargetCompat[] apps);
+
+ /**
+ * Called when the animation into Recents was canceled. This call is made on the binder thread.
+ */
+ void onAnimationCanceled();
+}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
index 9ff6815..5d1bdab 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
@@ -20,9 +20,7 @@
import android.arch.lifecycle.LiveData;
import android.arch.lifecycle.Observer;
import android.content.Context;
-import android.graphics.Canvas;
import android.graphics.Color;
-import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.provider.Settings;
@@ -43,7 +41,6 @@
import com.android.systemui.keyguard.KeyguardSliceProvider;
import com.android.systemui.tuner.TunerService;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.function.Consumer;
@@ -51,6 +48,8 @@
import androidx.app.slice.Slice;
import androidx.app.slice.SliceItem;
import androidx.app.slice.core.SliceQuery;
+import androidx.app.slice.widget.ListContent;
+import androidx.app.slice.widget.RowContent;
import androidx.app.slice.widget.SliceLiveData;
/**
@@ -115,25 +114,17 @@
private void showSlice(Slice slice) {
- // Main area
- SliceItem mainItem = SliceQuery.find(slice, android.app.slice.SliceItem.FORMAT_SLICE,
- null /* hints */, new String[]{android.app.slice.Slice.HINT_LIST_ITEM});
- mHasHeader = mainItem != null;
-
- List<SliceItem> subItems = SliceQuery.findAll(slice,
- android.app.slice.SliceItem.FORMAT_SLICE,
- new String[]{android.app.slice.Slice.HINT_LIST_ITEM},
- null /* nonHints */);
-
+ ListContent lc = new ListContent(slice);
+ mHasHeader = lc.hasHeader();
+ List<SliceItem> subItems = lc.getRowItems();
if (!mHasHeader) {
mTitle.setVisibility(GONE);
} else {
mTitle.setVisibility(VISIBLE);
- SliceItem mainTitle = SliceQuery.find(mainItem.getSlice(),
- android.app.slice.SliceItem.FORMAT_TEXT,
- new String[]{android.app.slice.Slice.HINT_TITLE},
- null /* nonHints */);
- CharSequence title = mainTitle.getText();
+ // If there's a header it'll be the first subitem
+ RowContent header = new RowContent(subItems.get(0), true /* showStartItem */);
+ SliceItem mainTitle = header.getTitleItem();
+ CharSequence title = mainTitle != null ? mainTitle.getText() : null;
mTitle.setText(title);
// Check if we're already ellipsizing the text.
@@ -152,9 +143,10 @@
mClickActions.clear();
final int subItemsCount = subItems.size();
final int blendedColor = getTextColor();
-
- for (int i = 0; i < subItemsCount; i++) {
+ final int startIndex = mHasHeader ? 1 : 0; // First item is header; skip it
+ for (int i = startIndex; i < subItemsCount; i++) {
SliceItem item = subItems.get(i);
+ RowContent rc = new RowContent(item, true /* showStartItem */);
final Uri itemTag = item.getSlice().getUri();
// Try to reuse the view if already exists in the layout
KeyguardSliceButton button = mRow.findViewWithTag(itemTag);
@@ -165,23 +157,15 @@
} else {
mRow.removeView(button);
}
- button.setHasDivider(i < subItemsCount - 1);
- mRow.addView(button, i);
+ mRow.addView(button);
- PendingIntent pendingIntent;
- try {
- pendingIntent = item.getAction();
- } catch (RuntimeException e) {
- Log.w(TAG, "Cannot retrieve action from keyguard slice", e);
- pendingIntent = null;
+ PendingIntent pendingIntent = null;
+ if (rc.getContentIntent() != null) {
+ pendingIntent = rc.getContentIntent().getAction();
}
mClickActions.put(button, pendingIntent);
- SliceItem title = SliceQuery.find(item.getSlice(),
- android.app.slice.SliceItem.FORMAT_TEXT,
- new String[]{android.app.slice.Slice.HINT_TITLE},
- null /* nonHints */);
- button.setText(title.getText());
+ button.setText(rc.getTitleItem().getText());
Drawable iconDrawable = null;
SliceItem icon = SliceQuery.find(item.getSlice(),
@@ -329,51 +313,20 @@
/**
* Representation of an item that appears under the clock on main keyguard message.
- * Shows optional separator.
*/
private class KeyguardSliceButton extends Button {
- private static final float SEPARATOR_HEIGHT = 0.7f;
- private final Paint mPaint;
- private boolean mHasDivider;
-
public KeyguardSliceButton(Context context) {
- super(context, null /* attrs */,
+ super(context, null /* attrs */, 0 /* styleAttr */,
com.android.keyguard.R.style.TextAppearance_Keyguard_Secondary);
- mPaint = new Paint();
- mPaint.setStyle(Paint.Style.STROKE);
- float dividerWidth = context.getResources()
- .getDimension(R.dimen.widget_separator_thickness);
- mPaint.setStrokeWidth(dividerWidth);
int horizontalPadding = (int) context.getResources()
.getDimension(R.dimen.widget_horizontal_padding);
- setPadding(horizontalPadding, 0, horizontalPadding, 0);
+ setPadding(horizontalPadding / 2, 0, horizontalPadding / 2, 0);
setCompoundDrawablePadding((int) context.getResources()
.getDimension(R.dimen.widget_icon_padding));
setMaxWidth(KeyguardSliceView.this.getWidth() / 2);
setMaxLines(1);
setEllipsize(TruncateAt.END);
}
-
- public void setHasDivider(boolean hasDivider) {
- mHasDivider = hasDivider;
- }
-
- @Override
- public void setTextColor(int color) {
- super.setTextColor(color);
- mPaint.setColor(color);
- }
-
- @Override
- protected void onDraw(Canvas canvas) {
- super.onDraw(canvas);
- if (mHasDivider) {
- final int lineX = getLayoutDirection() == LAYOUT_DIRECTION_RTL ? 0 : getWidth();
- final int height = (int) (getHeight() * SEPARATOR_HEIGHT);
- final int startY = getHeight() / 2 - height / 2;
- canvas.drawLine(lineX, startY, lineX, startY + height, mPaint);
- }
- }
}
}
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
index 2b656c2..e440731 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
@@ -330,7 +330,7 @@
public void setPulsing(boolean pulsing) {
mPulsing = pulsing;
- mKeyguardSlice.setVisibility(pulsing ? GONE : VISIBLE);
+ mKeyguardSlice.setVisibility(pulsing ? INVISIBLE : VISIBLE);
onSliceContentChanged(mKeyguardSlice.hasHeader());
updateDozeVisibleViews();
}
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
index 8666b0c..1ae06d7 100644
--- a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
+++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
@@ -119,18 +119,10 @@
addView(mBatteryIconView, mlp);
updateShowPercent();
-
- Context dualToneDarkTheme = new ContextThemeWrapper(context,
- Utils.getThemeAttr(context, R.attr.darkIconTheme));
- Context dualToneLightTheme = new ContextThemeWrapper(context,
- Utils.getThemeAttr(context, R.attr.lightIconTheme));
- mDarkModeBackgroundColor = Utils.getColorAttr(dualToneDarkTheme, R.attr.backgroundColor);
- mDarkModeFillColor = Utils.getColorAttr(dualToneDarkTheme, R.attr.fillColor);
- mLightModeBackgroundColor = Utils.getColorAttr(dualToneLightTheme, R.attr.backgroundColor);
- mLightModeFillColor = Utils.getColorAttr(dualToneLightTheme, R.attr.fillColor);
-
+ setColorsFromContext(context);
// Init to not dark at all.
onDarkChanged(new Rect(), 0, DarkIconDispatcher.DEFAULT_ICON_TINT);
+
mUserTracker = new CurrentUserTracker(mContext) {
@Override
public void onUserSwitched(int newUserId) {
@@ -148,6 +140,21 @@
updateShowPercent();
}
+ public void setColorsFromContext(Context context) {
+ if (context == null) {
+ return;
+ }
+
+ Context dualToneDarkTheme = new ContextThemeWrapper(context,
+ Utils.getThemeAttr(context, R.attr.darkIconTheme));
+ Context dualToneLightTheme = new ContextThemeWrapper(context,
+ Utils.getThemeAttr(context, R.attr.lightIconTheme));
+ mDarkModeBackgroundColor = Utils.getColorAttr(dualToneDarkTheme, R.attr.backgroundColor);
+ mDarkModeFillColor = Utils.getColorAttr(dualToneDarkTheme, R.attr.fillColor);
+ mLightModeBackgroundColor = Utils.getColorAttr(dualToneLightTheme, R.attr.backgroundColor);
+ mLightModeFillColor = Utils.getColorAttr(dualToneLightTheme, R.attr.fillColor);
+ }
+
@Override
public boolean hasOverlappingRendering() {
return false;
diff --git a/packages/SystemUI/src/com/android/systemui/HardwareUiLayout.java b/packages/SystemUI/src/com/android/systemui/HardwareUiLayout.java
index ca34345..9481788 100644
--- a/packages/SystemUI/src/com/android/systemui/HardwareUiLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/HardwareUiLayout.java
@@ -58,6 +58,7 @@
private boolean mRoundedDivider;
private int mRotation = ROTATION_NONE;
private boolean mRotatedBackground;
+ private boolean mSwapOrientation = true;
public HardwareUiLayout(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -145,6 +146,10 @@
updateRotation();
}
+ public void setSwapOrientation(boolean swapOrientation) {
+ mSwapOrientation = swapOrientation;
+ }
+
private void updateRotation() {
int rotation = RotationUtils.getRotation(getContext());
if (rotation != mRotation) {
@@ -173,7 +178,9 @@
if (to == ROTATION_SEASCAPE) {
swapOrder(linearLayout);
}
- linearLayout.setOrientation(LinearLayout.HORIZONTAL);
+ if (mSwapOrientation) {
+ linearLayout.setOrientation(LinearLayout.HORIZONTAL);
+ }
swapDimens(this.mChild);
}
} else {
@@ -184,7 +191,9 @@
if (from == ROTATION_SEASCAPE) {
swapOrder(linearLayout);
}
- linearLayout.setOrientation(LinearLayout.VERTICAL);
+ if (mSwapOrientation) {
+ linearLayout.setOrientation(LinearLayout.VERTICAL);
+ }
swapDimens(mChild);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java
index 0be522b..8d8b726 100644
--- a/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java
+++ b/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java
@@ -37,6 +37,7 @@
import com.android.systemui.shared.recents.IOverviewProxy;
import com.android.systemui.shared.recents.ISystemUiProxy;
import com.android.systemui.shared.system.GraphicBufferCompat;
+import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.statusbar.policy.CallbackController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener;
@@ -67,6 +68,7 @@
private int mConnectionBackoffAttempts;
private ISystemUiProxy mSysUiProxy = new ISystemUiProxy.Stub() {
+
public GraphicBufferCompat screenshot(Rect sourceCrop, int width, int height, int minLayer,
int maxLayer, boolean useIdentityTransform, int rotation) {
long token = Binder.clearCallingIdentity();
@@ -77,6 +79,32 @@
Binder.restoreCallingIdentity(token);
}
}
+
+ public void startScreenPinning(int taskId) {
+ long token = Binder.clearCallingIdentity();
+ try {
+ mHandler.post(() -> {
+ StatusBar statusBar = ((SystemUIApplication) mContext).getComponent(
+ StatusBar.class);
+ if (statusBar != null) {
+ statusBar.showScreenPinningRequest(taskId, false /* allowCancel */);
+ }
+ });
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+
+ public void onRecentsAnimationStarted() {
+ long token = Binder.clearCallingIdentity();
+ try {
+ mHandler.post(() -> {
+ notifyRecentsAnimationStarted();
+ });
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
};
private final BroadcastReceiver mLauncherAddedReceiver = new BroadcastReceiver() {
@@ -195,6 +223,10 @@
return mOverviewProxy;
}
+ public ComponentName getLauncherComponent() {
+ return mLauncherComponentName;
+ }
+
private void disconnectFromLauncherService() {
if (mOverviewProxy != null) {
mOverviewProxy.asBinder().unlinkToDeath(mOverviewServiceDeathRcpt, 0);
@@ -210,6 +242,12 @@
}
}
+ private void notifyRecentsAnimationStarted() {
+ for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) {
+ mConnectionCallbacks.get(i).onRecentsAnimationStarted();
+ }
+ }
+
@Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
pw.println(TAG_OPS + " state:");
@@ -220,6 +258,7 @@
}
public interface OverviewProxyListener {
- void onConnectionChanged(boolean isConnected);
+ default void onConnectionChanged(boolean isConnected) {}
+ default void onRecentsAnimationStarted() {}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/Prefs.java b/packages/SystemUI/src/com/android/systemui/Prefs.java
index 4437d31..9319bc6 100644
--- a/packages/SystemUI/src/com/android/systemui/Prefs.java
+++ b/packages/SystemUI/src/com/android/systemui/Prefs.java
@@ -48,6 +48,8 @@
Key.QS_WORK_ADDED,
Key.QS_NIGHTDISPLAY_ADDED,
Key.SEEN_MULTI_USER,
+ Key.NUM_APPS_LAUNCHED,
+ Key.HAS_SWIPED_UP_FOR_RECENTS,
})
public @interface Key {
@Deprecated
@@ -75,6 +77,8 @@
@Deprecated
String QS_NIGHTDISPLAY_ADDED = "QsNightDisplayAdded";
String SEEN_MULTI_USER = "HasSeenMultiUser";
+ String NUM_APPS_LAUNCHED = "NumAppsLaunched";
+ String HAS_SWIPED_UP_FOR_RECENTS = "HasSwipedUpForRecents";
}
public static boolean getBoolean(Context context, @Key String key, boolean defaultValue) {
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
index 3538327..2c0e95b 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
@@ -61,7 +61,7 @@
*/
public class SystemUIApplication extends Application implements SysUiServiceProvider {
- private static final String TAG = "SystemUIService";
+ public static final String TAG = "SystemUIService";
private static final boolean DEBUG = false;
/**
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIService.java b/packages/SystemUI/src/com/android/systemui/SystemUIService.java
index 11e0f28..ddf0bd0 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIService.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIService.java
@@ -20,11 +20,15 @@
import android.content.Intent;
import android.os.Build;
import android.os.IBinder;
+import android.os.Process;
import android.os.SystemProperties;
+import android.util.Slog;
import java.io.FileDescriptor;
import java.io.PrintWriter;
+import com.android.internal.os.BinderInternal;
+
public class SystemUIService extends Service {
@Override
@@ -36,6 +40,21 @@
if (Build.IS_DEBUGGABLE && SystemProperties.getBoolean("debug.crash_sysui", false)) {
throw new RuntimeException();
}
+
+ if (Build.IS_DEBUGGABLE) {
+ // b/71353150 - looking for leaked binder proxies
+ BinderInternal.nSetBinderProxyCountEnabled(true);
+ BinderInternal.nSetBinderProxyCountWatermarks(1000,900);
+ BinderInternal.setBinderProxyCountCallback(
+ new BinderInternal.BinderProxyLimitListener() {
+ @Override
+ public void onLimitReached(int uid) {
+ Slog.w(SystemUIApplication.TAG,
+ "uid " + uid + " sent too many Binder proxies to uid "
+ + Process.myUid());
+ }
+ }, Dependency.get(Dependency.MAIN_HANDLER));
+ }
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/car/CarSystemUIFactory.java b/packages/SystemUI/src/com/android/systemui/car/CarSystemUIFactory.java
index 174584d..245d240 100644
--- a/packages/SystemUI/src/com/android/systemui/car/CarSystemUIFactory.java
+++ b/packages/SystemUI/src/com/android/systemui/car/CarSystemUIFactory.java
@@ -18,23 +18,9 @@
import android.content.Context;
import android.util.ArrayMap;
-import com.android.internal.logging.MetricsLogger;
-import com.android.systemui.Dependency;
import com.android.systemui.Dependency.DependencyProvider;
-import com.android.systemui.ForegroundServiceController;
import com.android.systemui.SystemUIFactory;
-import com.android.systemui.UiOffloadThread;
-import com.android.systemui.plugins.VolumeDialogController;
import com.android.systemui.statusbar.NotificationEntryManager;
-import com.android.systemui.statusbar.NotificationGutsManager;
-import com.android.systemui.statusbar.NotificationListener;
-import com.android.systemui.statusbar.NotificationLockscreenUserManager;
-import com.android.systemui.statusbar.NotificationMediaManager;
-import com.android.systemui.statusbar.NotificationRemoteInputManager;
-import com.android.systemui.statusbar.notification.VisualStabilityManager;
-import com.android.systemui.statusbar.phone.NotificationGroupManager;
-import com.android.systemui.statusbar.policy.DeviceProvisionedController;
-import com.android.systemui.volume.car.CarVolumeDialogController;
/**
* Class factory to provide car specific SystemUI components.
@@ -44,7 +30,6 @@
public void injectDependencies(ArrayMap<Object, DependencyProvider> providers,
Context context) {
super.injectDependencies(providers, context);
- providers.put(VolumeDialogController.class, () -> new CarVolumeDialogController(context));
providers.put(NotificationEntryManager.class,
() -> new CarNotificationEntryManager(context));
}
diff --git a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java
new file mode 100644
index 0000000..348855b
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java
@@ -0,0 +1,213 @@
+/*
+ * 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.charging;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.graphics.PixelFormat;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.util.Log;
+import android.util.Slog;
+import android.view.Gravity;
+import android.view.View;
+import android.view.WindowManager;
+
+/**
+ * A WirelessChargingAnimation is a view containing view + animation for wireless charging.
+ * @hide
+ */
+public class WirelessChargingAnimation {
+
+ public static final long DURATION = 1400;
+ private static final String TAG = "WirelessChargingView";
+ private static final boolean LOCAL_LOGV = false;
+
+ private final WirelessChargingView mCurrentWirelessChargingView;
+ private static WirelessChargingView mPreviousWirelessChargingView;
+
+ /**
+ * Constructs an empty WirelessChargingAnimation object. If looper is null,
+ * Looper.myLooper() is used. Must set
+ * {@link WirelessChargingAnimation#mCurrentWirelessChargingView}
+ * before calling {@link #show} - can be done through {@link #makeWirelessChargingAnimation}.
+ * @hide
+ */
+ public WirelessChargingAnimation(@NonNull Context context, @Nullable Looper looper, int
+ batteryLevel) {
+ mCurrentWirelessChargingView = new WirelessChargingView(context, looper,
+ batteryLevel);
+ }
+
+ /**
+ * Creates a wireless charging animation object populated with next view.
+ * @hide
+ */
+ public static WirelessChargingAnimation makeWirelessChargingAnimation(@NonNull Context context,
+ @Nullable Looper looper, int batteryLevel) {
+ return new WirelessChargingAnimation(context, looper, batteryLevel);
+ }
+
+ /**
+ * Show the view for the specified duration.
+ */
+ public void show() {
+ if (mCurrentWirelessChargingView == null ||
+ mCurrentWirelessChargingView.mNextView == null) {
+ throw new RuntimeException("setView must have been called");
+ }
+
+ if (mPreviousWirelessChargingView != null) {
+ mPreviousWirelessChargingView.hide(0);
+ }
+
+ mPreviousWirelessChargingView = mCurrentWirelessChargingView;
+ mCurrentWirelessChargingView.show();
+ mCurrentWirelessChargingView.hide(DURATION);
+ }
+
+ private static class WirelessChargingView {
+ private static final int SHOW = 0;
+ private static final int HIDE = 1;
+
+ private final WindowManager.LayoutParams mParams = new WindowManager.LayoutParams();
+ private final Handler mHandler;
+
+ private int mGravity;
+
+ private View mView;
+ private View mNextView;
+ private WindowManager mWM;
+
+ public WirelessChargingView(Context context, @Nullable Looper looper, int batteryLevel) {
+ mNextView = new WirelessChargingLayout(context, batteryLevel);
+ mGravity = Gravity.CENTER_HORIZONTAL | Gravity.CENTER;
+
+ final WindowManager.LayoutParams params = mParams;
+ params.height = WindowManager.LayoutParams.WRAP_CONTENT;
+ params.width = WindowManager.LayoutParams.WRAP_CONTENT;
+ params.format = PixelFormat.TRANSLUCENT;
+
+ params.type = WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY;
+ params.setTitle("Charging Animation");
+ params.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+ | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
+ | WindowManager.LayoutParams.FLAG_DIM_BEHIND;
+
+ params.dimAmount = .3f;
+
+ if (looper == null) {
+ // Use Looper.myLooper() if looper is not specified.
+ looper = Looper.myLooper();
+ if (looper == null) {
+ throw new RuntimeException(
+ "Can't display wireless animation on a thread that has not called "
+ + "Looper.prepare()");
+ }
+ }
+
+ mHandler = new Handler(looper, null) {
+ @Override
+ public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case SHOW: {
+ handleShow();
+ break;
+ }
+ case HIDE: {
+ handleHide();
+ // Don't do this in handleHide() because it is also invoked by
+ // handleShow()
+ mNextView = null;
+ break;
+ }
+ }
+ }
+ };
+ }
+
+ public void show() {
+ if (LOCAL_LOGV) Log.v(TAG, "SHOW: " + this);
+ mHandler.obtainMessage(SHOW).sendToTarget();
+ }
+
+ public void hide(long duration) {
+ if (LOCAL_LOGV) Log.v(TAG, "HIDE: " + this);
+ mHandler.sendMessageDelayed(Message.obtain(mHandler, HIDE), duration);
+ }
+
+ private void handleShow() {
+ if (LOCAL_LOGV) {
+ Log.v(TAG, "HANDLE SHOW: " + this + " mView=" + mView + " mNextView="
+ + mNextView);
+ }
+
+ if (mView != mNextView) {
+ // remove the old view if necessary
+ handleHide();
+ mView = mNextView;
+ Context context = mView.getContext().getApplicationContext();
+ String packageName = mView.getContext().getOpPackageName();
+ if (context == null) {
+ context = mView.getContext();
+ }
+ mWM = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
+ // We can resolve the Gravity here by using the Locale for getting
+ // the layout direction
+ final Configuration config = mView.getContext().getResources().getConfiguration();
+ final int gravity = Gravity.getAbsoluteGravity(mGravity,
+ config.getLayoutDirection());
+ mParams.gravity = gravity;
+ if ((gravity & Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.FILL_HORIZONTAL) {
+ mParams.horizontalWeight = 1.0f;
+ }
+ if ((gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.FILL_VERTICAL) {
+ mParams.verticalWeight = 1.0f;
+ }
+ mParams.packageName = packageName;
+ mParams.hideTimeoutMilliseconds = DURATION;
+
+ if (mView.getParent() != null) {
+ if (LOCAL_LOGV) Log.v(TAG, "REMOVE! " + mView + " in " + this);
+ mWM.removeView(mView);
+ }
+ if (LOCAL_LOGV) Log.v(TAG, "ADD! " + mView + " in " + this);
+
+ try {
+ mWM.addView(mView, mParams);
+ } catch (WindowManager.BadTokenException e) {
+ Slog.d(TAG, "Unable to add wireless charging view. " + e);
+ }
+ }
+ }
+
+ private void handleHide() {
+ if (LOCAL_LOGV) Log.v(TAG, "HANDLE HIDE: " + this + " mView=" + mView);
+ if (mView != null) {
+ if (mView.getParent() != null) {
+ if (LOCAL_LOGV) Log.v(TAG, "REMOVE! " + mView + " in " + this);
+ mWM.removeViewImmediate(mView);
+ }
+
+ mView = null;
+ }
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java
new file mode 100644
index 0000000..c78ea56
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java
@@ -0,0 +1,81 @@
+/*
+ * 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.charging;
+
+import android.animation.ObjectAnimator;
+import android.animation.ValueAnimator;
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.FrameLayout;
+import android.widget.TextView;
+
+import com.android.systemui.R;
+
+import java.text.NumberFormat;
+
+/**
+ * @hide
+ */
+public class WirelessChargingLayout extends FrameLayout {
+ private final static int UNKNOWN_BATTERY_LEVEL = -1;
+
+ public WirelessChargingLayout(Context context) {
+ super(context);
+ init(context, null);
+ }
+
+ public WirelessChargingLayout(Context context, int batterylLevel) {
+ super(context);
+ init(context, null, batterylLevel);
+ }
+
+ public WirelessChargingLayout(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init(context, attrs);
+ }
+
+ private void init(Context c, AttributeSet attrs) {
+ init(c, attrs, -1);
+ }
+
+ private void init(Context c, AttributeSet attrs, int batteryLevel) {
+ final int mBatteryLevel = batteryLevel;
+
+ inflate(c, R.layout.wireless_charging_layout, this);
+
+ // where the circle animation occurs:
+ final WirelessChargingView mChargingView = findViewById(R.id.wireless_charging_view);
+
+ // amount of battery:
+ final TextView mPercentage = findViewById(R.id.wireless_charging_percentage);
+
+ // (optional) time until full charge if available
+ final TextView mSecondaryText = findViewById(R.id.wireless_charging_secondary_text);
+
+ if (batteryLevel != UNKNOWN_BATTERY_LEVEL) {
+ mPercentage.setText(NumberFormat.getPercentInstance().format(mBatteryLevel / 100f));
+
+ ValueAnimator animator = ObjectAnimator.ofFloat(mPercentage, "textSize",
+ getContext().getResources().getFloat(R.dimen.config_batteryLevelTextSizeStart),
+ getContext().getResources().getFloat(R.dimen.config_batteryLevelTextSizeEnd));
+
+ animator.setDuration((long) getContext().getResources().getInteger(
+ R.integer.config_batteryLevelTextAnimationDuration));
+ animator.start();
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingView.java b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingView.java
new file mode 100644
index 0000000..f5edf52
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingView.java
@@ -0,0 +1,163 @@
+/*
+ * 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.charging;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.animation.DecelerateInterpolator;
+import android.view.animation.Interpolator;
+
+import com.android.settingslib.Utils;
+import com.android.systemui.R;
+
+final class WirelessChargingView extends View {
+
+ private Interpolator mInterpolator;
+ private float mPathGone;
+ private float mInterpolatedPathGone;
+ private long mAnimationStartTime;
+ private long mStartSpinCircleAnimationTime;
+ private long mAnimationOffset = 500;
+ private long mTotalAnimationDuration = WirelessChargingAnimation.DURATION - mAnimationOffset;
+ private long mExpandingCircle = (long) (mTotalAnimationDuration * .9);
+ private long mSpinCircleAnimationTime = mTotalAnimationDuration - mExpandingCircle;
+
+ private boolean mFinishedAnimatingSpinningCircles = false;
+
+ private int mStartAngle = -90;
+ private int mNumSmallCircles = 20;
+ private int mSmallCircleRadius = 10;
+
+ private int mMainCircleStartRadius = 100;
+ private int mMainCircleEndRadius = 230;
+ private int mMainCircleCurrentRadius = mMainCircleStartRadius;
+
+ private int mCenterX;
+ private int mCenterY;
+
+ private Paint mPaint;
+ private Context mContext;
+
+ public WirelessChargingView(Context context) {
+ super(context);
+ init(context, null);
+ }
+
+ public WirelessChargingView(Context context, AttributeSet attr) {
+ super(context, attr);
+ init(context, attr);
+ }
+
+ public WirelessChargingView(Context context, AttributeSet attr, int styleAttr) {
+ super(context, attr, styleAttr);
+ init(context, attr);
+ }
+
+ public void init(Context context, AttributeSet attr) {
+ mContext = context;
+ setupPaint();
+ mInterpolator = new DecelerateInterpolator();
+ }
+
+ private void setupPaint() {
+ mPaint = new Paint();
+ mPaint.setColor(Utils.getColorAttr(mContext, R.attr.wallpaperTextColor));
+ }
+
+ @Override
+ protected void onDraw(final Canvas canvas) {
+ super.onDraw(canvas);
+
+ if (mAnimationStartTime == 0) {
+ mAnimationStartTime = System.currentTimeMillis();
+ }
+
+ updateDrawingParameters();
+ drawCircles(canvas);
+
+ if (!mFinishedAnimatingSpinningCircles) {
+ invalidate();
+ }
+ }
+
+ /**
+ * Draws a larger circle of radius {@link WirelessChargingView#mMainCircleEndRadius} composed of
+ * {@link WirelessChargingView#mNumSmallCircles} smaller circles
+ * @param canvas
+ */
+ private void drawCircles(Canvas canvas) {
+ mCenterX = canvas.getWidth() / 2;
+ mCenterY = canvas.getHeight() / 2;
+
+ // angleOffset makes small circles look like they're moving around the main circle
+ float angleOffset = mPathGone * 10;
+
+ // draws mNumSmallCircles to compose a larger, main circle
+ for (int circle = 0; circle < mNumSmallCircles; circle++) {
+ double angle = ((mStartAngle + angleOffset) * Math.PI / 180) + (circle * ((2 * Math.PI)
+ / mNumSmallCircles));
+
+ int x = (int) (mCenterX + Math.cos(angle) * (mMainCircleCurrentRadius +
+ mSmallCircleRadius));
+ int y = (int) (mCenterY + Math.sin(angle) * (mMainCircleCurrentRadius +
+ mSmallCircleRadius));
+
+ canvas.drawCircle(x, y, mSmallCircleRadius, mPaint);
+ }
+
+ if (mMainCircleCurrentRadius >= mMainCircleEndRadius && !isSpinCircleAnimationStarted()) {
+ mStartSpinCircleAnimationTime = System.currentTimeMillis();
+ }
+
+ if (isSpinAnimationFinished()) {
+ mFinishedAnimatingSpinningCircles = true;
+ }
+ }
+
+ private boolean isSpinCircleAnimationStarted() {
+ return mStartSpinCircleAnimationTime != 0;
+ }
+
+ private boolean isSpinAnimationFinished() {
+ return isSpinCircleAnimationStarted() && System.currentTimeMillis() -
+ mStartSpinCircleAnimationTime > mSpinCircleAnimationTime;
+ }
+
+ private void updateDrawingParameters() {
+ mPathGone = getPathGone(System.currentTimeMillis());
+ mInterpolatedPathGone = mInterpolator.getInterpolation(mPathGone);
+
+ if (mPathGone < 1.0f) {
+ mMainCircleCurrentRadius = mMainCircleStartRadius + (int) (mInterpolatedPathGone *
+ (mMainCircleEndRadius - mMainCircleStartRadius));
+ } else {
+ mMainCircleCurrentRadius = mMainCircleEndRadius;
+ }
+ }
+
+ /**
+ * @return decimal depicting how far along the creation of the larger circle (of circles) is
+ * For values < 1.0, the larger circle is being drawn
+ * For values > 1.0 the larger circle has been drawn and further animation can occur
+ */
+ private float getPathGone(long now) {
+ return (float) (now - mAnimationStartTime) / (mExpandingCircle);
+ }
+}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/fingerprint/FingerprintDialogView.java b/packages/SystemUI/src/com/android/systemui/fingerprint/FingerprintDialogView.java
index 19bc2ec..9779937 100644
--- a/packages/SystemUI/src/com/android/systemui/fingerprint/FingerprintDialogView.java
+++ b/packages/SystemUI/src/com/android/systemui/fingerprint/FingerprintDialogView.java
@@ -146,7 +146,7 @@
subtitle.setText(mBundle.getCharSequence(FingerprintDialog.KEY_SUBTITLE));
description.setText(mBundle.getCharSequence(FingerprintDialog.KEY_DESCRIPTION));
negative.setText(mBundle.getCharSequence(FingerprintDialog.KEY_NEGATIVE_TEXT));
- image.setImageDrawable(getAppIcon());
+ setAppIcon(image);
final CharSequence positiveText =
mBundle.getCharSequence(FingerprintDialog.KEY_POSITIVE_TEXT);
@@ -190,6 +190,7 @@
private void showMessage(String message) {
mHandler.removeMessages(FingerprintDialogImpl.MSG_CLEAR_MESSAGE);
mErrorText.setText(message);
+ mErrorText.setContentDescription(message);
mErrorText.setVisibility(View.VISIBLE);
mHandler.sendMessageDelayed(mHandler.obtainMessage(FingerprintDialogImpl.MSG_CLEAR_MESSAGE),
FingerprintDialog.HIDE_DIALOG_DELAY);
@@ -205,12 +206,16 @@
false /* userCanceled */), FingerprintDialog.HIDE_DIALOG_DELAY);
}
- private Drawable getAppIcon() {
+ private void setAppIcon(ImageView image) {
final ActivityManager.RunningTaskInfo taskInfo = mActivityManagerWrapper.getRunningTask();
final ComponentName cn = taskInfo.topActivity;
final int userId = mActivityManagerWrapper.getCurrentUserId();
final ActivityInfo activityInfo = mPackageManageWrapper.getActivityInfo(cn, userId);
- return mActivityManagerWrapper.getBadgedActivityIcon(activityInfo, userId);
+ image.setImageDrawable(mActivityManagerWrapper.getBadgedActivityIcon(activityInfo, userId));
+ image.setContentDescription(
+ getResources().getString(R.string.accessibility_fingerprint_dialog_app_icon)
+ + " "
+ + mActivityManagerWrapper.getBadgedActivityLabel(activityInfo, userId));
}
public WindowManager.LayoutParams getLayoutParams() {
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsComponent.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsComponent.java
index f06cda0..aa08562 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsComponent.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsComponent.java
@@ -14,6 +14,10 @@
package com.android.systemui.globalactions;
+import android.content.Context;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+
import com.android.internal.statusbar.IStatusBarService;
import com.android.systemui.Dependency;
import com.android.systemui.SysUiServiceProvider;
@@ -25,10 +29,6 @@
import com.android.systemui.statusbar.policy.ExtensionController;
import com.android.systemui.statusbar.policy.ExtensionController.Extension;
-import android.content.Context;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-
public class GlobalActionsComponent extends SystemUI implements Callbacks, GlobalActionsManager {
private GlobalActions mPlugin;
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
index 0f34513..238ab29 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
@@ -587,9 +587,9 @@
// switching user
mHandler.postDelayed(() -> {
try {
+ int currentUserId = getCurrentUser().id;
ActivityManager.getService().switchUser(UserHandle.USER_SYSTEM);
- ActivityManager.getService().stopUser(getCurrentUser().id, true /*force*/,
- null);
+ ActivityManager.getService().stopUser(currentUserId, true /*force*/, null);
} catch (RemoteException re) {
Log.e(TAG, "Couldn't logout user " + re);
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
index e49e80d..c7d276c 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
@@ -118,7 +118,7 @@
public boolean onCreateSliceProvider() {
mNextAlarmController = new NextAlarmControllerImpl(getContext());
mNextAlarmController.addCallback(this);
- mDatePattern = getContext().getString(R.string.system_ui_date_pattern);
+ mDatePattern = getContext().getString(R.string.system_ui_aod_date_pattern);
registerClockUpdate(false /* everyMinute */);
updateClock();
return true;
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
index 36531bb..24d0126 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
@@ -16,12 +16,10 @@
package com.android.systemui.pip.phone;
-import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
-import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.view.Display.DEFAULT_DISPLAY;
+import static android.view.WindowManager.INPUT_CONSUMER_PIP;
import android.app.ActivityManager;
-import android.app.ActivityManager.StackInfo;
import android.app.IActivityManager;
import android.content.ComponentName;
import android.content.Context;
@@ -43,6 +41,7 @@
import com.android.systemui.recents.misc.SysUiTaskStackChangeListener;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.shared.system.ActivityManagerWrapper;
+import com.android.systemui.shared.system.InputConsumerController;
import java.io.PrintWriter;
@@ -174,7 +173,8 @@
}
ActivityManagerWrapper.getInstance().registerTaskStackListener(mTaskStackListener);
- mInputConsumerController = new InputConsumerController(mWindowManager);
+ mInputConsumerController = InputConsumerController.getPipInputConsumer();
+ mInputConsumerController.registerInputConsumer();
mMediaController = new PipMediaController(context, mActivityManager);
mMenuController = new PipMenuActivityController(context, mActivityManager, mMediaController,
mInputConsumerController);
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java
index 9fb201b..26fced3 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java
@@ -23,7 +23,6 @@
import android.app.ActivityOptions;
import android.app.IActivityManager;
import android.app.RemoteAction;
-import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ParceledListSlice;
@@ -43,6 +42,7 @@
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.component.HidePipMenuEvent;
import com.android.systemui.recents.misc.ReferenceCountedTrigger;
+import com.android.systemui.shared.system.InputConsumerController;
import java.io.PrintWriter;
import java.util.ArrayList;
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
index c0fed34..b253517 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
@@ -46,6 +46,7 @@
import com.android.internal.os.logging.MetricsLoggerWrapper;
import com.android.internal.policy.PipSnapAlgorithm;
import com.android.systemui.R;
+import com.android.systemui.shared.system.InputConsumerController;
import com.android.systemui.statusbar.FlingAnimationUtils;
import java.io.PrintWriter;
diff --git a/packages/SystemUI/src/com/android/systemui/power/EnhancedEstimates.java b/packages/SystemUI/src/com/android/systemui/power/EnhancedEstimates.java
index 8f41a60..bd130f4 100644
--- a/packages/SystemUI/src/com/android/systemui/power/EnhancedEstimates.java
+++ b/packages/SystemUI/src/com/android/systemui/power/EnhancedEstimates.java
@@ -2,7 +2,25 @@
public interface EnhancedEstimates {
+ /**
+ * Returns a boolean indicating if the hybrid notification should be used.
+ */
boolean isHybridNotificationEnabled();
+ /**
+ * Returns an estimate object if the feature is enabled.
+ */
Estimate getEstimate();
+
+ /**
+ * Returns a long indicating the amount of time remaining in milliseconds under which we will
+ * show a regular warning to the user.
+ */
+ long getLowWarningThreshold();
+
+ /**
+ * Returns a long indicating the amount of time remaining in milliseconds under which we will
+ * show a severe warning to the user.
+ */
+ long getSevereWarningThreshold();
}
diff --git a/packages/SystemUI/src/com/android/systemui/power/EnhancedEstimatesImpl.java b/packages/SystemUI/src/com/android/systemui/power/EnhancedEstimatesImpl.java
index d447542..5686d80 100644
--- a/packages/SystemUI/src/com/android/systemui/power/EnhancedEstimatesImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/power/EnhancedEstimatesImpl.java
@@ -13,4 +13,14 @@
public Estimate getEstimate() {
return null;
}
+
+ @Override
+ public long getLowWarningThreshold() {
+ return 0;
+ }
+
+ @Override
+ public long getSevereWarningThreshold() {
+ return 0;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
index 736286f..aa56694 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
@@ -99,6 +99,8 @@
private long mWarningTriggerTimeMs;
private Estimate mEstimate;
+ private long mLowWarningThreshold;
+ private long mSevereWarningThreshold;
private boolean mWarning;
private boolean mPlaySound;
private boolean mInvalidCharger;
@@ -142,11 +144,18 @@
@Override
public void updateEstimate(Estimate estimate) {
mEstimate = estimate;
- if (estimate.estimateMillis <= PowerUI.THREE_HOURS_IN_MILLIS) {
+ if (estimate.estimateMillis <= mLowWarningThreshold) {
mWarningTriggerTimeMs = System.currentTimeMillis();
}
}
+ @Override
+ public void updateThresholds(long lowThreshold, long severeThreshold) {
+ mLowWarningThreshold = lowThreshold;
+ mSevereWarningThreshold = severeThreshold;
+ }
+
+
private void updateNotification() {
if (DEBUG) Slog.d(TAG, "updateNotification mWarning=" + mWarning + " mPlaySound="
+ mPlaySound + " mInvalidCharger=" + mInvalidCharger);
@@ -181,7 +190,8 @@
}
protected void showWarningNotification() {
- final String percentage = NumberFormat.getPercentInstance().format((double) mBatteryLevel / 100.0);
+ final String percentage = NumberFormat.getPercentInstance()
+ .format((double) mBatteryLevel / 100.0);
// get standard notification copy
String title = mContext.getString(R.string.battery_low_title);
@@ -214,7 +224,8 @@
}
// Make the notification red if the percentage goes below a certain amount or the time
// remaining estimate is disabled
- if (mEstimate == null || mBucket < 0) {
+ if (mEstimate == null || mBucket < 0
+ || mEstimate.estimateMillis < mSevereWarningThreshold) {
nb.setColor(Utils.getColorAttr(mContext, android.R.attr.colorError));
}
nb.addAction(0,
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
index c5aab60..b43e99b 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
@@ -269,6 +269,8 @@
if (estimate != null) {
mTimeRemaining = estimate.estimateMillis;
mWarnings.updateEstimate(estimate);
+ mWarnings.updateThresholds(mEnhancedEstimates.getLowWarningThreshold(),
+ mEnhancedEstimates.getSevereWarningThreshold());
}
}
@@ -292,7 +294,7 @@
&& !isPowerSaver
&& (((bucket < oldBucket || oldPlugged) && bucket < 0)
|| (mEnhancedEstimates.isHybridNotificationEnabled()
- && timeRemaining < THREE_HOURS_IN_MILLIS
+ && timeRemaining < mEnhancedEstimates.getLowWarningThreshold()
&& isHourLess(oldTimeRemaining, timeRemaining)))
&& mBatteryStatus != BatteryManager.BATTERY_STATUS_UNKNOWN;
}
@@ -306,7 +308,7 @@
boolean shouldDismissLowBatteryWarning(boolean plugged, int oldBucket, int bucket,
long timeRemaining, boolean isPowerSaver) {
final boolean hybridWouldDismiss = mEnhancedEstimates.isHybridNotificationEnabled()
- && timeRemaining > THREE_HOURS_IN_MILLIS;
+ && timeRemaining > mEnhancedEstimates.getLowWarningThreshold();
final boolean standardWouldDismiss = (bucket > oldBucket && bucket > 0);
return isPowerSaver
|| plugged
@@ -485,6 +487,7 @@
public interface WarningsUI {
void update(int batteryLevel, int bucket, long screenOffTime);
void updateEstimate(Estimate estimate);
+ void updateThresholds(long lowThreshold, long severeThreshold);
void dismissLowBatteryWarning();
void showLowBatteryWarning(boolean playSound);
void dismissInvalidChargerWarning();
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
index 8f18800..001b409 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
@@ -44,7 +44,11 @@
public static final float EXPANDED_TILE_DELAY = .86f;
private final ArrayList<View> mAllViews = new ArrayList<>();
- private final ArrayList<View> mTopFiveQs = new ArrayList<>();
+ /**
+ * List of {@link View}s representing Quick Settings that are being animated from the quick QS
+ * position to the normal QS panel.
+ */
+ private final ArrayList<View> mQuickQsViews = new ArrayList<>();
private final QuickQSPanel mQuickQsPanel;
private final QSPanel mQsPanel;
private final QS mQs;
@@ -157,7 +161,7 @@
clearAnimationState();
mAllViews.clear();
- mTopFiveQs.clear();
+ mQuickQsViews.clear();
QSTileLayout tileLayout = mQsPanel.getTileLayout();
mAllViews.add((View) tileLayout);
@@ -198,7 +202,7 @@
translationXBuilder.addFloat(tileView, "translationX", -xDiff, 0);
translationYBuilder.addFloat(tileView, "translationY", -yDiff, 0);
- mTopFiveQs.add(tileView.getIcon());
+ mQuickQsViews.add(tileView.getIconWithBackground());
mAllViews.add(tileView.getIcon());
mAllViews.add(quickTileView);
} else if (mFullRows && isIconInAnimatedRow(count)) {
@@ -244,10 +248,8 @@
mFirstPageDelayedAnimator = new TouchAnimator.Builder()
.setStartDelay(EXPANDED_TILE_DELAY)
.addFloat(tileLayout, "alpha", 0, 1)
- .addFloat(mQsPanel.getPageIndicator(), "alpha", 0, 1)
.addFloat(mQsPanel.getDivider(), "alpha", 0, 1)
.addFloat(mQsPanel.getFooter().getView(), "alpha", 0, 1).build();
- mAllViews.add(mQsPanel.getPageIndicator());
mAllViews.add(mQsPanel.getDivider());
mAllViews.add(mQsPanel.getFooter().getView());
float px = 0;
@@ -265,7 +267,6 @@
}
mNonfirstPageAnimator = new TouchAnimator.Builder()
.addFloat(mQuickQsPanel, "alpha", 1, 0)
- .addFloat(mQsPanel.getPageIndicator(), "alpha", 0, 1)
.addFloat(mQsPanel.getDivider(), "alpha", 0, 1)
.setListener(mNonFirstPageListener)
.setEndDelay(.5f)
@@ -325,9 +326,9 @@
@Override
public void onAnimationAtEnd() {
mQuickQsPanel.setVisibility(View.INVISIBLE);
- final int N = mTopFiveQs.size();
+ final int N = mQuickQsViews.size();
for (int i = 0; i < N; i++) {
- mTopFiveQs.get(i).setVisibility(View.VISIBLE);
+ mQuickQsViews.get(i).setVisibility(View.VISIBLE);
}
}
@@ -335,9 +336,9 @@
public void onAnimationStarted() {
mQuickQsPanel.setVisibility(mOnKeyguard ? View.INVISIBLE : View.VISIBLE);
if (mOnFirstPage) {
- final int N = mTopFiveQs.size();
+ final int N = mQuickQsViews.size();
for (int i = 0; i < N; i++) {
- mTopFiveQs.get(i).setVisibility(View.INVISIBLE);
+ mQuickQsViews.get(i).setVisibility(View.INVISIBLE);
}
}
}
@@ -351,9 +352,9 @@
v.setTranslationX(0);
v.setTranslationY(0);
}
- final int N2 = mTopFiveQs.size();
+ final int N2 = mQuickQsViews.size();
for (int i = 0; i < N2; i++) {
- mTopFiveQs.get(i).setVisibility(View.VISIBLE);
+ mQuickQsViews.get(i).setVisibility(View.VISIBLE);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
index 7320b86..6b0d592 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
@@ -17,11 +17,11 @@
package com.android.systemui.qs;
import android.content.Context;
+import android.content.res.Configuration;
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.Point;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.View;
import android.widget.FrameLayout;
@@ -80,11 +80,22 @@
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ getDisplay().getRealSize(mSizePoint);
+
// Since we control our own bottom, be whatever size we want.
// Otherwise the QSPanel ends up with 0 height when the window is only the
// size of the status bar.
- mQSPanel.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(
- MeasureSpec.getSize(heightMeasureSpec), MeasureSpec.UNSPECIFIED));
+ Configuration config = getResources().getConfiguration();
+ boolean navBelow = config.smallestScreenWidthDp >= 600
+ || config.orientation != Configuration.ORIENTATION_LANDSCAPE;
+ MarginLayoutParams params = (MarginLayoutParams) mQSPanel.getLayoutParams();
+ int maxQs = mSizePoint.y - params.topMargin - params.bottomMargin - getPaddingBottom()
+ - getResources().getDimensionPixelSize(R.dimen.qs_notif_collapsed_space);
+ if (navBelow) {
+ maxQs -= getResources().getDimensionPixelSize(R.dimen.navigation_bar_height);
+ }
+ mQSPanel.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(maxQs, MeasureSpec.AT_MOST));
+
int width = mQSPanel.getMeasuredWidth();
LayoutParams layoutParams = (LayoutParams) mQSPanel.getLayoutParams();
int height = layoutParams.topMargin + layoutParams.bottomMargin
@@ -94,7 +105,6 @@
// QSCustomizer will always be the height of the screen, but do this after
// other measuring to avoid changing the height of the QS.
- getDisplay().getRealSize(mSizePoint);
mQSCustomizer.measure(widthMeasureSpec,
MeasureSpec.makeMeasureSpec(mSizePoint.y, MeasureSpec.EXACTLY));
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
index cdf0c0f..669439d 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
@@ -25,6 +25,7 @@
import android.util.Log;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
+import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
@@ -207,6 +208,11 @@
}
@Override
+ public boolean onInterceptTouchEvent(MotionEvent event) {
+ return isCustomizing() || mQSPanel.onInterceptTouchEvent(event);
+ }
+
+ @Override
public void setHeaderClickable(boolean clickable) {
if (DEBUG) Log.d(TAG, "setHeaderClickable " + clickable);
@@ -279,17 +285,22 @@
int heightDiff = mQSPanel.getBottom() - mHeader.getBottom() + mHeader.getPaddingBottom()
+ mFooter.getHeight();
mQSPanel.setTranslationY(translationScaleY * heightDiff);
- mQSDetail.setFullyExpanded(expansion == 1);
+ boolean fullyExpanded = expansion == 1;
+ mQSDetail.setFullyExpanded(fullyExpanded);
+ if (fullyExpanded) {
+ // Always draw within the bounds of the view when fully expanded.
+ mQSPanel.setClipBounds(null);
+ } else {
+ // Set bounds on the QS panel so it doesn't run over the header when animating.
+ mQsBounds.top = (int) -mQSPanel.getTranslationY();
+ mQsBounds.right = mQSPanel.getWidth();
+ mQsBounds.bottom = mQSPanel.getHeight();
+ mQSPanel.setClipBounds(mQsBounds);
+ }
if (mQSAnimator != null) {
mQSAnimator.setPosition(expansion);
}
-
- // Set bounds on the QS panel so it doesn't run over the header.
- mQsBounds.top = (int) -mQSPanel.getTranslationY();
- mQsBounds.right = mQSPanel.getWidth();
- mQsBounds.bottom = mQSPanel.getHeight();
- mQSPanel.setClipBounds(mQsBounds);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 8f41084..00b6c1e 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -28,8 +28,8 @@
import android.service.quicksettings.Tile;
import android.util.AttributeSet;
import android.view.LayoutInflater;
+import android.view.MotionEvent;
import android.view.View;
-import android.widget.ImageView;
import android.widget.LinearLayout;
import com.android.internal.logging.MetricsLogger;
@@ -62,11 +62,8 @@
protected final ArrayList<TileRecord> mRecords = new ArrayList<TileRecord>();
protected final View mBrightnessView;
private final H mHandler = new H();
- private final View mPageIndicator;
private final MetricsLogger mMetricsLogger = Dependency.get(MetricsLogger.class);
- private int mPanelPaddingBottom;
- private int mBrightnessPaddingTop;
protected boolean mExpanded;
protected boolean mListening;
@@ -77,6 +74,7 @@
protected QSSecurityFooter mFooter;
private boolean mGridContentVisible = true;
+ private QSScrollLayout mScrollLayout;
protected QSTileLayout mTileLayout;
private QSCustomizer mCustomizePanel;
@@ -95,18 +93,12 @@
setOrientation(VERTICAL);
- mBrightnessView = LayoutInflater.from(context).inflate(
- R.layout.quick_settings_brightness_dialog, this, false);
- addView(mBrightnessView);
-
- setupTileLayout();
-
- mPageIndicator = LayoutInflater.from(context).inflate(
- R.layout.qs_page_indicator, this, false);
- addView(mPageIndicator);
- if (mTileLayout instanceof PagedTileLayout) {
- ((PagedTileLayout) mTileLayout).setPageIndicator((PageIndicator) mPageIndicator);
- }
+ mBrightnessView = LayoutInflater.from(mContext).inflate(
+ R.layout.quick_settings_brightness_dialog, this, false);
+ mTileLayout = new TileLayout(mContext);
+ mTileLayout.setListening(mListening);
+ mScrollLayout = new QSScrollLayout(mContext, mBrightnessView, (View) mTileLayout);
+ addView(mScrollLayout);
addDivider();
@@ -131,17 +123,6 @@
return mDivider;
}
- public View getPageIndicator() {
- return mPageIndicator;
- }
-
- protected void setupTileLayout() {
- mTileLayout = (QSTileLayout) LayoutInflater.from(mContext).inflate(
- R.layout.qs_paged_tile_layout, this, false);
- mTileLayout.setListening(mListening);
- addView((View) mTileLayout);
- }
-
public boolean isShowingCustomize() {
return mCustomizePanel != null && mCustomizePanel.isCustomizing();
}
@@ -241,9 +222,13 @@
public void updateResources() {
final Resources res = mContext.getResources();
- mPanelPaddingBottom = res.getDimensionPixelSize(R.dimen.qs_panel_padding_bottom);
- mBrightnessPaddingTop = res.getDimensionPixelSize(R.dimen.qs_brightness_padding_top);
- setPadding(0, mBrightnessPaddingTop, 0, mPanelPaddingBottom);
+ mBrightnessView.setPadding(
+ mBrightnessView.getPaddingLeft(),
+ res.getDimensionPixelSize(R.dimen.qs_brightness_padding_top),
+ mBrightnessView.getPaddingRight(),
+ mBrightnessView.getPaddingBottom());
+ setPadding(
+ 0, 0, 0, res.getDimensionPixelSize(R.dimen.qs_panel_padding_bottom));
for (TileRecord r : mRecords) {
r.tile.clearState();
}
@@ -282,8 +267,11 @@
public void setExpanded(boolean expanded) {
if (mExpanded == expanded) return;
mExpanded = expanded;
- if (!mExpanded && mTileLayout instanceof PagedTileLayout) {
- ((PagedTileLayout) mTileLayout).setCurrentItem(0, false);
+ if (!mExpanded) {
+ if (mTileLayout instanceof PagedTileLayout) {
+ ((PagedTileLayout) mTileLayout).setCurrentItem(0, false);
+ }
+ mScrollLayout.setScrollY(0);
}
mMetricsLogger.visibility(MetricsEvent.QS_PANEL, mExpanded);
if (!mExpanded) {
@@ -317,6 +305,7 @@
}
public void refreshAllTiles() {
+ mBrightnessController.checkRestrictionAndSetEnabled();
for (TileRecord r : mRecords) {
r.tile.refreshState();
}
@@ -564,6 +553,11 @@
mFooter.showDeviceMonitoringDialog();
}
+ @Override
+ public boolean onInterceptTouchEvent(MotionEvent event) {
+ return mExpanded && mScrollLayout.shouldIntercept(event);
+ }
+
private class H extends Handler {
private static final int SHOW_DETAIL = 1;
private static final int SET_TILE_VISIBILITY = 2;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSScrollLayout.java b/packages/SystemUI/src/com/android/systemui/qs/QSScrollLayout.java
new file mode 100644
index 0000000..9a74787
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSScrollLayout.java
@@ -0,0 +1,83 @@
+/*
+ * 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.qs;
+
+import android.content.Context;
+import android.graphics.Rect;
+import android.support.v4.widget.NestedScrollView;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewConfiguration;
+import android.view.ViewParent;
+import android.widget.LinearLayout;
+
+/**
+ * Quick setting scroll view containing the brightness slider and the QS tiles.
+ *
+ * <p>Call {@link #shouldIntercept(MotionEvent)} from parent views'
+ * {@link #onInterceptTouchEvent(MotionEvent)} method to determine whether this view should
+ * consume the touch event.
+ */
+public class QSScrollLayout extends NestedScrollView {
+ private final int mTouchSlop;
+ private int mLastMotionY;
+ private Rect mHitRect = new Rect();
+
+ public QSScrollLayout(Context context, View... children) {
+ super(context);
+ mTouchSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop();
+ LinearLayout linearLayout = new LinearLayout(mContext);
+ linearLayout.setLayoutParams(new LinearLayout.LayoutParams(
+ LinearLayout.LayoutParams.MATCH_PARENT,
+ LinearLayout.LayoutParams.WRAP_CONTENT));
+ linearLayout.setOrientation(LinearLayout.VERTICAL);
+ for (View view : children) {
+ linearLayout.addView(view);
+ }
+ addView(linearLayout);
+ }
+
+ public boolean shouldIntercept(MotionEvent ev) {
+ getHitRect(mHitRect);
+ if (!mHitRect.contains((int) ev.getX(), (int) ev.getY())) {
+ // Do not intercept touches that are not within this view's bounds.
+ return false;
+ }
+ if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) {
+ mLastMotionY = (int) ev.getY();
+ } else if (ev.getActionMasked() == MotionEvent.ACTION_MOVE) {
+ // Do not allow NotificationPanelView to intercept touch events when this
+ // view can be scrolled down.
+ if (mLastMotionY >= 0 && Math.abs(ev.getY() - mLastMotionY) > mTouchSlop
+ && canScrollVertically(1)) {
+ requestParentDisallowInterceptTouchEvent(true);
+ mLastMotionY = (int) ev.getY();
+ return true;
+ }
+ } else if (ev.getActionMasked() == MotionEvent.ACTION_CANCEL
+ || ev.getActionMasked() == MotionEvent.ACTION_UP) {
+ mLastMotionY = -1;
+ requestParentDisallowInterceptTouchEvent(false);
+ }
+ return false;
+ }
+
+ private void requestParentDisallowInterceptTouchEvent(boolean disallowIntercept) {
+ final ViewParent parent = getParent();
+ if (parent != null) {
+ parent.requestDisallowInterceptTouchEvent(disallowIntercept);
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java
index 947b23f..8314855 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java
@@ -20,6 +20,7 @@
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
+import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.Space;
@@ -50,13 +51,14 @@
public QuickQSPanel(Context context, AttributeSet attrs) {
super(context, attrs);
if (mFooter != null) {
- removeView((View) mFooter.getView());
+ removeView(mFooter.getView());
}
if (mTileLayout != null) {
for (int i = 0; i < mRecords.size(); i++) {
mTileLayout.removeTile(mRecords.get(i));
}
- removeView((View) mTileLayout);
+ View tileLayoutView = (View) mTileLayout;
+ ((ViewGroup) tileLayoutView.getParent()).removeView(tileLayoutView);
}
mTileLayout = new HeaderTileLayout(context);
mTileLayout.setListening(mListening);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
index a97b35c..4d7333b 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
@@ -39,7 +39,8 @@
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.qs.QSDetail.Callback;
import com.android.systemui.statusbar.CommandQueue;
-import com.android.systemui.statusbar.SignalClusterView;
+import com.android.systemui.statusbar.phone.StatusBarIconController;
+import com.android.systemui.statusbar.phone.StatusBarIconController.TintedIconManager;
import com.android.systemui.statusbar.policy.DarkIconDispatcher;
import com.android.systemui.statusbar.policy.DarkIconDispatcher.DarkReceiver;
@@ -56,6 +57,10 @@
protected QuickQSPanel mHeaderQsPanel;
protected QSTileHost mHost;
+ private TintedIconManager mIconManager;
+ private TouchAnimator mAlphaAnimator;
+
+ private View mQuickQsStatusIcons;
private View mDate;
@@ -71,19 +76,27 @@
mHeaderQsPanel = findViewById(R.id.quick_qs_panel);
mDate = findViewById(R.id.date);
mDate.setOnClickListener(this);
+ mQuickQsStatusIcons = findViewById(R.id.quick_qs_status_icons);
+ mIconManager = new TintedIconManager(findViewById(R.id.statusIcons));
// RenderThread is doing more harm than good when touching the header (to expand quick
// settings), so disable it for this view
updateResources();
- // Set light text on the header icons because they will always be on a black background
- int colorForeground = Utils.getColorAttr(getContext(), android.R.attr.colorForeground);
Rect tintArea = new Rect(0, 0, 0, 0);
+ int colorForeground = Utils.getColorAttr(getContext(), android.R.attr.colorForeground);
+ float intensity = colorForeground == Color.WHITE ? 0 : 1;
+ int fillColor = fillColorForIntensity(intensity, getContext());
+
+ // Set light text on the header icons because they will always be on a black background
applyDarkness(R.id.clock, tintArea, 0, DarkIconDispatcher.DEFAULT_ICON_TINT);
+ applyDarkness(id.signal_cluster, tintArea, intensity, colorForeground);
+
+ // Set the correct tint for the status icons so they contrast
+ mIconManager.setTint(fillColor);
BatteryMeterView battery = findViewById(R.id.battery);
- battery.setFillColor(Color.WHITE);
battery.setForceShowPercent(true);
mActivityStarter = Dependency.get(ActivityStarter.class);
@@ -96,6 +109,13 @@
}
}
+ private int fillColorForIntensity(float intensity, Context context) {
+ if (intensity == 0) {
+ return context.getColor(R.color.light_mode_icon_color_dual_tone_fill);
+ }
+ return context.getColor(R.color.dark_mode_icon_color_dual_tone_fill);
+ }
+
@Override
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
@@ -109,6 +129,13 @@
}
private void updateResources() {
+ updateAlphaAnimator();
+ }
+
+ private void updateAlphaAnimator() {
+ mAlphaAnimator = new TouchAnimator.Builder()
+ .addFloat(mQuickQsStatusIcons, "alpha", 1, 0)
+ .build();
}
public int getCollapsedHeight() {
@@ -127,6 +154,9 @@
}
public void setExpansion(float headerExpansionFraction) {
+ if (mAlphaAnimator != null ) {
+ mAlphaAnimator.setPosition(headerExpansionFraction);
+ }
}
@Override
@@ -135,13 +165,15 @@
if (disabled == mQsDisabled) return;
mQsDisabled = disabled;
mHeaderQsPanel.setDisabledByPolicy(disabled);
- final int rawHeight = (int) getResources().getDimension(R.dimen.status_bar_header_height);
+ final int rawHeight = (int) getResources().getDimension(
+ com.android.internal.R.dimen.quick_qs_total_height);
getLayoutParams().height = disabled ? (rawHeight - mHeaderQsPanel.getHeight()) : rawHeight;
}
@Override
public void onAttachedToWindow() {
SysUiServiceProvider.getComponent(getContext(), CommandQueue.class).addCallbacks(this);
+ Dependency.get(StatusBarIconController.class).addIconGroup(mIconManager);
}
@Override
@@ -149,17 +181,10 @@
public void onDetachedFromWindow() {
setListening(false);
SysUiServiceProvider.getComponent(getContext(), CommandQueue.class).removeCallbacks(this);
+ Dependency.get(StatusBarIconController.class).removeIconGroup(mIconManager);
super.onDetachedFromWindow();
}
- @Override
- public void onClick(View v) {
- if (v == mDate) {
- Dependency.get(ActivityStarter.class).postStartActivityDismissingKeyguard(new Intent(
- AlarmClock.ACTION_SHOW_ALARMS), 0);
- }
- }
-
public void setListening(boolean listening) {
if (listening == mListening) {
return;
@@ -168,6 +193,14 @@
mListening = listening;
}
+ @Override
+ public void onClick(View v) {
+ if(v == mDate){
+ Dependency.get(ActivityStarter.class).postStartActivityDismissingKeyguard(new Intent(
+ AlarmClock.ACTION_SHOW_ALARMS),0);
+ }
+ }
+
public void updateEverything() {
post(() -> setClickable(false));
}
@@ -182,6 +215,11 @@
//host.setHeaderView(mExpandIndicator);
mHeaderQsPanel.setQSPanelAndHeader(mQsPanel, this);
mHeaderQsPanel.setHost(host, null /* No customization in header */);
+
+ // Use SystemUI context to get battery meter colors, and let it use the default tint (white)
+ BatteryMeterView battery = findViewById(R.id.battery);
+ battery.setColorsFromContext(mHost.getContext());
+ battery.onDarkChanged(new Rect(), 0, DarkIconDispatcher.DEFAULT_ICON_TINT);
}
public void setCallback(Callback qsPanelCallback) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java
index b4cfda6..c9c678c 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java
@@ -236,6 +236,10 @@
return mIcon;
}
+ public View getIconWithBackground() {
+ return mIconFrame;
+ }
+
@Override
public boolean performClick() {
mClicked = true;
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 4ceace3..aaf6ef5 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
@@ -19,6 +19,9 @@
import static android.provider.Settings.Global.ZEN_MODE_ALARMS;
import static android.provider.Settings.Global.ZEN_MODE_OFF;
+import android.app.AlarmManager;
+import android.app.AlarmManager.AlarmClockInfo;
+import android.app.Dialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -27,9 +30,11 @@
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
+import android.net.Uri;
import android.os.UserManager;
import android.provider.Settings;
import android.provider.Settings.Global;
+import android.service.notification.ScheduleCalendar;
import android.service.notification.ZenModeConfig;
import android.service.notification.ZenModeConfig.ZenRule;
import android.service.quicksettings.Tile;
@@ -38,11 +43,13 @@
import android.view.View;
import android.view.View.OnAttachStateChangeListener;
import android.view.ViewGroup;
+import android.view.WindowManager;
import android.widget.Switch;
import android.widget.Toast;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+import com.android.settingslib.notification.EnableZenModeDialog;
import com.android.systemui.Dependency;
import com.android.systemui.Prefs;
import com.android.systemui.R;
@@ -53,6 +60,7 @@
import com.android.systemui.plugins.qs.QSTile.BooleanState;
import com.android.systemui.qs.QSHost;
import com.android.systemui.qs.tileimpl.QSTileImpl;
+import com.android.systemui.statusbar.phone.SystemUIDialog;
import com.android.systemui.statusbar.policy.ZenModeController;
import com.android.systemui.volume.ZenModePanel;
@@ -68,9 +76,6 @@
private static final String ACTION_SET_VISIBLE = "com.android.systemui.dndtile.SET_VISIBLE";
private static final String EXTRA_VISIBLE = "visible";
- private static final QSTile.Icon TOTAL_SILENCE =
- ResourceIcon.get(R.drawable.ic_qs_dnd_on_total_silence);
-
private final ZenModeController mController;
private final DndDetailAdapter mDetailAdapter;
@@ -129,14 +134,28 @@
@Override
protected void handleClick() {
+ // Zen is currently on
if (mState.value) {
mController.setZen(ZEN_MODE_OFF, null, TAG);
} else {
- mController.setZen(Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS, null, TAG);
+ showDetail(true);
}
}
@Override
+ public void showDetail(boolean show) {
+ mUiHandler.post(() -> {
+ Dialog mDialog = new EnableZenModeDialog(mContext).createDialog();
+ mDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
+ SystemUIDialog.setShowForAllUsers(mDialog, true);
+ SystemUIDialog.registerDismissListener(mDialog);
+ SystemUIDialog.setWindowOnTop(mDialog);
+ mUiHandler.post(() -> mDialog.show());
+ mHost.collapsePanels();
+ });
+ }
+
+ @Override
protected void handleSecondaryClick() {
if (mController.isVolumeRestricted()) {
// Collapse the panels, so the user can see the toast.
@@ -177,29 +196,24 @@
state.value = newValue;
state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
state.slash.isSlashed = !state.value;
+ state.label = getTileLabel();
+ state.secondaryLabel = getSecondaryLabel(zen != Global.ZEN_MODE_OFF);
+ state.icon = ResourceIcon.get(R.drawable.ic_qs_dnd_on);
checkIfRestrictionEnforcedByAdminOnly(state, UserManager.DISALLOW_ADJUST_VOLUME);
switch (zen) {
case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
- state.icon = ResourceIcon.get(R.drawable.ic_qs_dnd_on);
- state.label = mContext.getString(R.string.quick_settings_dnd_priority_label);
state.contentDescription = mContext.getString(
R.string.accessibility_quick_settings_dnd_priority_on);
break;
case Global.ZEN_MODE_NO_INTERRUPTIONS:
- state.icon = TOTAL_SILENCE;
- state.label = mContext.getString(R.string.quick_settings_dnd_none_label);
state.contentDescription = mContext.getString(
R.string.accessibility_quick_settings_dnd_none_on);
break;
case ZEN_MODE_ALARMS:
- state.icon = ResourceIcon.get(R.drawable.ic_qs_dnd_on);
- state.label = mContext.getString(R.string.quick_settings_dnd_alarms_label);
state.contentDescription = mContext.getString(
R.string.accessibility_quick_settings_dnd_alarms_on);
break;
default:
- state.icon = ResourceIcon.get(R.drawable.ic_qs_dnd_on);
- state.label = mContext.getString(R.string.quick_settings_dnd_label);
state.contentDescription = mContext.getString(
R.string.accessibility_quick_settings_dnd);
break;
@@ -212,6 +226,102 @@
state.expandedAccessibilityClassName = Switch.class.getName();
}
+ /**
+ * Returns the secondary label to use for the given instance of do not disturb.
+ * - If turned on manually and end time is known, returns end time.
+ * - If turned on by an automatic rule, returns the automatic rule name.
+ * - If on due to an app, returns the app name.
+ * - If there's a combination of rules/apps that trigger, then shows the one that will
+ * last the longest if applicable.
+ * @return null if do not disturb is off.
+ */
+ private String getSecondaryLabel(boolean zenOn) {
+ if (!zenOn) {
+ return null;
+ }
+
+ ZenModeConfig config = mController.getConfig();
+ String secondaryText = "";
+ long latestEndTime = -1;
+
+ // DND turned on by manual rule
+ if (config.manualRule != null) {
+ final Uri id = config.manualRule.conditionId;
+ if (config.manualRule.enabler != null) {
+ // app triggered manual rule
+ String appName = ZenModeConfig.getOwnerCaption(mContext, config.manualRule.enabler);
+ if (!appName.isEmpty()) {
+ secondaryText = appName;
+ }
+ } else {
+ if (id == null) {
+ // Do not disturb manually triggered to remain on forever until turned off
+ // No subtext
+ return null;
+ } else {
+ latestEndTime = ZenModeConfig.tryParseCountdownConditionId(id);
+ if (latestEndTime > 0) {
+ final CharSequence formattedTime = ZenModeConfig.getFormattedTime(mContext,
+ latestEndTime, ZenModeConfig.isToday(latestEndTime),
+ mContext.getUserId());
+ secondaryText = mContext.getString(R.string.qs_dnd_until, formattedTime);
+ }
+ }
+ }
+ }
+
+ // DND turned on by an automatic rule
+ for (ZenModeConfig.ZenRule automaticRule : config.automaticRules.values()) {
+ if (automaticRule.isAutomaticActive()) {
+ if (ZenModeConfig.isValidEventConditionId(automaticRule.conditionId) ||
+ ZenModeConfig.isValidScheduleConditionId(automaticRule.conditionId)) {
+ // set text if automatic rule end time is the latest active rule end time
+ long endTime = parseAutomaticRuleEndTime(automaticRule.conditionId);
+ if (endTime > latestEndTime) {
+ latestEndTime = endTime;
+ secondaryText = automaticRule.name;
+ }
+ } else {
+ // set text if 3rd party rule
+ return automaticRule.name;
+ }
+ }
+ }
+
+ return !secondaryText.equals("") ? secondaryText : null;
+ }
+
+ private long parseAutomaticRuleEndTime(Uri id) {
+ if (ZenModeConfig.isValidEventConditionId(id)) {
+ // cannot look up end times for events
+ return Long.MAX_VALUE;
+ }
+
+ if (ZenModeConfig.isValidScheduleConditionId(id)) {
+ ScheduleCalendar schedule = ZenModeConfig.toScheduleCalendar(id);
+ long endTimeMs = schedule.getNextChangeTime(System.currentTimeMillis());
+
+ // check if automatic rule will end on next alarm
+ if (schedule.exitAtAlarm()) {
+ long nextAlarm = getNextAlarm(mContext);
+ schedule.maybeSetNextAlarm(System.currentTimeMillis(), nextAlarm);
+ if (schedule.shouldExitForAlarm(endTimeMs)) {
+ return nextAlarm;
+ }
+ }
+
+ return endTimeMs;
+ }
+
+ return -1;
+ }
+
+ private long getNextAlarm(Context context) {
+ final AlarmManager alarms = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
+ final AlarmClockInfo info = alarms.getNextAlarmClock(mContext.getUserId());
+ return info != null ? info.getTriggerTime() : 0;
+ }
+
@Override
public int getMetricsCategory() {
return MetricsEvent.QS_DND;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
index e1b58fe..080e320 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
@@ -113,11 +113,11 @@
if (state.slash == null) {
state.slash = new SlashState();
}
- state.label = mContext.getString(R.string.quick_settings_hotspot_label);
-
- checkIfRestrictionEnforcedByAdminOnly(state, UserManager.DISALLOW_CONFIG_TETHERING);
final int numConnectedDevices;
+ final boolean isTransient = mController.isHotspotTransient();
+
+ checkIfRestrictionEnforcedByAdminOnly(state, UserManager.DISALLOW_CONFIG_TETHERING);
if (arg instanceof CallbackInfo) {
CallbackInfo info = (CallbackInfo) arg;
state.value = info.enabled;
@@ -127,11 +127,11 @@
numConnectedDevices = mController.getNumConnectedDevices();
}
- state.secondaryLabel = getSecondaryLabel(state.value, numConnectedDevices);
-
state.icon = mEnabledStatic;
+ state.label = mContext.getString(R.string.quick_settings_hotspot_label);
+ state.secondaryLabel = getSecondaryLabel(state.value, isTransient, numConnectedDevices);
state.isAirplaneMode = mAirplaneMode.getValue() != 0;
- state.isTransient = mController.isHotspotTransient();
+ state.isTransient = isTransient;
state.slash.isSlashed = !state.value && !state.isTransient;
if (state.isTransient) {
state.icon = ResourceIcon.get(R.drawable.ic_hotspot_transient_animation);
@@ -143,10 +143,13 @@
}
@Nullable
- private String getSecondaryLabel(boolean enabled, int numConnectedDevices) {
- if (numConnectedDevices > 0 && enabled) {
+ private String getSecondaryLabel(
+ boolean enabled, boolean isTransient, int numConnectedDevices) {
+ if (isTransient) {
+ return mContext.getString(R.string.quick_settings_hotspot_secondary_label_transient);
+ } else if (numConnectedDevices > 0 && enabled) {
return mContext.getResources().getQuantityString(
- R.plurals.quick_settings_hotspot_num_devices,
+ R.plurals.quick_settings_hotspot_secondary_label_num_devices,
numConnectedDevices,
numConnectedDevices);
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java
index 99a9be3..ea6e174 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java
@@ -39,7 +39,7 @@
* Pattern for {@link java.time.format.DateTimeFormatter} used to approximate the time to the
* nearest hour and add on the AM/PM indicator.
*/
- private static final String APPROXIMATE_HOUR_DATE_TIME_PATTERN = "H a";
+ private static final String APPROXIMATE_HOUR_DATE_TIME_PATTERN = "h a";
private ColorDisplayController mController;
private boolean mIsListening;
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 5f7d6fb..e098fd8 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WorkModeTile.java
@@ -83,7 +83,7 @@
@Override
public CharSequence getTileLabel() {
- return mContext.getString(R.string.quick_settings_work_mode_label);
+ return mContext.getString(R.string.quick_settings_work_mode_on_label);
}
@Override
@@ -98,16 +98,17 @@
state.value = mProfileController.isWorkModeEnabled();
}
- state.label = mContext.getString(R.string.quick_settings_work_mode_label);
state.icon = mIcon;
if (state.value) {
state.slash.isSlashed = false;
state.contentDescription = mContext.getString(
R.string.accessibility_quick_settings_work_mode_on);
+ state.label = mContext.getString(R.string.quick_settings_work_mode_on_label);
} else {
state.slash.isSlashed = true;
state.contentDescription = mContext.getString(
R.string.accessibility_quick_settings_work_mode_off);
+ state.label = mContext.getString(R.string.quick_settings_work_mode_off_label);
}
state.expandedAccessibilityClassName = Switch.class.getName();
state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/SwipeUpOnboarding.java b/packages/SystemUI/src/com/android/systemui/recents/SwipeUpOnboarding.java
new file mode 100644
index 0000000..b2472bf
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/recents/SwipeUpOnboarding.java
@@ -0,0 +1,246 @@
+/*
+ * 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.recents;
+
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
+
+import android.annotation.TargetApi;
+import android.app.ActivityManager;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.graphics.PixelFormat;
+import android.graphics.PorterDuff;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.RippleDrawable;
+import android.os.Build;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+import android.view.animation.AccelerateInterpolator;
+import android.view.animation.DecelerateInterpolator;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.android.systemui.Prefs;
+import com.android.systemui.R;
+import com.android.systemui.recents.misc.SysUiTaskStackChangeListener;
+import com.android.systemui.shared.system.ActivityManagerWrapper;
+
+/**
+ * Shows onboarding for the new recents interaction in P (codenamed quickstep).
+ */
+@TargetApi(Build.VERSION_CODES.P)
+public class SwipeUpOnboarding {
+
+ private static final String TAG = "SwipeUpOnboarding";
+ private static final boolean RESET_PREFS_FOR_DEBUG = false;
+ private static final long SHOW_DELAY_MS = 500;
+ private static final long SHOW_HIDE_DURATION_MS = 300;
+ // Don't show the onboarding until the user has launched this number of apps.
+ private static final int SHOW_ON_APP_LAUNCH = 2;
+
+ private final Context mContext;
+ private final WindowManager mWindowManager;
+ private final View mLayout;
+ private final TextView mTextView;
+ private final ImageView mDismissView;
+ private final ColorDrawable mBackgroundDrawable;
+ private final int mDarkBackgroundColor;
+ private final int mLightBackgroundColor;
+ private final int mDarkContentColor;
+ private final int mLightContentColor;
+ private final RippleDrawable mDarkRipple;
+ private final RippleDrawable mLightRipple;
+
+ private boolean mTaskListenerRegistered;
+ private boolean mLayoutAttachedToWindow;
+ private boolean mBackgroundIsLight;
+
+ private final SysUiTaskStackChangeListener mTaskListener = new SysUiTaskStackChangeListener() {
+ @Override
+ public void onTaskStackChanged() {
+ ActivityManager.RunningTaskInfo info = ActivityManagerWrapper.getInstance()
+ .getRunningTask(ACTIVITY_TYPE_UNDEFINED /* ignoreActivityType */);
+ int activityType = info.configuration.windowConfiguration.getActivityType();
+ int numAppsLaunched = Prefs.getInt(mContext, Prefs.Key.NUM_APPS_LAUNCHED, 0);
+ if (activityType == ACTIVITY_TYPE_STANDARD) {
+ numAppsLaunched++;
+ if (numAppsLaunched >= SHOW_ON_APP_LAUNCH) {
+ show();
+ } else {
+ Prefs.putInt(mContext, Prefs.Key.NUM_APPS_LAUNCHED, numAppsLaunched);
+ }
+ } else {
+ hide(false);
+ }
+ }
+ };
+
+ private final View.OnAttachStateChangeListener mOnAttachStateChangeListener
+ = new View.OnAttachStateChangeListener() {
+ @Override
+ public void onViewAttachedToWindow(View view) {
+ if (view == mLayout) {
+ mLayoutAttachedToWindow = true;
+ }
+ }
+
+ @Override
+ public void onViewDetachedFromWindow(View view) {
+ if (view == mLayout) {
+ mLayoutAttachedToWindow = false;
+ }
+ }
+ };
+
+ public SwipeUpOnboarding(Context context) {
+ mContext = context;
+ final Resources res = context.getResources();
+ mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
+ mLayout = LayoutInflater.from(mContext).inflate(R.layout.recents_swipe_up_onboarding, null);
+ mTextView = mLayout.findViewById(R.id.onboarding_text);
+ mDismissView = mLayout.findViewById(R.id.dismiss);
+ mDarkBackgroundColor = res.getColor(android.R.color.background_dark);
+ mLightBackgroundColor = res.getColor(android.R.color.background_light);
+ mDarkContentColor = res.getColor(R.color.primary_text_default_material_light);
+ mLightContentColor = res.getColor(R.color.primary_text_default_material_dark);
+ mDarkRipple = new RippleDrawable(res.getColorStateList(R.color.ripple_material_light),
+ null, null);
+ mLightRipple = new RippleDrawable(res.getColorStateList(R.color.ripple_material_dark),
+ null, null);
+ mBackgroundDrawable = new ColorDrawable(mDarkBackgroundColor);
+
+ mLayout.addOnAttachStateChangeListener(mOnAttachStateChangeListener);
+ mLayout.setBackground(mBackgroundDrawable);
+ mDismissView.setOnClickListener(v -> hide(true));
+
+ if (RESET_PREFS_FOR_DEBUG) {
+ Prefs.putBoolean(mContext, Prefs.Key.HAS_SWIPED_UP_FOR_RECENTS, false);
+ Prefs.putInt(mContext, Prefs.Key.NUM_APPS_LAUNCHED, 0);
+ }
+ }
+
+ public void onConnectedToLauncher() {
+ boolean alreadyLearnedSwipeUpForRecents = Prefs.getBoolean(mContext,
+ Prefs.Key.HAS_SWIPED_UP_FOR_RECENTS, false);
+ if (!mTaskListenerRegistered && !alreadyLearnedSwipeUpForRecents) {
+ ActivityManagerWrapper.getInstance().registerTaskStackListener(mTaskListener);
+ mTaskListenerRegistered = true;
+ }
+ }
+
+ public void onRecentsAnimationStarted() {
+ boolean alreadyLearnedSwipeUpForRecents = Prefs.getBoolean(mContext,
+ Prefs.Key.HAS_SWIPED_UP_FOR_RECENTS, false);
+ if (!alreadyLearnedSwipeUpForRecents) {
+ Prefs.putBoolean(mContext, Prefs.Key.HAS_SWIPED_UP_FOR_RECENTS, true);
+ onDisconnectedFromLauncher();
+ }
+ }
+
+ public void onDisconnectedFromLauncher() {
+ if (mTaskListenerRegistered) {
+ ActivityManagerWrapper.getInstance().unregisterTaskStackListener(mTaskListener);
+ mTaskListenerRegistered = false;
+ }
+ hide(false);
+ }
+
+ public void onConfigurationChanged(Configuration newConfiguration) {
+ if (newConfiguration.orientation != Configuration.ORIENTATION_PORTRAIT) {
+ hide(false);
+ }
+ }
+
+ public void show() {
+ // Only show in portrait.
+ int orientation = mContext.getResources().getConfiguration().orientation;
+ if (!mLayoutAttachedToWindow && orientation == Configuration.ORIENTATION_PORTRAIT) {
+ mLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
+ mWindowManager.addView(mLayout, getWindowLayoutParams());
+ int layoutHeight = mLayout.getHeight();
+ if (layoutHeight == 0) {
+ mLayout.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
+ layoutHeight = mLayout.getMeasuredHeight();
+ }
+ mLayout.setTranslationY(layoutHeight);
+ mLayout.setAlpha(0);
+ mLayout.animate()
+ .translationY(0)
+ .alpha(1f)
+ .withLayer()
+ .setStartDelay(SHOW_DELAY_MS)
+ .setDuration(SHOW_HIDE_DURATION_MS)
+ .setInterpolator(new DecelerateInterpolator())
+ .start();
+ }
+ }
+
+ public void hide(boolean animate) {
+ if (mLayoutAttachedToWindow) {
+ if (animate) {
+ mLayout.animate()
+ .translationY(mLayout.getHeight())
+ .alpha(0f)
+ .withLayer()
+ .setDuration(SHOW_HIDE_DURATION_MS)
+ .setInterpolator(new AccelerateInterpolator())
+ .withEndAction(() -> mWindowManager.removeView(mLayout))
+ .start();
+ } else {
+ mWindowManager.removeView(mLayout);
+ }
+ }
+ }
+
+ public void setContentDarkIntensity(float contentDarkIntensity) {
+ boolean backgroundIsLight = contentDarkIntensity > 0.5f;
+ if (backgroundIsLight != mBackgroundIsLight) {
+ mBackgroundIsLight = backgroundIsLight;
+ mBackgroundDrawable.setColor(mBackgroundIsLight
+ ? mLightBackgroundColor : mDarkBackgroundColor);
+ int contentColor = mBackgroundIsLight ? mDarkContentColor : mLightContentColor;
+ mTextView.setTextColor(contentColor);
+ mTextView.getCompoundDrawables()[3].setColorFilter(contentColor,
+ PorterDuff.Mode.SRC_IN);
+ mDismissView.setColorFilter(contentColor);
+ mDismissView.setBackground(mBackgroundIsLight ? mDarkRipple : mLightRipple);
+ }
+ }
+
+ private WindowManager.LayoutParams getWindowLayoutParams() {
+ int flags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
+ | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR
+ | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
+ final WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT,
+ WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG,
+ flags,
+ PixelFormat.TRANSLUCENT);
+ lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
+ lp.setTitle("SwipeUpOnboarding");
+ lp.gravity = Gravity.BOTTOM;
+ return lp;
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java b/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java
index d3f997a..406eef8 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java
@@ -16,9 +16,11 @@
package com.android.systemui.settings;
+import android.animation.ValueAnimator;
import android.content.ContentResolver;
import android.content.Context;
import android.database.ContentObserver;
+import android.hardware.display.DisplayManager;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Handler;
@@ -29,6 +31,7 @@
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.UserHandle;
+import android.os.UserManager;
import android.provider.Settings;
import android.service.vr.IVrManager;
import android.service.vr.IVrStateCallbacks;
@@ -37,6 +40,7 @@
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+import com.android.settingslib.RestrictedLockUtils;
import com.android.systemui.Dependency;
import java.util.ArrayList;
@@ -45,11 +49,7 @@
private static final String TAG = "StatusBar.BrightnessController";
private static final boolean SHOW_AUTOMATIC_ICON = false;
- /**
- * {@link android.provider.Settings.System#SCREEN_AUTO_BRIGHTNESS_ADJ} uses the range [-1, 1].
- * Using this factor, it is converted to [0, BRIGHTNESS_ADJ_RESOLUTION] for the SeekBar.
- */
- private static final float BRIGHTNESS_ADJ_RESOLUTION = 2048;
+ private static final int SLIDER_ANIMATION_DURATION = 3000;
private static final int MSG_UPDATE_ICON = 0;
private static final int MSG_UPDATE_SLIDER = 1;
@@ -67,7 +67,7 @@
private final ImageView mIcon;
private final ToggleSlider mControl;
private final boolean mAutomaticAvailable;
- private final IPowerManager mPower;
+ private final DisplayManager mDisplayManager;
private final CurrentUserTracker mUserTracker;
private final IVrManager mVrManager;
@@ -81,6 +81,9 @@
private volatile boolean mIsVrModeEnabled;
private boolean mListening;
private boolean mExternalChange;
+ private boolean mControlValueInitialized;
+
+ private ValueAnimator mSliderAnimator;
public interface BrightnessStateChangeCallback {
public void onBrightnessLevelChanged();
@@ -95,8 +98,6 @@
Settings.System.getUriFor(Settings.System.SCREEN_BRIGHTNESS);
private final Uri BRIGHTNESS_FOR_VR_URI =
Settings.System.getUriFor(Settings.System.SCREEN_BRIGHTNESS_FOR_VR);
- private final Uri BRIGHTNESS_ADJ_URI =
- Settings.System.getUriFor(Settings.System.SCREEN_AUTO_BRIGHTNESS_ADJ);
public BrightnessObserver(Handler handler) {
super(handler);
@@ -114,12 +115,10 @@
if (BRIGHTNESS_MODE_URI.equals(uri)) {
mBackgroundHandler.post(mUpdateModeRunnable);
mBackgroundHandler.post(mUpdateSliderRunnable);
- } else if (BRIGHTNESS_URI.equals(uri) && !mAutomatic) {
+ } else if (BRIGHTNESS_URI.equals(uri)) {
mBackgroundHandler.post(mUpdateSliderRunnable);
} else if (BRIGHTNESS_FOR_VR_URI.equals(uri)) {
mBackgroundHandler.post(mUpdateSliderRunnable);
- } else if (BRIGHTNESS_ADJ_URI.equals(uri) && mAutomatic) {
- mBackgroundHandler.post(mUpdateSliderRunnable);
} else {
mBackgroundHandler.post(mUpdateModeRunnable);
mBackgroundHandler.post(mUpdateSliderRunnable);
@@ -141,9 +140,6 @@
cr.registerContentObserver(
BRIGHTNESS_FOR_VR_URI,
false, this, UserHandle.USER_ALL);
- cr.registerContentObserver(
- BRIGHTNESS_ADJ_URI,
- false, this, UserHandle.USER_ALL);
}
public void stopObserving() {
@@ -214,12 +210,6 @@
mHandler.obtainMessage(MSG_UPDATE_SLIDER,
mMaximumBacklightForVr - mMinimumBacklightForVr,
value - mMinimumBacklightForVr).sendToTarget();
- } else if (mAutomatic) {
- float value = Settings.System.getFloatForUser(mContext.getContentResolver(),
- Settings.System.SCREEN_AUTO_BRIGHTNESS_ADJ, 0,
- UserHandle.USER_CURRENT);
- mHandler.obtainMessage(MSG_UPDATE_SLIDER, (int) BRIGHTNESS_ADJ_RESOLUTION,
- (int) ((value + 1) * BRIGHTNESS_ADJ_RESOLUTION / 2f)).sendToTarget();
} else {
int value;
value = Settings.System.getIntForUser(mContext.getContentResolver(),
@@ -250,7 +240,7 @@
break;
case MSG_UPDATE_SLIDER:
mControl.setMax(msg.arg1);
- mControl.setValue(msg.arg2);
+ animateSliderTo(msg.arg2);
break;
case MSG_SET_CHECKED:
mControl.setChecked(msg.arg1 != 0);
@@ -295,8 +285,7 @@
mAutomaticAvailable = context.getResources().getBoolean(
com.android.internal.R.bool.config_automatic_brightness_available);
- mPower = IPowerManager.Stub.asInterface(ServiceManager.getService(
- Context.POWER_SERVICE));
+ mDisplayManager = context.getSystemService(DisplayManager.class);
mVrManager = IVrManager.Stub.asInterface(ServiceManager.getService(
Context.VR_SERVICE));
}
@@ -348,6 +337,7 @@
mBackgroundHandler.post(mStopListeningRunnable);
mListening = false;
+ mControlValueInitialized = false;
}
@Override
@@ -356,6 +346,10 @@
updateIcon(mAutomatic);
if (mExternalChange) return;
+ if (mSliderAnimator != null) {
+ mSliderAnimator.cancel();
+ }
+
if (mIsVrModeEnabled) {
final int val = value + mMinimumBacklightForVr;
if (stopTracking) {
@@ -371,7 +365,7 @@
}
});
}
- } else if (!mAutomatic) {
+ } else {
final int val = value + mMinimumBacklight;
if (stopTracking) {
MetricsLogger.action(mContext, MetricsEvent.ACTION_BRIGHTNESS, val);
@@ -386,21 +380,6 @@
}
});
}
- } else {
- final float adj = value / (BRIGHTNESS_ADJ_RESOLUTION / 2f) - 1;
- if (stopTracking) {
- MetricsLogger.action(mContext, MetricsEvent.ACTION_BRIGHTNESS_AUTO, value);
- }
- setBrightnessAdj(adj);
- if (!tracking) {
- AsyncTask.execute(new Runnable() {
- public void run() {
- Settings.System.putFloatForUser(mContext.getContentResolver(),
- Settings.System.SCREEN_AUTO_BRIGHTNESS_ADJ, adj,
- UserHandle.USER_CURRENT);
- }
- });
- }
}
for (BrightnessStateChangeCallback cb : mChangeCallbacks) {
@@ -408,6 +387,18 @@
}
}
+ public void checkRestrictionAndSetEnabled() {
+ mBackgroundHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ ((ToggleSliderView)mControl).setEnforcedAdmin(
+ RestrictedLockUtils.checkIfRestrictionEnforced(mContext,
+ UserManager.DISALLOW_CONFIG_BRIGHTNESS,
+ mUserTracker.getCurrentUserId()));
+ }
+ });
+ }
+
private void setMode(int mode) {
Settings.System.putIntForUser(mContext.getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS_MODE, mode,
@@ -415,17 +406,11 @@
}
private void setBrightness(int brightness) {
- try {
- mPower.setTemporaryScreenBrightnessSettingOverride(brightness);
- } catch (RemoteException ex) {
- }
+ mDisplayManager.setTemporaryBrightness(brightness);
}
private void setBrightnessAdj(float adj) {
- try {
- mPower.setTemporaryScreenAutoBrightnessAdjustmentSettingOverride(adj);
- } catch (RemoteException ex) {
- }
+ mDisplayManager.setTemporaryAutoBrightnessAdjustment(adj);
}
private void updateIcon(boolean automatic) {
@@ -442,4 +427,23 @@
mBackgroundHandler.post(mUpdateSliderRunnable);
}
}
+
+ private void animateSliderTo(int target) {
+ if (!mControlValueInitialized) {
+ // Don't animate the first value since it's default state isn't meaningful to users.
+ mControl.setValue(target);
+ mControlValueInitialized = true;
+ }
+ if (mSliderAnimator != null && mSliderAnimator.isStarted()) {
+ mSliderAnimator.cancel();
+ }
+ mSliderAnimator = ValueAnimator.ofInt(mControl.getValue(), target);
+ mSliderAnimator.addUpdateListener((ValueAnimator animation) -> {
+ mExternalChange = true;
+ mControl.setValue((int)animation.getAnimatedValue());
+ mExternalChange = false;
+ });
+ mSliderAnimator.setDuration(SLIDER_ANIMATION_DURATION);
+ mSliderAnimator.start();
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/settings/ToggleSeekBar.java b/packages/SystemUI/src/com/android/systemui/settings/ToggleSeekBar.java
index 722aba5..8ed4c75 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/ToggleSeekBar.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/ToggleSeekBar.java
@@ -17,14 +17,21 @@
package com.android.systemui.settings;
import android.content.Context;
+import android.content.Intent;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.SeekBar;
+import com.android.settingslib.RestrictedLockUtils;
+import com.android.systemui.Dependency;
+import com.android.systemui.plugins.ActivityStarter;
+
public class ToggleSeekBar extends SeekBar {
private String mAccessibilityLabel;
+ private RestrictedLockUtils.EnforcedAdmin mEnforcedAdmin = null;
+
public ToggleSeekBar(Context context) {
super(context);
}
@@ -39,6 +46,12 @@
@Override
public boolean onTouchEvent(MotionEvent event) {
+ if (mEnforcedAdmin != null) {
+ Intent intent = RestrictedLockUtils.getShowAdminSupportDetailsIntent(
+ mContext, mEnforcedAdmin);
+ Dependency.get(ActivityStarter.class).postStartActivityDismissingKeyguard(intent, 0);
+ return true;
+ }
if (!isEnabled()) {
setEnabled(true);
}
@@ -57,4 +70,8 @@
info.setText(mAccessibilityLabel);
}
}
+
+ public void setEnforcedAdmin(RestrictedLockUtils.EnforcedAdmin admin) {
+ mEnforcedAdmin = admin;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/settings/ToggleSlider.java b/packages/SystemUI/src/com/android/systemui/settings/ToggleSlider.java
index 62abf3d..135f89d 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/ToggleSlider.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/ToggleSlider.java
@@ -28,4 +28,5 @@
default boolean isChecked() { return false; }
void setMax(int max);
void setValue(int value);
+ int getValue();
}
diff --git a/packages/SystemUI/src/com/android/systemui/settings/ToggleSliderView.java b/packages/SystemUI/src/com/android/systemui/settings/ToggleSliderView.java
index 5b234e9..90744a6 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/ToggleSliderView.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/ToggleSliderView.java
@@ -29,6 +29,7 @@
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;
+import com.android.settingslib.RestrictedLockUtils;
import com.android.systemui.R;
import com.android.systemui.statusbar.policy.BrightnessMirrorController;
@@ -95,6 +96,12 @@
}
}
+ public void setEnforcedAdmin(RestrictedLockUtils.EnforcedAdmin admin) {
+ mToggle.setEnabled(admin == null);
+ mSlider.setEnabled(admin == null);
+ mSlider.setEnforcedAdmin(admin);
+ }
+
public void setOnChangedListener(Listener l) {
mListener = l;
}
@@ -126,6 +133,11 @@
}
@Override
+ public int getValue() {
+ return mSlider.getProgress();
+ }
+
+ @Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (mMirror != null) {
MotionEvent copy = ev.copy();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
index e59c703..eb5619b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
@@ -122,7 +122,7 @@
private Interpolator mCurrentAppearInterpolator;
private Interpolator mCurrentAlphaInterpolator;
- private NotificationBackgroundView mBackgroundNormal;
+ protected NotificationBackgroundView mBackgroundNormal;
private NotificationBackgroundView mBackgroundDimmed;
private ObjectAnimator mBackgroundAnimator;
private RectF mAppearAnimationRect = new RectF();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index 00bc62e..79e9f7b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -89,6 +89,7 @@
private static final int MSG_FINGERPRINT_HELP = 41 << MSG_SHIFT;
private static final int MSG_FINGERPRINT_ERROR = 42 << MSG_SHIFT;
private static final int MSG_FINGERPRINT_HIDE = 43 << MSG_SHIFT;
+ private static final int MSG_SHOW_CHARGING_ANIMATION = 44 << MSG_SHIFT;
public static final int FLAG_EXCLUDE_NONE = 0;
public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0;
@@ -150,6 +151,8 @@
default void handleShowGlobalActionsMenu() { }
default void handleShowShutdownUi(boolean isReboot, String reason) { }
+ default void showChargingAnimation(int batteryLevel) { }
+
default void onRotationProposal(int rotation, boolean isValid) { }
default void showFingerprintDialog(Bundle bundle, IFingerprintDialogReceiver receiver) { }
@@ -474,6 +477,13 @@
}
@Override
+ public void showChargingAnimation(int batteryLevel) {
+ mHandler.removeMessages(MSG_SHOW_CHARGING_ANIMATION);
+ mHandler.obtainMessage(MSG_SHOW_CHARGING_ANIMATION, batteryLevel, 0)
+ .sendToTarget();
+ }
+
+ @Override
public void onProposedRotationChanged(int rotation, boolean isValid) {
synchronized (mLock) {
mHandler.removeMessages(MSG_ROTATION_PROPOSAL);
@@ -751,6 +761,12 @@
for (int i = 0; i < mCallbacks.size(); i++) {
mCallbacks.get(i).hideFingerprintDialog();
}
+ break;
+ case MSG_SHOW_CHARGING_ANIMATION:
+ for (int i = 0; i < mCallbacks.size(); i++) {
+ mCallbacks.get(i).showChargingAnimation(msg.arg1);
+ }
+ break;
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index 5f4854a..b3f68d3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -16,6 +16,7 @@
package com.android.systemui.statusbar;
+import static com.android.systemui.statusbar.notification.ActivityLaunchAnimator.ExpandAnimationParameters;
import static com.android.systemui.statusbar.notification.NotificationInflater.InflationCallback;
import android.animation.Animator;
@@ -37,6 +38,7 @@
import android.service.notification.StatusBarNotification;
import android.util.AttributeSet;
import android.util.FloatProperty;
+import android.util.MathUtils;
import android.util.Property;
import android.view.KeyEvent;
import android.view.LayoutInflater;
@@ -67,6 +69,7 @@
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin.MenuItem;
import com.android.systemui.statusbar.NotificationGuts.GutsContent;
import com.android.systemui.statusbar.notification.AboveShelfChangedListener;
+import com.android.systemui.statusbar.notification.ActivityLaunchAnimator;
import com.android.systemui.statusbar.notification.HybridNotificationView;
import com.android.systemui.statusbar.notification.NotificationInflater;
import com.android.systemui.statusbar.notification.NotificationUtils;
@@ -75,6 +78,7 @@
import com.android.systemui.statusbar.phone.NotificationGroupManager;
import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.statusbar.policy.HeadsUpManager;
+import com.android.systemui.statusbar.stack.AmbientState;
import com.android.systemui.statusbar.stack.AnimationProperties;
import com.android.systemui.statusbar.stack.ExpandableViewState;
import com.android.systemui.statusbar.stack.NotificationChildrenContainer;
@@ -113,6 +117,7 @@
private int mNotificationMaxHeight;
private int mNotificationAmbientHeight;
private int mIncreasedPaddingBetweenElements;
+ private int mNotificationLaunchHeight;
private boolean mMustStayOnScreen;
/** Does this row contain layouts that can adapt to row expansion */
@@ -172,6 +177,7 @@
private boolean mIsSystemChildExpanded;
private boolean mIsPinned;
private FalsingManager mFalsingManager;
+ private boolean mExpandAnimationRunning;
private AboveShelfChangedListener mAboveShelfChangedListener;
private HeadsUpManager mHeadsUpManager;
private View mHelperButton;
@@ -270,6 +276,7 @@
private float mTranslationWhenRemoved;
private boolean mWasChildInGroupWhenRemoved;
private int mNotificationColorAmbient;
+ private NotificationViewState mNotificationViewState;
@Override
public boolean isGroupExpansionChanging() {
@@ -363,6 +370,14 @@
mNotificationInflater.inflateNotificationViews();
}
+ @Override
+ public void setPressed(boolean pressed) {
+ if (isOnKeyguard() || mEntry.notification.getNotification().contentIntent == null) {
+ // We're dropping the ripple if we have a collapse / launch animation
+ super.setPressed(pressed);
+ }
+ }
+
public void onNotificationUpdated() {
for (NotificationContentView l : mLayouts) {
l.onNotificationUpdated(mEntry);
@@ -1096,9 +1111,19 @@
return mGroupParentWhenDismissed;
}
- public void performDismiss() {
- if (mOnDismissRunnable != null) {
- mOnDismissRunnable.run();
+ public void performDismiss(boolean fromAccessibility) {
+ if (mGroupManager.isOnlyChildInGroup(getStatusBarNotification())) {
+ ExpandableNotificationRow groupSummary =
+ mGroupManager.getLogicalGroupSummary(getStatusBarNotification());
+ if (groupSummary.isClearable()) {
+ groupSummary.performDismiss(fromAccessibility);
+ }
+ }
+ setDismissed(true, fromAccessibility);
+ if (isClearable()) {
+ if (mOnDismissRunnable != null) {
+ mOnDismissRunnable.run();
+ }
}
}
@@ -1159,6 +1184,9 @@
}
private void updateContentTransformation() {
+ if (mExpandAnimationRunning) {
+ return;
+ }
float contentAlpha;
float translationY = -mContentTransformationAmount * mIconTransformContentShift;
if (mIsLastChild) {
@@ -1440,6 +1468,10 @@
mMenuRow.resetMenu();
}
+ public CharSequence getActiveRemoteInputText() {
+ return mPrivateLayout.getActiveRemoteInputText();
+ }
+
public void animateTranslateNotification(final float leftTarget) {
if (mTranslateAnim != null) {
mTranslateAnim.cancel();
@@ -1527,10 +1559,13 @@
}
private void updateChildrenVisibility() {
- mPrivateLayout.setVisibility(!shouldShowPublic() && !mIsSummaryWithChildren ? VISIBLE
- : INVISIBLE);
+ boolean hideContentWhileLaunching = mExpandAnimationRunning && mGuts != null
+ && mGuts.isExposed();
+ mPrivateLayout.setVisibility(!shouldShowPublic() && !mIsSummaryWithChildren
+ && !hideContentWhileLaunching ? VISIBLE : INVISIBLE);
if (mChildrenContainer != null) {
- mChildrenContainer.setVisibility(!shouldShowPublic() && mIsSummaryWithChildren ? VISIBLE
+ mChildrenContainer.setVisibility(!shouldShowPublic() && mIsSummaryWithChildren
+ && !hideContentWhileLaunching ? VISIBLE
: INVISIBLE);
}
// The limits might have changed if the view suddenly became a group or vice versa
@@ -1569,6 +1604,62 @@
updateShelfIconColor();
}
+ public void applyExpandAnimationParams(ExpandAnimationParameters params) {
+ if (params == null) {
+ return;
+ }
+ setTranslationY(params.getTop());
+ float zProgress = Interpolators.FAST_OUT_SLOW_IN.getInterpolation(
+ params.getProgress(0, 50));
+ float translationZ = MathUtils.lerp(params.getStartTranslationZ(),
+ mNotificationLaunchHeight,
+ zProgress);
+ setTranslationZ(translationZ);
+ setActualHeight(params.getHeight());
+ mBackgroundNormal.setExpandAnimationParams(params);
+ }
+
+ public void setExpandAnimationRunning(boolean expandAnimationRunning) {
+ if (expandAnimationRunning) {
+ View contentView;
+ if (mIsSummaryWithChildren) {
+ contentView = mChildrenContainer;
+ } else {
+ contentView = getShowingLayout();
+ }
+ if (mGuts != null && mGuts.isExposed()) {
+ contentView = mGuts;
+ }
+ contentView.animate()
+ .alpha(0f)
+ .setDuration(ActivityLaunchAnimator.ANIMATION_DURATION_FADE_CONTENT)
+ .setInterpolator(Interpolators.ALPHA_OUT);
+ setAboveShelf(true);
+ mExpandAnimationRunning = true;
+ mNotificationViewState.cancelAnimations(this);
+ mNotificationLaunchHeight = AmbientState.getNotificationLaunchHeight(getContext());
+ } else {
+ mExpandAnimationRunning = false;
+ setAboveShelf(isAboveShelf());
+ if (mGuts != null) {
+ mGuts.setAlpha(1.0f);
+ }
+ }
+ updateChildrenVisibility();
+ updateClipping();
+ mBackgroundNormal.setExpandAnimationRunning(expandAnimationRunning);
+ }
+
+ @Override
+ protected boolean shouldClipToActualHeight() {
+ return super.shouldClipToActualHeight() && !mExpandAnimationRunning;
+ }
+
+ @Override
+ public boolean isExpandAnimationRunning() {
+ return mExpandAnimationRunning;
+ }
+
/**
* Tap sounds should not be played when we're unlocking.
* Doing so would cause audio collision and the system would feel unpolished.
@@ -2142,6 +2233,9 @@
@Override
public void setClipBottomAmount(int clipBottomAmount) {
+ if (mExpandAnimationRunning) {
+ return;
+ }
if (clipBottomAmount != mClipBottomAmount) {
super.setClipBottomAmount(clipBottomAmount);
for (NotificationContentView l : mLayouts) {
@@ -2328,8 +2422,7 @@
}
switch (action) {
case AccessibilityNodeInfo.ACTION_DISMISS:
- NotificationStackScrollLayout.performDismiss(this, mGroupManager,
- true /* fromAccessibility */);
+ performDismiss(true /* fromAccessibility */);
return true;
case AccessibilityNodeInfo.ACTION_COLLAPSE:
case AccessibilityNodeInfo.ACTION_EXPAND:
@@ -2352,13 +2445,15 @@
@Override
public ExpandableViewState createNewViewState(StackScrollState stackScrollState) {
- return new NotificationViewState(stackScrollState);
+ mNotificationViewState = new NotificationViewState(stackScrollState);
+ return mNotificationViewState;
}
@Override
public boolean isAboveShelf() {
return !isOnKeyguard()
- && (mIsPinned || mHeadsupDisappearRunning || (mIsHeadsUp && mAboveShelf));
+ && (mIsPinned || mHeadsupDisappearRunning || (mIsHeadsUp && mAboveShelf)
+ || mExpandAnimationRunning);
}
public void setShowAmbient(boolean showAmbient) {
@@ -2444,9 +2539,12 @@
@Override
public void applyToView(View view) {
- super.applyToView(view);
if (view instanceof ExpandableNotificationRow) {
ExpandableNotificationRow row = (ExpandableNotificationRow) view;
+ if (row.isExpandAnimationRunning()) {
+ return;
+ }
+ super.applyToView(view);
row.applyChildrenState(mOverallState);
}
}
@@ -2464,9 +2562,12 @@
@Override
public void animateTo(View child, AnimationProperties properties) {
- super.animateTo(child, properties);
if (child instanceof ExpandableNotificationRow) {
ExpandableNotificationRow row = (ExpandableNotificationRow) child;
+ if (row.isExpandAnimationRunning()) {
+ return;
+ }
+ super.animateTo(child, properties);
row.startChildAnimation(mOverallState, properties);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
index eafa825..1496a41 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
@@ -151,6 +151,10 @@
return mActualHeight;
}
+ public boolean isExpandAnimationRunning() {
+ return false;
+ }
+
/**
* @return The maximum height of this notification.
*/
@@ -375,8 +379,8 @@
return false;
}
- private void updateClipping() {
- if (mClipToActualHeight) {
+ protected void updateClipping() {
+ if (mClipToActualHeight && shouldClipToActualHeight()) {
int top = getClipTopAmount();
mClipRect.set(0, top, getWidth(), Math.max(getActualHeight() + getExtraBottomPadding()
- mClipBottomAmount, top));
@@ -386,6 +390,10 @@
}
}
+ protected boolean shouldClipToActualHeight() {
+ return true;
+ }
+
public void setClipToActualHeight(boolean clipToActualHeight) {
mClipToActualHeight = clipToActualHeight;
updateClipping();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationBackgroundView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationBackgroundView.java
index 45b35d0..d6beb7f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationBackgroundView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationBackgroundView.java
@@ -20,6 +20,7 @@
import android.content.res.ColorStateList;
import android.graphics.Canvas;
import android.graphics.PorterDuff;
+import android.graphics.PorterDuffXfermode;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.LayerDrawable;
@@ -27,7 +28,9 @@
import android.util.AttributeSet;
import android.view.View;
+import com.android.systemui.Interpolators;
import com.android.systemui.R;
+import com.android.systemui.statusbar.notification.ActivityLaunchAnimator;
/**
* A view that can be used for both the dimmed and normal background of an notification.
@@ -44,6 +47,9 @@
private boolean mBottomIsRounded;
private int mBackgroundTop;
private boolean mBottomAmountClips = true;
+ private boolean mExpandAnimationRunning;
+ private float mActualWidth;
+ private int mDrawableAlpha = 255;
public NotificationBackgroundView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -53,9 +59,12 @@
@Override
protected void onDraw(Canvas canvas) {
- if (mClipTopAmount + mClipBottomAmount < mActualHeight - mBackgroundTop) {
+ if (mClipTopAmount + mClipBottomAmount < mActualHeight - mBackgroundTop
+ || mExpandAnimationRunning) {
canvas.save();
- canvas.clipRect(0, mClipTopAmount, getWidth(), mActualHeight - mClipBottomAmount);
+ if (!mExpandAnimationRunning) {
+ canvas.clipRect(0, mClipTopAmount, getWidth(), mActualHeight - mClipBottomAmount);
+ }
draw(canvas, mBackground);
canvas.restore();
}
@@ -64,10 +73,16 @@
private void draw(Canvas canvas, Drawable drawable) {
if (drawable != null) {
int bottom = mActualHeight;
- if (mBottomIsRounded && mBottomAmountClips) {
+ if (mBottomIsRounded && mBottomAmountClips && !mExpandAnimationRunning) {
bottom -= mClipBottomAmount;
}
- drawable.setBounds(0, mBackgroundTop, getWidth(), bottom);
+ int left = 0;
+ int right = getWidth();
+ if (mExpandAnimationRunning) {
+ left = (int) ((getWidth() - mActualWidth) / 2.0f);
+ right = (int) (left + mActualWidth);
+ }
+ drawable.setBounds(left, mBackgroundTop, right, bottom);
drawable.draw(canvas);
}
}
@@ -133,6 +148,9 @@
}
public void setActualHeight(int actualHeight) {
+ if (mExpandAnimationRunning) {
+ return;
+ }
mActualHeight = actualHeight;
invalidate();
}
@@ -170,6 +188,10 @@
}
public void setDrawableAlpha(int drawableAlpha) {
+ mDrawableAlpha = drawableAlpha;
+ if (mExpandAnimationRunning) {
+ return;
+ }
mBackground.setAlpha(drawableAlpha);
}
@@ -208,4 +230,29 @@
mBackgroundTop = backgroundTop;
invalidate();
}
+
+ public void setExpandAnimationParams(ActivityLaunchAnimator.ExpandAnimationParameters params) {
+ mActualHeight = params.getHeight();
+ mActualWidth = params.getWidth();
+ float alphaProgress = Interpolators.ALPHA_IN.getInterpolation(
+ params.getProgress(
+ ActivityLaunchAnimator.ANIMATION_DURATION_FADE_CONTENT /* delay */,
+ ActivityLaunchAnimator.ANIMATION_DURATION_FADE_APP /* duration */));
+ mBackground.setAlpha((int) (mDrawableAlpha * (1.0f - alphaProgress)));
+ invalidate();
+ }
+
+ public void setExpandAnimationRunning(boolean running) {
+ mExpandAnimationRunning = running;
+ if (mBackground instanceof LayerDrawable) {
+ GradientDrawable gradientDrawable =
+ (GradientDrawable) ((LayerDrawable) mBackground).getDrawable(0);
+ gradientDrawable.setXfermode(
+ running ? new PorterDuffXfermode(PorterDuff.Mode.SRC) : null);
+ }
+ if (!mExpandAnimationRunning) {
+ setDrawableAlpha(mDrawableAlpha);
+ }
+ invalidate();
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
index 64df92c..e811ed3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
@@ -22,6 +22,7 @@
import android.content.Context;
import android.graphics.Rect;
import android.os.Build;
+import android.provider.Settings;
import android.service.notification.StatusBarNotification;
import android.util.AttributeSet;
import android.util.Log;
@@ -31,6 +32,7 @@
import android.view.ViewTreeObserver;
import android.widget.FrameLayout;
import android.widget.ImageView;
+import android.widget.LinearLayout;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.NotificationColorUtil;
@@ -42,6 +44,7 @@
import com.android.systemui.statusbar.notification.NotificationViewWrapper;
import com.android.systemui.statusbar.phone.NotificationGroupManager;
import com.android.systemui.statusbar.policy.RemoteInputView;
+import com.android.systemui.statusbar.policy.SmartReplyView;
/**
* A frame layout containing the actual payload of the notification, including the contracted,
@@ -72,6 +75,7 @@
private RemoteInputView mExpandedRemoteInput;
private RemoteInputView mHeadsUpRemoteInput;
+ private SmartReplyView mExpandedSmartReplyView;
private NotificationViewWrapper mContractedWrapper;
private NotificationViewWrapper mExpandedWrapper;
@@ -1125,7 +1129,7 @@
if (mAmbientChild != null) {
mAmbientWrapper.onContentUpdated(entry.row);
}
- applyRemoteInput(entry);
+ applyRemoteInputAndSmartReply(entry);
updateLegacy();
mForceSelectNextLayout = true;
setDark(mDark, false /* animate */, 0 /* delay */);
@@ -1157,20 +1161,34 @@
}
}
- private void applyRemoteInput(final NotificationData.Entry entry) {
+ private void applyRemoteInputAndSmartReply(final NotificationData.Entry entry) {
if (mRemoteInputController == null) {
return;
}
+ boolean enableSmartReplies = Settings.Global.getInt(mContext.getContentResolver(),
+ Settings.Global.ENABLE_SMART_REPLIES_IN_NOTIFICATIONS, 0) != 0;
+
boolean hasRemoteInput = false;
+ RemoteInput remoteInputWithChoices = null;
+ PendingIntent pendingIntentWithChoices = null;
Notification.Action[] actions = entry.notification.getNotification().actions;
if (actions != null) {
for (Notification.Action a : actions) {
if (a.getRemoteInputs() != null) {
for (RemoteInput ri : a.getRemoteInputs()) {
- if (ri.getAllowFreeFormInput()) {
+ boolean showRemoteInputView = ri.getAllowFreeFormInput();
+ boolean showSmartReplyView = enableSmartReplies && ri.getChoices() != null
+ && ri.getChoices().length > 0;
+ if (showRemoteInputView) {
hasRemoteInput = true;
+ }
+ if (showSmartReplyView) {
+ remoteInputWithChoices = ri;
+ pendingIntentWithChoices = a.actionIntent;
+ }
+ if (showRemoteInputView || showSmartReplyView) {
break;
}
}
@@ -1178,6 +1196,11 @@
}
}
+ applyRemoteInput(entry, hasRemoteInput);
+ applySmartReplyView(remoteInputWithChoices, pendingIntentWithChoices);
+ }
+
+ private void applyRemoteInput(NotificationData.Entry entry, boolean hasRemoteInput) {
View bigContentView = mExpandedChild;
if (bigContentView != null) {
mExpandedRemoteInput = applyRemoteInput(bigContentView, entry, hasRemoteInput,
@@ -1274,6 +1297,40 @@
return null;
}
+ private void applySmartReplyView(RemoteInput remoteInput, PendingIntent pendingIntent) {
+ mExpandedSmartReplyView = mExpandedChild == null ?
+ null : applySmartReplyView(mExpandedChild, remoteInput, pendingIntent);
+ }
+
+ private SmartReplyView applySmartReplyView(
+ View view, RemoteInput remoteInput, PendingIntent pendingIntent) {
+ View smartReplyContainerCandidate = view.findViewById(
+ com.android.internal.R.id.smart_reply_container);
+ if (!(smartReplyContainerCandidate instanceof LinearLayout)) {
+ return null;
+ }
+ LinearLayout smartReplyContainer = (LinearLayout) smartReplyContainerCandidate;
+ if (remoteInput == null || pendingIntent == null) {
+ smartReplyContainer.setVisibility(View.GONE);
+ return null;
+ }
+ SmartReplyView smartReplyView = null;
+ if (smartReplyContainer.getChildCount() == 0) {
+ smartReplyView = SmartReplyView.inflate(mContext, smartReplyContainer);
+ smartReplyContainer.addView(smartReplyView);
+ } else if (smartReplyContainer.getChildCount() == 1) {
+ View child = smartReplyContainer.getChildAt(0);
+ if (child instanceof SmartReplyView) {
+ smartReplyView = (SmartReplyView) child;
+ }
+ }
+ if (smartReplyView != null) {
+ smartReplyView.setRepliesFromRemoteInput(remoteInput, pendingIntent);
+ smartReplyContainer.setVisibility(View.VISIBLE);
+ }
+ return smartReplyView;
+ }
+
public void closeRemoteInput() {
if (mHeadsUpRemoteInput != null) {
mHeadsUpRemoteInput.close();
@@ -1506,4 +1563,14 @@
}
return visibleWrapper.shouldClipToRounding(topRounded, bottomRounded);
}
+
+ public CharSequence getActiveRemoteInputText() {
+ if (mExpandedRemoteInput != null && mExpandedRemoteInput.isActive()) {
+ return mExpandedRemoteInput.getText();
+ }
+ if (mHeadsUpRemoteInput != null && mHeadsUpRemoteInput.isActive()) {
+ return mHeadsUpRemoteInput.getText();
+ }
+ return null;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGutsManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGutsManager.java
index 9d8892d..1aaa3b2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGutsManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGutsManager.java
@@ -15,6 +15,9 @@
*/
package com.android.systemui.statusbar;
+import static android.service.notification.NotificationListenerService.Ranking
+ .USER_SENTIMENT_NEGATIVE;
+
import android.app.INotificationManager;
import android.app.NotificationChannel;
import android.content.Context;
@@ -41,7 +44,6 @@
import java.io.FileDescriptor;
import java.io.PrintWriter;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
@@ -133,14 +135,14 @@
* channel.
*/
private void startAppNotificationSettingsActivity(String packageName, final int appUid,
- final NotificationChannel channel) {
+ final NotificationChannel channel, ExpandableNotificationRow row) {
final Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, packageName);
intent.putExtra(Settings.EXTRA_APP_UID, appUid);
if (channel != null) {
intent.putExtra(EXTRA_FRAGMENT_ARG_KEY, channel.getId());
}
- mPresenter.startNotificationGutsIntent(intent, appUid);
+ mPresenter.startNotificationGutsIntent(intent, appUid, row);
}
public void bindGuts(final ExpandableNotificationRow row) {
@@ -198,14 +200,14 @@
mMetricsLogger.action(MetricsProto.MetricsEvent.ACTION_NOTE_INFO);
guts.resetFalsingCheck();
mOnSettingsClickListener.onClick(sbn.getKey());
- startAppNotificationSettingsActivity(pkg, appUid, channel);
+ startAppNotificationSettingsActivity(pkg, appUid, channel, row);
};
}
final NotificationInfo.OnAppSettingsClickListener onAppSettingsClick = (View v,
Intent intent) -> {
mMetricsLogger.action(MetricsProto.MetricsEvent.ACTION_APP_NOTE_SETTINGS);
guts.resetFalsingCheck();
- mPresenter.startNotificationGutsIntent(intent, sbn.getUid());
+ mPresenter.startNotificationGutsIntent(intent, sbn.getUid(), row);
};
final View.OnClickListener onDoneClick = (View v) -> {
saveAndCloseNotificationMenu(row, guts, v);
@@ -231,7 +233,8 @@
try {
info.bindNotification(pmUser, iNotificationManager, pkg, row.getEntry().channel,
channels.size(), sbn, mCheckSaveListener, onSettingsClick,
- onAppSettingsClick, mNonBlockablePkgs);
+ onAppSettingsClick, mNonBlockablePkgs,
+ row.getEntry().userSentiment == USER_SENTIMENT_NEGATIVE);
} catch (RemoteException e) {
Log.e(TAG, e.toString());
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
index 6279fdc..735f4fd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
@@ -79,6 +79,7 @@
private OnSettingsClickListener mOnSettingsClickListener;
private OnAppSettingsClickListener mAppSettingsClickListener;
private NotificationGuts mGutsContainer;
+ private boolean mNegativeUserSentiment;
private OnClickListener mOnKeepShowing = v -> {
closeControls(v);
@@ -122,6 +123,22 @@
final OnAppSettingsClickListener onAppSettingsClick,
final Set<String> nonBlockablePkgs)
throws RemoteException {
+ bindNotification(pm, iNotificationManager, pkg, notificationChannel, numChannels, sbn,
+ checkSaveListener, onSettingsClick, onAppSettingsClick, nonBlockablePkgs,
+ false /* negative sentiment */);
+ }
+
+ public void bindNotification(final PackageManager pm,
+ final INotificationManager iNotificationManager,
+ final String pkg,
+ final NotificationChannel notificationChannel,
+ final int numChannels,
+ final StatusBarNotification sbn,
+ final CheckSaveListener checkSaveListener,
+ final OnSettingsClickListener onSettingsClick,
+ final OnAppSettingsClickListener onAppSettingsClick,
+ final Set<String> nonBlockablePkgs,
+ boolean negativeUserSentiment) throws RemoteException {
mINotificationManager = iNotificationManager;
mPkg = pkg;
mNumNotificationChannels = numChannels;
@@ -133,6 +150,7 @@
mOnSettingsClickListener = onSettingsClick;
mSingleNotificationChannel = notificationChannel;
mStartingUserImportance = mChosenImportance = mSingleNotificationChannel.getImportance();
+ mNegativeUserSentiment = negativeUserSentiment;
int numTotalChannels = mINotificationManager.getNumNotificationChannelsForPackage(
pkg, mAppUid, false /* includeDeleted */);
@@ -227,27 +245,30 @@
}
private void bindPrompt() {
- final TextView channelName = findViewById(R.id.channel_name);
final TextView blockPrompt = findViewById(R.id.block_prompt);
+ bindName();
if (mNonblockable) {
- if (mIsSingleDefaultChannel || mNumNotificationChannels > 1) {
- channelName.setVisibility(View.GONE);
- } else {
- channelName.setText(mSingleNotificationChannel.getName());
- }
-
blockPrompt.setText(R.string.notification_unblockable_desc);
} else {
- if (mIsSingleDefaultChannel || mNumNotificationChannels > 1) {
- channelName.setVisibility(View.GONE);
+ if (mNegativeUserSentiment) {
+ blockPrompt.setText(R.string.inline_blocking_helper);
+ } else if (mIsSingleDefaultChannel || mNumNotificationChannels > 1) {
blockPrompt.setText(R.string.inline_keep_showing_app);
} else {
- channelName.setText(mSingleNotificationChannel.getName());
blockPrompt.setText(R.string.inline_keep_showing);
}
}
}
+ private void bindName() {
+ final TextView channelName = findViewById(R.id.channel_name);
+ if (mIsSingleDefaultChannel || mNumNotificationChannels > 1) {
+ channelName.setVisibility(View.GONE);
+ } else {
+ channelName.setText(mSingleNotificationChannel.getName());
+ }
+ }
+
private boolean hasImportanceChanged() {
return mSingleNotificationChannel != null && mStartingUserImportance != mChosenImportance;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListContainer.java
index 43be44d..0c19ec0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListContainer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListContainer.java
@@ -16,6 +16,8 @@
package com.android.systemui.statusbar;
+import static com.android.systemui.statusbar.notification.ActivityLaunchAnimator.ExpandAnimationParameters;
+
import android.view.View;
import android.view.ViewGroup;
@@ -179,4 +181,11 @@
* @return true if has pulsing notifications
*/
boolean hasPulsingNotifications();
+
+ /**
+ * Apply parameters of the expand animation to the layout
+ */
+ default void applyExpandAnimationParams(ExpandAnimationParameters params) {}
+
+ default void setExpandingNotification(ExpandableNotificationRow row) {}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationPresenter.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationPresenter.java
index 12641a0..5263bb4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationPresenter.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationPresenter.java
@@ -16,9 +16,7 @@
package com.android.systemui.statusbar;
import android.content.Intent;
-import android.content.pm.PackageManager;
import android.os.Handler;
-import android.service.notification.StatusBarNotification;
import android.view.View;
/**
@@ -48,7 +46,7 @@
* Runs the given intent. The presenter may want to run some animations or close itself when
* this happens.
*/
- void startNotificationGutsIntent(Intent intent, int appUid);
+ void startNotificationGutsIntent(Intent intent, int appUid, ExpandableNotificationRow row);
/**
* Returns the Handler for NotificationPresenter.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java
index 266c09b..cd4c7ae 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java
@@ -18,6 +18,7 @@
import android.content.Context;
import android.content.res.Resources;
+import android.service.notification.NotificationListenerService;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
@@ -338,6 +339,9 @@
stack.push(notificationChildren.get(i));
}
}
+
+ row.showBlockingHelper(entry.userSentiment ==
+ NotificationListenerService.Ranking.USER_SENTIMENT_NEGATIVE);
}
mPresenter.onUpdateRowStates();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
index 97e3d22..cfc69a8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
@@ -47,7 +47,6 @@
private final Delegate mDelegate;
public RemoteInputController(Delegate delegate) {
- addCallback(Dependency.get(StatusBarWindowManager.class));
mDelegate = delegate;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
new file mode 100644
index 0000000..11d20b2
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
@@ -0,0 +1,274 @@
+/*
+ * 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.notification;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.ValueAnimator;
+import android.app.ActivityManager;
+import android.app.ActivityOptions;
+import android.graphics.Matrix;
+import android.graphics.Rect;
+import android.os.RemoteException;
+import android.util.MathUtils;
+import android.view.IRemoteAnimationFinishedCallback;
+import android.view.IRemoteAnimationRunner;
+import android.view.RemoteAnimationAdapter;
+import android.view.RemoteAnimationTarget;
+import android.view.Surface;
+import android.view.SurfaceControl;
+import android.view.ViewRootImpl;
+
+import com.android.systemui.Interpolators;
+import com.android.systemui.statusbar.ExpandableNotificationRow;
+import com.android.systemui.statusbar.NotificationListContainer;
+import com.android.systemui.statusbar.StatusBarState;
+import com.android.systemui.statusbar.phone.CollapsedStatusBarFragment;
+import com.android.systemui.statusbar.phone.NotificationPanelView;
+import com.android.systemui.statusbar.phone.StatusBar;
+import com.android.systemui.statusbar.phone.StatusBarWindowView;
+
+import java.util.function.Consumer;
+
+/**
+ * A class that allows activities to be launched in a seamless way where the notification
+ * transforms nicely into the starting window.
+ */
+public class ActivityLaunchAnimator {
+
+ private static final int ANIMATION_DURATION = 400;
+ public static final long ANIMATION_DURATION_FADE_CONTENT = 67;
+ public static final long ANIMATION_DURATION_FADE_APP = 200;
+ public static final long ANIMATION_DELAY_ICON_FADE_IN = ANIMATION_DURATION -
+ CollapsedStatusBarFragment.FADE_IN_DURATION - CollapsedStatusBarFragment.FADE_IN_DELAY
+ - 16;
+ private static final long LAUNCH_TIMEOUT = 500;
+ private final NotificationPanelView mNotificationPanel;
+ private final NotificationListContainer mNotificationContainer;
+ private final StatusBarWindowView mStatusBarWindow;
+ private StatusBar mStatusBar;
+ private final Runnable mTimeoutRunnable = () -> {
+ setAnimationPending(false);
+ mStatusBar.collapsePanel(true /* animate */);
+ };
+ private boolean mAnimationPending;
+
+ public ActivityLaunchAnimator(StatusBarWindowView statusBarWindow,
+ StatusBar statusBar,
+ NotificationPanelView notificationPanel,
+ NotificationListContainer container) {
+ mNotificationPanel = notificationPanel;
+ mNotificationContainer = container;
+ mStatusBarWindow = statusBarWindow;
+ mStatusBar = statusBar;
+ }
+
+ public ActivityOptions getLaunchAnimation(
+ ExpandableNotificationRow sourceNofitication) {
+ AnimationRunner animationRunner = new AnimationRunner(sourceNofitication);
+ return ActivityOptions.makeRemoteAnimation(
+ new RemoteAnimationAdapter(animationRunner, 1000 /* Duration */, 0 /* delay */));
+ }
+
+ public boolean isAnimationPending() {
+ return mAnimationPending;
+ }
+
+ public void setLaunchResult(int launchResult) {
+ setAnimationPending((launchResult == ActivityManager.START_TASK_TO_FRONT
+ || launchResult == ActivityManager.START_SUCCESS)
+ && mStatusBar.getBarState() == StatusBarState.SHADE);
+ }
+
+ private void setAnimationPending(boolean pending) {
+ mAnimationPending = pending;
+ mStatusBarWindow.setExpandAnimationPending(pending);
+ if (pending) {
+ mStatusBarWindow.postDelayed(mTimeoutRunnable, LAUNCH_TIMEOUT);
+ } else {
+ mStatusBarWindow.removeCallbacks(mTimeoutRunnable);
+ }
+ }
+
+ class AnimationRunner extends IRemoteAnimationRunner.Stub {
+
+ private final ExpandableNotificationRow mSourceNotification;
+ private final ExpandAnimationParameters mParams;
+ private final Rect mWindowCrop = new Rect();
+ private boolean mLeashShown;
+ private boolean mInstantCollapsePanel = true;
+
+ public AnimationRunner(ExpandableNotificationRow sourceNofitication) {
+ mSourceNotification = sourceNofitication;
+ mParams = new ExpandAnimationParameters();
+ }
+
+ @Override
+ public void onAnimationStart(RemoteAnimationTarget[] remoteAnimationTargets,
+ IRemoteAnimationFinishedCallback iRemoteAnimationFinishedCallback)
+ throws RemoteException {
+ mSourceNotification.post(() -> {
+ for (RemoteAnimationTarget app : remoteAnimationTargets) {
+ if (app.mode == RemoteAnimationTarget.MODE_OPENING) {
+ setExpandAnimationRunning(true);
+ mInstantCollapsePanel = app.position.y == 0
+ && app.sourceContainerBounds.height()
+ >= mNotificationPanel.getHeight();
+ if (!mInstantCollapsePanel) {
+ mNotificationPanel.collapseWithDuration(ANIMATION_DURATION);
+ }
+ ValueAnimator anim = ValueAnimator.ofFloat(0, 1);
+ mParams.startPosition = mSourceNotification.getLocationOnScreen();
+ mParams.startTranslationZ = mSourceNotification.getTranslationZ();
+ int targetWidth = app.sourceContainerBounds.width();
+ int notificationHeight = mSourceNotification.getActualHeight();
+ int notificationWidth = mSourceNotification.getWidth();
+ anim.setDuration(ANIMATION_DURATION);
+ anim.setInterpolator(Interpolators.LINEAR);
+ anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ mParams.linearProgress = animation.getAnimatedFraction();
+ float progress
+ = Interpolators.FAST_OUT_SLOW_IN.getInterpolation(
+ mParams.linearProgress);
+ int newWidth = (int) MathUtils.lerp(notificationWidth,
+ targetWidth, progress);
+ mParams.left = (int) ((targetWidth - newWidth) / 2.0f);
+ mParams.right = mParams.left + newWidth;
+ mParams.top = (int) MathUtils.lerp(mParams.startPosition[1],
+ app.position.y, progress);
+ mParams.bottom = (int) MathUtils.lerp(mParams.startPosition[1]
+ + notificationHeight,
+ app.position.y + app.sourceContainerBounds.bottom,
+ progress);
+ applyParamsToWindow(app);
+ applyParamsToNotification(mParams);
+ applyParamsToNotificationList(mParams);
+ }
+ });
+ anim.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ setExpandAnimationRunning(false);
+ if (mInstantCollapsePanel) {
+ mStatusBar.collapsePanel(false /* animate */);
+ }
+ try {
+ iRemoteAnimationFinishedCallback.onAnimationFinished();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+ });
+ anim.start();
+ break;
+ }
+ }
+ setAnimationPending(false);
+ });
+ }
+
+ private void setExpandAnimationRunning(boolean running) {
+ mNotificationPanel.setLaunchingNotification(running);
+ mSourceNotification.setExpandAnimationRunning(running);
+ mStatusBarWindow.setExpandAnimationRunning(running);
+ mNotificationContainer.setExpandingNotification(running ? mSourceNotification : null);
+ if (!running) {
+ applyParamsToNotification(null);
+ applyParamsToNotificationList(null);
+ }
+
+ }
+
+ private void applyParamsToNotificationList(ExpandAnimationParameters params) {
+ mNotificationContainer.applyExpandAnimationParams(params);
+ mNotificationPanel.applyExpandAnimationParams(params);
+ }
+
+ private void applyParamsToNotification(ExpandAnimationParameters params) {
+ mSourceNotification.applyExpandAnimationParams(params);
+ }
+
+ private void applyParamsToWindow(RemoteAnimationTarget app) {
+ SurfaceControl.Transaction t = new SurfaceControl.Transaction();
+ if (!mLeashShown) {
+ t.show(app.leash);
+ mLeashShown = true;
+ }
+ Matrix m = new Matrix();
+ m.postTranslate(0, (float) (mParams.top - app.position.y));
+ t.setMatrix(app.leash, m, new float[9]);
+ mWindowCrop.set(mParams.left, 0, mParams.right, mParams.getHeight());
+ t.setWindowCrop(app.leash, mWindowCrop);
+ ViewRootImpl viewRootImpl = mSourceNotification.getViewRootImpl();
+ if (viewRootImpl != null) {
+ Surface systemUiSurface = viewRootImpl.mSurface;
+ t.deferTransactionUntilSurface(app.leash, systemUiSurface,
+ systemUiSurface.getNextFrameNumber());
+ }
+ t.apply();
+ }
+
+ @Override
+ public void onAnimationCancelled() throws RemoteException {
+ mSourceNotification.post(() -> {
+ setAnimationPending(false);
+ mStatusBar.onLaunchAnimationCancelled();
+ });
+ }
+ };
+
+ public static class ExpandAnimationParameters {
+ float linearProgress;
+ int[] startPosition;
+ float startTranslationZ;
+ int left;
+ int top;
+ int right;
+ int bottom;
+
+ public ExpandAnimationParameters() {
+ }
+
+ public int getTop() {
+ return top;
+ }
+
+ public int getWidth() {
+ return right - left;
+ }
+
+ public int getHeight() {
+ return bottom - top;
+ }
+
+ public int getTopChange() {
+ return Math.min(top - startPosition[1], 0);
+ }
+
+
+ public float getProgress(long delay, long duration) {
+ return MathUtils.constrain((linearProgress * ANIMATION_DURATION - delay)
+ / duration, 0.0f, 1.0f);
+ }
+
+ public float getStartTranslationZ() {
+ return startTranslationZ;
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java
index dec5303..918b6ed 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java
@@ -137,8 +137,12 @@
final View transformedView = mTransformedView;
boolean transformX = (transformationFlags & TRANSFORM_X) != 0;
boolean transformY = (transformationFlags & TRANSFORM_Y) != 0;
- boolean differentHeight = otherState.getViewHeight() != getViewHeight();
- boolean differentWidth = otherState.getViewWidth() != getViewWidth();
+ int viewHeight = getViewHeight();
+ int otherHeight = otherState.getViewHeight();
+ boolean differentHeight = otherHeight != viewHeight && otherHeight != 0 && viewHeight != 0;
+ int viewWidth = getViewWidth();
+ int otherWidth = otherState.getViewWidth();
+ boolean differentWidth = otherWidth != viewWidth && otherWidth != 0 && viewWidth != 0;
boolean transformScale = transformScale(otherState) && (differentHeight || differentWidth);
// lets animate the positions correctly
if (transformationAmount == 0.0f
@@ -165,15 +169,15 @@
// we also want to animate the scale if we're the same
View otherView = otherState.getTransformedView();
if (transformScale && differentWidth) {
- setTransformationStartScaleX(otherState.getViewWidth() * otherView.getScaleX()
- / (float) getViewWidth());
+ setTransformationStartScaleX(otherWidth * otherView.getScaleX()
+ / (float) viewWidth);
transformedView.setPivotX(0);
} else {
setTransformationStartScaleX(UNDEFINED);
}
if (transformScale && differentHeight) {
- setTransformationStartScaleY(otherState.getViewHeight() * otherView.getScaleY()
- / (float) getViewHeight());
+ setTransformationStartScaleY(otherHeight * otherView.getScaleY()
+ / (float) viewHeight);
transformedView.setPivotY(0);
} else {
setTransformationStartScaleY(UNDEFINED);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
index 61cb61c..f7f791e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
@@ -51,6 +51,8 @@
public static final String TAG = "CollapsedStatusBarFragment";
private static final String EXTRA_PANEL_STATE = "panel_state";
+ public static final int FADE_IN_DURATION = 320;
+ public static final int FADE_IN_DELAY = 50;
private PhoneStatusBarView mStatusBar;
private KeyguardMonitor mKeyguardMonitor;
private NetworkController mNetworkController;
@@ -257,9 +259,9 @@
}
v.animate()
.alpha(1f)
- .setDuration(320)
+ .setDuration(FADE_IN_DURATION)
.setInterpolator(Interpolators.ALPHA_IN)
- .setStartDelay(50)
+ .setStartDelay(FADE_IN_DELAY)
// We need to clean up any pending end action from animateHide if we call
// both hide and show in the same frame before the animation actually gets started.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
index da809c1..09acf3e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
@@ -115,7 +115,7 @@
lp = (MarginLayoutParams) mSystemIconsSuperContainer.getLayoutParams();
lp.height = getResources().getDimensionPixelSize(
- R.dimen.status_bar_header_height);
+ com.android.internal.R.dimen.quick_qs_total_height);
lp.setMarginStart(getResources().getDimensionPixelSize(
R.dimen.system_icons_super_container_margin_start));
mSystemIconsSuperContainer.setLayoutParams(lp);
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 368b36b..65c45a3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
@@ -60,6 +60,7 @@
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
+import android.view.Surface;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
@@ -123,6 +124,7 @@
private AccessibilityManager mAccessibilityManager;
private MagnificationContentObserver mMagnificationObserver;
private ContentResolver mContentResolver;
+ private final MetricsLogger mMetricsLogger = Dependency.get(MetricsLogger.class);
private int mDisabledFlags1;
private StatusBar mStatusBar;
@@ -223,7 +225,7 @@
mNavigationBarView = (NavigationBarView) view;
mNavigationBarView.setDisabledFlags(mDisabledFlags1);
- mNavigationBarView.setComponents(mRecents, mDivider);
+ mNavigationBarView.setComponents(mRecents, mDivider, mStatusBar.getPanel());
mNavigationBarView.setOnVerticalChangedListener(this::onVerticalChanged);
mNavigationBarView.setOnTouchListener(this::onNavigationTouch);
if (savedInstanceState != null) {
@@ -298,7 +300,7 @@
boolean showImeSwitcher) {
boolean imeShown = (vis & InputMethodService.IME_VISIBLE) != 0;
int hints = mNavigationIconHints;
- if ((backDisposition == InputMethodService.BACK_DISPOSITION_WILL_DISMISS) || imeShown) {
+ if (imeShown && backDisposition != InputMethodService.BACK_DISPOSITION_WILL_NOT_DISMISS) {
hints |= NAVIGATION_HINT_BACK_ALT;
} else {
hints &= ~NAVIGATION_HINT_BACK_ALT;
@@ -354,6 +356,7 @@
mLastRotationSuggestion = rotation; // Remember rotation for click
setRotateSuggestionButtonState(true);
rescheduleRotationTimeout(false);
+ mMetricsLogger.visible(MetricsEvent.ROTATION_SUGGESTION_SHOWN);
}
}
@@ -406,7 +409,7 @@
if (visible) { // Appear and change
rotBtn.setVisibility(View.VISIBLE);
- mNavigationBarView.notifyAccessibilitySubtreeChanged();
+ mNavigationBarView.notifySubtreeAccessibilityStateChangedIfNeeded();
if (skipAnim) {
currentView.setAlpha(1f);
@@ -434,7 +437,7 @@
if (skipAnim) {
rotBtn.setVisibility(View.INVISIBLE);
- mNavigationBarView.notifyAccessibilitySubtreeChanged();
+ mNavigationBarView.notifySubtreeAccessibilityStateChangedIfNeeded();
return;
}
@@ -451,7 +454,7 @@
@Override
public void onAnimationEnd(Animator animation) {
rotBtn.setVisibility(View.INVISIBLE);
- mNavigationBarView.notifyAccessibilitySubtreeChanged();
+ mNavigationBarView.notifySubtreeAccessibilityStateChangedIfNeeded();
}
});
@@ -611,7 +614,7 @@
if (shouldDisableNavbarGestures()) {
return false;
}
- MetricsLogger.action(getContext(), MetricsEvent.ACTION_ASSIST_LONG_PRESS);
+ mMetricsLogger.action(MetricsEvent.ACTION_ASSIST_LONG_PRESS);
mAssistManager.startAssist(new Bundle() /* args */);
mStatusBar.awakenDreams();
@@ -767,6 +770,7 @@
}
private void onRotateSuggestionClick(View v) {
+ mMetricsLogger.action(MetricsEvent.ACTION_ROTATION_SUGGESTION_ACCEPTED);
mRotationLockController.setRotationLockedAtAngle(true, mLastRotationSuggestion);
}
@@ -830,10 +834,13 @@
// window in response to the orientation change.
Handler h = getView().getHandler();
Message msg = Message.obtain(h, () -> {
- // If the screen rotation changes while locked, update lock rotation to flow with
+
+ // If the screen rotation changes while locked, potentially update lock to flow with
// new screen rotation and hide any showing suggestions.
if (mRotationLockController.isRotationLocked()) {
- mRotationLockController.setRotationLockedAtAngle(true, rotation);
+ if (shouldOverrideUserLockPrefs(rotation)) {
+ mRotationLockController.setRotationLockedAtAngle(true, rotation);
+ }
setRotateSuggestionButtonState(false, true);
}
@@ -845,6 +852,12 @@
msg.setAsynchronous(true);
h.sendMessageAtFrontOfQueue(msg);
}
+
+ private boolean shouldOverrideUserLockPrefs(final int rotation) {
+ // Only override user prefs when returning to portrait.
+ // Don't let apps that force landscape or 180 alter user lock.
+ return rotation == Surface.ROTATION_0;
+ }
};
private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
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 ff923e5..0d36efd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java
@@ -34,6 +34,7 @@
import com.android.systemui.OverviewProxyService;
import com.android.systemui.R;
import com.android.systemui.RecentsComponent;
+import com.android.systemui.SysUiServiceProvider;
import com.android.systemui.plugins.statusbar.phone.NavGesture.GestureHelper;
import com.android.systemui.shared.recents.IOverviewProxy;
import com.android.systemui.shared.recents.utilities.Utilities;
@@ -78,6 +79,7 @@
private final int mScrollTouchSlop;
private final Matrix mTransformGlobalMatrix = new Matrix();
private final Matrix mTransformLocalMatrix = new Matrix();
+ private final StatusBar mStatusBar;
private int mTouchDownX;
private int mTouchDownY;
private boolean mDownOnRecents;
@@ -90,6 +92,7 @@
public NavigationBarGestureHelper(Context context) {
mContext = context;
+ mStatusBar = SysUiServiceProvider.getComponent(context, StatusBar.class);
Resources r = context.getResources();
mScrollTouchSlop = r.getDimensionPixelSize(R.dimen.navigation_bar_min_swipe_distance);
mQuickScrubController = new QuickScrubController(context);
@@ -146,7 +149,8 @@
break;
}
}
- if (!mQuickScrubController.onInterceptTouchEvent(event)) {
+ if (mStatusBar.isPresenterFullyCollapsed()
+ && !mQuickScrubController.onInterceptTouchEvent(event)) {
proxyMotionEvents(event);
return false;
}
@@ -304,7 +308,13 @@
}
public boolean onTouchEvent(MotionEvent event) {
- boolean result = mQuickScrubController.onTouchEvent(event) || proxyMotionEvents(event);
+ // The same down event was just sent on intercept and therefore can be ignored here
+ boolean ignoreProxyDownEvent = event.getAction() == MotionEvent.ACTION_DOWN
+ && mOverviewEventSender.getProxy() != null;
+ boolean result = mStatusBar.isPresenterFullyCollapsed()
+ && (mQuickScrubController.onTouchEvent(event)
+ || ignoreProxyDownEvent
+ || proxyMotionEvents(event));
if (mDockWindowEnabled) {
result |= handleDockWindowEvent(event);
}
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 059ce92..de6ecac 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -57,10 +57,11 @@
import com.android.systemui.plugins.PluginManager;
import com.android.systemui.plugins.statusbar.phone.NavGesture;
import com.android.systemui.plugins.statusbar.phone.NavGesture.GestureHelper;
+import com.android.systemui.recents.SwipeUpOnboarding;
import com.android.systemui.stackdivider.Divider;
-import com.android.systemui.statusbar.policy.TintedKeyButtonDrawable;
import com.android.systemui.statusbar.policy.DeadZone;
import com.android.systemui.statusbar.policy.KeyButtonDrawable;
+import com.android.systemui.statusbar.policy.TintedKeyButtonDrawable;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -103,6 +104,7 @@
private DeadZone mDeadZone;
private final NavigationBarTransitions mBarTransitions;
private final OverviewProxyService mOverviewProxyService;
+ private boolean mRecentsAnimationStarted;
// workaround for LayoutTransitions leaving the nav buttons in a weird state (bug 5549288)
final static boolean WORKAROUND_INVALID_LAYOUT = true;
@@ -124,6 +126,8 @@
private NavigationBarInflaterView mNavigationInflaterView;
private RecentsComponent mRecentsComponent;
private Divider mDivider;
+ private SwipeUpOnboarding mSwipeUpOnboarding;
+ private NotificationPanelView mPanelView;
private class NavTransitionListener implements TransitionListener {
private boolean mBackTransitioning;
@@ -203,9 +207,21 @@
}
}
- private final OverviewProxyListener mOverviewProxyListener = isConnected -> {
- setSlippery(!isConnected);
- setDisabledFlags(mDisabledFlags, true);
+ private final OverviewProxyListener mOverviewProxyListener = new OverviewProxyListener() {
+ @Override
+ public void onConnectionChanged(boolean isConnected) {
+ updateSlippery();
+ setDisabledFlags(mDisabledFlags, true);
+ setUpSwipeUpOnboarding(isConnected);
+ }
+
+ @Override
+ public void onRecentsAnimationStarted() {
+ mRecentsAnimationStarted = true;
+ if (mSwipeUpOnboarding != null) {
+ mSwipeUpOnboarding.onRecentsAnimationStarted();
+ }
+ }
};
public NavigationBarView(Context context, AttributeSet attrs) {
@@ -237,6 +253,7 @@
new ButtonDispatcher(R.id.rotate_suggestion));
mOverviewProxyService = Dependency.get(OverviewProxyService.class);
+ mSwipeUpOnboarding = new SwipeUpOnboarding(context);
}
public BarTransitions getBarTransitions() {
@@ -247,9 +264,11 @@
return mBarTransitions.getLightTransitionsController();
}
- public void setComponents(RecentsComponent recentsComponent, Divider divider) {
+ public void setComponents(RecentsComponent recentsComponent, Divider divider,
+ NotificationPanelView panel) {
mRecentsComponent = recentsComponent;
mDivider = divider;
+ mPanelView = panel;
if (mGestureHelper instanceof NavigationBarGestureHelper) {
((NavigationBarGestureHelper) mGestureHelper).setComponents(
recentsComponent, divider, this);
@@ -266,12 +285,26 @@
if (mGestureHelper.onTouchEvent(event)) {
return true;
}
- return super.onTouchEvent(event);
+ return mRecentsAnimationStarted || super.onTouchEvent(event);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent event) {
- return mGestureHelper.onInterceptTouchEvent(event);
+ int action = event.getActionMasked();
+ if (action == MotionEvent.ACTION_DOWN) {
+ mRecentsAnimationStarted = false;
+ } else if (action == MotionEvent.ACTION_UP) {
+ // If the overview proxy service has not started the recents animation then clean up
+ // after it to ensure that the nav bar buttons still work
+ if (mOverviewProxyService.getProxy() != null && !mRecentsAnimationStarted) {
+ try {
+ ActivityManager.getService().cancelRecentsAnimation();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Could not cancel recents animation");
+ }
+ }
+ }
+ return mRecentsAnimationStarted || mGestureHelper.onInterceptTouchEvent(event);
}
public void abortCurrentGesture() {
@@ -567,6 +600,14 @@
}
}
+ public void onPanelExpandedChange(boolean expanded) {
+ updateSlippery();
+ }
+
+ private void updateSlippery() {
+ setSlippery(mOverviewProxyService.getProxy() != null && mPanelView.isFullyExpanded());
+ }
+
private void setSlippery(boolean slippery) {
boolean changed = false;
final ViewGroup navbarView = ((ViewGroup) getParent());
@@ -630,6 +671,9 @@
if (mGestureHelper != null) {
mGestureHelper.onDarkIntensityChange(intensity);
}
+ if (mSwipeUpOnboarding != null) {
+ mSwipeUpOnboarding.setContentDarkIntensity(intensity);
+ }
}
@Override
@@ -740,6 +784,7 @@
updateTaskSwitchHelper();
updateIcons(getContext(), mConfiguration, newConfig);
updateRecentsIcon();
+ mSwipeUpOnboarding.onConfigurationChanged(newConfig);
if (uiCarModeChanged || mConfiguration.densityDpi != newConfig.densityDpi
|| mConfiguration.getLayoutDirection() != newConfig.getLayoutDirection()) {
// If car mode or density changes, we need to reset the icons.
@@ -829,6 +874,7 @@
Dependency.get(PluginManager.class).addPluginListener(this,
NavGesture.class, false /* Only one */);
mOverviewProxyService.addCallback(mOverviewProxyListener);
+ setUpSwipeUpOnboarding(mOverviewProxyService.getProxy() != null);
}
@Override
@@ -839,6 +885,15 @@
mGestureHelper.destroy();
}
mOverviewProxyService.removeCallback(mOverviewProxyListener);
+ setUpSwipeUpOnboarding(false);
+ }
+
+ private void setUpSwipeUpOnboarding(boolean connectedToOverviewProxy) {
+ if (connectedToOverviewProxy) {
+ mSwipeUpOnboarding.onConnectedToLauncher();
+ } else {
+ mSwipeUpOnboarding.onDisconnectedFromLauncher();
+ }
}
@Override
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 66cb59e..31b8159 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -16,6 +16,8 @@
package com.android.systemui.statusbar.phone;
+import static com.android.systemui.statusbar.notification.ActivityLaunchAnimator.ExpandAnimationParameters;
+
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
@@ -45,7 +47,6 @@
import android.view.WindowInsets;
import android.view.accessibility.AccessibilityEvent;
import android.widget.FrameLayout;
-
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.keyguard.KeyguardStatusView;
@@ -65,6 +66,7 @@
import com.android.systemui.statusbar.NotificationData;
import com.android.systemui.statusbar.NotificationShelf;
import com.android.systemui.statusbar.StatusBarState;
+import com.android.systemui.statusbar.notification.ActivityLaunchAnimator;
import com.android.systemui.statusbar.notification.NotificationUtils;
import com.android.systemui.statusbar.policy.HeadsUpManager;
import com.android.systemui.statusbar.policy.KeyguardUserSwitcher;
@@ -241,6 +243,8 @@
private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
private boolean mUserSetupComplete;
private int mQsNotificationTopPadding;
+ private float mExpandOffset;
+ private boolean mHideIconsDuringNotificationLaunch = true;
public NotificationPanelView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -670,7 +674,7 @@
@Override
public boolean onInterceptTouchEvent(MotionEvent event) {
- if (mBlockTouches || mQs.isCustomizing()) {
+ if (mBlockTouches || mQsFullyExpanded && mQs.onInterceptTouchEvent(event)) {
return false;
}
initDownStates(event);
@@ -1675,8 +1679,9 @@
if (mStatusBar.getBarState() == StatusBarState.KEYGUARD) {
return 0;
}
- float translation = NotificationUtils.interpolate(-mQsMinExpansionHeight, 0,
- mNotificationStackScroller.getAppearFraction(mExpandedHeight));
+ float translation = MathUtils.lerp(-mQsMinExpansionHeight, 0,
+ Math.min(1.0f, mNotificationStackScroller.getAppearFraction(mExpandedHeight)))
+ + mExpandOffset;
return Math.min(0, translation);
}
@@ -2540,6 +2545,9 @@
}
public boolean hideStatusBarIconsWhenExpanded() {
+ if (mLaunchingNotification) {
+ return mHideIconsDuringNotificationLaunch;
+ }
return !isFullWidth() || !mShowIconsWhenExpanded;
}
@@ -2624,6 +2632,7 @@
public void setPulsing(Collection<HeadsUpManager.HeadsUpEntry> pulsing) {
mKeyguardStatusView.setPulsing(pulsing != null);
+ positionClockAndNotifications();
mNotificationStackScroller.setPulsing(pulsing, mKeyguardStatusView.getLocationOnScreen()[1]
+ mKeyguardStatusView.getClockBottom());
}
@@ -2665,4 +2674,19 @@
public LockIcon getLockIcon() {
return mKeyguardBottomArea.getLockIcon();
}
+
+ public void applyExpandAnimationParams(ExpandAnimationParameters params) {
+ mExpandOffset = params != null ? params.getTopChange() : 0;
+ updateQsExpansion();
+ if (params != null) {
+ boolean hideIcons = params.getProgress(
+ ActivityLaunchAnimator.ANIMATION_DELAY_ICON_FADE_IN, 100) == 0.0f;
+ if (hideIcons != mHideIconsDuringNotificationLaunch) {
+ mHideIconsDuringNotificationLaunch = hideIcons;
+ if (!hideIcons) {
+ mStatusBar.recomputeDisableFlags(true /* animate */);
+ }
+ }
+ }
+ }
}
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 2fc22ca..2b7e474 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -60,12 +60,15 @@
public static final String TAG = PanelView.class.getSimpleName();
private static final int INITIAL_OPENING_PEEK_DURATION = 200;
private static final int PEEK_ANIMATION_DURATION = 360;
+ private static final int NO_FIXED_DURATION = -1;
private long mDownTime;
private float mMinExpandHeight;
private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger();
private boolean mPanelUpdateWhenAnimatorEnds;
private boolean mVibrateOnOpening;
private boolean mVibrationEnabled;
+ protected boolean mLaunchingNotification;
+ private int mFixedDuration = NO_FIXED_DURATION;
private final void logf(String fmt, Object... args) {
Log.v(TAG, (mViewName != null ? (mViewName + ": ") : "") + String.format(fmt, args));
@@ -785,6 +788,9 @@
if (vel == 0) {
animator.setDuration((long) (animator.getDuration() / collapseSpeedUpFactor));
}
+ if (mFixedDuration != NO_FIXED_DURATION) {
+ animator.setDuration(mFixedDuration);
+ }
}
animator.addListener(new AnimatorListenerAdapter() {
private boolean mCancelled;
@@ -944,7 +950,7 @@
}
public boolean isCollapsing() {
- return mClosing;
+ return mClosing || mLaunchingNotification;
}
public boolean isTracking() {
@@ -1249,4 +1255,14 @@
public void setHeadsUpManager(HeadsUpManager headsUpManager) {
mHeadsUpManager = headsUpManager;
}
+
+ public void setLaunchingNotification(boolean launchingNotification) {
+ mLaunchingNotification = launchingNotification;
+ }
+
+ public void collapseWithDuration(int animationDuration) {
+ mFixedDuration = animationDuration;
+ collapse(false /* delayed */, 1.0f /* speedUpFactor */);
+ mFixedDuration = NO_FIXED_DURATION;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
index 20b5018..6444cc8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -407,17 +407,17 @@
int iconId = R.drawable.stat_sys_data_bluetooth;
String contentDescription =
mContext.getString(R.string.accessibility_quick_settings_bluetooth_on);
- boolean bluetoothEnabled = false;
+ boolean bluetoothVisible = false;
if (mBluetooth != null) {
- bluetoothEnabled = mBluetooth.isBluetoothEnabled();
if (mBluetooth.isBluetoothConnected()) {
iconId = R.drawable.stat_sys_data_bluetooth_connected;
contentDescription = mContext.getString(R.string.accessibility_bluetooth_connected);
+ bluetoothVisible = mBluetooth.isBluetoothEnabled();
}
}
mIconController.setIcon(mSlotBluetooth, iconId, contentDescription);
- mIconController.setIconVisibility(mSlotBluetooth, bluetoothEnabled);
+ mIconController.setIconVisibility(mSlotBluetooth, bluetoothVisible);
}
private final void updateTTY() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
index b181212..cc5a93c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
@@ -250,6 +250,9 @@
super.panelExpansionChanged(frac, expanded);
mPanelFraction = frac;
updateScrimFraction();
+ if ((frac == 0 || frac == 1) && mBar.getNavigationBarView() != null) {
+ mBar.getNavigationBarView().onPanelExpandedChange(expanded);
+ }
}
private void updateScrimFraction() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickScrubController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickScrubController.java
index ee1d088..001a1a2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickScrubController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickScrubController.java
@@ -19,6 +19,7 @@
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
+import android.animation.ArgbEvaluator;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
@@ -82,7 +83,10 @@
private boolean mDragPositive;
private boolean mIsVertical;
private boolean mIsRTL;
- private float mMaxTrackPaintAlpha;
+ private float mTrackAlpha;
+ private int mLightTrackColor;
+ private int mDarkTrackColor;
+ private float mDarkIntensity;
private final Handler mHandler = new Handler();
private final Interpolator mQuickScrubEndInterpolator = new DecelerateInterpolator();
@@ -98,9 +102,10 @@
private final ValueAnimator mButtonAnimator;
private final AnimatorSet mQuickScrubEndAnimator;
private final Context mContext;
+ private final ArgbEvaluator mTrackColorEvaluator = new ArgbEvaluator();
private final AnimatorUpdateListener mTrackAnimatorListener = valueAnimator -> {
- mTrackPaint.setAlpha(Math.round((float) valueAnimator.getAnimatedValue() * 255));
+ mTrackAlpha = (float) valueAnimator.getAnimatedValue();
mNavigationBarView.invalidate();
};
@@ -167,6 +172,7 @@
mGestureDetector = new GestureDetector(mContext, mGestureListener);
mTrackThickness = getDimensionPixelSize(mContext, R.dimen.nav_quick_scrub_track_thickness);
mTrackPadding = getDimensionPixelSize(mContext, R.dimen.nav_quick_scrub_track_edge_padding);
+ mTrackPaint.setAlpha(0);
mTrackAnimator = ObjectAnimator.ofFloat();
mTrackAnimator.addUpdateListener(mTrackAnimatorListener);
@@ -291,6 +297,10 @@
@Override
public void onDraw(Canvas canvas) {
+ int color = (int) mTrackColorEvaluator.evaluate(mDarkIntensity, mLightTrackColor,
+ mDarkTrackColor);
+ mTrackPaint.setColor(color);
+ mTrackPaint.setAlpha((int) (mTrackPaint.getAlpha() * mTrackAlpha));
canvas.drawRect(mTrackRect, mTrackPaint);
}
@@ -326,13 +336,8 @@
@Override
public void onDarkIntensityChange(float intensity) {
- if (intensity == 0) {
- mTrackPaint.setColor(mContext.getColor(R.color.quick_step_track_background_light));
- } else if (intensity == 1) {
- mTrackPaint.setColor(mContext.getColor(R.color.quick_step_track_background_dark));
- }
- mMaxTrackPaintAlpha = mTrackPaint.getAlpha() * 1f / 255;
- mTrackPaint.setAlpha(0);
+ mDarkIntensity = intensity;
+ mNavigationBarView.invalidate();
}
@Override
@@ -365,7 +370,9 @@
private void startQuickScrub() {
if (!mQuickScrubActive) {
mQuickScrubActive = true;
- mTrackAnimator.setFloatValues(0, mMaxTrackPaintAlpha);
+ mLightTrackColor = mContext.getColor(R.color.quick_step_track_background_light);
+ mDarkTrackColor = mContext.getColor(R.color.quick_step_track_background_dark);
+ mTrackAnimator.setFloatValues(0, 1);
mTrackAnimator.start();
try {
mOverviewEventSender.getProxy().onQuickScrubStart();
@@ -382,7 +389,7 @@
mHandler.removeCallbacks(mLongPressRunnable);
if (mDraggingActive || mQuickScrubActive) {
mButtonAnimator.setIntValues((int) mTranslation, 0);
- mTrackAnimator.setFloatValues(mTrackPaint.getAlpha() * 1f / 255, 0);
+ mTrackAnimator.setFloatValues(mTrackAlpha, 0);
mQuickScrubEndAnimator.start();
try {
mOverviewEventSender.getProxy().onQuickScrubEnd();
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 3b783c2..426268b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -85,6 +85,7 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
+import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
import android.os.RemoteException;
@@ -99,6 +100,7 @@
import android.service.notification.StatusBarNotification;
import android.service.vr.IVrManager;
import android.service.vr.IVrStateCallbacks;
+import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.EventLog;
import android.util.Log;
@@ -138,6 +140,7 @@
import com.android.keyguard.ViewMediatorCallback;
import com.android.systemui.ActivityStarterDelegate;
import com.android.systemui.AutoReinflateContainer;
+import com.android.systemui.charging.WirelessChargingAnimation;
import com.android.systemui.DemoMode;
import com.android.systemui.Dependency;
import com.android.systemui.EventLogTags;
@@ -203,6 +206,7 @@
import com.android.systemui.statusbar.SignalClusterView;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.notification.AboveShelfObserver;
+import com.android.systemui.statusbar.notification.ActivityLaunchAnimator;
import com.android.systemui.statusbar.notification.VisualStabilityManager;
import com.android.systemui.statusbar.phone.UnlockMethodCache.OnUnlockMethodChangedListener;
import com.android.systemui.statusbar.policy.BatteryController;
@@ -584,6 +588,7 @@
private NavigationBarFragment mNavigationBar;
private View mNavigationBarView;
+ protected ActivityLaunchAnimator mActivityLaunchAnimator;
@Override
public void start() {
@@ -753,6 +758,10 @@
// into fragments, but the rest here, it leaves some awkward lifecycle and whatnot.
mNotificationPanel = mStatusBarWindow.findViewById(R.id.notification_panel);
mStackScroller = mStatusBarWindow.findViewById(R.id.notification_stack_scroller);
+ mActivityLaunchAnimator = new ActivityLaunchAnimator(mStatusBarWindow,
+ this,
+ mNotificationPanel,
+ mStackScroller);
mGutsManager.setUpWithPresenter(this, mEntryManager, mStackScroller, mCheckSaveListener,
key -> {
try {
@@ -1419,7 +1428,6 @@
mQSPanel.clickTile(tile);
}
-
private void updateClearAll() {
if (!mClearAllEnabled) {
return;
@@ -2045,6 +2053,12 @@
}
}
+ public void onLaunchAnimationCancelled() {
+ if (!isCollapsing()) {
+ onClosingFinished();
+ }
+ }
+
/**
* All changes to the status bar and notifications funnel through here and are batched.
*/
@@ -2422,6 +2436,18 @@
mask, fullscreenStackBounds, dockedStackBounds, sbModeChanged, mStatusBarMode);
}
+ @Override
+ public void showChargingAnimation(int batteryLevel) {
+ if (mDozing) {
+ // ambient
+ } else if (mKeyguardManager.isKeyguardLocked()) {
+ // lockscreen
+ } else {
+ WirelessChargingAnimation.makeWirelessChargingAnimation(mContext, null,
+ batteryLevel).show();
+ }
+ }
+
void touchAutoHide() {
// update transient bar autohide
if (mStatusBarMode == MODE_SEMI_TRANSPARENT || (mNavigationBar != null
@@ -2630,6 +2656,10 @@
if (mStatusBarView != null) {
dumpBarTransitions(pw, "mStatusBarView", mStatusBarView.getBarTransitions());
}
+ pw.println(" StatusBarWindowView: ");
+ if (mStatusBarWindow != null) {
+ mStatusBarWindow.dump(fd, pw, args);
+ }
pw.println(" mMediaManager: ");
if (mMediaManager != null) {
@@ -2747,6 +2777,7 @@
mStackScroller.requestDisallowDismiss();
}
});
+ mRemoteInputManager.getController().addCallback(mStatusBarWindowManager);
mStatusBarWindowManager.add(mStatusBarWindow, getStatusBarHeight());
}
@@ -2782,7 +2813,8 @@
intent.setFlags(
Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
int result = ActivityManager.START_CANCELED;
- ActivityOptions options = new ActivityOptions(getActivityOptions());
+ ActivityOptions options = new ActivityOptions(getActivityOptions(
+ null /* sourceNotification */));
options.setDisallowEnterPictureInPictureWhileLaunching(
disallowEnterPictureInPictureWhileLaunching);
if (intent == KeyguardBottomAreaView.INSECURE_CAMERA_INTENT) {
@@ -3395,7 +3427,7 @@
}
public boolean isCollapsing() {
- return mNotificationPanel.isCollapsing();
+ return mNotificationPanel.isCollapsing() || mActivityLaunchAnimator.isAnimationPending();
}
public void addPostCollapseAction(Runnable r) {
@@ -4897,6 +4929,7 @@
ActivityManager.getService().resumeAppSwitches();
} catch (RemoteException e) {
}
+ int launchResult = ActivityManager.START_CANCELED;
if (intent != null) {
// If we are launching a work activity and require to launch
// separate work challenge, we defer the activity action and cancel
@@ -4911,12 +4944,31 @@
notificationKey)) {
// Show work challenge, do not run PendingIntent and
// remove notification
+ collapsePanel();
return;
}
}
}
+ Intent fillInIntent = null;
+ Entry entry = row.getEntry();
+ CharSequence remoteInputText = null;
+ RemoteInputController controller = mRemoteInputManager.getController();
+ if (controller.isRemoteInputActive(entry)) {
+ remoteInputText = row.getActiveRemoteInputText();
+ }
+ if (TextUtils.isEmpty(remoteInputText)
+ && !TextUtils.isEmpty(entry.remoteInputText)) {
+ remoteInputText = entry.remoteInputText;
+ }
+ if (!TextUtils.isEmpty(remoteInputText)
+ && !controller.isSpinning(entry.key)) {
+ fillInIntent = new Intent().putExtra(Notification.EXTRA_REMOTE_INPUT_DRAFT,
+ remoteInputText.toString());
+ }
try {
- intent.send(null, 0, null, null, null, null, getActivityOptions());
+ launchResult = intent.sendAndReturnResult(mContext, 0, fillInIntent, null,
+ null, null, getActivityOptions(row));
+ mActivityLaunchAnimator.setLaunchResult(launchResult);
} catch (PendingIntent.CanceledException e) {
// the stack trace isn't very helpful here.
// Just log the exception message.
@@ -4928,6 +4980,13 @@
mAssistManager.hideAssist();
}
}
+ if (shouldCollapse()) {
+ if (Looper.getMainLooper().isCurrentThread()) {
+ collapsePanel();
+ } else {
+ mStackScroller.post(this::collapsePanel);
+ }
+ }
try {
mBarService.onNotificationClick(notificationKey);
@@ -4950,19 +5009,36 @@
new Thread(runnable).start();
}
- if (!mNotificationPanel.isFullyCollapsed()) {
- // close the shade if it was open
- animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL, true /* force */,
- true /* delayed */);
- visibilityChanged(false);
-
- return true;
- } else {
- return false;
- }
+ return !mNotificationPanel.isFullyCollapsed();
}, afterKeyguardGone);
}
+ private boolean shouldCollapse() {
+ return mState != StatusBarState.SHADE || !mActivityLaunchAnimator.isAnimationPending();
+ }
+
+ public void collapsePanel(boolean animate) {
+ if (animate) {
+ collapsePanel();
+ } else if (!isPresenterFullyCollapsed()) {
+ instantCollapseNotificationPanel();
+ visibilityChanged(false);
+ }
+ }
+
+ private boolean collapsePanel() {
+ if (!mNotificationPanel.isFullyCollapsed()) {
+ // close the shade if it was open
+ animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL, true /* force */,
+ true /* delayed */);
+ visibilityChanged(false);
+
+ return true;
+ } else {
+ return false;
+ }
+ }
+
private void removeNotification(StatusBarNotification notification) {
// We have to post it to the UI thread for synchronization
mHandler.post(() -> {
@@ -5045,15 +5121,21 @@
}
@Override
- public void startNotificationGutsIntent(final Intent intent, final int appUid) {
+ public void startNotificationGutsIntent(final Intent intent, final int appUid,
+ ExpandableNotificationRow row) {
dismissKeyguardThenExecute(() -> {
AsyncTask.execute(() -> {
- TaskStackBuilder.create(mContext)
+ int launchResult = TaskStackBuilder.create(mContext)
.addNextIntentWithParentStack(intent)
- .startActivities(getActivityOptions(),
+ .startActivities(getActivityOptions(row),
new UserHandle(UserHandle.getUserId(appUid)));
+ mActivityLaunchAnimator.setLaunchResult(launchResult);
+ if (shouldCollapse()) {
+ // Putting it back on the main thread, since we're touching views
+ mStatusBarWindow.post(() -> animateCollapsePanels(
+ CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL, true /* force */));
+ }
});
- animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL, true /* force */);
return true;
}, false /* afterKeyguardGone */);
}
@@ -5179,7 +5261,8 @@
} catch (RemoteException e) {
}
try {
- intent.send(null, 0, null, null, null, null, getActivityOptions());
+ intent.send(null, 0, null, null, null, null, getActivityOptions(
+ null /* sourceNotification */));
} catch (PendingIntent.CanceledException e) {
// the stack trace isn't very helpful here.
// Just log the exception message.
@@ -5192,16 +5275,7 @@
}
}).start();
- if (!mNotificationPanel.isFullyCollapsed()) {
- // close the shade if it was open
- animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL, true /* force */,
- true /* delayed */);
- visibilityChanged(false);
-
- return true;
- } else {
- return false;
- }
+ return collapsePanel();
}, afterKeyguardGone);
}
@@ -5216,10 +5290,15 @@
return true;
}
- protected Bundle getActivityOptions() {
+ protected Bundle getActivityOptions(ExpandableNotificationRow sourceNotification) {
+ ActivityOptions options;
+ if (sourceNotification != null) {
+ options = mActivityLaunchAnimator.getLaunchAnimation(sourceNotification);
+ } else {
+ options = ActivityOptions.makeBasic();
+ }
// Anything launched from the notification shade should always go into the secondary
// split-screen windowing mode.
- final ActivityOptions options = ActivityOptions.makeBasic();
options.setLaunchWindowingMode(WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY);
return options.toBundle();
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
index 4accd86..a79a41b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
@@ -62,6 +62,9 @@
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.stack.NotificationStackScrollLayout;
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+
public class StatusBarWindowView extends FrameLayout {
public static final String TAG = "StatusBarWindowView";
@@ -88,6 +91,8 @@
private ViewTreeObserver.OnPreDrawListener mFloatingToolbarPreDrawListener;
private boolean mTouchCancelled;
private boolean mTouchActive;
+ private boolean mExpandAnimationRunning;
+ private boolean mExpandAnimationPending;
public StatusBarWindowView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -267,7 +272,7 @@
|| ev.getActionMasked() == MotionEvent.ACTION_CANCEL) {
setTouchActive(false);
}
- if (mTouchCancelled) {
+ if (mTouchCancelled || mExpandAnimationRunning || mExpandAnimationPending) {
return false;
}
mFalsingManager.onTouchEvent(ev, getWidth(), getHeight());
@@ -388,6 +393,21 @@
}
}
+ public void setExpandAnimationRunning(boolean expandAnimationRunning) {
+ mExpandAnimationRunning = expandAnimationRunning;
+ }
+
+ public void setExpandAnimationPending(boolean pending) {
+ mExpandAnimationPending = pending;
+ }
+
+ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+ pw.print(" mExpandAnimationPending="); pw.println(mExpandAnimationPending);
+ pw.print(" mExpandAnimationRunning="); pw.println(mExpandAnimationRunning);
+ pw.print(" mTouchCancelled="); pw.println(mTouchCancelled);
+ pw.print(" mTouchActive="); pw.println(mTouchActive);
+ }
+
public class LayoutParams extends FrameLayout.LayoutParams {
public boolean ignoreRightInset;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java
index 0b666a6..3febdfd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java
@@ -32,6 +32,7 @@
import android.os.Process;
import android.os.UserHandle;
import android.os.UserManager;
+import android.provider.Settings;
import android.support.annotation.VisibleForTesting;
import com.android.systemui.util.Utils;
import java.util.ArrayList;
@@ -105,7 +106,8 @@
}
// When enabling location, a user consent dialog will pop up, and the
// setting won't be fully enabled until the user accepts the agreement.
- updateLocationEnabled(mContext, enabled, currentUserId);
+ updateLocationEnabled(mContext, enabled, currentUserId,
+ Settings.Secure.LOCATION_CHANGER_QUICK_SETTINGS);
return true;
}
@@ -117,7 +119,8 @@
// for the current foreground user.
LocationManager locationManager =
(LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE);
- return locationManager.isLocationEnabledForUser(Process.myUserHandle());
+ return locationManager.isLocationEnabledForUser(
+ UserHandle.of(ActivityManager.getCurrentUser()));
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
index c377feb..179c0d5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
@@ -137,6 +137,7 @@
Intent fillInIntent = new Intent().addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
RemoteInput.addResultsToIntent(mRemoteInputs, fillInIntent,
results);
+ RemoteInput.setResultsSource(fillInIntent, RemoteInput.SOURCE_FREE_FORM_INPUT);
mEditText.setEnabled(false);
mSendButton.setVisibility(INVISIBLE);
@@ -168,6 +169,10 @@
}
}
+ public CharSequence getText() {
+ return mEditText.getText();
+ }
+
public static RemoteInputView inflate(Context context, ViewGroup root,
NotificationData.Entry entry,
RemoteInputController controller) {
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 1dcdf63..2d829af 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java
@@ -52,6 +52,7 @@
results.putString(remoteInput.getResultKey(), choice.toString());
Intent intent = new Intent().addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
RemoteInput.addResultsToIntent(new RemoteInput[]{remoteInput}, intent, results);
+ RemoteInput.setResultsSource(intent, RemoteInput.SOURCE_CHOICE);
try {
pendingIntent.send(context, 0, intent);
} catch (PendingIntent.CanceledException e) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
index ebf4cda..424858a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
@@ -68,6 +68,8 @@
private boolean mUnlockHintRunning;
private boolean mQsCustomizerShowing;
private int mIntrinsicPadding;
+ private int mExpandAnimationTopChange;
+ private ExpandableNotificationRow mExpandingNotification;
public AmbientState(Context context) {
reload(context);
@@ -77,9 +79,25 @@
* Reload the dimens e.g. if the density changed.
*/
public void reload(Context context) {
- mZDistanceBetweenElements = Math.max(1, context.getResources()
+ mZDistanceBetweenElements = getZDistanceBetweenElements(context);
+ mBaseZHeight = getBaseHeight(mZDistanceBetweenElements);
+ }
+
+ private static int getZDistanceBetweenElements(Context context) {
+ return Math.max(1, context.getResources()
.getDimensionPixelSize(R.dimen.z_distance_between_notifications));
- mBaseZHeight = 4 * mZDistanceBetweenElements;
+ }
+
+ private static int getBaseHeight(int zdistanceBetweenElements) {
+ return 4 * zdistanceBetweenElements;
+ }
+
+ /**
+ * @return the launch height for notifications that are launched
+ */
+ public static int getNotificationLaunchHeight(Context context) {
+ int zDistance = getZDistanceBetweenElements(context);
+ return getBaseHeight(zDistance) * 2;
}
/**
@@ -202,7 +220,8 @@
}
public int getInnerHeight() {
- return Math.max(Math.min(mLayoutHeight, mMaxLayoutHeight) - mTopPadding, mLayoutMinHeight);
+ return Math.max(Math.min(mLayoutHeight, mMaxLayoutHeight) - mTopPadding
+ - mExpandAnimationTopChange, mLayoutMinHeight);
}
public boolean isShadeExpanded() {
@@ -380,4 +399,20 @@
public boolean isDozingAndNotPulsing(ExpandableNotificationRow row) {
return isDark() && !isPulsing(row.getEntry());
}
+
+ public void setExpandAnimationTopChange(int expandAnimationTopChange) {
+ mExpandAnimationTopChange = expandAnimationTopChange;
+ }
+
+ public void setExpandingNotification(ExpandableNotificationRow row) {
+ mExpandingNotification = row;
+ }
+
+ public ExpandableNotificationRow getExpandingNotification() {
+ return mExpandingNotification;
+ }
+
+ public int getExpandAnimationTopChange() {
+ return mExpandAnimationTopChange;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/ExpandableViewState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/ExpandableViewState.java
index 0650e23..3bf7d89 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/ExpandableViewState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/ExpandableViewState.java
@@ -467,4 +467,21 @@
return getChildTag(view, TAG_END_HEIGHT);
}
}
+
+ @Override
+ public void cancelAnimations(View view) {
+ super.cancelAnimations(view);
+ Animator animator = getChildTag(view, TAG_ANIMATOR_HEIGHT);
+ if (animator != null) {
+ animator.cancel();
+ }
+ animator = getChildTag(view, TAG_ANIMATOR_SHADOW_ALPHA);
+ if (animator != null) {
+ animator.cancel();
+ }
+ animator = getChildTag(view, TAG_ANIMATOR_TOP_INSET);
+ if (animator != null) {
+ animator.cancel();
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index af3d64b..ad8a0eb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -16,6 +16,8 @@
package com.android.systemui.statusbar.stack;
+import static com.android.systemui.statusbar.notification.ActivityLaunchAnimator.ExpandAnimationParameters;
+
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
@@ -728,7 +730,7 @@
}
private void updateClippingToTopRoundedCorner() {
- Float clipStart = (float) mTopPadding;
+ Float clipStart = (float) mTopPadding + mAmbientState.getExpandAnimationTopChange();
Float clipEnd = clipStart + mCornerRadius;
boolean first = true;
for (int i = 0; i < getChildCount(); i++) {
@@ -1019,7 +1021,9 @@
mHeadsUpManager.addSwipedOutNotification(row.getStatusBarNotification().getKey());
}
}
- performDismiss(v, mGroupManager, false /* fromAccessibility */);
+ if (v instanceof ExpandableNotificationRow) {
+ ((ExpandableNotificationRow) v).performDismiss(false /* fromAccessibility */);
+ }
mFalsingManager.onNotificationDismissed();
if (mFalsingManager.shouldEnforceBouncer()) {
@@ -1028,26 +1032,6 @@
}
}
- public static void performDismiss(View v, NotificationGroupManager groupManager,
- boolean fromAccessibility) {
- if (!(v instanceof ExpandableNotificationRow)) {
- return;
- }
- ExpandableNotificationRow row = (ExpandableNotificationRow) v;
- if (groupManager.isOnlyChildInGroup(row.getStatusBarNotification())) {
- ExpandableNotificationRow groupSummary =
- groupManager.getLogicalGroupSummary(row.getStatusBarNotification());
- if (groupSummary.isClearable()) {
- performDismiss(groupSummary, groupManager, fromAccessibility);
- }
- }
- row.setDismissed(true, fromAccessibility);
- if (row.isClearable()) {
- row.performDismiss();
- }
- if (DEBUG) Log.v(TAG, "onChildDismissed: " + v);
- }
-
@Override
public void onChildSnappedBack(View animView, float targetLeft) {
mAmbientState.onDragFinished(animView);
@@ -3006,6 +2990,17 @@
&& (mIsExpanded || isPinnedHeadsUp(child)), child);
}
+ @Override
+ public void setExpandingNotification(ExpandableNotificationRow row) {
+ mAmbientState.setExpandingNotification(row);
+ requestChildrenUpdate();
+ }
+
+ @Override
+ public void applyExpandAnimationParams(ExpandAnimationParameters params) {
+ mAmbientState.setExpandAnimationTopChange(params == null ? 0 : params.getTopChange());
+ requestChildrenUpdate();
+ }
private void updateAnimationState(boolean running, View child) {
if (child instanceof ExpandableNotificationRow) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
index 2ce6df2..d68a7b1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
@@ -130,7 +130,8 @@
private void updateClipping(StackScrollState resultState,
StackScrollAlgorithmState algorithmState, AmbientState ambientState) {
float drawStart = !ambientState.isOnKeyguard() ? ambientState.getTopPadding()
- + ambientState.getStackTranslation() : 0;
+ + ambientState.getStackTranslation() + ambientState.getExpandAnimationTopChange()
+ : 0;
float previousNotificationEnd = 0;
float previousNotificationStart = 0;
int childCount = algorithmState.visibleChildren.size();
@@ -320,6 +321,10 @@
lastView = v;
}
}
+ ExpandableNotificationRow expandingNotification = ambientState.getExpandingNotification();
+ state.indexOfExpandingNotification = expandingNotification != null
+ ? state.visibleChildren.indexOf(expandingNotification)
+ : -1;
}
private float getPaddingForValue(Float increasedPadding) {
@@ -381,6 +386,9 @@
childViewState.location = ExpandableViewState.LOCATION_MAIN_AREA;
float inset = ambientState.getTopPadding() + ambientState.getStackTranslation();
+ if (i < algorithmState.getIndexOfExpandingNotification()) {
+ inset += ambientState.getExpandAnimationTopChange();
+ }
if (child.mustStayOnScreen() && childViewState.yTranslation >= 0) {
// Even if we're not scrolled away we're in view and we're also not in the
// shelf. We can relax the constraints and let us scroll off the top!
@@ -394,7 +402,7 @@
childViewState.yTranslation = ambientState.getInnerHeight() - childHeight
+ ambientState.getStackTranslation() * 0.25f;
} else {
- clampPositionToShelf(childViewState, ambientState);
+ clampPositionToShelf(child, childViewState, ambientState);
}
currentYPosition = childViewState.yTranslation + childHeight + paddingAfterChild;
@@ -492,10 +500,12 @@
* Clamp the height of the child down such that its end is at most on the beginning of
* the shelf.
*
+ * @param child
* @param childViewState the view state of the child
* @param ambientState the ambient state
*/
- private void clampPositionToShelf(ExpandableViewState childViewState,
+ private void clampPositionToShelf(ExpandableView child,
+ ExpandableViewState childViewState,
AmbientState ambientState) {
if (ambientState.getShelf() == null) {
return;
@@ -505,7 +515,7 @@
- ambientState.getShelf().getIntrinsicHeight();
childViewState.yTranslation = Math.min(childViewState.yTranslation, shelfStart);
if (childViewState.yTranslation >= shelfStart) {
- childViewState.hidden = true;
+ childViewState.hidden = !child.isExpandAnimationRunning();
childViewState.inShelf = true;
childViewState.headsUpIsVisible = false;
}
@@ -602,6 +612,7 @@
* The padding after each child measured in pixels.
*/
public final HashMap<ExpandableView, Float> paddingMap = new HashMap<>();
+ private int indexOfExpandingNotification;
public int getPaddingAfterChild(ExpandableView child) {
Float padding = paddingMap.get(child);
@@ -611,6 +622,10 @@
}
return (int) padding.floatValue();
}
+
+ public int getIndexOfExpandingNotification() {
+ return indexOfExpandingNotification;
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/Events.java b/packages/SystemUI/src/com/android/systemui/volume/Events.java
index e1376ca..2c85bb6 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/Events.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/Events.java
@@ -51,6 +51,7 @@
public static final int EVENT_SUPPRESSOR_CHANGED = 14; // (component|string) (name|string)
public static final int EVENT_MUTE_CHANGED = 15; // (stream|int) (muted|bool)
public static final int EVENT_TOUCH_LEVEL_DONE = 16; // (stream|int) (level|bool)
+ public static final int EVENT_ZEN_CONFIG_CHANGED = 17; // (allow/disallow|string)
private static final String[] EVENT_TAGS = {
"show_dialog",
@@ -70,6 +71,7 @@
"suppressor_changed",
"mute_changed",
"touch_level_done",
+ "zen_mode_config_changed",
};
public static final int DISMISS_REASON_UNKNOWN = 0;
diff --git a/packages/SystemUI/src/com/android/systemui/volume/OutputChooserDialog.java b/packages/SystemUI/src/com/android/systemui/volume/OutputChooserDialog.java
index e0af9ba..5c888ac 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/OutputChooserDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/OutputChooserDialog.java
@@ -22,6 +22,7 @@
import static com.android.settingslib.bluetooth.Utils.getBtClassDrawableWithDescription;
+import android.app.Dialog;
import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
@@ -30,6 +31,8 @@
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.net.wifi.WifiManager;
@@ -43,12 +46,16 @@
import android.telecom.TelecomManager;
import android.util.Log;
import android.util.Pair;
+import android.view.Window;
+import android.view.WindowManager;
import com.android.settingslib.Utils;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
import com.android.systemui.Dependency;
+import com.android.systemui.HardwareUiLayout;
+import com.android.systemui.Interpolators;
import com.android.systemui.R;
-import com.android.systemui.statusbar.phone.SystemUIDialog;
+import com.android.systemui.plugins.VolumeDialogController;
import com.android.systemui.statusbar.policy.BluetoothController;
import java.io.IOException;
@@ -58,7 +65,7 @@
import java.util.Comparator;
import java.util.List;
-public class OutputChooserDialog extends SystemUIDialog
+public class OutputChooserDialog extends Dialog
implements DialogInterface.OnDismissListener, OutputChooserLayout.Callback {
private static final String TAG = Util.logTag(OutputChooserDialog.class);
@@ -82,9 +89,11 @@
private Drawable mTvIcon;
private Drawable mSpeakerIcon;
private Drawable mSpeakerGroupIcon;
+ private HardwareUiLayout mHardwareLayout;
+ private final VolumeDialogController mController;
public OutputChooserDialog(Context context, MediaRouterWrapper router) {
- super(context);
+ super(context, com.android.systemui.R.style.qs_theme);
mContext = context;
mBluetoothController = Dependency.get(BluetoothController.class);
mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
@@ -98,6 +107,22 @@
final IntentFilter filter = new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
context.registerReceiver(mReceiver, filter);
+
+ mController = Dependency.get(VolumeDialogController.class);
+
+ // Window initialization
+ Window window = getWindow();
+ window.requestFeature(Window.FEATURE_NO_TITLE);
+ window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
+ window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND
+ | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR);
+ window.addFlags(
+ WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
+ | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
+ | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
+ | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
+ | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
+ window.setType(WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY);
}
protected void setIsInCall(boolean inCall) {
@@ -112,6 +137,9 @@
setOnDismissListener(this::onDismiss);
mView = findViewById(R.id.output_chooser);
+ mHardwareLayout = HardwareUiLayout.get(mView);
+ mHardwareLayout.setOutsideTouchListener(view -> dismiss());
+ mHardwareLayout.setSwapOrientation(false);
mView.setCallback(this);
if (mIsInCall) {
@@ -151,6 +179,7 @@
MediaRouter.CALLBACK_FLAG_PERFORM_ACTIVE_SCAN);
}
mBluetoothController.addCallback(mCallback);
+ mController.addCallback(mControllerCallbackH, mHandler);
isAttached = true;
}
@@ -158,6 +187,7 @@
public void onDetachedFromWindow() {
isAttached = false;
mRouter.removeCallback(mRouterCallback);
+ mController.removeCallback(mControllerCallbackH);
mBluetoothController.removeCallback(mCallback);
super.onDetachedFromWindow();
}
@@ -169,6 +199,38 @@
}
@Override
+ public void show() {
+ super.show();
+ mHardwareLayout.setTranslationX(getAnimTranslation());
+ mHardwareLayout.setAlpha(0);
+ mHardwareLayout.animate()
+ .alpha(1)
+ .translationX(0)
+ .setDuration(300)
+ .setInterpolator(Interpolators.FAST_OUT_SLOW_IN)
+ .withEndAction(() -> getWindow().getDecorView().requestAccessibilityFocus())
+ .start();
+ }
+
+ @Override
+ public void dismiss() {
+ mHardwareLayout.setTranslationX(0);
+ mHardwareLayout.setAlpha(1);
+ mHardwareLayout.animate()
+ .alpha(0)
+ .translationX(getAnimTranslation())
+ .setDuration(300)
+ .withEndAction(() -> super.dismiss())
+ .setInterpolator(new SystemUIInterpolators.LogAccelerateInterpolator())
+ .start();
+ }
+
+ private float getAnimTranslation() {
+ return getContext().getResources().getDimension(
+ com.android.systemui.R.dimen.output_chooser_panel_width) / 2;
+ }
+
+ @Override
public void onDetailItemClick(OutputChooserLayout.Item item) {
if (item == null || item.tag == null) return;
if (item.deviceType == OutputChooserLayout.Item.DEVICE_TYPE_BT) {
@@ -416,4 +478,44 @@
}
}
};
+
+ private final VolumeDialogController.Callbacks mControllerCallbackH
+ = new VolumeDialogController.Callbacks() {
+ @Override
+ public void onShowRequested(int reason) {
+ dismiss();
+ }
+
+ @Override
+ public void onDismissRequested(int reason) {}
+
+ @Override
+ public void onScreenOff() {
+ dismiss();
+ }
+
+ @Override
+ public void onStateChanged(VolumeDialogController.State state) {}
+
+ @Override
+ public void onLayoutDirectionChanged(int layoutDirection) {}
+
+ @Override
+ public void onConfigurationChanged() {}
+
+ @Override
+ public void onShowVibrateHint() {}
+
+ @Override
+ public void onShowSilentHint() {}
+
+ @Override
+ public void onShowSafetyWarning(int flags) {}
+
+ @Override
+ public void onAccessibilityModeChanged(Boolean showA11yStream) {}
+
+ @Override
+ public void onConnectedDeviceChanged(String deviceName) {}
+ };
}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
index 4464f75..a166db5 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
@@ -26,6 +26,8 @@
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.database.ContentObserver;
+import android.media.AudioDeviceCallback;
+import android.media.AudioDeviceInfo;
import android.media.AudioManager;
import android.media.AudioSystem;
import android.media.IVolumeController;
@@ -41,6 +43,7 @@
import android.os.Vibrator;
import android.provider.Settings;
import android.service.notification.Condition;
+import android.service.notification.ZenModeConfig;
import android.util.ArrayMap;
import android.util.Log;
import android.view.accessibility.AccessibilityManager;
@@ -105,6 +108,9 @@
private boolean mShowA11yStream;
private boolean mShowVolumeDialog;
private boolean mShowSafetyWarning;
+ private DeviceCallback mDeviceCallback = new DeviceCallback();
+ private AudioDeviceInfo mConnectedDevice;
+ private final NotificationManager mNotificationManager;
private boolean mDestroyed;
private VolumePolicy mVolumePolicy;
@@ -116,6 +122,8 @@
public VolumeDialogControllerImpl(Context context) {
mContext = context.getApplicationContext();
+ mNotificationManager = (NotificationManager) mContext.getSystemService(
+ Context.NOTIFICATION_SERVICE);
Events.writeEvent(mContext, Events.EVENT_COLLECTION_STARTED);
mWorkerThread = new HandlerThread(VolumeDialogControllerImpl.class.getSimpleName());
mWorkerThread.start();
@@ -180,6 +188,7 @@
} catch (SecurityException e) {
Log.w(TAG, "No access to media sessions", e);
}
+ mAudio.registerAudioDeviceCallback(mDeviceCallback, mWorker);
}
public void setVolumePolicy(VolumePolicy policy) {
@@ -205,6 +214,7 @@
mMediaSessions.destroy();
mObserver.destroy();
mReceiver.destroy();
+ mAudio.unregisterAudioDeviceCallback(mDeviceCallback);
mWorkerThread.quitSafely();
}
@@ -419,6 +429,7 @@
}
updateRingerModeExternalW(mAudio.getRingerMode());
updateZenModeW();
+ updateZenConfig();
updateEffectsSuppressorW(mNoMan.getEffectsSuppressor());
mCallbacks.onStateChanged(mState);
}
@@ -504,6 +515,26 @@
return true;
}
+ private boolean updateZenConfig() {
+ final NotificationManager.Policy policy = mNotificationManager.getNotificationPolicy();
+ boolean disallowAlarms = (policy.priorityCategories & NotificationManager.Policy
+ .PRIORITY_CATEGORY_ALARMS) == 0;
+ boolean disallowMedia = (policy.priorityCategories & NotificationManager.Policy
+ .PRIORITY_CATEGORY_MEDIA_SYSTEM_OTHER) == 0;
+ boolean disallowRinger = ZenModeConfig.areAllPriorityOnlyNotificationZenSoundsMuted(policy);
+ if (mState.disallowAlarms == disallowAlarms && mState.disallowMedia == disallowMedia
+ && mState.disallowRinger == disallowRinger) {
+ return false;
+ }
+ mState.disallowAlarms = disallowAlarms;
+ mState.disallowMedia = disallowMedia;
+ mState.disallowRinger = disallowRinger;
+ Events.writeEvent(mContext, Events.EVENT_ZEN_CONFIG_CHANGED, "disallowAlarms=" +
+ disallowAlarms + " disallowMedia=" + disallowMedia + " disallowRinger=" +
+ disallowRinger);
+ return true;
+ }
+
private boolean updateRingerModeExternalW(int rm) {
if (rm == mState.ringerModeExternal) return false;
mState.ringerModeExternal = rm;
@@ -664,6 +695,7 @@
case USER_ACTIVITY: onUserActivityW(); break;
case SHOW_SAFETY_WARNING: onShowSafetyWarningW(msg.arg1); break;
case ACCESSIBILITY_MODE_CHANGED: onAccessibilityModeChanged((Boolean) msg.obj);
+
}
}
}
@@ -803,6 +835,18 @@
});
}
}
+
+ @Override
+ public void onConnectedDeviceChanged(String deviceName) {
+ for (final Map.Entry<Callbacks, Handler> entry : mCallbackMap.entrySet()) {
+ entry.getValue().post(new Runnable() {
+ @Override
+ public void run() {
+ entry.getKey().onConnectedDeviceChanged(deviceName);
+ }
+ });
+ }
+ }
}
@@ -831,6 +875,10 @@
if (ZEN_MODE_URI.equals(uri)) {
changed = updateZenModeW();
}
+ if (ZEN_MODE_CONFIG_URI.equals(uri)) {
+ changed |= updateZenConfig();
+ }
+
if (changed) {
mCallbacks.onStateChanged(mState);
}
@@ -1005,6 +1053,34 @@
}
}
+ protected final class DeviceCallback extends AudioDeviceCallback {
+ public void onAudioDevicesAdded(AudioDeviceInfo[] addedDevices) {
+ for (AudioDeviceInfo info : addedDevices) {
+ if (info.isSink()
+ && (info.getType() == AudioDeviceInfo.TYPE_BLUETOOTH_A2DP
+ || info.getType() == AudioDeviceInfo.TYPE_BLUETOOTH_SCO)) {
+ mConnectedDevice = info;
+ mCallbacks.onConnectedDeviceChanged(info.getProductName().toString());
+ }
+ }
+ }
+
+ public void onAudioDevicesRemoved(AudioDeviceInfo[] removedDevices) {
+ if (mConnectedDevice == null) {
+ mCallbacks.onConnectedDeviceChanged(null);
+ return;
+ }
+ for (AudioDeviceInfo info : removedDevices) {
+ if (info.isSink() == mConnectedDevice.isSink()
+ && Objects.equals(info.getProductName(), mConnectedDevice.getProductName())
+ && info.getType() == mConnectedDevice.getType()) {
+ mConnectedDevice = null;
+ mCallbacks.onConnectedDeviceChanged(null);
+ }
+ }
+ }
+ }
+
public interface UserActivityListener {
void onUserActivity();
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
index 385438c..8cfdeeb 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
@@ -48,6 +48,7 @@
import android.provider.Settings;
import android.provider.Settings.Global;
import android.support.v7.media.MediaRouter;
+import android.text.TextUtils;
import android.util.Log;
import android.util.Slog;
import android.util.SparseBooleanArray;
@@ -73,6 +74,7 @@
import com.android.settingslib.Utils;
import com.android.systemui.Dependency;
import com.android.systemui.R;
+import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.VolumeDialog;
import com.android.systemui.plugins.VolumeDialogController;
import com.android.systemui.plugins.VolumeDialogController.State;
@@ -332,11 +334,15 @@
row.slider.setOnSeekBarChangeListener(new VolumeSeekBarChangeListener(row));
row.anim = null;
- ImageButton outputChooser = row.view.findViewById(R.id.output_chooser);
- outputChooser.setOnClickListener(mClickOutputChooser);
+ row.outputChooser = row.view.findViewById(R.id.output_chooser);
+ row.outputChooser.setOnClickListener(mClickOutputChooser);
+ row.outputChooser.findViewById(R.id.output_chooser_button)
+ .setOnClickListener(mClickOutputChooser);
+ row.connectedDevice = row.view.findViewById(R.id.volume_row_connected_device);
// forward events above the slider into the slider
- row.view.setOnTouchListener(new OnTouchListener() {
+ row.view.findViewById(R.id.volume_row_slider_frame)
+ .setOnTouchListener(new OnTouchListener() {
private final Rect mSliderHitRect = new Rect();
private boolean mDragging;
@@ -422,7 +428,7 @@
Intent intent = new Intent(Settings.ACTION_SOUND_SETTINGS);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
dismissH(DISMISS_REASON_SETTINGS_CLICKED);
- mContext.startActivity(intent);
+ Dependency.get(ActivityStarter.class).startActivity(intent, true /* dismissShade */);
return true;
});
updateRingerH();
@@ -546,6 +552,13 @@
}
}
+ protected void updateConnectedDeviceH(String deviceName) {
+ for (final VolumeRow row : mRows) {
+ row.connectedDevice.setText(deviceName);
+ Util.setVisOrGone(row.connectedDevice, !TextUtils.isEmpty(deviceName));
+ }
+ }
+
protected void updateRingerH() {
if (mState != null) {
final StreamState ss = mState.states.get(AudioManager.STREAM_RING);
@@ -656,10 +669,14 @@
&& mState.ringerModeInternal == AudioManager.RINGER_MODE_VIBRATE;
final boolean isRingSilent = isRingStream
&& mState.ringerModeInternal == AudioManager.RINGER_MODE_SILENT;
+ final boolean isZenPriorityOnly = mState.zenMode == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
final boolean isZenAlarms = mState.zenMode == Global.ZEN_MODE_ALARMS;
final boolean isZenNone = mState.zenMode == Global.ZEN_MODE_NO_INTERRUPTIONS;
final boolean zenMuted = isZenAlarms ? (isRingStream || isSystemStream)
: isZenNone ? (isRingStream || isSystemStream || isAlarmStream || isMusicStream)
+ : isZenPriorityOnly ? ((isAlarmStream && mState.disallowAlarms) ||
+ (isMusicStream && mState.disallowMedia) ||
+ (isRingStream && mState.disallowRinger))
: false;
// update slider max
@@ -957,6 +974,11 @@
}
}
+
+ @Override
+ public void onConnectedDeviceChanged(String deviceName) {
+ updateConnectedDeviceH(deviceName);
+ }
};
private final class H extends Handler {
@@ -1155,5 +1177,7 @@
private ObjectAnimator anim; // slider progress animation for non-touch-related updates
private int animTargetProgress;
private int lastAudibleLevel = 1;
+ private View outputChooser;
+ private TextView connectedDevice;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeUiLayout.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeUiLayout.java
index 1c9cbc1..368194e 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeUiLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeUiLayout.java
@@ -25,6 +25,7 @@
import android.content.Context;
import android.content.res.Configuration;
import android.util.AttributeSet;
+import android.util.Slog;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
@@ -127,17 +128,26 @@
rotate(mChild, from, to, true);
ViewGroup rows = mChild.findViewById(R.id.volume_dialog_rows);
rotate(rows, from, to, true);
+ swapOrientation((LinearLayout) rows);
int rowCount = rows.getChildCount();
for (int i = 0; i < rowCount; i++) {
- View child = rows.getChildAt(i);
+ View row = rows.getChildAt(i);
if (to == ROTATION_SEASCAPE) {
- rotateSeekBars(to, 0);
+ rotateSeekBars(row, to, 180);
} else if (to == ROTATION_LANDSCAPE) {
- rotateSeekBars(to, 180);
+ rotateSeekBars(row, to, 0);
} else {
- rotateSeekBars(to, 270);
+ rotateSeekBars(row, to, 270);
}
- rotate(child, from, to, true);
+ rotate(row, from, to, true);
+ }
+ }
+
+ private void swapOrientation(LinearLayout layout) {
+ if(layout.getOrientation() == LinearLayout.HORIZONTAL) {
+ layout.setOrientation(LinearLayout.VERTICAL);
+ } else {
+ layout.setOrientation(LinearLayout.HORIZONTAL);
}
}
@@ -152,13 +162,13 @@
v.setLayoutParams(params);
}
- private void rotateSeekBars(int to, int rotation) {
- SeekBar seekbar = mChild.findViewById(R.id.volume_row_slider);
+ private void rotateSeekBars(View row, int to, int rotation) {
+ SeekBar seekbar = row.findViewById(R.id.volume_row_slider);
if (seekbar != null) {
seekbar.setRotation((float) rotation);
}
- View parent = mChild.findViewById(R.id.volume_row_slider_frame);
+ View parent = row.findViewById(R.id.volume_row_slider_frame);
swapDimens(parent);
ViewGroup.LayoutParams params = seekbar.getLayoutParams();
ViewGroup.LayoutParams parentParams = parent.getLayoutParams();
diff --git a/packages/SystemUI/src/com/android/systemui/volume/car/CarVolumeDialogController.java b/packages/SystemUI/src/com/android/systemui/volume/car/CarVolumeDialogController.java
deleted file mode 100644
index 474085c..0000000
--- a/packages/SystemUI/src/com/android/systemui/volume/car/CarVolumeDialogController.java
+++ /dev/null
@@ -1,138 +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.
- */
-
-package com.android.systemui.volume.car;
-
-import android.car.Car;
-import android.car.CarNotConnectedException;
-import android.car.media.CarAudioManager;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.ServiceConnection;
-import android.os.IBinder;
-import android.util.Log;
-
-import com.android.systemui.volume.VolumeDialogControllerImpl;
-
-/**
- * A volume dialog controller for the automotive use case.
- * TODO(hwwang): consider removing this class since it's coupled with stream_type and we are
- * moving to use AudioAttributes usage for volume control in a car.
- *
- * {@link android.car.media.CarAudioManager} is the source of truth to get the stream volumes.
- * And volume changes should be sent to the car's audio module instead of the android's audio mixer.
- */
-public class CarVolumeDialogController extends VolumeDialogControllerImpl {
- private static final String TAG = "CarVolumeDialogController";
-
- private final Car mCar;
- private CarAudioManager mCarAudioManager;
-
- private final ServiceConnection mConnection = new ServiceConnection() {
- @Override
- public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
- try {
- mCarAudioManager = (CarAudioManager) mCar.getCarManager(Car.AUDIO_SERVICE);
- setVolumeController();
- CarVolumeDialogController.this.getState();
- } catch (CarNotConnectedException e) {
- Log.e(TAG, "Car is not connected!", e);
- }
- }
-
- @Override
- public void onServiceDisconnected(ComponentName componentName) {
- Log.e(TAG, "Car service is disconnected");
- }
- };
-
- public CarVolumeDialogController(Context context) {
- super(context);
- mCar = Car.createCar(context, mConnection);
- mCar.connect();
- }
-
- @Override
- protected void setAudioManagerStreamVolume(int stream, int level, int flag) {
- if (mCarAudioManager == null) {
- Log.d(TAG, "Car audio manager is not initialized yet");
- return;
- }
- try {
- mCarAudioManager.setUsageVolume(stream, level, flag);
- } catch (CarNotConnectedException e) {
- Log.e(TAG, "Car is not connected", e);
- }
- }
-
- @Override
- protected int getAudioManagerStreamVolume(int stream) {
- if(mCarAudioManager == null) {
- Log.d(TAG, "Car audio manager is not initialized yet");
- return 0;
- }
-
- try {
- return mCarAudioManager.getUsageVolume(stream);
- } catch (CarNotConnectedException e) {
- Log.e(TAG, "Car is not connected", e);
- return 0;
- }
- }
-
- @Override
- protected int getAudioManagerStreamMaxVolume(int stream) {
- if(mCarAudioManager == null) {
- Log.d(TAG, "Car audio manager is not initialized yet");
- return 0;
- }
-
- try {
- return mCarAudioManager.getUsageMaxVolume(stream);
- } catch (CarNotConnectedException e) {
- Log.e(TAG, "Car is not connected", e);
- return 0;
- }
- }
-
- @Override
- protected int getAudioManagerStreamMinVolume(int stream) {
- if(mCarAudioManager == null) {
- Log.d(TAG, "Car audio manager is not initialized yet");
- return 0;
- }
-
- try {
- return mCarAudioManager.getUsageMinVolume(stream);
- } catch (CarNotConnectedException e) {
- Log.e(TAG, "Car is not connected", e);
- return 0;
- }
- }
-
- @Override
- public void setVolumeController() {
- if (mCarAudioManager == null) {
- Log.d(TAG, "Car audio manager is not initialized yet");
- return;
- }
- try {
- mCarAudioManager.setVolumeController(mVolumeController);
- } catch (CarNotConnectedException e) {
- Log.e(TAG, "Car is not connected", e);
- }
- }
-}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/TestableDependency.java b/packages/SystemUI/tests/src/com/android/systemui/TestableDependency.java
index 53a7994..5c83d99 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/TestableDependency.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/TestableDependency.java
@@ -18,9 +18,11 @@
import android.content.Context;
import android.util.ArrayMap;
+import android.util.ArraySet;
public class TestableDependency extends Dependency {
private final ArrayMap<Object, Object> mObjs = new ArrayMap<>();
+ private final ArraySet<Object> mInstantiatedObjects = new ArraySet<>();
public TestableDependency(Context context) {
mContext = context;
@@ -47,6 +49,11 @@
@Override
protected <T> T createDependency(Object key) {
if (mObjs.containsKey(key)) return (T) mObjs.get(key);
+ mInstantiatedObjects.add(key);
return super.createDependency(key);
}
+
+ public <T> boolean hasInstantiatedDependency(Class<T> key) {
+ return mObjs.containsKey(key) || mInstantiatedObjects.contains(key);
+ }
}
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 fdb7f8d..0a51e5a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java
@@ -40,6 +40,7 @@
import com.android.systemui.power.PowerUI.WarningsUI;
import com.android.systemui.statusbar.phone.StatusBar;
+import java.time.Duration;
import java.util.concurrent.TimeUnit;
import org.junit.Before;
import org.junit.Test;
@@ -53,18 +54,19 @@
private static final boolean UNPLUGGED = false;
private static final boolean POWER_SAVER_OFF = false;
private static final int ABOVE_WARNING_BUCKET = 1;
+ private static final long ONE_HOUR_MILLIS = Duration.ofHours(1).toMillis();
public static final int BELOW_WARNING_BUCKET = -1;
public static final long BELOW_HYBRID_THRESHOLD = TimeUnit.HOURS.toMillis(2);
public static final long ABOVE_HYBRID_THRESHOLD = TimeUnit.HOURS.toMillis(4);
private HardwarePropertiesManager mHardProps;
private WarningsUI mMockWarnings;
private PowerUI mPowerUI;
- private EnhancedEstimates mEnhacedEstimates;
+ private EnhancedEstimates mEnhancedEstimates;
@Before
public void setup() {
mMockWarnings = mDependency.injectMockDependency(WarningsUI.class);
- mEnhacedEstimates = mDependency.injectMockDependency(EnhancedEstimates.class);
+ mEnhancedEstimates = mDependency.injectMockDependency(EnhancedEstimates.class);
mHardProps = mock(HardwarePropertiesManager.class);
mContext.putComponent(StatusBar.class, mock(StatusBar.class));
@@ -142,8 +144,44 @@
}
@Test
+ public void testShouldShowLowBatteryWarning_showHybridOnly_overrideThresholdHigh_returnsNoShow() {
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold())
+ .thenReturn(Duration.ofHours(1).toMillis());
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
+ mPowerUI.start();
+
+ // unplugged device that would not show the non-hybrid notification but would show the
+ // hybrid but the threshold has been overriden to be too low
+ boolean shouldShow =
+ mPowerUI.shouldShowLowBatteryWarning(UNPLUGGED, UNPLUGGED, ABOVE_WARNING_BUCKET,
+ ABOVE_WARNING_BUCKET, Long.MAX_VALUE, BELOW_HYBRID_THRESHOLD,
+ POWER_SAVER_OFF, BatteryManager.BATTERY_HEALTH_GOOD);
+ assertFalse(shouldShow);
+ }
+
+ @Test
+ public void testShouldShowLowBatteryWarning_showHybridOnly_overrideThresholdHigh_returnsShow() {
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold())
+ .thenReturn(Duration.ofHours(5).toMillis());
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
+ mPowerUI.start();
+
+ // unplugged device that would not show the non-hybrid notification but would show the
+ // hybrid since the threshold has been overriden to be much higher
+ boolean shouldShow =
+ mPowerUI.shouldShowLowBatteryWarning(UNPLUGGED, UNPLUGGED, ABOVE_WARNING_BUCKET,
+ ABOVE_WARNING_BUCKET, Long.MAX_VALUE, ABOVE_HYBRID_THRESHOLD,
+ POWER_SAVER_OFF, BatteryManager.BATTERY_HEALTH_GOOD);
+ assertTrue(shouldShow);
+ }
+
+ @Test
public void testShouldShowLowBatteryWarning_showHybridOnly_returnsShow() {
- when(mEnhacedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
mPowerUI.start();
// unplugged device that would not show the non-hybrid notification but would show the
@@ -157,7 +195,9 @@
@Test
public void testShouldShowLowBatteryWarning_showHybrid_showStandard_returnsShow() {
- when(mEnhacedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
mPowerUI.start();
// unplugged device that would show the non-hybrid notification and the hybrid
@@ -170,7 +210,9 @@
@Test
public void testShouldShowLowBatteryWarning_showStandardOnly_returnsShow() {
- when(mEnhacedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
mPowerUI.start();
// unplugged device that would show the non-hybrid but not the hybrid
@@ -183,7 +225,9 @@
@Test
public void testShouldShowLowBatteryWarning_deviceHighBattery_returnsNoShow() {
- when(mEnhacedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
mPowerUI.start();
// unplugged device that would show the neither due to battery level being good
@@ -196,7 +240,9 @@
@Test
public void testShouldShowLowBatteryWarning_devicePlugged_returnsNoShow() {
- when(mEnhacedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
mPowerUI.start();
// plugged device that would show the neither due to being plugged
@@ -209,7 +255,9 @@
@Test
public void testShouldShowLowBatteryWarning_deviceBatteryStatusUnkown_returnsNoShow() {
- when(mEnhacedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
mPowerUI.start();
// Unknown battery status device that would show the neither due
@@ -222,7 +270,9 @@
@Test
public void testShouldShowLowBatteryWarning_batterySaverEnabled_returnsNoShow() {
- when(mEnhacedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
mPowerUI.start();
// BatterySaverEnabled device that would show the neither due to battery saver
@@ -236,7 +286,10 @@
@Test
public void testShouldDismissLowBatteryWarning_dismissWhenPowerSaverEnabled() {
mPowerUI.start();
- when(mEnhacedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ 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,
@@ -247,7 +300,9 @@
@Test
public void testShouldDismissLowBatteryWarning_dismissWhenPlugged() {
mPowerUI.start();
- when(mEnhacedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
// device that gets plugged in should dismiss
boolean shouldDismiss =
@@ -259,7 +314,10 @@
@Test
public void testShouldDismissLowBatteryWarning_dismissHybridSignal_showStandardSignal_shouldShow() {
mPowerUI.start();
- when(mEnhacedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
+
// would dismiss hybrid but not non-hybrid should not dismiss
boolean shouldDismiss =
mPowerUI.shouldDismissLowBatteryWarning(UNPLUGGED, BELOW_WARNING_BUCKET,
@@ -270,7 +328,9 @@
@Test
public void testShouldDismissLowBatteryWarning_showHybridSignal_dismissStandardSignal_shouldShow() {
mPowerUI.start();
- when(mEnhacedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
// would dismiss non-hybrid but not hybrid should not dismiss
boolean shouldDismiss =
@@ -282,7 +342,9 @@
@Test
public void testShouldDismissLowBatteryWarning_showBothSignal_shouldShow() {
mPowerUI.start();
- when(mEnhacedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
// should not dismiss when both would not dismiss
boolean shouldDismiss =
@@ -294,7 +356,9 @@
@Test
public void testShouldDismissLowBatteryWarning_dismissBothSignal_shouldDismiss() {
mPowerUI.start();
- when(mEnhacedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
//should dismiss if both would dismiss
boolean shouldDismiss =
@@ -306,7 +370,9 @@
@Test
public void testShouldDismissLowBatteryWarning_dismissStandardSignal_hybridDisabled_shouldDismiss() {
mPowerUI.start();
- when(mEnhacedEstimates.isHybridNotificationEnabled()).thenReturn(false);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(false);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
// would dismiss non-hybrid with hybrid disabled should dismiss
boolean shouldDismiss =
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NonPhoneDependencyTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NonPhoneDependencyTest.java
new file mode 100644
index 0000000..5f763a4
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NonPhoneDependencyTest.java
@@ -0,0 +1,99 @@
+/*
+ * 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.systemui.statusbar;
+
+import static org.junit.Assert.assertFalse;
+import static org.mockito.Mockito.when;
+
+import android.os.Handler;
+import android.os.Looper;
+import android.support.test.filters.SmallTest;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+
+import com.android.systemui.Dependency;
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.statusbar.phone.NotificationGroupManager;
+import com.android.systemui.statusbar.phone.StatusBarWindowManager;
+import com.android.systemui.statusbar.policy.HeadsUpManager;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+/**
+ * Verifies that particular sets of dependencies don't have dependencies on others. For example,
+ * code managing notifications shouldn't directly depend on StatusBar, since there are platforms
+ * which want to manage notifications, but don't use StatusBar.
+ */
+@SmallTest
+@RunWith(AndroidTestingRunner.class)
+@TestableLooper.RunWithLooper
+public class NonPhoneDependencyTest extends SysuiTestCase {
+ @Mock private NotificationPresenter mPresenter;
+ @Mock private NotificationListContainer mListContainer;
+ @Mock private NotificationEntryManager.Callback mEntryManagerCallback;
+ @Mock private HeadsUpManager mHeadsUpManager;
+ @Mock private RemoteInputController.Delegate mDelegate;
+ @Mock private NotificationInfo.CheckSaveListener mCheckSaveListener;
+ @Mock private NotificationGutsManager.OnSettingsClickListener mOnClickListener;
+ @Mock private NotificationRemoteInputManager.Callback mRemoteInputManagerCallback;
+
+ private Handler mHandler;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ mHandler = new Handler(Looper.getMainLooper());
+ when(mPresenter.getHandler()).thenReturn(mHandler);
+ }
+
+ @Test
+ public void testNotificationManagementCodeHasNoDependencyOnStatusBarWindowManager() {
+ NotificationEntryManager entryManager = Dependency.get(NotificationEntryManager.class);
+ NotificationGutsManager gutsManager = Dependency.get(NotificationGutsManager.class);
+ NotificationListener notificationListener = Dependency.get(NotificationListener.class);
+ NotificationLogger notificationLogger = Dependency.get(NotificationLogger.class);
+ NotificationMediaManager mediaManager = Dependency.get(NotificationMediaManager.class);
+ NotificationRemoteInputManager remoteInputManager =
+ Dependency.get(NotificationRemoteInputManager.class);
+ NotificationLockscreenUserManager lockscreenUserManager =
+ Dependency.get(NotificationLockscreenUserManager.class);
+ NotificationViewHierarchyManager viewHierarchyManager =
+ Dependency.get(NotificationViewHierarchyManager.class);
+
+ when(mPresenter.getNotificationLockscreenUserManager()).thenReturn(lockscreenUserManager);
+ when(mPresenter.getGroupManager()).thenReturn(
+ Dependency.get(NotificationGroupManager.class));
+
+ entryManager.setUpWithPresenter(mPresenter, mListContainer, mEntryManagerCallback,
+ mHeadsUpManager);
+ gutsManager.setUpWithPresenter(mPresenter, entryManager, mListContainer,
+ mCheckSaveListener, mOnClickListener);
+ notificationListener.setUpWithPresenter(mPresenter, entryManager);
+ notificationLogger.setUpWithEntryManager(entryManager, mListContainer);
+ mediaManager.setUpWithPresenter(mPresenter, entryManager);
+ remoteInputManager.setUpWithPresenter(mPresenter, entryManager, mRemoteInputManagerCallback,
+ mDelegate);
+ lockscreenUserManager.setUpWithPresenter(mPresenter, entryManager);
+ viewHierarchyManager.setUpWithPresenter(mPresenter, entryManager, mListContainer);
+
+ assertFalse(mDependency.hasInstantiatedDependency(StatusBarWindowManager.class));
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationInfoTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationInfoTest.java
index d77bf69..8e8b3e0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationInfoTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationInfoTest.java
@@ -281,6 +281,16 @@
}
@Test
+ public void testbindNotification_BlockingHelper() throws Exception {
+ mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+ TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null,
+ null, null, 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());
+ }
+
+ @Test
public void testbindNotification_UnblockableTextVisibleWhenAppUnblockable() throws Exception {
mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null,
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 99202f4..bdf9b1f 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
@@ -84,6 +84,7 @@
import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.NotificationViewHierarchyManager;
import com.android.systemui.statusbar.StatusBarState;
+import com.android.systemui.statusbar.notification.ActivityLaunchAnimator;
import com.android.systemui.statusbar.notification.VisualStabilityManager;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.statusbar.policy.HeadsUpManager;
@@ -188,7 +189,8 @@
mKeyguardIndicationController, mStackScroller, mHeadsUpManager,
mPowerManager, mNotificationPanelView, mBarService, mNotificationListener,
mNotificationLogger, mVisualStabilityManager, mViewHierarchyManager,
- mEntryManager, mScrimController, mFingerprintUnlockController);
+ mEntryManager, mScrimController, mFingerprintUnlockController,
+ mock(ActivityLaunchAnimator.class));
mStatusBar.mContext = mContext;
mStatusBar.mComponents = mContext.getComponents();
mEntryManager.setUpForTest(mStatusBar, mStackScroller, mStatusBar, mHeadsUpManager,
@@ -593,7 +595,8 @@
VisualStabilityManager visualStabilityManager,
NotificationViewHierarchyManager viewHierarchyManager,
TestableNotificationEntryManager entryManager, ScrimController scrimController,
- FingerprintUnlockController fingerprintUnlockController) {
+ FingerprintUnlockController fingerprintUnlockController,
+ ActivityLaunchAnimator launchAnimator) {
mStatusBarKeyguardViewManager = man;
mUnlockMethodCache = unlock;
mKeyguardIndicationController = key;
@@ -610,6 +613,7 @@
mEntryManager = entryManager;
mScrimController = scrimController;
mFingerprintUnlockController = fingerprintUnlockController;
+ mActivityLaunchAnimator = launchAnimator;
}
private WakefulnessLifecycle createAwakeWakefulnessLifecycle() {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BlockingQueueIntentReceiver.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BlockingQueueIntentReceiver.java
new file mode 100644
index 0000000..76a3c95
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BlockingQueueIntentReceiver.java
@@ -0,0 +1,37 @@
+/*
+ * 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.policy;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.TimeUnit;
+
+/** A simple receiver to wait for broadcast intents in tests. */
+public class BlockingQueueIntentReceiver extends BroadcastReceiver {
+ private final BlockingQueue<Intent> mQueue = new ArrayBlockingQueue<Intent>(1);
+
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ mQueue.add(intent);
+ }
+
+ public Intent waitForIntent() throws InterruptedException {
+ return mQueue.poll(10, TimeUnit.SECONDS);
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputViewTest.java
new file mode 100644
index 0000000..63920a4
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputViewTest.java
@@ -0,0 +1,91 @@
+/*
+ * 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.policy;
+
+import static junit.framework.Assert.assertEquals;
+
+import android.app.PendingIntent;
+import android.app.RemoteInput;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.ShortcutManager;
+import android.support.test.filters.SmallTest;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+import android.widget.EditText;
+import android.widget.ImageButton;
+
+import com.android.systemui.R;
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.statusbar.ExpandableNotificationRow;
+import com.android.systemui.statusbar.NotificationTestHelper;
+import com.android.systemui.statusbar.RemoteInputController;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@RunWith(AndroidTestingRunner.class)
+@TestableLooper.RunWithLooper
+@SmallTest
+public class RemoteInputViewTest extends SysuiTestCase {
+
+ private static final String TEST_RESULT_KEY = "test_result_key";
+ private static final String TEST_REPLY = "hello";
+ private static final String TEST_ACTION = "com.android.ACTION";
+
+ @Mock private RemoteInputController mController;
+ @Mock private ShortcutManager mShortcutManager;
+ private BlockingQueueIntentReceiver mReceiver;
+ private RemoteInputView mView;
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+
+ mReceiver = new BlockingQueueIntentReceiver();
+ mContext.registerReceiver(mReceiver, new IntentFilter(TEST_ACTION));
+
+ // Avoid SecurityException RemoteInputView#sendRemoteInput().
+ mContext.addMockSystemService(ShortcutManager.class, mShortcutManager);
+
+ ExpandableNotificationRow row = new NotificationTestHelper(mContext).createRow();
+ mView = RemoteInputView.inflate(mContext, null, row.getEntry(), mController);
+ }
+
+ @Test
+ public void testSendRemoteInput_intentContainsResultsAndSource() throws InterruptedException {
+ PendingIntent pendingIntent = PendingIntent.getBroadcast(mContext, 0,
+ new Intent(TEST_ACTION), 0);
+ RemoteInput input = new RemoteInput.Builder(TEST_RESULT_KEY).build();
+
+ mView.setPendingIntent(pendingIntent);
+ mView.setRemoteInput(new RemoteInput[]{input}, input);
+ mView.focus();
+
+ EditText editText = mView.findViewById(R.id.remote_input_text);
+ editText.setText(TEST_REPLY);
+ ImageButton sendButton = mView.findViewById(R.id.remote_input_send);
+ sendButton.performClick();
+
+ Intent resultIntent = mReceiver.waitForIntent();
+ assertEquals(TEST_REPLY,
+ RemoteInput.getResultsFromIntent(resultIntent).get(TEST_RESULT_KEY));
+ assertEquals(RemoteInput.SOURCE_FREE_FORM_INPUT,
+ RemoteInput.getResultsSource(resultIntent));
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SmartReplyViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SmartReplyViewTest.java
new file mode 100644
index 0000000..0c3637d
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SmartReplyViewTest.java
@@ -0,0 +1,69 @@
+/*
+ * 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.policy;
+
+import static junit.framework.Assert.assertEquals;
+
+import android.app.PendingIntent;
+import android.app.RemoteInput;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.support.test.filters.SmallTest;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+
+import com.android.systemui.SysuiTestCase;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidTestingRunner.class)
+@TestableLooper.RunWithLooper
+@SmallTest
+public class SmartReplyViewTest extends SysuiTestCase {
+
+ private static final String TEST_RESULT_KEY = "test_result_key";
+ private static final String TEST_ACTION = "com.android.ACTION";
+ private static final String[] TEST_CHOICES = new String[]{"Hello", "What's up?", "I'm here"};
+
+ private BlockingQueueIntentReceiver mReceiver;
+ private SmartReplyView mView;
+
+ @Before
+ public void setUp() {
+ mReceiver = new BlockingQueueIntentReceiver();
+ mContext.registerReceiver(mReceiver, new IntentFilter(TEST_ACTION));
+
+ mView = SmartReplyView.inflate(mContext, null);
+ }
+
+ @Test
+ public void testSendSmartReply_intentContainsResultsAndSource() throws InterruptedException {
+ PendingIntent pendingIntent = PendingIntent.getBroadcast(mContext, 0,
+ new Intent(TEST_ACTION), 0);
+ RemoteInput input = new RemoteInput.Builder(TEST_RESULT_KEY).setChoices(
+ TEST_CHOICES).build();
+
+ mView.setRepliesFromRemoteInput(input, pendingIntent);
+
+ mView.getChildAt(2).performClick();
+
+ Intent resultIntent = mReceiver.waitForIntent();
+ assertEquals(TEST_CHOICES[2],
+ RemoteInput.getResultsFromIntent(resultIntent).get(TEST_RESULT_KEY));
+ assertEquals(RemoteInput.SOURCE_CHOICE, RemoteInput.getResultsSource(resultIntent));
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/volume/OutputChooserDialogTest.java b/packages/SystemUI/tests/src/com/android/systemui/volume/OutputChooserDialogTest.java
index 537d606..c18ed73 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/volume/OutputChooserDialogTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/volume/OutputChooserDialogTest.java
@@ -28,16 +28,18 @@
import android.bluetooth.BluetoothProfile;
import android.net.wifi.WifiManager;
-import android.support.test.annotation.UiThreadTest;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.support.v7.media.MediaRouter;
import android.telecom.TelecomManager;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
import android.widget.TextView;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
import com.android.systemui.R;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.plugins.VolumeDialogController;
import com.android.systemui.statusbar.policy.BluetoothController;
import org.junit.After;
@@ -48,12 +50,15 @@
import org.mockito.MockitoAnnotations;
@SmallTest
-@RunWith(AndroidJUnit4.class)
+@RunWith(AndroidTestingRunner.class)
+@TestableLooper.RunWithLooper
public class OutputChooserDialogTest extends SysuiTestCase {
OutputChooserDialog mDialog;
@Mock
+ private VolumeDialogController mVolumeController;
+ @Mock
private BluetoothController mController;
@Mock
private WifiManager mWifiManager;
@@ -65,10 +70,10 @@
@Before
- @UiThreadTest
public void setup() throws Exception {
MockitoAnnotations.initMocks(this);
+ mVolumeController = mDependency.injectMockDependency(VolumeDialogController.class);
mController = mDependency.injectMockDependency(BluetoothController.class);
when(mWifiManager.isWifiEnabled()).thenReturn(true);
@@ -79,19 +84,13 @@
}
@After
- @UiThreadTest
public void tearDown() throws Exception {
- mDialog.dismiss();
- }
-
- private void showDialog() {
- mDialog.show();
+ TestableLooper.get(this).processAllMessages();
}
@Test
- @UiThreadTest
public void testClickMediaRouterItemConnectsMedia() {
- showDialog();
+ mDialog.show();
OutputChooserLayout.Item item = new OutputChooserLayout.Item();
item.deviceType = OutputChooserLayout.Item.DEVICE_TYPE_MEDIA_ROUTER;
@@ -102,12 +101,12 @@
mDialog.onDetailItemClick(item);
verify(info, times(1)).select();
verify(mController, never()).connect(any());
+ mDialog.dismiss();
}
@Test
- @UiThreadTest
public void testClickBtItemConnectsBt() {
- showDialog();
+ mDialog.show();
OutputChooserLayout.Item item = new OutputChooserLayout.Item();
item.deviceType = OutputChooserLayout.Item.DEVICE_TYPE_BT;
@@ -117,29 +116,29 @@
mDialog.onDetailItemClick(item);
verify(mController, times(1)).connect(any());
+ mDialog.dismiss();
}
@Test
- @UiThreadTest
public void testTitleNotInCall() {
- showDialog();
+ mDialog.show();
assertTrue(((TextView) mDialog.findViewById(R.id.title))
.getText().toString().contains("Media"));
+ mDialog.dismiss();
}
@Test
- @UiThreadTest
public void testTitleInCall() {
mDialog.setIsInCall(true);
- showDialog();
+ mDialog.show();
assertTrue(((TextView) mDialog.findViewById(R.id.title))
.getText().toString().contains("Phone"));
+ mDialog.dismiss();
}
@Test
- @UiThreadTest
public void testNoMediaScanIfInCall() {
mDialog.setIsInCall(true);
mDialog.onAttachedToWindow();
@@ -148,11 +147,30 @@
}
@Test
- @UiThreadTest
public void testMediaScanIfNotInCall() {
mDialog.setIsInCall(false);
mDialog.onAttachedToWindow();
verify(mRouter, times(1)).addCallback(any(), any(), anyInt());
}
+
+ @Test
+ public void testRegisterCallbacks() {
+ mDialog.setIsInCall(false);
+ mDialog.onAttachedToWindow();
+
+ verify(mRouter, times(1)).addCallback(any(), any(), anyInt());
+ verify(mController, times(1)).addCallback(any());
+ verify(mVolumeController, times(1)).addCallback(any(), any());
+ }
+
+ @Test
+ public void testUnregisterCallbacks() {
+ mDialog.setIsInCall(false);
+ mDialog.onDetachedFromWindow();
+
+ verify(mRouter, times(1)).removeCallback(any());
+ verify(mController, times(1)).removeCallback(any());
+ verify(mVolumeController, times(1)).removeCallback(any());
+ }
}
diff --git a/packages/WAPPushManager/src/com/android/smspush/WapPushManager.java b/packages/WAPPushManager/src/com/android/smspush/WapPushManager.java
old mode 100644
new mode 100755
index e970367..dc2707b
--- a/packages/WAPPushManager/src/com/android/smspush/WapPushManager.java
+++ b/packages/WAPPushManager/src/com/android/smspush/WapPushManager.java
@@ -22,11 +22,15 @@
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
+import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
import android.database.Cursor;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteDatabase;
+import android.os.Build;
import android.os.IBinder;
+import android.os.PowerManager;
import android.os.RemoteException;
import android.util.Log;
@@ -216,7 +220,27 @@
intent.setClassName(mContext, lastapp.className);
intent.setComponent(new ComponentName(lastapp.packageName,
lastapp.className));
- if (mContext.startService(intent) == null) {
+ PackageManager pm = mContext.getPackageManager();
+ PowerManager powerManager =
+ (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
+ try {
+ ApplicationInfo appInfo = pm.getApplicationInfo(lastapp.packageName, 0);
+ if (appInfo.targetSdkVersion < Build.VERSION_CODES.O ||
+ powerManager.isIgnoringBatteryOptimizations(lastapp.packageName)) {
+ if (mContext.startService(intent) == null) {
+ Log.w(LOG_TAG, "invalid name " +
+ lastapp.packageName + "/" + lastapp.className);
+ return WapPushManagerParams.INVALID_RECEIVER_NAME;
+ }
+ } else {
+ if (mContext.startForegroundService(intent) == null) {
+ Log.w(LOG_TAG, "invalid name " +
+ lastapp.packageName + "/" + lastapp.className);
+ return WapPushManagerParams.INVALID_RECEIVER_NAME;
+ }
+ }
+
+ } catch (NameNotFoundException e) {
Log.w(LOG_TAG, "invalid name " +
lastapp.packageName + "/" + lastapp.className);
return WapPushManagerParams.INVALID_RECEIVER_NAME;
diff --git a/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/config.xml b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/config.xml
index 43bde88..a584a7f 100644
--- a/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/config.xml
+++ b/packages/overlays/DisplayCutoutEmulationNarrowOverlay/res/values/config.xml
@@ -47,6 +47,10 @@
<!-- Height of the status bar -->
<dimen name="status_bar_height">48dp</dimen>
+ <!-- Height of area above QQS where battery/time go (equal to status bar height if > 48dp) -->
+ <dimen name="quick_qs_offset_height">48dp</dimen>
+ <!-- Total height of QQS (quick_qs_offset_height + 128) -->
+ <dimen name="quick_qs_total_height">176dp</dimen>
</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/config.xml b/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/config.xml
index 9cf48d9..915e164 100644
--- a/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/config.xml
+++ b/packages/overlays/DisplayCutoutEmulationTallOverlay/res/values/config.xml
@@ -47,6 +47,10 @@
<!-- Height of the status bar -->
<dimen name="status_bar_height">48dp</dimen>
+ <!-- Height of area above QQS where battery/time go (equal to status bar height if > 48dp) -->
+ <dimen name="quick_qs_offset_height">48dp</dimen>
+ <!-- Total height of QQS (quick_qs_offset_height + 128) -->
+ <dimen name="quick_qs_total_height">176dp</dimen>
</resources>
diff --git a/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/config.xml b/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/config.xml
index 1ce41f0..b8e29da 100644
--- a/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/config.xml
+++ b/packages/overlays/DisplayCutoutEmulationWideOverlay/res/values/config.xml
@@ -47,6 +47,10 @@
<!-- Height of the status bar -->
<dimen name="status_bar_height">48dp</dimen>
+ <!-- Height of area above QQS where battery/time go (equal to status bar height if > 48dp) -->
+ <dimen name="quick_qs_offset_height">48dp</dimen>
+ <!-- Total height of QQS (quick_qs_offset_height + 128) -->
+ <dimen name="quick_qs_total_height">176dp</dimen>
</resources>
diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto
index 4144bbd..03dfd46 100644
--- a/proto/src/metrics_constants.proto
+++ b/proto/src/metrics_constants.proto
@@ -4685,7 +4685,8 @@
// OS: O MR
AUTOFILL_SERVICE_DISABLED_SELF = 1135;
- // Counter showing how long it took (in ms) to show the autofill UI after a field was focused
+ // Reports how long it took to show the autofill UI after a field was focused
+ // Tag FIELD_AUTOFILL_DURATION: Duration in ms
// Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
// Package: Package of the autofill service
// OS: O MR
@@ -4724,6 +4725,9 @@
// logged when we cancel an app transition.
APP_TRANSITION_CANCELLED = 1144;
+ // Tag of a field representing a duration on autofill-related metrics.
+ FIELD_AUTOFILL_DURATION = 1145;
+
// ---- End O-MR1 Constants, all O-MR1 constants go above this line ----
// OPEN: Settings > Network & Internet > Mobile network
@@ -4868,17 +4872,17 @@
// An autofill service asked to disable autofill for a given application.
// Package: Package of app that is being disabled for autofill
- // Counter: duration (in ms) that autofill will be disabled
// OS: P
// Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
+ // Tag FIELD_AUTOFILL_DURATION: duration (in ms) that autofill will be disabled
AUTOFILL_SERVICE_DISABLED_APP = 1231;
// An autofill service asked to disable autofill for a given activity.
// Package: Package of app whose activity is being disabled for autofill
- // Counter: duration (in ms) that autofill will be disabled
// OS: P
// Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
// Tag FIELD_CLASS_NAME: Class name of the activity that is being disabled for autofill
+ // Tag FIELD_AUTOFILL_DURATION: duration (in ms) that autofill will be disabled
AUTOFILL_SERVICE_DISABLED_ACTIVITY = 1232;
// ACTION: Stop an app and turn on background check
@@ -5154,6 +5158,16 @@
// OS: P
NOTIFICATION_ZEN_MODE_ENABLE_DIALOG = 1286;
+ // ACTION: Rotate suggestion accepted in rotation locked mode
+ // CATEGORY: GLOBAL_SYSTEM_UI
+ // OS: P
+ ACTION_ROTATION_SUGGESTION_ACCEPTED = 1287;
+
+ // OPEN: Rotation suggestion shown in rotation locked mode
+ // CATEGORY: GLOBAL_SYSTEM_UI
+ // OS: P
+ ROTATION_SUGGESTION_SHOWN = 1288;
+
// ---- End P Constants, all P constants go above this line ----
// Add new aosp constants above this line.
// END OF AOSP CONSTANTS
diff --git a/proto/src/system_messages.proto b/proto/src/system_messages.proto
index 7c6019e..db70184 100644
--- a/proto/src/system_messages.proto
+++ b/proto/src/system_messages.proto
@@ -196,6 +196,10 @@
// Inform the user that unexpectedly rapid network usage is happening
NOTE_NET_RAPID = 45;
+ // Notify the user that carrier Wi-Fi networks are available.
+ // Package: android
+ NOTE_CARRIER_NETWORK_AVAILABLE = 46;
+
// ADD_NEW_IDS_ABOVE_THIS_LINE
// Legacy IDs with arbitrary values appear below
// Legacy IDs existed as stable non-conflicting constants prior to the O release
diff --git a/services/accessibility/java/com/android/server/accessibility/MagnificationGestureHandler.java b/services/accessibility/java/com/android/server/accessibility/MagnificationGestureHandler.java
index 0bc95f4..52ab85c 100644
--- a/services/accessibility/java/com/android/server/accessibility/MagnificationGestureHandler.java
+++ b/services/accessibility/java/com/android/server/accessibility/MagnificationGestureHandler.java
@@ -54,6 +54,9 @@
import com.android.internal.annotations.VisibleForTesting;
+import java.util.ArrayDeque;
+import java.util.Queue;
+
/**
* This class handles magnification in response to touch events.
*
@@ -110,6 +113,7 @@
private static final boolean DEBUG_STATE_TRANSITIONS = false || DEBUG_ALL;
private static final boolean DEBUG_DETECTING = false || DEBUG_ALL;
private static final boolean DEBUG_PANNING_SCALING = false || DEBUG_ALL;
+ private static final boolean DEBUG_EVENT_STREAM = false || DEBUG_ALL;
private static final float MIN_SCALE = 2.0f;
private static final float MAX_SCALE = 5.0f;
@@ -141,6 +145,9 @@
private PointerCoords[] mTempPointerCoords;
private PointerProperties[] mTempPointerProperties;
+ private final Queue<MotionEvent> mDebugInputEventHistory;
+ private final Queue<MotionEvent> mDebugOutputEventHistory;
+
/**
* @param context Context for resolving various magnification-related resources
* @param magnificationController the {@link MagnificationController}
@@ -179,11 +186,28 @@
mScreenStateReceiver = null;
}
+ mDebugInputEventHistory = DEBUG_EVENT_STREAM ? new ArrayDeque<>() : null;
+ mDebugOutputEventHistory = DEBUG_EVENT_STREAM ? new ArrayDeque<>() : null;
+
transitionTo(mDetectingState);
}
@Override
public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) {
+ if (DEBUG_EVENT_STREAM) {
+ storeEventInto(mDebugInputEventHistory, event);
+ try {
+ onMotionEventInternal(event, rawEvent, policyFlags);
+ } catch (Exception e) {
+ throw new RuntimeException(
+ "Exception following input events: " + mDebugInputEventHistory, e);
+ }
+ } else {
+ onMotionEventInternal(event, rawEvent, policyFlags);
+ }
+ }
+
+ private void onMotionEventInternal(MotionEvent event, MotionEvent rawEvent, int policyFlags) {
if (DEBUG_ALL) Slog.i(LOG_TAG, "onMotionEvent(" + event + ")");
if ((!mDetectTripleTap && !mDetectShortcutTrigger)
@@ -273,7 +297,27 @@
coords, 0, 0, 1.0f, 1.0f, event.getDeviceId(), 0, event.getSource(),
event.getFlags());
}
- super.onMotionEvent(event, rawEvent, policyFlags);
+ if (DEBUG_EVENT_STREAM) {
+ storeEventInto(mDebugOutputEventHistory, event);
+ try {
+ super.onMotionEvent(event, rawEvent, policyFlags);
+ } catch (Exception e) {
+ throw new RuntimeException(
+ "Exception downstream following input events: " + mDebugInputEventHistory
+ + "\nTransformed into output events: " + mDebugOutputEventHistory,
+ e);
+ }
+ } else {
+ super.onMotionEvent(event, rawEvent, policyFlags);
+ }
+ }
+
+ private static void storeEventInto(Queue<MotionEvent> queue, MotionEvent event) {
+ queue.add(MotionEvent.obtain(event));
+ // Prune old events
+ while (!queue.isEmpty() && (event.getEventTime() - queue.peek().getEventTime() > 5000)) {
+ queue.remove().recycle();
+ }
}
private PointerCoords[] getTempPointerCoordsWithMinSize(int size) {
@@ -544,6 +588,9 @@
@Override
public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) {
+
+ // Ensure that the state at the end of delegation is consistent with the last delegated
+ // UP/DOWN event in queue: still delegating if pointer is down, detecting otherwise
switch (event.getActionMasked()) {
case ACTION_UP:
case ACTION_CANCEL: {
@@ -551,9 +598,11 @@
} break;
case ACTION_DOWN: {
+ transitionTo(mDelegatingState);
mLastDelegatedDownEventTime = event.getDownTime();
} break;
}
+
if (getNext() != null) {
// We cache some events to see if the user wants to trigger magnification.
// If no magnification is triggered we inject these events with adjusted
diff --git a/services/art-profile b/services/art-profile
index 301918f..d2cde02 100644
--- a/services/art-profile
+++ b/services/art-profile
@@ -2134,15 +2134,15 @@
HPLcom/android/server/autofill/ui/AutoFillUI$AutoFillUiCallback;->requestShowFillUi(Landroid/view/autofill/AutofillId;IILandroid/view/autofill/IAutofillWindowPresenter;)V
HPLcom/android/server/autofill/ui/AutoFillUI$AutoFillUiCallback;->save()V
HPLcom/android/server/autofill/ui/AutoFillUI$AutoFillUiCallback;->startIntentSender(Landroid/content/IntentSender;)V
-HPLcom/android/server/backup/RefactoredBackupManagerService;->addPackageParticipantsLockedInner(Ljava/lang/String;Ljava/util/List;)V
-HPLcom/android/server/backup/RefactoredBackupManagerService;->allAgentPackages()Ljava/util/List;
-HPLcom/android/server/backup/RefactoredBackupManagerService;->dataChanged(Ljava/lang/String;)V
-HPLcom/android/server/backup/RefactoredBackupManagerService;->dataChangedImpl(Ljava/lang/String;)V
-HPLcom/android/server/backup/RefactoredBackupManagerService;->dataChangedImpl(Ljava/lang/String;Ljava/util/HashSet;)V
-HPLcom/android/server/backup/RefactoredBackupManagerService;->dataChangedTargets(Ljava/lang/String;)Ljava/util/HashSet;
-HPLcom/android/server/backup/RefactoredBackupManagerService;->dequeueFullBackupLocked(Ljava/lang/String;)V
-HPLcom/android/server/backup/RefactoredBackupManagerService;->readFullBackupSchedule()Ljava/util/ArrayList;
-HPLcom/android/server/backup/RefactoredBackupManagerService;->writeToJournalLocked(Ljava/lang/String;)V
+HPLcom/android/server/backup/BackupManagerService;->addPackageParticipantsLockedInner(Ljava/lang/String;Ljava/util/List;)V
+HPLcom/android/server/backup/BackupManagerService;->allAgentPackages()Ljava/util/List;
+HPLcom/android/server/backup/BackupManagerService;->dataChanged(Ljava/lang/String;)V
+HPLcom/android/server/backup/BackupManagerService;->dataChangedImpl(Ljava/lang/String;)V
+HPLcom/android/server/backup/BackupManagerService;->dataChangedImpl(Ljava/lang/String;Ljava/util/HashSet;)V
+HPLcom/android/server/backup/BackupManagerService;->dataChangedTargets(Ljava/lang/String;)Ljava/util/HashSet;
+HPLcom/android/server/backup/BackupManagerService;->dequeueFullBackupLocked(Ljava/lang/String;)V
+HPLcom/android/server/backup/BackupManagerService;->readFullBackupSchedule()Ljava/util/ArrayList;
+HPLcom/android/server/backup/BackupManagerService;->writeToJournalLocked(Ljava/lang/String;)V
HPLcom/android/server/backup/BackupManagerServiceInterface;->acknowledgeAdbBackupOrRestore(IZLjava/lang/String;Ljava/lang/String;Landroid/app/backup/IFullBackupRestoreObserver;)V
HPLcom/android/server/backup/BackupManagerServiceInterface;->adbBackup(Landroid/os/ParcelFileDescriptor;ZZZZZZZZ[Ljava/lang/String;)V
HPLcom/android/server/backup/BackupManagerServiceInterface;->adbRestore(Landroid/os/ParcelFileDescriptor;)V
@@ -9358,37 +9358,37 @@
PLcom/android/server/autofill/ui/AutoFillUI;->lambda$-com_android_server_autofill_ui_AutoFillUI_4826(Lcom/android/server/autofill/ui/AutoFillUI$AutoFillUiCallback;Ljava/lang/String;)V
PLcom/android/server/autofill/ui/AutoFillUI;->setCallback(Lcom/android/server/autofill/ui/AutoFillUI$AutoFillUiCallback;)V
PLcom/android/server/autofill/ui/OverlayControl;-><init>(Landroid/content/Context;)V
-PLcom/android/server/backup/RefactoredBackupManagerService$Lifecycle;-><init>(Landroid/content/Context;)V
-PLcom/android/server/backup/RefactoredBackupManagerService$Lifecycle;->onStart()V
-PLcom/android/server/backup/RefactoredBackupManagerService$Lifecycle;->onUnlockUser(I)V
-PLcom/android/server/backup/RefactoredBackupManagerService;-><init>(Landroid/content/Context;Lcom/android/server/backup/Trampoline;)V
-PLcom/android/server/backup/RefactoredBackupManagerService;->addPackageParticipantsLocked([Ljava/lang/String;)V
-PLcom/android/server/backup/RefactoredBackupManagerService;->backupSettingMigrated(I)Z
-PLcom/android/server/backup/RefactoredBackupManagerService;->enqueueFullBackup(Ljava/lang/String;J)V
-PLcom/android/server/backup/RefactoredBackupManagerService;->getCurrentTransport()Ljava/lang/String;
-PLcom/android/server/backup/RefactoredBackupManagerService;->initPackageTracking()V
-PLcom/android/server/backup/RefactoredBackupManagerService;->isBackupEnabled()Z
-PLcom/android/server/backup/RefactoredBackupManagerService;->parseLeftoverJournals()V
-PLcom/android/server/backup/RefactoredBackupManagerService;->readBackupEnableState(I)Z
-PLcom/android/server/backup/RefactoredBackupManagerService;->removePackageFromSetLocked(Ljava/util/HashSet;Ljava/lang/String;)V
-PLcom/android/server/backup/RefactoredBackupManagerService;->removePackageParticipantsLocked([Ljava/lang/String;I)V
-PLcom/android/server/backup/RefactoredBackupManagerService;->scheduleNextFullBackupJob(J)V
-PLcom/android/server/backup/RefactoredBackupManagerService;->selectBackupTransportAsync(Landroid/content/ComponentName;Landroid/app/backup/ISelectBackupTransportCallback;)V
-PLcom/android/server/backup/RefactoredBackupManagerService;->setBackupEnabled(Z)V
-PLcom/android/server/backup/RefactoredBackupManagerService;->updateStateForTransport(Ljava/lang/String;)V
-PLcom/android/server/backup/RefactoredBackupManagerService;->writeBackupEnableState(ZI)V
-PLcom/android/server/backup/RefactoredBackupManagerService;->writeFullBackupScheduleAsync()V
+PLcom/android/server/backup/BackupManagerService$Lifecycle;-><init>(Landroid/content/Context;)V
+PLcom/android/server/backup/BackupManagerService$Lifecycle;->onStart()V
+PLcom/android/server/backup/BackupManagerService$Lifecycle;->onUnlockUser(I)V
+PLcom/android/server/backup/BackupManagerService;-><init>(Landroid/content/Context;Lcom/android/server/backup/Trampoline;)V
+PLcom/android/server/backup/BackupManagerService;->addPackageParticipantsLocked([Ljava/lang/String;)V
+PLcom/android/server/backup/BackupManagerService;->backupSettingMigrated(I)Z
+PLcom/android/server/backup/BackupManagerService;->enqueueFullBackup(Ljava/lang/String;J)V
+PLcom/android/server/backup/BackupManagerService;->getCurrentTransport()Ljava/lang/String;
+PLcom/android/server/backup/BackupManagerService;->initPackageTracking()V
+PLcom/android/server/backup/BackupManagerService;->isBackupEnabled()Z
+PLcom/android/server/backup/BackupManagerService;->parseLeftoverJournals()V
+PLcom/android/server/backup/BackupManagerService;->readBackupEnableState(I)Z
+PLcom/android/server/backup/BackupManagerService;->removePackageFromSetLocked(Ljava/util/HashSet;Ljava/lang/String;)V
+PLcom/android/server/backup/BackupManagerService;->removePackageParticipantsLocked([Ljava/lang/String;I)V
+PLcom/android/server/backup/BackupManagerService;->scheduleNextFullBackupJob(J)V
+PLcom/android/server/backup/BackupManagerService;->selectBackupTransportAsync(Landroid/content/ComponentName;Landroid/app/backup/ISelectBackupTransportCallback;)V
+PLcom/android/server/backup/BackupManagerService;->setBackupEnabled(Z)V
+PLcom/android/server/backup/BackupManagerService;->updateStateForTransport(Ljava/lang/String;)V
+PLcom/android/server/backup/BackupManagerService;->writeBackupEnableState(ZI)V
+PLcom/android/server/backup/BackupManagerService;->writeFullBackupScheduleAsync()V
PLcom/android/server/backup/FullBackupJob;->schedule(Landroid/content/Context;J)V
PLcom/android/server/backup/KeyValueBackupJob;->cancel(Landroid/content/Context;)V
PLcom/android/server/backup/Trampoline;-><init>(Landroid/content/Context;)V
-PLcom/android/server/backup/Trampoline;->createRefactoredBackupManagerService()Lcom/android/server/backup/BackupManagerServiceInterface;
+PLcom/android/server/backup/Trampoline;->createBackupManagerService()Lcom/android/server/backup/BackupManagerServiceInterface;
PLcom/android/server/backup/Trampoline;->createService()Lcom/android/server/backup/BackupManagerServiceInterface;
PLcom/android/server/backup/Trampoline;->getCurrentTransport()Ljava/lang/String;
PLcom/android/server/backup/Trampoline;->getSuppressFile()Ljava/io/File;
PLcom/android/server/backup/Trampoline;->initialize(I)V
PLcom/android/server/backup/Trampoline;->isBackupDisabled()Z
PLcom/android/server/backup/Trampoline;->isBackupEnabled()Z
-PLcom/android/server/backup/Trampoline;->isRefactoredServiceEnabled()Z
+PLcom/android/server/backup/Trampoline;->isServiceEnabled()Z
PLcom/android/server/backup/Trampoline;->selectBackupTransportAsync(Landroid/content/ComponentName;Landroid/app/backup/ISelectBackupTransportCallback;)V
PLcom/android/server/backup/Trampoline;->setBackupEnabled(Z)V
PLcom/android/server/backup/TransportManager$RebindOnTimeoutHandler;-><init>(Lcom/android/server/backup/TransportManager;Landroid/os/Looper;)V
@@ -9422,13 +9422,13 @@
PLcom/android/server/backup/TransportManager;->registerAllTransports()V
PLcom/android/server/backup/TransportManager;->selectTransport(Ljava/lang/String;)Ljava/lang/String;
PLcom/android/server/backup/TransportManager;->tryBindTransport(Landroid/content/ComponentName;)V
-PLcom/android/server/backup/internal/BackupHandler;-><init>(Lcom/android/server/backup/RefactoredBackupManagerService;Landroid/os/Looper;)V
+PLcom/android/server/backup/internal/BackupHandler;-><init>(Lcom/android/server/backup/BackupManagerService;Landroid/os/Looper;)V
PLcom/android/server/backup/fullbackup/FullBackupEntry;->compareTo(Lcom/android/server/backup/fullbackup/FullBackupEntry;)I
PLcom/android/server/backup/fullbackup/FullBackupEntry;->compareTo(Ljava/lang/Object;)I
PLcom/android/server/backup/internal/BackupHandler;->handleMessage(Landroid/os/Message;)V
-PLcom/android/server/backup/internal/ProvisionedObserver;-><init>(Lcom/android/server/backup/RefactoredBackupManagerService;Landroid/os/Handler;)V
-PLcom/android/server/backup/internal/RunBackupReceiver;-><init>(Lcom/android/server/backup/RefactoredBackupManagerService;)V
-PLcom/android/server/backup/internal/RunInitializeReceiver;-><init>(Lcom/android/server/backup/RefactoredBackupManagerService;)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/RunInitializeReceiver;-><init>(Lcom/android/server/backup/BackupManagerService;)V
PLcom/android/server/backup/utils/AppBackupUtils;->appGetsFullBackup(Landroid/content/pm/PackageInfo;)Z
PLcom/android/server/camera/CameraServiceProxy$1;-><init>(Lcom/android/server/camera/CameraServiceProxy;)V
PLcom/android/server/camera/CameraServiceProxy$2;-><init>(Lcom/android/server/camera/CameraServiceProxy;)V
diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
index 07b0b77..eb031f3 100644
--- a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
+++ b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
@@ -1066,7 +1066,7 @@
int intDuration = duration > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) duration;
mMetricsLogger.write(Helper.newLogMaker(MetricsEvent.AUTOFILL_SERVICE_DISABLED_APP,
packageName, getServicePackageName())
- .setCounterValue(intDuration));
+ .addTaggedData(MetricsEvent.FIELD_AUTOFILL_DURATION, intDuration));
}
}
@@ -1090,7 +1090,7 @@
mMetricsLogger.write(new LogMaker(MetricsEvent.AUTOFILL_SERVICE_DISABLED_ACTIVITY)
.setComponentName(componentName)
.addTaggedData(MetricsEvent.FIELD_AUTOFILL_SERVICE, getServicePackageName())
- .setCounterValue(intDuration));
+ .addTaggedData(MetricsEvent.FIELD_AUTOFILL_DURATION, intDuration));
}
}
diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java
index e1fb3a7..6b44fa5 100644
--- a/services/autofill/java/com/android/server/autofill/Session.java
+++ b/services/autofill/java/com/android/server/autofill/Session.java
@@ -1860,7 +1860,7 @@
mUiLatencyHistory.log(historyLog.toString());
final LogMaker metricsLog = newLogMaker(MetricsEvent.AUTOFILL_UI_LATENCY)
- .setCounterValue((int) duration);
+ .addTaggedData(MetricsEvent.FIELD_AUTOFILL_DURATION, duration);
mMetricsLogger.write(metricsLog);
}
}
diff --git a/services/backup/java/com/android/server/backup/BackupManagerConstants.java b/services/backup/java/com/android/server/backup/BackupManagerConstants.java
index 1a54e95..99160c2 100644
--- a/services/backup/java/com/android/server/backup/BackupManagerConstants.java
+++ b/services/backup/java/com/android/server/backup/BackupManagerConstants.java
@@ -18,8 +18,6 @@
import android.app.AlarmManager;
import android.content.ContentResolver;
-import android.content.Context;
-import android.content.res.Resources;
import android.database.ContentObserver;
import android.net.Uri;
import android.os.Handler;
@@ -133,7 +131,7 @@
// group the calls of these methods in a block syncrhonized on
// a reference of this object.
public synchronized long getKeyValueBackupIntervalMilliseconds() {
- if (RefactoredBackupManagerService.DEBUG_SCHEDULING) {
+ if (BackupManagerService.DEBUG_SCHEDULING) {
Slog.v(TAG, "getKeyValueBackupIntervalMilliseconds(...) returns "
+ mKeyValueBackupIntervalMilliseconds);
}
@@ -141,7 +139,7 @@
}
public synchronized long getKeyValueBackupFuzzMilliseconds() {
- if (RefactoredBackupManagerService.DEBUG_SCHEDULING) {
+ if (BackupManagerService.DEBUG_SCHEDULING) {
Slog.v(TAG, "getKeyValueBackupFuzzMilliseconds(...) returns "
+ mKeyValueBackupFuzzMilliseconds);
}
@@ -149,7 +147,7 @@
}
public synchronized boolean getKeyValueBackupRequireCharging() {
- if (RefactoredBackupManagerService.DEBUG_SCHEDULING) {
+ if (BackupManagerService.DEBUG_SCHEDULING) {
Slog.v(TAG, "getKeyValueBackupRequireCharging(...) returns "
+ mKeyValueBackupRequireCharging);
}
@@ -157,7 +155,7 @@
}
public synchronized int getKeyValueBackupRequiredNetworkType() {
- if (RefactoredBackupManagerService.DEBUG_SCHEDULING) {
+ if (BackupManagerService.DEBUG_SCHEDULING) {
Slog.v(TAG, "getKeyValueBackupRequiredNetworkType(...) returns "
+ mKeyValueBackupRequiredNetworkType);
}
@@ -165,7 +163,7 @@
}
public synchronized long getFullBackupIntervalMilliseconds() {
- if (RefactoredBackupManagerService.DEBUG_SCHEDULING) {
+ if (BackupManagerService.DEBUG_SCHEDULING) {
Slog.v(TAG, "getFullBackupIntervalMilliseconds(...) returns "
+ mFullBackupIntervalMilliseconds);
}
@@ -173,14 +171,14 @@
}
public synchronized boolean getFullBackupRequireCharging() {
- if (RefactoredBackupManagerService.DEBUG_SCHEDULING) {
+ if (BackupManagerService.DEBUG_SCHEDULING) {
Slog.v(TAG, "getFullBackupRequireCharging(...) returns " + mFullBackupRequireCharging);
}
return mFullBackupRequireCharging;
}
public synchronized int getFullBackupRequiredNetworkType() {
- if (RefactoredBackupManagerService.DEBUG_SCHEDULING) {
+ if (BackupManagerService.DEBUG_SCHEDULING) {
Slog.v(TAG, "getFullBackupRequiredNetworkType(...) returns "
+ mFullBackupRequiredNetworkType);
}
@@ -191,7 +189,7 @@
* Returns an array of package names that should be notified whenever a backup finishes.
*/
public synchronized String[] getBackupFinishedNotificationReceivers() {
- if (RefactoredBackupManagerService.DEBUG_SCHEDULING) {
+ if (BackupManagerService.DEBUG_SCHEDULING) {
Slog.v(TAG, "getBackupFinishedNotificationReceivers(...) returns "
+ TextUtils.join(", ", mBackupFinishedNotificationReceivers));
}
diff --git a/services/backup/java/com/android/server/backup/RefactoredBackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java
similarity index 99%
rename from services/backup/java/com/android/server/backup/RefactoredBackupManagerService.java
rename to services/backup/java/com/android/server/backup/BackupManagerService.java
index 465bb09..3b80f55 100644
--- a/services/backup/java/com/android/server/backup/RefactoredBackupManagerService.java
+++ b/services/backup/java/com/android/server/backup/BackupManagerService.java
@@ -38,7 +38,6 @@
import android.app.IActivityManager;
import android.app.IBackupAgent;
import android.app.PendingIntent;
-import android.app.admin.DevicePolicyManager;
import android.app.backup.BackupManager;
import android.app.backup.BackupManagerMonitor;
import android.app.backup.FullBackup;
@@ -65,6 +64,7 @@
import android.os.Binder;
import android.os.Bundle;
import android.os.Environment;
+import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Message;
@@ -157,7 +157,7 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
-public class RefactoredBackupManagerService implements BackupManagerServiceInterface {
+public class BackupManagerService implements BackupManagerServiceInterface {
public static final String TAG = "BackupManagerService";
public static final boolean DEBUG = true;
@@ -387,7 +387,7 @@
mWakelock = wakelock;
}
- public BackupHandler getBackupHandler() {
+ public Handler getBackupHandler() {
return mBackupHandler;
}
@@ -627,7 +627,7 @@
* A BackupRestore task gets notified of ack/timeout for the operation via
* BackupRestoreTask#handleCancel, BackupRestoreTask#operationComplete and notifyAll called
* on the mCurrentOpLock.
- * {@link RefactoredBackupManagerService#waitUntilOperationComplete(int)} is
+ * {@link BackupManagerService#waitUntilOperationComplete(int)} is
* used in various places to 'wait' for notifyAll and detect change of pending state of an
* operation. So typically, an operation will be removed from this array by:
* - BackupRestoreTask#handleCancel and
@@ -738,7 +738,7 @@
// ----- Main service implementation -----
- public static RefactoredBackupManagerService create(
+ public static BackupManagerService create(
Context context,
Trampoline parent,
HandlerThread backupThread) {
@@ -771,7 +771,7 @@
// This dir on /cache is managed directly in init.rc
File dataDir = new File(Environment.getDownloadCacheDirectory(), "backup_stage");
- return new RefactoredBackupManagerService(
+ return new BackupManagerService(
context,
parent,
backupThread,
@@ -781,7 +781,7 @@
}
@VisibleForTesting
- RefactoredBackupManagerService(
+ BackupManagerService(
Context context,
Trampoline parent,
HandlerThread backupThread,
@@ -2638,7 +2638,7 @@
confIntent.setClassName("com.android.backupconfirm",
"com.android.backupconfirm.BackupRestoreConfirmation");
confIntent.putExtra(FullBackup.CONF_TOKEN_INTENT_EXTRA, token);
- confIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ confIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
mContext.startActivityAsUser(confIntent, UserHandle.SYSTEM);
} catch (ActivityNotFoundException e) {
return false;
diff --git a/services/backup/java/com/android/server/backup/DataChangedJournal.java b/services/backup/java/com/android/server/backup/DataChangedJournal.java
index 9360c85..c2d3829 100644
--- a/services/backup/java/com/android/server/backup/DataChangedJournal.java
+++ b/services/backup/java/com/android/server/backup/DataChangedJournal.java
@@ -33,7 +33,7 @@
* <p>This information is persisted to the filesystem so that it is not lost in the event of a
* reboot.
*/
-public final class DataChangedJournal {
+public class DataChangedJournal {
private static final String FILE_NAME_PREFIX = "journal";
/**
diff --git a/services/backup/java/com/android/server/backup/FileMetadata.java b/services/backup/java/com/android/server/backup/FileMetadata.java
index 3d260cb..fe75041 100644
--- a/services/backup/java/com/android/server/backup/FileMetadata.java
+++ b/services/backup/java/com/android/server/backup/FileMetadata.java
@@ -16,7 +16,7 @@
package com.android.server.backup;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.app.backup.BackupAgent;
import android.util.Slog;
diff --git a/services/backup/java/com/android/server/backup/FullBackupJob.java b/services/backup/java/com/android/server/backup/FullBackupJob.java
index b81a54d..82638b4 100644
--- a/services/backup/java/com/android/server/backup/FullBackupJob.java
+++ b/services/backup/java/com/android/server/backup/FullBackupJob.java
@@ -61,7 +61,7 @@
@Override
public boolean onStartJob(JobParameters params) {
mParams = params;
- Trampoline service = RefactoredBackupManagerService.getInstance();
+ Trampoline service = BackupManagerService.getInstance();
return service.beginFullBackup(this);
}
@@ -69,7 +69,7 @@
public boolean onStopJob(JobParameters params) {
if (mParams != null) {
mParams = null;
- Trampoline service = RefactoredBackupManagerService.getInstance();
+ Trampoline service = BackupManagerService.getInstance();
service.endFullBackup();
}
return false;
diff --git a/services/backup/java/com/android/server/backup/KeyValueAdbBackupEngine.java b/services/backup/java/com/android/server/backup/KeyValueAdbBackupEngine.java
index b38b25a..4755877 100644
--- a/services/backup/java/com/android/server/backup/KeyValueAdbBackupEngine.java
+++ b/services/backup/java/com/android/server/backup/KeyValueAdbBackupEngine.java
@@ -4,8 +4,8 @@
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.RefactoredBackupManagerService.OP_TYPE_BACKUP_WAIT;
-import static com.android.server.backup.RefactoredBackupManagerService.TIMEOUT_BACKUP_INTERVAL;
+import static com.android.server.backup.BackupManagerService.OP_TYPE_BACKUP_WAIT;
+import static com.android.server.backup.BackupManagerService.TIMEOUT_BACKUP_INTERVAL;
import android.app.ApplicationThreadConstants;
import android.app.IBackupAgent;
@@ -80,7 +80,7 @@
mNewStateName = new File(mStateDir,
pkg + BACKUP_KEY_VALUE_NEW_STATE_FILENAME_SUFFIX);
- mManifestFile = new File(mDataDir, RefactoredBackupManagerService.BACKUP_MANIFEST_FILENAME);
+ mManifestFile = new File(mDataDir, BackupManagerService.BACKUP_MANIFEST_FILENAME);
}
public void backupOnePackage() throws IOException {
@@ -153,8 +153,9 @@
OP_TYPE_BACKUP_WAIT);
// Start backup and wait for BackupManagerService to get callback for success or timeout
- agent.doBackup(mSavedState, mBackupData, mNewState, Long.MAX_VALUE, token,
- mBackupManagerService.getBackupManagerBinder());
+ agent.doBackup(
+ mSavedState, mBackupData, mNewState, Long.MAX_VALUE, token,
+ mBackupManagerService.getBackupManagerBinder(), /*transportFlags=*/ 0);
if (!mBackupManagerService.waitUntilOperationComplete(token)) {
Slog.e(TAG, "Key-value backup failed on package " + packageName);
return false;
diff --git a/services/backup/java/com/android/server/backup/KeyValueBackupJob.java b/services/backup/java/com/android/server/backup/KeyValueBackupJob.java
index 5dfb0bc..d8411e2 100644
--- a/services/backup/java/com/android/server/backup/KeyValueBackupJob.java
+++ b/services/backup/java/com/android/server/backup/KeyValueBackupJob.java
@@ -71,7 +71,7 @@
if (delay <= 0) {
delay = interval + new Random().nextInt((int) fuzz);
}
- if (RefactoredBackupManagerService.DEBUG_SCHEDULING) {
+ if (BackupManagerService.DEBUG_SCHEDULING) {
Slog.v(TAG, "Scheduling k/v pass in " + (delay / 1000 / 60) + " minutes");
}
JobInfo.Builder builder = new JobInfo.Builder(JOB_ID, sKeyValueJobService)
@@ -110,7 +110,7 @@
}
// Time to run a key/value backup!
- Trampoline service = RefactoredBackupManagerService.getInstance();
+ Trampoline service = BackupManagerService.getInstance();
try {
service.backupNow();
} catch (RemoteException e) {}
diff --git a/services/backup/java/com/android/server/backup/ProcessedPackagesJournal.java b/services/backup/java/com/android/server/backup/ProcessedPackagesJournal.java
index e29b7d5..b5db5e2 100644
--- a/services/backup/java/com/android/server/backup/ProcessedPackagesJournal.java
+++ b/services/backup/java/com/android/server/backup/ProcessedPackagesJournal.java
@@ -19,7 +19,6 @@
import android.util.Slog;
import com.android.internal.annotations.GuardedBy;
-import com.android.server.backup.RefactoredBackupManagerService;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
@@ -47,7 +46,7 @@
final class ProcessedPackagesJournal {
private static final String TAG = "ProcessedPackagesJournal";
private static final String JOURNAL_FILE_NAME = "processed";
- private static final boolean DEBUG = RefactoredBackupManagerService.DEBUG || false;
+ private static final boolean DEBUG = BackupManagerService.DEBUG || false;
// using HashSet instead of ArraySet since we expect 100-500 elements range
@GuardedBy("mProcessedPackages")
diff --git a/services/backup/java/com/android/server/backup/Trampoline.java b/services/backup/java/com/android/server/backup/Trampoline.java
index 540f5a1..2abeaa6 100644
--- a/services/backup/java/com/android/server/backup/Trampoline.java
+++ b/services/backup/java/com/android/server/backup/Trampoline.java
@@ -100,8 +100,8 @@
BACKUP_SUPPRESS_FILENAME);
}
- protected BackupManagerServiceInterface createRefactoredBackupManagerService() {
- return RefactoredBackupManagerService.create(mContext, this, mHandlerThread);
+ protected BackupManagerServiceInterface createBackupManagerService() {
+ return BackupManagerService.create(mContext, this, mHandlerThread);
}
// internal control API
@@ -117,7 +117,7 @@
synchronized (this) {
if (!mSuppressFile.exists()) {
- mService = createRefactoredBackupManagerService();
+ mService = createBackupManagerService();
} else {
Slog.i(TAG, "Backup inactive in user " + whichUser);
}
@@ -162,7 +162,7 @@
Slog.i(TAG, "Making backup "
+ (makeActive ? "" : "in") + "active in user " + userHandle);
if (makeActive) {
- mService = createRefactoredBackupManagerService();
+ mService = createBackupManagerService();
mSuppressFile.delete();
} else {
mService = null;
diff --git a/services/backup/java/com/android/server/backup/fullbackup/FullBackupEngine.java b/services/backup/java/com/android/server/backup/fullbackup/FullBackupEngine.java
index 3bf77e8..0582aba 100644
--- a/services/backup/java/com/android/server/backup/fullbackup/FullBackupEngine.java
+++ b/services/backup/java/com/android/server/backup/fullbackup/FullBackupEngine.java
@@ -16,17 +16,17 @@
package com.android.server.backup.fullbackup;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_MANIFEST_FILENAME;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_METADATA_FILENAME;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_METADATA_VERSION;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_WIDGET_METADATA_TOKEN;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.OP_TYPE_BACKUP_WAIT;
-import static com.android.server.backup.RefactoredBackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
-import static com.android.server.backup.RefactoredBackupManagerService.TIMEOUT_FULL_BACKUP_INTERVAL;
-import static com.android.server.backup.RefactoredBackupManagerService
+import static com.android.server.backup.BackupManagerService.BACKUP_MANIFEST_FILENAME;
+import static com.android.server.backup.BackupManagerService.BACKUP_METADATA_FILENAME;
+import static com.android.server.backup.BackupManagerService.BACKUP_METADATA_VERSION;
+import static com.android.server.backup.BackupManagerService.BACKUP_WIDGET_METADATA_TOKEN;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.MORE_DEBUG;
+import static com.android.server.backup.BackupManagerService.OP_TYPE_BACKUP_WAIT;
+import static com.android.server.backup.BackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
+import static com.android.server.backup.BackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.TIMEOUT_FULL_BACKUP_INTERVAL;
+import static com.android.server.backup.BackupManagerService
.TIMEOUT_SHARED_BACKUP_INTERVAL;
import android.app.ApplicationThreadConstants;
@@ -46,7 +46,7 @@
import com.android.server.AppWidgetBackupBridge;
import com.android.server.backup.BackupRestoreTask;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.utils.FullBackupUtils;
import java.io.BufferedOutputStream;
@@ -62,7 +62,7 @@
*/
public class FullBackupEngine {
- private RefactoredBackupManagerService backupManagerService;
+ private BackupManagerService backupManagerService;
OutputStream mOutput;
FullBackupPreflight mPreflightHook;
BackupRestoreTask mTimeoutMonitor;
@@ -74,6 +74,7 @@
PackageInfo mPkg;
private final long mQuota;
private final int mOpToken;
+ private final int mTransportFlags;
class FullBackupRunner implements Runnable {
@@ -100,7 +101,8 @@
@Override
public void run() {
try {
- FullBackupDataOutput output = new FullBackupDataOutput(mPipe);
+ FullBackupDataOutput output = new FullBackupDataOutput(
+ mPipe, -1, mTransportFlags);
if (mWriteManifest) {
final boolean writeWidgetData = mWidgetData != null;
@@ -147,7 +149,7 @@
mTimeoutMonitor /* in parent class */,
OP_TYPE_BACKUP_WAIT);
mAgent.doFullBackup(mPipe, mQuota, mToken,
- backupManagerService.getBackupManagerBinder());
+ backupManagerService.getBackupManagerBinder(), mTransportFlags);
} catch (IOException e) {
Slog.e(TAG, "Error running full backup for " + mPackage.packageName);
} catch (RemoteException e) {
@@ -161,10 +163,11 @@
}
}
- public FullBackupEngine(RefactoredBackupManagerService backupManagerService,
+ public FullBackupEngine(BackupManagerService backupManagerService,
OutputStream output,
FullBackupPreflight preflightHook, PackageInfo pkg,
- boolean alsoApks, BackupRestoreTask timeoutMonitor, long quota, int opToken) {
+ boolean alsoApks, BackupRestoreTask timeoutMonitor, long quota, int opToken,
+ int transportFlags) {
this.backupManagerService = backupManagerService;
mOutput = output;
mPreflightHook = preflightHook;
@@ -176,6 +179,7 @@
mMetadataFile = new File(mFilesDir, BACKUP_METADATA_FILENAME);
mQuota = quota;
mOpToken = opToken;
+ mTransportFlags = transportFlags;
}
public int preflightCheck() throws RemoteException {
diff --git a/services/backup/java/com/android/server/backup/fullbackup/FullBackupObbConnection.java b/services/backup/java/com/android/server/backup/fullbackup/FullBackupObbConnection.java
index da8a66a..40b6967 100644
--- a/services/backup/java/com/android/server/backup/fullbackup/FullBackupObbConnection.java
+++ b/services/backup/java/com/android/server/backup/fullbackup/FullBackupObbConnection.java
@@ -16,10 +16,10 @@
package com.android.server.backup.fullbackup;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.OP_TYPE_BACKUP_WAIT;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
-import static com.android.server.backup.RefactoredBackupManagerService.TIMEOUT_FULL_BACKUP_INTERVAL;
+import static com.android.server.backup.BackupManagerService.MORE_DEBUG;
+import static com.android.server.backup.BackupManagerService.OP_TYPE_BACKUP_WAIT;
+import static com.android.server.backup.BackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.TIMEOUT_FULL_BACKUP_INTERVAL;
import android.app.backup.IBackupManager;
import android.content.ComponentName;
@@ -33,7 +33,7 @@
import android.util.Slog;
import com.android.internal.backup.IObbBackupService;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.utils.FullBackupUtils;
import java.io.IOException;
@@ -44,10 +44,10 @@
*/
public class FullBackupObbConnection implements ServiceConnection {
- private RefactoredBackupManagerService backupManagerService;
+ private BackupManagerService backupManagerService;
volatile IObbBackupService mService;
- public FullBackupObbConnection(RefactoredBackupManagerService backupManagerService) {
+ public FullBackupObbConnection(BackupManagerService backupManagerService) {
this.backupManagerService = backupManagerService;
mService = null;
}
diff --git a/services/backup/java/com/android/server/backup/fullbackup/FullBackupTask.java b/services/backup/java/com/android/server/backup/fullbackup/FullBackupTask.java
index 37961f9..8f6923b 100644
--- a/services/backup/java/com/android/server/backup/fullbackup/FullBackupTask.java
+++ b/services/backup/java/com/android/server/backup/fullbackup/FullBackupTask.java
@@ -16,7 +16,7 @@
package com.android.server.backup.fullbackup;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.app.backup.IFullBackupRestoreObserver;
import android.os.RemoteException;
diff --git a/services/backup/java/com/android/server/backup/fullbackup/PerformAdbBackupTask.java b/services/backup/java/com/android/server/backup/fullbackup/PerformAdbBackupTask.java
index f0b3e4a..2e2d3eb 100644
--- a/services/backup/java/com/android/server/backup/fullbackup/PerformAdbBackupTask.java
+++ b/services/backup/java/com/android/server/backup/fullbackup/PerformAdbBackupTask.java
@@ -17,12 +17,12 @@
package com.android.server.backup.fullbackup;
import static com.android.server.backup.BackupPasswordManager.PBKDF_CURRENT;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_FILE_HEADER_MAGIC;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_FILE_VERSION;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.BACKUP_FILE_HEADER_MAGIC;
+import static com.android.server.backup.BackupManagerService.BACKUP_FILE_VERSION;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.MORE_DEBUG;
+import static com.android.server.backup.BackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.app.backup.IFullBackupRestoreObserver;
import android.content.pm.ApplicationInfo;
@@ -37,7 +37,7 @@
import com.android.server.AppWidgetBackupBridge;
import com.android.server.backup.BackupRestoreTask;
import com.android.server.backup.KeyValueAdbBackupEngine;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.utils.AppBackupUtils;
import com.android.server.backup.utils.PasswordUtils;
@@ -66,7 +66,7 @@
*/
public class PerformAdbBackupTask extends FullBackupTask implements BackupRestoreTask {
- private RefactoredBackupManagerService backupManagerService;
+ private BackupManagerService backupManagerService;
FullBackupEngine mBackupEngine;
final AtomicBoolean mLatch;
@@ -86,7 +86,7 @@
String mEncryptPassword;
private final int mCurrentOpToken;
- public PerformAdbBackupTask(RefactoredBackupManagerService backupManagerService,
+ public PerformAdbBackupTask(BackupManagerService backupManagerService,
ParcelFileDescriptor fd, IFullBackupRestoreObserver observer,
boolean includeApks, boolean includeObbs, boolean includeShared, boolean doWidgets,
String curPassword, String encryptPassword, boolean doAllApps, boolean doSystem,
@@ -410,7 +410,8 @@
SHARED_BACKUP_AGENT_PACKAGE);
mBackupEngine = new FullBackupEngine(backupManagerService, out,
- null, pkg, mIncludeApks, this, Long.MAX_VALUE, mCurrentOpToken);
+ null, pkg, mIncludeApks, this, Long.MAX_VALUE,
+ mCurrentOpToken, /*transportFlags=*/ 0);
sendOnBackupPackage(isSharedStorage ? "Shared storage" : pkg.packageName);
// Don't need to check preflight result as there is no preflight hook.
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 d5b3d98..f9c36699 100644
--- a/services/backup/java/com/android/server/backup/fullbackup/PerformFullTransportBackupTask.java
+++ b/services/backup/java/com/android/server/backup/fullbackup/PerformFullTransportBackupTask.java
@@ -16,13 +16,13 @@
package com.android.server.backup.fullbackup;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG_SCHEDULING;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.OP_PENDING;
-import static com.android.server.backup.RefactoredBackupManagerService.OP_TYPE_BACKUP;
-import static com.android.server.backup.RefactoredBackupManagerService.OP_TYPE_BACKUP_WAIT;
-import static com.android.server.backup.RefactoredBackupManagerService.TIMEOUT_FULL_BACKUP_INTERVAL;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.DEBUG_SCHEDULING;
+import static com.android.server.backup.BackupManagerService.MORE_DEBUG;
+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.OP_TYPE_BACKUP_WAIT;
+import static com.android.server.backup.BackupManagerService.TIMEOUT_FULL_BACKUP_INTERVAL;
import android.annotation.Nullable;
import android.app.IBackupAgent;
@@ -46,7 +46,7 @@
import com.android.server.EventLogTags;
import com.android.server.backup.BackupRestoreTask;
import com.android.server.backup.FullBackupJob;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.TransportManager;
import com.android.server.backup.internal.OnTaskFinishedListener;
import com.android.server.backup.internal.Operation;
@@ -95,7 +95,7 @@
*/
public class PerformFullTransportBackupTask extends FullBackupTask implements BackupRestoreTask {
public static PerformFullTransportBackupTask newWithCurrentTransport(
- RefactoredBackupManagerService backupManagerService,
+ BackupManagerService backupManagerService,
IFullBackupRestoreObserver observer,
String[] whichPackages,
boolean updateSchedule,
@@ -126,7 +126,7 @@
private static final String TAG = "PFTBT";
- private RefactoredBackupManagerService backupManagerService;
+ private BackupManagerService backupManagerService;
private final Object mCancelLock = new Object();
ArrayList<PackageInfo> mPackages;
@@ -147,7 +147,7 @@
private volatile boolean mCancelAll;
private final int mCurrentOpToken;
- public PerformFullTransportBackupTask(RefactoredBackupManagerService backupManagerService,
+ public PerformFullTransportBackupTask(BackupManagerService backupManagerService,
TransportClient transportClient,
IFullBackupRestoreObserver observer,
String[] whichPackages, boolean updateSchedule,
@@ -378,7 +378,8 @@
enginePipes = ParcelFileDescriptor.createPipe();
mBackupRunner =
new SinglePackageBackupRunner(enginePipes[1], currentPackage,
- mTransportClient, quota, mBackupRunnerOpToken);
+ mTransportClient, quota, mBackupRunnerOpToken,
+ transport.getTransportFlags());
// The runner dup'd the pipe half, so we close it here
enginePipes[1].close();
enginePipes[1] = null;
@@ -681,12 +682,17 @@
final TransportClient mTransportClient;
final long mQuota;
private final int mCurrentOpToken;
+ private final int mTransportFlags;
SinglePackageBackupPreflight(
- TransportClient transportClient, long quota, int currentOpToken) {
+ TransportClient transportClient,
+ long quota,
+ int currentOpToken,
+ int transportFlags) {
mTransportClient = transportClient;
mQuota = quota;
mCurrentOpToken = currentOpToken;
+ mTransportFlags = transportFlags;
}
@Override
@@ -700,7 +706,7 @@
Slog.d(TAG, "Preflighting full payload of " + pkg.packageName);
}
agent.doMeasureFullBackup(mQuota, mCurrentOpToken,
- backupManagerService.getBackupManagerBinder());
+ backupManagerService.getBackupManagerBinder(), mTransportFlags);
// Now wait to get our result back. If this backstop timeout is reached without
// the latch being thrown, flow will continue as though a result or "normal"
@@ -785,20 +791,23 @@
private volatile int mBackupResult;
private final long mQuota;
private volatile boolean mIsCancelled;
+ private final int mTransportFlags;
SinglePackageBackupRunner(ParcelFileDescriptor output, PackageInfo target,
- TransportClient transportClient, long quota, int currentOpToken)
+ TransportClient transportClient, long quota, int currentOpToken, int transportFlags)
throws IOException {
mOutput = ParcelFileDescriptor.dup(output.getFileDescriptor());
mTarget = target;
mCurrentOpToken = currentOpToken;
mEphemeralToken = backupManagerService.generateRandomIntegerToken();
- mPreflight = new SinglePackageBackupPreflight(transportClient, quota, mEphemeralToken);
+ mPreflight = new SinglePackageBackupPreflight(
+ transportClient, quota, mEphemeralToken, transportFlags);
mPreflightLatch = new CountDownLatch(1);
mBackupLatch = new CountDownLatch(1);
mPreflightResult = BackupTransport.AGENT_ERROR;
mBackupResult = BackupTransport.AGENT_ERROR;
mQuota = quota;
+ mTransportFlags = transportFlags;
registerTask();
}
@@ -819,7 +828,7 @@
public void run() {
FileOutputStream out = new FileOutputStream(mOutput.getFileDescriptor());
mEngine = new FullBackupEngine(backupManagerService, out, mPreflight, mTarget, false,
- this, mQuota, mCurrentOpToken);
+ this, mQuota, mCurrentOpToken, mTransportFlags);
try {
try {
if (!mIsCancelled) {
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 f29a9c2..3df6e47 100644
--- a/services/backup/java/com/android/server/backup/internal/BackupHandler.java
+++ b/services/backup/java/com/android/server/backup/internal/BackupHandler.java
@@ -16,12 +16,11 @@
package com.android.server.backup.internal;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
-import static com.android.server.backup.RefactoredBackupManagerService.TIMEOUT_RESTORE_INTERVAL;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.MORE_DEBUG;
+import static com.android.server.backup.BackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.TIMEOUT_RESTORE_INTERVAL;
-import android.app.AlarmManager;
import android.app.backup.RestoreSet;
import android.content.Intent;
import android.os.Handler;
@@ -35,9 +34,9 @@
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.RefactoredBackupManagerService;
import com.android.server.backup.transport.TransportClient;
import com.android.server.backup.TransportManager;
import com.android.server.backup.fullbackup.PerformAdbBackupTask;
@@ -81,10 +80,9 @@
public static final int MSG_BACKUP_RESTORE_STEP = 20;
public static final int MSG_OP_COMPLETE = 21;
- private final RefactoredBackupManagerService backupManagerService;
+ private final BackupManagerService backupManagerService;
- public BackupHandler(
- RefactoredBackupManagerService backupManagerService, Looper looper) {
+ public BackupHandler(BackupManagerService backupManagerService, Looper looper) {
super(looper);
this.backupManagerService = backupManagerService;
}
diff --git a/services/backup/java/com/android/server/backup/internal/BackupState.java b/services/backup/java/com/android/server/backup/internal/BackupState.java
index 4d42c24..937b167 100644
--- a/services/backup/java/com/android/server/backup/internal/BackupState.java
+++ b/services/backup/java/com/android/server/backup/internal/BackupState.java
@@ -5,6 +5,7 @@
*/
enum BackupState {
INITIAL,
+ BACKUP_PM,
RUNNING_QUEUE,
FINAL
}
diff --git a/services/backup/java/com/android/server/backup/internal/ClearDataObserver.java b/services/backup/java/com/android/server/backup/internal/ClearDataObserver.java
index d82c865..b0b8037 100644
--- a/services/backup/java/com/android/server/backup/internal/ClearDataObserver.java
+++ b/services/backup/java/com/android/server/backup/internal/ClearDataObserver.java
@@ -18,13 +18,13 @@
import android.content.pm.IPackageDataObserver;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
public class ClearDataObserver extends IPackageDataObserver.Stub {
- private RefactoredBackupManagerService backupManagerService;
+ private BackupManagerService backupManagerService;
- public ClearDataObserver(RefactoredBackupManagerService backupManagerService) {
+ public ClearDataObserver(BackupManagerService backupManagerService) {
this.backupManagerService = backupManagerService;
}
diff --git a/services/backup/java/com/android/server/backup/internal/PerformBackupTask.java b/services/backup/java/com/android/server/backup/internal/PerformBackupTask.java
index 289dd14..0ba83cf 100644
--- a/services/backup/java/com/android/server/backup/internal/PerformBackupTask.java
+++ b/services/backup/java/com/android/server/backup/internal/PerformBackupTask.java
@@ -16,15 +16,15 @@
package com.android.server.backup.internal;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG_BACKUP_TRACE;
-import static com.android.server.backup.RefactoredBackupManagerService.KEY_WIDGET_STATE;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.OP_PENDING;
-import static com.android.server.backup.RefactoredBackupManagerService.OP_TYPE_BACKUP;
-import static com.android.server.backup.RefactoredBackupManagerService.OP_TYPE_BACKUP_WAIT;
-import static com.android.server.backup.RefactoredBackupManagerService.PACKAGE_MANAGER_SENTINEL;
-import static com.android.server.backup.RefactoredBackupManagerService.TIMEOUT_BACKUP_INTERVAL;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+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.MORE_DEBUG;
+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.OP_TYPE_BACKUP_WAIT;
+import static com.android.server.backup.BackupManagerService.PACKAGE_MANAGER_SENTINEL;
+import static com.android.server.backup.BackupManagerService.TIMEOUT_BACKUP_INTERVAL;
import static com.android.server.backup.internal.BackupHandler.MSG_BACKUP_OPERATION_TIMEOUT;
import static com.android.server.backup.internal.BackupHandler.MSG_BACKUP_RESTORE_STEP;
@@ -61,7 +61,7 @@
import com.android.server.backup.DataChangedJournal;
import com.android.server.backup.KeyValueBackupJob;
import com.android.server.backup.PackageManagerBackupAgent;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.fullbackup.PerformFullTransportBackupTask;
import com.android.server.backup.transport.TransportClient;
import com.android.server.backup.transport.TransportUtils;
@@ -111,7 +111,7 @@
public class PerformBackupTask implements BackupRestoreTask {
private static final String TAG = "PerformBackupTask";
- private RefactoredBackupManagerService backupManagerService;
+ private BackupManagerService backupManagerService;
private final Object mCancelLock = new Object();
private ArrayList<BackupRequest> mQueue;
@@ -145,7 +145,7 @@
private volatile boolean mCancelAll;
- public PerformBackupTask(RefactoredBackupManagerService backupManagerService,
+ public PerformBackupTask(BackupManagerService backupManagerService,
TransportClient transportClient, String dirName,
ArrayList<BackupRequest> queue, @Nullable DataChangedJournal journal,
IBackupObserver observer, IBackupManagerMonitor monitor,
@@ -224,6 +224,10 @@
beginBackup();
break;
+ case BACKUP_PM:
+ backupPm();
+ break;
+
case RUNNING_QUEUE:
invokeNextAgent();
break;
@@ -239,8 +243,7 @@
}
}
- // We're starting a backup pass. Initialize the transport and send
- // the PM metadata blob if we haven't already.
+ // We're starting a backup pass. Initialize the transport if we haven't already.
private void beginBackup() {
if (DEBUG_BACKUP_TRACE) {
backupManagerService.clearBackupTrace();
@@ -320,40 +323,21 @@
Slog.d(TAG, "Skipping backup of package metadata.");
executeNextState(BackupState.RUNNING_QUEUE);
} else {
- // 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. We always run this pass
- // because it's cheap and this way we guarantee that we don't get out of
- // step even if we're selecting among various transports at run time.
+ // As the package manager is running here in the system process we can just set up
+ // its agent directly. Thus we always run this pass because it's cheap and this way
+ // we guarantee that we don't get out of step even if we're selecting among various
+ // transports at run time.
if (mStatus == BackupTransport.TRANSPORT_OK) {
- PackageManagerBackupAgent pmAgent = backupManagerService.makeMetadataAgent();
- mStatus = invokeAgentForBackup(
- PACKAGE_MANAGER_SENTINEL,
- IBackupAgent.Stub.asInterface(pmAgent.onBind()));
- backupManagerService.addBackupTrace("PMBA invoke: " + mStatus);
-
- // Because the PMBA is a local instance, it has already executed its
- // backup callback and returned. Blow away the lingering (spurious)
- // pending timeout message for it.
- backupManagerService.getBackupHandler().removeMessages(
- MSG_BACKUP_OPERATION_TIMEOUT);
+ executeNextState(BackupState.BACKUP_PM);
}
}
-
- if (mStatus == BackupTransport.TRANSPORT_NOT_INITIALIZED) {
- // The backend reports that our dataset has been wiped. Note this in
- // the event log; the no-success code below will reset the backup
- // state as well.
- EventLog.writeEvent(EventLogTags.BACKUP_RESET, transportName);
- }
} catch (Exception e) {
- Slog.e(TAG, "Error in backup thread", e);
- backupManagerService.addBackupTrace("Exception in backup thread: " + e);
+ Slog.e(TAG, "Error in backup thread during init", e);
+ backupManagerService.addBackupTrace("Exception in backup thread during init: " + e);
mStatus = BackupTransport.TRANSPORT_ERROR;
} finally {
- // If we've succeeded so far, invokeAgentForBackup() will have run the PM
- // metadata and its completion/timeout callback will continue the state
- // machine chain. If it failed that won't happen; we handle that now.
+ // If we've succeeded so far, we will move to the BACKUP_PM state. If something has gone
+ // wrong then that won't have happen so cleanup.
backupManagerService.addBackupTrace("exiting prelim: " + mStatus);
if (mStatus != BackupTransport.TRANSPORT_OK) {
// if things went wrong at this point, we need to
@@ -367,6 +351,49 @@
}
}
+ private void backupPm() {
+ 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.
+ PackageManagerBackupAgent pmAgent = backupManagerService.makeMetadataAgent();
+ mStatus = invokeAgentForBackup(
+ PACKAGE_MANAGER_SENTINEL,
+ IBackupAgent.Stub.asInterface(pmAgent.onBind()));
+ backupManagerService.addBackupTrace("PMBA invoke: " + mStatus);
+
+ // Because the PMBA is a local instance, it has already executed its backup callback and
+ // returned. Blow away the lingering (spurious) pending timeout message for it.
+ backupManagerService.getBackupHandler().removeMessages(
+ MSG_BACKUP_OPERATION_TIMEOUT);
+ } catch (Exception e) {
+ Slog.e(TAG, "Error in backup thread during pm", e);
+ backupManagerService.addBackupTrace("Exception in backup thread during pm: " + e);
+ mStatus = BackupTransport.TRANSPORT_ERROR;
+ } finally {
+ // If we've succeeded so far, invokeAgentForBackup() will have run the PM
+ // metadata and its completion/timeout callback will continue the state
+ // machine chain. If it failed that won't happen; we handle that now.
+ backupManagerService.addBackupTrace("exiting backupPm: " + mStatus);
+ if (mStatus != BackupTransport.TRANSPORT_OK) {
+ // if things went wrong at this point, we need to
+ // restage everything and try again later.
+ backupManagerService.resetBackupState(mStateDir); // Just to make sure.
+ BackupObserverUtils.sendBackupFinished(mObserver,
+ invokeAgentToObserverError(mStatus));
+ executeNextState(BackupState.FINAL);
+ }
+ }
+ }
+
+ private int invokeAgentToObserverError(int error) {
+ if (error == BackupTransport.AGENT_ERROR) {
+ return BackupManager.ERROR_AGENT_FAILURE;
+ } else {
+ return BackupManager.ERROR_TRANSPORT_ABORTED;
+ }
+ }
+
// Transport has been initialized and the PM metadata submitted successfully
// if that was warranted. Now we process the single next thing in the queue.
private void invokeNextAgent() {
@@ -687,8 +714,9 @@
mEphemeralOpToken, TIMEOUT_BACKUP_INTERVAL, this, OP_TYPE_BACKUP_WAIT);
backupManagerService.addBackupTrace("calling agent doBackup()");
- agent.doBackup(mSavedState, mBackupData, mNewState, quota, mEphemeralOpToken,
- backupManagerService.getBackupManagerBinder());
+ agent.doBackup(
+ mSavedState, mBackupData, mNewState, quota, mEphemeralOpToken,
+ backupManagerService.getBackupManagerBinder(), transport.getTransportFlags());
} catch (Exception e) {
Slog.e(TAG, "Error invoking for backup on " + packageName + ". " + e);
backupManagerService.addBackupTrace("exception: " + e);
@@ -903,6 +931,7 @@
TransportUtils.checkTransportNotNull(transport);
size = mBackupDataName.length();
if (size > 0) {
+ boolean isNonIncremental = mSavedStateName.length() == 0;
if (mStatus == BackupTransport.TRANSPORT_OK) {
backupData = ParcelFileDescriptor.open(mBackupDataName,
ParcelFileDescriptor.MODE_READ_ONLY);
@@ -911,7 +940,7 @@
int userInitiatedFlag =
mUserInitiated ? BackupTransport.FLAG_USER_INITIATED : 0;
int incrementalFlag =
- mSavedStateName.length() == 0
+ isNonIncremental
? BackupTransport.FLAG_NON_INCREMENTAL
: BackupTransport.FLAG_INCREMENTAL;
int flags = userInitiatedFlag | incrementalFlag;
@@ -919,6 +948,19 @@
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");
+ backupManagerService.addBackupTrace(
+ "Transport requested non-incremental but already the case, error");
+ mStatus = BackupTransport.TRANSPORT_ERROR;
+ }
+
// TODO - We call finishBackup() for each application backed up, because
// we need to know now whether it succeeded or failed. Instead, we should
// hold off on finishBackup() until the end, which implies holding off on
@@ -966,6 +1008,31 @@
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");
+ backupManagerService.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);
+
+ mBackupDataName.delete();
+ mSavedStateName.delete();
+ mNewStateName.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,
@@ -991,6 +1058,17 @@
// Success or single-package rejection. Proceed with the next app if any,
// otherwise we're done.
nextState = (mQueue.isEmpty()) ? BackupState.FINAL : 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 +
diff --git a/services/backup/java/com/android/server/backup/internal/PerformClearTask.java b/services/backup/java/com/android/server/backup/internal/PerformClearTask.java
index 140d7286..d028104 100644
--- a/services/backup/java/com/android/server/backup/internal/PerformClearTask.java
+++ b/services/backup/java/com/android/server/backup/internal/PerformClearTask.java
@@ -16,26 +16,26 @@
package com.android.server.backup.internal;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.content.pm.PackageInfo;
import android.util.Slog;
import com.android.internal.backup.IBackupTransport;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.TransportManager;
import com.android.server.backup.transport.TransportClient;
import java.io.File;
public class PerformClearTask implements Runnable {
- private final RefactoredBackupManagerService mBackupManagerService;
+ private final BackupManagerService mBackupManagerService;
private final TransportManager mTransportManager;
private final TransportClient mTransportClient;
private final PackageInfo mPackage;
private final OnTaskFinishedListener mListener;
- PerformClearTask(RefactoredBackupManagerService backupManagerService,
+ PerformClearTask(BackupManagerService backupManagerService,
TransportClient transportClient, PackageInfo packageInfo,
OnTaskFinishedListener listener) {
mBackupManagerService = backupManagerService;
diff --git a/services/backup/java/com/android/server/backup/internal/PerformInitializeTask.java b/services/backup/java/com/android/server/backup/internal/PerformInitializeTask.java
index 2f2af98..88e0b7fc 100644
--- a/services/backup/java/com/android/server/backup/internal/PerformInitializeTask.java
+++ b/services/backup/java/com/android/server/backup/internal/PerformInitializeTask.java
@@ -16,7 +16,7 @@
package com.android.server.backup.internal;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.annotation.Nullable;
import android.app.AlarmManager;
@@ -30,7 +30,7 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.backup.IBackupTransport;
import com.android.server.EventLogTags;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.TransportManager;
import com.android.server.backup.transport.TransportClient;
@@ -49,7 +49,7 @@
* operation was successful then it's {@link BackupTransport#TRANSPORT_OK}.
*/
public class PerformInitializeTask implements Runnable {
- private final RefactoredBackupManagerService mBackupManagerService;
+ private final BackupManagerService mBackupManagerService;
private final TransportManager mTransportManager;
private final String[] mQueue;
private final File mBaseStateDir;
@@ -57,7 +57,7 @@
@Nullable private IBackupObserver mObserver;
public PerformInitializeTask(
- RefactoredBackupManagerService backupManagerService,
+ BackupManagerService backupManagerService,
String[] transportNames,
@Nullable IBackupObserver observer,
OnTaskFinishedListener listener) {
@@ -72,7 +72,7 @@
@VisibleForTesting
PerformInitializeTask(
- RefactoredBackupManagerService backupManagerService,
+ BackupManagerService backupManagerService,
TransportManager transportManager,
String[] transportNames,
@Nullable IBackupObserver observer,
diff --git a/services/backup/java/com/android/server/backup/internal/ProvisionedObserver.java b/services/backup/java/com/android/server/backup/internal/ProvisionedObserver.java
index 1001d3a..69720d4 100644
--- a/services/backup/java/com/android/server/backup/internal/ProvisionedObserver.java
+++ b/services/backup/java/com/android/server/backup/internal/ProvisionedObserver.java
@@ -16,22 +16,22 @@
package com.android.server.backup.internal;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.MORE_DEBUG;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.database.ContentObserver;
import android.os.Handler;
import android.util.Slog;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.KeyValueBackupJob;
-import com.android.server.backup.RefactoredBackupManagerService;
public class ProvisionedObserver extends ContentObserver {
- private RefactoredBackupManagerService backupManagerService;
+ private BackupManagerService backupManagerService;
public ProvisionedObserver(
- RefactoredBackupManagerService backupManagerService, Handler handler) {
+ BackupManagerService backupManagerService, Handler handler) {
super(handler);
this.backupManagerService = backupManagerService;
}
diff --git a/services/backup/java/com/android/server/backup/internal/RunBackupReceiver.java b/services/backup/java/com/android/server/backup/internal/RunBackupReceiver.java
index f1fa7eb..6f574ca 100644
--- a/services/backup/java/com/android/server/backup/internal/RunBackupReceiver.java
+++ b/services/backup/java/com/android/server/backup/internal/RunBackupReceiver.java
@@ -16,10 +16,10 @@
package com.android.server.backup.internal;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.RUN_BACKUP_ACTION;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.MORE_DEBUG;
+import static com.android.server.backup.BackupManagerService.RUN_BACKUP_ACTION;
+import static com.android.server.backup.BackupManagerService.TAG;
import static com.android.server.backup.internal.BackupHandler.MSG_RUN_BACKUP;
import android.app.PendingIntent;
@@ -29,13 +29,13 @@
import android.os.Message;
import android.util.Slog;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
public class RunBackupReceiver extends BroadcastReceiver {
- private RefactoredBackupManagerService backupManagerService;
+ private BackupManagerService backupManagerService;
- public RunBackupReceiver(RefactoredBackupManagerService backupManagerService) {
+ public RunBackupReceiver(BackupManagerService backupManagerService) {
this.backupManagerService = backupManagerService;
}
diff --git a/services/backup/java/com/android/server/backup/internal/RunInitializeReceiver.java b/services/backup/java/com/android/server/backup/internal/RunInitializeReceiver.java
index 6c160a3..548c580 100644
--- a/services/backup/java/com/android/server/backup/internal/RunInitializeReceiver.java
+++ b/services/backup/java/com/android/server/backup/internal/RunInitializeReceiver.java
@@ -16,9 +16,9 @@
package com.android.server.backup.internal;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.RUN_INITIALIZE_ACTION;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.RUN_INITIALIZE_ACTION;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -27,12 +27,12 @@
import android.util.ArraySet;
import android.util.Slog;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
public class RunInitializeReceiver extends BroadcastReceiver {
- private final RefactoredBackupManagerService mBackupManagerService;
+ private final BackupManagerService mBackupManagerService;
- public RunInitializeReceiver(RefactoredBackupManagerService backupManagerService) {
+ public RunInitializeReceiver(BackupManagerService backupManagerService) {
mBackupManagerService = backupManagerService;
}
diff --git a/services/backup/java/com/android/server/backup/restore/ActiveRestoreSession.java b/services/backup/java/com/android/server/backup/restore/ActiveRestoreSession.java
index 7ae5b43..238f7a0 100644
--- a/services/backup/java/com/android/server/backup/restore/ActiveRestoreSession.java
+++ b/services/backup/java/com/android/server/backup/restore/ActiveRestoreSession.java
@@ -16,8 +16,8 @@
package com.android.server.backup.restore;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.MORE_DEBUG;
import static com.android.server.backup.internal.BackupHandler.MSG_RESTORE_SESSION_TIMEOUT;
import static com.android.server.backup.internal.BackupHandler.MSG_RUN_GET_RESTORE_SETS;
import static com.android.server.backup.internal.BackupHandler.MSG_RUN_RESTORE;
@@ -30,13 +30,13 @@
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Binder;
+import android.os.Handler;
import android.os.Message;
import android.os.PowerManager;
import android.util.Slog;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.TransportManager;
-import com.android.server.backup.internal.BackupHandler;
import com.android.server.backup.internal.OnTaskFinishedListener;
import com.android.server.backup.params.RestoreGetSetsParams;
import com.android.server.backup.params.RestoreParams;
@@ -52,13 +52,13 @@
private final TransportManager mTransportManager;
private final String mTransportName;
- private final RefactoredBackupManagerService mBackupManagerService;
+ private final BackupManagerService mBackupManagerService;
private final String mPackageName;
public RestoreSet[] mRestoreSets = null;
boolean mEnded = false;
boolean mTimedOut = false;
- public ActiveRestoreSession(RefactoredBackupManagerService backupManagerService,
+ public ActiveRestoreSession(BackupManagerService backupManagerService,
String packageName, String transportName) {
mBackupManagerService = backupManagerService;
mPackageName = packageName;
@@ -374,7 +374,7 @@
}
// Stop the session timeout until we finalize the restore
- BackupHandler backupHandler = mBackupManagerService.getBackupHandler();
+ Handler backupHandler = mBackupManagerService.getBackupHandler();
backupHandler.removeMessages(MSG_RESTORE_SESSION_TIMEOUT);
PowerManager.WakeLock wakelock = mBackupManagerService.getWakelock();
@@ -398,11 +398,10 @@
// Posted to the handler to tear down a restore session in a cleanly synchronized way
public class EndRestoreRunnable implements Runnable {
- RefactoredBackupManagerService mBackupManager;
+ BackupManagerService mBackupManager;
ActiveRestoreSession mSession;
- public EndRestoreRunnable(RefactoredBackupManagerService manager,
- ActiveRestoreSession session) {
+ public EndRestoreRunnable(BackupManagerService manager, ActiveRestoreSession session) {
mBackupManager = manager;
mSession = session;
}
diff --git a/services/backup/java/com/android/server/backup/restore/AdbRestoreFinishedLatch.java b/services/backup/java/com/android/server/backup/restore/AdbRestoreFinishedLatch.java
index 6353d1f..e4f3a9d 100644
--- a/services/backup/java/com/android/server/backup/restore/AdbRestoreFinishedLatch.java
+++ b/services/backup/java/com/android/server/backup/restore/AdbRestoreFinishedLatch.java
@@ -16,14 +16,14 @@
package com.android.server.backup.restore;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.TIMEOUT_FULL_BACKUP_INTERVAL;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.MORE_DEBUG;
+import static com.android.server.backup.BackupManagerService.TIMEOUT_FULL_BACKUP_INTERVAL;
import android.util.Slog;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.BackupRestoreTask;
-import com.android.server.backup.RefactoredBackupManagerService;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -34,11 +34,11 @@
public class AdbRestoreFinishedLatch implements BackupRestoreTask {
private static final String TAG = "AdbRestoreFinishedLatch";
- private RefactoredBackupManagerService backupManagerService;
+ private BackupManagerService backupManagerService;
final CountDownLatch mLatch;
private final int mCurrentOpToken;
- public AdbRestoreFinishedLatch(RefactoredBackupManagerService backupManagerService,
+ public AdbRestoreFinishedLatch(BackupManagerService backupManagerService,
int currentOpToken) {
this.backupManagerService = backupManagerService;
mLatch = new CountDownLatch(1);
diff --git a/services/backup/java/com/android/server/backup/restore/FullRestoreEngine.java b/services/backup/java/com/android/server/backup/restore/FullRestoreEngine.java
index 2c8b5b4..0ca4f25 100644
--- a/services/backup/java/com/android/server/backup/restore/FullRestoreEngine.java
+++ b/services/backup/java/com/android/server/backup/restore/FullRestoreEngine.java
@@ -16,15 +16,15 @@
package com.android.server.backup.restore;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_MANIFEST_FILENAME;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_METADATA_FILENAME;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.OP_TYPE_RESTORE_WAIT;
-import static com.android.server.backup.RefactoredBackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
-import static com.android.server.backup.RefactoredBackupManagerService.TIMEOUT_RESTORE_INTERVAL;
-import static com.android.server.backup.RefactoredBackupManagerService
+import static com.android.server.backup.BackupManagerService.BACKUP_MANIFEST_FILENAME;
+import static com.android.server.backup.BackupManagerService.BACKUP_METADATA_FILENAME;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.MORE_DEBUG;
+import static com.android.server.backup.BackupManagerService.OP_TYPE_RESTORE_WAIT;
+import static com.android.server.backup.BackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
+import static com.android.server.backup.BackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.TIMEOUT_RESTORE_INTERVAL;
+import static com.android.server.backup.BackupManagerService
.TIMEOUT_SHARED_BACKUP_INTERVAL;
import static com.android.server.backup.internal.BackupHandler.MSG_RESTORE_OPERATION_TIMEOUT;
@@ -44,7 +44,7 @@
import com.android.server.backup.BackupRestoreTask;
import com.android.server.backup.FileMetadata;
import com.android.server.backup.KeyValueAdbRestoreEngine;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.fullbackup.FullBackupObbConnection;
import com.android.server.backup.utils.BytesReadListener;
import com.android.server.backup.utils.FullBackupRestoreObserverUtils;
@@ -62,7 +62,7 @@
*/
public class FullRestoreEngine extends RestoreEngine {
- private final RefactoredBackupManagerService mBackupManagerService;
+ private final BackupManagerService mBackupManagerService;
// Task in charge of monitoring timeouts
private final BackupRestoreTask mMonitorTask;
@@ -119,7 +119,7 @@
final int mEphemeralOpToken;
- public FullRestoreEngine(RefactoredBackupManagerService backupManagerService,
+ public FullRestoreEngine(BackupManagerService backupManagerService,
BackupRestoreTask monitorTask, IFullBackupRestoreObserver observer,
IBackupManagerMonitor monitor, PackageInfo onlyPackage, boolean allowApks,
boolean allowObbs, int ephemeralOpToken) {
diff --git a/services/backup/java/com/android/server/backup/restore/PerformAdbRestoreTask.java b/services/backup/java/com/android/server/backup/restore/PerformAdbRestoreTask.java
index 54c2746..e576b3c 100644
--- a/services/backup/java/com/android/server/backup/restore/PerformAdbRestoreTask.java
+++ b/services/backup/java/com/android/server/backup/restore/PerformAdbRestoreTask.java
@@ -18,18 +18,18 @@
import static com.android.server.backup.BackupPasswordManager.PBKDF_CURRENT;
import static com.android.server.backup.BackupPasswordManager.PBKDF_FALLBACK;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_FILE_HEADER_MAGIC;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_FILE_VERSION;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_MANIFEST_FILENAME;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_METADATA_FILENAME;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.OP_TYPE_RESTORE_WAIT;
-import static com.android.server.backup.RefactoredBackupManagerService.SETTINGS_PACKAGE;
-import static com.android.server.backup.RefactoredBackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
-import static com.android.server.backup.RefactoredBackupManagerService.TIMEOUT_FULL_BACKUP_INTERVAL;
-import static com.android.server.backup.RefactoredBackupManagerService.TIMEOUT_RESTORE_INTERVAL;
+import static com.android.server.backup.BackupManagerService.BACKUP_FILE_HEADER_MAGIC;
+import static com.android.server.backup.BackupManagerService.BACKUP_FILE_VERSION;
+import static com.android.server.backup.BackupManagerService.BACKUP_MANIFEST_FILENAME;
+import static com.android.server.backup.BackupManagerService.BACKUP_METADATA_FILENAME;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.MORE_DEBUG;
+import static com.android.server.backup.BackupManagerService.OP_TYPE_RESTORE_WAIT;
+import static com.android.server.backup.BackupManagerService.SETTINGS_PACKAGE;
+import static com.android.server.backup.BackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
+import static com.android.server.backup.BackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.TIMEOUT_FULL_BACKUP_INTERVAL;
+import static com.android.server.backup.BackupManagerService.TIMEOUT_RESTORE_INTERVAL;
import static com.android.server.backup.internal.BackupHandler.MSG_RESTORE_OPERATION_TIMEOUT;
import android.app.ApplicationThreadConstants;
@@ -47,10 +47,10 @@
import android.util.Slog;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.FileMetadata;
import com.android.server.backup.KeyValueAdbRestoreEngine;
import com.android.server.backup.PackageManagerBackupAgent;
-import com.android.server.backup.RefactoredBackupManagerService;
import com.android.server.backup.fullbackup.FullBackupObbConnection;
import com.android.server.backup.utils.BytesReadListener;
import com.android.server.backup.utils.FullBackupRestoreObserverUtils;
@@ -82,7 +82,7 @@
public class PerformAdbRestoreTask implements Runnable {
- private final RefactoredBackupManagerService mBackupManagerService;
+ private final BackupManagerService mBackupManagerService;
private final ParcelFileDescriptor mInputFile;
private final String mCurrentPassword;
private final String mDecryptPassword;
@@ -106,10 +106,10 @@
private final IBackupAgent mAgent;
private final int mToken;
- private final RefactoredBackupManagerService mBackupManagerService;
+ private final BackupManagerService mBackupManagerService;
RestoreFinishedRunnable(IBackupAgent agent, int token,
- RefactoredBackupManagerService backupManagerService) {
+ BackupManagerService backupManagerService) {
mAgent = agent;
mToken = token;
mBackupManagerService = backupManagerService;
@@ -139,7 +139,7 @@
// Packages we've already wiped data on when restoring their first file
private final HashSet<String> mClearedPackages = new HashSet<>();
- public PerformAdbRestoreTask(RefactoredBackupManagerService backupManagerService,
+ public PerformAdbRestoreTask(BackupManagerService backupManagerService,
ParcelFileDescriptor fd, String curPassword, String decryptPassword,
IFullBackupRestoreObserver observer, AtomicBoolean latch) {
this.mBackupManagerService = backupManagerService;
diff --git a/services/backup/java/com/android/server/backup/restore/PerformUnifiedRestoreTask.java b/services/backup/java/com/android/server/backup/restore/PerformUnifiedRestoreTask.java
index 88f9ead..6eb9619 100644
--- a/services/backup/java/com/android/server/backup/restore/PerformUnifiedRestoreTask.java
+++ b/services/backup/java/com/android/server/backup/restore/PerformUnifiedRestoreTask.java
@@ -16,16 +16,16 @@
package com.android.server.backup.restore;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.KEY_WIDGET_STATE;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.OP_TYPE_RESTORE_WAIT;
-import static com.android.server.backup.RefactoredBackupManagerService.PACKAGE_MANAGER_SENTINEL;
-import static com.android.server.backup.RefactoredBackupManagerService.SETTINGS_PACKAGE;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
-import static com.android.server.backup.RefactoredBackupManagerService
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.KEY_WIDGET_STATE;
+import static com.android.server.backup.BackupManagerService.MORE_DEBUG;
+import static com.android.server.backup.BackupManagerService.OP_TYPE_RESTORE_WAIT;
+import static com.android.server.backup.BackupManagerService.PACKAGE_MANAGER_SENTINEL;
+import static com.android.server.backup.BackupManagerService.SETTINGS_PACKAGE;
+import static com.android.server.backup.BackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService
.TIMEOUT_RESTORE_FINISHED_INTERVAL;
-import static com.android.server.backup.RefactoredBackupManagerService.TIMEOUT_RESTORE_INTERVAL;
+import static com.android.server.backup.BackupManagerService.TIMEOUT_RESTORE_INTERVAL;
import static com.android.server.backup.internal.BackupHandler.MSG_BACKUP_RESTORE_STEP;
import static com.android.server.backup.internal.BackupHandler.MSG_RESTORE_OPERATION_TIMEOUT;
import static com.android.server.backup.internal.BackupHandler.MSG_RESTORE_SESSION_TIMEOUT;
@@ -60,7 +60,7 @@
import com.android.server.backup.BackupUtils;
import com.android.server.backup.PackageManagerBackupAgent;
import com.android.server.backup.PackageManagerBackupAgent.Metadata;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.TransportManager;
import com.android.server.backup.internal.OnTaskFinishedListener;
import com.android.server.backup.transport.TransportClient;
@@ -78,7 +78,7 @@
public class PerformUnifiedRestoreTask implements BackupRestoreTask {
- private RefactoredBackupManagerService backupManagerService;
+ private BackupManagerService backupManagerService;
private final TransportManager mTransportManager;
// Transport client we're working with to do the restore
private final TransportClient mTransportClient;
@@ -160,7 +160,7 @@
// Invariant: mWakelock is already held, and this task is responsible for
// releasing it at the end of the restore operation.
- public PerformUnifiedRestoreTask(RefactoredBackupManagerService backupManagerService,
+ public PerformUnifiedRestoreTask(BackupManagerService backupManagerService,
TransportClient transportClient, IRestoreObserver observer,
IBackupManagerMonitor monitor, long restoreSetToken, PackageInfo targetPackage,
int pmToken, boolean isFullSystemRestore, String[] filterSet,
diff --git a/services/backup/java/com/android/server/backup/restore/RestoreFileRunnable.java b/services/backup/java/com/android/server/backup/restore/RestoreFileRunnable.java
index 6c9a222..635b6d6 100644
--- a/services/backup/java/com/android/server/backup/restore/RestoreFileRunnable.java
+++ b/services/backup/java/com/android/server/backup/restore/RestoreFileRunnable.java
@@ -21,7 +21,7 @@
import android.os.RemoteException;
import com.android.server.backup.FileMetadata;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import java.io.IOException;
@@ -35,9 +35,9 @@
private final FileMetadata mInfo;
private final ParcelFileDescriptor mSocket;
private final int mToken;
- private final RefactoredBackupManagerService mBackupManagerService;
+ private final BackupManagerService mBackupManagerService;
- RestoreFileRunnable(RefactoredBackupManagerService backupManagerService, IBackupAgent agent,
+ RestoreFileRunnable(BackupManagerService backupManagerService, IBackupAgent agent,
FileMetadata info, ParcelFileDescriptor socket, int token) throws IOException {
mAgent = agent;
mInfo = info;
diff --git a/services/backup/java/com/android/server/backup/transport/TransportClient.java b/services/backup/java/com/android/server/backup/transport/TransportClient.java
index 7b2e3df..1a2ca92 100644
--- a/services/backup/java/com/android/server/backup/transport/TransportClient.java
+++ b/services/backup/java/com/android/server/backup/transport/TransportClient.java
@@ -33,7 +33,7 @@
import android.text.format.DateFormat;
import android.util.ArrayMap;
import android.util.EventLog;
-import android.util.Log;
+import android.util.Slog;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
@@ -41,9 +41,13 @@
import com.android.internal.util.Preconditions;
import com.android.server.EventLogTags;
import com.android.server.backup.TransportManager;
+import com.android.server.backup.transport.TransportUtils.Priority;
+
+import dalvik.system.CloseGuard;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.lang.ref.WeakReference;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
@@ -70,17 +74,20 @@
* @see TransportManager
*/
public class TransportClient {
- private static final String TAG = "TransportClient";
+ @VisibleForTesting static final String TAG = "TransportClient";
private static final int LOG_BUFFER_SIZE = 5;
private final Context mContext;
private final Intent mBindIntent;
+ private final ServiceConnection mConnection;
private final String mIdentifier;
+ private final String mCreatorLogString;
private final ComponentName mTransportComponent;
private final Handler mListenerHandler;
private final String mPrefixForLog;
private final Object mStateLock = new Object();
private final Object mLogBufferLock = new Object();
+ private final CloseGuard mCloseGuard = CloseGuard.get();
@GuardedBy("mLogBufferLock")
private final List<String> mLogBuffer = new LinkedList<>();
@@ -99,12 +106,14 @@
Context context,
Intent bindIntent,
ComponentName transportComponent,
- String identifier) {
+ String identifier,
+ String caller) {
this(
context,
bindIntent,
transportComponent,
identifier,
+ caller,
new Handler(Looper.getMainLooper()));
}
@@ -114,79 +123,27 @@
Intent bindIntent,
ComponentName transportComponent,
String identifier,
+ String caller,
Handler listenerHandler) {
mContext = context;
mTransportComponent = transportComponent;
mBindIntent = bindIntent;
mIdentifier = identifier;
+ mCreatorLogString = caller;
mListenerHandler = listenerHandler;
+ mConnection = new TransportConnection(context, this);
// For logging
String classNameForLog = mTransportComponent.getShortClassName().replaceFirst(".*\\.", "");
mPrefixForLog = classNameForLog + "#" + mIdentifier + ":";
+
+ mCloseGuard.open("markAsDisposed");
}
public ComponentName getTransportComponent() {
return mTransportComponent;
}
- // Calls to onServiceDisconnected() or onBindingDied() turn TransportClient UNUSABLE. After one
- // of these calls, if a binding happen again the new service can be a different instance. Since
- // transports are stateful, we don't want a new instance responding for an old instance's state.
- private ServiceConnection mConnection =
- new ServiceConnection() {
- @Override
- public void onServiceConnected(ComponentName componentName, IBinder binder) {
- IBackupTransport transport = IBackupTransport.Stub.asInterface(binder);
- synchronized (mStateLock) {
- checkStateIntegrityLocked();
-
- if (mState != State.UNUSABLE) {
- log(Log.DEBUG, "Transport connected");
- setStateLocked(State.CONNECTED, transport);
- notifyListenersAndClearLocked(transport);
- }
- }
- }
-
- @Override
- public void onServiceDisconnected(ComponentName componentName) {
- synchronized (mStateLock) {
- log(Log.ERROR, "Service disconnected: client UNUSABLE");
- setStateLocked(State.UNUSABLE, null);
- // After unbindService() no calls back to mConnection
- mContext.unbindService(this);
- }
- }
-
- @Override
- public void onBindingDied(ComponentName name) {
- synchronized (mStateLock) {
- checkStateIntegrityLocked();
-
- log(Log.ERROR, "Binding died: client UNUSABLE");
- // After unbindService() no calls back to mConnection
- switch (mState) {
- case State.UNUSABLE:
- break;
- case State.IDLE:
- log(Log.ERROR, "Unexpected state transition IDLE => UNUSABLE");
- setStateLocked(State.UNUSABLE, null);
- break;
- case State.BOUND_AND_CONNECTING:
- setStateLocked(State.UNUSABLE, null);
- mContext.unbindService(this);
- notifyListenersAndClearLocked(null);
- break;
- case State.CONNECTED:
- setStateLocked(State.UNUSABLE, null);
- mContext.unbindService(this);
- break;
- }
- }
- }
- };
-
/**
* Attempts to connect to the transport (if needed).
*
@@ -240,7 +197,7 @@
switch (mState) {
case State.UNUSABLE:
- log(Log.WARN, caller, "Async connect: UNUSABLE client");
+ log(Priority.WARN, caller, "Async connect: UNUSABLE client");
notifyListener(listener, null, caller);
break;
case State.IDLE:
@@ -254,22 +211,25 @@
// We don't need to set a time-out because we are guaranteed to get a call
// back in ServiceConnection, either an onServiceConnected() or
// onBindingDied().
- log(Log.DEBUG, caller, "Async connect: service bound, connecting");
+ log(Priority.DEBUG, caller, "Async connect: service bound, connecting");
setStateLocked(State.BOUND_AND_CONNECTING, null);
mListeners.put(listener, caller);
} else {
- log(Log.ERROR, "Async connect: bindService returned false");
+ log(Priority.ERROR, "Async connect: bindService returned false");
// mState remains State.IDLE
mContext.unbindService(mConnection);
notifyListener(listener, null, caller);
}
break;
case State.BOUND_AND_CONNECTING:
- log(Log.DEBUG, caller, "Async connect: already connecting, adding listener");
+ log(
+ Priority.DEBUG,
+ caller,
+ "Async connect: already connecting, adding listener");
mListeners.put(listener, caller);
break;
case State.CONNECTED:
- log(Log.DEBUG, caller, "Async connect: reusing transport");
+ log(Priority.DEBUG, caller, "Async connect: reusing transport");
notifyListener(listener, mTransport, caller);
break;
}
@@ -286,7 +246,7 @@
synchronized (mStateLock) {
checkStateIntegrityLocked();
- log(Log.DEBUG, caller, "Unbind requested (was " + stateToString(mState) + ")");
+ log(Priority.DEBUG, caller, "Unbind requested (was " + stateToString(mState) + ")");
switch (mState) {
case State.UNUSABLE:
case State.IDLE:
@@ -305,6 +265,15 @@
}
}
+ /** Marks this TransportClient as disposed, allowing it to be GC'ed without warnings. */
+ public void markAsDisposed() {
+ synchronized (mStateLock) {
+ Preconditions.checkState(
+ mState < State.BOUND_AND_CONNECTING, "Can't mark as disposed if still bound");
+ mCloseGuard.close();
+ }
+ }
+
/**
* Attempts to connect to the transport (if needed) and returns it.
*
@@ -335,14 +304,14 @@
IBackupTransport transport = mTransport;
if (transport != null) {
- log(Log.INFO, caller, "Sync connect: reusing transport");
+ log(Priority.DEBUG, caller, "Sync connect: reusing transport");
return transport;
}
// If it's already UNUSABLE we return straight away, no need to go to main-thread
synchronized (mStateLock) {
if (mState == State.UNUSABLE) {
- log(Log.WARN, caller, "Sync connect: UNUSABLE client");
+ log(Priority.WARN, caller, "Sync connect: UNUSABLE client");
return null;
}
}
@@ -352,14 +321,14 @@
(requestedTransport, transportClient) ->
transportFuture.complete(requestedTransport);
- log(Log.DEBUG, caller, "Sync connect: calling async");
+ log(Priority.DEBUG, caller, "Sync connect: calling async");
connectAsync(requestListener, caller);
try {
return transportFuture.get();
} catch (InterruptedException | ExecutionException e) {
String error = e.getClass().getSimpleName();
- log(Log.ERROR, caller, error + " while waiting for transport: " + e.getMessage());
+ log(Priority.ERROR, caller, error + " while waiting for transport: " + e.getMessage());
return null;
}
}
@@ -379,7 +348,7 @@
public IBackupTransport connectOrThrow(String caller) throws TransportNotAvailableException {
IBackupTransport transport = connect(caller);
if (transport == null) {
- log(Log.ERROR, caller, "Transport connection failed");
+ log(Priority.ERROR, caller, "Transport connection failed");
throw new TransportNotAvailableException();
}
return transport;
@@ -398,7 +367,7 @@
throws TransportNotAvailableException {
IBackupTransport transport = mTransport;
if (transport == null) {
- log(Log.ERROR, caller, "Transport not connected");
+ log(Priority.ERROR, caller, "Transport not connected");
throw new TransportNotAvailableException();
}
return transport;
@@ -413,12 +382,92 @@
+ "}";
}
+ @Override
+ protected void finalize() throws Throwable {
+ synchronized (mStateLock) {
+ mCloseGuard.warnIfOpen();
+ if (mState >= State.BOUND_AND_CONNECTING) {
+ String callerLogString = "TransportClient.finalize()";
+ log(
+ Priority.ERROR,
+ callerLogString,
+ "Dangling TransportClient created in [" + mCreatorLogString + "] being "
+ + "GC'ed. Left bound, unbinding...");
+ try {
+ unbind(callerLogString);
+ } catch (IllegalStateException e) {
+ // May throw because there may be a race between this method being called and
+ // the framework calling any method on the connection with the weak reference
+ // there already cleared. In this case the connection will unbind before this
+ // is called. This is fine.
+ }
+ }
+ }
+ }
+
+ private void onServiceConnected(IBinder binder) {
+ IBackupTransport transport = IBackupTransport.Stub.asInterface(binder);
+ synchronized (mStateLock) {
+ checkStateIntegrityLocked();
+
+ if (mState != State.UNUSABLE) {
+ log(Priority.DEBUG, "Transport connected");
+ setStateLocked(State.CONNECTED, transport);
+ notifyListenersAndClearLocked(transport);
+ }
+ }
+ }
+
+ /**
+ * If we are called here the TransportClient becomes UNUSABLE. After one of these calls, if a
+ * binding happen again the new service can be a different instance. Since transports are
+ * stateful, we don't want a new instance responding for an old instance's state.
+ */
+ private void onServiceDisconnected() {
+ synchronized (mStateLock) {
+ log(Priority.ERROR, "Service disconnected: client UNUSABLE");
+ setStateLocked(State.UNUSABLE, null);
+ // After unbindService() no calls back to mConnection
+ mContext.unbindService(mConnection);
+ }
+ }
+
+ /**
+ * If we are called here the TransportClient becomes UNUSABLE for the same reason as in {@link
+ * #onServiceDisconnected()}.
+ */
+ private void onBindingDied() {
+ synchronized (mStateLock) {
+ checkStateIntegrityLocked();
+
+ log(Priority.ERROR, "Binding died: client UNUSABLE");
+ // After unbindService() no calls back to mConnection
+ switch (mState) {
+ case State.UNUSABLE:
+ break;
+ case State.IDLE:
+ log(Priority.ERROR, "Unexpected state transition IDLE => UNUSABLE");
+ setStateLocked(State.UNUSABLE, null);
+ break;
+ case State.BOUND_AND_CONNECTING:
+ setStateLocked(State.UNUSABLE, null);
+ mContext.unbindService(mConnection);
+ notifyListenersAndClearLocked(null);
+ break;
+ case State.CONNECTED:
+ setStateLocked(State.UNUSABLE, null);
+ mContext.unbindService(mConnection);
+ break;
+ }
+ }
+ }
+
private void notifyListener(
TransportConnectionListener listener,
@Nullable IBackupTransport transport,
String caller) {
String transportString = (transport != null) ? "IBackupTransport" : "null";
- log(Log.INFO, "Notifying [" + caller + "] transport = " + transportString);
+ log(Priority.INFO, "Notifying [" + caller + "] transport = " + transportString);
mListenerHandler.post(() -> listener.onTransportConnectionResult(transport, this));
}
@@ -434,7 +483,7 @@
@GuardedBy("mStateLock")
private void setStateLocked(@State int state, @Nullable IBackupTransport transport) {
- log(Log.VERBOSE, "State: " + stateToString(mState) + " => " + stateToString(state));
+ log(Priority.VERBOSE, "State: " + stateToString(mState) + " => " + stateToString(state));
onStateTransition(mState, state);
mState = state;
mTransport = transport;
@@ -503,7 +552,7 @@
private void checkState(boolean assertion, String message) {
if (!assertion) {
- log(Log.ERROR, message);
+ log(Priority.ERROR, message);
}
}
@@ -560,9 +609,63 @@
@IntDef({State.UNUSABLE, State.IDLE, State.BOUND_AND_CONNECTING, State.CONNECTED})
@Retention(RetentionPolicy.SOURCE)
private @interface State {
+ // Constant values MUST be in order
int UNUSABLE = 0;
int IDLE = 1;
int BOUND_AND_CONNECTING = 2;
int CONNECTED = 3;
}
+
+ /**
+ * This class is a proxy to TransportClient methods that doesn't hold a strong reference to the
+ * TransportClient, allowing it to be GC'ed. If the reference was lost it logs a message.
+ */
+ private static class TransportConnection implements ServiceConnection {
+ private final Context mContext;
+ private final WeakReference<TransportClient> mTransportClientRef;
+
+ private TransportConnection(Context context, TransportClient transportClient) {
+ mContext = context;
+ mTransportClientRef = new WeakReference<>(transportClient);
+ }
+
+ @Override
+ public void onServiceConnected(ComponentName transportComponent, IBinder binder) {
+ TransportClient transportClient = mTransportClientRef.get();
+ if (transportClient == null) {
+ referenceLost("TransportConnection.onServiceConnected()");
+ return;
+ }
+ transportClient.onServiceConnected(binder);
+ }
+
+ @Override
+ public void onServiceDisconnected(ComponentName transportComponent) {
+ TransportClient transportClient = mTransportClientRef.get();
+ if (transportClient == null) {
+ referenceLost("TransportConnection.onServiceDisconnected()");
+ return;
+ }
+ transportClient.onServiceDisconnected();
+ }
+
+ @Override
+ public void onBindingDied(ComponentName transportComponent) {
+ TransportClient transportClient = mTransportClientRef.get();
+ if (transportClient == null) {
+ referenceLost("TransportConnection.onBindingDied()");
+ return;
+ }
+ transportClient.onBindingDied();
+ }
+
+ /** @see TransportClient#finalize() */
+ private void referenceLost(String caller) {
+ mContext.unbindService(this);
+ TransportUtils.log(
+ Priority.INFO,
+ TAG,
+ caller + " called but TransportClient reference has been GC'ed");
+ }
+ }
}
diff --git a/services/backup/java/com/android/server/backup/transport/TransportClientManager.java b/services/backup/java/com/android/server/backup/transport/TransportClientManager.java
index 1132bce..4041932 100644
--- a/services/backup/java/com/android/server/backup/transport/TransportClientManager.java
+++ b/services/backup/java/com/android/server/backup/transport/TransportClientManager.java
@@ -22,8 +22,10 @@
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
-import android.util.Log;
+
import com.android.server.backup.TransportManager;
+import com.android.server.backup.transport.TransportUtils.Priority;
+
import java.io.PrintWriter;
import java.util.Map;
import java.util.WeakHashMap;
@@ -63,11 +65,14 @@
mContext,
bindIntent,
transportComponent,
- Integer.toString(mTransportClientsCreated));
+ Integer.toString(mTransportClientsCreated),
+ caller);
mTransportClientsCallerMap.put(transportClient, caller);
mTransportClientsCreated++;
TransportUtils.log(
- Log.DEBUG, TAG, formatMessage(null, caller, "Retrieving " + transportClient));
+ Priority.DEBUG,
+ TAG,
+ formatMessage(null, caller, "Retrieving " + transportClient));
return transportClient;
}
}
@@ -82,9 +87,12 @@
*/
public void disposeOfTransportClient(TransportClient transportClient, String caller) {
transportClient.unbind(caller);
+ transportClient.markAsDisposed();
synchronized (mTransportClientsLock) {
TransportUtils.log(
- Log.DEBUG, TAG, formatMessage(null, caller, "Disposing of " + transportClient));
+ Priority.DEBUG,
+ TAG,
+ formatMessage(null, caller, "Disposing of " + transportClient));
mTransportClientsCallerMap.remove(transportClient);
}
}
diff --git a/services/backup/java/com/android/server/backup/transport/TransportUtils.java b/services/backup/java/com/android/server/backup/transport/TransportUtils.java
index 56b2d44..766d77b 100644
--- a/services/backup/java/com/android/server/backup/transport/TransportUtils.java
+++ b/services/backup/java/com/android/server/backup/transport/TransportUtils.java
@@ -16,6 +16,7 @@
package com.android.server.backup.transport;
+import android.annotation.IntDef;
import android.annotation.Nullable;
import android.os.DeadObjectException;
import android.util.Log;
@@ -23,6 +24,9 @@
import com.android.internal.backup.IBackupTransport;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
/** Utility methods for transport-related operations. */
public class TransportUtils {
private static final String TAG = "TransportUtils";
@@ -34,14 +38,16 @@
public static IBackupTransport checkTransportNotNull(@Nullable IBackupTransport transport)
throws TransportNotAvailableException {
if (transport == null) {
- log(Log.ERROR, TAG, "Transport not available");
+ log(Priority.ERROR, TAG, "Transport not available");
throw new TransportNotAvailableException();
}
return transport;
}
- static void log(int priority, String tag, String message) {
- if (Log.isLoggable(tag, priority)) {
+ static void log(@Priority int priority, String tag, String message) {
+ if (priority == Priority.WTF) {
+ Slog.wtf(tag, message);
+ } else if (Log.isLoggable(tag, priority)) {
Slog.println(priority, tag, message);
}
}
@@ -57,5 +63,20 @@
return string.append(message).toString();
}
+ /**
+ * Create our own constants so we can log WTF using the same APIs. Except for {@link
+ * Priority#WTF} all the others have the same value, so can be used directly
+ */
+ @IntDef({Priority.VERBOSE, Priority.DEBUG, Priority.INFO, Priority.WARN, Priority.WTF})
+ @Retention(RetentionPolicy.SOURCE)
+ @interface Priority {
+ int VERBOSE = Log.VERBOSE;
+ int DEBUG = Log.DEBUG;
+ int INFO = Log.INFO;
+ int WARN = Log.WARN;
+ int ERROR = Log.ERROR;
+ int WTF = -1;
+ }
+
private TransportUtils() {}
}
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 dbf1a826..6780563 100644
--- a/services/backup/java/com/android/server/backup/utils/AppBackupUtils.java
+++ b/services/backup/java/com/android/server/backup/utils/AppBackupUtils.java
@@ -16,9 +16,9 @@
package com.android.server.backup.utils;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.MORE_DEBUG;
+import static com.android.server.backup.BackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.annotation.Nullable;
import android.app.backup.BackupTransport;
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 010684e..b23781d 100644
--- a/services/backup/java/com/android/server/backup/utils/BackupManagerMonitorUtils.java
+++ b/services/backup/java/com/android/server/backup/utils/BackupManagerMonitorUtils.java
@@ -18,8 +18,8 @@
import static android.app.backup.BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_NAME;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.app.backup.BackupManagerMonitor;
import android.app.backup.IBackupManagerMonitor;
diff --git a/services/backup/java/com/android/server/backup/utils/BackupObserverUtils.java b/services/backup/java/com/android/server/backup/utils/BackupObserverUtils.java
index 3be1e33..c0cf2ef 100644
--- a/services/backup/java/com/android/server/backup/utils/BackupObserverUtils.java
+++ b/services/backup/java/com/android/server/backup/utils/BackupObserverUtils.java
@@ -16,8 +16,8 @@
package com.android.server.backup.utils;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.app.backup.BackupProgress;
import android.app.backup.IBackupObserver;
diff --git a/services/backup/java/com/android/server/backup/utils/FullBackupRestoreObserverUtils.java b/services/backup/java/com/android/server/backup/utils/FullBackupRestoreObserverUtils.java
index 089109e..fa856ce 100644
--- a/services/backup/java/com/android/server/backup/utils/FullBackupRestoreObserverUtils.java
+++ b/services/backup/java/com/android/server/backup/utils/FullBackupRestoreObserverUtils.java
@@ -16,7 +16,7 @@
package com.android.server.backup.utils;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.app.backup.IFullBackupRestoreObserver;
import android.os.RemoteException;
diff --git a/services/backup/java/com/android/server/backup/utils/FullBackupUtils.java b/services/backup/java/com/android/server/backup/utils/FullBackupUtils.java
index a731fc9..d2ab099 100644
--- a/services/backup/java/com/android/server/backup/utils/FullBackupUtils.java
+++ b/services/backup/java/com/android/server/backup/utils/FullBackupUtils.java
@@ -16,8 +16,8 @@
package com.android.server.backup.utils;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_MANIFEST_VERSION;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.BACKUP_MANIFEST_VERSION;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
diff --git a/services/backup/java/com/android/server/backup/utils/PasswordUtils.java b/services/backup/java/com/android/server/backup/utils/PasswordUtils.java
index 9c5e283..a7eb644 100644
--- a/services/backup/java/com/android/server/backup/utils/PasswordUtils.java
+++ b/services/backup/java/com/android/server/backup/utils/PasswordUtils.java
@@ -16,7 +16,7 @@
package com.android.server.backup.utils;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.util.Slog;
diff --git a/services/backup/java/com/android/server/backup/utils/RestoreUtils.java b/services/backup/java/com/android/server/backup/utils/RestoreUtils.java
index 632f5b5..10f0695 100644
--- a/services/backup/java/com/android/server/backup/utils/RestoreUtils.java
+++ b/services/backup/java/com/android/server/backup/utils/RestoreUtils.java
@@ -16,8 +16,8 @@
package com.android.server.backup.utils;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.content.Context;
import android.content.IIntentReceiver;
diff --git a/services/backup/java/com/android/server/backup/utils/TarBackupReader.java b/services/backup/java/com/android/server/backup/utils/TarBackupReader.java
index ff9cb56..cc26ff8 100644
--- a/services/backup/java/com/android/server/backup/utils/TarBackupReader.java
+++ b/services/backup/java/com/android/server/backup/utils/TarBackupReader.java
@@ -34,14 +34,14 @@
import static android.app.backup.BackupManagerMonitor.LOG_EVENT_ID_VERSIONS_MATCH;
import static android.app.backup.BackupManagerMonitor.LOG_EVENT_ID_VERSION_OF_BACKUP_OLDER;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_MANIFEST_FILENAME;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_MANIFEST_VERSION;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_METADATA_FILENAME;
-import static com.android.server.backup.RefactoredBackupManagerService.BACKUP_WIDGET_METADATA_TOKEN;
-import static com.android.server.backup.RefactoredBackupManagerService.DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.MORE_DEBUG;
-import static com.android.server.backup.RefactoredBackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
-import static com.android.server.backup.RefactoredBackupManagerService.TAG;
+import static com.android.server.backup.BackupManagerService.BACKUP_MANIFEST_FILENAME;
+import static com.android.server.backup.BackupManagerService.BACKUP_MANIFEST_VERSION;
+import static com.android.server.backup.BackupManagerService.BACKUP_METADATA_FILENAME;
+import static com.android.server.backup.BackupManagerService.BACKUP_WIDGET_METADATA_TOKEN;
+import static com.android.server.backup.BackupManagerService.DEBUG;
+import static com.android.server.backup.BackupManagerService.MORE_DEBUG;
+import static com.android.server.backup.BackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
+import static com.android.server.backup.BackupManagerService.TAG;
import android.app.backup.BackupAgent;
import android.app.backup.BackupManagerMonitor;
diff --git a/services/core/java/com/android/server/AlarmManagerService.java b/services/core/java/com/android/server/AlarmManagerService.java
index 15c0f3c..342b48e 100644
--- a/services/core/java/com/android/server/AlarmManagerService.java
+++ b/services/core/java/com/android/server/AlarmManagerService.java
@@ -82,6 +82,7 @@
import java.util.TreeSet;
import java.util.function.Predicate;
+import static android.app.AlarmManager.FLAG_ALLOW_WHILE_IDLE;
import static android.app.AlarmManager.RTC_WAKEUP;
import static android.app.AlarmManager.RTC;
import static android.app.AlarmManager.ELAPSED_REALTIME_WAKEUP;
@@ -175,7 +176,6 @@
long mNextNonWakeupDeliveryTime;
long mLastTimeChangeClockTime;
long mLastTimeChangeRealtime;
- long mAllowWhileIdleMinTime;
int mNumTimeChanged;
// Bookkeeping about the identity of the "System UI" package, determined at runtime.
@@ -199,6 +199,12 @@
*/
final SparseLongArray mLastAllowWhileIdleDispatch = new SparseLongArray();
+ /**
+ * For each uid, we store whether the last allow-while-idle alarm was dispatched while
+ * the uid was in foreground or not. We will use the allow_while_idle_short_time in such cases.
+ */
+ final SparseBooleanArray mUseAllowWhileIdleShortTime = new SparseBooleanArray();
+
final static class IdleDispatchEntry {
int uid;
String pkg;
@@ -242,7 +248,6 @@
private static final String KEY_ALLOW_WHILE_IDLE_WHITELIST_DURATION
= "allow_while_idle_whitelist_duration";
private static final String KEY_LISTENER_TIMEOUT = "listener_timeout";
- private static final String KEY_BG_RESTRICTIONS_ENABLED = "limit_bg_alarms_enabled";
private static final long DEFAULT_MIN_FUTURITY = 5 * 1000;
private static final long DEFAULT_MIN_INTERVAL = 60 * 1000;
@@ -277,7 +282,6 @@
public Constants(Handler handler) {
super(handler);
- updateAllowWhileIdleMinTimeLocked();
updateAllowWhileIdleWhitelistDurationLocked();
}
@@ -288,11 +292,6 @@
updateConstants();
}
- public void updateAllowWhileIdleMinTimeLocked() {
- mAllowWhileIdleMinTime = mPendingIdleUntil != null
- ? ALLOW_WHILE_IDLE_LONG_TIME : ALLOW_WHILE_IDLE_SHORT_TIME;
- }
-
public void updateAllowWhileIdleWhitelistDurationLocked() {
if (mLastAllowWhileIdleWhitelistDuration != ALLOW_WHILE_IDLE_WHITELIST_DURATION) {
mLastAllowWhileIdleWhitelistDuration = ALLOW_WHILE_IDLE_WHITELIST_DURATION;
@@ -330,7 +329,6 @@
LISTENER_TIMEOUT = mParser.getLong(KEY_LISTENER_TIMEOUT,
DEFAULT_LISTENER_TIMEOUT);
- updateAllowWhileIdleMinTimeLocked();
updateAllowWhileIdleWhitelistDurationLocked();
}
}
@@ -967,9 +965,6 @@
}
}
- // Make sure we are using the correct ALLOW_WHILE_IDLE min time.
- mConstants.updateAllowWhileIdleMinTimeLocked();
-
// Reschedule everything.
rescheduleKernelAlarmsLocked();
updateNextAlarmClockLocked();
@@ -1421,7 +1416,6 @@
return;
}
}
-
if (RECORD_DEVICE_IDLE_ALARMS) {
if ((a.flags & AlarmManager.FLAG_ALLOW_WHILE_IDLE) != 0) {
IdleDispatchEntry ent = new IdleDispatchEntry();
@@ -1472,7 +1466,6 @@
}
mPendingIdleUntil = a;
- mConstants.updateAllowWhileIdleMinTimeLocked();
needRebatch = true;
} else if ((a.flags&AlarmManager.FLAG_WAKE_FROM_IDLE) != 0) {
if (mNextWakeFromIdle == null || mNextWakeFromIdle.whenElapsed > a.whenElapsed) {
@@ -1751,6 +1744,15 @@
if (!blocked) {
pw.println(" none");
}
+ pw.print(" mUseAllowWhileIdleShortTime: [");
+ for (int i = 0; i < mUseAllowWhileIdleShortTime.size(); i++) {
+ if (mUseAllowWhileIdleShortTime.valueAt(i)) {
+ UserHandle.formatUid(pw, mUseAllowWhileIdleShortTime.keyAt(i));
+ pw.print(" ");
+ }
+ }
+ pw.println("]");
+
if (mPendingIdleUntil != null || mPendingWhileIdleAlarms.size() > 0) {
pw.println();
pw.println(" Idle mode state:");
@@ -1803,9 +1805,6 @@
pw.println();
}
- pw.print(" mAllowWhileIdleMinTime=");
- TimeUtils.formatDuration(mAllowWhileIdleMinTime, pw);
- pw.println();
if (mLastAllowWhileIdleDispatch.size() > 0) {
pw.println(" Last allow while idle dispatch times:");
for (int i=0; i<mLastAllowWhileIdleDispatch.size(); i++) {
@@ -2072,8 +2071,6 @@
f.writeToProto(proto, AlarmManagerServiceProto.OUTSTANDING_DELIVERIES);
}
- proto.write(AlarmManagerServiceProto.ALLOW_WHILE_IDLE_MIN_DURATION_MS,
- mAllowWhileIdleMinTime);
for (int i = 0; i < mLastAllowWhileIdleDispatch.size(); ++i) {
final long token = proto.start(
AlarmManagerServiceProto.LAST_ALLOW_WHILE_IDLE_DISPATCH_TIMES);
@@ -2739,6 +2736,7 @@
}
private boolean isBackgroundRestricted(Alarm alarm) {
+ final boolean allowWhileIdle = (alarm.flags & FLAG_ALLOW_WHILE_IDLE) != 0;
if (alarm.alarmClock != null) {
// Don't block alarm clocks
return false;
@@ -2751,7 +2749,8 @@
final String sourcePackage =
(alarm.operation != null) ? alarm.operation.getCreatorPackage() : alarm.packageName;
final int sourceUid = alarm.creatorUid;
- return mForceAppStandbyTracker.areAlarmsRestricted(sourceUid, sourcePackage);
+ return mForceAppStandbyTracker.areAlarmsRestricted(sourceUid, sourcePackage,
+ allowWhileIdle);
}
private native long init();
@@ -2785,8 +2784,21 @@
if ((alarm.flags&AlarmManager.FLAG_ALLOW_WHILE_IDLE) != 0) {
// If this is an ALLOW_WHILE_IDLE alarm, we constrain how frequently the app can
// schedule such alarms.
- long lastTime = mLastAllowWhileIdleDispatch.get(alarm.uid, 0);
- long minTime = lastTime + mAllowWhileIdleMinTime;
+ final long lastTime = mLastAllowWhileIdleDispatch.get(alarm.creatorUid, 0);
+ final boolean dozing = mPendingIdleUntil != null;
+ final boolean ebs = mForceAppStandbyTracker.isForceAllAppsStandbyEnabled();
+ final long minTime;
+ if (!dozing && !ebs) {
+ minTime = lastTime + mConstants.ALLOW_WHILE_IDLE_SHORT_TIME;
+ } else if (dozing) {
+ minTime = lastTime + mConstants.ALLOW_WHILE_IDLE_LONG_TIME;
+ } else if (mUseAllowWhileIdleShortTime.get(alarm.creatorUid)) {
+ // if the last allow-while-idle went off while uid was fg, or the uid
+ // recently came into fg, don't block the alarm for long.
+ minTime = lastTime + mConstants.ALLOW_WHILE_IDLE_SHORT_TIME;
+ } else {
+ minTime = lastTime + mConstants.ALLOW_WHILE_IDLE_LONG_TIME;
+ }
if (nowELAPSED < minTime) {
// Whoops, it hasn't been long enough since the last ALLOW_WHILE_IDLE
// alarm went off for this app. Reschedule the alarm to be in the
@@ -3526,6 +3538,7 @@
@Override public void onUidGone(int uid, boolean disabled) {
synchronized (mLock) {
+ mUseAllowWhileIdleShortTime.delete(uid);
if (disabled) {
removeForStoppedLocked(uid);
}
@@ -3533,6 +3546,9 @@
}
@Override public void onUidActive(int uid) {
+ synchronized (mLock) {
+ mUseAllowWhileIdleShortTime.put(uid, true);
+ }
}
@Override public void onUidIdle(int uid, boolean disabled) {
@@ -3547,7 +3563,6 @@
}
};
-
private final Listener mForceAppStandbyListener = new Listener() {
@Override
public void unblockAllUnrestrictedAlarms() {
@@ -3829,7 +3844,12 @@
if (allowWhileIdle) {
// Record the last time this uid handled an ALLOW_WHILE_IDLE alarm.
- mLastAllowWhileIdleDispatch.put(alarm.uid, nowELAPSED);
+ mLastAllowWhileIdleDispatch.put(alarm.creatorUid, nowELAPSED);
+ if (mForceAppStandbyTracker.isInForeground(alarm.creatorUid)) {
+ mUseAllowWhileIdleShortTime.put(alarm.creatorUid, true);
+ } else {
+ mUseAllowWhileIdleShortTime.put(alarm.creatorUid, false);
+ }
if (RECORD_DEVICE_IDLE_ALARMS) {
IdleDispatchEntry ent = new IdleDispatchEntry();
ent.uid = alarm.uid;
diff --git a/services/core/java/com/android/server/AppOpsService.java b/services/core/java/com/android/server/AppOpsService.java
index f4675fd..894106a 100644
--- a/services/core/java/com/android/server/AppOpsService.java
+++ b/services/core/java/com/android/server/AppOpsService.java
@@ -39,6 +39,7 @@
import android.os.ServiceManager;
import android.os.ShellCallback;
import android.os.ShellCommand;
+import android.os.SystemClock;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.storage.StorageManagerInternal;
@@ -248,7 +249,7 @@
public AppOpsService(File storagePath, Handler handler) {
LockGuard.installLock(this, LockGuard.INDEX_APP_OPS);
- mFile = new AtomicFile(storagePath);
+ mFile = new AtomicFile(storagePath, "appops");
mHandler = handler;
readState();
}
@@ -1666,8 +1667,6 @@
void writeState() {
synchronized (mFile) {
- List<AppOpsManager.PackageOps> allOps = getPackagesForOps(null);
-
FileOutputStream stream;
try {
stream = mFile.startWrite();
@@ -1676,6 +1675,8 @@
return;
}
+ List<AppOpsManager.PackageOps> allOps = getPackagesForOps(null);
+
try {
XmlSerializer out = new FastXmlSerializer();
out.setOutput(stream, StandardCharsets.UTF_8.name());
diff --git a/services/core/java/com/android/server/BatteryService.java b/services/core/java/com/android/server/BatteryService.java
index dc5f5a2..8265262 100644
--- a/services/core/java/com/android/server/BatteryService.java
+++ b/services/core/java/com/android/server/BatteryService.java
@@ -43,17 +43,17 @@
import android.hardware.health.V2_0.IHealth;
import android.hardware.health.V2_0.Result;
import android.os.BatteryManager;
-import android.os.BatteryManagerProto;
import android.os.BatteryManagerInternal;
import android.os.BatteryProperty;
import android.os.Binder;
+import android.os.DropBoxManager;
import android.os.FileUtils;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBatteryPropertiesListener;
import android.os.IBatteryPropertiesRegistrar;
import android.os.IBinder;
-import android.os.DropBoxManager;
+import android.os.OsProtoEnums;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
@@ -127,7 +127,7 @@
private static final String DUMPSYS_DATA_PATH = "/data/system/";
// This should probably be exposed in the API, though it's not critical
- private static final int BATTERY_PLUGGED_NONE = 0;
+ private static final int BATTERY_PLUGGED_NONE = OsProtoEnums.BATTERY_PLUGGED_NONE; // = 0
private final Context mContext;
private final IBatteryStats mBatteryStats;
@@ -835,6 +835,9 @@
case "level":
mHealthInfo.batteryLevel = Integer.parseInt(value);
break;
+ case "counter":
+ mHealthInfo.batteryChargeCounter = Integer.parseInt(value);
+ break;
case "temp":
mHealthInfo.batteryTemperature = Integer.parseInt(value);
break;
@@ -921,13 +924,13 @@
synchronized (mLock) {
proto.write(BatteryServiceDumpProto.ARE_UPDATES_STOPPED, mUpdatesStopped);
- int batteryPluggedValue = BatteryManagerProto.PLUG_TYPE_NONE;
+ int batteryPluggedValue = OsProtoEnums.BATTERY_PLUGGED_NONE;
if (mHealthInfo.chargerAcOnline) {
- batteryPluggedValue = BatteryManagerProto.PLUG_TYPE_AC;
+ batteryPluggedValue = OsProtoEnums.BATTERY_PLUGGED_AC;
} else if (mHealthInfo.chargerUsbOnline) {
- batteryPluggedValue = BatteryManagerProto.PLUG_TYPE_USB;
+ batteryPluggedValue = OsProtoEnums.BATTERY_PLUGGED_USB;
} else if (mHealthInfo.chargerWirelessOnline) {
- batteryPluggedValue = BatteryManagerProto.PLUG_TYPE_WIRELESS;
+ batteryPluggedValue = OsProtoEnums.BATTERY_PLUGGED_WIRELESS;
}
proto.write(BatteryServiceDumpProto.PLUGGED, batteryPluggedValue);
proto.write(BatteryServiceDumpProto.MAX_CHARGING_CURRENT, mHealthInfo.maxChargingCurrent);
@@ -1164,6 +1167,20 @@
}
@Override
+ public int getBatteryChargeCounter() {
+ synchronized (mLock) {
+ return mHealthInfo.batteryChargeCounter;
+ }
+ }
+
+ @Override
+ public int getBatteryFullCharge() {
+ synchronized (mLock) {
+ return mHealthInfo.batteryFullCharge;
+ }
+ }
+
+ @Override
public boolean getBatteryLevelLow() {
synchronized (mLock) {
return mBatteryLevelLow;
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 5030dce..3bfa31a 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -30,6 +30,7 @@
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_METERED;
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED;
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_VPN;
import static android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED;
import static android.net.NetworkCapabilities.TRANSPORT_VPN;
@@ -106,6 +107,7 @@
import android.security.KeyStore;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
+import android.util.ArraySet;
import android.util.LocalLog;
import android.util.LocalLog.ReadOnlyLocalLog;
import android.util.Log;
@@ -138,6 +140,7 @@
import com.android.server.connectivity.KeepaliveTracker;
import com.android.server.connectivity.LingerMonitor;
import com.android.server.connectivity.MockableSystemProperties;
+import com.android.server.connectivity.MultipathPolicyTracker;
import com.android.server.connectivity.NetworkAgentInfo;
import com.android.server.connectivity.NetworkDiagnostics;
import com.android.server.connectivity.NetworkMonitor;
@@ -176,6 +179,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
@@ -455,8 +459,8 @@
private LingerMonitor mLingerMonitor;
// sequence number for Networks; keep in sync with system/netd/NetworkController.cpp
- private final static int MIN_NET_ID = 100; // some reserved marks
- private final static int MAX_NET_ID = 65535;
+ private static final int MIN_NET_ID = 100; // some reserved marks
+ private static final int MAX_NET_ID = 65535 - 0x0400; // Top 1024 bits reserved by IpSecService
private int mNextNetId = MIN_NET_ID;
// sequence number of NetworkRequests
@@ -508,6 +512,9 @@
@VisibleForTesting
final MultinetworkPolicyTracker mMultinetworkPolicyTracker;
+ @VisibleForTesting
+ final MultipathPolicyTracker mMultipathPolicyTracker;
+
/**
* Implements support for the legacy "one network per network type" model.
*
@@ -733,12 +740,12 @@
mSystemProperties = getSystemProperties();
mMetricsLog = logger;
- mDefaultRequest = createInternetRequestForTransport(-1, NetworkRequest.Type.REQUEST);
+ mDefaultRequest = createDefaultInternetRequestForTransport(-1, NetworkRequest.Type.REQUEST);
NetworkRequestInfo defaultNRI = new NetworkRequestInfo(null, mDefaultRequest, new Binder());
mNetworkRequests.put(mDefaultRequest, defaultNRI);
mNetworkRequestInfoLogs.log("REGISTER " + defaultNRI);
- mDefaultMobileDataRequest = createInternetRequestForTransport(
+ mDefaultMobileDataRequest = createDefaultInternetRequestForTransport(
NetworkCapabilities.TRANSPORT_CELLULAR, NetworkRequest.Type.BACKGROUND_REQUEST);
mHandlerThread = new HandlerThread("ConnectivityServiceThread");
@@ -891,6 +898,8 @@
mContext, mHandler, () -> rematchForAvoidBadWifiUpdate());
mMultinetworkPolicyTracker.start();
+ mMultipathPolicyTracker = new MultipathPolicyTracker(mContext, mHandler);
+
mDnsManager = new DnsManager(mContext, mNetd, mSystemProperties);
registerPrivateDnsSettingsCallbacks();
}
@@ -903,7 +912,7 @@
deps);
}
- private NetworkRequest createInternetRequestForTransport(
+ private NetworkRequest createDefaultInternetRequestForTransport(
int transportType, NetworkRequest.Type type) {
NetworkCapabilities netCap = new NetworkCapabilities();
netCap.addCapability(NET_CAPABILITY_INTERNET);
@@ -1281,7 +1290,11 @@
for (Network network : networks) {
nai = getNetworkAgentInfoForNetwork(network);
nc = getNetworkCapabilitiesInternal(nai);
+ // nc is a copy of the capabilities in nai, so it's fine to mutate it
+ // TODO : don't remove the UIDs when communicating with processes
+ // that have the NETWORK_SETTINGS permission.
if (nc != null) {
+ nc.setSingleUid(userId);
result.put(network, nc);
}
}
@@ -1967,6 +1980,9 @@
pw.println();
dumpAvoidBadWifiSettings(pw);
+ pw.println();
+ mMultipathPolicyTracker.dump(pw);
+
if (argsContain(args, SHORT_ARG) == false) {
pw.println();
synchronized (mValidationLogs) {
@@ -2079,24 +2095,6 @@
if (score != null) updateNetworkScore(nai, score.intValue());
break;
}
- case NetworkAgent.EVENT_UID_RANGES_ADDED: {
- try {
- mNetd.addVpnUidRanges(nai.network.netId, (UidRange[])msg.obj);
- } catch (Exception e) {
- // Never crash!
- loge("Exception in addVpnUidRanges: " + e);
- }
- break;
- }
- case NetworkAgent.EVENT_UID_RANGES_REMOVED: {
- try {
- mNetd.removeVpnUidRanges(nai.network.netId, (UidRange[])msg.obj);
- } catch (Exception e) {
- // Never crash!
- loge("Exception in removeVpnUidRanges: " + e);
- }
- break;
- }
case NetworkAgent.EVENT_SET_EXPLICITLY_SELECTED: {
if (nai.everConnected && !nai.networkMisc.explicitlySelected) {
loge("ERROR: already-connected network explicitly selected.");
@@ -2902,6 +2900,11 @@
return ConnectivityManager.MULTIPATH_PREFERENCE_UNMETERED;
}
+ Integer networkPreference = mMultipathPolicyTracker.getMultipathPreference(network);
+ if (networkPreference != null) {
+ return networkPreference;
+ }
+
return mMultinetworkPolicyTracker.getMeteredMultipathPreference();
}
@@ -2995,6 +2998,7 @@
for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
nai.networkMonitor.systemReady = true;
}
+ mMultipathPolicyTracker.start();
break;
}
case EVENT_REVALIDATE_NETWORK: {
@@ -4235,6 +4239,7 @@
// the system default network.
if (type == NetworkRequest.Type.TRACK_DEFAULT) {
networkCapabilities = new NetworkCapabilities(mDefaultRequest.networkCapabilities);
+ networkCapabilities.removeCapability(NET_CAPABILITY_NOT_VPN);
enforceAccessPermission();
} else {
networkCapabilities = new NetworkCapabilities(networkCapabilities);
@@ -4245,6 +4250,13 @@
enforceMeteredApnPolicy(networkCapabilities);
}
ensureRequestableCapabilities(networkCapabilities);
+ // Set the UID range for this request to the single UID of the requester.
+ // This will overwrite any allowed UIDs in the requested capabilities. Though there
+ // are no visible methods to set the UIDs, an app could use reflection to try and get
+ // networks for other apps so it's essential that the UIDs are overwritten.
+ // TODO : don't forcefully set the UID when communicating with processes
+ // that have the NETWORK_SETTINGS permission.
+ networkCapabilities.setSingleUid(Binder.getCallingUid());
if (timeoutMs < 0) {
throw new IllegalArgumentException("Bad timeout specified");
@@ -4318,6 +4330,9 @@
enforceMeteredApnPolicy(networkCapabilities);
ensureRequestableCapabilities(networkCapabilities);
ensureValidNetworkSpecifier(networkCapabilities);
+ // TODO : don't forcefully set the UID when communicating with processes
+ // that have the NETWORK_SETTINGS permission.
+ networkCapabilities.setSingleUid(Binder.getCallingUid());
NetworkRequest networkRequest = new NetworkRequest(networkCapabilities, TYPE_NONE,
nextNetworkRequestId(), NetworkRequest.Type.REQUEST);
@@ -4371,6 +4386,9 @@
}
NetworkCapabilities nc = new NetworkCapabilities(networkCapabilities);
+ // TODO : don't forcefully set the UIDs when communicating with processes
+ // that have the NETWORK_SETTINGS permission.
+ nc.setSingleUid(Binder.getCallingUid());
if (!ConnectivityManager.checkChangePermission(mContext)) {
// Apps without the CHANGE_NETWORK_STATE permission can't use background networks, so
// make all their listens include NET_CAPABILITY_FOREGROUND. That way, they will get
@@ -4399,8 +4417,12 @@
}
ensureValidNetworkSpecifier(networkCapabilities);
- NetworkRequest networkRequest = new NetworkRequest(
- new NetworkCapabilities(networkCapabilities), TYPE_NONE, nextNetworkRequestId(),
+ final NetworkCapabilities nc = new NetworkCapabilities(networkCapabilities);
+ // TODO : don't forcefully set the UIDs when communicating with processes
+ // that have the NETWORK_SETTINGS permission.
+ nc.setSingleUid(Binder.getCallingUid());
+
+ NetworkRequest networkRequest = new NetworkRequest(nc, TYPE_NONE, nextNetworkRequestId(),
NetworkRequest.Type.LISTEN);
NetworkRequestInfo nri = new NetworkRequestInfo(networkRequest, operation);
if (VDBG) log("pendingListenForNetwork for " + nri);
@@ -4543,6 +4565,7 @@
NetworkInfo networkInfo = na.networkInfo;
na.networkInfo = null;
updateNetworkInfo(na, networkInfo);
+ updateUids(na, null, na.networkCapabilities);
}
private void updateLinkProperties(NetworkAgentInfo networkAgent, LinkProperties oldLp) {
@@ -4791,6 +4814,8 @@
nai.networkCapabilities = newNc;
}
+ updateUids(nai, prevNc, newNc);
+
if (nai.getCurrentScore() == oldScore && newNc.equalRequestableCapabilities(prevNc)) {
// If the requestable capabilities haven't changed, and the score hasn't changed, then
// the change we're processing can't affect any requests, it can only affect the listens
@@ -4827,6 +4852,34 @@
}
}
+ private void updateUids(NetworkAgentInfo nai, NetworkCapabilities prevNc,
+ NetworkCapabilities newNc) {
+ Set<UidRange> prevRanges = null == prevNc ? null : prevNc.getUids();
+ Set<UidRange> newRanges = null == newNc ? null : newNc.getUids();
+ if (null == prevRanges) prevRanges = new ArraySet<>();
+ if (null == newRanges) newRanges = new ArraySet<>();
+ final Set<UidRange> prevRangesCopy = new ArraySet<>(prevRanges);
+
+ prevRanges.removeAll(newRanges);
+ newRanges.removeAll(prevRangesCopy);
+
+ try {
+ if (!newRanges.isEmpty()) {
+ final UidRange[] addedRangesArray = new UidRange[newRanges.size()];
+ newRanges.toArray(addedRangesArray);
+ mNetd.addVpnUidRanges(nai.network.netId, addedRangesArray);
+ }
+ if (!prevRanges.isEmpty()) {
+ final UidRange[] removedRangesArray = new UidRange[prevRanges.size()];
+ prevRanges.toArray(removedRangesArray);
+ mNetd.removeVpnUidRanges(nai.network.netId, removedRangesArray);
+ }
+ } catch (Exception e) {
+ // Never crash!
+ loge("Exception in updateUids: " + e);
+ }
+ }
+
public void handleUpdateLinkProperties(NetworkAgentInfo nai, LinkProperties newLp) {
if (mNetworkForNetId.get(nai.network.netId) != nai) {
// Ignore updates for disconnected networks
@@ -4918,7 +4971,12 @@
break;
}
case ConnectivityManager.CALLBACK_CAP_CHANGED: {
- putParcelable(bundle, new NetworkCapabilities(networkAgent.networkCapabilities));
+ final NetworkCapabilities nc =
+ new NetworkCapabilities(networkAgent.networkCapabilities);
+ // TODO : don't remove the UIDs when communicating with processes
+ // that have the NETWORK_SETTINGS permission.
+ nc.setSingleUid(nri.mUid);
+ putParcelable(bundle, nc);
break;
}
case ConnectivityManager.CALLBACK_IP_CHANGED: {
@@ -5442,6 +5500,7 @@
}
}
}
+ updateUids(networkAgent, networkAgent.networkCapabilities, null);
}
} else if ((oldInfo != null && oldInfo.getState() == NetworkInfo.State.SUSPENDED) ||
state == NetworkInfo.State.SUSPENDED) {
diff --git a/services/core/java/com/android/server/EventLogTags.logtags b/services/core/java/com/android/server/EventLogTags.logtags
index 732ac66..219facd 100644
--- a/services/core/java/com/android/server/EventLogTags.logtags
+++ b/services/core/java/com/android/server/EventLogTags.logtags
@@ -34,6 +34,7 @@
2731 power_soft_sleep_requested (savedwaketimems|2)
# Power save state has changed. See BatterySaverController.java for the details.
2739 battery_saver_mode (prevOffOrOn|1|5),(nowOffOrOn|1|5),(interactive|1|5),(features|3|5)
+27390 battery_saving_stats (batterySaver|1|5),(interactive|1|5),(doze|1|5),(delta_duration|2|3),(delta_battery_drain|1|6),(total_duration|2|3),(total_battery_drain|1|6)
#
# Leave IDs through 2740 for more power logs (2730 used by battery_discharge above)
diff --git a/services/core/java/com/android/server/ForceAppStandbyTracker.java b/services/core/java/com/android/server/ForceAppStandbyTracker.java
index de113a6..7604044 100644
--- a/services/core/java/com/android/server/ForceAppStandbyTracker.java
+++ b/services/core/java/com/android/server/ForceAppStandbyTracker.java
@@ -17,10 +17,14 @@
import android.annotation.NonNull;
import android.app.ActivityManager;
+import android.app.ActivityManagerInternal;
import android.app.AppOpsManager;
import android.app.AppOpsManager.PackageOps;
import android.app.IActivityManager;
import android.app.IUidObserver;
+import android.app.usage.UsageStatsManager;
+import android.app.usage.UsageStatsManagerInternal;
+import android.app.usage.UsageStatsManagerInternal.AppIdleStateChangeListener;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -41,6 +45,7 @@
import android.util.Pair;
import android.util.Slog;
import android.util.SparseBooleanArray;
+import android.util.SparseSetArray;
import android.util.proto.ProtoOutputStream;
import com.android.internal.annotations.GuardedBy;
@@ -49,6 +54,7 @@
import com.android.internal.app.IAppOpsService;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.Preconditions;
+import com.android.server.ForceAppStandbyTrackerProto.ExemptedPackage;
import com.android.server.ForceAppStandbyTrackerProto.RunAnyInBackgroundRestrictedPackages;
import java.io.PrintWriter;
@@ -73,7 +79,7 @@
*/
public class ForceAppStandbyTracker {
private static final String TAG = "ForceAppStandbyTracker";
- private static final boolean DEBUG = false;
+ private static final boolean DEBUG = true;
@GuardedBy("ForceAppStandbyTracker.class")
private static ForceAppStandbyTracker sInstance;
@@ -88,6 +94,8 @@
AppOpsManager mAppOpsManager;
IAppOpsService mAppOpsService;
PowerManagerInternal mPowerManagerInternal;
+ StandbyTracker mStandbyTracker;
+ UsageStatsManagerInternal mUsageStatsManagerInternal;
private final MyHandler mHandler;
@@ -112,6 +120,12 @@
@GuardedBy("mLock")
private int[] mTempWhitelistedAppIds = mPowerWhitelistedAllAppIds;
+ /**
+ * Per-user packages that are in the EXEMPT bucket.
+ */
+ @GuardedBy("mLock")
+ private final SparseSetArray<String> mExemptedPackages = new SparseSetArray<>();
+
@GuardedBy("mLock")
final ArraySet<Listener> mListeners = new ArraySet<>();
@@ -145,6 +159,28 @@
@GuardedBy("mLock")
boolean mForcedAppStandbyEnabled;
+ interface Stats {
+ int UID_STATE_CHANGED = 0;
+ int RUN_ANY_CHANGED = 1;
+ int ALL_UNWHITELISTED = 2;
+ int ALL_WHITELIST_CHANGED = 3;
+ int TEMP_WHITELIST_CHANGED = 4;
+ int EXEMPT_CHANGED = 5;
+ int FORCE_ALL_CHANGED = 6;
+ int FORCE_APP_STANDBY_FEATURE_FLAG_CHANGED = 7;
+ }
+
+ private final StatLogger mStatLogger = new StatLogger(new String[] {
+ "UID_STATE_CHANGED",
+ "RUN_ANY_CHANGED",
+ "ALL_UNWHITELISTED",
+ "ALL_WHITELIST_CHANGED",
+ "TEMP_WHITELIST_CHANGED",
+ "EXEMPT_CHANGED",
+ "FORCE_ALL_CHANGED",
+ "FORCE_APP_STANDBY_FEATURE_FLAG_CHANGED",
+ });
+
@VisibleForTesting
class FeatureFlagsObserver extends ContentObserver {
FeatureFlagsObserver() {
@@ -161,12 +197,11 @@
}
boolean isForcedAppStandbyEnabled() {
- return Settings.Global.getInt(mContext.getContentResolver(),
- Settings.Global.FORCED_APP_STANDBY_ENABLED, 1) == 1;
+ return injectGetGlobalSettingInt(Settings.Global.FORCED_APP_STANDBY_ENABLED, 1) == 1;
}
boolean isForcedAppStandbyForSmallBatteryEnabled() {
- return Settings.Global.getInt(mContext.getContentResolver(),
+ return injectGetGlobalSettingInt(
Settings.Global.FORCED_APP_STANDBY_FOR_SMALL_BATTERY_ENABLED, 0) == 1;
}
@@ -213,8 +248,11 @@
int uid, @NonNull String packageName) {
updateJobsForUidPackage(uid, packageName);
- if (!sender.areAlarmsRestricted(uid, packageName)) {
+ if (!sender.areAlarmsRestricted(uid, packageName, /*allowWhileIdle=*/ false)) {
unblockAlarmsForUidPackage(uid, packageName);
+ } else if (!sender.areAlarmsRestricted(uid, packageName, /*allowWhileIdle=*/ true)){
+ // we need to deliver the allow-while-idle alarms for this uid, package
+ unblockAllUnrestrictedAlarms();
}
}
@@ -254,6 +292,17 @@
// only for affected app-ids.
updateAllJobs();
+
+ // Note when an app is just put in the temp whitelist, we do *not* drain pending alarms.
+ }
+
+ /**
+ * This is called when the EXEMPT bucket is updated.
+ */
+ private void onExemptChanged(ForceAppStandbyTracker sender) {
+ // This doesn't happen very often, so just re-evaluate all jobs / alarms.
+ updateAllJobs();
+ unblockAllUnrestrictedAlarms();
}
/**
@@ -342,11 +391,16 @@
mAppOpsManager = Preconditions.checkNotNull(injectAppOpsManager());
mAppOpsService = Preconditions.checkNotNull(injectIAppOpsService());
mPowerManagerInternal = Preconditions.checkNotNull(injectPowerManagerInternal());
+ mUsageStatsManagerInternal = Preconditions.checkNotNull(
+ injectUsageStatsManagerInternal());
+
mFlagsObserver = new FeatureFlagsObserver();
mFlagsObserver.register();
mForcedAppStandbyEnabled = mFlagsObserver.isForcedAppStandbyEnabled();
mForceAllAppStandbyForSmallBattery =
mFlagsObserver.isForcedAppStandbyForSmallBatteryEnabled();
+ mStandbyTracker = new StandbyTracker();
+ mUsageStatsManagerInternal.addAppIdleStateChangeListener(mStandbyTracker);
try {
mIActivityManager.registerUidObserver(new UidObserver(),
@@ -404,10 +458,20 @@
}
@VisibleForTesting
+ UsageStatsManagerInternal injectUsageStatsManagerInternal() {
+ return LocalServices.getService(UsageStatsManagerInternal.class);
+ }
+
+ @VisibleForTesting
boolean isSmallBatteryDevice() {
return ActivityManager.isSmallBatteryDevice();
}
+ @VisibleForTesting
+ int injectGetGlobalSettingInt(String key, int def) {
+ return Settings.Global.getInt(mContext.getContentResolver(), key, def);
+ }
+
/**
* Update {@link #mRunAnyRestrictedPackages} with the current app ops state.
*/
@@ -504,7 +568,7 @@
*/
void uidToForeground(int uid) {
synchronized (mLock) {
- if (!UserHandle.isApp(uid)) {
+ if (UserHandle.isCore(uid)) {
return;
}
// TODO This can be optimized by calling indexOfKey and sharing the index for get and
@@ -522,7 +586,7 @@
*/
void uidToBackground(int uid, boolean remove) {
synchronized (mLock) {
- if (!UserHandle.isApp(uid)) {
+ if (UserHandle.isCore(uid)) {
return;
}
// TODO This can be optimized by calling indexOfKey and sharing the index for get and
@@ -600,6 +664,30 @@
}
}
+ final class StandbyTracker extends AppIdleStateChangeListener {
+ @Override
+ public void onAppIdleStateChanged(String packageName, int userId, boolean idle,
+ int bucket) {
+ if (DEBUG) {
+ Slog.d(TAG,"onAppIdleStateChanged: " + packageName + " u" + userId
+ + (idle ? " idle" : " active") + " " + bucket);
+ }
+ final boolean changed;
+ if (bucket == UsageStatsManager.STANDBY_BUCKET_EXEMPTED) {
+ changed = mExemptedPackages.add(userId, packageName);
+ } else {
+ changed = mExemptedPackages.remove(userId, packageName);
+ }
+ if (changed) {
+ mHandler.notifyExemptChanged();
+ }
+ }
+
+ @Override
+ public void onParoleStateChanged(boolean isParoleOn) {
+ }
+ }
+
private Listener[] cloneListeners() {
synchronized (mLock) {
return mListeners.toArray(new Listener[mListeners.size()]);
@@ -615,6 +703,7 @@
private static final int MSG_FORCE_ALL_CHANGED = 6;
private static final int MSG_USER_REMOVED = 7;
private static final int MSG_FORCE_APP_STANDBY_FEATURE_FLAG_CHANGED = 8;
+ private static final int MSG_EXEMPT_CHANGED = 9;
public MyHandler(Looper looper) {
super(looper);
@@ -648,6 +737,10 @@
obtainMessage(MSG_FORCE_APP_STANDBY_FEATURE_FLAG_CHANGED).sendToTarget();
}
+ public void notifyExemptChanged() {
+ obtainMessage(MSG_EXEMPT_CHANGED).sendToTarget();
+ }
+
public void doUserRemoved(int userId) {
obtainMessage(MSG_USER_REMOVED, userId, 0).sendToTarget();
}
@@ -668,50 +761,73 @@
}
final ForceAppStandbyTracker sender = ForceAppStandbyTracker.this;
+ long start = mStatLogger.getTime();
switch (msg.what) {
case MSG_UID_STATE_CHANGED:
for (Listener l : cloneListeners()) {
l.onUidForegroundStateChanged(sender, msg.arg1);
}
+ mStatLogger.logDurationStat(Stats.UID_STATE_CHANGED, start);
return;
+
case MSG_RUN_ANY_CHANGED:
for (Listener l : cloneListeners()) {
l.onRunAnyAppOpsChanged(sender, msg.arg1, (String) msg.obj);
}
+ mStatLogger.logDurationStat(Stats.RUN_ANY_CHANGED, start);
return;
+
case MSG_ALL_UNWHITELISTED:
for (Listener l : cloneListeners()) {
l.onPowerSaveUnwhitelisted(sender);
}
+ mStatLogger.logDurationStat(Stats.ALL_UNWHITELISTED, start);
return;
+
case MSG_ALL_WHITELIST_CHANGED:
for (Listener l : cloneListeners()) {
l.onPowerSaveWhitelistedChanged(sender);
}
+ mStatLogger.logDurationStat(Stats.ALL_WHITELIST_CHANGED, start);
return;
+
case MSG_TEMP_WHITELIST_CHANGED:
for (Listener l : cloneListeners()) {
l.onTempPowerSaveWhitelistChanged(sender);
}
+ mStatLogger.logDurationStat(Stats.TEMP_WHITELIST_CHANGED, start);
return;
+
+ case MSG_EXEMPT_CHANGED:
+ for (Listener l : cloneListeners()) {
+ l.onExemptChanged(sender);
+ }
+ mStatLogger.logDurationStat(Stats.EXEMPT_CHANGED, start);
+ return;
+
case MSG_FORCE_ALL_CHANGED:
for (Listener l : cloneListeners()) {
l.onForceAllAppsStandbyChanged(sender);
}
+ mStatLogger.logDurationStat(Stats.FORCE_ALL_CHANGED, start);
return;
+
case MSG_FORCE_APP_STANDBY_FEATURE_FLAG_CHANGED:
// Feature flag for forced app standby changed.
final boolean unblockAlarms;
synchronized (mLock) {
unblockAlarms = !mForcedAppStandbyEnabled && !mForceAllAppsStandby;
}
- for (Listener l: cloneListeners()) {
+ for (Listener l : cloneListeners()) {
l.updateAllJobs();
if (unblockAlarms) {
l.unblockAllUnrestrictedAlarms();
}
}
+ mStatLogger.logDurationStat(
+ Stats.FORCE_APP_STANDBY_FEATURE_FLAG_CHANGED, start);
return;
+
case MSG_USER_REMOVED:
handleUserRemoved(msg.arg1);
return;
@@ -738,6 +854,7 @@
mForegroundUids.removeAt(i);
}
}
+ mExemptedPackages.remove(removedUserId);
}
}
@@ -817,17 +934,19 @@
/**
* @return whether alarms should be restricted for a UID package-name.
*/
- public boolean areAlarmsRestricted(int uid, @NonNull String packageName) {
+ public boolean areAlarmsRestricted(int uid, @NonNull String packageName,
+ boolean allowWhileIdle) {
return isRestricted(uid, packageName, /*useTempWhitelistToo=*/ false,
- /* exemptOnBatterySaver =*/ false);
+ /* exemptOnBatterySaver =*/ allowWhileIdle);
}
/**
* @return whether jobs should be restricted for a UID package-name.
*/
- public boolean areJobsRestricted(int uid, @NonNull String packageName) {
+ public boolean areJobsRestricted(int uid, @NonNull String packageName,
+ boolean hasForegroundExemption) {
return isRestricted(uid, packageName, /*useTempWhitelistToo=*/ true,
- /* exemptOnBatterySaver =*/ false);
+ hasForegroundExemption);
}
/**
@@ -854,6 +973,10 @@
if (exemptOnBatterySaver) {
return false;
}
+ final int userId = UserHandle.getUserId(uid);
+ if (mExemptedPackages.contains(userId, packageName)) {
+ return false;
+ }
return mForceAllAppsStandby;
}
}
@@ -861,10 +984,12 @@
/**
* @return whether a UID is in the foreground or not.
*
- * Note clients normally shouldn't need to access it. It's only for dumpsys.
+ * Note this information is based on the UID proc state callback, meaning it's updated
+ * asynchronously and may subtly be stale. If the fresh data is needed, use
+ * {@link ActivityManagerInternal#getUidProcessState} instead.
*/
public boolean isInForeground(int uid) {
- if (!UserHandle.isApp(uid)) {
+ if (UserHandle.isCore(uid)) {
return true;
}
synchronized (mLock) {
@@ -875,7 +1000,6 @@
/**
* @return whether force all apps standby is enabled or not.
*
- * Note clients normally shouldn't need to access it.
*/
boolean isForceAllAppsStandbyEnabled() {
synchronized (mLock) {
@@ -959,6 +1083,23 @@
pw.println(Arrays.toString(mTempWhitelistedAppIds));
pw.print(indent);
+ pw.println("Exempted packages:");
+ for (int i = 0; i < mExemptedPackages.size(); i++) {
+ pw.print(indent);
+ pw.print(" User ");
+ pw.print(mExemptedPackages.keyAt(i));
+ pw.println();
+
+ for (int j = 0; j < mExemptedPackages.sizeAt(i); j++) {
+ pw.print(indent);
+ pw.print(" ");
+ pw.print(mExemptedPackages.valueAt(i, j));
+ pw.println();
+ }
+ }
+ pw.println();
+
+ pw.print(indent);
pw.println("Restricted packages:");
for (Pair<Integer, String> uidAndPackage : mRunAnyRestrictedPackages) {
pw.print(indent);
@@ -968,6 +1109,8 @@
pw.print(uidAndPackage.second);
pw.println();
}
+
+ mStatLogger.dump(pw, indent);
}
}
@@ -980,7 +1123,7 @@
isSmallBatteryDevice());
proto.write(ForceAppStandbyTrackerProto.FORCE_ALL_APPS_STANDBY_FOR_SMALL_BATTERY,
mForceAllAppStandbyForSmallBattery);
- proto.write(ForceAppStandbyTrackerProto.IS_CHARGING, mIsPluggedIn);
+ proto.write(ForceAppStandbyTrackerProto.IS_PLUGGED_IN, mIsPluggedIn);
for (int i = 0; i < mForegroundUids.size(); i++) {
if (mForegroundUids.valueAt(i)) {
@@ -997,6 +1140,18 @@
proto.write(ForceAppStandbyTrackerProto.TEMP_POWER_SAVE_WHITELIST_APP_IDS, appId);
}
+ for (int i = 0; i < mExemptedPackages.size(); i++) {
+ for (int j = 0; j < mExemptedPackages.sizeAt(i); j++) {
+ final long token2 = proto.start(
+ ForceAppStandbyTrackerProto.EXEMPTED_PACKAGES);
+
+ proto.write(ExemptedPackage.USER_ID, mExemptedPackages.keyAt(i));
+ proto.write(ExemptedPackage.PACKAGE_NAME, mExemptedPackages.valueAt(i, j));
+
+ proto.end(token2);
+ }
+ }
+
for (Pair<Integer, String> uidAndPackage : mRunAnyRestrictedPackages) {
final long token2 = proto.start(
ForceAppStandbyTrackerProto.RUN_ANY_IN_BACKGROUND_RESTRICTED_PACKAGES);
@@ -1005,6 +1160,9 @@
uidAndPackage.second);
proto.end(token2);
}
+
+ mStatLogger.dumpProto(proto, ForceAppStandbyTrackerProto.STATS);
+
proto.end(token);
}
}
diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java
index 21137ad..fc91d0d 100644
--- a/services/core/java/com/android/server/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/InputMethodManagerService.java
@@ -4306,7 +4306,7 @@
Slog.w(TAG, "Couldn't create dir.: " + inputMethodDir.getAbsolutePath());
}
final File subtypeFile = new File(inputMethodDir, ADDITIONAL_SUBTYPES_FILE_NAME);
- mAdditionalInputMethodSubtypeFile = new AtomicFile(subtypeFile);
+ mAdditionalInputMethodSubtypeFile = new AtomicFile(subtypeFile, "input-subtypes");
if (!subtypeFile.exists()) {
// If "subtypes.xml" doesn't exist, create a blank file.
writeAdditionalInputMethodSubtypes(
diff --git a/services/core/java/com/android/server/IpSecService.java b/services/core/java/com/android/server/IpSecService.java
index 24d493e..fe4ac6d7 100644
--- a/services/core/java/com/android/server/IpSecService.java
+++ b/services/core/java/com/android/server/IpSecService.java
@@ -34,7 +34,9 @@
import android.net.IpSecSpiResponse;
import android.net.IpSecTransform;
import android.net.IpSecTransformResponse;
+import android.net.IpSecTunnelInterfaceResponse;
import android.net.IpSecUdpEncapResponse;
+import android.net.Network;
import android.net.NetworkUtils;
import android.net.TrafficStats;
import android.net.util.NetdService;
@@ -50,6 +52,7 @@
import android.util.Log;
import android.util.Slog;
import android.util.SparseArray;
+import android.util.SparseBooleanArray;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
@@ -99,6 +102,7 @@
static final int FREE_PORT_MIN = 1024; // ports 1-1023 are reserved
static final int PORT_MAX = 0xFFFF; // ports are an unsigned 16-bit integer
+ static final String TUNNEL_INTERFACE_PREFIX = "ipsec";
/* Binder context for this service */
private final Context mContext;
@@ -347,6 +351,7 @@
@VisibleForTesting
static final class UserRecord {
/* Maximum number of each type of resource that a single UID may possess */
+ public static final int MAX_NUM_TUNNEL_INTERFACES = 2;
public static final int MAX_NUM_ENCAP_SOCKETS = 2;
public static final int MAX_NUM_TRANSFORMS = 4;
public static final int MAX_NUM_SPIS = 8;
@@ -366,6 +371,8 @@
new RefcountedResourceArray<>(TransformRecord.class.getSimpleName());
final RefcountedResourceArray<EncapSocketRecord> mEncapSocketRecords =
new RefcountedResourceArray<>(EncapSocketRecord.class.getSimpleName());
+ final RefcountedResourceArray<TunnelInterfaceRecord> mTunnelInterfaceRecords =
+ new RefcountedResourceArray<>(TunnelInterfaceRecord.class.getSimpleName());
/**
* Trackers for quotas for each of the OwnedResource types.
@@ -379,6 +386,7 @@
final ResourceTracker mSpiQuotaTracker = new ResourceTracker(MAX_NUM_SPIS);
final ResourceTracker mTransformQuotaTracker = new ResourceTracker(MAX_NUM_TRANSFORMS);
final ResourceTracker mSocketQuotaTracker = new ResourceTracker(MAX_NUM_ENCAP_SOCKETS);
+ final ResourceTracker mTunnelQuotaTracker = new ResourceTracker(MAX_NUM_TUNNEL_INTERFACES);
void removeSpiRecord(int resourceId) {
mSpiRecords.remove(resourceId);
@@ -388,6 +396,10 @@
mTransformRecords.remove(resourceId);
}
+ void removeTunnelInterfaceRecord(int resourceId) {
+ mTunnelInterfaceRecords.remove(resourceId);
+ }
+
void removeEncapSocketRecord(int resourceId) {
mEncapSocketRecords.remove(resourceId);
}
@@ -583,6 +595,10 @@
return mSpi;
}
+ public EncapSocketRecord getSocketRecord() {
+ return mSocket;
+ }
+
/** always guarded by IpSecService#this */
@Override
public void freeUnderlyingResources() {
@@ -594,7 +610,9 @@
mResourceId,
mConfig.getSourceAddress(),
mConfig.getDestinationAddress(),
- spi);
+ spi,
+ mConfig.getMarkValue(),
+ mConfig.getMarkMask());
} catch (ServiceSpecificException e) {
// FIXME: get the error code and throw is at an IOException from Errno Exception
} catch (RemoteException e) {
@@ -657,7 +675,7 @@
mSrvConfig
.getNetdInstance()
.ipSecDeleteSecurityAssociation(
- mResourceId, mSourceAddress, mDestinationAddress, mSpi);
+ mResourceId, mSourceAddress, mDestinationAddress, mSpi, 0, 0);
} catch (ServiceSpecificException e) {
// FIXME: get the error code and throw is at an IOException from Errno Exception
} catch (RemoteException e) {
@@ -719,6 +737,165 @@
}
}
+ // These values have been reserved in ConnectivityService
+ @VisibleForTesting static final int TUN_INTF_NETID_START = 0xFC00;
+
+ @VisibleForTesting static final int TUN_INTF_NETID_RANGE = 0x0400;
+
+ private final SparseBooleanArray mTunnelNetIds = new SparseBooleanArray();
+ private int mNextTunnelNetIdIndex = 0;
+
+ /**
+ * Reserves a netId within the range of netIds allocated for IPsec tunnel interfaces
+ *
+ * <p>This method should only be called from Binder threads. Do not call this from within the
+ * system server as it will crash the system on failure.
+ *
+ * @return an integer key within the netId range, if successful
+ * @throws IllegalStateException if unsuccessful (all netId are currently reserved)
+ */
+ @VisibleForTesting
+ int reserveNetId() {
+ synchronized (mTunnelNetIds) {
+ for (int i = 0; i < TUN_INTF_NETID_RANGE; i++) {
+ int index = mNextTunnelNetIdIndex;
+ int netId = index + TUN_INTF_NETID_START;
+ if (++mNextTunnelNetIdIndex >= TUN_INTF_NETID_RANGE) mNextTunnelNetIdIndex = 0;
+ if (!mTunnelNetIds.get(netId)) {
+ mTunnelNetIds.put(netId, true);
+ return netId;
+ }
+ }
+ }
+ throw new IllegalStateException("No free netIds to allocate");
+ }
+
+ @VisibleForTesting
+ void releaseNetId(int netId) {
+ synchronized (mTunnelNetIds) {
+ mTunnelNetIds.delete(netId);
+ }
+ }
+
+ private final class TunnelInterfaceRecord extends OwnedResourceRecord {
+ private final String mInterfaceName;
+ private final Network mUnderlyingNetwork;
+
+ // outer addresses
+ private final String mLocalAddress;
+ private final String mRemoteAddress;
+
+ private final int mIkey;
+ private final int mOkey;
+
+ TunnelInterfaceRecord(
+ int resourceId,
+ String interfaceName,
+ Network underlyingNetwork,
+ String localAddr,
+ String remoteAddr,
+ int ikey,
+ int okey) {
+ super(resourceId);
+
+ mInterfaceName = interfaceName;
+ mUnderlyingNetwork = underlyingNetwork;
+ mLocalAddress = localAddr;
+ mRemoteAddress = remoteAddr;
+ mIkey = ikey;
+ mOkey = okey;
+ }
+
+ /** always guarded by IpSecService#this */
+ @Override
+ public void freeUnderlyingResources() {
+ // Calls to netd
+ // Teardown VTI
+ // Delete global policies
+ try {
+ mSrvConfig.getNetdInstance().removeVirtualTunnelInterface(mInterfaceName);
+
+ for (int direction : DIRECTIONS) {
+ int mark = (direction == IpSecManager.DIRECTION_IN) ? mIkey : mOkey;
+ mSrvConfig
+ .getNetdInstance()
+ .ipSecDeleteSecurityPolicy(
+ 0, direction, mLocalAddress, mRemoteAddress, mark, 0xffffffff);
+ }
+ } catch (ServiceSpecificException e) {
+ // FIXME: get the error code and throw is at an IOException from Errno Exception
+ } catch (RemoteException e) {
+ Log.e(
+ TAG,
+ "Failed to delete VTI with interface name: "
+ + mInterfaceName
+ + " and id: "
+ + mResourceId);
+ }
+
+ getResourceTracker().give();
+ releaseNetId(mIkey);
+ releaseNetId(mOkey);
+ }
+
+ public String getInterfaceName() {
+ return mInterfaceName;
+ }
+
+ public Network getUnderlyingNetwork() {
+ return mUnderlyingNetwork;
+ }
+
+ /** Returns the local, outer address for the tunnelInterface */
+ public String getLocalAddress() {
+ return mLocalAddress;
+ }
+
+ /** Returns the remote, outer address for the tunnelInterface */
+ public String getRemoteAddress() {
+ return mRemoteAddress;
+ }
+
+ public int getIkey() {
+ return mIkey;
+ }
+
+ public int getOkey() {
+ return mOkey;
+ }
+
+ @Override
+ protected ResourceTracker getResourceTracker() {
+ return getUserRecord().mTunnelQuotaTracker;
+ }
+
+ @Override
+ public void invalidate() {
+ getUserRecord().removeTunnelInterfaceRecord(mResourceId);
+ }
+
+ @Override
+ public String toString() {
+ return new StringBuilder()
+ .append("{super=")
+ .append(super.toString())
+ .append(", mInterfaceName=")
+ .append(mInterfaceName)
+ .append(", mUnderlyingNetwork=")
+ .append(mUnderlyingNetwork)
+ .append(", mLocalAddress=")
+ .append(mLocalAddress)
+ .append(", mRemoteAddress=")
+ .append(mRemoteAddress)
+ .append(", mIkey=")
+ .append(mIkey)
+ .append(", mOkey=")
+ .append(mOkey)
+ .append("}")
+ .toString();
+ }
+ }
+
/**
* Tracks a UDP encap socket, and manages cleanup paths
*
@@ -1049,6 +1226,130 @@
releaseResource(userRecord.mEncapSocketRecords, resourceId);
}
+ /**
+ * Create a tunnel interface for use in IPSec tunnel mode. The system server will cache the
+ * tunnel interface and a record of its owner so that it can and must be freed when no longer
+ * needed.
+ */
+ @Override
+ public synchronized IpSecTunnelInterfaceResponse createTunnelInterface(
+ String localAddr, String remoteAddr, Network underlyingNetwork, IBinder binder) {
+ checkNotNull(binder, "Null Binder passed to createTunnelInterface");
+ checkNotNull(underlyingNetwork, "No underlying network was specified");
+ checkInetAddress(localAddr);
+ checkInetAddress(remoteAddr);
+
+ // TODO: Check that underlying network exists, and IP addresses not assigned to a different
+ // network (b/72316676).
+
+ UserRecord userRecord = mUserResourceTracker.getUserRecord(Binder.getCallingUid());
+ if (!userRecord.mTunnelQuotaTracker.isAvailable()) {
+ return new IpSecTunnelInterfaceResponse(IpSecManager.Status.RESOURCE_UNAVAILABLE);
+ }
+
+ final int resourceId = mNextResourceId++;
+ final int ikey = reserveNetId();
+ final int okey = reserveNetId();
+ String intfName = String.format("%s%d", TUNNEL_INTERFACE_PREFIX, resourceId);
+
+ try {
+ // Calls to netd:
+ // Create VTI
+ // Add inbound/outbound global policies
+ // (use reqid = 0)
+ mSrvConfig
+ .getNetdInstance()
+ .addVirtualTunnelInterface(intfName, localAddr, remoteAddr, ikey, okey);
+
+ for (int direction : DIRECTIONS) {
+ int mark = (direction == IpSecManager.DIRECTION_OUT) ? okey : ikey;
+
+ mSrvConfig
+ .getNetdInstance()
+ .ipSecAddSecurityPolicy(
+ 0, // Use 0 for reqId
+ direction,
+ "",
+ "",
+ 0,
+ mark,
+ 0xffffffff);
+ }
+
+ userRecord.mTunnelInterfaceRecords.put(
+ resourceId,
+ new RefcountedResource<TunnelInterfaceRecord>(
+ new TunnelInterfaceRecord(
+ resourceId,
+ intfName,
+ underlyingNetwork,
+ localAddr,
+ remoteAddr,
+ ikey,
+ okey),
+ binder));
+ return new IpSecTunnelInterfaceResponse(IpSecManager.Status.OK, resourceId, intfName);
+ } catch (RemoteException e) {
+ // Release keys if we got an error.
+ releaseNetId(ikey);
+ releaseNetId(okey);
+ throw e.rethrowFromSystemServer();
+ } catch (ServiceSpecificException e) {
+ // FIXME: get the error code and throw is at an IOException from Errno Exception
+ }
+
+ // If we make it to here, then something has gone wrong and we couldn't create a VTI.
+ // Release the keys that we reserved, and return an error status.
+ releaseNetId(ikey);
+ releaseNetId(okey);
+ return new IpSecTunnelInterfaceResponse(IpSecManager.Status.RESOURCE_UNAVAILABLE);
+ }
+
+ /**
+ * Adds a new local address to the tunnel interface. This allows packets to be sent and received
+ * from multiple local IP addresses over the same tunnel.
+ */
+ @Override
+ public synchronized void addAddressToTunnelInterface(int tunnelResourceId, String localAddr) {
+ UserRecord userRecord = mUserResourceTracker.getUserRecord(Binder.getCallingUid());
+
+ // Get tunnelInterface record; if no such interface is found, will throw
+ // IllegalArgumentException
+ TunnelInterfaceRecord tunnelInterfaceInfo =
+ userRecord.mTunnelInterfaceRecords.getResourceOrThrow(tunnelResourceId);
+
+ // TODO: Add calls to netd:
+ // Add address to TunnelInterface
+ }
+
+ /**
+ * Remove a new local address from the tunnel interface. After removal, the address will no
+ * longer be available to send from, or receive on.
+ */
+ @Override
+ public synchronized void removeAddressFromTunnelInterface(
+ int tunnelResourceId, String localAddr) {
+ UserRecord userRecord = mUserResourceTracker.getUserRecord(Binder.getCallingUid());
+
+ // Get tunnelInterface record; if no such interface is found, will throw
+ // IllegalArgumentException
+ TunnelInterfaceRecord tunnelInterfaceInfo =
+ userRecord.mTunnelInterfaceRecords.getResourceOrThrow(tunnelResourceId);
+
+ // TODO: Add calls to netd:
+ // Remove address from TunnelInterface
+ }
+
+ /**
+ * Delete a TunnelInterface that has been been allocated by and registered with the system
+ * server
+ */
+ @Override
+ public synchronized void deleteTunnelInterface(int resourceId) throws RemoteException {
+ UserRecord userRecord = mUserResourceTracker.getUserRecord(Binder.getCallingUid());
+ releaseResource(userRecord.mTunnelInterfaceRecords, resourceId);
+ }
+
@VisibleForTesting
void validateAlgorithms(IpSecConfig config) throws IllegalArgumentException {
IpSecAlgorithm auth = config.getAuthentication();
@@ -1136,12 +1437,50 @@
}
}
+ private void createOrUpdateTransform(
+ IpSecConfig c, int resourceId, SpiRecord spiRecord, EncapSocketRecord socketRecord)
+ throws RemoteException {
+
+ int encapType = c.getEncapType(), encapLocalPort = 0, encapRemotePort = 0;
+ if (encapType != IpSecTransform.ENCAP_NONE) {
+ encapLocalPort = socketRecord.getPort();
+ encapRemotePort = c.getEncapRemotePort();
+ }
+
+ IpSecAlgorithm auth = c.getAuthentication();
+ IpSecAlgorithm crypt = c.getEncryption();
+ IpSecAlgorithm authCrypt = c.getAuthenticatedEncryption();
+
+ mSrvConfig
+ .getNetdInstance()
+ .ipSecAddSecurityAssociation(
+ resourceId,
+ c.getMode(),
+ c.getSourceAddress(),
+ c.getDestinationAddress(),
+ (c.getNetwork() != null) ? c.getNetwork().netId : 0,
+ spiRecord.getSpi(),
+ c.getMarkValue(),
+ c.getMarkMask(),
+ (auth != null) ? auth.getName() : "",
+ (auth != null) ? auth.getKey() : new byte[] {},
+ (auth != null) ? auth.getTruncationLengthBits() : 0,
+ (crypt != null) ? crypt.getName() : "",
+ (crypt != null) ? crypt.getKey() : new byte[] {},
+ (crypt != null) ? crypt.getTruncationLengthBits() : 0,
+ (authCrypt != null) ? authCrypt.getName() : "",
+ (authCrypt != null) ? authCrypt.getKey() : new byte[] {},
+ (authCrypt != null) ? authCrypt.getTruncationLengthBits() : 0,
+ encapType,
+ encapLocalPort,
+ encapRemotePort);
+ }
+
/**
- * Create a transport mode transform, which represent two security associations (one in each
- * direction) in the kernel. The transform will be cached by the system server and must be freed
- * when no longer needed. It is possible to free one, deleting the SA from underneath sockets
- * that are using it, which will result in all of those sockets becoming unable to send or
- * receive data.
+ * Create a IPsec transform, which represents a single security association in the kernel. The
+ * transform will be cached by the system server and must be freed when no longer needed. It is
+ * possible to free one, deleting the SA from underneath sockets that are using it, which will
+ * result in all of those sockets becoming unable to send or receive data.
*/
@Override
public synchronized IpSecTransformResponse createTransform(IpSecConfig c, IBinder binder)
@@ -1157,56 +1496,28 @@
return new IpSecTransformResponse(IpSecManager.Status.RESOURCE_UNAVAILABLE);
}
- int encapType, encapLocalPort = 0, encapRemotePort = 0;
EncapSocketRecord socketRecord = null;
- encapType = c.getEncapType();
- if (encapType != IpSecTransform.ENCAP_NONE) {
+ if (c.getEncapType() != IpSecTransform.ENCAP_NONE) {
RefcountedResource<EncapSocketRecord> refcountedSocketRecord =
userRecord.mEncapSocketRecords.getRefcountedResourceOrThrow(
c.getEncapSocketResourceId());
dependencies.add(refcountedSocketRecord);
-
socketRecord = refcountedSocketRecord.getResource();
- encapLocalPort = socketRecord.getPort();
- encapRemotePort = c.getEncapRemotePort();
}
- IpSecAlgorithm auth = c.getAuthentication();
- IpSecAlgorithm crypt = c.getEncryption();
- IpSecAlgorithm authCrypt = c.getAuthenticatedEncryption();
-
RefcountedResource<SpiRecord> refcountedSpiRecord =
userRecord.mSpiRecords.getRefcountedResourceOrThrow(c.getSpiResourceId());
dependencies.add(refcountedSpiRecord);
SpiRecord spiRecord = refcountedSpiRecord.getResource();
try {
- mSrvConfig
- .getNetdInstance()
- .ipSecAddSecurityAssociation(
- resourceId,
- c.getMode(),
- c.getSourceAddress(),
- c.getDestinationAddress(),
- (c.getNetwork() != null) ? c.getNetwork().netId : 0,
- spiRecord.getSpi(),
- (auth != null) ? auth.getName() : "",
- (auth != null) ? auth.getKey() : new byte[] {},
- (auth != null) ? auth.getTruncationLengthBits() : 0,
- (crypt != null) ? crypt.getName() : "",
- (crypt != null) ? crypt.getKey() : new byte[] {},
- (crypt != null) ? crypt.getTruncationLengthBits() : 0,
- (authCrypt != null) ? authCrypt.getName() : "",
- (authCrypt != null) ? authCrypt.getKey() : new byte[] {},
- (authCrypt != null) ? authCrypt.getTruncationLengthBits() : 0,
- encapType,
- encapLocalPort,
- encapRemotePort);
+ createOrUpdateTransform(c, resourceId, spiRecord, socketRecord);
} catch (ServiceSpecificException e) {
// FIXME: get the error code and throw is at an IOException from Errno Exception
return new IpSecTransformResponse(IpSecManager.Status.RESOURCE_UNAVAILABLE);
}
- // Both SAs were created successfully, time to construct a record and lock it away
+
+ // SA was created successfully, time to construct a record and lock it away
userRecord.mTransformRecords.put(
resourceId,
new RefcountedResource<TransformRecord>(
@@ -1245,7 +1556,12 @@
throw new SecurityException("Only the owner of an IpSec Transform may apply it!");
}
+ // Get config and check that to-be-applied transform has the correct mode
IpSecConfig c = info.getConfig();
+ Preconditions.checkArgument(
+ c.getMode() == IpSecTransform.MODE_TRANSPORT,
+ "Transform mode was not Transport mode; cannot be applied to a socket");
+
try {
mSrvConfig
.getNetdInstance()
@@ -1283,6 +1599,76 @@
}
}
+ /**
+ * Apply an active tunnel mode transform to a TunnelInterface, which will apply the IPsec
+ * security association as a correspondent policy to the provided interface
+ */
+ @Override
+ public synchronized void applyTunnelModeTransform(
+ int tunnelResourceId, int direction, int transformResourceId) throws RemoteException {
+ checkDirection(direction);
+
+ UserRecord userRecord = mUserResourceTracker.getUserRecord(Binder.getCallingUid());
+
+ // Get transform record; if no transform is found, will throw IllegalArgumentException
+ TransformRecord transformInfo =
+ userRecord.mTransformRecords.getResourceOrThrow(transformResourceId);
+
+ // Get tunnelInterface record; if no such interface is found, will throw
+ // IllegalArgumentException
+ TunnelInterfaceRecord tunnelInterfaceInfo =
+ userRecord.mTunnelInterfaceRecords.getResourceOrThrow(tunnelResourceId);
+
+ // Get config and check that to-be-applied transform has the correct mode
+ IpSecConfig c = transformInfo.getConfig();
+ Preconditions.checkArgument(
+ c.getMode() == IpSecTransform.MODE_TUNNEL,
+ "Transform mode was not Tunnel mode; cannot be applied to a tunnel interface");
+
+ EncapSocketRecord socketRecord = null;
+ if (c.getEncapType() != IpSecTransform.ENCAP_NONE) {
+ socketRecord =
+ userRecord.mEncapSocketRecords.getResourceOrThrow(c.getEncapSocketResourceId());
+ }
+ SpiRecord spiRecord = userRecord.mSpiRecords.getResourceOrThrow(c.getSpiResourceId());
+
+ int mark =
+ (direction == IpSecManager.DIRECTION_IN)
+ ? tunnelInterfaceInfo.getIkey()
+ : tunnelInterfaceInfo.getOkey();
+
+ try {
+ c.setMarkValue(mark);
+ c.setMarkMask(0xffffffff);
+
+ if (direction == IpSecManager.DIRECTION_OUT) {
+ // Set output mark via underlying network (output only)
+ c.setNetwork(tunnelInterfaceInfo.getUnderlyingNetwork());
+
+ // If outbound, also add SPI to the policy.
+ mSrvConfig
+ .getNetdInstance()
+ .ipSecUpdateSecurityPolicy(
+ 0, // Use 0 for reqId
+ direction,
+ "",
+ "",
+ transformInfo.getSpiRecord().getSpi(),
+ mark,
+ 0xffffffff);
+ }
+
+ // Update SA with tunnel mark (ikey or okey based on direction)
+ createOrUpdateTransform(c, transformResourceId, spiRecord, socketRecord);
+ } catch (ServiceSpecificException e) {
+ if (e.errorCode == EINVAL) {
+ throw new IllegalArgumentException(e.toString());
+ } else {
+ throw e;
+ }
+ }
+ }
+
@Override
protected synchronized void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
mContext.enforceCallingOrSelfPermission(DUMP, TAG);
diff --git a/services/core/java/com/android/server/LocationManagerService.java b/services/core/java/com/android/server/LocationManagerService.java
index 5a4f7ca..1dd92f3 100644
--- a/services/core/java/com/android/server/LocationManagerService.java
+++ b/services/core/java/com/android/server/LocationManagerService.java
@@ -67,6 +67,7 @@
import android.os.UserHandle;
import android.os.UserManager;
import android.os.WorkSource;
+import android.os.WorkSource.WorkChain;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.ArrayMap;
@@ -829,7 +830,7 @@
}
mAllowedResolutionLevel = getAllowedResolutionLevel(pid, uid);
mIdentity = new Identity(uid, pid, packageName);
- if (workSource != null && workSource.size() <= 0) {
+ if (workSource != null && workSource.isEmpty()) {
workSource = null;
}
mWorkSource = workSource;
@@ -1576,13 +1577,22 @@
}
/**
- * Returns all providers by name, including passive, but excluding
- * fused, also including ones that are not permitted to
- * be accessed by the calling activity or are currently disabled.
+ * Returns all providers by name, including passive and the ones that are not permitted to
+ * be accessed by the calling activity or are currently disabled, but excluding fused.
*/
@Override
public List<String> getAllProviders() {
- List<String> out = getProviders(null /*criteria*/, false /*enabledOnly*/);
+ ArrayList<String> out;
+ synchronized (mLock) {
+ out = new ArrayList<>(mProviders.size());
+ for (LocationProviderInterface provider : mProviders) {
+ String name = provider.getName();
+ if (LocationManager.FUSED_PROVIDER.equals(name)) {
+ continue;
+ }
+ out.add(name);
+ }
+ }
if (D) Log.d(TAG, "getAllProviders()=" + out);
return out;
}
@@ -1814,13 +1824,11 @@
if (locationRequest.getInterval() <= thresholdInterval) {
if (record.mReceiver.mWorkSource != null
- && record.mReceiver.mWorkSource.size() > 0
- && record.mReceiver.mWorkSource.getName(0) != null) {
- // Assign blame to another work source.
- // Can only assign blame if the WorkSource contains names.
+ && isValidWorkSource(record.mReceiver.mWorkSource)) {
worksource.add(record.mReceiver.mWorkSource);
} else {
- // Assign blame to caller.
+ // Assign blame to caller if there's no WorkSource associated with
+ // the request or if it's invalid.
worksource.add(
record.mReceiver.mIdentity.mUid,
record.mReceiver.mIdentity.mPackageName);
@@ -1835,6 +1843,23 @@
p.setRequest(providerRequest, worksource);
}
+ /**
+ * Whether a given {@code WorkSource} associated with a Location request is valid.
+ */
+ private static boolean isValidWorkSource(WorkSource workSource) {
+ if (workSource.size() > 0) {
+ // If the WorkSource has one or more non-chained UIDs, make sure they're accompanied
+ // by tags.
+ return workSource.getName(0) != null;
+ } else {
+ // For now, make sure callers have supplied an attribution tag for use with
+ // AppOpsManager. This might be relaxed in the future.
+ final ArrayList<WorkChain> workChains = workSource.getWorkChains();
+ return workChains != null && !workChains.isEmpty() &&
+ workChains.get(0).getAttributionTag() != null;
+ }
+ }
+
@Override
public String[] getBackgroundThrottlingWhitelist() {
synchronized (mLock) {
@@ -2057,7 +2082,7 @@
checkResolutionLevelIsSufficientForProviderUse(allowedResolutionLevel,
request.getProvider());
WorkSource workSource = request.getWorkSource();
- if (workSource != null && workSource.size() > 0) {
+ if (workSource != null && !workSource.isEmpty()) {
checkDeviceStatsAllowed();
}
boolean hideFromAppOps = request.getHideFromAppOps();
@@ -2570,9 +2595,10 @@
// Check INTERACT_ACROSS_USERS permission if userId is not current user id.
checkInteractAcrossUsersPermission(userId);
- // enable all location providers
+ // Enable or disable all location providers. Fused provider and passive provider are
+ // excluded.
synchronized (mLock) {
- for(String provider : getAllProviders()) {
+ for(String provider : getAllProvidersForLocationSettings()) {
setProviderEnabledForUser(provider, enabled, userId);
}
}
@@ -2586,12 +2612,13 @@
*/
@Override
public boolean isLocationEnabledForUser(int userId) {
-
// Check INTERACT_ACROSS_USERS permission if userId is not current user id.
checkInteractAcrossUsersPermission(userId);
+ // If at least one location provider is enabled, return true. Fused provider and passive
+ // provider are excluded.
synchronized (mLock) {
- for (String provider : getAllProviders()) {
+ for (String provider : getAllProvidersForLocationSettings()) {
if (isProviderEnabledForUser(provider, userId)) {
return true;
}
@@ -2602,7 +2629,7 @@
@Override
public boolean isProviderEnabled(String provider) {
- return isProviderEnabledForUser(provider, UserHandle.myUserId());
+ return isProviderEnabledForUser(provider, UserHandle.getCallingUserId());
}
/**
@@ -2675,6 +2702,26 @@
}
/**
+ * Return all location providers except fused provider and passive provider. These two
+ * providers are not generating location by themselves, but only echo locations from other
+ * providers.
+ *
+ * @return All location providers except fused provider and passive provider, including
+ * providers that are not permitted to be accessed by the calling activity or are
+ * currently disabled.
+ */
+ private List<String> getAllProvidersForLocationSettings() {
+ List<String> providersForSettings = new ArrayList<>(mProviders.size());
+ for (String provider : getAllProviders()) {
+ if (provider.equals(LocationManager.PASSIVE_PROVIDER)) {
+ continue;
+ }
+ providersForSettings.add(provider);
+ }
+ return providersForSettings;
+ }
+
+ /**
* Read location provider status from Settings.Secure
*
* @param provider the location provider to query
diff --git a/services/core/java/com/android/server/MultipathPolicyTracker.java b/services/core/java/com/android/server/MultipathPolicyTracker.java
new file mode 100644
index 0000000..9e0a230
--- /dev/null
+++ b/services/core/java/com/android/server/MultipathPolicyTracker.java
@@ -0,0 +1,361 @@
+/*
+ * 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.connectivity;
+
+import android.app.usage.NetworkStatsManager;
+import android.app.usage.NetworkStatsManager.UsageCallback;
+import android.content.Context;
+import android.net.INetworkStatsService;
+import android.net.INetworkPolicyManager;
+import android.net.ConnectivityManager;
+import android.net.ConnectivityManager.NetworkCallback;
+import android.net.Network;
+import android.net.NetworkCapabilities;
+import android.net.NetworkPolicyManager;
+import android.net.NetworkRequest;
+import android.net.NetworkStats;
+import android.net.NetworkTemplate;
+import android.net.StringNetworkSpecifier;
+import android.os.Handler;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.telephony.TelephonyManager;
+import android.util.DebugUtils;
+import android.util.Slog;
+
+import java.util.Calendar;
+import java.util.concurrent.ConcurrentHashMap;
+
+import com.android.internal.R;
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.IndentingPrintWriter;
+import com.android.server.LocalServices;
+import com.android.server.net.NetworkPolicyManagerInternal;
+
+import static android.net.ConnectivityManager.MULTIPATH_PREFERENCE_HANDOVER;
+import static android.net.ConnectivityManager.MULTIPATH_PREFERENCE_RELIABILITY;
+import static android.net.ConnectivityManager.TYPE_MOBILE;
+import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
+import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
+import static android.provider.Settings.Global.NETWORK_AVOID_BAD_WIFI;
+import static android.provider.Settings.Global.NETWORK_METERED_MULTIPATH_PREFERENCE;
+import static com.android.server.net.NetworkPolicyManagerInternal.QUOTA_TYPE_MULTIPATH;
+
+/**
+ * Manages multipath data budgets.
+ *
+ * Informs the return value of ConnectivityManager#getMultipathPreference() based on:
+ * - The user's data plan, as returned by getSubscriptionOpportunisticQuota().
+ * - The amount of data usage that occurs on mobile networks while they are not the system default
+ * network (i.e., when the app explicitly selected such networks).
+ *
+ * Currently, quota is determined on a daily basis, from midnight to midnight local time.
+ *
+ * @hide
+ */
+public class MultipathPolicyTracker {
+ private static String TAG = MultipathPolicyTracker.class.getSimpleName();
+
+ private static final boolean DBG = false;
+
+ private final Context mContext;
+ private final Handler mHandler;
+
+ private ConnectivityManager mCM;
+ private NetworkStatsManager mStatsManager;
+ private NetworkPolicyManager mNPM;
+ private TelephonyManager mTelephonyManager;
+ private INetworkStatsService mStatsService;
+
+ private NetworkCallback mMobileNetworkCallback;
+ private NetworkPolicyManager.Listener mPolicyListener;
+
+ // STOPSHIP: replace this with a configurable mechanism.
+ private static final long DEFAULT_DAILY_MULTIPATH_QUOTA = 2_500_000;
+
+ private volatile int mMeteredMultipathPreference;
+
+ public MultipathPolicyTracker(Context ctx, Handler handler) {
+ mContext = ctx;
+ mHandler = handler;
+ // Because we are initialized by the ConnectivityService constructor, we can't touch any
+ // connectivity APIs. Service initialization is done in start().
+ }
+
+ public void start() {
+ mCM = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
+ mNPM = (NetworkPolicyManager) mContext.getSystemService(Context.NETWORK_POLICY_SERVICE);
+ mStatsManager = (NetworkStatsManager) mContext.getSystemService(
+ Context.NETWORK_STATS_SERVICE);
+ mStatsService = INetworkStatsService.Stub.asInterface(
+ ServiceManager.getService(Context.NETWORK_STATS_SERVICE));
+
+ registerTrackMobileCallback();
+ registerNetworkPolicyListener();
+ }
+
+ public void shutdown() {
+ maybeUnregisterTrackMobileCallback();
+ unregisterNetworkPolicyListener();
+ for (MultipathTracker t : mMultipathTrackers.values()) {
+ t.shutdown();
+ }
+ mMultipathTrackers.clear();
+ }
+
+ // Called on an arbitrary binder thread.
+ public Integer getMultipathPreference(Network network) {
+ MultipathTracker t = mMultipathTrackers.get(network);
+ if (t != null) {
+ return t.getMultipathPreference();
+ }
+ return null;
+ }
+
+ // Track information on mobile networks as they come and go.
+ class MultipathTracker {
+ final Network network;
+ final int subId;
+ final String subscriberId;
+
+ private long mQuota;
+ /** Current multipath budget. Nonzero iff we have budget and a UsageCallback is armed. */
+ private long mMultipathBudget;
+ private final NetworkTemplate mNetworkTemplate;
+ private final UsageCallback mUsageCallback;
+
+ public MultipathTracker(Network network, NetworkCapabilities nc) {
+ this.network = network;
+ try {
+ subId = Integer.parseInt(
+ ((StringNetworkSpecifier) nc.getNetworkSpecifier()).toString());
+ } catch (ClassCastException | NullPointerException | NumberFormatException e) {
+ throw new IllegalStateException(String.format(
+ "Can't get subId from mobile network %s (%s): %s",
+ network, nc, e.getMessage()));
+ }
+
+ TelephonyManager tele = (TelephonyManager) mContext.getSystemService(
+ Context.TELEPHONY_SERVICE);
+ if (tele == null) {
+ throw new IllegalStateException(String.format("Missing TelephonyManager"));
+ }
+ tele = tele.createForSubscriptionId(subId);
+ if (tele == null) {
+ throw new IllegalStateException(String.format(
+ "Can't get TelephonyManager for subId %d", subId));
+ }
+
+ subscriberId = tele.getSubscriberId();
+ mNetworkTemplate = new NetworkTemplate(
+ NetworkTemplate.MATCH_MOBILE_ALL, subscriberId, new String[] { subscriberId },
+ null, NetworkStats.METERED_ALL, NetworkStats.ROAMING_ALL,
+ NetworkStats.DEFAULT_NETWORK_NO);
+ mUsageCallback = new UsageCallback() {
+ @Override
+ public void onThresholdReached(int networkType, String subscriberId) {
+ if (DBG) Slog.d(TAG, "onThresholdReached for network " + network);
+ mMultipathBudget = 0;
+ updateMultipathBudget();
+ }
+ };
+
+ updateMultipathBudget();
+ }
+
+ private long getDailyNonDefaultDataUsage() {
+ Calendar start = Calendar.getInstance();
+ Calendar end = (Calendar) start.clone();
+ start.set(Calendar.HOUR_OF_DAY, 0);
+ start.set(Calendar.MINUTE, 0);
+ start.set(Calendar.SECOND, 0);
+ start.set(Calendar.MILLISECOND, 0);
+
+ long bytes;
+ try {
+ // TODO: Consider using NetworkStatsManager.getSummaryForDevice instead.
+ bytes = mStatsService.getNetworkTotalBytes(mNetworkTemplate,
+ start.getTimeInMillis(), end.getTimeInMillis());
+ if (DBG) Slog.w(TAG, "Non-default data usage: " + bytes);
+ } catch (RemoteException e) {
+ Slog.w(TAG, "Can't fetch daily data usage: " + e);
+ bytes = -1;
+ } catch (IllegalStateException e) {
+ // Bandwidth control disabled?
+ bytes = -1;
+ }
+ return bytes;
+ }
+
+ void updateMultipathBudget() {
+ NetworkPolicyManagerInternal npms = LocalServices.getService(
+ NetworkPolicyManagerInternal.class);
+ long quota = npms.getSubscriptionOpportunisticQuota(this.network, QUOTA_TYPE_MULTIPATH);
+ if (DBG) Slog.d(TAG, "Opportunistic quota from data plan: " + quota + " bytes");
+
+ if (quota == 0) {
+ // STOPSHIP: replace this with a configurable mechanism.
+ quota = DEFAULT_DAILY_MULTIPATH_QUOTA;
+ if (DBG) Slog.d(TAG, "Setting quota: " + quota + " bytes");
+ }
+
+ if (haveMultipathBudget() && quota == mQuota) {
+ // If we already have a usage callback pending , there's no need to re-register it
+ // if the quota hasn't changed. The callback will simply fire as expected when the
+ // budget is spent. Also: if we re-register the callback when we're below the
+ // UsageCallback's minimum value of 2MB, we'll overshoot the budget.
+ if (DBG) Slog.d(TAG, "Quota still " + quota + ", not updating.");
+ return;
+ }
+ mQuota = quota;
+
+ long usage = getDailyNonDefaultDataUsage();
+ long budget = Math.max(0, quota - usage);
+ if (budget > 0) {
+ if (DBG) Slog.d(TAG, "Setting callback for " + budget +
+ " bytes on network " + network);
+ registerUsageCallback(budget);
+ } else {
+ maybeUnregisterUsageCallback();
+ }
+ }
+
+ public int getMultipathPreference() {
+ if (haveMultipathBudget()) {
+ return MULTIPATH_PREFERENCE_HANDOVER | MULTIPATH_PREFERENCE_RELIABILITY;
+ }
+ return 0;
+ }
+
+ // For debugging only.
+ public long getQuota() {
+ return mQuota;
+ }
+
+ // For debugging only.
+ public long getMultipathBudget() {
+ return mMultipathBudget;
+ }
+
+ private boolean haveMultipathBudget() {
+ return mMultipathBudget > 0;
+ }
+
+ private void registerUsageCallback(long budget) {
+ maybeUnregisterUsageCallback();
+ mStatsManager.registerUsageCallback(mNetworkTemplate, TYPE_MOBILE, budget,
+ mUsageCallback, mHandler);
+ mMultipathBudget = budget;
+ }
+
+ private void maybeUnregisterUsageCallback() {
+ if (haveMultipathBudget()) {
+ if (DBG) Slog.d(TAG, "Unregistering callback, budget was " + mMultipathBudget);
+ mStatsManager.unregisterUsageCallback(mUsageCallback);
+ mMultipathBudget = 0;
+ }
+ }
+
+ void shutdown() {
+ maybeUnregisterUsageCallback();
+ }
+ }
+
+ // Only ever updated on the handler thread. Accessed from other binder threads to retrieve
+ // the tracker for a specific network.
+ private final ConcurrentHashMap <Network, MultipathTracker> mMultipathTrackers =
+ new ConcurrentHashMap<>();
+
+ // TODO: this races with app code that might respond to onAvailable() by immediately calling
+ // getMultipathPreference. Fix this by adding to ConnectivityService the ability to directly
+ // invoke NetworkCallbacks on tightly-coupled classes such as this one which run on its
+ // handler thread.
+ private void registerTrackMobileCallback() {
+ final NetworkRequest request = new NetworkRequest.Builder()
+ .addCapability(NET_CAPABILITY_INTERNET)
+ .addTransportType(TRANSPORT_CELLULAR)
+ .build();
+ mMobileNetworkCallback = new ConnectivityManager.NetworkCallback() {
+ @Override
+ public void onCapabilitiesChanged(Network network, NetworkCapabilities nc) {
+ MultipathTracker existing = mMultipathTrackers.get(network);
+ if (existing != null) {
+ existing.updateMultipathBudget();
+ return;
+ }
+
+ try {
+ mMultipathTrackers.put(network, new MultipathTracker(network, nc));
+ } catch (IllegalStateException e) {
+ Slog.e(TAG, "Can't track mobile network " + network + ": " + e.getMessage());
+ }
+ if (DBG) Slog.d(TAG, "Tracking mobile network " + network);
+ }
+
+ @Override
+ public void onLost(Network network) {
+ MultipathTracker existing = mMultipathTrackers.get(network);
+ if (existing != null) {
+ existing.shutdown();
+ mMultipathTrackers.remove(network);
+ }
+ if (DBG) Slog.d(TAG, "No longer tracking mobile network " + network);
+ }
+ };
+
+ mCM.registerNetworkCallback(request, mMobileNetworkCallback, mHandler);
+ }
+
+ private void maybeUnregisterTrackMobileCallback() {
+ if (mMobileNetworkCallback != null) {
+ mCM.unregisterNetworkCallback(mMobileNetworkCallback);
+ }
+ mMobileNetworkCallback = null;
+ }
+
+ private void registerNetworkPolicyListener() {
+ mPolicyListener = new NetworkPolicyManager.Listener() {
+ @Override
+ public void onMeteredIfacesChanged(String[] meteredIfaces) {
+ // Dispatched every time opportunistic quota is recalculated.
+ mHandler.post(() -> {
+ for (MultipathTracker t : mMultipathTrackers.values()) {
+ t.updateMultipathBudget();
+ }
+ });
+ }
+ };
+ mNPM.registerListener(mPolicyListener);
+ }
+
+ private void unregisterNetworkPolicyListener() {
+ mNPM.unregisterListener(mPolicyListener);
+ }
+
+ public void dump(IndentingPrintWriter pw) {
+ // Do not use in production. Access to class data is only safe on the handler thrad.
+ pw.println("MultipathPolicyTracker:");
+ pw.increaseIndent();
+ for (MultipathTracker t : mMultipathTrackers.values()) {
+ pw.println(String.format("Network %s: quota %d, budget %d. Preference: %s",
+ t.network, t.getQuota(), t.getMultipathBudget(),
+ DebugUtils.flagsToString(ConnectivityManager.class, "MULTIPATH_PREFERENCE_",
+ t.getMultipathPreference())));
+ }
+ pw.decreaseIndent();
+ }
+}
diff --git a/services/core/java/com/android/server/PersistentDataBlockManagerInternal.java b/services/core/java/com/android/server/PersistentDataBlockManagerInternal.java
index 833def3..1e9a007 100644
--- a/services/core/java/com/android/server/PersistentDataBlockManagerInternal.java
+++ b/services/core/java/com/android/server/PersistentDataBlockManagerInternal.java
@@ -24,7 +24,11 @@
/** Stores the handle to a lockscreen credential to be used for Factory Reset Protection. */
void setFrpCredentialHandle(byte[] handle);
- /** Retrieves handle to a lockscreen credential to be used for Factory Reset Protection. */
+ /**
+ * Retrieves handle to a lockscreen credential to be used for Factory Reset Protection.
+ *
+ * @throws IllegalStateException if the underlying storage is corrupt or inaccessible.
+ */
byte[] getFrpCredentialHandle();
/** Update the OEM unlock enabled bit, bypassing user restriction checks. */
diff --git a/services/core/java/com/android/server/PersistentDataBlockService.java b/services/core/java/com/android/server/PersistentDataBlockService.java
index 4298140..21093b9 100644
--- a/services/core/java/com/android/server/PersistentDataBlockService.java
+++ b/services/core/java/com/android/server/PersistentDataBlockService.java
@@ -28,6 +28,7 @@
import android.os.UserManager;
import android.service.persistentdata.IPersistentDataBlockService;
import android.service.persistentdata.PersistentDataBlockManager;
+import android.util.Log;
import android.util.Slog;
import com.android.internal.R;
@@ -582,7 +583,12 @@
@Override
public boolean hasFrpCredentialHandle() {
enforcePersistentDataBlockAccess();
- return mInternalService.getFrpCredentialHandle() != null;
+ try {
+ return mInternalService.getFrpCredentialHandle() != null;
+ } catch (IllegalStateException e) {
+ Slog.e(TAG, "error reading frp handle", e);
+ throw new UnsupportedOperationException("cannot read frp credential");
+ }
}
};
@@ -638,7 +644,7 @@
@Override
public byte[] getFrpCredentialHandle() {
if (!enforceChecksumValidity()) {
- return null;
+ throw new IllegalStateException("invalid checksum");
}
DataInputStream inputStream;
@@ -646,8 +652,7 @@
inputStream = new DataInputStream(
new FileInputStream(new File(mDataBlockFile)));
} catch (FileNotFoundException e) {
- Slog.e(TAG, "partition not available");
- return null;
+ throw new IllegalStateException("frp partition not available");
}
try {
@@ -662,8 +667,7 @@
return bytes;
}
} catch (IOException e) {
- Slog.e(TAG, "unable to access persistent partition", e);
- return null;
+ throw new IllegalStateException("frp handle not readable", e);
} finally {
IoUtils.closeQuietly(inputStream);
}
diff --git a/services/core/java/com/android/server/PinnerService.java b/services/core/java/com/android/server/PinnerService.java
index 3d7408e..2869114 100644
--- a/services/core/java/com/android/server/PinnerService.java
+++ b/services/core/java/com/android/server/PinnerService.java
@@ -372,15 +372,19 @@
@Override
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
+ long totalSize = 0;
pw.println("Pinned Files:");
synchronized(this) {
for (int i = 0; i < mPinnedFiles.size(); i++) {
pw.println(mPinnedFiles.get(i).mFilename);
+ totalSize += mPinnedFiles.get(i).mLength;
}
for (int i = 0; i < mPinnedCameraFiles.size(); i++) {
pw.println(mPinnedCameraFiles.get(i).mFilename);
+ totalSize += mPinnedCameraFiles.get(i).mLength;
}
}
+ pw.println("Total size: " + totalSize);
}
}
diff --git a/services/core/java/com/android/server/StatLogger.java b/services/core/java/com/android/server/StatLogger.java
new file mode 100644
index 0000000..f211731
--- /dev/null
+++ b/services/core/java/com/android/server/StatLogger.java
@@ -0,0 +1,108 @@
+/*
+ * 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 android.os.SystemClock;
+import android.util.proto.ProtoOutputStream;
+
+import com.android.internal.annotations.GuardedBy;
+import com.android.server.StatLoggerProto.Event;
+
+import java.io.PrintWriter;
+
+/**
+ * Simple class to keep track of the number of times certain events happened and their durations for
+ * benchmarking.
+ *
+ * TODO Update shortcut service to switch to it.
+ *
+ * @hide
+ */
+public class StatLogger {
+ private final Object mLock = new Object();
+
+ private final int SIZE;
+
+ @GuardedBy("mLock")
+ private final int[] mCountStats;
+
+ @GuardedBy("mLock")
+ private final long[] mDurationStats;
+
+ private final String[] mLabels;
+
+ public StatLogger(String[] eventLabels) {
+ SIZE = eventLabels.length;
+ mCountStats = new int[SIZE];
+ mDurationStats = new long[SIZE];
+ mLabels = eventLabels;
+ }
+
+ /**
+ * Return the current time in the internal time unit.
+ * Call it before an event happens, and
+ * give it back to the {@link #logDurationStat(int, long)}} after the event.
+ */
+ public long getTime() {
+ return SystemClock.elapsedRealtimeNanos() / 1000;
+ }
+
+ /**
+ * @see {@link #getTime()}
+ */
+ public void logDurationStat(int eventId, long start) {
+ synchronized (mLock) {
+ mCountStats[eventId]++;
+ mDurationStats[eventId] += (getTime() - start);
+ }
+ }
+
+ public void dump(PrintWriter pw, String prefix) {
+ synchronized (mLock) {
+ pw.print(prefix);
+ pw.println("Stats:");
+ for (int i = 0; i < SIZE; i++) {
+ pw.print(prefix);
+ pw.print(" ");
+ final int count = mCountStats[i];
+ final double durationMs = mDurationStats[i] / 1000.0;
+ pw.println(String.format("%s: count=%d, total=%.1fms, avg=%.3fms",
+ mLabels[i], count, durationMs,
+ (count == 0 ? 0 : ((double) durationMs) / count)));
+ }
+ }
+ }
+
+ public void dumpProto(ProtoOutputStream proto, long fieldId) {
+ synchronized (mLock) {
+ final long outer = proto.start(fieldId);
+
+ for (int i = 0; i < mLabels.length; i++) {
+ final long inner = proto.start(StatLoggerProto.EVENTS);
+
+ proto.write(Event.EVENT_ID, i);
+ proto.write(Event.LABEL, mLabels[i]);
+ proto.write(Event.COUNT, mCountStats[i]);
+ proto.write(Event.TOTAL_DURATION_MICROS, mDurationStats[i]);
+
+ proto.end(inner);
+ }
+
+ proto.end(outer);
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java
index 7361e70..84b93e3 100644
--- a/services/core/java/com/android/server/StorageManagerService.java
+++ b/services/core/java/com/android/server/StorageManagerService.java
@@ -36,6 +36,7 @@
import android.app.AppOpsManager;
import android.app.IActivityManager;
import android.app.KeyguardManager;
+import android.app.admin.SecurityLog;
import android.app.usage.StorageStatsManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
@@ -50,7 +51,6 @@
import android.content.res.Configuration;
import android.content.res.ObbInfo;
import android.database.ContentObserver;
-import android.net.TrafficStats;
import android.net.Uri;
import android.os.Binder;
import android.os.DropBoxManager;
@@ -150,7 +150,6 @@
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
-import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -1275,6 +1274,29 @@
mObbActionHandler.sendMessage(mObbActionHandler.obtainMessage(
OBB_FLUSH_MOUNT_STATE, vol.path));
}
+ maybeLogMediaMount(vol, newState);
+ }
+
+ private void maybeLogMediaMount(VolumeInfo vol, int newState) {
+ if (!SecurityLog.isLoggingEnabled()) {
+ return;
+ }
+
+ final DiskInfo disk = vol.getDisk();
+ if (disk == null || (disk.flags & (DiskInfo.FLAG_SD | DiskInfo.FLAG_USB)) == 0) {
+ return;
+ }
+
+ // Sometimes there is a newline character.
+ final String label = disk.label != null ? disk.label.trim() : "";
+
+ if (newState == VolumeInfo.STATE_MOUNTED
+ || newState == VolumeInfo.STATE_MOUNTED_READ_ONLY) {
+ SecurityLog.writeEvent(SecurityLog.TAG_MEDIA_MOUNT, vol.path, label);
+ } else if (newState == VolumeInfo.STATE_UNMOUNTED
+ || newState == VolumeInfo.STATE_BAD_REMOVAL) {
+ SecurityLog.writeEvent(SecurityLog.TAG_MEDIA_UNMOUNT, vol.path, label);
+ }
}
private void onMoveStatusLocked(int status) {
@@ -1386,7 +1408,7 @@
}
mSettingsFile = new AtomicFile(
- new File(Environment.getDataSystemDirectory(), "storage.xml"));
+ new File(Environment.getDataSystemDirectory(), "storage.xml"), "storage-settings");
synchronized (mLock) {
readSettingsLocked();
diff --git a/services/core/java/com/android/server/TextServicesManagerService.java b/services/core/java/com/android/server/TextServicesManagerService.java
index 7cd3406..39fc019 100644
--- a/services/core/java/com/android/server/TextServicesManagerService.java
+++ b/services/core/java/com/android/server/TextServicesManagerService.java
@@ -701,7 +701,8 @@
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
- if (args.length == 0) { // Dump all users' data
+ if (args.length == 0 || (args.length == 1 && args[0].equals("-a"))) {
+ // Dump all users' data
synchronized (mLock) {
pw.println("Current Text Services Manager state:");
pw.println(" Users:");
diff --git a/services/core/java/com/android/server/VibratorService.java b/services/core/java/com/android/server/VibratorService.java
index c1cda98..48b5a58 100644
--- a/services/core/java/com/android/server/VibratorService.java
+++ b/services/core/java/com/android/server/VibratorService.java
@@ -73,6 +73,17 @@
private static final long[] DOUBLE_CLICK_EFFECT_FALLBACK_TIMINGS = { 0, 30, 100, 30 };
+ private static final float GAMMA_SCALE_FACTOR_MINIMUM = 2.0f;
+ private static final float GAMMA_SCALE_FACTOR_LOW = 1.5f;
+ private static final float GAMMA_SCALE_FACTOR_HIGH = 0.5f;
+ private static final float GAMMA_SCALE_FACTOR_NONE = 1.0f;
+
+ private static final int MAX_AMPLITUDE_MINIMUM_INTENSITY = 168; // 2/3 * 255
+ private static final int MAX_AMPLITUDE_LOW_INTENSITY = 192; // 3/4 * 255
+
+ // If a vibration is playing for longer than 5s, it's probably not haptic feedback.
+ private static final long MAX_HAPTIC_FEEDBACK_DURATION = 5000;
+
private final LinkedList<VibrationInfo> mPreviousVibrations;
private final int mPreviousVibrationsLimit;
private final boolean mAllowPriorityVibrationsInLowPowerMode;
@@ -89,6 +100,8 @@
private final IBatteryStats mBatteryStatsService;
private PowerManagerInternal mPowerManagerInternal;
private InputManager mIm;
+ private Vibrator mVibrator;
+ private SettingsObserver mSettingObserver;
private volatile VibrateThread mThread;
@@ -101,7 +114,8 @@
private Vibration mCurrentVibration;
private int mCurVibUid = -1;
private boolean mLowPowerMode;
- private SettingsObserver mSettingObserver;
+ private int mHapticFeedbackIntensity;
+ private int mNotificationIntensity;
native static boolean vibratorExists();
native static void vibratorInit();
@@ -112,27 +126,33 @@
native static long vibratorPerformEffect(long effect, long strength);
private class Vibration implements IBinder.DeathRecipient {
- private final IBinder mToken;
- private final VibrationEffect mEffect;
+ public final IBinder token;
// Start time in CLOCK_BOOTTIME base.
- private final long mStartTime;
+ public final long startTime;
// Start time in unix epoch time. Only to be used for debugging purposes and to correlate
- // with other system events, any duration calculations should be done use mStartTime so as
+ // with other system events, any duration calculations should be done use startTime so as
// not to be affected by discontinuities created by RTC adjustments.
- private final long mStartTimeDebug;
- private final int mUsageHint;
- private final int mUid;
- private final String mOpPkg;
+ public final long startTimeDebug;
+ public final int usageHint;
+ public final int uid;
+ public final String opPkg;
+
+ // The actual effect to be played.
+ public VibrationEffect effect;
+ // The original effect that was requested. This is non-null only when the original effect
+ // differs from the effect that's being played. Typically these two things differ because
+ // the effect was scaled based on the users vibration intensity settings.
+ public VibrationEffect originalEffect;
private Vibration(IBinder token, VibrationEffect effect,
int usageHint, int uid, String opPkg) {
- mToken = token;
- mEffect = effect;
- mStartTime = SystemClock.elapsedRealtime();
- mStartTimeDebug = System.currentTimeMillis();
- mUsageHint = usageHint;
- mUid = uid;
- mOpPkg = opPkg;
+ this.token = token;
+ this.effect = effect;
+ this.startTime = SystemClock.elapsedRealtime();
+ this.startTimeDebug = System.currentTimeMillis();
+ this.usageHint = usageHint;
+ this.uid = uid;
+ this.opPkg = opPkg;
}
public void binderDied() {
@@ -143,43 +163,68 @@
}
}
- public boolean hasLongerTimeout(long millis) {
- // If the current effect is a one shot vibration that will end after the given timeout
- // for the new one shot vibration, then just let the current vibration finish. All
- // other effect types will get pre-empted.
- if (mEffect instanceof VibrationEffect.OneShot) {
- VibrationEffect.OneShot oneShot = (VibrationEffect.OneShot) mEffect;
- return mStartTime + oneShot.getTiming() > SystemClock.uptimeMillis() + millis;
- }
- return false;
+ public boolean hasTimeoutLongerThan(long millis) {
+ final long duration = effect.getDuration();
+ return duration >= 0 && duration > millis;
}
- public boolean isSystemHapticFeedback() {
- boolean repeating = false;
- if (mEffect instanceof VibrationEffect.Waveform) {
- VibrationEffect.Waveform waveform = (VibrationEffect.Waveform) mEffect;
- repeating = (waveform.getRepeatIndex() < 0);
+ public boolean isHapticFeedback() {
+ if (effect instanceof VibrationEffect.Prebaked) {
+ VibrationEffect.Prebaked prebaked = (VibrationEffect.Prebaked) effect;
+ switch (prebaked.getId()) {
+ case VibrationEffect.EFFECT_CLICK:
+ case VibrationEffect.EFFECT_DOUBLE_CLICK:
+ case VibrationEffect.EFFECT_TICK:
+ return true;
+ default:
+ Slog.w(TAG, "Unknown prebaked vibration effect, "
+ + "assuming it isn't haptic feedback.");
+ return false;
+ }
}
- return (mUid == Process.SYSTEM_UID || mUid == 0 || SYSTEM_UI_PACKAGE.equals(mOpPkg))
- && !repeating;
+ final long duration = effect.getDuration();
+ return duration >= 0 && duration < MAX_HAPTIC_FEEDBACK_DURATION;
+ }
+
+ public boolean isNotification() {
+ switch (usageHint) {
+ case AudioAttributes.USAGE_NOTIFICATION:
+ case AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_REQUEST:
+ case AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_INSTANT:
+ case AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_DELAYED:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ public boolean isRingtone() {
+ return usageHint == AudioAttributes.USAGE_NOTIFICATION_RINGTONE;
+ }
+
+ public boolean isFromSystem() {
+ return uid == Process.SYSTEM_UID || uid == 0 || SYSTEM_UI_PACKAGE.equals(opPkg);
}
public VibrationInfo toInfo() {
- return new VibrationInfo(mStartTimeDebug, mEffect, mUsageHint, mUid, mOpPkg);
+ return new VibrationInfo(
+ startTimeDebug, effect, originalEffect, usageHint, uid, opPkg);
}
}
private static class VibrationInfo {
private final long mStartTimeDebug;
private final VibrationEffect mEffect;
+ private final VibrationEffect mOriginalEffect;
private final int mUsageHint;
private final int mUid;
private final String mOpPkg;
public VibrationInfo(long startTimeDebug, VibrationEffect effect,
- int usageHint, int uid, String opPkg) {
+ VibrationEffect originalEffect, int usageHint, int uid, String opPkg) {
mStartTimeDebug = startTimeDebug;
mEffect = effect;
+ mOriginalEffect = originalEffect;
mUsageHint = usageHint;
mUid = uid;
mOpPkg = opPkg;
@@ -192,6 +237,8 @@
.append(DateFormat.getDateTimeInstance().format(new Date(mStartTimeDebug)))
.append(", effect: ")
.append(mEffect)
+ .append(", originalEffect: ")
+ .append(mOriginalEffect)
.append(", usageHint: ")
.append(mUsageHint)
.append(", uid: ")
@@ -245,6 +292,7 @@
VibrationEffect tickEffect = createEffect(tickEffectTimings);
mFallbackEffects = new VibrationEffect[] { clickEffect, doubleClickEffect, tickEffect };
+
}
private static VibrationEffect createEffect(long[] timings) {
@@ -259,6 +307,7 @@
public void systemReady() {
mIm = mContext.getSystemService(InputManager.class);
+ mVibrator = mContext.getSystemService(Vibrator.class);
mSettingObserver = new SettingsObserver(mH);
mPowerManagerInternal = LocalServices.getService(PowerManagerInternal.class);
@@ -279,6 +328,14 @@
Settings.System.getUriFor(Settings.System.VIBRATE_INPUT_DEVICES),
true, mSettingObserver, UserHandle.USER_ALL);
+ mContext.getContentResolver().registerContentObserver(
+ Settings.System.getUriFor(Settings.System.HAPTIC_FEEDBACK_INTENSITY),
+ true, mSettingObserver, UserHandle.USER_ALL);
+
+ mContext.getContentResolver().registerContentObserver(
+ Settings.System.getUriFor(Settings.System.NOTIFICATION_VIBRATION_INTENSITY),
+ true, mSettingObserver, UserHandle.USER_ALL);
+
mContext.registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
@@ -380,11 +437,11 @@
// then just let the current one finish.
if (effect instanceof VibrationEffect.OneShot
&& mCurrentVibration != null
- && mCurrentVibration.mEffect instanceof VibrationEffect.OneShot) {
+ && mCurrentVibration.effect instanceof VibrationEffect.OneShot) {
VibrationEffect.OneShot newOneShot = (VibrationEffect.OneShot) effect;
VibrationEffect.OneShot currentOneShot =
- (VibrationEffect.OneShot) mCurrentVibration.mEffect;
- if (mCurrentVibration.hasLongerTimeout(newOneShot.getTiming())
+ (VibrationEffect.OneShot) mCurrentVibration.effect;
+ if (mCurrentVibration.hasTimeoutLongerThan(newOneShot.getDuration())
&& newOneShot.getAmplitude() == currentOneShot.getAmplitude()) {
if (DEBUG) {
Slog.d(TAG, "Ignoring incoming vibration in favor of current vibration");
@@ -398,7 +455,7 @@
// to grab the attention of the user, like ringtones and alarms, in favor of one-shot
// vibrations that are likely quite short.
if (!isRepeatingVibration(effect)
- && mCurrentVibration != null && isRepeatingVibration(mCurrentVibration.mEffect)) {
+ && mCurrentVibration != null && isRepeatingVibration(mCurrentVibration.effect)) {
if (DEBUG) {
Slog.d(TAG, "Ignoring incoming vibration in favor of alarm vibration");
}
@@ -421,13 +478,7 @@
}
private static boolean isRepeatingVibration(VibrationEffect effect) {
- if (effect instanceof VibrationEffect.Waveform) {
- final VibrationEffect.Waveform waveform = (VibrationEffect.Waveform) effect;
- if (waveform.getRepeatIndex() >= 0) {
- return true;
- }
- }
- return false;
+ return effect.getDuration() == Long.MAX_VALUE;
}
private void addToPreviousVibrationsLocked(Vibration vib) {
@@ -444,7 +495,7 @@
"cancelVibrate");
synchronized (mLock) {
- if (mCurrentVibration != null && mCurrentVibration.mToken == token) {
+ if (mCurrentVibration != null && mCurrentVibration.token == token) {
if (DEBUG) {
Slog.d(TAG, "Canceling vibration.");
}
@@ -488,15 +539,16 @@
}
private void startVibrationLocked(final Vibration vib) {
- if (!isAllowedToVibrate(vib)) {
- if (DEBUG) {
- Slog.e(TAG, "Vibrate ignored, low power mode");
- }
+ if (!isAllowedToVibrateLocked(vib)) {
return;
}
- if (vib.mUsageHint == AudioAttributes.USAGE_NOTIFICATION_RINGTONE &&
- !shouldVibrateForRingtone()) {
+ final int intensity = getCurrentIntensityLocked(vib);
+ if (intensity == Vibrator.VIBRATION_INTENSITY_OFF) {
+ return;
+ }
+
+ if (vib.isRingtone() && !shouldVibrateForRingtone()) {
if (DEBUG) {
Slog.e(TAG, "Vibrate ignored, not vibrating for ringtones");
}
@@ -508,26 +560,27 @@
if (mode == AppOpsManager.MODE_ERRORED) {
// We might be getting calls from within system_server, so we don't actually want
// to throw a SecurityException here.
- Slog.w(TAG, "Would be an error: vibrate from uid " + vib.mUid);
+ Slog.w(TAG, "Would be an error: vibrate from uid " + vib.uid);
}
return;
}
+ applyVibrationIntensityScalingLocked(vib, intensity);
startVibrationInnerLocked(vib);
}
private void startVibrationInnerLocked(Vibration vib) {
mCurrentVibration = vib;
- if (vib.mEffect instanceof VibrationEffect.OneShot) {
- VibrationEffect.OneShot oneShot = (VibrationEffect.OneShot) vib.mEffect;
- doVibratorOn(oneShot.getTiming(), oneShot.getAmplitude(), vib.mUid, vib.mUsageHint);
- mH.postDelayed(mVibrationEndRunnable, oneShot.getTiming());
- } else if (vib.mEffect instanceof VibrationEffect.Waveform) {
+ if (vib.effect instanceof VibrationEffect.OneShot) {
+ VibrationEffect.OneShot oneShot = (VibrationEffect.OneShot) vib.effect;
+ doVibratorOn(oneShot.getDuration(), oneShot.getAmplitude(), vib.uid, vib.usageHint);
+ mH.postDelayed(mVibrationEndRunnable, oneShot.getDuration());
+ } else if (vib.effect instanceof VibrationEffect.Waveform) {
// mThread better be null here. doCancelVibrate should always be
// called before startNextVibrationLocked or startVibrationLocked.
- VibrationEffect.Waveform waveform = (VibrationEffect.Waveform) vib.mEffect;
- mThread = new VibrateThread(waveform, vib.mUid, vib.mUsageHint);
+ VibrationEffect.Waveform waveform = (VibrationEffect.Waveform) vib.effect;
+ mThread = new VibrateThread(waveform, vib.uid, vib.usageHint);
mThread.start();
- } else if (vib.mEffect instanceof VibrationEffect.Prebaked) {
+ } else if (vib.effect instanceof VibrationEffect.Prebaked) {
long timeout = doVibratorPrebakedEffectLocked(vib);
if (timeout > 0) {
mH.postDelayed(mVibrationEndRunnable, timeout);
@@ -537,28 +590,91 @@
}
}
- private boolean isAllowedToVibrate(Vibration vib) {
+ private boolean isAllowedToVibrateLocked(Vibration vib) {
if (!mLowPowerMode) {
return true;
}
- if (vib.mUsageHint == AudioAttributes.USAGE_NOTIFICATION_RINGTONE) {
+
+ if (vib.usageHint == AudioAttributes.USAGE_NOTIFICATION_RINGTONE) {
return true;
}
- if (!mAllowPriorityVibrationsInLowPowerMode) {
- return false;
- }
- if (vib.mUsageHint == AudioAttributes.USAGE_ALARM ||
- vib.mUsageHint == AudioAttributes.USAGE_ASSISTANCE_ACCESSIBILITY ||
- vib.mUsageHint == AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_REQUEST) {
+ if (vib.usageHint == AudioAttributes.USAGE_ALARM ||
+ vib.usageHint == AudioAttributes.USAGE_ASSISTANCE_ACCESSIBILITY ||
+ vib.usageHint == AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_REQUEST) {
return true;
}
return false;
}
+ private int getCurrentIntensityLocked(Vibration vib) {
+ if (vib.isNotification() || vib.isRingtone()){
+ return mNotificationIntensity;
+ } else if (vib.isHapticFeedback()) {
+ return mHapticFeedbackIntensity;
+ } else {
+ return Vibrator.VIBRATION_INTENSITY_MEDIUM;
+ }
+ }
+
+ /**
+ * Scale the vibration effect by the intensity as appropriate based its intent.
+ */
+ private void applyVibrationIntensityScalingLocked(Vibration vib, int intensity) {
+ if (vib.effect instanceof VibrationEffect.Prebaked) {
+ // Prebaked effects are always just a direct translation from intensity to
+ // EffectStrength.
+ VibrationEffect.Prebaked prebaked = (VibrationEffect.Prebaked)vib.effect;
+ prebaked.setEffectStrength(intensityToEffectStrength(intensity));
+ return;
+ }
+
+ final float gamma;
+ final int maxAmplitude;
+ if (vib.isNotification() || vib.isRingtone()) {
+ if (intensity == Vibrator.VIBRATION_INTENSITY_LOW) {
+ gamma = GAMMA_SCALE_FACTOR_MINIMUM;
+ maxAmplitude = MAX_AMPLITUDE_MINIMUM_INTENSITY;
+ } else if (intensity == Vibrator.VIBRATION_INTENSITY_MEDIUM) {
+ gamma = GAMMA_SCALE_FACTOR_LOW;
+ maxAmplitude = MAX_AMPLITUDE_LOW_INTENSITY;
+ } else {
+ gamma = GAMMA_SCALE_FACTOR_NONE;
+ maxAmplitude = VibrationEffect.MAX_AMPLITUDE;
+ }
+ } else {
+ if (intensity == Vibrator.VIBRATION_INTENSITY_LOW) {
+ gamma = GAMMA_SCALE_FACTOR_LOW;
+ maxAmplitude = MAX_AMPLITUDE_LOW_INTENSITY;
+ } else if (intensity == Vibrator.VIBRATION_INTENSITY_HIGH) {
+ gamma = GAMMA_SCALE_FACTOR_HIGH;
+ maxAmplitude = VibrationEffect.MAX_AMPLITUDE;
+ } else {
+ gamma = GAMMA_SCALE_FACTOR_NONE;
+ maxAmplitude = VibrationEffect.MAX_AMPLITUDE;
+ }
+ }
+
+ VibrationEffect scaledEffect = null;
+ if (vib.effect instanceof VibrationEffect.OneShot) {
+ VibrationEffect.OneShot oneShot = (VibrationEffect.OneShot) vib.effect;
+ scaledEffect = oneShot.scale(gamma, maxAmplitude);
+ } else if (vib.effect instanceof VibrationEffect.Waveform) {
+ VibrationEffect.Waveform waveform = (VibrationEffect.Waveform) vib.effect;
+ scaledEffect = waveform.scale(gamma, maxAmplitude);
+ } else {
+ Slog.w(TAG, "Unable to apply intensity scaling, unknown VibrationEffect type");
+ }
+
+ if (scaledEffect != null) {
+ vib.originalEffect = vib.effect;
+ vib.effect = scaledEffect;
+ }
+ }
+
private boolean shouldVibrateForRingtone() {
- AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
+ AudioManager audioManager = mContext.getSystemService(AudioManager.class);
int ringerMode = audioManager.getRingerModeInternal();
// "Also vibrate for calls" Setting in Sound
if (Settings.System.getInt(
@@ -573,10 +689,10 @@
int mode;
try {
mode = mAppOpsService.checkAudioOperation(AppOpsManager.OP_VIBRATE,
- vib.mUsageHint, vib.mUid, vib.mOpPkg);
+ vib.usageHint, vib.uid, vib.opPkg);
if (mode == AppOpsManager.MODE_ALLOWED) {
mode = mAppOpsService.startOperation(AppOpsManager.getToken(mAppOpsService),
- AppOpsManager.OP_VIBRATE, vib.mUid, vib.mOpPkg);
+ AppOpsManager.OP_VIBRATE, vib.uid, vib.opPkg);
}
} catch (RemoteException e) {
Slog.e(TAG, "Failed to get appop mode for vibration!", e);
@@ -589,8 +705,8 @@
if (mCurrentVibration != null) {
try {
mAppOpsService.finishOperation(AppOpsManager.getToken(mAppOpsService),
- AppOpsManager.OP_VIBRATE, mCurrentVibration.mUid,
- mCurrentVibration.mOpPkg);
+ AppOpsManager.OP_VIBRATE, mCurrentVibration.uid,
+ mCurrentVibration.opPkg);
} catch (RemoteException e) { }
unlinkVibration(mCurrentVibration);
mCurrentVibration = null;
@@ -600,9 +716,9 @@
private void linkVibration(Vibration vib) {
// Only link against waveforms since they potentially don't have a finish if
// they're repeating. Let other effects just play out until they're done.
- if (vib.mEffect instanceof VibrationEffect.Waveform) {
+ if (vib.effect instanceof VibrationEffect.Waveform) {
try {
- vib.mToken.linkToDeath(vib, 0);
+ vib.token.linkToDeath(vib, 0);
} catch (RemoteException e) {
return;
}
@@ -610,8 +726,8 @@
}
private void unlinkVibration(Vibration vib) {
- if (vib.mEffect instanceof VibrationEffect.Waveform) {
- vib.mToken.unlinkToDeath(vib, 0);
+ if (vib.effect instanceof VibrationEffect.Waveform) {
+ vib.token.unlinkToDeath(vib, 0);
}
}
@@ -619,6 +735,7 @@
synchronized (mLock) {
boolean devicesUpdated = updateInputDeviceVibratorsLocked();
boolean lowPowerModeUpdated = updateLowPowerModeLocked();
+ updateVibrationIntensityLocked();
if (devicesUpdated || lowPowerModeUpdated) {
// If the state changes out from under us then just reset.
@@ -678,6 +795,15 @@
return false;
}
+ private void updateVibrationIntensityLocked() {
+ mHapticFeedbackIntensity = Settings.System.getIntForUser(mContext.getContentResolver(),
+ Settings.System.HAPTIC_FEEDBACK_INTENSITY,
+ mVibrator.getDefaultHapticFeedbackIntensity(), UserHandle.USER_CURRENT);
+ mNotificationIntensity = Settings.System.getIntForUser(mContext.getContentResolver(),
+ Settings.System.NOTIFICATION_VIBRATION_INTENSITY,
+ mVibrator.getDefaultNotificationVibrationIntensity(), UserHandle.USER_CURRENT);
+ }
+
@Override
public void onInputDeviceAdded(int deviceId) {
updateVibrators();
@@ -755,28 +881,32 @@
}
private long doVibratorPrebakedEffectLocked(Vibration vib) {
+ final VibrationEffect.Prebaked prebaked = (VibrationEffect.Prebaked) vib.effect;
+ final boolean usingInputDeviceVibrators;
synchronized (mInputDeviceVibrators) {
- VibrationEffect.Prebaked prebaked = (VibrationEffect.Prebaked) vib.mEffect;
- // Input devices don't support prebaked effect, so skip trying it with them.
- if (mInputDeviceVibrators.isEmpty()) {
- long timeout = vibratorPerformEffect(prebaked.getId(), EffectStrength.MEDIUM);
- if (timeout > 0) {
- noteVibratorOnLocked(vib.mUid, timeout);
- return timeout;
- }
- }
- if (!prebaked.shouldFallback()) {
- return 0;
- }
- VibrationEffect effect = getFallbackEffect(prebaked.getId());
- if (effect == null) {
- Slog.w(TAG, "Failed to play prebaked effect, no fallback");
- return 0;
- }
- Vibration fallbackVib =
- new Vibration(vib.mToken, effect, vib.mUsageHint, vib.mUid, vib.mOpPkg);
- startVibrationInnerLocked(fallbackVib);
+ usingInputDeviceVibrators = !mInputDeviceVibrators.isEmpty();
}
+ // Input devices don't support prebaked effect, so skip trying it with them.
+ if (!usingInputDeviceVibrators) {
+ long timeout = vibratorPerformEffect(prebaked.getId(), prebaked.getEffectStrength());
+ if (timeout > 0) {
+ noteVibratorOnLocked(vib.uid, timeout);
+ return timeout;
+ }
+ }
+ if (!prebaked.shouldFallback()) {
+ return 0;
+ }
+ VibrationEffect effect = getFallbackEffect(prebaked.getId());
+ if (effect == null) {
+ 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);
+ final int intensity = getCurrentIntensityLocked(fallbackVib);
+ applyVibrationIntensityScalingLocked(fallbackVib, intensity);
+ startVibrationInnerLocked(fallbackVib);
return 0;
}
@@ -787,6 +917,25 @@
return mFallbackEffects[effectId];
}
+ /**
+ * Return the current desired effect strength.
+ *
+ * If the returned value is < 0 then the vibration shouldn't be played at all.
+ */
+ private static int intensityToEffectStrength(int intensity) {
+ switch (intensity) {
+ case Vibrator.VIBRATION_INTENSITY_LOW:
+ return EffectStrength.LIGHT;
+ case Vibrator.VIBRATION_INTENSITY_MEDIUM:
+ return EffectStrength.MEDIUM;
+ case Vibrator.VIBRATION_INTENSITY_HIGH:
+ return EffectStrength.STRONG;
+ default:
+ Slog.w(TAG, "Got unexpected vibration intensity: " + intensity);
+ return EffectStrength.STRONG;
+ }
+ }
+
private void noteVibratorOnLocked(int uid, long millis) {
try {
mBatteryStatsService.noteVibratorOn(uid, millis);
@@ -945,7 +1094,8 @@
// haptic feedback as part of the transition. So we don't cancel
// system vibrations.
if (mCurrentVibration != null
- && !mCurrentVibration.isSystemHapticFeedback()) {
+ && !(mCurrentVibration.isHapticFeedback()
+ && mCurrentVibration.isFromSystem())) {
doCancelVibrateLocked();
}
}
@@ -957,10 +1107,21 @@
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
- pw.println("Previous vibrations:");
+ pw.println("Vibrator Service:");
synchronized (mLock) {
+ pw.print(" mCurrentVibration=");
+ if (mCurrentVibration != null) {
+ pw.println(mCurrentVibration.toInfo().toString());
+ } else {
+ pw.println("null");
+ }
+ pw.println(" mLowPowerMode=" + mLowPowerMode);
+ pw.println(" mHapticFeedbackIntensity=" + mHapticFeedbackIntensity);
+ pw.println(" mNotificationIntensity=" + mNotificationIntensity);
+ pw.println("");
+ pw.println(" Previous vibrations:");
for (VibrationInfo info : mPreviousVibrations) {
- pw.print(" ");
+ pw.print(" ");
pw.println(info.toString());
}
}
diff --git a/services/core/java/com/android/server/Watchdog.java b/services/core/java/com/android/server/Watchdog.java
index 30432df..5215b6f 100644
--- a/services/core/java/com/android/server/Watchdog.java
+++ b/services/core/java/com/android/server/Watchdog.java
@@ -87,6 +87,7 @@
"media.metrics", // system/bin/mediametrics
"media.codec", // vendor/bin/hw/android.hardware.media.omx@1.0-service
"com.android.bluetooth", // Bluetooth service
+ "statsd", // Stats daemon
};
public static final List<String> HAL_INTERFACES_OF_INTEREST = Arrays.asList(
diff --git a/services/core/java/com/android/server/am/ActiveInstrumentation.java b/services/core/java/com/android/server/am/ActiveInstrumentation.java
index 84e4ea9..4a65733 100644
--- a/services/core/java/com/android/server/am/ActiveInstrumentation.java
+++ b/services/core/java/com/android/server/am/ActiveInstrumentation.java
@@ -22,6 +22,9 @@
import android.content.pm.ApplicationInfo;
import android.os.Bundle;
import android.util.PrintWriterPrinter;
+import android.util.proto.ProtoOutputStream;
+
+import com.android.server.am.proto.ActiveInstrumentationProto;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -119,4 +122,26 @@
pw.print(prefix); pw.print("mArguments=");
pw.println(mArguments);
}
+
+ void writeToProto(ProtoOutputStream proto, long fieldId) {
+ long token = proto.start(fieldId);
+ mClass.writeToProto(proto, ActiveInstrumentationProto.CLASS);
+ proto.write(ActiveInstrumentationProto.FINISHED, mFinished);
+ for (int i=0; i<mRunningProcesses.size(); i++) {
+ mRunningProcesses.get(i).writeToProto(proto,
+ ActiveInstrumentationProto.RUNNING_PROCESSES);
+ }
+ for (String p : mTargetProcesses) {
+ proto.write(ActiveInstrumentationProto.TARGET_PROCESSES, p);
+ }
+ if (mTargetInfo != null) {
+ mTargetInfo.writeToProto(proto, ActiveInstrumentationProto.TARGET_INFO);
+ }
+ proto.write(ActiveInstrumentationProto.PROFILE_FILE, mProfileFile);
+ proto.write(ActiveInstrumentationProto.WATCHER, mWatcher.toString());
+ proto.write(ActiveInstrumentationProto.UI_AUTOMATION_CONNECTION,
+ mUiAutomationConnection.toString());
+ proto.write(ActiveInstrumentationProto.ARGUMENTS, mArguments.toString());
+ proto.end(token);
+ }
}
diff --git a/services/core/java/com/android/server/am/ActivityDisplay.java b/services/core/java/com/android/server/am/ActivityDisplay.java
index db21ef1..220014f 100644
--- a/services/core/java/com/android/server/am/ActivityDisplay.java
+++ b/services/core/java/com/android/server/am/ActivityDisplay.java
@@ -16,6 +16,7 @@
package com.android.server.am;
+import static android.app.ActivityManager.StackId.INVALID_STACK_ID;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
@@ -50,7 +51,9 @@
import android.view.Display;
import com.android.internal.annotations.VisibleForTesting;
import com.android.server.wm.ConfigurationContainer;
+import com.android.server.wm.DisplayWindowController;
+import com.android.server.wm.WindowContainerListener;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -58,7 +61,8 @@
* Exactly one of these classes per Display in the system. Capable of holding zero or more
* attached {@link ActivityStack}s.
*/
-class ActivityDisplay extends ConfigurationContainer<ActivityStack> {
+class ActivityDisplay extends ConfigurationContainer<ActivityStack>
+ implements WindowContainerListener {
private static final String TAG = TAG_WITH_CLASS_NAME ? "ActivityDisplay" : TAG_AM;
private static final String TAG_STACK = TAG + POSTFIX_STACK;
@@ -100,6 +104,8 @@
// Used in updating the display size
private Point mTmpDisplaySize = new Point();
+ private DisplayWindowController mWindowContainerController;
+
ActivityDisplay(ActivityStackSupervisor supervisor, int displayId) {
mSupervisor = supervisor;
mDisplayId = displayId;
@@ -108,10 +114,15 @@
throw new IllegalStateException("Display does not exist displayId=" + displayId);
}
mDisplay = display;
+ mWindowContainerController = createWindowContainerController();
updateBounds();
}
+ protected DisplayWindowController createWindowContainerController() {
+ return new DisplayWindowController(mDisplayId, this);
+ }
+
void updateBounds() {
mDisplay.getSize(mTmpDisplaySize);
setBounds(0, 0, mTmpDisplaySize.x, mTmpDisplaySize.y);
@@ -148,7 +159,10 @@
private void positionChildAt(ActivityStack stack, int position) {
mStacks.remove(stack);
- mStacks.add(getTopInsertPosition(stack, position), stack);
+ final int insertPosition = getTopInsertPosition(stack, position);
+ mStacks.add(insertPosition, stack);
+ mWindowContainerController.positionChildAt(stack.getWindowContainerController(),
+ insertPosition);
}
private int getTopInsertPosition(ActivityStack stack, int candidatePosition) {
@@ -410,7 +424,7 @@
}
} finally {
final ActivityStack topFullscreenStack =
- getStack(WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD);
+ getTopStackInWindowingMode(WINDOWING_MODE_FULLSCREEN);
if (topFullscreenStack != null && mHomeStack != null && !isTopStack(mHomeStack)) {
// Whenever split-screen is dismissed we want the home stack directly behind the
// current top fullscreen stack so it shows up when the top stack is finished.
@@ -566,6 +580,16 @@
return false;
}
+ ActivityStack getTopStackInWindowingMode(int windowingMode) {
+ for (int i = mStacks.size() - 1; i >= 0; --i) {
+ final ActivityStack current = mStacks.get(i);
+ if (windowingMode == current.getWindowingMode()) {
+ return current;
+ }
+ }
+ return null;
+ }
+
int getIndexOf(ActivityStack stack) {
return mStacks.indexOf(stack);
}
@@ -651,6 +675,64 @@
&& (mSupervisor.mService.mRunningVoice == null);
}
+ /**
+ * @return the stack currently above the home stack. Can be null if there is no home stack, or
+ * the home stack is already on top.
+ */
+ ActivityStack getStackAboveHome() {
+ if (mHomeStack == null) {
+ // Skip if there is no home stack
+ return null;
+ }
+
+ final int stackIndex = mStacks.indexOf(mHomeStack) + 1;
+ return (stackIndex < mStacks.size()) ? mStacks.get(stackIndex) : null;
+ }
+
+ /**
+ * Adjusts the home stack behind the last visible stack in the display if necessary. Generally
+ * used in conjunction with {@link #moveHomeStackBehindStack}.
+ */
+ void moveHomeStackBehindBottomMostVisibleStack() {
+ if (mHomeStack == null) {
+ // Skip if there is no home stack
+ return;
+ }
+
+ // Move the home stack to the bottom to not affect the following visibility checks
+ positionChildAtBottom(mHomeStack);
+
+ // Find the next position where the homes stack should be placed
+ final int numStacks = mStacks.size();
+ for (int stackNdx = 0; stackNdx < numStacks; stackNdx++) {
+ final ActivityStack stack = mStacks.get(stackNdx);
+ if (stack == mHomeStack) {
+ continue;
+ }
+ final int winMode = stack.getWindowingMode();
+ final boolean isValidWindowingMode = winMode == WINDOWING_MODE_FULLSCREEN ||
+ winMode == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
+ if (stack.shouldBeVisible(null) && isValidWindowingMode) {
+ // Move the home stack to behind this stack
+ positionChildAt(mHomeStack, Math.max(0, stackNdx - 1));
+ break;
+ }
+ }
+ }
+
+ /**
+ * Moves the home stack behind the given {@param stack} if possible. If {@param stack} is not
+ * currently in the display, then then the home stack is moved to the back. Generally used in
+ * conjunction with {@link #moveHomeStackBehindBottomMostVisibleStack}.
+ */
+ void moveHomeStackBehindStack(ActivityStack behindStack) {
+ if (behindStack == null) {
+ return;
+ }
+
+ positionChildAt(mHomeStack, Math.max(0, mStacks.indexOf(behindStack) - 1));
+ }
+
boolean isSleeping() {
return mSleeping;
}
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 1eec982..b7e5d37 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -38,6 +38,7 @@
import static android.app.ActivityThread.PROC_START_SEQ_IDENT;
import static android.app.AppOpsManager.OP_ASSIST_STRUCTURE;
import static android.app.AppOpsManager.OP_NONE;
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
@@ -45,6 +46,7 @@
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY;
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.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
@@ -84,6 +86,7 @@
import static android.os.Process.SCHED_FIFO;
import static android.os.Process.SCHED_OTHER;
import static android.os.Process.SCHED_RESET_ON_FORK;
+import static android.os.Process.SE_UID;
import static android.os.Process.SHELL_UID;
import static android.os.Process.SIGNAL_QUIT;
import static android.os.Process.SIGNAL_USR1;
@@ -216,6 +219,7 @@
import android.app.ActivityManagerInternal;
import android.app.ActivityManagerInternal.ScreenObserver;
import android.app.ActivityManagerInternal.SleepToken;
+import android.app.ActivityManagerProto;
import android.app.ActivityOptions;
import android.app.ActivityThread;
import android.app.AlertDialog;
@@ -226,6 +230,7 @@
import android.app.BroadcastOptions;
import android.app.ContentProviderHolder;
import android.app.Dialog;
+import android.app.GrantedUriPermission;
import android.app.IActivityController;
import android.app.IActivityManager;
import android.app.IApplicationThread;
@@ -372,7 +377,9 @@
import android.util.TimingsTraceLog;
import android.util.Xml;
import android.util.proto.ProtoOutputStream;
+import android.util.proto.ProtoUtils;
import android.view.Gravity;
+import android.view.IRecentsAnimationRunner;
import android.view.LayoutInflater;
import android.view.RemoteAnimationDefinition;
import android.view.View;
@@ -428,12 +435,16 @@
import com.android.server.ThreadPriorityBooster;
import com.android.server.Watchdog;
import com.android.server.am.ActivityStack.ActivityState;
-import com.android.server.am.EventLogTags;
import com.android.server.am.proto.ActivityManagerServiceProto;
import com.android.server.am.proto.BroadcastProto;
import com.android.server.am.proto.GrantUriProto;
+import com.android.server.am.proto.ImportanceTokenProto;
import com.android.server.am.proto.MemInfoProto;
import com.android.server.am.proto.NeededUriGrantsProto;
+import com.android.server.am.proto.ProcessOomProto;
+import com.android.server.am.proto.ProcessToGcProto;
+import com.android.server.am.proto.ProcessesProto;
+import com.android.server.am.proto.ProcessesProto.UidObserverRegistrationProto;
import com.android.server.am.proto.StickyBroadcastProto;
import com.android.server.firewall.IntentFirewall;
import com.android.server.job.JobSchedulerInternal;
@@ -442,6 +453,7 @@
import com.android.server.utils.PriorityDump;
import com.android.server.vr.VrManagerInternal;
import com.android.server.wm.PinnedStackWindowController;
+import com.android.server.wm.RecentsAnimationController;
import com.android.server.wm.WindowManagerService;
import dalvik.system.VMRuntime;
@@ -939,6 +951,16 @@
return "ImportanceToken { " + Integer.toHexString(System.identityHashCode(this))
+ " " + reason + " " + pid + " " + token + " }";
}
+
+ void writeToProto(ProtoOutputStream proto, long fieldId) {
+ final long pToken = proto.start(fieldId);
+ proto.write(ImportanceTokenProto.PID, pid);
+ if (token != null) {
+ proto.write(ImportanceTokenProto.TOKEN, token.toString());
+ }
+ proto.write(ImportanceTokenProto.REASON, reason);
+ proto.end(pToken);
+ }
}
final SparseArray<ImportanceToken> mImportantProcesses = new SparseArray<ImportanceToken>();
@@ -1317,6 +1339,14 @@
duration = _duration;
tag = _tag;
}
+
+ void writeToProto(ProtoOutputStream proto, long fieldId) {
+ final long token = proto.start(fieldId);
+ proto.write(ProcessesProto.PendingTempWhitelist.TARGET_UID, targetUid);
+ proto.write(ProcessesProto.PendingTempWhitelist.DURATION_MS, duration);
+ proto.write(ProcessesProto.PendingTempWhitelist.TAG, tag);
+ proto.end(token);
+ }
}
final SparseArray<PendingTempWhitelist> mPendingTempWhitelist = new SparseArray<>();
@@ -1584,6 +1614,14 @@
String mProfileApp = null;
ProcessRecord mProfileProc = null;
ProfilerInfo mProfilerInfo = null;
+
+ /**
+ * Stores a map of process name -> agent string. When a process is started and mAgentAppMap
+ * is not null, this map is checked and the mapped agent installed during bind-time. Note:
+ * A non-null agent in mProfileInfo overrides this.
+ */
+ private @Nullable Map<String, String> mAppAgentMap = null;
+
int mProfileType = 0;
final ProcessMap<Pair<Long, String>> mMemWatchProcesses = new ProcessMap<>();
String mMemWatchDumpProcName;
@@ -1593,7 +1631,7 @@
String mTrackAllocationApp = null;
String mNativeDebuggingApp = null;
- final long[] mTmpLong = new long[2];
+ final long[] mTmpLong = new long[3];
private final ArraySet<BroadcastQueue> mTmpBroadcastQueue = new ArraySet();
@@ -1641,6 +1679,20 @@
final SparseIntArray lastProcStates;
+ // Please keep the enum lists in sync
+ private static int[] ORIG_ENUMS = new int[]{
+ ActivityManager.UID_OBSERVER_IDLE,
+ ActivityManager.UID_OBSERVER_ACTIVE,
+ ActivityManager.UID_OBSERVER_GONE,
+ ActivityManager.UID_OBSERVER_PROCSTATE,
+ };
+ private static int[] PROTO_ENUMS = new int[]{
+ ActivityManagerProto.UID_OBSERVER_FLAG_IDLE,
+ ActivityManagerProto.UID_OBSERVER_FLAG_ACTIVE,
+ ActivityManagerProto.UID_OBSERVER_FLAG_GONE,
+ ActivityManagerProto.UID_OBSERVER_FLAG_PROCSTATE,
+ };
+
UidObserverRegistration(int _uid, String _pkg, int _which, int _cutpoint) {
uid = _uid;
pkg = _pkg;
@@ -1652,6 +1704,25 @@
lastProcStates = null;
}
}
+
+ void writeToProto(ProtoOutputStream proto, long fieldId) {
+ final long token = proto.start(fieldId);
+ proto.write(UidObserverRegistrationProto.UID, uid);
+ proto.write(UidObserverRegistrationProto.PACKAGE, pkg);
+ ProtoUtils.writeBitWiseFlagsToProtoEnum(proto, UidObserverRegistrationProto.FLAGS,
+ which, ORIG_ENUMS, PROTO_ENUMS);
+ proto.write(UidObserverRegistrationProto.CUT_POINT, cutpoint);
+ if (lastProcStates != null) {
+ final int NI = lastProcStates.size();
+ for (int i=0; i<NI; i++) {
+ final long pToken = proto.start(UidObserverRegistrationProto.LAST_PROC_STATES);
+ proto.write(UidObserverRegistrationProto.ProcState.UID, lastProcStates.keyAt(i));
+ proto.write(UidObserverRegistrationProto.ProcState.STATE, lastProcStates.valueAt(i));
+ proto.end(pToken);
+ }
+ }
+ proto.end(token);
+ }
}
final List<ScreenObserver> mScreenObservers = new ArrayList<>();
@@ -2503,22 +2574,24 @@
}
int num = 0;
- long[] tmp = new long[2];
+ long[] tmp = new long[3];
do {
ProcessRecord proc;
int procState;
+ int statType;
int pid;
long lastPssTime;
synchronized (ActivityManagerService.this) {
if (mPendingPssProcesses.size() <= 0) {
if (mTestPssMode || DEBUG_PSS) Slog.d(TAG_PSS,
- "Collected PSS of " + num + " processes in "
+ "Collected pss of " + num + " processes in "
+ (SystemClock.uptimeMillis() - start) + "ms");
mPendingPssProcesses.clear();
return;
}
proc = mPendingPssProcesses.remove(0);
procState = proc.pssProcState;
+ statType = proc.pssStatType;
lastPssTime = proc.lastPssTime;
if (proc.thread != null && procState == proc.setProcState
&& (lastPssTime+ProcessList.PSS_SAFE_TIME_FROM_STATE_CHANGE)
@@ -2537,8 +2610,17 @@
if (pss != 0 && proc.thread != null && proc.setProcState == procState
&& proc.pid == pid && proc.lastPssTime == lastPssTime) {
num++;
- recordPssSampleLocked(proc, procState, pss, tmp[0], tmp[1],
- endTime-startTime, SystemClock.uptimeMillis());
+ ProcessList.commitNextPssTime(proc.procStateMemTracker);
+ recordPssSampleLocked(proc, procState, pss, tmp[0], tmp[1], tmp[2],
+ statType, endTime-startTime, SystemClock.uptimeMillis());
+ } else {
+ ProcessList.abortNextPssTime(proc.procStateMemTracker);
+ if (DEBUG_PSS) Slog.d(TAG_PSS, "Skipped pss collection of " + pid +
+ ": " + (proc.thread == null ? "NO_THREAD " : "") +
+ (proc.pid != pid ? "PID_CHANGED " : "") +
+ " initState=" + procState + " curState=" +
+ proc.setProcState + " " +
+ (proc.lastPssTime != lastPssTime ? "TIME_CHANGED" : ""));
}
}
}
@@ -2835,7 +2917,7 @@
}
});
- mGrantFile = new AtomicFile(new File(systemDir, "urigrants.xml"));
+ mGrantFile = new AtomicFile(new File(systemDir, "urigrants.xml"), "uri-grants");
mUserController = new UserController(this);
@@ -3366,6 +3448,7 @@
final void showAppWarningsIfNeededLocked(ActivityRecord r) {
mAppWarnings.showUnsupportedCompileSdkDialogIfNeeded(r);
mAppWarnings.showUnsupportedDisplaySizeDialogIfNeeded(r);
+ mAppWarnings.showDeprecatedTargetDialogIfNeeded(r);
}
private int updateLruProcessInternalLocked(ProcessRecord app, long now, int index,
@@ -3963,10 +4046,15 @@
if (app.info.isPrivilegedApp() &&
SystemProperties.getBoolean("pm.dexopt.priv-apps-oob", false)) {
- runtimeFlags |= Zygote.DISABLE_VERIFIER;
runtimeFlags |= Zygote.ONLY_USE_SYSTEM_OAT_FILES;
}
+ if (app.info.isAllowedToUseHiddenApi()) {
+ // This app is allowed to use undocumented and private APIs. Set
+ // up its runtime with the appropriate flag.
+ runtimeFlags |= Zygote.DISABLE_HIDDEN_API_CHECKS;
+ }
+
String invokeWith = null;
if ((app.info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
// Debuggable apps may include a wrapper script with their library directory.
@@ -4923,23 +5011,16 @@
}
@Override
- public int startRecentsActivity(IAssistDataReceiver assistDataReceiver, Bundle options,
- Bundle activityOptions, int userId) {
- if (!mRecentTasks.isCallerRecents(Binder.getCallingUid())) {
- String msg = "Permission Denial: startRecentsActivity() from pid="
- + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid()
- + " not recent tasks package";
- Slog.w(TAG, msg);
- throw new SecurityException(msg);
- }
-
- final SafeActivityOptions safeOptions = SafeActivityOptions.fromBundle(options);
- final int recentsUid = mRecentTasks.getRecentsComponentUid();
- final ComponentName recentsComponent = mRecentTasks.getRecentsComponent();
- final String recentsPackage = recentsComponent.getPackageName();
+ public void startRecentsActivity(Intent intent, IAssistDataReceiver assistDataReceiver,
+ IRecentsAnimationRunner recentsAnimationRunner) {
+ enforceCallerIsRecentsOrHasPermission(MANAGE_ACTIVITY_STACKS, "startRecentsActivity()");
final long origId = Binder.clearCallingIdentity();
try {
synchronized (this) {
+ final int recentsUid = mRecentTasks.getRecentsComponentUid();
+ final ComponentName recentsComponent = mRecentTasks.getRecentsComponent();
+ final String recentsPackage = recentsComponent.getPackageName();
+
// If provided, kick off the request for the assist data in the background before
// starting the activity
if (assistDataReceiver != null) {
@@ -4956,17 +5037,24 @@
recentsUid, recentsPackage);
}
- final Intent intent = new Intent();
- intent.setFlags(FLAG_ACTIVITY_NEW_TASK);
- intent.setComponent(recentsComponent);
- intent.putExtras(options);
+ // Start a new recents animation
+ final RecentsAnimation anim = new RecentsAnimation(this, mStackSupervisor,
+ mActivityStartController, mWindowManager, mUserController);
+ anim.startRecentsActivity(intent, recentsAnimationRunner, recentsComponent,
+ recentsUid);
+ }
+ } finally {
+ Binder.restoreCallingIdentity(origId);
+ }
+ }
- return mActivityStartController.obtainStarter(intent, "startRecentsActivity")
- .setCallingUid(recentsUid)
- .setCallingPackage(recentsPackage)
- .setActivityOptions(safeOptions)
- .setMayWait(userId)
- .execute();
+ @Override
+ public void cancelRecentsAnimation() {
+ enforceCallerIsRecentsOrHasPermission(MANAGE_ACTIVITY_STACKS, "cancelRecentsAnimation()");
+ final long origId = Binder.clearCallingIdentity();
+ try {
+ synchronized (this) {
+ mWindowManager.cancelRecentsAnimation();
}
} finally {
Binder.restoreCallingIdentity(origId);
@@ -6249,7 +6337,8 @@
if (!keepState) {
synchronized (this) {
// Remove all permissions granted from/to this package
- removeUriPermissionsForPackageLocked(packageName, resolvedUserId, true);
+ removeUriPermissionsForPackageLocked(packageName, resolvedUserId, true,
+ false);
}
// Reset notification state
@@ -6577,7 +6666,7 @@
if (proc.thread != null && proc.setAdj == oomAdj) {
// Record this for posterity if the process has been stable.
proc.baseProcessTracker.addPss(infos[i].getTotalPss(),
- infos[i].getTotalUss(), false,
+ infos[i].getTotalUss(), infos[i].getTotalRss(), false,
ProcessStats.ADD_PSS_EXTERNAL_SLOW, endTime-startTime,
proc.pkgList);
}
@@ -6600,7 +6689,7 @@
oomAdj = proc != null ? proc.setAdj : 0;
}
}
- long[] tmpUss = new long[1];
+ long[] tmpUss = new long[3];
long startTime = SystemClock.currentThreadTimeMillis();
pss[i] = Debug.getPss(pids[i], tmpUss, null);
long endTime = SystemClock.currentThreadTimeMillis();
@@ -6608,7 +6697,7 @@
synchronized (this) {
if (proc.thread != null && proc.setAdj == oomAdj) {
// Record this for posterity if the process has been stable.
- proc.baseProcessTracker.addPss(pss[i], tmpUss[0], false,
+ proc.baseProcessTracker.addPss(pss[i], tmpUss[0], tmpUss[2], false,
ProcessStats.ADD_PSS_EXTERNAL, endTime-startTime, proc.pkgList);
}
}
@@ -6904,7 +6993,7 @@
}
// Remove transient permissions granted from/to this package/user
- removeUriPermissionsForPackageLocked(packageName, userId, false);
+ removeUriPermissionsForPackageLocked(packageName, userId, false, false);
if (doit) {
for (i = mBroadcastQueues.length - 1; i >= 0; i--) {
@@ -7280,25 +7369,6 @@
}
}
- ProfilerInfo profilerInfo = null;
- String preBindAgent = null;
- if (mProfileApp != null && mProfileApp.equals(processName)) {
- mProfileProc = app;
- if (mProfilerInfo != null) {
- // Send a profiler info object to the app if either a file is given, or
- // an agent should be loaded at bind-time.
- boolean needsInfo = mProfilerInfo.profileFile != null
- || mProfilerInfo.attachAgentDuringBind;
- profilerInfo = needsInfo ? new ProfilerInfo(mProfilerInfo) : null;
- if (!mProfilerInfo.attachAgentDuringBind) {
- preBindAgent = mProfilerInfo.agent;
- }
- }
- } else if (app.instr != null && app.instr.mProfileFile != null) {
- profilerInfo = new ProfilerInfo(app.instr.mProfileFile, null, 0, false, false,
- null, false);
- }
-
boolean enableTrackAllocation = false;
if (mTrackAllocationApp != null && mTrackAllocationApp.equals(processName)) {
enableTrackAllocation = true;
@@ -7323,6 +7393,39 @@
ApplicationInfo appInfo = app.instr != null ? app.instr.mTargetInfo : app.info;
app.compat = compatibilityInfoForPackageLocked(appInfo);
+ ProfilerInfo profilerInfo = null;
+ String preBindAgent = null;
+ if (mProfileApp != null && mProfileApp.equals(processName)) {
+ mProfileProc = app;
+ if (mProfilerInfo != null) {
+ // Send a profiler info object to the app if either a file is given, or
+ // an agent should be loaded at bind-time.
+ boolean needsInfo = mProfilerInfo.profileFile != null
+ || mProfilerInfo.attachAgentDuringBind;
+ profilerInfo = needsInfo ? new ProfilerInfo(mProfilerInfo) : null;
+ if (mProfilerInfo.agent != null) {
+ preBindAgent = mProfilerInfo.agent;
+ }
+ }
+ } else if (app.instr != null && app.instr.mProfileFile != null) {
+ profilerInfo = new ProfilerInfo(app.instr.mProfileFile, null, 0, false, false,
+ null, false);
+ }
+ if (mAppAgentMap != null && mAppAgentMap.containsKey(processName)) {
+ // We need to do a debuggable check here. See setAgentApp for why the check is
+ // postponed to here.
+ if ((app.info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
+ String agent = mAppAgentMap.get(processName);
+ // Do not overwrite already requested agent.
+ if (profilerInfo == null) {
+ profilerInfo = new ProfilerInfo(null, null, 0, false, false,
+ mAppAgentMap.get(processName), true);
+ } else if (profilerInfo.agent == null) {
+ profilerInfo = profilerInfo.setAgent(mAppAgentMap.get(processName), true);
+ }
+ }
+ }
+
if (profilerInfo != null && profilerInfo.profileFd != null) {
profilerInfo.profileFd = profilerInfo.profileFd.dup();
}
@@ -8849,7 +8952,7 @@
case AppOpsManager.MODE_ALLOWED:
// If force-background-check is enabled, restrict all apps that aren't whitelisted.
if (mForceBackgroundCheck &&
- UserHandle.isApp(uid) &&
+ !UserHandle.isCore(uid) &&
!isOnDeviceIdleWhitelistLocked(uid)) {
if (DEBUG_BACKGROUND_CHECK) {
Slog.i(TAG, "Force background check: " +
@@ -9613,9 +9716,11 @@
* @param userHandle User to match, or {@link UserHandle#USER_ALL} to apply
* to all users.
* @param persistable If persistable grants should be removed.
+ * @param targetOnly When {@code true}, only remove permissions where the app is the target,
+ * not source.
*/
private void removeUriPermissionsForPackageLocked(
- String packageName, int userHandle, boolean persistable) {
+ String packageName, int userHandle, boolean persistable, boolean targetOnly) {
if (userHandle == UserHandle.USER_ALL && packageName == null) {
throw new IllegalArgumentException("Must narrow by either package or user");
}
@@ -9634,7 +9739,7 @@
final UriPermission perm = it.next();
// Only inspect grants matching package
- if (packageName == null || perm.sourcePkg.equals(packageName)
+ if (packageName == null || (!targetOnly && perm.sourcePkg.equals(packageName))
|| perm.targetPkg.equals(packageName)) {
// Hacky solution as part of fixing a security bug; ignore
// grants associated with DownloadManager so we don't have
@@ -9753,6 +9858,8 @@
private void writeGrantedUriPermissions() {
if (DEBUG_URI_PERMISSION) Slog.v(TAG_URI_PERMISSION, "writeGrantedUriPermissions()");
+ final long startTime = SystemClock.uptimeMillis();
+
// Snapshot permissions so we can persist without lock
ArrayList<UriPermission.Snapshot> persist = Lists.newArrayList();
synchronized (this) {
@@ -9769,7 +9876,7 @@
FileOutputStream fos = null;
try {
- fos = mGrantFile.startWrite();
+ fos = mGrantFile.startWrite(startTime);
XmlSerializer out = new FastXmlSerializer();
out.setOutput(fos, StandardCharsets.UTF_8.name());
@@ -9886,8 +9993,7 @@
boolean persistChanged = false;
GrantUri grantUri = new GrantUri(userId, uri, false);
- UriPermission exactPerm = findUriPermissionLocked(callingUid,
- new GrantUri(userId, uri, false));
+ UriPermission exactPerm = findUriPermissionLocked(callingUid, grantUri);
UriPermission prefixPerm = findUriPermissionLocked(callingUid,
new GrantUri(userId, uri, true));
@@ -10018,7 +10124,8 @@
if (perms == null) {
Slog.w(TAG, "No permission grants found for " + packageName);
} else {
- for (UriPermission perm : perms.values()) {
+ for (int j = 0; j < perms.size(); j++) {
+ final UriPermission perm = perms.valueAt(j);
if (packageName.equals(perm.targetPkg) && perm.persistedModeFlags != 0) {
result.add(perm.buildPersistedPublicApiObject());
}
@@ -10029,7 +10136,8 @@
for (int i = 0; i < size; i++) {
final ArrayMap<GrantUri, UriPermission> perms =
mGrantedUriPermissions.valueAt(i);
- for (UriPermission perm : perms.values()) {
+ for (int j = 0; j < perms.size(); j++) {
+ final UriPermission perm = perms.valueAt(j);
if (packageName.equals(perm.sourcePkg) && perm.persistedModeFlags != 0) {
result.add(perm.buildPersistedPublicApiObject());
}
@@ -10041,32 +10149,36 @@
}
@Override
- public ParceledListSlice<android.content.UriPermission> getGrantedUriPermissions(
- String packageName, int userId) {
+ public ParceledListSlice<GrantedUriPermission> getGrantedUriPermissions(
+ @Nullable String packageName, int userId) {
enforceCallingPermission(android.Manifest.permission.GET_APP_GRANTED_URI_PERMISSIONS,
"getGrantedUriPermissions");
- final ArrayList<android.content.UriPermission> result = Lists.newArrayList();
+ final List<GrantedUriPermission> result = new ArrayList<>();
synchronized (this) {
final int size = mGrantedUriPermissions.size();
for (int i = 0; i < size; i++) {
final ArrayMap<GrantUri, UriPermission> perms = mGrantedUriPermissions.valueAt(i);
- for (UriPermission perm : perms.values()) {
- if (packageName.equals(perm.targetPkg) && perm.targetUserId == userId
+ for (int j = 0; j < perms.size(); j++) {
+ final UriPermission perm = perms.valueAt(j);
+ if ((packageName == null || packageName.equals(perm.targetPkg))
+ && perm.targetUserId == userId
&& perm.persistedModeFlags != 0) {
- result.add(perm.buildPersistedPublicApiObject());
+ result.add(perm.buildGrantedUriPermission());
}
}
}
}
- return new ParceledListSlice<android.content.UriPermission>(result);
+ return new ParceledListSlice<>(result);
}
@Override
public void clearGrantedUriPermissions(String packageName, int userId) {
enforceCallingPermission(android.Manifest.permission.CLEAR_APP_GRANTED_URI_PERMISSIONS,
"clearGrantedUriPermissions");
- removeUriPermissionsForPackageLocked(packageName, userId, true);
+ synchronized(this) {
+ removeUriPermissionsForPackageLocked(packageName, userId, true, true);
+ }
}
@Override
@@ -10851,8 +10963,20 @@
}
if (toTop) {
+ // Caller wants the current split-screen primary stack to be the top stack after
+ // it goes fullscreen, so move it to the front.
stack.moveToFront("dismissSplitScreenMode");
+ } else if (mStackSupervisor.isFocusedStack(stack)) {
+ // In this case the current split-screen primary stack shouldn't be the top
+ // stack after it goes fullscreen, but it current has focus, so we move the
+ // focus to the top-most split-screen secondary stack next to it.
+ final ActivityStack otherStack = stack.getDisplay().getTopStackInWindowingMode(
+ WINDOWING_MODE_SPLIT_SCREEN_SECONDARY);
+ if (otherStack != null) {
+ otherStack.moveToFront("dismissSplitScreenMode_other");
+ }
}
+
stack.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
}
} finally {
@@ -12961,6 +13085,52 @@
}
}
+ /**
+ * Set or remove an agent to be run whenever an app with the given process name starts.
+ *
+ * This method will not check whether the given process name matches a debuggable app. That
+ * would require scanning all current packages, and a rescan when new packages are installed
+ * or updated.
+ *
+ * Instead, do the check when an application is started and matched to a stored agent.
+ *
+ * @param packageName the process name of the app.
+ * @param agent the agent string to be used, or null to remove any previously set agent.
+ */
+ @Override
+ public void setAgentApp(@NonNull String packageName, @Nullable String agent) {
+ synchronized (this) {
+ // note: hijacking SET_ACTIVITY_WATCHER, but should be changed to
+ // its own permission.
+ if (checkCallingPermission(
+ android.Manifest.permission.SET_ACTIVITY_WATCHER) !=
+ PackageManager.PERMISSION_GRANTED) {
+ throw new SecurityException(
+ "Requires permission " + android.Manifest.permission.SET_ACTIVITY_WATCHER);
+ }
+
+ if (agent == null) {
+ if (mAppAgentMap != null) {
+ mAppAgentMap.remove(packageName);
+ if (mAppAgentMap.isEmpty()) {
+ mAppAgentMap = null;
+ }
+ }
+ } else {
+ if (mAppAgentMap == null) {
+ mAppAgentMap = new HashMap<>();
+ }
+ if (mAppAgentMap.size() >= 100) {
+ // Limit the size of the map, to avoid OOMEs.
+ Slog.e(TAG, "App agent map has too many entries, cannot add " + packageName
+ + "/" + agent);
+ return;
+ }
+ mAppAgentMap.put(packageName, agent);
+ }
+ }
+ }
+
void setTrackAllocationApp(ApplicationInfo app, String processName) {
synchronized (this) {
boolean isDebuggable = "1".equals(SystemProperties.get(SYSTEM_DEBUGGABLE, "0"));
@@ -13088,6 +13258,9 @@
case ActivityManager.BUGREPORT_OPTION_TELEPHONY:
extraOptions = "bugreporttelephony";
break;
+ case ActivityManager.BUGREPORT_OPTION_WIFI:
+ extraOptions = "bugreportwifi";
+ break;
default:
throw new IllegalArgumentException("Provided bugreport type is not correct, value: "
+ bugreportType);
@@ -13109,9 +13282,8 @@
* No new code should be calling it.
*/
@Deprecated
- @Override
- public void requestTelephonyBugReport(String shareTitle, String shareDescription) {
-
+ private void requestBugReportWithDescription(String shareTitle, String shareDescription,
+ int bugreportType) {
if (!TextUtils.isEmpty(shareTitle)) {
if (shareTitle.length() > MAX_BUGREPORT_TITLE_SIZE) {
String errorStr = "shareTitle should be less than " +
@@ -13140,9 +13312,34 @@
Slog.d(TAG, "Bugreport notification title " + shareTitle
+ " description " + shareDescription);
- requestBugReport(ActivityManager.BUGREPORT_OPTION_TELEPHONY);
+ requestBugReport(bugreportType);
}
+ /**
+ * @deprecated This method is only used by a few internal components and it will soon be
+ * replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
+ * No new code should be calling it.
+ */
+ @Deprecated
+ @Override
+ public void requestTelephonyBugReport(String shareTitle, String shareDescription) {
+ requestBugReportWithDescription(shareTitle, shareDescription,
+ ActivityManager.BUGREPORT_OPTION_TELEPHONY);
+ }
+
+ /**
+ * @deprecated This method is only used by a few internal components and it will soon be
+ * replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
+ * No new code should be calling it.
+ */
+ @Deprecated
+ @Override
+ public void requestWifiBugReport(String shareTitle, String shareDescription) {
+ requestBugReportWithDescription(shareTitle, shareDescription,
+ ActivityManager.BUGREPORT_OPTION_WIFI);
+ }
+
+
public static long getInputDispatchingTimeoutLocked(ActivityRecord r) {
return r != null ? getInputDispatchingTimeoutLocked(r.app) : KEY_DISPATCHING_TIMEOUT;
}
@@ -13566,7 +13763,7 @@
int index = task.mActivities.lastIndexOf(r);
if (index > 0) {
ActivityRecord under = task.mActivities.get(index - 1);
- under.returningOptions = safeOptions.getOptions(r);
+ under.returningOptions = safeOptions != null ? safeOptions.getOptions(r) : null;
}
final boolean translucentChanged = r.changeWindowTranslucency(false);
if (translucentChanged) {
@@ -14233,7 +14430,7 @@
&& proc.setProcState >= ActivityManager.PROCESS_STATE_PERSISTENT) {
proc.notCachedSinceIdle = true;
proc.initialIdlePss = 0;
- proc.nextPssTime = ProcessList.computeNextPssTime(proc.setProcState, true,
+ proc.nextPssTime = ProcessList.computeNextPssTime(proc.setProcState, null,
mTestPssMode, isSleepingLocked(), now);
}
}
@@ -14546,6 +14743,8 @@
mUserController.sendUserSwitchBroadcasts(-1, currentUserId);
BinderInternal.nSetBinderProxyCountEnabled(true);
+ //STOPSHIP: Temporary BinderProxy Threshold for b/71353150
+ BinderInternal.nSetBinderProxyCountWatermarks(1500, 1200);
BinderInternal.setBinderProxyCountCallback(
new BinderInternal.BinderProxyLimitListener() {
@Override
@@ -15251,7 +15450,6 @@
boolean dumpVisibleStacksOnly = false;
boolean dumpFocusedStackOnly = false;
String dumpPackage = null;
- int dumpAppId = -1;
int opti = 0;
while (opti < args.length) {
@@ -15325,6 +15523,15 @@
}
} else if ("service".equals(cmd)) {
mServices.writeToProto(proto);
+ } else if ("processes".equals(cmd) || "p".equals(cmd)) {
+ if (opti < args.length) {
+ dumpPackage = args[opti];
+ opti++;
+ }
+ // output proto is ProcessProto
+ synchronized (this) {
+ writeProcessesToProtoLocked(proto, dumpPackage);
+ }
} else {
// default option, dump everything, output is ActivityManagerServiceProto
synchronized (this) {
@@ -15339,6 +15546,10 @@
long serviceToken = proto.start(ActivityManagerServiceProto.SERVICES);
mServices.writeToProto(proto);
proto.end(serviceToken);
+
+ long processToken = proto.start(ActivityManagerServiceProto.PROCESSES);
+ writeProcessesToProtoLocked(proto, dumpPackage);
+ proto.end(processToken);
}
}
proto.flush();
@@ -15346,16 +15557,7 @@
return;
}
- if (dumpPackage != null) {
- try {
- ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(
- dumpPackage, 0);
- dumpAppId = UserHandle.getAppId(info.uid);
- } catch (NameNotFoundException e) {
- e.printStackTrace();
- }
- }
-
+ int dumpAppId = getAppId(dumpPackage);
boolean more = false;
// Is the caller requesting to dump a particular piece of data?
if (opti < args.length) {
@@ -15397,33 +15599,17 @@
pw.println(BinderInternal.nGetBinderProxyCount(Integer.parseInt(uid)));
}
} else if ("broadcasts".equals(cmd) || "b".equals(cmd)) {
- String[] newArgs;
- String name;
- if (opti >= args.length) {
- name = null;
- newArgs = EMPTY_STRING_ARRAY;
- } else {
+ if (opti < args.length) {
dumpPackage = args[opti];
opti++;
- newArgs = new String[args.length - opti];
- if (args.length > 2) System.arraycopy(args, opti, newArgs, 0,
- args.length - opti);
}
synchronized (this) {
dumpBroadcastsLocked(fd, pw, args, opti, true, dumpPackage);
}
} else if ("broadcast-stats".equals(cmd)) {
- String[] newArgs;
- String name;
- if (opti >= args.length) {
- name = null;
- newArgs = EMPTY_STRING_ARRAY;
- } else {
+ if (opti < args.length) {
dumpPackage = args[opti];
opti++;
- newArgs = new String[args.length - opti];
- if (args.length > 2) System.arraycopy(args, opti, newArgs, 0,
- args.length - opti);
}
synchronized (this) {
if (dumpCheckinFormat) {
@@ -15434,33 +15620,17 @@
}
}
} else if ("intents".equals(cmd) || "i".equals(cmd)) {
- String[] newArgs;
- String name;
- if (opti >= args.length) {
- name = null;
- newArgs = EMPTY_STRING_ARRAY;
- } else {
+ if (opti < args.length) {
dumpPackage = args[opti];
opti++;
- newArgs = new String[args.length - opti];
- if (args.length > 2) System.arraycopy(args, opti, newArgs, 0,
- args.length - opti);
}
synchronized (this) {
dumpPendingIntentsLocked(fd, pw, args, opti, true, dumpPackage);
}
} else if ("processes".equals(cmd) || "p".equals(cmd)) {
- String[] newArgs;
- String name;
- if (opti >= args.length) {
- name = null;
- newArgs = EMPTY_STRING_ARRAY;
- } else {
+ if (opti < args.length) {
dumpPackage = args[opti];
opti++;
- newArgs = new String[args.length - opti];
- if (args.length > 2) System.arraycopy(args, opti, newArgs, 0,
- args.length - opti);
}
synchronized (this) {
dumpProcessesLocked(fd, pw, args, opti, true, dumpPackage, dumpAppId);
@@ -15881,8 +16051,21 @@
}
}
+ private int getAppId(String dumpPackage) {
+ if (dumpPackage != null) {
+ try {
+ ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(
+ dumpPackage, 0);
+ return UserHandle.getAppId(info.uid);
+ } catch (NameNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+ return -1;
+ }
+
boolean dumpUids(PrintWriter pw, String dumpPackage, int dumpAppId, SparseArray<UidRecord> uids,
- String header, boolean needSep) {
+ String header, boolean needSep) {
boolean printed = false;
for (int i=0; i<uids.size(); i++) {
UidRecord uidRec = uids.valueAt(i);
@@ -16100,7 +16283,7 @@
"OnHold Norm", "OnHold PERS", dumpPackage);
}
- needSep = dumpProcessesToGc(fd, pw, args, opti, needSep, dumpAll, dumpPackage);
+ needSep = dumpProcessesToGc(pw, needSep, dumpPackage);
needSep = mAppErrors.dumpLocked(fd, pw, needSep, dumpPackage);
@@ -16385,8 +16568,327 @@
pw.println(" mForceBackgroundCheck=" + mForceBackgroundCheck);
}
- boolean dumpProcessesToGc(FileDescriptor fd, PrintWriter pw, String[] args,
- int opti, boolean needSep, boolean dumpAll, String dumpPackage) {
+ void writeProcessesToProtoLocked(ProtoOutputStream proto, String dumpPackage) {
+ int numPers = 0;
+
+ final int NP = mProcessNames.getMap().size();
+ for (int ip=0; ip<NP; ip++) {
+ SparseArray<ProcessRecord> procs = mProcessNames.getMap().valueAt(ip);
+ final int NA = procs.size();
+ for (int ia = 0; ia<NA; ia++) {
+ ProcessRecord r = procs.valueAt(ia);
+ if (dumpPackage != null && !r.pkgList.containsKey(dumpPackage)) {
+ continue;
+ }
+ r.writeToProto(proto, ProcessesProto.PROCS);
+ if (r.persistent) {
+ numPers++;
+ }
+ }
+ }
+
+ for (int i=0; i<mIsolatedProcesses.size(); i++) {
+ ProcessRecord r = mIsolatedProcesses.valueAt(i);
+ if (dumpPackage != null && !r.pkgList.containsKey(dumpPackage)) {
+ continue;
+ }
+ r.writeToProto(proto, ProcessesProto.ISOLATED_PROCS);
+ }
+
+ for (int i=0; i<mActiveInstrumentation.size(); i++) {
+ ActiveInstrumentation ai = mActiveInstrumentation.get(i);
+ if (dumpPackage != null && !ai.mClass.getPackageName().equals(dumpPackage)
+ && !ai.mTargetInfo.packageName.equals(dumpPackage)) {
+ continue;
+ }
+ ai.writeToProto(proto, ProcessesProto.ACTIVE_INSTRUMENTATIONS);
+ }
+
+ int whichAppId = getAppId(dumpPackage);
+ for (int i=0; i<mActiveUids.size(); i++) {
+ UidRecord uidRec = mActiveUids.valueAt(i);
+ if (dumpPackage != null && UserHandle.getAppId(uidRec.uid) != whichAppId) {
+ continue;
+ }
+ uidRec.writeToProto(proto, ProcessesProto.ACTIVE_UIDS);
+ }
+
+ for (int i=0; i<mValidateUids.size(); i++) {
+ UidRecord uidRec = mValidateUids.valueAt(i);
+ if (dumpPackage != null && UserHandle.getAppId(uidRec.uid) != whichAppId) {
+ continue;
+ }
+ uidRec.writeToProto(proto, ProcessesProto.VALIDATE_UIDS);
+ }
+
+ if (mLruProcesses.size() > 0) {
+ long lruToken = proto.start(ProcessesProto.LRU_PROCS);
+ int total = mLruProcesses.size();
+ proto.write(ProcessesProto.LruProcesses.SIZE, total);
+ proto.write(ProcessesProto.LruProcesses.NON_ACT_AT, total-mLruProcessActivityStart);
+ proto.write(ProcessesProto.LruProcesses.NON_SVC_AT, total-mLruProcessServiceStart);
+ writeProcessOomListToProto(proto, ProcessesProto.LruProcesses.LIST, this,
+ mLruProcesses,false, dumpPackage);
+ proto.end(lruToken);
+ }
+
+ if (dumpPackage != null) {
+ synchronized (mPidsSelfLocked) {
+ for (int i=0; i<mPidsSelfLocked.size(); i++) {
+ ProcessRecord r = mPidsSelfLocked.valueAt(i);
+ if (!r.pkgList.containsKey(dumpPackage)) {
+ continue;
+ }
+ r.writeToProto(proto, ProcessesProto.PIDS_SELF_LOCKED);
+ }
+ }
+ }
+
+ if (mImportantProcesses.size() > 0) {
+ synchronized (mPidsSelfLocked) {
+ for (int i=0; i<mImportantProcesses.size(); i++) {
+ ImportanceToken it = mImportantProcesses.valueAt(i);
+ ProcessRecord r = mPidsSelfLocked.get(it.pid);
+ if (dumpPackage != null && (r == null
+ || !r.pkgList.containsKey(dumpPackage))) {
+ continue;
+ }
+ it.writeToProto(proto, ProcessesProto.IMPORTANT_PROCS);
+ }
+ }
+ }
+
+ for (int i=0; i<mPersistentStartingProcesses.size(); i++) {
+ ProcessRecord r = mPersistentStartingProcesses.get(i);
+ if (dumpPackage != null && !dumpPackage.equals(r.info.packageName)) {
+ continue;
+ }
+ r.writeToProto(proto, ProcessesProto.PERSISTENT_STARTING_PROCS);
+ }
+
+ for (int i=0; i<mRemovedProcesses.size(); i++) {
+ ProcessRecord r = mRemovedProcesses.get(i);
+ if (dumpPackage != null && !dumpPackage.equals(r.info.packageName)) {
+ continue;
+ }
+ r.writeToProto(proto, ProcessesProto.REMOVED_PROCS);
+ }
+
+ for (int i=0; i<mProcessesOnHold.size(); i++) {
+ ProcessRecord r = mProcessesOnHold.get(i);
+ if (dumpPackage != null && !dumpPackage.equals(r.info.packageName)) {
+ continue;
+ }
+ r.writeToProto(proto, ProcessesProto.ON_HOLD_PROCS);
+ }
+
+ writeProcessesToGcToProto(proto, ProcessesProto.GC_PROCS, dumpPackage);
+ mAppErrors.writeToProto(proto, ProcessesProto.APP_ERRORS, dumpPackage);
+
+ if (dumpPackage == null) {
+ mUserController.writeToProto(proto, ProcessesProto.USER_CONTROLLER);
+ getGlobalConfiguration().writeToProto(proto, ProcessesProto.GLOBAL_CONFIGURATION);
+ proto.write(ProcessesProto.CONFIG_WILL_CHANGE, getFocusedStack().mConfigWillChange);
+ }
+
+ if (mHomeProcess != null && (dumpPackage == null
+ || mHomeProcess.pkgList.containsKey(dumpPackage))) {
+ mHomeProcess.writeToProto(proto, ProcessesProto.HOME_PROC);
+ }
+
+ if (mPreviousProcess != null && (dumpPackage == null
+ || mPreviousProcess.pkgList.containsKey(dumpPackage))) {
+ mPreviousProcess.writeToProto(proto, ProcessesProto.PREVIOUS_PROC);
+ proto.write(ProcessesProto.PREVIOUS_PROC_VISIBLE_TIME_MS, mPreviousProcessVisibleTime);
+ }
+
+ if (mHeavyWeightProcess != null && (dumpPackage == null
+ || mHeavyWeightProcess.pkgList.containsKey(dumpPackage))) {
+ mHeavyWeightProcess.writeToProto(proto, ProcessesProto.HEAVY_WEIGHT_PROC);
+ }
+
+ for (Map.Entry<String, Integer> entry : mCompatModePackages.getPackages().entrySet()) {
+ String pkg = entry.getKey();
+ int mode = entry.getValue();
+ if (dumpPackage == null || dumpPackage.equals(pkg)) {
+ long compatToken = proto.start(ProcessesProto.SCREEN_COMPAT_PACKAGES);
+ proto.write(ProcessesProto.ScreenCompatPackage.PACKAGE, pkg);
+ proto.write(ProcessesProto.ScreenCompatPackage.MODE, mode);
+ proto.end(compatToken);
+ }
+ }
+
+ final int NI = mUidObservers.getRegisteredCallbackCount();
+ for (int i=0; i<NI; i++) {
+ final UidObserverRegistration reg = (UidObserverRegistration)
+ mUidObservers.getRegisteredCallbackCookie(i);
+ if (dumpPackage == null || dumpPackage.equals(reg.pkg)) {
+ reg.writeToProto(proto, ProcessesProto.UID_OBSERVERS);
+ }
+ }
+
+ for (int v : mDeviceIdleWhitelist) {
+ proto.write(ProcessesProto.DEVICE_IDLE_WHITELIST, v);
+ }
+
+ for (int v : mDeviceIdleTempWhitelist) {
+ proto.write(ProcessesProto.DEVICE_IDLE_TEMP_WHITELIST, v);
+ }
+
+ if (mPendingTempWhitelist.size() > 0) {
+ for (int i=0; i < mPendingTempWhitelist.size(); i++) {
+ mPendingTempWhitelist.valueAt(i).writeToProto(proto,
+ ProcessesProto.PENDING_TEMP_WHITELIST);
+ }
+ }
+
+ if (dumpPackage == null) {
+ final long sleepToken = proto.start(ProcessesProto.SLEEP_STATUS);
+ proto.write(ProcessesProto.SleepStatus.WAKEFULNESS,
+ PowerManagerInternal.wakefulnessToProtoEnum(mWakefulness));
+ for (SleepToken st : mStackSupervisor.mSleepTokens) {
+ proto.write(ProcessesProto.SleepStatus.SLEEP_TOKENS, st.toString());
+ }
+ proto.write(ProcessesProto.SleepStatus.SLEEPING, mSleeping);
+ proto.write(ProcessesProto.SleepStatus.SHUTTING_DOWN, mShuttingDown);
+ proto.write(ProcessesProto.SleepStatus.TEST_PSS_MODE, mTestPssMode);
+ proto.end(sleepToken);
+
+ if (mRunningVoice != null) {
+ final long vrToken = proto.start(ProcessesProto.RUNNING_VOICE);
+ proto.write(ProcessesProto.VoiceProto.SESSION, mRunningVoice.toString());
+ mVoiceWakeLock.writeToProto(proto, ProcessesProto.VoiceProto.WAKELOCK);
+ proto.end(vrToken);
+ }
+
+ mVrController.writeToProto(proto, ProcessesProto.VR_CONTROLLER);
+ }
+
+ if (mDebugApp != null || mOrigDebugApp != null || mDebugTransient
+ || mOrigWaitForDebugger) {
+ if (dumpPackage == null || dumpPackage.equals(mDebugApp)
+ || dumpPackage.equals(mOrigDebugApp)) {
+ final long debugAppToken = proto.start(ProcessesProto.DEBUG);
+ proto.write(ProcessesProto.DebugApp.DEBUG_APP, mDebugApp);
+ proto.write(ProcessesProto.DebugApp.ORIG_DEBUG_APP, mOrigDebugApp);
+ proto.write(ProcessesProto.DebugApp.DEBUG_TRANSIENT, mDebugTransient);
+ proto.write(ProcessesProto.DebugApp.ORIG_WAIT_FOR_DEBUGGER, mOrigWaitForDebugger);
+ proto.end(debugAppToken);
+ }
+ }
+
+ if (mCurAppTimeTracker != null) {
+ mCurAppTimeTracker.writeToProto(proto, ProcessesProto.CURRENT_TRACKER, true);
+ }
+
+ if (mMemWatchProcesses.getMap().size() > 0) {
+ final long token = proto.start(ProcessesProto.MEM_WATCH_PROCESSES);
+ ArrayMap<String, SparseArray<Pair<Long, String>>> procs = mMemWatchProcesses.getMap();
+ for (int i=0; i<procs.size(); i++) {
+ final String proc = procs.keyAt(i);
+ final SparseArray<Pair<Long, String>> uids = procs.valueAt(i);
+ final long ptoken = proto.start(ProcessesProto.MemWatchProcess.PROCS);
+ proto.write(ProcessesProto.MemWatchProcess.Process.NAME, proc);
+ for (int j=0; j<uids.size(); j++) {
+ final long utoken = proto.start(ProcessesProto.MemWatchProcess.Process.MEM_STATS);
+ Pair<Long, String> val = uids.valueAt(j);
+ proto.write(ProcessesProto.MemWatchProcess.Process.MemStats.UID, uids.keyAt(j));
+ proto.write(ProcessesProto.MemWatchProcess.Process.MemStats.SIZE,
+ DebugUtils.sizeValueToString(val.first, new StringBuilder()));
+ proto.write(ProcessesProto.MemWatchProcess.Process.MemStats.REPORT_TO, val.second);
+ proto.end(utoken);
+ }
+ proto.end(ptoken);
+ }
+
+ final long dtoken = proto.start(ProcessesProto.MemWatchProcess.DUMP);
+ proto.write(ProcessesProto.MemWatchProcess.Dump.PROC_NAME, mMemWatchDumpProcName);
+ proto.write(ProcessesProto.MemWatchProcess.Dump.FILE, mMemWatchDumpFile);
+ proto.write(ProcessesProto.MemWatchProcess.Dump.PID, mMemWatchDumpPid);
+ proto.write(ProcessesProto.MemWatchProcess.Dump.UID, mMemWatchDumpUid);
+ proto.end(dtoken);
+
+ proto.end(token);
+ }
+
+ if (mTrackAllocationApp != null) {
+ if (dumpPackage == null || dumpPackage.equals(mTrackAllocationApp)) {
+ proto.write(ProcessesProto.TRACK_ALLOCATION_APP, mTrackAllocationApp);
+ }
+ }
+
+ if (mProfileApp != null || mProfileProc != null || (mProfilerInfo != null &&
+ (mProfilerInfo.profileFile != null || mProfilerInfo.profileFd != null))) {
+ if (dumpPackage == null || dumpPackage.equals(mProfileApp)) {
+ final long token = proto.start(ProcessesProto.PROFILE);
+ proto.write(ProcessesProto.Profile.APP_NAME, mProfileApp);
+ mProfileProc.writeToProto(proto,ProcessesProto.Profile.PROC);
+ if (mProfilerInfo != null) {
+ mProfilerInfo.writeToProto(proto, ProcessesProto.Profile.INFO);
+ proto.write(ProcessesProto.Profile.TYPE, mProfileType);
+ }
+ proto.end(token);
+ }
+ }
+
+ if (dumpPackage == null || dumpPackage.equals(mNativeDebuggingApp)) {
+ proto.write(ProcessesProto.NATIVE_DEBUGGING_APP, mNativeDebuggingApp);
+ }
+
+ if (dumpPackage == null) {
+ proto.write(ProcessesProto.ALWAYS_FINISH_ACTIVITIES, mAlwaysFinishActivities);
+ if (mController != null) {
+ final long token = proto.start(ProcessesProto.CONTROLLER);
+ proto.write(ProcessesProto.Controller.CONTROLLER, mController.toString());
+ proto.write(ProcessesProto.Controller.IS_A_MONKEY, mControllerIsAMonkey);
+ proto.end(token);
+ }
+ proto.write(ProcessesProto.TOTAL_PERSISTENT_PROCS, numPers);
+ proto.write(ProcessesProto.PROCESSES_READY, mProcessesReady);
+ proto.write(ProcessesProto.SYSTEM_READY, mSystemReady);
+ proto.write(ProcessesProto.BOOTED, mBooted);
+ proto.write(ProcessesProto.FACTORY_TEST, mFactoryTest);
+ proto.write(ProcessesProto.BOOTING, mBooting);
+ proto.write(ProcessesProto.CALL_FINISH_BOOTING, mCallFinishBooting);
+ proto.write(ProcessesProto.BOOT_ANIMATION_COMPLETE, mBootAnimationComplete);
+ proto.write(ProcessesProto.LAST_POWER_CHECK_UPTIME_MS, mLastPowerCheckUptime);
+ mStackSupervisor.mGoingToSleep.writeToProto(proto, ProcessesProto.GOING_TO_SLEEP);
+ mStackSupervisor.mLaunchingActivity.writeToProto(proto, ProcessesProto.LAUNCHING_ACTIVITY);
+ proto.write(ProcessesProto.ADJ_SEQ, mAdjSeq);
+ proto.write(ProcessesProto.LRU_SEQ, mLruSeq);
+ proto.write(ProcessesProto.NUM_NON_CACHED_PROCS, mNumNonCachedProcs);
+ proto.write(ProcessesProto.NUM_SERVICE_PROCS, mNumServiceProcs);
+ proto.write(ProcessesProto.NEW_NUM_SERVICE_PROCS, mNewNumServiceProcs);
+ proto.write(ProcessesProto.ALLOW_LOWER_MEM_LEVEL, mAllowLowerMemLevel);
+ proto.write(ProcessesProto.LAST_MEMORY_LEVEL, mLastMemoryLevel);
+ proto.write(ProcessesProto.LAST_NUM_PROCESSES, mLastNumProcesses);
+ long now = SystemClock.uptimeMillis();
+ ProtoUtils.toDuration(proto, ProcessesProto.LAST_IDLE_TIME, mLastIdleTime, now);
+ proto.write(ProcessesProto.LOW_RAM_SINCE_LAST_IDLE_MS, getLowRamTimeSinceIdle(now));
+ }
+
+ }
+
+ void writeProcessesToGcToProto(ProtoOutputStream proto, long fieldId, String dumpPackage) {
+ if (mProcessesToGc.size() > 0) {
+ long now = SystemClock.uptimeMillis();
+ for (int i=0; i<mProcessesToGc.size(); i++) {
+ ProcessRecord r = mProcessesToGc.get(i);
+ if (dumpPackage != null && !dumpPackage.equals(r.info.packageName)) {
+ continue;
+ }
+ final long token = proto.start(fieldId);
+ r.writeToProto(proto, ProcessToGcProto.PROC);
+ proto.write(ProcessToGcProto.REPORT_LOW_MEMORY, r.reportLowMemory);
+ proto.write(ProcessToGcProto.NOW_UPTIME_MS, now);
+ proto.write(ProcessToGcProto.LAST_GCED_MS, r.lastRequestedGc);
+ proto.write(ProcessToGcProto.LAST_LOW_MEMORY_MS, r.lastLowMemory);
+ proto.end(token);
+ }
+ }
+ }
+
+ boolean dumpProcessesToGc(PrintWriter pw, boolean needSep, String dumpPackage) {
if (mProcessesToGc.size() > 0) {
boolean printed = false;
long now = SystemClock.uptimeMillis();
@@ -16464,7 +16966,7 @@
needSep = true;
}
- dumpProcessesToGc(fd, pw, args, opti, needSep, dumpAll, null);
+ dumpProcessesToGc(pw, needSep, null);
pw.println();
pw.println(" mHomeProcess: " + mHomeProcess);
@@ -17015,11 +17517,8 @@
return numPers;
}
- private static final boolean dumpProcessOomList(PrintWriter pw,
- ActivityManagerService service, List<ProcessRecord> origList,
- String prefix, String normalLabel, String persistentLabel,
- boolean inclDetails, String dumpPackage) {
-
+ private static final ArrayList<Pair<ProcessRecord, Integer>>
+ sortProcessOomList(List<ProcessRecord> origList, String dumpPackage) {
ArrayList<Pair<ProcessRecord, Integer>> list
= new ArrayList<Pair<ProcessRecord, Integer>>(origList.size());
for (int i=0; i<origList.size(); i++) {
@@ -17030,10 +17529,6 @@
list.add(new Pair<ProcessRecord, Integer>(origList.get(i), i));
}
- if (list.size() <= 0) {
- return false;
- }
-
Comparator<Pair<ProcessRecord, Integer>> comparator
= new Comparator<Pair<ProcessRecord, Integer>>() {
@Override
@@ -17053,6 +17548,113 @@
};
Collections.sort(list, comparator);
+ return list;
+ }
+
+ private static final boolean writeProcessOomListToProto(ProtoOutputStream proto, long fieldId,
+ ActivityManagerService service, List<ProcessRecord> origList,
+ boolean inclDetails, String dumpPackage) {
+ ArrayList<Pair<ProcessRecord, Integer>> list = sortProcessOomList(origList, dumpPackage);
+ if (list.isEmpty()) return false;
+
+ final long curUptime = SystemClock.uptimeMillis();
+
+ for (int i = list.size() - 1; i >= 0; i--) {
+ ProcessRecord r = list.get(i).first;
+ long token = proto.start(fieldId);
+ String oomAdj = ProcessList.makeOomAdjString(r.setAdj);
+ proto.write(ProcessOomProto.PERSISTENT, r.persistent);
+ proto.write(ProcessOomProto.NUM, (origList.size()-1)-list.get(i).second);
+ proto.write(ProcessOomProto.OOM_ADJ, oomAdj);
+ int schedGroup = ProcessOomProto.SCHED_GROUP_UNKNOWN;
+ switch (r.setSchedGroup) {
+ case ProcessList.SCHED_GROUP_BACKGROUND:
+ schedGroup = ProcessOomProto.SCHED_GROUP_BACKGROUND;
+ break;
+ case ProcessList.SCHED_GROUP_DEFAULT:
+ schedGroup = ProcessOomProto.SCHED_GROUP_DEFAULT;
+ break;
+ case ProcessList.SCHED_GROUP_TOP_APP:
+ schedGroup = ProcessOomProto.SCHED_GROUP_TOP_APP;
+ break;
+ case ProcessList.SCHED_GROUP_TOP_APP_BOUND:
+ schedGroup = ProcessOomProto.SCHED_GROUP_TOP_APP_BOUND;
+ break;
+ }
+ if (schedGroup != ProcessOomProto.SCHED_GROUP_UNKNOWN) {
+ proto.write(ProcessOomProto.SCHED_GROUP, schedGroup);
+ }
+ if (r.foregroundActivities) {
+ proto.write(ProcessOomProto.ACTIVITIES, true);
+ } else if (r.foregroundServices) {
+ proto.write(ProcessOomProto.SERVICES, true);
+ }
+ proto.write(ProcessOomProto.STATE, ProcessList.makeProcStateProtoEnum(r.curProcState));
+ proto.write(ProcessOomProto.TRIM_MEMORY_LEVEL, r.trimMemoryLevel);
+ r.writeToProto(proto, ProcessOomProto.PROC);
+ proto.write(ProcessOomProto.ADJ_TYPE, r.adjType);
+ if (r.adjSource != null || r.adjTarget != null) {
+ if (r.adjTarget instanceof ComponentName) {
+ ComponentName cn = (ComponentName) r.adjTarget;
+ cn.writeToProto(proto, ProcessOomProto.ADJ_TARGET_COMPONENT_NAME);
+ } else if (r.adjTarget != null) {
+ proto.write(ProcessOomProto.ADJ_TARGET_OBJECT, r.adjTarget.toString());
+ }
+ if (r.adjSource instanceof ProcessRecord) {
+ ProcessRecord p = (ProcessRecord) r.adjSource;
+ p.writeToProto(proto, ProcessOomProto.ADJ_SOURCE_PROC);
+ } else if (r.adjSource != null) {
+ proto.write(ProcessOomProto.ADJ_SOURCE_OBJECT, r.adjSource.toString());
+ }
+ }
+ if (inclDetails) {
+ long detailToken = proto.start(ProcessOomProto.DETAIL);
+ proto.write(ProcessOomProto.Detail.MAX_ADJ, r.maxAdj);
+ proto.write(ProcessOomProto.Detail.CUR_RAW_ADJ, r.curRawAdj);
+ proto.write(ProcessOomProto.Detail.SET_RAW_ADJ, r.setRawAdj);
+ proto.write(ProcessOomProto.Detail.CUR_ADJ, r.curAdj);
+ proto.write(ProcessOomProto.Detail.SET_ADJ, r.setAdj);
+ proto.write(ProcessOomProto.Detail.CURRENT_STATE,
+ ProcessList.makeProcStateProtoEnum(r.curProcState));
+ proto.write(ProcessOomProto.Detail.SET_STATE,
+ ProcessList.makeProcStateProtoEnum(r.setProcState));
+ proto.write(ProcessOomProto.Detail.LAST_PSS, DebugUtils.sizeValueToString(
+ r.lastPss*1024, new StringBuilder()));
+ proto.write(ProcessOomProto.Detail.LAST_SWAP_PSS, DebugUtils.sizeValueToString(
+ r.lastSwapPss*1024, new StringBuilder()));
+ proto.write(ProcessOomProto.Detail.LAST_CACHED_PSS, DebugUtils.sizeValueToString(
+ r.lastCachedPss*1024, new StringBuilder()));
+ proto.write(ProcessOomProto.Detail.CACHED, r.cached);
+ proto.write(ProcessOomProto.Detail.EMPTY, r.empty);
+ proto.write(ProcessOomProto.Detail.HAS_ABOVE_CLIENT, r.hasAboveClient);
+
+ if (r.setProcState >= ActivityManager.PROCESS_STATE_SERVICE) {
+ if (r.lastCpuTime != 0) {
+ long uptimeSince = curUptime - service.mLastPowerCheckUptime;
+ long timeUsed = r.curCpuTime - r.lastCpuTime;
+ long cpuTimeToken = proto.start(ProcessOomProto.Detail.SERVICE_RUN_TIME);
+ proto.write(ProcessOomProto.Detail.CpuRunTime.OVER_MS, uptimeSince);
+ proto.write(ProcessOomProto.Detail.CpuRunTime.USED_MS, timeUsed);
+ proto.write(ProcessOomProto.Detail.CpuRunTime.ULTILIZATION,
+ (100.0*timeUsed)/uptimeSince);
+ proto.end(cpuTimeToken);
+ }
+ }
+ proto.end(detailToken);
+ }
+ proto.end(token);
+ }
+
+ return true;
+ }
+
+ private static final boolean dumpProcessOomList(PrintWriter pw,
+ ActivityManagerService service, List<ProcessRecord> origList,
+ String prefix, String normalLabel, String persistentLabel,
+ boolean inclDetails, String dumpPackage) {
+
+ ArrayList<Pair<ProcessRecord, Integer>> list = sortProcessOomList(origList, dumpPackage);
+ if (list.isEmpty()) return false;
final long curUptime = SystemClock.uptimeMillis();
final long uptimeSince = curUptime - service.mLastPowerCheckUptime;
@@ -17760,12 +18362,13 @@
final long myTotalPss = mi.getTotalPss();
final long myTotalUss = mi.getTotalUss();
+ final long myTotalRss = mi.getTotalRss();
final long myTotalSwapPss = mi.getTotalSwappedOutPss();
synchronized (this) {
if (r.thread != null && oomAdj == r.getSetAdjWithServices()) {
// Record this for posterity if the process has been stable.
- r.baseProcessTracker.addPss(myTotalPss, myTotalUss, true,
+ r.baseProcessTracker.addPss(myTotalPss, myTotalUss, myTotalRss, true,
reportType, endTime-startTime, r.pkgList);
}
}
@@ -18256,12 +18859,13 @@
final long myTotalPss = mi.getTotalPss();
final long myTotalUss = mi.getTotalUss();
+ final long myTotalRss = mi.getTotalRss();
final long myTotalSwapPss = mi.getTotalSwappedOutPss();
synchronized (this) {
if (r.thread != null && oomAdj == r.getSetAdjWithServices()) {
// Record this for posterity if the process has been stable.
- r.baseProcessTracker.addPss(myTotalPss, myTotalUss, true,
+ r.baseProcessTracker.addPss(myTotalPss, myTotalUss, myTotalRss, true,
reportType, endTime-startTime, r.pkgList);
}
}
@@ -20034,6 +20638,7 @@
case PHONE_UID:
case BLUETOOTH_UID:
case NFC_UID:
+ case SE_UID:
isCallerSystem = true;
break;
default:
@@ -20167,7 +20772,8 @@
intent.getIntExtra(Intent.EXTRA_UID, -1), ssp);
// Remove all permissions granted from/to this package
- removeUriPermissionsForPackageLocked(ssp, userId, true);
+ removeUriPermissionsForPackageLocked(ssp, userId, true,
+ false);
mRecentTasks.removeTasksByPackageName(ssp, userId);
@@ -22536,14 +23142,13 @@
* Record new PSS sample for a process.
*/
void recordPssSampleLocked(ProcessRecord proc, int procState, long pss, long uss, long swapPss,
- long pssDuration, long now) {
+ long rss, int statType, long pssDuration, long now) {
EventLogTags.writeAmPss(proc.pid, proc.uid, proc.processName, pss * 1024, uss * 1024,
- swapPss * 1024);
+ swapPss * 1024, rss * 1024, statType, procState, pssDuration);
proc.lastPssTime = now;
- proc.baseProcessTracker.addPss(pss, uss, true, ProcessStats.ADD_PSS_INTERNAL,
- pssDuration, proc.pkgList);
+ proc.baseProcessTracker.addPss(pss, uss, rss, true, statType, pssDuration, proc.pkgList);
if (DEBUG_PSS) Slog.d(TAG_PSS,
- "PSS of " + proc.toShortString() + ": " + pss + " lastPss=" + proc.lastPss
+ "pss of " + proc.toShortString() + ": " + pss + " lastPss=" + proc.lastPss
+ " state=" + ProcessList.makeProcStateString(procState));
if (proc.initialIdlePss == 0) {
proc.initialIdlePss = pss;
@@ -22642,8 +23247,9 @@
if (mPendingPssProcesses.size() == 0) {
mBgHandler.sendEmptyMessage(COLLECT_PSS_BG_MSG);
}
- if (DEBUG_PSS) Slog.d(TAG_PSS, "Requesting PSS of: " + proc);
+ if (DEBUG_PSS) Slog.d(TAG_PSS, "Requesting pss of: " + proc);
proc.pssProcState = procState;
+ proc.pssStatType = ProcessStats.ADD_PSS_INTERNAL_SINGLE;
mPendingPssProcesses.add(proc);
}
@@ -22658,7 +23264,7 @@
return;
}
}
- if (DEBUG_PSS) Slog.d(TAG_PSS, "Requesting PSS of all procs! memLowered=" + memLowered);
+ if (DEBUG_PSS) Slog.d(TAG_PSS, "Requesting pss of all procs! memLowered=" + memLowered);
mLastFullPssTime = now;
mFullPssPending = true;
mPendingPssProcesses.ensureCapacity(mLruProcesses.size());
@@ -22671,8 +23277,10 @@
}
if (memLowered || now > (app.lastStateTime+ProcessList.PSS_ALL_INTERVAL)) {
app.pssProcState = app.setProcState;
- app.nextPssTime = ProcessList.computeNextPssTime(app.curProcState, true,
- mTestPssMode, isSleepingLocked(), now);
+ app.pssStatType = always ? ProcessStats.ADD_PSS_INTERNAL_ALL_POLL
+ : ProcessStats.ADD_PSS_INTERNAL_ALL_MEM;
+ app.nextPssTime = ProcessList.computeNextPssTime(app.curProcState,
+ app.procStateMemTracker, mTestPssMode, isSleepingLocked(), now);
mPendingPssProcesses.add(app);
}
}
@@ -23039,16 +23647,16 @@
long startTime = SystemClock.currentThreadTimeMillis();
long pss = Debug.getPss(app.pid, mTmpLong, null);
long endTime = SystemClock.currentThreadTimeMillis();
- recordPssSampleLocked(app, app.curProcState, pss, endTime-startTime,
- mTmpLong[0], mTmpLong[1], now);
+ recordPssSampleLocked(app, app.curProcState, pss, mTmpLong[0], mTmpLong[1],
+ mTmpLong[2], ProcessStats.ADD_PSS_INTERNAL_SINGLE, endTime-startTime, now);
mPendingPssProcesses.remove(app);
Slog.i(TAG, "Recorded pss for " + app + " state " + app.setProcState
+ " to " + app.curProcState + ": "
+ (SystemClock.uptimeMillis()-start) + "ms");
}
app.lastStateTime = now;
- app.nextPssTime = ProcessList.computeNextPssTime(app.curProcState, true,
- mTestPssMode, isSleepingLocked(), now);
+ app.nextPssTime = ProcessList.computeNextPssTime(app.curProcState,
+ app.procStateMemTracker, mTestPssMode, isSleepingLocked(), now);
if (DEBUG_PSS) Slog.d(TAG_PSS, "Process state change from "
+ ProcessList.makeProcStateString(app.setProcState) + " to "
+ ProcessList.makeProcStateString(app.curProcState) + " next pss in "
@@ -23058,10 +23666,10 @@
&& now > (app.lastStateTime+ProcessList.minTimeFromStateChange(
mTestPssMode)))) {
requestPssLocked(app, app.setProcState);
- app.nextPssTime = ProcessList.computeNextPssTime(app.curProcState, false,
- mTestPssMode, isSleepingLocked(), now);
+ app.nextPssTime = ProcessList.computeNextPssTime(app.curProcState,
+ app.procStateMemTracker, mTestPssMode, isSleepingLocked(), now);
} else if (false && DEBUG_PSS) Slog.d(TAG_PSS,
- "Not requesting PSS of " + app + ": next=" + (app.nextPssTime-now));
+ "Not requesting pss of " + app + ": next=" + (app.nextPssTime-now));
}
if (app.setProcState != app.curProcState) {
if (DEBUG_SWITCH || DEBUG_OOM_ADJ || mCurOomAdjUid == app.uid) {
@@ -24120,7 +24728,7 @@
final int size = mActiveUids.size();
for (int i = 0; i < size; i++) {
final int uid = mActiveUids.keyAt(i);
- if (!UserHandle.isApp(uid)) {
+ if (UserHandle.isCore(uid)) {
continue;
}
final UidRecord uidRec = mActiveUids.valueAt(i);
@@ -24921,11 +25529,14 @@
// "= 0" is needed because otherwise catch(RemoteException) would make it look like
// packageUid may not be initialized.
int packageUid = 0;
+ final long ident = Binder.clearCallingIdentity();
try {
packageUid = AppGlobals.getPackageManager().getPackageUid(
packageName, PackageManager.MATCH_DEBUG_TRIAGED_MISSING, userId);
} catch (RemoteException e) {
// Shouldn't happen.
+ } finally {
+ Binder.restoreCallingIdentity(ident);
}
synchronized (ActivityManagerService.this) {
diff --git a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
index 1240f5e..f0c90e0 100644
--- a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
+++ b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
@@ -160,6 +160,8 @@
return runDumpHeap(pw);
case "set-debug-app":
return runSetDebugApp(pw);
+ case "set-agent-app":
+ return runSetAgentApp(pw);
case "clear-debug-app":
return runClearDebugApp(pw);
case "set-watch-heap":
@@ -873,6 +875,13 @@
return 0;
}
+ int runSetAgentApp(PrintWriter pw) throws RemoteException {
+ String pkg = getNextArgRequired();
+ String agent = getNextArg();
+ mInterface.setAgentApp(pkg, agent);
+ return 0;
+ }
+
int runClearDebugApp(PrintWriter pw) throws RemoteException {
mInterface.setDebugApp(null, false, true);
return 0;
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 9d06b0d..fd3f8ec 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -453,6 +453,9 @@
mStackId = stackId;
mCurrentUser = mService.mUserController.getCurrentUserId();
mTmpRect2.setEmpty();
+ // Set display id before setting activity and window type to make sure it won't affect
+ // stacks on a wrong display.
+ mDisplayId = display.mDisplayId;
setActivityType(activityType);
setWindowingMode(windowingMode);
mWindowContainerController = createStackWindowController(display.mDisplayId, onTop,
@@ -481,7 +484,7 @@
@Override
public void setWindowingMode(int windowingMode) {
- setWindowingMode(windowingMode, false /* animate */, true /* showRecents */,
+ setWindowingMode(windowingMode, false /* animate */, false /* showRecents */,
false /* enteringSplitScreenMode */);
}
@@ -642,7 +645,10 @@
// TODO: We should probably resolve the windowing mode for the stack on the new display here
// so that it end up in a compatible mode in the new display. e.g. split-screen secondary.
removeFromDisplay();
+ // Reparent the window container before we try to update the position when adding it to
+ // the new display below
mTmpRect2.setEmpty();
+ mWindowContainerController.reparent(activityDisplay.mDisplayId, mTmpRect2, onTop);
postAddToDisplay(activityDisplay, mTmpRect2.isEmpty() ? null : mTmpRect2, onTop);
adjustFocusToNextFocusableStack("reparent", true /* allowFocusSelf */);
mStackSupervisor.resumeFocusedStackTopActivityLocked();
@@ -650,7 +656,6 @@
// windows that are no longer visible.
mStackSupervisor.ensureActivitiesVisibleLocked(null /* starting */, 0 /* configChanges */,
!PRESERVE_WINDOWS);
- mWindowContainerController.reparent(activityDisplay.mDisplayId, mTmpRect2, onTop);
}
/**
@@ -994,12 +999,6 @@
insertTaskAtTop(task, null);
return;
}
-
- task = topTask();
- if (task != null) {
- mWindowContainerController.positionChildAtTop(task.getWindowContainerController(),
- true /* includingParents */);
- }
}
/**
@@ -1024,12 +1023,6 @@
if (task != null) {
insertTaskAtBottom(task);
return;
- } else {
- task = bottomTask();
- if (task != null) {
- mWindowContainerController.positionChildAtBottom(
- task.getWindowContainerController(), true /* includingParents */);
- }
}
}
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index bfb563f..7c9160a 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -297,6 +297,7 @@
private RunningTasks mRunningTasks;
final ActivityStackSupervisorHandler mHandler;
+ final Looper mLooper;
/** Short cut */
WindowManagerService mWindowManager;
@@ -581,6 +582,7 @@
public ActivityStackSupervisor(ActivityManagerService service, Looper looper) {
mService = service;
+ mLooper = looper;
mHandler = new ActivityStackSupervisorHandler(looper);
}
@@ -1243,10 +1245,14 @@
synchronized (mService) {
try {
Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "resolveIntent");
+ int modifiedFlags = flags
+ | PackageManager.MATCH_DEFAULT_ONLY | ActivityManagerService.STOCK_PM_FLAGS;
+ if (intent.isBrowsableWebIntent()
+ || (intent.getFlags() & Intent.FLAG_ACTIVITY_MATCH_EXTERNAL) != 0) {
+ modifiedFlags |= PackageManager.MATCH_INSTANT;
+ }
return mService.getPackageManagerInternalLocked().resolveIntent(
- intent, resolvedType, PackageManager.MATCH_INSTANT
- | PackageManager.MATCH_DEFAULT_ONLY | flags
- | ActivityManagerService.STOCK_PM_FLAGS, userId, true);
+ intent, resolvedType, modifiedFlags, userId, true);
} finally {
Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
diff --git a/services/core/java/com/android/server/am/ActivityStartController.java b/services/core/java/com/android/server/am/ActivityStartController.java
index f9932b2..5551914 100644
--- a/services/core/java/com/android/server/am/ActivityStartController.java
+++ b/services/core/java/com/android/server/am/ActivityStartController.java
@@ -220,7 +220,7 @@
}
}
- final int startActivityInPackage(int uid, int realCallingUid, int realCallingPid,
+ 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) {
diff --git a/services/core/java/com/android/server/am/ActivityStartInterceptor.java b/services/core/java/com/android/server/am/ActivityStartInterceptor.java
index 0480646..b86a8a6 100644
--- a/services/core/java/com/android/server/am/ActivityStartInterceptor.java
+++ b/services/core/java/com/android/server/am/ActivityStartInterceptor.java
@@ -17,6 +17,7 @@
package com.android.server.am;
import static android.app.ActivityManager.INTENT_SENDER_ACTIVITY;
+import static android.app.ActivityOptions.ANIM_OPEN_CROSS_PROFILE_APPS;
import static android.app.PendingIntent.FLAG_CANCEL_CURRENT;
import static android.app.PendingIntent.FLAG_IMMUTABLE;
import static android.app.PendingIntent.FLAG_ONE_SHOT;
@@ -41,6 +42,7 @@
import android.content.pm.ResolveInfo;
import android.content.pm.UserInfo;
import android.os.Binder;
+import android.os.Bundle;
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.UserManager;
@@ -119,11 +121,12 @@
}
private IntentSender createIntentSenderForOriginalIntent(int callingUid, int flags) {
+ Bundle activityOptions = deferCrossProfileAppsAnimationIfNecessary();
final IIntentSender target = mService.getIntentSenderLocked(
INTENT_SENDER_ACTIVITY, mCallingPackage, callingUid, mUserId, null /*token*/,
null /*resultCode*/, 0 /*requestCode*/,
new Intent[] { mIntent }, new String[] { mResolvedType },
- flags, null /*bOptions*/);
+ flags, activityOptions);
return new IntentSender(target);
}
@@ -164,11 +167,27 @@
return interceptWorkProfileChallengeIfNeeded();
}
+ /**
+ * If the activity option is the {@link ActivityOptions#ANIM_OPEN_CROSS_PROFILE_APPS} one,
+ * defer the animation until the original intent is started.
+ *
+ * @return the activity option used to start the original intent.
+ */
+ private Bundle deferCrossProfileAppsAnimationIfNecessary() {
+ if (mActivityOptions != null
+ && mActivityOptions.getAnimationType() == ANIM_OPEN_CROSS_PROFILE_APPS) {
+ mActivityOptions = null;
+ return ActivityOptions.makeOpenCrossProfileAppsAnimation().toBundle();
+ }
+ return null;
+ }
+
private boolean interceptQuietProfileIfNeeded() {
// Do not intercept if the user has not turned off the profile
if (!mUserManager.isQuietModeEnabled(UserHandle.of(mUserId))) {
return false;
}
+
IntentSender target = createIntentSenderForOriginalIntent(mCallingUid,
FLAG_CANCEL_CURRENT | FLAG_ONE_SHOT);
@@ -210,8 +229,7 @@
}
private boolean interceptWorkProfileChallengeIfNeeded() {
- final Intent interceptingIntent = interceptWithConfirmCredentialsIfNeeded(mIntent,
- mResolvedType, mAInfo, mCallingPackage, mUserId);
+ final Intent interceptingIntent = interceptWithConfirmCredentialsIfNeeded(mAInfo, mUserId);
if (interceptingIntent == null) {
return false;
}
@@ -248,8 +266,7 @@
*
* @return The intercepting intent if needed.
*/
- private Intent interceptWithConfirmCredentialsIfNeeded(Intent intent, String resolvedType,
- ActivityInfo aInfo, String callingPackage, int userId) {
+ private Intent interceptWithConfirmCredentialsIfNeeded(ActivityInfo aInfo, int userId) {
if (!mUserController.shouldConfirmCredentials(userId)) {
return null;
}
@@ -296,5 +313,4 @@
mAInfo = mSupervisor.resolveActivity(mIntent, mRInfo, mStartFlags, null /*profilerInfo*/);
return true;
}
-
}
diff --git a/services/core/java/com/android/server/am/ActivityStarter.java b/services/core/java/com/android/server/am/ActivityStarter.java
index 8595aa3..eab88aa 100644
--- a/services/core/java/com/android/server/am/ActivityStarter.java
+++ b/services/core/java/com/android/server/am/ActivityStarter.java
@@ -31,6 +31,7 @@
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
+import static android.content.Intent.ACTION_INSTALL_INSTANT_APP_PACKAGE;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT;
@@ -302,6 +303,7 @@
SafeActivityOptions activityOptions;
boolean ignoreTargetSecurity;
boolean componentSpecified;
+ boolean avoidMoveToFront;
ActivityRecord[] outActivity;
TaskRecord inTask;
String reason;
@@ -356,6 +358,7 @@
userId = 0;
waitResult = null;
mayWait = false;
+ avoidMoveToFront = false;
}
/**
@@ -390,6 +393,7 @@
userId = request.userId;
waitResult = request.waitResult;
mayWait = request.mayWait;
+ avoidMoveToFront = request.avoidMoveToFront;
}
}
@@ -786,7 +790,7 @@
// Instead, launch the ephemeral installer. Once the installer is finished, it
// starts either the intent we resolved here [on install error] or the ephemeral
// app [on install success].
- if (rInfo != null && rInfo.auxiliaryInfo != null) {
+ if (rInfo != null && rInfo.isInstantAppAvailable) {
intent = createLaunchIntent(rInfo.auxiliaryInfo, ephemeralIntent,
callingPackage, verificationBundle, resolvedType, userId);
resolvedType = null;
@@ -846,22 +850,27 @@
/**
* Creates a launch intent for the given auxiliary resolution data.
*/
- private @NonNull Intent createLaunchIntent(@NonNull AuxiliaryResolveInfo auxiliaryResponse,
+ private @NonNull Intent createLaunchIntent(@Nullable AuxiliaryResolveInfo auxiliaryResponse,
Intent originalIntent, String callingPackage, Bundle verificationBundle,
String resolvedType, int userId) {
- if (auxiliaryResponse.needsPhaseTwo) {
+ if (auxiliaryResponse != null && auxiliaryResponse.needsPhaseTwo) {
// request phase two resolution
mService.getPackageManagerInternalLocked().requestInstantAppResolutionPhaseTwo(
auxiliaryResponse, originalIntent, resolvedType, callingPackage,
verificationBundle, userId);
}
return InstantAppResolver.buildEphemeralInstallerIntent(
- Intent.ACTION_INSTALL_INSTANT_APP_PACKAGE, originalIntent,
- auxiliaryResponse.failureIntent, callingPackage, verificationBundle,
- resolvedType, userId, auxiliaryResponse.packageName, auxiliaryResponse.splitName,
- auxiliaryResponse.installFailureActivity, auxiliaryResponse.versionCode,
- auxiliaryResponse.token, auxiliaryResponse.resolveInfo.getExtras(),
- auxiliaryResponse.needsPhaseTwo);
+ originalIntent,
+ InstantAppResolver.sanitizeIntent(originalIntent),
+ auxiliaryResponse == null ? null : auxiliaryResponse.failureIntent,
+ callingPackage,
+ verificationBundle,
+ resolvedType,
+ userId,
+ auxiliaryResponse == null ? null : auxiliaryResponse.installFailureActivity,
+ auxiliaryResponse == null ? null : auxiliaryResponse.token,
+ auxiliaryResponse != null && auxiliaryResponse.needsPhaseTwo,
+ auxiliaryResponse == null ? null : auxiliaryResponse.filters);
}
void postStartActivityProcessing(ActivityRecord r, int result, ActivityStack targetStack) {
@@ -921,12 +930,12 @@
// Don't modify the client's object!
intent = new Intent(intent);
if (componentSpecified
- && intent.getData() != null
- && Intent.ACTION_VIEW.equals(intent.getAction())
+ && !Intent.ACTION_INSTALL_INSTANT_APP_PACKAGE.equals(intent.getAction())
+ && !Intent.ACTION_RESOLVE_INSTANT_APP_PACKAGE.equals(intent.getAction())
&& mService.getPackageManagerInternalLocked()
.isInstantAppInstallerComponent(intent.getComponent())) {
// intercept intents targeted directly to the ephemeral installer the
- // ephemeral installer should never be started with a raw URL; instead
+ // ephemeral installer should never be started with a raw Intent; instead
// adjust the intent so it looks like a "normal" instant app launch
intent.setComponent(null /*component*/);
componentSpecified = false;
@@ -1252,7 +1261,7 @@
outActivity[0] = reusedActivity;
}
- return START_DELIVERED_TO_TOP;
+ return mMovedToFront ? START_TASK_TO_FRONT : START_DELIVERED_TO_TOP;
}
}
@@ -1485,19 +1494,23 @@
mDoResume = false;
}
- if (mOptions != null && mOptions.getLaunchTaskId() != -1
- && mOptions.getTaskOverlay()) {
- r.mTaskOverlay = true;
- if (!mOptions.canTaskOverlayResume()) {
- final TaskRecord task = mSupervisor.anyTaskForIdLocked(mOptions.getLaunchTaskId());
- final ActivityRecord top = task != null ? task.getTopActivity() : null;
- if (top != null && top.state != RESUMED) {
+ if (mOptions != null) {
+ if (mOptions.getLaunchTaskId() != -1 && mOptions.getTaskOverlay()) {
+ r.mTaskOverlay = true;
+ if (!mOptions.canTaskOverlayResume()) {
+ final TaskRecord task = mSupervisor.anyTaskForIdLocked(
+ mOptions.getLaunchTaskId());
+ final ActivityRecord top = task != null ? task.getTopActivity() : null;
+ if (top != null && top.state != RESUMED) {
- // The caller specifies that we'd like to be avoided to be moved to the front,
- // so be it!
- mDoResume = false;
- mAvoidMoveToFront = true;
+ // The caller specifies that we'd like to be avoided to be moved to the
+ // front, so be it!
+ mDoResume = false;
+ mAvoidMoveToFront = true;
+ }
}
+ } else if (mOptions.getAvoidMoveToFront()) {
+ mAvoidMoveToFront = true;
}
}
@@ -1838,7 +1851,7 @@
// Need to update mTargetStack because if task was moved out of it, the original stack may
// be destroyed.
mTargetStack = intentActivity.getStack();
- if (!mMovedToFront && mDoResume) {
+ if (!mAvoidMoveToFront && !mMovedToFront && mDoResume) {
if (DEBUG_TASKS) Slog.d(TAG_TASKS, "Bring to front target: " + mTargetStack
+ " from " + intentActivity);
mTargetStack.moveToFront("intentActivityFound");
diff --git a/services/core/java/com/android/server/am/AppErrorDialog.java b/services/core/java/com/android/server/am/AppErrorDialog.java
index 5412266..68c63a2 100644
--- a/services/core/java/com/android/server/am/AppErrorDialog.java
+++ b/services/core/java/com/android/server/am/AppErrorDialog.java
@@ -38,9 +38,7 @@
private final ActivityManagerService mService;
private final AppErrorResult mResult;
private final ProcessRecord mProc;
- private final boolean mRepeating;
private final boolean mIsRestartable;
- private CharSequence mName;
static int CANT_SHOW = -1;
static int BACKGROUND_USER = -2;
@@ -53,6 +51,7 @@
static final int MUTE = 5;
static final int TIMEOUT = 6;
static final int CANCEL = 7;
+ static final int APP_INFO = 8;
// 5-minute timeout, then we automatically dismiss the crash dialog
static final long DISMISS_TIMEOUT = 1000 * 60 * 5;
@@ -64,23 +63,25 @@
mService = service;
mProc = data.proc;
mResult = data.result;
- mRepeating = data.repeating;
- mIsRestartable = data.task != null || data.isRestartableForService;
+ mIsRestartable = (data.task != null || data.isRestartableForService)
+ && Settings.Global.getInt(context.getContentResolver(),
+ Settings.Global.SHOW_RESTART_IN_CRASH_DIALOG, 0) != 0;
BidiFormatter bidi = BidiFormatter.getInstance();
+ CharSequence name;
if ((mProc.pkgList.size() == 1) &&
- (mName = context.getPackageManager().getApplicationLabel(mProc.info)) != null) {
+ (name = context.getPackageManager().getApplicationLabel(mProc.info)) != null) {
setTitle(res.getString(
- mRepeating ? com.android.internal.R.string.aerr_application_repeated
+ data.repeating ? com.android.internal.R.string.aerr_application_repeated
: com.android.internal.R.string.aerr_application,
- bidi.unicodeWrap(mName.toString()),
+ bidi.unicodeWrap(name.toString()),
bidi.unicodeWrap(mProc.info.processName)));
} else {
- mName = mProc.processName;
+ name = mProc.processName;
setTitle(res.getString(
- mRepeating ? com.android.internal.R.string.aerr_process_repeated
+ data.repeating ? com.android.internal.R.string.aerr_process_repeated
: com.android.internal.R.string.aerr_process,
- bidi.unicodeWrap(mName.toString())));
+ bidi.unicodeWrap(name.toString())));
}
setCancelable(true);
@@ -118,11 +119,14 @@
report.setOnClickListener(this);
report.setVisibility(hasReceiver ? View.VISIBLE : View.GONE);
final TextView close = findViewById(com.android.internal.R.id.aerr_close);
- close.setVisibility(mRepeating ? View.VISIBLE : View.GONE);
close.setOnClickListener(this);
+ final TextView appInfo = findViewById(com.android.internal.R.id.aerr_app_info);
+ appInfo.setOnClickListener(this);
boolean showMute = !Build.IS_USER && Settings.Global.getInt(context.getContentResolver(),
- Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0) != 0;
+ Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0) != 0
+ && Settings.Global.getInt(context.getContentResolver(),
+ Settings.Global.SHOW_MUTE_IN_CRASH_DIALOG, 0) != 0;
final TextView mute = findViewById(com.android.internal.R.id.aerr_mute);
mute.setOnClickListener(this);
mute.setVisibility(showMute ? View.VISIBLE : View.GONE);
@@ -183,6 +187,9 @@
case com.android.internal.R.id.aerr_close:
mHandler.obtainMessage(FORCE_QUIT).sendToTarget();
break;
+ case com.android.internal.R.id.aerr_app_info:
+ mHandler.obtainMessage(APP_INFO).sendToTarget();
+ break;
case com.android.internal.R.id.aerr_mute:
mHandler.obtainMessage(MUTE).sendToTarget();
break;
diff --git a/services/core/java/com/android/server/am/AppErrors.java b/services/core/java/com/android/server/am/AppErrors.java
index 0da7e0e..9776c4d 100644
--- a/services/core/java/com/android/server/am/AppErrors.java
+++ b/services/core/java/com/android/server/am/AppErrors.java
@@ -22,6 +22,7 @@
import com.android.internal.os.ProcessCpuTracker;
import com.android.server.RescueParty;
import com.android.server.Watchdog;
+import com.android.server.am.proto.AppErrorsProto;
import android.app.ActivityManager;
import android.app.ActivityOptions;
@@ -33,6 +34,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
+import android.net.Uri;
import android.os.Binder;
import android.os.Message;
import android.os.Process;
@@ -48,6 +50,7 @@
import android.util.Slog;
import android.util.SparseArray;
import android.util.TimeUtils;
+import android.util.proto.ProtoOutputStream;
import java.io.File;
import java.io.FileDescriptor;
@@ -103,8 +106,76 @@
mContext = context;
}
- boolean dumpLocked(FileDescriptor fd, PrintWriter pw, boolean needSep,
- String dumpPackage) {
+ void writeToProto(ProtoOutputStream proto, long fieldId, String dumpPackage) {
+ if (mProcessCrashTimes.getMap().isEmpty() && mBadProcesses.getMap().isEmpty()) {
+ return;
+ }
+
+ final long token = proto.start(fieldId);
+ final long now = SystemClock.uptimeMillis();
+ proto.write(AppErrorsProto.NOW_UPTIME_MS, now);
+
+ if (!mProcessCrashTimes.getMap().isEmpty()) {
+ final ArrayMap<String, SparseArray<Long>> pmap = mProcessCrashTimes.getMap();
+ final int procCount = pmap.size();
+ for (int ip = 0; ip < procCount; ip++) {
+ final long ctoken = proto.start(AppErrorsProto.PROCESS_CRASH_TIMES);
+ final String pname = pmap.keyAt(ip);
+ final SparseArray<Long> uids = pmap.valueAt(ip);
+ final int uidCount = uids.size();
+
+ proto.write(AppErrorsProto.ProcessCrashTime.PROCESS_NAME, pname);
+ for (int i = 0; i < uidCount; i++) {
+ final int puid = uids.keyAt(i);
+ final ProcessRecord r = mService.mProcessNames.get(pname, puid);
+ if (dumpPackage != null && (r == null || !r.pkgList.containsKey(dumpPackage))) {
+ continue;
+ }
+ final long etoken = proto.start(AppErrorsProto.ProcessCrashTime.ENTRIES);
+ proto.write(AppErrorsProto.ProcessCrashTime.Entry.UID, puid);
+ proto.write(AppErrorsProto.ProcessCrashTime.Entry.LAST_CRASHED_AT_MS,
+ uids.valueAt(i));
+ proto.end(etoken);
+ }
+ proto.end(ctoken);
+ }
+
+ }
+
+ if (!mBadProcesses.getMap().isEmpty()) {
+ final ArrayMap<String, SparseArray<BadProcessInfo>> pmap = mBadProcesses.getMap();
+ final int processCount = pmap.size();
+ for (int ip = 0; ip < processCount; ip++) {
+ final long btoken = proto.start(AppErrorsProto.BAD_PROCESSES);
+ final String pname = pmap.keyAt(ip);
+ final SparseArray<BadProcessInfo> uids = pmap.valueAt(ip);
+ final int uidCount = uids.size();
+
+ proto.write(AppErrorsProto.BadProcess.PROCESS_NAME, pname);
+ for (int i = 0; i < uidCount; i++) {
+ final int puid = uids.keyAt(i);
+ final ProcessRecord r = mService.mProcessNames.get(pname, puid);
+ if (dumpPackage != null && (r == null
+ || !r.pkgList.containsKey(dumpPackage))) {
+ continue;
+ }
+ final BadProcessInfo info = uids.valueAt(i);
+ final long etoken = proto.start(AppErrorsProto.BadProcess.ENTRIES);
+ proto.write(AppErrorsProto.BadProcess.Entry.UID, puid);
+ proto.write(AppErrorsProto.BadProcess.Entry.CRASHED_AT_MS, info.time);
+ proto.write(AppErrorsProto.BadProcess.Entry.SHORT_MSG, info.shortMsg);
+ proto.write(AppErrorsProto.BadProcess.Entry.LONG_MSG, info.longMsg);
+ proto.write(AppErrorsProto.BadProcess.Entry.STACK, info.stack);
+ proto.end(etoken);
+ }
+ proto.end(btoken);
+ }
+ }
+
+ proto.end(token);
+ }
+
+ boolean dumpLocked(FileDescriptor fd, PrintWriter pw, boolean needSep, String dumpPackage) {
if (!mProcessCrashTimes.getMap().isEmpty()) {
boolean printed = false;
final long now = SystemClock.uptimeMillis();
@@ -430,6 +501,11 @@
Binder.restoreCallingIdentity(orig);
}
}
+ if (res == AppErrorDialog.APP_INFO) {
+ appErrorIntent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
+ appErrorIntent.setData(Uri.parse("package:" + r.info.packageName));
+ appErrorIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ }
if (res == AppErrorDialog.FORCE_QUIT_AND_REPORT) {
appErrorIntent = createAppErrorIntentLocked(r, timeMillis, crashInfo);
}
diff --git a/services/core/java/com/android/server/am/AppTimeTracker.java b/services/core/java/com/android/server/am/AppTimeTracker.java
index 910f33d..d96364a 100644
--- a/services/core/java/com/android/server/am/AppTimeTracker.java
+++ b/services/core/java/com/android/server/am/AppTimeTracker.java
@@ -25,6 +25,10 @@
import android.util.ArrayMap;
import android.util.MutableLong;
import android.util.TimeUtils;
+import android.util.proto.ProtoOutputStream;
+import android.util.proto.ProtoUtils;
+
+import com.android.server.am.proto.AppTimeTrackerProto;
import java.io.PrintWriter;
@@ -119,4 +123,22 @@
pw.print(prefix); pw.print("mStartedPackage="); pw.println(mStartedPackage);
}
}
+
+ void writeToProto(ProtoOutputStream proto, long fieldId, boolean details) {
+ final long token = proto.start(fieldId);
+ proto.write(AppTimeTrackerProto.RECEIVER, mReceiver.toString());
+ proto.write(AppTimeTrackerProto.TOTAL_DURATION_MS, mTotalTime);
+ for (int i=0; i<mPackageTimes.size(); i++) {
+ final long ptoken = proto.start(AppTimeTrackerProto.PACKAGE_TIMES);
+ proto.write(AppTimeTrackerProto.PackageTime.PACKAGE, mPackageTimes.keyAt(i));
+ proto.write(AppTimeTrackerProto.PackageTime.DURATION_MS, mPackageTimes.valueAt(i).value);
+ proto.end(ptoken);
+ }
+ if (details && mStartedTime != 0) {
+ ProtoUtils.toDuration(proto, AppTimeTrackerProto.STARTED_TIME,
+ mStartedTime, SystemClock.elapsedRealtime());
+ proto.write(AppTimeTrackerProto.STARTED_PACKAGE, mStartedPackage);
+ }
+ proto.end(token);
+ }
}
diff --git a/services/core/java/com/android/server/am/AppWarnings.java b/services/core/java/com/android/server/am/AppWarnings.java
index a3c0345..4b43bd9 100644
--- a/services/core/java/com/android/server/am/AppWarnings.java
+++ b/services/core/java/com/android/server/am/AppWarnings.java
@@ -50,6 +50,7 @@
public static final int FLAG_HIDE_DISPLAY_SIZE = 0x01;
public static final int FLAG_HIDE_COMPILE_SDK = 0x02;
+ public static final int FLAG_HIDE_DEPRECATED_SDK = 0x04;
private final HashMap<String, Integer> mPackageFlags = new HashMap<>();
@@ -61,6 +62,7 @@
private UnsupportedDisplaySizeDialog mUnsupportedDisplaySizeDialog;
private UnsupportedCompileSdkDialog mUnsupportedCompileSdkDialog;
+ private DeprecatedTargetSdkVersionDialog mDeprecatedTargetSdkVersionDialog;
/**
* Creates a new warning dialog manager.
@@ -79,7 +81,7 @@
mUiContext = uiContext;
mAmsHandler = new ConfigHandler(amsHandler.getLooper());
mUiHandler = new UiHandler(uiHandler.getLooper());
- mConfigFile = new AtomicFile(new File(systemDir, CONFIG_FILE_NAME));
+ mConfigFile = new AtomicFile(new File(systemDir, CONFIG_FILE_NAME), "warnings-config");
readConfigFromFileAmsThread();
}
@@ -126,6 +128,17 @@
}
/**
+ * Shows the "deprecated target sdk" warning, if necessary.
+ *
+ * @param r activity record for which the warning may be displayed
+ */
+ public void showDeprecatedTargetDialogIfNeeded(ActivityRecord r) {
+ if (r.appInfo.targetSdkVersion < Build.VERSION.MIN_SUPPORTED_TARGET_SDK_INT) {
+ mUiHandler.showDeprecatedTargetDialog(r);
+ }
+ }
+
+ /**
* Called when an activity is being started.
*
* @param r record for the activity being started
@@ -133,6 +146,7 @@
public void onStartActivity(ActivityRecord r) {
showUnsupportedCompileSdkDialogIfNeeded(r);
showUnsupportedDisplaySizeDialogIfNeeded(r);
+ showDeprecatedTargetDialogIfNeeded(r);
}
/**
@@ -237,6 +251,27 @@
}
/**
+ * Shows the "deprecated target sdk version" warning for the given application.
+ * <p>
+ * <strong>Note:</strong> Must be called on the UI thread.
+ *
+ * @param ar record for the activity that triggered the warning
+ */
+ @UiThread
+ private void showDeprecatedTargetSdkDialogUiThread(ActivityRecord ar) {
+ if (mDeprecatedTargetSdkVersionDialog != null) {
+ mDeprecatedTargetSdkVersionDialog.dismiss();
+ mDeprecatedTargetSdkVersionDialog = null;
+ }
+ if (ar != null && !hasPackageFlag(
+ ar.packageName, FLAG_HIDE_DEPRECATED_SDK)) {
+ mDeprecatedTargetSdkVersionDialog = new DeprecatedTargetSdkVersionDialog(
+ AppWarnings.this, mUiContext, ar.info.applicationInfo);
+ mDeprecatedTargetSdkVersionDialog.show();
+ }
+ }
+
+ /**
* Dismisses all warnings for the given package.
* <p>
* <strong>Note:</strong> Must be called on the UI thread.
@@ -259,6 +294,13 @@
mUnsupportedCompileSdkDialog.dismiss();
mUnsupportedCompileSdkDialog = null;
}
+
+ // Hides the "deprecated target sdk version" dialog if necessary.
+ if (mDeprecatedTargetSdkVersionDialog != null && (name == null || name.equals(
+ mDeprecatedTargetSdkVersionDialog.getPackageName()))) {
+ mDeprecatedTargetSdkVersionDialog.dismiss();
+ mDeprecatedTargetSdkVersionDialog = null;
+ }
}
/**
@@ -282,7 +324,7 @@
void setPackageFlag(String name, int flag, boolean enabled) {
synchronized (mPackageFlags) {
final int curFlags = getPackageFlags(name);
- final int newFlags = enabled ? (curFlags & ~flag) : (curFlags | flag);
+ final int newFlags = enabled ? (curFlags | flag) : (curFlags & ~flag);
if (curFlags != newFlags) {
if (newFlags != 0) {
mPackageFlags.put(name, newFlags);
@@ -311,6 +353,7 @@
private static final int MSG_HIDE_UNSUPPORTED_DISPLAY_SIZE_DIALOG = 2;
private static final int MSG_SHOW_UNSUPPORTED_COMPILE_SDK_DIALOG = 3;
private static final int MSG_HIDE_DIALOGS_FOR_PACKAGE = 4;
+ private static final int MSG_SHOW_DEPRECATED_TARGET_SDK_DIALOG = 5;
public UiHandler(Looper looper) {
super(looper, null, true);
@@ -334,6 +377,10 @@
final String name = (String) msg.obj;
hideDialogsForPackageUiThread(name);
} break;
+ case MSG_SHOW_DEPRECATED_TARGET_SDK_DIALOG: {
+ final ActivityRecord ar = (ActivityRecord) msg.obj;
+ showDeprecatedTargetSdkDialogUiThread(ar);
+ } break;
}
}
@@ -352,6 +399,11 @@
obtainMessage(MSG_SHOW_UNSUPPORTED_COMPILE_SDK_DIALOG, r).sendToTarget();
}
+ public void showDeprecatedTargetDialog(ActivityRecord r) {
+ removeMessages(MSG_SHOW_DEPRECATED_TARGET_SDK_DIALOG);
+ obtainMessage(MSG_SHOW_DEPRECATED_TARGET_SDK_DIALOG, r).sendToTarget();
+ }
+
public void hideDialogsForPackage(String name) {
obtainMessage(MSG_HIDE_DIALOGS_FOR_PACKAGE, name).sendToTarget();
}
diff --git a/services/core/java/com/android/server/am/BatteryStatsService.java b/services/core/java/com/android/server/am/BatteryStatsService.java
index 04b49ba..0d96468 100644
--- a/services/core/java/com/android/server/am/BatteryStatsService.java
+++ b/services/core/java/com/android/server/am/BatteryStatsService.java
@@ -16,6 +16,7 @@
package com.android.server.am;
+import android.app.ActivityManager;
import android.bluetooth.BluetoothActivityEnergyInfo;
import android.content.Context;
import android.content.pm.ApplicationInfo;
@@ -353,10 +354,12 @@
}
}
+ /** @param state Process state from ActivityManager.java. */
void noteUidProcessState(int uid, int state) {
synchronized (mStats) {
// TODO: remove this once we figure out properly where and how
- StatsLog.write(StatsLog.UID_PROCESS_STATE_CHANGED, uid, state);
+ StatsLog.write(StatsLog.UID_PROCESS_STATE_CHANGED, uid,
+ ActivityManager.processStateAmToProto(state));
mStats.noteUidProcessStateLocked(uid, state);
}
@@ -582,17 +585,11 @@
}
}
- public void noteStartGps(int uid) {
+ @Override
+ public void noteGpsChanged(WorkSource oldWs, WorkSource newWs) {
enforceCallingPermission();
synchronized (mStats) {
- mStats.noteStartGpsLocked(uid);
- }
- }
-
- public void noteStopGps(int uid) {
- enforceCallingPermission();
- synchronized (mStats) {
- mStats.noteStopGpsLocked(uid);
+ mStats.noteGpsChangedLocked(oldWs, newWs);
}
}
diff --git a/services/core/java/com/android/server/am/CompatModePackages.java b/services/core/java/com/android/server/am/CompatModePackages.java
index 65c4a42..d84f487 100644
--- a/services/core/java/com/android/server/am/CompatModePackages.java
+++ b/services/core/java/com/android/server/am/CompatModePackages.java
@@ -82,7 +82,7 @@
public CompatModePackages(ActivityManagerService service, File systemDir, Handler handler) {
mService = service;
- mFile = new AtomicFile(new File(systemDir, "packages-compat.xml"));
+ mFile = new AtomicFile(new File(systemDir, "packages-compat.xml"), "compat-mode");
mHandler = new CompatHandler(handler.getLooper());
FileInputStream fis = null;
diff --git a/services/core/java/com/android/server/am/ConnectionRecord.java b/services/core/java/com/android/server/am/ConnectionRecord.java
index 6df283c..d320fb1 100644
--- a/services/core/java/com/android/server/am/ConnectionRecord.java
+++ b/services/core/java/com/android/server/am/ConnectionRecord.java
@@ -20,6 +20,7 @@
import android.app.PendingIntent;
import android.content.Context;
import android.util.proto.ProtoOutputStream;
+import android.util.proto.ProtoUtils;
import com.android.server.am.proto.ConnectionRecordProto;
@@ -37,7 +38,43 @@
final PendingIntent clientIntent; // How to launch the client.
String stringName; // Caching of toString.
boolean serviceDead; // Well is it?
-
+
+ // Please keep the following two enum list synced.
+ private static int[] BIND_ORIG_ENUMS = new int[] {
+ Context.BIND_AUTO_CREATE,
+ Context.BIND_DEBUG_UNBIND,
+ Context.BIND_NOT_FOREGROUND,
+ Context.BIND_IMPORTANT_BACKGROUND,
+ Context.BIND_ABOVE_CLIENT,
+ Context.BIND_ALLOW_OOM_MANAGEMENT,
+ Context.BIND_WAIVE_PRIORITY,
+ Context.BIND_IMPORTANT,
+ Context.BIND_ADJUST_WITH_ACTIVITY,
+ Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE,
+ Context.BIND_FOREGROUND_SERVICE,
+ Context.BIND_TREAT_LIKE_ACTIVITY,
+ Context.BIND_VISIBLE,
+ Context.BIND_SHOWING_UI,
+ Context.BIND_NOT_VISIBLE,
+ };
+ private static int[] BIND_PROTO_ENUMS = new int[] {
+ ConnectionRecordProto.AUTO_CREATE,
+ ConnectionRecordProto.DEBUG_UNBIND,
+ ConnectionRecordProto.NOT_FG,
+ ConnectionRecordProto.IMPORTANT_BG,
+ ConnectionRecordProto.ABOVE_CLIENT,
+ ConnectionRecordProto.ALLOW_OOM_MANAGEMENT,
+ ConnectionRecordProto.WAIVE_PRIORITY,
+ ConnectionRecordProto.IMPORTANT,
+ ConnectionRecordProto.ADJUST_WITH_ACTIVITY,
+ ConnectionRecordProto.FG_SERVICE_WHILE_AWAKE,
+ ConnectionRecordProto.FG_SERVICE,
+ ConnectionRecordProto.TREAT_LIKE_ACTIVITY,
+ ConnectionRecordProto.VISIBLE,
+ ConnectionRecordProto.SHOWING_UI,
+ ConnectionRecordProto.NOT_VISIBLE,
+ };
+
void dump(PrintWriter pw, String prefix) {
pw.println(prefix + "binding=" + binding);
if (activity != null) {
@@ -46,7 +83,7 @@
pw.println(prefix + "conn=" + conn.asBinder()
+ " flags=0x" + Integer.toHexString(flags));
}
-
+
ConnectionRecord(AppBindRecord _binding, ActivityRecord _activity,
IServiceConnection _conn, int _flags,
int _clientLabel, PendingIntent _clientIntent) {
@@ -131,51 +168,8 @@
if (binding.client != null) {
proto.write(ConnectionRecordProto.USER_ID, binding.client.userId);
}
- if ((flags&Context.BIND_AUTO_CREATE) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.AUTO_CREATE);
- }
- if ((flags&Context.BIND_DEBUG_UNBIND) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.DEBUG_UNBIND);
- }
- if ((flags&Context.BIND_NOT_FOREGROUND) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.NOT_FG);
- }
- if ((flags&Context.BIND_IMPORTANT_BACKGROUND) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.IMPORTANT_BG);
- }
- if ((flags&Context.BIND_ABOVE_CLIENT) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.ABOVE_CLIENT);
- }
- if ((flags&Context.BIND_ALLOW_OOM_MANAGEMENT) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.ALLOW_OOM_MANAGEMENT);
- }
- if ((flags&Context.BIND_WAIVE_PRIORITY) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.WAIVE_PRIORITY);
- }
- if ((flags&Context.BIND_IMPORTANT) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.IMPORTANT);
- }
- if ((flags&Context.BIND_ADJUST_WITH_ACTIVITY) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.ADJUST_WITH_ACTIVITY);
- }
- if ((flags&Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.FG_SERVICE_WHILE_WAKE);
- }
- if ((flags&Context.BIND_FOREGROUND_SERVICE) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.FG_SERVICE);
- }
- if ((flags&Context.BIND_TREAT_LIKE_ACTIVITY) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.TREAT_LIKE_ACTIVITY);
- }
- if ((flags&Context.BIND_VISIBLE) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.VISIBLE);
- }
- if ((flags&Context.BIND_SHOWING_UI) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.SHOWING_UI);
- }
- if ((flags&Context.BIND_NOT_VISIBLE) != 0) {
- proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.NOT_VISIBLE);
- }
+ ProtoUtils.writeBitWiseFlagsToProtoEnum(proto, ConnectionRecordProto.FLAGS,
+ flags, BIND_ORIG_ENUMS, BIND_PROTO_ENUMS);
if (serviceDead) {
proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.DEAD);
}
diff --git a/services/core/java/com/android/server/am/DeprecatedTargetSdkVersionDialog.java b/services/core/java/com/android/server/am/DeprecatedTargetSdkVersionDialog.java
new file mode 100644
index 0000000..84dca7f
--- /dev/null
+++ b/services/core/java/com/android/server/am/DeprecatedTargetSdkVersionDialog.java
@@ -0,0 +1,83 @@
+/*
+ * 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.am;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.os.Build;
+import android.os.SystemPropertiesProto;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.CheckBox;
+
+import com.android.internal.R;
+import com.android.server.utils.AppInstallerUtil;
+
+public class DeprecatedTargetSdkVersionDialog {
+ private final AlertDialog mDialog;
+ private final String mPackageName;
+
+ public DeprecatedTargetSdkVersionDialog(final AppWarnings manager, Context context,
+ ApplicationInfo appInfo) {
+ mPackageName = appInfo.packageName;
+
+ final PackageManager pm = context.getPackageManager();
+ final CharSequence label = appInfo.loadSafeLabel(pm);
+ final CharSequence message = context.getString(R.string.deprecated_target_sdk_message);
+
+ final AlertDialog.Builder builder = new AlertDialog.Builder(context)
+ .setPositiveButton(R.string.ok, (dialog, which) ->
+ manager.setPackageFlag(
+ mPackageName, AppWarnings.FLAG_HIDE_DEPRECATED_SDK, true))
+ .setMessage(message)
+ .setTitle(label);
+
+ // If we might be able to update the app, show a button.
+ final Intent installerIntent = AppInstallerUtil.createIntent(context, appInfo.packageName);
+ if (installerIntent != null) {
+ builder.setNeutralButton(R.string.deprecated_target_sdk_app_store,
+ (dialog, which) -> {
+ context.startActivity(installerIntent);
+ });
+ }
+
+ // Ensure the content view is prepared.
+ mDialog = builder.create();
+ mDialog.create();
+
+ final Window window = mDialog.getWindow();
+ window.setType(WindowManager.LayoutParams.TYPE_PHONE);
+
+ // DO NOT MODIFY. Used by CTS to verify the dialog is displayed.
+ window.getAttributes().setTitle("DeprecatedTargetSdkVersionDialog");
+ }
+
+ public String getPackageName() {
+ return mPackageName;
+ }
+
+ public void show() {
+ mDialog.show();
+ }
+
+ public void dismiss() {
+ mDialog.dismiss();
+ }
+}
diff --git a/services/core/java/com/android/server/am/EventLogTags.logtags b/services/core/java/com/android/server/am/EventLogTags.logtags
index a131db5..cb2957d 100644
--- a/services/core/java/com/android/server/am/EventLogTags.logtags
+++ b/services/core/java/com/android/server/am/EventLogTags.logtags
@@ -102,7 +102,7 @@
# Report collection of global memory state
30046 am_meminfo (Cached|2|2),(Free|2|2),(Zram|2|2),(Kernel|2|2),(Native|2|2)
# Report collection of memory used by a process
-30047 am_pss (Pid|1|5),(UID|1|5),(Process Name|3),(Pss|2|2),(Uss|2|2),(SwapPss|2|2)
+30047 am_pss (Pid|1|5),(UID|1|5),(Process Name|3),(Pss|2|2),(Uss|2|2),(SwapPss|2|2),(Rss|2|2),(StatType|1|5),(ProcState|1|5),(TimeToCollect|2|2)
# Attempting to stop an activity
30048 am_stop_activity (User|1|5),(Token|1|5),(Component Name|3)
diff --git a/services/core/java/com/android/server/am/ProcessList.java b/services/core/java/com/android/server/am/ProcessList.java
index 77f5c16..08ee237 100644
--- a/services/core/java/com/android/server/am/ProcessList.java
+++ b/services/core/java/com/android/server/am/ProcessList.java
@@ -21,9 +21,11 @@
import java.io.IOException;
import java.io.OutputStream;
+import java.io.PrintWriter;
import java.nio.ByteBuffer;
import android.app.ActivityManager;
+import android.app.AppProtoEnums;
import android.os.Build;
import android.os.SystemClock;
import com.android.internal.util.MemInfoReader;
@@ -416,6 +418,55 @@
return procState;
}
+ public static int makeProcStateProtoEnum(int curProcState) {
+ switch (curProcState) {
+ case ActivityManager.PROCESS_STATE_PERSISTENT:
+ return AppProtoEnums.PROCESS_STATE_PERSISTENT;
+ case ActivityManager.PROCESS_STATE_PERSISTENT_UI:
+ return AppProtoEnums.PROCESS_STATE_PERSISTENT_UI;
+ case ActivityManager.PROCESS_STATE_TOP:
+ return AppProtoEnums.PROCESS_STATE_TOP;
+ case ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE:
+ return AppProtoEnums.PROCESS_STATE_BOUND_FOREGROUND_SERVICE;
+ case ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE:
+ return AppProtoEnums.PROCESS_STATE_FOREGROUND_SERVICE;
+ case ActivityManager.PROCESS_STATE_TOP_SLEEPING:
+ return AppProtoEnums.PROCESS_STATE_TOP_SLEEPING;
+ case ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND:
+ return AppProtoEnums.PROCESS_STATE_IMPORTANT_FOREGROUND;
+ case ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND:
+ return AppProtoEnums.PROCESS_STATE_IMPORTANT_BACKGROUND;
+ case ActivityManager.PROCESS_STATE_TRANSIENT_BACKGROUND:
+ return AppProtoEnums.PROCESS_STATE_TRANSIENT_BACKGROUND;
+ case ActivityManager.PROCESS_STATE_BACKUP:
+ return AppProtoEnums.PROCESS_STATE_BACKUP;
+ case ActivityManager.PROCESS_STATE_HEAVY_WEIGHT:
+ return AppProtoEnums.PROCESS_STATE_HEAVY_WEIGHT;
+ case ActivityManager.PROCESS_STATE_SERVICE:
+ return AppProtoEnums.PROCESS_STATE_SERVICE;
+ case ActivityManager.PROCESS_STATE_RECEIVER:
+ return AppProtoEnums.PROCESS_STATE_RECEIVER;
+ case ActivityManager.PROCESS_STATE_HOME:
+ return AppProtoEnums.PROCESS_STATE_HOME;
+ case ActivityManager.PROCESS_STATE_LAST_ACTIVITY:
+ return AppProtoEnums.PROCESS_STATE_LAST_ACTIVITY;
+ case ActivityManager.PROCESS_STATE_CACHED_ACTIVITY:
+ return AppProtoEnums.PROCESS_STATE_CACHED_ACTIVITY;
+ case ActivityManager.PROCESS_STATE_CACHED_ACTIVITY_CLIENT:
+ return AppProtoEnums.PROCESS_STATE_CACHED_ACTIVITY_CLIENT;
+ case ActivityManager.PROCESS_STATE_CACHED_RECENT:
+ return AppProtoEnums.PROCESS_STATE_CACHED_RECENT;
+ case ActivityManager.PROCESS_STATE_CACHED_EMPTY:
+ return AppProtoEnums.PROCESS_STATE_CACHED_EMPTY;
+ case ActivityManager.PROCESS_STATE_NONEXISTENT:
+ return AppProtoEnums.PROCESS_STATE_NONEXISTENT;
+ case ActivityManager.PROCESS_STATE_UNKNOWN:
+ return AppProtoEnums.PROCESS_STATE_UNKNOWN;
+ default:
+ return AppProtoEnums.PROCESS_STATE_UNKNOWN_TO_PROTO;
+ }
+ }
+
public static void appendRamKb(StringBuilder sb, long ramKb) {
for (int j=0, fact=10; j<6; j++, fact*=10) {
if (ramKb < fact) {
@@ -432,7 +483,7 @@
public static final int PSS_MIN_TIME_FROM_STATE_CHANGE = 15*1000;
// The maximum amount of time we want to go between PSS collections.
- public static final int PSS_MAX_INTERVAL = 40*60*1000;
+ public static final int PSS_MAX_INTERVAL = 60*60*1000;
// The minimum amount of time between successive PSS requests for *all* processes.
public static final int PSS_ALL_INTERVAL = 20*60*1000;
@@ -447,7 +498,10 @@
private static final int PSS_FIRST_BACKGROUND_INTERVAL = 20*1000;
// The amount of time until PSS when a process first becomes cached.
- private static final int PSS_FIRST_CACHED_INTERVAL = 30*1000;
+ private static final int PSS_FIRST_CACHED_INTERVAL = 20*1000;
+
+ // The amount of time until PSS when an important process stays in the same state.
+ private static final int PSS_SAME_PERSISTENT_INTERVAL = 20*60*1000;
// The amount of time until PSS when the top process stays in the same state.
private static final int PSS_SAME_TOP_INTERVAL = 5*60*1000;
@@ -459,7 +513,7 @@
private static final int PSS_SAME_SERVICE_INTERVAL = 20*60*1000;
// The amount of time until PSS when a cached process stays in the same state.
- private static final int PSS_SAME_CACHED_INTERVAL = 30*60*1000;
+ private static final int PSS_SAME_CACHED_INTERVAL = 20*60*1000;
// The amount of time until PSS when a persistent process first appears.
private static final int PSS_FIRST_ASLEEP_PERSISTENT_INTERVAL = 1*60*1000;
@@ -493,7 +547,9 @@
public static final int PROC_MEM_IMPORTANT = 2;
public static final int PROC_MEM_SERVICE = 3;
public static final int PROC_MEM_CACHED = 4;
+ public static final int PROC_MEM_NUM = 5;
+ // Map large set of system process states to
private static final int[] sProcStateToProcMem = new int[] {
PROC_MEM_PERSISTENT, // ActivityManager.PROCESS_STATE_PERSISTENT
PROC_MEM_PERSISTENT, // ActivityManager.PROCESS_STATE_PERSISTENT_UI
@@ -517,138 +573,96 @@
};
private static final long[] sFirstAwakePssTimes = new long[] {
- PSS_FIRST_PERSISTENT_INTERVAL, // ActivityManager.PROCESS_STATE_PERSISTENT
- PSS_FIRST_PERSISTENT_INTERVAL, // ActivityManager.PROCESS_STATE_PERSISTENT_UI
- PSS_FIRST_TOP_INTERVAL, // ActivityManager.PROCESS_STATE_TOP
- PSS_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE
- PSS_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE
- PSS_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND
- PSS_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND
- PSS_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_TRANSIENT_BACKGROUND
- PSS_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_BACKUP
- PSS_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_SERVICE
- PSS_FIRST_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_RECEIVER
- PSS_FIRST_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_TOP_SLEEPING
- PSS_FIRST_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_HEAVY_WEIGHT
- PSS_FIRST_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_HOME
- PSS_FIRST_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_LAST_ACTIVITY
- PSS_FIRST_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_ACTIVITY
- PSS_FIRST_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_ACTIVITY_CLIENT
- PSS_FIRST_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_RECENT
- PSS_FIRST_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_EMPTY
+ PSS_FIRST_PERSISTENT_INTERVAL, // PROC_MEM_PERSISTENT
+ PSS_FIRST_TOP_INTERVAL, // PROC_MEM_TOP
+ PSS_FIRST_BACKGROUND_INTERVAL, // PROC_MEM_IMPORTANT
+ PSS_FIRST_BACKGROUND_INTERVAL, // PROC_MEM_SERVICE
+ PSS_FIRST_CACHED_INTERVAL, // PROC_MEM_CACHED
};
private static final long[] sSameAwakePssTimes = new long[] {
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_PERSISTENT
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_PERSISTENT_UI
- PSS_SAME_TOP_INTERVAL, // ActivityManager.PROCESS_STATE_TOP
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_TRANSIENT_BACKGROUND
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_BACKUP
- PSS_SAME_SERVICE_INTERVAL, // ActivityManager.PROCESS_STATE_SERVICE
- PSS_SAME_SERVICE_INTERVAL, // ActivityManager.PROCESS_STATE_RECEIVER
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_TOP_SLEEPING
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_HEAVY_WEIGHT
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_HOME
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_LAST_ACTIVITY
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_ACTIVITY
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_ACTIVITY_CLIENT
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_RECENT
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_EMPTY
+ PSS_SAME_PERSISTENT_INTERVAL, // PROC_MEM_PERSISTENT
+ PSS_SAME_TOP_INTERVAL, // PROC_MEM_TOP
+ PSS_SAME_IMPORTANT_INTERVAL, // PROC_MEM_IMPORTANT
+ PSS_SAME_SERVICE_INTERVAL, // PROC_MEM_SERVICE
+ PSS_SAME_CACHED_INTERVAL, // PROC_MEM_CACHED
};
private static final long[] sFirstAsleepPssTimes = new long[] {
- PSS_FIRST_ASLEEP_PERSISTENT_INTERVAL, // ActivityManager.PROCESS_STATE_PERSISTENT
- PSS_FIRST_ASLEEP_PERSISTENT_INTERVAL, // ActivityManager.PROCESS_STATE_PERSISTENT_UI
- PSS_FIRST_ASLEEP_TOP_INTERVAL, // ActivityManager.PROCESS_STATE_TOP
- PSS_FIRST_ASLEEP_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE
- PSS_FIRST_ASLEEP_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE
- PSS_FIRST_ASLEEP_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND
- PSS_FIRST_ASLEEP_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND
- PSS_FIRST_ASLEEP_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_TRANSIENT_BACKGROUND
- PSS_FIRST_ASLEEP_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_BACKUP
- PSS_FIRST_ASLEEP_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_SERVICE
- PSS_FIRST_ASLEEP_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_RECEIVER
- PSS_FIRST_ASLEEP_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_TOP_SLEEPING
- PSS_FIRST_ASLEEP_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_HEAVY_WEIGHT
- PSS_FIRST_ASLEEP_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_HOME
- PSS_FIRST_ASLEEP_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_LAST_ACTIVITY
- PSS_FIRST_ASLEEP_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_ACTIVITY
- PSS_FIRST_ASLEEP_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_ACTIVITY_CLIENT
- PSS_FIRST_ASLEEP_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_RECENT
- PSS_FIRST_ASLEEP_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_EMPTY
+ PSS_FIRST_ASLEEP_PERSISTENT_INTERVAL, // PROC_MEM_PERSISTENT
+ PSS_FIRST_ASLEEP_TOP_INTERVAL, // PROC_MEM_TOP
+ PSS_FIRST_ASLEEP_BACKGROUND_INTERVAL, // PROC_MEM_IMPORTANT
+ PSS_FIRST_ASLEEP_BACKGROUND_INTERVAL, // PROC_MEM_SERVICE
+ PSS_FIRST_ASLEEP_CACHED_INTERVAL, // PROC_MEM_CACHED
};
private static final long[] sSameAsleepPssTimes = new long[] {
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_PERSISTENT
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_PERSISTENT_UI
- PSS_SAME_TOP_INTERVAL, // ActivityManager.PROCESS_STATE_TOP
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_TRANSIENT_BACKGROUND
- PSS_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_BACKUP
- PSS_SAME_SERVICE_INTERVAL, // ActivityManager.PROCESS_STATE_SERVICE
- PSS_SAME_SERVICE_INTERVAL, // ActivityManager.PROCESS_STATE_RECEIVER
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_TOP_SLEEPING
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_HEAVY_WEIGHT
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_HOME
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_LAST_ACTIVITY
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_ACTIVITY
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_ACTIVITY_CLIENT
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_RECENT
- PSS_SAME_CACHED_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_EMPTY
+ PSS_SAME_PERSISTENT_INTERVAL, // PROC_MEM_PERSISTENT
+ PSS_SAME_TOP_INTERVAL, // PROC_MEM_TOP
+ PSS_SAME_IMPORTANT_INTERVAL, // PROC_MEM_IMPORTANT
+ PSS_SAME_SERVICE_INTERVAL, // PROC_MEM_SERVICE
+ PSS_SAME_CACHED_INTERVAL, // PROC_MEM_CACHED
};
private static final long[] sTestFirstPssTimes = new long[] {
- PSS_TEST_FIRST_TOP_INTERVAL, // ActivityManager.PROCESS_STATE_PERSISTENT
- PSS_TEST_FIRST_TOP_INTERVAL, // ActivityManager.PROCESS_STATE_PERSISTENT_UI
- PSS_TEST_FIRST_TOP_INTERVAL, // ActivityManager.PROCESS_STATE_TOP
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_TRANSIENT_BACKGROUND
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_BACKUP
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_SERVICE
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_RECEIVER
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_TOP_SLEEPING
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_HEAVY_WEIGHT
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_HOME
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_LAST_ACTIVITY
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_ACTIVITY
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_ACTIVITY_CLIENT
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_RECENT
- PSS_TEST_FIRST_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_EMPTY
+ PSS_TEST_FIRST_TOP_INTERVAL, // PROC_MEM_PERSISTENT
+ PSS_TEST_FIRST_TOP_INTERVAL, // PROC_MEM_TOP
+ PSS_TEST_FIRST_BACKGROUND_INTERVAL, // PROC_MEM_IMPORTANT
+ PSS_TEST_FIRST_BACKGROUND_INTERVAL, // PROC_MEM_SERVICE
+ PSS_TEST_FIRST_BACKGROUND_INTERVAL, // PROC_MEM_CACHED
};
private static final long[] sTestSamePssTimes = new long[] {
- PSS_TEST_SAME_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_PERSISTENT
- PSS_TEST_SAME_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_PERSISTENT_UI
- PSS_TEST_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_TOP
- PSS_TEST_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE
- PSS_TEST_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE
- PSS_TEST_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND
- PSS_TEST_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND
- PSS_TEST_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_TRANSIENT_BACKGROUND
- PSS_TEST_SAME_IMPORTANT_INTERVAL, // ActivityManager.PROCESS_STATE_BACKUP
- PSS_TEST_SAME_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_SERVICE
- PSS_TEST_SAME_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_RECEIVER
- PSS_TEST_SAME_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_TOP_SLEEPING
- PSS_TEST_SAME_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_HEAVY_WEIGHT
- PSS_TEST_SAME_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_HOME
- PSS_TEST_SAME_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_LAST_ACTIVITY
- PSS_TEST_SAME_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_ACTIVITY
- PSS_TEST_SAME_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_ACTIVITY_CLIENT
- PSS_TEST_SAME_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_RECENT
- PSS_TEST_SAME_BACKGROUND_INTERVAL, // ActivityManager.PROCESS_STATE_CACHED_EMPTY
+ PSS_TEST_SAME_BACKGROUND_INTERVAL, // PROC_MEM_PERSISTENT
+ PSS_TEST_SAME_IMPORTANT_INTERVAL, // PROC_MEM_TOP
+ PSS_TEST_SAME_IMPORTANT_INTERVAL, // PROC_MEM_IMPORTANT
+ PSS_TEST_SAME_BACKGROUND_INTERVAL, // PROC_MEM_SERVICE
+ PSS_TEST_SAME_BACKGROUND_INTERVAL, // PROC_MEM_CACHED
};
+ public static final class ProcStateMemTracker {
+ final int[] mHighestMem = new int[PROC_MEM_NUM];
+ int mTotalHighestMem = PROC_MEM_CACHED;
+ float mCurFactor = 1.0f;
+
+ int mPendingMemState;
+ int mPendingHighestMemState;
+ boolean mPendingSame;
+
+ public ProcStateMemTracker() {
+ for (int i = PROC_MEM_PERSISTENT; i < PROC_MEM_NUM; i++) {
+ mHighestMem[i] = PROC_MEM_NUM;
+ }
+ mPendingMemState = -1;
+ }
+
+ public void dumpLine(PrintWriter pw) {
+ pw.print("best=");
+ pw.print(mTotalHighestMem);
+ pw.print(" ");
+ pw.print(mCurFactor);
+ pw.print("x (");
+ for (int i = 0; i < PROC_MEM_NUM; i++) {
+ if (i != 0) {
+ pw.print(", ");
+ }
+ pw.print(i);
+ pw.print("=");
+ pw.print(mHighestMem[i]);
+ }
+ pw.print(")");
+ if (mPendingMemState >= 0) {
+ pw.print(" / pending state=");
+ pw.print(mPendingMemState);
+ pw.print(" highest=");
+ pw.print(mPendingHighestMemState);
+ pw.print(" same=");
+ pw.print(mPendingSame);
+ }
+ pw.println();
+ }
+ }
+
public static boolean procStatesDifferForMem(int procState1, int procState2) {
return sProcStateToProcMem[procState1] != sProcStateToProcMem[procState2];
}
@@ -657,16 +671,50 @@
return test ? PSS_TEST_MIN_TIME_FROM_STATE_CHANGE : PSS_MIN_TIME_FROM_STATE_CHANGE;
}
- public static long computeNextPssTime(int procState, boolean first, boolean test,
+ public static void commitNextPssTime(ProcStateMemTracker tracker) {
+ if (tracker.mPendingMemState >= 0) {
+ tracker.mHighestMem[tracker.mPendingMemState] = tracker.mPendingHighestMemState;
+ tracker.mTotalHighestMem = tracker.mPendingHighestMemState;
+ if (tracker.mPendingSame) {
+ tracker.mCurFactor *= 1.5f;
+ } else {
+ tracker.mCurFactor = 1;
+ }
+ tracker.mPendingMemState = -1;
+ }
+ }
+
+ public static void abortNextPssTime(ProcStateMemTracker tracker) {
+ tracker.mPendingMemState = -1;
+ }
+
+ public static long computeNextPssTime(int procState, ProcStateMemTracker tracker, boolean test,
boolean sleeping, long now) {
+ boolean first;
+ final int memState = sProcStateToProcMem[procState];
+ if (tracker != null) {
+ final int highestMemState = memState < tracker.mTotalHighestMem
+ ? memState : tracker.mTotalHighestMem;
+ first = highestMemState < tracker.mHighestMem[memState];
+ tracker.mPendingMemState = memState;
+ tracker.mPendingHighestMemState = highestMemState;
+ tracker.mPendingSame = !first;
+ } else {
+ first = true;
+ }
final long[] table = test
? (first
- ? sTestFirstPssTimes
- : sTestSamePssTimes)
+ ? sTestFirstPssTimes
+ : sTestSamePssTimes)
: (first
- ? (sleeping ? sFirstAsleepPssTimes : sFirstAwakePssTimes)
- : (sleeping ? sSameAsleepPssTimes : sSameAwakePssTimes));
- return now + table[procState];
+ ? (sleeping ? sFirstAsleepPssTimes : sFirstAwakePssTimes)
+ : (sleeping ? sSameAsleepPssTimes : sSameAwakePssTimes));
+ long delay = (long)(table[memState] * (tracker != null && !first
+ ? tracker.mCurFactor : 1.0f));
+ if (delay > PSS_MAX_INTERVAL) {
+ delay = PSS_MAX_INTERVAL;
+ }
+ return now + delay;
}
long getMemLevel(int adjustment) {
diff --git a/services/core/java/com/android/server/am/ProcessRecord.java b/services/core/java/com/android/server/am/ProcessRecord.java
index a1e5947..1f60755 100644
--- a/services/core/java/com/android/server/am/ProcessRecord.java
+++ b/services/core/java/com/android/server/am/ProcessRecord.java
@@ -66,6 +66,8 @@
final String processName; // name of the process
// List of packages running in the process
final ArrayMap<String, ProcessStats.ProcessStateHolder> pkgList = new ArrayMap<>();
+ final ProcessList.ProcStateMemTracker procStateMemTracker
+ = new ProcessList.ProcStateMemTracker();
UidRecord uidRecord; // overall state of process's uid.
ArraySet<String> pkgDeps; // additional packages we have a dependency on
IApplicationThread thread; // the actual proc... may be null only if
@@ -102,6 +104,7 @@
int repProcState = PROCESS_STATE_NONEXISTENT; // Last reported process state
int setProcState = PROCESS_STATE_NONEXISTENT; // Last set process state in process tracker
int pssProcState = PROCESS_STATE_NONEXISTENT; // Currently requesting pss for
+ int pssStatType; // The type of stat collection that we are currently requesting
int savedPriority; // Previous priority value if we're switching to non-SCHED_OTHER
int renderThreadTid; // TID for RenderThread
boolean serviceb; // Process currently is on the service B list
@@ -285,6 +288,7 @@
TimeUtils.formatDuration(lastActivityTime, nowUptime, pw);
pw.print(" lastPssTime=");
TimeUtils.formatDuration(lastPssTime, nowUptime, pw);
+ pw.print(" pssStatType="); pw.print(pssStatType);
pw.print(" nextPssTime=");
TimeUtils.formatDuration(nextPssTime, nowUptime, pw);
pw.println();
@@ -295,6 +299,8 @@
pw.print(" lastCachedPss="); DebugUtils.printSizeValue(pw, lastCachedPss*1024);
pw.print(" lastCachedSwapPss="); DebugUtils.printSizeValue(pw, lastCachedSwapPss*1024);
pw.println();
+ pw.print(prefix); pw.print("procStateMemTracker: ");
+ procStateMemTracker.dumpLine(pw);
pw.print(prefix); pw.print("cached="); pw.print(cached);
pw.print(" empty="); pw.println(empty);
if (serviceb) {
@@ -679,6 +685,7 @@
proto.write(ProcessRecordProto.ISOLATED_APP_ID, UserHandle.getAppId(uid));
}
}
+ proto.write(ProcessRecordProto.PERSISTENT, persistent);
proto.end(token);
}
diff --git a/services/core/java/com/android/server/am/ProcessStatsService.java b/services/core/java/com/android/server/am/ProcessStatsService.java
index 5f9d616..8bf320e 100644
--- a/services/core/java/com/android/server/am/ProcessStatsService.java
+++ b/services/core/java/com/android/server/am/ProcessStatsService.java
@@ -220,8 +220,9 @@
}
public void writeStateLocked(boolean sync, final boolean commit) {
+ final long totalTime;
synchronized (mPendingWriteLock) {
- long now = SystemClock.uptimeMillis();
+ final long now = SystemClock.uptimeMillis();
if (mPendingWrite == null || !mPendingWriteCommitted) {
mPendingWrite = Parcel.obtain();
mProcessStats.mTimePeriodEndRealtime = SystemClock.elapsedRealtime();
@@ -238,19 +239,19 @@
updateFile();
}
mLastWriteTime = SystemClock.uptimeMillis();
- if (DEBUG) Slog.d(TAG, "Prepared write state in "
- + (SystemClock.uptimeMillis()-now) + "ms");
+ totalTime = SystemClock.uptimeMillis() - now;
+ if (DEBUG) Slog.d(TAG, "Prepared write state in " + now + "ms");
if (!sync) {
BackgroundThread.getHandler().post(new Runnable() {
@Override public void run() {
- performWriteState();
+ performWriteState(totalTime);
}
});
return;
}
}
- performWriteState();
+ performWriteState(totalTime);
}
private void updateFile() {
@@ -259,7 +260,7 @@
mLastWriteTime = SystemClock.uptimeMillis();
}
- void performWriteState() {
+ void performWriteState(long initialTime) {
if (DEBUG) Slog.d(TAG, "Performing write to " + mFile.getBaseFile());
Parcel data;
AtomicFile file;
@@ -275,12 +276,15 @@
mWriteLock.lock();
}
+ final long startTime = SystemClock.uptimeMillis();
FileOutputStream stream = null;
try {
stream = file.startWrite();
stream.write(data.marshall());
stream.flush();
file.finishWrite(stream);
+ com.android.internal.logging.EventLogTags.writeCommitSysConfigFile(
+ "procstats", SystemClock.uptimeMillis() - startTime + initialTime);
if (DEBUG) Slog.d(TAG, "Write completed successfully!");
} catch (IOException e) {
Slog.w(TAG, "Error writing process statistics", e);
@@ -1048,7 +1052,7 @@
}
}
- private void dumpAggregatedStats(ProtoOutputStream proto, int aggregateHours, long now) {
+ private void dumpAggregatedStats(ProtoOutputStream proto, long fieldId, int aggregateHours, long now) {
ParcelFileDescriptor pfd = getStatsOverTime(aggregateHours*60*60*1000
- (ProcessStats.COMMIT_PERIOD/2));
if (pfd == null) {
@@ -1060,30 +1064,24 @@
if (stats.mReadError != null) {
return;
}
- stats.toProto(proto, now);
+ stats.writeToProto(proto, fieldId, now);
}
private void dumpProto(FileDescriptor fd) {
final ProtoOutputStream proto = new ProtoOutputStream(fd);
// dump current procstats
- long nowToken = proto.start(ProcessStatsServiceDumpProto.PROCSTATS_NOW);
long now;
synchronized (mAm) {
now = SystemClock.uptimeMillis();
- mProcessStats.toProto(proto, now);
+ mProcessStats.writeToProto(proto,ProcessStatsServiceDumpProto.PROCSTATS_NOW, now);
}
- proto.end(nowToken);
// aggregated over last 3 hours procstats
- long tokenOf3Hrs = proto.start(ProcessStatsServiceDumpProto.PROCSTATS_OVER_3HRS);
- dumpAggregatedStats(proto, 3, now);
- proto.end(tokenOf3Hrs);
+ dumpAggregatedStats(proto, ProcessStatsServiceDumpProto.PROCSTATS_OVER_3HRS, 3, now);
// aggregated over last 24 hours procstats
- long tokenOf24Hrs = proto.start(ProcessStatsServiceDumpProto.PROCSTATS_OVER_24HRS);
- dumpAggregatedStats(proto, 24, now);
- proto.end(tokenOf24Hrs);
+ dumpAggregatedStats(proto, ProcessStatsServiceDumpProto.PROCSTATS_OVER_24HRS, 24, now);
proto.flush();
}
diff --git a/services/core/java/com/android/server/am/RecentsAnimation.java b/services/core/java/com/android/server/am/RecentsAnimation.java
new file mode 100644
index 0000000..c188ccb
--- /dev/null
+++ b/services/core/java/com/android/server/am/RecentsAnimation.java
@@ -0,0 +1,174 @@
+/*
+ * 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.am;
+
+import static android.app.ActivityManager.StackId.INVALID_STACK_ID;
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
+import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
+import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION;
+import static android.view.WindowManager.TRANSIT_NONE;
+import static com.android.server.am.ActivityStackSupervisor.PRESERVE_WINDOWS;
+
+import android.app.ActivityOptions;
+import android.content.ComponentName;
+import android.content.Intent;
+import android.os.Handler;
+import android.view.IRecentsAnimationRunner;
+import com.android.server.wm.RecentsAnimationController.RecentsAnimationCallbacks;
+import com.android.server.wm.WindowManagerService;
+
+/**
+ * Manages the recents animation, including the reordering of the stacks for the transition and
+ * cleanup. See {@link com.android.server.wm.RecentsAnimationController}.
+ */
+class RecentsAnimation implements RecentsAnimationCallbacks {
+ private static final String TAG = RecentsAnimation.class.getSimpleName();
+
+ private static final int RECENTS_ANIMATION_TIMEOUT = 10 * 1000;
+
+ private final ActivityManagerService mService;
+ private final ActivityStackSupervisor mStackSupervisor;
+ private final ActivityStartController mActivityStartController;
+ private final WindowManagerService mWindowManager;
+ private final UserController mUserController;
+ private final Handler mHandler;
+
+ private final Runnable mCancelAnimationRunnable;
+
+ // The stack to restore the home stack behind when the animation is finished
+ private ActivityStack mRestoreHomeBehindStack;
+
+ RecentsAnimation(ActivityManagerService am, ActivityStackSupervisor stackSupervisor,
+ ActivityStartController activityStartController, WindowManagerService wm,
+ UserController userController) {
+ mService = am;
+ mStackSupervisor = stackSupervisor;
+ mActivityStartController = activityStartController;
+ mHandler = new Handler(mStackSupervisor.mLooper);
+ mWindowManager = wm;
+ mUserController = userController;
+ mCancelAnimationRunnable = () -> {
+ // The caller has not finished the animation in a predefined amount of time, so
+ // force-cancel the animation
+ mWindowManager.cancelRecentsAnimation();
+ };
+ }
+
+ void startRecentsActivity(Intent intent, IRecentsAnimationRunner recentsAnimationRunner,
+ ComponentName recentsComponent, int recentsUid) {
+ mWindowManager.deferSurfaceLayout();
+ try {
+ // Cancel the previous recents animation if necessary
+ mWindowManager.cancelRecentsAnimation();
+
+ final boolean hasExistingHomeActivity = mStackSupervisor.getHomeActivity() != null;
+ if (!hasExistingHomeActivity) {
+ // No home activity
+ final ActivityOptions opts = ActivityOptions.makeBasic();
+ opts.setLaunchActivityType(ACTIVITY_TYPE_HOME);
+ opts.setAvoidMoveToFront();
+ intent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_NO_ANIMATION);
+
+ mActivityStartController
+ .obtainStarter(intent, "startRecentsActivity_noHomeActivity")
+ .setCallingUid(recentsUid)
+ .setCallingPackage(recentsComponent.getPackageName())
+ .setActivityOptions(SafeActivityOptions.fromBundle(opts.toBundle()))
+ .setMayWait(mUserController.getCurrentUserId())
+ .execute();
+ mWindowManager.prepareAppTransition(TRANSIT_NONE, false);
+
+ // TODO: Maybe wait for app to draw in this particular case?
+ }
+
+ final ActivityRecord homeActivity = mStackSupervisor.getHomeActivity();
+ final ActivityDisplay display = homeActivity.getDisplay();
+
+ // Save the initial position of the home activity stack to be restored to after the
+ // animation completes
+ mRestoreHomeBehindStack = hasExistingHomeActivity
+ ? display.getStackAboveHome()
+ : null;
+
+ // Move the home activity into place for the animation
+ display.moveHomeStackBehindBottomMostVisibleStack();
+
+ // Mark the home activity as launch-behind to bump its visibility for the
+ // duration of the gesture that is driven by the recents component
+ homeActivity.mLaunchTaskBehind = true;
+
+ // Fetch all the surface controls and pass them to the client to get the animation
+ // started
+ mWindowManager.initializeRecentsAnimation(recentsAnimationRunner, this,
+ display.mDisplayId);
+
+ // If we updated the launch-behind state, update the visibility of the activities after
+ // we fetch the visible tasks to be controlled by the animation
+ mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, PRESERVE_WINDOWS);
+
+ // Post a timeout for the animation
+ mHandler.postDelayed(mCancelAnimationRunnable, RECENTS_ANIMATION_TIMEOUT);
+ } finally {
+ mWindowManager.continueSurfaceLayout();
+ }
+ }
+
+ @Override
+ public void onAnimationFinished(boolean moveHomeToTop) {
+ mHandler.removeCallbacks(mCancelAnimationRunnable);
+ synchronized (mService) {
+ if (mWindowManager.getRecentsAnimationController() == null) return;
+
+ mWindowManager.inSurfaceTransaction(() -> {
+ mWindowManager.deferSurfaceLayout();
+ try {
+ mWindowManager.cleanupRecentsAnimation();
+
+ // Move the home stack to the front
+ final ActivityRecord homeActivity = mStackSupervisor.getHomeActivity();
+ if (homeActivity == null) {
+ return;
+ }
+
+ // Restore the launched-behind state
+ homeActivity.mLaunchTaskBehind = false;
+
+ if (moveHomeToTop) {
+ // Bring the home stack to the front
+ final ActivityStack homeStack = homeActivity.getStack();
+ homeStack.mNoAnimActivities.add(homeActivity);
+ homeStack.moveToFront("RecentsAnimation.onAnimationFinished()");
+ } else {
+ // Restore the home stack to its previous position
+ final ActivityDisplay display = homeActivity.getDisplay();
+ display.moveHomeStackBehindStack(mRestoreHomeBehindStack);
+ }
+
+ mWindowManager.prepareAppTransition(TRANSIT_NONE, false);
+ mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, false);
+ mStackSupervisor.resumeFocusedStackTopActivityLocked();
+
+ // No reason to wait for the pausing activity in this case, as the hiding of
+ // surfaces needs to be done immediately.
+ mWindowManager.executeAppTransition();
+ } finally {
+ mWindowManager.continueSurfaceLayout();
+ }
+ });
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/am/UidRecord.java b/services/core/java/com/android/server/am/UidRecord.java
index 8efcb4f..3886e5a 100644
--- a/services/core/java/com/android/server/am/UidRecord.java
+++ b/services/core/java/com/android/server/am/UidRecord.java
@@ -18,13 +18,17 @@
import android.Manifest;
import android.app.ActivityManager;
+import android.app.ActivityManagerProto;
import android.content.pm.PackageManager;
import android.os.SystemClock;
import android.os.UserHandle;
import android.util.TimeUtils;
+import android.util.proto.ProtoOutputStream;
+import android.util.proto.ProtoUtils;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.am.proto.UidRecordProto;
/**
* Overall information about a uid that has actively running processes.
@@ -86,6 +90,22 @@
static final int CHANGE_CACHED = 1<<3;
static final int CHANGE_UNCACHED = 1<<4;
+ // Keep the enum lists in sync
+ private static int[] ORIG_ENUMS = new int[] {
+ CHANGE_GONE,
+ CHANGE_IDLE,
+ CHANGE_ACTIVE,
+ CHANGE_CACHED,
+ CHANGE_UNCACHED,
+ };
+ private static int[] PROTO_ENUMS = new int[] {
+ UidRecordProto.CHANGE_GONE,
+ UidRecordProto.CHANGE_IDLE,
+ UidRecordProto.CHANGE_ACTIVE,
+ UidRecordProto.CHANGE_CACHED,
+ UidRecordProto.CHANGE_UNCACHED,
+ };
+
static final class ChangeItem {
UidRecord uidRecord;
int uid;
@@ -125,6 +145,34 @@
}
}
+
+ void writeToProto(ProtoOutputStream proto, long fieldId) {
+ long token = proto.start(fieldId);
+ proto.write(UidRecordProto.HEX_HASH, Integer.toHexString(System.identityHashCode(this)));
+ proto.write(UidRecordProto.UID, uid);
+ proto.write(UidRecordProto.CURRENT, ProcessList.makeProcStateProtoEnum(curProcState));
+ proto.write(UidRecordProto.EPHEMERAL, ephemeral);
+ proto.write(UidRecordProto.FG_SERVICES, foregroundServices);
+ proto.write(UidRecordProto.WHILELIST, curWhitelist);
+ ProtoUtils.toDuration(proto, UidRecordProto.LAST_BACKGROUND_TIME,
+ lastBackgroundTime, SystemClock.elapsedRealtime());
+ proto.write(UidRecordProto.IDLE, idle);
+ if (lastReportedChange != 0) {
+ ProtoUtils.writeBitWiseFlagsToProtoEnum(proto, UidRecordProto.LAST_REPORTED_CHANGES,
+ lastReportedChange, ORIG_ENUMS, PROTO_ENUMS);
+ }
+ proto.write(UidRecordProto.NUM_PROCS, numProcs);
+
+ long seqToken = proto.start(UidRecordProto.NETWORK_STATE_UPDATE);
+ proto.write(UidRecordProto.ProcStateSequence.CURURENT, curProcStateSeq);
+ proto.write(UidRecordProto.ProcStateSequence.LAST_NETWORK_UPDATED,
+ lastNetworkUpdatedProcStateSeq);
+ proto.write(UidRecordProto.ProcStateSequence.LAST_DISPATCHED, lastDispatchedProcStateSeq);
+ proto.end(seqToken);
+
+ proto.end(token);
+ }
+
public String toString() {
StringBuilder sb = new StringBuilder(128);
sb.append("UidRecord{");
diff --git a/services/core/java/com/android/server/am/UriPermission.java b/services/core/java/com/android/server/am/UriPermission.java
index 90577e3..1e071aa 100644
--- a/services/core/java/com/android/server/am/UriPermission.java
+++ b/services/core/java/com/android/server/am/UriPermission.java
@@ -16,6 +16,7 @@
package com.android.server.am;
+import android.app.GrantedUriPermission;
import android.content.Intent;
import android.os.Binder;
import android.os.UserHandle;
@@ -387,4 +388,8 @@
public android.content.UriPermission buildPersistedPublicApiObject() {
return new android.content.UriPermission(uri.uri, persistedModeFlags, persistedCreateTime);
}
+
+ public GrantedUriPermission buildGrantedUriPermission() {
+ return new GrantedUriPermission(uri.uri, targetPkg);
+ }
}
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java
index 5ada484..7b0c714 100644
--- a/services/core/java/com/android/server/am/UserController.java
+++ b/services/core/java/com/android/server/am/UserController.java
@@ -83,6 +83,7 @@
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.util.TimingsTraceLog;
+import android.util.proto.ProtoOutputStream;
import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
@@ -94,6 +95,7 @@
import com.android.server.FgThread;
import com.android.server.LocalServices;
import com.android.server.SystemServiceManager;
+import com.android.server.am.proto.UserControllerProto;
import com.android.server.pm.UserManagerService;
import com.android.server.wm.WindowManagerService;
@@ -1844,6 +1846,36 @@
}
}
+ void writeToProto(ProtoOutputStream proto, long fieldId) {
+ synchronized (mLock) {
+ long token = proto.start(fieldId);
+ for (int i = 0; i < mStartedUsers.size(); i++) {
+ UserState uss = mStartedUsers.valueAt(i);
+ final long uToken = proto.start(UserControllerProto.STARTED_USERS);
+ proto.write(UserControllerProto.User.ID, uss.mHandle.getIdentifier());
+ uss.writeToProto(proto, UserControllerProto.User.STATE);
+ proto.end(uToken);
+ }
+ for (int i = 0; i < mStartedUserArray.length; i++) {
+ proto.write(UserControllerProto.STARTED_USER_ARRAY, mStartedUserArray[i]);
+ }
+ for (int i = 0; i < mUserLru.size(); i++) {
+ proto.write(UserControllerProto.USER_LRU, mUserLru.get(i));
+ }
+ if (mUserProfileGroupIds.size() > 0) {
+ for (int i = 0; i < mUserProfileGroupIds.size(); i++) {
+ final long uToken = proto.start(UserControllerProto.USER_PROFILE_GROUP_IDS);
+ proto.write(UserControllerProto.UserProfile.USER,
+ mUserProfileGroupIds.keyAt(i));
+ proto.write(UserControllerProto.UserProfile.PROFILE,
+ mUserProfileGroupIds.valueAt(i));
+ proto.end(uToken);
+ }
+ }
+ proto.end(token);
+ }
+ }
+
void dump(PrintWriter pw, boolean dumpAll) {
synchronized (mLock) {
pw.println(" mStartedUsers:");
@@ -1868,10 +1900,6 @@
pw.print(mUserLru.get(i));
}
pw.println("]");
- if (dumpAll) {
- pw.print(" mStartedUserArray: ");
- pw.println(Arrays.toString(mStartedUserArray));
- }
if (mUserProfileGroupIds.size() > 0) {
pw.println(" mUserProfileGroupIds:");
for (int i=0; i< mUserProfileGroupIds.size(); i++) {
diff --git a/services/core/java/com/android/server/am/UserState.java b/services/core/java/com/android/server/am/UserState.java
index d36d9cb..00597e2 100644
--- a/services/core/java/com/android/server/am/UserState.java
+++ b/services/core/java/com/android/server/am/UserState.java
@@ -24,8 +24,10 @@
import android.os.UserHandle;
import android.util.ArrayMap;
import android.util.Slog;
+import android.util.proto.ProtoOutputStream;
import com.android.internal.util.ProgressReporter;
+import com.android.server.am.proto.UserStateProto;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -112,10 +114,29 @@
}
}
+ public static int stateToProtoEnum(int state) {
+ switch (state) {
+ case STATE_BOOTING: return UserStateProto.STATE_BOOTING;
+ case STATE_RUNNING_LOCKED: return UserStateProto.STATE_RUNNING_LOCKED;
+ case STATE_RUNNING_UNLOCKING: return UserStateProto.STATE_RUNNING_UNLOCKING;
+ case STATE_RUNNING_UNLOCKED: return UserStateProto.STATE_RUNNING_UNLOCKED;
+ case STATE_STOPPING: return UserStateProto.STATE_STOPPING;
+ case STATE_SHUTDOWN: return UserStateProto.STATE_SHUTDOWN;
+ default: return state;
+ }
+ }
+
void dump(String prefix, PrintWriter pw) {
pw.print(prefix);
pw.print("state="); pw.print(stateToString(state));
if (switching) pw.print(" SWITCHING");
pw.println();
}
+
+ void writeToProto(ProtoOutputStream proto, long fieldId) {
+ final long token = proto.start(fieldId);
+ proto.write(UserStateProto.STATE, stateToProtoEnum(state));
+ proto.write(UserStateProto.SWITCHING, switching);
+ proto.end(token);
+ }
}
diff --git a/services/core/java/com/android/server/am/VrController.java b/services/core/java/com/android/server/am/VrController.java
index feddfe3..d32db7e 100644
--- a/services/core/java/com/android/server/am/VrController.java
+++ b/services/core/java/com/android/server/am/VrController.java
@@ -20,7 +20,11 @@
import android.os.Process;
import android.service.vr.IPersistentVrStateCallbacks;
import android.util.Slog;
+import android.util.proto.ProtoOutputStream;
+import android.util.proto.ProtoUtils;
+
import com.android.server.LocalServices;
+import com.android.server.am.proto.ProcessesProto.VrControllerProto;
import com.android.server.vr.VrManagerInternal;
/**
@@ -49,6 +53,18 @@
private static final int FLAG_VR_MODE = 1;
private static final int FLAG_PERSISTENT_VR_MODE = 2;
+ // Keep the enum lists in sync
+ private static int[] ORIG_ENUMS = new int[] {
+ FLAG_NON_VR_MODE,
+ FLAG_VR_MODE,
+ FLAG_PERSISTENT_VR_MODE,
+ };
+ private static int[] PROTO_ENUMS = new int[] {
+ VrControllerProto.FLAG_NON_VR_MODE,
+ VrControllerProto.FLAG_VR_MODE,
+ VrControllerProto.FLAG_PERSISTENT_VR_MODE,
+ };
+
// Invariants maintained for mVrState
//
// Always true:
@@ -420,4 +436,12 @@
public String toString() {
return String.format("[VrState=0x%x,VrRenderThreadTid=%d]", mVrState, mVrRenderThreadTid);
}
+
+ void writeToProto(ProtoOutputStream proto, long fieldId) {
+ final long token = proto.start(fieldId);
+ ProtoUtils.writeBitWiseFlagsToProtoEnum(proto, VrControllerProto.VR_MODE,
+ mVrState, ORIG_ENUMS, PROTO_ENUMS);
+ proto.write(VrControllerProto.RENDER_THREAD_ID, mVrRenderThreadTid);
+ proto.end(token);
+ }
}
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index f4c99f5..f247de7 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -16,11 +16,6 @@
package com.android.server.audio;
-import com.android.server.audio.AudioServiceEvents.ForceUseEvent;
-import com.android.server.audio.AudioServiceEvents.PhoneStateEvent;
-import com.android.server.audio.AudioServiceEvents.VolumeEvent;
-import com.android.server.audio.AudioServiceEvents.WiredDevConnectEvent;
-
import static android.Manifest.permission.REMOTE_AUDIO_PLAYBACK;
import static android.media.AudioManager.RINGER_MODE_NORMAL;
import static android.media.AudioManager.RINGER_MODE_SILENT;
@@ -64,14 +59,14 @@
import android.media.AudioDevicePort;
import android.media.AudioFocusInfo;
import android.media.AudioFocusRequest;
-import android.media.AudioSystem;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioManagerInternal;
-import android.media.AudioPort;
import android.media.AudioPlaybackConfiguration;
+import android.media.AudioPort;
import android.media.AudioRecordingConfiguration;
import android.media.AudioRoutesInfo;
+import android.media.AudioSystem;
import android.media.IAudioFocusDispatcher;
import android.media.IAudioRoutesObserver;
import android.media.IAudioService;
@@ -80,12 +75,12 @@
import android.media.IRingtonePlayer;
import android.media.IVolumeController;
import android.media.MediaPlayer;
-import android.media.SoundPool;
-import android.media.VolumePolicy;
-import android.media.audiofx.AudioEffect;
import android.media.MediaPlayer.OnCompletionListener;
import android.media.MediaPlayer.OnErrorListener;
import android.media.PlayerBase;
+import android.media.SoundPool;
+import android.media.VolumePolicy;
+import android.media.audiofx.AudioEffect;
import android.media.audiopolicy.AudioMix;
import android.media.audiopolicy.AudioPolicy;
import android.media.audiopolicy.AudioPolicyConfig;
@@ -110,6 +105,7 @@
import android.os.Vibrator;
import android.provider.Settings;
import android.provider.Settings.System;
+import android.service.notification.ZenModeConfig;
import android.telecom.TelecomManager;
import android.text.TextUtils;
import android.util.AndroidRuntimeException;
@@ -129,16 +125,20 @@
import com.android.server.EventLogTags;
import com.android.server.LocalServices;
import com.android.server.SystemService;
+import com.android.server.audio.AudioServiceEvents.ForceUseEvent;
+import com.android.server.audio.AudioServiceEvents.PhoneStateEvent;
+import com.android.server.audio.AudioServiceEvents.VolumeEvent;
+import com.android.server.audio.AudioServiceEvents.WiredDevConnectEvent;
import com.android.server.pm.UserManagerService;
import org.xmlpull.v1.XmlPullParserException;
+import java.io.File;
import java.io.FileDescriptor;
import java.io.IOException;
import java.io.PrintWriter;
import java.lang.reflect.Field;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -771,7 +771,7 @@
// Register for device connection intent broadcasts.
IntentFilter intentFilter =
new IntentFilter(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED);
- intentFilter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED);
+ intentFilter.addAction(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED);
intentFilter.addAction(Intent.ACTION_DOCK_EVENT);
intentFilter.addAction(Intent.ACTION_SCREEN_ON);
intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
@@ -1329,8 +1329,20 @@
/** @see AudioManager#adjustVolume(int, int) */
public void adjustSuggestedStreamVolume(int direction, int suggestedStreamType, int flags,
String callingPackage, String caller) {
- adjustSuggestedStreamVolume(direction, suggestedStreamType, flags, callingPackage,
- caller, Binder.getCallingUid());
+ final IAudioPolicyCallback extVolCtlr;
+ synchronized (mExtVolumeControllerLock) {
+ extVolCtlr = mExtVolumeController;
+ }
+ if (extVolCtlr != null) {
+ try {
+ mExtVolumeController.notifyVolumeAdjust(direction);
+ } catch(RemoteException e) {
+ // nothing we can do about this. Do not log error, too much potential for spam
+ }
+ } else {
+ adjustSuggestedStreamVolume(direction, suggestedStreamType, flags, callingPackage,
+ caller, Binder.getCallingUid());
+ }
}
private void adjustSuggestedStreamVolume(int direction, int suggestedStreamType, int flags,
@@ -1853,10 +1865,12 @@
sendVolumeUpdate(streamType, oldIndex, index, flags);
}
- // No ringer affected streams can be changed in total silence mode except those that
- // will cause the device to exit total silence mode.
+ // No ringer affected streams can be changed in total silence mode or priority-only
+ // (with alarms/media toggled off) except those that will cause the device to exit
+ // the mode.
private boolean volumeAdjustmentAllowedByDnd(int streamTypeAlias, int flags) {
- if (mNm.getZenMode() == Settings.Global.ZEN_MODE_NO_INTERRUPTIONS
+ if ((mNm.getZenMode() == Settings.Global.ZEN_MODE_NO_INTERRUPTIONS
+ || mNm.getZenMode() == Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS)
&& isStreamMutedByRingerMode(streamTypeAlias)) {
if (!(((flags & AudioManager.FLAG_ALLOW_RINGER_MODES) != 0) ||
(streamTypeAlias == getUiSoundsStreamType()))) {
@@ -2381,11 +2395,30 @@
// Unmute stream if previously muted by ringer mode and ringer mode
// is RINGER_MODE_NORMAL or stream is not affected by ringer mode.
int numStreamTypes = AudioSystem.getNumStreamTypes();
+
+ if (mNm == null) {
+ mNm = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
+ }
+
+ // in priority only dnd, alarms and media streams can be muted when ringer is not muted
+ boolean isZenPriorityMode = mNm.getZenMode() ==
+ Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
+ NotificationManager.Policy zenPolicy = mNm.getNotificationPolicy();
+ boolean muteAlarms = isZenPriorityMode && ((zenPolicy.priorityCategories
+ & NotificationManager.Policy.PRIORITY_CATEGORY_ALARMS) == 0);
+ boolean muteMedia = isZenPriorityMode && ((zenPolicy.priorityCategories
+ & NotificationManager.Policy.PRIORITY_CATEGORY_MEDIA_SYSTEM_OTHER) == 0);
+
final boolean ringerModeMute = mRingerMode == AudioManager.RINGER_MODE_VIBRATE
|| mRingerMode == AudioManager.RINGER_MODE_SILENT;
+
for (int streamType = numStreamTypes - 1; streamType >= 0; streamType--) {
final boolean isMuted = isStreamMutedByRingerMode(streamType);
- final boolean shouldMute = ringerModeMute && isStreamAffectedByRingerMode(streamType);
+
+ final boolean shouldZenMute = (isAlarm(streamType) && muteAlarms)
+ || (isMedia(streamType) && muteMedia);
+ final boolean shouldMute = (shouldZenMute || ringerModeMute)
+ && isStreamAffectedByRingerMode(streamType);
if (isMuted == shouldMute) continue;
if (!shouldMute) {
// unmute
@@ -2421,6 +2454,19 @@
}
}
+ private boolean isAlarm(int streamType) {
+ return streamType == AudioSystem.STREAM_ALARM;
+ }
+
+ private boolean isNotificationOrRinger(int streamType) {
+ return streamType == AudioSystem.STREAM_NOTIFICATION
+ || streamType == AudioSystem.STREAM_RING;
+ }
+
+ private boolean isMedia(int streamType) {
+ return streamType == AudioSystem.STREAM_SYSTEM || streamType == AudioSystem.STREAM_MUSIC;
+ }
+
private void setRingerModeInt(int ringerMode, boolean persist) {
final boolean change;
synchronized(mSettingsLock) {
@@ -2967,14 +3013,28 @@
}
public void setBluetoothScoOnInt(boolean on, String eventSource) {
+ if (DEBUG_DEVICES) {
+ Log.d(TAG, "setBluetoothScoOnInt: " + on + " " + eventSource);
+ }
if (on) {
// do not accept SCO ON if SCO audio is not connected
- synchronized(mScoClients) {
- if ((mBluetoothHeadset != null) &&
- (mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
- != BluetoothHeadset.STATE_AUDIO_CONNECTED)) {
- mForcedUseForCommExt = AudioSystem.FORCE_BT_SCO;
- return;
+ synchronized (mScoClients) {
+ if (mBluetoothHeadset != null) {
+ if (mBluetoothHeadsetDevice == null) {
+ BluetoothDevice activeDevice = mBluetoothHeadset.getActiveDevice();
+ if (activeDevice != null) {
+ // setBtScoActiveDevice() might trigger resetBluetoothSco() which
+ // will call setBluetoothScoOnInt(false, "resetBluetoothSco")
+ setBtScoActiveDevice(activeDevice);
+ }
+ }
+ if (mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
+ != BluetoothHeadset.STATE_AUDIO_CONNECTED) {
+ mForcedUseForCommExt = AudioSystem.FORCE_BT_SCO;
+ Log.w(TAG, "setBluetoothScoOnInt(true) failed because "
+ + mBluetoothHeadsetDevice + " is not in audio connected mode");
+ return;
+ }
}
}
mForcedUseForComm = AudioSystem.FORCE_BT_SCO;
@@ -3362,24 +3422,23 @@
}
}
- void setBtScoDeviceConnectionState(BluetoothDevice btDevice, int state) {
+ private boolean handleBtScoActiveDeviceChange(BluetoothDevice btDevice, boolean isActive) {
if (btDevice == null) {
- return;
+ return true;
}
-
String address = btDevice.getAddress();
BluetoothClass btClass = btDevice.getBluetoothClass();
int outDevice = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO;
int inDevice = AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET;
if (btClass != null) {
switch (btClass.getDeviceClass()) {
- case BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET:
- case BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE:
- outDevice = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET;
- break;
- case BluetoothClass.Device.AUDIO_VIDEO_CAR_AUDIO:
- outDevice = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
- break;
+ case BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET:
+ case BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE:
+ outDevice = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET;
+ break;
+ case BluetoothClass.Device.AUDIO_VIDEO_CAR_AUDIO:
+ outDevice = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
+ break;
}
}
@@ -3387,34 +3446,33 @@
address = "";
}
- boolean connected = (state == BluetoothProfile.STATE_CONNECTED);
-
String btDeviceName = btDevice.getName();
- boolean success =
- handleDeviceConnection(connected, outDevice, address, btDeviceName) &&
- handleDeviceConnection(connected, inDevice, address, btDeviceName);
+ boolean result = handleDeviceConnection(isActive, outDevice, address, btDeviceName);
+ // handleDeviceConnection() && result to make sure the method get executed
+ result = handleDeviceConnection(isActive, inDevice, address, btDeviceName) && result;
+ return result;
+ }
- if (!success) {
- return;
+ void setBtScoActiveDevice(BluetoothDevice btDevice) {
+ if (DEBUG_DEVICES) {
+ Log.d(TAG, "setBtScoActiveDevice(" + btDevice + ")");
}
-
- /* When one BT headset is disconnected while another BT headset
- * is connected, don't mess with the headset device.
- */
- if ((state == BluetoothProfile.STATE_DISCONNECTED ||
- state == BluetoothProfile.STATE_DISCONNECTING) &&
- mBluetoothHeadset != null &&
- mBluetoothHeadset.getAudioState(btDevice) == BluetoothHeadset.STATE_AUDIO_CONNECTED) {
- Log.w(TAG, "SCO connected through another device, returning");
- return;
- }
-
synchronized (mScoClients) {
- if (connected) {
+ final BluetoothDevice previousActiveDevice = mBluetoothHeadsetDevice;
+ if (!Objects.equals(btDevice, previousActiveDevice)) {
+ if (!handleBtScoActiveDeviceChange(previousActiveDevice, false)) {
+ Log.w(TAG, "setBtScoActiveDevice() failed to remove previous device "
+ + previousActiveDevice);
+ }
+ if (!handleBtScoActiveDeviceChange(btDevice, true)) {
+ Log.e(TAG, "setBtScoActiveDevice() failed to add new device " + btDevice);
+ // set mBluetoothHeadsetDevice to null when failing to add new device
+ btDevice = null;
+ }
mBluetoothHeadsetDevice = btDevice;
- } else {
- mBluetoothHeadsetDevice = null;
- resetBluetoothSco();
+ if (mBluetoothHeadsetDevice == null) {
+ resetBluetoothSco();
+ }
}
}
}
@@ -3469,12 +3527,7 @@
// Discard timeout message
mAudioHandler.removeMessages(MSG_BT_HEADSET_CNCT_FAILED);
mBluetoothHeadset = (BluetoothHeadset) proxy;
- deviceList = mBluetoothHeadset.getConnectedDevices();
- if (deviceList.size() > 0) {
- mBluetoothHeadsetDevice = deviceList.get(0);
- } else {
- mBluetoothHeadsetDevice = null;
- }
+ setBtScoActiveDevice(mBluetoothHeadset.getActiveDevice());
// Refresh SCO audio state
checkScoAudioState();
// Continue pending action if any
@@ -3595,10 +3648,7 @@
void disconnectHeadset() {
synchronized (mScoClients) {
- if (mBluetoothHeadsetDevice != null) {
- setBtScoDeviceConnectionState(mBluetoothHeadsetDevice,
- BluetoothProfile.STATE_DISCONNECTED);
- }
+ setBtScoActiveDevice(null);
mBluetoothHeadset = null;
}
}
@@ -4764,6 +4814,16 @@
Settings.Global.putInt(mContentResolver, Settings.Global.MODE_RINGER, ringerMode);
}
+ private String getSoundEffectFilePath(int effectType) {
+ String filePath = Environment.getProductDirectory() + SOUND_EFFECTS_PATH
+ + SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effectType][0]);
+ if (!new File(filePath).isFile()) {
+ filePath = Environment.getRootDirectory() + SOUND_EFFECTS_PATH
+ + SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effectType][0]);
+ }
+ return filePath;
+ }
+
private boolean onLoadSoundEffects() {
int status;
@@ -4833,9 +4893,7 @@
continue;
}
if (poolId[SOUND_EFFECT_FILES_MAP[effect][0]] == -1) {
- String filePath = Environment.getRootDirectory()
- + SOUND_EFFECTS_PATH
- + SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effect][0]);
+ String filePath = getSoundEffectFilePath(effect);
int sampleId = mSoundPool.load(filePath, 0);
if (sampleId <= 0) {
Log.w(TAG, "Soundpool could not load file: "+filePath);
@@ -4941,8 +4999,7 @@
} else {
MediaPlayer mediaPlayer = new MediaPlayer();
try {
- String filePath = Environment.getRootDirectory() + SOUND_EFFECTS_PATH +
- SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effectType][0]);
+ String filePath = getSoundEffectFilePath(effectType);
mediaPlayer.setDataSource(filePath);
mediaPlayer.setAudioStreamType(AudioSystem.STREAM_SYSTEM);
mediaPlayer.prepare();
@@ -5788,11 +5845,9 @@
AudioSystem.setForceUse(AudioSystem.FOR_DOCK, config);
}
mDockState = dockState;
- } else if (action.equals(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED)) {
- state = intent.getIntExtra(BluetoothProfile.EXTRA_STATE,
- BluetoothProfile.STATE_DISCONNECTED);
+ } else if (action.equals(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED)) {
BluetoothDevice btDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
- setBtScoDeviceConnectionState(btDevice, state);
+ setBtScoActiveDevice(btDevice);
} else if (action.equals(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED)) {
boolean broadcast = false;
int scoAudioState = AudioManager.SCO_AUDIO_STATE_ERROR;
@@ -6634,7 +6689,19 @@
// Inform AudioFlinger of our device's low RAM attribute
private static void readAndSetLowRamDevice()
{
- int status = AudioSystem.setLowRamDevice(ActivityManager.isLowRamDeviceStatic());
+ boolean isLowRamDevice = ActivityManager.isLowRamDeviceStatic();
+ long totalMemory = 1024 * 1024 * 1024; // 1GB is the default if ActivityManager fails.
+
+ try {
+ final ActivityManager.MemoryInfo info = new ActivityManager.MemoryInfo();
+ ActivityManager.getService().getMemoryInfo(info);
+ totalMemory = info.totalMem;
+ } catch (RemoteException e) {
+ Log.w(TAG, "Cannot obtain MemoryInfo from ActivityManager, assume low memory device");
+ isLowRamDevice = true;
+ }
+
+ final int status = AudioSystem.setLowRamDevice(isLowRamDevice, totalMemory);
if (status != 0) {
Log.w(TAG, "AudioFlinger informed of device's low RAM attribute; status " + status);
}
@@ -6909,7 +6976,7 @@
// Audio policy management
//==========================================================================================
public String registerAudioPolicy(AudioPolicyConfig policyConfig, IAudioPolicyCallback pcb,
- boolean hasFocusListener, boolean isFocusPolicy) {
+ boolean hasFocusListener, boolean isFocusPolicy, boolean isVolumeController) {
AudioSystem.setDynamicPolicyCallback(mDynPolicyCallback);
if (DEBUG_AP) Log.d(TAG, "registerAudioPolicy for " + pcb.asBinder()
@@ -6932,7 +6999,7 @@
return null;
}
AudioPolicyProxy app = new AudioPolicyProxy(policyConfig, pcb, hasFocusListener,
- isFocusPolicy);
+ isFocusPolicy, isVolumeController);
pcb.asBinder().linkToDeath(app, 0/*flags*/);
regId = app.getRegistrationId();
mAudioPolicies.put(pcb.asBinder(), app);
@@ -6998,6 +7065,23 @@
return AudioManager.SUCCESS;
}
+ private final Object mExtVolumeControllerLock = new Object();
+ private IAudioPolicyCallback mExtVolumeController;
+ private void setExtVolumeController(IAudioPolicyCallback apc) {
+ if (!mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_handleVolumeKeysInWindowManager)) {
+ Log.e(TAG, "Cannot set external volume controller: device not set for volume keys" +
+ " handled in PhoneWindowManager");
+ return;
+ }
+ synchronized (mExtVolumeControllerLock) {
+ if (mExtVolumeController != null && !mExtVolumeController.asBinder().pingBinder()) {
+ Log.e(TAG, "Cannot set external volume controller: existing controller");
+ }
+ mExtVolumeController = apc;
+ }
+ }
+
private void dumpAudioPolicies(PrintWriter pw) {
pw.println("\nAudio policies:");
synchronized (mAudioPolicies) {
@@ -7130,8 +7214,9 @@
*/
public class AudioPolicyProxy extends AudioPolicyConfig implements IBinder.DeathRecipient {
private static final String TAG = "AudioPolicyProxy";
- IAudioPolicyCallback mPolicyCallback;
- boolean mHasFocusListener;
+ final IAudioPolicyCallback mPolicyCallback;
+ final boolean mHasFocusListener;
+ final boolean mIsVolumeController;
/**
* Audio focus ducking behavior for an audio policy.
* This variable reflects the value that was successfully set in
@@ -7143,11 +7228,12 @@
boolean mIsFocusPolicy = false;
AudioPolicyProxy(AudioPolicyConfig config, IAudioPolicyCallback token,
- boolean hasFocusListener, boolean isFocusPolicy) {
+ boolean hasFocusListener, boolean isFocusPolicy, boolean isVolumeController) {
super(config);
setRegistration(new String(config.hashCode() + ":ap:" + mAudioPolicyCounter++));
mPolicyCallback = token;
mHasFocusListener = hasFocusListener;
+ mIsVolumeController = isVolumeController;
if (mHasFocusListener) {
mMediaFocusControl.addFocusFollower(mPolicyCallback);
// can only ever be true if there is a focus listener
@@ -7156,6 +7242,9 @@
mMediaFocusControl.setFocusPolicy(mPolicyCallback);
}
}
+ if (mIsVolumeController) {
+ setExtVolumeController(mPolicyCallback);
+ }
connectMixes();
}
@@ -7165,6 +7254,11 @@
release();
mAudioPolicies.remove(mPolicyCallback.asBinder());
}
+ if (mIsVolumeController) {
+ synchronized (mExtVolumeControllerLock) {
+ mExtVolumeController = null;
+ }
+ }
}
String getRegistrationId() {
diff --git a/services/core/java/com/android/server/broadcastradio/BroadcastRadioService.java b/services/core/java/com/android/server/broadcastradio/BroadcastRadioService.java
index 10e6cad..4289a25 100644
--- a/services/core/java/com/android/server/broadcastradio/BroadcastRadioService.java
+++ b/services/core/java/com/android/server/broadcastradio/BroadcastRadioService.java
@@ -20,6 +20,8 @@
import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
+import android.hardware.radio.IAnnouncementListener;
+import android.hardware.radio.ICloseHandle;
import android.hardware.radio.IRadioService;
import android.hardware.radio.ITuner;
import android.hardware.radio.ITunerCallback;
@@ -28,14 +30,18 @@
import android.os.RemoteException;
import android.util.Slog;
+import com.android.internal.util.Preconditions;
import com.android.server.SystemService;
+import com.android.server.broadcastradio.hal2.AnnouncementAggregator;
+import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.OptionalInt;
public class BroadcastRadioService extends SystemService {
private static final String TAG = "BcRadioSrv";
+ private static final boolean DEBUG = false;
private final ServiceImpl mServiceImpl = new ServiceImpl();
@@ -88,7 +94,7 @@
@Override
public ITuner openTuner(int moduleId, RadioManager.BandConfig bandConfig,
boolean withAudio, ITunerCallback callback) throws RemoteException {
- Slog.i(TAG, "openTuner(" + moduleId + ", _, " + withAudio + ", _)");
+ if (DEBUG) Slog.i(TAG, "Opening module " + moduleId);
enforcePolicyAccess();
if (callback == null) {
throw new IllegalArgumentException("Callback must not be empty");
@@ -101,5 +107,25 @@
}
}
}
+
+ @Override
+ public ICloseHandle addAnnouncementListener(int[] enabledTypes,
+ IAnnouncementListener listener) {
+ if (DEBUG) {
+ Slog.i(TAG, "Adding announcement listener for " + Arrays.toString(enabledTypes));
+ }
+ Objects.requireNonNull(enabledTypes);
+ Objects.requireNonNull(listener);
+ enforcePolicyAccess();
+
+ synchronized (mLock) {
+ if (!mHal2.hasAnyModules()) {
+ Slog.i(TAG, "There are no HAL 2.x modules registered");
+ return new AnnouncementAggregator(listener);
+ }
+
+ return mHal2.addAnnouncementListener(enabledTypes, listener);
+ }
+ }
}
}
diff --git a/services/core/java/com/android/server/broadcastradio/hal1/Tuner.java b/services/core/java/com/android/server/broadcastradio/hal1/Tuner.java
index f9b35f5..e77cb7a 100644
--- a/services/core/java/com/android/server/broadcastradio/hal1/Tuner.java
+++ b/services/core/java/com/android/server/broadcastradio/hal1/Tuner.java
@@ -48,7 +48,7 @@
private boolean mIsClosed = false;
private boolean mIsMuted = false;
- private int mRegion; // TODO(b/62710330): find better solution to handle regions
+ private int mRegion;
private final boolean mWithAudio;
Tuner(@NonNull ITunerCallback clientCallback, int halRev,
@@ -89,7 +89,6 @@
private native void nativeCancelAnnouncement(long nativeContext);
- private native RadioManager.ProgramInfo nativeGetProgramInformation(long nativeContext);
private native boolean nativeStartBackgroundScan(long nativeContext);
private native List<RadioManager.ProgramInfo> nativeGetProgramList(long nativeContext,
Map<String, String> vendorFilter);
@@ -103,8 +102,6 @@
Map<String, String> parameters);
private native Map<String, String> nativeGetParameters(long nativeContext, List<String> keys);
- private native boolean nativeIsAntennaConnected(long nativeContext);
-
@Override
public void close() {
synchronized (mLock) {
@@ -218,14 +215,6 @@
}
@Override
- public RadioManager.ProgramInfo getProgramInformation() {
- synchronized (mLock) {
- checkNotClosedLocked();
- return nativeGetProgramInformation(mNativeContext);
- }
- }
-
- @Override
public Bitmap getImage(int id) {
if (id == 0) {
throw new IllegalArgumentException("Image ID is missing");
@@ -324,12 +313,4 @@
if (results == null) return Collections.emptyMap();
return results;
}
-
- @Override
- public boolean isAntennaConnected() {
- synchronized (mLock) {
- checkNotClosedLocked();
- return nativeIsAntennaConnected(mNativeContext);
- }
- }
}
diff --git a/services/core/java/com/android/server/broadcastradio/hal1/TunerCallback.java b/services/core/java/com/android/server/broadcastradio/hal1/TunerCallback.java
index 18f56ed..04c0e57 100644
--- a/services/core/java/com/android/server/broadcastradio/hal1/TunerCallback.java
+++ b/services/core/java/com/android/server/broadcastradio/hal1/TunerCallback.java
@@ -20,6 +20,7 @@
import android.hardware.radio.ITuner;
import android.hardware.radio.ITunerCallback;
import android.hardware.radio.ProgramList;
+import android.hardware.radio.ProgramSelector;
import android.hardware.radio.RadioManager;
import android.hardware.radio.RadioMetadata;
import android.hardware.radio.RadioTuner;
@@ -100,6 +101,11 @@
}
@Override
+ public void onTuneFailed(int result, ProgramSelector selector) {
+ Slog.e(TAG, "Not applicable for HAL 1.x");
+ }
+
+ @Override
public void onConfigurationChanged(RadioManager.BandConfig config) {
dispatch(() -> mClientCallback.onConfigurationChanged(config));
}
diff --git a/services/core/java/com/android/server/broadcastradio/hal2/AnnouncementAggregator.java b/services/core/java/com/android/server/broadcastradio/hal2/AnnouncementAggregator.java
new file mode 100644
index 0000000..0bbaf25
--- /dev/null
+++ b/services/core/java/com/android/server/broadcastradio/hal2/AnnouncementAggregator.java
@@ -0,0 +1,128 @@
+/**
+ * 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.broadcastradio.hal2;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.hardware.radio.Announcement;
+import android.hardware.radio.IAnnouncementListener;
+import android.hardware.radio.ICloseHandle;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.util.Slog;
+
+import com.android.internal.annotations.GuardedBy;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+
+public class AnnouncementAggregator extends ICloseHandle.Stub {
+ private static final String TAG = "BcRadio2Srv.AnnAggr";
+
+ private final Object mLock = new Object();
+ @NonNull private final IAnnouncementListener mListener;
+ private final IBinder.DeathRecipient mDeathRecipient = new DeathRecipient();
+
+ @GuardedBy("mLock")
+ private final Collection<ModuleWatcher> mModuleWatchers = new ArrayList<>();
+
+ @GuardedBy("mLock")
+ private boolean mIsClosed = false;
+
+ public AnnouncementAggregator(@NonNull IAnnouncementListener listener) {
+ mListener = Objects.requireNonNull(listener);
+ try {
+ listener.asBinder().linkToDeath(mDeathRecipient, 0);
+ } catch (RemoteException ex) {
+ ex.rethrowFromSystemServer();
+ }
+ }
+
+ private class ModuleWatcher extends IAnnouncementListener.Stub {
+ private @Nullable ICloseHandle mCloseHandle;
+ public @NonNull List<Announcement> currentList = new ArrayList<>();
+
+ public void onListUpdated(List<Announcement> active) {
+ currentList = Objects.requireNonNull(active);
+ AnnouncementAggregator.this.onListUpdated();
+ }
+
+ public void setCloseHandle(@NonNull ICloseHandle closeHandle) {
+ mCloseHandle = Objects.requireNonNull(closeHandle);
+ }
+
+ public void close() throws RemoteException {
+ if (mCloseHandle != null) mCloseHandle.close();
+ }
+ }
+
+ private class DeathRecipient implements IBinder.DeathRecipient {
+ public void binderDied() {
+ try {
+ close();
+ } catch (RemoteException ex) {}
+ }
+ }
+
+ private void onListUpdated() {
+ synchronized (mLock) {
+ if (mIsClosed) {
+ Slog.e(TAG, "Announcement aggregator is closed, it shouldn't receive callbacks");
+ return;
+ }
+ List<Announcement> combined = new ArrayList<>();
+ for (ModuleWatcher watcher : mModuleWatchers) {
+ combined.addAll(watcher.currentList);
+ }
+ TunerCallback.dispatch(() -> mListener.onListUpdated(combined));
+ }
+ }
+
+ public void watchModule(@NonNull RadioModule module, @NonNull int[] enabledTypes) {
+ synchronized (mLock) {
+ if (mIsClosed) throw new IllegalStateException();
+
+ ModuleWatcher watcher = new ModuleWatcher();
+ ICloseHandle closeHandle;
+ try {
+ closeHandle = module.addAnnouncementListener(enabledTypes, watcher);
+ } catch (RemoteException ex) {
+ Slog.e(TAG, "Failed to add announcement listener", ex);
+ return;
+ }
+ watcher.setCloseHandle(closeHandle);
+ mModuleWatchers.add(watcher);
+ }
+ }
+
+ @Override
+ public void close() throws RemoteException {
+ synchronized (mLock) {
+ if (mIsClosed) return;
+ mIsClosed = true;
+
+ mListener.asBinder().unlinkToDeath(mDeathRecipient, 0);
+
+ for (ModuleWatcher watcher : mModuleWatchers) {
+ watcher.close();
+ }
+ mModuleWatchers.clear();
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/broadcastradio/hal2/BroadcastRadioService.java b/services/core/java/com/android/server/broadcastradio/hal2/BroadcastRadioService.java
index fc9a5d6..406231a 100644
--- a/services/core/java/com/android/server/broadcastradio/hal2/BroadcastRadioService.java
+++ b/services/core/java/com/android/server/broadcastradio/hal2/BroadcastRadioService.java
@@ -18,6 +18,8 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.hardware.radio.IAnnouncementListener;
+import android.hardware.radio.ICloseHandle;
import android.hardware.radio.ITuner;
import android.hardware.radio.ITunerCallback;
import android.hardware.radio.RadioManager;
@@ -81,6 +83,10 @@
return mModules.containsKey(id);
}
+ public boolean hasAnyModules() {
+ return !mModules.isEmpty();
+ }
+
public ITuner openSession(int moduleId, @Nullable RadioManager.BandConfig legacyConfig,
boolean withAudio, @NonNull ITunerCallback callback) throws RemoteException {
Objects.requireNonNull(callback);
@@ -98,4 +104,22 @@
session.setConfiguration(legacyConfig);
return session;
}
+
+ public ICloseHandle addAnnouncementListener(@NonNull int[] enabledTypes,
+ @NonNull IAnnouncementListener listener) {
+ AnnouncementAggregator aggregator = new AnnouncementAggregator(listener);
+ boolean anySupported = false;
+ for (RadioModule module : mModules.values()) {
+ try {
+ aggregator.watchModule(module, enabledTypes);
+ anySupported = true;
+ } catch (UnsupportedOperationException ex) {
+ Slog.v(TAG, "Announcements not supported for this module", ex);
+ }
+ }
+ if (!anySupported) {
+ Slog.i(TAG, "There are no HAL modules that support announcements");
+ }
+ return aggregator;
+ }
}
diff --git a/services/core/java/com/android/server/broadcastradio/hal2/Convert.java b/services/core/java/com/android/server/broadcastradio/hal2/Convert.java
index 60a927c..3bb3d1f 100644
--- a/services/core/java/com/android/server/broadcastradio/hal2/Convert.java
+++ b/services/core/java/com/android/server/broadcastradio/hal2/Convert.java
@@ -20,6 +20,8 @@
import android.annotation.Nullable;
import android.hardware.broadcastradio.V2_0.AmFmBandRange;
import android.hardware.broadcastradio.V2_0.AmFmRegionConfig;
+import android.hardware.broadcastradio.V2_0.Announcement;
+import android.hardware.broadcastradio.V2_0.IdentifierType;
import android.hardware.broadcastradio.V2_0.ProgramFilter;
import android.hardware.broadcastradio.V2_0.ProgramIdentifier;
import android.hardware.broadcastradio.V2_0.ProgramInfo;
@@ -36,6 +38,7 @@
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -70,7 +73,26 @@
}
}
- private static @NonNull Map<String, String>
+ static @NonNull ArrayList<VendorKeyValue>
+ vendorInfoToHal(@Nullable Map<String, String> info) {
+ if (info == null) return new ArrayList<>();
+
+ ArrayList<VendorKeyValue> list = new ArrayList<>();
+ for (Map.Entry<String, String> entry : info.entrySet()) {
+ VendorKeyValue elem = new VendorKeyValue();
+ elem.key = entry.getKey();
+ elem.value = entry.getValue();
+ if (elem.key == null || elem.value == null) {
+ Slog.w(TAG, "VendorKeyValue contains null pointers");
+ continue;
+ }
+ list.add(elem);
+ }
+
+ return list;
+ }
+
+ static @NonNull Map<String, String>
vendorInfoFromHal(@Nullable List<VendorKeyValue> info) {
if (info == null) return Collections.emptyMap();
@@ -203,46 +225,70 @@
false, // isCaptureSupported
amfmConfigToBands(amfmConfig),
- false, // isBgScanSupported is deprecated
+ true, // isBgScanSupported is deprecated
supportedProgramTypes,
supportedIdentifierTypes,
vendorInfoFromHal(prop.vendorInfo)
);
}
+ static void programIdentifierToHal(@NonNull ProgramIdentifier hwId,
+ @NonNull ProgramSelector.Identifier id) {
+ hwId.type = id.getType();
+ hwId.value = id.getValue();
+ }
+
static @NonNull ProgramIdentifier programIdentifierToHal(
@NonNull ProgramSelector.Identifier id) {
ProgramIdentifier hwId = new ProgramIdentifier();
- hwId.type = id.getType();
- hwId.value = id.getValue();
+ programIdentifierToHal(hwId, id);
return hwId;
}
- static @NonNull ProgramSelector.Identifier programIdentifierFromHal(@NonNull ProgramIdentifier id) {
+ static @Nullable ProgramSelector.Identifier programIdentifierFromHal(
+ @NonNull ProgramIdentifier id) {
+ if (id.type == IdentifierType.INVALID) return null;
return new ProgramSelector.Identifier(id.type, id.value);
}
+ static @NonNull android.hardware.broadcastradio.V2_0.ProgramSelector programSelectorToHal(
+ @NonNull ProgramSelector sel) {
+ android.hardware.broadcastradio.V2_0.ProgramSelector hwSel =
+ new android.hardware.broadcastradio.V2_0.ProgramSelector();
+
+ programIdentifierToHal(hwSel.primaryId, sel.getPrimaryId());
+ Arrays.stream(sel.getSecondaryIds()).map(Convert::programIdentifierToHal).
+ forEachOrdered(hwSel.secondaryIds::add);
+
+ return hwSel;
+ }
+
static @NonNull ProgramSelector programSelectorFromHal(
@NonNull android.hardware.broadcastradio.V2_0.ProgramSelector sel) {
- ProgramSelector.Identifier[] secondaryIds = sel.secondaryIds.stream().map(
- id -> programIdentifierFromHal(id)).toArray(ProgramSelector.Identifier[]::new);
+ ProgramSelector.Identifier[] secondaryIds = sel.secondaryIds.stream().
+ map(Convert::programIdentifierFromHal).map(Objects::requireNonNull).
+ toArray(ProgramSelector.Identifier[]::new);
return new ProgramSelector(
- identifierTypeToProgramType(sel.primaryId.type),
- programIdentifierFromHal(sel.primaryId),
- secondaryIds, null);
+ identifierTypeToProgramType(sel.primaryId.type),
+ Objects.requireNonNull(programIdentifierFromHal(sel.primaryId)),
+ secondaryIds, null);
}
static @NonNull RadioManager.ProgramInfo programInfoFromHal(@NonNull ProgramInfo info) {
+ Collection<ProgramSelector.Identifier> relatedContent = info.relatedContent.stream().
+ map(id -> Objects.requireNonNull(programIdentifierFromHal(id))).
+ collect(Collectors.toList());
+
return new RadioManager.ProgramInfo(
- programSelectorFromHal(info.selector),
- (info.infoFlags & ProgramInfoFlags.TUNED) != 0,
- (info.infoFlags & ProgramInfoFlags.STEREO) != 0,
- false, // TODO(b/69860743): digital
- info.signalQuality,
- null, // TODO(b/69860743): metadata
- info.infoFlags,
- vendorInfoFromHal(info.vendorInfo)
+ programSelectorFromHal(info.selector),
+ programIdentifierFromHal(info.logicallyTunedTo),
+ programIdentifierFromHal(info.physicallyTunedTo),
+ relatedContent,
+ info.infoFlags,
+ info.signalQuality,
+ null, // TODO(b/69860743): metadata
+ vendorInfoFromHal(info.vendorInfo)
);
}
@@ -259,11 +305,27 @@
}
static @NonNull ProgramList.Chunk programListChunkFromHal(@NonNull ProgramListChunk chunk) {
- Set<RadioManager.ProgramInfo> modified = chunk.modified.stream().map(
- info -> programInfoFromHal(info)).collect(Collectors.toSet());
- Set<ProgramSelector.Identifier> removed = chunk.removed.stream().map(
- id -> programIdentifierFromHal(id)).collect(Collectors.toSet());
+ Set<RadioManager.ProgramInfo> modified = chunk.modified.stream().
+ map(info -> programInfoFromHal(info)).collect(Collectors.toSet());
+ Set<ProgramSelector.Identifier> removed = chunk.removed.stream().
+ map(id -> Objects.requireNonNull(programIdentifierFromHal(id))).
+ collect(Collectors.toSet());
return new ProgramList.Chunk(chunk.purge, chunk.complete, modified, removed);
}
+
+ public static @NonNull android.hardware.radio.Announcement announcementFromHal(
+ @NonNull Announcement hwAnnouncement) {
+ return new android.hardware.radio.Announcement(
+ programSelectorFromHal(hwAnnouncement.selector),
+ hwAnnouncement.type,
+ vendorInfoFromHal(hwAnnouncement.vendorInfo)
+ );
+ }
+
+ static <T> @Nullable ArrayList<T> listToArrayList(@Nullable List<T> list) {
+ if (list == null) return null;
+ if (list instanceof ArrayList) return (ArrayList) list;
+ return new ArrayList<>(list);
+ }
}
diff --git a/services/core/java/com/android/server/broadcastradio/hal2/RadioModule.java b/services/core/java/com/android/server/broadcastradio/hal2/RadioModule.java
index c8e15c1..50f032d 100644
--- a/services/core/java/com/android/server/broadcastradio/hal2/RadioModule.java
+++ b/services/core/java/com/android/server/broadcastradio/hal2/RadioModule.java
@@ -18,10 +18,15 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
import android.hardware.radio.ITuner;
import android.hardware.radio.RadioManager;
import android.hardware.broadcastradio.V2_0.AmFmRegionConfig;
+import android.hardware.broadcastradio.V2_0.Announcement;
+import android.hardware.broadcastradio.V2_0.IAnnouncementListener;
import android.hardware.broadcastradio.V2_0.IBroadcastRadio;
+import android.hardware.broadcastradio.V2_0.ICloseHandle;
import android.hardware.broadcastradio.V2_0.ITunerSession;
import android.hardware.broadcastradio.V2_0.Result;
import android.os.ParcelableException;
@@ -29,7 +34,11 @@
import android.util.MutableInt;
import android.util.Slog;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
class RadioModule {
private static final String TAG = "BcRadio2Srv.module";
@@ -69,14 +78,69 @@
Mutable<ITunerSession> hwSession = new Mutable<>();
MutableInt halResult = new MutableInt(Result.UNKNOWN_ERROR);
- mService.openSession(cb, (int result, ITunerSession session) -> {
- hwSession.value = session;
- halResult.value = result;
- });
+ synchronized (mService) {
+ mService.openSession(cb, (result, session) -> {
+ hwSession.value = session;
+ halResult.value = result;
+ });
+ }
Convert.throwOnError("openSession", halResult.value);
Objects.requireNonNull(hwSession.value);
- return new TunerSession(hwSession.value, cb);
+ return new TunerSession(this, hwSession.value, cb);
+ }
+
+ public android.hardware.radio.ICloseHandle addAnnouncementListener(@NonNull int[] enabledTypes,
+ @NonNull android.hardware.radio.IAnnouncementListener listener) throws RemoteException {
+ ArrayList<Byte> enabledList = new ArrayList<>();
+ for (int type : enabledTypes) {
+ enabledList.add((byte)type);
+ }
+
+ MutableInt halResult = new MutableInt(Result.UNKNOWN_ERROR);
+ Mutable<ICloseHandle> hwCloseHandle = new Mutable<>();
+ IAnnouncementListener hwListener = new IAnnouncementListener.Stub() {
+ public void onListUpdated(ArrayList<Announcement> hwAnnouncements)
+ throws RemoteException {
+ listener.onListUpdated(hwAnnouncements.stream().
+ map(a -> Convert.announcementFromHal(a)).collect(Collectors.toList()));
+ }
+ };
+
+ synchronized (mService) {
+ mService.registerAnnouncementListener(enabledList, hwListener, (result, closeHnd) -> {
+ halResult.value = result;
+ hwCloseHandle.value = closeHnd;
+ });
+ }
+ Convert.throwOnError("addAnnouncementListener", halResult.value);
+
+ return new android.hardware.radio.ICloseHandle.Stub() {
+ public void close() {
+ try {
+ hwCloseHandle.value.close();
+ } catch (RemoteException ex) {
+ Slog.e(TAG, "Failed closing announcement listener", ex);
+ }
+ }
+ };
+ }
+
+ Bitmap getImage(int id) {
+ if (id == 0) throw new IllegalArgumentException("Image ID is missing");
+
+ byte[] rawImage;
+ synchronized (mService) {
+ List<Byte> rawList = Utils.maybeRethrow(() -> mService.getImage(id));
+ rawImage = new byte[rawList.size()];
+ for (int i = 0; i < rawList.size(); i++) {
+ rawImage[i] = rawList.get(i);
+ }
+ }
+
+ if (rawImage == null || rawImage.length == 0) return null;
+
+ return BitmapFactory.decodeByteArray(rawImage, 0, rawImage.length);
}
}
diff --git a/services/core/java/com/android/server/broadcastradio/hal2/TunerCallback.java b/services/core/java/com/android/server/broadcastradio/hal2/TunerCallback.java
index ed2a1b3..3c4b49c 100644
--- a/services/core/java/com/android/server/broadcastradio/hal2/TunerCallback.java
+++ b/services/core/java/com/android/server/broadcastradio/hal2/TunerCallback.java
@@ -50,10 +50,14 @@
}
@Override
- public void onTuneFailed(int result, ProgramSelector selector) {}
+ public void onTuneFailed(int result, ProgramSelector selector) {
+ dispatch(() -> mClientCb.onTuneFailed(result, Convert.programSelectorFromHal(selector)));
+ }
@Override
- public void onCurrentProgramInfoChanged(ProgramInfo info) {}
+ public void onCurrentProgramInfoChanged(ProgramInfo info) {
+ dispatch(() -> mClientCb.onCurrentProgramInfoChanged(Convert.programInfoFromHal(info)));
+ }
@Override
public void onProgramListUpdated(ProgramListChunk chunk) {
@@ -61,8 +65,12 @@
}
@Override
- public void onAntennaStateChange(boolean connected) {}
+ public void onAntennaStateChange(boolean connected) {
+ dispatch(() -> mClientCb.onAntennaState(connected));
+ }
@Override
- public void onParametersUpdated(ArrayList<VendorKeyValue> parameters) {}
+ public void onParametersUpdated(ArrayList<VendorKeyValue> parameters) {
+ dispatch(() -> mClientCb.onParametersUpdated(Convert.vendorInfoFromHal(parameters)));
+ }
}
diff --git a/services/core/java/com/android/server/broadcastradio/hal2/TunerSession.java b/services/core/java/com/android/server/broadcastradio/hal2/TunerSession.java
index 1ae7d20..8efaa2a 100644
--- a/services/core/java/com/android/server/broadcastradio/hal2/TunerSession.java
+++ b/services/core/java/com/android/server/broadcastradio/hal2/TunerSession.java
@@ -41,6 +41,7 @@
private final Object mLock = new Object();
+ private final RadioModule mModule;
private final ITunerSession mHwSession;
private final TunerCallback mCallback;
private boolean mIsClosed = false;
@@ -50,7 +51,9 @@
// necessary only for older APIs compatibility
private RadioManager.BandConfig mDummyConfig = null;
- TunerSession(@NonNull ITunerSession hwSession, @NonNull TunerCallback callback) {
+ TunerSession(@NonNull RadioModule module, @NonNull ITunerSession hwSession,
+ @NonNull TunerCallback callback) {
+ mModule = Objects.requireNonNull(module);
mHwSession = Objects.requireNonNull(hwSession);
mCallback = Objects.requireNonNull(callback);
notifyAudioServiceLocked(true);
@@ -128,23 +131,29 @@
}
@Override
- public void step(boolean directionDown, boolean skipSubChannel) {
+ public void step(boolean directionDown, boolean skipSubChannel) throws RemoteException {
synchronized (mLock) {
checkNotClosedLocked();
+ int halResult = mHwSession.step(!directionDown);
+ Convert.throwOnError("step", halResult);
}
}
@Override
- public void scan(boolean directionDown, boolean skipSubChannel) {
+ public void scan(boolean directionDown, boolean skipSubChannel) throws RemoteException {
synchronized (mLock) {
checkNotClosedLocked();
+ int halResult = mHwSession.scan(!directionDown, skipSubChannel);
+ Convert.throwOnError("step", halResult);
}
}
@Override
- public void tune(ProgramSelector selector) {
+ public void tune(ProgramSelector selector) throws RemoteException {
synchronized (mLock) {
checkNotClosedLocked();
+ int halResult = mHwSession.tune(Convert.programSelectorToHal(selector));
+ Convert.throwOnError("tune", halResult);
}
}
@@ -152,36 +161,25 @@
public void cancel() {
synchronized (mLock) {
checkNotClosedLocked();
+ Utils.maybeRethrow(mHwSession::cancel);
}
}
@Override
public void cancelAnnouncement() {
- synchronized (mLock) {
- checkNotClosedLocked();
- }
- }
-
- @Override
- public RadioManager.ProgramInfo getProgramInformation() {
- synchronized (mLock) {
- checkNotClosedLocked();
- return null;
- }
+ Slog.i(TAG, "Announcements control doesn't involve cancelling at the HAL level in 2.x");
}
@Override
public Bitmap getImage(int id) {
- synchronized (mLock) {
- checkNotClosedLocked();
- return null;
- }
+ return mModule.getImage(id);
}
@Override
public boolean startBackgroundScan() {
Slog.i(TAG, "Explicit background scan trigger is not supported with HAL 2.x");
- return false;
+ TunerCallback.dispatch(() -> mCallback.mClientCb.onBackgroundScanComplete());
+ return true;
}
@Override
@@ -240,7 +238,6 @@
Slog.v(TAG, "setConfigFlag " + ConfigFlag.toString(flag) + " = " + value);
synchronized (mLock) {
checkNotClosedLocked();
-
int halResult = mHwSession.setConfigFlag(flag, value);
Convert.throwOnError("setConfigFlag", halResult);
}
@@ -250,7 +247,8 @@
public Map setParameters(Map parameters) {
synchronized (mLock) {
checkNotClosedLocked();
- return null;
+ return Convert.vendorInfoFromHal(Utils.maybeRethrow(
+ () -> mHwSession.setParameters(Convert.vendorInfoToHal(parameters))));
}
}
@@ -258,15 +256,8 @@
public Map getParameters(List<String> keys) {
synchronized (mLock) {
checkNotClosedLocked();
- return null;
- }
- }
-
- @Override
- public boolean isAntennaConnected() {
- synchronized (mLock) {
- checkNotClosedLocked();
- return true;
+ return Convert.vendorInfoFromHal(Utils.maybeRethrow(
+ () -> mHwSession.getParameters(Convert.listToArrayList(keys))));
}
}
}
diff --git a/services/core/java/com/android/server/broadcastradio/hal2/Utils.java b/services/core/java/com/android/server/broadcastradio/hal2/Utils.java
index 3520f37..384c9ba 100644
--- a/services/core/java/com/android/server/broadcastradio/hal2/Utils.java
+++ b/services/core/java/com/android/server/broadcastradio/hal2/Utils.java
@@ -16,6 +16,9 @@
package com.android.server.broadcastradio.hal2;
+import android.annotation.NonNull;
+import android.os.RemoteException;
+
enum FrequencyBand {
UNKNOWN,
FM,
@@ -37,4 +40,29 @@
if (freq < 110000) return FrequencyBand.FM;
return FrequencyBand.UNKNOWN;
}
+
+ interface FuncThrowingRemoteException<T> {
+ T exec() throws RemoteException;
+ }
+
+ static <T> T maybeRethrow(@NonNull FuncThrowingRemoteException<T> r) {
+ try {
+ return r.exec();
+ } catch (RemoteException ex) {
+ ex.rethrowFromSystemServer();
+ return null; // unreachable
+ }
+ }
+
+ interface VoidFuncThrowingRemoteException {
+ void exec() throws RemoteException;
+ }
+
+ static void maybeRethrow(@NonNull VoidFuncThrowingRemoteException r) {
+ try {
+ r.exec();
+ } catch (RemoteException ex) {
+ ex.rethrowFromSystemServer();
+ }
+ }
}
diff --git a/services/core/java/com/android/server/connectivity/ConnectivityConstants.java b/services/core/java/com/android/server/connectivity/ConnectivityConstants.java
new file mode 100644
index 0000000..24865bc
--- /dev/null
+++ b/services/core/java/com/android/server/connectivity/ConnectivityConstants.java
@@ -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.
+ */
+
+package com.android.server.connectivity;
+
+/**
+ * A class encapsulating various constants used by Connectivity.
+ * @hide
+ */
+public class ConnectivityConstants {
+ // IPC constants
+ public static final String ACTION_NETWORK_CONDITIONS_MEASURED =
+ "android.net.conn.NETWORK_CONDITIONS_MEASURED";
+ public static final String EXTRA_CONNECTIVITY_TYPE = "extra_connectivity_type";
+ public static final String EXTRA_NETWORK_TYPE = "extra_network_type";
+ public static final String EXTRA_RESPONSE_RECEIVED = "extra_response_received";
+ public static final String EXTRA_IS_CAPTIVE_PORTAL = "extra_is_captive_portal";
+ public static final String EXTRA_CELL_ID = "extra_cellid";
+ public static final String EXTRA_SSID = "extra_ssid";
+ public static final String EXTRA_BSSID = "extra_bssid";
+ /** real time since boot */
+ public static final String EXTRA_REQUEST_TIMESTAMP_MS = "extra_request_timestamp_ms";
+ public static final String EXTRA_RESPONSE_TIMESTAMP_MS = "extra_response_timestamp_ms";
+
+ public static final String PERMISSION_ACCESS_NETWORK_CONDITIONS =
+ "android.permission.ACCESS_NETWORK_CONDITIONS";
+
+ // Penalty applied to scores of Networks that have not been validated.
+ public static final int UNVALIDATED_SCORE_PENALTY = 40;
+
+ // Score for explicitly connected network.
+ //
+ // This ensures that a) the explicitly selected network is never trumped by anything else, and
+ // b) the explicitly selected network is never torn down.
+ public static final int MAXIMUM_NETWORK_SCORE = 100;
+ // VPNs typically have priority over other networks. Give them a score that will
+ // let them win every single time.
+ public static final int VPN_DEFAULT_SCORE = 101;
+}
diff --git a/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java b/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java
index bd2e96e..e43d152 100644
--- a/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java
+++ b/services/core/java/com/android/server/connectivity/DefaultNetworkMetrics.java
@@ -150,7 +150,8 @@
fillLinkInfo(ev, newNai);
ev.initialScore = newNai.getCurrentScore();
if (newNai.lastValidated) {
- logDefaultNetworkValidity(timeMs, true);
+ mIsCurrentlyValid = true;
+ mLastValidationTimeMs = timeMs;
}
} else {
mIsCurrentlyValid = false;
diff --git a/services/core/java/com/android/server/connectivity/KeepaliveTracker.java b/services/core/java/com/android/server/connectivity/KeepaliveTracker.java
index 9e1f6b8..d24f9c9 100644
--- a/services/core/java/com/android/server/connectivity/KeepaliveTracker.java
+++ b/services/core/java/com/android/server/connectivity/KeepaliveTracker.java
@@ -18,10 +18,10 @@
import com.android.internal.util.HexDump;
import com.android.internal.util.IndentingPrintWriter;
-import com.android.server.connectivity.KeepalivePacketData;
import com.android.server.connectivity.NetworkAgentInfo;
import android.net.ConnectivityManager;
import android.net.ConnectivityManager.PacketKeepalive;
+import android.net.KeepalivePacketData;
import android.net.LinkAddress;
import android.net.NetworkAgent;
import android.net.NetworkUtils;
@@ -129,7 +129,7 @@
.append("->")
.append(IpUtils.addressAndPortToString(mPacket.dstAddress, mPacket.dstPort))
.append(" interval=" + mInterval)
- .append(" data=" + HexDump.toHexString(mPacket.data))
+ .append(" packetData=" + HexDump.toHexString(mPacket.getPacket()))
.append(" uid=").append(mUid).append(" pid=").append(mPid)
.append(" ]")
.toString();
@@ -172,7 +172,7 @@
}
private int checkInterval() {
- return mInterval >= 20 ? SUCCESS : ERROR_INVALID_INTERVAL;
+ return mInterval >= 10 ? SUCCESS : ERROR_INVALID_INTERVAL;
}
private int isValid() {
diff --git a/services/core/java/com/android/server/connectivity/NetdEventListenerService.java b/services/core/java/com/android/server/connectivity/NetdEventListenerService.java
index 979beed..f1a806b 100644
--- a/services/core/java/com/android/server/connectivity/NetdEventListenerService.java
+++ b/services/core/java/com/android/server/connectivity/NetdEventListenerService.java
@@ -219,11 +219,7 @@
for (INetdEventCallback callback : mNetdEventCallbackList) {
if (callback != null) {
- // TODO(rickywai): Remove this checking to collect ip in watchlist.
- if (callback ==
- mNetdEventCallbackList[INetdEventCallback.CALLBACK_CALLER_DEVICE_POLICY]) {
- callback.onConnectEvent(ipAddr, port, timestamp, uid);
- }
+ callback.onConnectEvent(ipAddr, port, timestamp, uid);
}
}
}
@@ -257,6 +253,29 @@
uid, iface, ethertype, dstMac, srcIp, dstIp, ipNextHeader, srcPort, dstPort);
}
+ @Override
+ public synchronized void onTcpSocketStatsEvent(int[] networkIds,
+ int[] sentPackets, int[] lostPackets, int[] rttsUs, int[] sentAckDiffsMs) {
+ if (networkIds.length != sentPackets.length
+ || networkIds.length != lostPackets.length
+ || networkIds.length != rttsUs.length
+ || networkIds.length != sentAckDiffsMs.length) {
+ Log.e(TAG, "Mismatched lengths of TCP socket stats data arrays");
+ return;
+ }
+
+ long timestamp = System.currentTimeMillis();
+ for (int i = 0; i < networkIds.length; i++) {
+ int netId = networkIds[i];
+ int sent = sentPackets[i];
+ int lost = lostPackets[i];
+ int rttUs = rttsUs[i];
+ int sentAckDiffMs = sentAckDiffsMs[i];
+ getMetricsForNetwork(timestamp, netId)
+ .addTcpStatsResult(sent, lost, rttUs, sentAckDiffMs);
+ }
+ }
+
private void addWakeupEvent(WakeupEvent event) {
String iface = event.iface;
mWakeupEvents.append(event);
diff --git a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
index a4d7242..85b70ca 100644
--- a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
+++ b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
@@ -223,14 +223,6 @@
// This represents the last score received from the NetworkAgent.
private int currentScore;
- // Penalty applied to scores of Networks that have not been validated.
- private static final int UNVALIDATED_SCORE_PENALTY = 40;
-
- // Score for explicitly connected network.
- //
- // This ensures that a) the explicitly selected network is never trumped by anything else, and
- // b) the explicitly selected network is never torn down.
- private static final int MAXIMUM_NETWORK_SCORE = 100;
// The list of NetworkRequests being satisfied by this Network.
private final SparseArray<NetworkRequest> mNetworkRequests = new SparseArray<>();
@@ -428,12 +420,12 @@
// down an explicitly selected network before the user gets a chance to prefer it when
// a higher-scoring network (e.g., Ethernet) is available.
if (networkMisc.explicitlySelected && (networkMisc.acceptUnvalidated || pretendValidated)) {
- return MAXIMUM_NETWORK_SCORE;
+ return ConnectivityConstants.MAXIMUM_NETWORK_SCORE;
}
int score = currentScore;
if (!lastValidated && !pretendValidated && !ignoreWifiUnvalidationPenalty()) {
- score -= UNVALIDATED_SCORE_PENALTY;
+ score -= ConnectivityConstants.UNVALIDATED_SCORE_PENALTY;
}
if (score < 0) score = 0;
return score;
diff --git a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
index 85d1d1e..c471f0c 100644
--- a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
+++ b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
@@ -24,6 +24,7 @@
import android.net.NetworkUtils;
import android.net.RouteInfo;
import android.net.TrafficStats;
+import android.net.util.NetworkConstants;
import android.os.SystemClock;
import android.system.ErrnoException;
import android.system.Os;
@@ -421,8 +422,6 @@
private class IcmpCheck extends SimpleSocketCheck implements Runnable {
private static final int TIMEOUT_SEND = 100;
private static final int TIMEOUT_RECV = 300;
- private static final int ICMPV4_ECHO_REQUEST = 8;
- private static final int ICMPV6_ECHO_REQUEST = 128;
private static final int PACKET_BUFSIZE = 512;
private final int mProtocol;
private final int mIcmpType;
@@ -432,11 +431,11 @@
if (mAddressFamily == AF_INET6) {
mProtocol = IPPROTO_ICMPV6;
- mIcmpType = ICMPV6_ECHO_REQUEST;
+ mIcmpType = NetworkConstants.ICMPV6_ECHO_REQUEST_TYPE;
mMeasurement.description = "ICMPv6";
} else {
mProtocol = IPPROTO_ICMP;
- mIcmpType = ICMPV4_ECHO_REQUEST;
+ mIcmpType = NetworkConstants.ICMPV4_ECHO_REQUEST_TYPE;
mMeasurement.description = "ICMPv4";
}
@@ -504,7 +503,6 @@
private class DnsUdpCheck extends SimpleSocketCheck implements Runnable {
private static final int TIMEOUT_SEND = 100;
private static final int TIMEOUT_RECV = 500;
- private static final int DNS_SERVER_PORT = 53;
private static final int RR_TYPE_A = 1;
private static final int RR_TYPE_AAAA = 28;
private static final int PACKET_BUFSIZE = 512;
@@ -546,7 +544,8 @@
}
try {
- setupSocket(SOCK_DGRAM, IPPROTO_UDP, TIMEOUT_SEND, TIMEOUT_RECV, DNS_SERVER_PORT);
+ setupSocket(SOCK_DGRAM, IPPROTO_UDP, TIMEOUT_SEND, TIMEOUT_RECV,
+ NetworkConstants.DNS_SERVER_PORT);
} catch (ErrnoException | IOException e) {
mMeasurement.recordFailure(e.toString());
return;
diff --git a/services/core/java/com/android/server/connectivity/NetworkMonitor.java b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
index ed26858..8a2e71c 100644
--- a/services/core/java/com/android/server/connectivity/NetworkMonitor.java
+++ b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
@@ -122,22 +122,6 @@
}
}
- public static final String ACTION_NETWORK_CONDITIONS_MEASURED =
- "android.net.conn.NETWORK_CONDITIONS_MEASURED";
- public static final String EXTRA_CONNECTIVITY_TYPE = "extra_connectivity_type";
- public static final String EXTRA_NETWORK_TYPE = "extra_network_type";
- public static final String EXTRA_RESPONSE_RECEIVED = "extra_response_received";
- public static final String EXTRA_IS_CAPTIVE_PORTAL = "extra_is_captive_portal";
- public static final String EXTRA_CELL_ID = "extra_cellid";
- public static final String EXTRA_SSID = "extra_ssid";
- public static final String EXTRA_BSSID = "extra_bssid";
- /** real time since boot */
- public static final String EXTRA_REQUEST_TIMESTAMP_MS = "extra_request_timestamp_ms";
- public static final String EXTRA_RESPONSE_TIMESTAMP_MS = "extra_response_timestamp_ms";
-
- private static final String PERMISSION_ACCESS_NETWORK_CONDITIONS =
- "android.permission.ACCESS_NETWORK_CONDITIONS";
-
// After a network has been tested this result can be sent with EVENT_NETWORK_TESTED.
// The network should be used as a default internet connection. It was found to be:
// 1. a functioning network providing internet access, or
@@ -1136,7 +1120,8 @@
return;
}
- Intent latencyBroadcast = new Intent(ACTION_NETWORK_CONDITIONS_MEASURED);
+ Intent latencyBroadcast =
+ new Intent(ConnectivityConstants.ACTION_NETWORK_CONDITIONS_MEASURED);
switch (mNetworkAgentInfo.networkInfo.getType()) {
case ConnectivityManager.TYPE_WIFI:
WifiInfo currentWifiInfo = mWifiManager.getConnectionInfo();
@@ -1148,15 +1133,18 @@
// not change it here as it would become impossible to tell whether the SSID is
// simply being surrounded by quotes due to the API, or whether those quotes
// are actually part of the SSID.
- latencyBroadcast.putExtra(EXTRA_SSID, currentWifiInfo.getSSID());
- latencyBroadcast.putExtra(EXTRA_BSSID, currentWifiInfo.getBSSID());
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_SSID,
+ currentWifiInfo.getSSID());
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_BSSID,
+ currentWifiInfo.getBSSID());
} else {
if (VDBG) logw("network info is TYPE_WIFI but no ConnectionInfo found");
return;
}
break;
case ConnectivityManager.TYPE_MOBILE:
- latencyBroadcast.putExtra(EXTRA_NETWORK_TYPE, mTelephonyManager.getNetworkType());
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_NETWORK_TYPE,
+ mTelephonyManager.getNetworkType());
List<CellInfo> info = mTelephonyManager.getAllCellInfo();
if (info == null) return;
int numRegisteredCellInfo = 0;
@@ -1170,16 +1158,16 @@
}
if (cellInfo instanceof CellInfoCdma) {
CellIdentityCdma cellId = ((CellInfoCdma) cellInfo).getCellIdentity();
- latencyBroadcast.putExtra(EXTRA_CELL_ID, cellId);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_CELL_ID, cellId);
} else if (cellInfo instanceof CellInfoGsm) {
CellIdentityGsm cellId = ((CellInfoGsm) cellInfo).getCellIdentity();
- latencyBroadcast.putExtra(EXTRA_CELL_ID, cellId);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_CELL_ID, cellId);
} else if (cellInfo instanceof CellInfoLte) {
CellIdentityLte cellId = ((CellInfoLte) cellInfo).getCellIdentity();
- latencyBroadcast.putExtra(EXTRA_CELL_ID, cellId);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_CELL_ID, cellId);
} else if (cellInfo instanceof CellInfoWcdma) {
CellIdentityWcdma cellId = ((CellInfoWcdma) cellInfo).getCellIdentity();
- latencyBroadcast.putExtra(EXTRA_CELL_ID, cellId);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_CELL_ID, cellId);
} else {
if (VDBG) logw("Registered cellinfo is unrecognized");
return;
@@ -1190,16 +1178,21 @@
default:
return;
}
- latencyBroadcast.putExtra(EXTRA_CONNECTIVITY_TYPE, mNetworkAgentInfo.networkInfo.getType());
- latencyBroadcast.putExtra(EXTRA_RESPONSE_RECEIVED, responseReceived);
- latencyBroadcast.putExtra(EXTRA_REQUEST_TIMESTAMP_MS, requestTimestampMs);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_CONNECTIVITY_TYPE,
+ mNetworkAgentInfo.networkInfo.getType());
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_RESPONSE_RECEIVED,
+ responseReceived);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_REQUEST_TIMESTAMP_MS,
+ requestTimestampMs);
if (responseReceived) {
- latencyBroadcast.putExtra(EXTRA_IS_CAPTIVE_PORTAL, isCaptivePortal);
- latencyBroadcast.putExtra(EXTRA_RESPONSE_TIMESTAMP_MS, responseTimestampMs);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_IS_CAPTIVE_PORTAL,
+ isCaptivePortal);
+ latencyBroadcast.putExtra(ConnectivityConstants.EXTRA_RESPONSE_TIMESTAMP_MS,
+ responseTimestampMs);
}
mContext.sendBroadcastAsUser(latencyBroadcast, UserHandle.CURRENT,
- PERMISSION_ACCESS_NETWORK_CONDITIONS);
+ ConnectivityConstants.PERMISSION_ACCESS_NETWORK_CONDITIONS);
}
private void logNetworkEvent(int evtype) {
diff --git a/services/core/java/com/android/server/connectivity/PacManager.java b/services/core/java/com/android/server/connectivity/PacManager.java
index d56fb1a..3a27fcb3 100644
--- a/services/core/java/com/android/server/connectivity/PacManager.java
+++ b/services/core/java/com/android/server/connectivity/PacManager.java
@@ -54,12 +54,12 @@
* @hide
*/
public class PacManager {
- public static final String PAC_PACKAGE = "com.android.pacprocessor";
- public static final String PAC_SERVICE = "com.android.pacprocessor.PacService";
- public static final String PAC_SERVICE_NAME = "com.android.net.IProxyService";
+ private static final String PAC_PACKAGE = "com.android.pacprocessor";
+ private static final String PAC_SERVICE = "com.android.pacprocessor.PacService";
+ private static final String PAC_SERVICE_NAME = "com.android.net.IProxyService";
- public static final String PROXY_PACKAGE = "com.android.proxyhandler";
- public static final String PROXY_SERVICE = "com.android.proxyhandler.ProxyService";
+ private static final String PROXY_PACKAGE = "com.android.proxyhandler";
+ private static final String PROXY_SERVICE = "com.android.proxyhandler.ProxyService";
private static final String TAG = "PacManager";
@@ -71,8 +71,6 @@
private static final int DELAY_LONG = 4;
private static final long MAX_PAC_SIZE = 20 * 1000 * 1000;
- /** Keep these values up-to-date with ProxyService.java */
- public static final String KEY_PROXY = "keyProxy";
private String mCurrentPac;
@GuardedBy("mProxyLock")
private volatile Uri mPacUrl = Uri.EMPTY;
diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java
index ff05723..be6c4a1 100644
--- a/services/core/java/com/android/server/connectivity/Tethering.java
+++ b/services/core/java/com/android/server/connectivity/Tethering.java
@@ -506,6 +506,7 @@
Intent intent = new Intent(Settings.ACTION_TETHER_PROVISIONING);
intent.putExtra(ConnectivityManager.EXTRA_ADD_TETHER_TYPE, type);
intent.putExtra(ConnectivityManager.EXTRA_PROVISION_CALLBACK, receiver);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
final long ident = Binder.clearCallingIdentity();
try {
mContext.startActivityAsUser(intent, UserHandle.CURRENT);
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index aa174e3..bb46d5e 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -164,19 +164,6 @@
private boolean mLockdown = false;
/**
- * List of UIDs that are set to use this VPN by default. Normally, every UID in the user is
- * added to this set but that can be changed by adding allowed or disallowed applications. It
- * is non-null iff the VPN is connected.
- *
- * Unless the VPN has set allowBypass=true, these UIDs are forced into the VPN.
- *
- * @see VpnService.Builder#addAllowedApplication(String)
- * @see VpnService.Builder#addDisallowedApplication(String)
- */
- @GuardedBy("this")
- private Set<UidRange> mVpnUsers = null;
-
- /**
* List of UIDs for which networking should be blocked until VPN is ready, during brief periods
* when VPN is not running. For example, during system startup or after a crash.
* @see mLockdown
@@ -688,7 +675,7 @@
agentDisconnect();
jniReset(mInterface);
mInterface = null;
- mVpnUsers = null;
+ mNetworkCapabilities.setUids(null);
}
// Revoke the connection or stop LegacyVpnRunner.
@@ -857,10 +844,14 @@
NetworkMisc networkMisc = new NetworkMisc();
networkMisc.allowBypass = mConfig.allowBypass && !mLockdown;
+ mNetworkCapabilities.setEstablishingVpnAppUid(Binder.getCallingUid());
+ mNetworkCapabilities.setUids(createUserAndRestrictedProfilesRanges(mUserHandle,
+ mConfig.allowedApplications, mConfig.disallowedApplications));
long token = Binder.clearCallingIdentity();
try {
mNetworkAgent = new NetworkAgent(mLooper, mContext, NETWORKTYPE /* logtag */,
- mNetworkInfo, mNetworkCapabilities, lp, 0 /* score */, networkMisc) {
+ mNetworkInfo, mNetworkCapabilities, lp,
+ ConnectivityConstants.VPN_DEFAULT_SCORE, networkMisc) {
@Override
public void unwanted() {
// We are user controlled, not driven by NetworkRequest.
@@ -869,11 +860,6 @@
} finally {
Binder.restoreCallingIdentity(token);
}
-
- mVpnUsers = createUserAndRestrictedProfilesRanges(mUserHandle,
- mConfig.allowedApplications, mConfig.disallowedApplications);
- mNetworkAgent.addUidRanges(mVpnUsers.toArray(new UidRange[mVpnUsers.size()]));
-
mNetworkInfo.setIsAvailable(true);
updateState(DetailedState.CONNECTED, "agentConnect");
}
@@ -953,7 +939,7 @@
Connection oldConnection = mConnection;
NetworkAgent oldNetworkAgent = mNetworkAgent;
mNetworkAgent = null;
- Set<UidRange> oldUsers = mVpnUsers;
+ Set<UidRange> oldUsers = mNetworkCapabilities.getUids();
// Configure the interface. Abort if any of these steps fails.
ParcelFileDescriptor tun = ParcelFileDescriptor.adoptFd(jniCreate(config.mtu));
@@ -1011,7 +997,7 @@
// restore old state
mConfig = oldConfig;
mConnection = oldConnection;
- mVpnUsers = oldUsers;
+ mNetworkCapabilities.setUids(oldUsers);
mNetworkAgent = oldNetworkAgent;
mInterface = oldInterface;
throw e;
@@ -1131,10 +1117,12 @@
// Returns the subset of the full list of active UID ranges the VPN applies to (mVpnUsers) that
// apply to userHandle.
- private List<UidRange> uidRangesForUser(int userHandle) {
+ static private List<UidRange> uidRangesForUser(int userHandle, Set<UidRange> existingRanges) {
+ // UidRange#createForUser returns the entire range of UIDs available to a macro-user.
+ // This is something like 0-99999 ; {@see UserHandle#PER_USER_RANGE}
final UidRange userRange = UidRange.createForUser(userHandle);
final List<UidRange> ranges = new ArrayList<UidRange>();
- for (UidRange range : mVpnUsers) {
+ for (UidRange range : existingRanges) {
if (userRange.containsRange(range)) {
ranges.add(range);
}
@@ -1142,30 +1130,18 @@
return ranges;
}
- private void removeVpnUserLocked(int userHandle) {
- if (mVpnUsers == null) {
- throw new IllegalStateException("VPN is not active");
- }
- final List<UidRange> ranges = uidRangesForUser(userHandle);
- if (mNetworkAgent != null) {
- mNetworkAgent.removeUidRanges(ranges.toArray(new UidRange[ranges.size()]));
- }
- mVpnUsers.removeAll(ranges);
- }
-
public void onUserAdded(int userHandle) {
// If the user is restricted tie them to the parent user's VPN
UserInfo user = UserManager.get(mContext).getUserInfo(userHandle);
if (user.isRestricted() && user.restrictedProfileParentId == mUserHandle) {
synchronized(Vpn.this) {
- if (mVpnUsers != null) {
+ final Set<UidRange> existingRanges = mNetworkCapabilities.getUids();
+ if (existingRanges != null) {
try {
- addUserToRanges(mVpnUsers, userHandle, mConfig.allowedApplications,
+ addUserToRanges(existingRanges, userHandle, mConfig.allowedApplications,
mConfig.disallowedApplications);
- if (mNetworkAgent != null) {
- final List<UidRange> ranges = uidRangesForUser(userHandle);
- mNetworkAgent.addUidRanges(ranges.toArray(new UidRange[ranges.size()]));
- }
+ mNetworkCapabilities.setUids(existingRanges);
+ updateCapabilities();
} catch (Exception e) {
Log.wtf(TAG, "Failed to add restricted user to owner", e);
}
@@ -1180,9 +1156,14 @@
UserInfo user = UserManager.get(mContext).getUserInfo(userHandle);
if (user.isRestricted() && user.restrictedProfileParentId == mUserHandle) {
synchronized(Vpn.this) {
- if (mVpnUsers != null) {
+ final Set<UidRange> existingRanges = mNetworkCapabilities.getUids();
+ if (existingRanges != null) {
try {
- removeVpnUserLocked(userHandle);
+ final List<UidRange> removedRanges =
+ uidRangesForUser(userHandle, existingRanges);
+ existingRanges.removeAll(removedRanges);
+ mNetworkCapabilities.setUids(existingRanges);
+ updateCapabilities();
} catch (Exception e) {
Log.wtf(TAG, "Failed to remove restricted user to owner", e);
}
@@ -1226,15 +1207,6 @@
private void setVpnForcedLocked(boolean enforce) {
final List<String> exemptedPackages =
isNullOrLegacyVpn(mPackage) ? null : Collections.singletonList(mPackage);
- setVpnForcedWithExemptionsLocked(enforce, exemptedPackages);
- }
-
- /**
- * @see #setVpnForcedLocked
- */
- @GuardedBy("this")
- private void setVpnForcedWithExemptionsLocked(boolean enforce,
- @Nullable List<String> exemptedPackages) {
final Set<UidRange> removedRanges = new ArraySet<>(mBlockedUsers);
Set<UidRange> addedRanges = Collections.emptySet();
@@ -1314,7 +1286,7 @@
synchronized (Vpn.this) {
if (interfaze.equals(mInterface) && jniCheck(interfaze) == 0) {
mStatusIntent = null;
- mVpnUsers = null;
+ mNetworkCapabilities.setUids(null);
mConfig = null;
mInterface = null;
if (mConnection != null) {
@@ -1433,12 +1405,7 @@
if (!isRunningLocked()) {
return false;
}
- for (UidRange uidRange : mVpnUsers) {
- if (uidRange.contains(uid)) {
- return true;
- }
- }
- return false;
+ return mNetworkCapabilities.appliesToUid(uid);
}
/**
diff --git a/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java b/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java
index acbc10b..09bce7f 100644
--- a/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java
+++ b/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java
@@ -28,6 +28,8 @@
import android.telephony.TelephonyManager;
import android.net.util.SharedLog;
+import com.android.internal.annotations.VisibleForTesting;
+
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
@@ -49,6 +51,7 @@
public class TetheringConfiguration {
private static final String TAG = TetheringConfiguration.class.getSimpleName();
+ @VisibleForTesting
public static final int DUN_NOT_REQUIRED = 0;
public static final int DUN_REQUIRED = 1;
public static final int DUN_UNSPECIFIED = 2;
diff --git a/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java b/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java
index b35ed75..3413291 100644
--- a/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java
+++ b/services/core/java/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java
@@ -24,6 +24,7 @@
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
+import android.os.Process;
import android.net.ConnectivityManager;
import android.net.ConnectivityManager.NetworkCallback;
import android.net.IpPrefix;
@@ -476,6 +477,7 @@
ConnectivityManager.getNetworkTypeName(type));
continue;
}
+ nc.setSingleUid(Process.myUid());
for (NetworkState value : netStates) {
if (!nc.satisfiedByNetworkCapabilities(value.networkCapabilities)) {
diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java
index ad2cf6c..422d0cb 100644
--- a/services/core/java/com/android/server/content/SyncManager.java
+++ b/services/core/java/com/android/server/content/SyncManager.java
@@ -20,6 +20,8 @@
import android.accounts.AccountAndUser;
import android.accounts.AccountManager;
import android.accounts.AccountManagerInternal;
+import android.annotation.NonNull;
+import android.annotation.UserIdInt;
import android.app.ActivityManager;
import android.app.AppGlobals;
import android.app.Notification;
@@ -32,6 +34,7 @@
import android.content.ContentResolver;
import android.content.Context;
import android.content.ISyncAdapter;
+import android.content.ISyncAdapterUnsyncableAccountCallback;
import android.content.ISyncContext;
import android.content.Intent;
import android.content.IntentFilter;
@@ -212,6 +215,10 @@
private static final int SYNC_OP_STATE_INVALID = 1;
private static final int SYNC_OP_STATE_INVALID_NO_ACCOUNT_ACCESS = 2;
+ /** Flags used when connecting to a sync adapter service */
+ private static final int SYNC_ADAPTER_CONNECTION_FLAGS = Context.BIND_AUTO_CREATE
+ | Context.BIND_NOT_FOREGROUND | Context.BIND_ALLOW_OOM_MANAGEMENT;
+
private Context mContext;
private static final AccountAndUser[] INITIAL_ACCOUNTS_ARRAY = new AccountAndUser[0];
@@ -876,7 +883,7 @@
public void scheduleSync(Account requestedAccount, int userId, int reason,
String requestedAuthority, Bundle extras, int targetSyncState) {
scheduleSync(requestedAccount, userId, reason, requestedAuthority, extras, targetSyncState,
- 0 /* min delay */);
+ 0 /* min delay */, true /* checkIfAccountReady */);
}
/**
@@ -884,7 +891,7 @@
*/
private void scheduleSync(Account requestedAccount, int userId, int reason,
String requestedAuthority, Bundle extras, int targetSyncState,
- final long minDelayMillis) {
+ final long minDelayMillis, boolean checkIfAccountReady) {
final boolean isLoggable = Log.isLoggable(TAG, Log.VERBOSE);
if (extras == null) {
extras = new Bundle();
@@ -963,7 +970,8 @@
}
for (String authority : syncableAuthorities) {
- int isSyncable = computeSyncable(account.account, account.userId, authority);
+ int isSyncable = computeSyncable(account.account, account.userId, authority,
+ !checkIfAccountReady);
if (isSyncable == AuthorityInfo.NOT_SYNCABLE) {
continue;
@@ -1000,7 +1008,8 @@
if (result != null
&& result.getBoolean(AccountManager.KEY_BOOLEAN_RESULT)) {
scheduleSync(account.account, userId, reason, authority,
- finalExtras, targetSyncState, minDelayMillis);
+ finalExtras, targetSyncState, minDelayMillis,
+ true /* checkIfAccountReady */);
}
}
));
@@ -1009,7 +1018,7 @@
final boolean allowParallelSyncs = syncAdapterInfo.type.allowParallelSyncs();
final boolean isAlwaysSyncable = syncAdapterInfo.type.isAlwaysSyncable();
- if (isSyncable < 0 && isAlwaysSyncable) {
+ if (!checkIfAccountReady && isSyncable < 0 && isAlwaysSyncable) {
mSyncStorageEngine.setIsSyncable(
account.account, account.userId, authority, AuthorityInfo.SYNCABLE);
isSyncable = AuthorityInfo.SYNCABLE;
@@ -1045,25 +1054,34 @@
final String owningPackage = syncAdapterInfo.componentName.getPackageName();
if (isSyncable == AuthorityInfo.NOT_INITIALIZED) {
- // Initialisation sync.
- Bundle newExtras = new Bundle();
- newExtras.putBoolean(ContentResolver.SYNC_EXTRAS_INITIALIZE, true);
- if (isLoggable) {
- Slog.v(TAG, "schedule initialisation Sync:"
- + ", delay until " + delayUntil
- + ", run by " + 0
- + ", flexMillis " + 0
- + ", source " + source
- + ", account " + account
- + ", authority " + authority
- + ", extras " + newExtras);
+ if (checkIfAccountReady) {
+ Bundle finalExtras = new Bundle(extras);
+
+ sendOnUnsyncableAccount(mContext, syncAdapterInfo, account.userId,
+ () -> scheduleSync(account.account, account.userId, reason,
+ authority, finalExtras, targetSyncState, minDelayMillis,
+ false));
+ } else {
+ // Initialisation sync.
+ Bundle newExtras = new Bundle();
+ newExtras.putBoolean(ContentResolver.SYNC_EXTRAS_INITIALIZE, true);
+ if (isLoggable) {
+ Slog.v(TAG, "schedule initialisation Sync:"
+ + ", delay until " + delayUntil
+ + ", run by " + 0
+ + ", flexMillis " + 0
+ + ", source " + source
+ + ", account " + account
+ + ", authority " + authority
+ + ", extras " + newExtras);
+ }
+ postScheduleSyncMessage(
+ new SyncOperation(account.account, account.userId,
+ owningUid, owningPackage, reason, source,
+ authority, newExtras, allowParallelSyncs),
+ minDelayMillis
+ );
}
- postScheduleSyncMessage(
- new SyncOperation(account.account, account.userId,
- owningUid, owningPackage, reason, source,
- authority, newExtras, allowParallelSyncs),
- minDelayMillis
- );
} else if (targetSyncState == AuthorityInfo.UNDEFINED
|| targetSyncState == isSyncable) {
if (isLoggable) {
@@ -1085,10 +1103,6 @@
}
}
- private int computeSyncable(Account account, int userId, String authority) {
- return computeSyncable(account, userId, authority, true);
- }
-
public int computeSyncable(Account account, int userId, String authority,
boolean checkAccountAccess) {
final int status = getIsSyncable(account, userId, authority);
@@ -1198,7 +1212,7 @@
final Bundle extras = new Bundle();
extras.putBoolean(ContentResolver.SYNC_EXTRAS_UPLOAD, true);
scheduleSync(account, userId, reason, authority, extras,
- AuthorityInfo.UNDEFINED, LOCAL_SYNC_DELAY);
+ AuthorityInfo.UNDEFINED, LOCAL_SYNC_DELAY, true /* checkIfAccountReady */);
}
public SyncAdapterType[] getSyncAdapterTypes(int userId) {
@@ -1706,6 +1720,28 @@
}
/**
+ * Construct intent used to bind to an adapter.
+ *
+ * @param context Context to create intent for
+ * @param syncAdapterComponent The adapter description
+ * @param userId The user the adapter belongs to
+ *
+ * @return The intent required to bind to the adapter
+ */
+ static @NonNull Intent getAdapterBindIntent(@NonNull Context context,
+ @NonNull ComponentName syncAdapterComponent, @UserIdInt int userId) {
+ final Intent intent = new Intent();
+ intent.setAction("android.content.SyncAdapter");
+ intent.setComponent(syncAdapterComponent);
+ intent.putExtra(Intent.EXTRA_CLIENT_LABEL,
+ com.android.internal.R.string.sync_binding_label);
+ intent.putExtra(Intent.EXTRA_CLIENT_INTENT, PendingIntent.getActivityAsUser(context, 0,
+ new Intent(Settings.ACTION_SYNC_SETTINGS), 0, null, UserHandle.of(userId)));
+
+ return intent;
+ }
+
+ /**
* @hide
*/
class ActiveSyncContext extends ISyncContext.Stub
@@ -1793,19 +1829,11 @@
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.d(TAG, "bindToSyncAdapter: " + serviceComponent + ", connection " + this);
}
- Intent intent = new Intent();
- intent.setAction("android.content.SyncAdapter");
- intent.setComponent(serviceComponent);
- intent.putExtra(Intent.EXTRA_CLIENT_LABEL,
- com.android.internal.R.string.sync_binding_label);
- intent.putExtra(Intent.EXTRA_CLIENT_INTENT, PendingIntent.getActivityAsUser(
- mContext, 0, new Intent(Settings.ACTION_SYNC_SETTINGS), 0,
- null, new UserHandle(userId)));
+ Intent intent = getAdapterBindIntent(mContext, serviceComponent, userId);
+
mBound = true;
final boolean bindResult = mContext.bindServiceAsUser(intent, this,
- Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND
- | Context.BIND_ALLOW_OOM_MANAGEMENT,
- new UserHandle(mSyncOperation.target.userId));
+ SYNC_ADAPTER_CONNECTION_FLAGS, new UserHandle(mSyncOperation.target.userId));
mLogger.log("bindService() returned=", mBound, " for ", this);
if (!bindResult) {
mBound = false;
@@ -2528,6 +2556,92 @@
}
}
+ interface OnReadyCallback {
+ void onReady();
+ }
+
+ static void sendOnUnsyncableAccount(@NonNull Context context,
+ @NonNull RegisteredServicesCache.ServiceInfo<SyncAdapterType> syncAdapterInfo,
+ @UserIdInt int userId, @NonNull OnReadyCallback onReadyCallback) {
+ OnUnsyncableAccountCheck connection = new OnUnsyncableAccountCheck(syncAdapterInfo,
+ onReadyCallback);
+
+ boolean isBound = context.bindServiceAsUser(
+ getAdapterBindIntent(context, syncAdapterInfo.componentName, userId),
+ connection, SYNC_ADAPTER_CONNECTION_FLAGS, UserHandle.of(userId));
+
+ if (isBound) {
+ // Unbind after SERVICE_BOUND_TIME_MILLIS to not leak the connection.
+ (new Handler(Looper.getMainLooper())).postDelayed(
+ () -> context.unbindService(connection),
+ OnUnsyncableAccountCheck.SERVICE_BOUND_TIME_MILLIS);
+ } else {
+ /*
+ * The default implementation of adapter.onUnsyncableAccount returns true. Hence if
+ * there the service cannot be bound, assume the default behavior.
+ */
+ connection.onReady();
+ }
+ }
+
+
+ /**
+ * Helper class for calling ISyncAdapter.onUnsyncableAccountDone.
+ *
+ * If this returns {@code true} the onReadyCallback is called. Otherwise nothing happens.
+ */
+ private static class OnUnsyncableAccountCheck implements ServiceConnection {
+ static final long SERVICE_BOUND_TIME_MILLIS = 5000;
+
+ private final @NonNull OnReadyCallback mOnReadyCallback;
+ private final @NonNull RegisteredServicesCache.ServiceInfo<SyncAdapterType>
+ mSyncAdapterInfo;
+
+ OnUnsyncableAccountCheck(
+ @NonNull RegisteredServicesCache.ServiceInfo<SyncAdapterType> syncAdapterInfo,
+ @NonNull OnReadyCallback onReadyCallback) {
+ mSyncAdapterInfo = syncAdapterInfo;
+ mOnReadyCallback = onReadyCallback;
+ }
+
+ private void onReady() {
+ long identity = Binder.clearCallingIdentity();
+ try {
+ mOnReadyCallback.onReady();
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+ @Override
+ public void onServiceConnected(ComponentName name, IBinder service) {
+ final ISyncAdapter adapter = ISyncAdapter.Stub.asInterface(service);
+
+ try {
+ adapter.onUnsyncableAccount(new ISyncAdapterUnsyncableAccountCallback.Stub() {
+ @Override
+ public void onUnsyncableAccountDone(boolean isReady) {
+ if (isReady) {
+ onReady();
+ }
+ }
+ });
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Could not call onUnsyncableAccountDone " + mSyncAdapterInfo, e);
+ /*
+ * The default implementation of adapter.onUnsyncableAccount returns true. Hence if
+ * there is a crash in the implementation, assume the default behavior.
+ */
+ onReady();
+ }
+ }
+
+ @Override
+ public void onServiceDisconnected(ComponentName name) {
+ // Wait until the service connects again
+ }
+ }
+
/**
* A helper object to keep track of the time we have spent syncing since the last boot
*/
@@ -3199,7 +3313,7 @@
return SYNC_OP_STATE_INVALID;
}
// Drop this sync request if it isn't syncable.
- state = computeSyncable(target.account, target.userId, target.provider);
+ state = computeSyncable(target.account, target.userId, target.provider, true);
if (state == AuthorityInfo.SYNCABLE_NO_ACCOUNT_ACCESS) {
if (isLoggable) {
Slog.v(TAG, " Dropping sync operation: "
diff --git a/services/core/java/com/android/server/content/SyncStorageEngine.java b/services/core/java/com/android/server/content/SyncStorageEngine.java
index e498666..5a37ee2 100644
--- a/services/core/java/com/android/server/content/SyncStorageEngine.java
+++ b/services/core/java/com/android/server/content/SyncStorageEngine.java
@@ -481,9 +481,9 @@
maybeDeleteLegacyPendingInfoLocked(syncDir);
- mAccountInfoFile = new AtomicFile(new File(syncDir, "accounts.xml"));
- mStatusFile = new AtomicFile(new File(syncDir, "status.bin"));
- mStatisticsFile = new AtomicFile(new File(syncDir, "stats.bin"));
+ mAccountInfoFile = new AtomicFile(new File(syncDir, "accounts.xml"), "sync-accounts");
+ mStatusFile = new AtomicFile(new File(syncDir, "status.bin"), "sync-status");
+ mStatisticsFile = new AtomicFile(new File(syncDir, "stats.bin"), "sync-stats");
readAccountInfoLocked();
readStatusLocked();
diff --git a/services/core/java/com/android/server/display/AutomaticBrightnessController.java b/services/core/java/com/android/server/display/AutomaticBrightnessController.java
index 6c5bfc7..6a88b1e 100644
--- a/services/core/java/com/android/server/display/AutomaticBrightnessController.java
+++ b/services/core/java/com/android/server/display/AutomaticBrightnessController.java
@@ -25,6 +25,7 @@
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.hardware.display.BrightnessConfiguration;
+import android.hardware.display.DisplayManagerInternal.DisplayPowerRequest;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
@@ -57,8 +58,16 @@
// the user is satisfied with the result before storing the sample.
private static final int BRIGHTNESS_ADJUSTMENT_SAMPLE_DEBOUNCE_MILLIS = 10000;
+ // Timeout after which we remove the effects any user interactions might've had on the
+ // brightness mapping. This timeout doesn't start until we transition to a non-interactive
+ // display policy so that we don't reset while users are using their devices, but also so that
+ // we don't erroneously keep the short-term model if the device is dozing but the display is
+ // fully on.
+ private static final int SHORT_TERM_MODEL_TIMEOUT_MILLIS = 30000;
+
private static final int MSG_UPDATE_AMBIENT_LUX = 1;
private static final int MSG_BRIGHTNESS_ADJUSTMENT_SAMPLE = 2;
+ private static final int MSG_RESET_SHORT_TERM_MODEL = 3;
// Length of the ambient light horizon used to calculate the long term estimate of ambient
// light.
@@ -173,8 +182,9 @@
// The last screen auto-brightness gamma. (For printing in dump() only.)
private float mLastScreenAutoBrightnessGamma = 1.0f;
- // Are we going to adjust brightness while dozing.
- private boolean mDozing;
+ // The current display policy. This is useful, for example, for knowing when we're dozing,
+ // where the light sensor may not be available.
+ private int mDisplayPolicy = DisplayPowerRequest.POLICY_OFF;
// True if we are collecting a brightness adjustment sample, along with some data
// for the initial state of the sample.
@@ -221,31 +231,85 @@
}
public int getAutomaticScreenBrightness() {
- if (mDozing) {
+ if (mDisplayPolicy == DisplayPowerRequest.POLICY_DOZE) {
return (int) (mScreenAutoBrightness * mDozeScaleFactor);
}
return mScreenAutoBrightness;
}
+ public float getAutomaticScreenBrightnessAdjustment() {
+ return mScreenAutoBrightnessAdjustment;
+ }
+
public void configure(boolean enable, @Nullable BrightnessConfiguration configuration,
- float adjustment, boolean dozing, boolean userInitiatedChange) {
+ float brightness, boolean userChangedBrightness, float adjustment,
+ boolean userChangedAutoBrightnessAdjustment, int displayPolicy) {
// While dozing, the application processor may be suspended which will prevent us from
// receiving new information from the light sensor. On some devices, we may be able to
// switch to a wake-up light sensor instead but for now we will simply disable the sensor
// and hold onto the last computed screen auto brightness. We save the dozing flag for
// debugging purposes.
- mDozing = dozing;
+ boolean dozing = (displayPolicy == DisplayPowerRequest.POLICY_DOZE);
boolean changed = setBrightnessConfiguration(configuration);
- changed |= setLightSensorEnabled(enable && !dozing);
- if (enable && !dozing && userInitiatedChange) {
+ changed |= setDisplayPolicy(displayPolicy);
+ changed |= setScreenAutoBrightnessAdjustment(adjustment);
+ if (userChangedBrightness && enable) {
+ // Update the brightness curve with the new user control point. It's critical this
+ // happens after we update the autobrightness adjustment since it may reset it.
+ changed |= setScreenBrightnessByUser(brightness);
+ }
+ final boolean userInitiatedChange =
+ userChangedBrightness || userChangedAutoBrightnessAdjustment;
+ if (userInitiatedChange && enable && !dozing) {
prepareBrightnessAdjustmentSample();
}
- changed |= setScreenAutoBrightnessAdjustment(adjustment);
+ changed |= setLightSensorEnabled(enable && !dozing);
if (changed) {
updateAutoBrightness(false /*sendUpdate*/);
}
}
+ private boolean setDisplayPolicy(int policy) {
+ if (mDisplayPolicy == policy) {
+ return false;
+ }
+ final int oldPolicy = mDisplayPolicy;
+ mDisplayPolicy = policy;
+ if (DEBUG) {
+ Slog.d(TAG, "Display policy transitioning from " + mDisplayPolicy + " to " + policy);
+ }
+ if (!isInteractivePolicy(policy) && isInteractivePolicy(oldPolicy)) {
+ mHandler.sendEmptyMessageDelayed(MSG_RESET_SHORT_TERM_MODEL,
+ SHORT_TERM_MODEL_TIMEOUT_MILLIS);
+ } else if (isInteractivePolicy(policy) && !isInteractivePolicy(oldPolicy)) {
+ mHandler.removeMessages(MSG_RESET_SHORT_TERM_MODEL);
+ }
+ return true;
+ }
+
+ private static boolean isInteractivePolicy(int policy) {
+ return policy == DisplayPowerRequest.POLICY_BRIGHT
+ || policy == DisplayPowerRequest.POLICY_DIM
+ || policy == DisplayPowerRequest.POLICY_VR;
+ }
+
+ private boolean setScreenBrightnessByUser(float brightness) {
+ if (!mAmbientLuxValid) {
+ // If we don't have a valid ambient lux then we don't have a valid brightness anyways,
+ // and we can't use this data to add a new control point to the short-term model.
+ return false;
+ }
+ mBrightnessMapper.addUserDataPoint(mAmbientLux, brightness);
+ // Reset the brightness adjustment so that the next time we're queried for brightness we
+ // return the value the user set.
+ mScreenAutoBrightnessAdjustment = 0.0f;
+ return true;
+ }
+
+ private void resetShortTermModel() {
+ mBrightnessMapper.clearUserDataPoints();
+ }
+
public boolean setBrightnessConfiguration(BrightnessConfiguration configuration) {
return mBrightnessMapper.setBrightnessConfiguration(configuration);
}
@@ -280,7 +344,7 @@
pw.println(" mScreenAutoBrightnessAdjustmentMaxGamma="
+ mScreenAutoBrightnessAdjustmentMaxGamma);
pw.println(" mLastScreenAutoBrightnessGamma=" + mLastScreenAutoBrightnessGamma);
- pw.println(" mDozing=" + mDozing);
+ pw.println(" mDisplayPolicy=" + mDisplayPolicy);
pw.println();
mBrightnessMapper.dump(pw);
@@ -364,6 +428,10 @@
if (DEBUG) {
Slog.d(TAG, "setAmbientLux(" + lux + ")");
}
+ if (lux < 0) {
+ Slog.w(TAG, "Ambient lux was negative, ignoring and setting to 0.");
+ lux = 0;
+ }
mAmbientLux = lux;
mBrighteningLuxThreshold = mDynamicHysteresis.getBrighteningThreshold(lux);
mDarkeningLuxThreshold = mDynamicHysteresis.getDarkeningThreshold(lux);
@@ -647,6 +715,10 @@
case MSG_BRIGHTNESS_ADJUSTMENT_SAMPLE:
collectBrightnessAdjustmentSample();
break;
+
+ case MSG_RESET_SHORT_TERM_MODEL:
+ resetShortTermModel();
+ break;
}
}
}
diff --git a/services/core/java/com/android/server/display/BrightnessMappingStrategy.java b/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
index ac0e1b5..001d4d9 100644
--- a/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
+++ b/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
@@ -30,6 +30,7 @@
import com.android.internal.annotations.VisibleForTesting;
import java.io.PrintWriter;
+import java.util.Arrays;
/**
* A utility to map from an ambient brightness to a display's "backlight" brightness based on the
@@ -42,6 +43,9 @@
private static final String TAG = "BrightnessMappingStrategy";
private static final boolean DEBUG = false;
+ private static final float LUX_GRAD_SMOOTHING = 0.25f;
+ private static final float MAX_GRAD = 1.0f;
+
@Nullable
public static BrightnessMappingStrategy create(Resources resources) {
float[] luxLevels = getLuxLevels(resources.getIntArray(
@@ -169,11 +173,32 @@
public abstract float getBrightness(float lux);
/**
- * Gets the display's brightness in nits for the given backlight value.
+ * Converts the provided backlight value to nits if possible.
*
* Returns -1.0f if there's no available mapping for the backlight to nits.
*/
- public abstract float getNits(int backlight);
+ public abstract float convertToNits(int backlight);
+
+ /**
+ * Adds a user interaction data point to the brightness mapping.
+ *
+ * This data point <b>must</b> exist on the brightness curve as a result of this call. This is
+ * so that the next time we come to query what the screen brightness should be, we get what the
+ * user requested rather than immediately changing to some other value.
+ *
+ * Currently, we only keep track of one of these at a time to constrain what can happen to the
+ * curve.
+ */
+ public abstract void addUserDataPoint(float lux, float brightness);
+
+ /**
+ * Removes any short term adjustments made to the curve from user interactions.
+ *
+ * Note that this does *not* reset the mapping to its initial state, any brightness
+ * configurations that have been applied will continue to be in effect. This solely removes the
+ * effects of user interactions on the model.
+ */
+ public abstract void clearUserDataPoints();
public abstract void dump(PrintWriter pw);
@@ -183,6 +208,112 @@
return (float) brightness / PowerManager.BRIGHTNESS_ON;
}
+ private static Spline createSpline(float[] x, float[] y) {
+ Spline spline = Spline.createSpline(x, y);
+ if (DEBUG) {
+ Slog.d(TAG, "Spline: " + spline);
+ for (float v = 1f; v < x[x.length - 1] * 1.25f; v *= 1.25f) {
+ Slog.d(TAG, String.format(" %7.1f: %7.1f", v, spline.interpolate(v)));
+ }
+ }
+ return spline;
+ }
+
+ private static Pair<float[], float[]> insertControlPoint(
+ float[] luxLevels, float[] brightnessLevels, float lux, float brightness) {
+ if (DEBUG) {
+ Slog.d(TAG, "Inserting new control point at (" + lux + ", " + brightness + ")");
+ }
+ final int idx = findInsertionPoint(luxLevels, lux);
+ final float[] newLuxLevels;
+ final float[] newBrightnessLevels;
+ if (idx == luxLevels.length) {
+ newLuxLevels = Arrays.copyOf(luxLevels, luxLevels.length + 1);
+ newBrightnessLevels = Arrays.copyOf(brightnessLevels, brightnessLevels.length + 1);
+ newLuxLevels[idx] = lux;
+ newBrightnessLevels[idx] = brightness;
+ } else if (luxLevels[idx] == lux) {
+ newLuxLevels = Arrays.copyOf(luxLevels, luxLevels.length);
+ newBrightnessLevels = Arrays.copyOf(brightnessLevels, brightnessLevels.length);
+ newBrightnessLevels[idx] = brightness;
+ } else {
+ newLuxLevels = Arrays.copyOf(luxLevels, luxLevels.length + 1);
+ System.arraycopy(newLuxLevels, idx, newLuxLevels, idx+1, luxLevels.length - idx);
+ newLuxLevels[idx] = lux;
+ newBrightnessLevels = Arrays.copyOf(brightnessLevels, brightnessLevels.length + 1);
+ System.arraycopy(newBrightnessLevels, idx, newBrightnessLevels, idx+1,
+ brightnessLevels.length - idx);
+ newBrightnessLevels[idx] = brightness;
+ }
+ smoothCurve(newLuxLevels, newBrightnessLevels, idx);
+ return Pair.create(newLuxLevels, newBrightnessLevels);
+ }
+
+ /**
+ * Returns the index of the first value that's less than or equal to {@code val}.
+ *
+ * This assumes that {@code arr} is sorted. If all values in {@code arr} are greater
+ * than val, then it will return the length of arr as the insertion point.
+ */
+ private static int findInsertionPoint(float[] arr, float val) {
+ for (int i = 0; i < arr.length; i++) {
+ if (val <= arr[i]) {
+ return i;
+ }
+ }
+ return arr.length;
+ }
+
+ private static void smoothCurve(float[] lux, float[] brightness, int idx) {
+ if (DEBUG) {
+ Slog.d(TAG, "smoothCurve(lux=" + Arrays.toString(lux)
+ + ", brightness=" + Arrays.toString(brightness)
+ + ", idx=" + idx + ")");
+ }
+ float prevLux = lux[idx];
+ float prevBrightness = brightness[idx];
+ // Smooth curve for data points above the newly introduced point
+ for (int i = idx+1; i < lux.length; i++) {
+ float currLux = lux[i];
+ float currBrightness = brightness[i];
+ float maxBrightness = prevBrightness * permissibleRatio(currLux, prevLux);
+ float newBrightness = MathUtils.constrain(
+ currBrightness, prevBrightness, maxBrightness);
+ if (newBrightness == currBrightness) {
+ break;
+ }
+ prevLux = currLux;
+ prevBrightness = newBrightness;
+ brightness[i] = newBrightness;
+ }
+
+ // Smooth curve for data points below the newly introduced point
+ prevLux = lux[idx];
+ prevBrightness = brightness[idx];
+ for (int i = idx-1; i >= 0; i--) {
+ float currLux = lux[i];
+ float currBrightness = brightness[i];
+ float minBrightness = prevBrightness * permissibleRatio(currLux, prevLux);
+ float newBrightness = MathUtils.constrain(
+ currBrightness, minBrightness, prevBrightness);
+ if (newBrightness == currBrightness) {
+ break;
+ }
+ prevLux = currLux;
+ prevBrightness = newBrightness;
+ brightness[i] = newBrightness;
+ }
+ if (DEBUG) {
+ Slog.d(TAG, "Smoothed Curve: lux=" + Arrays.toString(lux)
+ + ", brightness=" + Arrays.toString(brightness));
+ }
+ }
+
+ private static float permissibleRatio(float currLux, float prevLux) {
+ return MathUtils.exp(MAX_GRAD
+ * (MathUtils.log(currLux + LUX_GRAD_SMOOTHING)
+ - MathUtils.log(prevLux + LUX_GRAD_SMOOTHING)));
+ }
/**
* A {@link BrightnessMappingStrategy} that maps from ambient room brightness directly to the
@@ -192,7 +323,14 @@
* configurations that are set are just ignored.
*/
private static class SimpleMappingStrategy extends BrightnessMappingStrategy {
- private final Spline mSpline;
+ // Lux control points
+ private final float[] mLux;
+ // Brightness control points normalized to [0, 1]
+ private final float[] mBrightness;
+
+ private Spline mSpline;
+ private float mUserLux;
+ private float mUserBrightness;
public SimpleMappingStrategy(float[] lux, int[] brightness) {
Preconditions.checkArgument(lux.length != 0 && brightness.length != 0,
@@ -204,20 +342,16 @@
0, Integer.MAX_VALUE, "brightness");
final int N = brightness.length;
- float[] x = new float[N];
- float[] y = new float[N];
+ mLux = new float[N];
+ mBrightness = new float[N];
for (int i = 0; i < N; i++) {
- x[i] = lux[i];
- y[i] = normalizeAbsoluteBrightness(brightness[i]);
+ mLux[i] = lux[i];
+ mBrightness[i] = normalizeAbsoluteBrightness(brightness[i]);
}
- mSpline = Spline.createSpline(x, y);
- if (DEBUG) {
- Slog.d(TAG, "Auto-brightness spline: " + mSpline);
- for (float v = 1f; v < lux[lux.length - 1] * 1.25f; v *= 1.25f) {
- Slog.d(TAG, String.format(" %7.1f: %7.1f", v, mSpline.interpolate(v)));
- }
- }
+ mSpline = createSpline(mLux, mBrightness);
+ mUserLux = -1;
+ mUserBrightness = -1;
}
@Override
@@ -231,14 +365,36 @@
}
@Override
- public float getNits(int backlight) {
+ public float convertToNits(int backlight) {
return -1.0f;
}
@Override
+ public void addUserDataPoint(float lux, float brightness) {
+ if (DEBUG){
+ Slog.d(TAG, "addUserDataPoint(lux=" + lux + ", brightness=" + brightness + ")");
+ }
+ Pair<float[], float[]> curve = insertControlPoint(mLux, mBrightness, lux, brightness);
+ mSpline = createSpline(curve.first, curve.second);
+ mUserLux = lux;
+ mUserBrightness = brightness;
+ }
+
+ @Override
+ public void clearUserDataPoints() {
+ if (mUserLux != -1) {
+ mSpline = createSpline(mLux, mBrightness);
+ mUserLux = -1;
+ mUserBrightness = -1;
+ }
+ }
+
+ @Override
public void dump(PrintWriter pw) {
pw.println("SimpleMappingStrategy");
pw.println(" mSpline=" + mSpline);
+ pw.println(" mUserLux=" + mUserLux);
+ pw.println(" mUserBrightness=" + mUserBrightness);
}
}
@@ -261,13 +417,16 @@
// [0, 1.0].
private final Spline mNitsToBacklightSpline;
- // A spline mapping from the device's backlight value, normalized to the range [0, 1.0], to
- // a brightness in nits.
- private final Spline mBacklightToNitsSpline;
-
// The default brightness configuration.
private final BrightnessConfiguration mDefaultConfig;
+ // A spline mapping from the device's backlight value, normalized to the range [0, 1.0], to
+ // a brightness in nits.
+ private Spline mBacklightToNitsSpline;
+
+ private float mUserLux;
+ private float mUserBrightness;
+
public PhysicalMappingStrategy(BrightnessConfiguration config,
float[] nits, int[] backlight) {
Preconditions.checkArgument(nits.length != 0 && backlight.length != 0,
@@ -279,6 +438,9 @@
Preconditions.checkArrayElementsInRange(backlight,
PowerManager.BRIGHTNESS_OFF, PowerManager.BRIGHTNESS_ON, "backlight");
+ mUserLux = -1;
+ mUserBrightness = -1;
+
// Setup the backlight spline
final int N = nits.length;
float[] normalizedBacklight = new float[N];
@@ -286,15 +448,8 @@
normalizedBacklight[i] = normalizeAbsoluteBrightness(backlight[i]);
}
- mNitsToBacklightSpline = Spline.createSpline(nits, normalizedBacklight);
- mBacklightToNitsSpline = Spline.createSpline(normalizedBacklight, nits);
- if (DEBUG) {
- Slog.d(TAG, "Backlight spline: " + mNitsToBacklightSpline);
- for (float v = 1f; v < nits[nits.length - 1] * 1.25f; v *= 1.25f) {
- Slog.d(TAG, String.format(
- " %7.1f: %7.1f", v, mNitsToBacklightSpline.interpolate(v)));
- }
- }
+ mNitsToBacklightSpline = createSpline(nits, normalizedBacklight);
+ mBacklightToNitsSpline = createSpline(normalizedBacklight, nits);
mDefaultConfig = config;
setBrightnessConfiguration(config);
@@ -306,42 +461,59 @@
config = mDefaultConfig;
}
if (config.equals(mConfig)) {
- if (DEBUG) {
- Slog.d(TAG, "Tried to set an identical brightness config, ignoring");
- }
return false;
}
Pair<float[], float[]> curve = config.getCurve();
- mBrightnessSpline = Spline.createSpline(curve.first /*lux*/, curve.second /*nits*/);
- if (DEBUG) {
- Slog.d(TAG, "Brightness spline: " + mBrightnessSpline);
- final float[] lux = curve.first;
- for (float v = 1f; v < lux[lux.length - 1] * 1.25f; v *= 1.25f) {
- Slog.d(TAG, String.format(
- " %7.1f: %7.1f", v, mBrightnessSpline.interpolate(v)));
- }
- }
+ mBrightnessSpline = createSpline(curve.first /*lux*/, curve.second /*nits*/);
mConfig = config;
return true;
}
@Override
public float getBrightness(float lux) {
- return mNitsToBacklightSpline.interpolate(mBrightnessSpline.interpolate(lux));
+ float nits = mBrightnessSpline.interpolate(lux);
+ float backlight = mNitsToBacklightSpline.interpolate(nits);
+ return backlight;
}
@Override
- public float getNits(int backlight) {
+ public float convertToNits(int backlight) {
return mBacklightToNitsSpline.interpolate(normalizeAbsoluteBrightness(backlight));
}
@Override
+ public void addUserDataPoint(float lux, float backlight) {
+ if (DEBUG){
+ Slog.d(TAG, "addUserDataPoint(lux=" + lux + ", backlight=" + backlight + ")");
+ }
+ float brightness = mBacklightToNitsSpline.interpolate(backlight);
+ Pair<float[], float[]> defaultCurve = mConfig.getCurve();
+ Pair<float[], float[]> newCurve =
+ insertControlPoint(defaultCurve.first, defaultCurve.second, lux, brightness);
+ mBrightnessSpline = createSpline(newCurve.first, newCurve.second);
+ mUserLux = lux;
+ mUserBrightness = brightness;
+ }
+
+ @Override
+ public void clearUserDataPoints() {
+ if (mUserLux != -1) {
+ Pair<float[], float[]> defaultCurve = mConfig.getCurve();
+ mBrightnessSpline = createSpline(defaultCurve.first, defaultCurve.second);
+ mUserLux = -1;
+ mUserBrightness = -1;
+ }
+ }
+
+ @Override
public void dump(PrintWriter pw) {
pw.println("PhysicalMappingStrategy");
pw.println(" mConfig=" + mConfig);
pw.println(" mBrightnessSpline=" + mBrightnessSpline);
pw.println(" mNitsToBacklightSpline=" + mNitsToBacklightSpline);
+ pw.println(" mUserLux=" + mUserLux);
+ pw.println(" mUserBrightness=" + mUserBrightness);
}
}
}
diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java
index c77ec20..0c2ff05 100644
--- a/services/core/java/com/android/server/display/DisplayManagerService.java
+++ b/services/core/java/com/android/server/display/DisplayManagerService.java
@@ -1857,6 +1857,36 @@
}
}
+ @Override // Binder call
+ public void setTemporaryBrightness(int brightness) {
+ mContext.enforceCallingOrSelfPermission(
+ Manifest.permission.CONTROL_DISPLAY_BRIGHTNESS,
+ "Permission required to set the display's brightness");
+ final long token = Binder.clearCallingIdentity();
+ try {
+ synchronized (mSyncRoot) {
+ mDisplayPowerController.setTemporaryBrightness(brightness);
+ }
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+
+ @Override // Binder call
+ public void setTemporaryAutoBrightnessAdjustment(float adjustment) {
+ mContext.enforceCallingOrSelfPermission(
+ Manifest.permission.CONTROL_DISPLAY_BRIGHTNESS,
+ "Permission required to set the display's auto brightness adjustment");
+ final long token = Binder.clearCallingIdentity();
+ try {
+ synchronized (mSyncRoot) {
+ mDisplayPowerController.setTemporaryAutoBrightnessAdjustment(adjustment);
+ }
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+
private boolean validatePackageName(int uid, String packageName) {
if (packageName != null) {
String[] packageNames = mContext.getPackageManager().getPackagesForUid(uid);
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index d2b8e5c..80aec42 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -29,6 +29,7 @@
import android.content.Context;
import android.content.pm.ParceledListSlice;
import android.content.res.Resources;
+import android.database.ContentObserver;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
@@ -37,6 +38,7 @@
import android.hardware.display.BrightnessConfiguration;
import android.hardware.display.DisplayManagerInternal.DisplayPowerCallbacks;
import android.hardware.display.DisplayManagerInternal.DisplayPowerRequest;
+import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
@@ -44,6 +46,8 @@
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.Trace;
+import android.os.UserHandle;
+import android.provider.Settings;
import android.util.MathUtils;
import android.util.Slog;
import android.util.Spline;
@@ -99,6 +103,8 @@
private static final int MSG_SCREEN_ON_UNBLOCKED = 3;
private static final int MSG_SCREEN_OFF_UNBLOCKED = 4;
private static final int MSG_CONFIGURE_BRIGHTNESS = 5;
+ private static final int MSG_SET_TEMPORARY_BRIGHTNESS = 6;
+ private static final int MSG_SET_TEMPORARY_AUTO_BRIGHTNESS_ADJUSTMENT = 7;
private static final int PROXIMITY_UNKNOWN = -1;
private static final int PROXIMITY_NEGATIVE = 0;
@@ -144,6 +150,12 @@
// The display blanker.
private final DisplayBlanker mBlanker;
+ // Tracker for brightness changes.
+ private final BrightnessTracker mBrightnessTracker;
+
+ // Tracker for brightness settings changes.
+ private final SettingsObserver mSettingsObserver;
+
// The proximity sensor, or null if not available or needed.
private Sensor mProximitySensor;
@@ -159,6 +171,12 @@
// The maximum allowed brightness.
private final int mScreenBrightnessRangeMaximum;
+ // The default screen brightness.
+ private final int mScreenBrightnessDefault;
+
+ // The default screen brightness for VR.
+ private final int mScreenBrightnessForVrDefault;
+
// True if auto-brightness should be used.
private boolean mUseSoftwareAutoBrightnessConfig;
@@ -298,20 +316,42 @@
// The last brightness that was set by the user and not temporary. Set to -1 when a brightness
// has yet to be recorded.
- private int mLastBrightness;
+ private int mLastUserSetScreenBrightness;
+
+ // The screen brightenss setting has changed but not taken effect yet. If this is different
+ // from the current screen brightness setting then this is coming from something other than us
+ // and should be considered a user interaction.
+ private int mPendingScreenBrightnessSetting;
+
+ // The last observed screen brightness setting, either set by us or by the settings app on
+ // behalf of the user.
+ private int mCurrentScreenBrightnessSetting;
+
+ // The temporary screen brightness. Typically set when a user is interacting with the
+ // brightness slider but hasn't settled on a choice yet. Set to -1 when there's no temporary
+ // brightness set.
+ private int mTemporaryScreenBrightness;
+
+ // The current screen brightness while in VR mode.
+ private int mScreenBrightnessForVr;
// The last auto brightness adjustment that was set by the user and not temporary. Set to
// Float.NaN when an auto-brightness adjustment hasn't been recorded yet.
- private float mLastAutoBrightnessAdjustment;
+ private float mAutoBrightnessAdjustment;
+
+ // The pending auto brightness adjustment that will take effect on the next power state update.
+ private float mPendingAutoBrightnessAdjustment;
+
+ // The temporary auto brightness adjustment. Typically set when a user is interacting with the
+ // adjustment slider but hasn't settled on a choice yet. Set to Float.NaN when there's no
+ // temporary adjustment set.
+ private float mTemporaryAutoBrightnessAdjustment;
// Animators.
private ObjectAnimator mColorFadeOnAnimator;
private ObjectAnimator mColorFadeOffAnimator;
private RampAnimator<DisplayPowerState> mScreenBrightnessRampAnimator;
- // Tracker for brightness changes
- private final BrightnessTracker mBrightnessTracker;
-
/**
* Creates the display power controller.
*/
@@ -320,6 +360,7 @@
SensorManager sensorManager, DisplayBlanker blanker) {
mHandler = new DisplayControllerHandler(handler.getLooper());
mBrightnessTracker = new BrightnessTracker(context, null);
+ mSettingsObserver = new SettingsObserver(mHandler);
mCallbacks = callbacks;
mBatteryStats = BatteryStatsService.getService();
@@ -343,6 +384,10 @@
mScreenBrightnessRangeMaximum = clampAbsoluteBrightness(resources.getInteger(
com.android.internal.R.integer.config_screenBrightnessSettingMaximum));
+ mScreenBrightnessDefault = clampAbsoluteBrightness(resources.getInteger(
+ com.android.internal.R.integer.config_screenBrightnessSettingDefault));
+ mScreenBrightnessForVrDefault = clampAbsoluteBrightness(resources.getInteger(
+ com.android.internal.R.integer.config_screenBrightnessForVrSettingDefault));
mUseSoftwareAutoBrightnessConfig = resources.getBoolean(
com.android.internal.R.bool.config_automatic_brightness_available);
@@ -429,8 +474,11 @@
}
}
- mLastBrightness = -1;
- mLastAutoBrightnessAdjustment = Float.NaN;
+ mCurrentScreenBrightnessSetting = getScreenBrightnessSetting();
+ mScreenBrightnessForVr = getScreenBrightnessForVrSetting();
+ mAutoBrightnessAdjustment = getAutoBrightnessAdjustmentSetting();
+ mTemporaryScreenBrightness = -1;
+ mTemporaryAutoBrightnessAdjustment = Float.NaN;
}
/**
@@ -553,10 +601,17 @@
}
// Initialize all of the brightness tracking state
- final float brightness = getNits(mPowerState.getScreenBrightness());
+ final float brightness = convertToNits(mPowerState.getScreenBrightness());
if (brightness >= 0.0f) {
mBrightnessTracker.start(brightness);
}
+
+ mContext.getContentResolver().registerContentObserver(
+ Settings.System.getUriFor(Settings.System.SCREEN_BRIGHTNESS),
+ false /*notifyForDescendants*/, mSettingsObserver, UserHandle.USER_ALL);
+ mContext.getContentResolver().registerContentObserver(
+ Settings.System.getUriFor(Settings.System.SCREEN_AUTO_BRIGHTNESS_ADJ),
+ false /*notifyForDescendants*/, mSettingsObserver, UserHandle.USER_ALL);
}
private final Animator.AnimatorListener mAnimatorListener = new Animator.AnimatorListener() {
@@ -586,7 +641,6 @@
// Update the power state request.
final boolean mustNotify;
boolean mustInitialize = false;
- boolean autoBrightnessAdjustmentChanged = false;
synchronized (mLock) {
mPendingUpdatePowerStateLocked = false;
@@ -601,8 +655,6 @@
mPendingRequestChangedLocked = false;
mustInitialize = true;
} else if (mPendingRequestChangedLocked) {
- autoBrightnessAdjustmentChanged = (mPowerRequest.screenAutoBrightnessAdjustment
- != mPendingRequestLocked.screenAutoBrightnessAdjustment);
mPowerRequest.copyFrom(mPendingRequestLocked);
mWaitingForNegativeProximity |= mPendingWaitForNegativeProximityLocked;
mPendingWaitForNegativeProximityLocked = false;
@@ -691,6 +743,14 @@
brightness = PowerManager.BRIGHTNESS_OFF;
}
+ // Always use the VR brightness when in the VR state.
+ if (state == Display.STATE_VR) {
+ brightness = mScreenBrightnessForVr;
+ }
+
+ if (brightness < 0 && mPowerRequest.screenBrightnessOverride > 0) {
+ brightness = mPowerRequest.screenBrightnessOverride;
+ }
final boolean autoBrightnessEnabledInDoze =
mAllowAutoBrightnessWhileDozingConfig && Display.isDozeState(state);
@@ -698,56 +758,87 @@
&& (state == Display.STATE_ON || autoBrightnessEnabledInDoze)
&& brightness < 0
&& mAutomaticBrightnessController != null;
- final boolean brightnessAdjustmentChanged =
- !Float.isNaN(mLastAutoBrightnessAdjustment)
- && mPowerRequest.screenAutoBrightnessAdjustment != mLastAutoBrightnessAdjustment;
- final boolean brightnessChanged = mLastBrightness >= 0
- && mPowerRequest.screenBrightness != mLastBrightness;
+ boolean brightnessIsTemporary = false;
- // Update the last set brightness values.
- final boolean userInitiatedChange;
- if (mPowerRequest.brightnessSetByUser && !mPowerRequest.brightnessIsTemporary) {
- userInitiatedChange = autoBrightnessEnabled && brightnessAdjustmentChanged
- || !autoBrightnessEnabled && brightnessChanged;
- mLastBrightness = mPowerRequest.screenBrightness;
- mLastAutoBrightnessAdjustment = mPowerRequest.screenAutoBrightnessAdjustment;
- } else {
- userInitiatedChange = false;
+ final boolean userSetBrightnessChanged = updateUserSetScreenBrightness();
+ if (userSetBrightnessChanged) {
+ mTemporaryScreenBrightness = -1;
}
- // Configure auto-brightness.
- if (mAutomaticBrightnessController != null) {
- mAutomaticBrightnessController.configure(autoBrightnessEnabled,
- mBrightnessConfiguration, mPowerRequest.screenAutoBrightnessAdjustment,
- state != Display.STATE_ON, userInitiatedChange);
+ // Use the temporary screen brightness if there isn't an override, either from
+ // WindowManager or based on the display state.
+ if (mTemporaryScreenBrightness > 0) {
+ brightness = mTemporaryScreenBrightness;
+ brightnessIsTemporary = true;
+ }
+
+ final boolean autoBrightnessAdjustmentChanged = updateAutoBrightnessAdjustment();
+ if (autoBrightnessAdjustmentChanged) {
+ mTemporaryAutoBrightnessAdjustment = Float.NaN;
+ }
+
+ // Use the autobrightness adjustment override if set.
+ final float autoBrightnessAdjustment;
+ if (!Float.isNaN(mTemporaryAutoBrightnessAdjustment)) {
+ autoBrightnessAdjustment = mTemporaryAutoBrightnessAdjustment;
+ brightnessIsTemporary = true;
+ } else {
+ autoBrightnessAdjustment = mAutoBrightnessAdjustment;
}
// Apply brightness boost.
- // We do this here after configuring auto-brightness so that we don't
- // disable the light sensor during this temporary state. That way when
- // boost ends we will be able to resume normal auto-brightness behavior
- // without any delay.
+ // We do this here after deciding whether auto-brightness is enabled so that we don't
+ // disable the light sensor during this temporary state. That way when boost ends we will
+ // be able to resume normal auto-brightness behavior without any delay.
if (mPowerRequest.boostScreenBrightness
&& brightness != PowerManager.BRIGHTNESS_OFF) {
brightness = PowerManager.BRIGHTNESS_ON;
}
+ // If the brightness is already set then it's been overriden by something other than the
+ // user, or is a temporary adjustment.
+ final boolean userInitiatedChange = brightness < 0
+ && (autoBrightnessAdjustmentChanged || userSetBrightnessChanged);
+
+ // Configure auto-brightness.
+ if (mAutomaticBrightnessController != null) {
+ mAutomaticBrightnessController.configure(autoBrightnessEnabled,
+ mBrightnessConfiguration,
+ mLastUserSetScreenBrightness / (float) PowerManager.BRIGHTNESS_ON,
+ userSetBrightnessChanged, autoBrightnessAdjustment,
+ autoBrightnessAdjustmentChanged, mPowerRequest.policy);
+ }
+
// Apply auto-brightness.
boolean slowChange = false;
if (brightness < 0) {
+ float newAutoBrightnessAdjustment = autoBrightnessAdjustment;
if (autoBrightnessEnabled) {
brightness = mAutomaticBrightnessController.getAutomaticScreenBrightness();
+ newAutoBrightnessAdjustment =
+ mAutomaticBrightnessController.getAutomaticScreenBrightnessAdjustment();
}
+
if (brightness >= 0) {
// Use current auto-brightness value and slowly adjust to changes.
brightness = clampScreenBrightness(brightness);
if (mAppliedAutoBrightness && !autoBrightnessAdjustmentChanged) {
slowChange = true; // slowly adapt to auto-brightness
}
+ // Tell the rest of the system about the new brightness. Note that we do this
+ // before applying the low power or dim transformations so that the slider
+ // accurately represents the full possible range, even if they range changes what
+ // it means in absolute terms.
+ putScreenBrightnessSetting(brightness);
mAppliedAutoBrightness = true;
} else {
mAppliedAutoBrightness = false;
}
+ if (autoBrightnessAdjustment != newAutoBrightnessAdjustment) {
+ // If the autobrightness controller has decided to change the adjustment value
+ // used, make sure that's reflected in settings.
+ putAutoBrightnessAdjustmentSetting(newAutoBrightnessAdjustment);
+ }
} else {
mAppliedAutoBrightness = false;
}
@@ -758,13 +849,11 @@
}
// Apply manual brightness.
- // Use the current brightness setting from the request, which is expected
- // provide a nominal default value for the case where auto-brightness
- // is not ready yet.
if (brightness < 0) {
- brightness = clampScreenBrightness(mPowerRequest.screenBrightness);
+ brightness = clampScreenBrightness(mCurrentScreenBrightnessSetting);
}
+
// Apply dimming by at least some minimum amount when user activity
// timeout is about to expire.
if (mPowerRequest.policy == DisplayPowerRequest.POLICY_DIM) {
@@ -833,19 +922,17 @@
final boolean isDisplayContentVisible =
mColorFadeEnabled && mPowerState.getColorFadeLevel() == 1.0f;
if (initialRampSkip || hasBrightnessBuckets
- || wasOrWillBeInVr || !isDisplayContentVisible) {
+ || wasOrWillBeInVr || !isDisplayContentVisible || brightnessIsTemporary) {
animateScreenBrightness(brightness, 0);
} else {
animateScreenBrightness(brightness,
slowChange ? mBrightnessRampRateSlow : mBrightnessRampRateFast);
}
- final float brightnessInNits = getNits(brightness);
- if (!mPowerRequest.brightnessIsTemporary && brightnessInNits >= 0.0f) {
- // We only want to track changes made by the user and on devices that can actually
- // map the display backlight values into a physical brightness unit.
- mBrightnessTracker.notifyBrightnessChanged(brightnessInNits, userInitiatedChange);
+ if (!brightnessIsTemporary) {
+ notifyBrightnessChanged(brightness, userInitiatedChange);
}
+
}
// Determine whether the display is ready for use in the newly requested state.
@@ -913,6 +1000,18 @@
msg.sendToTarget();
}
+ public void setTemporaryBrightness(int brightness) {
+ Message msg = mHandler.obtainMessage(MSG_SET_TEMPORARY_BRIGHTNESS,
+ brightness, 0 /*unused*/);
+ msg.sendToTarget();
+ }
+
+ public void setTemporaryAutoBrightnessAdjustment(float adjustment) {
+ Message msg = mHandler.obtainMessage(MSG_SET_TEMPORARY_AUTO_BRIGHTNESS_ADJUSTMENT,
+ Float.floatToIntBits(adjustment), 0 /*unused*/);
+ msg.sendToTarget();
+ }
+
private void blockScreenOn() {
if (mPendingScreenOnUnblocker == null) {
Trace.asyncTraceBegin(Trace.TRACE_TAG_POWER, SCREEN_ON_BLOCKED_TRACE_NAME, 0);
@@ -1304,9 +1403,85 @@
mHandler.post(mOnStateChangedRunnable);
}
- private float getNits(int backlight) {
+ private void handleSettingsChange() {
+ mPendingScreenBrightnessSetting = getScreenBrightnessSetting();
+ mPendingAutoBrightnessAdjustment = getAutoBrightnessAdjustmentSetting();
+ // We don't bother with a pending variable for VR screen brightness since we just
+ // immediately adapt to it.
+ mScreenBrightnessForVr = getScreenBrightnessForVrSetting();
+ sendUpdatePowerState();
+ }
+
+ private float getAutoBrightnessAdjustmentSetting() {
+ final float adj = Settings.System.getFloatForUser(mContext.getContentResolver(),
+ Settings.System.SCREEN_AUTO_BRIGHTNESS_ADJ, 0.0f, UserHandle.USER_CURRENT);
+ return Float.isNaN(adj) ? 0.0f : clampAutoBrightnessAdjustment(adj);
+ }
+
+ private int getScreenBrightnessSetting() {
+ final int brightness = Settings.System.getIntForUser(mContext.getContentResolver(),
+ Settings.System.SCREEN_BRIGHTNESS, mScreenBrightnessDefault,
+ UserHandle.USER_CURRENT);
+ return clampAbsoluteBrightness(brightness);
+ }
+
+ private int getScreenBrightnessForVrSetting() {
+ final int brightness = Settings.System.getIntForUser(mContext.getContentResolver(),
+ Settings.System.SCREEN_BRIGHTNESS_FOR_VR, mScreenBrightnessForVrDefault,
+ UserHandle.USER_CURRENT);
+ return clampAbsoluteBrightness(brightness);
+ }
+
+ private void putScreenBrightnessSetting(int brightness) {
+ mCurrentScreenBrightnessSetting = brightness;
+ Settings.System.putIntForUser(mContext.getContentResolver(),
+ Settings.System.SCREEN_BRIGHTNESS, brightness, UserHandle.USER_CURRENT);
+ }
+
+ private void putAutoBrightnessAdjustmentSetting(float adjustment) {
+ mAutoBrightnessAdjustment = adjustment;
+ Settings.System.putFloatForUser(mContext.getContentResolver(),
+ Settings.System.SCREEN_AUTO_BRIGHTNESS_ADJ, adjustment, UserHandle.USER_CURRENT);
+ }
+
+ private boolean updateAutoBrightnessAdjustment() {
+ if (Float.isNaN(mPendingAutoBrightnessAdjustment)) {
+ return false;
+ }
+ if (mAutoBrightnessAdjustment == mPendingAutoBrightnessAdjustment) {
+ return false;
+ }
+ mAutoBrightnessAdjustment = mPendingAutoBrightnessAdjustment;
+ mPendingAutoBrightnessAdjustment = Float.NaN;
+ return true;
+ }
+
+ private boolean updateUserSetScreenBrightness() {
+ if (mPendingScreenBrightnessSetting < 0) {
+ return false;
+ }
+ if (mCurrentScreenBrightnessSetting == mPendingScreenBrightnessSetting) {
+ mPendingScreenBrightnessSetting = -1;
+ return false;
+ }
+ mLastUserSetScreenBrightness = mPendingScreenBrightnessSetting;
+ mPendingScreenBrightnessSetting = -1;
+ return true;
+ }
+
+ private void notifyBrightnessChanged(int brightness, boolean userInitiated) {
+ final float brightnessInNits = convertToNits(brightness);
+ if (brightnessInNits >= 0.0f) {
+ // We only want to track changes on devices that can actually map the display backlight
+ // values into a physical brightness unit since the value provided by the API is in
+ // nits and not using the arbitrary backlight units.
+ mBrightnessTracker.notifyBrightnessChanged(brightnessInNits, userInitiated);
+ }
+ }
+
+ private float convertToNits(int backlight) {
if (mBrightnessMapper != null) {
- return mBrightnessMapper.getNits(backlight);
+ return mBrightnessMapper.convertToNits(backlight);
} else {
return -1.0f;
}
@@ -1390,8 +1565,11 @@
pw.println(" mPendingProximityDebounceTime="
+ TimeUtils.formatUptime(mPendingProximityDebounceTime));
pw.println(" mScreenOffBecauseOfProximity=" + mScreenOffBecauseOfProximity);
- pw.println(" mLastBrightness=" + mLastBrightness);
- pw.println(" mLastAutoBrightnessAdjustment=" + mLastAutoBrightnessAdjustment);
+ pw.println(" mLastUserSetScreenBrightness=" + mLastUserSetScreenBrightness);
+ pw.println(" mCurrentScreenBrightnessSetting=" + mCurrentScreenBrightnessSetting);
+ pw.println(" mPendingScreenBrightnessSetting=" + mPendingScreenBrightnessSetting);
+ pw.println(" mAutoBrightnessAdjustment=" + mAutoBrightnessAdjustment);
+ pw.println(" mPendingAutoBrightnessAdjustment=" + mPendingAutoBrightnessAdjustment);
pw.println(" mAppliedAutoBrightness=" + mAppliedAutoBrightness);
pw.println(" mAppliedDimming=" + mAppliedDimming);
pw.println(" mAppliedLowPower=" + mAppliedLowPower);
@@ -1456,6 +1634,10 @@
return MathUtils.constrain(value, PowerManager.BRIGHTNESS_OFF, PowerManager.BRIGHTNESS_ON);
}
+ private static float clampAutoBrightnessAdjustment(float value) {
+ return MathUtils.constrain(value, -1.0f, 1.0f);
+ }
+
private final class DisplayControllerHandler extends Handler {
public DisplayControllerHandler(Looper looper) {
super(looper, null, true /*async*/);
@@ -1488,6 +1670,17 @@
mBrightnessConfiguration = (BrightnessConfiguration)msg.obj;
updatePowerState();
break;
+
+ case MSG_SET_TEMPORARY_BRIGHTNESS:
+ // TODO: Should we have a a timeout for the temporary brightness?
+ mTemporaryScreenBrightness = msg.arg1;
+ updatePowerState();
+ break;
+
+ case MSG_SET_TEMPORARY_AUTO_BRIGHTNESS_ADJUSTMENT:
+ mTemporaryAutoBrightnessAdjustment = Float.intBitsToFloat(msg.arg1);
+ updatePowerState();
+ break;
}
}
}
@@ -1509,6 +1702,18 @@
}
};
+
+ private final class SettingsObserver extends ContentObserver {
+ public SettingsObserver(Handler handler) {
+ super(handler);
+ }
+
+ @Override
+ public void onChange(boolean selfChange, Uri uri) {
+ handleSettingsChange();
+ }
+ }
+
private final class ScreenOnUnblocker implements WindowManagerPolicy.ScreenOnListener {
@Override
public void onScreenOn() {
diff --git a/services/core/java/com/android/server/display/PersistentDataStore.java b/services/core/java/com/android/server/display/PersistentDataStore.java
index cbf46f8..1af03de 100644
--- a/services/core/java/com/android/server/display/PersistentDataStore.java
+++ b/services/core/java/com/android/server/display/PersistentDataStore.java
@@ -771,7 +771,8 @@
private final AtomicFile mAtomicFile;
public Injector() {
- mAtomicFile = new AtomicFile(new File("/data/system/display-manager-state.xml"));
+ mAtomicFile = new AtomicFile(new File("/data/system/display-manager-state.xml"),
+ "display-state");
}
public InputStream openRead() throws FileNotFoundException {
diff --git a/services/core/java/com/android/server/fingerprint/FingerprintService.java b/services/core/java/com/android/server/fingerprint/FingerprintService.java
index 3e1958d..b5f94b1 100644
--- a/services/core/java/com/android/server/fingerprint/FingerprintService.java
+++ b/services/core/java/com/android/server/fingerprint/FingerprintService.java
@@ -45,6 +45,7 @@
import android.hardware.fingerprint.IFingerprintServiceLockoutResetCallback;
import android.hardware.fingerprint.IFingerprintServiceReceiver;
import android.os.Binder;
+import android.os.Build;
import android.os.Bundle;
import android.os.DeadObjectException;
import android.os.Environment;
@@ -58,6 +59,7 @@
import android.os.SELinux;
import android.os.ServiceManager;
import android.os.SystemClock;
+import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.security.KeyStore;
@@ -1419,8 +1421,17 @@
try {
userId = getUserOrWorkProfileId(clientPackage, userId);
if (userId != mCurrentUserId) {
- final File systemDir = Environment.getUserSystemDirectory(userId);
- final File fpDir = new File(systemDir, FP_DATA_DIR);
+ File baseDir;
+ if (Build.VERSION.FIRST_SDK_INT <= Build.VERSION_CODES.O_MR1
+ && !SystemProperties.getBoolean(
+ "ro.treble.supports_vendor_data", false)) {
+ // TODO(b/72405644) remove the override when possible.
+ baseDir = Environment.getUserSystemDirectory(userId);
+ } else {
+ baseDir = Environment.getDataVendorDeDirectory(userId);
+ }
+
+ File fpDir = new File(baseDir, FP_DATA_DIR);
if (!fpDir.exists()) {
if (!fpDir.mkdir()) {
Slog.v(TAG, "Cannot make directory: " + fpDir.getAbsolutePath());
@@ -1434,6 +1445,7 @@
return;
}
}
+
daemon.setActiveGroup(userId, fpDir.getAbsolutePath());
mCurrentUserId = userId;
}
diff --git a/services/core/java/com/android/server/input/PersistentDataStore.java b/services/core/java/com/android/server/input/PersistentDataStore.java
index f67e0fd..372db41 100644
--- a/services/core/java/com/android/server/input/PersistentDataStore.java
+++ b/services/core/java/com/android/server/input/PersistentDataStore.java
@@ -82,7 +82,8 @@
private boolean mDirty;
public PersistentDataStore() {
- mAtomicFile = new AtomicFile(new File("/data/system/input-manager-state.xml"));
+ mAtomicFile = new AtomicFile(new File("/data/system/input-manager-state.xml"),
+ "input-state");
}
public void saveIfNeeded() {
diff --git a/services/core/java/com/android/server/job/JobSchedulerInternal.java b/services/core/java/com/android/server/job/JobSchedulerInternal.java
index c97eeaf..08607bc 100644
--- a/services/core/java/com/android/server/job/JobSchedulerInternal.java
+++ b/services/core/java/com/android/server/job/JobSchedulerInternal.java
@@ -16,6 +16,7 @@
package com.android.server.job;
+import android.annotation.UserIdInt;
import android.app.job.JobInfo;
import java.util.List;
@@ -39,6 +40,14 @@
long nextHeartbeatForBucket(int bucket);
/**
+ * Heartbeat ordinal for the given app. This is typically the heartbeat at which
+ * the app last ran jobs, so that a newly-scheduled job in an app that hasn't run
+ * jobs in a long time is immediately runnable even if the app is bucketed into
+ * an infrequent time allocation.
+ */
+ public long baseHeartbeatForApp(String packageName, @UserIdInt int userId, int appBucket);
+
+ /**
* Returns a list of pending jobs scheduled by the system service.
*/
List<JobInfo> getSystemScheduledPendingJobs();
@@ -55,11 +64,18 @@
void removeBackingUpUid(int uid);
void clearAllBackingUpUids();
+ /**
+ * The user has started interacting with the app. Take any appropriate action.
+ */
+ void reportAppUsage(String packageName, int userId);
+
+ /**
+ * Report a snapshot of sync-related jobs back to the sync manager
+ */
JobStorePersistStats getPersistStats();
/**
* Stats about the first load after boot and the most recent save.
- * STOPSHIP Remove it and the relevant code once b/64536115 is fixed.
*/
public class JobStorePersistStats {
public int countAllJobsLoaded = -1;
diff --git a/services/core/java/com/android/server/job/JobSchedulerService.java b/services/core/java/com/android/server/job/JobSchedulerService.java
index fa5fdf5..8fa3318 100644
--- a/services/core/java/com/android/server/job/JobSchedulerService.java
+++ b/services/core/java/com/android/server/job/JobSchedulerService.java
@@ -19,8 +19,10 @@
import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER;
+import android.annotation.UserIdInt;
import android.app.Activity;
import android.app.ActivityManager;
+import android.app.ActivityManagerInternal;
import android.app.AppGlobals;
import android.app.IUidObserver;
import android.app.job.IJobScheduler;
@@ -38,6 +40,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.Intent.UriFlags;
import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
import android.content.pm.PackageManagerInternal;
@@ -73,8 +76,10 @@
import com.android.internal.os.BackgroundThread;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.DumpUtils;
+import com.android.internal.util.Preconditions;
import com.android.server.DeviceIdleController;
import com.android.server.FgThread;
+import com.android.server.ForceAppStandbyTracker;
import com.android.server.LocalServices;
import com.android.server.job.JobSchedulerServiceDumpProto.ActiveJob;
import com.android.server.job.JobSchedulerServiceDumpProto.PendingJob;
@@ -102,6 +107,7 @@
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
+import java.util.function.Predicate;
/**
* Responsible for taking jobs representing work to be performed by a client app, and determining
@@ -175,8 +181,10 @@
final JobSchedulerStub mJobSchedulerStub;
PackageManagerInternal mLocalPM;
+ ActivityManagerInternal mActivityManagerInternal;
IBatteryStats mBatteryStats;
DeviceIdleController.LocalService mLocalDeviceIdleController;
+ final ForceAppStandbyTracker mForceAppStandbyTracker;
/**
* Set to true once we are allowed to run third party apps.
@@ -778,6 +786,22 @@
mStartedUsers = ArrayUtils.removeInt(mStartedUsers, userHandle);
}
+ /**
+ * Return whether an UID is in the foreground or not.
+ */
+ private boolean isUidInForeground(int uid) {
+ synchronized (mLock) {
+ if (mUidPriorityOverride.get(uid, 0) > 0) {
+ return true;
+ }
+ }
+ // Note UID observer may not be called in time, so we always check with the AM.
+ return mActivityManagerInternal.getUidProcessState(uid)
+ <= ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE;
+ }
+
+ private final Predicate<Integer> mIsUidInForegroundPredicate = this::isUidInForeground;
+
public int scheduleAsPackage(JobInfo job, JobWorkItem work, int uId, String packageName,
int userId, String tag) {
try {
@@ -797,12 +821,25 @@
// Fast path: we are adding work to an existing job, and the JobInfo is not
// changing. We can just directly enqueue this work in to the job.
if (toCancel.getJob().equals(job)) {
+
toCancel.enqueueWorkLocked(ActivityManager.getService(), work);
+
+ // If any of work item is enqueued when the source is in the foreground,
+ // exempt the entire job.
+ toCancel.maybeAddForegroundExemption(mIsUidInForegroundPredicate);
+
return JobScheduler.RESULT_SUCCESS;
}
}
JobStatus jobStatus = JobStatus.createFromJobInfo(job, uId, packageName, userId, tag);
+
+ // Give exemption if the source is in the foreground just now.
+ // Note if it's a sync job, this method is called on the handler so it's not exactly
+ // the state when requestSync() was called, but that should be fine because of the
+ // 1 minute foreground grace period.
+ jobStatus.maybeAddForegroundExemption(mIsUidInForegroundPredicate);
+
if (DEBUG) Slog.d(TAG, "SCHEDULE: " + jobStatus.toShortString());
// Jobs on behalf of others don't apply to the per-app job cap
if (ENFORCE_MAX_JOBS && packageName == null) {
@@ -1034,6 +1071,11 @@
}
}
+ void reportAppUsage(String packageName, int userId) {
+ // This app just transitioned into interactive use or near equivalent, so we should
+ // take a look at its job state for feedback purposes.
+ }
+
/**
* Initializes the system service.
* <p>
@@ -1047,6 +1089,8 @@
super(context);
mLocalPM = LocalServices.getService(PackageManagerInternal.class);
+ mActivityManagerInternal = Preconditions.checkNotNull(
+ LocalServices.getService(ActivityManagerInternal.class));
mHandler = new JobHandler(context.getMainLooper());
mConstants = new Constants(mHandler);
@@ -1078,6 +1122,8 @@
mDeviceIdleJobsController = DeviceIdleJobsController.get(this);
mControllers.add(mDeviceIdleJobsController);
+ mForceAppStandbyTracker = ForceAppStandbyTracker.getInstance(context);
+
// If the job store determined that it can't yet reschedule persisted jobs,
// we need to start watching the clock.
if (!mJobs.jobTimesInflatedValid()) {
@@ -1137,6 +1183,9 @@
public void onBootPhase(int phase) {
if (PHASE_SYSTEM_SERVICES_READY == phase) {
mConstants.start(getContext().getContentResolver());
+
+ mForceAppStandbyTracker.start();
+
// Register br for package removals and user removals.
final IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
@@ -1765,7 +1814,9 @@
// If the app is in a non-active standby bucket, make sure we've waited
// an appropriate amount of time since the last invocation. During device-
// wide parole, standby bucketing is ignored.
- if (!mInParole) {
+ //
+ // But if a job has FLAG_EXEMPT_FROM_APP_STANDBY, don't check it.
+ if (!mInParole && !job.getJob().isExemptedFromAppStandby()) {
final int bucket = job.getStandbyBucket();
if (mHeartbeat < mNextBucketHeartbeat[bucket]) {
// Only skip this job if it's still waiting for the end of its (initial) nominal
@@ -2023,6 +2074,33 @@
}
/**
+ * Heartbeat ordinal for the given app. This is typically the heartbeat at which
+ * the app last ran jobs, so that a newly-scheduled job in an app that hasn't run
+ * jobs in a long time is immediately runnable even if the app is bucketed into
+ * an infrequent time allocation.
+ */
+ public long baseHeartbeatForApp(String packageName, @UserIdInt int userId,
+ final int appStandbyBucket) {
+ if (appStandbyBucket == 0 ||
+ appStandbyBucket >= mConstants.STANDBY_BEATS.length) {
+ // ACTIVE => everything can be run right away
+ // NEVER => we won't run them anyway, so let them go in the future
+ // as soon as the app enters normal use
+ return 0;
+ }
+
+ final long timeSinceLastJob = mStandbyTracker.getTimeSinceLastJobRun(
+ packageName, userId);
+ final long bucketLength = mConstants.STANDBY_BEATS[appStandbyBucket];
+ final long bucketsAgo = timeSinceLastJob / bucketLength;
+
+ // If we haven't run any jobs for more than the app's current bucket period, just
+ // consider anything new to be immediately runnable. Otherwise, base it on the
+ // bucket at which we last ran jobs.
+ return (bucketsAgo > bucketLength) ? 0 : (getCurrentHeartbeat() - bucketsAgo);
+ }
+
+ /**
* Returns a list of all pending jobs. A running job is not considered pending. Periodic
* jobs are always considered pending.
*/
@@ -2080,6 +2158,11 @@
}
@Override
+ public void reportAppUsage(String packageName, int userId) {
+ JobSchedulerService.this.reportAppUsage(packageName, userId);
+ }
+
+ @Override
public JobStorePersistStats getPersistStats() {
synchronized (mLock) {
return new JobStorePersistStats(mJobs.getPersistStats());
@@ -2097,10 +2180,14 @@
mUsageStats = usageStats;
}
+ public long getTimeSinceLastJobRun(String packageName, final @UserIdInt int userId) {
+ return mUsageStats.getTimeSinceLastJobRun(packageName, userId);
+ }
+
// AppIdleStateChangeListener interface for live updates
@Override
- public void onAppIdleStateChanged(final String packageName, final int userId,
+ public void onAppIdleStateChanged(final String packageName, final @UserIdInt int userId,
boolean idle, int bucket) {
final int uid = mLocalPM.getPackageUid(packageName,
PackageManager.MATCH_UNINSTALLED_PACKAGES, userId);
@@ -2137,6 +2224,40 @@
}
mInParole = isParoleOn;
}
+
+ @Override
+ public void onUserInteractionStarted(String packageName, int userId) {
+ final int uid = mLocalPM.getPackageUid(packageName,
+ PackageManager.MATCH_UNINSTALLED_PACKAGES, userId);
+ if (uid < 0) {
+ // Quietly ignore; the case is already logged elsewhere
+ return;
+ }
+
+ final long sinceLast = sElapsedRealtimeClock.millis() -
+ mUsageStats.getTimeSinceLastJobRun(packageName, userId);
+ final DeferredJobCounter counter = new DeferredJobCounter();
+ synchronized (mLock) {
+ mJobs.forEachJobForSourceUid(uid, counter);
+ }
+
+ mUsageStats.reportAppJobState(packageName, userId, counter.numDeferred(), sinceLast);
+ }
+ }
+
+ static class DeferredJobCounter implements JobStatusFunctor {
+ private int mDeferred = 0;
+
+ public int numDeferred() {
+ return mDeferred;
+ }
+
+ @Override
+ public void process(JobStatus job) {
+ if (job.getWhenStandbyDeferred() > 0) {
+ mDeferred++;
+ }
+ }
}
public static int standbyBucketToBucketIndex(int bucket) {
@@ -2220,6 +2341,22 @@
return canPersist;
}
+ private void validateJobFlags(JobInfo job, int callingUid) {
+ if ((job.getFlags() & JobInfo.FLAG_WILL_BE_FOREGROUND) != 0) {
+ getContext().enforceCallingOrSelfPermission(
+ android.Manifest.permission.CONNECTIVITY_INTERNAL, TAG);
+ }
+ if ((job.getFlags() & JobInfo.FLAG_EXEMPT_FROM_APP_STANDBY) != 0) {
+ if (callingUid != Process.SYSTEM_UID) {
+ throw new SecurityException("Job has invalid flags");
+ }
+ if (job.hasLateConstraint() || job.hasEarlyConstraint()) {
+ Slog.wtf(TAG, "Jobs with time-constraints mustn't have"
+ +" FLAG_EXEMPT_FROM_APP_STANDBY. Job=" + job);
+ }
+ }
+ }
+
// IJobScheduler implementation
@Override
public int schedule(JobInfo job) throws RemoteException {
@@ -2238,10 +2375,7 @@
}
}
- if ((job.getFlags() & JobInfo.FLAG_WILL_BE_FOREGROUND) != 0) {
- getContext().enforceCallingOrSelfPermission(
- android.Manifest.permission.CONNECTIVITY_INTERNAL, TAG);
- }
+ validateJobFlags(job, uid);
long ident = Binder.clearCallingIdentity();
try {
@@ -2269,10 +2403,7 @@
throw new NullPointerException("work is null");
}
- if ((job.getFlags() & JobInfo.FLAG_WILL_BE_FOREGROUND) != 0) {
- getContext().enforceCallingOrSelfPermission(
- android.Manifest.permission.CONNECTIVITY_INTERNAL, TAG);
- }
+ validateJobFlags(job, uid);
long ident = Binder.clearCallingIdentity();
try {
@@ -2303,10 +2434,7 @@
+ " not permitted to schedule jobs for other apps");
}
- if ((job.getFlags() & JobInfo.FLAG_WILL_BE_FOREGROUND) != 0) {
- getContext().enforceCallingOrSelfPermission(
- android.Manifest.permission.CONNECTIVITY_INTERNAL, TAG);
- }
+ validateJobFlags(job, callerUid);
long ident = Binder.clearCallingIdentity();
try {
diff --git a/services/core/java/com/android/server/job/JobServiceContext.java b/services/core/java/com/android/server/job/JobServiceContext.java
index 83a3c19..37b3990 100644
--- a/services/core/java/com/android/server/job/JobServiceContext.java
+++ b/services/core/java/com/android/server/job/JobServiceContext.java
@@ -24,6 +24,7 @@
import android.app.job.JobInfo;
import android.app.job.JobParameters;
import android.app.job.JobWorkItem;
+import android.app.usage.UsageStatsManagerInternal;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -46,6 +47,7 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.app.IBatteryStats;
import com.android.server.EventLogTags;
+import com.android.server.LocalServices;
import com.android.server.job.controllers.JobStatus;
/**
@@ -238,6 +240,11 @@
}
}
+ UsageStatsManagerInternal usageStats =
+ LocalServices.getService(UsageStatsManagerInternal.class);
+ usageStats.setLastJobRunTime(job.getSourcePackageName(), job.getSourceUserId(),
+ mExecutionStartTimeElapsed);
+
// Once we'e begun executing a job, we by definition no longer care whether
// it was inflated from disk with not-yet-coherent delay/deadline bounds.
job.clearPersistedUtcTimes();
@@ -400,7 +407,7 @@
(PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
runningJob.getTag());
- wl.setWorkSource(new WorkSource(runningJob.getSourceUid()));
+ wl.setWorkSource(deriveWorkSource(runningJob));
wl.setReferenceCounted(false);
wl.acquire();
@@ -419,6 +426,19 @@
}
}
+ private WorkSource deriveWorkSource(JobStatus runningJob) {
+ final int jobUid = runningJob.getSourceUid();
+ if (WorkSource.isChainedBatteryAttributionEnabled(mContext)) {
+ WorkSource workSource = new WorkSource();
+ workSource.createWorkChain()
+ .addNode(jobUid, null)
+ .addNode(android.os.Process.SYSTEM_UID, "JobScheduler");
+ return workSource;
+ } else {
+ return new WorkSource(jobUid);
+ }
+ }
+
/** If the client service crashes we reschedule this job and clean up. */
@Override
public void onServiceDisconnected(ComponentName name) {
diff --git a/services/core/java/com/android/server/job/JobStore.java b/services/core/java/com/android/server/job/JobStore.java
index 36cacd7a..cf27882 100644
--- a/services/core/java/com/android/server/job/JobStore.java
+++ b/services/core/java/com/android/server/job/JobStore.java
@@ -29,6 +29,7 @@
import android.os.Handler;
import android.os.PersistableBundle;
import android.os.Process;
+import android.os.SystemClock;
import android.os.UserHandle;
import android.text.format.DateUtils;
import android.util.ArraySet;
@@ -61,6 +62,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
+import java.util.function.Predicate;
/**
* Maintains the master list of jobs that the job scheduler is tracking. These jobs are compared by
@@ -72,6 +74,9 @@
* This is important b/c {@link com.android.server.job.JobStore.WriteJobsMapToDiskRunnable}
* and {@link com.android.server.job.JobStore.ReadJobMapFromDiskRunnable} lock on that
* object.
+ *
+ * Test:
+ * atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
*/
public final class JobStore {
private static final String TAG = "JobStore";
@@ -81,7 +86,7 @@
private static final int MAX_OPS_BEFORE_WRITE = 1;
final Object mLock;
- final JobSet mJobSet; // per-caller-uid tracking
+ final JobSet mJobSet; // per-caller-uid and per-source-uid tracking
final Context mContext;
// Bookkeeping around incorrect boot-time system clock
@@ -130,7 +135,7 @@
File systemDir = new File(dataDir, "system");
File jobDir = new File(systemDir, "job");
jobDir.mkdirs();
- mJobsFile = new AtomicFile(new File(jobDir, "jobs.xml"));
+ mJobsFile = new AtomicFile(new File(jobDir, "jobs.xml"), "jobs");
mJobSet = new JobSet();
@@ -358,6 +363,7 @@
int numSystemJobs = 0;
int numSyncJobs = 0;
try {
+ final long startTime = SystemClock.uptimeMillis();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
XmlSerializer out = new FastXmlSerializer();
out.setOutput(baos, StandardCharsets.UTF_8.name());
@@ -390,7 +396,7 @@
out.endDocument();
// Write out to disk in one fell swoop.
- FileOutputStream fos = mJobsFile.startWrite();
+ FileOutputStream fos = mJobsFile.startWrite(startTime);
fos.write(baos.toByteArray());
mJobsFile.finishWrite(fos);
mDirtyOperations = 0;
@@ -427,6 +433,9 @@
out.attribute(null, "uid", Integer.toString(jobStatus.getUid()));
out.attribute(null, "priority", String.valueOf(jobStatus.getPriority()));
out.attribute(null, "flags", String.valueOf(jobStatus.getFlags()));
+ if (jobStatus.getInternalFlags() != 0) {
+ out.attribute(null, "internalFlags", String.valueOf(jobStatus.getInternalFlags()));
+ }
out.attribute(null, "lastSuccessfulRunTime",
String.valueOf(jobStatus.getLastSuccessfulRunTime()));
@@ -689,6 +698,7 @@
int uid, sourceUserId;
long lastSuccessfulRunTime;
long lastFailedRunTime;
+ int internalFlags = 0;
// Read out job identifier attributes and priority.
try {
@@ -704,6 +714,10 @@
if (val != null) {
jobBuilder.setFlags(Integer.parseInt(val));
}
+ val = parser.getAttributeValue(null, "internalFlags");
+ if (val != null) {
+ internalFlags = Integer.parseInt(val);
+ }
val = parser.getAttributeValue(null, "sourceUserId");
sourceUserId = val == null ? -1 : Integer.parseInt(val);
@@ -718,7 +732,6 @@
}
String sourcePackageName = parser.getAttributeValue(null, "sourcePackageName");
-
final String sourceTag = parser.getAttributeValue(null, "sourceTag");
int eventType;
@@ -857,7 +870,7 @@
appBucket, currentHeartbeat, sourceTag,
elapsedRuntimes.first, elapsedRuntimes.second,
lastSuccessfulRunTime, lastFailedRunTime,
- (rtcIsGood) ? null : rtcRuntimes);
+ (rtcIsGood) ? null : rtcRuntimes, internalFlags);
return js;
}
@@ -988,10 +1001,11 @@
}
static final class JobSet {
- // Key is the getUid() originator of the jobs in each sheaf
- private SparseArray<ArraySet<JobStatus>> mJobs;
- // Same data but with the key as getSourceUid() of the jobs in each sheaf
- private SparseArray<ArraySet<JobStatus>> mJobsPerSourceUid;
+ @VisibleForTesting // Key is the getUid() originator of the jobs in each sheaf
+ final SparseArray<ArraySet<JobStatus>> mJobs;
+
+ @VisibleForTesting // Same data but with the key as getSourceUid() of the jobs in each sheaf
+ final SparseArray<ArraySet<JobStatus>> mJobsPerSourceUid;
public JobSet() {
mJobs = new SparseArray<ArraySet<JobStatus>>();
@@ -1034,7 +1048,13 @@
jobsForSourceUid = new ArraySet<>();
mJobsPerSourceUid.put(sourceUid, jobsForSourceUid);
}
- return jobs.add(job) && jobsForSourceUid.add(job);
+ final boolean added = jobs.add(job);
+ final boolean addedInSource = jobsForSourceUid.add(job);
+ if (added != addedInSource) {
+ Slog.wtf(TAG, "mJobs and mJobsPerSourceUid mismatch; caller= " + added
+ + " source= " + addedInSource);
+ }
+ return added || addedInSource;
}
public boolean remove(JobStatus job) {
@@ -1042,13 +1062,18 @@
final ArraySet<JobStatus> jobs = mJobs.get(uid);
final int sourceUid = job.getSourceUid();
final ArraySet<JobStatus> jobsForSourceUid = mJobsPerSourceUid.get(sourceUid);
- boolean didRemove = jobs != null && jobs.remove(job) && jobsForSourceUid.remove(job);
- if (didRemove) {
- if (jobs.size() == 0) {
- // no more jobs for this uid; let the now-empty set object be GC'd.
+ final boolean didRemove = jobs != null && jobs.remove(job);
+ final boolean sourceRemove = jobsForSourceUid != null && jobsForSourceUid.remove(job);
+ if (didRemove != sourceRemove) {
+ Slog.wtf(TAG, "Job presence mismatch; caller=" + didRemove
+ + " source=" + sourceRemove);
+ }
+ if (didRemove || sourceRemove) {
+ // no more jobs for this uid? let the now-empty set objects be GC'd.
+ if (jobs != null && jobs.size() == 0) {
mJobs.remove(uid);
}
- if (jobsForSourceUid.size() == 0) {
+ if (jobsForSourceUid != null && jobsForSourceUid.size() == 0) {
mJobsPerSourceUid.remove(sourceUid);
}
return true;
@@ -1058,27 +1083,40 @@
/**
* Removes the jobs of all users not specified by the whitelist of user ids.
- * The jobs scheduled by non existent users will not be removed if they were
+ * This will remove jobs scheduled *by* non-existent users as well as jobs scheduled *for*
+ * non-existent users
*/
- public void removeJobsOfNonUsers(int[] whitelist) {
- for (int jobSetIndex = mJobsPerSourceUid.size() - 1; jobSetIndex >= 0; jobSetIndex--) {
- final int jobUserId = UserHandle.getUserId(mJobsPerSourceUid.keyAt(jobSetIndex));
- if (!ArrayUtils.contains(whitelist, jobUserId)) {
- mJobsPerSourceUid.removeAt(jobSetIndex);
- }
- }
+ public void removeJobsOfNonUsers(final int[] whitelist) {
+ final Predicate<JobStatus> noSourceUser =
+ job -> !ArrayUtils.contains(whitelist, job.getSourceUserId());
+ final Predicate<JobStatus> noCallingUser =
+ job -> !ArrayUtils.contains(whitelist, job.getUserId());
+ removeAll(noSourceUser.or(noCallingUser));
+ }
+
+ private void removeAll(Predicate<JobStatus> predicate) {
for (int jobSetIndex = mJobs.size() - 1; jobSetIndex >= 0; jobSetIndex--) {
- final ArraySet<JobStatus> jobsForUid = mJobs.valueAt(jobSetIndex);
- for (int jobIndex = jobsForUid.size() - 1; jobIndex >= 0; jobIndex--) {
- final int jobUserId = jobsForUid.valueAt(jobIndex).getUserId();
- if (!ArrayUtils.contains(whitelist, jobUserId)) {
- jobsForUid.removeAt(jobIndex);
+ final ArraySet<JobStatus> jobs = mJobs.valueAt(jobSetIndex);
+ for (int jobIndex = jobs.size() - 1; jobIndex >= 0; jobIndex--) {
+ if (predicate.test(jobs.valueAt(jobIndex))) {
+ jobs.removeAt(jobIndex);
}
}
- if (jobsForUid.size() == 0) {
+ if (jobs.size() == 0) {
mJobs.removeAt(jobSetIndex);
}
}
+ for (int jobSetIndex = mJobsPerSourceUid.size() - 1; jobSetIndex >= 0; jobSetIndex--) {
+ final ArraySet<JobStatus> jobs = mJobsPerSourceUid.valueAt(jobSetIndex);
+ for (int jobIndex = jobs.size() - 1; jobIndex >= 0; jobIndex--) {
+ if (predicate.test(jobs.valueAt(jobIndex))) {
+ jobs.removeAt(jobIndex);
+ }
+ }
+ if (jobs.size() == 0) {
+ mJobsPerSourceUid.removeAt(jobSetIndex);
+ }
+ }
}
public boolean contains(JobStatus job) {
diff --git a/services/core/java/com/android/server/job/controllers/BackgroundJobsController.java b/services/core/java/com/android/server/job/controllers/BackgroundJobsController.java
index 1d053a5..2e4567a 100644
--- a/services/core/java/com/android/server/job/controllers/BackgroundJobsController.java
+++ b/services/core/java/com/android/server/job/controllers/BackgroundJobsController.java
@@ -197,7 +197,9 @@
final int uid = jobStatus.getSourceUid();
final String packageName = jobStatus.getSourcePackageName();
- final boolean canRun = !mForceAppStandbyTracker.areJobsRestricted(uid, packageName);
+ final boolean canRun = !mForceAppStandbyTracker.areJobsRestricted(uid, packageName,
+ (jobStatus.getInternalFlags() & JobStatus.INTERNAL_FLAG_HAS_FOREGROUND_EXEMPTION)
+ != 0);
return jobStatus.setBackgroundNotRestrictedConstraintSatisfied(canRun);
}
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 611f4ec..08ff7bd 100644
--- a/services/core/java/com/android/server/job/controllers/JobStatus.java
+++ b/services/core/java/com/android/server/job/controllers/JobStatus.java
@@ -46,6 +46,7 @@
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.function.Predicate;
/**
* Uniquely identifies a job internally.
@@ -184,6 +185,21 @@
*/
private int trackingControllers;
+ /**
+ * Flag for {@link #mInternalFlags}: this job was scheduled when the app that owns the job
+ * service (not necessarily the caller) was in the foreground and the job has no time
+ * constraints, which makes it exempted from the battery saver job restriction.
+ *
+ * @hide
+ */
+ public static final int INTERNAL_FLAG_HAS_FOREGROUND_EXEMPTION = 1 << 0;
+
+ /**
+ * Versatile, persistable flags for a job that's updated within the system server,
+ * as opposed to {@link JobInfo#flags} that's set by callers.
+ */
+ private int mInternalFlags;
+
// These are filled in by controllers when preparing for execution.
public ArraySet<Uri> changedUris;
public ArraySet<String> changedAuthorities;
@@ -248,7 +264,7 @@
private JobStatus(JobInfo job, int callingUid, int targetSdkVersion, String sourcePackageName,
int sourceUserId, int standbyBucket, long heartbeat, String tag, int numFailures,
long earliestRunTimeElapsedMillis, long latestRunTimeElapsedMillis,
- long lastSuccessfulRunTime, long lastFailedRunTime) {
+ long lastSuccessfulRunTime, long lastFailedRunTime, int internalFlags) {
this.job = job;
this.callingUid = callingUid;
this.targetSdkVersion = targetSdkVersion;
@@ -304,6 +320,8 @@
mLastSuccessfulRunTime = lastSuccessfulRunTime;
mLastFailedRunTime = lastFailedRunTime;
+ mInternalFlags = internalFlags;
+
updateEstimatedNetworkBytesLocked();
}
@@ -315,7 +333,8 @@
jobStatus.getStandbyBucket(), jobStatus.getBaseHeartbeat(),
jobStatus.getSourceTag(), jobStatus.getNumFailures(),
jobStatus.getEarliestRunTime(), jobStatus.getLatestRunTimeElapsed(),
- jobStatus.getLastSuccessfulRunTime(), jobStatus.getLastFailedRunTime());
+ jobStatus.getLastSuccessfulRunTime(), jobStatus.getLastFailedRunTime(),
+ jobStatus.getInternalFlags());
mPersistedUtcTimes = jobStatus.mPersistedUtcTimes;
if (jobStatus.mPersistedUtcTimes != null) {
if (DEBUG) {
@@ -336,12 +355,13 @@
int standbyBucket, long baseHeartbeat, String sourceTag,
long earliestRunTimeElapsedMillis, long latestRunTimeElapsedMillis,
long lastSuccessfulRunTime, long lastFailedRunTime,
- Pair<Long, Long> persistedExecutionTimesUTC) {
+ Pair<Long, Long> persistedExecutionTimesUTC,
+ int innerFlags) {
this(job, callingUid, resolveTargetSdkVersion(job), sourcePkgName, sourceUserId,
standbyBucket, baseHeartbeat,
sourceTag, 0,
earliestRunTimeElapsedMillis, latestRunTimeElapsedMillis,
- lastSuccessfulRunTime, lastFailedRunTime);
+ lastSuccessfulRunTime, lastFailedRunTime, innerFlags);
// Only during initial inflation do we record the UTC-timebase execution bounds
// read from the persistent store. If we ever have to recreate the JobStatus on
@@ -365,7 +385,7 @@
rescheduling.getStandbyBucket(), newBaseHeartbeat,
rescheduling.getSourceTag(), backoffAttempt, newEarliestRuntimeElapsedMillis,
newLatestRuntimeElapsedMillis,
- lastSuccessfulRunTime, lastFailedRunTime);
+ lastSuccessfulRunTime, lastFailedRunTime, rescheduling.getInternalFlags());
}
/**
@@ -394,11 +414,14 @@
int standbyBucket = JobSchedulerService.standbyBucketForPackage(jobPackage,
sourceUserId, elapsedNow);
JobSchedulerInternal js = LocalServices.getService(JobSchedulerInternal.class);
- long currentHeartbeat = js != null ? js.currentHeartbeat() : 0;
+ long currentHeartbeat = js != null
+ ? js.baseHeartbeatForApp(jobPackage, sourceUserId, standbyBucket)
+ : 0;
return new JobStatus(job, callingUid, resolveTargetSdkVersion(job), sourcePkg, sourceUserId,
standbyBucket, currentHeartbeat, tag, 0,
earliestRunTimeElapsedMillis, latestRunTimeElapsedMillis,
- 0 /* lastSuccessfulRunTime */, 0 /* lastFailedRunTime */);
+ 0 /* lastSuccessfulRunTime */, 0 /* lastFailedRunTime */,
+ /*innerFlags=*/ 0);
}
public void enqueueWorkLocked(IActivityManager am, JobWorkItem work) {
@@ -623,6 +646,28 @@
return job.getFlags();
}
+ public int getInternalFlags() {
+ return mInternalFlags;
+ }
+
+ public void addInternalFlags(int flags) {
+ mInternalFlags |= flags;
+ }
+
+ public void maybeAddForegroundExemption(Predicate<Integer> uidForegroundChecker) {
+ // Jobs with time constraints shouldn't be exempted.
+ if (job.hasEarlyConstraint() || job.hasLateConstraint()) {
+ return;
+ }
+ // Already exempted, skip the foreground check.
+ if ((mInternalFlags & INTERNAL_FLAG_HAS_FOREGROUND_EXEMPTION) != 0) {
+ return;
+ }
+ if (uidForegroundChecker.test(getSourceUid())) {
+ addInternalFlags(INTERNAL_FLAG_HAS_FOREGROUND_EXEMPTION);
+ }
+ }
+
private void updateEstimatedNetworkBytesLocked() {
totalNetworkBytes = computeEstimatedNetworkBytesLocked();
}
@@ -1170,6 +1215,15 @@
pw.print(prefix); pw.print(" Flags: ");
pw.println(Integer.toHexString(job.getFlags()));
}
+ if (getInternalFlags() != 0) {
+ pw.print(prefix); pw.print(" Internal flags: ");
+ pw.print(Integer.toHexString(getInternalFlags()));
+
+ if ((getInternalFlags()&INTERNAL_FLAG_HAS_FOREGROUND_EXEMPTION) != 0) {
+ pw.print(" HAS_FOREGROUND_EXEMPTION");
+ }
+ pw.println();
+ }
pw.print(prefix); pw.print(" Requires: charging=");
pw.print(job.isRequireCharging()); pw.print(" batteryNotLow=");
pw.print(job.isRequireBatteryNotLow()); pw.print(" deviceIdle=");
@@ -1325,6 +1379,7 @@
proto.write(JobStatusDumpProto.SOURCE_UID, getSourceUid());
proto.write(JobStatusDumpProto.SOURCE_USER_ID, getSourceUserId());
proto.write(JobStatusDumpProto.SOURCE_PACKAGE_NAME, getSourcePackageName());
+ proto.write(JobStatusDumpProto.INTERNAL_FLAGS, getInternalFlags());
if (full) {
final long jiToken = proto.start(JobStatusDumpProto.JOB_INFO);
diff --git a/services/core/java/com/android/server/job/controllers/TimeController.java b/services/core/java/com/android/server/job/controllers/TimeController.java
index bbee0eb..a91f5a4 100644
--- a/services/core/java/com/android/server/job/controllers/TimeController.java
+++ b/services/core/java/com/android/server/job/controllers/TimeController.java
@@ -18,9 +18,11 @@
import static com.android.server.job.JobSchedulerService.sElapsedRealtimeClock;
+import android.annotation.Nullable;
import android.app.AlarmManager;
import android.app.AlarmManager.OnAlarmListener;
import android.content.Context;
+import android.os.Process;
import android.os.UserHandle;
import android.os.WorkSource;
import android.util.Slog;
@@ -52,6 +54,8 @@
private long mNextJobExpiredElapsedMillis;
private long mNextDelayExpiredElapsedMillis;
+ private final boolean mChainedAttributionEnabled;
+
private AlarmManager mAlarmService = null;
/** List of tracked jobs, sorted asc. by deadline */
private final List<JobStatus> mTrackedJobs = new LinkedList<>();
@@ -71,6 +75,7 @@
mNextJobExpiredElapsedMillis = Long.MAX_VALUE;
mNextDelayExpiredElapsedMillis = Long.MAX_VALUE;
+ mChainedAttributionEnabled = WorkSource.isChainedBatteryAttributionEnabled(context);
}
/**
@@ -113,7 +118,7 @@
maybeUpdateAlarmsLocked(
job.hasTimingDelayConstraint() ? job.getEarliestRunTime() : Long.MAX_VALUE,
job.hasDeadlineConstraint() ? job.getLatestRunTimeElapsed() : Long.MAX_VALUE,
- new WorkSource(job.getSourceUid(), job.getSourcePackageName()));
+ deriveWorkSource(job.getSourceUid(), job.getSourcePackageName()));
}
}
@@ -179,9 +184,8 @@
break;
}
}
- setDeadlineExpiredAlarmLocked(nextExpiryTime, nextExpiryPackageName != null
- ? new WorkSource(nextExpiryUid, nextExpiryPackageName)
- : new WorkSource(nextExpiryUid));
+ setDeadlineExpiredAlarmLocked(nextExpiryTime,
+ deriveWorkSource(nextExpiryUid, nextExpiryPackageName));
}
}
@@ -236,9 +240,20 @@
if (ready) {
mStateChangedListener.onControllerStateChanged();
}
- setDelayExpiredAlarmLocked(nextDelayTime, nextDelayPackageName != null
- ? new WorkSource(nextDelayUid, nextDelayPackageName)
- : new WorkSource(nextDelayUid));
+ setDelayExpiredAlarmLocked(nextDelayTime,
+ deriveWorkSource(nextDelayUid, nextDelayPackageName));
+ }
+ }
+
+ private WorkSource deriveWorkSource(int uid, @Nullable String packageName) {
+ if (mChainedAttributionEnabled) {
+ WorkSource ws = new WorkSource();
+ ws.createWorkChain()
+ .addNode(uid, packageName)
+ .addNode(Process.SYSTEM_UID, "JobScheduler");
+ return ws;
+ } else {
+ return packageName == null ? new WorkSource(uid) : new WorkSource(uid, packageName);
}
}
diff --git a/services/core/java/com/android/server/location/GnssLocationProvider.java b/services/core/java/com/android/server/location/GnssLocationProvider.java
index 48d275c..55c0f5a 100644
--- a/services/core/java/com/android/server/location/GnssLocationProvider.java
+++ b/services/core/java/com/android/server/location/GnssLocationProvider.java
@@ -64,6 +64,7 @@
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.WorkSource;
+import android.os.WorkSource.WorkChain;
import android.provider.Settings;
import android.provider.Telephony.Carriers;
import android.provider.Telephony.Sms.Intents;
@@ -346,7 +347,8 @@
// Current request from underlying location clients.
private ProviderRequest mProviderRequest = null;
- // Current list of underlying location clients.
+ // The WorkSource associated with the most recent client request (i.e, most recent call to
+ // setRequest).
private WorkSource mWorkSource = null;
// True if gps should be disabled (used to support battery saver mode in settings).
private boolean mDisableGps = false;
@@ -408,6 +410,7 @@
private final IAppOpsService mAppOpsService;
private final IBatteryStats mBatteryStats;
+ // Current list of underlying location clients.
// only modified on handler thread
private WorkSource mClientSource = new WorkSource();
@@ -1345,46 +1348,80 @@
}
private void updateClientUids(WorkSource source) {
- // Update work source.
- WorkSource[] changes = mClientSource.setReturningDiffs(source);
- if (changes == null) {
+ if (source.equals(mClientSource)) {
return;
}
- WorkSource newWork = changes[0];
- WorkSource goneWork = changes[1];
- // Update sources that were not previously tracked.
- if (newWork != null) {
- int lastuid = -1;
- for (int i = 0; i < newWork.size(); i++) {
- try {
- int uid = newWork.get(i);
- mAppOpsService.startOperation(AppOpsManager.getToken(mAppOpsService),
- AppOpsManager.OP_GPS, uid, newWork.getName(i));
- if (uid != lastuid) {
- lastuid = uid;
- mBatteryStats.noteStartGps(uid);
- }
- } catch (RemoteException e) {
- Log.w(TAG, "RemoteException", e);
- }
- }
+ // (1) Inform BatteryStats that the list of IDs we're tracking changed.
+ try {
+ mBatteryStats.noteGpsChanged(mClientSource, source);
+ } catch (RemoteException e) {
+ Log.w(TAG, "RemoteException", e);
}
- // Update sources that are no longer tracked.
- if (goneWork != null) {
- int lastuid = -1;
- for (int i = 0; i < goneWork.size(); i++) {
- try {
- int uid = goneWork.get(i);
- mAppOpsService.finishOperation(AppOpsManager.getToken(mAppOpsService),
- AppOpsManager.OP_GPS, uid, goneWork.getName(i));
- if (uid != lastuid) {
- lastuid = uid;
- mBatteryStats.noteStopGps(uid);
+ // (2) Inform AppOps service about the list of changes to UIDs.
+
+ List<WorkChain>[] diffs = WorkSource.diffChains(mClientSource, source);
+ if (diffs != null) {
+ List<WorkChain> newChains = diffs[0];
+ List<WorkChain> goneChains = diffs[1];
+
+ if (newChains != null) {
+ for (int i = 0; i < newChains.size(); ++i) {
+ final WorkChain newChain = newChains.get(i);
+ try {
+ mAppOpsService.startOperation(AppOpsManager.getToken(mAppOpsService),
+ AppOpsManager.OP_GPS, newChain.getAttributionUid(),
+ newChain.getAttributionTag());
+ } catch (RemoteException e) {
+ Log.w(TAG, "RemoteException", e);
}
- } catch (RemoteException e) {
- Log.w(TAG, "RemoteException", e);
+ }
+ }
+
+ if (goneChains != null) {
+ for (int i = 0; i < goneChains.size(); i++) {
+ final WorkChain goneChain = goneChains.get(i);
+ try {
+ mAppOpsService.finishOperation(AppOpsManager.getToken(mAppOpsService),
+ AppOpsManager.OP_GPS, goneChain.getAttributionUid(),
+ goneChain.getAttributionTag());
+ } catch (RemoteException e) {
+ Log.w(TAG, "RemoteException", e);
+ }
+ }
+ }
+
+ mClientSource.transferWorkChains(source);
+ }
+
+ // Update the flat UIDs and names list and inform app-ops of all changes.
+ WorkSource[] changes = mClientSource.setReturningDiffs(source);
+ if (changes != null) {
+ WorkSource newWork = changes[0];
+ WorkSource goneWork = changes[1];
+
+ // Update sources that were not previously tracked.
+ if (newWork != null) {
+ for (int i = 0; i < newWork.size(); i++) {
+ try {
+ mAppOpsService.startOperation(AppOpsManager.getToken(mAppOpsService),
+ AppOpsManager.OP_GPS, newWork.get(i), newWork.getName(i));
+ } catch (RemoteException e) {
+ Log.w(TAG, "RemoteException", e);
+ }
+ }
+ }
+
+ // Update sources that are no longer tracked.
+ if (goneWork != null) {
+ for (int i = 0; i < goneWork.size(); i++) {
+ try {
+ mAppOpsService.finishOperation(AppOpsManager.getToken(mAppOpsService),
+ AppOpsManager.OP_GPS, goneWork.get(i), goneWork.getName(i));
+ } catch (RemoteException e) {
+ Log.w(TAG, "RemoteException", e);
+ }
}
}
}
diff --git a/services/core/java/com/android/server/locksettings/LockSettingsService.java b/services/core/java/com/android/server/locksettings/LockSettingsService.java
index 31c20cb..28fa86b 100644
--- a/services/core/java/com/android/server/locksettings/LockSettingsService.java
+++ b/services/core/java/com/android/server/locksettings/LockSettingsService.java
@@ -1348,11 +1348,11 @@
.verifyChallenge(userId, 0, willStore.hash, credential.getBytes());
setUserKeyProtection(userId, credential, convertResponse(gkResponse));
fixateNewestUserKeyAuth(userId);
- mRecoverableKeyStoreManager.lockScreenSecretChanged(credentialType, credential,
- userId);
// Refresh the auth token
doVerifyCredential(credential, credentialType, true, 0, userId, null /* progressCallback */);
synchronizeUnifiedWorkChallengeForProfiles(userId, null);
+ mRecoverableKeyStoreManager.lockScreenSecretChanged(credentialType, credential,
+ userId);
} else {
throw new RemoteException("Failed to enroll " +
(credentialType == LockPatternUtils.CREDENTIAL_TYPE_PASSWORD ? "password"
@@ -1982,8 +1982,8 @@
}
@Override
- public KeyChainSnapshot getRecoveryData(@NonNull byte[] account) throws RemoteException {
- return mRecoverableKeyStoreManager.getRecoveryData(account);
+ public KeyChainSnapshot getKeyChainSnapshot() throws RemoteException {
+ return mRecoverableKeyStoreManager.getKeyChainSnapshot();
}
public void setSnapshotCreatedPendingIntent(@Nullable PendingIntent intent)
@@ -2494,6 +2494,7 @@
(response != null ? "rate limit exceeded" : "failed"));
return;
}
+ mRecoverableKeyStoreManager.lockScreenSecretChanged(credentialType, credential, userId);
}
@Override
diff --git a/services/core/java/com/android/server/locksettings/LockSettingsStorage.java b/services/core/java/com/android/server/locksettings/LockSettingsStorage.java
index 70d6072..f62e8a9 100644
--- a/services/core/java/com/android/server/locksettings/LockSettingsStorage.java
+++ b/services/core/java/com/android/server/locksettings/LockSettingsStorage.java
@@ -627,7 +627,12 @@
if (persistentDataBlock == null) {
return PersistentData.NONE;
}
- return PersistentData.fromBytes(persistentDataBlock.getFrpCredentialHandle());
+ try {
+ return PersistentData.fromBytes(persistentDataBlock.getFrpCredentialHandle());
+ } catch (IllegalStateException e) {
+ Slog.e(TAG, "Error reading persistent data block", e);
+ return PersistentData.NONE;
+ }
}
public static class PersistentData {
@@ -670,11 +675,11 @@
return new PersistentData(type, userId, qualityForUi, payload);
} else {
Slog.wtf(TAG, "Unknown PersistentData version code: " + version);
- return null;
+ return NONE;
}
} catch (IOException e) {
Slog.wtf(TAG, "Could not parse PersistentData", e);
- return null;
+ return NONE;
}
}
diff --git a/services/core/java/com/android/server/locksettings/recoverablekeystore/KeySyncTask.java b/services/core/java/com/android/server/locksettings/recoverablekeystore/KeySyncTask.java
index e1e769c..662ffc8 100644
--- a/services/core/java/com/android/server/locksettings/recoverablekeystore/KeySyncTask.java
+++ b/services/core/java/com/android/server/locksettings/recoverablekeystore/KeySyncTask.java
@@ -72,7 +72,7 @@
private final int mCredentialType;
private final String mCredential;
private final boolean mCredentialUpdated;
- private final PlatformKeyManager.Factory mPlatformKeyManagerFactory;
+ private final PlatformKeyManager mPlatformKeyManager;
private final RecoverySnapshotStorage mRecoverySnapshotStorage;
private final RecoverySnapshotListenersStorage mSnapshotListenersStorage;
@@ -94,7 +94,7 @@
credentialType,
credential,
credentialUpdated,
- () -> PlatformKeyManager.getInstance(context, recoverableKeyStoreDb));
+ PlatformKeyManager.getInstance(context, recoverableKeyStoreDb));
}
/**
@@ -105,9 +105,7 @@
* @param credentialType The type of credential as defined in {@code LockPatternUtils}
* @param credential The credential, encoded as a {@link String}.
* @param credentialUpdated signals weather credentials were updated.
- * @param platformKeyManagerFactory Instantiates a {@link PlatformKeyManager} for the user.
- * This is a factory to enable unit testing, as otherwise it would be impossible to test
- * without a screen unlock occurring!
+ * @param platformKeyManager platform key manager
*/
@VisibleForTesting
KeySyncTask(
@@ -118,14 +116,14 @@
int credentialType,
String credential,
boolean credentialUpdated,
- PlatformKeyManager.Factory platformKeyManagerFactory) {
+ PlatformKeyManager platformKeyManager) {
mSnapshotListenersStorage = recoverySnapshotListenersStorage;
mRecoverableKeyStoreDb = recoverableKeyStoreDb;
mUserId = userId;
mCredentialType = credentialType;
mCredential = credential;
mCredentialUpdated = credentialUpdated;
- mPlatformKeyManagerFactory = platformKeyManagerFactory;
+ mPlatformKeyManager = platformKeyManager;
mRecoverySnapshotStorage = snapshotStorage;
}
@@ -145,6 +143,8 @@
if (mCredentialType == LockPatternUtils.CREDENTIAL_TYPE_NONE) {
// Application keys for the user will not be available for sync.
Log.w(TAG, "Credentials are not set for user " + mUserId);
+ int generation = mPlatformKeyManager.getGenerationId(mUserId);
+ mPlatformKeyManager.invalidatePlatformKey(mUserId, generation);
return;
}
@@ -158,9 +158,17 @@
}
private void syncKeysForAgent(int recoveryAgentUid) {
+ boolean recreateCurrentVersion = false;
if (!shoudCreateSnapshot(recoveryAgentUid)) {
- Log.d(TAG, "Key sync not needed.");
- return;
+ recreateCurrentVersion =
+ (mRecoverableKeyStoreDb.getSnapshotVersion(mUserId, recoveryAgentUid) != null)
+ && (mRecoverySnapshotStorage.get(recoveryAgentUid) == null);
+ if (recreateCurrentVersion) {
+ Log.d(TAG, "Recreating most recent snapshot");
+ } else {
+ Log.d(TAG, "Key sync not needed.");
+ return;
+ }
}
if (!mSnapshotListenersStorage.hasListener(recoveryAgentUid)) {
@@ -253,23 +261,21 @@
Log.e(TAG,"Could not encrypt with recovery key", e);
return;
}
- // TODO: store raw data in RecoveryServiceMetadataEntry and generate Parcelables later
- // TODO: use Builder.
- KeyChainProtectionParams metadata = new KeyChainProtectionParams(
- /*userSecretType=*/ TYPE_LOCKSCREEN,
- /*lockScreenUiFormat=*/ getUiFormat(mCredentialType, mCredential),
- /*keyDerivationParams=*/ KeyDerivationParams.createSha256Params(salt),
- /*secret=*/ new byte[0]);
+ KeyChainProtectionParams metadata = new KeyChainProtectionParams.Builder()
+ .setUserSecretType(TYPE_LOCKSCREEN)
+ .setLockScreenUiFormat(getUiFormat(mCredentialType, mCredential))
+ .setKeyDerivationParams(KeyDerivationParams.createSha256Params(salt))
+ .setSecret(new byte[0])
+ .build();
+
ArrayList<KeyChainProtectionParams> metadataList = new ArrayList<>();
metadataList.add(metadata);
- int snapshotVersion = incrementSnapshotVersion(recoveryAgentUid);
-
// If application keys are not updated, snapshot will not be created on next unlock.
mRecoverableKeyStoreDb.setShouldCreateSnapshot(mUserId, recoveryAgentUid, false);
mRecoverySnapshotStorage.put(recoveryAgentUid, new KeyChainSnapshot.Builder()
- .setSnapshotVersion(snapshotVersion)
+ .setSnapshotVersion(getSnapshotVersion(recoveryAgentUid, recreateCurrentVersion))
.setMaxAttempts(TRUSTED_HARDWARE_MAX_ATTEMPTS)
.setCounterId(counterId)
.setTrustedHardwarePublicKey(SecureBox.encodePublicKey(publicKey))
@@ -283,9 +289,14 @@
}
@VisibleForTesting
- int incrementSnapshotVersion(int recoveryAgentUid) {
+ int getSnapshotVersion(int recoveryAgentUid, boolean recreateCurrentVersion) {
Long snapshotVersion = mRecoverableKeyStoreDb.getSnapshotVersion(mUserId, recoveryAgentUid);
- snapshotVersion = snapshotVersion == null ? 1 : snapshotVersion + 1;
+ if (recreateCurrentVersion) {
+ // version shouldn't be null at this moment.
+ snapshotVersion = snapshotVersion == null ? 1 : snapshotVersion;
+ } else {
+ snapshotVersion = snapshotVersion == null ? 1 : snapshotVersion + 1;
+ }
mRecoverableKeyStoreDb.setSnapshotVersion(mUserId, recoveryAgentUid, snapshotVersion);
return snapshotVersion.intValue();
@@ -304,8 +315,7 @@
throws InsecureUserException, KeyStoreException, UnrecoverableKeyException,
NoSuchAlgorithmException, NoSuchPaddingException, BadPlatformKeyException,
InvalidKeyException, InvalidAlgorithmParameterException {
- PlatformKeyManager platformKeyManager = mPlatformKeyManagerFactory.newInstance();
- PlatformDecryptionKey decryptKey = platformKeyManager.getDecryptKey(mUserId);
+ PlatformDecryptionKey decryptKey = mPlatformKeyManager.getDecryptKey(mUserId);;
Map<String, WrappedKey> wrappedKeys = mRecoverableKeyStoreDb.getAllKeys(
mUserId, recoveryAgentUid, decryptKey.getGenerationId());
return WrappedKey.unwrapKeys(decryptKey, wrappedKeys);
@@ -414,10 +424,10 @@
Map<String, byte[]> encryptedApplicationKeys) {
ArrayList<WrappedApplicationKey> keyEntries = new ArrayList<>();
for (String alias : encryptedApplicationKeys.keySet()) {
- keyEntries.add(
- new WrappedApplicationKey(
- alias,
- encryptedApplicationKeys.get(alias)));
+ keyEntries.add(new WrappedApplicationKey.Builder()
+ .setAlias(alias)
+ .setEncryptedKeyMaterial(encryptedApplicationKeys.get(alias))
+ .build());
}
return keyEntries;
}
diff --git a/services/core/java/com/android/server/locksettings/recoverablekeystore/PlatformKeyManager.java b/services/core/java/com/android/server/locksettings/recoverablekeystore/PlatformKeyManager.java
index 7005de5..3a78f95 100644
--- a/services/core/java/com/android/server/locksettings/recoverablekeystore/PlatformKeyManager.java
+++ b/services/core/java/com/android/server/locksettings/recoverablekeystore/PlatformKeyManager.java
@@ -129,8 +129,29 @@
}
/**
+ * Removes the platform key from Android KeyStore.
+ * It is triggered when user disables lock screen.
+ *
+ * @param userId The ID of the user to whose lock screen the platform key must be bound.
+ * @param generationId Generation id.
+ *
+ * @hide
+ */
+ public void invalidatePlatformKey(int userId, int generationId) {
+ if (generationId != -1) {
+ try {
+ mKeyStore.deleteEntry(getEncryptAlias(userId, generationId));
+ mKeyStore.deleteEntry(getDecryptAlias(userId, generationId));
+ } catch (KeyStoreException e) {
+ // Ignore failed attempt to delete key.
+ }
+ }
+ }
+
+ /**
* Generates a new key and increments the generation ID. Should be invoked if the platform key
* is corrupted and needs to be rotated.
+ * Updates status of old keys to {@code RecoveryController.RECOVERY_STATUS_PERMANENT_FAILURE}.
*
* @param userId The ID of the user to whose lock screen the platform key must be bound.
* @throws NoSuchAlgorithmException if AES is unavailable - should never happen.
@@ -151,6 +172,7 @@
if (generationId == -1) {
nextId = 1;
} else {
+ invalidatePlatformKey(userId, generationId);
nextId = generationId + 1;
}
generateAndLoadKey(userId, nextId);
@@ -158,6 +180,32 @@
/**
* Returns the platform key used for encryption.
+ * Tries to regenerate key one time if it is permanently invalid.
+ *
+ * @param userId The ID of the user to whose lock screen the platform key must be bound.
+ * @throws KeyStoreException if there was an AndroidKeyStore error.
+ * @throws UnrecoverableKeyException if the key could not be recovered.
+ * @throws NoSuchAlgorithmException if AES is unavailable - should never occur.
+ * @throws InsecureUserException if the user does not have a lock screen set.
+ *
+ * @hide
+ */
+ public PlatformEncryptionKey getEncryptKey(int userId) throws KeyStoreException,
+ UnrecoverableKeyException, NoSuchAlgorithmException, InsecureUserException {
+ init(userId);
+ try {
+ return getEncryptKeyInternal(userId);
+ } catch (UnrecoverableKeyException e) {
+ Log.i(TAG, String.format(Locale.US,
+ "Regenerating permanently invalid Platform key for user %d.",
+ userId));
+ regenerate(userId);
+ return getEncryptKeyInternal(userId);
+ }
+ }
+
+ /**
+ * Returns the platform key used for encryption.
*
* @param userId The ID of the user to whose lock screen the platform key must be bound.
* @throws KeyStoreException if there was an AndroidKeyStore error.
@@ -167,13 +215,42 @@
*
* @hide
*/
- public PlatformEncryptionKey getEncryptKey(int userId) throws KeyStoreException,
+ private PlatformEncryptionKey getEncryptKeyInternal(int userId) throws KeyStoreException,
+ UnrecoverableKeyException, NoSuchAlgorithmException, InsecureUserException {
+ int generationId = getGenerationId(userId);
+ String alias = getEncryptAlias(userId, generationId);
+ if (!mKeyStore.containsAlias(alias)) {
+ throw new UnrecoverableKeyException("KeyStore doesn't contain key " + alias);
+ }
+ AndroidKeyStoreSecretKey key = (AndroidKeyStoreSecretKey) mKeyStore.getKey(
+ alias, /*password=*/ null);
+ return new PlatformEncryptionKey(generationId, key);
+ }
+
+ /**
+ * Returns the platform key used for decryption. Only works after a recent screen unlock.
+ * Tries to regenerate key one time if it is permanently invalid.
+ *
+ * @param userId The ID of the user to whose lock screen the platform key must be bound.
+ * @throws KeyStoreException if there was an AndroidKeyStore error.
+ * @throws UnrecoverableKeyException if the key could not be recovered.
+ * @throws NoSuchAlgorithmException if AES is unavailable - should never occur.
+ * @throws InsecureUserException if the user does not have a lock screen set.
+ *
+ * @hide
+ */
+ public PlatformDecryptionKey getDecryptKey(int userId) throws KeyStoreException,
UnrecoverableKeyException, NoSuchAlgorithmException, InsecureUserException {
init(userId);
- int generationId = getGenerationId(userId);
- AndroidKeyStoreSecretKey key = (AndroidKeyStoreSecretKey) mKeyStore.getKey(
- getEncryptAlias(userId, generationId), /*password=*/ null);
- return new PlatformEncryptionKey(generationId, key);
+ try {
+ return getDecryptKeyInternal(userId);
+ } catch (UnrecoverableKeyException e) {
+ Log.i(TAG, String.format(Locale.US,
+ "Regenerating permanently invalid Platform key for user %d.",
+ userId));
+ regenerate(userId);
+ return getDecryptKeyInternal(userId);
+ }
}
/**
@@ -187,12 +264,15 @@
*
* @hide
*/
- public PlatformDecryptionKey getDecryptKey(int userId) throws KeyStoreException,
+ private PlatformDecryptionKey getDecryptKeyInternal(int userId) throws KeyStoreException,
UnrecoverableKeyException, NoSuchAlgorithmException, InsecureUserException {
- init(userId);
int generationId = getGenerationId(userId);
+ String alias = getDecryptAlias(userId, generationId);
+ if (!mKeyStore.containsAlias(alias)) {
+ throw new UnrecoverableKeyException("KeyStore doesn't contain key " + alias);
+ }
AndroidKeyStoreSecretKey key = (AndroidKeyStoreSecretKey) mKeyStore.getKey(
- getDecryptAlias(userId, generationId), /*password=*/ null);
+ alias, /*password=*/ null);
return new PlatformDecryptionKey(generationId, key);
}
@@ -294,13 +374,7 @@
String decryptAlias = getDecryptAlias(userId, generationId);
SecretKey secretKey = generateAesKey();
- mKeyStore.setEntry(
- encryptAlias,
- new KeyStore.SecretKeyEntry(secretKey),
- new KeyProtection.Builder(KeyProperties.PURPOSE_ENCRYPT)
- .setBlockModes(KeyProperties.BLOCK_MODE_GCM)
- .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE)
- .build());
+ // Store Since decryption key first since it is more likely to fail.
mKeyStore.setEntry(
decryptAlias,
new KeyStore.SecretKeyEntry(secretKey),
@@ -313,6 +387,14 @@
.setBoundToSpecificSecureUserId(userId)
.build());
+ mKeyStore.setEntry(
+ encryptAlias,
+ new KeyStore.SecretKeyEntry(secretKey),
+ new KeyProtection.Builder(KeyProperties.PURPOSE_ENCRYPT)
+ .setBlockModes(KeyProperties.BLOCK_MODE_GCM)
+ .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE)
+ .build());
+
setGenerationId(userId, generationId);
try {
@@ -352,16 +434,4 @@
return keyStore;
}
- /**
- * @hide
- */
- public interface Factory {
- /**
- * New PlatformKeyManager instance.
- *
- * @hide
- */
- PlatformKeyManager newInstance()
- throws NoSuchAlgorithmException, InsecureUserException, KeyStoreException;
- }
}
diff --git a/services/core/java/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManager.java b/services/core/java/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManager.java
index b6c3c66..ec72b22 100644
--- a/services/core/java/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManager.java
+++ b/services/core/java/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManager.java
@@ -40,6 +40,7 @@
import android.util.Log;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.HexDump;
import com.android.server.locksettings.recoverablekeystore.storage.RecoverableKeyStoreDb;
import com.android.server.locksettings.recoverablekeystore.storage.RecoverySessionStorage;
import com.android.server.locksettings.recoverablekeystore.storage.RecoverySnapshotStorage;
@@ -170,7 +171,7 @@
* @hide
*/
public @NonNull
- KeyChainSnapshot getRecoveryData(@NonNull byte[] account)
+ KeyChainSnapshot getKeyChainSnapshot()
throws RemoteException {
checkRecoverKeyStorePermission();
int uid = Binder.getCallingUid();
@@ -455,20 +456,57 @@
private byte[] decryptRecoveryKey(
RecoverySessionStorage.Entry sessionEntry, byte[] encryptedClaimResponse)
throws RemoteException, ServiceSpecificException {
+ byte[] locallyEncryptedKey;
try {
- byte[] locallyEncryptedKey = KeySyncUtils.decryptRecoveryClaimResponse(
+ // TODO: Remove the extraneous logging here
+ Log.e(TAG, constructLoggingMessage("sessionEntry.getKeyClaimant()",
+ sessionEntry.getKeyClaimant()));
+ Log.e(TAG, constructLoggingMessage("sessionEntry.getVaultParams()",
+ sessionEntry.getVaultParams()));
+ Log.e(TAG, constructLoggingMessage("encryptedClaimResponse", encryptedClaimResponse));
+ locallyEncryptedKey = KeySyncUtils.decryptRecoveryClaimResponse(
sessionEntry.getKeyClaimant(),
sessionEntry.getVaultParams(),
encryptedClaimResponse);
- return KeySyncUtils.decryptRecoveryKey(sessionEntry.getLskfHash(), locallyEncryptedKey);
- } catch (InvalidKeyException | AEADBadTagException e) {
+ } catch (InvalidKeyException e) {
+ Log.e(TAG, "Got InvalidKeyException during decrypting recovery claim response", e);
throw new ServiceSpecificException(ERROR_DECRYPTION_FAILED,
"Failed to decrypt recovery key " + e.getMessage());
-
+ } catch (AEADBadTagException e) {
+ Log.e(TAG, "Got AEADBadTagException during decrypting recovery claim response", e);
+ throw new ServiceSpecificException(ERROR_DECRYPTION_FAILED,
+ "Failed to decrypt recovery key " + e.getMessage());
} catch (NoSuchAlgorithmException e) {
// Should never happen: all the algorithms used are required by AOSP implementations
throw new ServiceSpecificException(ERROR_SERVICE_INTERNAL_ERROR, e.getMessage());
}
+
+ try {
+ // TODO: Remove the extraneous logging here
+ Log.e(TAG, constructLoggingMessage("sessionEntry.getLskfHash()",
+ sessionEntry.getLskfHash()));
+ Log.e(TAG, constructLoggingMessage("locallyEncryptedKey", locallyEncryptedKey));
+ return KeySyncUtils.decryptRecoveryKey(sessionEntry.getLskfHash(), locallyEncryptedKey);
+ } catch (InvalidKeyException e) {
+ Log.e(TAG, "Got InvalidKeyException during decrypting recovery key", e);
+ throw new ServiceSpecificException(ERROR_DECRYPTION_FAILED,
+ "Failed to decrypt recovery key " + e.getMessage());
+ } catch (AEADBadTagException e) {
+ Log.e(TAG, "Got AEADBadTagException during decrypting recovery key", e);
+ throw new ServiceSpecificException(ERROR_DECRYPTION_FAILED,
+ "Failed to decrypt recovery key " + e.getMessage());
+ } catch (NoSuchAlgorithmException e) {
+ // Should never happen: all the algorithms used are required by AOSP implementations
+ throw new ServiceSpecificException(ERROR_SERVICE_INTERNAL_ERROR, e.getMessage());
+ }
+ }
+
+ private String constructLoggingMessage(String key, byte[] value) {
+ if (value == null) {
+ return key + " is null";
+ } else {
+ return key + ": " + HexDump.toHexString(value);
+ }
}
/**
@@ -486,6 +524,9 @@
byte[] encryptedKeyMaterial = applicationKey.getEncryptedKeyMaterial();
try {
+ // TODO: Remove the extraneous logging here
+ Log.e(TAG, constructLoggingMessage("recoveryKey", recoveryKey));
+ Log.e(TAG, constructLoggingMessage("encryptedKeyMaterial", encryptedKeyMaterial));
byte[] keyMaterial =
KeySyncUtils.decryptApplicationKey(recoveryKey, encryptedKeyMaterial);
keyMaterialByAlias.put(alias, keyMaterial);
@@ -493,7 +534,15 @@
Log.wtf(TAG, "Missing SecureBox algorithm. AOSP required to support this.", e);
throw new ServiceSpecificException(
ERROR_SERVICE_INTERNAL_ERROR, e.getMessage());
- } catch (InvalidKeyException | AEADBadTagException e) {
+ } catch (InvalidKeyException e) {
+ Log.e(TAG, "Got InvalidKeyException during decrypting application key with alias: "
+ + alias, e);
+ throw new ServiceSpecificException(ERROR_DECRYPTION_FAILED,
+ "Failed to recover key with alias '" + alias + "': " + e.getMessage());
+ } catch (AEADBadTagException e) {
+ // TODO: Remove the extraneous logging here
+ Log.e(TAG, "Got AEADBadTagException during decrypting application key with alias: "
+ + alias, e);
throw new ServiceSpecificException(ERROR_DECRYPTION_FAILED,
"Failed to recover key with alias '" + alias + "': " + e.getMessage());
}
@@ -534,6 +583,7 @@
/**
* This function can only be used inside LockSettingsService.
+ *
* @param storedHashType from {@code CredentialHash}
* @param credential - unencrypted String
* @param userId for the user whose lock screen credentials were changed.
@@ -559,7 +609,7 @@
} catch (KeyStoreException e) {
Log.e(TAG, "Key store error encountered during recoverable key sync", e);
} catch (InsecureUserException e) {
- Log.wtf(TAG, "Impossible - insecure user, but user just entered lock screen", e);
+ Log.e(TAG, "InsecureUserException during lock screen secret update", e);
}
}
diff --git a/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDb.java b/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDb.java
index f2e71b3..b96208d 100644
--- a/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDb.java
+++ b/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/RecoverableKeyStoreDb.java
@@ -22,6 +22,7 @@
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
+import android.security.keystore.recovery.RecoveryController;
import android.text.TextUtils;
import android.util.Log;
@@ -289,8 +290,27 @@
ContentValues values = new ContentValues();
values.put(UserMetadataEntry.COLUMN_NAME_USER_ID, userId);
values.put(UserMetadataEntry.COLUMN_NAME_PLATFORM_KEY_GENERATION_ID, generationId);
- return db.replace(
+ long result = db.replace(
UserMetadataEntry.TABLE_NAME, /*nullColumnHack=*/ null, values);
+ if (result != -1) {
+ invalidateKeysWithOldGenerationId(userId, generationId);
+ }
+ return result;
+ }
+
+ /**
+ * Updates status of old keys to {@code RecoveryController.RECOVERY_STATUS_PERMANENT_FAILURE}.
+ */
+ public void invalidateKeysWithOldGenerationId(int userId, int newGenerationId) {
+ SQLiteDatabase db = mKeyStoreDbHelper.getWritableDatabase();
+ ContentValues values = new ContentValues();
+ values.put(KeysEntry.COLUMN_NAME_RECOVERY_STATUS,
+ RecoveryController.RECOVERY_STATUS_PERMANENT_FAILURE);
+ String selection =
+ KeysEntry.COLUMN_NAME_USER_ID + " = ? AND "
+ + KeysEntry.COLUMN_NAME_GENERATION_ID + " < ?";
+ db.update(KeysEntry.TABLE_NAME, values, selection,
+ new String[] {String.valueOf(userId), String.valueOf(newGenerationId)});
}
/**
diff --git a/services/core/java/com/android/server/media/MediaSession2Record.java b/services/core/java/com/android/server/media/MediaSession2Record.java
index b25eaa7..97c7bf6c 100644
--- a/services/core/java/com/android/server/media/MediaSession2Record.java
+++ b/services/core/java/com/android/server/media/MediaSession2Record.java
@@ -16,19 +16,13 @@
package com.android.server.media;
-import android.annotation.CallSuper;
import android.annotation.NonNull;
-import android.annotation.Nullable;
import android.content.Context;
-import android.media.IMediaSession2;
import android.media.MediaController2;
import android.media.MediaSession2;
-import android.media.SessionToken;
-import android.os.Handler;
-import android.os.Looper;
+import android.media.SessionToken2;
import android.util.Log;
import java.util.concurrent.Executor;
-import java.util.concurrent.atomic.AtomicBoolean;
/**
* Records a {@link MediaSession2} and holds {@link MediaController2}.
@@ -44,138 +38,88 @@
private static final boolean DEBUG = true; // TODO(jaewan): Change
private final Context mContext;
+ private final SessionToken2 mSessionToken;
private final SessionDestroyedListener mSessionDestroyedListener;
// TODO(jaewan): Replace these with the mContext.getMainExecutor()
- private final Handler mMainHandler;
private final Executor mMainExecutor;
private MediaController2 mController;
- private ControllerCallback mControllerCallback;
-
- private int mSessionPid;
/**
* Constructor
*/
- public MediaSession2Record(@NonNull Context context,
+ public MediaSession2Record(@NonNull Context context, @NonNull SessionToken2 token,
@NonNull SessionDestroyedListener listener) {
mContext = context;
+ mSessionToken = token;
mSessionDestroyedListener = listener;
-
- mMainHandler = new Handler(Looper.getMainLooper());
- mMainExecutor = (runnable) -> {
- mMainHandler.post(runnable);
- };
- }
-
- public int getSessionPid() {
- return mSessionPid;
+ mMainExecutor = (runnable) -> runnable.run();
}
public Context getContext() {
return mContext;
}
- @CallSuper
public void onSessionDestroyed() {
if (mController != null) {
- mControllerCallback.destroy();
- mController.release();
+ mController.close();
+ // close() triggers ControllerCallback.onDisconnected() here already.
mController = null;
}
- mSessionPid = 0;
}
- /**
- * Create session token and tell server that session is now active.
- *
- * @param sessionPid session's pid
- * @return a token if successfully set, {@code null} if sanity check fails.
- */
- // TODO(jaewan): also add uid for multiuser support
- @CallSuper
- public @Nullable
- SessionToken createSessionToken(int sessionPid, String packageName, String id,
- IMediaSession2 sessionBinder) {
+ public boolean onSessionCreated(SessionToken2 token) {
if (mController != null) {
- if (mSessionPid != sessionPid) {
- // A package uses the same id for session across the different process.
- return null;
- }
- // If a session becomes inactive and then active again very quickly, previous 'inactive'
- // may not have delivered yet. Check if it's the case and destroy controller before
- // creating its session record to prevents getXXTokens() API from returning duplicated
- // tokens.
- // TODO(jaewan): Change this. If developer is really creating two sessions with the same
- // id, this will silently invalidate previous session and no way for
- // developers to know that.
- // Instead, keep the list of static session ids from our APIs.
- // Also change Controller2Impl.onConnectionChanged / getController.
- // Also clean up ControllerCallback#destroy().
- if (DEBUG) {
- Log.d(TAG, "Session is recreated almost immediately. " + this);
- }
- onSessionDestroyed();
+ // Disclaimer: This may fail if following happens for an app.
+ // Step 1) Create a session in the process #1
+ // Step 2) Process #1 is killed
+ // Step 3) Before the death of process #1 is delivered,
+ // (i.e. ControllerCallback#onDisconnected is called),
+ // new process is started and create another session with the same
+ // id in the new process.
+ // Step 4) fail!!! But this is tricky case that wouldn't happen in normal.
+ Log.w(TAG, "Cannot create a new session with the id=" + token.getId() + " in the"
+ + " pkg=" + token.getPackageName() + ". ID should be unique in a package");
+ return false;
}
- mController = onCreateMediaController(packageName, id, sessionBinder);
- mSessionPid = sessionPid;
- return mController.getSessionToken();
+ mController = new MediaController2(mContext, token, mMainExecutor,
+ new ControllerCallback());
+ return true;
}
/**
- * Called when session becomes active and needs controller to listen session's activeness.
- * <p>
- * Should be overridden by subclasses to create token with its own extra information.
+ * @return token
*/
- MediaController2 onCreateMediaController(
- String packageName, String id, IMediaSession2 sessionBinder) {
- SessionToken token = new SessionToken(
- SessionToken.TYPE_SESSION, packageName, id, null, sessionBinder);
- return createMediaController(token);
- }
-
- final MediaController2 createMediaController(SessionToken token) {
- mControllerCallback = new ControllerCallback();
- return new MediaController2(mContext, token, mControllerCallback, mMainExecutor);
+ public SessionToken2 getToken() {
+ return mSessionToken;
}
/**
- * @return controller. Note that framework can only call oneway calls.
+ * @return controller
*/
- public SessionToken getToken() {
- return mController == null ? null : mController.getSessionToken();
+ public MediaController2 getController() {
+ return mController;
}
@Override
public String toString() {
return getToken() == null
- ? "Token {null}"
- : "SessionRecord {pid=" + mSessionPid + ", " + getToken().toString() + "}";
+ ? "Token {null}" : "SessionRecord {" + getToken().toString() + "}";
}
private class ControllerCallback extends MediaController2.ControllerCallback {
- private final AtomicBoolean mIsActive = new AtomicBoolean(true);
-
- // This is called on the main thread with no lock. So place ensure followings.
+ // This is called on the random thread with no lock. So place ensure followings.
// 1. Don't touch anything in the parent class that needs synchronization.
// All other APIs in the MediaSession2Record assumes that server would use them with
// the lock hold.
- // 2. This can be called after the controller registered is released.
+ // 2. This can be called after the controller registered is closed.
@Override
public void onDisconnected() {
- if (!mIsActive.get()) {
- return;
- }
if (DEBUG) {
Log.d(TAG, "onDisconnected, token=" + getToken());
}
mSessionDestroyedListener.onSessionDestroyed(MediaSession2Record.this);
}
-
- // TODO(jaewan): Remove this API when we revisit createSessionToken()
- public void destroy() {
- mIsActive.set(false);
- }
};
}
diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java
index c9c7d04..b877184 100644
--- a/services/core/java/com/android/server/media/MediaSessionService.java
+++ b/services/core/java/com/android/server/media/MediaSessionService.java
@@ -16,6 +16,8 @@
package com.android.server.media;
+import static android.media.SessionToken2.TYPE_SESSION;
+
import android.app.ActivityManager;
import android.app.INotificationManager;
import android.app.KeyguardManager;
@@ -28,6 +30,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.content.pm.UserInfo;
@@ -36,11 +39,11 @@
import android.media.AudioPlaybackConfiguration;
import android.media.AudioSystem;
import android.media.IAudioService;
-import android.media.IMediaSession2;
import android.media.IRemoteVolumeController;
+import android.media.ISessionTokensListener;
import android.media.MediaLibraryService2;
import android.media.MediaSessionService2;
-import android.media.SessionToken;
+import android.media.SessionToken2;
import android.media.session.IActiveSessionsListener;
import android.media.session.ICallback;
import android.media.session.IOnMediaKeyListener;
@@ -130,15 +133,9 @@
private final List<MediaSession2Record> mSessions = new ArrayList<>();
private final MediaSession2Record.SessionDestroyedListener mSessionDestroyedListener =
- (MediaSession2Record record) -> {
+ (record) -> {
synchronized (mLock) {
- if (DEBUG) {
- Log.d(TAG, record.toString() + " becomes inactive");
- }
- record.onSessionDestroyed();
- if (!(record instanceof MediaSessionService2Record)) {
- mSessions.remove(record);
- }
+ destroySessionLocked(record);
}
};
@@ -446,14 +443,16 @@
}
// TODO(jaewan): Query per users.
+ // TODO(jaewan): Similar codes are also at the updatable. Can't we share codes?
+ PackageManager manager = getContext().getPackageManager();
List<ResolveInfo> services = new ArrayList<>();
// If multiple actions are declared for a service, browser gets higher priority.
- List<ResolveInfo> libraryServices = getContext().getPackageManager().queryIntentServices(
+ List<ResolveInfo> libraryServices = manager.queryIntentServices(
new Intent(MediaLibraryService2.SERVICE_INTERFACE), PackageManager.GET_META_DATA);
if (libraryServices != null) {
services.addAll(libraryServices);
}
- List<ResolveInfo> sessionServices = getContext().getPackageManager().queryIntentServices(
+ List<ResolveInfo> sessionServices = manager.queryIntentServices(
new Intent(MediaSessionService2.SERVICE_INTERFACE), PackageManager.GET_META_DATA);
if (sessionServices != null) {
services.addAll(sessionServices);
@@ -468,24 +467,23 @@
continue;
}
ServiceInfo serviceInfo = services.get(i).serviceInfo;
- String id = (serviceInfo.metaData != null) ? serviceInfo.metaData.getString(
- MediaSessionService2.SERVICE_META_DATA) : null;
- // Do basic sanity check
- // TODO(jaewan): also santity check if it's protected with the system|privileged
- // permission
- boolean conflict = (getSessionRecordLocked(serviceInfo.name, id) != null);
- if (conflict) {
- Log.w(TAG, serviceInfo.packageName + " contains multiple"
- + " MediaSessionService2s declared in the manifest with"
- + " the same ID=" + id + ". Ignoring "
- + serviceInfo.packageName + "/" + serviceInfo.name);
- } else {
- int type = (libraryServices.contains(services.get(i)))
- ? SessionToken.TYPE_LIBRARY_SERVICE : SessionToken.TYPE_SESSION_SERVICE;
- MediaSessionService2Record record =
- new MediaSessionService2Record(getContext(), mSessionDestroyedListener,
- type, serviceInfo.packageName, serviceInfo.name, id);
+ int uid;
+ try {
+ // TODO(jaewan): Do this per user.
+ uid = manager.getPackageUid(serviceInfo.packageName,
+ PackageManager.GET_META_DATA);
+ } catch (NameNotFoundException e) {
+ continue;
+ }
+
+ try {
+ SessionToken2 token = new SessionToken2(getContext(),
+ serviceInfo.packageName, serviceInfo.name, uid);
+ MediaSession2Record record = new MediaSession2Record(getContext(),
+ token, mSessionDestroyedListener);
mSessions.add(record);
+ } catch (IllegalArgumentException e) {
+ Log.d(TAG, "Invalid session service", e);
}
}
}
@@ -497,17 +495,27 @@
}
}
- MediaSession2Record getSessionRecordLocked(String packageName, String id) {
+ private MediaSession2Record getSessionRecordLocked(int uid, String packageName, String id) {
for (int i = 0; i < mSessions.size(); i++) {
- MediaSession2Record record = mSessions.get(i);
- if (record.getToken().getPackageName().equals(packageName)
- && record.getToken().getId().equals(id)) {
- return record;
+ SessionToken2 token = mSessions.get(i).getToken();
+ if (token.getUid() == uid && token.getPackageName().equals(packageName)
+ && token.getId().equals(id)) {
+ return mSessions.get(i);
}
}
return null;
}
+ private void destroySessionLocked(MediaSession2Record record) {
+ if (DEBUG) {
+ Log.d(TAG, record.toString() + " becomes inactive");
+ }
+ record.onSessionDestroyed();
+ if (record.getToken().getType() == TYPE_SESSION) {
+ mSessions.remove(record);
+ }
+ }
+
private void enforcePackageName(String packageName, int uid) {
if (TextUtils.isEmpty(packageName)) {
throw new IllegalArgumentException("packageName may not be empty");
@@ -1406,37 +1414,72 @@
mUserRecords.valueAt(i).dumpLocked(pw, "");
}
mAudioPlayerStateMonitor.dump(getContext(), pw, "");
+
+ // TODO(jaewan): Remove this debug command before ship.
+ if (args != null && args.length > 0 && "--purge".equals(args[0])) {
+ mSessions.clear();
+ }
+ pw.println();
+ pw.println("Session2: size=" + mSessions.size());
+ for (int i = 0; i < mSessions.size(); i++) {
+ pw.println(" " + mSessions.get(i));
+ }
}
}
@Override
- public Bundle createSessionToken(String sessionPackage, String id,
- IMediaSession2 sessionBinder) throws RemoteException {
- int uid = Binder.getCallingUid();
- int pid = Binder.getCallingPid();
-
- MediaSession2Record record;
- SessionToken token;
- // TODO(jaewan): Add sanity check for the token if calling package is from uid.
+ public boolean onSessionCreated(Bundle sessionToken) {
+ final int uid = Binder.getCallingUid();
+ final int pid = Binder.getCallingPid();
+ final SessionToken2 token = SessionToken2.fromBundle(getContext(), sessionToken);
+ if (token == null || token.getUid() != uid) {
+ Log.w(TAG, "onSessionCreated failed, expected caller uid=" + token.getUid()
+ + " but from uid=" + uid);
+ }
+ if (DEBUG) {
+ Log.d(TAG, "onSessionCreated " + token);
+ }
synchronized (mLock) {
- record = getSessionRecordLocked(sessionPackage, id);
- if (record == null) {
- record = new MediaSession2Record(getContext(), mSessionDestroyedListener);
- mSessions.add(record);
- }
- token = record.createSessionToken(pid, sessionPackage, id, sessionBinder);
- if (token == null) {
- Log.d(TAG, "failed to create session token for " + sessionPackage
- + " from pid=" + pid + ". Previously " + record);
+ MediaSession2Record record = getSessionRecordLocked(
+ uid, token.getPackageName(), token.getId());
+ if (record != null) {
+ return record.onSessionCreated(token);
} else {
- Log.d(TAG, "session " + token + " is created");
+ record = new MediaSession2Record(
+ getContext(), token, mSessionDestroyedListener);
+ mSessions.add(record);
+ return record.onSessionCreated(token);
}
}
- return token == null ? null : token.toBundle();
+ }
+
+ @Override
+ public void onSessionDestroyed(Bundle sessionToken) {
+ final int uid = Binder.getCallingUid();
+ final int pid = Binder.getCallingPid();
+ final SessionToken2 token = SessionToken2.fromBundle(getContext(), sessionToken);
+ if (token == null || token.getUid() != uid) {
+ Log.w(TAG, "onSessionDestroyed failed, expected caller uid=" + token.getUid()
+ + " but from uid=" + uid);
+ }
+ if (DEBUG) {
+ Log.d(TAG, "onSessionDestroyed " + token);
+ }
+ synchronized (mLock) {
+ MediaSession2Record record = getSessionRecordLocked(
+ uid, token.getPackageName(), token.getId());
+ if (record != null) {
+ record.onSessionDestroyed();
+ } else {
+ if (DEBUG) {
+ Log.d(TAG, "Cannot find a session record to destroy. uid=" + uid
+ + ", pkg=" + token.getPackageName() + ", id=" + token.getId());
+ }
+ }
+ }
}
// TODO(jaewan): Protect this API with permission
- // TODO(jaewan): Add listeners for change in operations..
@Override
public List<Bundle> getSessionTokens(boolean activeSessionOnly,
boolean sessionServiceOnly) throws RemoteException {
@@ -1444,11 +1487,11 @@
synchronized (mLock) {
for (int i = 0; i < mSessions.size(); i++) {
MediaSession2Record record = mSessions.get(i);
- boolean isSessionService = (record instanceof MediaSessionService2Record);
- boolean isActive = record.getSessionPid() != 0;
+ boolean isSessionService = (record.getToken().getType() != TYPE_SESSION);
+ boolean isActive = record.getController() != null;
if ((!activeSessionOnly && isSessionService)
|| (!sessionServiceOnly && isActive)) {
- SessionToken token = record.getToken();
+ SessionToken2 token = record.getToken();
if (token != null) {
tokens.add(token.toBundle());
} else {
@@ -1460,6 +1503,17 @@
return tokens;
}
+ @Override
+ public void addSessionTokensListener(ISessionTokensListener listener, int userId,
+ String packageName) {
+ // TODO(jaewan): Implement.
+ }
+
+ @Override
+ public void removeSessionTokensListener(ISessionTokensListener listener) {
+ // TODO(jaewan): Implement
+ }
+
private int verifySessionsRequest(ComponentName componentName, int userId, final int pid,
final int uid) {
String packageName = null;
diff --git a/services/core/java/com/android/server/media/MediaSessionService2Record.java b/services/core/java/com/android/server/media/MediaSessionService2Record.java
deleted file mode 100644
index bd97dbc..0000000
--- a/services/core/java/com/android/server/media/MediaSessionService2Record.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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 com.android.server.media;
-
-import android.content.Context;
-import android.media.IMediaSession2;
-import android.media.MediaController2;
-import android.media.SessionToken;
-import android.media.MediaSessionService2;
-
-/**
- * Records a {@link MediaSessionService2}.
- * <p>
- * Owner of this object should handle synchronization.
- */
-class MediaSessionService2Record extends MediaSession2Record {
- private static final boolean DEBUG = true; // TODO(jaewan): Modify
- private static final String TAG = "SessionService2Record";
-
- private final int mType;
- private final String mServiceName;
- private final SessionToken mToken;
-
- public MediaSessionService2Record(Context context,
- SessionDestroyedListener sessionDestroyedListener, int type,
- String packageName, String serviceName, String id) {
- super(context, sessionDestroyedListener);
- mType = type;
- mServiceName = serviceName;
- mToken = new SessionToken(mType, packageName, id, mServiceName, null);
- }
-
- /**
- * Overriden to change behavior of
- * {@link #createSessionToken(int, String, String, IMediaSession2)}}.
- */
- @Override
- MediaController2 onCreateMediaController(
- String packageName, String id, IMediaSession2 sessionBinder) {
- SessionToken token = new SessionToken(mType, packageName, id, mServiceName, sessionBinder);
- return createMediaController(token);
- }
-
- /**
- * @return token with no session binder information.
- */
- @Override
- public SessionToken getToken() {
- return mToken;
- }
-}
diff --git a/services/core/java/com/android/server/media/MediaUpdateService.java b/services/core/java/com/android/server/media/MediaUpdateService.java
index 016d062..6921ccd 100644
--- a/services/core/java/com/android/server/media/MediaUpdateService.java
+++ b/services/core/java/com/android/server/media/MediaUpdateService.java
@@ -53,13 +53,10 @@
@Override
public void onStart() {
- // TODO: Uncomment below once sepolicy change is landed.
- /*
if ("userdebug".equals(android.os.Build.TYPE) || "eng".equals(android.os.Build.TYPE)) {
connect();
registerBroadcastReceiver();
}
- */
}
private void connect() {
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index 0e54768..f09de52 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -551,7 +551,7 @@
mSuppressDefaultPolicy = suppressDefaultPolicy;
- mPolicyFile = new AtomicFile(new File(systemDir, "netpolicy.xml"));
+ mPolicyFile = new AtomicFile(new File(systemDir, "netpolicy.xml"), "net-policy");
mAppOps = context.getSystemService(AppOpsManager.class);
diff --git a/services/core/java/com/android/server/net/NetworkStatsService.java b/services/core/java/com/android/server/net/NetworkStatsService.java
index 78fd4b4..bfc150e 100644
--- a/services/core/java/com/android/server/net/NetworkStatsService.java
+++ b/services/core/java/com/android/server/net/NetworkStatsService.java
@@ -887,17 +887,21 @@
@Override
public long getUidStats(int uid, int type) {
- return nativeGetUidStat(uid, type);
+ return nativeGetUidStat(uid, type, checkBpfStatsEnable());
}
@Override
public long getIfaceStats(String iface, int type) {
- return nativeGetIfaceStat(iface, type);
+ return nativeGetIfaceStat(iface, type, checkBpfStatsEnable());
}
@Override
public long getTotalStats(int type) {
- return nativeGetTotalStat(type);
+ return nativeGetTotalStat(type, checkBpfStatsEnable());
+ }
+
+ private boolean checkBpfStatsEnable() {
+ return new File("/sys/fs/bpf/traffic_uid_stats_map").exists();
}
/**
@@ -1668,7 +1672,7 @@
private static int TYPE_TCP_RX_PACKETS;
private static int TYPE_TCP_TX_PACKETS;
- private static native long nativeGetTotalStat(int type);
- private static native long nativeGetIfaceStat(String iface, int type);
- private static native long nativeGetUidStat(int uid, int type);
+ private static native long nativeGetTotalStat(int type, boolean useBpfStats);
+ private static native long nativeGetIfaceStat(String iface, int type, boolean useBpfStats);
+ private static native long nativeGetUidStat(int uid, int type, boolean useBpfStats);
}
diff --git a/services/core/java/com/android/server/net/watchlist/WatchlistLoggingHandler.java b/services/core/java/com/android/server/net/watchlist/WatchlistLoggingHandler.java
index ee0049b..3b6d59e 100644
--- a/services/core/java/com/android/server/net/watchlist/WatchlistLoggingHandler.java
+++ b/services/core/java/com/android/server/net/watchlist/WatchlistLoggingHandler.java
@@ -186,6 +186,10 @@
System.currentTimeMillis());
final WatchlistReportDbHelper.AggregatedResult aggregatedResult =
mDbHelper.getAggregatedRecords();
+ if (aggregatedResult == null) {
+ Slog.i(TAG, "Cannot get result from database");
+ return;
+ }
// Get all digests for watchlist report, it should include all installed
// application digests and previously recorded app digests.
final List<String> digestsForReport = getAllDigestsForReport(aggregatedResult);
diff --git a/services/core/java/com/android/server/net/watchlist/WatchlistReportDbHelper.java b/services/core/java/com/android/server/net/watchlist/WatchlistReportDbHelper.java
index 9559685..c73b0cf 100644
--- a/services/core/java/com/android/server/net/watchlist/WatchlistReportDbHelper.java
+++ b/services/core/java/com/android/server/net/watchlist/WatchlistReportDbHelper.java
@@ -16,6 +16,7 @@
package com.android.server.net.watchlist;
+import android.annotation.Nullable;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
@@ -79,7 +80,7 @@
final Set<String> appDigestList;
// The c&c domain or ip visited before.
- final String cncDomainVisited;
+ @Nullable final String cncDomainVisited;
// A list of app digests and c&c domain visited.
final HashMap<String, String> appDigestCNCList;
@@ -155,7 +156,7 @@
WhiteListReportContract.TABLE, DIGEST_DOMAIN_PROJECTION, selectStatement,
new String[]{"" + twoDaysBefore, "" + yesterday}, null, null,
null, null);
- if (c == null || c.getCount() == 0) {
+ if (c == null) {
return null;
}
final HashSet<String> appDigestList = new HashSet<>();
diff --git a/services/core/java/com/android/server/net/watchlist/WatchlistSettings.java b/services/core/java/com/android/server/net/watchlist/WatchlistSettings.java
index b78fe4d..f5ba889 100644
--- a/services/core/java/com/android/server/net/watchlist/WatchlistSettings.java
+++ b/services/core/java/com/android/server/net/watchlist/WatchlistSettings.java
@@ -77,7 +77,7 @@
@VisibleForTesting
protected WatchlistSettings(File xmlFile) {
- mXmlFile = new AtomicFile(xmlFile);
+ mXmlFile = new AtomicFile(xmlFile, "net-watchlist");
reloadSettings();
if (mPrivacySecretKey == null) {
// Generate a new secret key and save settings
diff --git a/services/core/java/com/android/server/notification/ManagedServices.java b/services/core/java/com/android/server/notification/ManagedServices.java
index 42093e8..502760a 100644
--- a/services/core/java/com/android/server/notification/ManagedServices.java
+++ b/services/core/java/com/android/server/notification/ManagedServices.java
@@ -254,13 +254,11 @@
for (ComponentName cmpt : mEnabledServicesForCurrentProfiles) {
if (filter != null && !filter.matches(cmpt)) continue;
-
cmpt.writeToProto(proto, ManagedServicesProto.ENABLED);
}
for (ManagedServiceInfo info : mServices) {
if (filter != null && !filter.matches(info.component)) continue;
-
info.writeToProto(proto, ManagedServicesProto.LIVE_SERVICES, this);
}
@@ -1145,13 +1143,11 @@
public void writeToProto(ProtoOutputStream proto, long fieldId, ManagedServices host) {
final long token = proto.start(fieldId);
-
component.writeToProto(proto, ManagedServiceInfoProto.COMPONENT);
proto.write(ManagedServiceInfoProto.USER_ID, userid);
proto.write(ManagedServiceInfoProto.SERVICE, service.getClass().getName());
proto.write(ManagedServiceInfoProto.IS_SYSTEM, isSystem);
proto.write(ManagedServiceInfoProto.IS_GUEST, isGuest(host));
-
proto.end(token);
}
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 39b7c7c..9865e35 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -16,6 +16,7 @@
package com.android.server.notification;
+import static android.app.NotificationManager.ACTION_APP_BLOCK_STATE_CHANGED;
import static android.app.NotificationManager.ACTION_NOTIFICATION_CHANNEL_BLOCK_STATE_CHANGED;
import static android.app.NotificationManager.ACTION_NOTIFICATION_CHANNEL_GROUP_BLOCK_STATE_CHANGED;
import static android.app.NotificationManager.IMPORTANCE_LOW;
@@ -1405,7 +1406,7 @@
AppGlobals.getPackageManager()),
new ConditionProviders(getContext(), mUserProfiles, AppGlobals.getPackageManager()),
null, snoozeHelper, new NotificationUsageStats(getContext()),
- new AtomicFile(new File(systemDir, "notification_policy.xml")),
+ new AtomicFile(new File(systemDir, "notification_policy.xml"), "notification-policy"),
(ActivityManager) getContext().getSystemService(Context.ACTIVITY_SERVICE),
getGroupHelper());
@@ -1881,6 +1882,18 @@
cancelAllNotificationsInt(MY_UID, MY_PID, pkg, null, 0, 0, true,
UserHandle.getUserId(uid), REASON_PACKAGE_BANNED, null);
}
+
+ try {
+ getContext().sendBroadcastAsUser(
+ new Intent(ACTION_APP_BLOCK_STATE_CHANGED)
+ .putExtra(NotificationManager.EXTRA_BLOCKED_STATE, !enabled)
+ .addFlags(Intent.FLAG_RECEIVER_FOREGROUND)
+ .setPackage(pkg),
+ UserHandle.of(UserHandle.getUserId(uid)), null);
+ } catch (SecurityException e) {
+ Slog.w(TAG, "Can't notify app about app block change", e);
+ }
+
savePolicyFile();
}
@@ -3382,41 +3395,33 @@
private void dumpProto(FileDescriptor fd, @NonNull DumpFilter filter) {
final ProtoOutputStream proto = new ProtoOutputStream(fd);
synchronized (mNotificationLock) {
- long records = proto.start(NotificationServiceDumpProto.RECORDS);
int N = mNotificationList.size();
- if (N > 0) {
- for (int i = 0; i < N; i++) {
- final NotificationRecord nr = mNotificationList.get(i);
- if (filter.filtered && !filter.matches(nr.sbn)) continue;
- nr.dump(proto, filter.redact);
- proto.write(NotificationRecordProto.STATE, NotificationRecordProto.POSTED);
- }
+ for (int i = 0; i < N; i++) {
+ final NotificationRecord nr = mNotificationList.get(i);
+ if (filter.filtered && !filter.matches(nr.sbn)) continue;
+ nr.dump(proto, NotificationServiceDumpProto.RECORDS, filter.redact,
+ NotificationRecordProto.POSTED);
}
N = mEnqueuedNotifications.size();
- if (N > 0) {
- for (int i = 0; i < N; i++) {
- final NotificationRecord nr = mEnqueuedNotifications.get(i);
- if (filter.filtered && !filter.matches(nr.sbn)) continue;
- nr.dump(proto, filter.redact);
- proto.write(NotificationRecordProto.STATE, NotificationRecordProto.ENQUEUED);
- }
+ for (int i = 0; i < N; i++) {
+ final NotificationRecord nr = mEnqueuedNotifications.get(i);
+ if (filter.filtered && !filter.matches(nr.sbn)) continue;
+ nr.dump(proto, NotificationServiceDumpProto.RECORDS, filter.redact,
+ NotificationRecordProto.ENQUEUED);
}
List<NotificationRecord> snoozed = mSnoozeHelper.getSnoozed();
N = snoozed.size();
- if (N > 0) {
- for (int i = 0; i < N; i++) {
- final NotificationRecord nr = snoozed.get(i);
- if (filter.filtered && !filter.matches(nr.sbn)) continue;
- nr.dump(proto, filter.redact);
- proto.write(NotificationRecordProto.STATE, NotificationRecordProto.SNOOZED);
- }
+ for (int i = 0; i < N; i++) {
+ final NotificationRecord nr = snoozed.get(i);
+ if (filter.filtered && !filter.matches(nr.sbn)) continue;
+ nr.dump(proto, NotificationServiceDumpProto.RECORDS, filter.redact,
+ NotificationRecordProto.SNOOZED);
}
- proto.end(records);
long zenLog = proto.start(NotificationServiceDumpProto.ZEN);
mZenModeHelper.dump(proto);
for (ComponentName suppressor : mEffectsSuppressors) {
- proto.write(ZenModeProto.SUPPRESSORS, suppressor.toString());
+ suppressor.writeToProto(proto, ZenModeProto.SUPPRESSORS);
}
proto.end(zenLog);
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java
index faa300f2..23b9743 100644
--- a/services/core/java/com/android/server/notification/NotificationRecord.java
+++ b/services/core/java/com/android/server/notification/NotificationRecord.java
@@ -361,8 +361,11 @@
/** @deprecated Use {@link #getUser()} instead. */
public int getUserId() { return sbn.getUserId(); }
- void dump(ProtoOutputStream proto, boolean redact) {
+ void dump(ProtoOutputStream proto, long fieldId, boolean redact, int state) {
+ final long token = proto.start(fieldId);
+
proto.write(NotificationRecordProto.KEY, sbn.getKey());
+ proto.write(NotificationRecordProto.STATE, state);
if (getChannel() != null) {
proto.write(NotificationRecordProto.CHANNEL_ID, getChannel().getId());
}
@@ -375,8 +378,10 @@
proto.write(NotificationRecordProto.SOUND, getSound().toString());
}
if (getAudioAttributes() != null) {
- proto.write(NotificationRecordProto.SOUND_USAGE, getAudioAttributes().getUsage());
+ getAudioAttributes().writeToProto(proto, NotificationRecordProto.AUDIO_ATTRIBUTES);
}
+
+ proto.end(token);
}
String formatRemoteViews(RemoteViews rv) {
diff --git a/services/core/java/com/android/server/notification/RankingHelper.java b/services/core/java/com/android/server/notification/RankingHelper.java
index c0dccb5..b0e3820 100644
--- a/services/core/java/com/android/server/notification/RankingHelper.java
+++ b/services/core/java/com/android/server/notification/RankingHelper.java
@@ -973,16 +973,11 @@
proto.write(RecordProto.VISIBILITY, r.visibility);
proto.write(RecordProto.SHOW_BADGE, r.showBadge);
- long token;
for (NotificationChannel channel : r.channels.values()) {
- token = proto.start(RecordProto.CHANNELS);
- channel.toProto(proto);
- proto.end(token);
+ channel.writeToProto(proto, RecordProto.CHANNELS);
}
for (NotificationChannelGroup group : r.groups.values()) {
- token = proto.start(RecordProto.CHANNEL_GROUPS);
- group.toProto(proto);
- proto.end(token);
+ group.writeToProto(proto, RecordProto.CHANNEL_GROUPS);
}
proto.end(fToken);
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index 8f672b5..7e3b551 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -129,7 +129,6 @@
mFiltering = new ZenModeFiltering(mContext);
mConditions = new ZenModeConditions(this, conditionProviders);
mServiceConfig = conditionProviders.getConfig();
-
}
public Looper getLooper() {
@@ -553,19 +552,18 @@
}
void dump(ProtoOutputStream proto) {
-
proto.write(ZenModeProto.ZEN_MODE, mZenMode);
synchronized (mConfig) {
if (mConfig.manualRule != null) {
- proto.write(ZenModeProto.ENABLED_ACTIVE_CONDITIONS, mConfig.manualRule.toString());
+ mConfig.manualRule.writeToProto(proto, ZenModeProto.ENABLED_ACTIVE_CONDITIONS);
}
for (ZenRule rule : mConfig.automaticRules.values()) {
if (rule.enabled && rule.condition.state == Condition.STATE_TRUE
&& !rule.snoozing) {
- proto.write(ZenModeProto.ENABLED_ACTIVE_CONDITIONS, rule.toString());
+ rule.writeToProto(proto, ZenModeProto.ENABLED_ACTIVE_CONDITIONS);
}
}
- mConfig.toNotificationPolicy().toProto(proto, ZenModeProto.POLICY);
+ mConfig.toNotificationPolicy().writeToProto(proto, ZenModeProto.POLICY);
proto.write(ZenModeProto.SUPPRESSED_EFFECTS, mSuppressedEffects);
}
}
@@ -823,7 +821,7 @@
@VisibleForTesting
protected void applyRestrictions() {
final boolean zenPriorityOnly = mZenMode == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
- final boolean zenSilence = mZenMode == Global.ZEN_MODE_NO_INTERRUPTIONS;
+ final boolean zenSilence = mZenMode == Global.ZEN_MODE_NO_INTERRUPTIONS;
final boolean zenAlarmsOnly = mZenMode == Global.ZEN_MODE_ALARMS;
// notification restrictions
@@ -839,7 +837,7 @@
final boolean muteMediaAndSystemSounds = zenPriorityOnly && !mConfig.allowMediaSystemOther;
// total silence restrictions
final boolean muteEverything = zenSilence
- || (zenPriorityOnly && areAllBehaviorSoundsMuted());
+ || (zenPriorityOnly && ZenModeConfig.areAllZenBehaviorSoundsMuted(mConfig));
for (int usage : AudioAttributes.SDK_USAGES) {
final int suppressionBehavior = AudioAttributes.SUPPRESSIBLE_USAGES.get(usage);
@@ -872,12 +870,6 @@
exceptionPackages);
}
- private boolean areAllBehaviorSoundsMuted() {
- return !mConfig.allowAlarms && !mConfig.allowMediaSystemOther && !mConfig.allowReminders
- && !mConfig.allowCalls && !mConfig.allowMessages && !mConfig.allowEvents
- && !mConfig.allowRepeatCallers;
- }
-
private void applyZenToRingerMode() {
if (mAudioManager == null) return;
// force the ringer mode into compliance
@@ -892,6 +884,18 @@
}
break;
case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
+ if (ZenModeConfig.areAllPriorityOnlyNotificationZenSoundsMuted(mConfig)) {
+ if (ringerModeInternal != AudioManager.RINGER_MODE_SILENT) {
+ setPreviousRingerModeSetting(ringerModeInternal);
+ newRingerModeInternal = AudioManager.RINGER_MODE_SILENT;
+ }
+ } else {
+ if (ringerModeInternal == AudioManager.RINGER_MODE_SILENT) {
+ newRingerModeInternal = getPreviousRingerModeSetting();
+ setPreviousRingerModeSetting(null);
+ }
+ }
+ break;
case Global.ZEN_MODE_OFF:
if (ringerModeInternal == AudioManager.RINGER_MODE_SILENT) {
newRingerModeInternal = getPreviousRingerModeSetting();
@@ -1000,8 +1004,7 @@
switch (ringerModeNew) {
case AudioManager.RINGER_MODE_SILENT:
if (isChange && policy.doNotDisturbWhenSilent) {
- if (mZenMode != Global.ZEN_MODE_NO_INTERRUPTIONS
- && mZenMode != Global.ZEN_MODE_ALARMS) {
+ if (mZenMode == Global.ZEN_MODE_OFF) {
newZen = Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
}
setPreviousRingerModeSetting(ringerModeOld);
@@ -1011,7 +1014,10 @@
case AudioManager.RINGER_MODE_NORMAL:
if (isChange && ringerModeOld == AudioManager.RINGER_MODE_SILENT
&& (mZenMode == Global.ZEN_MODE_NO_INTERRUPTIONS
- || mZenMode == Global.ZEN_MODE_ALARMS)) {
+ || mZenMode == Global.ZEN_MODE_ALARMS
+ || (mZenMode == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS
+ && ZenModeConfig.areAllPriorityOnlyNotificationZenSoundsMuted(
+ mConfig)))) {
newZen = Global.ZEN_MODE_OFF;
} else if (mZenMode != Global.ZEN_MODE_OFF) {
ringerModeExternalOut = AudioManager.RINGER_MODE_SILENT;
@@ -1079,10 +1085,24 @@
(1 << AudioSystem.STREAM_NOTIFICATION) |
(1 << AudioSystem.STREAM_SYSTEM);
- // alarm and music streams are only affected by ringer mode when in total silence
if (mZenMode == Global.ZEN_MODE_NO_INTERRUPTIONS) {
+ // alarm and music streams affected by ringer mode when in total silence
streams |= (1 << AudioSystem.STREAM_ALARM) |
(1 << AudioSystem.STREAM_MUSIC);
+ } else if (mZenMode == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS) {
+ // alarm and music streams affected by ringer mode when in priority only with
+ // media and alarms not allowed to bypass dnd
+ if (!mConfig.allowMediaSystemOther) {
+ streams |= (1 << AudioSystem.STREAM_MUSIC);
+ } else {
+ streams &= ~(1 << AudioSystem.STREAM_MUSIC);
+ }
+
+ if (!mConfig.allowAlarms) {
+ streams |= (1 << AudioSystem.STREAM_ALARM);
+ } else {
+ streams &= ~(1 << AudioSystem.STREAM_ALARM);
+ }
} else {
streams &= ~((1 << AudioSystem.STREAM_ALARM) |
(1 << AudioSystem.STREAM_MUSIC));
diff --git a/services/core/java/com/android/server/om/OverlayManagerService.java b/services/core/java/com/android/server/om/OverlayManagerService.java
index 2041de6..4bc4a7e 100644
--- a/services/core/java/com/android/server/om/OverlayManagerService.java
+++ b/services/core/java/com/android/server/om/OverlayManagerService.java
@@ -228,7 +228,7 @@
@NonNull final Installer installer) {
super(context);
mSettingsFile =
- new AtomicFile(new File(Environment.getDataSystemDirectory(), "overlays.xml"));
+ new AtomicFile(new File(Environment.getDataSystemDirectory(), "overlays.xml"), "overlays");
mPackageManager = new PackageManagerHelper();
mUserManager = UserManagerService.getInstance();
IdmapManager im = new IdmapManager(installer);
diff --git a/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java b/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java
index 321af43..7600e81 100644
--- a/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java
+++ b/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java
@@ -283,7 +283,18 @@
}
void onOverlayPackageRemoved(@NonNull final String packageName, final int userId) {
- Slog.wtf(TAG, "onOverlayPackageRemoved called, but only pre-installed overlays supported");
+ try {
+ final OverlayInfo overlayInfo = mSettings.getOverlayInfo(packageName, userId);
+ if (mSettings.remove(packageName, userId)) {
+ removeIdmapIfPossible(overlayInfo);
+ if (overlayInfo.isEnabled()) {
+ // Only trigger updates if the overlay was enabled.
+ mListener.onOverlaysChanged(overlayInfo.targetPackageName, userId);
+ }
+ }
+ } catch (OverlayManagerSettings.BadKeyException e) {
+ Slog.e(TAG, "failed to remove overlay", e);
+ }
}
OverlayInfo getOverlayInfo(@NonNull final String packageName, final int userId) {
diff --git a/services/core/java/com/android/server/om/OverlayManagerSettings.java b/services/core/java/com/android/server/om/OverlayManagerSettings.java
index 7d00423..17b38de 100644
--- a/services/core/java/com/android/server/om/OverlayManagerSettings.java
+++ b/services/core/java/com/android/server/om/OverlayManagerSettings.java
@@ -104,7 +104,7 @@
return true;
}
- OverlayInfo getOverlayInfo(@NonNull final String packageName, final int userId)
+ @NonNull OverlayInfo getOverlayInfo(@NonNull final String packageName, final int userId)
throws BadKeyException {
final int idx = select(packageName, userId);
if (idx < 0) {
diff --git a/services/core/java/com/android/server/pm/EphemeralResolverConnection.java b/services/core/java/com/android/server/pm/EphemeralResolverConnection.java
index b5ddf8c..6d6c960 100644
--- a/services/core/java/com/android/server/pm/EphemeralResolverConnection.java
+++ b/services/core/java/com/android/server/pm/EphemeralResolverConnection.java
@@ -43,6 +43,7 @@
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.concurrent.TimeoutException;
@@ -84,8 +85,8 @@
mIntent = new Intent(action).setComponent(componentName);
}
- public final List<InstantAppResolveInfo> getInstantAppResolveInfoList(int hashPrefix[],
- String token) throws ConnectionException {
+ public final List<InstantAppResolveInfo> getInstantAppResolveInfoList(Intent sanitizedIntent,
+ int hashPrefix[], String token) throws ConnectionException {
throwIfCalledOnMainThread();
IInstantAppResolver target = null;
try {
@@ -98,7 +99,7 @@
}
try {
return mGetEphemeralResolveInfoCaller
- .getEphemeralResolveInfoList(target, hashPrefix, token);
+ .getEphemeralResolveInfoList(target, sanitizedIntent, hashPrefix, token);
} catch (TimeoutException e) {
throw new ConnectionException(ConnectionException.FAILURE_CALL);
} catch (RemoteException ignore) {
@@ -111,26 +112,22 @@
return null;
}
- public final void getInstantAppIntentFilterList(int hashPrefix[], String token,
- String hostName, PhaseTwoCallback callback, Handler callbackHandler,
- final long startTime) throws ConnectionException {
+ public final void getInstantAppIntentFilterList(Intent sanitizedIntent, int hashPrefix[],
+ String token, PhaseTwoCallback callback, Handler callbackHandler, final long startTime)
+ throws ConnectionException {
final IRemoteCallback remoteCallback = new IRemoteCallback.Stub() {
@Override
public void sendResult(Bundle data) throws RemoteException {
final ArrayList<InstantAppResolveInfo> resolveList =
data.getParcelableArrayList(
InstantAppResolverService.EXTRA_RESOLVE_INFO);
- callbackHandler.post(new Runnable() {
- @Override
- public void run() {
- callback.onPhaseTwoResolved(resolveList, startTime);
- }
- });
+ callbackHandler.post(() -> callback.onPhaseTwoResolved(resolveList, startTime));
}
};
try {
getRemoteInstanceLazy(token)
- .getInstantAppIntentFilterList(hashPrefix, token, hostName, remoteCallback);
+ .getInstantAppIntentFilterList(sanitizedIntent, hashPrefix, token,
+ remoteCallback);
} catch (TimeoutException e) {
throw new ConnectionException(ConnectionException.FAILURE_BIND);
} catch (InterruptedException e) {
@@ -337,10 +334,11 @@
}
public List<InstantAppResolveInfo> getEphemeralResolveInfoList(
- IInstantAppResolver target, int hashPrefix[], String token)
+ IInstantAppResolver target, Intent sanitizedIntent, int hashPrefix[], String token)
throws RemoteException, TimeoutException {
final int sequence = onBeforeRemoteCall();
- target.getInstantAppResolveInfoList(hashPrefix, token, sequence, mCallback);
+ target.getInstantAppResolveInfoList(sanitizedIntent, hashPrefix, token, sequence,
+ mCallback);
return getResultTimed(sequence);
}
}
diff --git a/services/core/java/com/android/server/pm/Installer.java b/services/core/java/com/android/server/pm/Installer.java
index 4b3758d..c3f20af 100644
--- a/services/core/java/com/android/server/pm/Installer.java
+++ b/services/core/java/com/android/server/pm/Installer.java
@@ -16,7 +16,10 @@
package com.android.server.pm;
+import android.annotation.AppIdInt;
+import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UserIdInt;
import android.content.Context;
import android.content.pm.PackageStats;
import android.os.Build;
@@ -33,6 +36,8 @@
import dalvik.system.VMRuntime;
+import java.io.FileDescriptor;
+
public class Installer extends SystemService {
private static final String TAG = "Installer";
@@ -58,6 +63,9 @@
public static final int DEXOPT_STORAGE_DE = 1 << 8;
/** Indicates that dexopt is invoked from the background service. */
public static final int DEXOPT_IDLE_BACKGROUND_JOB = 1 << 9;
+ /* Indicates that dexopt should not restrict access to private APIs.
+ * Must be kept in sync with com.android.internal.os.ZygoteInit. */
+ public static final int DEXOPT_DISABLE_HIDDEN_API_CHECKS = 1 << 10;
// NOTE: keep in sync with installd
public static final int FLAG_CLEAR_CACHE_ONLY = 1 << 8;
@@ -281,43 +289,44 @@
public void dexopt(String apkPath, int uid, @Nullable String pkgName, String instructionSet,
int dexoptNeeded, @Nullable String outputPath, int dexFlags,
String compilerFilter, @Nullable String volumeUuid, @Nullable String sharedLibraries,
- @Nullable String seInfo, boolean downgrade, int targetSdkVersion)
- throws InstallerException {
+ @Nullable String seInfo, boolean downgrade, int targetSdkVersion,
+ @Nullable String profileName) throws InstallerException {
assertValidInstructionSet(instructionSet);
if (!checkBeforeRemote()) return;
try {
mInstalld.dexopt(apkPath, uid, pkgName, instructionSet, dexoptNeeded, outputPath,
dexFlags, compilerFilter, volumeUuid, sharedLibraries, seInfo, downgrade,
- targetSdkVersion);
+ targetSdkVersion, profileName);
} catch (Exception e) {
throw InstallerException.from(e);
}
}
- public boolean mergeProfiles(int uid, String packageName) throws InstallerException {
- if (!checkBeforeRemote()) return false;
- try {
- return mInstalld.mergeProfiles(uid, packageName);
- } catch (Exception e) {
- throw InstallerException.from(e);
- }
- }
-
- public boolean dumpProfiles(int uid, String packageName, String codePaths)
+ public boolean mergeProfiles(int uid, String packageName, String profileName)
throws InstallerException {
if (!checkBeforeRemote()) return false;
try {
- return mInstalld.dumpProfiles(uid, packageName, codePaths);
+ return mInstalld.mergeProfiles(uid, packageName, profileName);
} catch (Exception e) {
throw InstallerException.from(e);
}
}
- public boolean copySystemProfile(String systemProfile, int uid, String packageName)
+ public boolean dumpProfiles(int uid, String packageName, String profileName, String codePath)
throws InstallerException {
if (!checkBeforeRemote()) return false;
try {
- return mInstalld.copySystemProfile(systemProfile, uid, packageName);
+ return mInstalld.dumpProfiles(uid, packageName, profileName, codePath);
+ } catch (Exception e) {
+ throw InstallerException.from(e);
+ }
+ }
+
+ public boolean copySystemProfile(String systemProfile, int uid, String packageName,
+ String profileName) throws InstallerException {
+ if (!checkBeforeRemote()) return false;
+ try {
+ return mInstalld.copySystemProfile(systemProfile, uid, packageName, profileName);
} catch (Exception e) {
throw InstallerException.from(e);
}
@@ -361,10 +370,10 @@
}
}
- public void clearAppProfiles(String packageName) throws InstallerException {
+ public void clearAppProfiles(String packageName, String profileName) throws InstallerException {
if (!checkBeforeRemote()) return;
try {
- mInstalld.clearAppProfiles(packageName);
+ mInstalld.clearAppProfiles(packageName, profileName);
} catch (Exception e) {
throw InstallerException.from(e);
}
@@ -473,6 +482,26 @@
}
}
+ public void installApkVerity(String filePath, FileDescriptor verityInput)
+ throws InstallerException {
+ if (!checkBeforeRemote()) return;
+ try {
+ mInstalld.installApkVerity(filePath, verityInput);
+ } catch (Exception e) {
+ throw InstallerException.from(e);
+ }
+ }
+
+ public void assertFsverityRootHashMatches(String filePath, @NonNull byte[] expectedHash)
+ throws InstallerException {
+ if (!checkBeforeRemote()) return;
+ try {
+ mInstalld.assertFsverityRootHashMatches(filePath, expectedHash);
+ } catch (Exception e) {
+ throw InstallerException.from(e);
+ }
+ }
+
public boolean reconcileSecondaryDexFile(String apkPath, String packageName, int uid,
String[] isas, @Nullable String volumeUuid, int flags) throws InstallerException {
for (int i = 0; i < isas.length; i++) {
@@ -497,21 +526,21 @@
}
}
- public boolean createProfileSnapshot(int appId, String packageName, String codePath)
- throws InstallerException {
+ public boolean createProfileSnapshot(int appId, String packageName, String profileName,
+ String classpath) throws InstallerException {
if (!checkBeforeRemote()) return false;
try {
- return mInstalld.createProfileSnapshot(appId, packageName, codePath);
+ return mInstalld.createProfileSnapshot(appId, packageName, profileName, classpath);
} catch (Exception e) {
throw InstallerException.from(e);
}
}
- public void destroyProfileSnapshot(String packageName, String codePath)
+ public void destroyProfileSnapshot(String packageName, String profileName)
throws InstallerException {
if (!checkBeforeRemote()) return;
try {
- mInstalld.destroyProfileSnapshot(packageName, codePath);
+ mInstalld.destroyProfileSnapshot(packageName, profileName);
} catch (Exception e) {
throw InstallerException.from(e);
}
@@ -535,6 +564,17 @@
}
}
+ public boolean prepareAppProfile(String pkg, @UserIdInt int userId, @AppIdInt int appId,
+ String profileName, String codePath, String dexMetadataPath) throws InstallerException {
+ if (!checkBeforeRemote()) return false;
+ try {
+ return mInstalld.prepareAppProfile(pkg, userId, appId, profileName, codePath,
+ dexMetadataPath);
+ } catch (Exception e) {
+ throw InstallerException.from(e);
+ }
+ }
+
private static void assertValidInstructionSet(String instructionSet)
throws InstallerException {
for (String abi : Build.SUPPORTED_ABIS) {
diff --git a/services/core/java/com/android/server/pm/InstantAppResolver.java b/services/core/java/com/android/server/pm/InstantAppResolver.java
index 30072d4..55212cc 100644
--- a/services/core/java/com/android/server/pm/InstantAppResolver.java
+++ b/services/core/java/com/android/server/pm/InstantAppResolver.java
@@ -40,11 +40,14 @@
import android.content.pm.InstantAppResolveInfo;
import android.content.pm.InstantAppResolveInfo.InstantAppDigest;
import android.metrics.LogMaker;
+import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.RemoteException;
+import android.text.TextUtils;
import android.util.Log;
+import android.util.Slog;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto;
@@ -53,8 +56,12 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
+import java.util.Set;
import java.util.UUID;
/** @hide */
@@ -79,6 +86,7 @@
public @interface ResolutionStatus {}
private static MetricsLogger sMetricsLogger;
+
private static MetricsLogger getLogger() {
if (sMetricsLogger == null) {
sMetricsLogger = new MetricsLogger();
@@ -86,26 +94,49 @@
return sMetricsLogger;
}
- public static AuxiliaryResolveInfo doInstantAppResolutionPhaseOne(Context context,
+ /**
+ * Returns an intent with potential PII removed from the original intent. Fields removed
+ * include extras and the host + path of the data, if defined.
+ */
+ public static Intent sanitizeIntent(Intent origIntent) {
+ final Intent sanitizedIntent;
+ sanitizedIntent = new Intent(origIntent.getAction());
+ Set<String> categories = origIntent.getCategories();
+ if (categories != null) {
+ for (String category : categories) {
+ sanitizedIntent.addCategory(category);
+ }
+ }
+ Uri sanitizedUri = origIntent.getData() == null
+ ? null
+ : Uri.fromParts(origIntent.getScheme(), "", "");
+ sanitizedIntent.setDataAndType(sanitizedUri, origIntent.getType());
+ sanitizedIntent.addFlags(origIntent.getFlags());
+ sanitizedIntent.setPackage(origIntent.getPackage());
+ return sanitizedIntent;
+ }
+
+ public static AuxiliaryResolveInfo doInstantAppResolutionPhaseOne(
EphemeralResolverConnection connection, InstantAppRequest requestObj) {
final long startTime = System.currentTimeMillis();
final String token = UUID.randomUUID().toString();
if (DEBUG_EPHEMERAL) {
Log.d(TAG, "[" + token + "] Phase1; resolving");
}
- final Intent intent = requestObj.origIntent;
- final InstantAppDigest digest =
- new InstantAppDigest(intent.getData().getHost(), 5 /*maxDigests*/);
+ final Intent origIntent = requestObj.origIntent;
+ final Intent sanitizedIntent = sanitizeIntent(origIntent);
+
+ final InstantAppDigest digest = getInstantAppDigest(origIntent);
final int[] shaPrefix = digest.getDigestPrefix();
AuxiliaryResolveInfo resolveInfo = null;
@ResolutionStatus int resolutionStatus = RESOLUTION_SUCCESS;
try {
final List<InstantAppResolveInfo> instantAppResolveInfoList =
- connection.getInstantAppResolveInfoList(shaPrefix, token);
+ connection.getInstantAppResolveInfoList(sanitizedIntent, shaPrefix, token);
if (instantAppResolveInfoList != null && instantAppResolveInfoList.size() > 0) {
resolveInfo = InstantAppResolver.filterInstantAppIntent(
- instantAppResolveInfoList, intent, requestObj.resolvedType,
- requestObj.userId, intent.getPackage(), digest, token);
+ instantAppResolveInfoList, origIntent, requestObj.resolvedType,
+ requestObj.userId, origIntent.getPackage(), digest, token);
}
} catch (ConnectionException e) {
if (e.failure == ConnectionException.FAILURE_BIND) {
@@ -135,6 +166,12 @@
return resolveInfo;
}
+ private static InstantAppDigest getInstantAppDigest(Intent origIntent) {
+ return origIntent.getData() != null && !TextUtils.isEmpty(origIntent.getData().getHost())
+ ? new InstantAppDigest(origIntent.getData().getHost(), 5 /*maxDigests*/)
+ : InstantAppDigest.UNDEFINED;
+ }
+
public static void doInstantAppResolutionPhaseTwo(Context context,
EphemeralResolverConnection connection, InstantAppRequest requestObj,
ActivityInfo instantAppInstaller, Handler callbackHandler) {
@@ -143,73 +180,53 @@
if (DEBUG_EPHEMERAL) {
Log.d(TAG, "[" + token + "] Phase2; resolving");
}
- final Intent intent = requestObj.origIntent;
- final String hostName = intent.getData().getHost();
- final InstantAppDigest digest = new InstantAppDigest(hostName, 5 /*maxDigests*/);
+ final Intent origIntent = requestObj.origIntent;
+ final Intent sanitizedIntent = sanitizeIntent(origIntent);
+ final InstantAppDigest digest = getInstantAppDigest(origIntent);
final int[] shaPrefix = digest.getDigestPrefix();
final PhaseTwoCallback callback = new PhaseTwoCallback() {
@Override
void onPhaseTwoResolved(List<InstantAppResolveInfo> instantAppResolveInfoList,
long startTime) {
- final String packageName;
- final String splitName;
- final long versionCode;
final Intent failureIntent;
- final Bundle extras;
if (instantAppResolveInfoList != null && instantAppResolveInfoList.size() > 0) {
final AuxiliaryResolveInfo instantAppIntentInfo =
InstantAppResolver.filterInstantAppIntent(
- instantAppResolveInfoList, intent, null /*resolvedType*/,
- 0 /*userId*/, intent.getPackage(), digest, token);
- if (instantAppIntentInfo != null
- && instantAppIntentInfo.resolveInfo != null) {
- packageName = instantAppIntentInfo.resolveInfo.getPackageName();
- splitName = instantAppIntentInfo.splitName;
- versionCode = instantAppIntentInfo.resolveInfo.getVersionCode();
+ instantAppResolveInfoList, origIntent, null /*resolvedType*/,
+ 0 /*userId*/, origIntent.getPackage(), digest, token);
+ if (instantAppIntentInfo != null) {
failureIntent = instantAppIntentInfo.failureIntent;
- extras = instantAppIntentInfo.resolveInfo.getExtras();
} else {
- packageName = null;
- splitName = null;
- versionCode = -1;
failureIntent = null;
- extras = null;
}
} else {
- packageName = null;
- splitName = null;
- versionCode = -1;
failureIntent = null;
- extras = null;
}
final Intent installerIntent = buildEphemeralInstallerIntent(
- Intent.ACTION_RESOLVE_INSTANT_APP_PACKAGE,
requestObj.origIntent,
+ sanitizedIntent,
failureIntent,
requestObj.callingPackage,
requestObj.verificationBundle,
requestObj.resolvedType,
requestObj.userId,
- packageName,
- splitName,
requestObj.responseObj.installFailureActivity,
- versionCode,
token,
- extras,
- false /*needsPhaseTwo*/);
+ false /*needsPhaseTwo*/,
+ requestObj.responseObj.filters);
installerIntent.setComponent(new ComponentName(
instantAppInstaller.packageName, instantAppInstaller.name));
logMetrics(ACTION_INSTANT_APP_RESOLUTION_PHASE_TWO, startTime, token,
- packageName != null ? RESOLUTION_SUCCESS : RESOLUTION_FAILURE);
+ requestObj.responseObj.filters != null ? RESOLUTION_SUCCESS : RESOLUTION_FAILURE);
context.startActivity(installerIntent);
}
};
try {
- connection.getInstantAppIntentFilterList(
- shaPrefix, token, hostName, callback, callbackHandler, startTime);
+ connection.getInstantAppIntentFilterList(sanitizedIntent, shaPrefix, token, callback,
+ callbackHandler, startTime);
} catch (ConnectionException e) {
@ResolutionStatus int resolutionStatus = RESOLUTION_FAILURE;
if (e.failure == ConnectionException.FAILURE_BIND) {
@@ -231,23 +248,20 @@
* Builds and returns an intent to launch the instant installer.
*/
public static Intent buildEphemeralInstallerIntent(
- @NonNull String action,
@NonNull Intent origIntent,
- @NonNull Intent failureIntent,
+ @NonNull Intent sanitizedIntent,
+ @Nullable Intent failureIntent,
@NonNull String callingPackage,
@Nullable Bundle verificationBundle,
@NonNull String resolvedType,
int userId,
- @NonNull String instantAppPackageName,
- @Nullable String instantAppSplitName,
@Nullable ComponentName installFailureActivity,
- long versionCode,
@Nullable String token,
- @Nullable Bundle extras,
- boolean needsPhaseTwo) {
+ boolean needsPhaseTwo,
+ List<AuxiliaryResolveInfo.AuxiliaryFilter> filters) {
// Construct the intent that launches the instant installer
int flags = origIntent.getFlags();
- final Intent intent = new Intent(action);
+ final Intent intent = new Intent();
intent.setFlags(flags
| Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_CLEAR_TASK
@@ -260,20 +274,23 @@
intent.putExtra(Intent.EXTRA_EPHEMERAL_HOSTNAME, origIntent.getData().getHost());
}
intent.putExtra(Intent.EXTRA_INSTANT_APP_ACTION, origIntent.getAction());
- if (extras != null) {
- intent.putExtra(Intent.EXTRA_INSTANT_APP_EXTRAS, extras);
- }
+ intent.putExtra(Intent.EXTRA_INTENT, sanitizedIntent);
- // We have all of the data we need; just start the installer without a second phase
- if (!needsPhaseTwo) {
- // Intent that is launched if the package couldn't be installed for any reason.
+ if (needsPhaseTwo) {
+ intent.setAction(Intent.ACTION_RESOLVE_INSTANT_APP_PACKAGE);
+ } else {
+ // We have all of the data we need; just start the installer without a second phase
if (failureIntent != null || installFailureActivity != null) {
+ // Intent that is launched if the package couldn't be installed for any reason.
try {
final Intent onFailureIntent;
if (installFailureActivity != null) {
onFailureIntent = new Intent();
onFailureIntent.setComponent(installFailureActivity);
- onFailureIntent.putExtra(Intent.EXTRA_SPLIT_NAME, instantAppSplitName);
+ if (filters != null && filters.size() == 1) {
+ onFailureIntent.putExtra(Intent.EXTRA_SPLIT_NAME,
+ filters.get(0).splitName);
+ }
onFailureIntent.putExtra(Intent.EXTRA_INTENT, origIntent);
} else {
onFailureIntent = failureIntent;
@@ -309,17 +326,35 @@
intent.putExtra(Intent.EXTRA_EPHEMERAL_SUCCESS,
new IntentSender(successIntentTarget));
} catch (RemoteException ignore) { /* ignore; same process */ }
-
- intent.putExtra(Intent.EXTRA_PACKAGE_NAME, instantAppPackageName);
- intent.putExtra(Intent.EXTRA_SPLIT_NAME, instantAppSplitName);
- intent.putExtra(Intent.EXTRA_VERSION_CODE, (int) (versionCode & 0x7fffffff));
- intent.putExtra(Intent.EXTRA_LONG_VERSION_CODE, versionCode);
- intent.putExtra(Intent.EXTRA_CALLING_PACKAGE, callingPackage);
if (verificationBundle != null) {
intent.putExtra(Intent.EXTRA_VERIFICATION_BUNDLE, verificationBundle);
}
- }
+ intent.putExtra(Intent.EXTRA_CALLING_PACKAGE, callingPackage);
+ if (filters != null) {
+ Bundle resolvableFilters[] = new Bundle[filters.size()];
+ for (int i = 0, max = filters.size(); i < max; i++) {
+ Bundle resolvableFilter = new Bundle();
+ AuxiliaryResolveInfo.AuxiliaryFilter filter = filters.get(i);
+ resolvableFilter.putBoolean(Intent.EXTRA_UNKNOWN_INSTANT_APP,
+ filter.resolveInfo != null
+ && filter.resolveInfo.shouldLetInstallerDecide());
+ resolvableFilter.putString(Intent.EXTRA_PACKAGE_NAME, filter.packageName);
+ resolvableFilter.putString(Intent.EXTRA_SPLIT_NAME, filter.splitName);
+ resolvableFilter.putLong(Intent.EXTRA_LONG_VERSION_CODE, filter.versionCode);
+ resolvableFilter.putBundle(Intent.EXTRA_INSTANT_APP_EXTRAS, filter.extras);
+ resolvableFilters[i] = resolvableFilter;
+ if (i == 0) {
+ // for backwards compat, always set the first result on the intent and add
+ // the int version code
+ intent.putExtras(resolvableFilter);
+ intent.putExtra(Intent.EXTRA_VERSION_CODE, (int) filter.versionCode);
+ }
+ }
+ intent.putExtra(Intent.EXTRA_INSTANT_APP_BUNDLES, resolvableFilters);
+ }
+ intent.setAction(Intent.ACTION_INSTALL_INSTANT_APP_PACKAGE);
+ }
return intent;
}
@@ -330,69 +365,134 @@
final int[] shaPrefix = digest.getDigestPrefix();
final byte[][] digestBytes = digest.getDigestBytes();
final Intent failureIntent = new Intent(origIntent);
+ boolean requiresSecondPhase = false;
failureIntent.setFlags(failureIntent.getFlags() | Intent.FLAG_IGNORE_EPHEMERAL);
failureIntent.setLaunchToken(token);
- // Go in reverse order so we match the narrowest scope first.
- for (int i = shaPrefix.length - 1; i >= 0 ; --i) {
- for (InstantAppResolveInfo instantAppInfo : instantAppResolveInfoList) {
- if (!Arrays.equals(digestBytes[i], instantAppInfo.getDigestBytes())) {
+ ArrayList<AuxiliaryResolveInfo.AuxiliaryFilter> filters = null;
+ boolean isWebIntent = origIntent.isBrowsableWebIntent();
+ for (InstantAppResolveInfo instantAppResolveInfo : instantAppResolveInfoList) {
+ if (shaPrefix.length > 0 && instantAppResolveInfo.shouldLetInstallerDecide()) {
+ Slog.e(TAG, "InstantAppResolveInfo with mShouldLetInstallerDecide=true when digest"
+ + " provided; ignoring");
+ continue;
+ }
+ byte[] filterDigestBytes = instantAppResolveInfo.getDigestBytes();
+ // Only include matching digests if we have a prefix and we're either dealing with a
+ // web intent or the resolveInfo specifies digest details.
+ if (shaPrefix.length > 0 && (isWebIntent || filterDigestBytes.length > 0)) {
+ boolean matchFound = false;
+ // Go in reverse order so we match the narrowest scope first.
+ for (int i = shaPrefix.length - 1; i >= 0; --i) {
+ if (Arrays.equals(digestBytes[i], filterDigestBytes)) {
+ matchFound = true;
+ break;
+ }
+ }
+ if (!matchFound) {
continue;
}
- if (packageName != null
- && !packageName.equals(instantAppInfo.getPackageName())) {
- continue;
+ }
+ // We matched a resolve info; resolve the filters to see if anything matches completely.
+ List<AuxiliaryResolveInfo.AuxiliaryFilter> matchFilters = computeResolveFilters(
+ origIntent, resolvedType, userId, packageName, token, instantAppResolveInfo);
+ if (matchFilters != null) {
+ if (matchFilters.isEmpty()) {
+ requiresSecondPhase = true;
}
- final List<InstantAppIntentFilter> instantAppFilters =
- instantAppInfo.getIntentFilters();
- // No filters; we need to start phase two
- if (instantAppFilters == null || instantAppFilters.isEmpty()) {
- if (DEBUG_EPHEMERAL) {
- Log.d(TAG, "No app filters; go to phase 2");
- }
- return new AuxiliaryResolveInfo(instantAppInfo,
- new IntentFilter(Intent.ACTION_VIEW) /*intentFilter*/,
- null /*splitName*/, token, true /*needsPhase2*/,
- null /*failureIntent*/);
- }
- // We have a domain match; resolve the filters to see if anything matches.
- final PackageManagerService.EphemeralIntentResolver instantAppResolver =
- new PackageManagerService.EphemeralIntentResolver();
- for (int j = instantAppFilters.size() - 1; j >= 0; --j) {
- final InstantAppIntentFilter instantAppFilter = instantAppFilters.get(j);
- final List<IntentFilter> splitFilters = instantAppFilter.getFilters();
- if (splitFilters == null || splitFilters.isEmpty()) {
- continue;
- }
- for (int k = splitFilters.size() - 1; k >= 0; --k) {
- final AuxiliaryResolveInfo intentInfo =
- new AuxiliaryResolveInfo(instantAppInfo,
- splitFilters.get(k), instantAppFilter.getSplitName(),
- token, false /*needsPhase2*/, failureIntent);
- instantAppResolver.addFilter(intentInfo);
- }
- }
- List<AuxiliaryResolveInfo> matchedResolveInfoList = instantAppResolver.queryIntent(
- origIntent, resolvedType, false /*defaultOnly*/, userId);
- if (!matchedResolveInfoList.isEmpty()) {
- if (DEBUG_EPHEMERAL) {
- final AuxiliaryResolveInfo info = matchedResolveInfoList.get(0);
- Log.d(TAG, "[" + token + "] Found match;"
- + " package: " + info.packageName
- + ", split: " + info.splitName
- + ", versionCode: " + info.versionCode);
- }
- return matchedResolveInfoList.get(0);
- } else if (DEBUG_EPHEMERAL) {
- Log.d(TAG, "[" + token + "] No matches found"
- + " package: " + instantAppInfo.getPackageName()
- + ", versionCode: " + instantAppInfo.getVersionCode());
+ if (filters == null) {
+ filters = new ArrayList<>(matchFilters);
+ } else {
+ filters.addAll(matchFilters);
}
}
}
+ if (filters != null && !filters.isEmpty()) {
+ return new AuxiliaryResolveInfo(token, requiresSecondPhase, failureIntent, filters);
+ }
// Hash or filter mis-match; no instant apps for this domain.
return null;
}
+ /**
+ * Returns one of three states: <p/>
+ * <ul>
+ * <li>{@code null} if there are no matches will not be; resolution is unnecessary.</li>
+ * <li>An empty list signifying that a 2nd phase of resolution is required.</li>
+ * <li>A populated list meaning that matches were found and should be sent directly to the
+ * installer</li>
+ * </ul>
+ *
+ */
+ private static List<AuxiliaryResolveInfo.AuxiliaryFilter> computeResolveFilters(
+ Intent origIntent, String resolvedType, int userId, String packageName, String token,
+ InstantAppResolveInfo instantAppInfo) {
+ if (instantAppInfo.shouldLetInstallerDecide()) {
+ return Collections.singletonList(
+ new AuxiliaryResolveInfo.AuxiliaryFilter(
+ instantAppInfo, null /* splitName */,
+ instantAppInfo.getExtras()));
+ }
+ if (packageName != null
+ && !packageName.equals(instantAppInfo.getPackageName())) {
+ return null;
+ }
+ final List<InstantAppIntentFilter> instantAppFilters =
+ instantAppInfo.getIntentFilters();
+ if (instantAppFilters == null || instantAppFilters.isEmpty()) {
+ // No filters on web intent; no matches, 2nd phase unnecessary.
+ if (origIntent.isBrowsableWebIntent()) {
+ return null;
+ }
+ // No filters; we need to start phase two
+ if (DEBUG_EPHEMERAL) {
+ Log.d(TAG, "No app filters; go to phase 2");
+ }
+ return Collections.emptyList();
+ }
+ final PackageManagerService.EphemeralIntentResolver instantAppResolver =
+ new PackageManagerService.EphemeralIntentResolver();
+ for (int j = instantAppFilters.size() - 1; j >= 0; --j) {
+ final InstantAppIntentFilter instantAppFilter = instantAppFilters.get(j);
+ final List<IntentFilter> splitFilters = instantAppFilter.getFilters();
+ if (splitFilters == null || splitFilters.isEmpty()) {
+ continue;
+ }
+ for (int k = splitFilters.size() - 1; k >= 0; --k) {
+ IntentFilter filter = splitFilters.get(k);
+ Iterator<IntentFilter.AuthorityEntry> authorities =
+ filter.authoritiesIterator();
+ // ignore http/s-only filters.
+ if ((authorities == null || !authorities.hasNext())
+ && (filter.hasDataScheme("http") || filter.hasDataScheme("https"))
+ && filter.hasAction(Intent.ACTION_VIEW)
+ && filter.hasCategory(Intent.CATEGORY_BROWSABLE)) {
+ continue;
+ }
+ instantAppResolver.addFilter(
+ new AuxiliaryResolveInfo.AuxiliaryFilter(
+ filter,
+ instantAppInfo,
+ instantAppFilter.getSplitName(),
+ instantAppInfo.getExtras()
+ ));
+ }
+ }
+ List<AuxiliaryResolveInfo.AuxiliaryFilter> matchedResolveInfoList =
+ instantAppResolver.queryIntent(
+ origIntent, resolvedType, false /*defaultOnly*/, userId);
+ if (!matchedResolveInfoList.isEmpty()) {
+ if (DEBUG_EPHEMERAL) {
+ Log.d(TAG, "[" + token + "] Found match(es); " + matchedResolveInfoList);
+ }
+ return matchedResolveInfoList;
+ } else if (DEBUG_EPHEMERAL) {
+ Log.d(TAG, "[" + token + "] No matches found"
+ + " package: " + instantAppInfo.getPackageName()
+ + ", versionCode: " + instantAppInfo.getVersionCode());
+ }
+ return null;
+ }
+
private static void logMetrics(int action, long startTime, String token,
@ResolutionStatus int status) {
final LogMaker logMaker = new LogMaker(action)
diff --git a/services/core/java/com/android/server/pm/OtaDexoptService.java b/services/core/java/com/android/server/pm/OtaDexoptService.java
index 0395011..10e05cf 100644
--- a/services/core/java/com/android/server/pm/OtaDexoptService.java
+++ b/services/core/java/com/android/server/pm/OtaDexoptService.java
@@ -261,12 +261,12 @@
String instructionSet, int dexoptNeeded, @Nullable String outputPath,
int dexFlags, String compilerFilter, @Nullable String volumeUuid,
@Nullable String sharedLibraries, @Nullable String seInfo, boolean downgrade,
- int targetSdkVersion)
+ int targetSdkVersion, @Nullable String profileName)
throws InstallerException {
final StringBuilder builder = new StringBuilder();
- // The version. Right now it's 4.
- builder.append("4 ");
+ // The version. Right now it's 5.
+ builder.append("5 ");
builder.append("dexopt");
@@ -283,6 +283,7 @@
encodeParameter(builder, seInfo);
encodeParameter(builder, downgrade);
encodeParameter(builder, targetSdkVersion);
+ encodeParameter(builder, profileName);
commands.add(builder.toString());
}
@@ -361,9 +362,10 @@
continue;
}
- // If the path is in /system or /vendor, 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")) {
+ // 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")) {
continue;
}
diff --git a/services/core/java/com/android/server/pm/PackageDexOptimizer.java b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
index 91df87b..cde8cb7 100644
--- a/services/core/java/com/android/server/pm/PackageDexOptimizer.java
+++ b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
@@ -20,6 +20,7 @@
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageParser;
+import android.content.pm.dex.ArtManager;
import android.os.FileUtils;
import android.os.PowerManager;
import android.os.SystemClock;
@@ -55,6 +56,7 @@
import static com.android.server.pm.Installer.DEXOPT_STORAGE_CE;
import static com.android.server.pm.Installer.DEXOPT_STORAGE_DE;
import static com.android.server.pm.Installer.DEXOPT_IDLE_BACKGROUND_JOB;
+import static com.android.server.pm.Installer.DEXOPT_DISABLE_HIDDEN_API_CHECKS;
import static com.android.server.pm.InstructionSets.getAppDexInstructionSets;
import static com.android.server.pm.InstructionSets.getDexCodeInstructionSets;
@@ -110,11 +112,6 @@
return false;
}
- // We do not dexopt a priv-app package when pm.dexopt.priv-apps-oob is true.
- if (pkg.isPrivileged()) {
- return !SystemProperties.getBoolean("pm.dexopt.priv-apps-oob", false);
- }
-
return true;
}
@@ -210,12 +207,14 @@
}
}
+ String profileName = ArtManager.getProfileName(i == 0 ? null : pkg.splitNames[i - 1]);
+
final boolean isUsedByOtherApps = options.isDexoptAsSharedLibrary()
|| packageUseInfo.isUsedByOtherApps(path);
final String compilerFilter = getRealCompilerFilter(pkg.applicationInfo,
options.getCompilerFilter(), isUsedByOtherApps);
final boolean profileUpdated = options.isCheckForProfileUpdates() &&
- isProfileUpdated(pkg, sharedGid, compilerFilter);
+ isProfileUpdated(pkg, sharedGid, profileName, compilerFilter);
// Get the dexopt flags after getRealCompilerFilter to make sure we get the correct
// flags.
@@ -224,7 +223,7 @@
for (String dexCodeIsa : dexCodeInstructionSets) {
int newResult = dexOptPath(pkg, path, dexCodeIsa, compilerFilter,
profileUpdated, classLoaderContexts[i], dexoptFlags, sharedGid,
- packageStats, options.isDowngrade());
+ packageStats, options.isDowngrade(), profileName);
// The end result is:
// - FAILED if any path failed,
// - PERFORMED if at least one path needed compilation,
@@ -248,7 +247,8 @@
@GuardedBy("mInstallLock")
private int dexOptPath(PackageParser.Package pkg, String path, String isa,
String compilerFilter, boolean profileUpdated, String classLoaderContext,
- int dexoptFlags, int uid, CompilerStats.PackageStats packageStats, boolean downgrade) {
+ int dexoptFlags, int uid, CompilerStats.PackageStats packageStats, boolean downgrade,
+ String profileName) {
int dexoptNeeded = getDexoptNeeded(path, isa, compilerFilter, classLoaderContext,
profileUpdated, downgrade);
if (Math.abs(dexoptNeeded) == DexFile.NO_DEXOPT_NEEDED) {
@@ -274,7 +274,8 @@
// primary dex files.
mInstaller.dexopt(path, uid, pkg.packageName, isa, dexoptNeeded, oatDir, dexoptFlags,
compilerFilter, pkg.volumeUuid, classLoaderContext, pkg.applicationInfo.seInfo,
- false /* downgrade*/, pkg.applicationInfo.targetSdkVersion);
+ false /* downgrade*/, pkg.applicationInfo.targetSdkVersion,
+ profileName);
if (packageStats != null) {
long endTime = System.currentTimeMillis();
@@ -395,7 +396,7 @@
mInstaller.dexopt(path, info.uid, info.packageName, isa, /*dexoptNeeded*/ 0,
/*oatDir*/ null, dexoptFlags,
compilerFilter, info.volumeUuid, classLoaderContext, info.seInfoUser,
- options.isDowngrade(), info.targetSdkVersion);
+ options.isDowngrade(), info.targetSdkVersion, /*profileName*/ null);
}
return DEX_OPT_PERFORMED;
@@ -480,6 +481,11 @@
boolean isUsedByOtherApps) {
int flags = info.flags;
boolean vmSafeMode = (flags & ApplicationInfo.FLAG_VM_SAFE_MODE) != 0;
+ // When pm.dexopt.priv-apps-oob is true, we only verify privileged apps.
+ if (info.isPrivilegedApp() &&
+ SystemProperties.getBoolean("pm.dexopt.priv-apps-oob", false)) {
+ return "verify";
+ }
if (vmSafeMode) {
return getSafeModeCompilerFilter(targetCompilerFilter);
}
@@ -509,12 +515,18 @@
boolean isProfileGuidedFilter = isProfileGuidedCompilerFilter(compilerFilter);
boolean isPublic = !info.isForwardLocked() && !isProfileGuidedFilter;
int profileFlag = isProfileGuidedFilter ? DEXOPT_PROFILE_GUIDED : 0;
+ // System apps are invoked with a runtime flag which exempts them from
+ // restrictions on hidden API usage. We dexopt with the same runtime flag
+ // otherwise offending methods would have to be re-verified at runtime
+ // and we want to avoid the performance overhead of that.
+ int hiddenApiFlag = info.isAllowedToUseHiddenApi() ? DEXOPT_DISABLE_HIDDEN_API_CHECKS : 0;
int dexFlags =
(isPublic ? DEXOPT_PUBLIC : 0)
| (debuggable ? DEXOPT_DEBUGGABLE : 0)
| profileFlag
| (options.isBootComplete() ? DEXOPT_BOOTCOMPLETE : 0)
- | (options.isDexoptIdleBackgroundJob() ? DEXOPT_IDLE_BACKGROUND_JOB : 0);
+ | (options.isDexoptIdleBackgroundJob() ? DEXOPT_IDLE_BACKGROUND_JOB : 0)
+ | hiddenApiFlag;
return adjustDexoptFlags(dexFlags);
}
@@ -543,14 +555,15 @@
* current profile and the reference profile will be merged and subsequent calls
* may return a different result.
*/
- private boolean isProfileUpdated(PackageParser.Package pkg, int uid, String compilerFilter) {
+ private boolean isProfileUpdated(PackageParser.Package pkg, int uid, String profileName,
+ String compilerFilter) {
// Check if we are allowed to merge and if the compiler filter is profile guided.
if (!isProfileGuidedCompilerFilter(compilerFilter)) {
return false;
}
// Merge profiles. It returns whether or not there was an updated in the profile info.
try {
- return mInstaller.mergeProfiles(uid, pkg.packageName);
+ return mInstaller.mergeProfiles(uid, pkg.packageName, profileName);
} catch (InstallerException e) {
Slog.w(TAG, "Failed to merge profiles", e);
}
@@ -629,6 +642,9 @@
if ((flags & DEXOPT_IDLE_BACKGROUND_JOB) == DEXOPT_IDLE_BACKGROUND_JOB) {
flagsList.add("idle_background_job");
}
+ if ((flags & DEXOPT_DISABLE_HIDDEN_API_CHECKS) == DEXOPT_DISABLE_HIDDEN_API_CHECKS) {
+ flagsList.add("disable_hidden_api_checks");
+ }
return String.join(",", flagsList);
}
diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java
index 16fae99..59f9dae 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerService.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerService.java
@@ -58,6 +58,7 @@
import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.os.SELinux;
+import android.os.SystemClock;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.storage.StorageManager;
@@ -193,7 +194,8 @@
mCallbacks = new Callbacks(mInstallThread.getLooper());
mSessionsFile = new AtomicFile(
- new File(Environment.getDataSystemDirectory(), "install_sessions.xml"));
+ new File(Environment.getDataSystemDirectory(), "install_sessions.xml"),
+ "package-session");
mSessionsDir = new File(Environment.getDataSystemDirectory(), "install_sessions");
mSessionsDir.mkdirs();
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 42b6946..fdb157e 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -52,11 +52,9 @@
import static android.content.pm.PackageManager.INSTALL_FAILED_MISSING_SHARED_LIBRARY;
import static android.content.pm.PackageManager.INSTALL_FAILED_PACKAGE_CHANGED;
import static android.content.pm.PackageManager.INSTALL_FAILED_REPLACE_COULDNT_DELETE;
-import static android.content.pm.PackageManager.INSTALL_FAILED_SANDBOX_VERSION_DOWNGRADE;
import static android.content.pm.PackageManager.INSTALL_FAILED_SHARED_USER_INCOMPATIBLE;
import static android.content.pm.PackageManager.INSTALL_FAILED_TEST_ONLY;
import static android.content.pm.PackageManager.INSTALL_FAILED_UPDATE_INCOMPATIBLE;
-import static android.content.pm.PackageManager.INSTALL_FAILED_USER_RESTRICTED;
import static android.content.pm.PackageManager.INSTALL_FAILED_VERSION_DOWNGRADE;
import static android.content.pm.PackageManager.INSTALL_INTERNAL;
import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES;
@@ -195,6 +193,7 @@
import android.content.pm.VerifierDeviceIdentity;
import android.content.pm.VerifierInfo;
import android.content.pm.VersionedPackage;
+import android.content.pm.dex.ArtManager;
import android.content.pm.dex.DexMetadataHelper;
import android.content.pm.dex.IArtManager;
import android.content.res.Resources;
@@ -314,6 +313,7 @@
import com.android.server.pm.permission.PermissionManagerInternal.PermissionCallback;
import com.android.server.pm.permission.PermissionsState;
import com.android.server.pm.permission.PermissionsState.PermissionState;
+import com.android.server.security.VerityUtils;
import com.android.server.storage.DeviceStorageMonitorInternal;
import dalvik.system.CloseGuard;
@@ -338,6 +338,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.nio.charset.StandardCharsets;
+import java.security.DigestException;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@@ -440,6 +441,7 @@
private static final int NFC_UID = Process.NFC_UID;
private static final int BLUETOOTH_UID = Process.BLUETOOTH_UID;
private static final int SHELL_UID = Process.SHELL_UID;
+ private static final int SE_UID = Process.SE_UID;
// Suffix used during package installation when copying/moving
// package apks to install directory.
@@ -450,7 +452,6 @@
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_TRUSTED_OVERLAY = 1<<5;
static final int SCAN_DELETE_DATA_ON_FAILURES = 1<<6;
static final int SCAN_REQUIRE_KNOWN = 1<<7;
static final int SCAN_MOVE = 1<<8;
@@ -466,6 +467,7 @@
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;
@IntDef(flag = true, prefix = { "SCAN_" }, value = {
SCAN_NO_DEX,
@@ -473,7 +475,6 @@
SCAN_NEW_INSTALL,
SCAN_UPDATE_TIME,
SCAN_BOOTING,
- SCAN_TRUSTED_OVERLAY,
SCAN_DELETE_DATA_ON_FAILURES,
SCAN_REQUIRE_KNOWN,
SCAN_MOVE,
@@ -571,6 +572,8 @@
private static final String VENDOR_OVERLAY_DIR = "/vendor/overlay";
+ private static final String PRODUCT_OVERLAY_DIR = "/product/overlay";
+
private static final String PROPERTY_NAME_PM_DEXOPT_PRIV_APPS_OOB = "pm.dexopt.priv-apps-oob";
/** Canonical intent used to identify what counts as a "web browser" app */
@@ -776,7 +779,7 @@
Collection<PackageParser.Package> allPackages, String targetPackageName) {
List<PackageParser.Package> overlayPackages = null;
for (PackageParser.Package p : allPackages) {
- if (targetPackageName.equals(p.mOverlayTarget) && p.mIsStaticOverlay) {
+ if (targetPackageName.equals(p.mOverlayTarget) && p.mOverlayIsStatic) {
if (overlayPackages == null) {
overlayPackages = new ArrayList<PackageParser.Package>();
}
@@ -860,7 +863,7 @@
void findStaticOverlayPackages() {
synchronized (mPackages) {
for (PackageParser.Package p : mPackages.values()) {
- if (p.mIsStaticOverlay) {
+ if (p.mOverlayIsStatic) {
if (mOverlayPackages == null) {
mOverlayPackages = new ArrayList<PackageParser.Package>();
}
@@ -2406,6 +2409,8 @@
ApplicationInfo.FLAG_SYSTEM, ApplicationInfo.PRIVATE_FLAG_PRIVILEGED);
mSettings.addSharedUserLPw("android.uid.shell", SHELL_UID,
ApplicationInfo.FLAG_SYSTEM, ApplicationInfo.PRIVATE_FLAG_PRIVILEGED);
+ mSettings.addSharedUserLPw("android.uid.se", SE_UID,
+ ApplicationInfo.FLAG_SYSTEM, ApplicationInfo.PRIVATE_FLAG_PRIVILEGED);
String separateProcesses = SystemProperties.get("debug.separate_processes");
if (separateProcesses != null && separateProcesses.length() > 0) {
@@ -2430,6 +2435,7 @@
installer, mInstallLock);
mDexManager = new DexManager(this, mPackageDexOptimizer, installer, mInstallLock,
dexManagerListener);
+ mArtManagerService = new ArtManagerService(this, installer, mInstallLock);
mMoveCallbacks = new MoveCallbacks(FgThread.get().getLooper());
mOnPermissionChangeListeners = new OnPermissionChangeListeners(
@@ -2552,7 +2558,7 @@
scanFlags = scanFlags | SCAN_FIRST_BOOT_OR_UPGRADE;
}
- // Collect vendor overlay packages. (Do this before scanning any apps.)
+ // 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.
scanDirTracedLI(new File(VENDOR_OVERLAY_DIR),
@@ -2560,7 +2566,14 @@
| PackageParser.PARSE_IS_SYSTEM_DIR,
scanFlags
| SCAN_AS_SYSTEM
- | SCAN_TRUSTED_OVERLAY,
+ | SCAN_AS_VENDOR,
+ 0);
+ scanDirTracedLI(new File(PRODUCT_OVERLAY_DIR),
+ mDefParseFlags
+ | PackageParser.PARSE_IS_SYSTEM_DIR,
+ scanFlags
+ | SCAN_AS_SYSTEM
+ | SCAN_AS_PRODUCT,
0);
mParallelPackageParserCallback.findStaticOverlayPackages();
@@ -2595,8 +2608,7 @@
0);
// Collected privileged vendor packages.
- File privilegedVendorAppDir = new File(Environment.getVendorDirectory(),
- "priv-app");
+ File privilegedVendorAppDir = new File(Environment.getVendorDirectory(), "priv-app");
try {
privilegedVendorAppDir = privilegedVendorAppDir.getCanonicalFile();
} catch (IOException e) {
@@ -2636,6 +2648,37 @@
| SCAN_AS_OEM,
0);
+ // Collected privileged product packages.
+ File privilegedProductAppDir = new File(Environment.getProductDirectory(), "priv-app");
+ try {
+ privilegedProductAppDir = privilegedProductAppDir.getCanonicalFile();
+ } catch (IOException e) {
+ // failed to look up canonical path, continue with original one
+ }
+ scanDirTracedLI(privilegedProductAppDir,
+ mDefParseFlags
+ | PackageParser.PARSE_IS_SYSTEM_DIR,
+ scanFlags
+ | SCAN_AS_SYSTEM
+ | SCAN_AS_PRODUCT
+ | SCAN_AS_PRIVILEGED,
+ 0);
+
+ // Collect ordinary product packages.
+ File productAppDir = new File(Environment.getProductDirectory(), "app");
+ try {
+ productAppDir = productAppDir.getCanonicalFile();
+ } catch (IOException e) {
+ // failed to look up canonical path, continue with original one
+ }
+ scanDirTracedLI(productAppDir,
+ mDefParseFlags
+ | PackageParser.PARSE_IS_SYSTEM_DIR,
+ scanFlags
+ | SCAN_AS_SYSTEM
+ | SCAN_AS_PRODUCT,
+ 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
@@ -2842,6 +2885,23 @@
scanFlags
| SCAN_AS_SYSTEM
| SCAN_AS_OEM;
+ } else if (FileUtils.contains(privilegedProductAppDir, scanFile)) {
+ reparseFlags =
+ mDefParseFlags |
+ PackageParser.PARSE_IS_SYSTEM_DIR;
+ rescanFlags =
+ scanFlags
+ | SCAN_AS_SYSTEM
+ | SCAN_AS_PRODUCT
+ | SCAN_AS_PRIVILEGED;
+ } else if (FileUtils.contains(productAppDir, scanFile)) {
+ reparseFlags =
+ mDefParseFlags |
+ PackageParser.PARSE_IS_SYSTEM_DIR;
+ rescanFlags =
+ scanFlags
+ | SCAN_AS_SYSTEM
+ | SCAN_AS_PRODUCT;
} else {
Slog.e(TAG, "Ignoring unexpected fallback path " + scanFile);
continue;
@@ -3086,7 +3146,6 @@
}
mInstallerService = new PackageInstallerService(context, this);
- mArtManagerService = new ArtManagerService(this, mInstaller, mInstallLock);
final Pair<ComponentName, String> instantAppResolverComponent =
getInstantAppResolverLPr();
if (instantAppResolverComponent != null) {
@@ -3536,24 +3595,35 @@
}
private @Nullable ActivityInfo getInstantAppInstallerLPr() {
- final Intent intent = new Intent(Intent.ACTION_INSTALL_INSTANT_APP_PACKAGE);
- intent.addCategory(Intent.CATEGORY_DEFAULT);
- intent.setDataAndType(Uri.fromFile(new File("foo.apk")), PACKAGE_MIME_TYPE);
+ String[] orderedActions = Build.IS_ENG
+ ? new String[]{
+ Intent.ACTION_INSTALL_INSTANT_APP_PACKAGE + "_TEST",
+ Intent.ACTION_INSTALL_INSTANT_APP_PACKAGE,
+ Intent.ACTION_INSTALL_EPHEMERAL_PACKAGE}
+ : new String[]{
+ Intent.ACTION_INSTALL_INSTANT_APP_PACKAGE,
+ Intent.ACTION_INSTALL_EPHEMERAL_PACKAGE};
final int resolveFlags =
MATCH_DIRECT_BOOT_AWARE
- | MATCH_DIRECT_BOOT_UNAWARE
- | (!Build.IS_DEBUGGABLE ? MATCH_SYSTEM_ONLY : 0);
- List<ResolveInfo> matches = queryIntentActivitiesInternal(intent, PACKAGE_MIME_TYPE,
- resolveFlags, UserHandle.USER_SYSTEM);
- // temporarily look for the old action
- if (matches.isEmpty()) {
- if (DEBUG_EPHEMERAL) {
- Slog.d(TAG, "Ephemeral installer not found with new action; try old one");
- }
- intent.setAction(Intent.ACTION_INSTALL_EPHEMERAL_PACKAGE);
+ | MATCH_DIRECT_BOOT_UNAWARE
+ | Intent.FLAG_IGNORE_EPHEMERAL
+ | (!Build.IS_ENG ? MATCH_SYSTEM_ONLY : 0);
+ final Intent intent = new Intent();
+ intent.addCategory(Intent.CATEGORY_DEFAULT);
+ intent.setDataAndType(Uri.fromFile(new File("foo.apk")), PACKAGE_MIME_TYPE);
+ List<ResolveInfo> matches = null;
+ for (String action : orderedActions) {
+ intent.setAction(action);
matches = queryIntentActivitiesInternal(intent, PACKAGE_MIME_TYPE,
resolveFlags, UserHandle.USER_SYSTEM);
+ if (matches.isEmpty()) {
+ if (DEBUG_EPHEMERAL) {
+ Slog.d(TAG, "Instant App installer not found with " + action);
+ }
+ } else {
+ break;
+ }
}
Iterator<ResolveInfo> iter = matches.iterator();
while (iter.hasNext()) {
@@ -3561,7 +3631,8 @@
final PackageSetting ps = mSettings.mPackages.get(rInfo.activityInfo.packageName);
if (ps != null) {
final PermissionsState permissionsState = ps.getPermissionsState();
- if (permissionsState.hasPermission(Manifest.permission.INSTALL_PACKAGES, 0)) {
+ if (permissionsState.hasPermission(Manifest.permission.INSTALL_PACKAGES, 0)
+ || Build.IS_ENG) {
continue;
}
}
@@ -4720,10 +4791,7 @@
flags |= PackageManager.MATCH_INSTANT;
} else {
final boolean wantMatchInstant = (flags & PackageManager.MATCH_INSTANT) != 0;
- final boolean allowMatchInstant =
- (wantInstantApps
- && Intent.ACTION_VIEW.equals(intent.getAction())
- && hasWebURI(intent))
+ final boolean allowMatchInstant = wantInstantApps
|| (wantMatchInstant && canViewInstantApps(callingUid, userId));
flags &= ~(PackageManager.MATCH_VISIBLE_TO_INSTANT_APP_ONLY
| PackageManager.MATCH_EXPLICITLY_VISIBLE_ONLY);
@@ -5913,8 +5981,14 @@
if (!skipPackageCheck && intent.getPackage() != null) {
return false;
}
- final boolean isWebUri = hasWebURI(intent);
- if (!isWebUri || intent.getData().getHost() == null) {
+ if (!intent.isBrowsableWebIntent()) {
+ // for non web intents, we should not resolve externally if an app already exists to
+ // handle it or if the caller didn't explicitly request it.
+ if ((resolvedActivities != null && resolvedActivities.size() != 0)
+ || (intent.getFlags() & Intent.FLAG_ACTIVITY_MATCH_EXTERNAL) == 0) {
+ return false;
+ }
+ } else if (intent.getData() == null) {
return false;
}
// Deny ephemeral apps if the user chose _ALWAYS or _ALWAYS_ASK for intent resolution.
@@ -6312,7 +6386,7 @@
if (matches.get(i).getTargetUserId() == targetUserId) return true;
}
}
- if (hasWebURI(intent)) {
+ if (intent.hasWebURI()) {
// cross-profile app linking works only towards the parent.
final int callingUid = Binder.getCallingUid();
final UserInfo parent = getProfileParent(sourceUserId);
@@ -6487,7 +6561,7 @@
sortResult = true;
}
}
- if (hasWebURI(intent)) {
+ if (intent.hasWebURI()) {
CrossProfileDomainInfo xpDomainInfo = null;
final UserInfo parent = getProfileParent(userId);
if (parent != null) {
@@ -6573,7 +6647,6 @@
if (ps.getInstantApp(userId)) {
final long packedStatus = getDomainVerificationStatusLPr(ps, userId);
final int status = (int)(packedStatus >> 32);
- final int linkGeneration = (int)(packedStatus & 0xFFFFFFFF);
if (status == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER) {
// there's a local instant application installed, but, the user has
// chosen to never use it; skip resolution and don't acknowledge
@@ -6605,9 +6678,8 @@
null /*responseObj*/, intent /*origIntent*/, resolvedType,
null /*callingPackage*/, userId, null /*verificationBundle*/,
resolveForStart);
- auxiliaryResponse =
- InstantAppResolver.doInstantAppResolutionPhaseOne(
- mContext, mInstantAppResolverConnection, requestObject);
+ auxiliaryResponse = InstantAppResolver.doInstantAppResolutionPhaseOne(
+ mInstantAppResolverConnection, requestObject);
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
} else {
// we have an instant application locally, but, we can't admit that since
@@ -6616,35 +6688,40 @@
// instant application available externally. when it comes time to start
// the instant application, we'll do the right thing.
final ApplicationInfo ai = localInstantApp.activityInfo.applicationInfo;
- auxiliaryResponse = new AuxiliaryResolveInfo(
- ai.packageName, null /*splitName*/, null /*failureActivity*/,
- ai.versionCode, null /*failureIntent*/);
+ auxiliaryResponse = new AuxiliaryResolveInfo(null /* failureActivity */,
+ ai.packageName, ai.versionCode, null /* splitName */);
}
}
- if (auxiliaryResponse != null) {
- if (DEBUG_EPHEMERAL) {
- Slog.v(TAG, "Adding ephemeral installer to the ResolveInfo list");
- }
- final ResolveInfo ephemeralInstaller = new ResolveInfo(mInstantAppInstallerInfo);
- final PackageSetting ps =
- mSettings.mPackages.get(mInstantAppInstallerActivity.packageName);
- if (ps != null) {
- ephemeralInstaller.activityInfo = PackageParser.generateActivityInfo(
- mInstantAppInstallerActivity, 0, ps.readUserState(userId), userId);
- ephemeralInstaller.activityInfo.launchToken = auxiliaryResponse.token;
- ephemeralInstaller.auxiliaryInfo = auxiliaryResponse;
- // make sure this resolver is the default
- ephemeralInstaller.isDefault = true;
- ephemeralInstaller.match = IntentFilter.MATCH_CATEGORY_SCHEME_SPECIFIC_PART
- | IntentFilter.MATCH_ADJUSTMENT_NORMAL;
- // add a non-generic filter
- ephemeralInstaller.filter = new IntentFilter(intent.getAction());
- ephemeralInstaller.filter.addDataPath(
- intent.getData().getPath(), PatternMatcher.PATTERN_LITERAL);
- ephemeralInstaller.isInstantAppAvailable = true;
- result.add(ephemeralInstaller);
- }
+ if (intent.isBrowsableWebIntent() && auxiliaryResponse == null) {
+ return result;
}
+ final PackageSetting ps = mSettings.mPackages.get(mInstantAppInstallerActivity.packageName);
+ if (ps == null) {
+ return result;
+ }
+ final ResolveInfo ephemeralInstaller = new ResolveInfo(mInstantAppInstallerInfo);
+ ephemeralInstaller.activityInfo = PackageParser.generateActivityInfo(
+ mInstantAppInstallerActivity, 0, ps.readUserState(userId), userId);
+ ephemeralInstaller.match = IntentFilter.MATCH_CATEGORY_SCHEME_SPECIFIC_PART
+ | IntentFilter.MATCH_ADJUSTMENT_NORMAL;
+ // add a non-generic filter
+ ephemeralInstaller.filter = new IntentFilter();
+ if (intent.getAction() != null) {
+ ephemeralInstaller.filter.addAction(intent.getAction());
+ }
+ if (intent.getData() != null && intent.getData().getPath() != null) {
+ ephemeralInstaller.filter.addDataPath(
+ intent.getData().getPath(), PatternMatcher.PATTERN_LITERAL);
+ }
+ ephemeralInstaller.isInstantAppAvailable = true;
+ // make sure this resolver is the default
+ ephemeralInstaller.isDefault = true;
+ ephemeralInstaller.auxiliaryInfo = auxiliaryResponse;
+ if (DEBUG_EPHEMERAL) {
+ Slog.v(TAG, "Adding ephemeral installer to the ResolveInfo list");
+ }
+
+ result.add(ephemeralInstaller);
return result;
}
@@ -6759,10 +6836,11 @@
final ResolveInfo info = resolveInfos.get(i);
// allow activities that are defined in the provided package
if (allowDynamicSplits
+ && info.activityInfo != null
&& info.activityInfo.splitName != null
&& !ArrayUtils.contains(info.activityInfo.applicationInfo.splitNames,
info.activityInfo.splitName)) {
- if (mInstantAppInstallerInfo == null) {
+ if (mInstantAppInstallerActivity == null) {
if (DEBUG_INSTALL) {
Slog.v(TAG, "No installer - not adding it to the ResolveInfo list");
}
@@ -6774,14 +6852,15 @@
if (DEBUG_INSTALL) {
Slog.v(TAG, "Adding installer to the ResolveInfo list");
}
- final ResolveInfo installerInfo = new ResolveInfo(mInstantAppInstallerInfo);
+ final ResolveInfo installerInfo = new ResolveInfo(
+ mInstantAppInstallerInfo);
final ComponentName installFailureActivity = findInstallFailureActivity(
info.activityInfo.packageName, filterCallingUid, userId);
installerInfo.auxiliaryInfo = new AuxiliaryResolveInfo(
- info.activityInfo.packageName, info.activityInfo.splitName,
installFailureActivity,
+ info.activityInfo.packageName,
info.activityInfo.applicationInfo.versionCode,
- null /*failureIntent*/);
+ info.activityInfo.splitName);
installerInfo.match = IntentFilter.MATCH_CATEGORY_SCHEME_SPECIFIC_PART
| IntentFilter.MATCH_ADJUSTMENT_NORMAL;
// add a non-generic filter
@@ -6798,6 +6877,7 @@
installerInfo.priority = info.priority;
installerInfo.preferredOrder = info.preferredOrder;
installerInfo.isDefault = info.isDefault;
+ installerInfo.isInstantAppAvailable = true;
resolveInfos.set(i, installerInfo);
continue;
}
@@ -6855,17 +6935,6 @@
return resolveInfos.size() > 0 && resolveInfos.get(0).priority >= 0;
}
- private static boolean hasWebURI(Intent intent) {
- if (intent.getData() == null) {
- return false;
- }
- final String scheme = intent.getScheme();
- if (TextUtils.isEmpty(scheme)) {
- return false;
- }
- return scheme.equals(IntentFilter.SCHEME_HTTP) || scheme.equals(IntentFilter.SCHEME_HTTPS);
- }
-
private List<ResolveInfo> filterCandidatesWithDomainPreferredActivitiesLPr(Intent intent,
int matchFlags, List<ResolveInfo> candidates, CrossProfileDomainInfo xpDomainInfo,
int userId) {
@@ -7538,11 +7607,13 @@
if (DEBUG_EPHEMERAL) {
Slog.v(TAG, "Adding ephemeral installer to the ResolveInfo list");
}
- final ResolveInfo installerInfo = new ResolveInfo(mInstantAppInstallerInfo);
+ final ResolveInfo installerInfo = new ResolveInfo(
+ mInstantAppInstallerInfo);
installerInfo.auxiliaryInfo = new AuxiliaryResolveInfo(
- info.serviceInfo.packageName, info.serviceInfo.splitName,
- null /*failureActivity*/, info.serviceInfo.applicationInfo.versionCode,
- null /*failureIntent*/);
+ null /* installFailureActivity */,
+ info.serviceInfo.packageName,
+ info.serviceInfo.applicationInfo.versionCode,
+ info.serviceInfo.splitName);
// make sure this resolver is the default
installerInfo.isDefault = true;
installerInfo.match = IntentFilter.MATCH_CATEGORY_SCHEME_SPECIFIC_PART
@@ -7658,11 +7729,13 @@
if (DEBUG_EPHEMERAL) {
Slog.v(TAG, "Adding ephemeral installer to the ResolveInfo list");
}
- final ResolveInfo installerInfo = new ResolveInfo(mInstantAppInstallerInfo);
+ final ResolveInfo installerInfo = new ResolveInfo(
+ mInstantAppInstallerInfo);
installerInfo.auxiliaryInfo = new AuxiliaryResolveInfo(
- info.providerInfo.packageName, info.providerInfo.splitName,
- null /*failureActivity*/, info.providerInfo.applicationInfo.versionCode,
- null /*failureIntent*/);
+ null /*failureActivity*/,
+ info.providerInfo.packageName,
+ info.providerInfo.applicationInfo.versionCode,
+ info.providerInfo.splitName);
// make sure this resolver is the default
installerInfo.isDefault = true;
installerInfo.match = IntentFilter.MATCH_CATEGORY_SCHEME_SPECIFIC_PART
@@ -8294,11 +8367,13 @@
}
private void collectCertificatesLI(PackageSetting ps, PackageParser.Package pkg,
- final @ParseFlags int parseFlags, boolean forceCollect) throws PackageManagerException {
+ boolean forceCollect) throws PackageManagerException {
// When upgrading from pre-N MR1, verify the package time stamp using the package
// directory and not the APK file.
final long lastModifiedTime = mIsPreNMR1Upgrade
? new File(pkg.codePath).lastModified() : getLastModifiedTime(pkg);
+ // Note that currently skipVerify skips verification on both base and splits for simplicity.
+ final boolean skipVerify = forceCollect && canSkipFullPackageVerification(pkg);
if (ps != null && !forceCollect
&& ps.codePathString.equals(pkg.codePath)
&& ps.timeStamp == lastModifiedTime
@@ -8324,7 +8399,7 @@
try {
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "collectCertificates");
- PackageParser.collectCertificates(pkg, parseFlags);
+ PackageParser.collectCertificates(pkg, skipVerify);
} catch (PackageParserException e) {
throw PackageManagerException.from(e);
} finally {
@@ -8418,6 +8493,48 @@
return scannedPkg;
}
+ /**
+ * Returns if full apk verification can be skipped for the whole package, including the splits.
+ */
+ private boolean canSkipFullPackageVerification(PackageParser.Package pkg) {
+ if (!canSkipFullApkVerification(pkg.baseCodePath)) {
+ return false;
+ }
+ // TODO: Allow base and splits to be verified individually.
+ if (!ArrayUtils.isEmpty(pkg.splitCodePaths)) {
+ for (int i = 0; i < pkg.splitCodePaths.length; i++) {
+ if (!canSkipFullApkVerification(pkg.splitCodePaths[i])) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Returns if full apk verification can be skipped, depending on current FSVerity setup and
+ * whether the apk contains signed root hash. Note that the signer's certificate still needs to
+ * match one in a trusted source, and should be done separately.
+ */
+ private boolean canSkipFullApkVerification(String apkPath) {
+ byte[] rootHashObserved = null;
+ try {
+ rootHashObserved = VerityUtils.generateFsverityRootHash(apkPath);
+ if (rootHashObserved == null) {
+ return false; // APK does not contain Merkle tree root hash.
+ }
+ synchronized (mInstallLock) {
+ // Returns whether the observed root hash matches what kernel has.
+ mInstaller.assertFsverityRootHashMatches(apkPath, rootHashObserved);
+ return true;
+ }
+ } catch (InstallerException | IOException | DigestException |
+ NoSuchAlgorithmException e) {
+ Slog.w(TAG, "Error in fsverity check. Fallback to full apk verification.", e);
+ }
+ return false;
+ }
+
// Temporary to catch potential issues with refactoring
private static boolean REFACTOR_DEBUG = true;
/**
@@ -8629,10 +8746,11 @@
}
// Verify certificates against what was last scanned. If it is an updated priv app, we will
- // force the verification. Full apk verification will happen unless apk verity is set up for
- // the file. In that case, only small part of the apk is verified upfront.
- collectCertificatesLI(pkgSetting, pkg, parseFlags,
- PackageManagerServiceUtils.isApkVerificationForced(disabledPkgSetting));
+ // force re-collecting certificate. Full apk verification will happen unless apk verity is
+ // set up for the file. In that case, only small part of the apk is verified upfront.
+ final boolean forceCollect = PackageManagerServiceUtils.isApkVerificationForced(
+ disabledPkgSetting);
+ collectCertificatesLI(pkgSetting, pkg, forceCollect);
boolean shouldHideSystemApp = false;
// A new application appeared on /system, but, we already have a copy of
@@ -8873,7 +8991,8 @@
// PackageDexOptimizer to prevent this happening on first boot. The issue
// is that we don't have a good way to say "do this only once".
if (!mInstaller.copySystemProfile(profileFile.getAbsolutePath(),
- pkg.applicationInfo.uid, pkg.packageName)) {
+ pkg.applicationInfo.uid, pkg.packageName,
+ ArtManager.getProfileName(null))) {
Log.e(TAG, "Installer failed to copy system profile!");
} else {
// Disabled as this causes speed-profile compilation during first boot
@@ -8908,7 +9027,8 @@
// issue is that we don't have a good way to say "do this only
// once".
if (!mInstaller.copySystemProfile(profileFile.getAbsolutePath(),
- pkg.applicationInfo.uid, pkg.packageName)) {
+ pkg.applicationInfo.uid, pkg.packageName,
+ ArtManager.getProfileName(null))) {
Log.e(TAG, "Failed to copy system profile for stub package!");
} else {
useProfileForDexopt = true;
@@ -9333,14 +9453,7 @@
synchronized (mInstallLock) {
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "dump profiles");
- final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid);
- try {
- List<String> allCodePaths = pkg.getAllCodePathsExcludingResourceOnly();
- String codePaths = TextUtils.join(";", allCodePaths);
- mInstaller.dumpProfiles(sharedGid, packageName, codePaths);
- } catch (InstallerException e) {
- Slog.w(TAG, "Failed to dump profiles", e);
- }
+ mArtManagerService.dumpProfiles(pkg);
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
}
}
@@ -9416,6 +9529,8 @@
for (int i = 0; i < childCount; i++) {
clearAppDataLeafLIF(pkg.childPackages.get(i), userId, flags);
}
+
+ clearAppProfilesLIF(pkg, UserHandle.USER_ALL);
}
private void clearAppDataLeafLIF(PackageParser.Package pkg, int userId, int flags) {
@@ -9488,18 +9603,10 @@
Slog.wtf(TAG, "Package was null!", new Throwable());
return;
}
- clearAppProfilesLeafLIF(pkg);
+ mArtManagerService.clearAppProfiles(pkg);
final int childCount = (pkg.childPackages != null) ? pkg.childPackages.size() : 0;
for (int i = 0; i < childCount; i++) {
- clearAppProfilesLeafLIF(pkg.childPackages.get(i));
- }
- }
-
- private void clearAppProfilesLeafLIF(PackageParser.Package pkg) {
- try {
- mInstaller.clearAppProfiles(pkg.packageName);
- } catch (InstallerException e) {
- Slog.w(TAG, String.valueOf(e));
+ mArtManagerService.clearAppProfiles(pkg.childPackages.get(i));
}
}
@@ -9829,12 +9936,14 @@
* <li>{@link #SCAN_AS_PRIVILEGED}</li>
* <li>{@link #SCAN_AS_OEM}</li>
* <li>{@link #SCAN_AS_VENDOR}</li>
+ * <li>{@link #SCAN_AS_PRODUCT}</li>
* <li>{@link #SCAN_AS_INSTANT_APP}</li>
* <li>{@link #SCAN_AS_VIRTUAL_PRELOAD}</li>
* </ul>
*/
- private static @ScanFlags int adjustScanFlags(@ScanFlags int scanFlags,
- PackageSetting pkgSetting, PackageSetting disabledPkgSetting, UserHandle user) {
+ private @ScanFlags int adjustScanFlags(@ScanFlags int scanFlags,
+ PackageSetting pkgSetting, PackageSetting disabledPkgSetting, UserHandle user,
+ PackageParser.Package pkg) {
if (disabledPkgSetting != null) {
// updated system application, must at least have SCAN_AS_SYSTEM
scanFlags |= SCAN_AS_SYSTEM;
@@ -9850,6 +9959,10 @@
& ApplicationInfo.PRIVATE_FLAG_VENDOR) != 0) {
scanFlags |= SCAN_AS_VENDOR;
}
+ if ((disabledPkgSetting.pkgPrivateFlags
+ & ApplicationInfo.PRIVATE_FLAG_PRODUCT) != 0) {
+ scanFlags |= SCAN_AS_PRODUCT;
+ }
}
if (pkgSetting != null) {
final int userId = ((user == null) ? 0 : user.getIdentifier());
@@ -9860,6 +9973,30 @@
scanFlags |= SCAN_AS_VIRTUAL_PRELOAD;
}
}
+
+ // Scan as privileged apps that share a user with a priv-app.
+ if (((scanFlags & SCAN_AS_PRIVILEGED) == 0) && !pkg.isPrivileged()
+ && (pkg.mSharedUserId != null)) {
+ SharedUserSetting sharedUserSetting = null;
+ try {
+ sharedUserSetting = mSettings.getSharedUserLPw(pkg.mSharedUserId, 0, 0, false);
+ } catch (PackageManagerException ignore) {}
+ if (sharedUserSetting != null && sharedUserSetting.isPrivileged()) {
+ // Exempt SharedUsers signed with the platform key.
+ // TODO(b/72378145) Fix this exemption. Force signature apps
+ // to whitelist their privileged permissions just like other
+ // priv-apps.
+ synchronized (mPackages) {
+ PackageSetting platformPkgSetting = mSettings.mPackages.get("android");
+ if (!pkg.packageName.equals("android")
+ && (compareSignatures(platformPkgSetting.signatures.mSigningDetails.signatures,
+ pkg.mSigningDetails.signatures) != PackageManager.SIGNATURE_MATCH)) {
+ scanFlags |= SCAN_AS_PRIVILEGED;
+ }
+ }
+ }
+ }
+
return scanFlags;
}
@@ -9883,7 +10020,7 @@
+ " was transferred to another, but its .apk remains");
}
- scanFlags = adjustScanFlags(scanFlags, pkgSetting, disabledPkgSetting, user);
+ scanFlags = adjustScanFlags(scanFlags, pkgSetting, disabledPkgSetting, user, pkg);
synchronized (mPackages) {
applyPolicy(pkg, parseFlags, scanFlags);
assertPackageIsValid(pkg, parseFlags, scanFlags);
@@ -10591,7 +10728,6 @@
}
}
}
- pkg.mTrustedOverlay = (scanFlags & SCAN_TRUSTED_OVERLAY) != 0;
if ((scanFlags & SCAN_AS_PRIVILEGED) != 0) {
pkg.applicationInfo.privateFlags |= ApplicationInfo.PRIVATE_FLAG_PRIVILEGED;
@@ -10605,6 +10741,10 @@
pkg.applicationInfo.privateFlags |= ApplicationInfo.PRIVATE_FLAG_VENDOR;
}
+ if ((scanFlags & SCAN_AS_PRODUCT) != 0) {
+ pkg.applicationInfo.privateFlags |= ApplicationInfo.PRIVATE_FLAG_PRODUCT;
+ }
+
if (!isSystemApp(pkg)) {
// Only system apps can use these features.
pkg.mOriginalPackages = null;
@@ -10613,6 +10753,14 @@
}
}
+ private static @NonNull <T> T assertNotNull(@Nullable T object, String message)
+ throws PackageManagerException {
+ if (object == null) {
+ throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR, message);
+ }
+ return object;
+ }
+
/**
* Asserts the parsed package is valid according to the given policy. If the
* package is invalid, for whatever reason, throws {@link PackageManagerException}.
@@ -10886,6 +11034,50 @@
}
}
}
+
+ // Apply policies specific for runtime resource overlays (RROs).
+ if (pkg.mOverlayTarget != null) {
+ // System overlays have some restrictions on their use of the 'static' state.
+ if ((scanFlags & SCAN_AS_SYSTEM) != 0) {
+ // We are scanning a system overlay. This can be the first scan of the
+ // system/vendor/oem partition, or an update to the system overlay.
+ if ((parseFlags & PackageParser.PARSE_IS_SYSTEM_DIR) == 0) {
+ // This must be an update to a system overlay.
+ final PackageSetting previousPkg = assertNotNull(
+ mSettings.getPackageLPr(pkg.packageName),
+ "previous package state not present");
+
+ // Static overlays cannot be updated.
+ if (previousPkg.pkg.mOverlayIsStatic) {
+ throw new PackageManagerException("Overlay " + pkg.packageName +
+ " is static and cannot be upgraded.");
+ // Non-static overlays cannot be converted to static overlays.
+ } else if (pkg.mOverlayIsStatic) {
+ throw new PackageManagerException("Overlay " + pkg.packageName +
+ " cannot be upgraded into a static overlay.");
+ }
+ }
+ } else {
+ // The overlay is a non-system overlay. Non-system overlays cannot be static.
+ if (pkg.mOverlayIsStatic) {
+ throw new PackageManagerException("Overlay " + pkg.packageName +
+ " is static but not pre-installed.");
+ }
+
+ // The only case where we allow installation of a non-system overlay is when
+ // its signature is signed with the platform certificate.
+ PackageSetting platformPkgSetting = mSettings.getPackageLPr("android");
+ if ((platformPkgSetting.signatures.mSigningDetails
+ != PackageParser.SigningDetails.UNKNOWN)
+ && (compareSignatures(
+ platformPkgSetting.signatures.mSigningDetails.signatures,
+ pkg.mSigningDetails.signatures)
+ != PackageManager.SIGNATURE_MATCH)) {
+ throw new PackageManagerException("Overlay " + pkg.packageName +
+ " must be signed with the platform certificate.");
+ }
+ }
+ }
}
}
@@ -11583,7 +11775,7 @@
mInstantAppInstallerActivity.exported = true;
mInstantAppInstallerActivity.enabled = true;
mInstantAppInstallerInfo.activityInfo = mInstantAppInstallerActivity;
- mInstantAppInstallerInfo.priority = 0;
+ mInstantAppInstallerInfo.priority = 1;
mInstantAppInstallerInfo.preferredOrder = 1;
mInstantAppInstallerInfo.isDefault = true;
mInstantAppInstallerInfo.match = IntentFilter.MATCH_CATEGORY_SCHEME_SPECIFIC_PART
@@ -11599,6 +11791,8 @@
codeRoot = Environment.getOemDirectory();
} else if (FileUtils.contains(Environment.getVendorDirectory(), codePath)) {
codeRoot = Environment.getVendorDirectory();
+ } else if (FileUtils.contains(Environment.getProductDirectory(), codePath)) {
+ codeRoot = Environment.getProductDirectory();
} else {
// Unrecognized code path; take its top real segment as the apk root:
// e.g. /something/app/blah.apk => /something
@@ -13031,7 +13225,8 @@
}
static final class EphemeralIntentResolver
- extends IntentResolver<AuxiliaryResolveInfo, AuxiliaryResolveInfo> {
+ extends IntentResolver<AuxiliaryResolveInfo.AuxiliaryFilter,
+ AuxiliaryResolveInfo.AuxiliaryFilter> {
/**
* The result that has the highest defined order. Ordering applies on a
* per-package basis. Mapping is from package name to Pair of order and
@@ -13046,18 +13241,19 @@
final ArrayMap<String, Pair<Integer, InstantAppResolveInfo>> mOrderResult = new ArrayMap<>();
@Override
- protected AuxiliaryResolveInfo[] newArray(int size) {
- return new AuxiliaryResolveInfo[size];
+ protected AuxiliaryResolveInfo.AuxiliaryFilter[] newArray(int size) {
+ return new AuxiliaryResolveInfo.AuxiliaryFilter[size];
}
@Override
- protected boolean isPackageForFilter(String packageName, AuxiliaryResolveInfo responseObj) {
+ protected boolean isPackageForFilter(String packageName,
+ AuxiliaryResolveInfo.AuxiliaryFilter responseObj) {
return true;
}
@Override
- protected AuxiliaryResolveInfo newResult(AuxiliaryResolveInfo responseObj, int match,
- int userId) {
+ protected AuxiliaryResolveInfo.AuxiliaryFilter newResult(
+ AuxiliaryResolveInfo.AuxiliaryFilter responseObj, int match, int userId) {
if (!sUserManager.exists(userId)) {
return null;
}
@@ -13078,7 +13274,7 @@
}
@Override
- protected void filterResults(List<AuxiliaryResolveInfo> results) {
+ protected void filterResults(List<AuxiliaryResolveInfo.AuxiliaryFilter> results) {
// only do work if ordering is enabled [most of the time it won't be]
if (mOrderResult.size() == 0) {
return;
@@ -16001,7 +16197,7 @@
boolean sysPkg = (isSystemApp(oldPackage));
if (sysPkg) {
- // Set the system/privileged/oem/vendor flags as needed
+ // Set the system/privileged/oem/vendor/product flags as needed
final boolean privileged =
(oldPackage.applicationInfo.privateFlags
& ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) != 0;
@@ -16011,12 +16207,16 @@
final boolean vendor =
(oldPackage.applicationInfo.privateFlags
& ApplicationInfo.PRIVATE_FLAG_VENDOR) != 0;
+ final boolean product =
+ (oldPackage.applicationInfo.privateFlags
+ & ApplicationInfo.PRIVATE_FLAG_PRODUCT) != 0;
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);
+ | (vendor ? SCAN_AS_VENDOR : 0)
+ | (product ? SCAN_AS_PRODUCT : 0);
replaceSystemPackageLIF(oldPackage, pkg, systemParseFlags, systemScanFlags,
user, allUsers, installerPackageName, res, installReason);
@@ -16083,7 +16283,6 @@
clearAppDataLIF(pkg, UserHandle.USER_ALL, StorageManager.FLAG_STORAGE_DE
| StorageManager.FLAG_STORAGE_CE | Installer.FLAG_CLEAR_CODE_CACHE_ONLY);
- clearAppProfilesLIF(deletedPackage, UserHandle.USER_ALL);
try {
final PackageParser.Package newPackage = scanPackageTracedLI(pkg, parseFlags,
@@ -16222,7 +16421,6 @@
// Successfully disabled the old package. Now proceed with re-installation
clearAppDataLIF(pkg, UserHandle.USER_ALL, StorageManager.FLAG_STORAGE_DE
| StorageManager.FLAG_STORAGE_CE | Installer.FLAG_CLEAR_CODE_CACHE_ONLY);
- clearAppProfilesLIF(deletedPackage, UserHandle.USER_ALL);
res.setReturnCode(PackageManager.INSTALL_SUCCEEDED);
pkg.setApplicationInfoFlags(ApplicationInfo.FLAG_UPDATED_SYSTEM_APP,
@@ -16682,7 +16880,7 @@
if (args.signingDetails != PackageParser.SigningDetails.UNKNOWN) {
pkg.setSigningDetails(args.signingDetails);
} else {
- PackageParser.collectCertificates(pkg, parseFlags);
+ PackageParser.collectCertificates(pkg, false /* skipVerify */);
}
} catch (PackageParserException e) {
res.setError("Failed collect during installPackageLI", e);
@@ -16962,6 +17160,43 @@
return;
}
+ if (PackageManagerServiceUtils.isApkVerityEnabled()) {
+ String apkPath = null;
+ synchronized (mPackages) {
+ // Note that if the attacker managed to skip verify setup, for example by tampering
+ // with the package settings, upon reboot we will do full apk verification when
+ // verity is not detected.
+ final PackageSetting ps = mSettings.mPackages.get(pkgName);
+ if (ps != null && ps.isPrivileged()) {
+ apkPath = pkg.baseCodePath;
+ }
+ }
+
+ if (apkPath != null) {
+ final VerityUtils.SetupResult result =
+ VerityUtils.generateApkVeritySetupData(apkPath);
+ if (result.isOk()) {
+ if (Build.IS_DEBUGGABLE) Slog.i(TAG, "Enabling apk verity to " + apkPath);
+ FileDescriptor fd = result.getUnownedFileDescriptor();
+ try {
+ mInstaller.installApkVerity(apkPath, fd);
+ } catch (InstallerException e) {
+ res.setError(INSTALL_FAILED_INTERNAL_ERROR,
+ "Failed to set up verity: " + e);
+ return;
+ } finally {
+ IoUtils.closeQuietly(fd);
+ }
+ } else if (result.isFailed()) {
+ res.setError(INSTALL_FAILED_INTERNAL_ERROR, "Failed to generate verity");
+ return;
+ } else {
+ // Do nothing if verity is skipped. Will fall back to full apk verification on
+ // reboot.
+ }
+ }
+ }
+
if (!instantApp) {
startIntentFilterVerifications(args.user.getIdentifier(), replace, pkg);
} else {
@@ -16994,6 +17229,11 @@
}
}
+ // Prepare the application profiles for the new code paths.
+ // This needs to be done before invoking dexopt so that any install-time profile
+ // can be used for optimizations.
+ mArtManagerService.prepareAppProfiles(pkg, resolveUserIds(args.user.getIdentifier()));
+
// Check whether we need to dexopt the app.
//
// NOTE: it is IMPORTANT to call dexopt:
@@ -17224,6 +17464,10 @@
return (pkg.applicationInfo.privateFlags & ApplicationInfo.PRIVATE_FLAG_VENDOR) != 0;
}
+ private static boolean isProductApp(PackageParser.Package pkg) {
+ return (pkg.applicationInfo.privateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT) != 0;
+ }
+
private static boolean hasDomainURLs(PackageParser.Package pkg) {
return (pkg.applicationInfo.privateFlags & ApplicationInfo.PRIVATE_FLAG_HAS_DOMAIN_URLS) != 0;
}
@@ -17963,8 +18207,10 @@
try {
final File privilegedAppDir = new File(Environment.getRootDirectory(), "priv-app");
final File privilegedVendorAppDir = new File(Environment.getVendorDirectory(), "priv-app");
+ final File privilegedProductAppDir = new File(Environment.getProductDirectory(), "priv-app");
return path.startsWith(privilegedAppDir.getCanonicalPath())
- || path.startsWith(privilegedVendorAppDir.getCanonicalPath());
+ || path.startsWith(privilegedVendorAppDir.getCanonicalPath())
+ || path.startsWith(privilegedProductAppDir.getCanonicalPath());
} catch (IOException e) {
Slog.e(TAG, "Unable to access code path " + path);
}
@@ -17989,6 +18235,15 @@
return false;
}
+ static boolean locationIsProduct(String path) {
+ try {
+ return path.startsWith(Environment.getProductDirectory().getCanonicalPath());
+ } catch (IOException e) {
+ Slog.e(TAG, "Unable to access code path " + path);
+ }
+ return false;
+ }
+
/*
* Tries to delete system package.
*/
@@ -18113,6 +18368,9 @@
if (locationIsVendor(codePathString)) {
scanFlags |= SCAN_AS_VENDOR;
}
+ if (locationIsProduct(codePathString)) {
+ scanFlags |= SCAN_AS_PRODUCT;
+ }
final File codePath = new File(codePathString);
final PackageParser.Package pkg =
@@ -20253,7 +20511,6 @@
}
clearAppDataLIF(pkg, UserHandle.USER_ALL, FLAG_STORAGE_DE
| FLAG_STORAGE_CE | Installer.FLAG_CLEAR_CODE_CACHE_ONLY);
- clearAppProfilesLIF(pkg, UserHandle.USER_ALL);
mDexManager.notifyPackageUpdated(pkg.packageName,
pkg.baseCodePath, pkg.splitCodePaths);
}
@@ -22008,6 +22265,8 @@
Slog.e(TAG, "Failed to create app data for " + packageName + ": " + e);
}
}
+ // Prepare the application profiles.
+ mArtManagerService.prepareAppProfiles(pkg, userId);
if ((flags & StorageManager.FLAG_STORAGE_CE) != 0 && ceDataInode != -1) {
// TODO: mark this structure as dirty so we persist it!
diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
index 021c4b8..76c199b 100644
--- a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
+++ b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
@@ -562,8 +562,7 @@
private static boolean matchSignatureInSystem(PackageSetting pkgSetting,
PackageSetting disabledPkgSetting) {
try {
- PackageParser.collectCertificates(disabledPkgSetting.pkg,
- PackageParser.PARSE_IS_SYSTEM_DIR);
+ PackageParser.collectCertificates(disabledPkgSetting.pkg, true /* skipVerify */);
if (compareSignatures(pkgSetting.signatures.mSigningDetails.signatures,
disabledPkgSetting.signatures.mSigningDetails.signatures)
!= PackageManager.SIGNATURE_MATCH) {
@@ -579,7 +578,6 @@
return true;
}
-
/**
* Checks the signing certificates to see if the provided certificate is a member. Invalid for
* {@code SigningDetails} with multiple signing certificates.
@@ -642,10 +640,14 @@
return false;
}
+ /** Returns true if APK Verity is enabled. */
+ static boolean isApkVerityEnabled() {
+ return SystemProperties.getInt("ro.apk_verity.mode", 0) != 0;
+ }
+
/** Returns true to force apk verification if the updated package (in /data) is a priv app. */
static boolean isApkVerificationForced(@Nullable PackageSetting disabledPs) {
- return disabledPs != null && disabledPs.isPrivileged() &&
- SystemProperties.getInt("ro.apk_verity.mode", 0) != 0;
+ return disabledPs != null && disabledPs.isPrivileged() && isApkVerityEnabled();
}
/**
diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
index 47cd813..686c4a5 100644
--- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
+++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
@@ -1555,6 +1555,15 @@
}
}
+ private boolean isProductApp(String pkg) {
+ try {
+ final PackageInfo info = mInterface.getPackageInfo(pkg, 0, UserHandle.USER_SYSTEM);
+ return info != null && info.applicationInfo.isProduct();
+ } catch (RemoteException e) {
+ return false;
+ }
+ }
+
private int runGetPrivappPermissions() {
final String pkg = getNextArg();
if (pkg == null) {
@@ -1562,9 +1571,14 @@
return 1;
}
- ArraySet<String> privAppPermissions = isVendorApp(pkg) ?
- SystemConfig.getInstance().getVendorPrivAppPermissions(pkg)
- : SystemConfig.getInstance().getPrivAppPermissions(pkg);
+ ArraySet<String> privAppPermissions = null;
+ if (isVendorApp(pkg)) {
+ privAppPermissions = SystemConfig.getInstance().getVendorPrivAppPermissions(pkg);
+ } else if (isProductApp(pkg)) {
+ privAppPermissions = SystemConfig.getInstance().getProductPrivAppPermissions(pkg);
+ } else {
+ privAppPermissions = SystemConfig.getInstance().getPrivAppPermissions(pkg);
+ }
getOutPrintWriter().println(privAppPermissions == null
? "{}" : privAppPermissions.toString());
@@ -1578,9 +1592,14 @@
return 1;
}
- ArraySet<String> privAppPermissions = isVendorApp(pkg) ?
- SystemConfig.getInstance().getVendorPrivAppDenyPermissions(pkg)
- : SystemConfig.getInstance().getPrivAppDenyPermissions(pkg);
+ ArraySet<String> privAppPermissions = null;
+ if (isVendorApp(pkg)) {
+ privAppPermissions = SystemConfig.getInstance().getVendorPrivAppDenyPermissions(pkg);
+ } else if (isProductApp(pkg)) {
+ privAppPermissions = SystemConfig.getInstance().getProductPrivAppDenyPermissions(pkg);
+ } else {
+ privAppPermissions = SystemConfig.getInstance().getPrivAppDenyPermissions(pkg);
+ }
getOutPrintWriter().println(privAppPermissions == null
? "{}" : privAppPermissions.toString());
diff --git a/services/core/java/com/android/server/pm/PackageSetting.java b/services/core/java/com/android/server/pm/PackageSetting.java
index 2a2430c..3e2bd4a 100644
--- a/services/core/java/com/android/server/pm/PackageSetting.java
+++ b/services/core/java/com/android/server/pm/PackageSetting.java
@@ -173,6 +173,10 @@
return (pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_VENDOR) != 0;
}
+ public boolean isProduct() {
+ return (pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT) != 0;
+ }
+
public boolean isForwardLocked() {
return (pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0;
}
diff --git a/services/core/java/com/android/server/pm/PackageSignatures.java b/services/core/java/com/android/server/pm/PackageSignatures.java
index d471fc8..0229a37 100644
--- a/services/core/java/com/android/server/pm/PackageSignatures.java
+++ b/services/core/java/com/android/server/pm/PackageSignatures.java
@@ -182,7 +182,6 @@
Signature sig = readSignatures.get(idx);
if (sig != null) {
signatures[pos] = readSignatures.get(idx);
- pos++;
} else {
PackageManagerService.reportSettingsProblem(Log.WARN,
"Error in package manager settings: <cert> "
@@ -202,7 +201,6 @@
Signature sig = new Signature(key);
readSignatures.set(idx, sig);
signatures[pos] = sig;
- pos++;
}
} catch (NumberFormatException e) {
PackageManagerService.reportSettingsProblem(Log.WARN,
@@ -245,6 +243,8 @@
+ "many <cert> tags, expected " + count
+ " at " + parser.getPositionDescription());
}
+ pos++;
+ XmlUtils.skipCurrentTag(parser);
} else if (tagName.equals("pastSigs")) {
if (flags == null) {
// we haven't encountered pastSigs yet, go ahead
@@ -296,8 +296,8 @@
PackageManagerService.reportSettingsProblem(Log.WARN,
"Unknown element under <sigs>: "
+ parser.getName());
+ XmlUtils.skipCurrentTag(parser);
}
- XmlUtils.skipCurrentTag(parser);
}
return pos;
}
@@ -330,4 +330,4 @@
}
return buf.toString();
}
-}
\ No newline at end of file
+}
diff --git a/services/core/java/com/android/server/pm/SELinuxMMAC.java b/services/core/java/com/android/server/pm/SELinuxMMAC.java
index 2552643..7c6b309 100644
--- a/services/core/java/com/android/server/pm/SELinuxMMAC.java
+++ b/services/core/java/com/android/server/pm/SELinuxMMAC.java
@@ -61,10 +61,8 @@
/** Whether or not the policy files have been read */
private static boolean sPolicyRead;
- /** Path to MAC permissions on system image */
- private static final File[] MAC_PERMISSIONS =
- { new File(Environment.getRootDirectory(), "/etc/selinux/plat_mac_permissions.xml"),
- new File(Environment.getVendorDirectory(), "/etc/selinux/nonplat_mac_permissions.xml") };
+ /** Required MAC permissions files */
+ private static List<File> sMacPermissions = new ArrayList<>();
// Append privapp to existing seinfo label
private static final String PRIVILEGED_APP_STR = ":privapp";
@@ -75,13 +73,40 @@
// Append targetSdkVersion=n to existing seinfo label where n is the app's targetSdkVersion
private static final String TARGETSDKVERSION_STR = ":targetSdkVersion=";
+ // Only initialize sMacPermissions once.
+ static {
+ // Platform mac permissions.
+ sMacPermissions.add(new File(
+ Environment.getRootDirectory(), "/etc/selinux/plat_mac_permissions.xml"));
+
+ // Vendor mac permissions.
+ // The filename has been renamed from nonplat_mac_permissions to
+ // vendor_mac_permissions. Either of them should exist.
+ final File vendorMacPermission = new File(
+ Environment.getVendorDirectory(), "/etc/selinux/vendor_mac_permissions.xml");
+ if (vendorMacPermission.exists()) {
+ sMacPermissions.add(vendorMacPermission);
+ } else {
+ // For backward compatibility.
+ sMacPermissions.add(new File(Environment.getVendorDirectory(),
+ "/etc/selinux/nonplat_mac_permissions.xml"));
+ }
+
+ // ODM mac permissions (optional).
+ final File odmMacPermission = new File(
+ Environment.getOdmDirectory(), "/etc/selinux/odm_mac_permissions.xml");
+ if (odmMacPermission.exists()) {
+ sMacPermissions.add(odmMacPermission);
+ }
+ }
+
/**
* Load the mac_permissions.xml file containing all seinfo assignments used to
- * label apps. The loaded mac_permissions.xml file is determined by the
- * MAC_PERMISSIONS class variable which is set at class load time which itself
- * is based on the USE_OVERRIDE_POLICY class variable. For further guidance on
+ * label apps. The loaded mac_permissions.xml files are plat_mac_permissions.xml and
+ * vendor_mac_permissions.xml, on /system and /vendor partitions, respectively.
+ * odm_mac_permissions.xml on /odm partition is optional. For further guidance on
* the proper structure of a mac_permissions.xml file consult the source code
- * located at system/sepolicy/mac_permissions.xml.
+ * located at system/sepolicy/private/mac_permissions.xml.
*
* @return boolean indicating if policy was correctly loaded. A value of false
* typically indicates a structural problem with the xml or incorrectly
@@ -100,10 +125,13 @@
FileReader policyFile = null;
XmlPullParser parser = Xml.newPullParser();
- for (int i = 0; i < MAC_PERMISSIONS.length; i++) {
+
+ final int count = sMacPermissions.size();
+ for (int i = 0; i < count; ++i) {
+ final File macPermission = sMacPermissions.get(i);
try {
- policyFile = new FileReader(MAC_PERMISSIONS[i]);
- Slog.d(TAG, "Using policy file " + MAC_PERMISSIONS[i]);
+ policyFile = new FileReader(macPermission);
+ Slog.d(TAG, "Using policy file " + macPermission);
parser.setInput(policyFile);
parser.nextTag();
@@ -127,13 +155,13 @@
StringBuilder sb = new StringBuilder("Exception @");
sb.append(parser.getPositionDescription());
sb.append(" while parsing ");
- sb.append(MAC_PERMISSIONS[i]);
+ sb.append(macPermission);
sb.append(":");
sb.append(ex);
Slog.w(TAG, sb.toString());
return false;
} catch (IOException ioe) {
- Slog.w(TAG, "Exception parsing " + MAC_PERMISSIONS[i], ioe);
+ Slog.w(TAG, "Exception parsing " + macPermission, ioe);
return false;
} finally {
IoUtils.closeQuietly(policyFile);
diff --git a/services/core/java/com/android/server/pm/SettingBase.java b/services/core/java/com/android/server/pm/SettingBase.java
index 46ba006..7c92045 100644
--- a/services/core/java/com/android/server/pm/SettingBase.java
+++ b/services/core/java/com/android/server/pm/SettingBase.java
@@ -62,6 +62,7 @@
& (ApplicationInfo.PRIVATE_FLAG_PRIVILEGED
| ApplicationInfo.PRIVATE_FLAG_OEM
| ApplicationInfo.PRIVATE_FLAG_VENDOR
+ | ApplicationInfo.PRIVATE_FLAG_PRODUCT
| 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 8ce412e..b6e1534 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -851,6 +851,8 @@
pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_OEM;
pkgSetting.pkgPrivateFlags |=
pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_VENDOR;
+ pkgSetting.pkgPrivateFlags |=
+ pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT;
pkgSetting.primaryCpuAbiString = primaryCpuAbi;
pkgSetting.secondaryCpuAbiString = secondaryCpuAbi;
if (childPkgNames != null) {
@@ -1994,6 +1996,8 @@
if (DEBUG_MU) {
Log.i(TAG, "Writing package restrictions for user=" + userId);
}
+ final long startTime = SystemClock.uptimeMillis();
+
// Keep the old stopped packages around until we know the new ones have
// been successfully written.
File userPackagesStateFile = getUserPackagesStateFile(userId);
@@ -2127,6 +2131,9 @@
|FileUtils.S_IRGRP|FileUtils.S_IWGRP,
-1, -1);
+ com.android.internal.logging.EventLogTags.writeCommitSysConfigFile(
+ "package-user-" + userId, SystemClock.uptimeMillis() - startTime);
+
// Done, all is good!
return;
} catch(java.io.IOException e) {
@@ -2388,6 +2395,8 @@
void writeLPr() {
//Debug.startMethodTracing("/data/system/packageprof", 8 * 1024 * 1024);
+ final long startTime = SystemClock.uptimeMillis();
+
// Keep the old settings around until we know the new ones have
// been successfully written.
if (mSettingsFilename.exists()) {
@@ -2533,6 +2542,8 @@
writePackageListLPr();
writeAllUsersPackageRestrictionsLPr();
writeAllRuntimePermissionsLPr();
+ com.android.internal.logging.EventLogTags.writeCommitSysConfigFile(
+ "package", SystemClock.uptimeMillis() - startTime);
return;
} catch(java.io.IOException e) {
@@ -4397,6 +4408,7 @@
ApplicationInfo.PRIVATE_FLAG_REQUIRED_FOR_SYSTEM_USER, "REQUIRED_FOR_SYSTEM_USER",
ApplicationInfo.PRIVATE_FLAG_STATIC_SHARED_LIBRARY, "STATIC_SHARED_LIBRARY",
ApplicationInfo.PRIVATE_FLAG_VENDOR, "VENDOR",
+ ApplicationInfo.PRIVATE_FLAG_PRODUCT, "PRODUCT",
ApplicationInfo.PRIVATE_FLAG_VIRTUAL_PRELOAD, "VIRTUAL_PRELOAD",
};
@@ -5131,7 +5143,8 @@
}
private void writePermissionsSync(int userId) {
- AtomicFile destination = new AtomicFile(getUserRuntimePermissionsFile(userId));
+ AtomicFile destination = new AtomicFile(getUserRuntimePermissionsFile(userId),
+ "package-perms-" + userId);
ArrayMap<String, List<PermissionState>> permissionsForPackage = new ArrayMap<>();
ArrayMap<String, List<PermissionState>> permissionsForSharedUser = new ArrayMap<>();
diff --git a/services/core/java/com/android/server/pm/UserRestrictionsUtils.java b/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
index cc07d82..a42fcbd 100644
--- a/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
+++ b/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
@@ -561,6 +561,25 @@
}
}
break;
+ case UserManager.DISALLOW_AMBIENT_DISPLAY:
+ if (newValue) {
+ android.provider.Settings.Secure.putString(
+ context.getContentResolver(),
+ Settings.Secure.DOZE_ENABLED, "0");
+ android.provider.Settings.Secure.putString(
+ context.getContentResolver(),
+ Settings.Secure.DOZE_ALWAYS_ON, "0");
+ android.provider.Settings.Secure.putString(
+ context.getContentResolver(),
+ Settings.Secure.DOZE_PULSE_ON_PICK_UP, "0");
+ android.provider.Settings.Secure.putString(
+ context.getContentResolver(),
+ Settings.Secure.DOZE_PULSE_ON_LONG_PRESS, "0");
+ android.provider.Settings.Secure.putString(
+ context.getContentResolver(),
+ Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP, "0");
+ }
+ break;
}
} finally {
Binder.restoreCallingIdentity(id);
diff --git a/services/core/java/com/android/server/pm/dex/ArtManagerService.java b/services/core/java/com/android/server/pm/dex/ArtManagerService.java
index 2dbb34d..e290272 100644
--- a/services/core/java/com/android/server/pm/dex/ArtManagerService.java
+++ b/services/core/java/com/android/server/pm/dex/ArtManagerService.java
@@ -17,11 +17,16 @@
package com.android.server.pm.dex;
import android.Manifest;
+import android.annotation.UserIdInt;
+import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
+import android.content.pm.PackageParser;
import android.content.pm.dex.ArtManager;
+import android.content.pm.dex.ArtManager.ProfileType;
+import android.content.pm.dex.DexMetadataHelper;
import android.os.Binder;
-import android.os.Environment;
+import android.os.Build;
import android.os.Handler;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
@@ -29,15 +34,21 @@
import android.content.pm.dex.ISnapshotRuntimeProfileCallback;
import android.os.SystemProperties;
import android.os.UserHandle;
+import android.system.Os;
+import android.util.ArrayMap;
import android.util.Slog;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.os.BackgroundThread;
+import com.android.internal.util.ArrayUtils;
import com.android.internal.util.Preconditions;
import com.android.server.pm.Installer;
import com.android.server.pm.Installer.InstallerException;
import java.io.File;
import java.io.FileNotFoundException;
+import libcore.io.IoUtils;
+import libcore.util.NonNull;
+import libcore.util.Nullable;
/**
* A system service that provides access to runtime and compiler artifacts.
@@ -57,6 +68,12 @@
private static boolean DEBUG = false;
private static boolean DEBUG_IGNORE_PERMISSIONS = false;
+ // Package name used to create the profile directory layout when
+ // taking a snapshot of the boot image profile.
+ private static final String BOOT_IMAGE_ANDROID_PACKAGE = "android";
+ // Profile name used for the boot image profile.
+ private static final String BOOT_IMAGE_PROFILE_NAME = "android.prof";
+
private final IPackageManager mPackageManager;
private final Object mInstallLock;
@GuardedBy("mInstallLock")
@@ -72,20 +89,36 @@
}
@Override
- public void snapshotRuntimeProfile(String packageName, String codePath,
- ISnapshotRuntimeProfileCallback callback) {
+ public void snapshotRuntimeProfile(@ProfileType int profileType, @Nullable String packageName,
+ @Nullable String codePath, @NonNull ISnapshotRuntimeProfileCallback callback) {
// Sanity checks on the arguments.
- Preconditions.checkStringNotEmpty(packageName);
- Preconditions.checkStringNotEmpty(codePath);
Preconditions.checkNotNull(callback);
- // Verify that the caller has the right permissions.
- checkReadRuntimeProfilePermission();
+ boolean bootImageProfile = profileType == ArtManager.PROFILE_BOOT_IMAGE;
+ if (!bootImageProfile) {
+ Preconditions.checkStringNotEmpty(codePath);
+ Preconditions.checkStringNotEmpty(packageName);
+ }
+
+ // Verify that the caller has the right permissions and that the runtime profiling is
+ // enabled. The call to isRuntimePermissions will checkReadRuntimeProfilePermission.
+ if (!isRuntimeProfilingEnabled(profileType)) {
+ throw new IllegalStateException("Runtime profiling is not enabled for " + profileType);
+ }
if (DEBUG) {
Slog.d(TAG, "Requested snapshot for " + packageName + ":" + codePath);
}
+ if (bootImageProfile) {
+ snapshotBootImageProfile(callback);
+ } else {
+ snapshotAppProfile(packageName, codePath, callback);
+ }
+ }
+
+ private void snapshotAppProfile(String packageName, String codePath,
+ ISnapshotRuntimeProfileCallback callback) {
PackageInfo info = null;
try {
// Note that we use the default user 0 to retrieve the package info.
@@ -105,11 +138,13 @@
}
boolean pathFound = info.applicationInfo.getBaseCodePath().equals(codePath);
+ String splitName = null;
String[] splitCodePaths = info.applicationInfo.getSplitCodePaths();
if (!pathFound && (splitCodePaths != null)) {
- for (String path : splitCodePaths) {
- if (path.equals(codePath)) {
+ for (int i = splitCodePaths.length - 1; i >= 0; i--) {
+ if (splitCodePaths[i].equals(codePath)) {
pathFound = true;
+ splitName = info.applicationInfo.splitNames[i];
break;
}
}
@@ -120,18 +155,25 @@
}
// All good, create the profile snapshot.
- createProfileSnapshot(packageName, codePath, callback, info);
+ int appId = UserHandle.getAppId(info.applicationInfo.uid);
+ if (appId < 0) {
+ postError(callback, packageName, ArtManager.SNAPSHOT_FAILED_INTERNAL_ERROR);
+ Slog.wtf(TAG, "AppId is -1 for package: " + packageName);
+ return;
+ }
+
+ createProfileSnapshot(packageName, ArtManager.getProfileName(splitName), codePath,
+ appId, callback);
// Destroy the snapshot, we no longer need it.
- destroyProfileSnapshot(packageName, codePath);
+ destroyProfileSnapshot(packageName, ArtManager.getProfileName(splitName));
}
- private void createProfileSnapshot(String packageName, String codePath,
- ISnapshotRuntimeProfileCallback callback, PackageInfo info) {
+ private void createProfileSnapshot(String packageName, String profileName, String classpath,
+ int appId, ISnapshotRuntimeProfileCallback callback) {
// Ask the installer to snapshot the profile.
synchronized (mInstallLock) {
try {
- if (!mInstaller.createProfileSnapshot(UserHandle.getAppId(info.applicationInfo.uid),
- packageName, codePath)) {
+ if (!mInstaller.createProfileSnapshot(appId, packageName, profileName, classpath)) {
postError(callback, packageName, ArtManager.SNAPSHOT_FAILED_INTERNAL_ERROR);
return;
}
@@ -142,38 +184,64 @@
}
// Open the snapshot and invoke the callback.
- File snapshotProfile = Environment.getProfileSnapshotPath(packageName, codePath);
- ParcelFileDescriptor fd;
+ File snapshotProfile = ArtManager.getProfileSnapshotFileForName(packageName, profileName);
+
+ ParcelFileDescriptor fd = null;
try {
fd = ParcelFileDescriptor.open(snapshotProfile, ParcelFileDescriptor.MODE_READ_ONLY);
postSuccess(packageName, fd, callback);
} catch (FileNotFoundException e) {
- Slog.w(TAG, "Could not open snapshot profile for " + packageName + ":" + codePath, e);
+ Slog.w(TAG, "Could not open snapshot profile for " + packageName + ":"
+ + snapshotProfile, e);
postError(callback, packageName, ArtManager.SNAPSHOT_FAILED_INTERNAL_ERROR);
+ } finally {
+ IoUtils.closeQuietly(fd);
}
}
- private void destroyProfileSnapshot(String packageName, String codePath) {
+ private void destroyProfileSnapshot(String packageName, String profileName) {
if (DEBUG) {
- Slog.d(TAG, "Destroying profile snapshot for" + packageName + ":" + codePath);
+ Slog.d(TAG, "Destroying profile snapshot for" + packageName + ":" + profileName);
}
synchronized (mInstallLock) {
try {
- mInstaller.destroyProfileSnapshot(packageName, codePath);
+ mInstaller.destroyProfileSnapshot(packageName, profileName);
} catch (InstallerException e) {
Slog.e(TAG, "Failed to destroy profile snapshot for " +
- packageName + ":" + codePath, e);
+ packageName + ":" + profileName, e);
}
}
}
@Override
- public boolean isRuntimeProfilingEnabled() {
+ public boolean isRuntimeProfilingEnabled(@ProfileType int profileType) {
// Verify that the caller has the right permissions.
checkReadRuntimeProfilePermission();
- return SystemProperties.getBoolean("dalvik.vm.usejitprofiles", false);
+ switch (profileType) {
+ case ArtManager.PROFILE_APPS :
+ return SystemProperties.getBoolean("dalvik.vm.usejitprofiles", false);
+ case ArtManager.PROFILE_BOOT_IMAGE:
+ return (Build.IS_USERDEBUG || Build.IS_ENG) &&
+ SystemProperties.getBoolean("dalvik.vm.usejitprofiles", false) &&
+ SystemProperties.getBoolean("dalvik.vm.profilebootimage", false);
+ default:
+ throw new IllegalArgumentException("Invalid profile type:" + profileType);
+ }
+ }
+
+ private void snapshotBootImageProfile(ISnapshotRuntimeProfileCallback callback) {
+ // Combine the profiles for boot classpath and system server classpath.
+ // This avoids having yet another type of profiles and simplifies the processing.
+ String classpath = String.join(":", Os.getenv("BOOTCLASSPATH"),
+ Os.getenv("SYSTEMSERVERCLASSPATH"));
+
+ // Create the snapshot.
+ createProfileSnapshot(BOOT_IMAGE_ANDROID_PACKAGE, BOOT_IMAGE_PROFILE_NAME, classpath,
+ /*appId*/ -1, callback);
+ // Destroy the snapshot, we no longer need it.
+ destroyProfileSnapshot(BOOT_IMAGE_ANDROID_PACKAGE, BOOT_IMAGE_PROFILE_NAME);
}
/**
@@ -230,4 +298,103 @@
// Should not happen.
}
}
+
+ /**
+ * Prepare the application profiles.
+ * For all code paths:
+ * - create the current primary profile to save time at app startup time.
+ * - copy the profiles from the associated dex metadata file to the reference profile.
+ */
+ public void prepareAppProfiles(PackageParser.Package pkg, @UserIdInt int user) {
+ final int appId = UserHandle.getAppId(pkg.applicationInfo.uid);
+ if (user < 0) {
+ Slog.wtf(TAG, "Invalid user id: " + user);
+ return;
+ }
+ if (appId < 0) {
+ Slog.wtf(TAG, "Invalid app id: " + appId);
+ return;
+ }
+ try {
+ ArrayMap<String, String> codePathsProfileNames = getPackageProfileNames(pkg);
+ for (int i = codePathsProfileNames.size() - 1; i >= 0; i--) {
+ String codePath = codePathsProfileNames.keyAt(i);
+ String profileName = codePathsProfileNames.valueAt(i);
+ File dexMetadata = DexMetadataHelper.findDexMetadataForFile(new File(codePath));
+ String dexMetadataPath = dexMetadata == null ? null : dexMetadata.getAbsolutePath();
+ synchronized (mInstaller) {
+ boolean result = mInstaller.prepareAppProfile(pkg.packageName, user, appId,
+ profileName, codePath, dexMetadataPath);
+ if (!result) {
+ Slog.e(TAG, "Failed to prepare profile for " +
+ pkg.packageName + ":" + codePath);
+ }
+ }
+ }
+ } catch (InstallerException e) {
+ Slog.e(TAG, "Failed to prepare profile for " + pkg.packageName, e);
+ }
+ }
+
+ /**
+ * Prepares the app profiles for a set of users. {@see ArtManagerService#prepareAppProfiles}.
+ */
+ public void prepareAppProfiles(PackageParser.Package pkg, int[] user) {
+ for (int i = 0; i < user.length; i++) {
+ prepareAppProfiles(pkg, user[i]);
+ }
+ }
+
+ /**
+ * Clear the profiles for the given package.
+ */
+ public void clearAppProfiles(PackageParser.Package pkg) {
+ try {
+ ArrayMap<String, String> packageProfileNames = getPackageProfileNames(pkg);
+ for (int i = packageProfileNames.size() - 1; i >= 0; i--) {
+ String profileName = packageProfileNames.valueAt(i);
+ mInstaller.clearAppProfiles(pkg.packageName, profileName);
+ }
+ } catch (InstallerException e) {
+ Slog.w(TAG, String.valueOf(e));
+ }
+ }
+
+ /**
+ * Dumps the profiles for the given package.
+ */
+ public void dumpProfiles(PackageParser.Package pkg) {
+ final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid);
+ try {
+ ArrayMap<String, String> packageProfileNames = getPackageProfileNames(pkg);
+ for (int i = packageProfileNames.size() - 1; i >= 0; i--) {
+ String codePath = packageProfileNames.keyAt(i);
+ String profileName = packageProfileNames.valueAt(i);
+ synchronized (mInstallLock) {
+ mInstaller.dumpProfiles(sharedGid, pkg.packageName, profileName, codePath);
+ }
+ }
+ } catch (InstallerException e) {
+ Slog.w(TAG, "Failed to dump profiles", e);
+ }
+ }
+
+ /**
+ * Build the profiles names for all the package code paths (excluding resource only paths).
+ * Return the map [code path -> profile name].
+ */
+ private ArrayMap<String, String> getPackageProfileNames(PackageParser.Package pkg) {
+ ArrayMap<String, String> result = new ArrayMap<>();
+ if ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_HAS_CODE) != 0) {
+ result.put(pkg.baseCodePath, ArtManager.getProfileName(null));
+ }
+ if (!ArrayUtils.isEmpty(pkg.splitCodePaths)) {
+ for (int i = 0; i < pkg.splitCodePaths.length; i++) {
+ if ((pkg.splitFlags[i] & ApplicationInfo.FLAG_HAS_CODE) != 0) {
+ result.put(pkg.splitCodePaths[i], ArtManager.getProfileName(pkg.splitNames[i]));
+ }
+ }
+ }
+ return result;
+ }
}
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 6e07eaa..e2123c2 100644
--- a/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java
+++ b/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java
@@ -1215,6 +1215,10 @@
if (dir.isDirectory() && dir.canRead()) {
Collections.addAll(ret, dir.listFiles());
}
+ dir = new File(Environment.getProductDirectory(), "etc/default-permissions");
+ if (dir.isDirectory() && dir.canRead()) {
+ Collections.addAll(ret, dir.listFiles());
+ }
return ret.isEmpty() ? null : ret.toArray(new File[0]);
}
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 786b998..cb3b107 100644
--- a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
+++ b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
@@ -954,9 +954,16 @@
* <p>This handles parent/child apps.
*/
private boolean hasPrivappWhitelistEntry(String perm, PackageParser.Package pkg) {
- ArraySet<String> wlPermissions = pkg.isVendor() ?
- SystemConfig.getInstance().getVendorPrivAppPermissions(pkg.packageName)
- : SystemConfig.getInstance().getPrivAppPermissions(pkg.packageName);
+ ArraySet<String> wlPermissions = null;
+ if (pkg.isVendor()) {
+ wlPermissions =
+ SystemConfig.getInstance().getVendorPrivAppPermissions(pkg.packageName);
+ } else if (pkg.isProduct()) {
+ wlPermissions =
+ SystemConfig.getInstance().getProductPrivAppPermissions(pkg.packageName);
+ } else {
+ wlPermissions = SystemConfig.getInstance().getPrivAppPermissions(pkg.packageName);
+ }
// Let's check if this package is whitelisted...
boolean whitelisted = wlPermissions != null && wlPermissions.contains(perm);
// If it's not, we'll also tail-recurse to the parent.
@@ -979,11 +986,17 @@
// Only report violations for apps on system image
if (!mSystemReady && !pkg.isUpdatedSystemApp()) {
// it's only a reportable violation if the permission isn't explicitly denied
- final ArraySet<String> deniedPermissions = pkg.isVendor() ?
- SystemConfig.getInstance()
- .getVendorPrivAppDenyPermissions(pkg.packageName)
- : SystemConfig.getInstance()
- .getPrivAppDenyPermissions(pkg.packageName);
+ ArraySet<String> deniedPermissions = null;
+ if (pkg.isVendor()) {
+ deniedPermissions = SystemConfig.getInstance()
+ .getVendorPrivAppDenyPermissions(pkg.packageName);
+ } else if (pkg.isProduct()) {
+ deniedPermissions = SystemConfig.getInstance()
+ .getProductPrivAppDenyPermissions(pkg.packageName);
+ } else {
+ deniedPermissions = SystemConfig.getInstance()
+ .getPrivAppDenyPermissions(pkg.packageName);
+ }
final boolean permissionViolation =
deniedPermissions == null || !deniedPermissions.contains(perm);
if (permissionViolation) {
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 0f394a4..0502848 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -1025,7 +1025,7 @@
public void run() {
// send interaction hint to improve redraw performance
mPowerManagerInternal.powerHint(PowerHint.INTERACTION, 0);
- if (isRotationChoiceEnabled()) {
+ if (isRotationChoicePossible(mCurrentAppOrientation)) {
final boolean isValid = isValidRotationChoice(mCurrentAppOrientation,
mRotation);
sendProposedRotationChangeToStatusBarInternal(mRotation, isValid);
@@ -7144,7 +7144,7 @@
mOrientationListener.setCurrentRotation(rotation);
}
- public boolean isRotationChoiceEnabled() {
+ public boolean isRotationChoicePossible(int orientation) {
// Rotation choice is only shown when the user is in locked mode.
if (mUserRotationMode != WindowManagerPolicy.USER_ROTATION_LOCKED) return false;
@@ -7184,50 +7184,45 @@
return false;
}
- // Rotation isn't forced, enable choice
- return true;
+ // Ensure that some rotation choice is possible for the given orientation
+ switch (orientation) {
+ case ActivityInfo.SCREEN_ORIENTATION_FULL_USER:
+ case ActivityInfo.SCREEN_ORIENTATION_USER:
+ case ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED:
+ case ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE:
+ case ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT:
+ // NOSENSOR description is ambiguous, in reality WM ignores user choice
+ return true;
+ }
+
+ // Rotation is forced, should be controlled by system
+ return false;
}
public boolean isValidRotationChoice(int orientation, final int preferredRotation) {
- // Determine if the given app orientation can be chosen and, if so, if it is compatible
- // with the provided rotation choice
-
+ // Determine if the given app orientation is compatible with the provided rotation choice
switch (orientation) {
- case ActivityInfo.SCREEN_ORIENTATION_PORTRAIT:
- case ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE:
- case ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT:
- case ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE:
- case ActivityInfo.SCREEN_ORIENTATION_LOCKED:
- return false; // Forced into a particular rotation, no user choice
-
- case ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE:
- case ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT:
- case ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR:
- case ActivityInfo.SCREEN_ORIENTATION_SENSOR:
- return false; // Sensor overrides user choice
-
- case ActivityInfo.SCREEN_ORIENTATION_NOSENSOR:
- // TODO Can sensor be used to indirectly determine the orientation?
- return false;
-
- case ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE:
- // If the user has locked sensor-based rotation, this behaves the same as landscape
- return false; // User has locked the rotation, will behave as LANDSCAPE
- case ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT:
- // If the user has locked sensor-based rotation, this behaves the same as portrait
- return false; // User has locked the rotation, will behave as PORTRAIT
- case ActivityInfo.SCREEN_ORIENTATION_USER:
- // Works with any rotation except upside down
- return (preferredRotation >= 0) && (preferredRotation != mUpsideDownRotation);
case ActivityInfo.SCREEN_ORIENTATION_FULL_USER:
// Works with any of the 4 rotations
return preferredRotation >= 0;
- default:
- // TODO: how to handle SCREEN_ORIENTATION_BEHIND, UNSET?
- // For UNSPECIFIED use preferred orientation matching SCREEN_ORIENTATION_USER
+ case ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT:
+ // It's possible for the user pref to be set at 180 because of FULL_USER. This would
+ // make switching to USER_PORTRAIT appear at 180. Provide choice to back to portrait
+ // but never to go to 180.
+ return preferredRotation == mPortraitRotation;
+
+ case ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE:
+ // Works landscape or seascape
+ return isLandscapeOrSeascape(preferredRotation);
+
+ case ActivityInfo.SCREEN_ORIENTATION_USER:
+ case ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED:
+ // Works with any rotation except upside down
return (preferredRotation >= 0) && (preferredRotation != mUpsideDownRotation);
}
+
+ return false;
}
private boolean isLandscapeOrSeascape(int rotation) {
diff --git a/services/core/java/com/android/server/power/BatterySaverPolicy.java b/services/core/java/com/android/server/power/BatterySaverPolicy.java
index a538967..847c90a 100644
--- a/services/core/java/com/android/server/power/BatterySaverPolicy.java
+++ b/services/core/java/com/android/server/power/BatterySaverPolicy.java
@@ -33,6 +33,7 @@
import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.power.batterysaver.BatterySavingStats;
import com.android.server.power.batterysaver.CpuFrequencies;
import java.io.PrintWriter;
@@ -498,6 +499,8 @@
pw.print(" Noninteractive File values:\n");
dumpMap(pw, " ", mFilesForNoninteractive);
pw.println();
+ pw.println();
+ BatterySavingStats.getInstance().dump(pw, " ");
}
}
diff --git a/services/core/java/com/android/server/power/Notifier.java b/services/core/java/com/android/server/power/Notifier.java
index 2a153ec..a536270 100644
--- a/services/core/java/com/android/server/power/Notifier.java
+++ b/services/core/java/com/android/server/power/Notifier.java
@@ -19,15 +19,6 @@
import android.annotation.UserIdInt;
import android.app.ActivityManagerInternal;
import android.app.AppOpsManager;
-
-import com.android.internal.app.IAppOpsService;
-import com.android.internal.app.IBatteryStats;
-import com.android.internal.logging.MetricsLogger;
-import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-import com.android.server.EventLogTags;
-import com.android.server.LocalServices;
-import com.android.server.policy.WindowManagerPolicy;
-
import android.app.trust.TrustManager;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -54,6 +45,15 @@
import android.util.Slog;
import android.view.inputmethod.InputMethodManagerInternal;
+import com.android.internal.app.IAppOpsService;
+import com.android.internal.app.IBatteryStats;
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+import com.android.server.EventLogTags;
+import com.android.server.LocalServices;
+import com.android.server.statusbar.StatusBarManagerInternal;
+import com.android.server.policy.WindowManagerPolicy;
+
/**
* Sends broadcasts about important power state changes.
* <p>
@@ -96,6 +96,7 @@
private final ActivityManagerInternal mActivityManagerInternal;
private final InputManagerInternal mInputManagerInternal;
private final InputMethodManagerInternal mInputMethodManagerInternal;
+ private final StatusBarManagerInternal mStatusBarManagerInternal;
private final TrustManager mTrustManager;
private final NotifierHandler mHandler;
@@ -142,6 +143,7 @@
mActivityManagerInternal = LocalServices.getService(ActivityManagerInternal.class);
mInputManagerInternal = LocalServices.getService(InputManagerInternal.class);
mInputMethodManagerInternal = LocalServices.getService(InputMethodManagerInternal.class);
+ mStatusBarManagerInternal = LocalServices.getService(StatusBarManagerInternal.class);
mTrustManager = mContext.getSystemService(TrustManager.class);
mHandler = new NotifierHandler(looper);
@@ -545,9 +547,19 @@
}
/**
- * Called when wireless charging has started so as to provide user feedback.
+ * Called when profile screen lock timeout has expired.
*/
- public void onWirelessChargingStarted() {
+ public void onProfileTimeout(@UserIdInt int userId) {
+ final Message msg = mHandler.obtainMessage(MSG_PROFILE_TIMED_OUT);
+ msg.setAsynchronous(true);
+ msg.arg1 = userId;
+ mHandler.sendMessage(msg);
+ }
+
+ /**
+ * Called when wireless charging has started so as to provide user feedback (sound and visual).
+ */
+ public void onWirelessChargingStarted(int batteryLevel) {
if (DEBUG) {
Slog.d(TAG, "onWirelessChargingStarted");
}
@@ -555,16 +567,7 @@
mSuspendBlocker.acquire();
Message msg = mHandler.obtainMessage(MSG_WIRELESS_CHARGING_STARTED);
msg.setAsynchronous(true);
- mHandler.sendMessage(msg);
- }
-
- /**
- * Called when profile screen lock timeout has expired.
- */
- public void onProfileTimeout(@UserIdInt int userId) {
- final Message msg = mHandler.obtainMessage(MSG_PROFILE_TIMED_OUT);
- msg.setAsynchronous(true);
- msg.arg1 = userId;
+ msg.arg1 = batteryLevel;
mHandler.sendMessage(msg);
}
@@ -715,7 +718,11 @@
}
}
}
+ }
+ private void showWirelessChargingStarted(int batteryLevel) {
+ playWirelessChargingStartedSound();
+ mStatusBarManagerInternal.showChargingAnimation(batteryLevel);
mSuspendBlocker.release();
}
@@ -738,7 +745,7 @@
sendNextBroadcast();
break;
case MSG_WIRELESS_CHARGING_STARTED:
- playWirelessChargingStartedSound();
+ showWirelessChargingStarted(msg.arg1);
break;
case MSG_SCREEN_BRIGHTNESS_BOOST_CHANGED:
sendBrightnessBoostChangedBroadcast();
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
index 7273f62..db83158 100644
--- a/services/core/java/com/android/server/power/PowerManagerService.java
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
@@ -16,6 +16,11 @@
package com.android.server.power;
+import static android.os.PowerManagerInternal.WAKEFULNESS_ASLEEP;
+import static android.os.PowerManagerInternal.WAKEFULNESS_AWAKE;
+import static android.os.PowerManagerInternal.WAKEFULNESS_DOZING;
+import static android.os.PowerManagerInternal.WAKEFULNESS_DREAMING;
+
import android.annotation.IntDef;
import android.annotation.UserIdInt;
import android.app.ActivityManager;
@@ -65,6 +70,7 @@
import android.service.vr.IVrStateCallbacks;
import android.util.EventLog;
import android.util.KeyValueListParser;
+import android.util.MathUtils;
import android.util.PrintWriterPrinter;
import android.util.Slog;
import android.util.SparseArray;
@@ -103,11 +109,6 @@
import java.util.ArrayList;
import java.util.Arrays;
-import static android.os.PowerManagerInternal.WAKEFULNESS_ASLEEP;
-import static android.os.PowerManagerInternal.WAKEFULNESS_AWAKE;
-import static android.os.PowerManagerInternal.WAKEFULNESS_DOZING;
-import static android.os.PowerManagerInternal.WAKEFULNESS_DREAMING;
-
/**
* The power manager service is responsible for coordinating power management
* functions on the device.
@@ -119,6 +120,9 @@
private static final boolean DEBUG = false;
private static final boolean DEBUG_SPEW = DEBUG && true;
+ // if DEBUG_WIRELESS=true, plays wireless charging animation w/ sound on every plug + unplug
+ private static final boolean DEBUG_WIRELESS = false;
+
// Message: Sent when a user activity timeout occurs to update the power state.
private static final int MSG_USER_ACTIVITY_TIMEOUT = 1;
// Message: Sent when the device enters or exits a dreaming or dozing state.
@@ -455,19 +459,11 @@
private int mScreenBrightnessSettingMinimum;
private int mScreenBrightnessSettingMaximum;
private int mScreenBrightnessSettingDefault;
- private int mScreenBrightnessForVrSettingDefault;
// The screen brightness setting, from 0 to 255.
// Use -1 if no value has been set.
private int mScreenBrightnessSetting;
- // The screen brightness setting, from 0 to 255, to be used while in VR Mode.
- private int mScreenBrightnessForVrSetting;
-
- // The screen auto-brightness adjustment setting, from -1 to 1.
- // Use 0 if there is no adjustment.
- private float mScreenAutoBrightnessAdjustmentSetting;
-
// The screen brightness mode.
// One of the Settings.System.SCREEN_BRIGHTNESS_MODE_* constants.
private int mScreenBrightnessModeSetting;
@@ -490,17 +486,6 @@
// Use -1 to disable.
private long mUserActivityTimeoutOverrideFromWindowManager = -1;
- // The screen brightness setting override from the settings application
- // to temporarily adjust the brightness until next updated,
- // Use -1 to disable.
- private int mTemporaryScreenBrightnessSettingOverride = -1;
-
- // The screen brightness adjustment setting override from the settings
- // application to temporarily adjust the auto-brightness adjustment factor
- // until next updated, in the range -1..1.
- // Use NaN to disable.
- private float mTemporaryScreenAutoBrightnessAdjustmentSettingOverride = Float.NaN;
-
// The screen state to use while dozing.
private int mDozeScreenStateOverrideFromDreamManager = Display.STATE_UNKNOWN;
@@ -771,7 +756,6 @@
mScreenBrightnessSettingMinimum = pm.getMinimumScreenBrightnessSetting();
mScreenBrightnessSettingMaximum = pm.getMaximumScreenBrightnessSetting();
mScreenBrightnessSettingDefault = pm.getDefaultScreenBrightnessSetting();
- mScreenBrightnessForVrSettingDefault = pm.getDefaultScreenBrightnessForVrSetting();
SensorManager sensorManager = new SystemSensorManager(mContext, mHandler.getLooper());
@@ -834,12 +818,6 @@
Settings.Global.STAY_ON_WHILE_PLUGGED_IN),
false, mSettingsObserver, UserHandle.USER_ALL);
resolver.registerContentObserver(Settings.System.getUriFor(
- Settings.System.SCREEN_BRIGHTNESS),
- false, mSettingsObserver, UserHandle.USER_ALL);
- resolver.registerContentObserver(Settings.System.getUriFor(
- Settings.System.SCREEN_BRIGHTNESS_FOR_VR),
- false, mSettingsObserver, UserHandle.USER_ALL);
- resolver.registerContentObserver(Settings.System.getUriFor(
Settings.System.SCREEN_BRIGHTNESS_MODE),
false, mSettingsObserver, UserHandle.USER_ALL);
resolver.registerContentObserver(Settings.System.getUriFor(
@@ -975,29 +953,6 @@
SystemProperties.set(SYSTEM_PROPERTY_RETAIL_DEMO_ENABLED, retailDemoValue);
}
- final int oldScreenBrightnessSetting = getCurrentBrightnessSettingLocked();
-
- mScreenBrightnessForVrSetting = Settings.System.getIntForUser(resolver,
- Settings.System.SCREEN_BRIGHTNESS_FOR_VR, mScreenBrightnessForVrSettingDefault,
- UserHandle.USER_CURRENT);
-
- mScreenBrightnessSetting = Settings.System.getIntForUser(resolver,
- Settings.System.SCREEN_BRIGHTNESS, mScreenBrightnessSettingDefault,
- UserHandle.USER_CURRENT);
-
- if (oldScreenBrightnessSetting != getCurrentBrightnessSettingLocked()) {
- mTemporaryScreenBrightnessSettingOverride = -1;
- }
-
- final float oldScreenAutoBrightnessAdjustmentSetting =
- mScreenAutoBrightnessAdjustmentSetting;
- mScreenAutoBrightnessAdjustmentSetting = Settings.System.getFloatForUser(resolver,
- Settings.System.SCREEN_AUTO_BRIGHTNESS_ADJ, 0.0f,
- UserHandle.USER_CURRENT);
- if (oldScreenAutoBrightnessAdjustmentSetting != mScreenAutoBrightnessAdjustmentSetting) {
- mTemporaryScreenAutoBrightnessAdjustmentSettingOverride = Float.NaN;
- }
-
mScreenBrightnessModeSetting = Settings.System.getIntForUser(resolver,
Settings.System.SCREEN_BRIGHTNESS_MODE,
Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL, UserHandle.USER_CURRENT);
@@ -1016,10 +971,6 @@
mDirty |= DIRTY_SETTINGS;
}
- private int getCurrentBrightnessSettingLocked() {
- return mIsVrModeEnabled ? mScreenBrightnessForVrSetting : mScreenBrightnessSetting;
- }
-
private void postAfterBootCompleted(Runnable r) {
if (mBootCompleted) {
BackgroundThread.getHandler().post(r);
@@ -1794,8 +1745,8 @@
// Tell the notifier whether wireless charging has started so that
// it can provide feedback to the user.
- if (dockedOnWirelessCharger) {
- mNotifier.onWirelessChargingStarted();
+ if (dockedOnWirelessCharger || DEBUG_WIRELESS) {
+ mNotifier.onWirelessChargingStarted(mBatteryLevel);
}
}
@@ -2447,53 +2398,24 @@
mDisplayPowerRequest.policy = getDesiredScreenPolicyLocked();
// Determine appropriate screen brightness and auto-brightness adjustments.
- boolean brightnessSetByUser = true;
- int screenBrightness = mScreenBrightnessSettingDefault;
- float screenAutoBrightnessAdjustment = 0.0f;
- boolean autoBrightness = (mScreenBrightnessModeSetting ==
- Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC);
- boolean brightnessIsTemporary = false;
+ final boolean autoBrightness;
+ final int screenBrightnessOverride;
if (!mBootCompleted) {
// Keep the brightness steady during boot. This requires the
// bootloader brightness and the default brightness to be identical.
autoBrightness = false;
- brightnessSetByUser = false;
- } else if (mIsVrModeEnabled) {
- screenBrightness = mScreenBrightnessForVrSetting;
- autoBrightness = false;
+ screenBrightnessOverride = mScreenBrightnessSettingDefault;
} else if (isValidBrightness(mScreenBrightnessOverrideFromWindowManager)) {
- screenBrightness = mScreenBrightnessOverrideFromWindowManager;
autoBrightness = false;
- brightnessSetByUser = false;
- } else if (isValidBrightness(mTemporaryScreenBrightnessSettingOverride)) {
- screenBrightness = mTemporaryScreenBrightnessSettingOverride;
- brightnessIsTemporary = true;
- } else if (isValidBrightness(mScreenBrightnessSetting)) {
- screenBrightness = mScreenBrightnessSetting;
+ screenBrightnessOverride = mScreenBrightnessOverrideFromWindowManager;
+ } else {
+ autoBrightness = (mScreenBrightnessModeSetting ==
+ Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC);
+ screenBrightnessOverride = -1;
}
- if (autoBrightness) {
- screenBrightness = mScreenBrightnessSettingDefault;
- if (isValidAutoBrightnessAdjustment(
- mTemporaryScreenAutoBrightnessAdjustmentSettingOverride)) {
- screenAutoBrightnessAdjustment =
- mTemporaryScreenAutoBrightnessAdjustmentSettingOverride;
- brightnessIsTemporary = true;
- } else if (isValidAutoBrightnessAdjustment(
- mScreenAutoBrightnessAdjustmentSetting)) {
- screenAutoBrightnessAdjustment = mScreenAutoBrightnessAdjustmentSetting;
- }
- }
- screenBrightness = Math.max(Math.min(screenBrightness,
- mScreenBrightnessSettingMaximum), mScreenBrightnessSettingMinimum);
- screenAutoBrightnessAdjustment = Math.max(Math.min(
- screenAutoBrightnessAdjustment, 1.0f), -1.0f);
// Update display power request.
- mDisplayPowerRequest.screenBrightness = screenBrightness;
- mDisplayPowerRequest.screenAutoBrightnessAdjustment =
- screenAutoBrightnessAdjustment;
- mDisplayPowerRequest.brightnessSetByUser = brightnessSetByUser;
- mDisplayPowerRequest.brightnessIsTemporary = brightnessIsTemporary;
+ mDisplayPowerRequest.screenBrightnessOverride = screenBrightnessOverride;
mDisplayPowerRequest.useAutoBrightness = autoBrightness;
mDisplayPowerRequest.useProximitySensor = shouldUseProximitySensorLocked();
mDisplayPowerRequest.boostScreenBrightness = shouldBoostScreenBrightness();
@@ -2531,6 +2453,8 @@
+ ", mWakeLockSummary=0x" + Integer.toHexString(mWakeLockSummary)
+ ", mUserActivitySummary=0x" + Integer.toHexString(mUserActivitySummary)
+ ", mBootCompleted=" + mBootCompleted
+ + ", screenBrightnessOverride=" + screenBrightnessOverride
+ + ", useAutoBrightness=" + autoBrightness
+ ", mScreenBrightnessBoostInProgress=" + mScreenBrightnessBoostInProgress
+ ", mIsVrModeEnabled= " + mIsVrModeEnabled
+ ", sQuiescent=" + sQuiescent);
@@ -2570,11 +2494,6 @@
return value >= 0 && value <= 255;
}
- private static boolean isValidAutoBrightnessAdjustment(float value) {
- // Handles NaN by always returning false.
- return value >= -1.0f && value <= 1.0f;
- }
-
@VisibleForTesting
int getDesiredScreenPolicyLocked() {
if (mWakefulness == WAKEFULNESS_ASLEEP || sQuiescent) {
@@ -3244,28 +3163,6 @@
}
}
- private void setTemporaryScreenBrightnessSettingOverrideInternal(int brightness) {
- synchronized (mLock) {
- if (mTemporaryScreenBrightnessSettingOverride != brightness) {
- mTemporaryScreenBrightnessSettingOverride = brightness;
- mDirty |= DIRTY_SETTINGS;
- updatePowerStateLocked();
- }
- }
- }
-
- private void setTemporaryScreenAutoBrightnessAdjustmentSettingOverrideInternal(float adj) {
- synchronized (mLock) {
- // Note: This condition handles NaN because NaN is not equal to any other
- // value, including itself.
- if (mTemporaryScreenAutoBrightnessAdjustmentSettingOverride != adj) {
- mTemporaryScreenAutoBrightnessAdjustmentSettingOverride = adj;
- mDirty |= DIRTY_SETTINGS;
- updatePowerStateLocked();
- }
- }
- }
-
private void setDozeOverrideFromDreamManagerInternal(
int screenState, int screenBrightness) {
synchronized (mLock) {
@@ -3475,8 +3372,6 @@
+ isMaximumScreenOffTimeoutFromDeviceAdminEnforcedLocked() + ")");
pw.println(" mStayOnWhilePluggedInSetting=" + mStayOnWhilePluggedInSetting);
pw.println(" mScreenBrightnessSetting=" + mScreenBrightnessSetting);
- pw.println(" mScreenAutoBrightnessAdjustmentSetting="
- + mScreenAutoBrightnessAdjustmentSetting);
pw.println(" mScreenBrightnessModeSetting=" + mScreenBrightnessModeSetting);
pw.println(" mScreenBrightnessOverrideFromWindowManager="
+ mScreenBrightnessOverrideFromWindowManager);
@@ -3484,10 +3379,6 @@
+ mUserActivityTimeoutOverrideFromWindowManager);
pw.println(" mUserInactiveOverrideFromWindowManager="
+ mUserInactiveOverrideFromWindowManager);
- pw.println(" mTemporaryScreenBrightnessSettingOverride="
- + mTemporaryScreenBrightnessSettingOverride);
- pw.println(" mTemporaryScreenAutoBrightnessAdjustmentSettingOverride="
- + mTemporaryScreenAutoBrightnessAdjustmentSettingOverride);
pw.println(" mDozeScreenStateOverrideFromDreamManager="
+ mDozeScreenStateOverrideFromDreamManager);
pw.println(" mDozeScreenBrightnessOverrideFromDreamManager="
@@ -3495,9 +3386,6 @@
pw.println(" mScreenBrightnessSettingMinimum=" + mScreenBrightnessSettingMinimum);
pw.println(" mScreenBrightnessSettingMaximum=" + mScreenBrightnessSettingMaximum);
pw.println(" mScreenBrightnessSettingDefault=" + mScreenBrightnessSettingDefault);
- pw.println(" mScreenBrightnessForVrSettingDefault="
- + mScreenBrightnessForVrSettingDefault);
- pw.println(" mScreenBrightnessForVrSetting=" + mScreenBrightnessForVrSetting);
pw.println(" mDoubleTapWakeEnabled=" + mDoubleTapWakeEnabled);
pw.println(" mIsVrModeEnabled=" + mIsVrModeEnabled);
pw.println(" mForegroundProfile=" + mForegroundProfile);
@@ -3809,13 +3697,6 @@
proto.end(stayOnWhilePluggedInToken);
proto.write(
- PowerServiceSettingsAndConfigurationDumpProto.SCREEN_BRIGHTNESS_SETTING,
- mScreenBrightnessSetting);
- proto.write(
- PowerServiceSettingsAndConfigurationDumpProto
- .SCREEN_AUTO_BRIGHTNESS_ADJUSTMENT_SETTING,
- mScreenAutoBrightnessAdjustmentSetting);
- proto.write(
PowerServiceSettingsAndConfigurationDumpProto.SCREEN_BRIGHTNESS_MODE_SETTING,
mScreenBrightnessModeSetting);
proto.write(
@@ -3832,14 +3713,6 @@
mUserInactiveOverrideFromWindowManager);
proto.write(
PowerServiceSettingsAndConfigurationDumpProto
- .TEMPORARY_SCREEN_BRIGHTNESS_SETTING_OVERRIDE,
- mTemporaryScreenBrightnessSettingOverride);
- proto.write(
- PowerServiceSettingsAndConfigurationDumpProto
- .TEMPORARY_SCREEN_AUTO_BRIGHTNESS_ADJUSTMENT_SETTING_OVERRIDE,
- mTemporaryScreenAutoBrightnessAdjustmentSettingOverride);
- proto.write(
- PowerServiceSettingsAndConfigurationDumpProto
.DOZE_SCREEN_STATE_OVERRIDE_FROM_DREAM_MANAGER,
mDozeScreenStateOverrideFromDreamManager);
proto.write(
@@ -3863,16 +3736,9 @@
PowerServiceSettingsAndConfigurationDumpProto.ScreenBrightnessSettingLimitsProto
.SETTING_DEFAULT,
mScreenBrightnessSettingDefault);
- proto.write(
- PowerServiceSettingsAndConfigurationDumpProto.ScreenBrightnessSettingLimitsProto
- .SETTING_FOR_VR_DEFAULT,
- mScreenBrightnessForVrSettingDefault);
proto.end(screenBrightnessSettingLimitsToken);
proto.write(
- PowerServiceSettingsAndConfigurationDumpProto.SCREEN_BRIGHTNESS_FOR_VR_SETTING,
- mScreenBrightnessForVrSetting);
- proto.write(
PowerServiceSettingsAndConfigurationDumpProto.IS_DOUBLE_TAP_WAKE_ENABLED,
mDoubleTapWakeEnabled);
proto.write(
@@ -3897,12 +3763,8 @@
proto.write(PowerManagerServiceDumpProto.UidStateProto.UID_STRING, UserHandle.formatUid(uid));
proto.write(PowerManagerServiceDumpProto.UidStateProto.IS_ACTIVE, state.mActive);
proto.write(PowerManagerServiceDumpProto.UidStateProto.NUM_WAKE_LOCKS, state.mNumWakeLocks);
- if (state.mProcState == ActivityManager.PROCESS_STATE_UNKNOWN) {
- proto.write(PowerManagerServiceDumpProto.UidStateProto.IS_PROCESS_STATE_UNKNOWN, true);
- } else {
- proto.write(PowerManagerServiceDumpProto.UidStateProto.PROCESS_STATE,
- ActivityManager.processStateAmToProto(state.mProcState));
- }
+ proto.write(PowerManagerServiceDumpProto.UidStateProto.PROCESS_STATE,
+ ActivityManager.processStateAmToProto(state.mProcState));
proto.end(uIDToken);
}
@@ -4706,56 +4568,6 @@
}
/**
- * Used by the settings application and brightness control widgets to
- * temporarily override the current screen brightness setting so that the
- * user can observe the effect of an intended settings change without applying
- * it immediately.
- *
- * The override will be canceled when the setting value is next updated.
- *
- * @param brightness The overridden brightness.
- *
- * @see android.provider.Settings.System#SCREEN_BRIGHTNESS
- */
- @Override // Binder call
- public void setTemporaryScreenBrightnessSettingOverride(int brightness) {
- mContext.enforceCallingOrSelfPermission(
- android.Manifest.permission.DEVICE_POWER, null);
-
- final long ident = Binder.clearCallingIdentity();
- try {
- setTemporaryScreenBrightnessSettingOverrideInternal(brightness);
- } finally {
- Binder.restoreCallingIdentity(ident);
- }
- }
-
- /**
- * Used by the settings application and brightness control widgets to
- * temporarily override the current screen auto-brightness adjustment setting so that the
- * user can observe the effect of an intended settings change without applying
- * it immediately.
- *
- * The override will be canceled when the setting value is next updated.
- *
- * @param adj The overridden brightness, or Float.NaN to disable the override.
- *
- * @see android.provider.Settings.System#SCREEN_AUTO_BRIGHTNESS_ADJ
- */
- @Override // Binder call
- public void setTemporaryScreenAutoBrightnessAdjustmentSettingOverride(float adj) {
- mContext.enforceCallingOrSelfPermission(
- android.Manifest.permission.DEVICE_POWER, null);
-
- final long ident = Binder.clearCallingIdentity();
- try {
- setTemporaryScreenAutoBrightnessAdjustmentSettingOverrideInternal(adj);
- } finally {
- Binder.restoreCallingIdentity(ident);
- }
- }
-
- /**
* Used by the phone application to make the attention LED flash when ringing.
*/
@Override // Binder call
diff --git a/services/core/java/com/android/server/power/ShutdownThread.java b/services/core/java/com/android/server/power/ShutdownThread.java
index b986e04..eed3102 100644
--- a/services/core/java/com/android/server/power/ShutdownThread.java
+++ b/services/core/java/com/android/server/power/ShutdownThread.java
@@ -21,6 +21,7 @@
import android.app.Dialog;
import android.app.IActivityManager;
import android.app.ProgressDialog;
+import android.app.admin.SecurityLog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
@@ -390,6 +391,10 @@
}
}
+ if (SecurityLog.isLoggingEnabled()) {
+ SecurityLog.writeEvent(SecurityLog.TAG_OS_SHUTDOWN);
+ }
+
// start the thread that initiates shutdown
sInstance.mHandler = new Handler() {
};
diff --git a/services/core/java/com/android/server/power/batterysaver/BatterySaverController.java b/services/core/java/com/android/server/power/batterysaver/BatterySaverController.java
index d4627c2..32f38b7 100644
--- a/services/core/java/com/android/server/power/batterysaver/BatterySaverController.java
+++ b/services/core/java/com/android/server/power/batterysaver/BatterySaverController.java
@@ -28,6 +28,7 @@
import android.content.IntentFilter;
import android.hardware.power.V1_0.PowerHint;
import android.net.Uri;
+import android.os.BatteryManager;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
@@ -50,6 +51,9 @@
import com.android.server.power.BatterySaverPolicy;
import com.android.server.power.BatterySaverPolicy.BatterySaverPolicyListener;
import com.android.server.power.PowerManagerService;
+import com.android.server.power.batterysaver.BatterySavingStats.BatterySaverState;
+import com.android.server.power.batterysaver.BatterySavingStats.DozeState;
+import com.android.server.power.batterysaver.BatterySavingStats.InteractiveState;
import java.util.ArrayList;
@@ -70,6 +74,8 @@
private final BatterySaverPolicy mBatterySaverPolicy;
+ private final BatterySavingStats mBatterySavingStats;
+
private static final String WARNING_LINK_URL = "http://goto.google.com/extreme-battery-saver";
@GuardedBy("mLock")
@@ -78,6 +84,9 @@
@GuardedBy("mLock")
private boolean mEnabled;
+ @GuardedBy("mLock")
+ private boolean mIsPluggedIn;
+
/**
* Previously enabled or not; only for the event logging. Only use it from
* {@link #handleBatterySaverStateChanged}.
@@ -104,15 +113,28 @@
private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
+ if (DEBUG) {
+ Slog.d(TAG, "onReceive: " + intent);
+ }
switch (intent.getAction()) {
case Intent.ACTION_SCREEN_ON:
case Intent.ACTION_SCREEN_OFF:
if (!isEnabled()) {
+ updateBatterySavingStats();
return; // No need to send it if not enabled.
}
// Don't send the broadcast, because we never did so in this case.
mHandler.postStateChanged(/*sendBroadcast=*/ false);
break;
+ case Intent.ACTION_BATTERY_CHANGED:
+ synchronized (mLock) {
+ mIsPluggedIn = (intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0) != 0);
+ }
+ // Fall-through.
+ case PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED:
+ case PowerManager.ACTION_LIGHT_DEVICE_IDLE_MODE_CHANGED:
+ updateBatterySavingStats();
+ break;
}
}
};
@@ -126,6 +148,7 @@
mBatterySaverPolicy = policy;
mBatterySaverPolicy.addListener(this);
mFileUpdater = new FileUpdater(context);
+ mBatterySavingStats = BatterySavingStats.getInstance();
// Initialize plugins.
final ArrayList<Plugin> plugins = new ArrayList<>();
@@ -149,6 +172,9 @@
public void systemReady() {
final IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON);
filter.addAction(Intent.ACTION_SCREEN_OFF);
+ filter.addAction(Intent.ACTION_BATTERY_CHANGED);
+ filter.addAction(PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED);
+ filter.addAction(PowerManager.ACTION_LIGHT_DEVICE_IDLE_MODE_CHANGED);
mContext.registerReceiver(mReceiver, filter);
mFileUpdater.systemReady(LocalServices.getService(ActivityManagerInternal.class)
@@ -280,7 +306,6 @@
enabled = mEnabled;
mIsInteractive = isInteractive;
-
if (enabled) {
fileValues = mBatterySaverPolicy.getFileValues(isInteractive);
} else {
@@ -293,6 +318,8 @@
pmi.powerHint(PowerHint.LOW_POWER, enabled ? 1 : 0);
}
+ updateBatterySavingStats();
+
if (ArrayUtils.isEmpty(fileValues)) {
mFileUpdater.restoreDefault();
} else {
@@ -332,7 +359,6 @@
mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
Manifest.permission.DEVICE_POWER);
-
for (LowPowerModeListener listener : listeners) {
final PowerSaveState result =
mBatterySaverPolicy.getBatterySaverPolicy(
@@ -388,4 +414,28 @@
foregroundUser);
}
}
+
+ private void updateBatterySavingStats() {
+ final PowerManager pm = getPowerManager();
+ if (pm == null) {
+ Slog.wtf(TAG, "PowerManager not initialized");
+ return;
+ }
+ final boolean isInteractive = pm.isInteractive();
+ final int dozeMode =
+ pm.isDeviceIdleMode() ? DozeState.DEEP
+ : pm.isLightDeviceIdleMode() ? DozeState.LIGHT
+ : DozeState.NOT_DOZING;
+
+ synchronized (mLock) {
+ if (mIsPluggedIn) {
+ mBatterySavingStats.startCharging();
+ return;
+ }
+ mBatterySavingStats.transitionState(
+ mEnabled ? BatterySaverState.ON : BatterySaverState.OFF,
+ isInteractive ? InteractiveState.INTERACTIVE : InteractiveState.NON_INTERACTIVE,
+ dozeMode);
+ }
+ }
}
diff --git a/services/core/java/com/android/server/power/batterysaver/BatterySavingStats.java b/services/core/java/com/android/server/power/batterysaver/BatterySavingStats.java
new file mode 100644
index 0000000..df4f8ec
--- /dev/null
+++ b/services/core/java/com/android/server/power/batterysaver/BatterySavingStats.java
@@ -0,0 +1,353 @@
+/*
+ * 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.power.batterysaver;
+
+import android.os.BatteryManagerInternal;
+import android.os.SystemClock;
+import android.util.ArrayMap;
+import android.util.Slog;
+
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.EventLogTags;
+import com.android.server.LocalServices;
+import com.android.server.power.BatterySaverPolicy;
+
+import java.io.PrintWriter;
+
+/**
+ * This class keeps track of battery drain rate.
+ *
+ * Test:
+ atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySavingStatsTest.java
+ */
+public class BatterySavingStats {
+
+ private static final String TAG = "BatterySavingStats";
+
+ private static final boolean DEBUG = BatterySaverPolicy.DEBUG;
+
+ private final Object mLock = new Object();
+
+ /** Whether battery saver is on or off. */
+ interface BatterySaverState {
+ int OFF = 0;
+ int ON = 1;
+
+ int SHIFT = 0;
+ int BITS = 1;
+ int MASK = (1 << BITS) - 1;
+
+ static int fromIndex(int index) {
+ return (index >> SHIFT) & MASK;
+ }
+ }
+
+ /** Whether the device is interactive (i.e. screen on) or not. */
+ interface InteractiveState {
+ int NON_INTERACTIVE = 0;
+ int INTERACTIVE = 1;
+
+ int SHIFT = BatterySaverState.SHIFT + BatterySaverState.BITS;
+ int BITS = 1;
+ int MASK = (1 << BITS) - 1;
+
+ static int fromIndex(int index) {
+ return (index >> SHIFT) & MASK;
+ }
+ }
+
+ /** Doze mode. */
+ interface DozeState {
+ int NOT_DOZING = 0;
+ int LIGHT = 1;
+ int DEEP = 2;
+
+ int SHIFT = InteractiveState.SHIFT + InteractiveState.BITS;
+ int BITS = 2;
+ int MASK = (1 << BITS) - 1;
+
+ static int fromIndex(int index) {
+ return (index >> SHIFT) & MASK;
+ }
+ }
+
+ /**
+ * Various stats in each state.
+ */
+ static class Stat {
+ public long startTime;
+ public long endTime;
+
+ public int startBatteryLevel;
+ public int endBatteryLevel;
+
+ public long totalTimeMillis;
+ public int totalBatteryDrain;
+
+ public long totalMinutes() {
+ return totalTimeMillis / 60_000;
+ }
+
+ public double drainPerHour() {
+ if (totalTimeMillis == 0) {
+ return 0;
+ }
+ return (double) totalBatteryDrain / (totalTimeMillis / (60.0 * 60 * 1000));
+ }
+
+ @VisibleForTesting
+ String toStringForTest() {
+ return "{" + totalMinutes() + "m," + totalBatteryDrain + ","
+ + String.format("%.2f", drainPerHour()) + "}";
+ }
+ }
+
+ private static BatterySavingStats sInstance;
+
+ private BatteryManagerInternal mBatteryManagerInternal;
+
+ private static final int STATE_NOT_INITIALIZED = -1;
+ private static final int STATE_CHARGING = -2;
+
+ /**
+ * Current state, one of STATE_* or values returned by {@link #statesToIndex}.
+ */
+ @GuardedBy("mLock")
+ private int mCurrentState = STATE_NOT_INITIALIZED;
+
+ /**
+ * Stats in each state.
+ */
+ @VisibleForTesting
+ @GuardedBy("mLock")
+ final ArrayMap<Integer, Stat> mStats = new ArrayMap<>();
+
+ /**
+ * Don't call it directly -- use {@link #getInstance()}. Not private for testing.
+ */
+ @VisibleForTesting
+ BatterySavingStats() {
+ mBatteryManagerInternal = LocalServices.getService(BatteryManagerInternal.class);
+ }
+
+ public static synchronized BatterySavingStats getInstance() {
+ if (sInstance == null) {
+ sInstance = new BatterySavingStats();
+ }
+ return sInstance;
+ }
+
+ private BatteryManagerInternal getBatteryManagerInternal() {
+ if (mBatteryManagerInternal == null) {
+ mBatteryManagerInternal = LocalServices.getService(BatteryManagerInternal.class);
+ }
+ return mBatteryManagerInternal;
+ }
+
+ /**
+ * Takes a state triplet and generates a state index.
+ */
+ @VisibleForTesting
+ static int statesToIndex(
+ int batterySaverState, int interactiveState, int dozeState) {
+ int ret = batterySaverState & BatterySaverState.MASK;
+ ret |= (interactiveState & InteractiveState.MASK) << InteractiveState.SHIFT;
+ ret |= (dozeState & DozeState.MASK) << DozeState.SHIFT;
+ return ret;
+ }
+
+ /**
+ * Takes a state index and returns a string for logging.
+ */
+ @VisibleForTesting
+ static String stateToString(int state) {
+ switch (state) {
+ case STATE_NOT_INITIALIZED:
+ return "NotInitialized";
+ case STATE_CHARGING:
+ return "Charging";
+ }
+ return "BS=" + BatterySaverState.fromIndex(state)
+ + ",I=" + InteractiveState.fromIndex(state)
+ + ",D=" + DozeState.fromIndex(state);
+ }
+
+ /**
+ * @return {@link Stat} fo a given state.
+ */
+ @VisibleForTesting
+ Stat getStat(int stateIndex) {
+ synchronized (mLock) {
+ Stat stat = mStats.get(stateIndex);
+ if (stat == null) {
+ stat = new Stat();
+ mStats.put(stateIndex, stat);
+ }
+ return stat;
+ }
+ }
+
+ /**
+ * @return {@link Stat} fo a given state triplet.
+ */
+ private Stat getStat(int batterySaverState, int interactiveState, int dozeState) {
+ return getStat(statesToIndex(batterySaverState, interactiveState, dozeState));
+ }
+
+ long injectCurrentTime() {
+ return SystemClock.elapsedRealtime();
+ }
+
+ int injectBatteryLevel() {
+ final BatteryManagerInternal bmi = getBatteryManagerInternal();
+ if (bmi == null) {
+ Slog.wtf(TAG, "BatteryManagerInternal not initialized");
+ return 0;
+ }
+ return bmi.getBatteryChargeCounter();
+ }
+
+ /**
+ * Called from the outside whenever any of the states changes, when the device is not plugged
+ * in.
+ */
+ public void transitionState(int batterySaverState, int interactiveState, int dozeState) {
+ synchronized (mLock) {
+
+ final int newState = statesToIndex(
+ batterySaverState, interactiveState, dozeState);
+ if (mCurrentState == newState) {
+ return;
+ }
+
+ endLastStateLocked();
+ startNewStateLocked(newState);
+ }
+ }
+
+ /**
+ * Called from the outside when the device is plugged in.
+ */
+ public void startCharging() {
+ synchronized (mLock) {
+ if (mCurrentState < 0) {
+ return;
+ }
+
+ endLastStateLocked();
+ startNewStateLocked(STATE_CHARGING);
+ }
+ }
+
+ private void endLastStateLocked() {
+ if (mCurrentState < 0) {
+ return;
+ }
+ final Stat stat = getStat(mCurrentState);
+
+ stat.endBatteryLevel = injectBatteryLevel();
+ stat.endTime = injectCurrentTime();
+
+ final long deltaTime = stat.endTime - stat.startTime;
+ final int deltaDrain = stat.startBatteryLevel - stat.endBatteryLevel;
+
+ stat.totalTimeMillis += deltaTime;
+ stat.totalBatteryDrain += deltaDrain;
+
+ if (DEBUG) {
+ Slog.d(TAG, "State summary: " + stateToString(mCurrentState)
+ + ": " + (deltaTime / 1_000) + "s "
+ + "Start level: " + stat.startBatteryLevel + "uA "
+ + "End level: " + stat.endBatteryLevel + "uA "
+ + deltaDrain + "uA");
+ }
+ EventLogTags.writeBatterySavingStats(
+ BatterySaverState.fromIndex(mCurrentState),
+ InteractiveState.fromIndex(mCurrentState),
+ DozeState.fromIndex(mCurrentState),
+ deltaTime,
+ deltaDrain,
+ stat.totalTimeMillis,
+ stat.totalBatteryDrain);
+ }
+
+ private void startNewStateLocked(int newState) {
+ if (DEBUG) {
+ Slog.d(TAG, "New state: " + stateToString(newState));
+ }
+ mCurrentState = newState;
+
+ if (mCurrentState < 0) {
+ return;
+ }
+
+ final Stat stat = getStat(mCurrentState);
+ stat.startBatteryLevel = injectBatteryLevel();
+ stat.startTime = injectCurrentTime();
+ stat.endTime = 0;
+ }
+
+ public void dump(PrintWriter pw, String indent) {
+ synchronized (mLock) {
+ pw.print(indent);
+ pw.println("Battery Saving Stats:");
+
+ indent = indent + " ";
+
+ pw.print(indent);
+ pw.println("Battery Saver: Off On");
+ dumpLineLocked(pw, indent, InteractiveState.NON_INTERACTIVE, "NonIntr",
+ DozeState.NOT_DOZING, "NonDoze");
+ dumpLineLocked(pw, indent, InteractiveState.INTERACTIVE, " Intr",
+ DozeState.NOT_DOZING, " ");
+
+ dumpLineLocked(pw, indent, InteractiveState.NON_INTERACTIVE, "NonIntr",
+ DozeState.DEEP, "Deep ");
+ dumpLineLocked(pw, indent, InteractiveState.INTERACTIVE, " Intr",
+ DozeState.DEEP, " ");
+
+ dumpLineLocked(pw, indent, InteractiveState.NON_INTERACTIVE, "NonIntr",
+ DozeState.LIGHT, "Light ");
+ dumpLineLocked(pw, indent, InteractiveState.INTERACTIVE, " Intr",
+ DozeState.LIGHT, " ");
+
+ pw.println();
+ }
+ }
+
+ private void dumpLineLocked(PrintWriter pw, String indent,
+ int interactiveState, String interactiveLabel,
+ int dozeState, String dozeLabel) {
+ pw.print(indent);
+ pw.print(dozeLabel);
+ pw.print(" ");
+ pw.print(interactiveLabel);
+ pw.print(": ");
+
+ final Stat offStat = getStat(BatterySaverState.OFF, interactiveState, dozeState);
+ final Stat onStat = getStat(BatterySaverState.ON, interactiveState, dozeState);
+
+ pw.println(String.format("%6dm %6dmA %8.1fmA/h %6dm %6dmA %8.1fmA/h",
+ offStat.totalMinutes(),
+ offStat.totalBatteryDrain / 1000,
+ offStat.drainPerHour() / 1000.0,
+ onStat.totalMinutes(),
+ onStat.totalBatteryDrain / 1000,
+ onStat.drainPerHour() / 1000.0));
+ }
+}
+
diff --git a/services/core/java/com/android/server/security/VerityUtils.java b/services/core/java/com/android/server/security/VerityUtils.java
new file mode 100644
index 0000000..d2d0e60
--- /dev/null
+++ b/services/core/java/com/android/server/security/VerityUtils.java
@@ -0,0 +1,192 @@
+/*
+ * 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.security;
+
+import static android.system.OsConstants.PROT_READ;
+import static android.system.OsConstants.PROT_WRITE;
+
+import android.annotation.NonNull;
+import android.os.SharedMemory;
+import android.system.ErrnoException;
+import android.system.Os;
+import android.util.apk.ApkSignatureVerifier;
+import android.util.apk.ByteBufferFactory;
+import android.util.apk.SignatureNotFoundException;
+import android.util.Slog;
+
+import java.io.FileDescriptor;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.security.DigestException;
+import java.security.NoSuchAlgorithmException;
+import java.util.Arrays;
+
+/** Provides fsverity related operations. */
+abstract public class VerityUtils {
+ private static final String TAG = "VerityUtils";
+
+ private static final boolean DEBUG = false;
+
+ /**
+ * Generates Merkle tree and fsverity metadata.
+ *
+ * @return {@code SetupResult} that contains the {@code EsetupResultCode}, and when success, the
+ * {@code FileDescriptor} to read all the data from.
+ */
+ public static SetupResult generateApkVeritySetupData(@NonNull String apkPath) {
+ if (DEBUG) Slog.d(TAG, "Trying to install apk verity to " + apkPath);
+ SharedMemory shm = null;
+ try {
+ byte[] signedRootHash = ApkSignatureVerifier.getVerityRootHash(apkPath);
+ if (signedRootHash == null) {
+ if (DEBUG) {
+ Slog.d(TAG, "Skip verity tree generation since there is no root hash");
+ }
+ return SetupResult.skipped();
+ }
+
+ shm = generateApkVerityIntoSharedMemory(apkPath, signedRootHash);
+ FileDescriptor rfd = shm.getFileDescriptor();
+ if (rfd == null || !rfd.valid()) {
+ return SetupResult.failed();
+ }
+ return SetupResult.ok(Os.dup(rfd));
+ } catch (IOException | SecurityException | DigestException | NoSuchAlgorithmException |
+ SignatureNotFoundException | ErrnoException e) {
+ Slog.e(TAG, "Failed to set up apk verity: ", e);
+ return SetupResult.failed();
+ } finally {
+ if (shm != null) {
+ shm.close();
+ }
+ }
+ }
+
+ /**
+ * {@see ApkSignatureVerifier#generateFsverityRootHash(String)}.
+ */
+ public static byte[] generateFsverityRootHash(@NonNull String apkPath)
+ throws NoSuchAlgorithmException, DigestException, IOException {
+ return ApkSignatureVerifier.generateFsverityRootHash(apkPath);
+ }
+
+ /**
+ * Returns a {@code SharedMemory} that contains Merkle tree and fsverity headers for the given
+ * apk, in the form that can immediately be used for fsverity setup.
+ */
+ private static SharedMemory generateApkVerityIntoSharedMemory(
+ String apkPath, byte[] expectedRootHash)
+ throws IOException, SecurityException, DigestException, NoSuchAlgorithmException,
+ SignatureNotFoundException {
+ TrackedShmBufferFactory shmBufferFactory = new TrackedShmBufferFactory();
+ byte[] generatedRootHash = ApkSignatureVerifier.generateApkVerity(apkPath,
+ shmBufferFactory);
+ // We only generate Merkle tree once here, so it's important to make sure the root hash
+ // matches the signed one in the apk.
+ if (!Arrays.equals(expectedRootHash, generatedRootHash)) {
+ throw new SecurityException("Locally generated verity root hash does not match");
+ }
+
+ SharedMemory shm = shmBufferFactory.releaseSharedMemory();
+ if (shm == null) {
+ throw new IllegalStateException("Failed to generate verity tree into shared memory");
+ }
+ if (!shm.setProtect(PROT_READ)) {
+ throw new SecurityException("Failed to set up shared memory correctly");
+ }
+ return shm;
+ }
+
+ public static class SetupResult {
+ /** Result code if verity is set up correctly. */
+ private static final int RESULT_OK = 1;
+
+ /** Result code if the apk does not contain a verity root hash. */
+ private static final int RESULT_SKIPPED = 2;
+
+ /** Result code if the setup failed. */
+ private static final int RESULT_FAILED = 3;
+
+ private final int mCode;
+ private final FileDescriptor mFileDescriptor;
+
+ public static SetupResult ok(@NonNull FileDescriptor fileDescriptor) {
+ return new SetupResult(RESULT_OK, fileDescriptor);
+ }
+
+ public static SetupResult skipped() {
+ return new SetupResult(RESULT_SKIPPED, null);
+ }
+
+ public static SetupResult failed() {
+ return new SetupResult(RESULT_FAILED, null);
+ }
+
+ private SetupResult(int code, FileDescriptor fileDescriptor) {
+ this.mCode = code;
+ this.mFileDescriptor = fileDescriptor;
+ }
+
+ public boolean isFailed() {
+ return mCode == RESULT_FAILED;
+ }
+
+ public boolean isOk() {
+ return mCode == RESULT_OK;
+ }
+
+ public @NonNull FileDescriptor getUnownedFileDescriptor() {
+ return mFileDescriptor;
+ }
+ }
+
+ /** A {@code ByteBufferFactory} that creates a shared memory backed {@code ByteBuffer}. */
+ private static class TrackedShmBufferFactory implements ByteBufferFactory {
+ private SharedMemory mShm;
+ private ByteBuffer mBuffer;
+
+ @Override
+ public ByteBuffer create(int capacity) throws SecurityException {
+ try {
+ if (DEBUG) Slog.d(TAG, "Creating shared memory for apk verity");
+ // NB: This method is supposed to be called once according to the contract with
+ // ApkSignatureSchemeV2Verifier.
+ if (mBuffer != null) {
+ throw new IllegalStateException("Multiple instantiation from this factory");
+ }
+ mShm = SharedMemory.create("apkverity", capacity);
+ if (!mShm.setProtect(PROT_READ | PROT_WRITE)) {
+ throw new SecurityException("Failed to set protection");
+ }
+ mBuffer = mShm.mapReadWrite();
+ return mBuffer;
+ } catch (ErrnoException e) {
+ throw new SecurityException("Failed to set protection", e);
+ }
+ }
+
+ public SharedMemory releaseSharedMemory() {
+ if (mBuffer != null) {
+ SharedMemory.unmap(mBuffer);
+ mBuffer = null;
+ }
+ SharedMemory tmp = mShm;
+ mShm = null;
+ return tmp;
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/slice/PinnedSliceState.java b/services/core/java/com/android/server/slice/PinnedSliceState.java
index 5811714..192fd63 100644
--- a/services/core/java/com/android/server/slice/PinnedSliceState.java
+++ b/services/core/java/com/android/server/slice/PinnedSliceState.java
@@ -166,6 +166,7 @@
ContentProviderClient getClient() {
ContentProviderClient client =
mService.getContext().getContentResolver().acquireContentProviderClient(mUri);
+ if (client == null) return null;
client.setDetectNotResponding(SLICE_TIMEOUT);
return client;
}
@@ -181,6 +182,7 @@
}
if (!isPinned()) {
// All the listeners died, remove from pinned state.
+ mService.unlisten(mUri);
mService.removePinnedSlice(mUri);
}
}
@@ -210,6 +212,7 @@
}
if (!isPinned()) {
// All the listeners died, remove from pinned state.
+ mService.unlisten(mUri);
mService.removePinnedSlice(mUri);
}
}
@@ -217,6 +220,7 @@
private Slice doBind(String overridePkg) {
try (ContentProviderClient client = getClient()) {
+ if (client == null) return null;
Bundle extras = new Bundle();
extras.putParcelable(SliceProvider.EXTRA_BIND_URI, mUri);
extras.putParcelableArrayList(SliceProvider.EXTRA_SUPPORTED_SPECS,
@@ -237,6 +241,7 @@
private void handleSendPinned() {
try (ContentProviderClient client = getClient()) {
+ if (client == null) return;
Bundle b = new Bundle();
b.putParcelable(SliceProvider.EXTRA_BIND_URI, mUri);
try {
@@ -249,6 +254,7 @@
private void handleSendUnpinned() {
try (ContentProviderClient client = getClient()) {
+ if (client == null) return;
Bundle b = new Bundle();
b.putParcelable(SliceProvider.EXTRA_BIND_URI, mUri);
try {
diff --git a/services/core/java/com/android/server/stats/StatsCompanionService.java b/services/core/java/com/android/server/stats/StatsCompanionService.java
index f82dc24..648fa6a 100644
--- a/services/core/java/com/android/server/stats/StatsCompanionService.java
+++ b/services/core/java/com/android/server/stats/StatsCompanionService.java
@@ -18,10 +18,15 @@
import android.annotation.Nullable;
import android.app.AlarmManager;
import android.app.PendingIntent;
+import android.app.StatsManager;
+import android.bluetooth.BluetoothActivityEnergyInfo;
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.UidTraffic;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.IntentSender;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.UserInfo;
@@ -40,6 +45,7 @@
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.StatFs;
+import android.os.StatsDimensionsValue;
import android.os.StatsLogEventWrapper;
import android.os.SynchronousResultReceiver;
import android.os.SystemClock;
@@ -80,9 +86,12 @@
static final String TAG = "StatsCompanionService";
static final boolean DEBUG = true;
+
public static final String ACTION_TRIGGER_COLLECTION =
"com.android.server.stats.action.TRIGGER_COLLECTION";
+ public static final int CODE_SUBSCRIBER_BROADCAST = 1;
+
private final Context mContext;
private final AlarmManager mAlarmManager;
@GuardedBy("sStatsdLock")
@@ -104,6 +113,7 @@
new StatFs(Environment.getRootDirectory().getAbsolutePath());
private final StatFs mStatFsTemp =
new StatFs(Environment.getDownloadCacheDirectory().getAbsolutePath());
+ private final BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
public StatsCompanionService(Context context) {
super();
@@ -151,10 +161,37 @@
@Override
public void sendBroadcast(String pkg, String cls) {
+ // TODO: Use a pending intent, and enfoceCallingPermission.
mContext.sendBroadcastAsUser(new Intent(ACTION_TRIGGER_COLLECTION).setClassName(pkg, cls),
UserHandle.SYSTEM);
}
+ @Override
+ public void sendSubscriberBroadcast(IBinder intentSenderBinder, long configUid, long configKey,
+ long subscriptionId, long subscriptionRuleId,
+ StatsDimensionsValue dimensionsValue) {
+ if (DEBUG) Slog.d(TAG, "Statsd requested to sendSubscriberBroadcast.");
+ enforceCallingPermission();
+ IntentSender intentSender = new IntentSender(intentSenderBinder);
+ Intent intent = new Intent()
+ .putExtra(StatsManager.EXTRA_STATS_CONFIG_UID, configUid)
+ .putExtra(StatsManager.EXTRA_STATS_CONFIG_KEY, configKey)
+ .putExtra(StatsManager.EXTRA_STATS_SUBSCRIPTION_ID, subscriptionId)
+ .putExtra(StatsManager.EXTRA_STATS_SUBSCRIPTION_RULE_ID, subscriptionRuleId)
+ .putExtra(StatsManager.EXTRA_STATS_DIMENSIONS_VALUE, dimensionsValue);
+ try {
+ intentSender.sendIntent(mContext, CODE_SUBSCRIBER_BROADCAST, intent, null, null);
+ } catch (IntentSender.SendIntentException e) {
+ Slog.w(TAG, "Unable to send using IntentSender from uid " + configUid
+ + "; presumably it had been cancelled.");
+ if (DEBUG) {
+ Slog.d(TAG, String.format("SubscriberBroadcast params {%d %d %d %d %s}",
+ configUid, configKey, subscriptionId,
+ subscriptionRuleId, dimensionsValue));
+ }
+ }
+ }
+
private final static int[] toIntArray(List<Integer> list) {
int[] ret = new int[list.size()];
for (int i = 0; i < ret.length; i++) {
@@ -295,9 +332,11 @@
* Skip immediately if intent is not relevant to device shutdown.
*/
if (!intent.getAction().equals(Intent.ACTION_REBOOT)
- && !intent.getAction().equals(Intent.ACTION_SHUTDOWN)) {
- return;
+ && !(intent.getAction().equals(Intent.ACTION_SHUTDOWN)
+ && (intent.getFlags() & Intent.FLAG_RECEIVER_FOREGROUND) != 0)) {
+ return;
}
+
Slog.i(TAG, "StatsCompanionService noticed a shutdown.");
synchronized (sStatsdLock) {
if (sStatsd == null) {
@@ -369,24 +408,23 @@
}
}
- private StatsLogEventWrapper[] addNetworkStats(int tag, NetworkStats stats, boolean withFGBG) {
- List<StatsLogEventWrapper> ret = new ArrayList<>();
- int size = stats.size();
- NetworkStats.Entry entry = new NetworkStats.Entry(); // For recycling
- for (int j = 0; j < size; j++) {
- stats.getValues(j, entry);
- StatsLogEventWrapper e = new StatsLogEventWrapper(tag, withFGBG ? 6 : 5);
- e.writeInt(entry.uid);
- if (withFGBG) {
- e.writeInt(entry.set);
- }
- e.writeLong(entry.rxBytes);
- e.writeLong(entry.rxPackets);
- e.writeLong(entry.txBytes);
- e.writeLong(entry.txPackets);
- ret.add(e);
+ private void addNetworkStats(
+ int tag, List<StatsLogEventWrapper> ret, NetworkStats stats, boolean withFGBG) {
+ int size = stats.size();
+ NetworkStats.Entry entry = new NetworkStats.Entry(); // For recycling
+ for (int j = 0; j < size; j++) {
+ stats.getValues(j, entry);
+ StatsLogEventWrapper e = new StatsLogEventWrapper(tag, withFGBG ? 6 : 5);
+ e.writeInt(entry.uid);
+ if (withFGBG) {
+ e.writeInt(entry.set);
}
- return ret.toArray(new StatsLogEventWrapper[ret.size()]);
+ e.writeLong(entry.rxBytes);
+ e.writeLong(entry.rxPackets);
+ e.writeLong(entry.txBytes);
+ e.writeLong(entry.txPackets);
+ ret.add(e);
+ }
}
/**
@@ -452,220 +490,289 @@
return null;
}
+ private void pullKernelWakelock(int tagId, List<StatsLogEventWrapper> pulledData) {
+ final KernelWakelockStats wakelockStats =
+ mKernelWakelockReader.readKernelWakelockStats(mTmpWakelockStats);
+ for (Map.Entry<String, KernelWakelockStats.Entry> ent : wakelockStats.entrySet()) {
+ String name = ent.getKey();
+ KernelWakelockStats.Entry kws = ent.getValue();
+ StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 4);
+ e.writeString(name);
+ e.writeInt(kws.mCount);
+ e.writeInt(kws.mVersion);
+ e.writeLong(kws.mTotalTime);
+ pulledData.add(e);
+ }
+ }
+
+ private void pullWifiBytesTransfer(int tagId, List<StatsLogEventWrapper> pulledData) {
+ long token = Binder.clearCallingIdentity();
+ try {
+ // TODO: Consider caching the following call to get BatteryStatsInternal.
+ BatteryStatsInternal bs = LocalServices.getService(BatteryStatsInternal.class);
+ String[] ifaces = bs.getWifiIfaces();
+ if (ifaces.length == 0) {
+ return;
+ }
+ NetworkStatsFactory nsf = new NetworkStatsFactory();
+ // Combine all the metrics per Uid into one record.
+ NetworkStats stats =
+ nsf.readNetworkStatsDetail(NetworkStats.UID_ALL, ifaces, NetworkStats.TAG_NONE, null)
+ .groupedByUid();
+ addNetworkStats(tagId, pulledData, stats, false);
+ } catch (java.io.IOException e) {
+ Slog.e(TAG, "Pulling netstats for wifi bytes has error", e);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+
+ private void pullWifiBytesTransferByFgBg(int tagId, List<StatsLogEventWrapper> pulledData) {
+ long token = Binder.clearCallingIdentity();
+ try {
+ BatteryStatsInternal bs = LocalServices.getService(BatteryStatsInternal.class);
+ String[] ifaces = bs.getWifiIfaces();
+ if (ifaces.length == 0) {
+ return;
+ }
+ NetworkStatsFactory nsf = new NetworkStatsFactory();
+ NetworkStats stats = rollupNetworkStatsByFGBG(
+ nsf.readNetworkStatsDetail(NetworkStats.UID_ALL, ifaces, NetworkStats.TAG_NONE, null));
+ addNetworkStats(tagId, pulledData, stats, true);
+ } catch (java.io.IOException e) {
+ Slog.e(TAG, "Pulling netstats for wifi bytes w/ fg/bg has error", e);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+
+ private void pullMobileBytesTransfer(int tagId, List<StatsLogEventWrapper> pulledData) {
+ long token = Binder.clearCallingIdentity();
+ try {
+ BatteryStatsInternal bs = LocalServices.getService(BatteryStatsInternal.class);
+ String[] ifaces = bs.getMobileIfaces();
+ if (ifaces.length == 0) {
+ return;
+ }
+ NetworkStatsFactory nsf = new NetworkStatsFactory();
+ // Combine all the metrics per Uid into one record.
+ NetworkStats stats =
+ nsf.readNetworkStatsDetail(NetworkStats.UID_ALL, ifaces, NetworkStats.TAG_NONE, null)
+ .groupedByUid();
+ addNetworkStats(tagId, pulledData, stats, false);
+ } catch (java.io.IOException e) {
+ Slog.e(TAG, "Pulling netstats for mobile bytes has error", e);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+
+ private void pullBluetoothBytesTransfer(int tagId, List<StatsLogEventWrapper> pulledData) {
+ BluetoothActivityEnergyInfo info = pullBluetoothData();
+ for (UidTraffic traffic : info.getUidTraffic()) {
+ StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 3);
+ e.writeInt(traffic.getUid());
+ e.writeLong(traffic.getRxBytes());
+ e.writeLong(traffic.getTxBytes());
+ pulledData.add(e);
+ }
+ }
+
+ private void pullMobileBytesTransferByFgBg(int tagId, List<StatsLogEventWrapper> pulledData) {
+ long token = Binder.clearCallingIdentity();
+ try {
+ BatteryStatsInternal bs = LocalServices.getService(BatteryStatsInternal.class);
+ String[] ifaces = bs.getMobileIfaces();
+ if (ifaces.length == 0) {
+ return;
+ }
+ NetworkStatsFactory nsf = new NetworkStatsFactory();
+ NetworkStats stats = rollupNetworkStatsByFGBG(
+ nsf.readNetworkStatsDetail(NetworkStats.UID_ALL, ifaces, NetworkStats.TAG_NONE, null));
+ addNetworkStats(tagId, pulledData, stats, true);
+ } catch (java.io.IOException e) {
+ Slog.e(TAG, "Pulling netstats for mobile bytes w/ fg/bg has error", e);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+
+ private void pullCpuTimePerFreq(int tagId, List<StatsLogEventWrapper> pulledData) {
+ for (int cluster = 0; cluster < mKernelCpuSpeedReaders.length; cluster++) {
+ long[] clusterTimeMs = mKernelCpuSpeedReaders[cluster].readAbsolute();
+ if (clusterTimeMs != null) {
+ for (int speed = clusterTimeMs.length - 1; speed >= 0; --speed) {
+ StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 3);
+ e.writeInt(cluster);
+ e.writeInt(speed);
+ e.writeLong(clusterTimeMs[speed]);
+ pulledData.add(e);
+ }
+ }
+ }
+ }
+
+ private void pullWifiActivityEnergyInfo(int tagId, List<StatsLogEventWrapper> pulledData) {
+ long token = Binder.clearCallingIdentity();
+ if (mWifiManager == null) {
+ mWifiManager =
+ IWifiManager.Stub.asInterface(ServiceManager.getService(Context.WIFI_SERVICE));
+ }
+ if (mWifiManager != null) {
+ try {
+ SynchronousResultReceiver wifiReceiver = new SynchronousResultReceiver("wifi");
+ mWifiManager.requestActivityInfo(wifiReceiver);
+ final WifiActivityEnergyInfo wifiInfo = awaitControllerInfo(wifiReceiver);
+ StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 6);
+ e.writeLong(wifiInfo.getTimeStamp());
+ e.writeInt(wifiInfo.getStackState());
+ e.writeLong(wifiInfo.getControllerTxTimeMillis());
+ e.writeLong(wifiInfo.getControllerRxTimeMillis());
+ e.writeLong(wifiInfo.getControllerIdleTimeMillis());
+ e.writeLong(wifiInfo.getControllerEnergyUsed());
+ pulledData.add(e);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Pulling wifiManager for wifi controller activity energy info has error", e);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+ }
+
+ private void pullModemActivityInfo(int tagId, List<StatsLogEventWrapper> pulledData) {
+ long token = Binder.clearCallingIdentity();
+ if (mTelephony == null) {
+ mTelephony = TelephonyManager.from(mContext);
+ }
+ if (mTelephony != null) {
+ SynchronousResultReceiver modemReceiver = new SynchronousResultReceiver("telephony");
+ mTelephony.requestModemActivityInfo(modemReceiver);
+ final ModemActivityInfo modemInfo = awaitControllerInfo(modemReceiver);
+ StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 6);
+ e.writeLong(modemInfo.getTimestamp());
+ e.writeLong(modemInfo.getSleepTimeMillis());
+ e.writeLong(modemInfo.getIdleTimeMillis());
+ e.writeLong(modemInfo.getTxTimeMillis()[0]);
+ e.writeLong(modemInfo.getTxTimeMillis()[1]);
+ e.writeLong(modemInfo.getTxTimeMillis()[2]);
+ e.writeLong(modemInfo.getTxTimeMillis()[3]);
+ e.writeLong(modemInfo.getTxTimeMillis()[4]);
+ e.writeLong(modemInfo.getRxTimeMillis());
+ e.writeLong(modemInfo.getEnergyUsed());
+ pulledData.add(e);
+ }
+ }
+
+ private void pullBluetoothActivityInfo(int tagId, List<StatsLogEventWrapper> pulledData) {
+ BluetoothActivityEnergyInfo info = pullBluetoothData();
+ StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 6);
+ e.writeLong(info.getTimeStamp());
+ e.writeInt(info.getBluetoothStackState());
+ e.writeLong(info.getControllerTxTimeMillis());
+ e.writeLong(info.getControllerRxTimeMillis());
+ e.writeLong(info.getControllerIdleTimeMillis());
+ e.writeLong(info.getControllerEnergyUsed());
+ pulledData.add(e);
+ }
+
+ private synchronized BluetoothActivityEnergyInfo pullBluetoothData() {
+ if (adapter != null) {
+ SynchronousResultReceiver bluetoothReceiver = null;
+ bluetoothReceiver = new SynchronousResultReceiver("bluetooth");
+ adapter.requestControllerActivityEnergyInfo(bluetoothReceiver);
+ return awaitControllerInfo(bluetoothReceiver);
+ } else {
+ return null;
+ }
+ }
+
+ private void pullSystemElapsedRealtime(int tagId, List<StatsLogEventWrapper> pulledData) {
+ StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 1);
+ e.writeLong(SystemClock.elapsedRealtime());
+ pulledData.add(e);
+ }
+
+ private void pullDiskSpace(int tagId, List<StatsLogEventWrapper> pulledData) {
+ StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 3);
+ e.writeLong(mStatFsData.getAvailableBytes());
+ e.writeLong(mStatFsSystem.getAvailableBytes());
+ e.writeLong(mStatFsTemp.getAvailableBytes());
+ pulledData.add(e);
+ }
+
+ private void pullSystemUpTime(int tagId, List<StatsLogEventWrapper> pulledData) {
+ StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 1);
+ e.writeLong(SystemClock.uptimeMillis());
+ pulledData.add(e);
+ }
+
/**
- *
- * Pulls wifi controller activity energy info from WiFiManager
+ * Pulls various data.
*/
@Override // Binder call
public StatsLogEventWrapper[] pullData(int tagId) {
enforceCallingPermission();
if (DEBUG)
Slog.d(TAG, "Pulling " + tagId);
-
+ List<StatsLogEventWrapper> ret = new ArrayList();
switch (tagId) {
case StatsLog.WIFI_BYTES_TRANSFER: {
- long token = Binder.clearCallingIdentity();
- try {
- // TODO: Consider caching the following call to get BatteryStatsInternal.
- BatteryStatsInternal bs = LocalServices.getService(BatteryStatsInternal.class);
- String[] ifaces = bs.getWifiIfaces();
- if (ifaces.length == 0) {
- return null;
- }
- NetworkStatsFactory nsf = new NetworkStatsFactory();
- // Combine all the metrics per Uid into one record.
- NetworkStats stats = nsf.readNetworkStatsDetail(NetworkStats.UID_ALL, ifaces,
- NetworkStats.TAG_NONE, null).groupedByUid();
- return addNetworkStats(tagId, stats, false);
- } catch (java.io.IOException e) {
- Slog.e(TAG, "Pulling netstats for wifi bytes has error", e);
- } finally {
- Binder.restoreCallingIdentity(token);
- }
- break;
+ pullWifiBytesTransfer(tagId, ret);
+ break;
}
case StatsLog.MOBILE_BYTES_TRANSFER: {
- long token = Binder.clearCallingIdentity();
- try {
- BatteryStatsInternal bs = LocalServices.getService(BatteryStatsInternal.class);
- String[] ifaces = bs.getMobileIfaces();
- if (ifaces.length == 0) {
- return null;
- }
- NetworkStatsFactory nsf = new NetworkStatsFactory();
- // Combine all the metrics per Uid into one record.
- NetworkStats stats = nsf.readNetworkStatsDetail(NetworkStats.UID_ALL, ifaces,
- NetworkStats.TAG_NONE, null).groupedByUid();
- return addNetworkStats(tagId, stats, false);
- } catch (java.io.IOException e) {
- Slog.e(TAG, "Pulling netstats for mobile bytes has error", e);
- } finally {
- Binder.restoreCallingIdentity(token);
- }
- break;
+ pullMobileBytesTransfer(tagId, ret);
+ break;
}
case StatsLog.WIFI_BYTES_TRANSFER_BY_FG_BG: {
- long token = Binder.clearCallingIdentity();
- try {
- BatteryStatsInternal bs = LocalServices.getService(BatteryStatsInternal.class);
- String[] ifaces = bs.getWifiIfaces();
- if (ifaces.length == 0) {
- return null;
- }
- NetworkStatsFactory nsf = new NetworkStatsFactory();
- NetworkStats stats = rollupNetworkStatsByFGBG(
- nsf.readNetworkStatsDetail(NetworkStats.UID_ALL, ifaces,
- NetworkStats.TAG_NONE, null));
- return addNetworkStats(tagId, stats, true);
- } catch (java.io.IOException e) {
- Slog.e(TAG, "Pulling netstats for wifi bytes w/ fg/bg has error", e);
- } finally {
- Binder.restoreCallingIdentity(token);
- }
- break;
+ pullWifiBytesTransferByFgBg(tagId, ret);
+ break;
}
case StatsLog.MOBILE_BYTES_TRANSFER_BY_FG_BG: {
- long token = Binder.clearCallingIdentity();
- try {
- BatteryStatsInternal bs = LocalServices.getService(BatteryStatsInternal.class);
- String[] ifaces = bs.getMobileIfaces();
- if (ifaces.length == 0) {
- return null;
- }
- NetworkStatsFactory nsf = new NetworkStatsFactory();
- NetworkStats stats = rollupNetworkStatsByFGBG(
- nsf.readNetworkStatsDetail(NetworkStats.UID_ALL, ifaces,
- NetworkStats.TAG_NONE, null));
- return addNetworkStats(tagId, stats, true);
- } catch (java.io.IOException e) {
- Slog.e(TAG, "Pulling netstats for mobile bytes w/ fg/bg has error", e);
- } finally {
- Binder.restoreCallingIdentity(token);
- }
- break;
+ pullMobileBytesTransferByFgBg(tagId, ret);
+ break;
+ }
+ case StatsLog.BLUETOOTH_BYTES_TRANSFER: {
+ pullBluetoothBytesTransfer(tagId, ret);
+ break;
}
case StatsLog.KERNEL_WAKELOCK: {
- final KernelWakelockStats wakelockStats =
- mKernelWakelockReader.readKernelWakelockStats(mTmpWakelockStats);
- List<StatsLogEventWrapper> ret = new ArrayList();
- for (Map.Entry<String, KernelWakelockStats.Entry> ent : wakelockStats.entrySet()) {
- String name = ent.getKey();
- KernelWakelockStats.Entry kws = ent.getValue();
- StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 4);
- e.writeString(name);
- e.writeInt(kws.mCount);
- e.writeInt(kws.mVersion);
- e.writeLong(kws.mTotalTime);
- ret.add(e);
- }
- return ret.toArray(new StatsLogEventWrapper[ret.size()]);
+ pullKernelWakelock(tagId, ret);
+ break;
}
case StatsLog.CPU_TIME_PER_FREQ: {
- List<StatsLogEventWrapper> ret = new ArrayList();
- for (int cluster = 0; cluster < mKernelCpuSpeedReaders.length; cluster++) {
- long[] clusterTimeMs = mKernelCpuSpeedReaders[cluster].readAbsolute();
- if (clusterTimeMs != null) {
- for (int speed = clusterTimeMs.length - 1; speed >= 0; --speed) {
- StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 3);
- e.writeInt(cluster);
- e.writeInt(speed);
- e.writeLong(clusterTimeMs[speed]);
- ret.add(e);
- }
- }
- }
- return ret.toArray(new StatsLogEventWrapper[ret.size()]);
+ pullCpuTimePerFreq(tagId, ret);
+ break;
}
case StatsLog.WIFI_ACTIVITY_ENERGY_INFO: {
- List<StatsLogEventWrapper> ret = new ArrayList();
- long token = Binder.clearCallingIdentity();
- if (mWifiManager == null) {
- mWifiManager = IWifiManager.Stub.asInterface(ServiceManager.getService(
- Context.WIFI_SERVICE));
- }
- if (mWifiManager != null) {
- try {
- SynchronousResultReceiver wifiReceiver = new SynchronousResultReceiver("wifi");
- mWifiManager.requestActivityInfo(wifiReceiver);
- final WifiActivityEnergyInfo wifiInfo = awaitControllerInfo(wifiReceiver);
- StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 6);
- e.writeLong(wifiInfo.getTimeStamp());
- e.writeInt(wifiInfo.getStackState());
- e.writeLong(wifiInfo.getControllerTxTimeMillis());
- e.writeLong(wifiInfo.getControllerRxTimeMillis());
- e.writeLong(wifiInfo.getControllerIdleTimeMillis());
- e.writeLong(wifiInfo.getControllerEnergyUsed());
- ret.add(e);
- return ret.toArray(new StatsLogEventWrapper[ret.size()]);
- } catch (RemoteException e) {
- Slog.e(TAG, "Pulling wifiManager for wifi controller activity energy info has error", e);
- } finally {
- Binder.restoreCallingIdentity(token);
- }
- }
- break;
+ pullWifiActivityEnergyInfo(tagId, ret);
+ break;
}
case StatsLog.MODEM_ACTIVITY_INFO: {
- List<StatsLogEventWrapper> ret = new ArrayList();
- long token = Binder.clearCallingIdentity();
- if (mTelephony == null) {
- mTelephony = TelephonyManager.from(mContext);
- }
- if (mTelephony != null) {
- SynchronousResultReceiver modemReceiver = new SynchronousResultReceiver("telephony");
- mTelephony.requestModemActivityInfo(modemReceiver);
- final ModemActivityInfo modemInfo = awaitControllerInfo(modemReceiver);
- StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 6);
- e.writeLong(modemInfo.getTimestamp());
- e.writeLong(modemInfo.getSleepTimeMillis());
- e.writeLong(modemInfo.getIdleTimeMillis());
- e.writeLong(modemInfo.getTxTimeMillis()[0]);
- e.writeLong(modemInfo.getTxTimeMillis()[1]);
- e.writeLong(modemInfo.getTxTimeMillis()[2]);
- e.writeLong(modemInfo.getTxTimeMillis()[3]);
- e.writeLong(modemInfo.getTxTimeMillis()[4]);
- e.writeLong(modemInfo.getRxTimeMillis());
- e.writeLong(modemInfo.getEnergyUsed());
- ret.add(e);
- return ret.toArray(new StatsLogEventWrapper[ret.size()]);
- }
- break;
+ pullModemActivityInfo(tagId, ret);
+ break;
}
- case StatsLog.CPU_SUSPEND_TIME: {
- List<StatsLogEventWrapper> ret = new ArrayList();
- StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 1);
- e.writeLong(SystemClock.elapsedRealtime());
- ret.add(e);
- return ret.toArray(new StatsLogEventWrapper[ret.size()]);
- }
- case StatsLog.CPU_IDLE_TIME: {
- List<StatsLogEventWrapper> ret = new ArrayList();
- StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 1);
- e.writeLong(SystemClock.uptimeMillis());
- ret.add(e);
- return ret.toArray(new StatsLogEventWrapper[ret.size()]);
- }
- case StatsLog.DISK_SPACE: {
- List<StatsLogEventWrapper> ret = new ArrayList();
- StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 3);
- e.writeLong(mStatFsData.getAvailableBytes());
- e.writeLong(mStatFsSystem.getAvailableBytes());
- e.writeLong(mStatFsTemp.getAvailableBytes());
- ret.add(e);
- return ret.toArray(new StatsLogEventWrapper[ret.size()]);
+ case StatsLog.BLUETOOTH_ACTIVITY_INFO: {
+ pullBluetoothActivityInfo(tagId, ret);
+ break;
}
case StatsLog.SYSTEM_UPTIME: {
- List<StatsLogEventWrapper> ret = new ArrayList();
- StatsLogEventWrapper e = new StatsLogEventWrapper(tagId, 1);
- e.writeLong(SystemClock.uptimeMillis());
- ret.add(e);
- return ret.toArray(new StatsLogEventWrapper[ret.size()]);
+ pullSystemUpTime(tagId, ret);
+ break;
+ }
+ case StatsLog.SYSTEM_ELAPSED_REALTIME: {
+ pullSystemElapsedRealtime(tagId, ret);
+ break;
+ }
+ case StatsLog.DISK_SPACE: {
+ pullDiskSpace(tagId, ret);
+ break;
}
default:
Slog.w(TAG, "No such tagId data as " + tagId);
return null;
}
- return null;
+ return ret.toArray(new StatsLogEventWrapper[ret.size()]);
}
@Override // Binder call
@@ -673,6 +780,9 @@
enforceCallingPermission();
if (DEBUG) Slog.d(TAG, "learned that statsdReady");
sayHiToStatsd(); // tell statsd that we're ready too and link to it
+ mContext.sendBroadcastAsUser(new Intent(StatsManager.ACTION_STATSD_STARTED),
+ UserHandle.SYSTEM,
+ android.Manifest.permission.DUMP);
}
@Override
diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java b/services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java
index 95006ff..3ab771b 100644
--- a/services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java
+++ b/services/core/java/com/android/server/statusbar/StatusBarManagerInternal.java
@@ -37,6 +37,8 @@
void dismissKeyboardShortcutsMenu();
void toggleKeyboardShortcutsMenu(int deviceId);
+ void showChargingAnimation(int batteryLevel);
+
/**
* Show picture-in-picture menu.
*/
diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
index d67f2d7..adb368b 100644
--- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
+++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
@@ -319,6 +319,16 @@
}
@Override
+ public void showChargingAnimation(int batteryLevel) {
+ if (mBar != null) {
+ try {
+ mBar.showChargingAnimation(batteryLevel);
+ } catch (RemoteException ex){
+ }
+ }
+ }
+
+ @Override
public void showPictureInPictureMenu() {
if (mBar != null) {
try {
diff --git a/services/core/java/com/android/server/timezone/PackageStatusStorage.java b/services/core/java/com/android/server/timezone/PackageStatusStorage.java
index 251a277..04f0871 100644
--- a/services/core/java/com/android/server/timezone/PackageStatusStorage.java
+++ b/services/core/java/com/android/server/timezone/PackageStatusStorage.java
@@ -81,7 +81,7 @@
private final AtomicFile mPackageStatusFile;
PackageStatusStorage(File storageDir) {
- mPackageStatusFile = new AtomicFile(new File(storageDir, "package-status.xml"));
+ mPackageStatusFile = new AtomicFile(new File(storageDir, "package-status.xml"), "timezone-status");
}
/**
diff --git a/services/core/java/com/android/server/tv/PersistentDataStore.java b/services/core/java/com/android/server/tv/PersistentDataStore.java
index 85a8829..8f2194c 100644
--- a/services/core/java/com/android/server/tv/PersistentDataStore.java
+++ b/services/core/java/com/android/server/tv/PersistentDataStore.java
@@ -91,7 +91,7 @@
throw new IllegalStateException("User dir cannot be created: " + userDir);
}
}
- mAtomicFile = new AtomicFile(new File(userDir, "tv-input-manager-state.xml"));
+ mAtomicFile = new AtomicFile(new File(userDir, "tv-input-manager-state.xml"), "tv-input-state");
}
public boolean isParentalControlsEnabled() {
diff --git a/services/core/java/com/android/server/utils/AppInstallerUtil.java b/services/core/java/com/android/server/utils/AppInstallerUtil.java
index af7ff41..5d2dbe6 100644
--- a/services/core/java/com/android/server/utils/AppInstallerUtil.java
+++ b/services/core/java/com/android/server/utils/AppInstallerUtil.java
@@ -56,6 +56,7 @@
final Intent result = resolveIntent(context, intent);
if (result != null) {
result.putExtra(Intent.EXTRA_PACKAGE_NAME, packageName);
+ result.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
return result;
}
return null;
diff --git a/services/core/java/com/android/server/webkit/WebViewUpdater.java b/services/core/java/com/android/server/webkit/WebViewUpdater.java
index 7e05e46..61a3c09 100644
--- a/services/core/java/com/android/server/webkit/WebViewUpdater.java
+++ b/services/core/java/com/android/server/webkit/WebViewUpdater.java
@@ -507,22 +507,16 @@
if (systemInterface.systemIsDebuggable()) {
return true;
}
- Signature[] packageSignatures;
// 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();
}
- packageSignatures = packageInfo.signatures;
- if (packageSignatures.length != 1)
- return false;
+ if (packageInfo.signatures.length != 1) return false;
- final byte[] packageSignature = packageSignatures[0].toByteArray();
// Return whether the package signature matches any of the valid signatures
- for (String signature : provider.signatures) {
- final byte[] validSignature = Base64.decode(signature, Base64.DEFAULT);
- if (Arrays.equals(packageSignature, validSignature))
- return true;
+ 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/AppTransition.java b/services/core/java/com/android/server/wm/AppTransition.java
index fc7ad09..2bdaa1a 100644
--- a/services/core/java/com/android/server/wm/AppTransition.java
+++ b/services/core/java/com/android/server/wm/AppTransition.java
@@ -38,6 +38,7 @@
import static android.view.WindowManager.TRANSIT_WALLPAPER_INTRA_CLOSE;
import static android.view.WindowManager.TRANSIT_WALLPAPER_INTRA_OPEN;
import static android.view.WindowManager.TRANSIT_WALLPAPER_OPEN;
+
import static com.android.internal.R.styleable.WindowAnimation_activityCloseEnterAnimation;
import static com.android.internal.R.styleable.WindowAnimation_activityCloseExitAnimation;
import static com.android.internal.R.styleable.WindowAnimation_activityOpenEnterAnimation;
@@ -1647,10 +1648,7 @@
+ " transit=" + appTransitionToString(transit) + " isEntrance=" + enter
+ " Callers=" + Debug.getCallers(3));
}
- } else if (mNextAppTransitionType == NEXT_TRANSIT_TYPE_OPEN_CROSS_PROFILE_APPS
- && (transit == TRANSIT_ACTIVITY_OPEN
- || transit == TRANSIT_TASK_OPEN
- || transit == TRANSIT_TASK_TO_FRONT)) {
+ } else if (mNextAppTransitionType == NEXT_TRANSIT_TYPE_OPEN_CROSS_PROFILE_APPS && enter) {
a = loadAnimationRes("android", enter
? com.android.internal.R.anim.task_open_enter_cross_profile_apps
diff --git a/services/core/java/com/android/server/wm/ConfigurationContainer.java b/services/core/java/com/android/server/wm/ConfigurationContainer.java
index d340923..2c2389b 100644
--- a/services/core/java/com/android/server/wm/ConfigurationContainer.java
+++ b/services/core/java/com/android/server/wm/ConfigurationContainer.java
@@ -219,6 +219,14 @@
}
/**
+ * Returns {@code true} if the {@link WindowConfiguration} in the override
+ * {@link Configuration} specifies bounds.
+ */
+ public boolean hasOverrideBounds() {
+ return !getOverrideBounds().isEmpty();
+ }
+
+ /**
* Sets the passed in {@link Rect} to the current bounds.
* @see {@link #getOverrideBounds()}.
*/
diff --git a/services/core/java/com/android/server/wm/Dimmer.java b/services/core/java/com/android/server/wm/Dimmer.java
index 9fe16ae..b435605 100644
--- a/services/core/java/com/android/server/wm/Dimmer.java
+++ b/services/core/java/com/android/server/wm/Dimmer.java
@@ -17,34 +17,115 @@
package com.android.server.wm;
import android.util.ArrayMap;
-import android.util.Slog;
import android.view.SurfaceControl;
import android.graphics.Rect;
+import com.android.internal.annotations.VisibleForTesting;
+
/**
* Utility class for use by a WindowContainer implementation to add "DimLayer" support, that is
* black layers of varying opacity at various Z-levels which create the effect of a Dim.
*/
class Dimmer {
private static final String TAG = "WindowManager";
+ private static final int DEFAULT_DIM_ANIM_DURATION = 200;
- private class DimState {
- SurfaceControl mSurfaceControl;
+ private class DimAnimatable implements SurfaceAnimator.Animatable {
+ private final SurfaceControl mDimLayer;
+
+ private DimAnimatable(SurfaceControl dimLayer) {
+ mDimLayer = dimLayer;
+ }
+
+ @Override
+ public SurfaceControl.Transaction getPendingTransaction() {
+ return mHost.getPendingTransaction();
+ }
+
+ @Override
+ public void commitPendingTransaction() {
+ mHost.commitPendingTransaction();
+ }
+
+ @Override
+ public void onAnimationLeashCreated(SurfaceControl.Transaction t, SurfaceControl leash) {
+ }
+
+ @Override
+ public void onAnimationLeashDestroyed(SurfaceControl.Transaction t) {
+ }
+
+ @Override
+ public void destroyAfterPendingTransaction(SurfaceControl surface) {
+ mHost.destroyAfterPendingTransaction(surface);
+ }
+
+ @Override
+ public SurfaceControl.Builder makeAnimationLeash() {
+ return mHost.makeAnimationLeash();
+ }
+
+ @Override
+ public SurfaceControl getAnimationLeashParent() {
+ return mHost.getSurfaceControl();
+ }
+
+ @Override
+ public SurfaceControl getSurfaceControl() {
+ return mDimLayer;
+ }
+
+ @Override
+ public SurfaceControl getParentSurfaceControl() {
+ return mHost.getSurfaceControl();
+ }
+
+ @Override
+ public int getSurfaceWidth() {
+ // This will determine the size of the leash created. This should be the size of the
+ // host and not the dim layer since the dim layer may get bigger during animation. If
+ // that occurs, the leash size cannot change so we need to ensure the leash is big
+ // enough that the dim layer can grow.
+ // This works because the mHost will be a Task which has the display bounds.
+ return mHost.getSurfaceWidth();
+ }
+
+ @Override
+ public int getSurfaceHeight() {
+ // See getSurfaceWidth() above for explanation.
+ return mHost.getSurfaceHeight();
+ }
+ }
+
+ @VisibleForTesting
+ class DimState {
+ /**
+ * The layer where property changes should be invoked on.
+ */
+ SurfaceControl mDimLayer;
boolean mDimming;
+ boolean isVisible;
+ SurfaceAnimator mSurfaceAnimator;
/**
- * Used for Dims not assosciated with a WindowContainer. See {@link Dimmer#dimAbove} for
+ * Used for Dims not associated with a WindowContainer. See {@link Dimmer#dimAbove} for
* details on Dim lifecycle.
*/
boolean mDontReset;
- DimState(SurfaceControl ctl) {
- mSurfaceControl = ctl;
+ DimState(SurfaceControl dimLayer) {
+ mDimLayer = dimLayer;
mDimming = true;
+ mSurfaceAnimator = new SurfaceAnimator(new DimAnimatable(dimLayer), () -> {
+ if (!mDimming) {
+ mDimLayer.destroy();
+ }
+ }, mHost.mService.mAnimator::addAfterPrepareSurfacesRunnable, mHost.mService);
}
- };
+ }
- private ArrayMap<WindowContainer, DimState> mDimLayerUsers = new ArrayMap<>();
+ @VisibleForTesting
+ ArrayMap<WindowContainer, DimState> mDimLayerUsers = new ArrayMap<>();
/**
* The {@link WindowContainer} that our Dim's are bounded to. We may be dimming on behalf of the
@@ -56,19 +137,18 @@
mHost = host;
}
- SurfaceControl makeDimLayer() {
- final SurfaceControl control = mHost.makeChildSurface(null)
+ private SurfaceControl makeDimLayer() {
+ return mHost.makeChildSurface(null)
.setParent(mHost.getSurfaceControl())
.setColorLayer(true)
.setName("Dim Layer for - " + mHost.getName())
.build();
- return control;
}
/**
* Retreive the DimState for a given child of the host.
*/
- DimState getDimState(WindowContainer container) {
+ private DimState getDimState(WindowContainer container) {
DimState state = mDimLayerUsers.get(container);
if (state == null) {
final SurfaceControl ctl = makeDimLayer();
@@ -88,14 +168,12 @@
private void dim(SurfaceControl.Transaction t, WindowContainer container, int relativeLayer,
float alpha) {
final DimState d = getDimState(container);
- t.show(d.mSurfaceControl);
if (container != null) {
- t.setRelativeLayer(d.mSurfaceControl,
- container.getSurfaceControl(), relativeLayer);
+ t.setRelativeLayer(d.mDimLayer, container.getSurfaceControl(), relativeLayer);
} else {
- t.setLayer(d.mSurfaceControl, Integer.MAX_VALUE);
+ t.setLayer(d.mDimLayer, Integer.MAX_VALUE);
}
- t.setAlpha(d.mSurfaceControl, alpha);
+ t.setAlpha(d.mDimLayer, alpha);
d.mDimming = true;
}
@@ -107,16 +185,18 @@
*/
void stopDim(SurfaceControl.Transaction t) {
DimState d = getDimState(null);
- t.hide(d.mSurfaceControl);
+ t.hide(d.mDimLayer);
+ d.isVisible = false;
d.mDontReset = false;
}
+
/**
* Place a Dim above the entire host container. The caller is responsible for calling stopDim to
* remove this effect. If the Dim can be assosciated with a particular child of the host
* consider using the other variant of dimAbove which ties the Dim lifetime to the child
* lifetime more explicitly.
*
- * @param t A transaction in which to apply the Dim.
+ * @param t A transaction in which to apply the Dim.
* @param alpha The alpha at which to Dim.
*/
void dimAbove(SurfaceControl.Transaction t, float alpha) {
@@ -128,9 +208,9 @@
* for each call to {@link WindowContainer#prepareSurfaces} the Dim state will be reset
* and the child should call dimAbove again to request the Dim to continue.
*
- * @param t A transaction in which to apply the Dim.
+ * @param t A transaction in which to apply the Dim.
* @param container The container which to dim above. Should be a child of our host.
- * @param alpha The alpha at which to Dim.
+ * @param alpha The alpha at which to Dim.
*/
void dimAbove(SurfaceControl.Transaction t, WindowContainer container, float alpha) {
dim(t, container, 1, alpha);
@@ -139,9 +219,9 @@
/**
* Like {@link #dimAbove} but places the dim below the given container.
*
- * @param t A transaction in which to apply the Dim.
+ * @param t A transaction in which to apply the Dim.
* @param container The container which to dim below. Should be a child of our host.
- * @param alpha The alpha at which to Dim.
+ * @param alpha The alpha at which to Dim.
*/
void dimBelow(SurfaceControl.Transaction t, WindowContainer container, float alpha) {
@@ -159,7 +239,7 @@
void resetDimStates() {
for (int i = mDimLayerUsers.size() - 1; i >= 0; i--) {
final DimState state = mDimLayerUsers.valueAt(i);
- if (state.mDontReset == false) {
+ if (!state.mDontReset) {
state.mDimming = false;
}
}
@@ -169,7 +249,7 @@
* Call after invoking {@link WindowContainer#prepareSurfaces} on children as
* described in {@link #resetDimStates}.
*
- * @param t A transaction in which to update the dims.
+ * @param t A transaction in which to update the dims.
* @param bounds The bounds at which to dim.
* @return true if any Dims were updated.
*/
@@ -177,19 +257,80 @@
boolean didSomething = false;
for (int i = mDimLayerUsers.size() - 1; i >= 0; i--) {
DimState state = mDimLayerUsers.valueAt(i);
+ WindowContainer container = mDimLayerUsers.keyAt(i);
+
// TODO: We want to animate the addition and removal of Dim's instead of immediately
// acting. When we do this we need to take care to account for the "Replacing Windows"
// case (and seamless dim transfer).
- if (state.mDimming == false) {
+ if (!state.mDimming) {
mDimLayerUsers.removeAt(i);
- state.mSurfaceControl.destroy();
+ startDimExit(container, state.mSurfaceAnimator, t);
} else {
didSomething = true;
// TODO: Once we use geometry from hierarchy this falls away.
- t.setSize(state.mSurfaceControl, bounds.width(), bounds.height());
- t.setPosition(state.mSurfaceControl, bounds.left, bounds.top);
+ t.setSize(state.mDimLayer, bounds.width(), bounds.height());
+ t.setPosition(state.mDimLayer, bounds.left, bounds.top);
+ if (!state.isVisible) {
+ state.isVisible = true;
+ t.show(state.mDimLayer);
+ startDimEnter(container, state.mSurfaceAnimator, t);
+ }
}
}
return didSomething;
}
+
+ private void startDimEnter(WindowContainer container, SurfaceAnimator animator,
+ SurfaceControl.Transaction t) {
+ startAnim(container, animator, t, 0 /* startAlpha */, 1 /* endAlpha */);
+ }
+
+ private void startDimExit(WindowContainer container, SurfaceAnimator animator,
+ SurfaceControl.Transaction t) {
+ startAnim(container, animator, t, 1 /* startAlpha */, 0 /* endAlpha */);
+ }
+
+ private void startAnim(WindowContainer container, SurfaceAnimator animator,
+ SurfaceControl.Transaction t, float startAlpha, float endAlpha) {
+ animator.startAnimation(t, new LocalAnimationAdapter(
+ new AlphaAnimationSpec(startAlpha, endAlpha, getDimDuration(container)),
+ mHost.mService.mSurfaceAnimationRunner), false /* hidden */);
+ }
+
+ private long getDimDuration(WindowContainer container) {
+ // If there's no container, then there isn't an animation occurring while dimming. Set the
+ // duration to 0 so it immediately dims to the set alpha.
+ if (container == null) {
+ return 0;
+ }
+
+ // Otherwise use the same duration as the animation on the WindowContainer
+ AnimationAdapter animationAdapter = container.mSurfaceAnimator.getAnimation();
+ return animationAdapter == null ? DEFAULT_DIM_ANIM_DURATION
+ : animationAdapter.getDurationHint();
+ }
+
+ private static class AlphaAnimationSpec implements LocalAnimationAdapter.AnimationSpec {
+ private final long mDuration;
+ private final float mFromAlpha;
+ private final float mToAlpha;
+
+ AlphaAnimationSpec(float fromAlpha, float toAlpha, long duration) {
+ mFromAlpha = fromAlpha;
+ mToAlpha = toAlpha;
+ mDuration = duration;
+ }
+
+ @Override
+ public long getDuration() {
+ return mDuration;
+ }
+
+ @Override
+ public void apply(SurfaceControl.Transaction t, SurfaceControl sc, long currentPlayTime) {
+ float alpha = ((float) currentPlayTime / getDuration()) * (mToAlpha - mFromAlpha)
+ + mFromAlpha;
+ t.setAlpha(sc, alpha);
+ }
+ }
}
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 6dc384a..7674b5e 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -1508,6 +1508,10 @@
return mTaskStackContainers.getTopStack();
}
+ ArrayList<Task> getVisibleTasks() {
+ return mTaskStackContainers.getVisibleTasks();
+ }
+
void onStackWindowingModeChanged(TaskStack stack) {
mTaskStackContainers.onStackWindowingModeChanged(stack);
}
@@ -1802,6 +1806,11 @@
getParent().positionChildAt(position, this, includingParents);
}
+ void positionStackAt(int position, TaskStack child) {
+ mTaskStackContainers.positionChildAt(position, child, false /* includingParents */);
+ layoutAndAssignWindowLayersIfNeeded();
+ }
+
int taskIdFromPoint(int x, int y) {
for (int stackNdx = mTaskStackContainers.getChildCount() - 1; stackNdx >= 0; --stackNdx) {
final TaskStack stack = mTaskStackContainers.getChildAt(stackNdx);
@@ -3255,6 +3264,16 @@
return mSplitScreenPrimaryStack;
}
+ ArrayList<Task> getVisibleTasks() {
+ final ArrayList<Task> visibleTasks = new ArrayList<>();
+ forAllTasks(task -> {
+ if (task.isVisible()) {
+ visibleTasks.add(task);
+ }
+ });
+ return visibleTasks;
+ }
+
/**
* Adds the stack to this container.
* @see DisplayContent#createStack(int, boolean, StackWindowController)
@@ -3580,6 +3599,8 @@
}
private final class AboveAppWindowContainers extends NonAppWindowContainers {
+ private final Dimmer mDimmer = new Dimmer(this);
+ private final Rect mTmpDimBoundsRect = new Rect();
AboveAppWindowContainers(String name, WindowManagerService service) {
super(name, service);
}
@@ -3611,6 +3632,22 @@
imeContainer.assignRelativeLayer(t, getSurfaceControl(), Integer.MAX_VALUE);
}
}
+
+ @Override
+ Dimmer getDimmer() {
+ return mDimmer;
+ }
+
+ @Override
+ void prepareSurfaces() {
+ mDimmer.resetDimStates();
+ super.prepareSurfaces();
+ getBounds(mTmpDimBoundsRect);
+
+ if (mDimmer.updateDims(getPendingTransaction(), mTmpDimBoundsRect)) {
+ scheduleAnimation();
+ }
+ }
}
/**
diff --git a/services/core/java/com/android/server/wm/DisplaySettings.java b/services/core/java/com/android/server/wm/DisplaySettings.java
index 7f79686..97b64dc 100644
--- a/services/core/java/com/android/server/wm/DisplaySettings.java
+++ b/services/core/java/com/android/server/wm/DisplaySettings.java
@@ -64,7 +64,7 @@
public DisplaySettings() {
File dataDir = Environment.getDataDirectory();
File systemDir = new File(dataDir, "system");
- mFile = new AtomicFile(new File(systemDir, "display_settings.xml"));
+ mFile = new AtomicFile(new File(systemDir, "display_settings.xml"), "wm-displays");
}
public void getOverscanLocked(String name, String uniqueId, Rect outRect) {
diff --git a/services/core/java/com/android/server/wm/DisplayWindowController.java b/services/core/java/com/android/server/wm/DisplayWindowController.java
new file mode 100644
index 0000000..ad4957e
--- /dev/null
+++ b/services/core/java/com/android/server/wm/DisplayWindowController.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 com.android.server.wm;
+
+import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_STACK;
+import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
+
+import android.content.res.Configuration;
+import android.util.Slog;
+
+/**
+ * Controller for the display container. This is created by activity manager to link activity
+ * displays to the display content they use in window manager.
+ */
+public class DisplayWindowController
+ extends WindowContainerController<DisplayContent, WindowContainerListener> {
+
+ private final int mDisplayId;
+
+ public DisplayWindowController(int displayId, WindowContainerListener listener) {
+ super(listener, WindowManagerService.getInstance());
+ mDisplayId = displayId;
+
+ synchronized (mWindowMap) {
+ // TODO: Convert to setContainer() from DisplayContent once everything is hooked up.
+ // Currently we are not setup to register for config changes.
+ mContainer = mRoot.getDisplayContentOrCreate(displayId);
+ if (mContainer == null) {
+ throw new IllegalArgumentException("Trying to add displayId=" + displayId);
+ }
+ }
+ }
+
+ @Override
+ public void removeContainer() {
+ // TODO: Pipe through from ActivityDisplay to remove the display
+ throw new UnsupportedOperationException("To be implemented");
+ }
+
+ @Override
+ public void onOverrideConfigurationChanged(Configuration overrideConfiguration) {
+ // TODO: Pipe through from ActivityDisplay to update the configuration for the display
+ throw new UnsupportedOperationException("To be implemented");
+ }
+
+ /**
+ * Positions the task stack at the given position in the task stack container.
+ */
+ public void positionChildAt(StackWindowController child, int position) {
+ synchronized (mWindowMap) {
+ if (DEBUG_STACK) Slog.i(TAG_WM, "positionTaskStackAt: positioning stack=" + child
+ + " at " + position);
+ if (mContainer == null) {
+ if (DEBUG_STACK) Slog.i(TAG_WM,
+ "positionTaskStackAt: could not find display=" + mContainer);
+ return;
+ }
+ if (child.mContainer == null) {
+ if (DEBUG_STACK) Slog.i(TAG_WM,
+ "positionTaskStackAt: could not find stack=" + this);
+ return;
+ }
+ mContainer.positionStackAt(position, child.mContainer);
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "{DisplayWindowController displayId=" + mDisplayId + "}";
+ }
+}
diff --git a/services/core/java/com/android/server/wm/DockedStackDividerController.java b/services/core/java/com/android/server/wm/DockedStackDividerController.java
index 7ae1f24..80798bf 100644
--- a/services/core/java/com/android/server/wm/DockedStackDividerController.java
+++ b/services/core/java/com/android/server/wm/DockedStackDividerController.java
@@ -568,6 +568,14 @@
: null;
final TaskStack dockedStack = mDisplayContent.getSplitScreenPrimaryStack();
boolean visibleAndValid = visible && stack != null && dockedStack != null;
+
+ // Ensure an old dim that was shown for the docked stack divider is removed so we don't end
+ // up with dim layers that can no longer be removed.
+ if (mDimmedStack != null && mDimmedStack != stack) {
+ mDimmedStack.stopDimming();
+ mDimmedStack = null;
+ }
+
if (visibleAndValid) {
mDimmedStack = stack;
stack.dim(alpha);
diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java
index 88b7a11..281e0a8 100644
--- a/services/core/java/com/android/server/wm/InputMonitor.java
+++ b/services/core/java/com/android/server/wm/InputMonitor.java
@@ -19,6 +19,7 @@
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.WindowManager.INPUT_CONSUMER_NAVIGATION;
import static android.view.WindowManager.INPUT_CONSUMER_PIP;
+import static android.view.WindowManager.INPUT_CONSUMER_RECENTS_ANIMATION;
import static android.view.WindowManager.INPUT_CONSUMER_WALLPAPER;
import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS;
@@ -86,6 +87,7 @@
private boolean mAddInputConsumerHandle;
private boolean mAddPipInputConsumerHandle;
private boolean mAddWallpaperInputConsumerHandle;
+ private boolean mAddRecentsAnimationInputConsumerHandle;
private boolean mDisableWallpaperTouchEvents;
private final Rect mTmpRect = new Rect();
private final UpdateInputForAllWindowsConsumer mUpdateInputForAllWindowsConsumer =
@@ -612,7 +614,7 @@
InputConsumerImpl navInputConsumer;
InputConsumerImpl pipInputConsumer;
InputConsumerImpl wallpaperInputConsumer;
- Rect pipTouchableBounds;
+ InputConsumerImpl recentsAnimationInputConsumer;
boolean inDrag;
WallpaperController wallpaperController;
@@ -622,11 +624,13 @@
navInputConsumer = getInputConsumer(INPUT_CONSUMER_NAVIGATION, DEFAULT_DISPLAY);
pipInputConsumer = getInputConsumer(INPUT_CONSUMER_PIP, DEFAULT_DISPLAY);
wallpaperInputConsumer = getInputConsumer(INPUT_CONSUMER_WALLPAPER, DEFAULT_DISPLAY);
+ recentsAnimationInputConsumer = getInputConsumer(INPUT_CONSUMER_RECENTS_ANIMATION,
+ DEFAULT_DISPLAY);
mAddInputConsumerHandle = navInputConsumer != null;
mAddPipInputConsumerHandle = pipInputConsumer != null;
mAddWallpaperInputConsumerHandle = wallpaperInputConsumer != null;
+ mAddRecentsAnimationInputConsumerHandle = recentsAnimationInputConsumer != null;
mTmpRect.setEmpty();
- pipTouchableBounds = mAddPipInputConsumerHandle ? mTmpRect : null;
mDisableWallpaperTouchEvents = false;
this.inDrag = inDrag;
wallpaperController = mService.mRoot.mWallpaperController;
@@ -659,12 +663,28 @@
final boolean hasFocus = w == mInputFocus;
final boolean isVisible = w.isVisibleLw();
+ if (mAddRecentsAnimationInputConsumerHandle) {
+ final RecentsAnimationController recentsAnimationController =
+ mService.getRecentsAnimationController();
+ if (recentsAnimationController != null
+ && recentsAnimationController.hasInputConsumerForApp(w.mAppToken)) {
+ if (recentsAnimationController.updateInputConsumerForApp(
+ recentsAnimationInputConsumer, hasFocus)) {
+ addInputWindowHandle(recentsAnimationInputConsumer.mWindowHandle);
+ mAddRecentsAnimationInputConsumerHandle = false;
+ }
+ // Skip adding the window below regardless of whether there is an input consumer
+ // to handle it
+ return;
+ }
+ }
+
if (w.inPinnedWindowingMode()) {
if (mAddPipInputConsumerHandle
&& (inputWindowHandle.layer <= pipInputConsumer.mWindowHandle.layer)) {
// Update the bounds of the Pip input consumer to match the window bounds.
- w.getBounds(pipTouchableBounds);
- pipInputConsumer.mWindowHandle.touchableRegion.set(pipTouchableBounds);
+ w.getBounds(mTmpRect);
+ pipInputConsumer.mWindowHandle.touchableRegion.set(mTmpRect);
addInputWindowHandle(pipInputConsumer.mWindowHandle);
mAddPipInputConsumerHandle = false;
}
diff --git a/services/core/java/com/android/server/wm/RecentsAnimationController.java b/services/core/java/com/android/server/wm/RecentsAnimationController.java
new file mode 100644
index 0000000..fe5b65c
--- /dev/null
+++ b/services/core/java/com/android/server/wm/RecentsAnimationController.java
@@ -0,0 +1,384 @@
+/*
+ * 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.wm;
+
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
+import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
+import static android.view.RemoteAnimationTarget.MODE_CLOSING;
+import static android.view.WindowManager.INPUT_CONSUMER_RECENTS_ANIMATION;
+import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
+import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
+import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
+
+import android.app.ActivityManager;
+import android.app.ActivityManager.TaskSnapshot;
+import android.app.WindowConfiguration;
+import android.graphics.GraphicBuffer;
+import android.graphics.Point;
+import android.graphics.Rect;
+import android.os.Binder;
+import android.os.RemoteException;
+import android.os.SystemClock;
+import android.util.Log;
+import android.util.Slog;
+import android.view.IRecentsAnimationController;
+import android.view.IRecentsAnimationRunner;
+import android.view.RemoteAnimationTarget;
+import android.view.SurfaceControl;
+import android.view.SurfaceControl.Transaction;
+import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+
+/**
+ * Controls a single instance of the remote driven recents animation. In particular, this allows
+ * the calling SystemUI to animate the visible task windows as a part of the transition. The remote
+ * runner is provided an animation controller which allows it to take screenshots and to notify
+ * window manager when the animation is completed. In addition, window manager may also notify the
+ * app if it requires the animation to be canceled at any time (ie. due to timeout, etc.)
+ */
+public class RecentsAnimationController {
+ private static final String TAG = TAG_WITH_CLASS_NAME ? "RecentsAnimationController" : TAG_WM;
+ private static final boolean DEBUG = false;
+
+ private final WindowManagerService mService;
+ private final IRecentsAnimationRunner mRunner;
+ private final RecentsAnimationCallbacks mCallbacks;
+ private final ArrayList<TaskAnimationAdapter> mPendingAnimations = new ArrayList<>();
+
+ // The recents component app token that is shown behind the visibile tasks
+ private AppWindowToken mHomeAppToken;
+
+ // We start the RecentsAnimationController in a pending-start state since we need to wait for
+ // the wallpaper/activity to draw before we can give control to the handler to start animating
+ // the visible task surfaces
+ private boolean mPendingStart = true;
+
+ // Set when the animation has been canceled
+ private boolean mCanceled = false;
+
+ // Whether or not the input consumer is enabled. The input consumer must be both registered and
+ // enabled for it to start intercepting touch events.
+ private boolean mInputConsumerEnabled;
+
+ private Rect mTmpRect = new Rect();
+
+ public interface RecentsAnimationCallbacks {
+ void onAnimationFinished(boolean moveHomeToTop);
+ }
+
+ private final IRecentsAnimationController mController =
+ new IRecentsAnimationController.Stub() {
+
+ @Override
+ public TaskSnapshot screenshotTask(int taskId) {
+ if (DEBUG) Log.d(TAG, "screenshotTask(" + taskId + "): mCanceled=" + mCanceled);
+ long token = Binder.clearCallingIdentity();
+ try {
+ synchronized (mService.getWindowManagerLock()) {
+ if (mCanceled) {
+ return null;
+ }
+ for (int i = mPendingAnimations.size() - 1; i >= 0; i--) {
+ final TaskAnimationAdapter adapter = mPendingAnimations.get(i);
+ final Task task = adapter.mTask;
+ if (task.mTaskId == taskId) {
+ // TODO: Save this screenshot as the task snapshot?
+ final Rect taskFrame = new Rect();
+ task.getBounds(taskFrame);
+ final GraphicBuffer buffer = SurfaceControl.captureLayers(
+ task.getSurfaceControl().getHandle(), taskFrame, 1f);
+ final AppWindowToken topChild = task.getTopChild();
+ final WindowState mainWindow = topChild.findMainWindow();
+ return new TaskSnapshot(buffer, topChild.getConfiguration().orientation,
+ mainWindow.mStableInsets,
+ ActivityManager.isLowRamDeviceStatic() /* reduced */,
+ 1.0f /* scale */);
+ }
+ }
+ return null;
+ }
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+
+ @Override
+ public void finish(boolean moveHomeToTop) {
+ if (DEBUG) Log.d(TAG, "finish(" + moveHomeToTop + "): mCanceled=" + mCanceled);
+ long token = Binder.clearCallingIdentity();
+ try {
+ synchronized (mService.getWindowManagerLock()) {
+ if (mCanceled) {
+ return;
+ }
+ }
+
+ // Note, the callback will handle its own synchronization, do not lock on WM lock
+ // prior to calling the callback
+ mCallbacks.onAnimationFinished(moveHomeToTop);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+
+ @Override
+ public void setInputConsumerEnabled(boolean enabled) {
+ if (DEBUG) Log.d(TAG, "setInputConsumerEnabled(" + enabled + "): mCanceled="
+ + mCanceled);
+ long token = Binder.clearCallingIdentity();
+ try {
+ synchronized (mService.getWindowManagerLock()) {
+ if (mCanceled) {
+ return;
+ }
+
+ mInputConsumerEnabled = enabled;
+ mService.mInputMonitor.updateInputWindowsLw(true /*force*/);
+ mService.scheduleAnimationLocked();
+ }
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+ };
+
+ /**
+ * Initializes a new RecentsAnimationController.
+ *
+ * @param remoteAnimationRunner The remote runner which should be notified when the animation is
+ * ready to start or has been canceled
+ * @param callbacks Callbacks to be made when the animation finishes
+ * @param restoreHomeBehindStackId The stack id to restore the home stack behind once the
+ * animation is complete. Will be passed to the callback.
+ */
+ RecentsAnimationController(WindowManagerService service,
+ IRecentsAnimationRunner remoteAnimationRunner, RecentsAnimationCallbacks callbacks,
+ int displayId) {
+ mService = service;
+ mRunner = remoteAnimationRunner;
+ mCallbacks = callbacks;
+
+ final DisplayContent dc = mService.mRoot.getDisplayContent(displayId);
+ final ArrayList<Task> visibleTasks = dc.getVisibleTasks();
+ if (visibleTasks.isEmpty()) {
+ cancelAnimation();
+ return;
+ }
+
+ // Make leashes for each of the visible tasks and add it to the recents animation to be
+ // started
+ final int taskCount = visibleTasks.size();
+ for (int i = 0; i < taskCount; i++) {
+ final Task task = visibleTasks.get(i);
+ final WindowConfiguration config = task.getWindowConfiguration();
+ if (config.tasksAreFloating()
+ || config.getWindowingMode() == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY
+ || config.getActivityType() == ACTIVITY_TYPE_HOME) {
+ continue;
+ }
+ addAnimation(task);
+ }
+
+ // Adjust the wallpaper visibility for the showing home activity
+ final AppWindowToken recentsComponentAppToken =
+ dc.getHomeStack().getTopChild().getTopFullscreenAppToken();
+ if (recentsComponentAppToken != null) {
+ if (DEBUG) Log.d(TAG, "setHomeApp(" + recentsComponentAppToken.getName() + ")");
+ mHomeAppToken = recentsComponentAppToken;
+ final WallpaperController wc = dc.mWallpaperController;
+ if (recentsComponentAppToken.windowsCanBeWallpaperTarget()) {
+ dc.pendingLayoutChanges |= FINISH_LAYOUT_REDO_WALLPAPER;
+ dc.setLayoutNeeded();
+ }
+ }
+
+ mService.mWindowPlacerLocked.performSurfacePlacement();
+ }
+
+ private void addAnimation(Task task) {
+ if (DEBUG) Log.d(TAG, "addAnimation(" + task.getName() + ")");
+ final SurfaceAnimator anim = new SurfaceAnimator(task, null /* animationFinishedCallback */,
+ mService.mAnimator::addAfterPrepareSurfacesRunnable, mService);
+ final TaskAnimationAdapter taskAdapter = new TaskAnimationAdapter(task);
+ anim.startAnimation(task.getPendingTransaction(), taskAdapter, false /* hidden */);
+ task.commitPendingTransaction();
+ mPendingAnimations.add(taskAdapter);
+ }
+
+ void startAnimation() {
+ if (DEBUG) Log.d(TAG, "startAnimation(): mPendingStart=" + mPendingStart);
+ if (!mPendingStart) {
+ return;
+ }
+ try {
+ final RemoteAnimationTarget[] appAnimations =
+ new RemoteAnimationTarget[mPendingAnimations.size()];
+ for (int i = mPendingAnimations.size() - 1; i >= 0; i--) {
+ appAnimations[i] = mPendingAnimations.get(i).createRemoteAnimationApp();
+ }
+ mPendingStart = false;
+ mRunner.onAnimationStart(mController, appAnimations);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Failed to start recents animation", e);
+ }
+ }
+
+ void cancelAnimation() {
+ if (DEBUG) Log.d(TAG, "cancelAnimation()");
+ if (mCanceled) {
+ // We've already canceled the animation
+ return;
+ }
+ mCanceled = true;
+ try {
+ mRunner.onAnimationCanceled();
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Failed to cancel recents animation", e);
+ }
+
+ // Clean up and return to the previous app
+ mCallbacks.onAnimationFinished(false /* moveHomeToTop */);
+ }
+
+ void cleanupAnimation() {
+ if (DEBUG) Log.d(TAG, "cleanupAnimation(): mPendingAnimations="
+ + mPendingAnimations.size());
+ for (int i = mPendingAnimations.size() - 1; i >= 0; i--) {
+ final TaskAnimationAdapter adapter = mPendingAnimations.get(i);
+ adapter.mCapturedFinishCallback.onAnimationFinished(adapter);
+ }
+ mPendingAnimations.clear();
+
+ mService.mInputMonitor.updateInputWindowsLw(true /*force*/);
+ mService.destroyInputConsumer(INPUT_CONSUMER_RECENTS_ANIMATION);
+ }
+
+ void checkAnimationReady(WallpaperController wallpaperController) {
+ if (mPendingStart) {
+ final boolean wallpaperReady = !isHomeAppOverWallpaper()
+ || (wallpaperController.getWallpaperTarget() != null
+ && wallpaperController.wallpaperTransitionReady());
+ if (wallpaperReady) {
+ mService.getRecentsAnimationController().startAnimation();
+ }
+ }
+ }
+
+ boolean isWallpaperVisible(WindowState w) {
+ return w != null && w.mAppToken != null && mHomeAppToken == w.mAppToken
+ && isHomeAppOverWallpaper();
+ }
+
+ boolean hasInputConsumerForApp(AppWindowToken appToken) {
+ return mInputConsumerEnabled && isAnimatingApp(appToken);
+ }
+
+ boolean updateInputConsumerForApp(InputConsumerImpl recentsAnimationInputConsumer,
+ boolean hasFocus) {
+ // Update the input consumer touchable region to match the home app main window
+ final WindowState homeAppMainWindow = mHomeAppToken != null
+ ? mHomeAppToken.findMainWindow()
+ : null;
+ if (homeAppMainWindow != null) {
+ homeAppMainWindow.getBounds(mTmpRect);
+ recentsAnimationInputConsumer.mWindowHandle.hasFocus = hasFocus;
+ recentsAnimationInputConsumer.mWindowHandle.touchableRegion.set(mTmpRect);
+ return true;
+ }
+ return false;
+ }
+
+ private boolean isHomeAppOverWallpaper() {
+ if (mHomeAppToken == null) {
+ return false;
+ }
+ return mHomeAppToken.windowsCanBeWallpaperTarget();
+ }
+
+ private boolean isAnimatingApp(AppWindowToken appToken) {
+ for (int i = mPendingAnimations.size() - 1; i >= 0; i--) {
+ final Task task = mPendingAnimations.get(i).mTask;
+ for (int j = task.getChildCount() - 1; j >= 0; j--) {
+ final AppWindowToken app = task.getChildAt(j);
+ if (app == appToken) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ private class TaskAnimationAdapter implements AnimationAdapter {
+
+ private Task mTask;
+ private SurfaceControl mCapturedLeash;
+ private OnAnimationFinishedCallback mCapturedFinishCallback;
+
+ TaskAnimationAdapter(Task task) {
+ mTask = task;
+ }
+
+ RemoteAnimationTarget createRemoteAnimationApp() {
+ // TODO: Do we need position and stack bounds?
+ return new RemoteAnimationTarget(mTask.mTaskId, MODE_CLOSING, mCapturedLeash,
+ !mTask.fillsParent(),
+ mTask.getTopVisibleAppMainWindow().mWinAnimator.mLastClipRect,
+ mTask.getPrefixOrderIndex(), new Point(), new Rect(),
+ mTask.getWindowConfiguration());
+ }
+
+ @Override
+ public boolean getDetachWallpaper() {
+ return false;
+ }
+
+ @Override
+ public int getBackgroundColor() {
+ return 0;
+ }
+
+ @Override
+ public void startAnimation(SurfaceControl animationLeash, Transaction t,
+ OnAnimationFinishedCallback finishCallback) {
+ mCapturedLeash = animationLeash;
+ mCapturedFinishCallback = finishCallback;
+ }
+
+ @Override
+ public void onAnimationCancelled(SurfaceControl animationLeash) {
+ cancelAnimation();
+ }
+
+ @Override
+ public long getDurationHint() {
+ return 0;
+ }
+
+ @Override
+ public long getStatusBarTransitionsStartTime() {
+ return SystemClock.uptimeMillis();
+ }
+ }
+
+ public void dump(PrintWriter pw, String prefix) {
+ final String innerPrefix = prefix + " ";
+ pw.print(prefix); pw.println(RecentsAnimationController.class.getSimpleName() + ":");
+ pw.print(innerPrefix); pw.println("mPendingStart=" + mPendingStart);
+ pw.print(innerPrefix); pw.println("mHomeAppToken=" + mHomeAppToken);
+ }
+}
diff --git a/services/core/java/com/android/server/wm/RemoteAnimationController.java b/services/core/java/com/android/server/wm/RemoteAnimationController.java
index 8515dcb..8269a3b 100644
--- a/services/core/java/com/android/server/wm/RemoteAnimationController.java
+++ b/services/core/java/com/android/server/wm/RemoteAnimationController.java
@@ -88,6 +88,10 @@
* Called when the transition is ready to be started, and all leashes have been set up.
*/
void goodToGo() {
+ if (mPendingAnimations.isEmpty()) {
+ onAnimationFinished();
+ return;
+ }
mHandler.postDelayed(mTimeoutRunnable, TIMEOUT_MS);
try {
mRemoteAnimationAdapter.getRunner().onAnimationStart(createAnimations(),
@@ -160,7 +164,8 @@
return new RemoteAnimationTarget(task.mTaskId, getMode(),
mCapturedLeash, !mAppWindowToken.fillsParent(),
mainWindow.mWinAnimator.mLastClipRect,
- mAppWindowToken.getPrefixOrderIndex(), mPosition, mStackBounds);
+ mAppWindowToken.getPrefixOrderIndex(), mPosition, mStackBounds,
+ task.getWindowConfiguration());
}
private int getMode() {
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index 2cc96c9..deed7f1 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -623,6 +623,13 @@
defaultDisplay.pendingLayoutChanges);
}
+ // Defer starting the recents animation until the wallpaper has drawn
+ final RecentsAnimationController recentsAnimationController =
+ mService.getRecentsAnimationController();
+ if (recentsAnimationController != null) {
+ recentsAnimationController.checkAnimationReady(mWallpaperController);
+ }
+
if (mWallpaperForceHidingChanged && defaultDisplay.pendingLayoutChanges == 0
&& !mService.mAppTransition.isReady()) {
// At this point, there was a window with a wallpaper that was force hiding other
diff --git a/services/core/java/com/android/server/wm/SurfaceAnimator.java b/services/core/java/com/android/server/wm/SurfaceAnimator.java
index 10f1c3a..0512a08 100644
--- a/services/core/java/com/android/server/wm/SurfaceAnimator.java
+++ b/services/core/java/com/android/server/wm/SurfaceAnimator.java
@@ -62,7 +62,7 @@
* @param addAfterPrepareSurfaces Consumer that takes a runnable and executes it after preparing
* surfaces in WM. Can be implemented differently during testing.
*/
- SurfaceAnimator(Animatable animatable, Runnable animationFinishedCallback,
+ SurfaceAnimator(Animatable animatable, @Nullable Runnable animationFinishedCallback,
Consumer<Runnable> addAfterPrepareSurfaces, WindowManagerService service) {
mAnimatable = animatable;
mService = service;
@@ -71,7 +71,8 @@
addAfterPrepareSurfaces);
}
- private OnAnimationFinishedCallback getFinishedCallback(Runnable animationFinishedCallback,
+ private OnAnimationFinishedCallback getFinishedCallback(
+ @Nullable Runnable animationFinishedCallback,
Consumer<Runnable> addAfterPrepareSurfaces) {
return anim -> {
synchronized (mService.mWindowMap) {
@@ -97,7 +98,9 @@
SurfaceControl.openTransaction();
try {
reset(t, true /* destroyLeash */);
- animationFinishedCallback.run();
+ if (animationFinishedCallback != null) {
+ animationFinishedCallback.run();
+ }
} finally {
SurfaceControl.mergeToGlobalTransaction(t);
SurfaceControl.closeTransaction();
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 0628436..7d970d9 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -462,8 +462,8 @@
} else {
mStack.getBounds(mTmpRect);
mTmpRect.intersect(getBounds());
+ out.set(mTmpRect);
}
- out.set(mTmpRect);
} else {
out.set(getBounds());
}
@@ -640,6 +640,7 @@
mPreserveNonFloatingState = false;
}
+ @Override
Dimmer getDimmer() {
return mDimmer;
}
diff --git a/services/core/java/com/android/server/wm/TaskSnapshotController.java b/services/core/java/com/android/server/wm/TaskSnapshotController.java
index f79719c..212a0d70 100644
--- a/services/core/java/com/android/server/wm/TaskSnapshotController.java
+++ b/services/core/java/com/android/server/wm/TaskSnapshotController.java
@@ -223,6 +223,27 @@
return null;
}
+ if (top.hasCommittedReparentToAnimationLeash()) {
+ if (DEBUG_SCREENSHOT) {
+ Slog.w(TAG_WM, "Failed to take screenshot. App is animating " + top);
+ }
+ return null;
+ }
+
+ final boolean hasVisibleChild = top.forAllWindows(
+ // Ensure at least one window for the top app is visible before attempting to take
+ // a screenshot. Visible here means that the WSA surface is shown and has an alpha
+ // greater than 0.
+ ws -> ws.mWinAnimator != null && ws.mWinAnimator.getShown()
+ && ws.mWinAnimator.mLastAlpha > 0f, true);
+
+ if (!hasVisibleChild) {
+ if (DEBUG_SCREENSHOT) {
+ Slog.w(TAG_WM, "Failed to take screenshot. No visible windows for " + task);
+ }
+ return null;
+ }
+
final boolean isLowRamDevice = ActivityManager.isLowRamDeviceStatic();
final float scaleFraction = isLowRamDevice ? REDUCED_SCALE : 1f;
task.getBounds(mTmpRect);
@@ -233,7 +254,7 @@
if (buffer == null || buffer.getWidth() <= 1 || buffer.getHeight() <= 1) {
if (DEBUG_SCREENSHOT) {
- Slog.w(TAG_WM, "Failed to take screenshot");
+ Slog.w(TAG_WM, "Failed to take screenshot for " + task);
}
return null;
}
diff --git a/services/core/java/com/android/server/wm/TaskStack.java b/services/core/java/com/android/server/wm/TaskStack.java
index bc0f9ad..cf54b67 100644
--- a/services/core/java/com/android/server/wm/TaskStack.java
+++ b/services/core/java/com/android/server/wm/TaskStack.java
@@ -1722,6 +1722,7 @@
|| activityType == ACTIVITY_TYPE_ASSISTANT;
}
+ @Override
Dimmer getDimmer() {
return mDimmer;
}
diff --git a/services/core/java/com/android/server/wm/WallpaperController.java b/services/core/java/com/android/server/wm/WallpaperController.java
index 1218d3b..f2ad6fb 100644
--- a/services/core/java/com/android/server/wm/WallpaperController.java
+++ b/services/core/java/com/android/server/wm/WallpaperController.java
@@ -149,8 +149,17 @@
mFindResults.setUseTopWallpaperAsTarget(true);
}
+ final RecentsAnimationController recentsAnimationController =
+ mService.getRecentsAnimationController();
final boolean hasWallpaper = (w.mAttrs.flags & FLAG_SHOW_WALLPAPER) != 0;
- if (hasWallpaper && w.isOnScreen() && (mWallpaperTarget == w || w.isDrawFinishedLw())) {
+ final boolean isRecentsTransitionTarget = (recentsAnimationController != null
+ && recentsAnimationController.isWallpaperVisible(w));
+ if (isRecentsTransitionTarget) {
+ if (DEBUG_WALLPAPER) Slog.v(TAG, "Found recents animation wallpaper target: " + w);
+ mFindResults.setWallpaperTarget(w);
+ return true;
+ } else if (hasWallpaper && w.isOnScreen()
+ && (mWallpaperTarget == w || w.isDrawFinishedLw())) {
if (DEBUG_WALLPAPER) Slog.v(TAG, "Found wallpaper target: " + w);
mFindResults.setWallpaperTarget(w);
if (w == mWallpaperTarget && w.mWinAnimator.isAnimationSet()) {
@@ -199,15 +208,22 @@
}
}
- private boolean isWallpaperVisible(WindowState wallpaperTarget) {
+ private final boolean isWallpaperVisible(WindowState wallpaperTarget) {
+ final RecentsAnimationController recentsAnimationController =
+ mService.getRecentsAnimationController();
+ boolean isAnimatingWithRecentsComponent = recentsAnimationController != null
+ && recentsAnimationController.isWallpaperVisible(wallpaperTarget);
if (DEBUG_WALLPAPER) Slog.v(TAG, "Wallpaper vis: target " + wallpaperTarget + ", obscured="
+ (wallpaperTarget != null ? Boolean.toString(wallpaperTarget.mObscured) : "??")
+ " animating=" + ((wallpaperTarget != null && wallpaperTarget.mAppToken != null)
? wallpaperTarget.mAppToken.isSelfAnimating() : null)
- + " prev=" + mPrevWallpaperTarget);
+ + " prev=" + mPrevWallpaperTarget
+ + " recentsAnimationWallpaperVisible=" + isAnimatingWithRecentsComponent);
return (wallpaperTarget != null
- && (!wallpaperTarget.mObscured || (wallpaperTarget.mAppToken != null
- && wallpaperTarget.mAppToken.isSelfAnimating())))
+ && (!wallpaperTarget.mObscured
+ || isAnimatingWithRecentsComponent
+ || (wallpaperTarget.mAppToken != null
+ && wallpaperTarget.mAppToken.isSelfAnimating())))
|| mPrevWallpaperTarget != null;
}
@@ -587,6 +603,11 @@
mWallpaperDrawState = WALLPAPER_DRAW_TIMEOUT;
if (DEBUG_APP_TRANSITIONS || DEBUG_WALLPAPER) Slog.v(TAG,
"*** WALLPAPER DRAW TIMEOUT");
+
+ // If there was a recents animation in progress, cancel that animation
+ if (mService.getRecentsAnimationController() != null) {
+ mService.getRecentsAnimationController().cancelAnimation();
+ }
return true;
}
return false;
diff --git a/services/core/java/com/android/server/wm/WindowContainer.java b/services/core/java/com/android/server/wm/WindowContainer.java
index 42c6ec2..0c0ce0e 100644
--- a/services/core/java/com/android/server/wm/WindowContainer.java
+++ b/services/core/java/com/android/server/wm/WindowContainer.java
@@ -100,6 +100,12 @@
/** Total number of elements in this subtree, including our own hierarchy element. */
private int mTreeWeight = 1;
+ /**
+ * Indicates whether we are animating and have committed the transaction to reparent our
+ * surface to the animation leash
+ */
+ private boolean mCommittedReparentToAnimationLeash;
+
WindowContainer(WindowManagerService service) {
mService = service;
mPendingTransaction = service.mTransactionFactory.make();
@@ -337,9 +343,9 @@
}
/** Returns true if this window container has the input child. */
- boolean hasChild(WindowContainer child) {
+ boolean hasChild(E child) {
for (int i = mChildren.size() - 1; i >= 0; --i) {
- final WindowContainer current = mChildren.get(i);
+ final E current = mChildren.get(i);
if (current == child || current.hasChild(child)) {
return true;
}
@@ -461,10 +467,22 @@
void onResize() {
for (int i = mChildren.size() - 1; i >= 0; --i) {
final WindowContainer wc = mChildren.get(i);
- wc.onResize();
+ wc.onParentResize();
}
}
+ void onParentResize() {
+ // In the case this container has specified its own bounds, a parent resize will not
+ // affect its bounds. Any relevant changes will be propagated through changes to the
+ // Configuration override.
+ if (hasOverrideBounds()) {
+ return;
+ }
+
+ // Default implementation is to treat as resize on self.
+ onResize();
+ }
+
void onMovedByResize() {
for (int i = mChildren.size() - 1; i >= 0; --i) {
final WindowContainer wc = mChildren.get(i);
@@ -1025,12 +1043,24 @@
*/
void prepareSurfaces() {
SurfaceControl.mergeToGlobalTransaction(getPendingTransaction());
+
+ // If a leash has been set when the transaction was committed, then the leash reparent has
+ // been committed.
+ mCommittedReparentToAnimationLeash = mSurfaceAnimator.hasLeash();
for (int i = 0; i < mChildren.size(); i++) {
mChildren.get(i).prepareSurfaces();
}
}
/**
+ * @return true if the reparent to animation leash transaction has been committed, false
+ * otherwise.
+ */
+ boolean hasCommittedReparentToAnimationLeash() {
+ return mCommittedReparentToAnimationLeash;
+ }
+
+ /**
* Trigger a call to prepareSurfaces from the animation thread, such that
* mPendingTransaction will be applied.
*/
@@ -1201,4 +1231,11 @@
outPos.offset(-parentBounds.left, -parentBounds.top);
}
}
+
+ Dimmer getDimmer() {
+ if (mParent == null) {
+ return null;
+ }
+ return mParent.getDimmer();
+ }
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index de1e7ec..066e4e6 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -24,6 +24,8 @@
import static android.app.ActivityManager.SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT;
import static android.app.AppOpsManager.OP_SYSTEM_ALERT_WINDOW;
import static android.app.StatusBarManager.DISABLE_MASK;
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
+import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
import static android.app.admin.DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED;
import static android.content.Intent.ACTION_USER_REMOVED;
import static android.content.Intent.EXTRA_USER_HANDLE;
@@ -123,6 +125,7 @@
import android.app.AppOpsManager;
import android.app.IActivityManager;
import android.app.IAssistDataReceiver;
+import android.app.WindowConfiguration;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
@@ -196,6 +199,7 @@
import android.view.IInputFilter;
import android.view.IOnKeyguardExitResult;
import android.view.IPinnedStackListener;
+import android.view.IRecentsAnimationRunner;
import android.view.IRotationWatcher;
import android.view.IWallpaperVisibilityListener;
import android.view.IWindow;
@@ -528,6 +532,7 @@
IInputMethodManager mInputMethodManager;
AccessibilityController mAccessibilityController;
+ private RecentsAnimationController mRecentsAnimationController;
Watermark mWatermark;
StrictModeFlash mStrictModeFlash;
@@ -902,9 +907,16 @@
public static WindowManagerService main(final Context context, final InputManagerService im,
final boolean haveInputMethods, final boolean showBootMsgs, final boolean onlyCore,
WindowManagerPolicy policy) {
+ return main(context, im, haveInputMethods, showBootMsgs, onlyCore, policy,
+ new SurfaceAnimationRunner());
+ }
+
+ public static WindowManagerService main(final Context context, final InputManagerService im,
+ final boolean haveInputMethods, final boolean showBootMsgs, final boolean onlyCore,
+ WindowManagerPolicy policy, SurfaceAnimationRunner surfaceAnimationRunner) {
DisplayThread.getHandler().runWithScissors(() ->
sInstance = new WindowManagerService(context, im, haveInputMethods, showBootMsgs,
- onlyCore, policy), 0);
+ onlyCore, policy, surfaceAnimationRunner), 0);
return sInstance;
}
@@ -927,7 +939,7 @@
private WindowManagerService(Context context, InputManagerService inputManager,
boolean haveInputMethods, boolean showBootMsgs, boolean onlyCore,
- WindowManagerPolicy policy) {
+ WindowManagerPolicy policy, SurfaceAnimationRunner surfaceAnimationRunner) {
installLock(this, INDEX_WINDOW);
mContext = context;
mHaveInputMethods = haveInputMethods;
@@ -1054,7 +1066,7 @@
PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.ON_AFTER_RELEASE, TAG_WM);
mHoldingScreenWakeLock.setReferenceCounted(false);
- mSurfaceAnimationRunner = new SurfaceAnimationRunner();
+ mSurfaceAnimationRunner = surfaceAnimationRunner;
mAllowTheaterModeWakeFromLayout = context.getResources().getBoolean(
com.android.internal.R.bool.config_allowTheaterModeWakeFromWindowLayout);
@@ -2670,6 +2682,39 @@
}
}
+ public void initializeRecentsAnimation(
+ IRecentsAnimationRunner recentsAnimationRunner,
+ RecentsAnimationController.RecentsAnimationCallbacks callbacks, int displayId) {
+ synchronized (mWindowMap) {
+ cancelRecentsAnimation();
+ mRecentsAnimationController = new RecentsAnimationController(this,
+ recentsAnimationRunner, callbacks, displayId);
+ }
+ }
+
+ public RecentsAnimationController getRecentsAnimationController() {
+ return mRecentsAnimationController;
+ }
+
+ public void cancelRecentsAnimation() {
+ synchronized (mWindowMap) {
+ if (mRecentsAnimationController != null) {
+ // This call will call through to cleanupAnimation() below after the animation is
+ // canceled
+ mRecentsAnimationController.cancelAnimation();
+ }
+ }
+ }
+
+ public void cleanupRecentsAnimation() {
+ synchronized (mWindowMap) {
+ if (mRecentsAnimationController != null) {
+ mRecentsAnimationController.cleanupAnimation();
+ mRecentsAnimationController = null;
+ }
+ }
+ }
+
public void setAppFullscreen(IBinder token, boolean toOpaque) {
synchronized (mWindowMap) {
final AppWindowToken atoken = mRoot.getAppWindowToken(token);
@@ -6327,6 +6372,10 @@
pw.print(" mSkipAppTransitionAnimation=");pw.println(mSkipAppTransitionAnimation);
pw.println(" mLayoutToAnim:");
mAppTransition.dump(pw, " ");
+ if (mRecentsAnimationController != null) {
+ pw.print(" mRecentsAnimationController="); pw.println(mRecentsAnimationController);
+ mRecentsAnimationController.dump(pw, " ");
+ }
}
}
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 477dd2b..55c982c 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -2138,18 +2138,6 @@
mInputWindowHandle.inputChannel = null;
}
- private Dimmer getDimmer() {
- Task task = getTask();
- if (task != null) {
- return task.getDimmer();
- }
- TaskStack taskStack = getStack();
- if (taskStack != null) {
- return taskStack.getDimmer();
- }
- return null;
- }
-
/** Returns true if the replacement window was removed. */
boolean removeReplacedWindowIfNeeded(WindowState replacement) {
if (mWillReplaceWindow && mReplacementWindow == replacement && replacement.hasDrawnLw()) {
@@ -4516,11 +4504,11 @@
private void applyDims(Dimmer dimmer) {
if (!mAnimatingExit && mAppDied) {
mIsDimming = true;
- getDimmer().dimAbove(getPendingTransaction(), this, DEFAULT_DIM_AMOUNT_DEAD_WINDOW);
+ dimmer.dimAbove(getPendingTransaction(), this, DEFAULT_DIM_AMOUNT_DEAD_WINDOW);
} else if ((mAttrs.flags & FLAG_DIM_BEHIND) != 0
- && !mAnimatingExit && isVisible()) {
+ && !mAnimatingExit && isVisible() && !mWinAnimator.mLastHidden) {
mIsDimming = true;
- getDimmer().dimBelow(getPendingTransaction(), this, mAttrs.dimAmount);
+ dimmer.dimBelow(getPendingTransaction(), this, mAttrs.dimAmount);
}
}
@@ -4531,7 +4519,6 @@
if (dimmer != null) {
applyDims(dimmer);
}
-
updateSurfacePosition(mPendingTransaction);
mWinAnimator.prepareSurfaceLocked(true);
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index ba5156b..1cfa956 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -238,15 +238,6 @@
return mWin.isAnimating();
}
- /**
- * Is this window currently waiting to run an opening animation?
- */
- boolean isWaitingForOpening() {
- return mService.mAppTransition.isTransitionSet()
- && (mWin.mAppToken != null && mWin.mAppToken.isHidden())
- && mService.mOpeningApps.contains(mWin.mAppToken);
- }
-
void cancelExitAnimationForNextAnimationLocked() {
if (DEBUG_ANIM) Slog.d(TAG,
"cancelExitAnimationForNextAnimationLocked: " + mWin);
@@ -1057,17 +1048,6 @@
return;
}
- // Do not change surface properties of opening apps if we are waiting for the
- // transition to be ready. transitionGoodToGo could be not ready even after all
- // opening apps are drawn. It's only waiting on isFetchingAppTransitionsSpecs()
- // to get the animation spec. (For example, go into Recents and immediately open
- // the same app again before the app's surface is destroyed or saved, the surface
- // is always ready in the whole process.) If we go ahead here, the opening app
- // will be shown with the full size before the correct animation spec arrives.
- if (isWaitingForOpening()) {
- return;
- }
-
boolean displayed = false;
computeShownFrameLocked();
diff --git a/services/core/jni/Android.bp b/services/core/jni/Android.bp
index 0bc58e0..7540e26 100644
--- a/services/core/jni/Android.bp
+++ b/services/core/jni/Android.bp
@@ -104,6 +104,8 @@
"libhwbinder",
"libutils",
"libhwui",
+ "libbpf",
+ "libnetdutils",
"android.hardware.audio.common@2.0",
"android.hardware.broadcastradio@1.0",
"android.hardware.broadcastradio@1.1",
diff --git a/services/core/jni/BroadcastRadio/BroadcastRadioService.cpp b/services/core/jni/BroadcastRadio/BroadcastRadioService.cpp
index 9892146..176ae81 100644
--- a/services/core/jni/BroadcastRadio/BroadcastRadioService.cpp
+++ b/services/core/jni/BroadcastRadio/BroadcastRadioService.cpp
@@ -249,6 +249,15 @@
Tuner::assignHalInterfaces(env, tuner, module.radioModule, halTuner);
ALOGD("Opened tuner %p", halTuner.get());
+
+ bool isConnected = true;
+ halTuner->getConfiguration([&](Result result, const BandConfig& config) {
+ if (result == Result::OK) isConnected = config.antennaConnected;
+ });
+ if (!isConnected) {
+ tunerCb->antennaStateChange(false);
+ }
+
return tuner.release();
}
diff --git a/services/core/jni/BroadcastRadio/Tuner.cpp b/services/core/jni/BroadcastRadio/Tuner.cpp
index 42eb873..42c1332 100644
--- a/services/core/jni/BroadcastRadio/Tuner.cpp
+++ b/services/core/jni/BroadcastRadio/Tuner.cpp
@@ -352,39 +352,6 @@
convert::ThrowIfFailed(env, halTuner->cancelAnnouncement());
}
-static jobject nativeGetProgramInformation(JNIEnv *env, jobject obj, jlong nativeContext) {
- ALOGV("%s", __func__);
- lock_guard<mutex> lk(gContextMutex);
- auto& ctx = getNativeContext(nativeContext);
-
- auto halTuner10 = getHalTuner(ctx);
- auto halTuner11 = ctx.mHalTuner11;
- if (halTuner10 == nullptr) return nullptr;
-
- JavaRef<jobject> jInfo;
- Result halResult;
- Return<void> hidlResult;
- if (halTuner11 != nullptr) {
- hidlResult = halTuner11->getProgramInformation_1_1([&](Result result,
- const V1_1::ProgramInfo& info) {
- halResult = result;
- if (result != Result::OK) return;
- jInfo = convert::ProgramInfoFromHal(env, info);
- });
- } else {
- hidlResult = halTuner10->getProgramInformation([&](Result result,
- const V1_0::ProgramInfo& info) {
- halResult = result;
- if (result != Result::OK) return;
- jInfo = convert::ProgramInfoFromHal(env, info, ctx.mBand);
- });
- }
-
- if (jInfo != nullptr) return jInfo.release();
- convert::ThrowIfFailed(env, hidlResult, halResult);
- return nullptr;
-}
-
static bool nativeStartBackgroundScan(JNIEnv *env, jobject obj, jlong nativeContext) {
ALOGV("%s", __func__);
auto halTuner = getHalTuner11(nativeContext);
@@ -541,21 +508,6 @@
return jResults.release();
}
-static bool nativeIsAntennaConnected(JNIEnv *env, jobject obj, jlong nativeContext) {
- ALOGV("%s", __func__);
- auto halTuner = getHalTuner(nativeContext);
- if (halTuner == nullptr) return false;
-
- bool isConnected = false;
- Result halResult;
- auto hidlResult = halTuner->getConfiguration([&](Result result, const BandConfig& config) {
- halResult = result;
- isConnected = config.antennaConnected;
- });
- convert::ThrowIfFailed(env, hidlResult, halResult);
- return isConnected;
-}
-
static const JNINativeMethod gTunerMethods[] = {
{ "nativeInit", "(IZI)J", (void*)nativeInit },
{ "nativeFinalize", "(J)V", (void*)nativeFinalize },
@@ -570,8 +522,6 @@
{ "nativeTune", "(JLandroid/hardware/radio/ProgramSelector;)V", (void*)nativeTune },
{ "nativeCancel", "(J)V", (void*)nativeCancel },
{ "nativeCancelAnnouncement", "(J)V", (void*)nativeCancelAnnouncement },
- { "nativeGetProgramInformation", "(J)Landroid/hardware/radio/RadioManager$ProgramInfo;",
- (void*)nativeGetProgramInformation },
{ "nativeStartBackgroundScan", "(J)Z", (void*)nativeStartBackgroundScan },
{ "nativeGetProgramList", "(JLjava/util/Map;)Ljava/util/List;",
(void*)nativeGetProgramList },
@@ -580,7 +530,6 @@
{ "nativeSetAnalogForced", "(JZ)V", (void*)nativeSetAnalogForced },
{ "nativeSetParameters", "(JLjava/util/Map;)Ljava/util/Map;", (void*)nativeSetParameters },
{ "nativeGetParameters", "(JLjava/util/List;)Ljava/util/Map;", (void*)nativeGetParameters },
- { "nativeIsAntennaConnected", "(J)Z", (void*)nativeIsAntennaConnected },
};
} // namespace Tuner
diff --git a/services/core/jni/BroadcastRadio/convert.cpp b/services/core/jni/BroadcastRadio/convert.cpp
index be1ad72..8c38e0a 100644
--- a/services/core/jni/BroadcastRadio/convert.cpp
+++ b/services/core/jni/BroadcastRadio/convert.cpp
@@ -49,6 +49,12 @@
using V1_1::ProgramSelector;
using V1_1::VendorKeyValue;
+// HAL 2.0 flags that have equivalent HAL 1.x fields
+enum class ProgramInfoFlagsExt {
+ TUNED = 1 << 4,
+ STEREO = 1 << 5,
+};
+
static JavaRef<jobject> BandDescriptorFromHal(JNIEnv *env, const RegionalBandConfig &config);
static JavaRef<jobject> BandDescriptorFromHal(JNIEnv *env, const V1_0::BandConfig &config, Region region);
@@ -614,9 +620,14 @@
auto jVendorInfo = info11 ? VendorInfoFromHal(env, info11->vendorInfo) : nullptr;
auto jSelector = ProgramSelectorFromHal(env, selector);
+ jint flags = info11 ? info11->flags : 0;
+ if (info10.tuned) flags |= static_cast<jint>(ProgramInfoFlagsExt::TUNED);
+ if (info10.stereo) flags |= static_cast<jint>(ProgramInfoFlagsExt::STEREO);
+ // info10.digital is dropped, because it has no equivalent in the new APIs
+
return make_javaref(env, env->NewObject(gjni.ProgramInfo.clazz, gjni.ProgramInfo.cstor,
- jSelector.get(), info10.tuned, info10.stereo, info10.digital, info10.signalStrength,
- jMetadata.get(), info11 ? info11->flags : 0, jVendorInfo.get()));
+ jSelector.get(), nullptr, nullptr, nullptr, flags, info10.signalStrength,
+ jMetadata.get(), jVendorInfo.get()));
}
JavaRef<jobject> ProgramInfoFromHal(JNIEnv *env, const V1_0::ProgramInfo &info, V1_0::Band band) {
@@ -705,9 +716,15 @@
auto programInfoClass = FindClassOrDie(env, "android/hardware/radio/RadioManager$ProgramInfo");
gjni.ProgramInfo.clazz = MakeGlobalRefOrDie(env, programInfoClass);
- gjni.ProgramInfo.cstor = GetMethodIDOrDie(env, programInfoClass, "<init>",
- "(Landroid/hardware/radio/ProgramSelector;ZZZILandroid/hardware/radio/RadioMetadata;I"
- "Ljava/util/Map;)V");
+ gjni.ProgramInfo.cstor = GetMethodIDOrDie(env, programInfoClass, "<init>", "("
+ "Landroid/hardware/radio/ProgramSelector;"
+ "Landroid/hardware/radio/ProgramSelector$Identifier;"
+ "Landroid/hardware/radio/ProgramSelector$Identifier;"
+ "Ljava/util/Collection;" // relatedContent
+ "II" // flags, signalQuality
+ "Landroid/hardware/radio/RadioMetadata;"
+ "Ljava/util/Map;" // vendorInfo
+ ")V");
auto programSelectorClass = FindClassOrDie(env, "android/hardware/radio/ProgramSelector");
gjni.ProgramSelector.clazz = MakeGlobalRefOrDie(env, programSelectorClass);
diff --git a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
index 67bad0f..8fd5be2 100644
--- a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
+++ b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
@@ -358,6 +358,7 @@
Return<void> gnssAcquireWakelockCb() override;
Return<void> gnssReleaseWakelockCb() override;
Return<void> gnssRequestTimeCb() override;
+ Return<void> gnssRequestLocationCb(const bool independentFromGnss) override;
Return<void> gnssSetSystemInfoCb(const IGnssCallback::GnssSystemInfo& info) override;
// New in 1.1
@@ -472,6 +473,11 @@
return Void();
}
+Return<void> GnssCallback::gnssRequestLocationCb(const bool independentFromGnss) {
+ // TODO(b/72405645): call into java implementation
+ return Void();
+}
+
Return<void> GnssCallback::gnssSetSystemInfoCb(const IGnssCallback::GnssSystemInfo& info) {
ALOGD("%s: yearOfHw=%d\n", __func__, info.yearOfHw);
diff --git a/services/core/jni/com_android_server_net_NetworkStatsService.cpp b/services/core/jni/com_android_server_net_NetworkStatsService.cpp
index 8de24e5..3302dea 100644
--- a/services/core/jni/com_android_server_net_NetworkStatsService.cpp
+++ b/services/core/jni/com_android_server_net_NetworkStatsService.cpp
@@ -29,6 +29,15 @@
#include <utils/misc.h>
#include <utils/Log.h>
+#include "android-base/unique_fd.h"
+#include "bpf/BpfNetworkStats.h"
+#include "bpf/BpfUtils.h"
+
+using android::bpf::Stats;
+using android::bpf::hasBpfSupport;
+using android::bpf::bpfGetUidStats;
+using android::bpf::bpfGetIfaceStats;
+
namespace android {
static const char* QTAGUID_IFACE_STATS = "/proc/net/xt_qtaguid/iface_stat_fmt";
@@ -46,15 +55,6 @@
TCP_TX_PACKETS = 5
};
-struct Stats {
- uint64_t rxBytes;
- uint64_t rxPackets;
- uint64_t txBytes;
- uint64_t txPackets;
- uint64_t tcpRxPackets;
- uint64_t tcpTxPackets;
-};
-
static uint64_t getStatsType(struct Stats* stats, StatsType type) {
switch (type) {
case RX_BYTES:
@@ -150,9 +150,18 @@
return 0;
}
-static jlong getTotalStat(JNIEnv* env, jclass clazz, jint type) {
+static jlong getTotalStat(JNIEnv* env, jclass clazz, jint type, jboolean useBpfStats) {
struct Stats stats;
memset(&stats, 0, sizeof(Stats));
+
+ if (useBpfStats) {
+ if (bpfGetIfaceStats(NULL, &stats) == 0) {
+ return getStatsType(&stats, (StatsType) type);
+ } else {
+ return UNKNOWN;
+ }
+ }
+
if (parseIfaceStats(NULL, &stats) == 0) {
return getStatsType(&stats, (StatsType) type);
} else {
@@ -160,7 +169,8 @@
}
}
-static jlong getIfaceStat(JNIEnv* env, jclass clazz, jstring iface, jint type) {
+static jlong getIfaceStat(JNIEnv* env, jclass clazz, jstring iface, jint type,
+ jboolean useBpfStats) {
ScopedUtfChars iface8(env, iface);
if (iface8.c_str() == NULL) {
return UNKNOWN;
@@ -168,6 +178,15 @@
struct Stats stats;
memset(&stats, 0, sizeof(Stats));
+
+ if (useBpfStats) {
+ if (bpfGetIfaceStats(iface8.c_str(), &stats) == 0) {
+ return getStatsType(&stats, (StatsType) type);
+ } else {
+ return UNKNOWN;
+ }
+ }
+
if (parseIfaceStats(iface8.c_str(), &stats) == 0) {
return getStatsType(&stats, (StatsType) type);
} else {
@@ -175,9 +194,18 @@
}
}
-static jlong getUidStat(JNIEnv* env, jclass clazz, jint uid, jint type) {
+static jlong getUidStat(JNIEnv* env, jclass clazz, jint uid, jint type, jboolean useBpfStats) {
struct Stats stats;
memset(&stats, 0, sizeof(Stats));
+
+ if (useBpfStats) {
+ if (bpfGetUidStats(uid, &stats) == 0) {
+ return getStatsType(&stats, (StatsType) type);
+ } else {
+ return UNKNOWN;
+ }
+ }
+
if (parseUidStats(uid, &stats) == 0) {
return getStatsType(&stats, (StatsType) type);
} else {
@@ -186,9 +214,9 @@
}
static const JNINativeMethod gMethods[] = {
- {"nativeGetTotalStat", "(I)J", (void*) getTotalStat},
- {"nativeGetIfaceStat", "(Ljava/lang/String;I)J", (void*) getIfaceStat},
- {"nativeGetUidStat", "(II)J", (void*) getUidStat},
+ {"nativeGetTotalStat", "(IZ)J", (void*) getTotalStat},
+ {"nativeGetIfaceStat", "(Ljava/lang/String;IZ)J", (void*) getIfaceStat},
+ {"nativeGetUidStat", "(IIZ)J", (void*) getUidStat},
};
int register_android_server_net_NetworkStatsService(JNIEnv* env) {
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/BaseIDevicePolicyManager.java b/services/devicepolicy/java/com/android/server/devicepolicy/BaseIDevicePolicyManager.java
index 4f2866b..d1cc5de 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/BaseIDevicePolicyManager.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/BaseIDevicePolicyManager.java
@@ -22,11 +22,13 @@
import android.os.UserHandle;
import android.security.keymaster.KeymasterCertificateChain;
import android.security.keystore.ParcelableKeyGenParameterSpec;
+import android.telephony.data.ApnSetting;
import com.android.internal.R;
import com.android.server.SystemService;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
@@ -68,6 +70,10 @@
public void transferOwnership(ComponentName admin, ComponentName target, PersistableBundle bundle) {}
+ public PersistableBundle getTransferOwnershipBundle() {
+ return null;
+ }
+
public boolean generateKeyPair(ComponentName who, String callerPackage, String algorithm,
ParcelableKeyGenParameterSpec keySpec, int idAttestationFlags,
KeymasterCertificateChain attestationChain) {
@@ -133,11 +139,6 @@
}
@Override
- public CharSequence getPrintingDisabledReason() {
- return null;
- }
-
- @Override
public List<String> setMeteredDataDisabled(ComponentName admin, List<String> packageNames) {
return packageNames;
}
@@ -146,4 +147,41 @@
public List<String> getMeteredDataDisabled(ComponentName admin) {
return new ArrayList<>();
}
+
+ @Override
+ public int addOverrideApn(ComponentName admin, ApnSetting apnSetting) {
+ return -1;
+ }
+
+ @Override
+ public boolean updateOverrideApn(ComponentName admin, int apnId, ApnSetting apnSetting) {
+ return false;
+ }
+
+ @Override
+ public boolean removeOverrideApn(ComponentName admin, int apnId) {
+ return false;
+ }
+
+ @Override
+ public List<ApnSetting> getOverrideApns(ComponentName admin) {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public void setOverrideApnsEnabled(ComponentName admin, boolean enabled) {}
+
+ @Override
+ public boolean isOverrideApnEnabled(ComponentName admin) {
+ return false;
+ }
+
+ public void clearSystemUpdatePolicyFreezePeriodRecord() {
+ }
+
+ @Override
+ public boolean isMeteredDataDisabledForUser(ComponentName admin,
+ String packageName, int userId) {
+ return false;
+ }
}
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 4d6989b..dae7605 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -20,7 +20,7 @@
import static android.Manifest.permission.MANAGE_CA_CERTIFICATES;
import static android.app.ActivityManager.LOCK_TASK_MODE_NONE;
import static android.app.ActivityManager.USER_OP_SUCCESS;
-import static android.app.admin.DeviceAdminReceiver.EXTRA_TRANSFER_OWNER_ADMIN_EXTRAS_BUNDLE;
+import static android.app.admin.DeviceAdminReceiver.EXTRA_TRANSFER_OWNERSHIP_ADMIN_EXTRAS_BUNDLE;
import static android.app.admin.DevicePolicyManager.ACTION_PROVISION_MANAGED_USER;
import static android.app.admin.DevicePolicyManager.CODE_ACCOUNTS_NOT_EMPTY;
import static android.app.admin.DevicePolicyManager.CODE_ADD_MANAGED_PROFILE_DISALLOWED;
@@ -58,8 +58,22 @@
import static android.app.admin.DevicePolicyManager.WIPE_EXTERNAL_STORAGE;
import static android.app.admin.DevicePolicyManager.WIPE_RESET_PROTECTION_DATA;
import static android.content.pm.PackageManager.MATCH_UNINSTALLED_PACKAGES;
+
+import static android.provider.Telephony.Carriers.DPC_URI;
+import static android.provider.Telephony.Carriers.ENFORCE_KEY;
+import static android.provider.Telephony.Carriers.ENFORCE_MANAGED_URI;
+
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent
+ .PROVISIONING_ENTRY_POINT_ADB;
+import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker
+ .STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW;
+
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.PROVISIONING_ENTRY_POINT_ADB;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW;
+
+import static com.android.server.devicepolicy.TransferOwnershipMetadataManager.ADMIN_TYPE_DEVICE_OWNER;
+import static com.android.server.devicepolicy.TransferOwnershipMetadataManager.ADMIN_TYPE_PROFILE_OWNER;
+
import static org.xmlpull.v1.XmlPullParser.END_DOCUMENT;
import static org.xmlpull.v1.XmlPullParser.END_TAG;
import static org.xmlpull.v1.XmlPullParser.TEXT;
@@ -99,6 +113,7 @@
import android.app.usage.UsageStatsManagerInternal;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
+import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
@@ -108,8 +123,8 @@
import android.content.pm.IPackageManager;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
-import android.content.pm.PackageManagerInternal;
import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.pm.PackageManagerInternal;
import android.content.pm.ParceledListSlice;
import android.content.pm.PermissionInfo;
import android.content.pm.ResolveInfo;
@@ -118,6 +133,7 @@
import android.content.pm.UserInfo;
import android.content.res.Resources;
import android.database.ContentObserver;
+import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.media.AudioManager;
@@ -161,16 +177,18 @@
import android.security.IKeyChainService;
import android.security.KeyChain;
import android.security.KeyChain.KeyChainConnection;
+import android.security.KeyStore;
import android.security.keymaster.KeymasterCertificateChain;
+import android.security.keystore.AttestationUtils;
import android.security.keystore.KeyGenParameterSpec;
import android.security.keystore.ParcelableKeyGenParameterSpec;
-import android.security.KeyStore;
-import android.security.keystore.AttestationUtils;
import android.service.persistentdata.PersistentDataBlockManager;
import android.telephony.TelephonyManager;
+import android.telephony.data.ApnSetting;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.ArraySet;
+import android.util.AtomicFile;
import android.util.Log;
import android.util.Pair;
import android.util.Slog;
@@ -217,10 +235,10 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
-import java.lang.IllegalStateException;
import java.lang.reflect.Constructor;
import java.nio.charset.StandardCharsets;
import java.text.DateFormat;
+import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -228,9 +246,10 @@
import java.util.Date;
import java.util.HashMap;
import java.util.List;
-import java.util.Map.Entry;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Objects;
+import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -247,6 +266,9 @@
private static final String DEVICE_POLICIES_XML = "device_policies.xml";
+ private static final String TRANSFER_OWNERSHIP_PARAMETERS_XML =
+ "transfer-ownership-parameters.xml";
+
private static final String TAG_ACCEPTED_CA_CERTIFICATES = "accepted-ca-certificate";
private static final String TAG_LOCK_TASK_COMPONENTS = "lock-task-component";
@@ -290,6 +312,8 @@
private static final String TAG_PRINTING_ENABLED = "printing-enabled";
+ private static final String TAG_TRANSFER_OWNERSHIP_BUNDLE = "transfer-ownership-bundle";
+
private static final int REQUEST_EXPIRE_PASSWORD = 5571;
private static final long MS_PER_DAY = TimeUnit.DAYS.toMillis(1);
@@ -451,6 +475,9 @@
private SetupContentObserver mSetupContentObserver;
+ @VisibleForTesting
+ final TransferOwnershipMetadataManager mTransferOwnershipMetadataManager;
+
private final Runnable mRemoteBugreportTimeoutRunnable = new Runnable() {
@Override
public void run() {
@@ -701,7 +728,14 @@
handlePackagesChanged(intent.getData().getSchemeSpecificPart(), userHandle);
} else if (Intent.ACTION_MANAGED_PROFILE_ADDED.equals(action)) {
clearWipeProfileNotification();
+ } else if (Intent.ACTION_DATE_CHANGED.equals(action)
+ || Intent.ACTION_TIME_CHANGED.equals(action)) {
+ // Update freeze period record when clock naturally progresses to the next day
+ // (ACTION_DATE_CHANGED), or when manual clock adjustment is made
+ // (ACTION_TIME_CHANGED)
+ updateSystemUpdateFreezePeriodsRecord(/* saveIfChanged */ true);
}
+
}
private void sendDeviceOwnerUserCommand(String action, int userHandle) {
@@ -710,7 +744,8 @@
if (deviceOwner != null) {
Bundle extras = new Bundle();
extras.putParcelable(Intent.EXTRA_USER, UserHandle.of(userHandle));
- sendAdminCommandLocked(deviceOwner, action, extras, null);
+ sendAdminCommandLocked(deviceOwner, action, extras, /* result */ null,
+ /* inForeground */ true);
}
}
}
@@ -2014,6 +2049,10 @@
void postOnSystemServerInitThreadPool(Runnable runnable) {
SystemServerInitThreadPool.get().submit(runnable, LOG_TAG);
}
+
+ public TransferOwnershipMetadataManager newTransferOwnershipMetadataManager() {
+ return new TransferOwnershipMetadataManager();
+ }
}
/**
@@ -2058,6 +2097,8 @@
mOverlayPackagesProvider = new OverlayPackagesProvider(mContext);
+ mTransferOwnershipMetadataManager = mInjector.newTransferOwnershipMetadataManager();
+
if (!mHasFeature) {
// Skip the rest of the initialization
return;
@@ -2083,6 +2124,8 @@
mContext.registerReceiverAsUser(mReceiver, UserHandle.ALL, filter, null, mHandler);
filter = new IntentFilter();
filter.addAction(Intent.ACTION_MANAGED_PROFILE_ADDED);
+ filter.addAction(Intent.ACTION_TIME_CHANGED);
+ filter.addAction(Intent.ACTION_DATE_CHANGED);
mContext.registerReceiverAsUser(mReceiver, UserHandle.ALL, filter, null, mHandler);
LocalServices.addService(DevicePolicyManagerInternal.class, mLocalService);
@@ -3271,6 +3314,7 @@
cleanUpOldUsers();
maybeSetDefaultProfileOwnerUserRestrictions();
handleStartUser(UserHandle.USER_SYSTEM);
+ maybeLogStart();
// Register an observer for watching for user setup complete and settings changes.
mSetupContentObserver.register();
@@ -3299,9 +3343,43 @@
activityManagerInternal.setSwitchingToSystemUserMessage(
deviceOwner.endUserSessionMessage);
}
+
+ revertTransferOwnershipIfNecessaryLocked();
}
}
+ private void revertTransferOwnershipIfNecessaryLocked() {
+ if (!mTransferOwnershipMetadataManager.metadataFileExists()) {
+ return;
+ }
+ Slog.e(LOG_TAG, "Owner transfer metadata file exists! Reverting transfer.");
+ final TransferOwnershipMetadataManager.Metadata metadata =
+ mTransferOwnershipMetadataManager.loadMetadataFile();
+ // Revert transfer
+ if (metadata.adminType.equals(ADMIN_TYPE_PROFILE_OWNER)) {
+ transferProfileOwnershipLocked(metadata.targetComponent, metadata.sourceComponent,
+ metadata.userId);
+ deleteTransferOwnershipMetadataFileLocked();
+ deleteTransferOwnershipBundleLocked(metadata.userId);
+ } else if (metadata.adminType.equals(ADMIN_TYPE_DEVICE_OWNER)) {
+ transferDeviceOwnershipLocked(metadata.targetComponent, metadata.sourceComponent,
+ metadata.userId);
+ deleteTransferOwnershipMetadataFileLocked();
+ deleteTransferOwnershipBundleLocked(metadata.userId);
+ }
+ updateSystemUpdateFreezePeriodsRecord(/* saveIfChanged */ true);
+ }
+
+ private void maybeLogStart() {
+ if (!SecurityLog.isLoggingEnabled()) {
+ return;
+ }
+ final String verifiedBootState =
+ mInjector.systemPropertiesGet("ro.boot.verifiedbootstate");
+ final String verityMode = mInjector.systemPropertiesGet("ro.boot.veritymode");
+ SecurityLog.writeEvent(SecurityLog.TAG_OS_STARTUP, verifiedBootState, verityMode);
+ }
+
private void ensureDeviceOwnerUserStarted() {
final int userId;
synchronized (this) {
@@ -3559,6 +3637,11 @@
private void transferActiveAdminUncheckedLocked(ComponentName incomingReceiver,
ComponentName outgoingReceiver, int userHandle) {
final DevicePolicyData policy = getUserData(userHandle);
+ if (!policy.mAdminMap.containsKey(outgoingReceiver)
+ && policy.mAdminMap.containsKey(incomingReceiver)) {
+ // Nothing to transfer - the incoming receiver is already the active admin.
+ return;
+ }
final DeviceAdminInfo incomingDeviceInfo = findAdmin(incomingReceiver, userHandle,
/* throwForMissingPermission= */ true);
final ActiveAdmin adminToTransfer = policy.mAdminMap.get(outgoingReceiver);
@@ -3572,7 +3655,6 @@
}
saveSettingsLocked(userHandle);
- //TODO: Make sure we revert back when we detect a failure.
sendAdminCommandLocked(adminToTransfer, DeviceAdminReceiver.ACTION_DEVICE_ADMIN_ENABLED,
null, null);
}
@@ -3804,14 +3886,17 @@
Preconditions.checkNotNull(who, "ComponentName is null");
validateQualityConstant(quality);
+ final int userId = mInjector.userHandleGetCallingUserId();
synchronized (this) {
ActiveAdmin ap = getActiveAdminForCallerLocked(
who, DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD, parent);
- if (ap.minimumPasswordMetrics.quality != quality) {
- ap.minimumPasswordMetrics.quality = quality;
- updatePasswordValidityCheckpointLocked(mInjector.userHandleGetCallingUserId());
- saveSettingsLocked(mInjector.userHandleGetCallingUserId());
+ final PasswordMetrics metrics = ap.minimumPasswordMetrics;
+ if (metrics.quality != quality) {
+ metrics.quality = quality;
+ updatePasswordValidityCheckpointLocked(userId);
+ saveSettingsLocked(userId);
}
+ maybeLogPasswordComplexitySet(who, userId, parent, metrics);
}
}
@@ -3904,14 +3989,17 @@
return;
}
Preconditions.checkNotNull(who, "ComponentName is null");
+ final int userId = mInjector.userHandleGetCallingUserId();
synchronized (this) {
ActiveAdmin ap = getActiveAdminForCallerLocked(
who, DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD, parent);
- if (ap.minimumPasswordMetrics.length != length) {
- ap.minimumPasswordMetrics.length = length;
- updatePasswordValidityCheckpointLocked(mInjector.userHandleGetCallingUserId());
- saveSettingsLocked(mInjector.userHandleGetCallingUserId());
+ final PasswordMetrics metrics = ap.minimumPasswordMetrics;
+ if (metrics.length != length) {
+ metrics.length = length;
+ updatePasswordValidityCheckpointLocked(userId);
+ saveSettingsLocked(userId);
}
+ maybeLogPasswordComplexitySet(who, userId, parent, metrics);
}
}
@@ -3927,15 +4015,21 @@
return;
}
Preconditions.checkNotNull(who, "ComponentName is null");
+ final int userId = mInjector.userHandleGetCallingUserId();
synchronized (this) {
ActiveAdmin ap = getActiveAdminForCallerLocked(
who, DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD, parent);
if (ap.passwordHistoryLength != length) {
ap.passwordHistoryLength = length;
- updatePasswordValidityCheckpointLocked(mInjector.userHandleGetCallingUserId());
- saveSettingsLocked(mInjector.userHandleGetCallingUserId());
+ updatePasswordValidityCheckpointLocked(userId);
+ saveSettingsLocked(userId);
}
}
+ if (SecurityLog.isLoggingEnabled()) {
+ final int affectedUserId = parent ? getProfileParentId(userId) : userId;
+ SecurityLog.writeEvent(SecurityLog.TAG_PASSWORD_HISTORY_LENGTH_SET,
+ who.getPackageName(), userId, affectedUserId, length);
+ }
}
@Override
@@ -3969,6 +4063,11 @@
// in case this is the first one, set the alarm on the appropriate user.
setExpirationAlarmCheckLocked(mContext, userHandle, parent);
}
+ if (SecurityLog.isLoggingEnabled()) {
+ final int affectedUserId = parent ? getProfileParentId(userHandle) : userHandle;
+ SecurityLog.writeEvent(SecurityLog.TAG_PASSWORD_EXPIRATION_SET, who.getPackageName(),
+ userHandle, affectedUserId, timeout);
+ }
}
/**
@@ -4117,14 +4216,17 @@
return;
}
Preconditions.checkNotNull(who, "ComponentName is null");
+ final int userId = mInjector.userHandleGetCallingUserId();
synchronized (this) {
- ActiveAdmin ap = getActiveAdminForCallerLocked(
+ final ActiveAdmin ap = getActiveAdminForCallerLocked(
who, DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD, parent);
- if (ap.minimumPasswordMetrics.upperCase != length) {
- ap.minimumPasswordMetrics.upperCase = length;
- updatePasswordValidityCheckpointLocked(mInjector.userHandleGetCallingUserId());
- saveSettingsLocked(mInjector.userHandleGetCallingUserId());
+ final PasswordMetrics metrics = ap.minimumPasswordMetrics;
+ if (metrics.upperCase != length) {
+ metrics.upperCase = length;
+ updatePasswordValidityCheckpointLocked(userId);
+ saveSettingsLocked(userId);
}
+ maybeLogPasswordComplexitySet(who, userId, parent, metrics);
}
}
@@ -4137,14 +4239,17 @@
@Override
public void setPasswordMinimumLowerCase(ComponentName who, int length, boolean parent) {
Preconditions.checkNotNull(who, "ComponentName is null");
+ final int userId = mInjector.userHandleGetCallingUserId();
synchronized (this) {
ActiveAdmin ap = getActiveAdminForCallerLocked(
who, DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD, parent);
- if (ap.minimumPasswordMetrics.lowerCase != length) {
- ap.minimumPasswordMetrics.lowerCase = length;
- updatePasswordValidityCheckpointLocked(mInjector.userHandleGetCallingUserId());
- saveSettingsLocked(mInjector.userHandleGetCallingUserId());
+ final PasswordMetrics metrics = ap.minimumPasswordMetrics;
+ if (metrics.lowerCase != length) {
+ metrics.lowerCase = length;
+ updatePasswordValidityCheckpointLocked(userId);
+ saveSettingsLocked(userId);
}
+ maybeLogPasswordComplexitySet(who, userId, parent, metrics);
}
}
@@ -4160,14 +4265,17 @@
return;
}
Preconditions.checkNotNull(who, "ComponentName is null");
+ final int userId = mInjector.userHandleGetCallingUserId();
synchronized (this) {
ActiveAdmin ap = getActiveAdminForCallerLocked(
who, DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD, parent);
- if (ap.minimumPasswordMetrics.letters != length) {
- ap.minimumPasswordMetrics.letters = length;
- updatePasswordValidityCheckpointLocked(mInjector.userHandleGetCallingUserId());
- saveSettingsLocked(mInjector.userHandleGetCallingUserId());
+ final PasswordMetrics metrics = ap.minimumPasswordMetrics;
+ if (metrics.letters != length) {
+ metrics.letters = length;
+ updatePasswordValidityCheckpointLocked(userId);
+ saveSettingsLocked(userId);
}
+ maybeLogPasswordComplexitySet(who, userId, parent, metrics);
}
}
@@ -4183,14 +4291,17 @@
return;
}
Preconditions.checkNotNull(who, "ComponentName is null");
+ final int userId = mInjector.userHandleGetCallingUserId();
synchronized (this) {
ActiveAdmin ap = getActiveAdminForCallerLocked(
who, DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD, parent);
- if (ap.minimumPasswordMetrics.numeric != length) {
- ap.minimumPasswordMetrics.numeric = length;
- updatePasswordValidityCheckpointLocked(mInjector.userHandleGetCallingUserId());
- saveSettingsLocked(mInjector.userHandleGetCallingUserId());
+ final PasswordMetrics metrics = ap.minimumPasswordMetrics;
+ if (metrics.numeric != length) {
+ metrics.numeric = length;
+ updatePasswordValidityCheckpointLocked(userId);
+ saveSettingsLocked(userId);
}
+ maybeLogPasswordComplexitySet(who, userId, parent, metrics);
}
}
@@ -4198,7 +4309,7 @@
public int getPasswordMinimumNumeric(ComponentName who, int userHandle, boolean parent) {
return getStrictestPasswordRequirement(who, userHandle, parent,
admin -> admin.minimumPasswordMetrics.numeric, PASSWORD_QUALITY_COMPLEX);
- }
+ }
@Override
public void setPasswordMinimumSymbols(ComponentName who, int length, boolean parent) {
@@ -4206,14 +4317,17 @@
return;
}
Preconditions.checkNotNull(who, "ComponentName is null");
+ final int userId = mInjector.userHandleGetCallingUserId();
synchronized (this) {
ActiveAdmin ap = getActiveAdminForCallerLocked(
who, DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD, parent);
- if (ap.minimumPasswordMetrics.symbols != length) {
+ final PasswordMetrics metrics = ap.minimumPasswordMetrics;
+ if (metrics.symbols != length) {
ap.minimumPasswordMetrics.symbols = length;
- updatePasswordValidityCheckpointLocked(mInjector.userHandleGetCallingUserId());
- saveSettingsLocked(mInjector.userHandleGetCallingUserId());
+ updatePasswordValidityCheckpointLocked(userId);
+ saveSettingsLocked(userId);
}
+ maybeLogPasswordComplexitySet(who, userId, parent, metrics);
}
}
@@ -4229,14 +4343,17 @@
return;
}
Preconditions.checkNotNull(who, "ComponentName is null");
+ final int userId = mInjector.userHandleGetCallingUserId();
synchronized (this) {
ActiveAdmin ap = getActiveAdminForCallerLocked(
who, DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD, parent);
- if (ap.minimumPasswordMetrics.nonLetter != length) {
+ final PasswordMetrics metrics = ap.minimumPasswordMetrics;
+ if (metrics.nonLetter != length) {
ap.minimumPasswordMetrics.nonLetter = length;
- updatePasswordValidityCheckpointLocked(mInjector.userHandleGetCallingUserId());
- saveSettingsLocked(mInjector.userHandleGetCallingUserId());
+ updatePasswordValidityCheckpointLocked(userId);
+ saveSettingsLocked(userId);
}
+ maybeLogPasswordComplexitySet(who, userId, parent, metrics);
}
}
@@ -4523,6 +4640,7 @@
return;
}
Preconditions.checkNotNull(who, "ComponentName is null");
+ final int userId = mInjector.userHandleGetCallingUserId();
synchronized (this) {
// This API can only be called by an active device admin,
// so try to retrieve it to check that the caller is one.
@@ -4532,9 +4650,14 @@
who, DeviceAdminInfo.USES_POLICY_WATCH_LOGIN, parent);
if (ap.maximumFailedPasswordsForWipe != num) {
ap.maximumFailedPasswordsForWipe = num;
- saveSettingsLocked(mInjector.userHandleGetCallingUserId());
+ saveSettingsLocked(userId);
}
}
+ if (SecurityLog.isLoggingEnabled()) {
+ final int affectedUserId = parent ? getProfileParentId(userId) : userId;
+ SecurityLog.writeEvent(SecurityLog.TAG_MAX_PASSWORD_ATTEMPTS_SET, who.getPackageName(),
+ userId, affectedUserId, num);
+ }
}
@Override
@@ -4632,7 +4755,6 @@
return false;
}
}
-
@Override
public boolean resetPassword(String passwordOrNull, int flags) throws RemoteException {
final int callingUid = mInjector.binderGetCallingUid();
@@ -4888,6 +5010,11 @@
updateMaximumTimeToLockLocked(userHandle);
}
}
+ if (SecurityLog.isLoggingEnabled()) {
+ final int affectedUserId = parent ? getProfileParentId(userHandle) : userHandle;
+ SecurityLog.writeEvent(SecurityLog.TAG_MAX_SCREEN_LOCK_TIMEOUT_SET,
+ who.getPackageName(), userHandle, affectedUserId, timeMs);
+ }
}
private void updateMaximumTimeToLockLocked(@UserIdInt int userId) {
@@ -5057,11 +5184,12 @@
final long ident = mInjector.binderClearCallingIdentity();
try {
+ final ComponentName adminComponent = admin.info.getComponent();
// Evict key
if ((flags & DevicePolicyManager.FLAG_EVICT_CREDENTIAL_ENCRYPTION_KEY) != 0) {
enforceManagedProfile(
callingUserId, "set FLAG_EVICT_CREDENTIAL_ENCRYPTION_KEY");
- if (!isProfileOwner(admin.info.getComponent(), callingUserId)) {
+ if (!isProfileOwner(adminComponent, callingUserId)) {
throw new SecurityException("Only profile owner admins can set "
+ "FLAG_EVICT_CREDENTIAL_ENCRYPTION_KEY");
}
@@ -5091,6 +5219,13 @@
} else {
mInjector.getTrustManager().setDeviceLockedForUser(userToLock, true);
}
+
+ if (SecurityLog.isLoggingEnabled()) {
+ final int affectedUserId =
+ parent ? getProfileParentId(callingUserId) : callingUserId;
+ SecurityLog.writeEvent(SecurityLog.TAG_REMOTE_LOCK,
+ adminComponent.getPackageName(), callingUserId, affectedUserId);
+ }
} catch (RemoteException e) {
} finally {
mInjector.binderRestoreCallingIdentity(ident);
@@ -6121,8 +6256,7 @@
if (mInjector.securityLogIsLoggingEnabled()) {
SecurityLog.writeEvent(SecurityLog.TAG_KEYGUARD_DISMISS_AUTH_ATTEMPT,
- /*result*/ 0,
- /*method strength*/ 1);
+ /*result*/ 0, /*method strength*/ 1);
}
}
@@ -6969,6 +7103,11 @@
saveSettingsLocked(userHandle);
}
}
+ if (SecurityLog.isLoggingEnabled()) {
+ final int affectedUserId = parent ? getProfileParentId(userHandle) : userHandle;
+ SecurityLog.writeEvent(SecurityLog.TAG_KEYGUARD_DISABLED_FEATURES_SET,
+ who.getPackageName(), userHandle, affectedUserId, which);
+ }
}
/**
@@ -7283,6 +7422,15 @@
}
}
+ private void clearOverrideApnUnchecked() {
+ // Disable Override APNs and remove them from database.
+ setOverrideApnsEnabledUnchecked(false);
+ final List<ApnSetting> apns = getOverrideApnsUnchecked();
+ for (int i = 0; i < apns.size(); i ++) {
+ removeOverrideApnUnchecked(apns.get(i).getId());
+ }
+ }
+
private void clearDeviceOwnerLocked(ActiveAdmin admin, int userId) {
mDeviceAdminServiceController.stopServiceForOwner(userId, "clear-device-owner");
@@ -7303,6 +7451,7 @@
systemPolicyData.mLastNetworkLogsRetrievalTime = -1;
saveSettingsLocked(UserHandle.USER_SYSTEM);
clearUserPoliciesLocked(userId);
+ clearOverrideApnUnchecked();
mOwners.clearDeviceOwner();
mOwners.writeDeviceOwner();
@@ -7312,6 +7461,7 @@
mInjector.securityLogSetLoggingEnabledProperty(false);
mSecurityLogMonitor.stop();
setNetworkLoggingActiveInternal(false);
+ deleteTransferOwnershipBundleLocked(userId);
try {
if (mInjector.getIBackupManager() != null) {
@@ -7414,6 +7564,7 @@
clearUserPoliciesLocked(userId);
mOwners.removeProfileOwner(userId);
mOwners.writeProfileOwner(userId);
+ deleteTransferOwnershipBundleLocked(userId);
}
@Override
@@ -7883,6 +8034,37 @@
enforceSystemUserOrPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL);
}
+ private boolean canUserUseLockTaskLocked(int userId) {
+ if (isUserAffiliatedWithDeviceLocked(userId)) {
+ return true;
+ }
+
+ // Unaffiliated profile owners are not allowed to use lock when there is a device owner.
+ if (mOwners.hasDeviceOwner()) {
+ return false;
+ }
+
+ final ComponentName profileOwner = getProfileOwner(userId);
+ if (profileOwner == null) {
+ return false;
+ }
+
+ // Managed profiles are not allowed to use lock task
+ if (isManagedProfile(userId)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ private void enforceCanCallLockTaskLocked(ComponentName who) {
+ getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+ final int userId = mInjector.userHandleGetCallingUserId();
+ if (!canUserUseLockTaskLocked(userId)) {
+ throw new SecurityException("User " + userId + " is not allowed to use lock task");
+ }
+ }
+
private void ensureCallerPackage(@Nullable String packageName) {
if (packageName == null) {
Preconditions.checkState(isCallerWithSystemUid(),
@@ -9073,6 +9255,12 @@
}
saveUserRestrictionsLocked(userHandle);
}
+ if (SecurityLog.isLoggingEnabled()) {
+ final int eventTag = enabledFromThisOwner
+ ? SecurityLog.TAG_USER_RESTRICTION_ADDED
+ : SecurityLog.TAG_USER_RESTRICTION_REMOVED;
+ SecurityLog.writeEvent(eventTag, who.getPackageName(), userHandle, key);
+ }
}
private void saveUserRestrictionsLocked(int userId) {
@@ -9589,14 +9777,9 @@
Preconditions.checkNotNull(packages, "packages is null");
synchronized (this) {
- getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+ enforceCanCallLockTaskLocked(who);
final int userHandle = mInjector.userHandleGetCallingUserId();
- if (isUserAffiliatedWithDeviceLocked(userHandle)) {
- setLockTaskPackagesLocked(userHandle, new ArrayList<>(Arrays.asList(packages)));
- } else {
- throw new SecurityException("Admin " + who +
- " is neither the device owner or affiliated user's profile owner.");
- }
+ setLockTaskPackagesLocked(userHandle, new ArrayList<>(Arrays.asList(packages)));
}
}
@@ -9615,12 +9798,7 @@
final int userHandle = mInjector.binderGetCallingUserHandle().getIdentifier();
synchronized (this) {
- getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
- if (!isUserAffiliatedWithDeviceLocked(userHandle)) {
- throw new SecurityException("Admin " + who +
- " is neither the device owner or affiliated user's profile owner.");
- }
-
+ enforceCanCallLockTaskLocked(who);
final List<String> packages = getUserData(userHandle).mLockTaskPackages;
return packages.toArray(new String[packages.size()]);
}
@@ -9639,11 +9817,7 @@
Preconditions.checkNotNull(who, "ComponentName is null");
final int userHandle = mInjector.userHandleGetCallingUserId();
synchronized (this) {
- getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
- if (!isUserAffiliatedWithDeviceLocked(userHandle)) {
- throw new SecurityException("Admin " + who +
- " is neither the device owner or affiliated user's profile owner.");
- }
+ enforceCanCallLockTaskLocked(who);
setLockTaskFeaturesLocked(userHandle, flags);
}
}
@@ -9660,11 +9834,7 @@
Preconditions.checkNotNull(who, "ComponentName is null");
final int userHandle = mInjector.userHandleGetCallingUserId();
synchronized (this) {
- getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
- if (!isUserAffiliatedWithDeviceLocked(userHandle)) {
- throw new SecurityException("Admin " + who +
- " is neither the device owner or affiliated user's profile owner.");
- }
+ enforceCanCallLockTaskLocked(who);
return getUserData(userHandle).mLockTaskFeatures;
}
}
@@ -9675,7 +9845,7 @@
final List<UserInfo> userInfos = mUserManager.getUsers(/*excludeDying=*/ true);
for (int i = userInfos.size() - 1; i >= 0; i--) {
int userId = userInfos.get(i).id;
- if (isUserAffiliatedWithDeviceLocked(userId)) {
+ if (canUserUseLockTaskLocked(userId)) {
continue;
}
@@ -10232,6 +10402,45 @@
public boolean canUserHaveUntrustedCredentialReset(@UserIdInt int userId) {
return DevicePolicyManagerService.this.canUserHaveUntrustedCredentialReset(userId);
}
+
+ @Override
+ public CharSequence getPrintingDisabledReasonForUser(@UserIdInt int userId) {
+ synchronized (DevicePolicyManagerService.this) {
+ DevicePolicyData policy = getUserData(userId);
+ if (policy.mPrintingEnabled) {
+ Log.e(LOG_TAG, "printing is enabled");
+ return null;
+ }
+ String ownerPackage = mOwners.getProfileOwnerPackage(userId);
+ if (ownerPackage == null) {
+ ownerPackage = mOwners.getDeviceOwnerPackageName();
+ }
+ PackageManager pm = mInjector.getPackageManager();
+ PackageInfo packageInfo;
+ try {
+ packageInfo = pm.getPackageInfo(ownerPackage, 0);
+ } catch (NameNotFoundException e) {
+ Log.e(LOG_TAG, "getPackageInfo error", e);
+ return null;
+ }
+ if (packageInfo == null) {
+ Log.e(LOG_TAG, "packageInfo is inexplicably null");
+ return null;
+ }
+ ApplicationInfo appInfo = packageInfo.applicationInfo;
+ if (appInfo == null) {
+ Log.e(LOG_TAG, "appInfo is inexplicably null");
+ return null;
+ }
+ CharSequence appLabel = pm.getApplicationLabel(appInfo);
+ if (appLabel == null) {
+ Log.e(LOG_TAG, "appLabel is inexplicably null");
+ return null;
+ }
+ return ((Context) ActivityThread.currentActivityThread().getSystemUiContext())
+ .getResources().getString(R.string.printing_disabled_by, appLabel);
+ }
+ }
}
private Intent createShowAdminSupportIntent(ComponentName admin, int userId) {
@@ -10301,8 +10510,15 @@
@Override
public void setSystemUpdatePolicy(ComponentName who, SystemUpdatePolicy policy) {
- if (policy != null && !policy.isValid()) {
- throw new IllegalArgumentException("Invalid system update policy.");
+ if (policy != null) {
+ // throws exception if policy type is invalid
+ policy.validateType();
+ // throws exception if freeze period is invalid
+ policy.validateFreezePeriods();
+ Pair<LocalDate, LocalDate> record = mOwners.getSystemUpdateFreezePeriodRecord();
+ // throws exception if freeze period is incompatible with previous freeze period record
+ policy.validateAgainstPreviousFreezePeriod(record.first, record.second,
+ LocalDate.now());
}
synchronized (this) {
getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
@@ -10310,6 +10526,7 @@
mOwners.clearSystemUpdatePolicy();
} else {
mOwners.setSystemUpdatePolicy(policy);
+ updateSystemUpdateFreezePeriodsRecord(/* saveIfChanged */ false);
}
mOwners.writeDeviceOwner();
}
@@ -10330,6 +10547,83 @@
}
}
+ private static boolean withinRange(Pair<LocalDate, LocalDate> range, LocalDate date) {
+ return (!date.isBefore(range.first) && !date.isAfter(range.second));
+ }
+
+ /**
+ * keeps track of the last continuous period when the system is under OTA freeze.
+ *
+ * DPMS keeps track of the previous dates during which OTA was freezed as a result of an
+ * system update policy with freeze periods in effect. This is needed to make robust
+ * validation on new system update polices, for example to prevent the OTA from being
+ * frozen for more than 90 days if the DPC keeps resetting a new 24-hour freeze period
+ * on midnight everyday, or having freeze periods closer than 60 days apart by DPC resetting
+ * a new freeze period after a few days.
+ *
+ * @param saveIfChanged whether to persist the result on disk if freeze period record is
+ * updated. This should only be set to {@code false} if there is a guaranteed
+ * mOwners.writeDeviceOwner() later in the control flow to reduce the number of
+ * disk writes. Otherwise you risk inconsistent on-disk state.
+ *
+ * @see SystemUpdatePolicy#validateAgainstPreviousFreezePeriod
+ */
+ private void updateSystemUpdateFreezePeriodsRecord(boolean saveIfChanged) {
+ Slog.d(LOG_TAG, "updateSystemUpdateFreezePeriodsRecord");
+ synchronized (this) {
+ final SystemUpdatePolicy policy = mOwners.getSystemUpdatePolicy();
+ if (policy == null) {
+ return;
+ }
+ final LocalDate now = LocalDate.now();
+ final Pair<LocalDate, LocalDate> currentPeriod = policy.getCurrentFreezePeriod(now);
+ if (currentPeriod == null) {
+ return;
+ }
+ final Pair<LocalDate, LocalDate> record = mOwners.getSystemUpdateFreezePeriodRecord();
+ final LocalDate start = record.first;
+ final LocalDate end = record.second;
+ final boolean changed;
+ if (end == null || start == null) {
+ // Start a new period if there is none at the moment
+ changed = mOwners.setSystemUpdateFreezePeriodRecord(now, now);
+ } else if (now.equals(end.plusDays(1))) {
+ // Extend the existing period
+ changed = mOwners.setSystemUpdateFreezePeriodRecord(start, now);
+ } else if (now.isAfter(end.plusDays(1))) {
+ if (withinRange(currentPeriod, start) && withinRange(currentPeriod, end)) {
+ // The device might be off for some period. If the past freeze record
+ // is within range of the current freeze period, assume the device was off
+ // during the period [end, now] and extend the freeze record to [start, now].
+ changed = mOwners.setSystemUpdateFreezePeriodRecord(start, now);
+ } else {
+ changed = mOwners.setSystemUpdateFreezePeriodRecord(now, now);
+ }
+ } else if (now.isBefore(start)) {
+ // Systm clock was adjusted backwards, restart record
+ changed = mOwners.setSystemUpdateFreezePeriodRecord(now, now);
+ } else /* start <= now <= end */ {
+ changed = false;
+ }
+ if (changed && saveIfChanged) {
+ mOwners.writeDeviceOwner();
+ }
+ }
+ }
+
+ @Override
+ public void clearSystemUpdatePolicyFreezePeriodRecord() {
+ enforceShell("clearSystemUpdatePolicyFreezePeriodRecord");
+ synchronized (this) {
+ // Print out current record to help diagnosed CTS failures
+ Slog.i(LOG_TAG, "Clear freeze period record: "
+ + mOwners.getSystemUpdateFreezePeriodRecordAsString());
+ if (mOwners.setSystemUpdateFreezePeriodRecord(null, null)) {
+ mOwners.writeDeviceOwner();
+ }
+ }
+ }
+
/**
* Checks if the caller of the method is the device owner app.
*
@@ -11116,6 +11410,27 @@
}
}
+ @Override
+ public boolean isMeteredDataDisabledForUser(ComponentName who,
+ String packageName, int userId) {
+ Preconditions.checkNotNull(who);
+
+ if (!mHasFeature) {
+ return false;
+ }
+ if (!isCallerWithSystemUid()) {
+ throw new SecurityException(
+ "Only the system can query restricted pkgs for a specific user");
+ }
+ synchronized (this) {
+ final ActiveAdmin admin = getActiveAdminUncheckedLocked(who, userId);
+ if (admin != null && admin.meteredDisabledPackages != null) {
+ return admin.meteredDisabledPackages.contains(packageName);
+ }
+ }
+ return false;
+ }
+
private void pushMeteredDisabledPackagesLocked(int userId) {
mInjector.getNetworkPolicyManagerInternal().setMeteredRestrictedPackages(
getMeteredDisabledPackagesLocked(userId), userId);
@@ -11213,10 +11528,12 @@
// of a split user device.
return true;
}
+
final ComponentName profileOwner = getProfileOwner(userId);
if (profileOwner == null) {
return false;
}
+
final Set<String> userAffiliationIds = getUserData(userId).mAffiliationIds;
final Set<String> deviceAffiliationIds =
getUserData(UserHandle.USER_SYSTEM).mAffiliationIds;
@@ -12178,9 +12495,11 @@
}
@Override
- public boolean clearApplicationUserData(ComponentName admin, String packageName,
+ public void clearApplicationUserData(ComponentName admin, String packageName,
IPackageDataObserver callback) {
Preconditions.checkNotNull(admin, "ComponentName is null");
+ Preconditions.checkNotNull(packageName, "packageName is null");
+ Preconditions.checkNotNull(callback, "callback is null");
synchronized (this) {
getActiveAdminForCallerLocked(admin, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
}
@@ -12188,29 +12507,24 @@
long ident = mInjector.binderClearCallingIdentity();
try {
- return ActivityManager.getService().clearApplicationUserData(packageName, false,
- callback, userId);
+ ActivityManager.getService().clearApplicationUserData(packageName, false, callback,
+ userId);
} catch(RemoteException re) {
// Same process, should not happen.
} catch (SecurityException se) {
// This can happen e.g. for device admin packages, do not throw out the exception,
// because callers have no means to know beforehand for which packages this might
- // happen.
+ // happen. If so, we send back that removal failed.
Slog.w(LOG_TAG, "Not allowed to clear application user data for package " + packageName,
se);
- } finally {
- mInjector.binderRestoreCallingIdentity(ident);
- }
-
- if (callback != null) {
try {
- // If there was a throw above, we send back that removal failed
callback.onRemoveCompleted(packageName, false);
} catch (RemoteException re) {
// Caller is no longer available, ignore
}
+ } finally {
+ mInjector.binderRestoreCallingIdentity(ident);
}
- return false;
}
@Override
@@ -12252,10 +12566,9 @@
mOverlayPackagesProvider.getNonRequiredApps(admin, userId, provisioningAction));
}
- //TODO: Add callback information to the javadoc once it is completed.
- //TODO: Make transferOwnership atomic.
@Override
- public void transferOwnership(ComponentName admin, ComponentName target, PersistableBundle bundle) {
+ public void transferOwnership(@NonNull ComponentName admin, @NonNull ComponentName target,
+ @Nullable PersistableBundle bundle) {
if (!mHasFeature) {
return;
}
@@ -12288,12 +12601,41 @@
final long id = mInjector.binderClearCallingIdentity();
try {
- //STOPSHIP add support for COMP, edge cases when device is rebooted/work mode off
synchronized (this) {
+ /*
+ * We must ensure the whole process is atomic to prevent the device from ending up
+ * in an invalid state (e.g. no active admin). This could happen if the device
+ * is rebooted or work mode is turned off mid-transfer.
+ * In order to guarantee atomicity, we:
+ *
+ * 1. Save an atomic journal file describing the transfer process
+ * 2. Perform the transfer itself
+ * 3. Delete the journal file
+ *
+ * That way if the journal file exists on device boot, we know that the transfer
+ * must be reverted back to the original administrator. This logic is implemented in
+ * revertTransferOwnershipIfNecessaryLocked.
+ * */
+ if (bundle == null) {
+ bundle = new PersistableBundle();
+ }
if (isProfileOwner(admin, callingUserId)) {
- transferProfileOwnerLocked(admin, target, callingUserId, bundle);
+ prepareTransfer(admin, target, bundle, callingUserId,
+ ADMIN_TYPE_PROFILE_OWNER);
+ transferProfileOwnershipLocked(admin, target, callingUserId);
+ sendProfileOwnerCommand(DeviceAdminReceiver.ACTION_TRANSFER_OWNERSHIP_COMPLETE,
+ getTransferOwnershipAdminExtras(bundle), callingUserId);
+ postTransfer(DevicePolicyManager.ACTION_PROFILE_OWNER_CHANGED, callingUserId);
+ if (isUserAffiliatedWithDeviceLocked(callingUserId)) {
+ notifyAffiliatedProfileTransferOwnershipComplete(callingUserId);
+ }
} else if (isDeviceOwner(admin, callingUserId)) {
- transferDeviceOwnerLocked(admin, target, callingUserId, bundle);
+ prepareTransfer(admin, target, bundle, callingUserId,
+ ADMIN_TYPE_DEVICE_OWNER);
+ transferDeviceOwnershipLocked(admin, target, callingUserId);
+ sendDeviceOwnerCommand(DeviceAdminReceiver.ACTION_TRANSFER_OWNERSHIP_COMPLETE,
+ getTransferOwnershipAdminExtras(bundle));
+ postTransfer(DevicePolicyManager.ACTION_DEVICE_OWNER_CHANGED, callingUserId);
}
}
} finally {
@@ -12301,43 +12643,55 @@
}
}
+ private void prepareTransfer(ComponentName admin, ComponentName target,
+ PersistableBundle bundle, int callingUserId, String adminType) {
+ saveTransferOwnershipBundleLocked(bundle, callingUserId);
+ mTransferOwnershipMetadataManager.saveMetadataFile(
+ new TransferOwnershipMetadataManager.Metadata(admin, target,
+ callingUserId, adminType));
+ }
+
+ private void postTransfer(String broadcast, int callingUserId) {
+ deleteTransferOwnershipMetadataFileLocked();
+ sendOwnerChangedBroadcast(broadcast, callingUserId);
+ }
+
+ private void notifyAffiliatedProfileTransferOwnershipComplete(int callingUserId) {
+ final Bundle extras = new Bundle();
+ extras.putParcelable(Intent.EXTRA_USER, UserHandle.of(callingUserId));
+ sendDeviceOwnerCommand(
+ DeviceAdminReceiver.ACTION_AFFILIATED_PROFILE_TRANSFER_OWNERSHIP_COMPLETE, extras);
+ }
+
/**
* Transfers the profile owner for user with id profileOwnerUserId from admin to target.
*/
- private void transferProfileOwnerLocked(ComponentName admin, ComponentName target,
- int profileOwnerUserId, PersistableBundle bundle) {
+ private void transferProfileOwnershipLocked(ComponentName admin, ComponentName target,
+ int profileOwnerUserId) {
transferActiveAdminUncheckedLocked(target, admin, profileOwnerUserId);
mOwners.transferProfileOwner(target, profileOwnerUserId);
Slog.i(LOG_TAG, "Profile owner set: " + target + " on user " + profileOwnerUserId);
mOwners.writeProfileOwner(profileOwnerUserId);
mDeviceAdminServiceController.startServiceForOwner(
target.getPackageName(), profileOwnerUserId, "transfer-profile-owner");
- sendProfileOwnerCommand(DeviceAdminReceiver.ACTION_TRANSFER_OWNERSHIP_COMPLETE,
- getTransferOwnerAdminExtras(bundle), profileOwnerUserId);
- sendOwnerChangedBroadcast(DevicePolicyManager.ACTION_PROFILE_OWNER_CHANGED,
- profileOwnerUserId);
}
/**
* Transfers the device owner for user with id userId from admin to target.
*/
- private void transferDeviceOwnerLocked(ComponentName admin, ComponentName target, int userId,
- PersistableBundle bundle) {
+ private void transferDeviceOwnershipLocked(ComponentName admin, ComponentName target, int userId) {
transferActiveAdminUncheckedLocked(target, admin, userId);
- mOwners.transferDeviceOwner(target);
+ mOwners.transferDeviceOwnership(target);
Slog.i(LOG_TAG, "Device owner set: " + target + " on user " + userId);
mOwners.writeDeviceOwner();
mDeviceAdminServiceController.startServiceForOwner(
target.getPackageName(), userId, "transfer-device-owner");
- sendDeviceOwnerCommand(DeviceAdminReceiver.ACTION_TRANSFER_OWNERSHIP_COMPLETE,
- getTransferOwnerAdminExtras(bundle));
- sendOwnerChangedBroadcast(DevicePolicyManager.ACTION_DEVICE_OWNER_CHANGED, userId);
}
- private Bundle getTransferOwnerAdminExtras(PersistableBundle bundle) {
+ private Bundle getTransferOwnershipAdminExtras(PersistableBundle bundle) {
Bundle extras = new Bundle();
if (bundle != null) {
- extras.putParcelable(EXTRA_TRANSFER_OWNER_ADMIN_EXTRAS_BUNDLE, bundle);
+ extras.putParcelable(EXTRA_TRANSFER_OWNERSHIP_ADMIN_EXTRAS_BUNDLE, bundle);
}
return extras;
}
@@ -12442,6 +12796,35 @@
}
}
+ private void deleteTransferOwnershipMetadataFileLocked() {
+ mTransferOwnershipMetadataManager.deleteMetadataFile();
+ }
+
+ @Override
+ @Nullable
+ public PersistableBundle getTransferOwnershipBundle() {
+ synchronized (this) {
+ final int callingUserId = mInjector.userHandleGetCallingUserId();
+ getActiveAdminForCallerLocked(null, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+ final File bundleFile = new File(
+ mInjector.environmentGetUserSystemDirectory(callingUserId),
+ TRANSFER_OWNERSHIP_PARAMETERS_XML);
+ if (!bundleFile.exists()) {
+ return null;
+ }
+ try (FileInputStream stream = new FileInputStream(bundleFile)) {
+ XmlPullParser parser = Xml.newPullParser();
+ parser.setInput(stream, null);
+ parser.next();
+ return PersistableBundle.restoreFromXml(parser);
+ } catch (IOException | XmlPullParserException | IllegalArgumentException e) {
+ Slog.e(LOG_TAG, "Caught exception while trying to load the "
+ + "owner transfer parameters from file " + bundleFile, e);
+ return null;
+ }
+ }
+ }
+
/**
* Returns whether printing is enabled for current user.
* @hide
@@ -12461,52 +12844,226 @@
}
}
- /**
- * Returns text of error message if printing is disabled.
- * Only to be called by Print Service.
- * @hide
- */
@Override
- public CharSequence getPrintingDisabledReason() {
- if (!hasPrinting() || !mHasFeature) {
- Log.e(LOG_TAG, "no printing or no management");
- return null;
+ public int addOverrideApn(@NonNull ComponentName who, @NonNull ApnSetting apnSetting) {
+ if (!mHasFeature) {
+ return -1;
}
+ Preconditions.checkNotNull(who, "ComponentName is null in addOverrideApn");
+ Preconditions.checkNotNull(apnSetting, "ApnSetting is null in addOverrideApn");
synchronized (this) {
- final int userHandle = mInjector.userHandleGetCallingUserId();
- DevicePolicyData policy = getUserData(userHandle);
- if (policy.mPrintingEnabled) {
- Log.e(LOG_TAG, "printing is enabled");
- return null;
- }
- String ownerPackage = mOwners.getProfileOwnerPackage(userHandle);
- if (ownerPackage == null) {
- ownerPackage = mOwners.getDeviceOwnerPackageName();
- }
- PackageManager pm = mInjector.getPackageManager();
- PackageInfo packageInfo;
+ getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
+ }
+
+ int operatedId = -1;
+ Uri resultUri;
+ final long id = mInjector.binderClearCallingIdentity();
+ try {
+ resultUri = mContext.getContentResolver().insert(DPC_URI, apnSetting.toContentValues());
+ } finally {
+ mInjector.binderRestoreCallingIdentity(id);
+ }
+ if (resultUri != null) {
try {
- packageInfo = pm.getPackageInfo(ownerPackage, 0);
- } catch (NameNotFoundException e) {
- Log.e(LOG_TAG, "getPackageInfo error", e);
- return null;
+ operatedId = Integer.parseInt(resultUri.getLastPathSegment());
+ } catch (NumberFormatException e) {
+ Slog.e(LOG_TAG, "Failed to parse inserted override APN id.", e);
}
- if (packageInfo == null) {
- Log.e(LOG_TAG, "packageInfo is inexplicably null");
- return null;
+ }
+
+ return operatedId;
+ }
+
+ @Override
+ public boolean updateOverrideApn(@NonNull ComponentName who, int apnId,
+ @NonNull ApnSetting apnSetting) {
+ if (!mHasFeature) {
+ return false;
+ }
+ Preconditions.checkNotNull(who, "ComponentName is null in updateOverrideApn");
+ Preconditions.checkNotNull(apnSetting, "ApnSetting is null in updateOverrideApn");
+ synchronized (this) {
+ getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
+ }
+
+ if (apnId < 0) {
+ return false;
+ }
+ final long id = mInjector.binderClearCallingIdentity();
+ try {
+ return mContext.getContentResolver().update(
+ Uri.withAppendedPath(DPC_URI, Integer.toString(apnId)),
+ apnSetting.toContentValues(), null, null) > 0;
+ } finally {
+ mInjector.binderRestoreCallingIdentity(id);
+ }
+ }
+
+ @Override
+ public boolean removeOverrideApn(@NonNull ComponentName who, int apnId) {
+ if (!mHasFeature) {
+ return false;
+ }
+ Preconditions.checkNotNull(who, "ComponentName is null in removeOverrideApn");
+ synchronized (this) {
+ getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
+ }
+
+ return removeOverrideApnUnchecked(apnId);
+ }
+
+ private boolean removeOverrideApnUnchecked(int apnId) {
+ if(apnId < 0) {
+ return false;
+ }
+ int numDeleted = 0;
+ final long id = mInjector.binderClearCallingIdentity();
+ try {
+ numDeleted = mContext.getContentResolver().delete(
+ Uri.withAppendedPath(DPC_URI, Integer.toString(apnId)), null, null);
+ } finally {
+ mInjector.binderRestoreCallingIdentity(id);
+ }
+ return numDeleted > 0;
+ }
+
+ @Override
+ public List<ApnSetting> getOverrideApns(@NonNull ComponentName who) {
+ if (!mHasFeature) {
+ return Collections.emptyList();
+ }
+ Preconditions.checkNotNull(who, "ComponentName is null in getOverrideApns");
+ synchronized (this) {
+ getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
+ }
+
+ return getOverrideApnsUnchecked();
+ }
+
+ private List<ApnSetting> getOverrideApnsUnchecked() {
+ final Cursor cursor;
+ final long id = mInjector.binderClearCallingIdentity();
+ try {
+ cursor = mContext.getContentResolver().query(DPC_URI, null, null, null, null);
+ } finally {
+ mInjector.binderRestoreCallingIdentity(id);
+ }
+
+ if (cursor == null) {
+ return Collections.emptyList();
+ }
+ try {
+ List<ApnSetting> apnList = new ArrayList<ApnSetting>();
+ cursor.moveToPosition(-1);
+ while (cursor.moveToNext()) {
+ ApnSetting apn = ApnSetting.makeApnSetting(cursor);
+ apnList.add(apn);
}
- ApplicationInfo appInfo = packageInfo.applicationInfo;
- if (appInfo == null) {
- Log.e(LOG_TAG, "appInfo is inexplicably null");
- return null;
+ return apnList;
+ } finally {
+ cursor.close();
+ }
+ }
+
+ @Override
+ public void setOverrideApnsEnabled(@NonNull ComponentName who, boolean enabled) {
+ if (!mHasFeature) {
+ return;
+ }
+ Preconditions.checkNotNull(who, "ComponentName is null in setOverrideApnEnabled");
+ synchronized (this) {
+ getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
+ }
+
+ setOverrideApnsEnabledUnchecked(enabled);
+ }
+
+ private void setOverrideApnsEnabledUnchecked(boolean enabled) {
+ ContentValues value = new ContentValues();
+ value.put(ENFORCE_KEY, enabled);
+ final long id = mInjector.binderClearCallingIdentity();
+ try {
+ mContext.getContentResolver().update(
+ ENFORCE_MANAGED_URI, value, null, null);
+ } finally {
+ mInjector.binderRestoreCallingIdentity(id);
+ }
+ }
+
+ @Override
+ public boolean isOverrideApnEnabled(@NonNull ComponentName who) {
+ if (!mHasFeature) {
+ return false;
+ }
+ Preconditions.checkNotNull(who, "ComponentName is null in isOverrideApnEnabled");
+ synchronized (this) {
+ getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
+ }
+
+ Cursor enforceCursor;
+ final long id = mInjector.binderClearCallingIdentity();
+ try {
+ enforceCursor = mContext.getContentResolver().query(
+ ENFORCE_MANAGED_URI, null, null, null, null);
+ } finally {
+ mInjector.binderRestoreCallingIdentity(id);
+ }
+
+ if (enforceCursor == null) {
+ return false;
+ }
+ try {
+ if (enforceCursor.moveToFirst()) {
+ return enforceCursor.getInt(enforceCursor.getColumnIndex(ENFORCE_KEY)) == 1;
}
- CharSequence appLabel = pm.getApplicationLabel(appInfo);
- if (appLabel == null) {
- Log.e(LOG_TAG, "appLabel is inexplicably null");
- return null;
- }
- return ((Context) ActivityThread.currentActivityThread().getSystemUiContext())
- .getResources().getString(R.string.printing_disabled_by, appLabel);
+ } catch (IllegalArgumentException e) {
+ Slog.e(LOG_TAG, "Cursor returned from ENFORCE_MANAGED_URI doesn't contain "
+ + "correct info.", e);
+ } finally {
+ enforceCursor.close();
+ }
+ return false;
+ }
+
+ @VisibleForTesting
+ void saveTransferOwnershipBundleLocked(PersistableBundle bundle, int userId) {
+ final File parametersFile = new File(
+ mInjector.environmentGetUserSystemDirectory(userId),
+ TRANSFER_OWNERSHIP_PARAMETERS_XML);
+ final AtomicFile atomicFile = new AtomicFile(parametersFile);
+ FileOutputStream stream = null;
+ try {
+ stream = atomicFile.startWrite();
+ final XmlSerializer serializer = new FastXmlSerializer();
+ serializer.setOutput(stream, StandardCharsets.UTF_8.name());
+ serializer.startDocument(null, true);
+ serializer.startTag(null, TAG_TRANSFER_OWNERSHIP_BUNDLE);
+ bundle.saveToXml(serializer);
+ serializer.endTag(null, TAG_TRANSFER_OWNERSHIP_BUNDLE);
+ serializer.endDocument();
+ atomicFile.finishWrite(stream);
+ } catch (IOException | XmlPullParserException e) {
+ Slog.e(LOG_TAG, "Caught exception while trying to save the "
+ + "owner transfer parameters to file " + parametersFile, e);
+ parametersFile.delete();
+ atomicFile.failWrite(stream);
+ }
+ }
+
+ void deleteTransferOwnershipBundleLocked(int userId) {
+ final File parametersFile = new File(mInjector.environmentGetUserSystemDirectory(userId),
+ TRANSFER_OWNERSHIP_PARAMETERS_XML);
+ parametersFile.delete();
+ }
+
+ private void maybeLogPasswordComplexitySet(ComponentName who, int userId, boolean parent,
+ PasswordMetrics metrics) {
+ if (SecurityLog.isLoggingEnabled()) {
+ final int affectedUserId = parent ? getProfileParentId(userId) : userId;
+ SecurityLog.writeEvent(SecurityLog.TAG_PASSWORD_COMPLEXITY_SET, who.getPackageName(),
+ userId, affectedUserId, metrics.length, metrics.quality, metrics.letters,
+ metrics.nonLetter, metrics.numeric, metrics.upperCase, metrics.lowerCase,
+ metrics.symbols);
}
}
}
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/Owners.java b/services/devicepolicy/java/com/android/server/devicepolicy/Owners.java
index 2a23888..0268519 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/Owners.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/Owners.java
@@ -34,6 +34,7 @@
import android.util.SparseArray;
import android.util.Xml;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.FastXmlSerializer;
import org.xmlpull.v1.XmlPullParser;
@@ -46,6 +47,7 @@
import java.io.InputStream;
import java.io.PrintWriter;
import java.nio.charset.StandardCharsets;
+import java.time.LocalDate;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@@ -77,6 +79,7 @@
private static final String TAG_DEVICE_OWNER = "device-owner";
private static final String TAG_DEVICE_INITIALIZER = "device-initializer";
private static final String TAG_SYSTEM_UPDATE_POLICY = "system-update-policy";
+ private static final String TAG_FREEZE_PERIOD_RECORD = "freeze-record";
private static final String TAG_PENDING_OTA_INFO = "pending-ota-info";
private static final String TAG_PROFILE_OWNER = "profile-owner";
// Holds "context" for device-owner, this must not be show up before device-owner.
@@ -89,6 +92,8 @@
private static final String ATTR_REMOTE_BUGREPORT_HASH = "remoteBugreportHash";
private static final String ATTR_USERID = "userId";
private static final String ATTR_USER_RESTRICTIONS_MIGRATED = "userRestrictionsMigrated";
+ private static final String ATTR_FREEZE_RECORD_START = "start";
+ private static final String ATTR_FREEZE_RECORD_END = "end";
private final UserManager mUserManager;
private final UserManagerInternal mUserManagerInternal;
@@ -104,19 +109,31 @@
// Local system update policy controllable by device owner.
private SystemUpdatePolicy mSystemUpdatePolicy;
+ private LocalDate mSystemUpdateFreezeStart;
+ private LocalDate mSystemUpdateFreezeEnd;
// Pending OTA info if there is one.
@Nullable
private SystemUpdateInfo mSystemUpdateInfo;
private final Object mLock = new Object();
+ private final Injector mInjector;
public Owners(UserManager userManager,
UserManagerInternal userManagerInternal,
PackageManagerInternal packageManagerInternal) {
+ this(userManager, userManagerInternal, packageManagerInternal, new Injector());
+ }
+
+ @VisibleForTesting
+ Owners(UserManager userManager,
+ UserManagerInternal userManagerInternal,
+ PackageManagerInternal packageManagerInternal,
+ Injector injector) {
mUserManager = userManager;
mUserManagerInternal = userManagerInternal;
mPackageManagerInternal = packageManagerInternal;
+ mInjector = injector;
}
/**
@@ -125,7 +142,7 @@
void load() {
synchronized (mLock) {
// First, try to read from the legacy file.
- final File legacy = getLegacyConfigFileWithTestOverride();
+ final File legacy = getLegacyConfigFile();
final List<UserInfo> users = mUserManager.getUsers(true);
@@ -288,7 +305,7 @@
}
}
- void transferDeviceOwner(ComponentName target) {
+ void transferDeviceOwnership(ComponentName target) {
synchronized (mLock) {
// We don't set a name because it's not used anyway.
// See DevicePolicyManagerService#getDeviceOwnerName
@@ -344,6 +361,47 @@
}
}
+ Pair<LocalDate, LocalDate> getSystemUpdateFreezePeriodRecord() {
+ synchronized (mLock) {
+ return new Pair<>(mSystemUpdateFreezeStart, mSystemUpdateFreezeEnd);
+ }
+ }
+
+ String getSystemUpdateFreezePeriodRecordAsString() {
+ StringBuilder freezePeriodRecord = new StringBuilder();
+ freezePeriodRecord.append("start: ");
+ if (mSystemUpdateFreezeStart != null) {
+ freezePeriodRecord.append(mSystemUpdateFreezeStart.toString());
+ } else {
+ freezePeriodRecord.append("null");
+ }
+ freezePeriodRecord.append("; end: ");
+ if (mSystemUpdateFreezeEnd != null) {
+ freezePeriodRecord.append(mSystemUpdateFreezeEnd.toString());
+ } else {
+ freezePeriodRecord.append("null");
+ }
+ return freezePeriodRecord.toString();
+ }
+
+ /**
+ * Returns {@code true} if the freeze period record is changed, {@code false} otherwise.
+ */
+ boolean setSystemUpdateFreezePeriodRecord(LocalDate start, LocalDate end) {
+ boolean changed = false;
+ synchronized (mLock) {
+ if (!Objects.equals(mSystemUpdateFreezeStart, start)) {
+ mSystemUpdateFreezeStart = start;
+ changed = true;
+ }
+ if (!Objects.equals(mSystemUpdateFreezeEnd, end)) {
+ mSystemUpdateFreezeEnd = end;
+ changed = true;
+ }
+ }
+ return changed;
+ }
+
boolean hasDeviceOwner() {
synchronized (mLock) {
return mDeviceOwner != null;
@@ -642,7 +700,7 @@
private class DeviceOwnerReadWriter extends FileReadWriter {
protected DeviceOwnerReadWriter() {
- super(getDeviceOwnerFileWithTestOverride());
+ super(getDeviceOwnerFile());
}
@Override
@@ -665,9 +723,16 @@
mSystemUpdatePolicy.saveToXml(out);
out.endTag(null, TAG_SYSTEM_UPDATE_POLICY);
}
-
- if (mSystemUpdateInfo != null) {
- mSystemUpdateInfo.writeToXml(out, TAG_PENDING_OTA_INFO);
+ if (mSystemUpdateFreezeStart != null || mSystemUpdateFreezeEnd != null) {
+ out.startTag(null, TAG_FREEZE_PERIOD_RECORD);
+ if (mSystemUpdateFreezeStart != null) {
+ out.attribute(null, ATTR_FREEZE_RECORD_START,
+ mSystemUpdateFreezeStart.toString());
+ }
+ if (mSystemUpdateFreezeEnd != null) {
+ out.attribute(null, ATTR_FREEZE_RECORD_END, mSystemUpdateFreezeEnd.toString());
+ }
+ out.endTag(null, TAG_FREEZE_PERIOD_RECORD);
}
}
@@ -700,6 +765,19 @@
case TAG_PENDING_OTA_INFO:
mSystemUpdateInfo = SystemUpdateInfo.readFromXml(parser);
break;
+ case TAG_FREEZE_PERIOD_RECORD:
+ String startDate = parser.getAttributeValue(null, ATTR_FREEZE_RECORD_START);
+ String endDate = parser.getAttributeValue(null, ATTR_FREEZE_RECORD_END);
+ if (startDate != null && endDate != null) {
+ mSystemUpdateFreezeStart = LocalDate.parse(startDate);
+ mSystemUpdateFreezeEnd = LocalDate.parse(endDate);
+ if (mSystemUpdateFreezeStart.isAfter(mSystemUpdateFreezeEnd)) {
+ Slog.e(TAG, "Invalid system update freeze record loaded");
+ mSystemUpdateFreezeStart = null;
+ mSystemUpdateFreezeEnd = null;
+ }
+ }
+ break;
default:
Slog.e(TAG, "Unexpected tag: " + tag);
return false;
@@ -713,7 +791,7 @@
private final int mUserId;
ProfileOwnerReadWriter(int userId) {
- super(getProfileOwnerFileWithTestOverride(userId));
+ super(getProfileOwnerFile(userId));
mUserId = userId;
}
@@ -868,17 +946,39 @@
pw.println(prefix + "Pending System Update: " + mSystemUpdateInfo);
needBlank = true;
}
+ if (mSystemUpdateFreezeStart != null || mSystemUpdateFreezeEnd != null) {
+ if (needBlank) {
+ pw.println();
+ }
+ pw.println(prefix + "System update freeze record: "
+ + getSystemUpdateFreezePeriodRecordAsString());
+ needBlank = true;
+ }
}
- File getLegacyConfigFileWithTestOverride() {
- return new File(Environment.getDataSystemDirectory(), DEVICE_OWNER_XML_LEGACY);
+ @VisibleForTesting
+ File getLegacyConfigFile() {
+ return new File(mInjector.environmentGetDataSystemDirectory(), DEVICE_OWNER_XML_LEGACY);
}
- File getDeviceOwnerFileWithTestOverride() {
- return new File(Environment.getDataSystemDirectory(), DEVICE_OWNER_XML);
+ @VisibleForTesting
+ File getDeviceOwnerFile() {
+ return new File(mInjector.environmentGetDataSystemDirectory(), DEVICE_OWNER_XML);
}
- File getProfileOwnerFileWithTestOverride(int userId) {
- return new File(Environment.getUserSystemDirectory(userId), PROFILE_OWNER_XML);
+ @VisibleForTesting
+ File getProfileOwnerFile(int userId) {
+ return new File(mInjector.environmentGetUserSystemDirectory(userId), PROFILE_OWNER_XML);
+ }
+
+ @VisibleForTesting
+ public static class Injector {
+ File environmentGetDataSystemDirectory() {
+ return Environment.getDataSystemDirectory();
+ }
+
+ File environmentGetUserSystemDirectory(int userId) {
+ return Environment.getUserSystemDirectory(userId);
+ }
}
}
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/PasswordBlacklist.java b/services/devicepolicy/java/com/android/server/devicepolicy/PasswordBlacklist.java
index 6a9b53a..a17a107 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/PasswordBlacklist.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/PasswordBlacklist.java
@@ -47,7 +47,7 @@
* This is a lightweight operation to prepare variables but not perform any IO.
*/
public PasswordBlacklist(File file) {
- mFile = new AtomicFile(file);
+ mFile = new AtomicFile(file, "device-policy");
}
/**
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/SecurityLogMonitor.java b/services/devicepolicy/java/com/android/server/devicepolicy/SecurityLogMonitor.java
index a9fd8e5..3277adf 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/SecurityLogMonitor.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/SecurityLogMonitor.java
@@ -71,6 +71,10 @@
*/
private static final int BUFFER_ENTRIES_MAXIMUM_LEVEL = BUFFER_ENTRIES_NOTIFICATION_LEVEL * 10;
/**
+ * Critical log buffer level, 90% of capacity.
+ */
+ private static final int BUFFER_ENTRIES_CRITICAL_LEVEL = BUFFER_ENTRIES_MAXIMUM_LEVEL * 9 / 10;
+ /**
* How often should Device Owner be notified under normal circumstances.
*/
private static final long RATE_LIMIT_INTERVAL_MILLISECONDS = TimeUnit.HOURS.toMillis(2);
@@ -97,6 +101,10 @@
@GuardedBy("mLock")
private boolean mAllowedToRetrieve = false;
+ // Whether we have already logged the fact that log buffer reached 90%, to avoid dupes.
+ @GuardedBy("mLock")
+ private boolean mCriticalLevelLogged = false;
+
/**
* Last events fetched from log to check for overlap between batches. We can leave it empty if
* we are sure there will be no overlap anymore, e.g. when we get empty batch.
@@ -116,10 +124,12 @@
void start() {
Slog.i(TAG, "Starting security logging.");
+ SecurityLog.writeEvent(SecurityLog.TAG_LOGGING_STARTED);
mLock.lock();
try {
if (mMonitorThread == null) {
mPendingLogs = new ArrayList<>();
+ mCriticalLevelLogged = false;
mId = 0;
mAllowedToRetrieve = false;
mNextAllowedRetrievalTimeMillis = -1;
@@ -135,6 +145,7 @@
void stop() {
Slog.i(TAG, "Stopping security logging.");
+ SecurityLog.writeEvent(SecurityLog.TAG_LOGGING_STOPPED);
mLock.lock();
try {
if (mMonitorThread != null) {
@@ -205,6 +216,7 @@
mLock.lock();
mAllowedToRetrieve = false;
mPendingLogs = new ArrayList<>();
+ mCriticalLevelLogged = false;
mLock.unlock();
Slog.i(TAG, "Discarded all logs.");
}
@@ -222,6 +234,7 @@
+ RATE_LIMIT_INTERVAL_MILLISECONDS;
List<SecurityEvent> result = mPendingLogs;
mPendingLogs = new ArrayList<>();
+ mCriticalLevelLogged = false;
return result;
} else {
return null;
@@ -344,11 +357,14 @@
// Save the rest of the new batch.
mPendingLogs.addAll(idLogs);
+ checkCriticalLevel();
+
if (mPendingLogs.size() > BUFFER_ENTRIES_MAXIMUM_LEVEL) {
// Truncate buffer down to half of BUFFER_ENTRIES_MAXIMUM_LEVEL.
mPendingLogs = new ArrayList<>(mPendingLogs.subList(
mPendingLogs.size() - (BUFFER_ENTRIES_MAXIMUM_LEVEL / 2),
mPendingLogs.size()));
+ mCriticalLevelLogged = false;
Slog.i(TAG, "Pending logs buffer full. Discarding old logs.");
}
if (DEBUG) Slog.d(TAG, mPendingLogs.size() + " pending events in the buffer after merging,"
@@ -357,6 +373,20 @@
}
@GuardedBy("mLock")
+ private void checkCriticalLevel() {
+ if (!SecurityLog.isLoggingEnabled()) {
+ return;
+ }
+
+ if (mPendingLogs.size() >= BUFFER_ENTRIES_CRITICAL_LEVEL) {
+ if (!mCriticalLevelLogged) {
+ mCriticalLevelLogged = true;
+ SecurityLog.writeEvent(SecurityLog.TAG_LOG_BUFFER_SIZE_CRITICAL);
+ }
+ }
+ }
+
+ @GuardedBy("mLock")
private void assignLogId(SecurityEvent event) {
event.setId(mId);
if (mId == Long.MAX_VALUE) {
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/TransferOwnershipMetadataManager.java b/services/devicepolicy/java/com/android/server/devicepolicy/TransferOwnershipMetadataManager.java
new file mode 100644
index 0000000..1addeb6
--- /dev/null
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/TransferOwnershipMetadataManager.java
@@ -0,0 +1,227 @@
+/*
+ * 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.devicepolicy;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.app.admin.DevicePolicyManager;
+import android.content.ComponentName;
+import android.os.Environment;
+import android.text.TextUtils;
+import android.util.AtomicFile;
+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.Preconditions;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlSerializer;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * Handles reading and writing of the owner transfer metadata file.
+ *
+ * Before we perform a device or profile owner transfer, we save this xml file with information
+ * about the current admin, target admin, user id and admin type (device owner or profile owner).
+ * After {@link DevicePolicyManager#transferOwnership} completes, we delete the file. If after
+ * device boot the file is still there, this indicates that the transfer was interrupted by a
+ * reboot.
+ *
+ * Note that this class is not thread safe.
+ */
+class TransferOwnershipMetadataManager {
+ final static String ADMIN_TYPE_DEVICE_OWNER = "device-owner";
+ final static String ADMIN_TYPE_PROFILE_OWNER = "profile-owner";
+ private final static String TAG_USER_ID = "user-id";
+ private final static String TAG_SOURCE_COMPONENT = "source-component";
+ private final static String TAG_TARGET_COMPONENT = "target-component";
+ private final static String TAG_ADMIN_TYPE = "admin-type";
+ private final static String TAG = TransferOwnershipMetadataManager.class.getName();
+ public static final String OWNER_TRANSFER_METADATA_XML = "owner-transfer-metadata.xml";
+
+ private final Injector mInjector;
+
+ TransferOwnershipMetadataManager() {
+ this(new Injector());
+ }
+
+ @VisibleForTesting
+ TransferOwnershipMetadataManager(Injector injector) {
+ mInjector = injector;
+ }
+
+ boolean saveMetadataFile(Metadata params) {
+ final File transferOwnershipMetadataFile = new File(mInjector.getOwnerTransferMetadataDir(),
+ OWNER_TRANSFER_METADATA_XML);
+ final AtomicFile atomicFile = new AtomicFile(transferOwnershipMetadataFile);
+ FileOutputStream stream = null;
+ try {
+ stream = atomicFile.startWrite();
+ final XmlSerializer serializer = new FastXmlSerializer();
+ serializer.setOutput(stream, StandardCharsets.UTF_8.name());
+ serializer.startDocument(null, true);
+ insertSimpleTag(serializer, TAG_USER_ID, Integer.toString(params.userId));
+ insertSimpleTag(serializer,
+ TAG_SOURCE_COMPONENT, params.sourceComponent.flattenToString());
+ insertSimpleTag(serializer,
+ TAG_TARGET_COMPONENT, params.targetComponent.flattenToString());
+ insertSimpleTag(serializer, TAG_ADMIN_TYPE, params.adminType);
+ serializer.endDocument();
+ atomicFile.finishWrite(stream);
+ return true;
+ } catch (IOException e) {
+ Slog.e(TAG, "Caught exception while trying to save Owner Transfer "
+ + "Params to file " + transferOwnershipMetadataFile, e);
+ transferOwnershipMetadataFile.delete();
+ atomicFile.failWrite(stream);
+ }
+ return false;
+ }
+
+ private void insertSimpleTag(XmlSerializer serializer, String tagName, String value)
+ throws IOException {
+ serializer.startTag(null, tagName);
+ serializer.text(value);
+ serializer.endTag(null, tagName);
+ }
+
+ @Nullable
+ Metadata loadMetadataFile() {
+ final File transferOwnershipMetadataFile =
+ new File(mInjector.getOwnerTransferMetadataDir(), OWNER_TRANSFER_METADATA_XML);
+ if (!transferOwnershipMetadataFile.exists()) {
+ return null;
+ }
+ Slog.d(TAG, "Loading TransferOwnershipMetadataManager from "
+ + transferOwnershipMetadataFile);
+ try (FileInputStream stream = new FileInputStream(transferOwnershipMetadataFile)) {
+ final XmlPullParser parser = Xml.newPullParser();
+ parser.setInput(stream, null);
+ return parseMetadataFile(parser);
+ } catch (IOException | XmlPullParserException | IllegalArgumentException e) {
+ Slog.e(TAG, "Caught exception while trying to load the "
+ + "owner transfer params from file " + transferOwnershipMetadataFile, e);
+ }
+ return null;
+ }
+
+ private Metadata parseMetadataFile(XmlPullParser parser)
+ throws XmlPullParserException, IOException {
+ int type;
+ final int outerDepth = parser.getDepth();
+ int userId = 0;
+ String adminComponent = null;
+ String targetComponent = null;
+ String adminType = null;
+ while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
+ && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
+ if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
+ continue;
+ }
+ switch (parser.getName()) {
+ case TAG_USER_ID:
+ parser.next();
+ userId = Integer.parseInt(parser.getText());
+ break;
+ case TAG_TARGET_COMPONENT:
+ parser.next();
+ targetComponent = parser.getText();
+ break;
+ case TAG_SOURCE_COMPONENT:
+ parser.next();
+ adminComponent = parser.getText();
+ break;
+ case TAG_ADMIN_TYPE:
+ parser.next();
+ adminType = parser.getText();
+ break;
+ }
+ }
+ return new Metadata(adminComponent, targetComponent, userId, adminType);
+ }
+
+ void deleteMetadataFile() {
+ new File(mInjector.getOwnerTransferMetadataDir(), OWNER_TRANSFER_METADATA_XML).delete();
+ }
+
+ boolean metadataFileExists() {
+ return new File(mInjector.getOwnerTransferMetadataDir(),
+ OWNER_TRANSFER_METADATA_XML).exists();
+ }
+
+ static class Metadata {
+ final int userId;
+ final ComponentName sourceComponent;
+ final ComponentName targetComponent;
+ final String adminType;
+
+ Metadata(@NonNull String sourceComponent, @NonNull String targetComponent,
+ @NonNull int userId, @NonNull String adminType) {
+ this.sourceComponent = ComponentName.unflattenFromString(sourceComponent);
+ this.targetComponent = ComponentName.unflattenFromString(targetComponent);
+ Preconditions.checkNotNull(sourceComponent);
+ Preconditions.checkNotNull(targetComponent);
+ Preconditions.checkStringNotEmpty(adminType);
+ this.userId = userId;
+ this.adminType = adminType;
+ }
+
+ Metadata(@NonNull ComponentName sourceComponent, @NonNull ComponentName targetComponent,
+ @NonNull int userId, @NonNull String adminType) {
+ this(sourceComponent.flattenToString(), targetComponent.flattenToString(),
+ userId, adminType);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof Metadata)) {
+ return false;
+ }
+ Metadata params = (Metadata) obj;
+
+ return userId == params.userId
+ && sourceComponent.equals(params.sourceComponent)
+ && targetComponent.equals(params.targetComponent)
+ && TextUtils.equals(adminType, params.adminType);
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+ hashCode = 31 * hashCode + userId;
+ hashCode = 31 * hashCode + sourceComponent.hashCode();
+ hashCode = 31 * hashCode + targetComponent.hashCode();
+ hashCode = 31 * hashCode + adminType.hashCode();
+ return hashCode;
+ }
+ }
+
+ @VisibleForTesting
+ static class Injector {
+ public File getOwnerTransferMetadataDir() {
+ return Environment.getDataSystemDirectory();
+ }
+ }
+}
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 94a356e..f95c6f0 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -160,7 +160,7 @@
* them from the build system somehow.
*/
private static final String BACKUP_MANAGER_SERVICE_CLASS =
- "com.android.server.backup.RefactoredBackupManagerService$Lifecycle";
+ "com.android.server.backup.BackupManagerService$Lifecycle";
private static final String APPWIDGET_SERVICE_CLASS =
"com.android.server.appwidget.AppWidgetService";
private static final String VOICE_RECOGNITION_MANAGER_SERVICE_CLASS =
diff --git a/services/net/java/android/net/util/MultinetworkPolicyTracker.java b/services/net/java/android/net/util/MultinetworkPolicyTracker.java
index 424e40d..30c5cd9 100644
--- a/services/net/java/android/net/util/MultinetworkPolicyTracker.java
+++ b/services/net/java/android/net/util/MultinetworkPolicyTracker.java
@@ -122,6 +122,7 @@
return mAvoidBadWifi;
}
+ // TODO: move this to MultipathPolicyTracker.
public int getMeteredMultipathPreference() {
return mMeteredMultipathPreference;
}
diff --git a/services/net/java/android/net/util/NetworkConstants.java b/services/net/java/android/net/util/NetworkConstants.java
index 5a3a8be..984c9f8 100644
--- a/services/net/java/android/net/util/NetworkConstants.java
+++ b/services/net/java/android/net/util/NetworkConstants.java
@@ -121,6 +121,14 @@
public static final int ICMP_ECHO_DATA_OFFSET = 8;
/**
+ * ICMPv4 constants.
+ *
+ * See also:
+ * - https://tools.ietf.org/html/rfc792
+ */
+ public static final int ICMPV4_ECHO_REQUEST_TYPE = 8;
+
+ /**
* ICMPv6 constants.
*
* See also:
@@ -139,6 +147,8 @@
public static final int ICMPV6_ND_OPTION_TLLA = 2;
public static final int ICMPV6_ND_OPTION_MTU = 5;
+ public static final int ICMPV6_ECHO_REQUEST_TYPE = 128;
+
/**
* UDP constants.
*
@@ -157,6 +167,14 @@
public static final int DHCP4_CLIENT_PORT = 68;
/**
+ * DNS constants.
+ *
+ * See also:
+ * - https://tools.ietf.org/html/rfc1035
+ */
+ public static final int DNS_SERVER_PORT = 53;
+
+ /**
* Utility functions.
*/
public static byte asByte(int i) { return (byte) i; }
diff --git a/services/print/java/com/android/server/print/PrintManagerService.java b/services/print/java/com/android/server/print/PrintManagerService.java
index 89a5fe1..d6cc805 100644
--- a/services/print/java/com/android/server/print/PrintManagerService.java
+++ b/services/print/java/com/android/server/print/PrintManagerService.java
@@ -22,6 +22,7 @@
import android.annotation.NonNull;
import android.app.ActivityManager;
import android.app.admin.DevicePolicyManager;
+import android.app.admin.DevicePolicyManagerInternal;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -64,6 +65,7 @@
import com.android.internal.util.DumpUtils;
import com.android.internal.util.IndentingPrintWriter;
import com.android.internal.util.Preconditions;
+import com.android.server.LocalServices;
import com.android.server.SystemService;
import java.io.FileDescriptor;
@@ -113,12 +115,12 @@
private final SparseArray<UserState> mUserStates = new SparseArray<>();
- private final DevicePolicyManager mDpc;
+ private final DevicePolicyManager mDpm;
PrintManagerImpl(Context context) {
mContext = context;
mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
- mDpc = (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE);
+ mDpm = (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE);
registerContentObservers();
registerBroadcastReceivers();
}
@@ -128,7 +130,16 @@
PrintAttributes attributes, String packageName, int appId, int userId) {
adapter = Preconditions.checkNotNull(adapter);
if (!isPrintingEnabled()) {
- final CharSequence disabledMessage = mDpc.getPrintingDisabledReason();
+ CharSequence disabledMessage = null;
+ DevicePolicyManagerInternal dpmi =
+ LocalServices.getService(DevicePolicyManagerInternal.class);
+ final int callingUserId = UserHandle.getCallingUserId();
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ disabledMessage = dpmi.getPrintingDisabledReasonForUser(callingUserId);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
if (disabledMessage != null) {
Toast.makeText(mContext, Looper.getMainLooper(), disabledMessage,
Toast.LENGTH_LONG).show();
@@ -711,7 +722,7 @@
}
private boolean isPrintingEnabled() {
- return mDpc == null || mDpc.isPrintingEnabled();
+ return mDpm == null || mDpm.isPrintingEnabled();
}
private void dump(@NonNull DualDumpOutputStream dumpStream,
diff --git a/services/robotests/Android.mk b/services/robotests/Android.mk
index ae311f8..d825533 100644
--- a/services/robotests/Android.mk
+++ b/services/robotests/Android.mk
@@ -13,9 +13,9 @@
# limitations under the License.
-############################################################
-# FrameworksServicesLib app just for Robolectric test target. #
-############################################################
+##############################################################
+# FrameworksServicesLib app just for Robolectric test target #
+##############################################################
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
@@ -31,14 +31,43 @@
include $(BUILD_PACKAGE)
-#############################################
-# FrameworksServices Robolectric test target. #
-#############################################
+##############################################
+# FrameworksServices Robolectric test target #
+##############################################
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
+# Dependency platform-robolectric-android-all-stubs below contains a bunch of Android classes as
+# stubs that throw RuntimeExceptions when we use them. The goal is to include hidden APIs that
+# weren't included in Robolectric's Android jar files. However, we are testing the framework itself
+# here, so if we write stuff that is being used in the tests and exist in
+# platform-robolectric-android-all-stubs, the class loader is going to pick up the latter, and thus
+# we are going to test what we don't want. To solve this:
+#
+# 1. If the class being used should be visible to bundled apps:
+# => Bypass the stubs target by including them in LOCAL_SRC_FILES and LOCAL_AIDL_INCLUDES
+# (if aidl).
+#
+# 2. If it's not visible:
+# => Remove the class from the stubs jar (common/robolectric/android-all/android-all-stubs.jar)
+# and add the class path to
+# common/robolectric/android-all/android-all-stubs_removed_classes.txt.
+#
-# Include the testing libraries (JUnit4 + Robolectric libs).
+INTERNAL_BACKUP := ../../core/java/com/android/internal/backup
+
+LOCAL_SRC_FILES := \
+ $(call all-java-files-under, src) \
+ $(call all-Iaidl-files-under, $(INTERNAL_BACKUP)) \
+ ../../core/java/android/content/pm/PackageInfo.java \
+ ../../core/java/android/app/backup/BackupAgent.java \
+ ../../core/java/android/app/backup/BackupDataOutput.java \
+ ../../core/java/android/app/backup/FullBackupDataOutput.java \
+ ../../core/java/android/app/IBackupAgent.aidl
+
+LOCAL_AIDL_INCLUDES := \
+ $(call all-Iaidl-files-under, $(INTERNAL_BACKUP)) \
+ ../../core/java/android/app/IBackupAgent.aidl
+
LOCAL_STATIC_JAVA_LIBRARIES := \
platform-robolectric-android-all-stubs \
android-support-test \
@@ -58,9 +87,9 @@
include $(BUILD_STATIC_JAVA_LIBRARY)
-#############################################################
-# FrameworksServices runner target to run the previous target. #
-#############################################################
+###############################################################
+# FrameworksServices runner target to run the previous target #
+###############################################################
include $(CLEAR_VARS)
LOCAL_MODULE := RunFrameworksServicesRoboTests
diff --git a/services/robotests/src/com/android/server/backup/BackupManagerServiceTest.java b/services/robotests/src/com/android/server/backup/BackupManagerServiceTest.java
index e072800..b60ad4b 100644
--- a/services/robotests/src/com/android/server/backup/BackupManagerServiceTest.java
+++ b/services/robotests/src/com/android/server/backup/BackupManagerServiceTest.java
@@ -41,6 +41,7 @@
import android.os.HandlerThread;
import android.platform.test.annotations.Presubmit;
import android.provider.Settings;
+import com.android.server.backup.PackageManagerBackupAgent;
import com.android.server.backup.testing.ShadowAppBackupUtils;
import com.android.server.backup.testing.ShadowBackupPolicyEnforcer;
import com.android.server.backup.testing.TransportData;
@@ -73,7 +74,11 @@
sdk = 26,
shadows = {ShadowAppBackupUtils.class, ShadowBackupPolicyEnforcer.class}
)
-@SystemLoaderClasses({RefactoredBackupManagerService.class, TransportManager.class})
+@SystemLoaderClasses({
+ BackupManagerService.class,
+ TransportManager.class,
+ PackageManagerBackupAgent.class
+})
@Presubmit
public class BackupManagerServiceTest {
private static final String TAG = "BMSTest";
@@ -126,8 +131,7 @@
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
when(mTransportManager.getTransportCurrentDestinationString(eq(mTransportName)))
.thenReturn("destinationString");
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
String destination = backupManagerService.getDestinationString(mTransportName);
@@ -139,8 +143,7 @@
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
when(mTransportManager.getTransportCurrentDestinationString(eq(mTransportName)))
.thenThrow(TransportNotRegisteredException.class);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
String destination = backupManagerService.getDestinationString(mTransportName);
@@ -152,8 +155,7 @@
mShadowContext.denyPermissions(android.Manifest.permission.BACKUP);
when(mTransportManager.getTransportCurrentDestinationString(eq(mTransportName)))
.thenThrow(TransportNotRegisteredException.class);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
expectThrows(
SecurityException.class,
@@ -167,8 +169,7 @@
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
TransportMock transportMock = setUpCurrentTransport(mTransportManager, backupTransport());
ShadowAppBackupUtils.sAppIsRunningAndEligibleForBackupWithTransport = p -> true;
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
boolean result = backupManagerService.isAppEligibleForBackup("app.package");
@@ -183,8 +184,7 @@
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
setUpCurrentTransport(mTransportManager, mTransport);
ShadowAppBackupUtils.sAppIsRunningAndEligibleForBackupWithTransport = p -> false;
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
boolean result = backupManagerService.isAppEligibleForBackup("app.package");
@@ -195,8 +195,7 @@
public void testIsAppEligibleForBackup_withoutPermission() throws Exception {
mShadowContext.denyPermissions(android.Manifest.permission.BACKUP);
setUpCurrentTransport(mTransportManager, mTransport);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
expectThrows(
SecurityException.class,
@@ -211,8 +210,7 @@
packagesMap.put("package.a", true);
packagesMap.put("package.b", false);
ShadowAppBackupUtils.sAppIsRunningAndEligibleForBackupWithTransport = packagesMap::get;
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
String[] packages = packagesMap.keySet().toArray(new String[packagesMap.size()]);
String[] filtered = backupManagerService.filterAppsEligibleForBackup(packages);
@@ -226,8 +224,7 @@
public void testFilterAppsEligibleForBackup_whenNoneIsEligible() throws Exception {
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
ShadowAppBackupUtils.sAppIsRunningAndEligibleForBackupWithTransport = p -> false;
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
String[] filtered =
backupManagerService.filterAppsEligibleForBackup(
@@ -240,8 +237,7 @@
public void testFilterAppsEligibleForBackup_withoutPermission() throws Exception {
mShadowContext.denyPermissions(android.Manifest.permission.BACKUP);
setUpCurrentTransport(mTransportManager, mTransport);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
expectThrows(
SecurityException.class,
@@ -276,8 +272,7 @@
public void testSelectBackupTransport() throws Exception {
setUpForSelectTransport();
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
String oldTransport =
backupManagerService.selectBackupTransport(mNewTransport.transportName);
@@ -292,8 +287,7 @@
public void testSelectBackupTransport_withoutPermission() throws Exception {
setUpForSelectTransport();
mShadowContext.denyPermissions(android.Manifest.permission.BACKUP);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
expectThrows(
SecurityException.class,
@@ -306,8 +300,7 @@
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
when(mTransportManager.registerAndSelectTransport(eq(mNewTransportComponent)))
.thenReturn(BackupManager.SUCCESS);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
ISelectBackupTransportCallback callback = mock(ISelectBackupTransportCallback.class);
backupManagerService.selectBackupTransportAsync(mNewTransportComponent, callback);
@@ -327,8 +320,7 @@
when(mTransportManager.registerAndSelectTransport(eq(mNewTransportComponent)))
.thenReturn(BackupManager.SUCCESS);
ISelectBackupTransportCallback callback = mock(ISelectBackupTransportCallback.class);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
backupManagerService.selectBackupTransportAsync(mNewTransportComponent, callback);
@@ -347,8 +339,7 @@
when(mTransportManager.registerAndSelectTransport(eq(mNewTransportComponent)))
.thenReturn(BackupManager.SUCCESS);
ISelectBackupTransportCallback callback = mock(ISelectBackupTransportCallback.class);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
backupManagerService.selectBackupTransportAsync(mNewTransportComponent, callback);
@@ -363,8 +354,7 @@
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
when(mTransportManager.registerAndSelectTransport(eq(mNewTransportComponent)))
.thenReturn(BackupManager.ERROR_TRANSPORT_UNAVAILABLE);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
ISelectBackupTransportCallback callback = mock(ISelectBackupTransportCallback.class);
backupManagerService.selectBackupTransportAsync(mNewTransportComponent, callback);
@@ -381,8 +371,7 @@
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
when(mTransportManager.registerAndSelectTransport(eq(newTransportComponent)))
.thenReturn(BackupManager.SUCCESS);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
ISelectBackupTransportCallback callback = mock(ISelectBackupTransportCallback.class);
backupManagerService.selectBackupTransportAsync(newTransportComponent, callback);
@@ -396,8 +385,7 @@
public void testSelectBackupTransportAsync_withoutPermission() throws Exception {
setUpForSelectTransport();
mShadowContext.denyPermissions(android.Manifest.permission.BACKUP);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
ComponentName newTransportComponent = mNewTransport.getTransportComponent();
expectThrows(
@@ -437,8 +425,7 @@
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
Intent configurationIntent = new Intent();
Intent dataManagementIntent = new Intent();
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
backupManagerService.updateTransportAttributes(
mTransportUid,
@@ -464,8 +451,7 @@
throws Exception {
setUpForUpdateTransportAttributes();
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
expectThrows(
SecurityException.class,
@@ -485,8 +471,7 @@
throws Exception {
setUpForUpdateTransportAttributes();
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
expectThrows(
RuntimeException.class,
@@ -505,8 +490,7 @@
public void testUpdateTransportAttributes_whenNameNull_throwsException() throws Exception {
setUpForUpdateTransportAttributes();
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
expectThrows(
RuntimeException.class,
@@ -526,8 +510,7 @@
throws Exception {
setUpForUpdateTransportAttributes();
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
expectThrows(
RuntimeException.class,
@@ -548,8 +531,7 @@
throws Exception {
setUpForUpdateTransportAttributes();
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
expectThrows(
RuntimeException.class,
@@ -583,8 +565,7 @@
mShadowContext.grantPermissions(android.Manifest.permission.BACKUP);
Intent configurationIntent = new Intent();
Intent dataManagementIntent = new Intent();
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
backupManagerService.updateTransportAttributes(
mTransportUid,
@@ -610,8 +591,7 @@
throws Exception {
setUpForUpdateTransportAttributes();
mShadowContext.denyPermissions(android.Manifest.permission.BACKUP);
- RefactoredBackupManagerService backupManagerService =
- createInitializedBackupManagerService();
+ BackupManagerService backupManagerService = createInitializedBackupManagerService();
expectThrows(
SecurityException.class,
@@ -648,8 +628,8 @@
verify(mTransportManager, never()).registerTransports();
}
- private RefactoredBackupManagerService createBackupManagerService() {
- return new RefactoredBackupManagerService(
+ private BackupManagerService createBackupManagerService() {
+ return new BackupManagerService(
mContext,
new Trampoline(mContext),
mBackupThread,
@@ -658,9 +638,9 @@
mTransportManager);
}
- private RefactoredBackupManagerService createInitializedBackupManagerService() {
- RefactoredBackupManagerService backupManagerService =
- new RefactoredBackupManagerService(
+ private BackupManagerService createInitializedBackupManagerService() {
+ BackupManagerService backupManagerService =
+ new BackupManagerService(
mContext,
new Trampoline(mContext),
mBackupThread,
diff --git a/services/robotests/src/com/android/server/backup/PerformBackupTaskTest.java b/services/robotests/src/com/android/server/backup/PerformBackupTaskTest.java
new file mode 100644
index 0000000..1360828
--- /dev/null
+++ b/services/robotests/src/com/android/server/backup/PerformBackupTaskTest.java
@@ -0,0 +1,316 @@
+/*
+ * 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;
+
+import static com.android.server.backup.testing.TransportData.backupTransport;
+import static com.android.server.backup.testing.TransportTestUtils.setUpTransport;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.junit.Assert.fail;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.robolectric.Shadows.shadowOf;
+
+import static java.util.Collections.emptyList;
+import static java.util.stream.Collectors.toCollection;
+import static java.util.stream.Collectors.toList;
+
+import android.app.Application;
+import android.app.IActivityManager;
+import android.app.IBackupAgent;
+import android.app.backup.BackupAgent;
+import android.app.backup.BackupDataOutput;
+import android.app.backup.FullBackupDataOutput;
+import android.app.backup.IBackupManager;
+import android.app.backup.IBackupManagerMonitor;
+import android.app.backup.IBackupObserver;
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.Looper;
+import android.os.Message;
+import android.os.PowerManager;
+import android.os.RemoteException;
+import android.platform.test.annotations.Presubmit;
+import android.util.Pair;
+import android.util.SparseArray;
+
+import com.android.internal.backup.IBackupTransport;
+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.PerformBackupTask;
+import com.android.server.backup.testing.TransportData;
+import com.android.server.backup.testing.TransportTestUtils.TransportMock;
+import com.android.server.backup.transport.TransportClient;
+import com.android.server.testing.FrameworkRobolectricTestRunner;
+import com.android.server.testing.SystemLoaderClasses;
+import com.android.server.testing.shadows.FrameworkShadowPackageManager;
+import com.android.server.testing.shadows.ShadowBackupDataInput;
+import com.android.server.testing.shadows.ShadowBackupDataOutput;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentMatcher;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadow.api.Shadow;
+import org.robolectric.shadows.ShadowLooper;
+import org.robolectric.shadows.ShadowPackageManager;
+import org.robolectric.shadows.ShadowQueuedWork;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Stream;
+
+@RunWith(FrameworkRobolectricTestRunner.class)
+@Config(
+ manifest = Config.NONE,
+ sdk = 26,
+ shadows = {
+ FrameworkShadowPackageManager.class,
+ ShadowBackupDataInput.class,
+ ShadowBackupDataOutput.class,
+ ShadowQueuedWork.class
+ }
+)
+@SystemLoaderClasses({
+ BackupManagerService.class,
+ PerformBackupTask.class,
+ BackupDataOutput.class,
+ FullBackupDataOutput.class,
+ TransportManager.class,
+ BackupAgent.class,
+ IBackupTransport.class,
+ IBackupAgent.class,
+ PackageInfo.class
+})
+@Presubmit
+public class PerformBackupTaskTest {
+ private static final String PACKAGE_1 = "com.example.package1";
+ private static final String PACKAGE_2 = "com.example.package2";
+
+ @Mock private BackupManagerService mBackupManagerService;
+ @Mock private TransportManager mTransportManager;
+ @Mock private DataChangedJournal mDataChangedJournal;
+ @Mock private IBackupObserver mObserver;
+ @Mock private IBackupManagerMonitor mMonitor;
+ @Mock private OnTaskFinishedListener mListener;
+ private TransportData mTransport;
+ private IBackupTransport mTransportBinder;
+ private TransportClient mTransportClient;
+ private ShadowLooper mShadowBackupLooper;
+ private BackupHandler mBackupHandler;
+ private PowerManager.WakeLock mWakeLock;
+ private ShadowPackageManager mShadowPackageManager;
+ private FakeIBackupManager mBackupManager;
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+
+ mTransport = backupTransport();
+ TransportMock transportMock = setUpTransport(mTransportManager, mTransport);
+ mTransportBinder = transportMock.transport;
+ mTransportClient = transportMock.transportClient;
+
+ Application application = RuntimeEnvironment.application;
+ File cacheDir = application.getCacheDir();
+ File baseStateDir = new File(cacheDir, "base_state_dir");
+ File dataDir = new File(cacheDir, "data_dir");
+ File stateDir = new File(baseStateDir, mTransport.transportDirName);
+ assertThat(baseStateDir.mkdir()).isTrue();
+ assertThat(dataDir.mkdir()).isTrue();
+ assertThat(stateDir.mkdir()).isTrue();
+
+ PackageManager packageManager = application.getPackageManager();
+ mShadowPackageManager = Shadow.extract(packageManager);
+
+ PowerManager powerManager =
+ (PowerManager) application.getSystemService(Context.POWER_SERVICE);
+ mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "*backup*");
+
+ // Robolectric simulates multi-thread in a single-thread to avoid flakiness
+ HandlerThread backupThread = new HandlerThread("backup");
+ backupThread.setUncaughtExceptionHandler(
+ (t, e) -> fail("Uncaught exception " + e.getMessage()));
+ backupThread.start();
+ Looper backupLooper = backupThread.getLooper();
+ mShadowBackupLooper = shadowOf(backupLooper);
+ mBackupHandler = new BackupHandler(mBackupManagerService, backupLooper);
+
+ mBackupManager = spy(FakeIBackupManager.class);
+
+ when(mBackupManagerService.getTransportManager()).thenReturn(mTransportManager);
+ when(mBackupManagerService.getContext()).thenReturn(application);
+ when(mBackupManagerService.getPackageManager()).thenReturn(packageManager);
+ when(mBackupManagerService.getWakelock()).thenReturn(mWakeLock);
+ when(mBackupManagerService.getCurrentOpLock()).thenReturn(new Object());
+ when(mBackupManagerService.getQueueLock()).thenReturn(new Object());
+ when(mBackupManagerService.getBaseStateDir()).thenReturn(baseStateDir);
+ when(mBackupManagerService.getDataDir()).thenReturn(dataDir);
+ when(mBackupManagerService.getCurrentOperations()).thenReturn(new SparseArray<>());
+ when(mBackupManagerService.getBackupHandler()).thenReturn(mBackupHandler);
+ when(mBackupManagerService.getBackupManagerBinder()).thenReturn(mBackupManager);
+ when(mBackupManagerService.getActivityManager()).thenReturn(mock(IActivityManager.class));
+ }
+
+ @Test
+ public void testRunTask_whenTransportProvidesFlags_passesThemToTheAgent() throws Exception {
+ BackupAgent agent = setUpAgent(PACKAGE_1);
+ int flags = BackupAgent.FLAG_CLIENT_SIDE_ENCRYPTION_ENABLED;
+ when(mTransportBinder.getTransportFlags()).thenReturn(flags);
+ PerformBackupTask task = createPerformBackupTask(emptyList(), false, true, PACKAGE_1);
+
+ runTask(task);
+
+ verify(agent).onBackup(any(), argThat(dataOutputWithTransportFlags(flags)), any());
+ }
+
+ @Test
+ public void testRunTask_whenTransportDoesNotProvidesFlags() throws Exception {
+ BackupAgent agent = setUpAgent(PACKAGE_1);
+ PerformBackupTask task = createPerformBackupTask(emptyList(), false, true, PACKAGE_1);
+
+ runTask(task);
+
+ verify(agent).onBackup(any(), argThat(dataOutputWithTransportFlags(0)), any());
+ }
+
+ @Test
+ public void testRunTask_whenTransportProvidesFlagsAndMultipleAgents_passesToAll()
+ throws Exception {
+ List<BackupAgent> agents = setUpAgents(PACKAGE_1, PACKAGE_2);
+ BackupAgent agent1 = agents.get(0);
+ BackupAgent agent2 = agents.get(1);
+ int flags = BackupAgent.FLAG_CLIENT_SIDE_ENCRYPTION_ENABLED;
+ when(mTransportBinder.getTransportFlags()).thenReturn(flags);
+ PerformBackupTask task =
+ createPerformBackupTask(emptyList(), false, true, PACKAGE_1, PACKAGE_2);
+
+ runTask(task);
+
+ verify(agent1).onBackup(any(), argThat(dataOutputWithTransportFlags(flags)), any());
+ verify(agent2).onBackup(any(), argThat(dataOutputWithTransportFlags(flags)), any());
+ }
+
+ @Test
+ public void testRunTask_whenTransportChangeFlagsAfterTaskCreation() throws Exception {
+ BackupAgent agent = setUpAgent(PACKAGE_1);
+ PerformBackupTask task = createPerformBackupTask(emptyList(), false, true, PACKAGE_1);
+ int flags = BackupAgent.FLAG_CLIENT_SIDE_ENCRYPTION_ENABLED;
+ when(mTransportBinder.getTransportFlags()).thenReturn(flags);
+
+ runTask(task);
+
+ verify(agent).onBackup(any(), argThat(dataOutputWithTransportFlags(flags)), any());
+ }
+
+ private void runTask(PerformBackupTask task) {
+ Message message = mBackupHandler.obtainMessage(BackupHandler.MSG_BACKUP_RESTORE_STEP, task);
+ mBackupHandler.sendMessage(message);
+ while (mShadowBackupLooper.getScheduler().areAnyRunnable()) {
+ mShadowBackupLooper.runToEndOfTasks();
+ }
+ }
+
+ private List<BackupAgent> setUpAgents(String... packageNames) {
+ return Stream.of(packageNames).map(this::setUpAgent).collect(toList());
+ }
+
+ private BackupAgent setUpAgent(String packageName) {
+ PackageInfo packageInfo = new PackageInfo();
+ packageInfo.packageName = packageName;
+ packageInfo.applicationInfo = new ApplicationInfo();
+ packageInfo.applicationInfo.flags = ApplicationInfo.FLAG_ALLOW_BACKUP;
+ packageInfo.applicationInfo.backupAgentName = "BackupAgent" + packageName;
+ packageInfo.applicationInfo.packageName = packageName;
+ mShadowPackageManager.setApplicationEnabledSetting(
+ packageName, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0);
+ mShadowPackageManager.addPackage(packageInfo);
+ BackupAgent backupAgent = spy(BackupAgent.class);
+ IBackupAgent backupAgentBinder = IBackupAgent.Stub.asInterface(backupAgent.onBind());
+ when(mBackupManagerService.bindToAgentSynchronous(
+ eq(packageInfo.applicationInfo), anyInt()))
+ .thenReturn(backupAgentBinder);
+ return backupAgent;
+ }
+
+ private PerformBackupTask createPerformBackupTask(
+ List<String> pendingFullBackups,
+ boolean userInitiated,
+ boolean nonIncremental,
+ String... packages) {
+ ArrayList<BackupRequest> backupRequests =
+ Stream.of(packages).map(BackupRequest::new).collect(toCollection(ArrayList::new));
+ mWakeLock.acquire();
+ PerformBackupTask task =
+ new PerformBackupTask(
+ mBackupManagerService,
+ mTransportClient,
+ mTransport.transportDirName,
+ backupRequests,
+ mDataChangedJournal,
+ mObserver,
+ mMonitor,
+ mListener,
+ pendingFullBackups,
+ userInitiated,
+ nonIncremental);
+ mBackupManager.setUp(mBackupHandler, task);
+ return task;
+ }
+
+ private ArgumentMatcher<BackupDataOutput> dataOutputWithTransportFlags(int flags) {
+ return dataOutput -> dataOutput.getTransportFlags() == flags;
+ }
+
+ private abstract static class FakeIBackupManager extends IBackupManager.Stub {
+ private Handler mBackupHandler;
+ private BackupRestoreTask mTask;
+
+ public FakeIBackupManager() {}
+
+ private void setUp(Handler backupHandler, BackupRestoreTask task) {
+ mBackupHandler = backupHandler;
+ mTask = task;
+ }
+
+ @Override
+ public void opComplete(int token, long result) throws RemoteException {
+ assertThat(mTask).isNotNull();
+ Message message =
+ mBackupHandler.obtainMessage(
+ BackupHandler.MSG_OP_COMPLETE, Pair.create(mTask, result));
+ mBackupHandler.sendMessage(message);
+ }
+ }
+}
diff --git a/services/robotests/src/com/android/server/backup/internal/PerformInitializeTaskTest.java b/services/robotests/src/com/android/server/backup/internal/PerformInitializeTaskTest.java
index ace0441..55fb460 100644
--- a/services/robotests/src/com/android/server/backup/internal/PerformInitializeTaskTest.java
+++ b/services/robotests/src/com/android/server/backup/internal/PerformInitializeTaskTest.java
@@ -42,7 +42,7 @@
import android.platform.test.annotations.Presubmit;
import com.android.internal.backup.IBackupTransport;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.TransportManager;
import com.android.server.backup.testing.TransportTestUtils;
import com.android.server.backup.testing.TransportData;
@@ -67,10 +67,14 @@
@RunWith(FrameworkRobolectricTestRunner.class)
@Config(manifest = Config.NONE, sdk = 26)
-@SystemLoaderClasses({PerformInitializeTaskTest.class, TransportManager.class})
+@SystemLoaderClasses({
+ BackupManagerService.class,
+ PerformInitializeTaskTest.class,
+ TransportManager.class
+})
@Presubmit
public class PerformInitializeTaskTest {
- @Mock private RefactoredBackupManagerService mBackupManagerService;
+ @Mock private BackupManagerService mBackupManagerService;
@Mock private TransportManager mTransportManager;
@Mock private OnTaskFinishedListener mListener;
@Mock private IBackupTransport mTransportBinder;
diff --git a/services/robotests/src/com/android/server/backup/testing/ShadowBackupPolicyEnforcer.java b/services/robotests/src/com/android/server/backup/testing/ShadowBackupPolicyEnforcer.java
index 88b30da..ef4764d 100644
--- a/services/robotests/src/com/android/server/backup/testing/ShadowBackupPolicyEnforcer.java
+++ b/services/robotests/src/com/android/server/backup/testing/ShadowBackupPolicyEnforcer.java
@@ -3,7 +3,6 @@
import android.content.ComponentName;
import com.android.server.backup.BackupPolicyEnforcer;
-import com.android.server.backup.RefactoredBackupManagerService;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
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 1be298d..407a1bc 100644
--- a/services/robotests/src/com/android/server/backup/testing/TestUtils.java
+++ b/services/robotests/src/com/android/server/backup/testing/TestUtils.java
@@ -16,11 +16,28 @@
package com.android.server.backup.testing;
+import static com.google.common.truth.Truth.assertThat;
+
+
import com.android.internal.util.FunctionalUtils.ThrowingRunnable;
+import org.robolectric.shadows.ShadowLog;
+
import java.util.concurrent.Callable;
public class TestUtils {
+ /** Reset logcat with {@link ShadowLog#reset()} before the test case */
+ public static void assertLogcatAtMost(String tag, int level) {
+ assertThat(ShadowLog.getLogsForTag(tag).stream().allMatch(logItem -> logItem.type <= level))
+ .isTrue();
+ }
+
+ /** Reset logcat with {@link ShadowLog#reset()} before the test case */
+ public static void assertLogcatAtLeast(String tag, int level) {
+ assertThat(ShadowLog.getLogsForTag(tag).stream().anyMatch(logItem -> logItem.type >= level))
+ .isTrue();
+ }
+
/**
* Calls {@link Runnable#run()} and returns if no exception is thrown. Otherwise, if the
* exception is unchecked, rethrow it; if it's checked wrap in a {@link RuntimeException} and
diff --git a/services/robotests/src/com/android/server/backup/testing/TransportTestUtils.java b/services/robotests/src/com/android/server/backup/testing/TransportTestUtils.java
index e1dc7b5..565c7e6 100644
--- a/services/robotests/src/com/android/server/backup/testing/TransportTestUtils.java
+++ b/services/robotests/src/com/android/server/backup/testing/TransportTestUtils.java
@@ -144,12 +144,14 @@
// Transport registered and available
IBackupTransport transportMock = mockTransportBinder(transport);
when(transportClientMock.connectOrThrow(any())).thenReturn(transportMock);
+ when(transportClientMock.connect(any())).thenReturn(transportMock);
return new TransportMock(transportClientMock, transportMock);
} else {
// Transport registered but unavailable
when(transportClientMock.connectOrThrow(any()))
.thenThrow(TransportNotAvailableException.class);
+ when(transportClientMock.connect(any())).thenReturn(null);
return new TransportMock(transportClientMock, null);
}
diff --git a/services/robotests/src/com/android/server/backup/transport/TransportClientTest.java b/services/robotests/src/com/android/server/backup/transport/TransportClientTest.java
index 10442b7..db6e62f 100644
--- a/services/robotests/src/com/android/server/backup/transport/TransportClientTest.java
+++ b/services/robotests/src/com/android/server/backup/transport/TransportClientTest.java
@@ -17,7 +17,11 @@
package com.android.server.backup.transport;
import static com.android.server.backup.TransportManager.SERVICE_ACTION_TRANSPORT_HOST;
+import static com.android.server.backup.testing.TestUtils.assertLogcatAtLeast;
+import static com.android.server.backup.testing.TestUtils.assertLogcatAtMost;
+
import static com.google.common.truth.Truth.assertThat;
+
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.eq;
@@ -25,6 +29,7 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.robolectric.Shadows.shadowOf;
+import static org.testng.Assert.expectThrows;
import android.content.ComponentName;
import android.content.Context;
@@ -34,12 +39,17 @@
import android.os.Looper;
import android.os.UserHandle;
import android.platform.test.annotations.Presubmit;
+import android.util.Log;
+
import com.android.internal.backup.IBackupTransport;
import com.android.server.EventLogTags;
import com.android.server.backup.TransportManager;
import com.android.server.testing.FrameworkRobolectricTestRunner;
-import com.android.server.testing.ShadowEventLog;
import com.android.server.testing.SystemLoaderClasses;
+import com.android.server.testing.shadows.ShadowCloseGuard;
+import com.android.server.testing.shadows.ShadowEventLog;
+import com.android.server.testing.shadows.ShadowSlog;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -47,10 +57,15 @@
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.annotation.Config;
+import org.robolectric.shadows.ShadowLog;
import org.robolectric.shadows.ShadowLooper;
@RunWith(FrameworkRobolectricTestRunner.class)
-@Config(manifest = Config.NONE, sdk = 26, shadows = {ShadowEventLog.class})
+@Config(
+ manifest = Config.NONE,
+ sdk = 26,
+ shadows = {ShadowEventLog.class, ShadowCloseGuard.class, ShadowSlog.class}
+)
@SystemLoaderClasses({TransportManager.class, TransportClient.class})
@Presubmit
public class TransportClientTest {
@@ -59,7 +74,7 @@
@Mock private Context mContext;
@Mock private TransportConnectionListener mTransportConnectionListener;
@Mock private TransportConnectionListener mTransportConnectionListener2;
- @Mock private IBackupTransport.Stub mIBackupTransport;
+ @Mock private IBackupTransport.Stub mTransportBinder;
private TransportClient mTransportClient;
private ComponentName mTransportComponent;
private String mTransportString;
@@ -78,7 +93,12 @@
mBindIntent = new Intent(SERVICE_ACTION_TRANSPORT_HOST).setComponent(mTransportComponent);
mTransportClient =
new TransportClient(
- mContext, mBindIntent, mTransportComponent, "1", new Handler(mainLooper));
+ mContext,
+ mBindIntent,
+ mTransportComponent,
+ "1",
+ "caller",
+ new Handler(mainLooper));
when(mContext.bindServiceAsUser(
eq(mBindIntent),
@@ -111,7 +131,7 @@
// Simulate framework connecting
ServiceConnection connection = verifyBindServiceAsUserAndCaptureServiceConnection(mContext);
- connection.onServiceConnected(mTransportComponent, mIBackupTransport);
+ connection.onServiceConnected(mTransportComponent, mTransportBinder);
mShadowLooper.runToEndOfTasks();
verify(mTransportConnectionListener)
@@ -126,7 +146,7 @@
mTransportClient.connectAsync(mTransportConnectionListener2, "caller2");
- connection.onServiceConnected(mTransportComponent, mIBackupTransport);
+ connection.onServiceConnected(mTransportComponent, mTransportBinder);
mShadowLooper.runToEndOfTasks();
verify(mTransportConnectionListener)
@@ -139,7 +159,7 @@
public void testConnectAsync_whenAlreadyConnected_callsListener() throws Exception {
mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
ServiceConnection connection = verifyBindServiceAsUserAndCaptureServiceConnection(mContext);
- connection.onServiceConnected(mTransportComponent, mIBackupTransport);
+ connection.onServiceConnected(mTransportComponent, mTransportBinder);
mTransportClient.connectAsync(mTransportConnectionListener2, "caller2");
@@ -180,11 +200,11 @@
}
@Test
- public void testConnectAsync_afterServiceDisconnectedBeforeNewConnection_callsListener()
+ public void testConnectAsync_afterOnServiceDisconnectedBeforeNewConnection_callsListener()
throws Exception {
mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
ServiceConnection connection = verifyBindServiceAsUserAndCaptureServiceConnection(mContext);
- connection.onServiceConnected(mTransportComponent, mIBackupTransport);
+ connection.onServiceConnected(mTransportComponent, mTransportBinder);
connection.onServiceDisconnected(mTransportComponent);
mTransportClient.connectAsync(mTransportConnectionListener2, "caller1");
@@ -194,13 +214,13 @@
}
@Test
- public void testConnectAsync_afterServiceDisconnectedAfterNewConnection_callsListener()
+ public void testConnectAsync_afterOnServiceDisconnectedAfterNewConnection_callsListener()
throws Exception {
mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
ServiceConnection connection = verifyBindServiceAsUserAndCaptureServiceConnection(mContext);
- connection.onServiceConnected(mTransportComponent, mIBackupTransport);
+ connection.onServiceConnected(mTransportComponent, mTransportBinder);
connection.onServiceDisconnected(mTransportComponent);
- connection.onServiceConnected(mTransportComponent, mIBackupTransport);
+ connection.onServiceConnected(mTransportComponent, mTransportBinder);
mTransportClient.connectAsync(mTransportConnectionListener2, "caller1");
@@ -240,7 +260,7 @@
@Test
public void testConnectAsync_beforeFrameworkCall_logsBoundTransition() {
- ShadowEventLog.clearEvents();
+ ShadowEventLog.setUp();
mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
@@ -249,11 +269,11 @@
@Test
public void testConnectAsync_afterOnServiceConnected_logsBoundAndConnectedTransitions() {
- ShadowEventLog.clearEvents();
+ ShadowEventLog.setUp();
mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
ServiceConnection connection = verifyBindServiceAsUserAndCaptureServiceConnection(mContext);
- connection.onServiceConnected(mTransportComponent, mIBackupTransport);
+ connection.onServiceConnected(mTransportComponent, mTransportBinder);
assertEventLogged(EventLogTags.BACKUP_TRANSPORT_LIFECYCLE, mTransportString, 1);
assertEventLogged(EventLogTags.BACKUP_TRANSPORT_CONNECTION, mTransportString, 1);
@@ -261,7 +281,7 @@
@Test
public void testConnectAsync_afterOnBindingDied_logsBoundAndUnboundTransitions() {
- ShadowEventLog.clearEvents();
+ ShadowEventLog.setUp();
mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
ServiceConnection connection = verifyBindServiceAsUserAndCaptureServiceConnection(mContext);
@@ -275,8 +295,8 @@
public void testUnbind_whenConnected_logsDisconnectedAndUnboundTransitions() {
mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
ServiceConnection connection = verifyBindServiceAsUserAndCaptureServiceConnection(mContext);
- connection.onServiceConnected(mTransportComponent, mIBackupTransport);
- ShadowEventLog.clearEvents();
+ connection.onServiceConnected(mTransportComponent, mTransportBinder);
+ ShadowEventLog.setUp();
mTransportClient.unbind("caller1");
@@ -288,8 +308,8 @@
public void testOnServiceDisconnected_whenConnected_logsDisconnectedAndUnboundTransitions() {
mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
ServiceConnection connection = verifyBindServiceAsUserAndCaptureServiceConnection(mContext);
- connection.onServiceConnected(mTransportComponent, mIBackupTransport);
- ShadowEventLog.clearEvents();
+ connection.onServiceConnected(mTransportComponent, mTransportBinder);
+ ShadowEventLog.setUp();
connection.onServiceDisconnected(mTransportComponent);
@@ -301,8 +321,8 @@
public void testOnBindingDied_whenConnected_logsDisconnectedAndUnboundTransitions() {
mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
ServiceConnection connection = verifyBindServiceAsUserAndCaptureServiceConnection(mContext);
- connection.onServiceConnected(mTransportComponent, mIBackupTransport);
- ShadowEventLog.clearEvents();
+ connection.onServiceConnected(mTransportComponent, mTransportBinder);
+ ShadowEventLog.setUp();
connection.onBindingDied(mTransportComponent);
@@ -310,6 +330,122 @@
assertEventLogged(EventLogTags.BACKUP_TRANSPORT_LIFECYCLE, mTransportString, 0);
}
+ @Test
+ public void testMarkAsDisposed_whenCreated() throws Throwable {
+ mTransportClient.markAsDisposed();
+
+ // No exception thrown
+ }
+
+ @Test
+ public void testMarkAsDisposed_afterOnBindingDied() throws Throwable {
+ mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
+ ServiceConnection connection = verifyBindServiceAsUserAndCaptureServiceConnection(mContext);
+ connection.onBindingDied(mTransportComponent);
+
+ mTransportClient.markAsDisposed();
+
+ // No exception thrown
+ }
+
+ @Test
+ public void testMarkAsDisposed_whenConnectedAndUnbound() throws Throwable {
+ mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
+ ServiceConnection connection = verifyBindServiceAsUserAndCaptureServiceConnection(mContext);
+ connection.onServiceConnected(mTransportComponent, mTransportBinder);
+ mTransportClient.unbind("caller1");
+
+ mTransportClient.markAsDisposed();
+
+ // No exception thrown
+ }
+
+ @Test
+ public void testMarkAsDisposed_afterOnServiceDisconnected() throws Throwable {
+ mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
+ ServiceConnection connection = verifyBindServiceAsUserAndCaptureServiceConnection(mContext);
+ connection.onServiceConnected(mTransportComponent, mTransportBinder);
+ connection.onServiceDisconnected(mTransportComponent);
+
+ mTransportClient.markAsDisposed();
+
+ // No exception thrown
+ }
+
+ @Test
+ public void testMarkAsDisposed_whenBound() throws Throwable {
+ mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
+
+ expectThrows(RuntimeException.class, mTransportClient::markAsDisposed);
+ }
+
+ @Test
+ public void testMarkAsDisposed_whenConnected() throws Throwable {
+ mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
+ ServiceConnection connection = verifyBindServiceAsUserAndCaptureServiceConnection(mContext);
+ connection.onServiceConnected(mTransportComponent, mTransportBinder);
+
+ expectThrows(RuntimeException.class, mTransportClient::markAsDisposed);
+ }
+
+ @Test
+ @SuppressWarnings("FinalizeCalledExplicitly")
+ public void testFinalize_afterCreated() throws Throwable {
+ ShadowLog.reset();
+
+ mTransportClient.finalize();
+
+ assertLogcatAtMost(TransportClient.TAG, Log.INFO);
+ }
+
+ @Test
+ @SuppressWarnings("FinalizeCalledExplicitly")
+ public void testFinalize_whenBound() throws Throwable {
+ mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
+ ShadowLog.reset();
+
+ mTransportClient.finalize();
+
+ assertLogcatAtLeast(TransportClient.TAG, Log.ERROR);
+ }
+
+ @Test
+ @SuppressWarnings("FinalizeCalledExplicitly")
+ public void testFinalize_whenConnected() throws Throwable {
+ mTransportClient.connectAsync(mTransportConnectionListener, "caller1");
+ ServiceConnection connection = verifyBindServiceAsUserAndCaptureServiceConnection(mContext);
+ connection.onServiceConnected(mTransportComponent, mTransportBinder);
+ ShadowLog.reset();
+
+ mTransportClient.finalize();
+
+ expectThrows(
+ TransportNotAvailableException.class,
+ () -> mTransportClient.getConnectedTransport("caller1"));
+ assertLogcatAtLeast(TransportClient.TAG, Log.ERROR);
+ }
+
+ @Test
+ @SuppressWarnings("FinalizeCalledExplicitly")
+ public void testFinalize_whenNotMarkedAsDisposed() throws Throwable {
+ ShadowCloseGuard.setUp();
+
+ mTransportClient.finalize();
+
+ assertThat(ShadowCloseGuard.hasReported()).isTrue();
+ }
+
+ @Test
+ @SuppressWarnings("FinalizeCalledExplicitly")
+ public void testFinalize_whenMarkedAsDisposed() throws Throwable {
+ mTransportClient.markAsDisposed();
+ ShadowCloseGuard.setUp();
+
+ mTransportClient.finalize();
+
+ assertThat(ShadowCloseGuard.hasReported()).isFalse();
+ }
+
private void assertEventLogged(int tag, Object... values) {
assertThat(ShadowEventLog.hasEvent(tag, values)).isTrue();
}
diff --git a/services/robotests/src/com/android/server/testing/FrameworkRobolectricTestRunner.java b/services/robotests/src/com/android/server/testing/FrameworkRobolectricTestRunner.java
index 6c7313b..c94d598 100644
--- a/services/robotests/src/com/android/server/testing/FrameworkRobolectricTestRunner.java
+++ b/services/robotests/src/com/android/server/testing/FrameworkRobolectricTestRunner.java
@@ -16,6 +16,9 @@
package com.android.server.testing;
+import com.android.server.backup.PerformBackupTaskTest;
+import com.android.server.backup.internal.PerformBackupTask;
+
import com.google.common.collect.ImmutableSet;
import org.junit.runners.model.FrameworkMethod;
@@ -30,6 +33,9 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.Enumeration;
import java.util.Set;
import javax.annotation.Nonnull;
@@ -115,6 +121,27 @@
}
/**
+ * HACK^2
+ * The framework Robolectric run configuration puts a prebuilt in front of us, so we try not
+ * to load the class from there, if possible.
+ */
+ @Override
+ public InputStream getResourceAsStream(String resource) {
+ try {
+ Enumeration<URL> urls = getResources(resource);
+ while (urls.hasMoreElements()) {
+ URL url = urls.nextElement();
+ if (!url.toString().toLowerCase().contains("prebuilt")) {
+ return url.openStream();
+ }
+ }
+ } catch (IOException e) {
+ // Fall through
+ }
+ return super.getResourceAsStream(resource);
+ }
+
+ /**
* Classes like com.package.ClassName$InnerClass should also be loaded from the system class
* loader, so we test if the classes in the annotation are prefixes of the class to load.
*/
diff --git a/services/robotests/src/com/android/server/testing/shadows/ShadowBackupDataInput.java b/services/robotests/src/com/android/server/testing/shadows/ShadowBackupDataInput.java
new file mode 100644
index 0000000..28489af
--- /dev/null
+++ b/services/robotests/src/com/android/server/testing/shadows/ShadowBackupDataInput.java
@@ -0,0 +1,61 @@
+/*
+ * 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.testing.shadows;
+
+import android.app.backup.BackupDataInput;
+
+import org.robolectric.annotation.Implementation;
+import org.robolectric.annotation.Implements;
+
+import java.io.FileDescriptor;
+import java.io.IOException;
+
+@Implements(BackupDataInput.class)
+public class ShadowBackupDataInput {
+ @Implementation
+ public void __constructor__(FileDescriptor fd) {
+ }
+
+ @Implementation
+ protected void finalize() throws Throwable {
+ }
+
+ @Implementation
+ public boolean readNextHeader() throws IOException {
+ return false;
+ }
+
+ @Implementation
+ public String getKey() {
+ throw new AssertionError("Can't call because readNextHeader() returned false");
+ }
+
+ @Implementation
+ public int getDataSize() {
+ throw new AssertionError("Can't call because readNextHeader() returned false");
+ }
+
+ @Implementation
+ public int readEntityData(byte[] data, int offset, int size) throws IOException {
+ throw new AssertionError("Can't call because readNextHeader() returned false");
+ }
+
+ @Implementation
+ public void skipEntityData() throws IOException {
+ throw new AssertionError("Can't call because readNextHeader() returned false");
+ }
+}
diff --git a/services/robotests/src/com/android/server/testing/shadows/ShadowBackupDataOutput.java b/services/robotests/src/com/android/server/testing/shadows/ShadowBackupDataOutput.java
new file mode 100644
index 0000000..c7deada
--- /dev/null
+++ b/services/robotests/src/com/android/server/testing/shadows/ShadowBackupDataOutput.java
@@ -0,0 +1,57 @@
+/*
+ * 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.testing.shadows;
+
+import android.app.backup.BackupDataOutput;
+
+import org.robolectric.annotation.Implementation;
+import org.robolectric.annotation.Implements;
+
+import java.io.FileDescriptor;
+import java.io.IOException;
+
+@Implements(BackupDataOutput.class)
+public class ShadowBackupDataOutput {
+ private long mQuota;
+ private int mTransportFlags;
+
+ @Implementation
+ public void __constructor__(FileDescriptor fd, long quota, int transportFlags) {
+ mQuota = quota;
+ mTransportFlags = transportFlags;
+ }
+
+ @Implementation
+ public long getQuota() {
+ return mQuota;
+ }
+
+ @Implementation
+ public int getTransportFlags() {
+ return mTransportFlags;
+ }
+
+ @Implementation
+ public int writeEntityHeader(String key, int dataSize) throws IOException {
+ return 0;
+ }
+
+ @Implementation
+ public int writeEntityData(byte[] data, int size) throws IOException {
+ return 0;
+ }
+}
diff --git a/services/robotests/src/com/android/server/testing/shadows/ShadowCloseGuard.java b/services/robotests/src/com/android/server/testing/shadows/ShadowCloseGuard.java
new file mode 100644
index 0000000..c9984bf
--- /dev/null
+++ b/services/robotests/src/com/android/server/testing/shadows/ShadowCloseGuard.java
@@ -0,0 +1,48 @@
+/*
+ * 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.testing.shadows;
+
+import dalvik.system.CloseGuard;
+
+import org.robolectric.annotation.Implements;
+
+@Implements(CloseGuard.class)
+public class ShadowCloseGuard {
+ private static final Reporter REPORTER = new Reporter();
+
+ public static boolean hasReported() {
+ return REPORTER.mReports > 0;
+ }
+
+ public static void setUp() {
+ // Can't do this in static {} block because shadow initialization is part of real class
+ // initialization and it happens right in the beginning. When the shadow is being
+ // initialized the class hasn't been initialized yet and it will be after the shadow. So,
+ // REPORTER field (inside CloseGuard) will be assigned *after* setReporter() is called.
+ CloseGuard.setReporter(REPORTER);
+ REPORTER.mReports = 0;
+ }
+
+ private static class Reporter implements CloseGuard.Reporter {
+ private int mReports = 0;
+
+ @Override
+ public void report(String message, Throwable allocationSite) {
+ mReports += 1;
+ }
+ }
+}
diff --git a/services/robotests/src/com/android/server/testing/ShadowEventLog.java b/services/robotests/src/com/android/server/testing/shadows/ShadowEventLog.java
similarity index 94%
rename from services/robotests/src/com/android/server/testing/ShadowEventLog.java
rename to services/robotests/src/com/android/server/testing/shadows/ShadowEventLog.java
index b8059f4..4625684 100644
--- a/services/robotests/src/com/android/server/testing/ShadowEventLog.java
+++ b/services/robotests/src/com/android/server/testing/shadows/ShadowEventLog.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.server.testing;
+package com.android.server.testing.shadows;
import android.util.EventLog;
@@ -40,7 +40,8 @@
return ENTRIES.contains(new Entry(tag, Arrays.asList(values)));
}
- public static void clearEvents() {
+ /** Clears the entries */
+ public static void setUp() {
ENTRIES.clear();
}
diff --git a/services/robotests/src/com/android/server/testing/shadows/ShadowSlog.java b/services/robotests/src/com/android/server/testing/shadows/ShadowSlog.java
new file mode 100644
index 0000000..bf4b61e
--- /dev/null
+++ b/services/robotests/src/com/android/server/testing/shadows/ShadowSlog.java
@@ -0,0 +1,32 @@
+/*
+ * 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.testing.shadows;
+
+import android.util.Log;
+import android.util.Slog;
+
+import org.robolectric.annotation.Implementation;
+import org.robolectric.annotation.Implements;
+import org.robolectric.shadows.ShadowLog;
+
+@Implements(Slog.class)
+public class ShadowSlog {
+ @Implementation
+ public static int println(int priority, String tag, String msg) {
+ return Log.println(priority, tag, msg);
+ }
+}
diff --git a/services/tests/servicestests/AndroidManifest.xml b/services/tests/servicestests/AndroidManifest.xml
index 0499bf0..5d8aca1 100644
--- a/services/tests/servicestests/AndroidManifest.xml
+++ b/services/tests/servicestests/AndroidManifest.xml
@@ -59,6 +59,7 @@
<uses-permission android:name="android.permission.STATUS_BAR_SERVICE" />
<uses-permission android:name="android.permission.ACCESS_SURFACE_FLINGER" />
<uses-permission android:name="android.permission.READ_FRAME_BUFFER" />
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Uses API introduced in O (26) -->
<uses-sdk android:minSdkVersion="1"
diff --git a/services/tests/servicestests/res/raw/active_admin_migrated.xml b/services/tests/servicestests/res/raw/active_admin_migrated.xml
new file mode 100644
index 0000000..47af30f
--- /dev/null
+++ b/services/tests/servicestests/res/raw/active_admin_migrated.xml
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<policies setup-complete="true" provisioning-state="3">
+ <admin name="com.another.package.name/whatever.random.class">
+ <policies flags="991"/>
+ <strong-auth-unlock-timeout value="0"/>
+ <user-restrictions no_add_managed_profile="true"/>
+ <default-enabled-user-restrictions>
+ <restriction value="no_add_managed_profile"/>
+ </default-enabled-user-restrictions>
+ </admin>
+</policies>
\ No newline at end of file
diff --git a/services/tests/servicestests/res/raw/active_admin_not_migrated.xml b/services/tests/servicestests/res/raw/active_admin_not_migrated.xml
new file mode 100644
index 0000000..54eba4c
--- /dev/null
+++ b/services/tests/servicestests/res/raw/active_admin_not_migrated.xml
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<policies setup-complete="true" provisioning-state="3">
+ <admin name="com.android.frameworks.servicestests/com.android.server.devicepolicy.DummyDeviceAdmins$Admin1">
+ <policies flags="991"/>
+ <strong-auth-unlock-timeout value="0"/>
+ <user-restrictions no_add_managed_profile="true"/>
+ <default-enabled-user-restrictions>
+ <restriction value="no_add_managed_profile"/>
+ </default-enabled-user-restrictions>
+ </admin>
+</policies>
\ No newline at end of file
diff --git a/services/tests/servicestests/res/raw/device_owner_migrated.xml b/services/tests/servicestests/res/raw/device_owner_migrated.xml
new file mode 100644
index 0000000..4ee05bf
--- /dev/null
+++ b/services/tests/servicestests/res/raw/device_owner_migrated.xml
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<root>
+<device-owner
+ package="com.another.package.name"
+ name=""
+ component="com.another.package.name/whatever.random.class"
+ userRestrictionsMigrated="true" />
+<device-owner-context userId="0" />
+</root>
\ No newline at end of file
diff --git a/services/tests/servicestests/res/raw/device_owner_not_migrated.xml b/services/tests/servicestests/res/raw/device_owner_not_migrated.xml
new file mode 100644
index 0000000..3a532af
--- /dev/null
+++ b/services/tests/servicestests/res/raw/device_owner_not_migrated.xml
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<root>
+<device-owner
+ package="com.android.frameworks.servicestests"
+ name=""
+ component="com.android.frameworks.servicestests/com.android.server.devicepolicy.DummyDeviceAdmins$Admin1"
+ userRestrictionsMigrated="true" />
+<device-owner-context userId="0" />
+</root>
\ No newline at end of file
diff --git a/services/tests/servicestests/res/raw/profile_owner_migrated.xml b/services/tests/servicestests/res/raw/profile_owner_migrated.xml
new file mode 100644
index 0000000..f73d2cd
--- /dev/null
+++ b/services/tests/servicestests/res/raw/profile_owner_migrated.xml
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<root>
+ <profile-owner package="com.another.package.name"
+ name="com.another.package.name"
+ component="com.another.package.name/whatever.random.class"
+ userRestrictionsMigrated="true"/>
+</root>
\ No newline at end of file
diff --git a/services/tests/servicestests/res/raw/profile_owner_not_migrated.xml b/services/tests/servicestests/res/raw/profile_owner_not_migrated.xml
new file mode 100644
index 0000000..1ce3a47
--- /dev/null
+++ b/services/tests/servicestests/res/raw/profile_owner_not_migrated.xml
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<root>
+ <profile-owner package="com.android.frameworks.servicestests"
+ name="com.android.frameworks.servicestests"
+ component="com.android.frameworks.servicestests/com.android.server.devicepolicy.DummyDeviceAdmins$Admin1"
+ userRestrictionsMigrated="true"/>
+</root>
\ No newline at end of file
diff --git a/services/tests/servicestests/src/com/android/server/ForceAppStandbyTrackerTest.java b/services/tests/servicestests/src/com/android/server/ForceAppStandbyTrackerTest.java
index de54e52..a16f118 100644
--- a/services/tests/servicestests/src/com/android/server/ForceAppStandbyTrackerTest.java
+++ b/services/tests/servicestests/src/com/android/server/ForceAppStandbyTrackerTest.java
@@ -38,6 +38,9 @@
import android.app.AppOpsManager.PackageOps;
import android.app.IActivityManager;
import android.app.IUidObserver;
+import android.app.usage.UsageStatsManager;
+import android.app.usage.UsageStatsManagerInternal;
+import android.app.usage.UsageStatsManagerInternal.AppIdleStateChangeListener;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -73,6 +76,7 @@
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.HashMap;
import java.util.List;
import java.util.Random;
import java.util.concurrent.CountDownLatch;
@@ -109,6 +113,18 @@
}
@Override
+ UsageStatsManagerInternal injectUsageStatsManagerInternal() {
+ return mMockUsageStatsManagerInternal;
+ }
+
+ @Override
+ int injectGetGlobalSettingInt(String key, int def) {
+ Integer val = mGlobalSettings.get(key);
+
+ return (val == null) ? def : val;
+ }
+
+ @Override
boolean isSmallBatteryDevice() { return mIsSmallBatteryDevice; };
}
@@ -140,19 +156,24 @@
@Mock
private PowerManagerInternal mMockPowerManagerInternal;
+ @Mock
+ private UsageStatsManagerInternal mMockUsageStatsManagerInternal;
+
+ private MockContentResolver mMockContentResolver;
+
private IUidObserver mIUidObserver;
private IAppOpsCallback.Stub mAppOpsCallback;
private Consumer<PowerSaveState> mPowerSaveObserver;
private BroadcastReceiver mReceiver;
-
- private MockContentResolver mMockContentResolver;
- private FakeSettingsProvider mFakeSettingsProvider;
+ private AppIdleStateChangeListener mAppIdleStateChangeListener;
private boolean mPowerSaveMode;
private boolean mIsSmallBatteryDevice;
private final ArraySet<Pair<Integer, String>> mRestrictedPackages = new ArraySet();
+ private final HashMap<String, Integer> mGlobalSettings = new HashMap<>();
+
@Before
public void setUp() {
mMainHandler = new Handler(Looper.getMainLooper());
@@ -195,9 +216,7 @@
)).thenAnswer(inv -> new ArrayList<AppOpsManager.PackageOps>());
mMockContentResolver = new MockContentResolver();
- mFakeSettingsProvider = new FakeSettingsProvider();
when(mMockContext.getContentResolver()).thenReturn(mMockContentResolver);
- mMockContentResolver.addProvider(Settings.AUTHORITY, mFakeSettingsProvider);
// Call start.
instance.start();
@@ -211,6 +230,8 @@
ArgumentCaptor.forClass(Consumer.class);
ArgumentCaptor<BroadcastReceiver> receiverCaptor =
ArgumentCaptor.forClass(BroadcastReceiver.class);
+ ArgumentCaptor<AppIdleStateChangeListener> appIdleStateChangeListenerCaptor =
+ ArgumentCaptor.forClass(AppIdleStateChangeListener.class);
verify(mMockIActivityManager).registerUidObserver(
uidObserverArgumentCaptor.capture(),
@@ -228,11 +249,14 @@
verify(mMockContext).registerReceiver(
receiverCaptor.capture(), any(IntentFilter.class));
+ verify(mMockUsageStatsManagerInternal).addAppIdleStateChangeListener(
+ appIdleStateChangeListenerCaptor.capture());
mIUidObserver = uidObserverArgumentCaptor.getValue();
mAppOpsCallback = appOpsCallbackCaptor.getValue();
mPowerSaveObserver = powerSaveObserverCaptor.getValue();
mReceiver = receiverCaptor.getValue();
+ mAppIdleStateChangeListener = appIdleStateChangeListenerCaptor.getValue();
assertNotNull(mIUidObserver);
assertNotNull(mAppOpsCallback);
@@ -259,11 +283,23 @@
private static final int JOBS_AND_ALARMS = ALARMS_ONLY | JOBS_ONLY;
private void areRestricted(ForceAppStandbyTrackerTestable instance, int uid, String packageName,
- int restrictionTypes) {
+ int restrictionTypes, boolean exemptFromBatterySaver) {
assertEquals(((restrictionTypes & JOBS_ONLY) != 0),
- instance.areJobsRestricted(uid, packageName));
+ instance.areJobsRestricted(uid, packageName, exemptFromBatterySaver));
assertEquals(((restrictionTypes & ALARMS_ONLY) != 0),
- instance.areAlarmsRestricted(uid, packageName));
+ instance.areAlarmsRestricted(uid, packageName, exemptFromBatterySaver));
+ }
+
+ private void areRestricted(ForceAppStandbyTrackerTestable instance, int uid, String packageName,
+ int restrictionTypes) {
+ areRestricted(instance, uid, packageName, restrictionTypes,
+ /*exemptFromBatterySaver=*/ false);
+ }
+
+ private void areRestrictedWithExemption(ForceAppStandbyTrackerTestable instance,
+ int uid, String packageName, int restrictionTypes) {
+ areRestricted(instance, uid, packageName, restrictionTypes,
+ /*exemptFromBatterySaver=*/ true);
}
@Test
@@ -276,6 +312,10 @@
areRestricted(instance, UID_2, PACKAGE_2, NONE);
areRestricted(instance, Process.SYSTEM_UID, PACKAGE_SYSTEM, NONE);
+ areRestrictedWithExemption(instance, UID_1, PACKAGE_1, NONE);
+ areRestrictedWithExemption(instance, UID_2, PACKAGE_2, NONE);
+ areRestrictedWithExemption(instance, Process.SYSTEM_UID, PACKAGE_SYSTEM, NONE);
+
mPowerSaveMode = true;
mPowerSaveObserver.accept(getPowerSaveState());
@@ -285,6 +325,10 @@
areRestricted(instance, UID_2, PACKAGE_2, JOBS_AND_ALARMS);
areRestricted(instance, Process.SYSTEM_UID, PACKAGE_SYSTEM, NONE);
+ areRestrictedWithExemption(instance, UID_1, PACKAGE_1, NONE);
+ areRestrictedWithExemption(instance, UID_2, PACKAGE_2, NONE);
+ areRestrictedWithExemption(instance, Process.SYSTEM_UID, PACKAGE_SYSTEM, NONE);
+
// Toggle the foreground state.
mPowerSaveMode = true;
mPowerSaveObserver.accept(getPowerSaveState());
@@ -411,6 +455,73 @@
assertTrue(instance.isUidTempPowerSaveWhitelisted(UID_10_2));
}
+ @Test
+ public void testExempt() throws Exception {
+ final ForceAppStandbyTrackerTestable instance = newInstance();
+ callStart(instance);
+
+ assertFalse(instance.isForceAllAppsStandbyEnabled());
+ areRestricted(instance, UID_1, PACKAGE_1, NONE);
+ areRestricted(instance, UID_2, PACKAGE_2, NONE);
+ areRestricted(instance, Process.SYSTEM_UID, PACKAGE_SYSTEM, NONE);
+
+ mPowerSaveMode = true;
+ mPowerSaveObserver.accept(getPowerSaveState());
+
+ assertTrue(instance.isForceAllAppsStandbyEnabled());
+
+ areRestricted(instance, UID_1, PACKAGE_1, JOBS_AND_ALARMS);
+ areRestricted(instance, UID_2, PACKAGE_2, JOBS_AND_ALARMS);
+ areRestricted(instance, UID_10_2, PACKAGE_2, JOBS_AND_ALARMS);
+ areRestricted(instance, Process.SYSTEM_UID, PACKAGE_SYSTEM, NONE);
+
+ // Exempt package 2 on user-10.
+ mAppIdleStateChangeListener.onAppIdleStateChanged(PACKAGE_2, /*user=*/ 10, false,
+ UsageStatsManager.STANDBY_BUCKET_EXEMPTED);
+
+ areRestricted(instance, UID_1, PACKAGE_1, JOBS_AND_ALARMS);
+ areRestricted(instance, UID_2, PACKAGE_2, JOBS_AND_ALARMS);
+ areRestricted(instance, UID_10_2, PACKAGE_2, NONE);
+
+ areRestrictedWithExemption(instance, UID_1, PACKAGE_1, NONE);
+ areRestrictedWithExemption(instance, UID_2, PACKAGE_2, NONE);
+ areRestrictedWithExemption(instance, UID_10_2, PACKAGE_2, NONE);
+
+ // Exempt package 1 on user-0.
+ mAppIdleStateChangeListener.onAppIdleStateChanged(PACKAGE_1, /*user=*/ 0, false,
+ UsageStatsManager.STANDBY_BUCKET_EXEMPTED);
+
+ areRestricted(instance, UID_1, PACKAGE_1, NONE);
+ areRestricted(instance, UID_2, PACKAGE_2, JOBS_AND_ALARMS);
+ areRestricted(instance, UID_10_2, PACKAGE_2, NONE);
+
+ // Unexempt package 2 on user-10.
+ mAppIdleStateChangeListener.onAppIdleStateChanged(PACKAGE_2, /*user=*/ 10, false,
+ UsageStatsManager.STANDBY_BUCKET_ACTIVE);
+
+ areRestricted(instance, UID_1, PACKAGE_1, NONE);
+ areRestricted(instance, UID_2, PACKAGE_2, JOBS_AND_ALARMS);
+ areRestricted(instance, UID_10_2, PACKAGE_2, JOBS_AND_ALARMS);
+
+ // Check force-app-standby.
+ // EXEMPT doesn't exempt from force-app-standby.
+ mPowerSaveMode = false;
+ mPowerSaveObserver.accept(getPowerSaveState());
+
+ mAppIdleStateChangeListener.onAppIdleStateChanged(PACKAGE_1, /*user=*/ 0, false,
+ UsageStatsManager.STANDBY_BUCKET_EXEMPTED);
+ mAppIdleStateChangeListener.onAppIdleStateChanged(PACKAGE_2, /*user=*/ 0, false,
+ UsageStatsManager.STANDBY_BUCKET_EXEMPTED);
+
+ setAppOps(UID_1, PACKAGE_1, true);
+
+ areRestricted(instance, UID_1, PACKAGE_1, JOBS_AND_ALARMS);
+ areRestricted(instance, UID_2, PACKAGE_2, NONE);
+
+ areRestrictedWithExemption(instance, UID_1, PACKAGE_1, JOBS_AND_ALARMS);
+ areRestrictedWithExemption(instance, UID_2, PACKAGE_2, NONE);
+ }
+
public void loadPersistedAppOps() throws Exception {
final ForceAppStandbyTrackerTestable instance = newInstance();
@@ -652,6 +763,7 @@
mPowerSaveMode = true;
mPowerSaveObserver.accept(getPowerSaveState());
+ waitUntilMainHandlerDrain();
verify(l, times(1)).updateAllJobs();
verify(l, times(0)).updateJobsForUid(anyInt());
verify(l, times(0)).updateJobsForUidPackage(anyInt(), anyString());
@@ -771,6 +883,7 @@
mPowerSaveMode = false;
mPowerSaveObserver.accept(getPowerSaveState());
+ waitUntilMainHandlerDrain();
verify(l, times(1)).updateAllJobs();
verify(l, times(0)).updateJobsForUid(eq(UID_10_1));
verify(l, times(0)).updateJobsForUidPackage(anyInt(), anyString());
@@ -869,7 +982,7 @@
assertFalse(instance.isForceAllAppsStandbyEnabled());
// Setting/experiment for all app standby for small battery is enabled
- Global.putInt(mMockContentResolver, Global.FORCED_APP_STANDBY_FOR_SMALL_BATTERY_ENABLED, 1);
+ mGlobalSettings.put(Global.FORCED_APP_STANDBY_FOR_SMALL_BATTERY_ENABLED, 1);
instance.mFlagsObserver.onChange(true,
Global.getUriFor(Global.FORCED_APP_STANDBY_FOR_SMALL_BATTERY_ENABLED));
assertTrue(instance.isForceAllAppsStandbyEnabled());
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 96bf49b..10253c5 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
@@ -30,6 +30,7 @@
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.spy;
+import com.android.server.wm.DisplayWindowController;
import org.mockito.invocation.InvocationOnMock;
import android.app.IApplicationThread;
@@ -345,7 +346,7 @@
}
}
- private static class TestActivityDisplay extends ActivityDisplay {
+ protected static class TestActivityDisplay extends ActivityDisplay {
private final ActivityStackSupervisor mSupervisor;
TestActivityDisplay(ActivityStackSupervisor supervisor, int displayId) {
@@ -374,6 +375,11 @@
this, stackId, mSupervisor, windowingMode, activityType, onTop);
}
}
+
+ @Override
+ protected DisplayWindowController createWindowContainerController() {
+ return mock(DisplayWindowController.class);
+ }
}
private static WindowManagerService prepareMockWindowManager() {
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 5a21102..24566fc 100644
--- a/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
@@ -573,7 +573,8 @@
assertSecurityException(expectCallable, () -> mService.getTaskDescription(0));
assertSecurityException(expectCallable, () -> mService.cancelTaskWindowTransition(0));
assertSecurityException(expectCallable, () -> mService.startRecentsActivity(null, null,
- null, 0));
+ null));
+ assertSecurityException(expectCallable, () -> mService.cancelRecentsAnimation());
}
private void testGetTasksApis(boolean expectCallable) {
@@ -676,8 +677,8 @@
@Override
public void initialize() {
super.initialize();
- mDisplay = new ActivityDisplay(this, DEFAULT_DISPLAY);
- mOtherDisplay = new ActivityDisplay(this, DEFAULT_DISPLAY);
+ mDisplay = new TestActivityDisplay(this, DEFAULT_DISPLAY);
+ mOtherDisplay = new TestActivityDisplay(this, DEFAULT_DISPLAY);
attachDisplay(mOtherDisplay);
attachDisplay(mDisplay);
}
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 fc75628..c6ce7e1 100644
--- a/services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java
@@ -68,7 +68,7 @@
// Create a number of stacks with tasks (of incrementing active time)
final ActivityStackSupervisor supervisor = mService.mStackSupervisor;
final SparseArray<ActivityDisplay> displays = new SparseArray<>();
- final ActivityDisplay display = new ActivityDisplay(supervisor, DEFAULT_DISPLAY);
+ final ActivityDisplay display = new TestActivityDisplay(supervisor, DEFAULT_DISPLAY);
displays.put(DEFAULT_DISPLAY, display);
final int numStacks = 2;
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 5786095..bbd999b 100644
--- a/services/tests/servicestests/src/com/android/server/backup/TrampolineTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/TrampolineTest.java
@@ -82,7 +82,7 @@
};
private final int NON_USER_SYSTEM = UserHandle.USER_SYSTEM + 1;
- @Mock private RefactoredBackupManagerService mBackupManagerServiceMock;
+ @Mock private BackupManagerService mBackupManagerServiceMock;
@Mock private Context mContextMock;
@Mock private File mSuppressFileMock;
@Mock private File mSuppressFileParentMock;
@@ -101,7 +101,7 @@
public void setUp() {
MockitoAnnotations.initMocks(this);
- TrampolineTestable.sRefactoredBackupManagerServiceMock = mBackupManagerServiceMock;
+ TrampolineTestable.sBackupManagerServiceMock = mBackupManagerServiceMock;
TrampolineTestable.sSuppressFile = mSuppressFileMock;
TrampolineTestable.sCallingUid = Process.SYSTEM_UID;
TrampolineTestable.sBackupDisabled = false;
@@ -863,7 +863,7 @@
static boolean sBackupDisabled = false;
static File sSuppressFile = null;
static int sCallingUid = -1;
- static RefactoredBackupManagerService sRefactoredBackupManagerServiceMock = null;
+ static BackupManagerService sBackupManagerServiceMock = null;
private int mCreateServiceCallsCount = 0;
TrampolineTestable(Context context) {
@@ -886,9 +886,9 @@
}
@Override
- protected BackupManagerServiceInterface createRefactoredBackupManagerService() {
+ protected BackupManagerServiceInterface createBackupManagerService() {
mCreateServiceCallsCount++;
- return sRefactoredBackupManagerServiceMock;
+ return sBackupManagerServiceMock;
}
int getCreateServiceCallsCount() {
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 ed26296..86c83d6 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
@@ -27,7 +27,7 @@
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.testutils.PackageManagerStub;
import org.junit.Test;
@@ -82,7 +82,7 @@
applicationInfo.flags |= ApplicationInfo.FLAG_ALLOW_BACKUP;
applicationInfo.uid = Process.SYSTEM_UID;
applicationInfo.backupAgentName = CUSTOM_BACKUP_AGENT_NAME;
- applicationInfo.packageName = RefactoredBackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
+ applicationInfo.packageName = BackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
boolean isEligible = AppBackupUtils.appIsEligibleForBackup(applicationInfo,
mPackageManagerStub);
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 6b25d12..0cdf04b 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
@@ -47,7 +47,7 @@
import com.android.frameworks.servicestests.R;
import com.android.server.backup.FileMetadata;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.restore.PerformAdbRestoreTask;
import com.android.server.backup.restore.RestorePolicy;
import com.android.server.backup.testutils.PackageManagerStub;
@@ -143,8 +143,7 @@
assertThat(restorePolicy).isEqualTo(RestorePolicy.IGNORE);
assertThat(fileMetadata.packageName).isEqualTo(TEST_PACKAGE_NAME);
- assertThat(fileMetadata.path).isEqualTo(
- RefactoredBackupManagerService.BACKUP_MANIFEST_FILENAME);
+ assertThat(fileMetadata.path).isEqualTo(BackupManagerService.BACKUP_MANIFEST_FILENAME);
tarBackupReader.skipTarPadding(fileMetadata.size);
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java
index 06f138b..00e27c9 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java
@@ -60,40 +60,33 @@
*/
public static class OwnersTestable extends Owners {
public static final String LEGACY_FILE = "legacy.xml";
- public static final String DEVICE_OWNER_FILE = "device_owner2.xml";
- public static final String PROFILE_OWNER_FILE = "profile_owner.xml";
-
- private final File mLegacyFile;
- private final File mDeviceOwnerFile;
- private final File mUsersDataDir;
public OwnersTestable(MockSystemServices services) {
super(services.userManager, services.userManagerInternal,
- services.packageManagerInternal);
- mLegacyFile = new File(services.dataDir, LEGACY_FILE);
- mDeviceOwnerFile = new File(services.dataDir, DEVICE_OWNER_FILE);
- mUsersDataDir = new File(services.dataDir, "users");
+ services.packageManagerInternal, new MockInjector(services));
}
- @Override
- File getLegacyConfigFileWithTestOverride() {
- return mLegacyFile;
- }
+ static class MockInjector extends Injector {
+ private final MockSystemServices mServices;
- @Override
- File getDeviceOwnerFileWithTestOverride() {
- return mDeviceOwnerFile;
- }
+ private MockInjector(MockSystemServices services) {
+ mServices = services;
+ }
- @Override
- File getProfileOwnerFileWithTestOverride(int userId) {
- final File userDir = new File(mUsersDataDir, String.valueOf(userId));
- return new File(userDir, PROFILE_OWNER_FILE);
+ @Override
+ File environmentGetDataSystemDirectory() {
+ return mServices.dataDir;
+ }
+
+ @Override
+ File environmentGetUserSystemDirectory(int userId) {
+ return mServices.environment.getUserSystemDirectory(userId);
+ }
}
}
public final DpmMockContext context;
- private final MockInjector mMockInjector;
+ protected final MockInjector mMockInjector;
public DevicePolicyManagerServiceTestable(MockSystemServices services, DpmMockContext context) {
this(new MockInjector(services, context));
@@ -124,8 +117,7 @@
}
}
-
- private static class MockInjector extends Injector {
+ static class MockInjector extends Injector {
public final DpmMockContext context;
private final MockSystemServices services;
@@ -133,7 +125,7 @@
// Key is a pair of uri and userId
private final Map<Pair<Uri, Integer>, ContentObserver> mContentObservers = new ArrayMap<>();
- private MockInjector(MockSystemServices services, DpmMockContext context) {
+ public MockInjector(MockSystemServices services, DpmMockContext context) {
super(context);
this.services = services;
this.context = context;
@@ -449,5 +441,11 @@
void postOnSystemServerInitThreadPool(Runnable runnable) {
runnable.run();
}
+
+ @Override
+ public TransferOwnershipMetadataManager newTransferOwnershipMetadataManager() {
+ return new TransferOwnershipMetadataManager(
+ new TransferOwnershipMetadataManagerTest.MockInjector());
+ }
}
}
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 e8d6ed2..00a85a5 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
@@ -50,6 +50,7 @@
import static org.mockito.hamcrest.MockitoHamcrest.argThat;
import android.Manifest.permission;
+import android.annotation.RawRes;
import android.app.Activity;
import android.app.Notification;
import android.app.admin.DeviceAdminReceiver;
@@ -78,6 +79,7 @@
import android.security.KeyChain;
import android.security.keystore.AttestationUtils;
import android.telephony.TelephonyManager;
+import android.telephony.data.ApnSetting;
import android.test.MoreAsserts;
import android.test.suitebuilder.annotation.SmallTest;
import android.util.ArraySet;
@@ -92,10 +94,13 @@
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
+import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
+import java.io.File;
+import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -201,9 +206,14 @@
setUpUserManager();
}
+ private TransferOwnershipMetadataManager getMockTransferMetadataManager() {
+ return dpms.mTransferOwnershipMetadataManager;
+ }
+
@Override
protected void tearDown() throws Exception {
flushTasks();
+ getMockTransferMetadataManager().deleteMetadataFile();
super.tearDown();
}
@@ -2150,6 +2160,51 @@
() -> dpm.getMeteredDataDisabled(admin1));
}
+ public void testGetMeteredDataDisabledForUser() throws Exception {
+ setAsProfileOwner(admin1);
+
+ // Setup
+ final ArrayList<String> emptyList = new ArrayList<>();
+ final ArrayList<String> pkgsToRestrict = new ArrayList<>();
+ final String package1 = "com.example.one";
+ final String package2 = "com.example.two";
+ final String package3 = "com.example.three";
+ pkgsToRestrict.add(package1);
+ pkgsToRestrict.add(package2);
+ setupPackageInPackageManager(package1, DpmMockContext.CALLER_USER_HANDLE, 123, 0);
+ setupPackageInPackageManager(package2, DpmMockContext.CALLER_USER_HANDLE, 456, 0);
+ List<String> excludedPkgs = dpm.setMeteredDataDisabled(admin1, pkgsToRestrict);
+
+ // Verify
+ assertEquals(emptyList, excludedPkgs);
+ mContext.binder.callingUid = DpmMockContext.SYSTEM_UID;
+ assertTrue(package1 + "should be restricted",
+ dpm.isMeteredDataDisabledForUser(admin1, package1,
+ DpmMockContext.CALLER_USER_HANDLE));
+ assertTrue(package2 + "should be restricted",
+ dpm.isMeteredDataDisabledForUser(admin1, package2,
+ DpmMockContext.CALLER_USER_HANDLE));
+ assertFalse(package3 + "should not be restricted",
+ dpm.isMeteredDataDisabledForUser(admin1, package3,
+ DpmMockContext.CALLER_USER_HANDLE));
+ }
+
+ public void testGetMeteredDataDisabledForUser_nonSystemUidCaller() throws Exception {
+ setAsProfileOwner(admin1);
+ assertExpectException(SecurityException.class,
+ /* messageRegex= */ "Only the system can query restricted pkgs",
+ () -> dpm.isMeteredDataDisabledForUser(
+ admin1, "com.example.one", DpmMockContext.CALLER_USER_HANDLE));
+ dpm.clearProfileOwner(admin1);
+
+ setDeviceOwner();
+ assertExpectException(SecurityException.class,
+ /* messageRegex= */ "Only the system can query restricted pkgs",
+ () -> dpm.isMeteredDataDisabledForUser(
+ admin1, "com.example.one", DpmMockContext.CALLER_USER_HANDLE));
+ clearDeviceOwner();
+ }
+
public void testCreateAdminSupportIntent() throws Exception {
// Setup device owner.
mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID;
@@ -3652,15 +3707,47 @@
MoreAsserts.assertEmpty(targetUsers);
}
+ private void verifyLockTaskState(int userId) throws Exception {
+ verifyLockTaskState(userId, new String[0], DevicePolicyManager.LOCK_TASK_FEATURE_NONE);
+ }
+
+ private void verifyLockTaskState(int userId, String[] packages, int flags) throws Exception {
+ verify(getServices().iactivityManager).updateLockTaskPackages(userId, packages);
+ verify(getServices().iactivityManager).updateLockTaskFeatures(userId, flags);
+ }
+
+ private void verifyCanSetLockTask(int uid, int userId, ComponentName who, String[] packages,
+ int flags) throws Exception {
+ mContext.binder.callingUid = uid;
+ dpm.setLockTaskPackages(who, packages);
+ MoreAsserts.assertEquals(packages, dpm.getLockTaskPackages(who));
+ for (String p : packages) {
+ assertTrue(dpm.isLockTaskPermitted(p));
+ }
+ assertFalse(dpm.isLockTaskPermitted("anotherPackage"));
+ // Test to see if set lock task features can be set
+ dpm.setLockTaskFeatures(who, flags);
+ verifyLockTaskState(userId, packages, flags);
+ }
+
+ private void verifyCanNotSetLockTask(int uid, ComponentName who, String[] packages,
+ int flags) throws Exception {
+ mContext.binder.callingUid = uid;
+ assertExpectException(SecurityException.class, /* messageRegex =*/ null,
+ () -> dpm.setLockTaskPackages(who, packages));
+ assertExpectException(SecurityException.class, /* messageRegex =*/ null,
+ () -> dpm.getLockTaskPackages(who));
+ assertFalse(dpm.isLockTaskPermitted("doPackage1"));
+ assertExpectException(SecurityException.class, /* messageRegex =*/ null,
+ () -> dpm.setLockTaskFeatures(who, flags));
+ }
+
public void testLockTaskPolicyAllowedForAffiliatedUsers() throws Exception {
// Setup a device owner.
mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID;
setupDeviceOwner();
// Lock task policy is updated when loading user data.
- verify(getServices().iactivityManager).updateLockTaskPackages(
- UserHandle.USER_SYSTEM, new String[0]);
- verify(getServices().iactivityManager).updateLockTaskFeatures(
- UserHandle.USER_SYSTEM, DevicePolicyManager.LOCK_TASK_FEATURE_NONE);
+ verifyLockTaskState(UserHandle.USER_SYSTEM);
// Set up a managed profile managed by different package (package name shouldn't matter)
final int MANAGED_PROFILE_USER_ID = 15;
@@ -3668,40 +3755,30 @@
final ComponentName adminDifferentPackage =
new ComponentName("another.package", "whatever.class");
addManagedProfile(adminDifferentPackage, MANAGED_PROFILE_ADMIN_UID, admin2);
- verify(getServices().iactivityManager).updateLockTaskPackages(
- MANAGED_PROFILE_USER_ID, new String[0]);
- verify(getServices().iactivityManager).updateLockTaskFeatures(
- MANAGED_PROFILE_USER_ID, DevicePolicyManager.LOCK_TASK_FEATURE_NONE);
+ verifyLockTaskState(MANAGED_PROFILE_USER_ID);
+
+ // Setup a PO on the secondary user
+ mContext.binder.callingUid = DpmMockContext.CALLER_UID;
+ setAsProfileOwner(admin3);
+ verifyLockTaskState(DpmMockContext.CALLER_USER_HANDLE);
// The DO can still set lock task packages
- mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID;
final String[] doPackages = {"doPackage1", "doPackage2"};
- dpm.setLockTaskPackages(admin1, doPackages);
- MoreAsserts.assertEquals(doPackages, dpm.getLockTaskPackages(admin1));
- assertTrue(dpm.isLockTaskPermitted("doPackage1"));
- assertFalse(dpm.isLockTaskPermitted("anotherPackage"));
- verify(getServices().iactivityManager).updateLockTaskPackages(
- UserHandle.USER_SYSTEM, doPackages);
- // And the DO can still set lock task features
- final int doFlags = DevicePolicyManager.LOCK_TASK_FEATURE_NOTIFICATIONS
+ final int flags = DevicePolicyManager.LOCK_TASK_FEATURE_NOTIFICATIONS
| DevicePolicyManager.LOCK_TASK_FEATURE_RECENTS;
- dpm.setLockTaskFeatures(admin1, doFlags);
- verify(getServices().iactivityManager).updateLockTaskFeatures(
- UserHandle.USER_SYSTEM, doFlags);
+ verifyCanSetLockTask(DpmMockContext.CALLER_SYSTEM_USER_UID, UserHandle.USER_SYSTEM, admin1, doPackages, flags);
+
+ final String[] secondaryPoPackages = {"secondaryPoPackage1", "secondaryPoPackage2"};
+ final int secondaryPoFlags = DevicePolicyManager.LOCK_TASK_FEATURE_NOTIFICATIONS
+ | DevicePolicyManager.LOCK_TASK_FEATURE_RECENTS;
+ verifyCanNotSetLockTask(DpmMockContext.CALLER_UID, admin3, secondaryPoPackages, secondaryPoFlags);
// Managed profile is unaffiliated - shouldn't be able to setLockTaskPackages.
mContext.binder.callingUid = MANAGED_PROFILE_ADMIN_UID;
final String[] poPackages = {"poPackage1", "poPackage2"};
- assertExpectException(SecurityException.class, /* messageRegex =*/ null,
- () -> dpm.setLockTaskPackages(adminDifferentPackage, poPackages));
- assertExpectException(SecurityException.class, /* messageRegex =*/ null,
- () -> dpm.getLockTaskPackages(adminDifferentPackage));
- assertFalse(dpm.isLockTaskPermitted("doPackage1"));
- // And it shouldn't be able to setLockTaskFeatures.
final int poFlags = DevicePolicyManager.LOCK_TASK_FEATURE_NOTIFICATIONS
| DevicePolicyManager.LOCK_TASK_FEATURE_RECENTS;
- assertExpectException(SecurityException.class, /* messageRegex =*/ null,
- () -> dpm.setLockTaskFeatures(adminDifferentPackage, poFlags));
+ verifyCanNotSetLockTask(MANAGED_PROFILE_ADMIN_UID, adminDifferentPackage, poPackages, poFlags);
// Setting same affiliation ids
final Set<String> userAffiliationIds = Collections.singleton("some-affiliation-id");
@@ -3716,12 +3793,9 @@
MoreAsserts.assertEquals(poPackages, dpm.getLockTaskPackages(adminDifferentPackage));
assertTrue(dpm.isLockTaskPermitted("poPackage1"));
assertFalse(dpm.isLockTaskPermitted("doPackage2"));
- verify(getServices().iactivityManager).updateLockTaskPackages(
- MANAGED_PROFILE_USER_ID, poPackages);
// And it can set lock task features.
dpm.setLockTaskFeatures(adminDifferentPackage, poFlags);
- verify(getServices().iactivityManager).updateLockTaskFeatures(
- MANAGED_PROFILE_USER_ID, poFlags);
+ verifyLockTaskState(MANAGED_PROFILE_USER_ID, poPackages, poFlags);
// Unaffiliate the profile, lock task mode no longer available on the profile.
dpm.setAffiliationIds(adminDifferentPackage, Collections.emptySet());
@@ -3732,8 +3806,38 @@
verify(getServices().iactivityManager, times(2)).updateLockTaskFeatures(
MANAGED_PROFILE_USER_ID, DevicePolicyManager.LOCK_TASK_FEATURE_NONE);
+ // Verify that lock task packages were not cleared for the DO
mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID;
assertTrue(dpm.isLockTaskPermitted("doPackage1"));
+
+ }
+
+ public void testLockTaskPolicyForProfileOwner() throws Exception {
+ // Setup a PO
+ mContext.binder.callingUid = DpmMockContext.CALLER_UID;
+ setAsProfileOwner(admin1);
+ verifyLockTaskState(DpmMockContext.CALLER_USER_HANDLE);
+
+ final String[] poPackages = {"poPackage1", "poPackage2"};
+ final int poFlags = DevicePolicyManager.LOCK_TASK_FEATURE_NOTIFICATIONS
+ | DevicePolicyManager.LOCK_TASK_FEATURE_RECENTS;
+ verifyCanSetLockTask(DpmMockContext.CALLER_UID, DpmMockContext.CALLER_USER_HANDLE, admin1,
+ poPackages, poFlags);
+
+ // Set up a managed profile managed by different package (package name shouldn't matter)
+ final int MANAGED_PROFILE_USER_ID = 15;
+ final int MANAGED_PROFILE_ADMIN_UID = UserHandle.getUid(MANAGED_PROFILE_USER_ID, 20456);
+ final ComponentName adminDifferentPackage =
+ new ComponentName("another.package", "whatever.class");
+ addManagedProfile(adminDifferentPackage, MANAGED_PROFILE_ADMIN_UID, admin2);
+ verifyLockTaskState(MANAGED_PROFILE_USER_ID);
+
+ // Managed profile is unaffiliated - shouldn't be able to setLockTaskPackages.
+ mContext.binder.callingUid = MANAGED_PROFILE_ADMIN_UID;
+ final String[] mpoPackages = {"poPackage1", "poPackage2"};
+ final int mpoFlags = DevicePolicyManager.LOCK_TASK_FEATURE_NOTIFICATIONS
+ | DevicePolicyManager.LOCK_TASK_FEATURE_RECENTS;
+ verifyCanNotSetLockTask(MANAGED_PROFILE_ADMIN_UID, adminDifferentPackage, mpoPackages, mpoFlags);
}
public void testIsDeviceManaged() throws Exception {
@@ -4610,6 +4714,23 @@
MockUtils.checkUserHandle(UserHandle.USER_SYSTEM));
}
+ public void testOverrideApnAPIsFailWithPO() throws Exception {
+ setupProfileOwner();
+ ApnSetting apn = (new ApnSetting.Builder()).build();
+ assertExpectException(SecurityException.class, null, () ->
+ dpm.addOverrideApn(admin1, apn));
+ assertExpectException(SecurityException.class, null, () ->
+ dpm.updateOverrideApn(admin1, 0, apn));
+ assertExpectException(SecurityException.class, null, () ->
+ dpm.removeOverrideApn(admin1, 0));
+ assertExpectException(SecurityException.class, null, () ->
+ dpm.getOverrideApns(admin1));
+ assertExpectException(SecurityException.class, null, () ->
+ dpm.setOverrideApnsEnabled(admin1, false));
+ assertExpectException(SecurityException.class, null, () ->
+ dpm.isOverrideApnEnabled(admin1));
+ }
+
private void verifyCanGetOwnerInstalledCaCerts(
final ComponentName caller, final DpmMockContext callerContext) throws Exception {
final String alias = "cert";
@@ -4768,6 +4889,176 @@
AttestationUtils.ID_TYPE_MEID});
}
+ public void testRevertDeviceOwnership_noMetadataFile() throws Exception {
+ setDeviceOwner();
+ initializeDpms();
+ assertFalse(getMockTransferMetadataManager().metadataFileExists());
+ assertTrue(dpms.isDeviceOwner(admin1, UserHandle.USER_SYSTEM));
+ assertTrue(dpms.isAdminActive(admin1, UserHandle.USER_SYSTEM));
+ }
+
+ public void testRevertDeviceOwnership_adminAndDeviceMigrated() throws Exception {
+ DpmTestUtils.writeInputStreamToFile(
+ getRawStream(com.android.frameworks.servicestests.R.raw.active_admin_migrated),
+ getDeviceOwnerPoliciesFile());
+ DpmTestUtils.writeInputStreamToFile(
+ getRawStream(com.android.frameworks.servicestests.R.raw.device_owner_migrated),
+ getDeviceOwnerFile());
+ assertDeviceOwnershipRevertedWithFakeTransferMetadata();
+ }
+
+ public void testRevertDeviceOwnership_deviceNotMigrated()
+ throws Exception {
+ DpmTestUtils.writeInputStreamToFile(
+ getRawStream(com.android.frameworks.servicestests.R.raw.active_admin_migrated),
+ getDeviceOwnerPoliciesFile());
+ DpmTestUtils.writeInputStreamToFile(
+ getRawStream(com.android.frameworks.servicestests.R.raw.device_owner_not_migrated),
+ getDeviceOwnerFile());
+ assertDeviceOwnershipRevertedWithFakeTransferMetadata();
+ }
+
+ public void testRevertDeviceOwnership_adminAndDeviceNotMigrated()
+ throws Exception {
+ DpmTestUtils.writeInputStreamToFile(
+ getRawStream(com.android.frameworks.servicestests.R.raw.active_admin_not_migrated),
+ getDeviceOwnerPoliciesFile());
+ DpmTestUtils.writeInputStreamToFile(
+ getRawStream(com.android.frameworks.servicestests.R.raw.device_owner_not_migrated),
+ getDeviceOwnerFile());
+ assertDeviceOwnershipRevertedWithFakeTransferMetadata();
+ }
+
+ public void testRevertProfileOwnership_noMetadataFile() throws Exception {
+ setupProfileOwner();
+ initializeDpms();
+ assertFalse(getMockTransferMetadataManager().metadataFileExists());
+ assertTrue(dpms.isProfileOwner(admin1, DpmMockContext.CALLER_USER_HANDLE));
+ assertTrue(dpms.isAdminActive(admin1, DpmMockContext.CALLER_USER_HANDLE));
+ UserHandle userHandle = UserHandle.of(DpmMockContext.CALLER_USER_HANDLE);
+ }
+
+ public void testRevertProfileOwnership_adminAndProfileMigrated() throws Exception {
+ getServices().addUser(DpmMockContext.CALLER_USER_HANDLE, UserInfo.FLAG_MANAGED_PROFILE,
+ UserHandle.USER_SYSTEM);
+ DpmTestUtils.writeInputStreamToFile(
+ getRawStream(com.android.frameworks.servicestests.R.raw.active_admin_migrated),
+ getProfileOwnerPoliciesFile());
+ DpmTestUtils.writeInputStreamToFile(
+ getRawStream(com.android.frameworks.servicestests.R.raw.profile_owner_migrated),
+ getProfileOwnerFile());
+ assertProfileOwnershipRevertedWithFakeTransferMetadata();
+ }
+
+ public void testRevertProfileOwnership_profileNotMigrated() throws Exception {
+ getServices().addUser(DpmMockContext.CALLER_USER_HANDLE, UserInfo.FLAG_MANAGED_PROFILE,
+ UserHandle.USER_SYSTEM);
+ DpmTestUtils.writeInputStreamToFile(
+ getRawStream(com.android.frameworks.servicestests.R.raw.active_admin_migrated),
+ getProfileOwnerPoliciesFile());
+ DpmTestUtils.writeInputStreamToFile(
+ getRawStream(com.android.frameworks.servicestests.R.raw.profile_owner_not_migrated),
+ getProfileOwnerFile());
+ assertProfileOwnershipRevertedWithFakeTransferMetadata();
+ }
+
+ public void testRevertProfileOwnership_adminAndProfileNotMigrated() throws Exception {
+ getServices().addUser(DpmMockContext.CALLER_USER_HANDLE, UserInfo.FLAG_MANAGED_PROFILE,
+ UserHandle.USER_SYSTEM);
+ DpmTestUtils.writeInputStreamToFile(
+ getRawStream(com.android.frameworks.servicestests.R.raw.active_admin_not_migrated),
+ getProfileOwnerPoliciesFile());
+ DpmTestUtils.writeInputStreamToFile(
+ getRawStream(com.android.frameworks.servicestests.R.raw.profile_owner_not_migrated),
+ getProfileOwnerFile());
+ assertProfileOwnershipRevertedWithFakeTransferMetadata();
+ }
+
+ // admin1 is the outgoing DPC, adminAnotherPakcage is the incoming one.
+ private void assertDeviceOwnershipRevertedWithFakeTransferMetadata() throws Exception {
+ writeFakeTransferMetadataFile(UserHandle.USER_SYSTEM,
+ TransferOwnershipMetadataManager.ADMIN_TYPE_DEVICE_OWNER);
+
+ final long ident = mServiceContext.binder.clearCallingIdentity();
+ setUpPackageManagerForAdmin(admin1, DpmMockContext.CALLER_SYSTEM_USER_UID);
+ setUpPackageManagerForFakeAdmin(adminAnotherPackage,
+ DpmMockContext.CALLER_SYSTEM_USER_UID, admin1);
+ // To simulate a reboot, we just reinitialize dpms and call systemReady
+ initializeDpms();
+
+ assertTrue(dpm.isDeviceOwnerApp(admin1.getPackageName()));
+ assertFalse(dpm.isDeviceOwnerApp(adminAnotherPackage.getPackageName()));
+ assertFalse(dpm.isAdminActive(adminAnotherPackage));
+ assertTrue(dpm.isAdminActive(admin1));
+ assertTrue(dpm.isDeviceOwnerAppOnCallingUser(admin1.getPackageName()));
+ assertEquals(admin1, dpm.getDeviceOwnerComponentOnCallingUser());
+
+ assertTrue(dpm.isDeviceOwnerAppOnAnyUser(admin1.getPackageName()));
+ assertEquals(admin1, dpm.getDeviceOwnerComponentOnAnyUser());
+ assertEquals(UserHandle.USER_SYSTEM, dpm.getDeviceOwnerUserId());
+ assertFalse(getMockTransferMetadataManager().metadataFileExists());
+
+ mServiceContext.binder.restoreCallingIdentity(ident);
+ }
+
+ // admin1 is the outgoing DPC, adminAnotherPakcage is the incoming one.
+ private void assertProfileOwnershipRevertedWithFakeTransferMetadata() throws Exception {
+ writeFakeTransferMetadataFile(DpmMockContext.CALLER_USER_HANDLE,
+ TransferOwnershipMetadataManager.ADMIN_TYPE_PROFILE_OWNER);
+
+ int uid = UserHandle.getUid(DpmMockContext.CALLER_USER_HANDLE,
+ DpmMockContext.CALLER_SYSTEM_USER_UID);
+ setUpPackageManagerForAdmin(admin1, uid);
+ setUpPackageManagerForFakeAdmin(adminAnotherPackage, uid, admin1);
+ // To simulate a reboot, we just reinitialize dpms and call systemReady
+ initializeDpms();
+
+ assertTrue(dpm.isProfileOwnerApp(admin1.getPackageName()));
+ assertTrue(dpm.isAdminActive(admin1));
+ assertFalse(dpm.isProfileOwnerApp(adminAnotherPackage.getPackageName()));
+ assertFalse(dpm.isAdminActive(adminAnotherPackage));
+ assertEquals(dpm.getProfileOwnerAsUser(DpmMockContext.CALLER_USER_HANDLE), admin1);
+ assertFalse(getMockTransferMetadataManager().metadataFileExists());
+ }
+
+ private void writeFakeTransferMetadataFile(int callerUserHandle, String adminType) {
+ TransferOwnershipMetadataManager metadataManager = getMockTransferMetadataManager();
+ metadataManager.deleteMetadataFile();
+
+ final TransferOwnershipMetadataManager.Metadata metadata =
+ new TransferOwnershipMetadataManager.Metadata(
+ admin1.flattenToString(), adminAnotherPackage.flattenToString(),
+ callerUserHandle,
+ adminType);
+ metadataManager.saveMetadataFile(metadata);
+ }
+
+ private File getDeviceOwnerFile() {
+ return dpms.mOwners.getDeviceOwnerFile();
+ }
+
+ private File getProfileOwnerFile() {
+ return dpms.mOwners.getProfileOwnerFile(DpmMockContext.CALLER_USER_HANDLE);
+ }
+
+ private File getProfileOwnerPoliciesFile() {
+ File parentDir = dpms.mMockInjector.environmentGetUserSystemDirectory(
+ DpmMockContext.CALLER_USER_HANDLE);
+ return getPoliciesFile(parentDir);
+ }
+
+ private File getDeviceOwnerPoliciesFile() {
+ return getPoliciesFile(getServices().systemUserDataDir);
+ }
+
+ private File getPoliciesFile(File parentDir) {
+ return new File(parentDir, "device_policies.xml");
+ }
+
+ private InputStream getRawStream(@RawRes int id) {
+ return mRealTestContext.getResources().openRawResource(id);
+ }
+
private void setUserSetupCompleteForUser(boolean isUserSetupComplete, int userhandle) {
when(getServices().settings.settingsSecureGetIntForUser(Settings.Secure.USER_SETUP_COMPLETE, 0,
userhandle)).thenReturn(isUserSetupComplete ? 1 : 0);
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestUtils.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestUtils.java
index cceb2d2..2882b88 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestUtils.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestUtils.java
@@ -16,9 +16,6 @@
package com.android.server.devicepolicy;
-import com.google.android.collect.Lists;
-import com.google.android.collect.Sets;
-
import android.content.Context;
import android.os.Bundle;
import android.os.FileUtils;
@@ -28,21 +25,25 @@
import android.util.Log;
import android.util.Printer;
+import libcore.io.Streams;
+
+import com.google.android.collect.Lists;
+
+import junit.framework.AssertionFailedError;
+
import org.junit.Assert;
import java.io.BufferedReader;
import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
+import java.io.InputStream;
import java.io.InputStreamReader;
-import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import java.util.Objects;
-import java.util.Set;
-
-import junit.framework.AssertionFailedError;
public class DpmTestUtils extends AndroidTestCase {
public static void clearDir(File dir) {
@@ -136,6 +137,11 @@
}
}
+ public static void writeInputStreamToFile(InputStream stream, File file)
+ throws IOException {
+ Streams.copy(stream, new FileOutputStream(file));
+ }
+
private static boolean checkAssertRestrictions(Bundle a, Bundle b) {
try {
assertRestrictions(a, b);
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/MockSystemServices.java b/services/tests/servicestests/src/com/android/server/devicepolicy/MockSystemServices.java
index 0343a52..34c69f5 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/MockSystemServices.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/MockSystemServices.java
@@ -32,6 +32,7 @@
import android.app.backup.IBackupManager;
import android.app.usage.UsageStatsManagerInternal;
import android.content.BroadcastReceiver;
+import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
@@ -39,8 +40,10 @@
import android.content.pm.PackageManager;
import android.content.pm.PackageManagerInternal;
import android.content.pm.UserInfo;
+import android.database.Cursor;
import android.media.IAudioService;
import android.net.IIpConnectivityMetrics;
+import android.net.Uri;
import android.net.wifi.WifiManager;
import android.os.Handler;
import android.os.PowerManager;
@@ -51,6 +54,7 @@
import android.provider.Settings;
import android.security.KeyChain;
import android.telephony.TelephonyManager;
+import android.test.mock.MockContentProvider;
import android.test.mock.MockContentResolver;
import android.util.ArrayMap;
import android.util.Pair;
@@ -144,6 +148,23 @@
packageManager = spy(realContext.getPackageManager());
contentResolver = new MockContentResolver();
+ contentResolver.addProvider("telephony", new MockContentProvider(realContext) {
+ @Override
+ public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
+ return 0;
+ }
+
+ @Override
+ public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
+ String sortOrder) {
+ return null;
+ }
+
+ @Override
+ public int delete(Uri uri, String selection, String[] selectionArgs) {
+ return 0;
+ }
+ });
contentResolver.addProvider(Settings.AUTHORITY, new FakeSettingsProvider());
// Add the system user with a fake profile group already set up (this can happen in the real
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 85835f7..cb6a747 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/OwnersTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/OwnersTest.java
@@ -42,21 +42,21 @@
{
final OwnersTestable owners = new OwnersTestable(getServices());
- DpmTestUtils.writeToFile(owners.getLegacyConfigFileWithTestOverride(),
+ DpmTestUtils.writeToFile(owners.getLegacyConfigFile(),
DpmTestUtils.readAsset(mRealTestContext, "OwnersTest/test01/input.xml"));
owners.load();
// The legacy file should be removed.
- assertFalse(owners.getLegacyConfigFileWithTestOverride().exists());
+ assertFalse(owners.getLegacyConfigFile().exists());
// File was empty, so no new files should be created.
- assertFalse(owners.getDeviceOwnerFileWithTestOverride().exists());
+ assertFalse(owners.getDeviceOwnerFile().exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(10).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(11).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(20).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(21).exists());
+ assertFalse(owners.getProfileOwnerFile(10).exists());
+ assertFalse(owners.getProfileOwnerFile(11).exists());
+ assertFalse(owners.getProfileOwnerFile(20).exists());
+ assertFalse(owners.getProfileOwnerFile(21).exists());
assertFalse(owners.hasDeviceOwner());
assertEquals(UserHandle.USER_NULL, owners.getDeviceOwnerUserId());
@@ -95,20 +95,20 @@
{
final OwnersTestable owners = new OwnersTestable(getServices());
- DpmTestUtils.writeToFile(owners.getLegacyConfigFileWithTestOverride(),
+ DpmTestUtils.writeToFile(owners.getLegacyConfigFile(),
DpmTestUtils.readAsset(mRealTestContext, "OwnersTest/test02/input.xml"));
owners.load();
// The legacy file should be removed.
- assertFalse(owners.getLegacyConfigFileWithTestOverride().exists());
+ assertFalse(owners.getLegacyConfigFile().exists());
- assertTrue(owners.getDeviceOwnerFileWithTestOverride().exists()); // TODO Check content
+ assertTrue(owners.getDeviceOwnerFile().exists()); // TODO Check content
- assertFalse(owners.getProfileOwnerFileWithTestOverride(10).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(11).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(20).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(21).exists());
+ assertFalse(owners.getProfileOwnerFile(10).exists());
+ assertFalse(owners.getProfileOwnerFile(11).exists());
+ assertFalse(owners.getProfileOwnerFile(20).exists());
+ assertFalse(owners.getProfileOwnerFile(21).exists());
assertTrue(owners.hasDeviceOwner());
assertEquals(null, owners.getDeviceOwnerName());
@@ -153,20 +153,20 @@
{
final OwnersTestable owners = new OwnersTestable(getServices());
- DpmTestUtils.writeToFile(owners.getLegacyConfigFileWithTestOverride(),
+ DpmTestUtils.writeToFile(owners.getLegacyConfigFile(),
DpmTestUtils.readAsset(mRealTestContext, "OwnersTest/test03/input.xml"));
owners.load();
// The legacy file should be removed.
- assertFalse(owners.getLegacyConfigFileWithTestOverride().exists());
+ assertFalse(owners.getLegacyConfigFile().exists());
- assertFalse(owners.getDeviceOwnerFileWithTestOverride().exists());
+ assertFalse(owners.getDeviceOwnerFile().exists());
- assertTrue(owners.getProfileOwnerFileWithTestOverride(10).exists());
- assertTrue(owners.getProfileOwnerFileWithTestOverride(11).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(20).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(21).exists());
+ assertTrue(owners.getProfileOwnerFile(10).exists());
+ assertTrue(owners.getProfileOwnerFile(11).exists());
+ assertFalse(owners.getProfileOwnerFile(20).exists());
+ assertFalse(owners.getProfileOwnerFile(21).exists());
assertFalse(owners.hasDeviceOwner());
assertEquals(UserHandle.USER_NULL, owners.getDeviceOwnerUserId());
@@ -231,20 +231,20 @@
{
final OwnersTestable owners = new OwnersTestable(getServices());
- DpmTestUtils.writeToFile(owners.getLegacyConfigFileWithTestOverride(),
+ DpmTestUtils.writeToFile(owners.getLegacyConfigFile(),
DpmTestUtils.readAsset(mRealTestContext, "OwnersTest/test04/input.xml"));
owners.load();
// The legacy file should be removed.
- assertFalse(owners.getLegacyConfigFileWithTestOverride().exists());
+ assertFalse(owners.getLegacyConfigFile().exists());
- assertTrue(owners.getDeviceOwnerFileWithTestOverride().exists());
+ assertTrue(owners.getDeviceOwnerFile().exists());
- assertTrue(owners.getProfileOwnerFileWithTestOverride(10).exists());
- assertTrue(owners.getProfileOwnerFileWithTestOverride(11).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(20).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(21).exists());
+ assertTrue(owners.getProfileOwnerFile(10).exists());
+ assertTrue(owners.getProfileOwnerFile(11).exists());
+ assertFalse(owners.getProfileOwnerFile(20).exists());
+ assertFalse(owners.getProfileOwnerFile(21).exists());
assertTrue(owners.hasDeviceOwner());
assertEquals(null, owners.getDeviceOwnerName());
@@ -341,20 +341,20 @@
{
final OwnersTestable owners = new OwnersTestable(getServices());
- DpmTestUtils.writeToFile(owners.getLegacyConfigFileWithTestOverride(),
+ DpmTestUtils.writeToFile(owners.getLegacyConfigFile(),
DpmTestUtils.readAsset(mRealTestContext, "OwnersTest/test05/input.xml"));
owners.load();
// The legacy file should be removed.
- assertFalse(owners.getLegacyConfigFileWithTestOverride().exists());
+ assertFalse(owners.getLegacyConfigFile().exists());
// Note device initializer is no longer supported. No need to write the DO file.
- assertFalse(owners.getDeviceOwnerFileWithTestOverride().exists());
+ assertFalse(owners.getDeviceOwnerFile().exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(10).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(11).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(20).exists());
+ assertFalse(owners.getProfileOwnerFile(10).exists());
+ assertFalse(owners.getProfileOwnerFile(11).exists());
+ assertFalse(owners.getProfileOwnerFile(20).exists());
assertFalse(owners.hasDeviceOwner());
assertEquals(UserHandle.USER_NULL, owners.getDeviceOwnerUserId());
@@ -397,19 +397,19 @@
{
final OwnersTestable owners = new OwnersTestable(getServices());
- DpmTestUtils.writeToFile(owners.getLegacyConfigFileWithTestOverride(),
+ DpmTestUtils.writeToFile(owners.getLegacyConfigFile(),
DpmTestUtils.readAsset(mRealTestContext, "OwnersTest/test06/input.xml"));
owners.load();
// The legacy file should be removed.
- assertFalse(owners.getLegacyConfigFileWithTestOverride().exists());
+ assertFalse(owners.getLegacyConfigFile().exists());
- assertTrue(owners.getDeviceOwnerFileWithTestOverride().exists());
+ assertTrue(owners.getDeviceOwnerFile().exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(10).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(11).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(20).exists());
+ assertFalse(owners.getProfileOwnerFile(10).exists());
+ assertFalse(owners.getProfileOwnerFile(11).exists());
+ assertFalse(owners.getProfileOwnerFile(20).exists());
assertFalse(owners.hasDeviceOwner());
assertEquals(UserHandle.USER_NULL, owners.getDeviceOwnerUserId());
@@ -451,16 +451,16 @@
final OwnersTestable owners = new OwnersTestable(getServices());
// First, migrate to create new-style config files.
- DpmTestUtils.writeToFile(owners.getLegacyConfigFileWithTestOverride(),
+ DpmTestUtils.writeToFile(owners.getLegacyConfigFile(),
DpmTestUtils.readAsset(mRealTestContext, "OwnersTest/test04/input.xml"));
owners.load();
- assertFalse(owners.getLegacyConfigFileWithTestOverride().exists());
+ assertFalse(owners.getLegacyConfigFile().exists());
- assertTrue(owners.getDeviceOwnerFileWithTestOverride().exists());
- assertTrue(owners.getProfileOwnerFileWithTestOverride(10).exists());
- assertTrue(owners.getProfileOwnerFileWithTestOverride(11).exists());
+ assertTrue(owners.getDeviceOwnerFile().exists());
+ assertTrue(owners.getProfileOwnerFile(10).exists());
+ assertTrue(owners.getProfileOwnerFile(11).exists());
// Then clear all information and save.
owners.clearDeviceOwner();
@@ -475,8 +475,8 @@
owners.writeProfileOwner(21);
// Now all files should be removed.
- assertFalse(owners.getDeviceOwnerFileWithTestOverride().exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(10).exists());
- assertFalse(owners.getProfileOwnerFileWithTestOverride(11).exists());
+ assertFalse(owners.getDeviceOwnerFile().exists());
+ assertFalse(owners.getProfileOwnerFile(10).exists());
+ assertFalse(owners.getProfileOwnerFile(11).exists());
}
}
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/SystemUpdatePolicyTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/SystemUpdatePolicyTest.java
new file mode 100644
index 0000000..98c428d
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/SystemUpdatePolicyTest.java
@@ -0,0 +1,371 @@
+/*
+ * 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.devicepolicy;
+
+import static android.app.admin.SystemUpdatePolicy.ValidationFailedException.ERROR_COMBINED_FREEZE_PERIOD_TOO_CLOSE;
+import static android.app.admin.SystemUpdatePolicy.ValidationFailedException.ERROR_COMBINED_FREEZE_PERIOD_TOO_LONG;
+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;
+
+import android.app.admin.FreezeInterval;
+import android.app.admin.SystemUpdatePolicy;
+import android.os.Parcel;
+import android.support.test.runner.AndroidJUnit4;
+import android.util.Pair;
+import android.util.Xml;
+
+import com.android.internal.util.FastXmlSerializer;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlSerializer;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
+import java.time.LocalDate;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Unit tests for {@link android.app.admin.SystemUpdatePolicy}.
+ * Throughout this test, we use "MM-DD" format to denote dates without year.
+ *
+ * atest com.android.server.devicepolicy.SystemUpdatePolicyTest
+ * runtest -c com.android.server.devicepolicy.SystemUpdatePolicyTest frameworks-services
+ */
+@RunWith(AndroidJUnit4.class)
+public final class SystemUpdatePolicyTest {
+
+ private static final int DUPLICATE_OR_OVERLAP = ERROR_DUPLICATE_OR_OVERLAP;
+ private static final int TOO_LONG = ERROR_NEW_FREEZE_PERIOD_TOO_LONG;
+ private static final int TOO_CLOSE = ERROR_NEW_FREEZE_PERIOD_TOO_CLOSE;
+ private static final int COMBINED_TOO_LONG = ERROR_COMBINED_FREEZE_PERIOD_TOO_LONG;
+ private static final int COMBINED_TOO_CLOSE = ERROR_COMBINED_FREEZE_PERIOD_TOO_CLOSE;
+
+ @Test
+ public void testSimplePeriod() throws Exception {
+ testFreezePeriodsSucceeds("01-01", "01-02");
+ testFreezePeriodsSucceeds("01-31", "01-31");
+ testFreezePeriodsSucceeds("11-01", "01-15");
+ testFreezePeriodsSucceeds("02-01", "02-29"); // Leap year
+ testFreezePeriodsSucceeds("02-01", "03-01");
+ testFreezePeriodsSucceeds("12-01", "01-30"); // Wrapped Period
+ testFreezePeriodsSucceeds("11-02", "01-30", "04-01", "04-30"); // Wrapped Period
+ }
+
+ @Test
+ public void testCanonicalizationValidation() throws Exception {
+ testFreezePeriodsSucceeds("03-01", "03-31", "09-01", "09-30");
+ testFreezePeriodsSucceeds("06-01", "07-01", "09-01", "09-30");
+ testFreezePeriodsSucceeds("10-01", "10-31", "12-31", "01-31");
+ testFreezePeriodsSucceeds("01-01", "01-30", "04-01", "04-30");
+ testFreezePeriodsSucceeds("01-01", "02-28", "05-01", "06-30", "09-01", "10-31");
+
+ // One interval fully covers the other
+ testFreezePeriodsFails(DUPLICATE_OR_OVERLAP, "03-01", "03-31", "03-15", "03-31");
+ testFreezePeriodsFails(DUPLICATE_OR_OVERLAP, "03-01", "03-31", "03-15", "03-16");
+ testFreezePeriodsFails(DUPLICATE_OR_OVERLAP, "11-15", "01-31", "12-01", "12-31");
+ testFreezePeriodsFails(DUPLICATE_OR_OVERLAP, "12-01", "01-31", "01-01", "01-15");
+
+ // Partial overlap
+ testFreezePeriodsFails(DUPLICATE_OR_OVERLAP, "03-01", "03-31", "03-15", "01-01");
+ testFreezePeriodsFails(DUPLICATE_OR_OVERLAP, "11-15", "01-31", "12-01", "02-28");
+
+ // No gap between two intervals
+ testFreezePeriodsFails(DUPLICATE_OR_OVERLAP, "01-31", "01-31", "02-01", "02-01");
+ testFreezePeriodsFails(DUPLICATE_OR_OVERLAP, "12-01", "12-15", "12-15", "02-01");
+ testFreezePeriodsFails(DUPLICATE_OR_OVERLAP, "12-01", "12-15", "12-16", "02-01");
+ testFreezePeriodsFails(DUPLICATE_OR_OVERLAP, "12-01", "01-15", "01-15", "02-01");
+ testFreezePeriodsFails(DUPLICATE_OR_OVERLAP, "12-01", "01-15", "01-16", "02-01");
+ testFreezePeriodsFails(DUPLICATE_OR_OVERLAP, "01-01", "01-30", "12-01", "12-31");
+ testFreezePeriodsFails(DUPLICATE_OR_OVERLAP, "12-01", "12-31", "04-01", "04-01",
+ "01-01", "01-30");
+ }
+
+ @Test
+ public void testLengthValidation() throws Exception {
+ testFreezePeriodsSucceeds("03-01", "03-31");
+ testFreezePeriodsSucceeds("03-03", "03-03", "12-31", "01-01");
+ testFreezePeriodsSucceeds("01-01", "03-31", "06-01", "08-29");
+ // entire year
+ testFreezePeriodsFails(TOO_LONG, "01-01", "12-31");
+ // long period spanning across year end
+ testFreezePeriodsSucceeds("11-01", "01-29");
+ testFreezePeriodsFails(TOO_LONG, "11-01", "01-30");
+ // Leap year handling
+ testFreezePeriodsSucceeds("12-01", "02-28");
+ testFreezePeriodsSucceeds("12-01", "02-29");
+ testFreezePeriodsFails(TOO_LONG, "12-01", "03-01");
+ // Regular long period
+ testFreezePeriodsSucceeds("01-01", "03-31", "06-01", "08-29");
+ testFreezePeriodsFails(TOO_LONG, "01-01", "03-31", "06-01", "08-30");
+ }
+
+ @Test
+ public void testSeparationValidation() throws Exception {
+ testFreezePeriodsSucceeds("01-01", "03-31", "06-01", "08-29");
+ testFreezePeriodsFails(TOO_CLOSE, "01-01", "01-01", "01-03", "01-03");
+ testFreezePeriodsFails(TOO_CLOSE, "03-01", "03-31", "05-01", "05-31");
+ // Short interval spans across end of year
+ testFreezePeriodsSucceeds("01-31", "03-01", "11-01", "12-01");
+ testFreezePeriodsFails(TOO_CLOSE, "01-30", "03-01", "11-01", "12-01");
+ // Short separation is after wrapped period
+ testFreezePeriodsSucceeds("03-03", "03-31", "12-31", "01-01");
+ testFreezePeriodsFails(TOO_CLOSE, "03-02", "03-31", "12-31", "01-01");
+ // Short separation including Feb 29
+ testFreezePeriodsSucceeds("12-01", "01-15", "03-17", "04-01");
+ testFreezePeriodsFails(TOO_CLOSE, "12-01", "01-15", "03-16", "04-01");
+ // Short separation including Feb 29
+ testFreezePeriodsSucceeds("01-01", "02-28", "04-30", "06-01");
+ testFreezePeriodsSucceeds("01-01", "02-29", "04-30", "06-01");
+ testFreezePeriodsFails(TOO_CLOSE, "01-01", "03-01", "04-30", "06-01");
+ }
+
+ @Test
+ public void testValidateTotalLengthWithPreviousPeriods() throws Exception {
+ testPrevFreezePeriodSucceeds("2018-01-19", "2018-01-19", /* now */"2018-01-19",
+ "07-01", "07-31", "10-01", "11-30");
+ testPrevFreezePeriodSucceeds("2018-01-01", "2018-01-19", /* now */"2018-01-19",
+ "01-01", "03-30");
+ testPrevFreezePeriodSucceeds("2018-01-01", "2018-02-01", /* now */"2018-02-01",
+ "11-01", "12-31");
+
+ testPrevFreezePeriodSucceeds("2017-11-01", "2018-01-02", /* now */"2018-01-02",
+ "01-01", "01-29");
+ testPrevFreezePeriodFails(COMBINED_TOO_LONG, "2017-11-01", "2018-01-02", "2018-01-02",
+ "01-01", "01-30");
+ testPrevFreezePeriodSucceeds("2017-11-01", "2018-01-02", /* now */"2018-01-01",
+ "01-02", "01-29");
+ testPrevFreezePeriodFails(COMBINED_TOO_LONG, "2017-11-01", "2018-01-02", "2018-01-01",
+ "01-02", "01-30");
+
+ testPrevFreezePeriodSucceeds("2017-11-01", "2017-12-01", /* now */"2017-12-01",
+ "11-15", "01-29");
+ testPrevFreezePeriodFails(COMBINED_TOO_LONG, "2017-11-01", "2017-12-01", "2017-12-01",
+ "11-15", "01-30");
+
+ testPrevFreezePeriodSucceeds("2017-11-01", "2018-01-01", /* now */"2018-01-01",
+ "11-15", "01-29");
+ testPrevFreezePeriodFails(COMBINED_TOO_LONG, "2017-11-01", "2018-01-01", "2018-01-01",
+ "11-15", "01-30");
+
+ testPrevFreezePeriodSucceeds("2018-03-01", "2018-03-31", /* now */"2018-03-31",
+ "04-01", "05-29");
+ testPrevFreezePeriodFails(COMBINED_TOO_LONG, "2018-03-01", "2018-03-31", "2018-03-31",
+ "04-01", "05-30");
+
+ // Leap year handing
+ testPrevFreezePeriodSucceeds("2017-12-01", "2018-01-02", /* now */"2018-01-02",
+ "01-01", "02-28");
+ testPrevFreezePeriodSucceeds("2017-12-01", "2018-01-02", /* now */"2018-01-02",
+ "01-01", "02-29");
+ testPrevFreezePeriodFails(COMBINED_TOO_LONG, "2017-12-01", "2018-01-02", "2018-01-02",
+ "01-01", "03-01");
+
+ testPrevFreezePeriodSucceeds("2016-01-01", "2016-02-28", /* now */"2016-02-28",
+ "02-01", "03-31");
+ testPrevFreezePeriodSucceeds("2016-01-01", "2016-02-28", /* now */"2016-02-29",
+ "02-01", "03-31");
+ testPrevFreezePeriodFails(COMBINED_TOO_LONG, "2016-01-01", "2016-02-28", "2016-02-29",
+ "02-01", "04-01");
+
+ }
+
+ @Test
+ public void testValidateSeparationWithPreviousPeriods() throws Exception {
+ testPrevFreezePeriodSucceeds("2018-01-01", "2018-01-02", /* now */"2018-03-04",
+ "01-01", "03-30");
+ testPrevFreezePeriodSucceeds("2018-01-01", "2018-01-02", /* now */"2018-01-19",
+ "04-01", "06-29");
+ testPrevFreezePeriodSucceeds("2017-01-01", "2017-03-30", /* now */"2018-12-01",
+ "01-01", "03-30");
+
+ testPrevFreezePeriodSucceeds("2018-01-01", "2018-02-01", "2018-02-01",
+ "04-03", "06-01");
+ testPrevFreezePeriodFails(COMBINED_TOO_CLOSE, "2018-01-01", "2018-02-01", "2018-02-01",
+ "04-02", "06-01");
+
+ testPrevFreezePeriodSucceeds("2018-04-01", "2018-06-01", "2018-08-01",
+ "07-01", "08-30");
+ testPrevFreezePeriodFails(COMBINED_TOO_CLOSE, "2018-04-01", "2018-06-01", "2018-07-30",
+ "07-01", "08-30");
+
+
+ testPrevFreezePeriodSucceeds("2018-03-01", "2018-04-01", "2018-06-01",
+ "05-01", "07-01");
+ testPrevFreezePeriodFails(COMBINED_TOO_CLOSE, "2018-03-01", "2018-04-01", "2018-05-31",
+ "05-01", "07-01");
+ }
+
+ @Test
+ public void testDistanceWithoutLeapYear() {
+ assertEquals(364, FreezeInterval.distanceWithoutLeapYear(
+ LocalDate.of(2016, 12, 31), LocalDate.of(2016, 1, 1)));
+ assertEquals(365, FreezeInterval.distanceWithoutLeapYear(
+ LocalDate.of(2017, 1, 1), LocalDate.of(2016, 1, 1)));
+ assertEquals(365, FreezeInterval.distanceWithoutLeapYear(
+ LocalDate.of(2017, 2, 28), LocalDate.of(2016, 2, 29)));
+ assertEquals(-365, FreezeInterval.distanceWithoutLeapYear(
+ LocalDate.of(2016, 1, 1), LocalDate.of(2017, 1, 1)));
+ assertEquals(1, FreezeInterval.distanceWithoutLeapYear(
+ LocalDate.of(2016, 3, 1), LocalDate.of(2016, 2, 29)));
+ assertEquals(1, FreezeInterval.distanceWithoutLeapYear(
+ LocalDate.of(2016, 3, 1), LocalDate.of(2016, 2, 28)));
+ assertEquals(0, FreezeInterval.distanceWithoutLeapYear(
+ LocalDate.of(2016, 2, 29), LocalDate.of(2016, 2, 28)));
+ assertEquals(0, FreezeInterval.distanceWithoutLeapYear(
+ LocalDate.of(2016, 2, 28), LocalDate.of(2016, 2, 28)));
+
+ assertEquals(59, FreezeInterval.distanceWithoutLeapYear(
+ LocalDate.of(2016, 3, 1), LocalDate.of(2016, 1, 1)));
+ assertEquals(59, FreezeInterval.distanceWithoutLeapYear(
+ LocalDate.of(2017, 3, 1), LocalDate.of(2017, 1, 1)));
+
+ assertEquals(365 * 40, FreezeInterval.distanceWithoutLeapYear(
+ LocalDate.of(2040, 1, 1), LocalDate.of(2000, 1, 1)));
+
+ assertEquals(365 * 2, FreezeInterval.distanceWithoutLeapYear(
+ LocalDate.of(2019, 3, 1), LocalDate.of(2017, 3, 1)));
+ assertEquals(365 * 2, FreezeInterval.distanceWithoutLeapYear(
+ LocalDate.of(2018, 3, 1), LocalDate.of(2016, 3, 1)));
+ assertEquals(365 * 2, FreezeInterval.distanceWithoutLeapYear(
+ LocalDate.of(2017, 3, 1), LocalDate.of(2015, 3, 1)));
+
+ }
+
+ private void testFreezePeriodsSucceeds(String...dates) throws Exception {
+ SystemUpdatePolicy p = SystemUpdatePolicy.createPostponeInstallPolicy();
+ setFreezePeriods(p, dates);
+ }
+
+ private void testFreezePeriodsFails(int expectedError, String... dates) throws Exception {
+ SystemUpdatePolicy p = SystemUpdatePolicy.createPostponeInstallPolicy();
+ try {
+ setFreezePeriods(p, dates);
+ fail("Invalid periods (" + expectedError + ") not flagged: " + String.join(" ", dates));
+ } catch (SystemUpdatePolicy.ValidationFailedException e) {
+ assertTrue("Exception not expected: " + e.getMessage(),
+ e.getErrorCode() == expectedError);
+ }
+ }
+
+ private void testPrevFreezePeriodSucceeds(String prevStart, String prevEnd, String now,
+ String... dates) throws Exception {
+ createPrevFreezePeriod(prevStart, prevEnd, now, dates);
+ }
+
+ private void testPrevFreezePeriodFails(int expectedError, String prevStart, String prevEnd,
+ String now, String... dates) throws Exception {
+ try {
+ createPrevFreezePeriod(prevStart, prevEnd, now, dates);
+ fail("Invalid period (" + expectedError + ") not flagged: " + String.join(" ", dates));
+ } catch (SystemUpdatePolicy.ValidationFailedException e) {
+ assertTrue("Exception not expected: " + e.getMessage(),
+ e.getErrorCode() == expectedError);
+ }
+ }
+
+ private void createPrevFreezePeriod(String prevStart, String prevEnd, String now,
+ String... dates) throws Exception {
+ SystemUpdatePolicy p = SystemUpdatePolicy.createPostponeInstallPolicy();
+ setFreezePeriods(p, dates);
+ p.validateAgainstPreviousFreezePeriod(parseDate(prevStart), parseDate(prevEnd),
+ parseDate(now));
+ }
+
+ // "MM-DD" format for date
+ private void setFreezePeriods(SystemUpdatePolicy policy, String... dates) throws Exception {
+ List<Pair<Integer, Integer>> periods = new ArrayList<>();
+ LocalDate lastDate = null;
+ for (String date : dates) {
+ LocalDate currentDate = parseDate(date);
+ if (lastDate != null) {
+ periods.add(new Pair<>(lastDate.getDayOfYear(), currentDate.getDayOfYear()));
+ lastDate = null;
+ } else {
+ lastDate = currentDate;
+ }
+ }
+ policy.setFreezePeriods(periods);
+ testSerialization(policy, periods);
+ }
+
+ private void testSerialization(SystemUpdatePolicy policy,
+ List<Pair<Integer, Integer>> expectedPeriods) throws Exception {
+ // Test parcel / unparcel
+ Parcel parcel = Parcel.obtain();
+ policy.writeToParcel(parcel, 0);
+ parcel.setDataPosition(0);
+ SystemUpdatePolicy q = SystemUpdatePolicy.CREATOR.createFromParcel(parcel);
+ checkFreezePeriods(q, expectedPeriods);
+ parcel.recycle();
+
+ // Test XML serialization
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ final XmlSerializer outXml = new FastXmlSerializer();
+ outXml.setOutput(outStream, StandardCharsets.UTF_8.name());
+ outXml.startDocument(null, true);
+ outXml.startTag(null, "ota");
+ policy.saveToXml(outXml);
+ outXml.endTag(null, "ota");
+ outXml.endDocument();
+ outXml.flush();
+
+ ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
+ XmlPullParser parser = Xml.newPullParser();
+ parser.setInput(new InputStreamReader(inStream));
+ assertEquals(XmlPullParser.START_TAG, parser.next());
+ checkFreezePeriods(SystemUpdatePolicy.restoreFromXml(parser), expectedPeriods);
+ }
+
+ private void checkFreezePeriods(SystemUpdatePolicy policy,
+ List<Pair<Integer, Integer>> expectedPeriods) {
+ int i = 0;
+ for (Pair<Integer, Integer> period : policy.getFreezePeriods()) {
+ assertEquals(expectedPeriods.get(i).first, period.first);
+ assertEquals(expectedPeriods.get(i).second, period.second);
+ i++;
+ }
+ }
+
+ private LocalDate parseDate(String date) {
+ // Use leap year when parsing date string to handle "02-29", but force round down
+ // to Feb 28th by overriding the year to non-leap year.
+ final int year;
+ boolean monthDateOnly = false;
+ if (date.length() == 5) {
+ year = 2000;
+ monthDateOnly = true;
+ } else {
+ year = Integer.parseInt(date.substring(0, 4));
+ date = date.substring(5);
+ }
+ LocalDate result = LocalDate.of(year, Integer.parseInt(date.substring(0, 2)),
+ Integer.parseInt(date.substring(3, 5)));
+ if (monthDateOnly) {
+ return result.withYear(2001);
+ } else {
+ return result;
+ }
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/TransferOwnershipMetadataManagerTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/TransferOwnershipMetadataManagerTest.java
new file mode 100644
index 0000000..03cabb2
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/TransferOwnershipMetadataManagerTest.java
@@ -0,0 +1,128 @@
+/*
+ * 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.devicepolicy;
+
+import static com.android.server.devicepolicy.TransferOwnershipMetadataManager.ADMIN_TYPE_DEVICE_OWNER;
+
+
+import static com.android.server.devicepolicy.TransferOwnershipMetadataManager
+ .OWNER_TRANSFER_METADATA_XML;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import android.os.Environment;
+import android.support.test.runner.AndroidJUnit4;
+
+import com.android.server.devicepolicy.TransferOwnershipMetadataManager.Injector;
+import com.android.server.devicepolicy.TransferOwnershipMetadataManager.Metadata;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+/**
+* Unit tests for {@link TransferOwnershipMetadataManager}.
+ *
+ * bit FrameworksServicesTests:com.android.server.devicepolicy.TransferOwnershipMetadataManagerTest
+ * runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/TransferOwnershipMetadataManagerTest.java
+* */
+
+@RunWith(AndroidJUnit4.class)
+public class TransferOwnershipMetadataManagerTest {
+ private final static String ADMIN_PACKAGE = "com.dummy.admin.package";
+ private final static String TARGET_PACKAGE = "com.dummy.target.package";
+ private final static int USER_ID = 123;
+ private final static Metadata TEST_PARAMS = new Metadata(ADMIN_PACKAGE,
+ TARGET_PACKAGE, USER_ID, ADMIN_TYPE_DEVICE_OWNER);
+
+ private MockInjector mMockInjector;
+
+ @Before
+ public void setUp() {
+ mMockInjector = new MockInjector();
+ getOwnerTransferParams().deleteMetadataFile();
+ }
+
+ @Test
+ public void testSave() {
+ TransferOwnershipMetadataManager paramsManager = getOwnerTransferParams();
+ assertTrue(paramsManager.saveMetadataFile(TEST_PARAMS));
+ assertTrue(paramsManager.metadataFileExists());
+ }
+
+ @Test
+ public void testFileContentValid() {
+ TransferOwnershipMetadataManager paramsManager = getOwnerTransferParams();
+ assertTrue(paramsManager.saveMetadataFile(TEST_PARAMS));
+ Path path = Paths.get(new File(mMockInjector.getOwnerTransferMetadataDir(),
+ OWNER_TRANSFER_METADATA_XML).getAbsolutePath());
+ try {
+ String contents = new String(Files.readAllBytes(path), Charset.forName("UTF-8"));
+ assertEquals(
+ "<?xml version='1.0' encoding='utf-8' standalone='yes' ?>\n"
+ + "<user-id>" + USER_ID + "</user-id>\n"
+ + "<admin-component>" + ADMIN_PACKAGE + "</admin-component>\n"
+ + "<target-component>" + TARGET_PACKAGE + "</target-component>\n"
+ + "<admin-type>" + ADMIN_TYPE_DEVICE_OWNER + "</admin-type>\n",
+ contents);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testLoad() {
+ TransferOwnershipMetadataManager paramsManager = getOwnerTransferParams();
+ paramsManager.saveMetadataFile(TEST_PARAMS);
+ assertEquals(TEST_PARAMS, paramsManager.loadMetadataFile());
+ }
+
+ @Test
+ public void testDelete() {
+ TransferOwnershipMetadataManager paramsManager = getOwnerTransferParams();
+ paramsManager.saveMetadataFile(TEST_PARAMS);
+ paramsManager.deleteMetadataFile();
+ assertFalse(paramsManager.metadataFileExists());
+ }
+
+ @After
+ public void tearDown() {
+ getOwnerTransferParams().deleteMetadataFile();
+ }
+
+ private TransferOwnershipMetadataManager getOwnerTransferParams() {
+ return new TransferOwnershipMetadataManager(mMockInjector);
+ }
+
+ static class MockInjector extends Injector {
+ @Override
+ public File getOwnerTransferMetadataDir() {
+ return Environment.getExternalStorageDirectory();
+ }
+ }
+
+}
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 9e7ef65..fb25cf3 100644
--- a/services/tests/servicestests/src/com/android/server/display/BrightnessMappingStrategyTest.java
+++ b/services/tests/servicestests/src/com/android/server/display/BrightnessMappingStrategyTest.java
@@ -281,6 +281,68 @@
assertNull(physical);
}
+ @Test
+ public void testStrategiesAdaptToUserDataPoint() {
+ Resources res = createResources(LUX_LEVELS, DISPLAY_LEVELS_NITS,
+ DISPLAY_RANGE_NITS, BACKLIGHT_RANGE);
+ assertStrategyAdaptsToUserDataPoints(BrightnessMappingStrategy.create(res));
+ res = createResources(LUX_LEVELS, DISPLAY_LEVELS_BACKLIGHT);
+ assertStrategyAdaptsToUserDataPoints(BrightnessMappingStrategy.create(res));
+ }
+
+ private static void assertStrategyAdaptsToUserDataPoints(BrightnessMappingStrategy strategy) {
+ // Save out all of the initial brightness data for comparison after reset.
+ float[] initialBrightnessLevels = new float[LUX_LEVELS.length];
+ for (int i = 0; i < LUX_LEVELS.length; i++) {
+ initialBrightnessLevels[i] = strategy.getBrightness(LUX_LEVELS[i]);
+ }
+
+ // Add a data point in the middle of the curve where the user has set the brightness max
+ final int idx = LUX_LEVELS.length / 2;
+ strategy.addUserDataPoint(LUX_LEVELS[idx], 1.0f);
+
+ // Then make sure that all control points after the middle lux level are also set to max...
+ for (int i = idx; i < LUX_LEVELS.length; i++) {
+ assertEquals(strategy.getBrightness(LUX_LEVELS[idx]), 1.0, 0.01 /*tolerance*/);
+ }
+
+ // ...and that all control points before the middle lux level are strictly less than the
+ // previous one still.
+ float prevBrightness = strategy.getBrightness(LUX_LEVELS[idx]);
+ for (int i = idx - 1; i >= 0; i--) {
+ float brightness = strategy.getBrightness(LUX_LEVELS[i]);
+ assertTrue("Brightness levels must be monotonic after adapting to user data",
+ prevBrightness >= brightness);
+ prevBrightness = brightness;
+ }
+
+ // Now reset the curve and make sure we go back to the initial brightness levels recorded
+ // before adding the user data point.
+ strategy.clearUserDataPoints();
+ for (int i = 0; i < LUX_LEVELS.length; i++) {
+ assertEquals(initialBrightnessLevels[i], strategy.getBrightness(LUX_LEVELS[i]),
+ 0.01 /*tolerance*/);
+ }
+
+ // Now set the middle of the lux range to something just above the minimum.
+ final float minBrightness = strategy.getBrightness(LUX_LEVELS[0]);
+ strategy.addUserDataPoint(LUX_LEVELS[idx], minBrightness + 0.01f);
+
+ // Then make sure the curve is still monotonic.
+ prevBrightness = 0f;
+ for (float lux : LUX_LEVELS) {
+ float brightness = strategy.getBrightness(lux);
+ assertTrue("Brightness levels must be monotonic after adapting to user data",
+ prevBrightness <= brightness);
+ prevBrightness = brightness;
+ }
+
+ // And that the lowest lux level still gives the absolute minimum brightness. This should
+ // be true assuming that there are more than two lux levels in the curve since we picked a
+ // brightness just barely above the minimum for the middle of the curve.
+ assertEquals(minBrightness, strategy.getBrightness(LUX_LEVELS[0]), 0.001 /*tolerance*/);
+ }
+
private static float[] toFloatArray(int[] vals) {
float[] newVals = new float[vals.length];
for (int i = 0; i < vals.length; i++) {
diff --git a/services/tests/servicestests/src/com/android/server/job/JobSetTest.java b/services/tests/servicestests/src/com/android/server/job/JobSetTest.java
new file mode 100644
index 0000000..83bd9fc
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/job/JobSetTest.java
@@ -0,0 +1,146 @@
+/*
+ * 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.job;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeFalse;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import android.app.job.JobInfo;
+import android.content.ComponentName;
+import android.content.Context;
+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 com.android.server.LocalServices;
+import com.android.server.job.controllers.JobStatus;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class JobSetTest {
+ private static final String TAG = JobSetTest.class.getSimpleName();
+ private static final int SECONDARY_USER_ID_1 = 12;
+ private static final int SECONDARY_USER_ID_2 = 13;
+
+ private Context mContext;
+ private ComponentName mComponent;
+ private JobStore.JobSet mJobSet;
+
+ @Before
+ public void setUp() throws Exception {
+ mContext = InstrumentationRegistry.getTargetContext();
+ mComponent = new ComponentName(mContext, JobStoreTest.class);
+ mJobSet = new JobStore.JobSet();
+ final PackageManagerInternal pm = mock(PackageManagerInternal.class);
+ when(pm.getPackageTargetSdkVersion(anyString()))
+ .thenReturn(Build.VERSION_CODES.CUR_DEVELOPMENT);
+ LocalServices.addService(PackageManagerInternal.class, pm);
+ assumeFalse("Test cannot run in user " + mContext.getUserId(),
+ mContext.getUserId() == SECONDARY_USER_ID_1
+ || mContext.getUserId() == SECONDARY_USER_ID_2);
+ }
+
+ private JobStatus getJobStatusWithCallinUid(int jobId, int callingUid) {
+ final JobInfo jobInfo = new JobInfo.Builder(jobId, mComponent)
+ .setPeriodic(10)
+ .setRequiresCharging(true)
+ .build();
+ return JobStatus.createFromJobInfo(jobInfo, callingUid, mContext.getPackageName(),
+ mContext.getUserId(), "Test");
+ }
+
+ @Test
+ public void testBothMapsHaveSameJobs() {
+ final int callingUid1 = UserHandle.getUid(SECONDARY_USER_ID_1, 1);
+ final int callingUid2 = UserHandle.getUid(SECONDARY_USER_ID_2, 1);
+ final JobStatus testJob1 = getJobStatusWithCallinUid(1, callingUid1);
+ final JobStatus testJob2 = getJobStatusWithCallinUid(2, callingUid2);
+ mJobSet.add(testJob1);
+ mJobSet.add(testJob2);
+ for (int i = 11; i <= 20; i++) {
+ mJobSet.add(getJobStatusWithCallinUid(i, (i%2 == 0) ? callingUid2 : callingUid1));
+ }
+ assertHaveSameJobs(mJobSet.mJobsPerSourceUid, mJobSet.mJobs);
+ mJobSet.remove(testJob1);
+ mJobSet.remove(testJob2);
+ assertHaveSameJobs(mJobSet.mJobsPerSourceUid, mJobSet.mJobs);
+ mJobSet.removeJobsOfNonUsers(new int[] {mContext.getUserId(), SECONDARY_USER_ID_1});
+ assertHaveSameJobs(mJobSet.mJobsPerSourceUid, mJobSet.mJobs);
+ mJobSet.removeJobsOfNonUsers(new int[] {mContext.getUserId()});
+ assertTrue("mJobs should be empty", mJobSet.mJobs.size() == 0);
+ assertTrue("mJobsPerSourceUid should be empty", mJobSet.mJobsPerSourceUid.size() == 0);
+ }
+
+ private static void assertHaveSameJobs(SparseArray<ArraySet<JobStatus>> map1,
+ SparseArray<ArraySet<JobStatus>> map2) {
+ final ArraySet<JobStatus> set1 = new ArraySet<>();
+ final ArraySet<JobStatus> set2 = new ArraySet<>();
+ int size1 = 0;
+ for (int i = 0; i < map1.size(); i++) {
+ final ArraySet<JobStatus> jobs = map1.valueAt(i);
+ if (jobs == null) return;
+ size1 += jobs.size();
+ set1.addAll(jobs);
+ }
+ for (int i = 0; i < map2.size(); i++) {
+ final ArraySet<JobStatus> jobs = map2.valueAt(i);
+ if (jobs == null) return;
+ size1 -= jobs.size();
+ set2.addAll(jobs);
+ }
+ if (size1 != 0 || !set1.equals(set2)) {
+ dump("map1", map1);
+ dump("map2", map2);
+ fail("Both maps have different sets of jobs");
+ }
+ }
+
+ private static void dump(String prefix, SparseArray<ArraySet<JobStatus>> jobMap) {
+ final StringBuilder str = new StringBuilder();
+ for (int i = 0; i < jobMap.size(); i++) {
+ final ArraySet<JobStatus> jobs = jobMap.valueAt(i);
+ if (jobs == null) return;
+ str.append("[Key: " + jobMap.keyAt(i) + ", Value: {");
+ for (int j = 0; j < jobs.size(); j++) {
+ final JobStatus job = jobs.valueAt(j);
+ str.append("(s=" + job.getSourceUid() + ", c=" + job.getUid() + "), ");
+ }
+ str.append("}], ");
+ }
+ Log.d(TAG, prefix + ": " + str.toString());
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ LocalServices.removeServiceForTest(PackageManagerInternal.class);
+ }
+}
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 43d026d..e2064aa 100644
--- a/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
+++ b/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
@@ -47,6 +47,8 @@
/**
* Test reading and writing correctly from file.
+ *
+ * atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
*/
@RunWith(AndroidJUnit4.class)
public class JobStoreTest {
@@ -116,6 +118,7 @@
.setPersisted(true)
.build();
final JobStatus ts = JobStatus.createFromJobInfo(task, SOME_UID, null, -1, null);
+ ts.addInternalFlags(JobStatus.INTERNAL_FLAG_HAS_FOREGROUND_EXEMPTION);
mTaskStoreUnderTest.add(ts);
waitForPendingIo();
@@ -128,6 +131,8 @@
assertTasksEqual(task, loadedTaskStatus.getJob());
assertTrue("JobStore#contains invalid.", mTaskStoreUnderTest.containsJob(ts));
assertEquals("Different uids.", SOME_UID, loadedTaskStatus.getUid());
+ assertEquals(JobStatus.INTERNAL_FLAG_HAS_FOREGROUND_EXEMPTION,
+ loadedTaskStatus.getInternalFlags());
compareTimestampsSubjectToIoLatency("Early run-times not the same after read.",
ts.getEarliestRunTime(), loadedTaskStatus.getEarliestRunTime());
compareTimestampsSubjectToIoLatency("Late run-times not the same after read.",
@@ -272,7 +277,7 @@
0 /* sourceUserId */, 0, 0, "someTag",
invalidEarlyRuntimeElapsedMillis, invalidLateRuntimeElapsedMillis,
0 /* lastSuccessfulRunTime */, 0 /* lastFailedRunTime */,
- persistedExecutionTimesUTC);
+ persistedExecutionTimesUTC, 0 /* innerFlagg */);
mTaskStoreUnderTest.add(js);
waitForPendingIo();
diff --git a/services/tests/servicestests/src/com/android/server/job/controllers/ConnectivityControllerTest.java b/services/tests/servicestests/src/com/android/server/job/controllers/ConnectivityControllerTest.java
index f6a749d..35cba18 100644
--- a/services/tests/servicestests/src/com/android/server/job/controllers/ConnectivityControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/job/controllers/ConnectivityControllerTest.java
@@ -164,6 +164,6 @@
private static JobStatus createJobStatus(JobInfo.Builder job, long earliestRunTimeElapsedMillis,
long latestRunTimeElapsedMillis) {
return new JobStatus(job.build(), 0, null, -1, 0, 0, null, earliestRunTimeElapsedMillis,
- latestRunTimeElapsedMillis, 0, 0, null);
+ latestRunTimeElapsedMillis, 0, 0, null, 0);
}
}
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 15c24ac..d78af22 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
@@ -71,6 +71,6 @@
final JobInfo job = new JobInfo.Builder(101, new ComponentName("foo", "bar"))
.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY).build();
return new JobStatus(job, 0, null, -1, 0, 0, null, earliestRunTimeElapsedMillis,
- latestRunTimeElapsedMillis, 0, 0, null);
+ latestRunTimeElapsedMillis, 0, 0, null, 0);
}
}
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTestable.java b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTestable.java
index 4bdd1c5..bc61c58 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTestable.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTestable.java
@@ -18,11 +18,14 @@
import android.content.Context;
+import com.android.server.PersistentDataBlockManagerInternal;
+
import java.io.File;
public class LockSettingsStorageTestable extends LockSettingsStorage {
public File mStorageDir;
+ public PersistentDataBlockManagerInternal mPersistentDataBlock;
public LockSettingsStorageTestable(Context context, File storageDir) {
super(context);
@@ -53,6 +56,11 @@
userId).getAbsolutePath());
}
+ @Override
+ public PersistentDataBlockManagerInternal getPersistentDataBlock() {
+ return mPersistentDataBlock;
+ }
+
private File makeDirs(File baseDir, String filePath) {
File path = new File(filePath);
if (path.getParent() == null) {
diff --git a/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTests.java b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTests.java
index b0325cb..237091d 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTests.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTests.java
@@ -29,8 +29,12 @@
import android.os.UserManager;
import android.os.storage.StorageManager;
import android.test.AndroidTestCase;
+import android.util.Log;
+import android.util.Log.TerribleFailure;
+import android.util.Log.TerribleFailureHandler;
import com.android.internal.widget.LockPatternUtils;
+import com.android.server.PersistentDataBlockManagerInternal;
import com.android.server.locksettings.LockSettingsStorage.CredentialHash;
import com.android.server.locksettings.LockSettingsStorage.PersistentData;
@@ -52,7 +56,7 @@
public static final byte[] PAYLOAD = new byte[] {1, 2, -1, -2, 33};
- LockSettingsStorage mStorage;
+ LockSettingsStorageTestable mStorage;
File mStorageDir;
private File mDb;
@@ -346,6 +350,39 @@
assertEquals(null, mStorage.readSyntheticPasswordState(10, 1234L, "state"));
}
+ public void testPersistentDataBlock_unavailable() {
+ mStorage.mPersistentDataBlock = null;
+
+ assertSame(PersistentData.NONE, mStorage.readPersistentDataBlock());
+ }
+
+ public void testPersistentDataBlock_empty() {
+ mStorage.mPersistentDataBlock = mock(PersistentDataBlockManagerInternal.class);
+
+ assertSame(PersistentData.NONE, mStorage.readPersistentDataBlock());
+ }
+
+ public void testPersistentDataBlock_withData() {
+ mStorage.mPersistentDataBlock = mock(PersistentDataBlockManagerInternal.class);
+ when(mStorage.mPersistentDataBlock.getFrpCredentialHandle())
+ .thenReturn(PersistentData.toBytes(PersistentData.TYPE_SP_WEAVER, SOME_USER_ID,
+ DevicePolicyManager.PASSWORD_QUALITY_COMPLEX, PAYLOAD));
+
+ PersistentData data = mStorage.readPersistentDataBlock();
+
+ assertEquals(PersistentData.TYPE_SP_WEAVER, data.type);
+ assertEquals(SOME_USER_ID, data.userId);
+ assertEquals(DevicePolicyManager.PASSWORD_QUALITY_COMPLEX, data.qualityForUi);
+ assertArrayEquals(PAYLOAD, data.payload);
+ }
+
+ public void testPersistentDataBlock_exception() {
+ mStorage.mPersistentDataBlock = mock(PersistentDataBlockManagerInternal.class);
+ when(mStorage.mPersistentDataBlock.getFrpCredentialHandle())
+ .thenThrow(new IllegalStateException("oops"));
+ assertSame(PersistentData.NONE, mStorage.readPersistentDataBlock());
+ }
+
public void testPersistentData_serializeUnserialize() {
byte[] serialized = PersistentData.toBytes(PersistentData.TYPE_SP, SOME_USER_ID,
DevicePolicyManager.PASSWORD_QUALITY_COMPLEX, PAYLOAD);
@@ -366,6 +403,13 @@
assertSame(PersistentData.NONE, deserialized);
}
+ public void testPersistentData_unserializeInvalid() {
+ assertNotNull(suppressAndReturnWtf(() -> {
+ PersistentData deserialized = PersistentData.fromBytes(new byte[]{5});
+ assertSame(PersistentData.NONE, deserialized);
+ }));
+ }
+
public void testPersistentData_unserialize_version1() {
// This test ensures that we can read serialized VERSION_1 PersistentData even if we change
// the wire format in the future.
@@ -450,4 +494,19 @@
assertEquals(LockPatternUtils.CREDENTIAL_TYPE_PATTERN, cred.type);
assertArrayEquals(pattern, cred.hash);
}
+
+ /**
+ * Suppresses reporting of the WTF to system_server, so we don't pollute the dropbox with
+ * intentionally caused WTFs.
+ */
+ private TerribleFailure suppressAndReturnWtf(Runnable r) {
+ TerribleFailure[] captured = new TerribleFailure[1];
+ TerribleFailureHandler prevWtfHandler = Log.setWtfHandler((t, w, s) -> captured[0] = w);
+ try {
+ r.run();
+ } finally {
+ Log.setWtfHandler(prevWtfHandler);
+ }
+ return captured[0];
+ }
}
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 6a3a260..ce5ee13 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
@@ -121,7 +121,7 @@
TEST_CREDENTIAL_TYPE,
TEST_CREDENTIAL,
/*credentialUpdated=*/ false,
- () -> mPlatformKeyManager);
+ mPlatformKeyManager);
mWrappingKey = generateAndroidKeyStoreKey();
mEncryptKey = new PlatformEncryptionKey(TEST_GENERATION_ID, mWrappingKey);
@@ -327,8 +327,7 @@
mRecoverableKeyStoreDb.setRecoveryServicePublicKey(
TEST_USER_ID, TEST_RECOVERY_AGENT_UID, mKeyPair.getPublic());
when(mSnapshotListenersStorage.hasListener(TEST_RECOVERY_AGENT_UID)).thenReturn(true);
- SecretKey applicationKey =
- addApplicationKey(TEST_USER_ID, TEST_RECOVERY_AGENT_UID, TEST_APP_KEY_ALIAS);
+ addApplicationKey(TEST_USER_ID, TEST_RECOVERY_AGENT_UID, TEST_APP_KEY_ALIAS);
mKeySyncTask.run();
@@ -343,6 +342,26 @@
}
@Test
+ public void run_recreatesMissingSnapshot() throws Exception {
+ mRecoverableKeyStoreDb.setRecoveryServicePublicKey(
+ TEST_USER_ID, TEST_RECOVERY_AGENT_UID, mKeyPair.getPublic());
+ when(mSnapshotListenersStorage.hasListener(TEST_RECOVERY_AGENT_UID)).thenReturn(true);
+ addApplicationKey(TEST_USER_ID, TEST_RECOVERY_AGENT_UID, TEST_APP_KEY_ALIAS);
+
+ mKeySyncTask.run();
+
+ KeyChainSnapshot keyChainSnapshot = mRecoverySnapshotStorage.get(TEST_RECOVERY_AGENT_UID);
+ assertThat(keyChainSnapshot.getSnapshotVersion()).isEqualTo(1); // default value;
+
+ mRecoverySnapshotStorage.remove(TEST_RECOVERY_AGENT_UID); // corrupt snapshot.
+
+ mKeySyncTask.run();
+
+ keyChainSnapshot = mRecoverySnapshotStorage.get(TEST_RECOVERY_AGENT_UID);
+ assertThat(keyChainSnapshot.getSnapshotVersion()).isEqualTo(1); // Same version
+ }
+
+ @Test
public void run_setsCorrectTypeForPassword() throws Exception {
mKeySyncTask = new KeySyncTask(
mRecoverableKeyStoreDb,
@@ -352,7 +371,7 @@
CREDENTIAL_TYPE_PASSWORD,
"password",
/*credentialUpdated=*/ false,
- () -> mPlatformKeyManager);
+ mPlatformKeyManager);
mRecoverableKeyStoreDb.setRecoveryServicePublicKey(
TEST_USER_ID, TEST_RECOVERY_AGENT_UID, mKeyPair.getPublic());
@@ -378,7 +397,7 @@
CREDENTIAL_TYPE_PASSWORD,
/*credential=*/ "1234",
/*credentialUpdated=*/ false,
- () -> mPlatformKeyManager);
+ mPlatformKeyManager);
mRecoverableKeyStoreDb.setRecoveryServicePublicKey(
TEST_USER_ID, TEST_RECOVERY_AGENT_UID, mKeyPair.getPublic());
@@ -405,7 +424,7 @@
CREDENTIAL_TYPE_PATTERN,
"12345",
/*credentialUpdated=*/ false,
- () -> mPlatformKeyManager);
+ mPlatformKeyManager);
mRecoverableKeyStoreDb.setRecoveryServicePublicKey(
TEST_USER_ID, TEST_RECOVERY_AGENT_UID, mKeyPair.getPublic());
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 b1bff70..f9ffccd 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
@@ -23,6 +23,7 @@
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -48,6 +49,7 @@
import java.io.File;
import java.security.KeyStore;
+import java.security.UnrecoverableKeyException;
import java.util.List;
@SmallTest
@@ -250,6 +252,10 @@
@Test
public void getDecryptKey_getsDecryptKeyWithCorrectAlias() throws Exception {
+ when(mKeyStoreProxy
+ .containsAlias("com.android.server.locksettings.recoverablekeystore/"
+ + "platform/42/1/decrypt")).thenReturn(true);
+
mPlatformKeyManager.getDecryptKey(USER_ID_FIXTURE);
verify(mKeyStoreProxy).getKey(
@@ -258,7 +264,79 @@
}
@Test
- public void getEncryptKey_getsDecryptKeyWithCorrectAlias() throws Exception {
+ public void getEncryptKey_generatesNewKeyIfOldOneIsInvalid() throws Exception {
+ doThrow(new UnrecoverableKeyException()).when(mKeyStoreProxy).getKey(
+ eq("com.android.server.locksettings.recoverablekeystore/platform/42/1/encrypt"),
+ any());
+
+ when(mKeyStoreProxy
+ .containsAlias("com.android.server.locksettings.recoverablekeystore/"
+ + "platform/42/1/encrypt")).thenReturn(true);
+ when(mKeyStoreProxy
+ .containsAlias("com.android.server.locksettings.recoverablekeystore/"
+ + "platform/42/2/encrypt")).thenReturn(true);
+
+ mPlatformKeyManager.getEncryptKey(USER_ID_FIXTURE);
+
+ verify(mKeyStoreProxy).getKey(
+ eq("com.android.server.locksettings.recoverablekeystore/platform/42/1/encrypt"),
+ any());
+ // Attempt to get regenerated key.
+ verify(mKeyStoreProxy).getKey(
+ eq("com.android.server.locksettings.recoverablekeystore/platform/42/2/encrypt"),
+ any());
+ }
+
+ @Test
+ public void getDecryptKey_generatesNewKeyIfOldOneIsInvalid() throws Exception {
+ doThrow(new UnrecoverableKeyException()).when(mKeyStoreProxy).getKey(
+ eq("com.android.server.locksettings.recoverablekeystore/platform/42/1/decrypt"),
+ any());
+
+ when(mKeyStoreProxy
+ .containsAlias("com.android.server.locksettings.recoverablekeystore/"
+ + "platform/42/1/decrypt")).thenReturn(false); // was removed.
+
+ when(mKeyStoreProxy
+ .containsAlias("com.android.server.locksettings.recoverablekeystore/"
+ + "platform/42/2/decrypt")).thenReturn(true); // new version is available
+
+ mPlatformKeyManager.getDecryptKey(USER_ID_FIXTURE);
+
+ verify(mKeyStoreProxy).containsAlias(
+ eq("com.android.server.locksettings.recoverablekeystore/platform/42/1/decrypt"));
+ // Attempt to get regenerated key.
+ verify(mKeyStoreProxy).getKey(
+ eq("com.android.server.locksettings.recoverablekeystore/platform/42/2/decrypt"),
+ any());
+ }
+
+ @Test
+ public void getEncryptKey_generatesNewKeyIfOldWasRemoved() throws Exception {
+ when(mKeyStoreProxy
+ .containsAlias("com.android.server.locksettings.recoverablekeystore/"
+ + "platform/42/1/encrypt")).thenReturn(false); // was removed.
+
+ when(mKeyStoreProxy
+ .containsAlias("com.android.server.locksettings.recoverablekeystore/"
+ + "platform/42/2/encrypt")).thenReturn(true); // new version is available
+
+ mPlatformKeyManager.getEncryptKey(USER_ID_FIXTURE);
+
+ verify(mKeyStoreProxy).containsAlias(
+ eq("com.android.server.locksettings.recoverablekeystore/platform/42/1/encrypt"));
+ // Attempt to get regenerated key.
+ verify(mKeyStoreProxy).getKey(
+ eq("com.android.server.locksettings.recoverablekeystore/platform/42/2/encrypt"),
+ any());
+ }
+
+ @Test
+ public void getEncryptKey_getsEndryptKeyWithCorrectAlias() throws Exception {
+ when(mKeyStoreProxy
+ .containsAlias("com.android.server.locksettings.recoverablekeystore/"
+ + "platform/42/1/encrypt")).thenReturn(true);
+
mPlatformKeyManager.getEncryptKey(USER_ID_FIXTURE);
verify(mKeyStoreProxy).getKey(
@@ -276,6 +354,26 @@
}
@Test
+ public void regenerate_deletesOldKeysFromKeystore() throws Exception {
+ mPlatformKeyManager.init(USER_ID_FIXTURE);
+
+ mPlatformKeyManager.regenerate(USER_ID_FIXTURE);
+
+ verify(mKeyStoreProxy).deleteEntry(
+ eq("com.android.server.locksettings.recoverablekeystore/platform/42/1/encrypt"));
+ verify(mKeyStoreProxy).deleteEntry(
+ eq("com.android.server.locksettings.recoverablekeystore/platform/42/1/decrypt"));
+
+ mPlatformKeyManager.regenerate(USER_ID_FIXTURE);
+
+ // Removes second generation keys.
+ verify(mKeyStoreProxy).deleteEntry(
+ eq("com.android.server.locksettings.recoverablekeystore/platform/42/2/encrypt"));
+ verify(mKeyStoreProxy).deleteEntry(
+ eq("com.android.server.locksettings.recoverablekeystore/platform/42/2/decrypt"));
+ }
+
+ @Test
public void regenerate_generatesANewEncryptKeyWithTheCorrectAlias() throws Exception {
mPlatformKeyManager.init(USER_ID_FIXTURE);
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 f0254c6..097d214 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
@@ -315,6 +315,29 @@
assertThat(statuses).hasSize(0);
}
+ public void testInvalidateKeysWithOldGenerationId_withSingleKey() {
+ int userId = 12;
+ int uid = 1009;
+ int generationId = 6;
+ int status = 120;
+ int status2 = 121;
+ String alias = "test";
+ byte[] nonce = getUtf8Bytes("nonce");
+ byte[] keyMaterial = getUtf8Bytes("keymaterial");
+ WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, generationId, status);
+ mRecoverableKeyStoreDb.insertKey(userId, uid, alias, wrappedKey);
+
+ WrappedKey retrievedKey = mRecoverableKeyStoreDb.getKey(uid, alias);
+ assertThat(retrievedKey.getRecoveryStatus()).isEqualTo(status);
+
+ mRecoverableKeyStoreDb.setRecoveryStatus(uid, alias, status2);
+ mRecoverableKeyStoreDb.invalidateKeysWithOldGenerationId(userId, generationId + 1);
+
+ retrievedKey = mRecoverableKeyStoreDb.getKey(uid, alias);
+ assertThat(retrievedKey.getRecoveryStatus())
+ .isEqualTo(RecoveryController.RECOVERY_STATUS_PERMANENT_FAILURE);
+ }
+
@Test
public void setRecoveryServicePublicKey_replaceOldKey() throws Exception {
int userId = 12;
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 c7fa62e..376db5b 100644
--- a/services/tests/servicestests/src/com/android/server/net/ConnOnActivityStartTest.java
+++ b/services/tests/servicestests/src/com/android/server/net/ConnOnActivityStartTest.java
@@ -388,7 +388,8 @@
latch.countDown();
}
});
- launchIntent.putExtras(extras);
+ launchIntent.putExtras(extras)
+ .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(launchIntent);
if (latch.await(NETWORK_CHECK_TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
if (errors[0] != null) {
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 5c7348c..c491601 100644
--- a/services/tests/servicestests/src/com/android/server/pm/PackageParserTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/PackageParserTest.java
@@ -195,7 +195,6 @@
assertEquals(a.installLocation, b.installLocation);
assertEquals(a.coreApp, b.coreApp);
assertEquals(a.mRequiredForAllUsers, b.mRequiredForAllUsers);
- assertEquals(a.mTrustedOverlay, b.mTrustedOverlay);
assertEquals(a.mCompileSdkVersion, b.mCompileSdkVersion);
assertEquals(a.mCompileSdkVersionCodename, b.mCompileSdkVersionCodename);
assertEquals(a.use32bitAbi, b.use32bitAbi);
@@ -429,7 +428,6 @@
pkg.installLocation = 100;
pkg.coreApp = true;
pkg.mRequiredForAllUsers = true;
- pkg.mTrustedOverlay = true;
pkg.use32bitAbi = true;
pkg.packageName = "foo";
pkg.splitNames = new String[] { "foo2" };
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
new file mode 100644
index 0000000..f788cac
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySavingStatsTest.java
@@ -0,0 +1,205 @@
+/*
+ * 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.power.batterysaver;
+
+import static org.junit.Assert.assertEquals;
+
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import com.android.server.power.batterysaver.BatterySavingStats.BatterySaverState;
+import com.android.server.power.batterysaver.BatterySavingStats.DozeState;
+import com.android.server.power.batterysaver.BatterySavingStats.InteractiveState;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintWriter;
+
+/**
+ atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySavingStatsTest.java
+ */
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class BatterySavingStatsTest {
+ private class BatterySavingStatsTestable extends BatterySavingStats {
+ private long mTime = 1_000_000; // Some random starting time.
+
+ private int mBatteryLevel = 100;
+
+ @Override
+ long injectCurrentTime() {
+ return mTime;
+ }
+
+ @Override
+ int injectBatteryLevel() {
+ return mBatteryLevel;
+ }
+
+ void assertDumpable() {
+ final ByteArrayOutputStream out = new ByteArrayOutputStream();
+ dump(new PrintWriter(out), ""); // Just make sure it won't crash.
+ }
+
+ void advanceClock(int minutes) {
+ mTime += 60_000 * minutes;
+ }
+
+ void drainBattery(int percent) {
+ mBatteryLevel -= percent;
+ if (mBatteryLevel < 0) {
+ mBatteryLevel = 0;
+ }
+ }
+
+ String toDebugString() {
+ final StringBuilder sb = new StringBuilder();
+ String sep = "";
+ for (int i = 0; i < mStats.size(); i++) {
+ sb.append(sep);
+ sb.append(stateToString(mStats.keyAt(i)));
+ sb.append(":");
+ sb.append(mStats.valueAt(i).toStringForTest());
+ sep = "\n";
+ }
+ return sb.toString();
+ }
+ }
+
+ @Test
+ public void testAll() {
+ final BatterySavingStatsTestable target = new BatterySavingStatsTestable();
+
+ target.assertDumpable();
+
+ target.advanceClock(1);
+ target.drainBattery(2);
+
+ target.transitionState(
+ BatterySaverState.OFF,
+ InteractiveState.INTERACTIVE,
+ DozeState.NOT_DOZING);
+
+ target.advanceClock(4);
+ target.drainBattery(1);
+
+ target.transitionState(
+ BatterySaverState.OFF,
+ InteractiveState.NON_INTERACTIVE,
+ DozeState.NOT_DOZING);
+
+ target.advanceClock(2);
+ target.drainBattery(5);
+
+ target.transitionState(
+ BatterySaverState.OFF,
+ InteractiveState.INTERACTIVE,
+ DozeState.NOT_DOZING);
+
+ target.advanceClock(4);
+ target.drainBattery(1);
+
+ target.transitionState(
+ BatterySaverState.OFF,
+ InteractiveState.NON_INTERACTIVE,
+ DozeState.NOT_DOZING);
+
+ target.advanceClock(2);
+ target.drainBattery(5);
+
+ target.transitionState(
+ BatterySaverState.OFF,
+ InteractiveState.INTERACTIVE,
+ DozeState.NOT_DOZING);
+
+ target.advanceClock(3);
+ target.drainBattery(1);
+
+ target.transitionState(
+ BatterySaverState.OFF,
+ InteractiveState.NON_INTERACTIVE,
+ DozeState.LIGHT);
+
+ target.advanceClock(5);
+ target.drainBattery(1);
+
+ target.transitionState(
+ BatterySaverState.OFF,
+ InteractiveState.NON_INTERACTIVE,
+ DozeState.DEEP);
+
+ target.advanceClock(1);
+ target.drainBattery(2);
+
+ target.transitionState(
+ BatterySaverState.ON,
+ InteractiveState.INTERACTIVE,
+ DozeState.NOT_DOZING);
+
+ target.advanceClock(1);
+ target.drainBattery(3);
+
+ target.transitionState(
+ BatterySaverState.OFF,
+ InteractiveState.INTERACTIVE,
+ DozeState.NOT_DOZING);
+
+ target.advanceClock(3);
+ target.drainBattery(5);
+
+ target.transitionState(
+ BatterySaverState.ON,
+ InteractiveState.INTERACTIVE,
+ DozeState.NOT_DOZING);
+
+ target.advanceClock(3);
+ target.drainBattery(5);
+
+ target.startCharging();
+
+ target.advanceClock(5);
+ target.drainBattery(10);
+
+ target.transitionState(
+ BatterySaverState.ON,
+ InteractiveState.INTERACTIVE,
+ DozeState.NOT_DOZING);
+
+ target.advanceClock(5);
+ target.drainBattery(1);
+
+ target.startCharging();
+
+ target.assertDumpable();
+
+ assertEquals(
+ "BS=0,I=0,D=0:{4m,10,150.00}\n" +
+ "BS=1,I=0,D=0:{0m,0,0.00}\n" +
+ "BS=0,I=1,D=0:{14m,8,34.29}\n" +
+ "BS=1,I=1,D=0:{9m,9,60.00}\n" +
+ "BS=0,I=0,D=1:{5m,1,12.00}\n" +
+ "BS=1,I=0,D=1:{0m,0,0.00}\n" +
+ "BS=0,I=1,D=1:{0m,0,0.00}\n" +
+ "BS=1,I=1,D=1:{0m,0,0.00}\n" +
+ "BS=0,I=0,D=2:{1m,2,120.00}\n" +
+ "BS=1,I=0,D=2:{0m,0,0.00}\n" +
+ "BS=0,I=1,D=2:{0m,0,0.00}\n" +
+ "BS=1,I=1,D=2:{0m,0,0.00}",
+ target.toDebugString());
+ }
+}
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 70906df..396fef4 100644
--- a/services/tests/servicestests/src/com/android/server/wm/DimmerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/DimmerTests.java
@@ -16,11 +16,14 @@
package com.android.server.wm;
-import java.util.HashMap;
-
-import org.junit.Test;
-import org.junit.Before;
-import org.junit.runner.RunWith;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.doAnswer;
+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 android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
@@ -28,22 +31,25 @@
import android.view.SurfaceControl;
import android.view.SurfaceSession;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.eq;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.stubbing.Answer;
/**
* Build/Install/Run:
- * bit FrameworksServicesTests:com.android.server.wm.DimmerTests;
+ * atest FrameworksServicesTests:com.android.server.wm.DimmerTests;
*/
@Presubmit
+@Ignore("b/72450130")
@RunWith(AndroidJUnit4.class)
public class DimmerTests extends WindowTestsBase {
+
+ public DimmerTests() {
+ super(spy(new SurfaceAnimationRunner()));
+ }
+
private class TestWindowContainer extends WindowContainer<TestWindowContainer> {
final SurfaceControl mControl = mock(SurfaceControl.class);
final SurfaceControl.Transaction mTransaction = mock(SurfaceControl.Transaction.class);
@@ -65,12 +71,14 @@
private class MockSurfaceBuildingContainer extends WindowContainer<TestWindowContainer> {
final SurfaceSession mSession = new SurfaceSession();
- SurfaceControl mBuiltSurface = null;
- final SurfaceControl mHostControl = mock(SurfaceControl.class);
final SurfaceControl.Transaction mHostTransaction = mock(SurfaceControl.Transaction.class);
MockSurfaceBuildingContainer() {
super(sWm);
+ mSurfaceControl = sWm.makeSurfaceBuilder(mSession)
+ .setName("test surface")
+ .setSize(1, 1)
+ .build();
}
class MockSurfaceBuilder extends SurfaceControl.Builder {
@@ -80,12 +88,19 @@
@Override
public SurfaceControl build() {
- SurfaceControl sc = mock(SurfaceControl.class);
- mBuiltSurface = sc;
- return sc;
+ return spy(sWm.makeSurfaceBuilder(mSession)
+ .setName("test surface")
+ .setSize(1, 1)
+ .build());
}
}
+ @Override
+ SurfaceControl.Builder makeSurface() {
+ return sWm.makeSurfaceBuilder(mSession)
+ .setName("test surface")
+ .setSize(1, 1);
+ }
@Override
SurfaceControl.Builder makeChildSurface(WindowContainer child) {
@@ -93,11 +108,6 @@
}
@Override
- public SurfaceControl getSurfaceControl() {
- return mHostControl;
- }
-
- @Override
public SurfaceControl.Transaction getPendingTransaction() {
return mHostTransaction;
}
@@ -114,29 +124,37 @@
mTransaction = mock(SurfaceControl.Transaction.class);
mDimmer = new Dimmer(mHost);
+
+ doAnswer((Answer<Void>) invocation -> {
+ Runnable runnable = invocation.getArgument(3);
+ runnable.run();
+ return null;
+ }).when(sWm.mSurfaceAnimationRunner).startAnimation(any(), any(), any(), any());
}
@Test
public void testDimAboveNoChildCreatesSurface() throws Exception {
final float alpha = 0.8f;
mDimmer.dimAbove(mTransaction, alpha);
- assertNotNull("Dimmer should have created a surface", mHost.mBuiltSurface);
- verify(mTransaction).setAlpha(mHost.mBuiltSurface, alpha);
- verify(mTransaction).show(mHost.mBuiltSurface);
- verify(mTransaction).setLayer(mHost.mBuiltSurface, Integer.MAX_VALUE);
+ SurfaceControl dimLayer = getDimLayer(null);
+
+ assertNotNull("Dimmer should have created a surface", dimLayer);
+
+ verify(mTransaction).setAlpha(dimLayer, alpha);
+ verify(mTransaction).setLayer(dimLayer, Integer.MAX_VALUE);
}
@Test
public void testDimAboveNoChildRedundantlyUpdatesAlphaOnExistingSurface() throws Exception {
float alpha = 0.8f;
mDimmer.dimAbove(mTransaction, alpha);
- final SurfaceControl firstSurface = mHost.mBuiltSurface;
+ final SurfaceControl firstSurface = getDimLayer(null);
alpha = 0.9f;
mDimmer.dimAbove(mTransaction, alpha);
- assertEquals(firstSurface, mHost.mBuiltSurface);
+ assertEquals(firstSurface, getDimLayer(null));
verify(mTransaction).setAlpha(firstSurface, 0.9f);
}
@@ -148,16 +166,20 @@
int height = 300;
Rect bounds = new Rect(0, 0, width, height);
mDimmer.updateDims(mTransaction, bounds);
- verify(mTransaction).setSize(mHost.mBuiltSurface, width, height);
+
+ verify(mTransaction).setSize(getDimLayer(null), width, height);
+ verify(mTransaction).show(getDimLayer(null));
}
@Test
public void testDimAboveNoChildNotReset() throws Exception {
mDimmer.dimAbove(mTransaction, 0.8f);
+ SurfaceControl dimLayer = getDimLayer(null);
mDimmer.resetDimStates();
mDimmer.updateDims(mTransaction, new Rect());
- verify(mHost.mBuiltSurface, never()).destroy();
+ verify(mTransaction).show(getDimLayer(null));
+ verify(dimLayer, never()).destroy();
}
@Test
@@ -167,11 +189,12 @@
final float alpha = 0.8f;
mDimmer.dimAbove(mTransaction, child, alpha);
- assertNotNull("Dimmer should have created a surface", mHost.mBuiltSurface);
+ SurfaceControl mDimLayer = getDimLayer(child);
- verify(mTransaction).setAlpha(mHost.mBuiltSurface, alpha);
- verify(mTransaction).show(mHost.mBuiltSurface);
- verify(mTransaction).setRelativeLayer(mHost.mBuiltSurface, child.mControl, 1);
+ assertNotNull("Dimmer should have created a surface", mDimLayer);
+
+ verify(mTransaction).setAlpha(mDimLayer, alpha);
+ verify(mTransaction).setRelativeLayer(mDimLayer, child.mControl, 1);
}
@Test
@@ -181,11 +204,12 @@
final float alpha = 0.8f;
mDimmer.dimBelow(mTransaction, child, alpha);
- assertNotNull("Dimmer should have created a surface", mHost.mBuiltSurface);
+ SurfaceControl mDimLayer = getDimLayer(child);
- verify(mTransaction).setAlpha(mHost.mBuiltSurface, alpha);
- verify(mTransaction).show(mHost.mBuiltSurface);
- verify(mTransaction).setRelativeLayer(mHost.mBuiltSurface, child.mControl, -1);
+ assertNotNull("Dimmer should have created a surface", mDimLayer);
+
+ verify(mTransaction).setAlpha(mDimLayer, alpha);
+ verify(mTransaction).setRelativeLayer(mDimLayer, child.mControl, -1);
}
@Test
@@ -195,9 +219,11 @@
final float alpha = 0.8f;
mDimmer.dimAbove(mTransaction, child, alpha);
+ SurfaceControl dimLayer = getDimLayer(child);
mDimmer.resetDimStates();
+
mDimmer.updateDims(mTransaction, new Rect());
- verify(mHost.mBuiltSurface).destroy();
+ verify(dimLayer).destroy();
}
@Test
@@ -207,10 +233,16 @@
final float alpha = 0.8f;
mDimmer.dimAbove(mTransaction, child, alpha);
+ SurfaceControl dimLayer = getDimLayer(child);
mDimmer.resetDimStates();
mDimmer.dimAbove(mTransaction, child, alpha);
mDimmer.updateDims(mTransaction, new Rect());
- verify(mHost.mBuiltSurface, never()).destroy();
+ verify(mTransaction).show(dimLayer);
+ verify(dimLayer, never()).destroy();
+ }
+
+ private SurfaceControl getDimLayer(WindowContainer windowContainer) {
+ return mDimmer.mDimLayerUsers.get(windowContainer).mDimLayer;
}
}
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 897be34..f860195 100644
--- a/services/tests/servicestests/src/com/android/server/wm/RemoteAnimationControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/RemoteAnimationControllerTest.java
@@ -20,6 +20,7 @@
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
import android.graphics.Point;
import android.graphics.Rect;
@@ -134,4 +135,10 @@
verify(mMockRunner).onAnimationCancelled();
verify(mFinishedCallback).onAnimationFinished(eq(adapter));
}
+
+ @Test
+ public void testZeroAnimations() throws Exception {
+ mController.goodToGo();
+ verifyZeroInteractions(mMockRunner);
+ }
}
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 35ca493..81fd889 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
@@ -27,6 +27,7 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.spy;
import android.os.PowerSaveState;
import android.util.proto.ProtoOutputStream;
@@ -68,6 +69,11 @@
private Runnable mRunnableWhenAddingSplashScreen;
static synchronized WindowManagerService getWindowManagerService(Context context) {
+ return getWindowManagerService(context, new SurfaceAnimationRunner());
+ }
+
+ static synchronized WindowManagerService getWindowManagerService(Context context,
+ SurfaceAnimationRunner surfaceAnimationRunner) {
if (sWm == null) {
// We only want to do this once for the test process as we don't want WM to try to
// register a bunch of local services again.
@@ -105,7 +111,7 @@
}
sWm = WindowManagerService.main(context, ims, true, false,
- false, new TestWindowManagerPolicy());
+ false, new TestWindowManagerPolicy(), surfaceAnimationRunner);
}
return sWm;
}
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 196b4a9..1bd9a93 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java
@@ -20,6 +20,7 @@
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;
@@ -41,11 +42,16 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
/**
* Test class for {@link WindowContainer}.
*
* Build/Install/Run:
- * bit FrameworksServicesTests:com.android.server.wm.WindowContainerTests
+ * atest FrameworksServicesTests:com.android.server.wm.WindowContainerTests
*/
@SmallTest
@Presubmit
@@ -644,6 +650,37 @@
assertEquals(1, child2.getPrefixOrderIndex());
}
+ /**
+ * Ensure children of a {@link WindowContainer} do not have
+ * {@link WindowContainer#onParentResize()} called when {@link WindowContainer#onParentResize()}
+ * is invoked with overridden bounds.
+ */
+ @Test
+ public void testOnParentResizePropagation() throws Exception {
+ final TestWindowContainerBuilder builder = new TestWindowContainerBuilder();
+ final TestWindowContainer root = builder.build();
+
+ final TestWindowContainer child = root.addChildWindow();
+ child.setBounds(new Rect(1,1,2,2));
+
+ final TestWindowContainer grandChild = mock(TestWindowContainer.class);
+
+ child.addChildWindow(grandChild);
+ root.onResize();
+
+ // Make sure the child does not propagate resize through onParentResize when bounds are set.
+ verify(grandChild, never()).onParentResize();
+
+ child.removeChild(grandChild);
+
+ child.setBounds(null);
+ child.addChildWindow(grandChild);
+ root.onResize();
+
+ // Make sure the child propagates resize through onParentResize when no bounds set.
+ verify(grandChild, times(1)).onParentResize();
+ }
+
/* Used so we can gain access to some protected members of the {@link WindowContainer} class */
private class TestWindowContainer extends WindowContainer<TestWindowContainer> {
private final int mLayer;
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 69b1378..7918901 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
@@ -84,6 +84,16 @@
WindowState mChildAppWindowBelow;
HashSet<WindowState> mCommonWindows;
+ private final SurfaceAnimationRunner mSurfaceAnimationRunner;
+
+ public WindowTestsBase() {
+ this(new SurfaceAnimationRunner());
+ }
+
+ public WindowTestsBase(SurfaceAnimationRunner surfaceAnimationRunner) {
+ mSurfaceAnimationRunner = surfaceAnimationRunner;
+ }
+
@Before
public void setUp() throws Exception {
if (!sOneTimeSetupDone) {
@@ -98,7 +108,7 @@
final Context context = InstrumentationRegistry.getTargetContext();
AttributeCache.init(context);
- sWm = TestWindowManagerPolicy.getWindowManagerService(context);
+ sWm = TestWindowManagerPolicy.getWindowManagerService(context, mSurfaceAnimationRunner);
beforeCreateDisplay();
context.getDisplay().getDisplayInfo(mDisplayInfo);
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 e0bebee..9ae6f00 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -1179,6 +1179,34 @@
}
@Test
+ public void testUpdateAppNotifyCreatorBlock() throws Exception {
+ mService.setRankingHelper(mRankingHelper);
+
+ mBinderService.setNotificationsEnabledForPackage(PKG, 0, false);
+ ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class);
+ verify(mContext, times(1)).sendBroadcastAsUser(captor.capture(), any(), eq(null));
+
+ assertEquals(NotificationManager.ACTION_APP_BLOCK_STATE_CHANGED,
+ captor.getValue().getAction());
+ assertEquals(PKG, captor.getValue().getPackage());
+ assertTrue(captor.getValue().getBooleanExtra(EXTRA_BLOCKED_STATE, false));
+ }
+
+ @Test
+ public void testUpdateAppNotifyCreatorUnblock() throws Exception {
+ mService.setRankingHelper(mRankingHelper);
+
+ mBinderService.setNotificationsEnabledForPackage(PKG, 0, true);
+ ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class);
+ verify(mContext, times(1)).sendBroadcastAsUser(captor.capture(), any(), eq(null));
+
+ assertEquals(NotificationManager.ACTION_APP_BLOCK_STATE_CHANGED,
+ captor.getValue().getAction());
+ assertEquals(PKG, captor.getValue().getPackage());
+ assertFalse(captor.getValue().getBooleanExtra(EXTRA_BLOCKED_STATE, true));
+ }
+
+ @Test
public void testUpdateChannelNotifyCreatorBlock() throws Exception {
mService.setRankingHelper(mRankingHelper);
when(mRankingHelper.getNotificationChannel(eq(PKG), anyInt(),
diff --git a/services/tests/uiservicestests/src/com/android/server/slice/PinnedSliceStateTest.java b/services/tests/uiservicestests/src/com/android/server/slice/PinnedSliceStateTest.java
index d3bb804..1606bd9 100644
--- a/services/tests/uiservicestests/src/com/android/server/slice/PinnedSliceStateTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/slice/PinnedSliceStateTest.java
@@ -198,6 +198,7 @@
when(binder.isBinderAlive()).thenReturn(false);
arg.getValue().binderDied();
+ verify(mSliceService).unlisten(eq(TEST_URI));
verify(mSliceService).removePinnedSlice(eq(TEST_URI));
assertFalse(mPinnedSliceManager.isPinned());
}
diff --git a/services/usage/java/com/android/server/usage/AppIdleHistory.java b/services/usage/java/com/android/server/usage/AppIdleHistory.java
index 0cbda28..2becdf2 100644
--- a/services/usage/java/com/android/server/usage/AppIdleHistory.java
+++ b/services/usage/java/com/android/server/usage/AppIdleHistory.java
@@ -36,6 +36,8 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.FastXmlSerializer;
import com.android.internal.util.IndentingPrintWriter;
+import com.android.server.LocalServices;
+import com.android.server.job.JobSchedulerInternal;
import libcore.io.IoUtils;
@@ -202,27 +204,23 @@
* that's in the future, then the usage event is temporary and keeps the app in the specified
* bucket at least until the timeout is reached. This can be used to keep the app in an
* elevated bucket for a while until some important task gets to run.
- * @param packageName
- * @param userId
- * @param bucket the bucket to set the app to
+ * @param appUsageHistory the usage record for the app being updated
+ * @param packageName name of the app being updated, for logging purposes
+ * @param newBucket the bucket to set the app to
* @param elapsedRealtime mark as used time if non-zero
* @param timeout set the timeout of the specified bucket, if non-zero
* @return
*/
- public int reportUsage(String packageName, int userId, int bucket, long elapsedRealtime,
- long timeout) {
- ArrayMap<String, AppUsageHistory> userHistory = getUserHistory(userId);
- AppUsageHistory appUsageHistory = getPackageHistory(userHistory, packageName,
- elapsedRealtime, true);
-
+ public AppUsageHistory reportUsage(AppUsageHistory appUsageHistory, String packageName,
+ int newBucket, long elapsedRealtime, long timeout) {
if (elapsedRealtime != 0) {
appUsageHistory.lastUsedElapsedTime = mElapsedDuration
+ (elapsedRealtime - mElapsedSnapshot);
appUsageHistory.lastUsedScreenTime = getScreenOnTime(elapsedRealtime);
}
- if (appUsageHistory.currentBucket > bucket) {
- appUsageHistory.currentBucket = bucket;
+ if (appUsageHistory.currentBucket > newBucket) {
+ appUsageHistory.currentBucket = newBucket;
if (DEBUG) {
Slog.d(TAG, "Moved " + packageName + " to bucket=" + appUsageHistory
.currentBucket
@@ -235,7 +233,26 @@
}
appUsageHistory.bucketingReason = REASON_USAGE;
- return appUsageHistory.currentBucket;
+ return appUsageHistory;
+ }
+
+ /**
+ * Mark the app as used and update the bucket if necessary. If there is a timeout specified
+ * that's in the future, then the usage event is temporary and keeps the app in the specified
+ * bucket at least until the timeout is reached. This can be used to keep the app in an
+ * elevated bucket for a while until some important task gets to run.
+ * @param packageName
+ * @param userId
+ * @param newBucket the bucket to set the app to
+ * @param elapsedRealtime mark as used time if non-zero
+ * @param timeout set the timeout of the specified bucket, if non-zero
+ * @return
+ */
+ public AppUsageHistory reportUsage(String packageName, int userId, int newBucket,
+ long nowElapsed, long timeout) {
+ ArrayMap<String, AppUsageHistory> userHistory = getUserHistory(userId);
+ AppUsageHistory history = getPackageHistory(userHistory, packageName, nowElapsed, true);
+ return reportUsage(history, packageName, newBucket, nowElapsed, timeout);
}
private ArrayMap<String, AppUsageHistory> getUserHistory(int userId) {
diff --git a/services/usage/java/com/android/server/usage/AppStandbyController.java b/services/usage/java/com/android/server/usage/AppStandbyController.java
index 6782188..8cb2eec 100644
--- a/services/usage/java/com/android/server/usage/AppStandbyController.java
+++ b/services/usage/java/com/android/server/usage/AppStandbyController.java
@@ -27,7 +27,6 @@
import static android.app.usage.UsageStatsManager.STANDBY_BUCKET_NEVER;
import static android.app.usage.UsageStatsManager.STANDBY_BUCKET_RARE;
import static android.app.usage.UsageStatsManager.STANDBY_BUCKET_WORKING_SET;
-
import static com.android.server.SystemService.PHASE_BOOT_COMPLETED;
import static com.android.server.SystemService.PHASE_SYSTEM_SERVICES_READY;
@@ -81,6 +80,7 @@
import com.android.internal.util.ConcurrentUtils;
import com.android.internal.util.IndentingPrintWriter;
import com.android.server.LocalServices;
+import com.android.server.usage.AppIdleHistory.AppUsageHistory;
import java.io.File;
import java.io.PrintWriter;
@@ -198,6 +198,48 @@
private PackageManager mPackageManager;
Injector mInjector;
+ static final ArrayList<StandbyUpdateRecord> sStandbyUpdatePool = new ArrayList<>(4);
+
+ public static class StandbyUpdateRecord {
+ // Identity of the app whose standby state has changed
+ String packageName;
+ int userId;
+
+ // What the standby bucket the app is now in
+ int bucket;
+
+ // Whether the bucket change is because the user has started interacting with the app
+ boolean isUserInteraction;
+
+ StandbyUpdateRecord(String pkgName, int userId, int bucket, boolean isInteraction) {
+ this.packageName = pkgName;
+ this.userId = userId;
+ this.bucket = bucket;
+ this.isUserInteraction = isInteraction;
+ }
+
+ public static StandbyUpdateRecord obtain(String pkgName, int userId,
+ int bucket, boolean isInteraction) {
+ synchronized (sStandbyUpdatePool) {
+ final int size = sStandbyUpdatePool.size();
+ if (size < 1) {
+ return new StandbyUpdateRecord(pkgName, userId, bucket, isInteraction);
+ }
+ StandbyUpdateRecord r = sStandbyUpdatePool.remove(size - 1);
+ r.packageName = pkgName;
+ r.userId = userId;
+ r.bucket = bucket;
+ r.isUserInteraction = isInteraction;
+ return r;
+ }
+ }
+
+ public void recycle() {
+ synchronized (sStandbyUpdatePool) {
+ sStandbyUpdatePool.add(this);
+ }
+ }
+ }
AppStandbyController(Context context, Looper looper) {
this(new Injector(context, looper));
@@ -279,11 +321,11 @@
}
if (!packageName.equals(providerPkgName)) {
synchronized (mAppIdleLock) {
- int newBucket = mAppIdleHistory.reportUsage(packageName, userId,
+ AppUsageHistory appUsage = mAppIdleHistory.reportUsage(packageName, userId,
STANDBY_BUCKET_ACTIVE, elapsedRealtime,
elapsedRealtime + 2 * ONE_HOUR);
maybeInformListeners(packageName, userId, elapsedRealtime,
- newBucket);
+ appUsage.currentBucket, false);
}
}
} catch (PackageManager.NameNotFoundException e) {
@@ -417,7 +459,7 @@
STANDBY_BUCKET_EXEMPTED, REASON_DEFAULT);
}
maybeInformListeners(packageName, userId, elapsedRealtime,
- STANDBY_BUCKET_EXEMPTED);
+ STANDBY_BUCKET_EXEMPTED, false);
} else {
synchronized (mAppIdleLock) {
AppIdleHistory.AppUsageHistory app =
@@ -446,7 +488,7 @@
mAppIdleHistory.setAppStandbyBucket(packageName, userId,
elapsedRealtime, newBucket, REASON_TIMEOUT);
maybeInformListeners(packageName, userId, elapsedRealtime,
- newBucket);
+ newBucket, false);
}
}
}
@@ -474,13 +516,16 @@
}
private void maybeInformListeners(String packageName, int userId,
- long elapsedRealtime, int bucket) {
+ long elapsedRealtime, int bucket, boolean userStartedInteracting) {
synchronized (mAppIdleLock) {
// TODO: fold these into one call + lookup for efficiency if needed
if (mAppIdleHistory.shouldInformListeners(packageName, userId,
elapsedRealtime, bucket)) {
+ StandbyUpdateRecord r = StandbyUpdateRecord.obtain(packageName, userId,
+ bucket, userStartedInteracting);
mHandler.sendMessage(mHandler.obtainMessage(MSG_INFORM_LISTENERS,
- userId, bucket, packageName));
+ StandbyUpdateRecord.obtain(packageName, userId,
+ bucket, userStartedInteracting)));
}
}
}
@@ -566,19 +611,27 @@
|| event.mEventType == UsageEvents.Event.USER_INTERACTION
|| event.mEventType == UsageEvents.Event.NOTIFICATION_SEEN)) {
- final int newBucket;
+ final AppUsageHistory appHistory = mAppIdleHistory.getAppUsageHistory(
+ event.mPackage, userId, elapsedRealtime);
+ final int prevBucket = appHistory.currentBucket;
+ final String prevBucketReason = appHistory.bucketingReason;
if (event.mEventType == UsageEvents.Event.NOTIFICATION_SEEN) {
- newBucket = mAppIdleHistory.reportUsage(event.mPackage, userId,
+ mAppIdleHistory.reportUsage(appHistory, event.mPackage,
STANDBY_BUCKET_WORKING_SET,
elapsedRealtime, elapsedRealtime + 2 * ONE_HOUR);
} else {
- newBucket = mAppIdleHistory.reportUsage(event.mPackage, userId,
+ mAppIdleHistory.reportUsage(event.mPackage, userId,
STANDBY_BUCKET_ACTIVE,
elapsedRealtime, elapsedRealtime + 2 * ONE_HOUR);
}
+ final boolean userStartedInteracting =
+ appHistory.currentBucket == STANDBY_BUCKET_ACTIVE &&
+ prevBucket != appHistory.currentBucket &&
+ prevBucketReason != REASON_USAGE;
maybeInformListeners(event.mPackage, userId, elapsedRealtime,
- newBucket);
+ appHistory.currentBucket, userStartedInteracting);
+
if (previouslyIdle) {
notifyBatteryStats(event.mPackage, userId, false);
}
@@ -611,7 +664,7 @@
userId, elapsedRealtime);
// Inform listeners if necessary
if (previouslyIdle != stillIdle) {
- maybeInformListeners(packageName, userId, elapsedRealtime, standbyBucket);
+ maybeInformListeners(packageName, userId, elapsedRealtime, standbyBucket, false);
if (!stillIdle) {
notifyBatteryStats(packageName, userId, idle);
}
@@ -871,8 +924,7 @@
mAppIdleHistory.setAppStandbyBucket(packageName, userId, elapsedRealtime, newBucket,
reason);
}
- maybeInformListeners(packageName, userId, elapsedRealtime,
- newBucket);
+ maybeInformListeners(packageName, userId, elapsedRealtime, newBucket, false);
}
@VisibleForTesting
@@ -972,11 +1024,14 @@
return packageName != null && packageName.equals(activeScorer);
}
- void informListeners(String packageName, int userId, int bucket) {
+ void informListeners(String packageName, int userId, int bucket, boolean userInteraction) {
final boolean idle = bucket >= STANDBY_BUCKET_RARE;
synchronized (mPackageAccessListeners) {
for (AppIdleStateChangeListener listener : mPackageAccessListeners) {
listener.onAppIdleStateChanged(packageName, userId, idle, bucket);
+ if (userInteraction) {
+ listener.onUserInteractionStarted(packageName, userId);
+ }
}
}
}
@@ -1230,7 +1285,9 @@
public void handleMessage(Message msg) {
switch (msg.what) {
case MSG_INFORM_LISTENERS:
- informListeners((String) msg.obj, msg.arg1, msg.arg2);
+ StandbyUpdateRecord r = (StandbyUpdateRecord) msg.obj;
+ informListeners(r.packageName, r.userId, r.bucket, r.isUserInteraction);
+ r.recycle();
break;
case MSG_FORCE_IDLE_STATE:
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index 096fdcc..36a2a95 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -1043,6 +1043,12 @@
return mAppStandby.getTimeSinceLastJobRun(packageName, userId);
}
+ @Override
+ public void reportAppJobState(String packageName, int userId,
+ int numDeferredJobs, long timeSinceLastJobRun) {
+ }
+
+ @Override
public void onActiveAdminAdded(String packageName, int userId) {
mAppStandby.addActiveDeviceAdmin(packageName, userId);
}
diff --git a/services/usb/Android.bp b/services/usb/Android.bp
index 0cd9ac3..feb7b76 100644
--- a/services/usb/Android.bp
+++ b/services/usb/Android.bp
@@ -10,5 +10,6 @@
static_libs: [
"android.hardware.usb-V1.0-java",
"android.hardware.usb-V1.1-java",
+ "android.hardware.usb.gadget-V1.0-java",
],
}
diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java
index 4a7072d..e3e5e3e 100644
--- a/services/usb/java/com/android/server/usb/UsbDeviceManager.java
+++ b/services/usb/java/com/android/server/usb/UsbDeviceManager.java
@@ -41,13 +41,21 @@
import android.hardware.usb.UsbManager;
import android.hardware.usb.UsbPort;
import android.hardware.usb.UsbPortStatus;
+import android.hardware.usb.gadget.V1_0.GadgetFunction;
+import android.hardware.usb.gadget.V1_0.IUsbGadget;
+import android.hardware.usb.gadget.V1_0.IUsbGadgetCallback;
+import android.hardware.usb.gadget.V1_0.Status;
+import android.hidl.manager.V1_0.IServiceManager;
+import android.hidl.manager.V1_0.IServiceNotification;
import android.os.BatteryManager;
import android.os.Environment;
import android.os.FileUtils;
import android.os.Handler;
+import android.os.HwBinder;
import android.os.Looper;
import android.os.Message;
import android.os.ParcelFileDescriptor;
+import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UEventObserver;
@@ -75,8 +83,10 @@
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
+import java.util.NoSuchElementException;
import java.util.Scanner;
import java.util.Set;
+import java.util.StringJoiner;
/**
* UsbDeviceManager manages USB state in device mode.
@@ -87,22 +97,6 @@
private static final boolean DEBUG = false;
/**
- * The persistent property which stores whether adb is enabled or not.
- * May also contain vendor-specific default functions for testing purposes.
- */
- private static final String USB_PERSISTENT_CONFIG_PROPERTY = "persist.sys.usb.config";
-
- /**
- * The non-persistent property which stores the current USB settings.
- */
- private static final String USB_CONFIG_PROPERTY = "sys.usb.config";
-
- /**
- * The non-persistent property which stores the current USB actual state.
- */
- private static final String USB_STATE_PROPERTY = "sys.usb.state";
-
- /**
* The SharedPreference setting per user that stores the screen unlocked functions between
* sessions.
*/
@@ -142,6 +136,10 @@
private static final int MSG_LOCALE_CHANGED = 11;
private static final int MSG_SET_SCREEN_UNLOCKED_FUNCTIONS = 12;
private static final int MSG_UPDATE_SCREEN_LOCK = 13;
+ private static final int MSG_SET_CHARGING_FUNCTIONS = 14;
+ private static final int MSG_SET_FUNCTIONS_TIMEOUT = 15;
+ private static final int MSG_GET_CURRENT_USB_FUNCTIONS = 16;
+ private static final int MSG_FUNCTION_SWITCH_TIMEOUT = 17;
private static final int AUDIO_MODE_SOURCE = 1;
@@ -157,9 +155,9 @@
private static final String BOOT_MODE_PROPERTY = "ro.bootmode";
private static final String ADB_NOTIFICATION_CHANNEL_ID_TV = "usbdevicemanager.adb.tv";
-
private UsbHandler mHandler;
private boolean mBootCompleted;
+ private boolean mSystemReady;
private final Object mLock = new Object();
@@ -175,7 +173,6 @@
private boolean mMidiEnabled;
private int mMidiCard;
private int mMidiDevice;
- private HashMap<String, HashMap<String, Pair<String, String>>> mOemModeMap;
private String[] mAccessoryStrings;
private UsbDebuggingManager mDebuggingManager;
private final UsbAlsaManager mUsbAlsaManager;
@@ -267,9 +264,27 @@
mHasUsbAccessory = pm.hasSystemFeature(PackageManager.FEATURE_USB_ACCESSORY);
initRndisAddress();
- readOemUsbOverrideConfig();
+ boolean halNotPresent = false;
+ try {
+ IUsbGadget.getService(true);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "USB GADGET HAL present but exception thrown", e);
+ } catch (NoSuchElementException e) {
+ halNotPresent = true;
+ Slog.i(TAG, "USB GADGET HAL not present in the device", e);
+ }
- mHandler = new UsbHandler(FgThread.get().getLooper());
+ if (halNotPresent) {
+ /**
+ * Initialze the legacy UsbHandler
+ */
+ mHandler = new UsbHandlerLegacy(FgThread.get().getLooper(), mContext);
+ } else {
+ /**
+ * Initialize HAL based UsbHandler
+ */
+ mHandler = new UsbHandlerHal(FgThread.get().getLooper());
+ }
if (nativeIsStartRequested()) {
if (DEBUG) Slog.d(TAG, "accessory attached at boot");
@@ -367,15 +382,6 @@
massStorageSupported = primary != null && primary.allowMassStorage();
mUseUsbNotification = !massStorageSupported && mContext.getResources().getBoolean(
com.android.internal.R.bool.config_usbChargingMessage);
-
- // make sure the ADB_ENABLED setting value matches the current state
- try {
- Settings.Global.putInt(mContentResolver,
- Settings.Global.ADB_ENABLED, mAdbEnabled ? 1 : 0);
- } catch (SecurityException e) {
- // If UserManager.DISALLOW_DEBUGGING_FEATURES is on, that this setting can't be changed.
- Slog.d(TAG, "ADB_ENABLED is restricted.");
- }
mHandler.sendEmptyMessage(MSG_SYSTEM_READY);
}
@@ -457,7 +463,7 @@
return context.getSharedPreferences(prefsFile, Context.MODE_PRIVATE);
}
- private final class UsbHandler extends Handler {
+ private abstract class UsbHandler extends Handler {
// current USB state
private boolean mConnected;
@@ -465,78 +471,53 @@
private boolean mSourcePower;
private boolean mSinkPower;
private boolean mConfigured;
- private boolean mUsbDataUnlocked;
+ protected boolean mUsbDataUnlocked;
private boolean mAudioAccessoryConnected;
private boolean mAudioAccessorySupported;
- private String mCurrentFunctions;
- private boolean mCurrentFunctionsApplied;
+ protected String mCurrentFunctions;
+ protected boolean mCurrentFunctionsApplied;
private UsbAccessory mCurrentAccessory;
private int mUsbNotificationId;
private boolean mAdbNotificationShown;
private int mCurrentUser;
private boolean mUsbCharging;
- private String mCurrentOemFunctions;
private boolean mHideUsbNotification;
private boolean mSupportsAllCombinations;
private String mScreenUnlockedFunctions = UsbManager.USB_FUNCTION_NONE;
private boolean mScreenLocked;
+ protected boolean mCurrentUsbFunctionsRequested;
+ protected boolean mCurrentUsbFunctionsReceived;
+
+ /**
+ * The persistent property which stores whether adb is enabled or not.
+ * May also contain vendor-specific default functions for testing purposes.
+ */
+ protected static final String USB_PERSISTENT_CONFIG_PROPERTY = "persist.sys.usb.config";
public UsbHandler(Looper looper) {
super(looper);
- try {
- // Restore default functions.
- mCurrentOemFunctions = SystemProperties.get(UsbDeviceManager.getPersistProp(false),
- UsbManager.USB_FUNCTION_NONE);
- if (isNormalBoot()) {
- mCurrentFunctions = SystemProperties.get(USB_CONFIG_PROPERTY,
- UsbManager.USB_FUNCTION_NONE);
- mCurrentFunctionsApplied = mCurrentFunctions.equals(
- SystemProperties.get(USB_STATE_PROPERTY));
- } else {
- mCurrentFunctions = SystemProperties.get(getPersistProp(true),
- UsbManager.USB_FUNCTION_NONE);
- mCurrentFunctionsApplied = SystemProperties.get(USB_CONFIG_PROPERTY,
- UsbManager.USB_FUNCTION_NONE).equals(
- SystemProperties.get(USB_STATE_PROPERTY));
- }
+ mCurrentUser = ActivityManager.getCurrentUser();
+ mScreenLocked = true;
- mCurrentUser = ActivityManager.getCurrentUser();
- mScreenLocked = true;
+ /*
+ * Use the normal bootmode persistent prop to maintain state of adb across
+ * all boot modes.
+ */
+ mAdbEnabled = UsbManager.containsFunction(
+ SystemProperties.get(USB_PERSISTENT_CONFIG_PROPERTY),
+ UsbManager.USB_FUNCTION_ADB);
- /*
- * Use the normal bootmode persistent prop to maintain state of adb across
- * all boot modes.
- */
- mAdbEnabled = UsbManager.containsFunction(
- SystemProperties.get(USB_PERSISTENT_CONFIG_PROPERTY),
- UsbManager.USB_FUNCTION_ADB);
-
- /*
- * Previous versions can set persist config to mtp/ptp but it does not
- * get reset on OTA. Reset the property here instead.
- */
- String persisted = SystemProperties.get(USB_PERSISTENT_CONFIG_PROPERTY);
- if (UsbManager.containsFunction(persisted, UsbManager.USB_FUNCTION_MTP)
- || UsbManager.containsFunction(persisted, UsbManager.USB_FUNCTION_PTP)) {
- SystemProperties.set(USB_PERSISTENT_CONFIG_PROPERTY,
- UsbManager.removeFunction(UsbManager.removeFunction(persisted,
- UsbManager.USB_FUNCTION_MTP), UsbManager.USB_FUNCTION_PTP));
- }
-
- String state = FileUtils.readTextFile(new File(STATE_PATH), 0, null).trim();
- updateState(state);
-
- // register observer to listen for settings changes
- mContentResolver.registerContentObserver(
- Settings.Global.getUriFor(Settings.Global.ADB_ENABLED),
- false, new AdbSettingsObserver());
-
- // Watch for USB configuration changes
- mUEventObserver.startObserving(USB_STATE_MATCH);
- mUEventObserver.startObserving(ACCESSORY_START_MATCH);
- } catch (Exception e) {
- Slog.e(TAG, "Error initializing UsbHandler", e);
+ /*
+ * Previous versions can set persist config to mtp/ptp but it does not
+ * get reset on OTA. Reset the property here instead.
+ */
+ String persisted = SystemProperties.get(USB_PERSISTENT_CONFIG_PROPERTY);
+ if (UsbManager.containsFunction(persisted, UsbManager.USB_FUNCTION_MTP)
+ || UsbManager.containsFunction(persisted, UsbManager.USB_FUNCTION_PTP)) {
+ SystemProperties.set(USB_PERSISTENT_CONFIG_PROPERTY,
+ UsbManager.removeFunction(UsbManager.removeFunction(persisted,
+ UsbManager.USB_FUNCTION_MTP), UsbManager.USB_FUNCTION_PTP));
}
}
@@ -562,6 +543,21 @@
sendMessage(m);
}
+ public void sendMessage(int what, boolean arg1, boolean arg2) {
+ removeMessages(what);
+ Message m = Message.obtain(this, what);
+ m.arg1 = (arg1 ? 1 : 0);
+ m.arg2 = (arg2 ? 1 : 0);
+ sendMessage(m);
+ }
+
+ public void sendMessageDelayed(int what, boolean arg, long delayMillis) {
+ removeMessages(what);
+ Message m = Message.obtain(this, what);
+ m.arg1 = (arg ? 1 : 0);
+ sendMessageDelayed(m, delayMillis);
+ }
+
public void updateState(String state) {
int connected, configured;
@@ -579,6 +575,7 @@
return;
}
removeMessages(MSG_UPDATE_STATE);
+ if (connected == 1) removeMessages(MSG_FUNCTION_SWITCH_TIMEOUT);
Message msg = Message.obtain(this, MSG_UPDATE_STATE);
msg.arg1 = connected;
msg.arg2 = configured;
@@ -601,28 +598,6 @@
sendMessageDelayed(msg, UPDATE_DELAY);
}
- private boolean waitForState(String state) {
- // wait for the transition to complete.
- // give up after 1 second.
- String value = null;
- for (int i = 0; i < 20; i++) {
- // State transition is done when sys.usb.state is set to the new configuration
- value = SystemProperties.get(USB_STATE_PROPERTY);
- if (state.equals(value)) return true;
- SystemClock.sleep(50);
- }
- Slog.e(TAG, "waitForState(" + state + ") FAILED: got " + value);
- return false;
- }
-
- private void setUsbConfig(String config) {
- if (DEBUG) Slog.d(TAG, "setUsbConfig(" + config + ")");
- // set the new configuration
- // we always set it due to b/23631400, where adbd was getting killed
- // and not restarted due to property timeouts on some devices
- SystemProperties.set(USB_CONFIG_PROPERTY, config);
- }
-
private void setAdbEnabled(boolean enable) {
if (DEBUG) Slog.d(TAG, "setAdbEnabled: " + enable);
if (enable != mAdbEnabled) {
@@ -649,114 +624,7 @@
}
}
- /**
- * Evaluates USB function policies and applies the change accordingly.
- */
- private void setEnabledFunctions(String functions, boolean forceRestart,
- boolean usbDataUnlocked) {
- if (DEBUG) {
- Slog.d(TAG, "setEnabledFunctions functions=" + functions + ", "
- + "forceRestart=" + forceRestart + ", usbDataUnlocked=" + usbDataUnlocked);
- }
-
- if (usbDataUnlocked != mUsbDataUnlocked) {
- mUsbDataUnlocked = usbDataUnlocked;
- updateUsbNotification(false);
- forceRestart = true;
- }
-
- // Try to set the enabled functions.
- final String oldFunctions = mCurrentFunctions;
- final boolean oldFunctionsApplied = mCurrentFunctionsApplied;
- if (trySetEnabledFunctions(functions, forceRestart)) {
- return;
- }
-
- // Didn't work. Try to revert changes.
- // We always reapply the policy in case certain constraints changed such as
- // user restrictions independently of any other new functions we were
- // trying to activate.
- if (oldFunctionsApplied && !oldFunctions.equals(functions)) {
- Slog.e(TAG, "Failsafe 1: Restoring previous USB functions.");
- if (trySetEnabledFunctions(oldFunctions, false)) {
- return;
- }
- }
-
- // Still didn't work. Try to restore the default functions.
- Slog.e(TAG, "Failsafe 2: Restoring default USB functions.");
- if (trySetEnabledFunctions(null, false)) {
- return;
- }
-
- // Now we're desperate. Ignore the default functions.
- // Try to get ADB working if enabled.
- Slog.e(TAG, "Failsafe 3: Restoring empty function list (with ADB if enabled).");
- if (trySetEnabledFunctions(UsbManager.USB_FUNCTION_NONE, false)) {
- return;
- }
-
- // Ouch.
- Slog.e(TAG, "Unable to set any USB functions!");
- }
-
- private boolean isNormalBoot() {
- String bootMode = SystemProperties.get(BOOT_MODE_PROPERTY, "unknown");
- return bootMode.equals(NORMAL_BOOT) || bootMode.equals("unknown");
- }
-
- private boolean trySetEnabledFunctions(String functions, boolean forceRestart) {
- if (functions == null || applyAdbFunction(functions)
- .equals(UsbManager.USB_FUNCTION_NONE)) {
- functions = getChargingFunctions();
- }
- functions = applyAdbFunction(functions);
-
- String oemFunctions = applyOemOverrideFunction(functions);
-
- if (!isNormalBoot() && !mCurrentFunctions.equals(functions)) {
- SystemProperties.set(getPersistProp(true), functions);
- }
-
- if ((!functions.equals(oemFunctions) &&
- !mCurrentOemFunctions.equals(oemFunctions))
- || !mCurrentFunctions.equals(functions)
- || !mCurrentFunctionsApplied
- || forceRestart) {
- Slog.i(TAG, "Setting USB config to " + functions);
- mCurrentFunctions = functions;
- mCurrentOemFunctions = oemFunctions;
- mCurrentFunctionsApplied = false;
-
- // Kick the USB stack to close existing connections.
- setUsbConfig(UsbManager.USB_FUNCTION_NONE);
-
- if (!waitForState(UsbManager.USB_FUNCTION_NONE)) {
- Slog.e(TAG, "Failed to kick USB config");
- return false;
- }
-
- // Set the new USB configuration.
- setUsbConfig(oemFunctions);
-
- if (mBootCompleted
- && (UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_MTP)
- || UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_PTP))) {
- // Start up dependent services.
- updateUsbStateBroadcastIfNeeded(true);
- }
-
- if (!waitForState(oemFunctions)) {
- Slog.e(TAG, "Failed to switch USB config to " + functions);
- return false;
- }
-
- mCurrentFunctionsApplied = true;
- }
- return true;
- }
-
- private String applyAdbFunction(String functions) {
+ protected String applyAdbFunction(String functions) {
// Do not pass null pointer to the UsbManager.
// There isnt a check there.
if (functions == null) {
@@ -838,7 +706,7 @@
return false;
}
- private void updateUsbStateBroadcastIfNeeded(boolean configChanged) {
+ protected void updateUsbStateBroadcastIfNeeded(boolean configChanged) {
// send a sticky broadcast containing current USB state
Intent intent = new Intent(UsbManager.ACTION_USB_STATE);
intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING
@@ -956,7 +824,8 @@
updateCurrentAccessory();
}
if (mBootCompleted) {
- if (!mConnected && !hasMessages(MSG_ACCESSORY_MODE_ENTER_TIMEOUT)) {
+ if (!mConnected && !hasMessages(MSG_ACCESSORY_MODE_ENTER_TIMEOUT)
+ && !hasMessages(MSG_FUNCTION_SWITCH_TIMEOUT)) {
// restore defaults when USB is disconnected
if (!mScreenLocked
&& !UsbManager.USB_FUNCTION_NONE.equals(
@@ -1082,7 +951,7 @@
if (!UsbManager.USB_FUNCTION_NONE.equals(mScreenUnlockedFunctions)
&& (UsbManager.USB_FUNCTION_ADB.equals(mCurrentFunctions)
|| (UsbManager.USB_FUNCTION_MTP.equals(mCurrentFunctions)
- && !mUsbDataUnlocked))) {
+ && !mUsbDataUnlocked))) {
// Set the screen unlocked functions if current function is charging.
setScreenUnlockedFunctions();
}
@@ -1097,9 +966,8 @@
mCurrentFunctions, forceRestart, mUsbDataUnlocked && !forceRestart);
break;
case MSG_SYSTEM_READY:
- updateUsbNotification(false);
- updateAdbNotification(false);
- updateUsbFunctions();
+ mSystemReady = true;
+ finishBoot();
break;
case MSG_LOCALE_CHANGED:
updateAdbNotification(true);
@@ -1107,23 +975,7 @@
break;
case MSG_BOOT_COMPLETED:
mBootCompleted = true;
- if (mPendingBootBroadcast) {
- updateUsbStateBroadcastIfNeeded(false);
- mPendingBootBroadcast = false;
- }
-
- if (!mScreenLocked
- && !UsbManager.USB_FUNCTION_NONE.equals(mScreenUnlockedFunctions)) {
- setScreenUnlockedFunctions();
- } else {
- setEnabledFunctions(null, false, false);
- }
- if (mCurrentAccessory != null) {
- getCurrentSettings().accessoryAttached(mCurrentAccessory);
- }
- if (mDebuggingManager != null) {
- mDebuggingManager.setAdbEnabled(mAdbEnabled);
- }
+ finishBoot();
break;
case MSG_USER_SWITCHED: {
if (mCurrentUser != msg.arg1) {
@@ -1153,6 +1005,41 @@
}
}
+ protected void finishBoot() {
+ if (mBootCompleted && mCurrentUsbFunctionsReceived && mSystemReady) {
+ if (mPendingBootBroadcast) {
+ updateUsbStateBroadcastIfNeeded(false);
+ mPendingBootBroadcast = false;
+ }
+ if (!mScreenLocked
+ && !UsbManager.USB_FUNCTION_NONE.equals(mScreenUnlockedFunctions)) {
+ setScreenUnlockedFunctions();
+ } else {
+ setEnabledFunctions(null, false, false);
+ }
+ if (mCurrentAccessory != null) {
+ getCurrentSettings().accessoryAttached(mCurrentAccessory);
+ }
+ if (mDebuggingManager != null) {
+ mDebuggingManager.setAdbEnabled(mAdbEnabled);
+ }
+
+ // make sure the ADB_ENABLED setting value matches the current state
+ try {
+ Settings.Global.putInt(mContentResolver,
+ Settings.Global.ADB_ENABLED, mAdbEnabled ? 1 : 0);
+ } catch (SecurityException e) {
+ // If UserManager.DISALLOW_DEBUGGING_FEATURES is on, that this setting can't
+ // be changed.
+ Slog.d(TAG, "ADB_ENABLED is restricted.");
+ }
+
+ updateUsbNotification(false);
+ updateAdbNotification(false);
+ updateUsbFunctions();
+ }
+ }
+
private boolean isUsbDataTransferActive() {
return UsbManager.containsFunction(mCurrentFunctions, UsbManager.USB_FUNCTION_MTP)
|| UsbManager.containsFunction(mCurrentFunctions, UsbManager.USB_FUNCTION_PTP);
@@ -1162,7 +1049,7 @@
return mCurrentAccessory;
}
- private void updateUsbNotification(boolean force) {
+ protected void updateUsbNotification(boolean force) {
if (mNotificationManager == null || !mUseUsbNotification
|| ("0".equals(SystemProperties.get("persist.charging.notify")))) {
return;
@@ -1262,18 +1149,18 @@
}
Notification.Builder builder = new Notification.Builder(mContext, channel)
- .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
- .setWhen(0)
- .setOngoing(true)
- .setTicker(title)
- .setDefaults(0) // please be quiet
- .setColor(mContext.getColor(
- com.android.internal.R.color
- .system_notification_accent_color))
- .setContentTitle(title)
- .setContentText(message)
- .setContentIntent(pi)
- .setVisibility(Notification.VISIBILITY_PUBLIC);
+ .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
+ .setWhen(0)
+ .setOngoing(true)
+ .setTicker(title)
+ .setDefaults(0) // please be quiet
+ .setColor(mContext.getColor(
+ com.android.internal.R.color
+ .system_notification_accent_color))
+ .setContentTitle(title)
+ .setContentText(message)
+ .setContentIntent(pi)
+ .setVisibility(Notification.VISIBILITY_PUBLIC);
if (titleRes
== com.android.internal.R.string
@@ -1291,7 +1178,7 @@
}
}
- private void updateAdbNotification(boolean force) {
+ protected void updateAdbNotification(boolean force) {
if (mNotificationManager == null) return;
final int id = SystemMessage.NOTE_ADB_ACTIVE;
final int titleRes = com.android.internal.R.string.adb_active_notification_title;
@@ -1343,22 +1230,23 @@
}
}
- private String getChargingFunctions() {
- String func = SystemProperties.get(getPersistProp(true),
- UsbManager.USB_FUNCTION_NONE);
+ protected String getChargingFunctions() {
// if ADB is enabled, reset functions to ADB
// else enable MTP as usual.
- if (UsbManager.containsFunction(func, UsbManager.USB_FUNCTION_ADB)) {
+ if (mAdbEnabled) {
return UsbManager.USB_FUNCTION_ADB;
} else {
return UsbManager.USB_FUNCTION_MTP;
}
}
+ public boolean isFunctionEnabled(String function) {
+ return UsbManager.containsFunction(mCurrentFunctions, function);
+ }
+
public void dump(IndentingPrintWriter pw) {
pw.println("USB Device State:");
pw.println(" mCurrentFunctions: " + mCurrentFunctions);
- pw.println(" mCurrentOemFunctions: " + mCurrentOemFunctions);
pw.println(" mCurrentFunctionsApplied: " + mCurrentFunctionsApplied);
pw.println(" mScreenUnlockedFunctions: " + mScreenUnlockedFunctions);
pw.println(" mScreenLocked: " + mScreenLocked);
@@ -1372,6 +1260,7 @@
pw.println(" mUsbCharging: " + mUsbCharging);
pw.println(" mHideUsbNotification: " + mHideUsbNotification);
pw.println(" mAudioAccessoryConnected: " + mAudioAccessoryConnected);
+ pw.println(" mAdbEnabled: " + mAdbEnabled);
try {
pw.println(" Kernel state: "
@@ -1382,6 +1271,675 @@
pw.println("IOException: " + e);
}
}
+
+ /**
+ * Evaluates USB function policies and applies the change accordingly.
+ */
+ protected abstract void setEnabledFunctions(String functions, boolean forceRestart,
+ boolean usbDataUnlocked);
+
+ }
+
+ private final class UsbHandlerLegacy extends UsbHandler {
+ /**
+ * The non-persistent property which stores the current USB settings.
+ */
+ private static final String USB_CONFIG_PROPERTY = "sys.usb.config";
+
+ /**
+ * The non-persistent property which stores the current USB actual state.
+ */
+ private static final String USB_STATE_PROPERTY = "sys.usb.state";
+
+ private HashMap<String, HashMap<String, Pair<String, String>>> mOemModeMap;
+ private String mCurrentOemFunctions;
+
+ UsbHandlerLegacy(Looper looper, Context context) {
+ super(looper);
+ try {
+ readOemUsbOverrideConfig(context);
+ // Restore default functions.
+ mCurrentOemFunctions = SystemProperties.get(getPersistProp(false),
+ UsbManager.USB_FUNCTION_NONE);
+ if (isNormalBoot()) {
+ mCurrentFunctions = SystemProperties.get(USB_CONFIG_PROPERTY,
+ UsbManager.USB_FUNCTION_NONE);
+ mCurrentFunctionsApplied = mCurrentFunctions.equals(
+ SystemProperties.get(USB_STATE_PROPERTY));
+ } else {
+ mCurrentFunctions = SystemProperties.get(getPersistProp(true),
+ UsbManager.USB_FUNCTION_NONE);
+ mCurrentFunctionsApplied = SystemProperties.get(USB_CONFIG_PROPERTY,
+ UsbManager.USB_FUNCTION_NONE).equals(
+ SystemProperties.get(USB_STATE_PROPERTY));
+ }
+ mCurrentUsbFunctionsReceived = true;
+
+ String state = FileUtils.readTextFile(new File(STATE_PATH), 0, null).trim();
+ updateState(state);
+
+ // register observer to listen for settings changes
+ mContentResolver.registerContentObserver(
+ Settings.Global.getUriFor(Settings.Global.ADB_ENABLED),
+ false, new AdbSettingsObserver());
+
+ // Watch for USB configuration changes
+ mUEventObserver.startObserving(USB_STATE_MATCH);
+ mUEventObserver.startObserving(ACCESSORY_START_MATCH);
+ } catch (Exception e) {
+ Slog.e(TAG, "Error initializing UsbHandler", e);
+ }
+ }
+
+ private void readOemUsbOverrideConfig(Context context) {
+ String[] configList = mContext.getResources().getStringArray(
+ com.android.internal.R.array.config_oemUsbModeOverride);
+
+ if (configList != null) {
+ for (String config : configList) {
+ String[] items = config.split(":");
+ if (items.length == 3 || items.length == 4) {
+ if (mOemModeMap == null) {
+ mOemModeMap = new HashMap<>();
+ }
+ HashMap<String, Pair<String, String>> overrideMap =
+ mOemModeMap.get(items[0]);
+ if (overrideMap == null) {
+ overrideMap = new HashMap<>();
+ mOemModeMap.put(items[0], overrideMap);
+ }
+
+ // Favoring the first combination if duplicate exists
+ if (!overrideMap.containsKey(items[1])) {
+ if (items.length == 3) {
+ overrideMap.put(items[1], new Pair<>(items[2], ""));
+ } else {
+ overrideMap.put(items[1], new Pair<>(items[2], items[3]));
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private String applyOemOverrideFunction(String usbFunctions) {
+ if ((usbFunctions == null) || (mOemModeMap == null)) {
+ return usbFunctions;
+ }
+
+ String bootMode = SystemProperties.get(BOOT_MODE_PROPERTY, "unknown");
+ Slog.d(TAG, "applyOemOverride usbfunctions=" + usbFunctions + " bootmode=" + bootMode);
+
+ Map<String, Pair<String, String>> overridesMap =
+ mOemModeMap.get(bootMode);
+ // Check to ensure that the oem is not overriding in the normal
+ // boot mode
+ if (overridesMap != null && !(bootMode.equals(NORMAL_BOOT)
+ || bootMode.equals("unknown"))) {
+ Pair<String, String> overrideFunctions =
+ overridesMap.get(usbFunctions);
+ if (overrideFunctions != null) {
+ Slog.d(TAG, "OEM USB override: " + usbFunctions
+ + " ==> " + overrideFunctions.first
+ + " persist across reboot "
+ + overrideFunctions.second);
+ if (!overrideFunctions.second.equals("")) {
+ String newFunction;
+ if (mAdbEnabled) {
+ newFunction = UsbManager.addFunction(overrideFunctions.second,
+ UsbManager.USB_FUNCTION_ADB);
+ } else {
+ newFunction = overrideFunctions.second;
+ }
+ Slog.d(TAG, "OEM USB override persisting: " + newFunction + "in prop: "
+ + getPersistProp(false));
+ SystemProperties.set(getPersistProp(false),
+ newFunction);
+ }
+ return overrideFunctions.first;
+ } else if (mAdbEnabled) {
+ String newFunction = UsbManager.addFunction(UsbManager.USB_FUNCTION_NONE,
+ UsbManager.USB_FUNCTION_ADB);
+ SystemProperties.set(getPersistProp(false),
+ newFunction);
+ } else {
+ SystemProperties.set(getPersistProp(false),
+ UsbManager.USB_FUNCTION_NONE);
+ }
+ }
+ // return passed in functions as is.
+ return usbFunctions;
+ }
+
+ private boolean waitForState(String state) {
+ // wait for the transition to complete.
+ // give up after 1 second.
+ String value = null;
+ for (int i = 0; i < 20; i++) {
+ // State transition is done when sys.usb.state is set to the new configuration
+ value = SystemProperties.get(USB_STATE_PROPERTY);
+ if (state.equals(value)) return true;
+ SystemClock.sleep(50);
+ }
+ Slog.e(TAG, "waitForState(" + state + ") FAILED: got " + value);
+ return false;
+ }
+
+ private void setUsbConfig(String config) {
+ if (DEBUG) Slog.d(TAG, "setUsbConfig(" + config + ")");
+ /**
+ * set the new configuration
+ * we always set it due to b/23631400, where adbd was getting killed
+ * and not restarted due to property timeouts on some devices
+ */
+ SystemProperties.set(USB_CONFIG_PROPERTY, config);
+ }
+
+ @Override
+ protected void setEnabledFunctions(String functions, boolean forceRestart,
+ boolean usbDataUnlocked) {
+ if (DEBUG) {
+ Slog.d(TAG, "setEnabledFunctions functions=" + functions + ", "
+ + "forceRestart=" + forceRestart + ", usbDataUnlocked=" + usbDataUnlocked);
+ }
+
+ if (usbDataUnlocked != mUsbDataUnlocked) {
+ mUsbDataUnlocked = usbDataUnlocked;
+ updateUsbNotification(false);
+ forceRestart = true;
+ }
+
+ /**
+ * Try to set the enabled functions.
+ */
+ final String oldFunctions = mCurrentFunctions;
+ final boolean oldFunctionsApplied = mCurrentFunctionsApplied;
+ if (trySetEnabledFunctions(functions, forceRestart)) {
+ return;
+ }
+
+ /**
+ * Didn't work. Try to revert changes.
+ * We always reapply the policy in case certain constraints changed such as
+ * user restrictions independently of any other new functions we were
+ * trying to activate.
+ */
+ if (oldFunctionsApplied && !oldFunctions.equals(functions)) {
+ Slog.e(TAG, "Failsafe 1: Restoring previous USB functions.");
+ if (trySetEnabledFunctions(oldFunctions, false)) {
+ return;
+ }
+ }
+
+ /**
+ * Still didn't work. Try to restore the default functions.
+ */
+ Slog.e(TAG, "Failsafe 2: Restoring default USB functions.");
+ if (trySetEnabledFunctions(null, false)) {
+ return;
+ }
+
+ /**
+ * Now we're desperate. Ignore the default functions.
+ * Try to get ADB working if enabled.
+ */
+ Slog.e(TAG, "Failsafe 3: Restoring empty function list (with ADB if enabled).");
+ if (trySetEnabledFunctions(UsbManager.USB_FUNCTION_NONE, false)) {
+ return;
+ }
+
+ /**
+ * Ouch.
+ */
+ Slog.e(TAG, "Unable to set any USB functions!");
+ }
+
+ private boolean isNormalBoot() {
+ String bootMode = SystemProperties.get(BOOT_MODE_PROPERTY, "unknown");
+ return bootMode.equals(NORMAL_BOOT) || bootMode.equals("unknown");
+ }
+
+ private boolean trySetEnabledFunctions(String functions, boolean forceRestart) {
+ if (functions == null || applyAdbFunction(functions)
+ .equals(UsbManager.USB_FUNCTION_NONE)) {
+ functions = getChargingFunctions();
+ }
+ functions = applyAdbFunction(functions);
+
+ String oemFunctions = applyOemOverrideFunction(functions);
+
+ if (!isNormalBoot() && !mCurrentFunctions.equals(functions)) {
+ SystemProperties.set(getPersistProp(true), functions);
+ }
+
+ if ((!functions.equals(oemFunctions)
+ && !mCurrentOemFunctions.equals(oemFunctions))
+ || !mCurrentFunctions.equals(functions)
+ || !mCurrentFunctionsApplied
+ || forceRestart) {
+ Slog.i(TAG, "Setting USB config to " + functions);
+ mCurrentFunctions = functions;
+ mCurrentOemFunctions = oemFunctions;
+ mCurrentFunctionsApplied = false;
+
+ /**
+ * Kick the USB stack to close existing connections.
+ */
+ setUsbConfig(UsbManager.USB_FUNCTION_NONE);
+
+ if (!waitForState(UsbManager.USB_FUNCTION_NONE)) {
+ Slog.e(TAG, "Failed to kick USB config");
+ return false;
+ }
+
+ /**
+ * Set the new USB configuration.
+ */
+ setUsbConfig(oemFunctions);
+
+ if (mBootCompleted
+ && (UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_MTP)
+ || UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_PTP))) {
+ /**
+ * Start up dependent services.
+ */
+ updateUsbStateBroadcastIfNeeded(true);
+ }
+
+ if (!waitForState(oemFunctions)) {
+ Slog.e(TAG, "Failed to switch USB config to " + functions);
+ return false;
+ }
+
+ mCurrentFunctionsApplied = true;
+ }
+ return true;
+ }
+
+ private String getPersistProp(boolean functions) {
+ String bootMode = SystemProperties.get(BOOT_MODE_PROPERTY, "unknown");
+ String persistProp = USB_PERSISTENT_CONFIG_PROPERTY;
+ if (!(bootMode.equals(NORMAL_BOOT) || bootMode.equals("unknown"))) {
+ if (functions) {
+ persistProp = "persist.sys.usb." + bootMode + ".func";
+ } else {
+ persistProp = "persist.sys.usb." + bootMode + ".config";
+ }
+ }
+ return persistProp;
+ }
+ }
+
+ private final class UsbHandlerHal extends UsbHandler {
+
+ /**
+ * Proxy object for the usb gadget hal daemon.
+ */
+ @GuardedBy("mGadgetProxyLock")
+ private IUsbGadget mGadgetProxy;
+
+ private final Object mGadgetProxyLock = new Object();
+
+ /**
+ * Cookie sent for usb gadget hal death notification.
+ */
+ private static final int USB_GADGET_HAL_DEATH_COOKIE = 2000;
+
+ /**
+ * Keeps track of the latest setCurrentUsbFunctions request number.
+ */
+ private int mCurrentRequest = 0;
+
+ /**
+ * The maximum time for which the UsbDeviceManager would wait once
+ * setCurrentUsbFunctions is called.
+ */
+ private static final int SET_FUNCTIONS_TIMEOUT_MS = 3000;
+
+ /**
+ * Conseration leeway to make sure that the hal callback arrives before
+ * SET_FUNCTIONS_TIMEOUT_MS expires. If the callback does not arrive
+ * within SET_FUNCTIONS_TIMEOUT_MS, UsbDeviceManager retries enabling
+ * default functions.
+ */
+ private static final int SET_FUNCTIONS_LEEWAY_MS = 500;
+
+ /**
+ * While switching functions, a disconnect is excpect as the usb gadget
+ * us torn down and brought back up. Wait for SET_FUNCTIONS_TIMEOUT_MS +
+ * ENUMERATION_TIME_OUT_MS before switching back to default fumctions when
+ * switching functions.
+ */
+ private static final int ENUMERATION_TIME_OUT_MS = 2000;
+
+ /**
+ * Command to start native service.
+ */
+ protected static final String CTL_START = "ctl.start";
+
+ /**
+ * Command to start native service.
+ */
+ protected static final String CTL_STOP = "ctl.stop";
+
+ /**
+ * Adb natvie daemon
+ */
+ protected static final String ADBD = "adbd";
+
+
+ UsbHandlerHal(Looper looper) {
+ super(looper);
+ try {
+ ServiceNotification serviceNotification = new ServiceNotification();
+
+ boolean ret = IServiceManager.getService()
+ .registerForNotifications("android.hardware.usb.gadget@1.0::IUsbGadget",
+ "", serviceNotification);
+ if (!ret) {
+ Slog.e(TAG, "Failed to register usb gadget service start notification");
+ return;
+ }
+
+ synchronized (mGadgetProxyLock) {
+ mGadgetProxy = IUsbGadget.getService(true);
+ mGadgetProxy.linkToDeath(new UsbGadgetDeathRecipient(),
+ USB_GADGET_HAL_DEATH_COOKIE);
+ mCurrentFunctions = UsbManager.USB_FUNCTION_NONE;
+ mGadgetProxy.getCurrentUsbFunctions(new UsbGadgetCallback());
+ mCurrentUsbFunctionsRequested = true;
+ }
+ String state = FileUtils.readTextFile(new File(STATE_PATH), 0, null).trim();
+ updateState(state);
+
+ /**
+ * Register observer to listen for settings changes.
+ */
+ mContentResolver.registerContentObserver(
+ Settings.Global.getUriFor(Settings.Global.ADB_ENABLED),
+ false, new AdbSettingsObserver());
+
+ /**
+ * Watch for USB configuration changes.
+ */
+ mUEventObserver.startObserving(USB_STATE_MATCH);
+ mUEventObserver.startObserving(ACCESSORY_START_MATCH);
+ } catch (NoSuchElementException e) {
+ Slog.e(TAG, "Usb gadget hal not found", e);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Usb Gadget hal not responding", e);
+ } catch (Exception e) {
+ Slog.e(TAG, "Error initializing UsbHandler", e);
+ }
+ }
+
+
+ final class UsbGadgetDeathRecipient implements HwBinder.DeathRecipient {
+ @Override
+ public void serviceDied(long cookie) {
+ if (cookie == USB_GADGET_HAL_DEATH_COOKIE) {
+ Slog.e(TAG, "Usb Gadget hal service died cookie: " + cookie);
+ synchronized (mGadgetProxyLock) {
+ mGadgetProxy = null;
+ }
+ }
+ }
+ }
+
+ final class ServiceNotification extends IServiceNotification.Stub {
+ @Override
+ public void onRegistration(String fqName, String name, boolean preexisting) {
+ Slog.i(TAG, "Usb gadget hal service started " + fqName + " " + name);
+ synchronized (mGadgetProxyLock) {
+ try {
+ mGadgetProxy = IUsbGadget.getService();
+ mGadgetProxy.linkToDeath(new UsbGadgetDeathRecipient(),
+ USB_GADGET_HAL_DEATH_COOKIE);
+ if (!mCurrentFunctionsApplied) {
+ setCurrentFunctions(mCurrentFunctions, mUsbDataUnlocked);
+ }
+ } catch (NoSuchElementException e) {
+ Slog.e(TAG, "Usb gadget hal not found", e);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Usb Gadget hal not responding", e);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case MSG_SET_CHARGING_FUNCTIONS:
+ setEnabledFunctions(null, false, mUsbDataUnlocked);
+ break;
+ case MSG_SET_FUNCTIONS_TIMEOUT:
+ Slog.e(TAG, "Set functions timed out! no reply from usb hal");
+ if (msg.arg1 != 1) {
+ setEnabledFunctions(null, false, mUsbDataUnlocked);
+ }
+ break;
+ case MSG_GET_CURRENT_USB_FUNCTIONS:
+ Slog.e(TAG, "prcessing MSG_GET_CURRENT_USB_FUNCTIONS");
+ mCurrentUsbFunctionsReceived = true;
+
+ if (mCurrentUsbFunctionsRequested) {
+ Slog.e(TAG, "updating mCurrentFunctions");
+ mCurrentFunctions = functionListToString((Long) msg.obj);
+ Slog.e(TAG,
+ "mCurrentFunctions:" + mCurrentFunctions + "applied:" + msg.arg1);
+ mCurrentFunctionsApplied = msg.arg1 == 1;
+ }
+ finishBoot();
+ break;
+ case MSG_FUNCTION_SWITCH_TIMEOUT:
+ /**
+ * Dont force to default when the configuration is already set to default.
+ */
+ if (msg.arg1 != 1) {
+ setEnabledFunctions(null, !mAdbEnabled, false);
+ }
+ break;
+ default:
+ super.handleMessage(msg);
+ }
+ }
+
+ private class UsbGadgetCallback extends IUsbGadgetCallback.Stub {
+ int mRequest;
+ long mFunctions;
+ boolean mChargingFunctions;
+
+ UsbGadgetCallback() {
+ }
+
+ UsbGadgetCallback(int request, long functions,
+ boolean chargingFunctions) {
+ mRequest = request;
+ mFunctions = functions;
+ mChargingFunctions = chargingFunctions;
+ }
+
+ @Override
+ public void setCurrentUsbFunctionsCb(long functions,
+ int status) {
+ /**
+ * Callback called for a previous setCurrenUsbFunction
+ */
+ if ((mCurrentRequest != mRequest) || !hasMessages(MSG_SET_FUNCTIONS_TIMEOUT)
+ || (mFunctions != functions)) {
+ return;
+ }
+
+ removeMessages(MSG_SET_FUNCTIONS_TIMEOUT);
+ Slog.e(TAG, "notifyCurrentFunction request:" + mRequest + " status:" + status);
+ if (status == Status.SUCCESS) {
+ mCurrentFunctionsApplied = true;
+ } else if (!mChargingFunctions) {
+ Slog.e(TAG, "Setting default fuctions");
+ sendEmptyMessage(MSG_SET_CHARGING_FUNCTIONS);
+ }
+ }
+
+ @Override
+ public void getCurrentUsbFunctionsCb(long functions,
+ int status) {
+ sendMessage(MSG_GET_CURRENT_USB_FUNCTIONS, functions,
+ status == Status.FUNCTIONS_APPLIED);
+ }
+ }
+
+ private long stringToFunctionList(String config) {
+ long functionsMask = 0;
+ String[] functions = config.split(",");
+ for (int i = 0; i < functions.length; i++) {
+ switch (functions[i]) {
+ case "none":
+ functionsMask |= GadgetFunction.NONE;
+ break;
+ case "adb":
+ functionsMask |= GadgetFunction.ADB;
+ break;
+ case "mtp":
+ functionsMask |= GadgetFunction.MTP;
+ break;
+ case "ptp":
+ functionsMask |= GadgetFunction.PTP;
+ break;
+ case "midi":
+ functionsMask |= GadgetFunction.MIDI;
+ break;
+ case "accessory":
+ functionsMask |= GadgetFunction.ACCESSORY;
+ break;
+ case "rndis":
+ functionsMask |= GadgetFunction.RNDIS;
+ break;
+ }
+ }
+ return functionsMask;
+ }
+
+ private String functionListToString(Long functionList) {
+ StringJoiner functions = new StringJoiner(",");
+ if (functionList == GadgetFunction.NONE) {
+ functions.add("none");
+ return functions.toString();
+ }
+ if ((functionList & GadgetFunction.ADB) != 0) {
+ functions.add("adb");
+ }
+ if ((functionList & GadgetFunction.MTP) != 0) {
+ functions.add("mtp");
+ }
+ if ((functionList & GadgetFunction.PTP) != 0) {
+ functions.add("ptp");
+ }
+ if ((functionList & GadgetFunction.MIDI) != 0) {
+ functions.add("midi");
+ }
+ if ((functionList & GadgetFunction.ACCESSORY) != 0) {
+ functions.add("accessory");
+ }
+ if ((functionList & GadgetFunction.RNDIS) != 0) {
+ functions.add("rndis");
+ }
+ /**
+ * Remove the trailing comma.
+ */
+ return functions.toString();
+ }
+
+
+ private void setUsbConfig(String config, boolean chargingFunctions) {
+ Long functions = stringToFunctionList(config);
+ if (true) Slog.d(TAG, "setUsbConfig(" + config + ") request:" + ++mCurrentRequest);
+ /**
+ * Cancel any ongoing requests, if present.
+ */
+ removeMessages(MSG_FUNCTION_SWITCH_TIMEOUT);
+ removeMessages(MSG_SET_FUNCTIONS_TIMEOUT);
+ removeMessages(MSG_SET_CHARGING_FUNCTIONS);
+
+ synchronized (mGadgetProxyLock) {
+ if (mGadgetProxy == null) {
+ Slog.e(TAG, "setUsbConfig mGadgetProxy is null");
+ return;
+ }
+ try {
+ if ((functions & GadgetFunction.ADB) != 0) {
+ /**
+ * Start adbd if ADB function is included in the configuration.
+ */
+ SystemProperties.set(CTL_START, ADBD);
+ } else {
+ /**
+ * Stop adbd otherwise.
+ */
+ SystemProperties.set(CTL_STOP, ADBD);
+ }
+ UsbGadgetCallback usbGadgetCallback = new UsbGadgetCallback(mCurrentRequest,
+ functions, chargingFunctions);
+ mGadgetProxy.setCurrentUsbFunctions(functions, usbGadgetCallback,
+ SET_FUNCTIONS_TIMEOUT_MS - SET_FUNCTIONS_LEEWAY_MS);
+ sendMessageDelayed(MSG_SET_FUNCTIONS_TIMEOUT, chargingFunctions,
+ SET_FUNCTIONS_TIMEOUT_MS);
+ sendMessageDelayed(MSG_FUNCTION_SWITCH_TIMEOUT, chargingFunctions,
+ SET_FUNCTIONS_TIMEOUT_MS + ENUMERATION_TIME_OUT_MS);
+ if (DEBUG) Slog.d(TAG, "timeout message queued");
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Remoteexception while calling setCurrentUsbFunctions", e);
+ }
+ }
+ }
+
+ @Override
+ protected void setEnabledFunctions(String functions, boolean forceRestart,
+ boolean usbDataUnlocked) {
+ if (DEBUG) {
+ Slog.d(TAG, "setEnabledFunctions functions=" + functions + ", "
+ + "forceRestart=" + forceRestart + ", usbDataUnlocked=" + usbDataUnlocked);
+ }
+
+ if (usbDataUnlocked != mUsbDataUnlocked) {
+ mUsbDataUnlocked = usbDataUnlocked;
+ updateUsbNotification(false);
+ forceRestart = true;
+ }
+
+ trySetEnabledFunctions(functions, forceRestart);
+ }
+
+ private void trySetEnabledFunctions(String functions, boolean forceRestart) {
+ boolean chargingFunctions = false;
+
+ if (functions == null || applyAdbFunction(functions)
+ .equals(UsbManager.USB_FUNCTION_NONE)) {
+ functions = getChargingFunctions();
+ chargingFunctions = true;
+ }
+ functions = applyAdbFunction(functions);
+
+ if (!mCurrentFunctions.equals(functions)
+ || !mCurrentFunctionsApplied
+ || forceRestart) {
+ Slog.i(TAG, "Setting USB config to " + functions);
+ mCurrentFunctions = functions;
+ mCurrentFunctionsApplied = false;
+ // set the flag to false as that would be stale value
+ mCurrentUsbFunctionsRequested = false;
+
+ // Set the new USB configuration.
+ setUsbConfig(mCurrentFunctions, chargingFunctions);
+
+ if (mBootCompleted
+ && (UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_MTP)
+ || UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_PTP))) {
+ // Start up dependent services.
+ updateUsbStateBroadcastIfNeeded(true);
+ }
+ }
+ }
}
/* returns the currently attached USB accessory */
@@ -1389,7 +1947,11 @@
return mHandler.getCurrentAccessory();
}
- /* opens the currently attached USB accessory */
+ /**
+ * opens the currently attached USB accessory.
+ *
+ * @param accessory accessory to be openened.
+ */
public ParcelFileDescriptor openAccessory(UsbAccessory accessory,
UsbUserSettingsManager settings) {
UsbAccessory currentAccessory = mHandler.getCurrentAccessory();
@@ -1406,20 +1968,32 @@
return nativeOpenAccessory();
}
+ /**
+ * Checks whether the function is present in the USB configuration.
+ *
+ * @param function function to be checked.
+ */
public boolean isFunctionEnabled(String function) {
- return UsbManager.containsFunction(SystemProperties.get(USB_CONFIG_PROPERTY), function);
+ return mHandler.isFunctionEnabled(function);
}
+ /**
+ * Adds function to the current USB configuration.
+ *
+ * @param functions name of the USB function, or null to restore the default function.
+ * @param usbDataUnlocked whether user data is accessible.
+ */
public void setCurrentFunctions(String functions, boolean usbDataUnlocked) {
if (DEBUG) {
- Slog.d(TAG, "setCurrentFunctions(" + functions + ", " +
- usbDataUnlocked + ")");
+ Slog.d(TAG, "setCurrentFunctions(" + functions + ", "
+ + usbDataUnlocked + ")");
}
mHandler.sendMessage(MSG_SET_CURRENT_FUNCTIONS, functions, usbDataUnlocked);
}
/**
* Sets the functions which are set when the screen is unlocked.
+ *
* @param functions Functions to set.
*/
public void setScreenUnlockedFunctions(String functions) {
@@ -1429,101 +2003,6 @@
mHandler.sendMessage(MSG_SET_SCREEN_UNLOCKED_FUNCTIONS, functions);
}
- private void readOemUsbOverrideConfig() {
- String[] configList = mContext.getResources().getStringArray(
- com.android.internal.R.array.config_oemUsbModeOverride);
-
- if (configList != null) {
- for (String config : configList) {
- String[] items = config.split(":");
- if (items.length == 3 || items.length == 4) {
- if (mOemModeMap == null) {
- mOemModeMap = new HashMap<>();
- }
- HashMap<String, Pair<String, String>> overrideMap
- = mOemModeMap.get(items[0]);
- if (overrideMap == null) {
- overrideMap = new HashMap<>();
- mOemModeMap.put(items[0], overrideMap);
- }
-
- // Favoring the first combination if duplicate exists
- if (!overrideMap.containsKey(items[1])) {
- if (items.length == 3) {
- overrideMap.put(items[1], new Pair<>(items[2], ""));
- } else {
- overrideMap.put(items[1], new Pair<>(items[2], items[3]));
- }
- }
- }
- }
- }
- }
-
- private String applyOemOverrideFunction(String usbFunctions) {
- if ((usbFunctions == null) || (mOemModeMap == null)) {
- return usbFunctions;
- }
-
- String bootMode = SystemProperties.get(BOOT_MODE_PROPERTY, "unknown");
- Slog.d(TAG, "applyOemOverride usbfunctions=" + usbFunctions + " bootmode=" + bootMode);
-
- Map<String, Pair<String, String>> overridesMap =
- mOemModeMap.get(bootMode);
- // Check to ensure that the oem is not overriding in the normal
- // boot mode
- if (overridesMap != null && !(bootMode.equals(NORMAL_BOOT) ||
- bootMode.equals("unknown"))) {
- Pair<String, String> overrideFunctions =
- overridesMap.get(usbFunctions);
- if (overrideFunctions != null) {
- Slog.d(TAG, "OEM USB override: " + usbFunctions
- + " ==> " + overrideFunctions.first
- + " persist across reboot "
- + overrideFunctions.second);
- if (!overrideFunctions.second.equals("")) {
- String newFunction;
- if (mAdbEnabled) {
- newFunction = UsbManager.addFunction(overrideFunctions.second,
- UsbManager.USB_FUNCTION_ADB);
- } else {
- newFunction = overrideFunctions.second;
- }
- Slog.d(TAG, "OEM USB override persisting: " + newFunction + "in prop: "
- + UsbDeviceManager.getPersistProp(false));
- SystemProperties.set(UsbDeviceManager.getPersistProp(false),
- newFunction);
- }
- return overrideFunctions.first;
- } else if (mAdbEnabled) {
- String newFunction = UsbManager.addFunction(UsbManager.USB_FUNCTION_NONE,
- UsbManager.USB_FUNCTION_ADB);
- SystemProperties.set(UsbDeviceManager.getPersistProp(false),
- newFunction);
- } else {
- SystemProperties.set(UsbDeviceManager.getPersistProp(false),
- UsbManager.USB_FUNCTION_NONE);
- }
- }
- // return passed in functions as is.
- return usbFunctions;
- }
-
- public static String getPersistProp(boolean functions) {
- String bootMode = SystemProperties.get(BOOT_MODE_PROPERTY, "unknown");
- String persistProp = USB_PERSISTENT_CONFIG_PROPERTY;
- if (!(bootMode.equals(NORMAL_BOOT) || bootMode.equals("unknown"))) {
- if (functions) {
- persistProp = "persist.sys.usb." + bootMode + ".func";
- } else {
- persistProp = "persist.sys.usb." + bootMode + ".config";
- }
- }
-
- return persistProp;
- }
-
-
public void allowUsbDebugging(boolean alwaysAllow, String publicKey) {
if (mDebuggingManager != null) {
mDebuggingManager.allowUsbDebugging(alwaysAllow, publicKey);
diff --git a/services/usb/java/com/android/server/usb/UsbProfileGroupSettingsManager.java b/services/usb/java/com/android/server/usb/UsbProfileGroupSettingsManager.java
index 917e651..5f1f5e4 100644
--- a/services/usb/java/com/android/server/usb/UsbProfileGroupSettingsManager.java
+++ b/services/usb/java/com/android/server/usb/UsbProfileGroupSettingsManager.java
@@ -208,7 +208,7 @@
mParentUser = user;
mSettingsFile = new AtomicFile(new File(
Environment.getUserSystemDirectory(user.getIdentifier()),
- "usb_device_manager.xml"));
+ "usb_device_manager.xml"), "usb-state");
mDisablePermissionDialogs = context.getResources().getBoolean(
com.android.internal.R.bool.config_disableUsbPermissionDialogs);
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index d17bdc8..6799417 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -1960,6 +1960,15 @@
}
}
+ /** {@hide} */
+ final void internalOnHandoverComplete() {
+ for (CallbackRecord<Callback> record : mCallbackRecords) {
+ final Call call = this;
+ final Callback callback = record.getCallback();
+ record.getHandler().post(() -> callback.onHandoverComplete(call));
+ }
+ }
+
private void fireStateChanged(final int newState) {
for (CallbackRecord<Callback> record : mCallbackRecords) {
final Call call = this;
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index 7522443..63f970a 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -2801,6 +2801,15 @@
public void onCallEvent(String event, Bundle extras) {}
/**
+ * Notifies this {@link Connection} that a handover has completed.
+ * <p>
+ * A handover is initiated with {@link android.telecom.Call#handoverTo(PhoneAccountHandle, int,
+ * Bundle)} on the initiating side of the handover, and
+ * {@link TelecomManager#acceptHandover(Uri, int, PhoneAccountHandle)}.
+ */
+ public void onHandoverComplete() {}
+
+ /**
* Notifies this {@link Connection} of a change to the extras made outside the
* {@link ConnectionService}.
* <p>
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 6af01ae..c1040ad 100644
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -140,6 +140,7 @@
private static final String SESSION_POST_DIAL_CONT = "CS.oPDC";
private static final String SESSION_PULL_EXTERNAL_CALL = "CS.pEC";
private static final String SESSION_SEND_CALL_EVENT = "CS.sCE";
+ private static final String SESSION_HANDOVER_COMPLETE = "CS.hC";
private static final String SESSION_EXTRAS_CHANGED = "CS.oEC";
private static final String SESSION_START_RTT = "CS.+RTT";
private static final String SESSION_STOP_RTT = "CS.-RTT";
@@ -179,6 +180,7 @@
private static final int MSG_CONNECTION_SERVICE_FOCUS_LOST = 30;
private static final int MSG_CONNECTION_SERVICE_FOCUS_GAINED = 31;
private static final int MSG_HANDOVER_FAILED = 32;
+ private static final int MSG_HANDOVER_COMPLETE = 33;
private static Connection sNullConnection;
@@ -298,6 +300,19 @@
}
@Override
+ public void handoverComplete(String callId, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_HANDOVER_COMPLETE);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_HANDOVER_COMPLETE, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
+ }
+
+ @Override
public void abort(String callId, Session.Info sessionInfo) {
Log.startSession(sessionInfo, SESSION_ABORT);
try {
@@ -1028,6 +1043,19 @@
}
break;
}
+ case MSG_HANDOVER_COMPLETE: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ try {
+ Log.continueSession((Session) args.arg2,
+ SESSION_HANDLER + SESSION_HANDOVER_COMPLETE);
+ String callId = (String) args.arg1;
+ notifyHandoverComplete(callId);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
+ break;
+ }
case MSG_ON_EXTRAS_CHANGED: {
SomeArgs args = (SomeArgs) msg.obj;
try {
@@ -1445,19 +1473,24 @@
final ConnectionRequest request,
boolean isIncoming,
boolean isUnknown) {
+ boolean isLegacyHandover = request.getExtras() != null &&
+ request.getExtras().getBoolean(TelecomManager.EXTRA_IS_HANDOVER, false);
+ boolean isHandover = request.getExtras() != null && request.getExtras().getBoolean(
+ TelecomManager.EXTRA_IS_HANDOVER_CONNECTION, false);
Log.d(this, "createConnection, callManagerAccount: %s, callId: %s, request: %s, " +
- "isIncoming: %b, isUnknown: %b", callManagerAccount, callId, request,
- isIncoming,
- isUnknown);
+ "isIncoming: %b, isUnknown: %b, isLegacyHandover: %b, isHandover: %b",
+ callManagerAccount, callId, request, isIncoming, isUnknown, isLegacyHandover,
+ isHandover);
Connection connection = null;
- if (getApplicationContext().getApplicationInfo().targetSdkVersion >
- Build.VERSION_CODES.O_MR1 && request.getExtras() != null &&
- request.getExtras().getBoolean(TelecomManager.EXTRA_IS_HANDOVER,false)) {
+ if (isHandover) {
+ PhoneAccountHandle fromPhoneAccountHandle = request.getExtras() != null
+ ? (PhoneAccountHandle) request.getExtras().getParcelable(
+ TelecomManager.EXTRA_HANDOVER_FROM_PHONE_ACCOUNT) : null;
if (!isIncoming) {
- connection = onCreateOutgoingHandoverConnection(callManagerAccount, request);
+ connection = onCreateOutgoingHandoverConnection(fromPhoneAccountHandle, request);
} else {
- connection = onCreateIncomingHandoverConnection(callManagerAccount, request);
+ connection = onCreateIncomingHandoverConnection(fromPhoneAccountHandle, request);
}
} else {
connection = isUnknown ? onCreateUnknownConnection(callManagerAccount, request)
@@ -1754,6 +1787,19 @@
}
/**
+ * Notifies a {@link Connection} that a handover has completed.
+ *
+ * @param callId The ID of the call which completed handover.
+ */
+ private void notifyHandoverComplete(String callId) {
+ Log.d(this, "notifyHandoverComplete(%s)", callId);
+ Connection connection = findConnectionForAction(callId, "notifyHandoverComplete");
+ if (connection != null) {
+ connection.onHandoverComplete();
+ }
+ }
+
+ /**
* Notifies a {@link Connection} or {@link Conference} of a change to the extras from Telecom.
* <p>
* These extra changes can originate from Telecom itself, or from an {@link InCallService} via
diff --git a/telecomm/java/android/telecom/InCallService.java b/telecomm/java/android/telecom/InCallService.java
index 74fa62d..fcf04c9 100644
--- a/telecomm/java/android/telecom/InCallService.java
+++ b/telecomm/java/android/telecom/InCallService.java
@@ -81,6 +81,7 @@
private static final int MSG_ON_RTT_UPGRADE_REQUEST = 10;
private static final int MSG_ON_RTT_INITIATION_FAILURE = 11;
private static final int MSG_ON_HANDOVER_FAILED = 12;
+ private static final int MSG_ON_HANDOVER_COMPLETE = 13;
/** Default Handler used to consolidate binder method calls onto a single thread. */
private final Handler mHandler = new Handler(Looper.getMainLooper()) {
@@ -157,6 +158,11 @@
mPhone.internalOnHandoverFailed(callId, error);
break;
}
+ case MSG_ON_HANDOVER_COMPLETE: {
+ String callId = (String) msg.obj;
+ mPhone.internalOnHandoverComplete(callId);
+ break;
+ }
default:
break;
}
@@ -237,6 +243,11 @@
public void onHandoverFailed(String callId, int error) {
mHandler.obtainMessage(MSG_ON_HANDOVER_FAILED, error, 0, callId).sendToTarget();
}
+
+ @Override
+ public void onHandoverComplete(String callId) {
+ mHandler.obtainMessage(MSG_ON_HANDOVER_COMPLETE, callId).sendToTarget();
+ }
}
private Phone.Listener mPhoneListener = new Phone.Listener() {
diff --git a/telecomm/java/android/telecom/Phone.java b/telecomm/java/android/telecom/Phone.java
index b5394b9..99f94f2 100644
--- a/telecomm/java/android/telecom/Phone.java
+++ b/telecomm/java/android/telecom/Phone.java
@@ -230,6 +230,13 @@
}
}
+ final void internalOnHandoverComplete(String callId) {
+ Call call = mCallByTelecomCallId.get(callId);
+ if (call != null) {
+ call.internalOnHandoverComplete();
+ }
+ }
+
/**
* Called to destroy the phone and cleanup any lingering calls.
*/
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index 91d5da3..1fe5db5 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -111,6 +111,12 @@
"android.telecom.action.SHOW_RESPOND_VIA_SMS_SETTINGS";
/**
+ * The {@link android.content.Intent} action used to show the assisted dialing settings.
+ */
+ public static final String ACTION_SHOW_ASSISTED_DIALING_SETTINGS =
+ "android.telecom.action.SHOW_ASSISTED_DIALING_SETTINGS";
+
+ /**
* The {@link android.content.Intent} action used to show the settings page used to configure
* {@link PhoneAccount} preferences.
*/
@@ -379,6 +385,17 @@
public static final String EXTRA_IS_HANDOVER = "android.telecom.extra.IS_HANDOVER";
/**
+ * When {@code true} indicates that a request to create a new connection is for the purpose of
+ * a handover. Note: This is used with the
+ * {@link android.telecom.Call#handoverTo(PhoneAccountHandle, int, Bundle)} API as part of the
+ * internal communication mechanism with the {@link android.telecom.ConnectionService}. It is
+ * not the same as the legacy {@link #EXTRA_IS_HANDOVER} extra.
+ * @hide
+ */
+ public static final String EXTRA_IS_HANDOVER_CONNECTION =
+ "android.telecom.extra.IS_HANDOVER_CONNECTION";
+
+ /**
* Parcelable extra used with {@link #EXTRA_IS_HANDOVER} to indicate the source
* {@link PhoneAccountHandle} when initiating a handover which {@link ConnectionService}
* the handover is from.
diff --git a/telecomm/java/com/android/internal/telecom/IConnectionService.aidl b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
index 3d04bfc..3a84f00 100644
--- a/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
+++ b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
@@ -107,4 +107,6 @@
void handoverFailed(String callId, in ConnectionRequest request,
int error, in Session.Info sessionInfo);
+
+ void handoverComplete(String callId, in Session.Info sessionInfo);
}
diff --git a/telecomm/java/com/android/internal/telecom/IInCallService.aidl b/telecomm/java/com/android/internal/telecom/IInCallService.aidl
index 110109e..b9563fa 100644
--- a/telecomm/java/com/android/internal/telecom/IInCallService.aidl
+++ b/telecomm/java/com/android/internal/telecom/IInCallService.aidl
@@ -56,4 +56,6 @@
void onRttInitiationFailure(String callId, int reason);
void onHandoverFailed(String callId, int error);
+
+ void onHandoverComplete(String callId);
}
diff --git a/telephony/java/android/provider/Telephony.java b/telephony/java/android/provider/Telephony.java
index e633053..8c45724 100644
--- a/telephony/java/android/provider/Telephony.java
+++ b/telephony/java/android/provider/Telephony.java
@@ -1102,6 +1102,16 @@
"android.provider.Telephony.MMS_DOWNLOADED";
/**
+ * Broadcast Action: A debug code has been entered in the dialer. These "secret codes"
+ * are used to activate developer menus by dialing certain codes. And they are of the
+ * form {@code *#*#<code>#*#*}. The intent will have the data URI:
+ * {@code android_secret_code://<code>}.
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String SECRET_CODE_ACTION =
+ "android.provider.Telephony.SECRET_CODE";
+
+ /**
* Broadcast action: When the default SMS package changes,
* the previous default SMS package and the new default SMS
* package are sent this broadcast to notify them of the change.
diff --git a/telephony/java/android/telephony/AccessNetworkConstants.java b/telephony/java/android/telephony/AccessNetworkConstants.java
index 703f96d..7cd1612 100644
--- a/telephony/java/android/telephony/AccessNetworkConstants.java
+++ b/telephony/java/android/telephony/AccessNetworkConstants.java
@@ -24,6 +24,7 @@
public final class AccessNetworkConstants {
public static final class AccessNetworkType {
+ public static final int UNKNOWN = 0;
public static final int GERAN = 1;
public static final int UTRAN = 2;
public static final int EUTRAN = 3;
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index cbc9428..91d86c6 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -39,13 +39,29 @@
private final static String TAG = "CarrierConfigManager";
/**
+ * Extra included in {@link #ACTION_CARRIER_CONFIG_CHANGED} to indicate the slot index that the
+ * broadcast is for.
+ */
+ public static final String EXTRA_SLOT_INDEX = "android.telephony.extra.SLOT_INDEX";
+
+ /**
+ * Optional extra included in {@link #ACTION_CARRIER_CONFIG_CHANGED} to indicate the
+ * subscription index that the broadcast is for, if a valid one is available.
+ */
+ public static final String EXTRA_SUBSCRIPTION_INDEX =
+ SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX;
+
+ /**
* @hide
*/
public CarrierConfigManager() {
}
/**
- * This intent is broadcast by the system when carrier config changes.
+ * This intent is broadcast by the system when carrier config changes. An int is specified in
+ * {@link #EXTRA_SLOT_INDEX} to indicate the slot index that this is for. An optional int extra
+ * {@link #EXTRA_SUBSCRIPTION_INDEX} is included to indicate the subscription index if a valid
+ * one is available for the slot index.
*/
public static final String
ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
diff --git a/telephony/java/android/telephony/CellIdentityLte.java b/telephony/java/android/telephony/CellIdentityLte.java
index 7f20c8a..5f1f448 100644
--- a/telephony/java/android/telephony/CellIdentityLte.java
+++ b/telephony/java/android/telephony/CellIdentityLte.java
@@ -40,6 +40,8 @@
private final String mAlphaLong;
// short alpha Operator Name String or Enhanced Operator Name String
private final String mAlphaShort;
+ // cell bandwidth, in kHz
+ private final int mBandwidth;
/**
* @hide
@@ -50,6 +52,7 @@
mPci = Integer.MAX_VALUE;
mTac = Integer.MAX_VALUE;
mEarfcn = Integer.MAX_VALUE;
+ mBandwidth = Integer.MAX_VALUE;
mAlphaLong = null;
mAlphaShort = null;
}
@@ -65,7 +68,8 @@
* @hide
*/
public CellIdentityLte(int mcc, int mnc, int ci, int pci, int tac) {
- this(ci, pci, tac, Integer.MAX_VALUE, String.valueOf(mcc), String.valueOf(mnc), null, null);
+ this(ci, pci, tac, Integer.MAX_VALUE, Integer.MAX_VALUE, String.valueOf(mcc),
+ String.valueOf(mnc), null, null);
}
/**
@@ -80,7 +84,8 @@
* @hide
*/
public CellIdentityLte(int mcc, int mnc, int ci, int pci, int tac, int earfcn) {
- this(ci, pci, tac, earfcn, String.valueOf(mcc), String.valueOf(mnc), null, null);
+ this(ci, pci, tac, earfcn, Integer.MAX_VALUE, String.valueOf(mcc), String.valueOf(mnc),
+ null, null);
}
/**
@@ -89,6 +94,7 @@
* @param pci Physical Cell Id 0..503
* @param tac 16-bit Tracking Area Code
* @param earfcn 18-bit LTE Absolute RF Channel Number
+ * @param bandwidth cell bandwidth in kHz
* @param mccStr 3-digit Mobile Country Code in string format
* @param mncStr 2 or 3-digit Mobile Network Code in string format
* @param alphal long alpha Operator Name String or Enhanced Operator Name String
@@ -96,19 +102,20 @@
*
* @hide
*/
- public CellIdentityLte(int ci, int pci, int tac, int earfcn, String mccStr,
- String mncStr, String alphal, String alphas) {
+ 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);
mCi = ci;
mPci = pci;
mTac = tac;
mEarfcn = earfcn;
+ mBandwidth = bandwidth;
mAlphaLong = alphal;
mAlphaShort = alphas;
}
private CellIdentityLte(CellIdentityLte cid) {
- this(cid.mCi, cid.mPci, cid.mTac, cid.mEarfcn, cid.mMccStr,
+ this(cid.mCi, cid.mPci, cid.mTac, cid.mEarfcn, cid.mBandwidth, cid.mMccStr,
cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort);
}
@@ -163,6 +170,13 @@
}
/**
+ * @return Cell bandwidth in kHz, Integer.MAX_VALUE if unknown
+ */
+ public int getBandwidth() {
+ return mBandwidth;
+ }
+
+ /**
* @return Mobile Country Code in string format, null if unknown
*/
public String getMccStr() {
@@ -219,6 +233,7 @@
&& mPci == o.mPci
&& mTac == o.mTac
&& mEarfcn == o.mEarfcn
+ && mBandwidth == o.mBandwidth
&& TextUtils.equals(mMccStr, o.mMccStr)
&& TextUtils.equals(mMncStr, o.mMncStr)
&& TextUtils.equals(mAlphaLong, o.mAlphaLong)
@@ -232,6 +247,7 @@
.append(" mPci=").append(mPci)
.append(" mTac=").append(mTac)
.append(" mEarfcn=").append(mEarfcn)
+ .append(" mBandwidth=").append(mBandwidth)
.append(" mMcc=").append(mMccStr)
.append(" mMnc=").append(mMncStr)
.append(" mAlphaLong=").append(mAlphaLong)
@@ -248,6 +264,7 @@
dest.writeInt(mPci);
dest.writeInt(mTac);
dest.writeInt(mEarfcn);
+ dest.writeInt(mBandwidth);
dest.writeString(mAlphaLong);
dest.writeString(mAlphaShort);
}
@@ -259,6 +276,7 @@
mPci = in.readInt();
mTac = in.readInt();
mEarfcn = in.readInt();
+ mBandwidth = in.readInt();
mAlphaLong = in.readString();
mAlphaShort = in.readString();
diff --git a/telephony/java/android/telephony/CellInfo.java b/telephony/java/android/telephony/CellInfo.java
index b5e4eef..9232ed7 100644
--- a/telephony/java/android/telephony/CellInfo.java
+++ b/telephony/java/android/telephony/CellInfo.java
@@ -16,8 +16,11 @@
package android.telephony;
+import android.annotation.IntDef;
import android.os.Parcel;
import android.os.Parcelable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
/**
* Immutable cell information from a point in time.
@@ -47,6 +50,34 @@
/** @hide */
public static final int TIMESTAMP_TYPE_JAVA_RIL = 4;
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({
+ CONNECTION_NONE,
+ CONNECTION_PRIMARY_SERVING,
+ CONNECTION_SECONDARY_SERVING,
+ CONNECTION_UNKNOWN
+ })
+ public @interface CellConnectionStatus {}
+
+ /**
+ * Cell is not a serving cell.
+ *
+ * <p>The cell has been measured but is neither a camped nor serving cell (3GPP 36.304).
+ */
+ public static final int CONNECTION_NONE = 0;
+
+ /** UE is connected to cell for signalling and possibly data (3GPP 36.331, 25.331). */
+ public static final int CONNECTION_PRIMARY_SERVING = 1;
+
+ /** UE is connected to cell for data (3GPP 36.331, 25.331). */
+ public static final int CONNECTION_SECONDARY_SERVING = 2;
+
+ /** Connection status is unknown. */
+ public static final int CONNECTION_UNKNOWN = Integer.MAX_VALUE;
+
+ private int mCellConnectionStatus = CONNECTION_NONE;
+
// True if device is mRegistered to the mobile network
private boolean mRegistered;
@@ -69,6 +100,7 @@
this.mRegistered = ci.mRegistered;
this.mTimeStampType = ci.mTimeStampType;
this.mTimeStamp = ci.mTimeStamp;
+ this.mCellConnectionStatus = ci.mCellConnectionStatus;
}
/** True if this cell is registered to the mobile network */
@@ -90,6 +122,25 @@
}
/**
+ * Gets the connection status of this cell.
+ *
+ * @see #CONNECTION_NONE
+ * @see #CONNECTION_PRIMARY_SERVING
+ * @see #CONNECTION_SECONDARY_SERVING
+ * @see #CONNECTION_UNKNOWN
+ *
+ * @return The connection status of the cell.
+ */
+ @CellConnectionStatus
+ public int getCellConnectionStatus() {
+ return mCellConnectionStatus;
+ }
+ /** @hide */
+ public void setCellConnectionStatus(@CellConnectionStatus int cellConnectionStatus) {
+ mCellConnectionStatus = cellConnectionStatus;
+ }
+
+ /**
* Where time stamp gets recorded.
* @return one of TIMESTAMP_TYPE_XXXX
*
@@ -111,7 +162,7 @@
public int hashCode() {
int primeNum = 31;
return ((mRegistered ? 0 : 1) * primeNum) + ((int)(mTimeStamp / 1000) * primeNum)
- + (mTimeStampType * primeNum);
+ + (mTimeStampType * primeNum) + (mCellConnectionStatus * primeNum);
}
@Override
@@ -125,7 +176,9 @@
try {
CellInfo o = (CellInfo) other;
return mRegistered == o.mRegistered
- && mTimeStamp == o.mTimeStamp && mTimeStampType == o.mTimeStampType;
+ && mTimeStamp == o.mTimeStamp
+ && mTimeStampType == o.mTimeStampType
+ && mCellConnectionStatus == o.mCellConnectionStatus;
} catch (ClassCastException e) {
return false;
}
@@ -155,6 +208,7 @@
timeStampType = timeStampTypeToString(mTimeStampType);
sb.append(" mTimeStampType=").append(timeStampType);
sb.append(" mTimeStamp=").append(mTimeStamp).append("ns");
+ sb.append(" mCellConnectionStatus=").append(mCellConnectionStatus);
return sb.toString();
}
@@ -181,6 +235,7 @@
dest.writeInt(mRegistered ? 1 : 0);
dest.writeInt(mTimeStampType);
dest.writeLong(mTimeStamp);
+ dest.writeInt(mCellConnectionStatus);
}
/**
@@ -192,6 +247,7 @@
mRegistered = (in.readInt() == 1) ? true : false;
mTimeStampType = in.readInt();
mTimeStamp = in.readLong();
+ mCellConnectionStatus = in.readInt();
}
/** Implement the Parcelable interface */
diff --git a/telephony/java/android/telephony/DataConnectionRealTimeInfo.java b/telephony/java/android/telephony/DataConnectionRealTimeInfo.java
index f71f58d..fc4e17a 100644
--- a/telephony/java/android/telephony/DataConnectionRealTimeInfo.java
+++ b/telephony/java/android/telephony/DataConnectionRealTimeInfo.java
@@ -28,10 +28,14 @@
public class DataConnectionRealTimeInfo implements Parcelable {
private long mTime; // Time the info was collected since boot in nanos;
- public static final int DC_POWER_STATE_LOW = 1;
- public static final int DC_POWER_STATE_MEDIUM = 2;
- public static final int DC_POWER_STATE_HIGH = 3;
- public static final int DC_POWER_STATE_UNKNOWN = Integer.MAX_VALUE;
+ public static final int DC_POWER_STATE_LOW
+ = TelephonyProtoEnums.DATA_CONNECTION_POWER_STATE_LOW ; // = 1
+ public static final int DC_POWER_STATE_MEDIUM
+ = TelephonyProtoEnums.DATA_CONNECTION_POWER_STATE_MEDIUM; // = 2
+ public static final int DC_POWER_STATE_HIGH
+ = TelephonyProtoEnums.DATA_CONNECTION_POWER_STATE_HIGH; // = 3
+ public static final int DC_POWER_STATE_UNKNOWN
+ = TelephonyProtoEnums.DATA_CONNECTION_POWER_STATE_UNKNOWN; // = Integer.MAX_VALUE
private int mDcPowerState; // DC_POWER_STATE_[LOW | MEDIUM | HIGH | UNKNOWN]
diff --git a/telephony/java/android/telephony/DataSpecificRegistrationStates.java b/telephony/java/android/telephony/DataSpecificRegistrationStates.java
new file mode 100644
index 0000000..97e3037
--- /dev/null
+++ b/telephony/java/android/telephony/DataSpecificRegistrationStates.java
@@ -0,0 +1,72 @@
+package android.telephony;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.Objects;
+
+
+/**
+ * Class that stores information specific to data network registration.
+ * @hide
+ */
+public class DataSpecificRegistrationStates implements Parcelable{
+ /**
+ * The maximum number of simultaneous Data Calls that
+ * must be established using setupDataCall().
+ */
+ public final int maxDataCalls;
+
+ DataSpecificRegistrationStates(int maxDataCalls) {
+ this.maxDataCalls = maxDataCalls;
+ }
+
+ private DataSpecificRegistrationStates(Parcel source) {
+ maxDataCalls = source.readInt();
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(maxDataCalls);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public String toString() {
+ return "DataSpecificRegistrationStates {" + " mMaxDataCalls=" + maxDataCalls + "}";
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(maxDataCalls);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+
+ if (o == null || !(o instanceof DataSpecificRegistrationStates)) {
+ return false;
+ }
+
+ DataSpecificRegistrationStates other = (DataSpecificRegistrationStates) o;
+ return this.maxDataCalls == other.maxDataCalls;
+ }
+
+ public static final Parcelable.Creator<DataSpecificRegistrationStates> CREATOR =
+ new Parcelable.Creator<DataSpecificRegistrationStates>() {
+ @Override
+ public DataSpecificRegistrationStates createFromParcel(Parcel source) {
+ return new DataSpecificRegistrationStates(source);
+ }
+
+ @Override
+ public DataSpecificRegistrationStates[] newArray(int size) {
+ return new DataSpecificRegistrationStates[size];
+ }
+ };
+}
\ No newline at end of file
diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java
index 56e1e64..4fa304a 100644
--- a/telephony/java/android/telephony/DisconnectCause.java
+++ b/telephony/java/android/telephony/DisconnectCause.java
@@ -310,6 +310,13 @@
* {@hide}
*/
public static final int DIAL_VIDEO_MODIFIED_TO_DIAL_VIDEO = 70;
+
+ /**
+ * The network has reported that an alternative emergency number has been dialed, but the user
+ * must exit airplane mode to place the call.
+ */
+ public static final int IMS_SIP_ALTERNATE_EMERGENCY_CALL = 71;
+
//*********************************************************************************************
// When adding a disconnect type:
// 1) Update toString() with the newly added disconnect type.
@@ -462,6 +469,8 @@
return "EMERGENCY_PERM_FAILURE";
case NORMAL_UNSPECIFIED:
return "NORMAL_UNSPECIFIED";
+ case IMS_SIP_ALTERNATE_EMERGENCY_CALL:
+ return "IMS_SIP_ALTERNATE_EMERGENCY_CALL";
default:
return "INVALID: " + cause;
}
diff --git a/telephony/java/android/telephony/INetworkService.aidl b/telephony/java/android/telephony/INetworkService.aidl
new file mode 100644
index 0000000..9ef7186
--- /dev/null
+++ b/telephony/java/android/telephony/INetworkService.aidl
@@ -0,0 +1,31 @@
+/*
+ * Copyright 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 android.telephony;
+
+import android.telephony.INetworkServiceCallback;
+
+/**
+ * {@hide}
+ */
+oneway interface INetworkService
+{
+ void createNetworkServiceProvider(int slotId);
+ void removeNetworkServiceProvider(int slotId);
+ void getNetworkRegistrationState(int slotId, int domain, INetworkServiceCallback callback);
+ void registerForNetworkRegistrationStateChanged(int slotId, INetworkServiceCallback callback);
+ void unregisterForNetworkRegistrationStateChanged(int slotId, INetworkServiceCallback callback);
+}
diff --git a/core/proto/android/os/batterymanager.proto b/telephony/java/android/telephony/INetworkServiceCallback.aidl
similarity index 60%
copy from core/proto/android/os/batterymanager.proto
copy to telephony/java/android/telephony/INetworkServiceCallback.aidl
index 669bf2d..520598f 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/telephony/java/android/telephony/INetworkServiceCallback.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright 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.
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-syntax = "proto2";
-package android.os;
+package android.telephony;
-option java_multiple_files = true;
+import android.telephony.NetworkRegistrationState;
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
+/**
+ * Network service call back interface
+ * @hide
+ */
+oneway interface INetworkServiceCallback
+{
+ void onGetNetworkRegistrationStateComplete(int result, in NetworkRegistrationState state);
+ void onNetworkStateChanged();
}
diff --git a/telephony/java/android/telephony/ModemActivityInfo.java b/telephony/java/android/telephony/ModemActivityInfo.java
index 03ce2d8..521adef 100644
--- a/telephony/java/android/telephony/ModemActivityInfo.java
+++ b/telephony/java/android/telephony/ModemActivityInfo.java
@@ -36,12 +36,12 @@
*/
public static final int TX_POWER_LEVELS = 5;
- private final long mTimestamp;
- private final int mSleepTimeMs;
- private final int mIdleTimeMs;
- private final int [] mTxTimeMs = new int[TX_POWER_LEVELS];
- private final int mRxTimeMs;
- private final int mEnergyUsed;
+ private long mTimestamp;
+ private int mSleepTimeMs;
+ private int mIdleTimeMs;
+ private int [] mTxTimeMs = new int[TX_POWER_LEVELS];
+ private int mRxTimeMs;
+ private int mEnergyUsed;
public ModemActivityInfo(long timestamp, int sleepTimeMs, int idleTimeMs,
int[] txTimeMs, int rxTimeMs, int energyUsed) {
@@ -110,6 +110,10 @@
return mTimestamp;
}
+ public void setTimestamp(long timestamp) {
+ mTimestamp = timestamp;
+ }
+
/**
* @return tx time in ms. It's an array of tx times
* with each index...
@@ -118,6 +122,10 @@
return mTxTimeMs;
}
+ public void setTxTimeMillis(int[] txTimeMs) {
+ mTxTimeMs = txTimeMs;
+ }
+
/**
* @return sleep time in ms.
*/
@@ -125,6 +133,10 @@
return mSleepTimeMs;
}
+ public void setSleepTimeMillis(int sleepTimeMillis) {
+ mSleepTimeMs = sleepTimeMillis;
+ }
+
/**
* @return idle time in ms.
*/
@@ -132,6 +144,10 @@
return mIdleTimeMs;
}
+ public void setIdleTimeMillis(int idleTimeMillis) {
+ mIdleTimeMs = idleTimeMillis;
+ }
+
/**
* @return rx time in ms.
*/
@@ -139,6 +155,10 @@
return mRxTimeMs;
}
+ public void setRxTimeMillis(int rxTimeMillis) {
+ mRxTimeMs = rxTimeMillis;
+ }
+
/**
* product of current(mA), voltage(V) and time(ms)
* @return energy used
@@ -147,6 +167,10 @@
return mEnergyUsed;
}
+ public void setEnergyUsed(int energyUsed) {
+ mEnergyUsed = energyUsed;
+ }
+
/**
* @return if the record is valid
*/
diff --git a/core/proto/android/os/batterymanager.proto b/telephony/java/android/telephony/NetworkRegistrationState.aidl
similarity index 64%
copy from core/proto/android/os/batterymanager.proto
copy to telephony/java/android/telephony/NetworkRegistrationState.aidl
index 669bf2d..98cba77 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/telephony/java/android/telephony/NetworkRegistrationState.aidl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright 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.
@@ -14,16 +14,6 @@
* limitations under the License.
*/
-syntax = "proto2";
-package android.os;
+package android.telephony;
-option java_multiple_files = true;
-
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
-}
+parcelable NetworkRegistrationState;
diff --git a/telephony/java/android/telephony/NetworkRegistrationState.java b/telephony/java/android/telephony/NetworkRegistrationState.java
new file mode 100644
index 0000000..4f137be
--- /dev/null
+++ b/telephony/java/android/telephony/NetworkRegistrationState.java
@@ -0,0 +1,332 @@
+/*
+ * Copyright 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 android.telephony;
+
+import android.annotation.IntDef;
+import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Arrays;
+import java.util.Objects;
+
+/**
+ * Description of a mobile network registration state
+ * @hide
+ */
+@SystemApi
+public class NetworkRegistrationState implements Parcelable {
+ /**
+ * Network domain
+ * @hide
+ */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = "DOMAIN_", value = {DOMAIN_CS, DOMAIN_PS})
+ public @interface Domain {}
+
+ /** Circuit switching domain */
+ public static final int DOMAIN_CS = 1;
+ /** Packet switching domain */
+ public static final int DOMAIN_PS = 2;
+
+ /**
+ * Registration state
+ * @hide
+ */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = "REG_STATE_",
+ value = {REG_STATE_NOT_REG_NOT_SEARCHING, REG_STATE_HOME, REG_STATE_NOT_REG_SEARCHING,
+ REG_STATE_DENIED, REG_STATE_UNKNOWN, REG_STATE_ROAMING})
+ public @interface RegState {}
+
+ /** Not registered. The device is not currently searching a new operator to register */
+ public static final int REG_STATE_NOT_REG_NOT_SEARCHING = 0;
+ /** Registered on home network */
+ public static final int REG_STATE_HOME = 1;
+ /** Not registered. The device is currently searching a new operator to register */
+ public static final int REG_STATE_NOT_REG_SEARCHING = 2;
+ /** Registration denied */
+ public static final int REG_STATE_DENIED = 3;
+ /** Registration state is unknown */
+ public static final int REG_STATE_UNKNOWN = 4;
+ /** Registered on roaming network */
+ public static final int REG_STATE_ROAMING = 5;
+
+ /**
+ * Supported service type
+ * @hide
+ */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = "SERVICE_TYPE_",
+ value = {SERVICE_TYPE_VOICE, SERVICE_TYPE_DATA, SERVICE_TYPE_SMS, SERVICE_TYPE_VIDEO,
+ SERVICE_TYPE_EMERGENCY})
+ public @interface ServiceType {}
+
+ public static final int SERVICE_TYPE_VOICE = 1;
+ public static final int SERVICE_TYPE_DATA = 2;
+ public static final int SERVICE_TYPE_SMS = 3;
+ public static final int SERVICE_TYPE_VIDEO = 4;
+ public static final int SERVICE_TYPE_EMERGENCY = 5;
+
+ /** {@link AccessNetworkConstants.TransportType}*/
+ private final int mTransportType;
+
+ @Domain
+ private final int mDomain;
+
+ @RegState
+ private final int mRegState;
+
+ private final int mAccessNetworkTechnology;
+
+ private final int mReasonForDenial;
+
+ private final boolean mEmergencyOnly;
+
+ private final int[] mAvailableServices;
+
+ @Nullable
+ private final CellIdentity mCellIdentity;
+
+ @Nullable
+ private VoiceSpecificRegistrationStates mVoiceSpecificStates;
+
+ @Nullable
+ private DataSpecificRegistrationStates mDataSpecificStates;
+
+ /**
+ * @param transportType Transport type. Must be {@link AccessNetworkConstants.TransportType}
+ * @param domain Network domain. Must be DOMAIN_CS or DOMAIN_PS.
+ * @param regState Network registration state.
+ * @param accessNetworkTechnology See TelephonyManager NETWORK_TYPE_XXXX.
+ * @param reasonForDenial Reason for denial if the registration state is DENIED.
+ * @param availableServices The supported service.
+ * @param cellIdentity The identity representing a unique cell
+ */
+ public NetworkRegistrationState(int transportType, int domain, int regState,
+ int accessNetworkTechnology, int reasonForDenial, boolean emergencyOnly,
+ int[] availableServices, @Nullable CellIdentity cellIdentity) {
+ mTransportType = transportType;
+ mDomain = domain;
+ mRegState = regState;
+ mAccessNetworkTechnology = accessNetworkTechnology;
+ mReasonForDenial = reasonForDenial;
+ mAvailableServices = availableServices;
+ mCellIdentity = cellIdentity;
+ mEmergencyOnly = emergencyOnly;
+ }
+
+ /**
+ * Constructor for voice network registration states.
+ * @hide
+ */
+ public NetworkRegistrationState(int transportType, int domain, int regState,
+ int accessNetworkTechnology, int reasonForDenial, boolean emergencyOnly,
+ int[] availableServices, @Nullable CellIdentity cellIdentity, boolean cssSupported,
+ int roamingIndicator, int systemIsInPrl, int defaultRoamingIndicator) {
+ this(transportType, domain, regState, accessNetworkTechnology,
+ reasonForDenial, emergencyOnly, availableServices, cellIdentity);
+
+ mVoiceSpecificStates = new VoiceSpecificRegistrationStates(cssSupported, roamingIndicator,
+ systemIsInPrl, defaultRoamingIndicator);
+ }
+
+ /**
+ * Constructor for data network registration states.
+ * @hide
+ */
+ public NetworkRegistrationState(int transportType, int domain, int regState,
+ int accessNetworkTechnology, int reasonForDenial, boolean emergencyOnly,
+ int[] availableServices, @Nullable CellIdentity cellIdentity, int maxDataCalls) {
+ this(transportType, domain, regState, accessNetworkTechnology,
+ reasonForDenial, emergencyOnly, availableServices, cellIdentity);
+
+ mDataSpecificStates = new DataSpecificRegistrationStates(maxDataCalls);
+ }
+
+ protected NetworkRegistrationState(Parcel source) {
+ mTransportType = source.readInt();
+ mDomain = source.readInt();
+ mRegState = source.readInt();
+ mAccessNetworkTechnology = source.readInt();
+ mReasonForDenial = source.readInt();
+ mEmergencyOnly = source.readBoolean();
+ mAvailableServices = source.createIntArray();
+ mCellIdentity = source.readParcelable(CellIdentity.class.getClassLoader());
+ mVoiceSpecificStates = source.readParcelable(
+ VoiceSpecificRegistrationStates.class.getClassLoader());
+ mDataSpecificStates = source.readParcelable(
+ DataSpecificRegistrationStates.class.getClassLoader());
+ }
+
+ /**
+ * @return The transport type.
+ */
+ public int getTransportType() { return mTransportType; }
+
+ /**
+ * @return The network domain.
+ */
+ public @Domain int getDomain() { return mDomain; }
+
+ /**
+ * @return The registration state.
+ */
+ public @RegState int getRegState() {
+ return mRegState;
+ }
+
+ /**
+ * @return Whether emergency is enabled.
+ */
+ public boolean isEmergencyEnabled() { return mEmergencyOnly; }
+
+ /**
+ * @return List of available service types.
+ */
+ public int[] getAvailableServices() { return mAvailableServices; }
+
+ /**
+ * @return The access network technology. Must be one of TelephonyManager.NETWORK_TYPE_XXXX.
+ */
+ public int getAccessNetworkTechnology() {
+ return mAccessNetworkTechnology;
+ }
+
+ /**
+ * @return Reason for denial from network.
+ */
+ public int getReasonForDenial() {
+ return mReasonForDenial;
+ }
+
+ /**
+ * @return The cell information.
+ */
+ public CellIdentity getCellIdentity() {
+ return mCellIdentity;
+ }
+
+ /**
+ * @hide
+ */
+ @Nullable
+ public VoiceSpecificRegistrationStates getVoiceSpecificStates() {
+ return mVoiceSpecificStates;
+ }
+
+ /**
+ * @hide
+ */
+ @Nullable
+ public DataSpecificRegistrationStates getDataSpecificStates() {
+ return mDataSpecificStates;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ private static String regStateToString(int regState) {
+ switch (regState) {
+ case REG_STATE_NOT_REG_NOT_SEARCHING: return "NOT_REG_NOT_SEARCHING";
+ case REG_STATE_HOME: return "HOME";
+ case REG_STATE_NOT_REG_SEARCHING: return "NOT_REG_SEARCHING";
+ case REG_STATE_DENIED: return "DENIED";
+ case REG_STATE_UNKNOWN: return "UNKNOWN";
+ case REG_STATE_ROAMING: return "ROAMING";
+ }
+ return "Unknown reg state " + regState;
+ }
+
+ @Override
+ public String toString() {
+ return new StringBuilder("NetworkRegistrationState{")
+ .append("transportType=").append(mTransportType)
+ .append(" domain=").append((mDomain == DOMAIN_CS) ? "CS" : "PS")
+ .append(" regState=").append(regStateToString(mRegState))
+ .append(" accessNetworkTechnology=")
+ .append(TelephonyManager.getNetworkTypeName(mAccessNetworkTechnology))
+ .append(" reasonForDenial=").append(mReasonForDenial)
+ .append(" emergencyEnabled=").append(mEmergencyOnly)
+ .append(" supportedServices=").append(mAvailableServices)
+ .append(" cellIdentity=").append(mCellIdentity)
+ .append(" voiceSpecificStates=").append(mVoiceSpecificStates)
+ .append(" dataSpecificStates=").append(mDataSpecificStates)
+ .append("}").toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mTransportType, mDomain, mRegState, mAccessNetworkTechnology,
+ mReasonForDenial, mEmergencyOnly, mAvailableServices, mCellIdentity,
+ mVoiceSpecificStates, mDataSpecificStates);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+
+ if (o == null || !(o instanceof NetworkRegistrationState)) {
+ return false;
+ }
+
+ NetworkRegistrationState other = (NetworkRegistrationState) o;
+ return mTransportType == other.mTransportType
+ && mDomain == other.mDomain
+ && mRegState == other.mRegState
+ && mAccessNetworkTechnology == other.mAccessNetworkTechnology
+ && mReasonForDenial == other.mReasonForDenial
+ && mEmergencyOnly == other.mEmergencyOnly
+ && (mAvailableServices == other.mAvailableServices
+ || Arrays.equals(mAvailableServices, other.mAvailableServices))
+ && mCellIdentity == other.mCellIdentity
+ && mVoiceSpecificStates == other.mVoiceSpecificStates
+ && mDataSpecificStates == other.mDataSpecificStates;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(mTransportType);
+ dest.writeInt(mDomain);
+ dest.writeInt(mRegState);
+ dest.writeInt(mAccessNetworkTechnology);
+ dest.writeInt(mReasonForDenial);
+ dest.writeBoolean(mEmergencyOnly);
+ dest.writeIntArray(mAvailableServices);
+ dest.writeParcelable(mCellIdentity, 0);
+ dest.writeParcelable(mVoiceSpecificStates, 0);
+ dest.writeParcelable(mDataSpecificStates, 0);
+ }
+
+ public static final Parcelable.Creator<NetworkRegistrationState> CREATOR =
+ new Parcelable.Creator<NetworkRegistrationState>() {
+ @Override
+ public NetworkRegistrationState createFromParcel(Parcel source) {
+ return new NetworkRegistrationState(source);
+ }
+
+ @Override
+ public NetworkRegistrationState[] newArray(int size) {
+ return new NetworkRegistrationState[size];
+ }
+ };
+}
diff --git a/telephony/java/android/telephony/NetworkService.java b/telephony/java/android/telephony/NetworkService.java
new file mode 100644
index 0000000..94921de
--- /dev/null
+++ b/telephony/java/android/telephony/NetworkService.java
@@ -0,0 +1,295 @@
+/*
+ * Copyright 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 android.telephony;
+
+import android.annotation.CallSuper;
+import android.annotation.SystemApi;
+import android.app.Service;
+import android.content.Intent;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.IBinder;
+import android.os.Looper;
+import android.os.Message;
+import android.os.RemoteException;
+import android.util.SparseArray;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Base class of network service. Services that extend NetworkService must register the service in
+ * their AndroidManifest to be detected by the framework. They must be protected by the permission
+ * "android.permission.BIND_NETWORK_SERVICE". The network service definition in the manifest must
+ * follow the following format:
+ * ...
+ * <service android:name=".xxxNetworkService"
+ * android:permission="android.permission.BIND_NETWORK_SERVICE" >
+ * <intent-filter>
+ * <action android:name="android.telephony.NetworkService" />
+ * </intent-filter>
+ * </service>
+ * @hide
+ */
+@SystemApi
+public abstract class NetworkService extends Service {
+
+ private final String TAG = NetworkService.class.getSimpleName();
+
+ public static final String NETWORK_SERVICE_INTERFACE = "android.telephony.NetworkService";
+ public static final String NETWORK_SERVICE_EXTRA_SLOT_ID = "android.telephony.extra.SLOT_ID";
+
+ private static final int NETWORK_SERVICE_CREATE_NETWORK_SERVICE_PROVIDER = 1;
+ private static final int NETWORK_SERVICE_REMOVE_NETWORK_SERVICE_PROVIDER = 2;
+ private static final int NETWORK_SERVICE_REMOVE_ALL_NETWORK_SERVICE_PROVIDERS = 3;
+ private static final int NETWORK_SERVICE_GET_REGISTRATION_STATE = 4;
+ private static final int NETWORK_SERVICE_REGISTER_FOR_STATE_CHANGE = 5;
+ private static final int NETWORK_SERVICE_UNREGISTER_FOR_STATE_CHANGE = 6;
+ private static final int NETWORK_SERVICE_INDICATION_NETWORK_STATE_CHANGED = 7;
+
+
+ private final HandlerThread mHandlerThread;
+
+ private final NetworkServiceHandler mHandler;
+
+ private final SparseArray<NetworkServiceProvider> mServiceMap = new SparseArray<>();
+
+ private final INetworkServiceWrapper mBinder = new INetworkServiceWrapper();
+
+ /**
+ * The abstract class of the actual network service implementation. The network service provider
+ * must extend this class to support network connection. Note that each instance of network
+ * service is associated with one physical SIM slot.
+ */
+ public class NetworkServiceProvider {
+ private final int mSlotId;
+
+ private final List<INetworkServiceCallback>
+ mNetworkRegistrationStateChangedCallbacks = new ArrayList<>();
+
+ public NetworkServiceProvider(int slotId) {
+ mSlotId = slotId;
+ }
+
+ /**
+ * @return SIM slot id the network service associated with.
+ */
+ public final int getSlotId() {
+ return mSlotId;
+ }
+
+ /**
+ * API to get network registration state. The result will be passed to the callback.
+ * @param domain
+ * @param callback
+ * @return SIM slot id the network service associated with.
+ */
+ public void getNetworkRegistrationState(int domain, NetworkServiceCallback callback) {
+ callback.onGetNetworkRegistrationStateComplete(
+ NetworkServiceCallback.RESULT_ERROR_UNSUPPORTED, null);
+ }
+
+ public final void notifyNetworkRegistrationStateChanged() {
+ mHandler.obtainMessage(NETWORK_SERVICE_INDICATION_NETWORK_STATE_CHANGED,
+ mSlotId, 0, null).sendToTarget();
+ }
+
+ private void registerForStateChanged(INetworkServiceCallback callback) {
+ synchronized (mNetworkRegistrationStateChangedCallbacks) {
+ mNetworkRegistrationStateChangedCallbacks.add(callback);
+ }
+ }
+
+ private void unregisterForStateChanged(INetworkServiceCallback callback) {
+ synchronized (mNetworkRegistrationStateChangedCallbacks) {
+ mNetworkRegistrationStateChangedCallbacks.remove(callback);
+ }
+ }
+
+ private void notifyStateChangedToCallbacks() {
+ for (INetworkServiceCallback callback : mNetworkRegistrationStateChangedCallbacks) {
+ try {
+ callback.onNetworkStateChanged();
+ } catch (RemoteException exception) {
+ // Doing nothing.
+ }
+ }
+ }
+
+ /**
+ * Called when the instance of network service is destroyed (e.g. got unbind or binder died).
+ */
+ @CallSuper
+ protected void onDestroy() {
+ mNetworkRegistrationStateChangedCallbacks.clear();
+ }
+ }
+
+ private class NetworkServiceHandler extends Handler {
+
+ NetworkServiceHandler(Looper looper) {
+ super(looper);
+ }
+
+ @Override
+ public void handleMessage(Message message) {
+ final int slotId = message.arg1;
+ final INetworkServiceCallback callback = (INetworkServiceCallback) message.obj;
+
+ NetworkServiceProvider serviceProvider = mServiceMap.get(slotId);
+
+ switch (message.what) {
+ case NETWORK_SERVICE_CREATE_NETWORK_SERVICE_PROVIDER:
+ // If the service provider doesn't exist yet, we try to create it.
+ if (serviceProvider == null) {
+ mServiceMap.put(slotId, createNetworkServiceProvider(slotId));
+ }
+ break;
+ case NETWORK_SERVICE_REMOVE_NETWORK_SERVICE_PROVIDER:
+ // If the service provider doesn't exist yet, we try to create it.
+ if (serviceProvider != null) {
+ serviceProvider.onDestroy();
+ mServiceMap.remove(slotId);
+ }
+ break;
+ case NETWORK_SERVICE_REMOVE_ALL_NETWORK_SERVICE_PROVIDERS:
+ for (int i = 0; i < mServiceMap.size(); i++) {
+ serviceProvider = mServiceMap.get(i);
+ if (serviceProvider != null) {
+ serviceProvider.onDestroy();
+ }
+ }
+ mServiceMap.clear();
+ break;
+ case NETWORK_SERVICE_GET_REGISTRATION_STATE:
+ if (serviceProvider == null) break;
+ int domainId = message.arg2;
+ serviceProvider.getNetworkRegistrationState(domainId,
+ new NetworkServiceCallback(callback));
+
+ break;
+ case NETWORK_SERVICE_REGISTER_FOR_STATE_CHANGE:
+ if (serviceProvider == null) break;
+ serviceProvider.registerForStateChanged(callback);
+ break;
+ case NETWORK_SERVICE_UNREGISTER_FOR_STATE_CHANGE:
+ if (serviceProvider == null) break;
+ serviceProvider.unregisterForStateChanged(callback);
+ break;
+ case NETWORK_SERVICE_INDICATION_NETWORK_STATE_CHANGED:
+ if (serviceProvider == null) break;
+ serviceProvider.notifyStateChangedToCallbacks();
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ /** @hide */
+ protected NetworkService() {
+ mHandlerThread = new HandlerThread(TAG);
+ mHandlerThread.start();
+
+ mHandler = new NetworkServiceHandler(mHandlerThread.getLooper());
+ log("network service created");
+ }
+
+ /**
+ * Create the instance of {@link NetworkServiceProvider}. Network service provider must override
+ * this method to facilitate the creation of {@link NetworkServiceProvider} instances. The system
+ * will call this method after binding the network service for each active SIM slot id.
+ *
+ * @param slotId SIM slot id the network service associated with.
+ * @return Network service object
+ */
+ protected abstract NetworkServiceProvider createNetworkServiceProvider(int slotId);
+
+ /** @hide */
+ @Override
+ public IBinder onBind(Intent intent) {
+ if (intent == null || !NETWORK_SERVICE_INTERFACE.equals(intent.getAction())) {
+ loge("Unexpected intent " + intent);
+ return null;
+ }
+
+ return mBinder;
+ }
+
+ /** @hide */
+ @Override
+ public boolean onUnbind(Intent intent) {
+ mHandler.obtainMessage(NETWORK_SERVICE_REMOVE_ALL_NETWORK_SERVICE_PROVIDERS, 0,
+ 0, null).sendToTarget();
+
+ return false;
+ }
+
+ /** @hide */
+ @Override
+ public void onDestroy() {
+ mHandlerThread.quit();
+ }
+
+ /**
+ * A wrapper around INetworkService that forwards calls to implementations of
+ * {@link NetworkService}.
+ */
+ private class INetworkServiceWrapper extends INetworkService.Stub {
+
+ @Override
+ public void createNetworkServiceProvider(int slotId) {
+ mHandler.obtainMessage(NETWORK_SERVICE_CREATE_NETWORK_SERVICE_PROVIDER, slotId,
+ 0, null).sendToTarget();
+ }
+
+ @Override
+ public void removeNetworkServiceProvider(int slotId) {
+ mHandler.obtainMessage(NETWORK_SERVICE_REMOVE_NETWORK_SERVICE_PROVIDER, slotId,
+ 0, null).sendToTarget();
+ }
+
+ @Override
+ public void getNetworkRegistrationState(
+ int slotId, int domain, INetworkServiceCallback callback) {
+ mHandler.obtainMessage(NETWORK_SERVICE_GET_REGISTRATION_STATE, slotId,
+ domain, callback).sendToTarget();
+ }
+
+ @Override
+ public void registerForNetworkRegistrationStateChanged(
+ int slotId, INetworkServiceCallback callback) {
+ mHandler.obtainMessage(NETWORK_SERVICE_REGISTER_FOR_STATE_CHANGE, slotId,
+ 0, callback).sendToTarget();
+ }
+
+ @Override
+ public void unregisterForNetworkRegistrationStateChanged(
+ int slotId,INetworkServiceCallback callback) {
+ mHandler.obtainMessage(NETWORK_SERVICE_UNREGISTER_FOR_STATE_CHANGE, slotId,
+ 0, callback).sendToTarget();
+ }
+ }
+
+ private final void log(String s) {
+ Rlog.d(TAG, s);
+ }
+
+ private final void loge(String s) {
+ Rlog.e(TAG, s);
+ }
+}
diff --git a/telephony/java/android/telephony/NetworkServiceCallback.java b/telephony/java/android/telephony/NetworkServiceCallback.java
new file mode 100644
index 0000000..92ebf36
--- /dev/null
+++ b/telephony/java/android/telephony/NetworkServiceCallback.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright 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 android.telephony;
+
+import android.annotation.IntDef;
+import android.annotation.SystemApi;
+import android.os.RemoteException;
+import android.telephony.NetworkService.NetworkServiceProvider;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.ref.WeakReference;
+
+/**
+ * Network service callback. Object of this class is passed to NetworkServiceProvider upon
+ * calling getNetworkRegistrationState, to receive asynchronous feedback from NetworkServiceProvider
+ * upon onGetNetworkRegistrationStateComplete. It's like a wrapper of INetworkServiceCallback
+ * because INetworkServiceCallback can't be a parameter type in public APIs.
+ *
+ * @hide
+ */
+@SystemApi
+public class NetworkServiceCallback {
+
+ private static final String mTag = NetworkServiceCallback.class.getSimpleName();
+
+ /**
+ * Result of network requests
+ * @hide
+ */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({RESULT_SUCCESS, RESULT_ERROR_UNSUPPORTED, RESULT_ERROR_INVALID_ARG, RESULT_ERROR_BUSY,
+ RESULT_ERROR_ILLEGAL_STATE, RESULT_ERROR_FAILED})
+ public @interface Result {}
+
+ /** Request is completed successfully */
+ public static final int RESULT_SUCCESS = 0;
+ /** Request is not support */
+ public static final int RESULT_ERROR_UNSUPPORTED = 1;
+ /** Request contains invalid arguments */
+ public static final int RESULT_ERROR_INVALID_ARG = 2;
+ /** Service is busy */
+ public static final int RESULT_ERROR_BUSY = 3;
+ /** Request sent in illegal state */
+ public static final int RESULT_ERROR_ILLEGAL_STATE = 4;
+ /** Request failed */
+ public static final int RESULT_ERROR_FAILED = 5;
+
+ private final WeakReference<INetworkServiceCallback> mCallback;
+
+ /** @hide */
+ public NetworkServiceCallback(INetworkServiceCallback callback) {
+ mCallback = new WeakReference<>(callback);
+ }
+
+ /**
+ * Called to indicate result of
+ * {@link NetworkServiceProvider#getNetworkRegistrationState(int, NetworkServiceCallback)}
+ *
+ * @param result Result status like {@link NetworkServiceCallback#RESULT_SUCCESS} or
+ * {@link NetworkServiceCallback#RESULT_ERROR_UNSUPPORTED}
+ * @param state The state information to be returned to callback.
+ */
+ public void onGetNetworkRegistrationStateComplete(int result, NetworkRegistrationState state) {
+ INetworkServiceCallback callback = mCallback.get();
+ if (callback != null) {
+ try {
+ callback.onGetNetworkRegistrationStateComplete(result, state);
+ } catch (RemoteException e) {
+ Rlog.e(mTag, "Failed to onGetNetworkRegistrationStateComplete on the remote");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java
index 98ea451..0ee870a 100644
--- a/telephony/java/android/telephony/PhoneStateListener.java
+++ b/telephony/java/android/telephony/PhoneStateListener.java
@@ -251,7 +251,15 @@
*/
public static final int LISTEN_USER_MOBILE_DATA_STATE = 0x00080000;
- /*
+ /**
+ * Listen for changes to the physical channel configuration.
+ *
+ * @see #onPhysicalChannelConfigurationChanged
+ * @hide
+ */
+ public static final int LISTEN_PHYSICAL_CHANNEL_CONFIGURATION = 0x00100000;
+
+ /*
* Subscription used to listen to the phone state changes
* @hide
*/
@@ -362,7 +370,10 @@
case LISTEN_CARRIER_NETWORK_CHANGE:
PhoneStateListener.this.onCarrierNetworkChange((boolean)msg.obj);
break;
-
+ case LISTEN_PHYSICAL_CHANNEL_CONFIGURATION:
+ PhoneStateListener.this.onPhysicalChannelConfigurationChanged(
+ (List<PhysicalChannelConfig>)msg.obj);
+ break;
}
}
};
@@ -561,6 +572,16 @@
}
/**
+ * Callback invoked when the current physical channel configuration has changed
+ *
+ * @param configs List of the current {@link PhysicalChannelConfig}s
+ * @hide
+ */
+ public void onPhysicalChannelConfigurationChanged(List<PhysicalChannelConfig> configs) {
+ // 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
diff --git a/telephony/java/android/telephony/PhysicalChannelConfig.aidl b/telephony/java/android/telephony/PhysicalChannelConfig.aidl
new file mode 100644
index 0000000..651c103
--- /dev/null
+++ b/telephony/java/android/telephony/PhysicalChannelConfig.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 PhysicalChannelConfig;
\ No newline at end of file
diff --git a/telephony/java/android/telephony/PhysicalChannelConfig.java b/telephony/java/android/telephony/PhysicalChannelConfig.java
new file mode 100644
index 0000000..651d68d
--- /dev/null
+++ b/telephony/java/android/telephony/PhysicalChannelConfig.java
@@ -0,0 +1,127 @@
+/*
+ * 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 android.annotation.IntDef;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * @hide
+ */
+public final class PhysicalChannelConfig implements Parcelable {
+
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({CONNECTION_PRIMARY_SERVING, CONNECTION_SECONDARY_SERVING})
+ public @interface ConnectionStatus {}
+
+ /**
+ * UE has connection to cell for signalling and possibly data (3GPP 36.331, 25.331).
+ */
+ public static final int CONNECTION_PRIMARY_SERVING = 1;
+
+ /**
+ * UE has connection to cell for data (3GPP 36.331, 25.331).
+ */
+ public static final int CONNECTION_SECONDARY_SERVING = 2;
+
+ /**
+ * Connection status of the cell.
+ *
+ * <p>One of {@link #CONNECTION_PRIMARY_SERVING}, {@link #CONNECTION_SECONDARY_SERVING}.
+ */
+ private int mCellConnectionStatus;
+
+ /**
+ * Cell bandwidth, in kHz.
+ */
+ private int mCellBandwidthDownlinkKhz;
+
+ public PhysicalChannelConfig(int status, int bandwidth) {
+ mCellConnectionStatus = status;
+ mCellBandwidthDownlinkKhz = bandwidth;
+ }
+
+ public PhysicalChannelConfig(Parcel in) {
+ mCellConnectionStatus = in.readInt();
+ mCellBandwidthDownlinkKhz = in.readInt();
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(mCellConnectionStatus);
+ dest.writeInt(mCellBandwidthDownlinkKhz);
+ }
+
+ /**
+ * @return Cell bandwidth, in kHz
+ */
+ public int getCellBandwidthDownlink() {
+ return mCellBandwidthDownlinkKhz;
+ }
+
+ /**
+ * Gets the connection status of the cell.
+ *
+ * @see #CONNECTION_PRIMARY_SERVING
+ * @see #CONNECTION_SECONDARY_SERVING
+ *
+ * @return Connection status of the cell
+ */
+ @ConnectionStatus
+ public int getConnectionStatus() {
+ return mCellConnectionStatus;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (!(o instanceof PhysicalChannelConfig)) {
+ return false;
+ }
+
+ PhysicalChannelConfig config = (PhysicalChannelConfig) o;
+ return mCellConnectionStatus == config.mCellConnectionStatus
+ && mCellBandwidthDownlinkKhz == config.mCellBandwidthDownlinkKhz;
+ }
+
+ @Override
+ public int hashCode() {
+ return (mCellBandwidthDownlinkKhz * 29) + (mCellConnectionStatus * 31);
+ }
+
+ public static final Parcelable.Creator<PhysicalChannelConfig> CREATOR =
+ new Parcelable.Creator<PhysicalChannelConfig>() {
+ public PhysicalChannelConfig createFromParcel(Parcel in) {
+ return new PhysicalChannelConfig(in);
+ }
+
+ public PhysicalChannelConfig[] newArray(int size) {
+ return new PhysicalChannelConfig[size];
+ }
+ };
+}
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index d4b4b88..90a3677 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -17,6 +17,8 @@
package android.telephony;
import android.annotation.IntDef;
+import android.annotation.Nullable;
+import android.annotation.SystemApi;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -24,6 +26,10 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.Arrays;
+
+import java.util.ArrayList;
+import java.util.List;
/**
* Contains phone state and service related information.
@@ -32,6 +38,7 @@
*
* <ul>
* <li>Service state: IN_SERVICE, OUT_OF_SERVICE, EMERGENCY_ONLY, POWER_OFF
+ * <li>Duplex mode: UNKNOWN, FDD, TDD
* <li>Roaming indicator
* <li>Operator name, short name and numeric id
* <li>Network selection mode
@@ -67,6 +74,26 @@
*/
public static final int STATE_POWER_OFF = 3;
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({DUPLEX_MODE_UNKNOWN, DUPLEX_MODE_FDD, DUPLEX_MODE_TDD})
+ public @interface DuplexMode {}
+
+ /**
+ * Duplex mode for the phone is unknown.
+ */
+ public static final int DUPLEX_MODE_UNKNOWN = 0;
+
+ /**
+ * Duplex mode for the phone is frequency-division duplexing.
+ */
+ public static final int DUPLEX_MODE_FDD = 1;
+
+ /**
+ * Duplex mode for the phone is time-division duplexing.
+ */
+ public static final int DUPLEX_MODE_TDD = 2;
+
/**
* RIL level registration state values from ril.h
* ((const char **)response)[0] is registration state 0-6,
@@ -282,10 +309,15 @@
private boolean mIsUsingCarrierAggregation;
+ private int mChannelNumber;
+ private int[] mCellBandwidths = new int[0];
+
/* EARFCN stands for E-UTRA Absolute Radio Frequency Channel Number,
* Reference: 3GPP TS 36.104 5.4.3 */
private int mLteEarfcnRsrpBoost = 0;
+ private List<NetworkRegistrationState> mNetworkRegistrationStates = new ArrayList<>();
+
/**
* get String description of roaming type
* @hide
@@ -366,6 +398,7 @@
mIsDataRoamingFromRegistration = s.mIsDataRoamingFromRegistration;
mIsUsingCarrierAggregation = s.mIsUsingCarrierAggregation;
mLteEarfcnRsrpBoost = s.mLteEarfcnRsrpBoost;
+ mNetworkRegistrationStates = new ArrayList<>(s.mNetworkRegistrationStates);
}
/**
@@ -396,6 +429,10 @@
mIsDataRoamingFromRegistration = in.readInt() != 0;
mIsUsingCarrierAggregation = in.readInt() != 0;
mLteEarfcnRsrpBoost = in.readInt();
+ mNetworkRegistrationStates = new ArrayList<>();
+ in.readList(mNetworkRegistrationStates, NetworkRegistrationState.class.getClassLoader());
+ mChannelNumber = in.readInt();
+ mCellBandwidths = in.createIntArray();
}
public void writeToParcel(Parcel out, int flags) {
@@ -423,6 +460,9 @@
out.writeInt(mIsDataRoamingFromRegistration ? 1 : 0);
out.writeInt(mIsUsingCarrierAggregation ? 1 : 0);
out.writeInt(mLteEarfcnRsrpBoost);
+ out.writeList(mNetworkRegistrationStates);
+ out.writeInt(mChannelNumber);
+ out.writeIntArray(mCellBandwidths);
}
public int describeContents() {
@@ -476,6 +516,43 @@
}
/**
+ * Get the current duplex mode
+ *
+ * @see #DUPLEX_MODE_UNKNOWN
+ * @see #DUPLEX_MODE_FDD
+ * @see #DUPLEX_MODE_TDD
+ *
+ * @return Current {@code DuplexMode} for the phone
+ */
+ @DuplexMode
+ public int getDuplexMode() {
+ // TODO(b/72117602) determine duplex mode from channel number, using 3GPP 36.101 sections
+ // 5.7.3-1 and 5.5-1
+ return DUPLEX_MODE_UNKNOWN;
+ }
+
+ /**
+ * Get the channel number of the current primary serving cell, or -1 if unknown
+ *
+ * <p>This is EARFCN for LTE, UARFCN for UMTS, and ARFCN for GSM.
+ *
+ * @return Channel number of primary serving cell
+ */
+ public int getChannelNumber() {
+ return mChannelNumber;
+ }
+
+ /**
+ * Get an array of cell bandwidths (kHz) for the current serving cells
+ *
+ * @return Current serving cell bandwidths
+ */
+ @Nullable
+ public int[] getCellBandwidths() {
+ return mCellBandwidths;
+ }
+
+ /**
* Get current roaming indicator of phone
* (note: not just decoding from TS 27.007 7.2)
*
@@ -703,6 +780,8 @@
+ (mDataRegState * 37)
+ mVoiceRoamingType
+ mDataRoamingType
+ + mChannelNumber
+ + Arrays.hashCode(mCellBandwidths)
+ (mIsManualNetworkSelection ? 1 : 0)
+ ((null == mVoiceOperatorAlphaLong) ? 0 : mVoiceOperatorAlphaLong.hashCode())
+ ((null == mVoiceOperatorAlphaShort) ? 0 : mVoiceOperatorAlphaShort.hashCode())
@@ -735,6 +814,8 @@
&& mIsManualNetworkSelection == s.mIsManualNetworkSelection
&& mVoiceRoamingType == s.mVoiceRoamingType
&& mDataRoamingType == s.mDataRoamingType
+ && mChannelNumber == s.mChannelNumber
+ && Arrays.equals(mCellBandwidths, s.mCellBandwidths)
&& equalsHandlesNulls(mVoiceOperatorAlphaLong, s.mVoiceOperatorAlphaLong)
&& equalsHandlesNulls(mVoiceOperatorAlphaShort, s.mVoiceOperatorAlphaShort)
&& equalsHandlesNulls(mVoiceOperatorNumeric, s.mVoiceOperatorNumeric)
@@ -751,13 +832,14 @@
s.mCdmaDefaultRoamingIndicator)
&& mIsEmergencyOnly == s.mIsEmergencyOnly
&& mIsDataRoamingFromRegistration == s.mIsDataRoamingFromRegistration
- && mIsUsingCarrierAggregation == s.mIsUsingCarrierAggregation);
+ && mIsUsingCarrierAggregation == s.mIsUsingCarrierAggregation)
+ && mNetworkRegistrationStates.containsAll(s.mNetworkRegistrationStates);
}
/**
* Convert radio technology to String
*
- * @param radioTechnology
+ * @param rt radioTechnology
* @return String representation of the RAT
*
* @hide
@@ -863,6 +945,8 @@
.append("(" + rilServiceStateToString(mVoiceRegState) + ")")
.append(", mDataRegState=").append(mDataRegState)
.append("(" + rilServiceStateToString(mDataRegState) + ")")
+ .append(", mChannelNumber=").append(mChannelNumber)
+ .append(", mCellBandwidths=").append(Arrays.toString(mCellBandwidths))
.append(", mVoiceRoamingType=").append(getRoamingLogString(mVoiceRoamingType))
.append(", mDataRoamingType=").append(getRoamingLogString(mDataRoamingType))
.append(", mVoiceOperatorAlphaLong=").append(mVoiceOperatorAlphaLong)
@@ -884,6 +968,7 @@
.append(", mIsDataRoamingFromRegistration=").append(mIsDataRoamingFromRegistration)
.append(", mIsUsingCarrierAggregation=").append(mIsUsingCarrierAggregation)
.append(", mLteEarfcnRsrpBoost=").append(mLteEarfcnRsrpBoost)
+ .append(", mNetworkRegistrationStates=").append(mNetworkRegistrationStates)
.append("}").toString();
}
@@ -893,6 +978,8 @@
mDataRegState = state;
mVoiceRoamingType = ROAMING_TYPE_NOT_ROAMING;
mDataRoamingType = ROAMING_TYPE_NOT_ROAMING;
+ mChannelNumber = -1;
+ mCellBandwidths = new int[0];
mVoiceOperatorAlphaLong = null;
mVoiceOperatorAlphaShort = null;
mVoiceOperatorNumeric = null;
@@ -913,6 +1000,7 @@
mIsDataRoamingFromRegistration = false;
mIsUsingCarrierAggregation = false;
mLteEarfcnRsrpBoost = 0;
+ mNetworkRegistrationStates = new ArrayList<>();
}
public void setStateOutOfService() {
@@ -940,6 +1028,16 @@
if (VDBG) Rlog.d(LOG_TAG, "[ServiceState] setDataRegState=" + mDataRegState);
}
+ /** @hide */
+ public void setCellBandwidths(int[] bandwidths) {
+ mCellBandwidths = bandwidths;
+ }
+
+ /** @hide */
+ public void setChannelNumber(int channelNumber) {
+ mChannelNumber = channelNumber;
+ }
+
public void setRoaming(boolean roaming) {
mVoiceRoamingType = (roaming ? ROAMING_TYPE_UNKNOWN : ROAMING_TYPE_NOT_ROAMING);
mDataRoamingType = mVoiceRoamingType;
@@ -1088,6 +1186,8 @@
mIsDataRoamingFromRegistration = m.getBoolean("isDataRoamingFromRegistration");
mIsUsingCarrierAggregation = m.getBoolean("isUsingCarrierAggregation");
mLteEarfcnRsrpBoost = m.getInt("LteEarfcnRsrpBoost");
+ mChannelNumber = m.getInt("ChannelNumber");
+ mCellBandwidths = m.getIntArray("CellBandwidths");
}
/**
@@ -1119,6 +1219,8 @@
m.putBoolean("isDataRoamingFromRegistration", mIsDataRoamingFromRegistration);
m.putBoolean("isUsingCarrierAggregation", mIsUsingCarrierAggregation);
m.putInt("LteEarfcnRsrpBoost", mLteEarfcnRsrpBoost);
+ m.putInt("ChannelNumber", mChannelNumber);
+ m.putIntArray("CellBandwidths", mCellBandwidths);
}
/** @hide */
@@ -1394,4 +1496,52 @@
return newSs;
}
+
+ /**
+ * Get all of the available network registration states.
+ *
+ * @return List of registration states
+ * @hide
+ */
+ @SystemApi
+ public List<NetworkRegistrationState> getNetworkRegistrationStates() {
+ return mNetworkRegistrationStates;
+ }
+
+ /**
+ * Get the network registration states with given transport type.
+ *
+ * @param transportType The transport type. See {@link AccessNetworkConstants.TransportType}
+ * @return List of registration states.
+ * @hide
+ */
+ @SystemApi
+ public List<NetworkRegistrationState> getNetworkRegistrationStates(int transportType) {
+ List<NetworkRegistrationState> list = new ArrayList<>();
+ for (NetworkRegistrationState networkRegistrationState : mNetworkRegistrationStates) {
+ if (networkRegistrationState.getTransportType() == transportType) {
+ list.add(networkRegistrationState);
+ }
+ }
+ return list;
+ }
+
+ /**
+ * Get the network registration states with given transport type and domain.
+ *
+ * @param transportType The transport type. See {@link AccessNetworkConstants.TransportType}
+ * @param domain The network domain. Must be DOMAIN_CS or DOMAIN_PS.
+ * @return The matching NetworkRegistrationState.
+ * @hide
+ */
+ @SystemApi
+ public NetworkRegistrationState getNetworkRegistrationStates(int transportType, int domain) {
+ for (NetworkRegistrationState networkRegistrationState : mNetworkRegistrationStates) {
+ if (networkRegistrationState.getTransportType() == transportType
+ && networkRegistrationState.getDomain() == domain) {
+ return networkRegistrationState;
+ }
+ }
+ return null;
+ }
}
diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java
index fc2ef27..778ca77 100644
--- a/telephony/java/android/telephony/SignalStrength.java
+++ b/telephony/java/android/telephony/SignalStrength.java
@@ -35,15 +35,20 @@
private static final boolean DBG = false;
/** @hide */
- public static final int SIGNAL_STRENGTH_NONE_OR_UNKNOWN = 0;
+ public static final int SIGNAL_STRENGTH_NONE_OR_UNKNOWN
+ = TelephonyProtoEnums.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; // = 0
/** @hide */
- public static final int SIGNAL_STRENGTH_POOR = 1;
+ public static final int SIGNAL_STRENGTH_POOR
+ = TelephonyProtoEnums.SIGNAL_STRENGTH_POOR; // = 1
/** @hide */
- public static final int SIGNAL_STRENGTH_MODERATE = 2;
+ public static final int SIGNAL_STRENGTH_MODERATE
+ = TelephonyProtoEnums.SIGNAL_STRENGTH_MODERATE; // = 2
/** @hide */
- public static final int SIGNAL_STRENGTH_GOOD = 3;
+ public static final int SIGNAL_STRENGTH_GOOD
+ = TelephonyProtoEnums.SIGNAL_STRENGTH_GOOD; // = 3
/** @hide */
- public static final int SIGNAL_STRENGTH_GREAT = 4;
+ public static final int SIGNAL_STRENGTH_GREAT
+ = TelephonyProtoEnums.SIGNAL_STRENGTH_GREAT; // = 4
/** @hide */
public static final int NUM_SIGNAL_STRENGTH_BINS = 5;
/** @hide */
diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java
index 5d88cf0..0874b86 100644
--- a/telephony/java/android/telephony/SmsManager.java
+++ b/telephony/java/android/telephony/SmsManager.java
@@ -1134,7 +1134,11 @@
// SMS send failure result codes
- /** No error. {@hide}*/
+ /**
+ * No error.
+ * @hide
+ */
+ @SystemApi
static public final int RESULT_ERROR_NONE = 0;
/** Generic failure cause */
static public final int RESULT_ERROR_GENERIC_FAILURE = 1;
@@ -1146,12 +1150,113 @@
static public final int RESULT_ERROR_NO_SERVICE = 4;
/** Failed because we reached the sending queue limit. */
static public final int RESULT_ERROR_LIMIT_EXCEEDED = 5;
- /** Failed because FDN is enabled. {@hide} */
+ /**
+ * Failed because FDN is enabled.
+ * @hide
+ */
+ @SystemApi
static public final int RESULT_ERROR_FDN_CHECK_FAILURE = 6;
/** Failed because user denied the sending of this short code. */
static public final int RESULT_ERROR_SHORT_CODE_NOT_ALLOWED = 7;
/** Failed because the user has denied this app ever send premium short codes. */
static public final int RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED = 8;
+ /**
+ * Failed because the radio was not available
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_RADIO_NOT_AVAILABLE = 9;
+ /**
+ * Failed because of network rejection
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_NETWORK_REJECT = 10;
+ /**
+ * Failed because of invalid arguments
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_INVALID_ARGUMENTS = 11;
+ /**
+ * Failed because of an invalid state
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_INVALID_STATE = 12;
+ /**
+ * Failed because there is no memory
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_NO_MEMORY = 13;
+ /**
+ * Failed because the sms format is not valid
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_INVALID_SMS_FORMAT = 14;
+ /**
+ * Failed because of a system error
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_SYSTEM_ERROR = 15;
+ /**
+ * Failed because of a modem error
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_MODEM_ERROR = 16;
+ /**
+ * Failed because of a network error
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_NETWORK_ERROR = 17;
+ /**
+ * Failed because of an encoding error
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_ENCODING_ERROR = 18;
+ /**
+ * Failed because of an invalid smsc address
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_INVALID_SMSC_ADDRESS = 19;
+ /**
+ * Failed because the operation is not allowed
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_OPERATION_NOT_ALLOWED = 20;
+ /**
+ * Failed because of an internal error
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_INTERNAL_ERROR = 21;
+ /**
+ * Failed because there are no resources
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_NO_RESOURCES = 22;
+ /**
+ * Failed because the operation was cancelled
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_CANCELLED = 23;
+ /**
+ * Failed because the request is not supported
+ * @hide
+ */
+ @SystemApi
+ static public final int RESULT_REQUEST_NOT_SUPPORTED = 24;
+
static private final String PHONE_PACKAGE_NAME = "com.android.phone";
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index e33b25e..0a6d960 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -22,8 +22,8 @@
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
-import android.annotation.SuppressLint;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.WorkerThread;
@@ -61,7 +61,6 @@
import com.android.internal.telephony.IPhoneSubInfo;
import com.android.internal.telephony.ITelephony;
import com.android.internal.telephony.ITelephonyRegistry;
-import com.android.internal.telephony.OperatorInfo;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.RILConstants;
import com.android.internal.telephony.TelephonyProperties;
@@ -2599,6 +2598,53 @@
}
}
+ /**
+ * Gets all the UICC slots.
+ *
+ * @return UiccSlotInfo array.
+ *
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ public UiccSlotInfo[] getUiccSlotsInfo() {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony == null) {
+ return null;
+ }
+ return telephony.getUiccSlotsInfo();
+ } catch (RemoteException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Map logicalSlot to physicalSlot, and activate the physicalSlot if it is inactive. For
+ * example, passing the physicalSlots array [1, 0] means mapping the first item 1, which is
+ * physical slot index 1, to the logical slot 0; and mapping the second item 0, which is
+ * physical slot index 0, to the logical slot 1. The index of the array means the index of the
+ * logical slots.
+ *
+ * @param physicalSlots Index i in the array representing physical slot for phone i. The array
+ * size should be same as {@link #getPhoneCount()}.
+ * @return boolean Return true if the switch succeeds, false if the switch fails.
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ public boolean switchSlots(int[] physicalSlots) {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony == null) {
+ return false;
+ }
+ return telephony.switchSlots(physicalSlots);
+ } catch (RemoteException e) {
+ return false;
+ }
+ }
+
//
//
// Subscriber Info
diff --git a/core/proto/android/os/batterymanager.proto b/telephony/java/android/telephony/UiccSlotInfo.aidl
similarity index 64%
copy from core/proto/android/os/batterymanager.proto
copy to telephony/java/android/telephony/UiccSlotInfo.aidl
index 669bf2d..5571a6c 100644
--- a/core/proto/android/os/batterymanager.proto
+++ b/telephony/java/android/telephony/UiccSlotInfo.aidl
@@ -1,5 +1,5 @@
/*
- * 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,16 +14,6 @@
* limitations under the License.
*/
-syntax = "proto2";
-package android.os;
+package android.telephony;
-option java_multiple_files = true;
-
-message BatteryManagerProto {
- enum PlugType {
- PLUG_TYPE_NONE = 0;
- PLUG_TYPE_AC = 1;
- PLUG_TYPE_USB = 2;
- PLUG_TYPE_WIRELESS = 4;
- }
-}
+parcelable UiccSlotInfo;
diff --git a/telephony/java/android/telephony/UiccSlotInfo.java b/telephony/java/android/telephony/UiccSlotInfo.java
new file mode 100644
index 0000000..0b3cbad
--- /dev/null
+++ b/telephony/java/android/telephony/UiccSlotInfo.java
@@ -0,0 +1,158 @@
+/*
+ * 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.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Objects;
+
+import android.annotation.IntDef;
+
+/**
+ * Class for the information of a UICC slot.
+ * @hide
+ */
+@SystemApi
+public class UiccSlotInfo implements Parcelable {
+ /**
+ * Card state.
+ * @hide
+ */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = { "CARD_STATE_INFO_" }, value = {
+ CARD_STATE_INFO_ABSENT,
+ CARD_STATE_INFO_PRESENT,
+ CARD_STATE_INFO_ERROR,
+ CARD_STATE_INFO_RESTRICTED
+ })
+ public @interface CardStateInfo {}
+
+ /** Card state absent. */
+ public static final int CARD_STATE_INFO_ABSENT = 1;
+
+ /** Card state present. */
+ public static final int CARD_STATE_INFO_PRESENT = 2;
+
+ /** Card state error. */
+ public static final int CARD_STATE_INFO_ERROR = 3;
+
+ /** Card state restricted. */
+ public static final int CARD_STATE_INFO_RESTRICTED = 4;
+
+ public final boolean isActive;
+ public final boolean isEuicc;
+ public final String cardId;
+ public final @CardStateInfo int cardStateInfo;
+
+ public static final Creator<UiccSlotInfo> CREATOR = new Creator<UiccSlotInfo>() {
+ @Override
+ public UiccSlotInfo createFromParcel(Parcel in) {
+ return new UiccSlotInfo(in);
+ }
+
+ @Override
+ public UiccSlotInfo[] newArray(int size) {
+ return new UiccSlotInfo[size];
+ }
+ };
+
+ private UiccSlotInfo(Parcel in) {
+ isActive = in.readByte() != 0;
+ isEuicc = in.readByte() != 0;
+ cardId = in.readString();
+ cardStateInfo = in.readInt();
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeByte((byte) (isActive ? 1 : 0));
+ dest.writeByte((byte) (isEuicc ? 1 : 0));
+ dest.writeString(cardId);
+ dest.writeInt(cardStateInfo);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ public UiccSlotInfo(boolean isActive, boolean isEuicc, String cardId,
+ @CardStateInfo int cardStateInfo) {
+ this.isActive = isActive;
+ this.isEuicc = isEuicc;
+ this.cardId = cardId;
+ this.cardStateInfo = cardStateInfo;
+ }
+
+ public boolean getIsActive() {
+ return isActive;
+ }
+
+ public boolean getIsEuicc() {
+ return isEuicc;
+ }
+
+ public String getCardId() {
+ return cardId;
+ }
+
+ @CardStateInfo
+ public int getCardStateInfo() {
+ return cardStateInfo;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+
+ UiccSlotInfo that = (UiccSlotInfo) obj;
+ return (isActive == that.isActive)
+ && (isEuicc == that.isEuicc)
+ && (cardId == that.cardId)
+ && (cardStateInfo == that.cardStateInfo);
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 1;
+ result = 31 * result + (isActive ? 1 : 0);
+ result = 31 * result + (isEuicc ? 1 : 0);
+ result = 31 * result + Objects.hashCode(cardId);
+ result = 31 * result + cardStateInfo;
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ return "UiccSlotInfo (isActive="
+ + isActive
+ + ", isEuicc="
+ + isEuicc
+ + ", cardId="
+ + cardId
+ + ", cardState="
+ + cardStateInfo
+ + ")";
+ }
+}
diff --git a/telephony/java/android/telephony/VoiceSpecificRegistrationStates.java b/telephony/java/android/telephony/VoiceSpecificRegistrationStates.java
new file mode 100644
index 0000000..871ee4d
--- /dev/null
+++ b/telephony/java/android/telephony/VoiceSpecificRegistrationStates.java
@@ -0,0 +1,114 @@
+package android.telephony;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.Objects;
+
+
+/**
+ * Class that stores information specific to voice network registration.
+ * @hide
+ */
+public class VoiceSpecificRegistrationStates implements Parcelable{
+ /**
+ * oncurrent services support indicator. if
+ * registered on a CDMA system.
+ * false - Concurrent services not supported,
+ * true - Concurrent services supported
+ */
+ public final boolean cssSupported;
+
+ /**
+ * TSB-58 Roaming Indicator if registered
+ * on a CDMA or EVDO system or -1 if not.
+ * Valid values are 0-255.
+ */
+ public final int roamingIndicator;
+
+ /**
+ * indicates whether the current system is in the
+ * PRL if registered on a CDMA or EVDO system or -1 if
+ * not. 0=not in the PRL, 1=in the PRL
+ */
+ public final int systemIsInPrl;
+
+ /**
+ * default Roaming Indicator from the PRL,
+ * if registered on a CDMA or EVDO system or -1 if not.
+ * Valid values are 0-255.
+ */
+ public final int defaultRoamingIndicator;
+
+ VoiceSpecificRegistrationStates(boolean cssSupported, int roamingIndicator, int systemIsInPrl,
+ int defaultRoamingIndicator) {
+ this.cssSupported = cssSupported;
+ this.roamingIndicator = roamingIndicator;
+ this.systemIsInPrl = systemIsInPrl;
+ this.defaultRoamingIndicator = defaultRoamingIndicator;
+ }
+
+ private VoiceSpecificRegistrationStates(Parcel source) {
+ this.cssSupported = source.readBoolean();
+ this.roamingIndicator = source.readInt();
+ this.systemIsInPrl = source.readInt();
+ this.defaultRoamingIndicator = source.readInt();
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeBoolean(cssSupported);
+ dest.writeInt(roamingIndicator);
+ dest.writeInt(systemIsInPrl);
+ dest.writeInt(defaultRoamingIndicator);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public String toString() {
+ return "VoiceSpecificRegistrationStates {"
+ + " mCssSupported=" + cssSupported
+ + " mRoamingIndicator=" + roamingIndicator
+ + " mSystemIsInPrl=" + systemIsInPrl
+ + " mDefaultRoamingIndicator=" + defaultRoamingIndicator + "}";
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(cssSupported, roamingIndicator, systemIsInPrl,
+ defaultRoamingIndicator);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+
+ if (o == null || !(o instanceof VoiceSpecificRegistrationStates)) {
+ return false;
+ }
+
+ VoiceSpecificRegistrationStates other = (VoiceSpecificRegistrationStates) o;
+ return this.cssSupported == other.cssSupported
+ && this.roamingIndicator == other.roamingIndicator
+ && this.systemIsInPrl == other.systemIsInPrl
+ && this.defaultRoamingIndicator == other.defaultRoamingIndicator;
+ }
+
+
+ public static final Parcelable.Creator<VoiceSpecificRegistrationStates> CREATOR =
+ new Parcelable.Creator<VoiceSpecificRegistrationStates>() {
+ @Override
+ public VoiceSpecificRegistrationStates createFromParcel(Parcel source) {
+ return new VoiceSpecificRegistrationStates(source);
+ }
+
+ @Override
+ public VoiceSpecificRegistrationStates[] newArray(int size) {
+ return new VoiceSpecificRegistrationStates[size];
+ }
+ };
+}
\ No newline at end of file
diff --git a/telephony/java/android/telephony/data/DataService.java b/telephony/java/android/telephony/data/DataService.java
index fa19ea0..63e8c3b 100644
--- a/telephony/java/android/telephony/data/DataService.java
+++ b/telephony/java/android/telephony/data/DataService.java
@@ -18,6 +18,8 @@
import android.annotation.CallSuper;
import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.app.Service;
import android.content.Intent;
@@ -30,7 +32,6 @@
import android.os.RemoteException;
import android.telephony.AccessNetworkConstants;
import android.telephony.Rlog;
-import android.telephony.SubscriptionManager;
import android.util.SparseArray;
import java.lang.annotation.Retention;
@@ -86,15 +87,17 @@
/** The reason of the data request is IWLAN handover */
public static final int REQUEST_REASON_HANDOVER = 3;
- private static final int DATA_SERVICE_INTERNAL_REQUEST_INITIALIZE_SERVICE = 1;
- private static final int DATA_SERVICE_REQUEST_SETUP_DATA_CALL = 2;
- private static final int DATA_SERVICE_REQUEST_DEACTIVATE_DATA_CALL = 3;
- private static final int DATA_SERVICE_REQUEST_SET_INITIAL_ATTACH_APN = 4;
- private static final int DATA_SERVICE_REQUEST_SET_DATA_PROFILE = 5;
- private static final int DATA_SERVICE_REQUEST_GET_DATA_CALL_LIST = 6;
- private static final int DATA_SERVICE_REQUEST_REGISTER_DATA_CALL_LIST_CHANGED = 7;
- private static final int DATA_SERVICE_REQUEST_UNREGISTER_DATA_CALL_LIST_CHANGED = 8;
- private static final int DATA_SERVICE_INDICATION_DATA_CALL_LIST_CHANGED = 9;
+ private static final int DATA_SERVICE_CREATE_DATA_SERVICE_PROVIDER = 1;
+ private static final int DATA_SERVICE_REMOVE_DATA_SERVICE_PROVIDER = 2;
+ private static final int DATA_SERVICE_REMOVE_ALL_DATA_SERVICE_PROVIDERS = 3;
+ private static final int DATA_SERVICE_REQUEST_SETUP_DATA_CALL = 4;
+ private static final int DATA_SERVICE_REQUEST_DEACTIVATE_DATA_CALL = 5;
+ private static final int DATA_SERVICE_REQUEST_SET_INITIAL_ATTACH_APN = 6;
+ private static final int DATA_SERVICE_REQUEST_SET_DATA_PROFILE = 7;
+ private static final int DATA_SERVICE_REQUEST_GET_DATA_CALL_LIST = 8;
+ private static final int DATA_SERVICE_REQUEST_REGISTER_DATA_CALL_LIST_CHANGED = 9;
+ private static final int DATA_SERVICE_REQUEST_UNREGISTER_DATA_CALL_LIST_CHANGED = 10;
+ private static final int DATA_SERVICE_INDICATION_DATA_CALL_LIST_CHANGED = 11;
private final HandlerThread mHandlerThread;
@@ -102,7 +105,7 @@
private final SparseArray<DataServiceProvider> mServiceMap = new SparseArray<>();
- private final SparseArray<IDataServiceWrapper> mBinderMap = new SparseArray<>();
+ private final IBinder mBinder = new IDataServiceWrapper();
/**
* The abstract class of the actual data service implementation. The data service provider
@@ -136,19 +139,21 @@
* the provided callback to notify the platform.
*
* @param accessNetworkType Access network type that the data call will be established on.
- * Must be one of {@link AccessNetworkConstants.AccessNetworkType}.
+ * Must be one of {@link AccessNetworkConstants.AccessNetworkType}.
* @param dataProfile Data profile used for data call setup. See {@link DataProfile}
* @param isRoaming True if the device is data roaming.
* @param allowRoaming True if data roaming is allowed by the user.
* @param reason The reason for data setup. Must be {@link #REQUEST_REASON_NORMAL} or
- * {@link #REQUEST_REASON_HANDOVER}.
+ * {@link #REQUEST_REASON_HANDOVER}.
* @param linkProperties If {@code reason} is {@link #REQUEST_REASON_HANDOVER}, this is the
- * link properties of the existing data connection, otherwise null.
- * @param callback The result callback for this request.
+ * link properties of the existing data connection, otherwise null.
+ * @param callback The result callback for this request. Null if the client does not care
+ * about the result.
*/
public void setupDataCall(int accessNetworkType, DataProfile dataProfile, boolean isRoaming,
boolean allowRoaming, @SetupDataReason int reason,
- LinkProperties linkProperties, DataServiceCallback callback) {
+ @Nullable LinkProperties linkProperties,
+ @Nullable DataServiceCallback callback) {
// The default implementation is to return unsupported.
callback.onSetupDataCallComplete(DataServiceCallback.RESULT_ERROR_UNSUPPORTED, null);
}
@@ -159,13 +164,15 @@
* provided callback to notify the platform.
*
* @param cid Call id returned in the callback of {@link DataServiceProvider#setupDataCall(
- * int, DataProfile, boolean, boolean, int, LinkProperties, DataServiceCallback)}.
+ * int, DataProfile, boolean, boolean, int, LinkProperties, DataServiceCallback)}.
* @param reason The reason for data deactivation. Must be {@link #REQUEST_REASON_NORMAL},
- * {@link #REQUEST_REASON_SHUTDOWN} or {@link #REQUEST_REASON_HANDOVER}.
- * @param callback The result callback for this request.
+ * {@link #REQUEST_REASON_SHUTDOWN} or {@link #REQUEST_REASON_HANDOVER}.
+ * @param callback The result callback for this request. Null if the client does not care
+ * about the result.
+ *
*/
public void deactivateDataCall(int cid, @DeactivateDataReason int reason,
- DataServiceCallback callback) {
+ @Nullable DataServiceCallback callback) {
// The default implementation is to return unsupported.
callback.onDeactivateDataCallComplete(DataServiceCallback.RESULT_ERROR_UNSUPPORTED);
}
@@ -175,10 +182,11 @@
*
* @param dataProfile Data profile used for data call setup. See {@link DataProfile}.
* @param isRoaming True if the device is data roaming.
- * @param callback The result callback for this request.
+ * @param callback The result callback for this request. Null if the client does not care
+ * about the result.
*/
public void setInitialAttachApn(DataProfile dataProfile, boolean isRoaming,
- DataServiceCallback callback) {
+ @Nullable DataServiceCallback callback) {
// The default implementation is to return unsupported.
callback.onSetInitialAttachApnComplete(DataServiceCallback.RESULT_ERROR_UNSUPPORTED);
}
@@ -190,10 +198,11 @@
*
* @param dps A list of data profiles.
* @param isRoaming True if the device is data roaming.
- * @param callback The result callback for this request.
+ * @param callback The result callback for this request. Null if the client does not care
+ * about the result.
*/
public void setDataProfile(List<DataProfile> dps, boolean isRoaming,
- DataServiceCallback callback) {
+ @Nullable DataServiceCallback callback) {
// The default implementation is to return unsupported.
callback.onSetDataProfileComplete(DataServiceCallback.RESULT_ERROR_UNSUPPORTED);
}
@@ -203,7 +212,7 @@
*
* @param callback The result callback for this request.
*/
- public void getDataCallList(DataServiceCallback callback) {
+ public void getDataCallList(@NonNull DataServiceCallback callback) {
// The default implementation is to return unsupported.
callback.onGetDataCallListComplete(DataServiceCallback.RESULT_ERROR_UNSUPPORTED, null);
}
@@ -321,70 +330,89 @@
public void handleMessage(Message message) {
IDataServiceCallback callback;
final int slotId = message.arg1;
- DataServiceProvider service;
-
- synchronized (mServiceMap) {
- service = mServiceMap.get(slotId);
- }
+ DataServiceProvider serviceProvider = mServiceMap.get(slotId);
switch (message.what) {
- case DATA_SERVICE_INTERNAL_REQUEST_INITIALIZE_SERVICE:
- service = createDataServiceProvider(message.arg1);
- if (service != null) {
- mServiceMap.put(slotId, service);
+ case DATA_SERVICE_CREATE_DATA_SERVICE_PROVIDER:
+ serviceProvider = createDataServiceProvider(message.arg1);
+ if (serviceProvider != null) {
+ mServiceMap.put(slotId, serviceProvider);
}
break;
+ case DATA_SERVICE_REMOVE_DATA_SERVICE_PROVIDER:
+ if (serviceProvider != null) {
+ serviceProvider.onDestroy();
+ mServiceMap.remove(slotId);
+ }
+ break;
+ case DATA_SERVICE_REMOVE_ALL_DATA_SERVICE_PROVIDERS:
+ for (int i = 0; i < mServiceMap.size(); i++) {
+ serviceProvider = mServiceMap.get(i);
+ if (serviceProvider != null) {
+ serviceProvider.onDestroy();
+ }
+ }
+ mServiceMap.clear();
+ break;
case DATA_SERVICE_REQUEST_SETUP_DATA_CALL:
- if (service == null) break;
+ if (serviceProvider == null) break;
SetupDataCallRequest setupDataCallRequest = (SetupDataCallRequest) message.obj;
- service.setupDataCall(setupDataCallRequest.accessNetworkType,
+ serviceProvider.setupDataCall(setupDataCallRequest.accessNetworkType,
setupDataCallRequest.dataProfile, setupDataCallRequest.isRoaming,
setupDataCallRequest.allowRoaming, setupDataCallRequest.reason,
setupDataCallRequest.linkProperties,
- new DataServiceCallback(setupDataCallRequest.callback));
+ (setupDataCallRequest.callback != null)
+ ? new DataServiceCallback(setupDataCallRequest.callback)
+ : null);
break;
case DATA_SERVICE_REQUEST_DEACTIVATE_DATA_CALL:
- if (service == null) break;
+ if (serviceProvider == null) break;
DeactivateDataCallRequest deactivateDataCallRequest =
(DeactivateDataCallRequest) message.obj;
- service.deactivateDataCall(deactivateDataCallRequest.cid,
+ serviceProvider.deactivateDataCall(deactivateDataCallRequest.cid,
deactivateDataCallRequest.reason,
- new DataServiceCallback(deactivateDataCallRequest.callback));
+ (deactivateDataCallRequest.callback != null)
+ ? new DataServiceCallback(deactivateDataCallRequest.callback)
+ : null);
break;
case DATA_SERVICE_REQUEST_SET_INITIAL_ATTACH_APN:
- if (service == null) break;
+ if (serviceProvider == null) break;
SetInitialAttachApnRequest setInitialAttachApnRequest =
(SetInitialAttachApnRequest) message.obj;
- service.setInitialAttachApn(setInitialAttachApnRequest.dataProfile,
+ serviceProvider.setInitialAttachApn(setInitialAttachApnRequest.dataProfile,
setInitialAttachApnRequest.isRoaming,
- new DataServiceCallback(setInitialAttachApnRequest.callback));
+ (setInitialAttachApnRequest.callback != null)
+ ? new DataServiceCallback(setInitialAttachApnRequest.callback)
+ : null);
break;
case DATA_SERVICE_REQUEST_SET_DATA_PROFILE:
- if (service == null) break;
+ if (serviceProvider == null) break;
SetDataProfileRequest setDataProfileRequest =
(SetDataProfileRequest) message.obj;
- service.setDataProfile(setDataProfileRequest.dps,
+ serviceProvider.setDataProfile(setDataProfileRequest.dps,
setDataProfileRequest.isRoaming,
- new DataServiceCallback(setDataProfileRequest.callback));
+ (setDataProfileRequest.callback != null)
+ ? new DataServiceCallback(setDataProfileRequest.callback)
+ : null);
break;
case DATA_SERVICE_REQUEST_GET_DATA_CALL_LIST:
- if (service == null) break;
+ if (serviceProvider == null) break;
- service.getDataCallList(new DataServiceCallback(
+ serviceProvider.getDataCallList(new DataServiceCallback(
(IDataServiceCallback) message.obj));
break;
case DATA_SERVICE_REQUEST_REGISTER_DATA_CALL_LIST_CHANGED:
- if (service == null) break;
- service.registerForDataCallListChanged((IDataServiceCallback) message.obj);
+ if (serviceProvider == null) break;
+ serviceProvider.registerForDataCallListChanged((IDataServiceCallback) message.obj);
break;
case DATA_SERVICE_REQUEST_UNREGISTER_DATA_CALL_LIST_CHANGED:
- if (service == null) break;
+ if (serviceProvider == null) break;
callback = (IDataServiceCallback) message.obj;
- service.unregisterForDataCallListChanged(callback);
+ serviceProvider.unregisterForDataCallListChanged(callback);
break;
case DATA_SERVICE_INDICATION_DATA_CALL_LIST_CHANGED:
- if (service == null) break;
+ if (serviceProvider == null) break;
DataCallListChangedIndication indication =
(DataCallListChangedIndication) message.obj;
try {
@@ -423,67 +451,19 @@
loge("Unexpected intent " + intent);
return null;
}
-
- int slotId = intent.getIntExtra(
- DATA_SERVICE_EXTRA_SLOT_ID, SubscriptionManager.INVALID_SIM_SLOT_INDEX);
-
- if (!SubscriptionManager.isValidSlotIndex(slotId)) {
- loge("Invalid slot id " + slotId);
- return null;
- }
-
- log("onBind: slot id=" + slotId);
-
- IDataServiceWrapper binder = mBinderMap.get(slotId);
- if (binder == null) {
- Message msg = mHandler.obtainMessage(DATA_SERVICE_INTERNAL_REQUEST_INITIALIZE_SERVICE);
- msg.arg1 = slotId;
- msg.sendToTarget();
-
- binder = new IDataServiceWrapper(slotId);
- mBinderMap.put(slotId, binder);
- }
-
- return binder;
+ return mBinder;
}
/** @hide */
@Override
public boolean onUnbind(Intent intent) {
- int slotId = intent.getIntExtra(DATA_SERVICE_EXTRA_SLOT_ID,
- SubscriptionManager.INVALID_SIM_SLOT_INDEX);
- if (mBinderMap.get(slotId) != null) {
- DataServiceProvider serviceImpl;
- synchronized (mServiceMap) {
- serviceImpl = mServiceMap.get(slotId);
- }
- if (serviceImpl != null) {
- serviceImpl.onDestroy();
- }
- mBinderMap.remove(slotId);
- }
-
- // If all clients unbinds, quit the handler thread
- if (mBinderMap.size() == 0) {
- mHandlerThread.quit();
- }
-
+ mHandler.obtainMessage(DATA_SERVICE_REMOVE_ALL_DATA_SERVICE_PROVIDERS).sendToTarget();
return false;
}
/** @hide */
@Override
public void onDestroy() {
- synchronized (mServiceMap) {
- for (int i = 0; i < mServiceMap.size(); i++) {
- DataServiceProvider serviceImpl = mServiceMap.get(i);
- if (serviceImpl != null) {
- serviceImpl.onDestroy();
- }
- }
- mServiceMap.clear();
- }
-
mHandlerThread.quit();
}
@@ -491,68 +471,78 @@
* A wrapper around IDataService that forwards calls to implementations of {@link DataService}.
*/
private class IDataServiceWrapper extends IDataService.Stub {
-
- private final int mSlotId;
-
- IDataServiceWrapper(int slotId) {
- mSlotId = slotId;
+ @Override
+ public void createDataServiceProvider(int slotId) {
+ mHandler.obtainMessage(DATA_SERVICE_CREATE_DATA_SERVICE_PROVIDER, slotId, 0)
+ .sendToTarget();
}
@Override
- public void setupDataCall(int accessNetworkType, DataProfile dataProfile,
+ public void removeDataServiceProvider(int slotId) {
+ mHandler.obtainMessage(DATA_SERVICE_REMOVE_DATA_SERVICE_PROVIDER, slotId, 0)
+ .sendToTarget();
+ }
+
+ @Override
+ public void setupDataCall(int slotId, int accessNetworkType, DataProfile dataProfile,
boolean isRoaming, boolean allowRoaming, int reason,
LinkProperties linkProperties, IDataServiceCallback callback) {
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_SETUP_DATA_CALL, mSlotId, 0,
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_SETUP_DATA_CALL, slotId, 0,
new SetupDataCallRequest(accessNetworkType, dataProfile, isRoaming,
allowRoaming, reason, linkProperties, callback))
.sendToTarget();
}
@Override
- public void deactivateDataCall(int cid, int reason, IDataServiceCallback callback) {
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_DEACTIVATE_DATA_CALL, mSlotId, 0,
+ public void deactivateDataCall(int slotId, int cid, int reason,
+ IDataServiceCallback callback) {
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_DEACTIVATE_DATA_CALL, slotId, 0,
new DeactivateDataCallRequest(cid, reason, callback))
.sendToTarget();
}
@Override
- public void setInitialAttachApn(DataProfile dataProfile, boolean isRoaming,
+ public void setInitialAttachApn(int slotId, DataProfile dataProfile, boolean isRoaming,
IDataServiceCallback callback) {
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_SET_INITIAL_ATTACH_APN, mSlotId, 0,
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_SET_INITIAL_ATTACH_APN, slotId, 0,
new SetInitialAttachApnRequest(dataProfile, isRoaming, callback))
.sendToTarget();
}
@Override
- public void setDataProfile(List<DataProfile> dps, boolean isRoaming,
+ public void setDataProfile(int slotId, List<DataProfile> dps, boolean isRoaming,
IDataServiceCallback callback) {
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_SET_DATA_PROFILE, mSlotId, 0,
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_SET_DATA_PROFILE, slotId, 0,
new SetDataProfileRequest(dps, isRoaming, callback)).sendToTarget();
}
@Override
- public void getDataCallList(IDataServiceCallback callback) {
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_GET_DATA_CALL_LIST, mSlotId, 0,
+ public void getDataCallList(int slotId, IDataServiceCallback callback) {
+ if (callback == null) {
+ loge("getDataCallList: callback is null");
+ return;
+ }
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_GET_DATA_CALL_LIST, slotId, 0,
callback).sendToTarget();
}
@Override
- public void registerForDataCallListChanged(IDataServiceCallback callback) {
+ public void registerForDataCallListChanged(int slotId, IDataServiceCallback callback) {
if (callback == null) {
- loge("Callback is null");
+ loge("registerForDataCallListChanged: callback is null");
return;
}
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_REGISTER_DATA_CALL_LIST_CHANGED, mSlotId,
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_REGISTER_DATA_CALL_LIST_CHANGED, slotId,
0, callback).sendToTarget();
}
@Override
- public void unregisterForDataCallListChanged(IDataServiceCallback callback) {
+ public void unregisterForDataCallListChanged(int slotId, IDataServiceCallback callback) {
if (callback == null) {
- loge("Callback is null");
+ loge("unregisterForDataCallListChanged: callback is null");
return;
}
- mHandler.obtainMessage(DATA_SERVICE_REQUEST_UNREGISTER_DATA_CALL_LIST_CHANGED, mSlotId,
+ mHandler.obtainMessage(DATA_SERVICE_REQUEST_UNREGISTER_DATA_CALL_LIST_CHANGED, slotId,
0, callback).sendToTarget();
}
}
diff --git a/telephony/java/android/telephony/data/DataServiceCallback.java b/telephony/java/android/telephony/data/DataServiceCallback.java
index b6a81f9..4af31b5 100644
--- a/telephony/java/android/telephony/data/DataServiceCallback.java
+++ b/telephony/java/android/telephony/data/DataServiceCallback.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.SystemApi;
+import android.net.LinkProperties;
import android.os.RemoteException;
import android.telephony.Rlog;
import android.telephony.data.DataService.DataServiceProvider;
@@ -37,7 +38,7 @@
@SystemApi
public class DataServiceCallback {
- private static final String mTag = DataServiceCallback.class.getSimpleName();
+ private static final String TAG = DataServiceCallback.class.getSimpleName();
/**
* Result of data requests
@@ -46,7 +47,7 @@
@Retention(RetentionPolicy.SOURCE)
@IntDef({RESULT_SUCCESS, RESULT_ERROR_UNSUPPORTED, RESULT_ERROR_INVALID_ARG, RESULT_ERROR_BUSY,
RESULT_ERROR_ILLEGAL_STATE})
- public @interface Result {}
+ public @interface ResultCode {}
/** Request is completed successfully */
public static final int RESULT_SUCCESS = 0;
@@ -68,35 +69,35 @@
/**
* Called to indicate result for the request {@link DataServiceProvider#setupDataCall(int,
- * DataProfile, boolean, boolean, boolean, DataServiceCallback)}.
+ * DataProfile, boolean, boolean, int, LinkProperties, DataServiceCallback)} .
*
- * @param result The result code. Must be one of the {@link Result}.
+ * @param result The result code. Must be one of the {@link ResultCode}.
* @param response Setup data call response.
*/
- public void onSetupDataCallComplete(@Result int result, DataCallResponse response) {
+ public void onSetupDataCallComplete(@ResultCode int result, DataCallResponse response) {
IDataServiceCallback callback = mCallback.get();
if (callback != null) {
try {
callback.onSetupDataCallComplete(result, response);
} catch (RemoteException e) {
- Rlog.e(mTag, "Failed to onSetupDataCallComplete on the remote");
+ Rlog.e(TAG, "Failed to onSetupDataCallComplete on the remote");
}
}
}
/**
* Called to indicate result for the request {@link DataServiceProvider#deactivateDataCall(int,
- * boolean, boolean, DataServiceCallback)}.
+ * int, DataServiceCallback)}
*
- * @param result The result code. Must be one of the {@link Result}.
+ * @param result The result code. Must be one of the {@link ResultCode}.
*/
- public void onDeactivateDataCallComplete(@Result int result) {
+ public void onDeactivateDataCallComplete(@ResultCode int result) {
IDataServiceCallback callback = mCallback.get();
if (callback != null) {
try {
callback.onDeactivateDataCallComplete(result);
} catch (RemoteException e) {
- Rlog.e(mTag, "Failed to onDeactivateDataCallComplete on the remote");
+ Rlog.e(TAG, "Failed to onDeactivateDataCallComplete on the remote");
}
}
}
@@ -105,15 +106,15 @@
* Called to indicate result for the request {@link DataServiceProvider#setInitialAttachApn(
* DataProfile, boolean, DataServiceCallback)}.
*
- * @param result The result code. Must be one of the {@link Result}.
+ * @param result The result code. Must be one of the {@link ResultCode}.
*/
- public void onSetInitialAttachApnComplete(@Result int result) {
+ public void onSetInitialAttachApnComplete(@ResultCode int result) {
IDataServiceCallback callback = mCallback.get();
if (callback != null) {
try {
callback.onSetInitialAttachApnComplete(result);
} catch (RemoteException e) {
- Rlog.e(mTag, "Failed to onSetInitialAttachApnComplete on the remote");
+ Rlog.e(TAG, "Failed to onSetInitialAttachApnComplete on the remote");
}
}
}
@@ -122,16 +123,16 @@
* Called to indicate result for the request {@link DataServiceProvider#setDataProfile(List,
* boolean, DataServiceCallback)}.
*
- * @param result The result code. Must be one of the {@link Result}.
+ * @param result The result code. Must be one of the {@link ResultCode}.
*/
@SystemApi
- public void onSetDataProfileComplete(@Result int result) {
+ public void onSetDataProfileComplete(@ResultCode int result) {
IDataServiceCallback callback = mCallback.get();
if (callback != null) {
try {
callback.onSetDataProfileComplete(result);
} catch (RemoteException e) {
- Rlog.e(mTag, "Failed to onSetDataProfileComplete on the remote");
+ Rlog.e(TAG, "Failed to onSetDataProfileComplete on the remote");
}
}
}
@@ -140,16 +141,17 @@
* Called to indicate result for the request {@link DataServiceProvider#getDataCallList(
* DataServiceCallback)}.
*
- * @param result The result code. Must be one of the {@link Result}.
+ * @param result The result code. Must be one of the {@link ResultCode}.
* @param dataCallList List of the current active data connection.
*/
- public void onGetDataCallListComplete(@Result int result, List<DataCallResponse> dataCallList) {
+ public void onGetDataCallListComplete(@ResultCode int result,
+ List<DataCallResponse> dataCallList) {
IDataServiceCallback callback = mCallback.get();
if (callback != null) {
try {
callback.onGetDataCallListComplete(result, dataCallList);
} catch (RemoteException e) {
- Rlog.e(mTag, "Failed to onGetDataCallListComplete on the remote");
+ Rlog.e(TAG, "Failed to onGetDataCallListComplete on the remote");
}
}
}
@@ -165,7 +167,7 @@
try {
callback.onDataCallListChanged(dataCallList);
} catch (RemoteException e) {
- Rlog.e(mTag, "Failed to onDataCallListChanged on the remote");
+ Rlog.e(TAG, "Failed to onDataCallListChanged on the remote");
}
}
}
diff --git a/telephony/java/android/telephony/data/IDataService.aidl b/telephony/java/android/telephony/data/IDataService.aidl
index 07720b6..d4d9be8 100644
--- a/telephony/java/android/telephony/data/IDataService.aidl
+++ b/telephony/java/android/telephony/data/IDataService.aidl
@@ -25,14 +25,17 @@
*/
oneway interface IDataService
{
- void setupDataCall(int accessNetwork, in DataProfile dataProfile, boolean isRoaming,
+ void createDataServiceProvider(int slotId);
+ void removeDataServiceProvider(int slotId);
+ void setupDataCall(int slotId, int accessNetwork, in DataProfile dataProfile, boolean isRoaming,
boolean allowRoaming, int reason, in LinkProperties linkProperties,
IDataServiceCallback callback);
- void deactivateDataCall(int cid, int reason, IDataServiceCallback callback);
- void setInitialAttachApn(in DataProfile dataProfile, boolean isRoaming,
+ void deactivateDataCall(int slotId, int cid, int reason, IDataServiceCallback callback);
+ void setInitialAttachApn(int slotId, in DataProfile dataProfile, boolean isRoaming,
IDataServiceCallback callback);
- void setDataProfile(in List<DataProfile> dps, boolean isRoaming, IDataServiceCallback callback);
- void getDataCallList(IDataServiceCallback callback);
- void registerForDataCallListChanged(IDataServiceCallback callback);
- void unregisterForDataCallListChanged(IDataServiceCallback callback);
+ void setDataProfile(int slotId, in List<DataProfile> dps, boolean isRoaming,
+ IDataServiceCallback callback);
+ void getDataCallList(int slotId, IDataServiceCallback callback);
+ void registerForDataCallListChanged(int slotId, IDataServiceCallback callback);
+ void unregisterForDataCallListChanged(int slotId, IDataServiceCallback callback);
}
diff --git a/telephony/java/android/telephony/euicc/EuiccCardManager.java b/telephony/java/android/telephony/euicc/EuiccCardManager.java
index b9ed005..a1a6a5a 100644
--- a/telephony/java/android/telephony/euicc/EuiccCardManager.java
+++ b/telephony/java/android/telephony/euicc/EuiccCardManager.java
@@ -110,6 +110,9 @@
/** Result code of execution with no error. */
public static final int RESULT_OK = 0;
+ /** Result code of an unknown error. */
+ public static final int RESULT_UNKNOWN_ERROR = -1;
+
/**
* Callback to receive the result of an eUICC card API.
*
@@ -142,11 +145,12 @@
/**
* Gets all the profiles on eUicc.
*
+ * @param cardId The Id of the eUICC.
* @param callback The callback to get the result code and all the profiles.
*/
- public void getAllProfiles(ResultCallback<EuiccProfileInfo[]> callback) {
+ public void getAllProfiles(String cardId, ResultCallback<EuiccProfileInfo[]> callback) {
try {
- getIEuiccCardController().getAllProfiles(mContext.getOpPackageName(),
+ getIEuiccCardController().getAllProfiles(mContext.getOpPackageName(), cardId,
new IGetAllProfilesCallback.Stub() {
@Override
public void onComplete(int resultCode, EuiccProfileInfo[] profiles) {
@@ -162,12 +166,13 @@
/**
* Gets the profile of the given iccid.
*
+ * @param cardId The Id of the eUICC.
* @param iccid The iccid of the profile.
* @param callback The callback to get the result code and profile.
*/
- public void getProfile(String iccid, ResultCallback<EuiccProfileInfo> callback) {
+ public void getProfile(String cardId, String iccid, ResultCallback<EuiccProfileInfo> callback) {
try {
- getIEuiccCardController().getProfile(mContext.getOpPackageName(), iccid,
+ getIEuiccCardController().getProfile(mContext.getOpPackageName(), cardId, iccid,
new IGetProfileCallback.Stub() {
@Override
public void onComplete(int resultCode, EuiccProfileInfo profile) {
@@ -183,14 +188,16 @@
/**
* Disables the profile of the given iccid.
*
+ * @param cardId The Id of the eUICC.
* @param iccid The iccid of the profile.
* @param refresh Whether sending the REFRESH command to modem.
* @param callback The callback to get the result code.
*/
- public void disableProfile(String iccid, boolean refresh, ResultCallback<Void> callback) {
+ public void disableProfile(String cardId, String iccid, boolean refresh,
+ ResultCallback<Void> callback) {
try {
- getIEuiccCardController().disableProfile(mContext.getOpPackageName(), iccid, refresh,
- new IDisableProfileCallback.Stub() {
+ getIEuiccCardController().disableProfile(mContext.getOpPackageName(), cardId, iccid,
+ refresh, new IDisableProfileCallback.Stub() {
@Override
public void onComplete(int resultCode) {
callback.onComplete(resultCode, null);
@@ -206,15 +213,16 @@
* Switches from the current profile to another profile. The current profile will be disabled
* and the specified profile will be enabled.
*
+ * @param cardId The Id of the eUICC.
* @param iccid The iccid of the profile to switch to.
* @param refresh Whether sending the REFRESH command to modem.
* @param callback The callback to get the result code and the EuiccProfileInfo enabled.
*/
- public void switchToProfile(String iccid, boolean refresh,
+ public void switchToProfile(String cardId, String iccid, boolean refresh,
ResultCallback<EuiccProfileInfo> callback) {
try {
- getIEuiccCardController().switchToProfile(mContext.getOpPackageName(), iccid, refresh,
- new ISwitchToProfileCallback.Stub() {
+ getIEuiccCardController().switchToProfile(mContext.getOpPackageName(), cardId, iccid,
+ refresh, new ISwitchToProfileCallback.Stub() {
@Override
public void onComplete(int resultCode, EuiccProfileInfo profile) {
callback.onComplete(resultCode, profile);
@@ -227,30 +235,18 @@
}
/**
- * Gets the EID of the eUICC.
- *
- * @return The EID.
- */
- public String getEid() {
- try {
- return getIEuiccCardController().getEid();
- } catch (RemoteException e) {
- Log.e(TAG, "Error calling getEid", e);
- throw e.rethrowFromSystemServer();
- }
- }
-
- /**
* Sets the nickname of the profile of the given iccid.
*
+ * @param cardId The Id of the eUICC.
* @param iccid The iccid of the profile.
* @param nickname The nickname of the profile.
* @param callback The callback to get the result code.
*/
- public void setNickname(String iccid, String nickname, ResultCallback<Void> callback) {
+ public void setNickname(String cardId, String iccid, String nickname,
+ ResultCallback<Void> callback) {
try {
- getIEuiccCardController().setNickname(mContext.getOpPackageName(), iccid, nickname,
- new ISetNicknameCallback.Stub() {
+ getIEuiccCardController().setNickname(mContext.getOpPackageName(), cardId, iccid,
+ nickname, new ISetNicknameCallback.Stub() {
@Override
public void onComplete(int resultCode) {
callback.onComplete(resultCode, null);
@@ -265,12 +261,13 @@
/**
* Deletes the profile of the given iccid from eUICC.
*
+ * @param cardId The Id of the eUICC.
* @param iccid The iccid of the profile.
* @param callback The callback to get the result code.
*/
- public void deleteProfile(String iccid, ResultCallback<Void> callback) {
+ public void deleteProfile(String cardId, String iccid, ResultCallback<Void> callback) {
try {
- getIEuiccCardController().deleteProfile(mContext.getOpPackageName(), iccid,
+ getIEuiccCardController().deleteProfile(mContext.getOpPackageName(), cardId, iccid,
new IDeleteProfileCallback.Stub() {
@Override
public void onComplete(int resultCode) {
@@ -286,13 +283,14 @@
/**
* Resets the eUICC memory.
*
+ * @param cardId The Id of the eUICC.
* @param options Bits of the options of resetting which parts of the eUICC memory. See
* EuiccCard for details.
* @param callback The callback to get the result code.
*/
- public void resetMemory(@ResetOption int options, ResultCallback<Void> callback) {
+ public void resetMemory(String cardId, @ResetOption int options, ResultCallback<Void> callback) {
try {
- getIEuiccCardController().resetMemory(mContext.getOpPackageName(), options,
+ getIEuiccCardController().resetMemory(mContext.getOpPackageName(), cardId, options,
new IResetMemoryCallback.Stub() {
@Override
public void onComplete(int resultCode) {
@@ -308,11 +306,12 @@
/**
* Gets the default SM-DP+ address from eUICC.
*
+ * @param cardId The Id of the eUICC.
* @param callback The callback to get the result code and the default SM-DP+ address.
*/
- public void getDefaultSmdpAddress(ResultCallback<String> callback) {
+ public void getDefaultSmdpAddress(String cardId, ResultCallback<String> callback) {
try {
- getIEuiccCardController().getDefaultSmdpAddress(mContext.getOpPackageName(),
+ getIEuiccCardController().getDefaultSmdpAddress(mContext.getOpPackageName(), cardId,
new IGetDefaultSmdpAddressCallback.Stub() {
@Override
public void onComplete(int resultCode, String address) {
@@ -328,11 +327,12 @@
/**
* Gets the SM-DS address from eUICC.
*
+ * @param cardId The Id of the eUICC.
* @param callback The callback to get the result code and the SM-DS address.
*/
- public void getSmdsAddress(ResultCallback<String> callback) {
+ public void getSmdsAddress(String cardId, ResultCallback<String> callback) {
try {
- getIEuiccCardController().getSmdsAddress(mContext.getOpPackageName(),
+ getIEuiccCardController().getSmdsAddress(mContext.getOpPackageName(), cardId,
new IGetSmdsAddressCallback.Stub() {
@Override
public void onComplete(int resultCode, String address) {
@@ -348,12 +348,13 @@
/**
* Sets the default SM-DP+ address of eUICC.
*
+ * @param cardId The Id of the eUICC.
* @param defaultSmdpAddress The default SM-DP+ address to set.
* @param callback The callback to get the result code.
*/
- public void setDefaultSmdpAddress(String defaultSmdpAddress, ResultCallback<Void> callback) {
+ public void setDefaultSmdpAddress(String cardId, String defaultSmdpAddress, ResultCallback<Void> callback) {
try {
- getIEuiccCardController().setDefaultSmdpAddress(mContext.getOpPackageName(),
+ getIEuiccCardController().setDefaultSmdpAddress(mContext.getOpPackageName(), cardId,
defaultSmdpAddress,
new ISetDefaultSmdpAddressCallback.Stub() {
@Override
@@ -370,11 +371,12 @@
/**
* Gets Rules Authorisation Table.
*
+ * @param cardId The Id of the eUICC.
* @param callback the callback to get the result code and the rule authorisation table.
*/
- public void getRulesAuthTable(ResultCallback<EuiccRulesAuthTable> callback) {
+ public void getRulesAuthTable(String cardId, ResultCallback<EuiccRulesAuthTable> callback) {
try {
- getIEuiccCardController().getRulesAuthTable(mContext.getOpPackageName(),
+ getIEuiccCardController().getRulesAuthTable(mContext.getOpPackageName(), cardId,
new IGetRulesAuthTableCallback.Stub() {
@Override
public void onComplete(int resultCode, EuiccRulesAuthTable rat) {
@@ -390,11 +392,12 @@
/**
* Gets the eUICC challenge for new profile downloading.
*
+ * @param cardId The Id of the eUICC.
* @param callback the callback to get the result code and the challenge.
*/
- public void getEuiccChallenge(ResultCallback<byte[]> callback) {
+ public void getEuiccChallenge(String cardId, ResultCallback<byte[]> callback) {
try {
- getIEuiccCardController().getEuiccChallenge(mContext.getOpPackageName(),
+ getIEuiccCardController().getEuiccChallenge(mContext.getOpPackageName(), cardId,
new IGetEuiccChallengeCallback.Stub() {
@Override
public void onComplete(int resultCode, byte[] challenge) {
@@ -410,11 +413,12 @@
/**
* Gets the eUICC info1 defined in GSMA RSP v2.0+ for new profile downloading.
*
+ * @param cardId The Id of the eUICC.
* @param callback the callback to get the result code and the info1.
*/
- public void getEuiccInfo1(ResultCallback<byte[]> callback) {
+ public void getEuiccInfo1(String cardId, ResultCallback<byte[]> callback) {
try {
- getIEuiccCardController().getEuiccInfo1(mContext.getOpPackageName(),
+ getIEuiccCardController().getEuiccInfo1(mContext.getOpPackageName(), cardId,
new IGetEuiccInfo1Callback.Stub() {
@Override
public void onComplete(int resultCode, byte[] info) {
@@ -430,11 +434,12 @@
/**
* Gets the eUICC info2 defined in GSMA RSP v2.0+ for new profile downloading.
*
+ * @param cardId The Id of the eUICC.
* @param callback the callback to get the result code and the info2.
*/
- public void getEuiccInfo2(ResultCallback<byte[]> callback) {
+ public void getEuiccInfo2(String cardId, ResultCallback<byte[]> callback) {
try {
- getIEuiccCardController().getEuiccInfo2(mContext.getOpPackageName(),
+ getIEuiccCardController().getEuiccInfo2(mContext.getOpPackageName(), cardId,
new IGetEuiccInfo2Callback.Stub() {
@Override
public void onComplete(int resultCode, byte[] info) {
@@ -450,6 +455,7 @@
/**
* Authenticates the SM-DP+ server by the eUICC.
*
+ * @param cardId The Id of the eUICC.
* @param matchingId the activation code token defined in GSMA RSP v2.0+ or empty when it is not
* required.
* @param serverSigned1 ASN.1 data in byte array signed and returned by the SM-DP+ server.
@@ -463,12 +469,13 @@
* @param callback the callback to get the result code and a byte array which represents a
* {@code AuthenticateServerResponse} defined in GSMA RSP v2.0+.
*/
- public void authenticateServer(String matchingId, byte[] serverSigned1,
+ public void authenticateServer(String cardId, String matchingId, byte[] serverSigned1,
byte[] serverSignature1, byte[] euiccCiPkIdToBeUsed, byte[] serverCertificate,
ResultCallback<byte[]> callback) {
try {
getIEuiccCardController().authenticateServer(
mContext.getOpPackageName(),
+ cardId,
matchingId,
serverSigned1,
serverSignature1,
@@ -489,6 +496,7 @@
/**
* Prepares the profile download request sent to SM-DP+.
*
+ * @param cardId The Id of the eUICC.
* @param hashCc the hash of confirmation code. It can be null if there is no confirmation code
* required.
* @param smdpSigned2 ASN.1 data in byte array indicating the data to be signed by the SM-DP+
@@ -500,11 +508,12 @@
* @param callback the callback to get the result code and a byte array which represents a
* {@code PrepareDownloadResponse} defined in GSMA RSP v2.0+
*/
- public void prepareDownload(@Nullable byte[] hashCc, byte[] smdpSigned2,
+ public void prepareDownload(String cardId, @Nullable byte[] hashCc, byte[] smdpSigned2,
byte[] smdpSignature2, byte[] smdpCertificate, ResultCallback<byte[]> callback) {
try {
getIEuiccCardController().prepareDownload(
mContext.getOpPackageName(),
+ cardId,
hashCc,
smdpSigned2,
smdpSignature2,
@@ -524,15 +533,17 @@
/**
* Loads a downloaded bound profile package onto the eUICC.
*
+ * @param cardId The Id of the eUICC.
* @param boundProfilePackage the Bound Profile Package data returned by SM-DP+ server.
* @param callback the callback to get the result code and a byte array which represents a
* {@code LoadBoundProfilePackageResponse} defined in GSMA RSP v2.0+.
*/
- public void loadBoundProfilePackage(byte[] boundProfilePackage,
+ public void loadBoundProfilePackage(String cardId, byte[] boundProfilePackage,
ResultCallback<byte[]> callback) {
try {
getIEuiccCardController().loadBoundProfilePackage(
mContext.getOpPackageName(),
+ cardId,
boundProfilePackage,
new ILoadBoundProfilePackageCallback.Stub() {
@Override
@@ -549,16 +560,18 @@
/**
* Cancels the current profile download session.
*
+ * @param cardId The Id of the eUICC.
* @param transactionId the transaction ID returned by SM-DP+ server.
* @param reason the cancel reason.
* @param callback the callback to get the result code and an byte[] which represents a
* {@code CancelSessionResponse} defined in GSMA RSP v2.0+.
*/
- public void cancelSession(byte[] transactionId, @CancelReason int reason,
+ public void cancelSession(String cardId, byte[] transactionId, @CancelReason int reason,
ResultCallback<byte[]> callback) {
try {
getIEuiccCardController().cancelSession(
mContext.getOpPackageName(),
+ cardId,
transactionId,
reason,
new ICancelSessionCallback.Stub() {
@@ -576,13 +589,14 @@
/**
* Lists all notifications of the given {@code notificationEvents}.
*
+ * @param cardId The Id of the eUICC.
* @param events bits of the event types ({@link EuiccNotification.Event}) to list.
* @param callback the callback to get the result code and the list of notifications.
*/
- public void listNotifications(@EuiccNotification.Event int events,
+ public void listNotifications(String cardId, @EuiccNotification.Event int events,
ResultCallback<EuiccNotification[]> callback) {
try {
- getIEuiccCardController().listNotifications(mContext.getOpPackageName(), events,
+ getIEuiccCardController().listNotifications(mContext.getOpPackageName(), cardId, events,
new IListNotificationsCallback.Stub() {
@Override
public void onComplete(int resultCode, EuiccNotification[] notifications) {
@@ -598,14 +612,15 @@
/**
* Retrieves contents of all notification of the given {@code events}.
*
+ * @param cardId The Id of the eUICC.
* @param events bits of the event types ({@link EuiccNotification.Event}) to list.
* @param callback the callback to get the result code and the list of notifications.
*/
- public void retrieveNotificationList(@EuiccNotification.Event int events,
+ public void retrieveNotificationList(String cardId, @EuiccNotification.Event int events,
ResultCallback<EuiccNotification[]> callback) {
try {
- getIEuiccCardController().retrieveNotificationList(mContext.getOpPackageName(), events,
- new IRetrieveNotificationListCallback.Stub() {
+ getIEuiccCardController().retrieveNotificationList(mContext.getOpPackageName(), cardId,
+ events, new IRetrieveNotificationListCallback.Stub() {
@Override
public void onComplete(int resultCode, EuiccNotification[] notifications) {
callback.onComplete(resultCode, notifications);
@@ -620,13 +635,15 @@
/**
* Retrieves the content of a notification of the given {@code seqNumber}.
*
+ * @param cardId The Id of the eUICC.
* @param seqNumber the sequence number of the notification.
* @param callback the callback to get the result code and the notification.
*/
- public void retrieveNotification(int seqNumber, ResultCallback<EuiccNotification> callback) {
+ public void retrieveNotification(String cardId, int seqNumber,
+ ResultCallback<EuiccNotification> callback) {
try {
- getIEuiccCardController().retrieveNotification(mContext.getOpPackageName(), seqNumber,
- new IRetrieveNotificationCallback.Stub() {
+ getIEuiccCardController().retrieveNotification(mContext.getOpPackageName(), cardId,
+ seqNumber, new IRetrieveNotificationCallback.Stub() {
@Override
public void onComplete(int resultCode, EuiccNotification notification) {
callback.onComplete(resultCode, notification);
@@ -641,13 +658,16 @@
/**
* Removes a notification from eUICC.
*
+ * @param cardId The Id of the eUICC.
* @param seqNumber the sequence number of the notification.
* @param callback the callback to get the result code.
*/
- public void removeNotificationFromList(int seqNumber, ResultCallback<Void> callback) {
+ public void removeNotificationFromList(String cardId, int seqNumber,
+ ResultCallback<Void> callback) {
try {
getIEuiccCardController().removeNotificationFromList(
mContext.getOpPackageName(),
+ cardId,
seqNumber,
new IRemoveNotificationFromListCallback.Stub() {
@Override
diff --git a/telephony/java/android/telephony/ims/feature/MMTelFeature.java b/telephony/java/android/telephony/ims/feature/MMTelFeature.java
index 5197107..93c316f 100644
--- a/telephony/java/android/telephony/ims/feature/MMTelFeature.java
+++ b/telephony/java/android/telephony/ims/feature/MMTelFeature.java
@@ -209,6 +209,13 @@
return MMTelFeature.this.getSmsFormat();
}
}
+
+ @Override
+ public void onSmsReady() {
+ synchronized (mLock) {
+ MMTelFeature.this.onSmsReady();
+ }
+ }
};
/**
@@ -384,25 +391,29 @@
return null;
}
- public void setSmsListener(IImsSmsListener listener) {
+ private void setSmsListener(IImsSmsListener listener) {
getSmsImplementation().registerSmsListener(listener);
}
- public void sendSms(int token, int messageRef, String format, String smsc, boolean isRetry,
+ private void sendSms(int token, int messageRef, String format, String smsc, boolean isRetry,
byte[] pdu) {
getSmsImplementation().sendSms(token, messageRef, format, smsc, isRetry, pdu);
}
- public void acknowledgeSms(int token, int messageRef,
+ private void acknowledgeSms(int token, int messageRef,
@SmsImplBase.DeliverStatusResult int result) {
getSmsImplementation().acknowledgeSms(token, messageRef, result);
}
- public void acknowledgeSmsReport(int token, int messageRef,
+ private void acknowledgeSmsReport(int token, int messageRef,
@SmsImplBase.StatusReportResult int result) {
getSmsImplementation().acknowledgeSmsReport(token, messageRef, result);
}
+ private void onSmsReady() {
+ getSmsImplementation().onReady();
+ }
+
/**
* Must be overridden by IMS Provider to be able to support SMS over IMS. Otherwise a default
* non-functional implementation is returned.
diff --git a/telephony/java/android/telephony/ims/internal/SmsImplBase.java b/telephony/java/android/telephony/ims/internal/SmsImplBase.java
deleted file mode 100644
index 33b23d9..0000000
--- a/telephony/java/android/telephony/ims/internal/SmsImplBase.java
+++ /dev/null
@@ -1,273 +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 android.telephony.ims.internal;
-
-import android.annotation.IntDef;
-import android.os.RemoteException;
-import android.telephony.SmsManager;
-import android.telephony.SmsMessage;
-import android.telephony.ims.internal.aidl.IImsSmsListener;
-import android.telephony.ims.internal.feature.MmTelFeature;
-import android.util.Log;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Base implementation for SMS over IMS.
- *
- * Any service wishing to provide SMS over IMS should extend this class and implement all methods
- * that the service supports.
- * @hide
- */
-public class SmsImplBase {
- private static final String LOG_TAG = "SmsImplBase";
-
- /** @hide */
- @IntDef({
- SEND_STATUS_OK,
- SEND_STATUS_ERROR,
- SEND_STATUS_ERROR_RETRY,
- SEND_STATUS_ERROR_FALLBACK
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface SendStatusResult {}
- /**
- * Message was sent successfully.
- */
- public static final int SEND_STATUS_OK = 1;
-
- /**
- * IMS provider failed to send the message and platform should not retry falling back to sending
- * the message using the radio.
- */
- public static final int SEND_STATUS_ERROR = 2;
-
- /**
- * IMS provider failed to send the message and platform should retry again after setting TP-RD bit
- * to high.
- */
- public static final int SEND_STATUS_ERROR_RETRY = 3;
-
- /**
- * IMS provider failed to send the message and platform should retry falling back to sending
- * the message using the radio.
- */
- public static final int SEND_STATUS_ERROR_FALLBACK = 4;
-
- /** @hide */
- @IntDef({
- DELIVER_STATUS_OK,
- DELIVER_STATUS_ERROR
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface DeliverStatusResult {}
- /**
- * Message was delivered successfully.
- */
- public static final int DELIVER_STATUS_OK = 1;
-
- /**
- * Message was not delivered.
- */
- public static final int DELIVER_STATUS_ERROR = 2;
-
- /** @hide */
- @IntDef({
- STATUS_REPORT_STATUS_OK,
- STATUS_REPORT_STATUS_ERROR
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface StatusReportResult {}
-
- /**
- * Status Report was set successfully.
- */
- public static final int STATUS_REPORT_STATUS_OK = 1;
-
- /**
- * Error while setting status report.
- */
- public static final int STATUS_REPORT_STATUS_ERROR = 2;
-
-
- // Lock for feature synchronization
- private final Object mLock = new Object();
- private IImsSmsListener mListener;
-
- /**
- * Registers a listener responsible for handling tasks like delivering messages.
- *
- * @param listener listener to register.
- *
- * @hide
- */
- public final void registerSmsListener(IImsSmsListener listener) {
- synchronized (mLock) {
- mListener = listener;
- }
- }
-
- /**
- * This method will be triggered by the platform when the user attempts to send an SMS. This
- * method should be implemented by the IMS providers to provide implementation of sending an SMS
- * over IMS.
- *
- * @param token unique token generated by the platform that should be used when triggering
- * callbacks for this specific message.
- * @param messageRef the message reference.
- * @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
- * {@link SmsMessage#FORMAT_3GPP2}.
- * @param smsc the Short Message Service Center address.
- * @param isRetry whether it is a retry of an already attempted message or not.
- * @param pdu PDUs representing the contents of the message.
- */
- public void sendSms(int token, int messageRef, String format, String smsc, boolean isRetry,
- byte[] pdu) {
- // Base implementation returns error. Should be overridden.
- try {
- onSendSmsResult(token, messageRef, SEND_STATUS_ERROR,
- SmsManager.RESULT_ERROR_GENERIC_FAILURE);
- } catch (RemoteException e) {
- Log.e(LOG_TAG, "Can not send sms: " + e.getMessage());
- }
- }
-
- /**
- * This method will be triggered by the platform after {@link #onSmsReceived(int, String, byte[])}
- * has been called to deliver the result to the IMS provider.
- *
- * @param token token provided in {@link #onSmsReceived(int, String, byte[])}
- * @param result result of delivering the message. Valid values are defined in
- * {@link DeliverStatusResult}
- * @param messageRef the message reference
- */
- public void acknowledgeSms(int token, int messageRef, @DeliverStatusResult int result) {
- Log.e(LOG_TAG, "acknowledgeSms() not implemented.");
- }
-
- /**
- * This method will be triggered by the platform after
- * {@link #onSmsStatusReportReceived(int, int, String, byte[])} has been called to provide the
- * result to the IMS provider.
- *
- * @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
- * @param result result of delivering the message. Valid values are defined in
- * {@link StatusReportResult}
- * @param messageRef the message reference
- */
- public void acknowledgeSmsReport(int token, int messageRef, @StatusReportResult int result) {
- Log.e(LOG_TAG, "acknowledgeSmsReport() not implemented.");
- }
-
- /**
- * This method should be triggered by the IMS providers when there is an incoming message. The
- * platform will deliver the message to the messages database and notify the IMS provider of the
- * result by calling {@link #acknowledgeSms(int, int, int)}.
- *
- * This method must not be called before {@link MmTelFeature#onFeatureReady()} is called.
- *
- * @param token unique token generated by IMS providers that the platform will use to trigger
- * callbacks for this message.
- * @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
- * {@link SmsMessage#FORMAT_3GPP2}.
- * @param pdu PDUs representing the contents of the message.
- * @throws IllegalStateException if called before {@link MmTelFeature#onFeatureReady()}
- */
- public final void onSmsReceived(int token, String format, byte[] pdu)
- throws IllegalStateException {
- synchronized (mLock) {
- if (mListener == null) {
- throw new IllegalStateException("Feature not ready.");
- }
- try {
- mListener.onSmsReceived(token, format, pdu);
- } catch (RemoteException e) {
- Log.e(LOG_TAG, "Can not deliver sms: " + e.getMessage());
- acknowledgeSms(token, 0, DELIVER_STATUS_ERROR);
- }
- }
- }
-
- /**
- * This method should be triggered by the IMS providers to pass the result of the sent message
- * to the platform.
- *
- * This method must not be called before {@link MmTelFeature#onFeatureReady()} is called.
- *
- * @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
- * @param messageRef the message reference. Should be between 0 and 255 per TS.123.040
- * @param status result of sending the SMS. Valid values are defined in {@link SendStatusResult}
- * @param reason reason in case status is failure. Valid values are:
- * {@link SmsManager#RESULT_ERROR_NONE},
- * {@link SmsManager#RESULT_ERROR_GENERIC_FAILURE},
- * {@link SmsManager#RESULT_ERROR_RADIO_OFF},
- * {@link SmsManager#RESULT_ERROR_NULL_PDU},
- * {@link SmsManager#RESULT_ERROR_NO_SERVICE},
- * {@link SmsManager#RESULT_ERROR_LIMIT_EXCEEDED},
- * {@link SmsManager#RESULT_ERROR_SHORT_CODE_NOT_ALLOWED},
- * {@link SmsManager#RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED}
- * @throws IllegalStateException if called before {@link MmTelFeature#onFeatureReady()}
- * @throws RemoteException if the connection to the framework is not available. If this happens
- * attempting to send the SMS should be aborted.
- */
- public final void onSendSmsResult(int token, int messageRef, @SendStatusResult int status,
- int reason) throws IllegalStateException, RemoteException {
- synchronized (mLock) {
- if (mListener == null) {
- throw new IllegalStateException("Feature not ready.");
- }
- mListener.onSendSmsResult(token, messageRef, status, reason);
- }
- }
-
- /**
- * Sets the status report of the sent message.
- *
- * @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
- * @param messageRef the message reference.
- * @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
- * {@link SmsMessage#FORMAT_3GPP2}.
- * @param pdu PDUs representing the content of the status report.
- * @throws IllegalStateException if called before {@link MmTelFeature#onFeatureReady()}
- */
- public final void onSmsStatusReportReceived(int token, int messageRef, String format,
- byte[] pdu) {
- synchronized (mLock) {
- if (mListener == null) {
- throw new IllegalStateException("Feature not ready.");
- }
- try {
- mListener.onSmsStatusReportReceived(token, messageRef, format, pdu);
- } catch (RemoteException e) {
- Log.e(LOG_TAG, "Can not process sms status report: " + e.getMessage());
- acknowledgeSmsReport(token, messageRef, STATUS_REPORT_STATUS_ERROR);
- }
- }
- }
-
- /**
- * Returns the SMS format. Default is {@link SmsMessage#FORMAT_3GPP} unless overridden by IMS
- * Provider.
- *
- * @return the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
- * {@link SmsMessage#FORMAT_3GPP2}.
- */
- public String getSmsFormat() {
- return SmsMessage.FORMAT_3GPP;
- }
-
-}
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsMmTelFeature.aidl b/telephony/java/android/telephony/ims/internal/aidl/IImsMmTelFeature.aidl
index 785113f..e226ada 100644
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsMmTelFeature.aidl
+++ b/telephony/java/android/telephony/ims/internal/aidl/IImsMmTelFeature.aidl
@@ -18,7 +18,6 @@
import android.os.Message;
import android.telephony.ims.internal.aidl.IImsMmTelListener;
-import android.telephony.ims.internal.aidl.IImsSmsListener;
import android.telephony.ims.internal.aidl.IImsCapabilityCallback;
import android.telephony.ims.internal.aidl.IImsCallSessionListener;
import android.telephony.ims.internal.feature.CapabilityChangeRequest;
@@ -50,11 +49,4 @@
IImsCapabilityCallback c);
oneway void queryCapabilityConfiguration(int capability, int radioTech,
IImsCapabilityCallback c);
- // SMS APIs
- void setSmsListener(IImsSmsListener l);
- oneway void sendSms(in int token, int messageRef, String format, String smsc, boolean retry,
- in byte[] pdu);
- oneway void acknowledgeSms(int token, int messageRef, int result);
- oneway void acknowledgeSmsReport(int token, int messageRef, int result);
- String getSmsFormat();
}
diff --git a/telephony/java/android/telephony/ims/internal/aidl/IImsSmsListener.aidl b/telephony/java/android/telephony/ims/internal/aidl/IImsSmsListener.aidl
deleted file mode 100644
index bf8d90b..0000000
--- a/telephony/java/android/telephony/ims/internal/aidl/IImsSmsListener.aidl
+++ /dev/null
@@ -1,28 +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 android.telephony.ims.internal.aidl;
-
-/**
- * See MMTelFeature for more information.
- * {@hide}
- */
-interface IImsSmsListener {
- void onSendSmsResult(in int token, in int messageRef, in int status, in int reason);
- void onSmsStatusReportReceived(in int token, in int messageRef, in String format,
- in byte[] pdu);
- void onSmsReceived(in int token, in String format, in byte[] pdu);
-}
\ No newline at end of file
diff --git a/telephony/java/android/telephony/ims/internal/feature/MmTelFeature.java b/telephony/java/android/telephony/ims/internal/feature/MmTelFeature.java
index 8d888c2..9b576c7 100644
--- a/telephony/java/android/telephony/ims/internal/feature/MmTelFeature.java
+++ b/telephony/java/android/telephony/ims/internal/feature/MmTelFeature.java
@@ -21,14 +21,10 @@
import android.os.RemoteException;
import android.telecom.TelecomManager;
import android.telephony.ims.internal.ImsCallSessionListener;
-import android.telephony.ims.internal.SmsImplBase;
-import android.telephony.ims.internal.SmsImplBase.DeliverStatusResult;
-import android.telephony.ims.internal.SmsImplBase.StatusReportResult;
import android.telephony.ims.internal.aidl.IImsCallSessionListener;
import android.telephony.ims.internal.aidl.IImsCapabilityCallback;
import android.telephony.ims.internal.aidl.IImsMmTelFeature;
import android.telephony.ims.internal.aidl.IImsMmTelListener;
-import android.telephony.ims.internal.aidl.IImsSmsListener;
import android.telephony.ims.stub.ImsRegistrationImplBase;
import android.telephony.ims.stub.ImsEcbmImplBase;
import android.telephony.ims.stub.ImsMultiEndpointImplBase;
@@ -68,11 +64,6 @@
}
@Override
- public void setSmsListener(IImsSmsListener l) throws RemoteException {
- MmTelFeature.this.setSmsListener(l);
- }
-
- @Override
public int getFeatureState() throws RemoteException {
synchronized (mLock) {
return MmTelFeature.this.getFeatureState();
@@ -152,35 +143,6 @@
IImsCapabilityCallback c) {
queryCapabilityConfigurationInternal(capability, radioTech, c);
}
-
- @Override
- public void sendSms(int token, int messageRef, String format, String smsc, boolean retry,
- byte[] pdu) {
- synchronized (mLock) {
- MmTelFeature.this.sendSms(token, messageRef, format, smsc, retry, pdu);
- }
- }
-
- @Override
- public void acknowledgeSms(int token, int messageRef, int result) {
- synchronized (mLock) {
- MmTelFeature.this.acknowledgeSms(token, messageRef, result);
- }
- }
-
- @Override
- public void acknowledgeSmsReport(int token, int messageRef, int result) {
- synchronized (mLock) {
- MmTelFeature.this.acknowledgeSmsReport(token, messageRef, result);
- }
- }
-
- @Override
- public String getSmsFormat() {
- synchronized (mLock) {
- return MmTelFeature.this.getSmsFormat();
- }
- }
};
/**
@@ -292,10 +254,6 @@
}
}
- private void setSmsListener(IImsSmsListener listener) {
- getSmsImplementation().registerSmsListener(listener);
- }
-
private void queryCapabilityConfigurationInternal(int capability, int radioTech,
IImsCapabilityCallback c) {
boolean enabled = queryCapabilityConfiguration(capability, radioTech);
@@ -457,33 +415,6 @@
// Base Implementation - Should be overridden
}
- private void sendSms(int token, int messageRef, String format, String smsc, boolean isRetry,
- byte[] pdu) {
- getSmsImplementation().sendSms(token, messageRef, format, smsc, isRetry, pdu);
- }
-
- private void acknowledgeSms(int token, int messageRef, @DeliverStatusResult int result) {
- getSmsImplementation().acknowledgeSms(token, messageRef, result);
- }
-
- private void acknowledgeSmsReport(int token, int messageRef, @StatusReportResult int result) {
- getSmsImplementation().acknowledgeSmsReport(token, messageRef, result);
- }
-
- private String getSmsFormat() {
- return getSmsImplementation().getSmsFormat();
- }
-
- /**
- * Must be overridden by IMS Provider to be able to support SMS over IMS. Otherwise a default
- * non-functional implementation is returned.
- *
- * @return an instance of {@link SmsImplBase} which should be implemented by the IMS Provider.
- */
- protected SmsImplBase getSmsImplementation() {
- return new SmsImplBase();
- }
-
/**{@inheritDoc}*/
@Override
public void onFeatureRemoved() {
diff --git a/telephony/java/android/telephony/ims/internal/stub/SmsImplBase.java b/telephony/java/android/telephony/ims/internal/stub/SmsImplBase.java
index 113dad4..89acc80 100644
--- a/telephony/java/android/telephony/ims/internal/stub/SmsImplBase.java
+++ b/telephony/java/android/telephony/ims/internal/stub/SmsImplBase.java
@@ -17,10 +17,10 @@
package android.telephony.ims.internal.stub;
import android.annotation.IntDef;
+import android.annotation.SystemApi;
import android.os.RemoteException;
import android.telephony.SmsManager;
import android.telephony.SmsMessage;
-import android.telephony.ims.internal.feature.MmTelFeature;
import android.util.Log;
import com.android.ims.internal.IImsSmsListener;
@@ -33,11 +33,14 @@
*
* Any service wishing to provide SMS over IMS should extend this class and implement all methods
* that the service supports.
+ *
* @hide
*/
+@SystemApi
public class SmsImplBase {
private static final String LOG_TAG = "SmsImplBase";
+ /** @hide */
@IntDef({
SEND_STATUS_OK,
SEND_STATUS_ERROR,
@@ -58,8 +61,8 @@
public static final int SEND_STATUS_ERROR = 2;
/**
- * IMS provider failed to send the message and platform should retry again after setting TP-RD bit
- * to high.
+ * IMS provider failed to send the message and platform should retry again after setting TP-RD
+ * bit to high.
*/
public static final int SEND_STATUS_ERROR_RETRY = 3;
@@ -69,6 +72,7 @@
*/
public static final int SEND_STATUS_ERROR_FALLBACK = 4;
+ /** @hide */
@IntDef({
DELIVER_STATUS_OK,
DELIVER_STATUS_ERROR
@@ -85,6 +89,7 @@
*/
public static final int DELIVER_STATUS_ERROR = 2;
+ /** @hide */
@IntDef({
STATUS_REPORT_STATUS_OK,
STATUS_REPORT_STATUS_ERROR
@@ -140,21 +145,23 @@
try {
onSendSmsResult(token, messageRef, SEND_STATUS_ERROR,
SmsManager.RESULT_ERROR_GENERIC_FAILURE);
- } catch (RemoteException e) {
+ } catch (RuntimeException e) {
Log.e(LOG_TAG, "Can not send sms: " + e.getMessage());
}
}
/**
- * This method will be triggered by the platform after {@link #onSmsReceived(int, String, byte[])}
- * has been called to deliver the result to the IMS provider.
+ * This method will be triggered by the platform after
+ * {@link #onSmsReceived(int, String, byte[])} has been called to deliver the result to the IMS
+ * provider.
*
* @param token token provided in {@link #onSmsReceived(int, String, byte[])}
- * @param result result of delivering the message. Valid values are defined in
- * {@link DeliverStatusResult}
+ * @param result result of delivering the message. Valid values are:
+ * {@link #DELIVER_STATUS_OK},
+ * {@link #DELIVER_STATUS_OK}
* @param messageRef the message reference
*/
- public void acknowledgeSms(int token, int messageRef, @DeliverStatusResult int result) {
+ public void acknowledgeSms(int token, @DeliverStatusResult int messageRef, int result) {
Log.e(LOG_TAG, "acknowledgeSms() not implemented.");
}
@@ -164,8 +171,9 @@
* result to the IMS provider.
*
* @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
- * @param result result of delivering the message. Valid values are defined in
- * {@link StatusReportResult}
+ * @param result result of delivering the message. Valid values are:
+ * {@link #STATUS_REPORT_STATUS_OK},
+ * {@link #STATUS_REPORT_STATUS_ERROR}
* @param messageRef the message reference
*/
public void acknowledgeSmsReport(int token, int messageRef, @StatusReportResult int result) {
@@ -177,20 +185,17 @@
* platform will deliver the message to the messages database and notify the IMS provider of the
* result by calling {@link #acknowledgeSms(int, int, int)}.
*
- * This method must not be called before {@link MmTelFeature#onFeatureReady()} is called.
- *
* @param token unique token generated by IMS providers that the platform will use to trigger
* callbacks for this message.
* @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
* {@link SmsMessage#FORMAT_3GPP2}.
* @param pdu PDUs representing the contents of the message.
- * @throws IllegalStateException if called before {@link MmTelFeature#onFeatureReady()}
+ * @throws RuntimeException if called before {@link #onReady()} is triggered.
*/
- public final void onSmsReceived(int token, String format, byte[] pdu)
- throws IllegalStateException {
+ public final void onSmsReceived(int token, String format, byte[] pdu) throws RuntimeException {
synchronized (mLock) {
if (mListener == null) {
- throw new IllegalStateException("Feature not ready.");
+ throw new RuntimeException("Feature not ready.");
}
try {
mListener.onSmsReceived(token, format, pdu);
@@ -205,11 +210,13 @@
* This method should be triggered by the IMS providers to pass the result of the sent message
* to the platform.
*
- * This method must not be called before {@link MmTelFeature#onFeatureReady()} is called.
- *
* @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
* @param messageRef the message reference. Should be between 0 and 255 per TS.123.040
- * @param status result of sending the SMS. Valid values are defined in {@link SendStatusResult}
+ * @param status result of sending the SMS. Valid values are:
+ * {@link #SEND_STATUS_OK},
+ * {@link #SEND_STATUS_ERROR},
+ * {@link #SEND_STATUS_ERROR_RETRY},
+ * {@link #SEND_STATUS_ERROR_FALLBACK},
* @param reason reason in case status is failure. Valid values are:
* {@link SmsManager#RESULT_ERROR_NONE},
* {@link SmsManager#RESULT_ERROR_GENERIC_FAILURE},
@@ -217,19 +224,41 @@
* {@link SmsManager#RESULT_ERROR_NULL_PDU},
* {@link SmsManager#RESULT_ERROR_NO_SERVICE},
* {@link SmsManager#RESULT_ERROR_LIMIT_EXCEEDED},
+ * {@link SmsManager#RESULT_ERROR_FDN_CHECK_FAILURE},
* {@link SmsManager#RESULT_ERROR_SHORT_CODE_NOT_ALLOWED},
- * {@link SmsManager#RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED}
- * @throws IllegalStateException if called before {@link MmTelFeature#onFeatureReady()}
- * @throws RemoteException if the connection to the framework is not available. If this happens
- * attempting to send the SMS should be aborted.
+ * {@link SmsManager#RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED},
+ * {@link SmsManager#RESULT_RADIO_NOT_AVAILABLE},
+ * {@link SmsManager#RESULT_NETWORK_REJECT},
+ * {@link SmsManager#RESULT_INVALID_ARGUMENTS},
+ * {@link SmsManager#RESULT_INVALID_STATE},
+ * {@link SmsManager#RESULT_NO_MEMORY},
+ * {@link SmsManager#RESULT_INVALID_SMS_FORMAT},
+ * {@link SmsManager#RESULT_SYSTEM_ERROR},
+ * {@link SmsManager#RESULT_MODEM_ERROR},
+ * {@link SmsManager#RESULT_NETWORK_ERROR},
+ * {@link SmsManager#RESULT_ENCODING_ERROR},
+ * {@link SmsManager#RESULT_INVALID_SMSC_ADDRESS},
+ * {@link SmsManager#RESULT_OPERATION_NOT_ALLOWED},
+ * {@link SmsManager#RESULT_INTERNAL_ERROR},
+ * {@link SmsManager#RESULT_NO_RESOURCES},
+ * {@link SmsManager#RESULT_CANCELLED},
+ * {@link SmsManager#RESULT_REQUEST_NOT_SUPPORTED}
+ *
+ * @throws RuntimeException if called before {@link #onReady()} is triggered or if the
+ * connection to the framework is not available. If this happens attempting to send the SMS
+ * should be aborted.
*/
- public final void onSendSmsResult(int token, int messageRef, @SendStatusResult int status,
- int reason) throws IllegalStateException, RemoteException {
+ public final void onSendSmsResult(int token, int messageRef, @SendStatusResult int status,
+ int reason) throws RuntimeException {
synchronized (mLock) {
if (mListener == null) {
- throw new IllegalStateException("Feature not ready.");
+ throw new RuntimeException("Feature not ready.");
}
- mListener.onSendSmsResult(token, messageRef, status, reason);
+ try {
+ mListener.onSendSmsResult(token, messageRef, status, reason);
+ } catch (RemoteException e) {
+ e.rethrowFromSystemServer();
+ }
}
}
@@ -241,13 +270,13 @@
* @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
* {@link SmsMessage#FORMAT_3GPP2}.
* @param pdu PDUs representing the content of the status report.
- * @throws IllegalStateException if called before {@link MmTelFeature#onFeatureReady()}
+ * @throws RuntimeException if called before {@link #onReady()} is triggered
*/
public final void onSmsStatusReportReceived(int token, int messageRef, String format,
- byte[] pdu) {
+ byte[] pdu) throws RuntimeException{
synchronized (mLock) {
if (mListener == null) {
- throw new IllegalStateException("Feature not ready.");
+ throw new RuntimeException("Feature not ready.");
}
try {
mListener.onSmsStatusReportReceived(token, messageRef, format, pdu);
@@ -268,4 +297,13 @@
public String getSmsFormat() {
return SmsMessage.FORMAT_3GPP;
}
+
+ /**
+ * Called when SmsImpl has been initialized and communication with the framework is set up.
+ * Any attempt by this class to access the framework before this method is called will return
+ * with an {@link RuntimeException}.
+ */
+ public void onReady() {
+ // Base Implementation - Should be overridden
+ }
}
diff --git a/telephony/java/com/android/ims/ImsReasonInfo.java b/telephony/java/com/android/ims/ImsReasonInfo.java
index 4f6f68c..83d9bd9 100644
--- a/telephony/java/com/android/ims/ImsReasonInfo.java
+++ b/telephony/java/com/android/ims/ImsReasonInfo.java
@@ -384,6 +384,13 @@
/** Call/IMS registration is failed/dropped because of a network detach */
public static final int CODE_NETWORK_DETACH = 1513;
+ /**
+ * Call failed due to SIP code 380 (Alternative Service response) while dialing an "undetected
+ * emergency number". This scenario is important in some regions where the carrier network will
+ * identify other non-emergency help numbers (e.g. mountain rescue) when attempting to dial.
+ */
+ public static final int CODE_SIP_ALTERNATE_EMERGENCY_CALL = 1514;
+
/* OEM specific error codes. To be used by OEMs when they don't want to
reveal error code which would be replaced by ERROR_UNSPECIFIED */
public static final int CODE_OEM_CAUSE_1 = 0xf001;
diff --git a/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl b/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl
index cce39f4..10c7f3e 100644
--- a/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl
+++ b/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl
@@ -61,4 +61,5 @@
oneway void acknowledgeSms(int token, int messageRef, int result);
oneway void acknowledgeSmsReport(int token, int messageRef, int result);
String getSmsFormat();
+ oneway void onSmsReady();
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index fba82ee..dfb3c34 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -47,6 +47,7 @@
import java.util.List;
+import android.telephony.UiccSlotInfo;
/**
* Interface used to interact with the phone. Mostly this is used by the
@@ -1444,4 +1445,19 @@
* @hide
*/
SignalStrength getSignalStrength(int subId);
+
+ /**
+ * Get slot info for all the UICC slots.
+ * @return UiccSlotInfo array.
+ * @hide
+ */
+ UiccSlotInfo[] getUiccSlotsInfo();
+
+ /**
+ * Map logicalSlot to physicalSlot, and activate the physicalSlot if it is inactive.
+ * @param physicalSlots Index i in the array representing physical slot for phone i. The array
+ * size should be same as getPhoneCount().
+ * @return boolean Return true if the switch succeeds, false if the switch fails.
+ */
+ boolean switchSlots(in int[] physicalSlots);
}
diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java
index f804cb0..cdee9e6 100644
--- a/telephony/java/com/android/internal/telephony/RILConstants.java
+++ b/telephony/java/com/android/internal/telephony/RILConstants.java
@@ -105,6 +105,8 @@
int DEVICE_IN_USE = 64; /* Operation cannot be performed because the device
is currently in use */
int ABORTED = 65; /* Operation aborted */
+ int INVALID_RESPONSE = 66; /* Invalid response sent by vendor code */
+
// Below is list of OEM specific error codes which can by used by OEMs in case they don't want to
// reveal particular replacement for Generic failure
int OEM_ERROR_1 = 501;
@@ -419,6 +421,8 @@
int RIL_REQUEST_STOP_NETWORK_SCAN = 143;
int RIL_REQUEST_GET_SLOT_STATUS = 144;
int RIL_REQUEST_SET_LOGICAL_TO_PHYSICAL_SLOT_MAPPING = 145;
+ int RIL_REQUEST_START_KEEPALIVE = 146;
+ int RIL_REQUEST_STOP_KEEPALIVE = 147;
int RIL_RESPONSE_ACKNOWLEDGEMENT = 800;
@@ -474,4 +478,5 @@
int RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION = 1048;
int RIL_UNSOL_NETWORK_SCAN_RESULT = 1049;
int RIL_UNSOL_ICC_SLOT_STATUS = 1050;
+ int RIL_UNSOL_KEEPALIVE_STATUS = 1051;
}
diff --git a/telephony/java/com/android/internal/telephony/euicc/IEuiccCardController.aidl b/telephony/java/com/android/internal/telephony/euicc/IEuiccCardController.aidl
index abc55c7..e33f44c 100644
--- a/telephony/java/com/android/internal/telephony/euicc/IEuiccCardController.aidl
+++ b/telephony/java/com/android/internal/telephony/euicc/IEuiccCardController.aidl
@@ -41,42 +41,49 @@
/** @hide */
interface IEuiccCardController {
- oneway void getAllProfiles(String callingPackage, in IGetAllProfilesCallback callback);
- oneway void getProfile(String callingPackage, String iccid, in IGetProfileCallback callback);
- oneway void disableProfile(String callingPackage, String iccid, boolean refresh,
+ oneway void getAllProfiles(String callingPackage, String cardId,
+ in IGetAllProfilesCallback callback);
+ oneway void getProfile(String callingPackage, String cardId, String iccid,
+ in IGetProfileCallback callback);
+ oneway void disableProfile(String callingPackage, String cardId, String iccid, boolean refresh,
in IDisableProfileCallback callback);
- oneway void switchToProfile(String callingPackage, String iccid, boolean refresh,
+ oneway void switchToProfile(String callingPackage, String cardId, String iccid, boolean refresh,
in ISwitchToProfileCallback callback);
- String getEid();
- oneway void setNickname(String callingPackage, String iccid, String nickname,
+ oneway void setNickname(String callingPackage, String cardId, String iccid, String nickname,
in ISetNicknameCallback callback);
- oneway void deleteProfile(String callingPackage, String iccid,
+ oneway void deleteProfile(String callingPackage, String cardId, String iccid,
in IDeleteProfileCallback callback);
- oneway void resetMemory(String callingPackage, int options, in IResetMemoryCallback callback);
- oneway void getDefaultSmdpAddress(String callingPackage,
+ oneway void resetMemory(String callingPackage, String cardId, int options, in IResetMemoryCallback callback);
+ oneway void getDefaultSmdpAddress(String callingPackage, String cardId,
in IGetDefaultSmdpAddressCallback callback);
- oneway void getSmdsAddress(String callingPackage, in IGetSmdsAddressCallback callback);
- oneway void setDefaultSmdpAddress(String callingPackage, String address,
+ oneway void getSmdsAddress(String callingPackage, String cardId,
+ in IGetSmdsAddressCallback callback);
+ oneway void setDefaultSmdpAddress(String callingPackage, String cardId, String address,
in ISetDefaultSmdpAddressCallback callback);
- oneway void getRulesAuthTable(String callingPackage, in IGetRulesAuthTableCallback callback);
- oneway void getEuiccChallenge(String callingPackage, in IGetEuiccChallengeCallback callback);
- oneway void getEuiccInfo1(String callingPackage, in IGetEuiccInfo1Callback callback);
- oneway void getEuiccInfo2(String callingPackage, in IGetEuiccInfo2Callback callback);
- oneway void authenticateServer(String callingPackage, String matchingId,
+ oneway void getRulesAuthTable(String callingPackage, String cardId,
+ in IGetRulesAuthTableCallback callback);
+ oneway void getEuiccChallenge(String callingPackage, String cardId,
+ in IGetEuiccChallengeCallback callback);
+ oneway void getEuiccInfo1(String callingPackage, String cardId,
+ in IGetEuiccInfo1Callback callback);
+ oneway void getEuiccInfo2(String callingPackage, String cardId,
+ in IGetEuiccInfo2Callback callback);
+ oneway void authenticateServer(String callingPackage, String cardId, String matchingId,
in byte[] serverSigned1, in byte[] serverSignature1, in byte[] euiccCiPkIdToBeUsed,
in byte[] serverCertificatein, in IAuthenticateServerCallback callback);
- oneway void prepareDownload(String callingPackage, in byte[] hashCc, in byte[] smdpSigned2,
- in byte[] smdpSignature2, in byte[] smdpCertificate, in IPrepareDownloadCallback callback);
- oneway void loadBoundProfilePackage(String callingPackage, in byte[] boundProfilePackage,
- in ILoadBoundProfilePackageCallback callback);
- oneway void cancelSession(String callingPackage, in byte[] transactionId, int reason,
- in ICancelSessionCallback callback);
- oneway void listNotifications(String callingPackage, int events,
+ oneway void prepareDownload(String callingPackage, String cardId, in byte[] hashCc,
+ in byte[] smdpSigned2, in byte[] smdpSignature2, in byte[] smdpCertificate,
+ in IPrepareDownloadCallback callback);
+ oneway void loadBoundProfilePackage(String callingPackage, String cardId,
+ in byte[] boundProfilePackage, in ILoadBoundProfilePackageCallback callback);
+ oneway void cancelSession(String callingPackage, String cardId, in byte[] transactionId,
+ int reason, in ICancelSessionCallback callback);
+ oneway void listNotifications(String callingPackage, String cardId, int events,
in IListNotificationsCallback callback);
- oneway void retrieveNotificationList(String callingPackage, int events,
+ oneway void retrieveNotificationList(String callingPackage, String cardId, int events,
in IRetrieveNotificationListCallback callback);
- oneway void retrieveNotification(String callingPackage, int seqNumber,
+ oneway void retrieveNotification(String callingPackage, String cardId, int seqNumber,
in IRetrieveNotificationCallback callback);
- oneway void removeNotificationFromList(String callingPackage, int seqNumber,
+ oneway void removeNotificationFromList(String callingPackage, String cardId, int seqNumber,
in IRemoveNotificationFromListCallback callback);
}
diff --git a/telephony/java/com/android/internal/telephony/uicc/IccUtils.java b/telephony/java/com/android/internal/telephony/uicc/IccUtils.java
index 9f8b3a8..c095438 100644
--- a/telephony/java/com/android/internal/telephony/uicc/IccUtils.java
+++ b/telephony/java/com/android/internal/telephony/uicc/IccUtils.java
@@ -837,6 +837,13 @@
}
/**
+ * Strip all the trailing 'F' characters of a string, e.g., an ICCID.
+ */
+ public static String stripTrailingFs(String s) {
+ return s == null ? null : s.replaceAll("(?i)f*$", "");
+ }
+
+ /**
* Converts a character of [0-9a-aA-F] to its hex value in a byte. If the character is not a
* hex number, 0 will be returned.
*/
diff --git a/test-mock/Android.mk b/test-mock/Android.mk
index 7926a77..5c586c7 100644
--- a/test-mock/Android.mk
+++ b/test-mock/Android.mk
@@ -31,7 +31,7 @@
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(android_test_mock_source_files)
-LOCAL_JAVA_LIBRARIES := core-oj core-libart framework
+LOCAL_JAVA_LIBRARIES := core-oj core-libart framework conscrypt okhttp bouncycastle
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/src/android/test/mock
@@ -116,7 +116,7 @@
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(android_test_mock_source_files)
-LOCAL_JAVA_LIBRARIES := core-oj core-libart framework
+LOCAL_JAVA_LIBRARIES := core-oj core-libart framework conscrypt okhttp bouncycastle
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/src/android/test/mock
diff --git a/test-runner/Android.mk b/test-runner/Android.mk
index f5c2bc6..229a6ac 100644
--- a/test-runner/Android.mk
+++ b/test-runner/Android.mk
@@ -132,5 +132,8 @@
include $(BUILD_STATIC_JAVA_LIBRARY)
+# Archive a copy of the classes.jar in SDK build.
+$(call dist-for-goals,sdk win_sdk,$(full_classes_jar):android.test.legacy.jar)
+
# additionally, build unit tests in a separate .apk
include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/libs-permissions/Android.mk b/tests/libs-permissions/Android.mk
new file mode 100644
index 0000000..eb38623
--- /dev/null
+++ b/tests/libs-permissions/Android.mk
@@ -0,0 +1,15 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := com.android.test.libs.product
+LOCAL_PRODUCT_MODULE := true
+LOCAL_SRC_FILES := $(call all-java-files-under, product/java)
+LOCAL_REQUIRED_MODULES := com.android.test.libs.product.xml
+include $(BUILD_JAVA_LIBRARY)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := com.android.test.libs.product.xml
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/permissions
+LOCAL_SRC_FILES:= product/com.android.test.libs.product.xml
+include $(BUILD_PREBUILT)
diff --git a/tests/libs-permissions/product/com.android.test.libs.product.xml b/tests/libs-permissions/product/com.android.test.libs.product.xml
new file mode 100644
index 0000000..0a955e9
--- /dev/null
+++ b/tests/libs-permissions/product/com.android.test.libs.product.xml
@@ -0,0 +1,20 @@
+<?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.
+-->
+
+<permissions>
+ <library name="com.android.test.libs.product"
+ file="/product/framework/com.android.test.libs.product.jar" />
+</permissions>
diff --git a/tests/libs-permissions/product/java/com/android/test/libs/product/LibsProductTest.java b/tests/libs-permissions/product/java/com/android/test/libs/product/LibsProductTest.java
new file mode 100644
index 0000000..f49b46e
--- /dev/null
+++ b/tests/libs-permissions/product/java/com/android/test/libs/product/LibsProductTest.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;
+
+/**
+ * Test class for product libs.
+ */
+public class LibsProductTest {
+
+ /**
+ * Dummpy method for testing.
+ */
+ public static void test() {
+ }
+}
diff --git a/tests/net/Android.mk b/tests/net/Android.mk
index 994f3cc..9130e7d 100644
--- a/tests/net/Android.mk
+++ b/tests/net/Android.mk
@@ -39,6 +39,7 @@
libc++ \
libcrypto \
libcutils \
+ libdexfile \
libframeworksnettestsjni \
libhidl-gen-utils \
libhidlbase \
diff --git a/tests/net/java/android/net/NetworkCapabilitiesTest.java b/tests/net/java/android/net/NetworkCapabilitiesTest.java
index cd2d098..2e1519b 100644
--- a/tests/net/java/android/net/NetworkCapabilitiesTest.java
+++ b/tests/net/java/android/net/NetworkCapabilitiesTest.java
@@ -33,12 +33,15 @@
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
+import android.os.Parcel;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
+import android.util.ArraySet;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.util.Set;
@RunWith(AndroidJUnit4.class)
@SmallTest
@@ -180,4 +183,84 @@
assertEquals(20, NetworkCapabilities
.maxBandwidth(10, 20));
}
+
+ @Test
+ public void testSetUids() {
+ final NetworkCapabilities netCap = new NetworkCapabilities();
+ final Set<UidRange> uids = new ArraySet<>();
+ uids.add(new UidRange(50, 100));
+ uids.add(new UidRange(3000, 4000));
+ netCap.setUids(uids);
+ assertTrue(netCap.appliesToUid(50));
+ assertTrue(netCap.appliesToUid(80));
+ assertTrue(netCap.appliesToUid(100));
+ assertTrue(netCap.appliesToUid(3000));
+ assertTrue(netCap.appliesToUid(3001));
+ assertFalse(netCap.appliesToUid(10));
+ assertFalse(netCap.appliesToUid(25));
+ assertFalse(netCap.appliesToUid(49));
+ assertFalse(netCap.appliesToUid(101));
+ assertFalse(netCap.appliesToUid(2000));
+ assertFalse(netCap.appliesToUid(100000));
+
+ assertTrue(netCap.appliesToUidRange(new UidRange(50, 100)));
+ assertTrue(netCap.appliesToUidRange(new UidRange(70, 72)));
+ assertTrue(netCap.appliesToUidRange(new UidRange(3500, 3912)));
+ assertFalse(netCap.appliesToUidRange(new UidRange(1, 100)));
+ assertFalse(netCap.appliesToUidRange(new UidRange(49, 100)));
+ assertFalse(netCap.appliesToUidRange(new UidRange(1, 10)));
+ assertFalse(netCap.appliesToUidRange(new UidRange(60, 101)));
+ assertFalse(netCap.appliesToUidRange(new UidRange(60, 3400)));
+
+ NetworkCapabilities netCap2 = new NetworkCapabilities();
+ assertFalse(netCap2.satisfiedByUids(netCap));
+ assertFalse(netCap2.equalsUids(netCap));
+ netCap2.setUids(uids);
+ assertTrue(netCap2.satisfiedByUids(netCap));
+ assertTrue(netCap.equalsUids(netCap2));
+ assertTrue(netCap2.equalsUids(netCap));
+
+ uids.add(new UidRange(600, 700));
+ netCap2.setUids(uids);
+ assertFalse(netCap2.satisfiedByUids(netCap));
+ assertFalse(netCap.appliesToUid(650));
+ assertTrue(netCap2.appliesToUid(650));
+ netCap.combineCapabilities(netCap2);
+ assertTrue(netCap2.satisfiedByUids(netCap));
+ assertTrue(netCap.appliesToUid(650));
+ assertFalse(netCap.appliesToUid(500));
+
+ assertFalse(new NetworkCapabilities().satisfiedByUids(netCap));
+ netCap.combineCapabilities(new NetworkCapabilities());
+ assertTrue(netCap.appliesToUid(500));
+ assertTrue(netCap.appliesToUidRange(new UidRange(1, 100000)));
+ assertFalse(netCap2.appliesToUid(500));
+ assertFalse(netCap2.appliesToUidRange(new UidRange(1, 100000)));
+ assertTrue(new NetworkCapabilities().satisfiedByUids(netCap));
+ }
+
+ @Test
+ public void testParcelNetworkCapabilities() {
+ final Set<UidRange> uids = new ArraySet<>();
+ uids.add(new UidRange(50, 100));
+ uids.add(new UidRange(3000, 4000));
+ final NetworkCapabilities netCap = new NetworkCapabilities()
+ .addCapability(NET_CAPABILITY_INTERNET)
+ .setUids(uids)
+ .addCapability(NET_CAPABILITY_EIMS)
+ .addCapability(NET_CAPABILITY_NOT_METERED);
+ assertEqualsThroughMarshalling(netCap);
+ }
+
+ private void assertEqualsThroughMarshalling(NetworkCapabilities netCap) {
+ Parcel p = Parcel.obtain();
+ netCap.writeToParcel(p, /* flags */ 0);
+ p.setDataPosition(0);
+ byte[] marshalledData = p.marshall();
+
+ p = Parcel.obtain();
+ p.unmarshall(marshalledData, 0, marshalledData.length);
+ p.setDataPosition(0);
+ assertEquals(NetworkCapabilities.CREATOR.createFromParcel(p), netCap);
+ }
}
diff --git a/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java b/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java
index 56b8e60..b14f550 100644
--- a/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java
+++ b/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java
@@ -67,7 +67,7 @@
IoUtils.deleteContents(mTestProc);
}
- mFactory = new NetworkStatsFactory(mTestProc);
+ mFactory = new NetworkStatsFactory(mTestProc, false);
}
@After
@@ -116,6 +116,20 @@
}
@Test
+ public void testNetworkStatsSummary() throws Exception {
+ stageFile(R.raw.net_dev_typical, file("net/dev"));
+
+ final NetworkStats stats = mFactory.readNetworkStatsIfaceDev();
+ assertEquals(6, stats.size());
+ assertStatsEntry(stats, "lo", UID_ALL, SET_ALL, TAG_NONE, 8308L, 8308L);
+ assertStatsEntry(stats, "rmnet0", UID_ALL, SET_ALL, TAG_NONE, 1507570L, 489339L);
+ assertStatsEntry(stats, "ifb0", UID_ALL, SET_ALL, TAG_NONE, 52454L, 0L);
+ assertStatsEntry(stats, "ifb1", UID_ALL, SET_ALL, TAG_NONE, 52454L, 0L);
+ assertStatsEntry(stats, "sit0", UID_ALL, SET_ALL, TAG_NONE, 0L, 0L);
+ assertStatsEntry(stats, "ip6tnl0", UID_ALL, SET_ALL, TAG_NONE, 0L, 0L);
+ }
+
+ @Test
public void testNetworkStatsSingle() throws Exception {
stageFile(R.raw.xt_qtaguid_iface_typical, file("net/xt_qtaguid/iface_stat_all"));
diff --git a/tests/net/java/com/android/server/ConnectivityServiceTest.java b/tests/net/java/com/android/server/ConnectivityServiceTest.java
index 70cacb3..6e643a3 100644
--- a/tests/net/java/com/android/server/ConnectivityServiceTest.java
+++ b/tests/net/java/com/android/server/ConnectivityServiceTest.java
@@ -44,6 +44,7 @@
import static android.net.NetworkCapabilities.NET_CAPABILITY_XCAP;
import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
import static android.net.NetworkCapabilities.TRANSPORT_ETHERNET;
+import static android.net.NetworkCapabilities.TRANSPORT_VPN;
import static android.net.NetworkCapabilities.TRANSPORT_WIFI;
import static android.net.NetworkCapabilities.TRANSPORT_WIFI_AWARE;
@@ -101,6 +102,7 @@
import android.net.NetworkUtils;
import android.net.RouteInfo;
import android.net.StringNetworkSpecifier;
+import android.net.UidRange;
import android.net.metrics.IpConnectivityLog;
import android.net.util.MultinetworkPolicyTracker;
import android.os.ConditionVariable;
@@ -126,11 +128,13 @@
import com.android.internal.util.WakeupMessage;
import com.android.internal.util.test.BroadcastInterceptingContext;
import com.android.internal.util.test.FakeSettingsProvider;
+import com.android.server.connectivity.ConnectivityConstants;
import com.android.server.connectivity.DefaultNetworkMetrics;
import com.android.server.connectivity.IpConnectivityMetrics;
import com.android.server.connectivity.MockableSystemProperties;
import com.android.server.connectivity.NetworkAgentInfo;
import com.android.server.connectivity.NetworkMonitor;
+import com.android.server.connectivity.Vpn;
import com.android.server.net.NetworkPinner;
import com.android.server.net.NetworkPolicyManagerInternal;
@@ -360,7 +364,7 @@
MockNetworkAgent(int transport, LinkProperties linkProperties) {
final int type = transportToLegacyType(transport);
- final String typeName = ConnectivityManager.getNetworkTypeName(type);
+ final String typeName = ConnectivityManager.getNetworkTypeName(transport);
mNetworkInfo = new NetworkInfo(type, 0, typeName, "Mock");
mNetworkCapabilities = new NetworkCapabilities();
mNetworkCapabilities.addTransportType(transport);
@@ -377,6 +381,9 @@
case TRANSPORT_WIFI_AWARE:
mScore = 20;
break;
+ case TRANSPORT_VPN:
+ mScore = ConnectivityConstants.VPN_DEFAULT_SCORE;
+ break;
default:
throw new UnsupportedOperationException("unimplemented network type");
}
@@ -438,6 +445,11 @@
mNetworkAgent.sendNetworkCapabilities(mNetworkCapabilities);
}
+ public void setUids(Set<UidRange> uids) {
+ mNetworkCapabilities.setUids(uids);
+ mNetworkAgent.sendNetworkCapabilities(mNetworkCapabilities);
+ }
+
public void setSignalStrength(int signalStrength) {
mNetworkCapabilities.setSignalStrength(signalStrength);
mNetworkAgent.sendNetworkCapabilities(mNetworkCapabilities);
@@ -1463,6 +1475,11 @@
return nc;
}
+ void expectCapabilitiesLike(Predicate<NetworkCapabilities> fn, MockNetworkAgent agent) {
+ CallbackInfo cbi = expectCallback(CallbackState.NETWORK_CAPABILITIES, agent);
+ assertTrue(fn.test((NetworkCapabilities) cbi.arg));
+ }
+
void assertNoCallback() {
waitForIdle();
CallbackInfo c = mCallbacks.peek();
@@ -3625,4 +3642,76 @@
return;
}
}
+
+ @Test
+ public void testVpnNetworkActive() {
+ final int uid = Process.myUid();
+
+ final TestNetworkCallback genericNetworkCallback = new TestNetworkCallback();
+ final TestNetworkCallback wifiNetworkCallback = new TestNetworkCallback();
+ final TestNetworkCallback vpnNetworkCallback = new TestNetworkCallback();
+ final NetworkRequest genericRequest = new NetworkRequest.Builder().build();
+ final NetworkRequest wifiRequest = new NetworkRequest.Builder()
+ .addTransportType(TRANSPORT_WIFI).build();
+ final NetworkRequest vpnNetworkRequest = new NetworkRequest.Builder()
+ .addTransportType(TRANSPORT_VPN).build();
+ mCm.registerNetworkCallback(genericRequest, genericNetworkCallback);
+ mCm.registerNetworkCallback(wifiRequest, wifiNetworkCallback);
+ mCm.registerNetworkCallback(vpnNetworkRequest, vpnNetworkCallback);
+
+ mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
+ mWiFiNetworkAgent.connect(false);
+
+ genericNetworkCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
+ wifiNetworkCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
+ vpnNetworkCallback.assertNoCallback();
+
+ // TODO : check callbacks agree with the return value of mCm.getActiveNetwork().
+ // Right now this is not possible because establish() is not adequately instrumented
+ // in this test.
+
+ final MockNetworkAgent vpnNetworkAgent = new MockNetworkAgent(TRANSPORT_VPN);
+ final ArraySet<UidRange> ranges = new ArraySet<>();
+ ranges.add(new UidRange(uid, uid));
+ vpnNetworkAgent.setUids(ranges);
+ vpnNetworkAgent.connect(false);
+
+ genericNetworkCallback.expectAvailableCallbacksUnvalidated(vpnNetworkAgent);
+ wifiNetworkCallback.assertNoCallback();
+ vpnNetworkCallback.expectAvailableCallbacksUnvalidated(vpnNetworkAgent);
+
+ genericNetworkCallback.expectCallback(CallbackState.NETWORK_CAPABILITIES, vpnNetworkAgent);
+ vpnNetworkCallback.expectCapabilitiesLike(
+ nc -> nc.appliesToUid(uid) && !nc.appliesToUid(uid + 1), vpnNetworkAgent);
+
+ ranges.clear();
+ vpnNetworkAgent.setUids(ranges);
+
+ genericNetworkCallback.expectCallback(CallbackState.LOST, vpnNetworkAgent);
+ wifiNetworkCallback.assertNoCallback();
+ vpnNetworkCallback.expectCallback(CallbackState.LOST, vpnNetworkAgent);
+
+ ranges.add(new UidRange(uid, uid));
+ vpnNetworkAgent.setUids(ranges);
+
+ genericNetworkCallback.expectAvailableCallbacksValidated(vpnNetworkAgent);
+ wifiNetworkCallback.assertNoCallback();
+ vpnNetworkCallback.expectAvailableCallbacksValidated(vpnNetworkAgent);
+
+ mWiFiNetworkAgent.disconnect();
+
+ genericNetworkCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+ wifiNetworkCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
+ vpnNetworkCallback.assertNoCallback();
+
+ vpnNetworkAgent.disconnect();
+
+ genericNetworkCallback.expectCallback(CallbackState.LOST, vpnNetworkAgent);
+ wifiNetworkCallback.assertNoCallback();
+ vpnNetworkCallback.expectCallback(CallbackState.LOST, vpnNetworkAgent);
+
+ mCm.unregisterNetworkCallback(genericNetworkCallback);
+ mCm.unregisterNetworkCallback(wifiNetworkCallback);
+ mCm.unregisterNetworkCallback(vpnNetworkCallback);
+ }
}
diff --git a/tests/net/java/com/android/server/IpSecServiceParameterizedTest.java b/tests/net/java/com/android/server/IpSecServiceParameterizedTest.java
index 1618e07..66e0955 100644
--- a/tests/net/java/com/android/server/IpSecServiceParameterizedTest.java
+++ b/tests/net/java/com/android/server/IpSecServiceParameterizedTest.java
@@ -19,7 +19,6 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyLong;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
@@ -136,7 +135,12 @@
verify(mMockNetd)
.ipSecDeleteSecurityAssociation(
- eq(spiResp.resourceId), anyString(), anyString(), eq(TEST_SPI));
+ eq(spiResp.resourceId),
+ anyString(),
+ anyString(),
+ eq(TEST_SPI),
+ anyInt(),
+ anyInt());
// Verify quota and RefcountedResource objects cleaned up
IpSecService.UserRecord userRecord =
@@ -168,7 +172,12 @@
verify(mMockNetd)
.ipSecDeleteSecurityAssociation(
- eq(spiResp.resourceId), anyString(), anyString(), eq(TEST_SPI));
+ eq(spiResp.resourceId),
+ anyString(),
+ anyString(),
+ eq(TEST_SPI),
+ anyInt(),
+ anyInt());
// Verify quota and RefcountedResource objects cleaned up
assertEquals(0, userRecord.mSpiQuotaTracker.mCurrent);
@@ -219,8 +228,10 @@
anyInt(),
anyString(),
anyString(),
- anyLong(),
+ anyInt(),
eq(TEST_SPI),
+ anyInt(),
+ anyInt(),
eq(IpSecAlgorithm.AUTH_HMAC_SHA256),
eq(AUTH_KEY),
anyInt(),
@@ -252,8 +263,10 @@
anyInt(),
anyString(),
anyString(),
- anyLong(),
+ anyInt(),
eq(TEST_SPI),
+ anyInt(),
+ anyInt(),
eq(""),
eq(new byte[] {}),
eq(0),
@@ -305,7 +318,12 @@
verify(mMockNetd)
.ipSecDeleteSecurityAssociation(
- eq(createTransformResp.resourceId), anyString(), anyString(), eq(TEST_SPI));
+ eq(createTransformResp.resourceId),
+ anyString(),
+ anyString(),
+ eq(TEST_SPI),
+ anyInt(),
+ anyInt());
// Verify quota and RefcountedResource objects cleaned up
IpSecService.UserRecord userRecord =
@@ -339,7 +357,12 @@
verify(mMockNetd)
.ipSecDeleteSecurityAssociation(
- eq(createTransformResp.resourceId), anyString(), anyString(), eq(TEST_SPI));
+ eq(createTransformResp.resourceId),
+ anyString(),
+ anyString(),
+ eq(TEST_SPI),
+ anyInt(),
+ anyInt());
// Verify quota and RefcountedResource objects cleaned up
assertEquals(0, userRecord.mTransformQuotaTracker.mCurrent);
diff --git a/tests/net/java/com/android/server/IpSecServiceTest.java b/tests/net/java/com/android/server/IpSecServiceTest.java
index a375b60..2c94a60 100644
--- a/tests/net/java/com/android/server/IpSecServiceTest.java
+++ b/tests/net/java/com/android/server/IpSecServiceTest.java
@@ -635,4 +635,25 @@
verify(mMockNetd).ipSecSetEncapSocketOwner(argThat(fdMatcher), eq(Os.getuid()));
mIpSecService.closeUdpEncapsulationSocket(udpEncapResp.resourceId);
}
+
+ @Test
+ public void testReserveNetId() {
+ int start = mIpSecService.TUN_INTF_NETID_START;
+ for (int i = 0; i < mIpSecService.TUN_INTF_NETID_RANGE; i++) {
+ assertEquals(start + i, mIpSecService.reserveNetId());
+ }
+
+ // Check that resource exhaustion triggers an exception
+ try {
+ mIpSecService.reserveNetId();
+ fail("Did not throw error for all netIds reserved");
+ } catch (IllegalStateException expected) {
+ }
+
+ // Now release one and try again
+ int releasedNetId =
+ mIpSecService.TUN_INTF_NETID_START + mIpSecService.TUN_INTF_NETID_RANGE / 2;
+ mIpSecService.releaseNetId(releasedNetId);
+ assertEquals(releasedNetId, mIpSecService.reserveNetId());
+ }
}
diff --git a/tests/net/java/com/android/server/NetworkManagementServiceTest.java b/tests/net/java/com/android/server/NetworkManagementServiceTest.java
index 2ac73db..56a075b 100644
--- a/tests/net/java/com/android/server/NetworkManagementServiceTest.java
+++ b/tests/net/java/com/android/server/NetworkManagementServiceTest.java
@@ -99,8 +99,12 @@
@After
public void tearDown() throws Exception {
- if (mSocket != null) mSocket.close();
- if (mServerSocket != null) mServerSocket.close();
+ mNMService.shutdown();
+ // Once NetworkManagementService#shutdown() actually does something and shutdowns
+ // the underlying NativeDaemonConnector, the block below should be uncommented.
+ // if (mOutputStream != null) mOutputStream.close();
+ // if (mSocket != null) mSocket.close();
+ // if (mServerSocket != null) mServerSocket.close();
}
/**
diff --git a/tests/net/java/com/android/server/connectivity/IpConnectivityMetricsTest.java b/tests/net/java/com/android/server/connectivity/IpConnectivityMetricsTest.java
index 9f2cb92..8359fe2 100644
--- a/tests/net/java/com/android/server/connectivity/IpConnectivityMetricsTest.java
+++ b/tests/net/java/com/android/server/connectivity/IpConnectivityMetricsTest.java
@@ -66,7 +66,6 @@
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -175,7 +174,6 @@
}
@Test
- @Ignore
public void testDefaultNetworkEvents() throws Exception {
final long cell = BitUtils.packBits(new int[]{NetworkCapabilities.TRANSPORT_CELLULAR});
final long wifi = BitUtils.packBits(new int[]{NetworkCapabilities.TRANSPORT_WIFI});
@@ -294,7 +292,6 @@
}
@Test
- @Ignore
public void testEndToEndLogging() throws Exception {
// TODO: instead of comparing textpb to textpb, parse textpb and compare proto to proto.
IpConnectivityLog logger = new IpConnectivityLog(mService.impl);
@@ -635,6 +632,7 @@
when(nai.getCurrentScore()).thenReturn(score);
nai.linkProperties = new LinkProperties();
nai.networkCapabilities = new NetworkCapabilities();
+ nai.lastValidated = true;
for (int t : BitUtils.unpackBits(transports)) {
nai.networkCapabilities.addTransportType(t);
}
diff --git a/tests/net/res/raw/net_dev_typical b/tests/net/res/raw/net_dev_typical
new file mode 100644
index 0000000..290bf03
--- /dev/null
+++ b/tests/net/res/raw/net_dev_typical
@@ -0,0 +1,8 @@
+Inter-| Receive | Transmit
+ face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
+ lo: 8308 116 0 0 0 0 0 0 8308 116 0 0 0 0 0 0
+rmnet0: 1507570 2205 0 0 0 0 0 0 489339 2237 0 0 0 0 0 0
+ ifb0: 52454 151 0 151 0 0 0 0 0 0 0 0 0 0 0 0
+ ifb1: 52454 151 0 151 0 0 0 0 0 0 0 0 0 0 0 0
+ sit0: 0 0 0 0 0 0 0 0 0 0 148 0 0 0 0 0
+ip6tnl0: 0 0 0 0 0 0 0 0 0 0 151 151 0 0 0 0
diff --git a/tests/notification/Android.mk b/tests/notification/Android.mk
index 0669553..255e6e7 100644
--- a/tests/notification/Android.mk
+++ b/tests/notification/Android.mk
@@ -7,7 +7,7 @@
# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_JAVA_LIBRARIES := android.test.runner
+LOCAL_JAVA_LIBRARIES := android.test.runner.stubs
LOCAL_PACKAGE_NAME := NotificationTests
LOCAL_SDK_VERSION := 21
diff --git a/tests/privapp-permissions/Android.mk b/tests/privapp-permissions/Android.mk
index b001c8c..3c80ad8 100644
--- a/tests/privapp-permissions/Android.mk
+++ b/tests/privapp-permissions/Android.mk
@@ -29,3 +29,17 @@
LOCAL_SRC_FILES:= vendor/privapp-permissions-test.xml
include $(BUILD_PREBUILT)
+include $(CLEAR_VARS)
+LOCAL_PACKAGE_NAME := ProductPrivAppPermissionTest
+LOCAL_PRIVILEGED_MODULE := true
+LOCAL_MANIFEST_FILE := product/AndroidManifest.xml
+LOCAL_PRODUCT_MODULE := true
+LOCAL_REQUIRED_MODULES := productprivapp-permissions-test.xml
+include $(BUILD_PACKAGE)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := productprivapp-permissions-test.xml
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/permissions
+LOCAL_SRC_FILES:= product/privapp-permissions-test.xml
+include $(BUILD_PREBUILT)
diff --git a/tests/privapp-permissions/product/AndroidManifest.xml b/tests/privapp-permissions/product/AndroidManifest.xml
new file mode 100644
index 0000000..3d9415c
--- /dev/null
+++ b/tests/privapp-permissions/product/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">
+
+ <!-- MANAGE_USB is signature|privileged -->
+ <uses-permission android:name="android.permission.MANAGE_USB"/>
+</manifest>
diff --git a/tests/privapp-permissions/product/privapp-permissions-test.xml b/tests/privapp-permissions/product/privapp-permissions-test.xml
new file mode 100644
index 0000000..f298f9d
--- /dev/null
+++ b/tests/privapp-permissions/product/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">
+ <permission name="android.permission.MANAGE_USB"/>
+ </privapp-permissions>
+</permissions>
diff --git a/tools/incident_report/main.cpp b/tools/incident_report/main.cpp
index bd1b973..302d739 100644
--- a/tools/incident_report/main.cpp
+++ b/tools/incident_report/main.cpp
@@ -452,9 +452,10 @@
bool adbIncidentWorkaround = true;
pid_t childPid = -1;
vector<string> sections;
+ const char* privacy = NULL;
int opt;
- while ((opt = getopt(argc, argv, "bhi:o:s:tw")) != -1) {
+ while ((opt = getopt(argc, argv, "bhi:o:s:twp:")) != -1) {
switch (opt) {
case 'b':
outputFormat = OUTPUT_PROTO;
@@ -477,6 +478,9 @@
case 'w':
adbIncidentWorkaround = false;
break;
+ case 'p':
+ privacy = optarg;
+ break;
default:
usage(stderr);
return 1;
@@ -526,7 +530,7 @@
}
// TODO: This is what the real implementation will be...
- char const** args = (char const**)malloc(sizeof(char*) * (6 + sections.size()));
+ char const** args = (char const**)malloc(sizeof(char*) * (8 + sections.size()));
int argpos = 0;
args[argpos++] = "adb";
if (adbSerial != NULL) {
@@ -535,6 +539,10 @@
}
args[argpos++] = "shell";
args[argpos++] = "incident";
+ if (privacy != NULL) {
+ args[argpos++] = "-p";
+ args[argpos++] = privacy;
+ }
for (vector<string>::const_iterator it=sections.begin(); it!=sections.end(); it++) {
args[argpos++] = it->c_str();
}
diff --git a/tools/locked_region_code_injection/src/lockedregioncodeinjection/LockFindingClassVisitor.java b/tools/locked_region_code_injection/src/lockedregioncodeinjection/LockFindingClassVisitor.java
index ee0e36c..81a0773 100644
--- a/tools/locked_region_code_injection/src/lockedregioncodeinjection/LockFindingClassVisitor.java
+++ b/tools/locked_region_code_injection/src/lockedregioncodeinjection/LockFindingClassVisitor.java
@@ -18,7 +18,6 @@
import java.util.LinkedList;
import java.util.List;
import org.objectweb.asm.ClassVisitor;
-import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.commons.TryCatchBlockSorter;
@@ -101,7 +100,7 @@
try {
a.analyze(owner, mn);
} catch (AnalyzerException e) {
- e.printStackTrace();
+ throw new RuntimeException("Locked region code injection: " + e.getMessage(), e);
}
InsnList instructions = mn.instructions;
diff --git a/tools/stats_log_api_gen/main.cpp b/tools/stats_log_api_gen/main.cpp
index e0e6b58..3dbb503 100644
--- a/tools/stats_log_api_gen/main.cpp
+++ b/tools/stats_log_api_gen/main.cpp
@@ -317,6 +317,7 @@
fprintf(out, "\n");
fprintf(out, "#include <stdint.h>\n");
fprintf(out, "#include <vector>\n");
+ fprintf(out, "#include <set>\n");
fprintf(out, "\n");
fprintf(out, "namespace android {\n");
@@ -361,6 +362,36 @@
fprintf(out, "};\n");
fprintf(out, "\n");
+ fprintf(out, "const static std::set<int> kAtomsWithUidField = {\n");
+ for (set<AtomDecl>::const_iterator atom = atoms.decls.begin();
+ atom != atoms.decls.end(); atom++) {
+ for (vector<AtomField>::const_iterator field = atom->fields.begin();
+ field != atom->fields.end(); field++) {
+ if (field->name == "uid") {
+ string constant = make_constant_name(atom->name);
+ fprintf(out, " %s,\n", constant.c_str());
+ break;
+ }
+ }
+ }
+ fprintf(out, "};\n");
+ fprintf(out, "\n");
+
+ fprintf(out, "const static std::set<int> kAtomsWithAttributionChain = {\n");
+ for (set<AtomDecl>::const_iterator atom = atoms.decls.begin();
+ atom != atoms.decls.end(); atom++) {
+ for (vector<AtomField>::const_iterator field = atom->fields.begin();
+ field != atom->fields.end(); field++) {
+ if (field->javaType == JAVA_TYPE_ATTRIBUTION_CHAIN) {
+ string constant = make_constant_name(atom->name);
+ fprintf(out, " %s,\n", constant.c_str());
+ break;
+ }
+ }
+ }
+ fprintf(out, "};\n");
+ fprintf(out, "\n");
+
fprintf(out, "const static int kMaxPushedAtomId = %d;\n\n", maxPushedAtomId);
// Print write methods
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl
index e9e61a5..309bc80 100644
--- a/wifi/java/android/net/wifi/IWifiManager.aidl
+++ b/wifi/java/android/net/wifi/IWifiManager.aidl
@@ -66,11 +66,11 @@
List<OsuProvider> getMatchingOsuProviders(in ScanResult scanResult);
- int addOrUpdateNetwork(in WifiConfiguration config);
+ int addOrUpdateNetwork(in WifiConfiguration config, String packageName);
- boolean addOrUpdatePasspointConfiguration(in PasspointConfiguration config);
+ boolean addOrUpdatePasspointConfiguration(in PasspointConfiguration config, String packageName);
- boolean removePasspointConfiguration(in String fqdn);
+ boolean removePasspointConfiguration(in String fqdn, String packageName);
List<PasspointConfiguration> getPasspointConfigurations();
@@ -80,21 +80,21 @@
void deauthenticateNetwork(long holdoff, boolean ess);
- boolean removeNetwork(int netId);
+ boolean removeNetwork(int netId, String packageName);
- boolean enableNetwork(int netId, boolean disableOthers);
+ boolean enableNetwork(int netId, boolean disableOthers, String packageName);
- boolean disableNetwork(int netId);
+ boolean disableNetwork(int netId, String packageName);
- void startScan(in ScanSettings requested, in WorkSource ws, in String packageName);
+ void startScan(in ScanSettings requested, in WorkSource ws, String packageName);
List<ScanResult> getScanResults(String callingPackage);
- void disconnect();
+ void disconnect(String packageName);
- void reconnect();
+ void reconnect(String packageName);
- void reassociate();
+ void reassociate(String packageName);
WifiInfo getConnectionInfo(String callingPackage);
@@ -108,8 +108,6 @@
boolean isDualBandSupported();
- boolean saveConfiguration();
-
DhcpInfo getDhcpInfo();
boolean isScanAlwaysAvailable();
@@ -134,7 +132,7 @@
boolean stopSoftAp();
- int startLocalOnlyHotspot(in Messenger messenger, in IBinder binder, in String packageName);
+ int startLocalOnlyHotspot(in Messenger messenger, in IBinder binder, String packageName);
void stopLocalOnlyHotspot();
@@ -146,9 +144,9 @@
WifiConfiguration getWifiApConfiguration();
- void setWifiApConfiguration(in WifiConfiguration wifiConfig);
+ void setWifiApConfiguration(in WifiConfiguration wifiConfig, String packageName);
- Messenger getWifiServiceMessenger();
+ Messenger getWifiServiceMessenger(String packageName);
void enableTdls(String remoteIPAddress, boolean enable);
@@ -160,14 +158,11 @@
int getVerboseLoggingLevel();
- void enableAggressiveHandover(int enabled);
- int getAggressiveHandover();
-
void enableWifiConnectivityManager(boolean enabled);
- void disableEphemeralNetwork(String SSID);
+ void disableEphemeralNetwork(String SSID, String packageName);
- void factoryReset();
+ void factoryReset(String packageName);
Network getCurrentNetwork();
diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java
index eaad137..c46789c 100644
--- a/wifi/java/android/net/wifi/ScanResult.java
+++ b/wifi/java/android/net/wifi/ScanResult.java
@@ -294,18 +294,6 @@
}
/**
- * num IP configuration failures
- * @hide
- */
- public int numIpConfigFailures;
-
- /**
- * @hide
- * Last time we blacklisted the ScanResult
- */
- public long blackListTimestamp;
-
- /**
* Status indicating the scan result does not correspond to a user's saved configuration
* @hide
* @removed
@@ -314,12 +302,6 @@
public boolean untrusted;
/**
- * Number of time we connected to it
- * @hide
- */
- public int numConnection;
-
- /**
* Number of time autojoin used it
* @hide
*/
@@ -432,12 +414,6 @@
*/
public List<String> anqpLines;
- /**
- * @hide
- * storing the raw bytes of full result IEs
- **/
- public byte[] bytes;
-
/** information elements from beacon
* @hide
*/
@@ -612,9 +588,7 @@
distanceSdCm = source.distanceSdCm;
seen = source.seen;
untrusted = source.untrusted;
- numConnection = source.numConnection;
numUsage = source.numUsage;
- numIpConfigFailures = source.numIpConfigFailures;
venueName = source.venueName;
operatorFriendlyName = source.operatorFriendlyName;
flags = source.flags;
@@ -697,9 +671,7 @@
dest.writeInt(centerFreq1);
dest.writeLong(seen);
dest.writeInt(untrusted ? 1 : 0);
- dest.writeInt(numConnection);
dest.writeInt(numUsage);
- dest.writeInt(numIpConfigFailures);
dest.writeString((venueName != null) ? venueName.toString() : "");
dest.writeString((operatorFriendlyName != null) ? operatorFriendlyName.toString() : "");
dest.writeLong(this.flags);
@@ -779,9 +751,7 @@
sr.seen = in.readLong();
sr.untrusted = in.readInt() != 0;
- sr.numConnection = in.readInt();
sr.numUsage = in.readInt();
- sr.numIpConfigFailures = in.readInt();
sr.venueName = in.readString();
sr.operatorFriendlyName = in.readString();
sr.flags = in.readLong();
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java
index 2c60118..8d1a00b 100644
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ b/wifi/java/android/net/wifi/WifiConfiguration.java
@@ -20,6 +20,7 @@
import android.content.pm.PackageManager;
import android.net.IpConfiguration;
import android.net.IpConfiguration.ProxySettings;
+import android.net.MacAddress;
import android.net.ProxyInfo;
import android.net.StaticIpConfiguration;
import android.net.Uri;
@@ -54,8 +55,10 @@
/** {@hide} */
public static final String pskVarName = "psk";
/** {@hide} */
+ @Deprecated
public static final String[] wepKeyVarNames = { "wep_key0", "wep_key1", "wep_key2", "wep_key3" };
/** {@hide} */
+ @Deprecated
public static final String wepTxKeyIdxVarName = "wep_tx_keyidx";
/** {@hide} */
public static final String priorityVarName = "priority";
@@ -82,6 +85,9 @@
/** WPA is not used; plaintext or static WEP could be used. */
public static final int NONE = 0;
/** WPA pre-shared key (requires {@code preSharedKey} to be specified). */
+ /** @deprecated Due to security and performance limitations, use of WPA-1 networks
+ * is discouraged. WPA-2 (RSN) should be used instead. */
+ @Deprecated
public static final int WPA_PSK = 1;
/** WPA using EAP authentication. Generally used with an external authentication server. */
public static final int WPA_EAP = 2;
@@ -115,8 +121,8 @@
public static final String varName = "key_mgmt";
- public static final String[] strings = { "NONE", "WPA_PSK", "WPA_EAP", "IEEE8021X",
- "WPA2_PSK", "OSEN", "FT_PSK", "FT_EAP" };
+ public static final String[] strings = { "NONE", /* deprecated */ "WPA_PSK", "WPA_EAP",
+ "IEEE8021X", "WPA2_PSK", "OSEN", "FT_PSK", "FT_EAP" };
}
/**
@@ -125,7 +131,10 @@
public static class Protocol {
private Protocol() { }
- /** WPA/IEEE 802.11i/D3.0 */
+ /** WPA/IEEE 802.11i/D3.0
+ * @deprecated Due to security and performance limitations, use of WPA-1 networks
+ * is discouraged. WPA-2 (RSN) should be used instead. */
+ @Deprecated
public static final int WPA = 0;
/** WPA2/IEEE 802.11i */
public static final int RSN = 1;
@@ -147,7 +156,10 @@
/** Open System authentication (required for WPA/WPA2) */
public static final int OPEN = 0;
- /** Shared Key authentication (requires static WEP keys) */
+ /** Shared Key authentication (requires static WEP keys)
+ * @deprecated Due to security and performance limitations, use of WEP networks
+ * is discouraged. */
+ @Deprecated
public static final int SHARED = 1;
/** LEAP/Network EAP (only used with LEAP) */
public static final int LEAP = 2;
@@ -165,7 +177,10 @@
/** Use only Group keys (deprecated) */
public static final int NONE = 0;
- /** Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] */
+ /** Temporal Key Integrity Protocol [IEEE 802.11i/D7.0]
+ * @deprecated Due to security and performance limitations, use of WPA-1 networks
+ * is discouraged. WPA-2 (RSN) should be used instead. */
+ @Deprecated
public static final int TKIP = 1;
/** AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] */
public static final int CCMP = 2;
@@ -187,9 +202,15 @@
public static class GroupCipher {
private GroupCipher() { }
- /** WEP40 = WEP (Wired Equivalent Privacy) with 40-bit key (original 802.11) */
+ /** WEP40 = WEP (Wired Equivalent Privacy) with 40-bit key (original 802.11)
+ * @deprecated Due to security and performance limitations, use of WEP networks
+ * is discouraged. */
+ @Deprecated
public static final int WEP40 = 0;
- /** WEP104 = WEP (Wired Equivalent Privacy) with 104-bit key */
+ /** WEP104 = WEP (Wired Equivalent Privacy) with 104-bit key
+ * @deprecated Due to security and performance limitations, use of WEP networks
+ * is discouraged. */
+ @Deprecated
public static final int WEP104 = 1;
/** Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] */
public static final int TKIP = 2;
@@ -203,7 +224,8 @@
public static final String varName = "group";
public static final String[] strings =
- { "WEP40", "WEP104", "TKIP", "CCMP", "GTK_NOT_USED" };
+ { /* deprecated */ "WEP40", /* deprecated */ "WEP104",
+ "TKIP", "CCMP", "GTK_NOT_USED" };
}
/** Possible status of a network configuration. */
@@ -309,10 +331,16 @@
* When the value of one of these keys is read, the actual key is
* not returned, just a "*" if the key has a value, or the null
* string otherwise.
+ * @deprecated Due to security and performance limitations, use of WEP networks
+ * is discouraged.
*/
+ @Deprecated
public String[] wepKeys;
- /** Default WEP key index, ranging from 0 to 3. */
+ /** Default WEP key index, ranging from 0 to 3.
+ * @deprecated Due to security and performance limitations, use of WEP networks
+ * is discouraged. */
+ @Deprecated
public int wepTxKeyIndex;
/**
@@ -852,6 +880,52 @@
@SystemApi
public int numAssociation;
+ /**
+ * @hide
+ * Randomized MAC address to use with this particular network
+ */
+ private MacAddress mRandomizedMacAddress;
+
+ /**
+ * @hide
+ * Checks if the given MAC address can be used for Connected Mac Randomization
+ * by verifying that it is non-null, unicast, and locally assigned.
+ * @param mac MacAddress to check
+ * @return true if mac is good to use
+ */
+ private boolean isValidMacAddressForRandomization(MacAddress mac) {
+ return mac != null && !mac.isMulticastAddress() && mac.isLocallyAssigned();
+ }
+
+ /**
+ * @hide
+ * Returns Randomized MAC address to use with the network.
+ * If it is not set/valid, create a new randomized address.
+ */
+ public MacAddress getOrCreateRandomizedMacAddress() {
+ if (!isValidMacAddressForRandomization(mRandomizedMacAddress)) {
+ mRandomizedMacAddress = MacAddress.createRandomUnicastAddress();
+ }
+ return mRandomizedMacAddress;
+ }
+
+ /**
+ * @hide
+ * Returns MAC address set to be the local randomized MAC address.
+ * Does not guarantee that the returned address is valid for use.
+ */
+ public MacAddress getRandomizedMacAddress() {
+ return mRandomizedMacAddress;
+ }
+
+ /**
+ * @hide
+ * @param mac MacAddress to change into
+ */
+ public void setRandomizedMacAddress(MacAddress mac) {
+ mRandomizedMacAddress = mac;
+ }
+
/** @hide
* Boost given to RSSI on a home network for the purpose of calculating the score
* This adds stickiness to home networks, as defined by:
@@ -2124,6 +2198,7 @@
updateTime = source.updateTime;
shared = source.shared;
recentFailure.setAssociationStatus(source.recentFailure.getAssociationStatus());
+ mRandomizedMacAddress = source.mRandomizedMacAddress;
}
}
@@ -2191,6 +2266,7 @@
dest.writeInt(shared ? 1 : 0);
dest.writeString(mPasspointManagementObjectTree);
dest.writeInt(recentFailure.getAssociationStatus());
+ dest.writeParcelable(mRandomizedMacAddress, flags);
}
/** Implement the Parcelable interface {@hide} */
@@ -2259,6 +2335,7 @@
config.shared = in.readInt() != 0;
config.mPasspointManagementObjectTree = in.readString();
config.recentFailure.setAssociationStatus(in.readInt());
+ config.mRandomizedMacAddress = in.readParcelable(null);
return config;
}
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index e4b510d..897b1ea 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -1132,7 +1132,7 @@
*/
private int addOrUpdateNetwork(WifiConfiguration config) {
try {
- return mService.addOrUpdateNetwork(config);
+ return mService.addOrUpdateNetwork(config, mContext.getOpPackageName());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -1153,7 +1153,7 @@
*/
public void addOrUpdatePasspointConfiguration(PasspointConfiguration config) {
try {
- if (!mService.addOrUpdatePasspointConfiguration(config)) {
+ if (!mService.addOrUpdatePasspointConfiguration(config, mContext.getOpPackageName())) {
throw new IllegalArgumentException();
}
} catch (RemoteException e) {
@@ -1170,7 +1170,7 @@
*/
public void removePasspointConfiguration(String fqdn) {
try {
- if (!mService.removePasspointConfiguration(fqdn)) {
+ if (!mService.removePasspointConfiguration(fqdn, mContext.getOpPackageName())) {
throw new IllegalArgumentException();
}
} catch (RemoteException e) {
@@ -1256,7 +1256,7 @@
*/
public boolean removeNetwork(int netId) {
try {
- return mService.removeNetwork(netId);
+ return mService.removeNetwork(netId, mContext.getOpPackageName());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -1302,7 +1302,7 @@
boolean success;
try {
- success = mService.enableNetwork(netId, attemptConnect);
+ success = mService.enableNetwork(netId, attemptConnect, mContext.getOpPackageName());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -1328,7 +1328,7 @@
*/
public boolean disableNetwork(int netId) {
try {
- return mService.disableNetwork(netId);
+ return mService.disableNetwork(netId, mContext.getOpPackageName());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -1341,7 +1341,7 @@
*/
public boolean disconnect() {
try {
- mService.disconnect();
+ mService.disconnect(mContext.getOpPackageName());
return true;
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
@@ -1356,7 +1356,7 @@
*/
public boolean reconnect() {
try {
- mService.reconnect();
+ mService.reconnect(mContext.getOpPackageName());
return true;
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
@@ -1371,7 +1371,7 @@
*/
public boolean reassociate() {
try {
- mService.reassociate();
+ mService.reassociate(mContext.getOpPackageName());
return true;
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
@@ -1620,19 +1620,14 @@
}
/**
- * Creates a configuration token describing the current network of MIME type
- * application/vnd.wfa.wsc. Can be used to configure WiFi networks via NFC.
+ * WPS has been deprecated from Client mode operation.
*
- * @return hex-string encoded configuration token or null if there is no current network
+ * @return null
* @hide
* @deprecated This API is deprecated
*/
public String getCurrentNetworkWpsNfcConfigurationToken() {
- try {
- return mService.getCurrentNetworkWpsNfcConfigurationToken();
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
+ return null;
}
/**
@@ -1693,18 +1688,14 @@
* existing networks. You should assume the network IDs can be different
* after calling this method.
*
- * @return {@code true} if the operation succeeded
+ * @return {@code false} Will always return true.
* @deprecated There is no need to call this method -
* {@link #addNetwork(WifiConfiguration)}, {@link #updateNetwork(WifiConfiguration)}
* and {@link #removeNetwork(int)} already persist the configurations automatically.
*/
@Deprecated
public boolean saveConfiguration() {
- try {
- return mService.saveConfiguration();
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
+ return true;
}
/**
@@ -2136,7 +2127,7 @@
@RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE)
public boolean setWifiApConfiguration(WifiConfiguration wifiConfig) {
try {
- mService.setWifiApConfiguration(wifiConfig);
+ mService.setWifiApConfiguration(wifiConfig, mContext.getOpPackageName());
return true;
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
@@ -2851,36 +2842,6 @@
((ActionListener) listener).onSuccess();
}
break;
- case WifiManager.START_WPS_SUCCEEDED:
- if (listener != null) {
- WpsResult result = (WpsResult) message.obj;
- ((WpsCallback) listener).onStarted(result.pin);
- //Listener needs to stay until completion or failure
- synchronized (mListenerMapLock) {
- mListenerMap.put(message.arg2, listener);
- }
- }
- break;
- case WifiManager.WPS_COMPLETED:
- if (listener != null) {
- ((WpsCallback) listener).onSucceeded();
- }
- break;
- case WifiManager.WPS_FAILED:
- if (listener != null) {
- ((WpsCallback) listener).onFailed(message.arg1);
- }
- break;
- case WifiManager.CANCEL_WPS_SUCCEDED:
- if (listener != null) {
- ((WpsCallback) listener).onSucceeded();
- }
- break;
- case WifiManager.CANCEL_WPS_FAILED:
- if (listener != null) {
- ((WpsCallback) listener).onFailed(message.arg1);
- }
- break;
case WifiManager.RSSI_PKTCNT_FETCH_SUCCEEDED:
if (listener != null) {
RssiPacketCountInfo info = (RssiPacketCountInfo) message.obj;
@@ -3052,36 +3013,39 @@
public void disableEphemeralNetwork(String SSID) {
if (SSID == null) throw new IllegalArgumentException("SSID cannot be null");
try {
- mService.disableEphemeralNetwork(SSID);
+ mService.disableEphemeralNetwork(SSID, mContext.getOpPackageName());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
/**
- * Start Wi-fi Protected Setup
+ * WPS suport has been deprecated from Client mode and this method will immediately trigger
+ * {@link WpsCallback#onFailed(int)} with a generic error.
*
* @param config WPS configuration (does not support {@link WpsInfo#LABEL})
* @param listener for callbacks on success or failure. Can be null.
- * @throws IllegalStateException if the WifiManager instance needs to be
- * initialized again
+ * @throws IllegalStateException if the WifiManager instance needs to be initialized again
* @deprecated This API is deprecated
*/
public void startWps(WpsInfo config, WpsCallback listener) {
- if (config == null) throw new IllegalArgumentException("config cannot be null");
- getChannel().sendMessage(START_WPS, 0, putListener(listener), config);
+ if (listener != null ) {
+ listener.onFailed(ERROR);
+ }
}
/**
- * Cancel any ongoing Wi-fi Protected Setup
+ * WPS support has been deprecated from Client mode and this method will immediately trigger
+ * {@link WpsCallback#onFailed(int)} with a generic error.
*
* @param listener for callbacks on success or failure. Can be null.
- * @throws IllegalStateException if the WifiManager instance needs to be
- * initialized again
+ * @throws IllegalStateException if the WifiManager instance needs to be initialized again
* @deprecated This API is deprecated
*/
public void cancelWps(WpsCallback listener) {
- getChannel().sendMessage(CANCEL_WPS, 0, putListener(listener));
+ if (listener != null) {
+ listener.onFailed(ERROR);
+ }
}
/**
@@ -3093,7 +3057,7 @@
*/
public Messenger getWifiServiceMessenger() {
try {
- return mService.getWifiServiceMessenger();
+ return mService.getWifiServiceMessenger(mContext.getOpPackageName());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -3568,58 +3532,13 @@
}
/**
- * Set wifi Aggressive Handover. Called from developer settings.
- * @hide
- */
- public void enableAggressiveHandover(int enabled) {
- try {
- mService.enableAggressiveHandover(enabled);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
- }
-
- /**
- * Get the WiFi Handover aggressiveness.This is used by settings
- * to decide what to show within the picker.
- * @hide
- */
- public int getAggressiveHandover() {
- try {
- return mService.getAggressiveHandover();
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
- }
-
- /**
- * Deprecated
- * Does nothing
- * @hide
- * @deprecated
- */
- public void setAllowScansWithTraffic(int enabled) {
- return;
- }
-
- /**
- * Deprecated
- * returns value for 'disabled'
- * @hide
- * @deprecated
- */
- public int getAllowScansWithTraffic() {
- return 0;
- }
-
- /**
- * Resets all wifi manager settings back to factory defaults.
+ * Removes all saved wifi networks.
*
* @hide
*/
public void factoryReset() {
try {
- mService.factoryReset();
+ mService.factoryReset(mContext.getOpPackageName());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
diff --git a/wifi/tests/src/android/net/wifi/ParcelUtilTest.java b/wifi/tests/src/android/net/wifi/ParcelUtilTest.java
index 6787594..0c3bf3b 100644
--- a/wifi/tests/src/android/net/wifi/ParcelUtilTest.java
+++ b/wifi/tests/src/android/net/wifi/ParcelUtilTest.java
@@ -22,7 +22,7 @@
import static org.junit.Assert.assertNull;
import android.os.Parcel;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import org.junit.Before;
import org.junit.Test;
diff --git a/wifi/tests/src/android/net/wifi/ScanResultTest.java b/wifi/tests/src/android/net/wifi/ScanResultTest.java
index 689ebba..458c43d 100644
--- a/wifi/tests/src/android/net/wifi/ScanResultTest.java
+++ b/wifi/tests/src/android/net/wifi/ScanResultTest.java
@@ -22,7 +22,7 @@
import static org.mockito.Mockito.validateMockitoUsage;
import android.os.Parcel;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import android.net.wifi.WifiScanner.ScanSettings;
import org.junit.After;
diff --git a/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java b/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java
index 622dce6..e7377c1 100644
--- a/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java
+++ b/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java
@@ -22,6 +22,7 @@
import static org.junit.Assert.assertFalse;
import android.os.Parcel;
+import android.net.MacAddress;
import android.net.wifi.WifiConfiguration.NetworkSelectionStatus;
import org.junit.Before;
@@ -49,6 +50,7 @@
String cookie = "C O.o |<IE";
WifiConfiguration config = new WifiConfiguration();
config.setPasspointManagementObjectTree(cookie);
+ MacAddress macBeforeParcel = config.getOrCreateRandomizedMacAddress();
Parcel parcelW = Parcel.obtain();
config.writeToParcel(parcelW, 0);
byte[] bytes = parcelW.marshall();
@@ -59,8 +61,9 @@
parcelR.setDataPosition(0);
WifiConfiguration reconfig = WifiConfiguration.CREATOR.createFromParcel(parcelR);
- // lacking a useful config.equals, check one field near the end.
+ // lacking a useful config.equals, check two fields near the end.
assertEquals(cookie, reconfig.getMoTree());
+ assertEquals(macBeforeParcel, reconfig.getOrCreateRandomizedMacAddress());
Parcel parcelWW = Parcel.obtain();
reconfig.writeToParcel(parcelWW, 0);
@@ -169,4 +172,48 @@
assertFalse(config.isOpenNetwork());
}
+
+ @Test
+ public void testGetOrCreateRandomizedMacAddress_SavesAndReturnsSameAddress() {
+ WifiConfiguration config = new WifiConfiguration();
+ MacAddress firstMacAddress = config.getOrCreateRandomizedMacAddress();
+ MacAddress secondMacAddress = config.getOrCreateRandomizedMacAddress();
+
+ assertEquals(firstMacAddress, secondMacAddress);
+ }
+
+ @Test
+ public void testSetRandomizedMacAddress_ChangesSavedAddress() {
+ WifiConfiguration config = new WifiConfiguration();
+ MacAddress macToChangeInto = MacAddress.createRandomUnicastAddress();
+ config.setRandomizedMacAddress(macToChangeInto);
+ MacAddress macAfterChange = config.getOrCreateRandomizedMacAddress();
+
+ assertEquals(macToChangeInto, macAfterChange);
+ }
+
+ @Test
+ public void testGetOrCreateRandomizedMacAddress_ReRandomizesInvalidAddress() {
+ WifiConfiguration config = new WifiConfiguration();
+
+ MacAddress macAddressZeroes = MacAddress.ALL_ZEROS_ADDRESS;
+ MacAddress macAddressMulticast = MacAddress.fromString("03:ff:ff:ff:ff:ff");
+ MacAddress macAddressGlobal = MacAddress.fromString("fc:ff:ff:ff:ff:ff");
+
+ config.setRandomizedMacAddress(null);
+ MacAddress macAfterChange = config.getOrCreateRandomizedMacAddress();
+ assertFalse(macAfterChange.equals(null));
+
+ config.setRandomizedMacAddress(macAddressZeroes);
+ macAfterChange = config.getOrCreateRandomizedMacAddress();
+ assertFalse(macAfterChange.equals(macAddressZeroes));
+
+ config.setRandomizedMacAddress(macAddressMulticast);
+ macAfterChange = config.getOrCreateRandomizedMacAddress();
+ assertFalse(macAfterChange.equals(macAddressMulticast));
+
+ config.setRandomizedMacAddress(macAddressGlobal);
+ macAfterChange = config.getOrCreateRandomizedMacAddress();
+ assertFalse(macAfterChange.equals(macAddressGlobal));
+ }
}
diff --git a/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java b/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java
index 1a7dd13..e569efe 100644
--- a/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java
+++ b/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java
@@ -28,7 +28,7 @@
import android.net.wifi.WifiEnterpriseConfig.Phase2;
import android.os.Parcel;
import android.security.Credentials;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import org.junit.Before;
import org.junit.Test;
diff --git a/wifi/tests/src/android/net/wifi/WifiManagerTest.java b/wifi/tests/src/android/net/wifi/WifiManagerTest.java
index 4b5f645..71ca068 100644
--- a/wifi/tests/src/android/net/wifi/WifiManagerTest.java
+++ b/wifi/tests/src/android/net/wifi/WifiManagerTest.java
@@ -35,6 +35,7 @@
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.Mockito.*;
@@ -51,7 +52,7 @@
import android.os.Message;
import android.os.Messenger;
import android.os.test.TestLooper;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import org.junit.Before;
import org.junit.Test;
@@ -950,4 +951,86 @@
doThrow(new SecurityException()).when(mWifiService).setCountryCode(anyString());
mWifiManager.setCountryCode(TEST_COUNTRY_CODE);
}
+
+ /**
+ * Test that calls to get the current WPS config token return null and do not have any
+ * interactions with WifiServiceImpl.
+ */
+ @Test
+ public void testGetCurrentNetworkWpsNfcConfigurationTokenReturnsNull() {
+ assertNull(mWifiManager.getCurrentNetworkWpsNfcConfigurationToken());
+ verifyNoMoreInteractions(mWifiService);
+ }
+
+
+ class WpsCallbackTester extends WifiManager.WpsCallback {
+ public boolean mStarted = false;
+ public boolean mSucceeded = false;
+ public boolean mFailed = false;
+ public int mFailureCode = -1;
+
+ @Override
+ public void onStarted(String pin) {
+ mStarted = true;
+ }
+
+ @Override
+ public void onSucceeded() {
+ mSucceeded = true;
+ }
+
+ @Override
+ public void onFailed(int reason) {
+ mFailed = true;
+ mFailureCode = reason;
+ }
+
+ }
+
+ /**
+ * Verify that a call to start WPS immediately returns a failure.
+ */
+ @Test
+ public void testStartWpsImmediatelyFailsWithCallback() {
+ WpsCallbackTester wpsCallback = new WpsCallbackTester();
+ mWifiManager.startWps(null, wpsCallback);
+ assertTrue(wpsCallback.mFailed);
+ assertEquals(WifiManager.ERROR, wpsCallback.mFailureCode);
+ assertFalse(wpsCallback.mStarted);
+ assertFalse(wpsCallback.mSucceeded);
+ verifyNoMoreInteractions(mWifiService);
+ }
+
+ /**
+ * Verify that a call to start WPS does not go to WifiServiceImpl if we do not have a callback.
+ */
+ @Test
+ public void testStartWpsDoesNotCallWifiServiceImpl() {
+ mWifiManager.startWps(null, null);
+ verifyNoMoreInteractions(mWifiService);
+ }
+
+ /**
+i * Verify that a call to cancel WPS immediately returns a failure.
+ */
+ @Test
+ public void testCancelWpsImmediatelyFailsWithCallback() {
+ WpsCallbackTester wpsCallback = new WpsCallbackTester();
+ mWifiManager.cancelWps(wpsCallback);
+ assertTrue(wpsCallback.mFailed);
+ assertEquals(WifiManager.ERROR, wpsCallback.mFailureCode);
+ assertFalse(wpsCallback.mStarted);
+ assertFalse(wpsCallback.mSucceeded);
+ verifyNoMoreInteractions(mWifiService);
+ }
+
+ /**
+ * Verify that a call to cancel WPS does not go to WifiServiceImpl if we do not have a callback.
+ */
+ @Test
+ public void testCancelWpsDoesNotCallWifiServiceImpl() {
+ mWifiManager.cancelWps(null);
+ verifyNoMoreInteractions(mWifiService);
+ }
+
}
diff --git a/wifi/tests/src/android/net/wifi/WifiScannerTest.java b/wifi/tests/src/android/net/wifi/WifiScannerTest.java
index a4366d4..96d5a51 100644
--- a/wifi/tests/src/android/net/wifi/WifiScannerTest.java
+++ b/wifi/tests/src/android/net/wifi/WifiScannerTest.java
@@ -25,7 +25,7 @@
import android.os.Handler;
import android.os.Parcel;
import android.os.test.TestLooper;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import android.net.wifi.WifiScanner.ScanSettings;
import com.android.internal.util.test.BidirectionalAsyncChannelServer;
diff --git a/wifi/tests/src/android/net/wifi/aware/TlvBufferUtilsTest.java b/wifi/tests/src/android/net/wifi/aware/TlvBufferUtilsTest.java
index 15641ab..6ecd931 100644
--- a/wifi/tests/src/android/net/wifi/aware/TlvBufferUtilsTest.java
+++ b/wifi/tests/src/android/net/wifi/aware/TlvBufferUtilsTest.java
@@ -18,7 +18,7 @@
import static org.hamcrest.core.IsEqual.equalTo;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import org.junit.Rule;
import org.junit.Test;
diff --git a/wifi/tests/src/android/net/wifi/aware/WifiAwareAgentNetworkSpecifierTest.java b/wifi/tests/src/android/net/wifi/aware/WifiAwareAgentNetworkSpecifierTest.java
index 2dd0537..0515e06 100644
--- a/wifi/tests/src/android/net/wifi/aware/WifiAwareAgentNetworkSpecifierTest.java
+++ b/wifi/tests/src/android/net/wifi/aware/WifiAwareAgentNetworkSpecifierTest.java
@@ -20,7 +20,7 @@
import static org.junit.Assert.assertEquals;
import android.os.Parcel;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import org.junit.Rule;
import org.junit.Test;
diff --git a/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java b/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java
index 9cab66a..b0a048d 100644
--- a/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java
+++ b/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java
@@ -31,7 +31,7 @@
import android.os.IBinder;
import android.os.Parcel;
import android.os.test.TestLooper;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import libcore.util.HexEncoding;
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/ConfigParserTest.java b/wifi/tests/src/android/net/wifi/hotspot2/ConfigParserTest.java
index 56bb437..f32fe59 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/ConfigParserTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/ConfigParserTest.java
@@ -22,7 +22,7 @@
import android.net.wifi.FakeKeys;
import android.net.wifi.hotspot2.pps.Credential;
import android.net.wifi.hotspot2.pps.HomeSp;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import java.io.BufferedReader;
import java.io.IOException;
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/OsuProviderTest.java b/wifi/tests/src/android/net/wifi/hotspot2/OsuProviderTest.java
index 9670bfa..d3f91f0 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/OsuProviderTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/OsuProviderTest.java
@@ -23,7 +23,7 @@
import android.net.Uri;
import android.net.wifi.WifiSsid;
import android.os.Parcel;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import org.junit.Test;
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java b/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java
index afcf3e3..940adc8 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java
@@ -25,7 +25,7 @@
import android.net.wifi.hotspot2.pps.Policy;
import android.net.wifi.hotspot2.pps.UpdateParameter;
import android.os.Parcel;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import android.util.Base64;
import org.junit.Test;
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/omadm/PpsMoParserTest.java b/wifi/tests/src/android/net/wifi/hotspot2/omadm/PpsMoParserTest.java
index afa9fd6..707b64f 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/omadm/PpsMoParserTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/omadm/PpsMoParserTest.java
@@ -25,7 +25,7 @@
import android.net.wifi.hotspot2.pps.HomeSp;
import android.net.wifi.hotspot2.pps.Policy;
import android.net.wifi.hotspot2.pps.UpdateParameter;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import android.text.TextUtils;
import org.junit.Test;
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/omadm/XMLParserTest.java b/wifi/tests/src/android/net/wifi/hotspot2/omadm/XMLParserTest.java
index c2dcec6..ef478c7 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/omadm/XMLParserTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/omadm/XMLParserTest.java
@@ -20,7 +20,7 @@
import android.net.wifi.hotspot2.omadm.XMLNode;
import android.net.wifi.hotspot2.omadm.XMLParser;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import org.junit.Before;
import org.junit.Test;
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java b/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java
index 9bfc010..b573adf 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java
@@ -22,7 +22,7 @@
import android.net.wifi.EAPConstants;
import android.net.wifi.FakeKeys;
import android.os.Parcel;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/pps/HomeSpTest.java b/wifi/tests/src/android/net/wifi/hotspot2/pps/HomeSpTest.java
index c41c11f..5c9df6a 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/pps/HomeSpTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/pps/HomeSpTest.java
@@ -20,7 +20,7 @@
import static org.junit.Assert.assertTrue;
import android.os.Parcel;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import org.junit.Test;
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/pps/PolicyTest.java b/wifi/tests/src/android/net/wifi/hotspot2/pps/PolicyTest.java
index 2a36764..171d6ff 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/pps/PolicyTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/pps/PolicyTest.java
@@ -20,7 +20,7 @@
import static org.junit.Assert.assertTrue;
import android.os.Parcel;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import android.util.Base64;
import org.junit.Test;
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/pps/UpdateParameterTest.java b/wifi/tests/src/android/net/wifi/hotspot2/pps/UpdateParameterTest.java
index 551ed43..2a7526b 100644
--- a/wifi/tests/src/android/net/wifi/hotspot2/pps/UpdateParameterTest.java
+++ b/wifi/tests/src/android/net/wifi/hotspot2/pps/UpdateParameterTest.java
@@ -20,7 +20,7 @@
import static org.junit.Assert.assertTrue;
import android.os.Parcel;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.support.test.filters.SmallTest;
import android.util.Base64;
import org.junit.Test;