diff options
327 files changed, 2979 insertions, 1968 deletions
diff --git a/Android.bp b/Android.bp index 6b2883c13b9d..e89aee049174 100644 --- a/Android.bp +++ b/Android.bp @@ -324,6 +324,7 @@ java_library { "android.hardware.radio-V1.2-java", "android.hardware.radio-V1.3-java", "android.hardware.radio-V1.4-java", + "android.hardware.radio-V1.5-java", "android.hardware.thermal-V1.0-java-constants", "android.hardware.thermal-V1.0-java", "android.hardware.thermal-V1.1-java", @@ -771,6 +772,31 @@ cc_library { }, } +filegroup { + name: "incremental_aidl", + srcs: [ + "core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl", + ], + path: "core/java", +} + +aidl_interface { + name: "libincremental_aidl", + srcs: [ + ":incremental_aidl", + ], + backend: { + java: { + sdk_version: "28", + }, + cpp: { + enabled: true, + }, + ndk: { + enabled: true, + }, + }, +} gensrcs { name: "gen-platform-proto-constants", @@ -1575,14 +1601,36 @@ genrule { }, } +filegroup { + name: "framework-cellbroadcast-shared-srcs", + srcs: [ + "core/java/android/os/HandlerExecutor.java", + "core/java/android/util/LocalLog.java", + "core/java/android/util/Slog.java", + "core/java/com/android/internal/util/IState.java", + "core/java/com/android/internal/util/Preconditions.java", + "core/java/com/android/internal/util/State.java", + "core/java/com/android/internal/util/StateMachine.java", + ], +} + // Avoid including Parcelable classes as we don't want to have two copies of // Parcelable cross the process. filegroup { - name: "framework-cellbroadcast-shared-srcs", + name: "framework-telephony-stack-shared-srcs", srcs: [ + "core/java/android/os/RegistrantList.java", + "core/java/android/os/Registrant.java", "core/java/android/util/LocalLog.java", "core/java/android/util/Slog.java", + "core/java/android/util/TimeUtils.java", + "core/java/com/android/internal/os/SomeArgs.java", + "core/java/com/android/internal/util/Preconditions.java", "core/java/com/android/internal/util/State.java", "core/java/com/android/internal/util/StateMachine.java", + "core/java/com/android/internal/util/XmlUtils.java", + "core/java/com/android/internal/util/HexDump.java", + "core/java/com/android/internal/util/IndentingPrintWriter.java", + "core/java/com/android/internal/util/DumpUtils.java" ], } diff --git a/apex/sdkext/Android.bp b/apex/sdkext/Android.bp index b8dcb90057d2..40f3c45518bb 100644 --- a/apex/sdkext/Android.bp +++ b/apex/sdkext/Android.bp @@ -15,7 +15,13 @@ apex { name: "com.android.sdkext", manifest: "manifest.json", + binaries: [ "derive_sdk" ], java_libs: [ "framework-sdkext" ], + prebuilts: [ + "com.android.sdkext.ldconfig", + "cur_sdkinfo", + "derive_sdk.rc", + ], key: "com.android.sdkext.key", certificate: ":com.android.sdkext.certificate", } @@ -30,3 +36,35 @@ android_app_certificate { name: "com.android.sdkext.certificate", certificate: "com.android.sdkext", } + +prebuilt_etc { + name: "com.android.sdkext.ldconfig", + src: "ld.config.txt", + filename: "ld.config.txt", + installable: false, +} + +python_binary_host { + name: "gen_sdkinfo", + srcs: [ + "derive_sdk/sdk.proto", + "gen_sdkinfo.py", + ], + proto: { + canonical_path_from_root: false, + }, +} + +gensrcs { + name: "cur_sdkinfo_src", + srcs: [""], + tools: [ "gen_sdkinfo" ], + cmd: "$(location) -v 0 -o $(out)", +} + +prebuilt_etc { + name: "cur_sdkinfo", + src: ":cur_sdkinfo_src", + filename: "sdkinfo.binarypb", + installable: false, +} diff --git a/apex/sdkext/TEST_MAPPING b/apex/sdkext/TEST_MAPPING new file mode 100644 index 000000000000..8dc732d36c79 --- /dev/null +++ b/apex/sdkext/TEST_MAPPING @@ -0,0 +1,7 @@ +{ + "presubmit": [ + { + "name": "framework-sdkext-tests" + } + ] +} diff --git a/tools/processors/unsupportedappusage/test/Android.bp b/apex/sdkext/derive_sdk/Android.bp index 49ea3d4bbc96..c4e3c296f210 100644 --- a/tools/processors/unsupportedappusage/test/Android.bp +++ b/apex/sdkext/derive_sdk/Android.bp @@ -4,7 +4,7 @@ // you may not use this 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, @@ -12,17 +12,26 @@ // See the License for the specific language governing permissions and // limitations under the License. -java_test_host { - name: "unsupportedappusage-processor-test", - - srcs: ["src/**/*.java"], - +cc_binary { + name: "derive_sdk", + srcs: [ + "derive_sdk.cpp", + "sdk.proto", + ], + proto: { + type: "lite", + }, + sdk_version: "current", + stl: "c++_static", + shared_libs: [ "liblog" ], static_libs: [ - "libjavac", - "unsupportedappusage-annotation-processor-lib", - "truth-host-prebuilt", - "mockito-host", - "junit-host", - "objenesis", + "libbase_ndk", + "libprotobuf-cpp-lite-ndk", ], } + +prebuilt_etc { + name: "derive_sdk.rc", + src: "derive_sdk.rc", + installable: false, +} diff --git a/apex/sdkext/derive_sdk/derive_sdk.cpp b/apex/sdkext/derive_sdk/derive_sdk.cpp new file mode 100644 index 000000000000..0aacebefaaca --- /dev/null +++ b/apex/sdkext/derive_sdk/derive_sdk.cpp @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG "derive_sdk" + +#include <algorithm> +#include <dirent.h> +#include <iostream> +#include <sys/stat.h> +#include <vector> + +#include <android-base/file.h> +#include <android-base/logging.h> +#include <android-base/properties.h> + +#include "frameworks/base/apex/sdkext/derive_sdk/sdk.pb.h" + +using com::android::sdkext::proto::SdkVersion; + +int main(int, char**) { + std::unique_ptr<DIR, decltype(&closedir)> apex(opendir("/apex"), closedir); + if (!apex) { + LOG(ERROR) << "Could not read /apex"; + return EXIT_FAILURE; + } + struct dirent* de; + std::vector<std::string> paths; + while ((de = readdir(apex.get()))) { + std::string name = de->d_name; + if (name[0] == '.' || name.find('@') != std::string::npos) { + // Skip <name>@<ver> dirs, as they are bind-mounted to <name> + continue; + } + std::string path = "/apex/" + name + "/etc/sdkinfo.binarypb"; + struct stat statbuf; + if (stat(path.c_str(), &statbuf) == 0) { + paths.push_back(path); + } + } + + std::vector<int> versions; + for (const auto& path : paths) { + std::string contents; + if (!android::base::ReadFileToString(path, &contents, true)) { + LOG(ERROR) << "failed to read " << path; + continue; + } + SdkVersion sdk_version; + if (!sdk_version.ParseFromString(contents)) { + LOG(ERROR) << "failed to parse " << path; + continue; + } + versions.push_back(sdk_version.version()); + } + auto itr = std::min_element(versions.begin(), versions.end()); + std::string prop_value = itr == versions.end() ? "0" : std::to_string(*itr); + + if (!android::base::SetProperty("persist.com.android.sdkext.sdk_info", prop_value)) { + LOG(ERROR) << "failed to set sdk_info prop"; + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} diff --git a/apex/sdkext/derive_sdk/derive_sdk.rc b/apex/sdkext/derive_sdk/derive_sdk.rc new file mode 100644 index 000000000000..1b667949eeaa --- /dev/null +++ b/apex/sdkext/derive_sdk/derive_sdk.rc @@ -0,0 +1,3 @@ +service derive_sdk /apex/com.android.sdkext/bin/derive_sdk + oneshot + disabled diff --git a/apex/sdkext/derive_sdk/sdk.proto b/apex/sdkext/derive_sdk/sdk.proto new file mode 100644 index 000000000000..d15b93552ff4 --- /dev/null +++ b/apex/sdkext/derive_sdk/sdk.proto @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +syntax = "proto3"; +package com.android.sdkext.proto; + +option java_outer_classname = "SdkProto"; +option optimize_for = LITE_RUNTIME; + +message SdkVersion { + int32 version = 1; +} diff --git a/apex/sdkext/framework/tests/Android.bp b/apex/sdkext/framework/tests/Android.bp index 3d5dbb3d8a2d..ab6327582efd 100644 --- a/apex/sdkext/framework/tests/Android.bp +++ b/apex/sdkext/framework/tests/Android.bp @@ -6,5 +6,6 @@ android_test { "android.test.runner", ], static_libs: [ "framework-sdkext" ], + test_suites: [ "general-tests" ], platform_apis: true, } diff --git a/apex/sdkext/framework/tests/src/android/os/ext/SdkExtensionsTest.java b/apex/sdkext/framework/tests/src/android/os/ext/SdkExtensionsTest.java index 688511096a43..d7dca90e0b8f 100644 --- a/apex/sdkext/framework/tests/src/android/os/ext/SdkExtensionsTest.java +++ b/apex/sdkext/framework/tests/src/android/os/ext/SdkExtensionsTest.java @@ -29,11 +29,6 @@ public class SdkExtensionsTest extends TestCase { SdkExtensions.getExtensionVersion(Build.VERSION_CODES.Q); fail("expected IllegalArgumentException"); } catch (IllegalArgumentException expected) { } - - try { - SdkExtensions.getExtensionVersion(999999); - fail("expected IllegalArgumentException"); - } catch (IllegalArgumentException expected) { } } @SmallTest diff --git a/apex/sdkext/gen_sdkinfo.py b/apex/sdkext/gen_sdkinfo.py new file mode 100644 index 000000000000..5af478ba7fe6 --- /dev/null +++ b/apex/sdkext/gen_sdkinfo.py @@ -0,0 +1,19 @@ +import sdk_pb2 +import sys + +if __name__ == '__main__': + argv = sys.argv[1:] + if not len(argv) == 4 or sorted([argv[0], argv[2]]) != ['-o', '-v']: + print('usage: gen_sdkinfo -v <version> -o <output-file>') + sys.exit(1) + + for i in range(len(argv)): + if sys.argv[i] == '-o': + filename = sys.argv[i+1] + if sys.argv[i] == '-v': + version = int(sys.argv[i+1]) + + proto = sdk_pb2.SdkVersion() + proto.version = version + with open(filename, 'wb') as f: + f.write(proto.SerializeToString()) diff --git a/apex/sdkext/ld.config.txt b/apex/sdkext/ld.config.txt new file mode 100644 index 000000000000..b4470685f4fc --- /dev/null +++ b/apex/sdkext/ld.config.txt @@ -0,0 +1,31 @@ +# Copyright (C) 2019 The Android Open Source Project +# +# Bionic loader config file for the sdkext apex. + +dir.sdkext = /apex/com.android.sdkext/bin/ + +[sdkext] +additional.namespaces = platform + +namespace.default.isolated = true +namespace.default.links = platform +namespace.default.link.platform.allow_all_shared_libs = true + +############################################################################### +# "platform" namespace: used for NDK libraries +############################################################################### +namespace.platform.isolated = true +namespace.platform.search.paths = /system/${LIB} +namespace.platform.asan.search.paths = /data/asan/system/${LIB} + +# /system/lib/libc.so, etc are symlinks to /apex/com.android.lib/lib/bionic/libc.so, etc. +# Add /apex/... path to the permitted paths because linker uses realpath(3) +# to check the accessibility of the lib. We could add this to search.paths +# instead but that makes the resolution of bionic libs be dependent on +# the order of /system/lib and /apex/... in search.paths. If /apex/... +# is after /system/lib, then /apex/... is never tried because libc.so +# is always found in /system/lib but fails to pass the accessibility test +# because of its realpath. It's better to not depend on the ordering if +# possible. +namespace.platform.permitted.paths = /apex/com.android.runtime/${LIB}/bionic +namespace.platform.asan.permitted.paths = /apex/com.android.runtime/${LIB}/bionic diff --git a/api/current.txt b/api/current.txt index 80cc14ccb7f3..d2e1b5f19173 100644 --- a/api/current.txt +++ b/api/current.txt @@ -5115,12 +5115,12 @@ package android.app { method public android.content.Intent getResultData(); } - public abstract class IntentService extends android.app.Service { - ctor public IntentService(String); - method @Nullable public android.os.IBinder onBind(android.content.Intent); - method @WorkerThread protected abstract void onHandleIntent(@Nullable android.content.Intent); - method public void onStart(@Nullable android.content.Intent, int); - method public void setIntentRedelivery(boolean); + @Deprecated public abstract class IntentService extends android.app.Service { + ctor @Deprecated public IntentService(String); + method @Deprecated @Nullable public android.os.IBinder onBind(android.content.Intent); + method @Deprecated @WorkerThread protected abstract void onHandleIntent(@Nullable android.content.Intent); + method @Deprecated public void onStart(@Nullable android.content.Intent, int); + method @Deprecated public void setIntentRedelivery(boolean); } public class KeyguardManager { @@ -29024,12 +29024,14 @@ package android.net { method public static long getMobileRxPackets(); method public static long getMobileTxBytes(); method public static long getMobileTxPackets(); + method public static long getRxPackets(@NonNull String); method public static int getThreadStatsTag(); method public static int getThreadStatsUid(); method public static long getTotalRxBytes(); method public static long getTotalRxPackets(); method public static long getTotalTxBytes(); method public static long getTotalTxPackets(); + method public static long getTxPackets(@NonNull String); method public static long getUidRxBytes(int); method public static long getUidRxPackets(int); method @Deprecated public static long getUidTcpRxBytes(int); @@ -42703,6 +42705,7 @@ package android.system { field public static final int MS_INVALIDATE; field public static final int MS_SYNC; field public static final int NETLINK_INET_DIAG; + field public static final int NETLINK_NETFILTER; field public static final int NETLINK_ROUTE; field public static final int NI_DGRAM; field public static final int NI_NAMEREQD; @@ -43113,6 +43116,7 @@ package android.telecom { method public int getCallProperties(); method public String getCallerDisplayName(); method public int getCallerDisplayNamePresentation(); + method public int getCallerNumberVerificationStatus(); method public final long getConnectTimeMillis(); method public long getCreationTimeMillis(); method public android.telecom.DisconnectCause getDisconnectCause(); @@ -43294,6 +43298,7 @@ package android.telecom { method public final android.telecom.CallAudioState getCallAudioState(); method public final String getCallerDisplayName(); method public final int getCallerDisplayNamePresentation(); + method public int getCallerNumberVerificationStatus(); method public final android.telecom.Conference getConference(); method public final java.util.List<android.telecom.Conferenceable> getConferenceables(); method public final int getConnectionCapabilities(); @@ -43345,6 +43350,7 @@ package android.telecom { method public final void setAudioModeIsVoip(boolean); method public final void setAudioRoute(int); method public final void setCallerDisplayName(String, int); + method public void setCallerNumberVerificationStatus(int); method public final void setConferenceableConnections(java.util.List<android.telecom.Connection>); method public final void setConferenceables(java.util.List<android.telecom.Conferenceable>); method public final void setConnectionCapabilities(int); @@ -43364,6 +43370,27 @@ package android.telecom { method public final void setVideoProvider(android.telecom.Connection.VideoProvider); method public final void setVideoState(int); method public static String stateToString(int); + field public static final int AUDIO_CODEC_AMR = 1; // 0x1 + field public static final int AUDIO_CODEC_AMR_WB = 2; // 0x2 + field public static final int AUDIO_CODEC_EVRC = 4; // 0x4 + field public static final int AUDIO_CODEC_EVRC_B = 5; // 0x5 + field public static final int AUDIO_CODEC_EVRC_NW = 7; // 0x7 + field public static final int AUDIO_CODEC_EVRC_WB = 6; // 0x6 + field public static final int AUDIO_CODEC_EVS_FB = 20; // 0x14 + field public static final int AUDIO_CODEC_EVS_NB = 17; // 0x11 + field public static final int AUDIO_CODEC_EVS_SWB = 19; // 0x13 + field public static final int AUDIO_CODEC_EVS_WB = 18; // 0x12 + field public static final int AUDIO_CODEC_G711A = 13; // 0xd + field public static final int AUDIO_CODEC_G711AB = 15; // 0xf + field public static final int AUDIO_CODEC_G711U = 11; // 0xb + field public static final int AUDIO_CODEC_G722 = 14; // 0xe + field public static final int AUDIO_CODEC_G723 = 12; // 0xc + field public static final int AUDIO_CODEC_G729 = 16; // 0x10 + field public static final int AUDIO_CODEC_GSM_EFR = 8; // 0x8 + field public static final int AUDIO_CODEC_GSM_FR = 9; // 0x9 + field public static final int AUDIO_CODEC_GSM_HR = 10; // 0xa + field public static final int AUDIO_CODEC_NONE = 0; // 0x0 + field public static final int AUDIO_CODEC_QCELP13K = 3; // 0x3 field public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO = 8388608; // 0x800000 field public static final int CAPABILITY_CAN_PAUSE_VIDEO = 1048576; // 0x100000 field public static final int CAPABILITY_CAN_PULL_CALL = 16777216; // 0x1000000 @@ -43397,6 +43424,7 @@ package android.telecom { field public static final String EVENT_RTT_AUDIO_INDICATION_CHANGED = "android.telecom.event.RTT_AUDIO_INDICATION_CHANGED"; field public static final String EXTRA_ANSWERING_DROPS_FG_CALL = "android.telecom.extra.ANSWERING_DROPS_FG_CALL"; field public static final String EXTRA_ANSWERING_DROPS_FG_CALL_APP_NAME = "android.telecom.extra.ANSWERING_DROPS_FG_CALL_APP_NAME"; + field public static final String EXTRA_AUDIO_CODEC = "android.telecom.extra.AUDIO_CODEC"; field public static final String EXTRA_CALL_SUBJECT = "android.telecom.extra.CALL_SUBJECT"; field public static final String EXTRA_CHILD_ADDRESS = "android.telecom.extra.CHILD_ADDRESS"; field public static final String EXTRA_IS_RTT_AUDIO_PRESENT = "android.telecom.extra.IS_RTT_AUDIO_PRESENT"; @@ -43418,6 +43446,9 @@ package android.telecom { field public static final int STATE_NEW = 1; // 0x1 field public static final int STATE_PULLING_CALL = 7; // 0x7 field public static final int STATE_RINGING = 2; // 0x2 + field public static final int VERIFICATION_STATUS_FAILED = 2; // 0x2 + field public static final int VERIFICATION_STATUS_NOT_VERIFIED = 0; // 0x0 + field public static final int VERIFICATION_STATUS_PASSED = 1; // 0x1 } public static final class Connection.RttModifyStatus { @@ -43931,6 +43962,7 @@ package android.telephony { 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 NGRAN = 6; // 0x6 field public static final int UNKNOWN = 0; // 0x0 field public static final int UTRAN = 2; // 0x2 } @@ -44003,6 +44035,52 @@ package android.telephony { field public static final int BAND_T810 = 7; // 0x7 } + public static final class AccessNetworkConstants.NgranBands { + field public static final int BAND_1 = 1; // 0x1 + field public static final int BAND_12 = 12; // 0xc + field public static final int BAND_14 = 14; // 0xe + field public static final int BAND_18 = 18; // 0x12 + field public static final int BAND_2 = 2; // 0x2 + field public static final int BAND_20 = 20; // 0x14 + field public static final int BAND_25 = 25; // 0x19 + field public static final int BAND_257 = 257; // 0x101 + field public static final int BAND_258 = 258; // 0x102 + field public static final int BAND_260 = 260; // 0x104 + field public static final int BAND_261 = 261; // 0x105 + field public static final int BAND_28 = 28; // 0x1c + field public static final int BAND_29 = 29; // 0x1d + field public static final int BAND_3 = 3; // 0x3 + field public static final int BAND_30 = 30; // 0x1e + field public static final int BAND_34 = 34; // 0x22 + field public static final int BAND_38 = 38; // 0x26 + field public static final int BAND_39 = 39; // 0x27 + field public static final int BAND_40 = 40; // 0x28 + field public static final int BAND_41 = 41; // 0x29 + field public static final int BAND_48 = 48; // 0x30 + field public static final int BAND_5 = 5; // 0x5 + field public static final int BAND_50 = 50; // 0x32 + field public static final int BAND_51 = 51; // 0x33 + field public static final int BAND_65 = 65; // 0x41 + field public static final int BAND_66 = 66; // 0x42 + field public static final int BAND_7 = 7; // 0x7 + field public static final int BAND_70 = 70; // 0x46 + field public static final int BAND_71 = 71; // 0x47 + field public static final int BAND_74 = 74; // 0x4a + field public static final int BAND_75 = 75; // 0x4b + field public static final int BAND_76 = 76; // 0x4c + field public static final int BAND_77 = 77; // 0x4d + field public static final int BAND_78 = 78; // 0x4e + field public static final int BAND_79 = 79; // 0x4f + field public static final int BAND_8 = 8; // 0x8 + field public static final int BAND_80 = 80; // 0x50 + field public static final int BAND_81 = 81; // 0x51 + field public static final int BAND_82 = 82; // 0x52 + field public static final int BAND_83 = 83; // 0x53 + field public static final int BAND_84 = 84; // 0x54 + field public static final int BAND_86 = 86; // 0x56 + field public static final int BAND_90 = 90; // 0x5a + } + public static final class AccessNetworkConstants.UtranBand { field public static final int BAND_1 = 1; // 0x1 field public static final int BAND_10 = 10; // 0xa @@ -44388,6 +44466,7 @@ package android.telephony { method public abstract int getAsuLevel(); method public abstract int getDbm(); method @IntRange(from=android.telephony.CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN, to=android.telephony.CellSignalStrength.SIGNAL_STRENGTH_GREAT) public abstract int getLevel(); + method public static final int getNumSignalStrengthLevels(); method public abstract int hashCode(); field public static final int SIGNAL_STRENGTH_GOOD = 3; // 0x3 field public static final int SIGNAL_STRENGTH_GREAT = 4; // 0x4 diff --git a/api/system-current.txt b/api/system-current.txt index 94394fba1fc9..c459412134ac 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -56,7 +56,7 @@ package android { field public static final String CHANGE_DEVICE_IDLE_TEMP_WHITELIST = "android.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST"; field public static final String CLEAR_APP_USER_DATA = "android.permission.CLEAR_APP_USER_DATA"; field public static final String CONFIGURE_DISPLAY_BRIGHTNESS = "android.permission.CONFIGURE_DISPLAY_BRIGHTNESS"; - field public static final String CONNECTIVITY_INTERNAL = "android.permission.CONNECTIVITY_INTERNAL"; + field @Deprecated public static final String CONNECTIVITY_INTERNAL = "android.permission.CONNECTIVITY_INTERNAL"; field public static final String CONNECTIVITY_USE_RESTRICTED_NETWORKS = "android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS"; field public static final String CONTROL_DISPLAY_COLOR_TRANSFORMS = "android.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS"; field public static final String CONTROL_DISPLAY_SATURATION = "android.permission.CONTROL_DISPLAY_SATURATION"; @@ -123,6 +123,7 @@ package android { field public static final String MODIFY_QUIET_MODE = "android.permission.MODIFY_QUIET_MODE"; field public static final String MOVE_PACKAGE = "android.permission.MOVE_PACKAGE"; field public static final String NETWORK_CARRIER_PROVISIONING = "android.permission.NETWORK_CARRIER_PROVISIONING"; + field public static final String NETWORK_FACTORY = "android.permission.NETWORK_FACTORY"; field public static final String NETWORK_MANAGED_PROVISIONING = "android.permission.NETWORK_MANAGED_PROVISIONING"; field public static final String NETWORK_SCAN = "android.permission.NETWORK_SCAN"; field public static final String NETWORK_SETUP_WIZARD = "android.permission.NETWORK_SETUP_WIZARD"; @@ -130,6 +131,7 @@ package android { field public static final String NOTIFICATION_DURING_SETUP = "android.permission.NOTIFICATION_DURING_SETUP"; field public static final String NOTIFY_TV_INPUTS = "android.permission.NOTIFY_TV_INPUTS"; field public static final String OBSERVE_APP_USAGE = "android.permission.OBSERVE_APP_USAGE"; + field public static final String OBSERVE_NETWORK_POLICY = "android.permission.OBSERVE_NETWORK_POLICY"; field public static final String OBSERVE_ROLE_HOLDERS = "android.permission.OBSERVE_ROLE_HOLDERS"; field public static final String OPEN_ACCESSIBILITY_DETAILS_SETTINGS = "android.permission.OPEN_ACCESSIBILITY_DETAILS_SETTINGS"; field public static final String OVERRIDE_WIFI_CONFIG = "android.permission.OVERRIDE_WIFI_CONFIG"; @@ -1317,6 +1319,7 @@ package android.bluetooth { public final class BluetoothHeadset implements android.bluetooth.BluetoothProfile { method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean connect(android.bluetooth.BluetoothDevice); method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean disconnect(android.bluetooth.BluetoothDevice); + method @Nullable @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothDevice getActiveDevice(); method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean setPriority(android.bluetooth.BluetoothDevice, int); @@ -1351,6 +1354,37 @@ package android.bluetooth { field @Deprecated public static final int PRIORITY_ON = 100; // 0x64 } + public final class BluetoothUuid { + method public static boolean containsAnyUuid(@Nullable android.os.ParcelUuid[], @Nullable android.os.ParcelUuid[]); + method @NonNull public static android.os.ParcelUuid parseUuidFrom(@Nullable byte[]); + field @NonNull public static final android.os.ParcelUuid A2DP_SINK; + field @NonNull public static final android.os.ParcelUuid A2DP_SOURCE; + field @NonNull public static final android.os.ParcelUuid ADV_AUDIO_DIST; + field @NonNull public static final android.os.ParcelUuid AVRCP_CONTROLLER; + field @NonNull public static final android.os.ParcelUuid AVRCP_TARGET; + field @NonNull public static final android.os.ParcelUuid BASE_UUID; + field @NonNull public static final android.os.ParcelUuid BNEP; + field @NonNull public static final android.os.ParcelUuid HEARING_AID; + field @NonNull public static final android.os.ParcelUuid HFP; + field @NonNull public static final android.os.ParcelUuid HFP_AG; + field @NonNull public static final android.os.ParcelUuid HID; + field @NonNull public static final android.os.ParcelUuid HOGP; + field @NonNull public static final android.os.ParcelUuid HSP; + field @NonNull public static final android.os.ParcelUuid HSP_AG; + field @NonNull public static final android.os.ParcelUuid MAP; + field @NonNull public static final android.os.ParcelUuid MAS; + field @NonNull public static final android.os.ParcelUuid MNS; + field @NonNull public static final android.os.ParcelUuid NAP; + field @NonNull public static final android.os.ParcelUuid OBEX_OBJECT_PUSH; + field @NonNull public static final android.os.ParcelUuid PANU; + field @NonNull public static final android.os.ParcelUuid PBAP_PCE; + field @NonNull public static final android.os.ParcelUuid PBAP_PSE; + field @NonNull public static final android.os.ParcelUuid SAP; + field public static final int UUID_BYTES_128_BIT = 16; // 0x10 + field public static final int UUID_BYTES_16_BIT = 2; // 0x2 + field public static final int UUID_BYTES_32_BIT = 4; // 0x4 + } + } package android.bluetooth.le { @@ -4068,7 +4102,7 @@ package android.net { public class ConnectivityManager { method @NonNull @RequiresPermission(android.Manifest.permission.PACKET_KEEPALIVE_OFFLOAD) public android.net.SocketKeepalive createNattKeepalive(@NonNull android.net.Network, @NonNull android.os.ParcelFileDescriptor, @NonNull java.net.InetAddress, @NonNull java.net.InetAddress, @NonNull java.util.concurrent.Executor, @NonNull android.net.SocketKeepalive.Callback); method @NonNull @RequiresPermission(android.Manifest.permission.PACKET_KEEPALIVE_OFFLOAD) public android.net.SocketKeepalive createSocketKeepalive(@NonNull android.net.Network, @NonNull java.net.Socket, @NonNull java.util.concurrent.Executor, @NonNull android.net.SocketKeepalive.Callback); - method @RequiresPermission(android.Manifest.permission.LOCAL_MAC_ADDRESS) public String getCaptivePortalServerUrl(); + method @Deprecated @RequiresPermission("android.permission.NETWORK_SETTINGS") public String getCaptivePortalServerUrl(); method @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void getLatestTetheringEntitlementResult(int, boolean, @NonNull java.util.concurrent.Executor, @NonNull android.net.ConnectivityManager.OnTetheringEntitlementResultListener); method @RequiresPermission(anyOf={android.Manifest.permission.TETHER_PRIVILEGED, android.Manifest.permission.WRITE_SETTINGS}) public boolean isTetheringSupported(); method @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void registerTetheringEventCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.ConnectivityManager.OnTetheringEventCallback); @@ -4192,6 +4226,7 @@ package android.net { public class Network implements android.os.Parcelable { ctor public Network(@NonNull android.net.Network); method @NonNull public android.net.Network getPrivateDnsBypassingCopy(); + field public final int netId; } public final class NetworkCapabilities implements android.os.Parcelable { @@ -4436,7 +4471,7 @@ package android.net.ipsec.ike { method @NonNull public java.util.List<android.net.ipsec.ike.IkeTrafficSelector> getOutboundTrafficSelectors(); } - public abstract class ChildSessionOptions { + public abstract class ChildSessionParams { } public class IkeFqdnIdentification extends android.net.ipsec.ike.IkeIdentification { @@ -4481,11 +4516,11 @@ package android.net.ipsec.ike { } public final class IkeSession implements java.lang.AutoCloseable { - ctor public IkeSession(@NonNull android.content.Context, @NonNull android.net.ipsec.ike.IkeSessionOptions, @NonNull android.net.ipsec.ike.ChildSessionOptions, @NonNull java.util.concurrent.Executor, @NonNull android.net.ipsec.ike.IkeSessionCallback, @NonNull android.net.ipsec.ike.ChildSessionCallback); + ctor public IkeSession(@NonNull android.content.Context, @NonNull android.net.ipsec.ike.IkeSessionParams, @NonNull android.net.ipsec.ike.ChildSessionParams, @NonNull java.util.concurrent.Executor, @NonNull android.net.ipsec.ike.IkeSessionCallback, @NonNull android.net.ipsec.ike.ChildSessionCallback); method public void close(); method public void closeChildSession(@NonNull android.net.ipsec.ike.ChildSessionCallback); method public void kill(); - method public void openChildSession(@NonNull android.net.ipsec.ike.ChildSessionOptions, @NonNull android.net.ipsec.ike.ChildSessionCallback); + method public void openChildSession(@NonNull android.net.ipsec.ike.ChildSessionParams, @NonNull android.net.ipsec.ike.ChildSessionCallback); } public interface IkeSessionCallback { @@ -4503,21 +4538,21 @@ package android.net.ipsec.ike { field public static final int EXTENSION_TYPE_MOBIKE = 2; // 0x2 } - public final class IkeSessionOptions { + public final class IkeSessionParams { } - public static final class IkeSessionOptions.Builder { - ctor public IkeSessionOptions.Builder(); - method @NonNull public android.net.ipsec.ike.IkeSessionOptions.Builder addSaProposal(@NonNull android.net.ipsec.ike.IkeSaProposal); - method @NonNull public android.net.ipsec.ike.IkeSessionOptions build(); - method @NonNull public android.net.ipsec.ike.IkeSessionOptions.Builder setAuthDigitalSignature(@NonNull java.security.cert.X509Certificate, @NonNull java.security.cert.X509Certificate, @NonNull java.security.PrivateKey); - method @NonNull public android.net.ipsec.ike.IkeSessionOptions.Builder setAuthDigitalSignature(@NonNull java.security.cert.X509Certificate, @NonNull java.security.cert.X509Certificate, @NonNull java.util.List<java.security.cert.X509Certificate>, @NonNull java.security.PrivateKey); - method @NonNull public android.net.ipsec.ike.IkeSessionOptions.Builder setAuthEap(@NonNull java.security.cert.X509Certificate, @NonNull android.net.eap.EapSessionConfig); - method @NonNull public android.net.ipsec.ike.IkeSessionOptions.Builder setAuthPsk(@NonNull byte[]); - method @NonNull public android.net.ipsec.ike.IkeSessionOptions.Builder setLocalIdentification(@NonNull android.net.ipsec.ike.IkeIdentification); - method @NonNull public android.net.ipsec.ike.IkeSessionOptions.Builder setRemoteIdentification(@NonNull android.net.ipsec.ike.IkeIdentification); - method @NonNull public android.net.ipsec.ike.IkeSessionOptions.Builder setServerAddress(@NonNull java.net.InetAddress); - method @NonNull public android.net.ipsec.ike.IkeSessionOptions.Builder setUdpEncapsulationSocket(@NonNull android.net.IpSecManager.UdpEncapsulationSocket); + public static final class IkeSessionParams.Builder { + ctor public IkeSessionParams.Builder(); + method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder addSaProposal(@NonNull android.net.ipsec.ike.IkeSaProposal); + method @NonNull public android.net.ipsec.ike.IkeSessionParams build(); + method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setAuthDigitalSignature(@NonNull java.security.cert.X509Certificate, @NonNull java.security.cert.X509Certificate, @NonNull java.security.PrivateKey); + method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setAuthDigitalSignature(@NonNull java.security.cert.X509Certificate, @NonNull java.security.cert.X509Certificate, @NonNull java.util.List<java.security.cert.X509Certificate>, @NonNull java.security.PrivateKey); + method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setAuthEap(@NonNull java.security.cert.X509Certificate, @NonNull android.net.eap.EapSessionConfig); + method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setAuthPsk(@NonNull byte[]); + method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setLocalIdentification(@NonNull android.net.ipsec.ike.IkeIdentification); + method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setRemoteIdentification(@NonNull android.net.ipsec.ike.IkeIdentification); + method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setServerAddress(@NonNull java.net.InetAddress); + method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setUdpEncapsulationSocket(@NonNull android.net.IpSecManager.UdpEncapsulationSocket); } public final class IkeTrafficSelector { @@ -4554,33 +4589,33 @@ package android.net.ipsec.ike { field public static final int PSEUDORANDOM_FUNCTION_HMAC_SHA1 = 2; // 0x2 } - public final class TransportModeChildSessionOptions extends android.net.ipsec.ike.ChildSessionOptions { + public final class TransportModeChildSessionParams extends android.net.ipsec.ike.ChildSessionParams { } - public static final class TransportModeChildSessionOptions.Builder { - ctor public TransportModeChildSessionOptions.Builder(); - method @NonNull public android.net.ipsec.ike.TransportModeChildSessionOptions.Builder addInboundTrafficSelectors(@NonNull android.net.ipsec.ike.IkeTrafficSelector); - method @NonNull public android.net.ipsec.ike.TransportModeChildSessionOptions.Builder addOutboundTrafficSelectors(@NonNull android.net.ipsec.ike.IkeTrafficSelector); - method @NonNull public android.net.ipsec.ike.TransportModeChildSessionOptions.Builder addSaProposal(@NonNull android.net.ipsec.ike.ChildSaProposal); - method @NonNull public android.net.ipsec.ike.TransportModeChildSessionOptions build(); + public static final class TransportModeChildSessionParams.Builder { + ctor public TransportModeChildSessionParams.Builder(); + method @NonNull public android.net.ipsec.ike.TransportModeChildSessionParams.Builder addInboundTrafficSelectors(@NonNull android.net.ipsec.ike.IkeTrafficSelector); + method @NonNull public android.net.ipsec.ike.TransportModeChildSessionParams.Builder addOutboundTrafficSelectors(@NonNull android.net.ipsec.ike.IkeTrafficSelector); + method @NonNull public android.net.ipsec.ike.TransportModeChildSessionParams.Builder addSaProposal(@NonNull android.net.ipsec.ike.ChildSaProposal); + method @NonNull public android.net.ipsec.ike.TransportModeChildSessionParams build(); } - public final class TunnelModeChildSessionOptions extends android.net.ipsec.ike.ChildSessionOptions { + public final class TunnelModeChildSessionParams extends android.net.ipsec.ike.ChildSessionParams { } - public static final class TunnelModeChildSessionOptions.Builder { - ctor public TunnelModeChildSessionOptions.Builder(); - method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionOptions.Builder addInboundTrafficSelectors(@NonNull android.net.ipsec.ike.IkeTrafficSelector); - method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionOptions.Builder addInternalAddressRequest(int); - method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionOptions.Builder addInternalAddressRequest(@NonNull java.net.InetAddress, int); - method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionOptions.Builder addInternalDhcpServerRequest(int); - method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionOptions.Builder addInternalDhcpServerRequest(@NonNull java.net.InetAddress); - method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionOptions.Builder addInternalDnsServerRequest(int); - method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionOptions.Builder addInternalDnsServerRequest(@NonNull java.net.InetAddress); - method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionOptions.Builder addInternalSubnetRequest(int); - method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionOptions.Builder addOutboundTrafficSelectors(@NonNull android.net.ipsec.ike.IkeTrafficSelector); - method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionOptions.Builder addSaProposal(@NonNull android.net.ipsec.ike.ChildSaProposal); - method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionOptions build(); + public static final class TunnelModeChildSessionParams.Builder { + ctor public TunnelModeChildSessionParams.Builder(); + method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addInboundTrafficSelectors(@NonNull android.net.ipsec.ike.IkeTrafficSelector); + method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addInternalAddressRequest(int); + method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addInternalAddressRequest(@NonNull java.net.InetAddress, int); + method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addInternalDhcpServerRequest(int); + method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addInternalDhcpServerRequest(@NonNull java.net.InetAddress); + method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addInternalDnsServerRequest(int); + method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addInternalDnsServerRequest(@NonNull java.net.InetAddress); + method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addInternalSubnetRequest(int); + method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addOutboundTrafficSelectors(@NonNull android.net.ipsec.ike.IkeTrafficSelector); + method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addSaProposal(@NonNull android.net.ipsec.ike.ChildSaProposal); + method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams build(); } } @@ -6172,6 +6207,18 @@ package android.printservice.recommendation { package android.provider { + public class BlockedNumberContract { + field public static final String METHOD_NOTIFY_EMERGENCY_CONTACT = "notify_emergency_contact"; + field public static final String METHOD_SHOULD_SYSTEM_BLOCK_NUMBER = "should_system_block_number"; + field public static final String RES_BLOCK_STATUS = "block_status"; + field public static final int STATUS_BLOCKED_IN_LIST = 1; // 0x1 + field public static final int STATUS_BLOCKED_NOT_IN_CONTACTS = 5; // 0x5 + field public static final int STATUS_BLOCKED_PAYPHONE = 4; // 0x4 + field public static final int STATUS_BLOCKED_RESTRICTED = 2; // 0x2 + field public static final int STATUS_BLOCKED_UNKNOWN_NUMBER = 3; // 0x3 + field public static final int STATUS_NOT_BLOCKED = 0; // 0x0 + } + public static final class ContactsContract.MetadataSync implements android.provider.BaseColumns android.provider.ContactsContract.MetadataSyncColumns { field public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_metadata"; field public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact_metadata"; @@ -6518,6 +6565,7 @@ package android.provider { field public static final String SERIAL_NUMBER = "serial_number"; field public static final String SERVICE_CATEGORY = "service_category"; field public static final String SLOT_INDEX = "slot_index"; + field public static final String SUB_ID = "sub_id"; } public static final class Telephony.Sms.Intents { @@ -8528,13 +8576,14 @@ package android.telephony { } public final class SmsCbMessage implements android.os.Parcelable { - ctor public SmsCbMessage(int, int, int, @NonNull android.telephony.SmsCbLocation, int, @Nullable String, @Nullable String, int, @Nullable android.telephony.SmsCbEtwsInfo, @Nullable android.telephony.SmsCbCmasInfo, int, @Nullable java.util.List<android.telephony.CbGeoUtils.Geometry>, long, int); + ctor public SmsCbMessage(int, int, int, @NonNull android.telephony.SmsCbLocation, int, @Nullable String, @Nullable String, int, @Nullable android.telephony.SmsCbEtwsInfo, @Nullable android.telephony.SmsCbCmasInfo, int, @Nullable java.util.List<android.telephony.CbGeoUtils.Geometry>, long, int, int); method @NonNull public static android.telephony.SmsCbMessage createFromCursor(@NonNull android.database.Cursor); method public int describeContents(); method @Nullable public android.telephony.SmsCbCmasInfo getCmasWarningInfo(); method @NonNull public android.content.ContentValues getContentValues(); method @Nullable public android.telephony.SmsCbEtwsInfo getEtwsWarningInfo(); method public int getGeographicalScope(); + method @NonNull public java.util.List<android.telephony.CbGeoUtils.Geometry> getGeometries(); method @Nullable public String getLanguageCode(); method @NonNull public android.telephony.SmsCbLocation getLocation(); method public int getMaximumWaitingDuration(); @@ -8545,6 +8594,7 @@ package android.telephony { method public int getSerialNumber(); method public int getServiceCategory(); method public int getSlotIndex(); + method public int getSubscriptionId(); method public boolean isCmasMessage(); method public boolean isEmergencyMessage(); method public boolean isEtwsMessage(); @@ -8578,6 +8628,7 @@ package android.telephony { } public class SubscriptionManager { + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean canDisablePhysicalSubscription(); method public java.util.List<android.telephony.SubscriptionInfo> getAvailableSubscriptionInfoList(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getEnabledSubscriptionId(int); method @NonNull public static android.content.res.Resources getResourcesForSubId(@NonNull android.content.Context, int); @@ -8645,6 +8696,7 @@ package android.telephony { method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.ImsiEncryptionInfo getCarrierInfoForImsiEncryption(int); method public java.util.List<java.lang.String> getCarrierPackageNamesForIntent(android.content.Intent); method public java.util.List<java.lang.String> getCarrierPackageNamesForIntentAndPhone(android.content.Intent, int); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.List<java.lang.String> getCarrierPrivilegedPackagesForAllActiveSubscriptions(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.CarrierRestrictionRules getCarrierRestrictionRules(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String getCdmaMdn(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String getCdmaMdn(int); diff --git a/api/test-current.txt b/api/test-current.txt index 5d6f9418dee9..c29ef996ee43 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -2426,6 +2426,7 @@ package android.provider { field public static final String SERIAL_NUMBER = "serial_number"; field public static final String SERVICE_CATEGORY = "service_category"; field public static final String SLOT_INDEX = "slot_index"; + field public static final String SUB_ID = "sub_id"; } public static final class Telephony.Sms.Intents { diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java index 22e1d0187f01..bdb83804d903 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -175,7 +175,11 @@ public class Am extends BaseCommand { } else if (opt.equals("--no-hidden-api-checks")) { instrument.disableHiddenApiChecks = true; } else if (opt.equals("--no-test-api-checks")) { - instrument.disableTestApiChecks = true; + // TODO(satayev): remove this option, only kept for backwards compatibility with + // cached tradefed instance + instrument.disableTestApiChecks = false; + } else if (opt.equals("--no-test-api-access")) { + instrument.disableTestApiChecks = false; } else if (opt.equals("--no-isolated-storage")) { instrument.disableIsolatedStorage = true; } else if (opt.equals("--user")) { diff --git a/cmds/am/src/com/android/commands/am/Instrument.java b/cmds/am/src/com/android/commands/am/Instrument.java index 6afd7c40c1c1..2adbc1f6e1ae 100644 --- a/cmds/am/src/com/android/commands/am/Instrument.java +++ b/cmds/am/src/com/android/commands/am/Instrument.java @@ -86,7 +86,7 @@ public class Instrument { String logPath = null; public boolean noWindowAnimation = false; public boolean disableHiddenApiChecks = false; - public boolean disableTestApiChecks = false; + public boolean disableTestApiChecks = true; public boolean disableIsolatedStorage = false; public String abi = null; public int userId = UserHandle.USER_CURRENT; diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index 32d90b70c34e..4440bf89ed65 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -324,6 +324,8 @@ message Atom { AppCompatibilityChangeReported app_compatibility_change_reported = 228 [(allow_from_any_uid) = true]; + PerfettoUploaded perfetto_uploaded = + 229 [(log_from_module) = "perfetto"]; } // Pulled events will start at field 10000. @@ -6858,3 +6860,37 @@ message AppCompatibilityChangeReported { optional Source source = 4; } + +/** + * Logged from + * external/perfetto/src/perfetto_cmd/perfetto_cmd.cc + */ +message PerfettoUploaded { + enum Event { + PERFETTO_UNDEFINED = 0; + PERFETTO_TRACE_BEGIN = 1; + PERFETTO_BACKGROUND_TRACE_BEGIN = 2; + PERFETTO_ON_CONNECT = 3; + PERFETTO_ON_TRACING_DISABLED = 4; + PERFETTO_UPLOAD_DROPBOX_BEGIN = 5; + PERFETTO_UPLOAD_DROPBOX_SUCCESS = 6; + PERFETTO_UPLOAD_DROPBOX_FAILURE = 7; + PERFETTO_UPLOAD_INCIDENT_BEGIN = 8; + PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9; + PERFETTO_UPLOAD_INCIDENT_FAILURE = 10; + PERFETTO_FINALIZE_TRACE_AND_EXIT = 11; + PERFETTO_TRIGGER_BEGIN = 12; + PERFETTO_TRIGGER_SUCCESS = 13; + PERFETTO_TRIGGER_FAILURE = 14; + PERFETTO_HIT_GUARDRAILS = 15; + PERFETTO_ON_TIMEOUT = 16; + PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17; + } + + // Which stage of the pipeline we are reporting from. + optional Event event = 1; + + // UUID matching the one set inside the SystemInfo trace packet. + optional int64 trace_uuid_lsb = 2; + optional int64 trace_uuid_msb = 3; +} diff --git a/cmds/telecom/src/com/android/commands/telecom/Telecom.java b/cmds/telecom/src/com/android/commands/telecom/Telecom.java index c9f069d62003..9061ed1d48af 100644 --- a/cmds/telecom/src/com/android/commands/telecom/Telecom.java +++ b/cmds/telecom/src/com/android/commands/telecom/Telecom.java @@ -16,10 +16,12 @@ package com.android.commands.telecom; +import android.app.ActivityThread; import android.content.ComponentName; import android.content.Context; import android.net.Uri; import android.os.IUserManager; +import android.os.Looper; import android.os.Process; import android.os.RemoteException; import android.os.ServiceManager; @@ -33,7 +35,6 @@ import android.text.TextUtils; import com.android.internal.os.BaseCommand; import com.android.internal.telecom.ITelecomService; -import com.android.internal.telephony.ITelephony; import com.android.internal.telephony.TelephonyProperties; import java.io.PrintStream; @@ -59,7 +60,6 @@ public final class Telecom extends BaseCommand { private static final String COMMAND_SET_TEST_CALL_SCREENING_APP = "set-test-call-screening-app"; private static final String COMMAND_ADD_OR_REMOVE_CALL_COMPANION_APP = "add-or-remove-call-companion-app"; - private static final String COMMAND_SET_TEST_AUTO_MODE_APP = "set-test-auto-mode-app"; private static final String COMMAND_SET_PHONE_ACCOUNT_SUGGESTION_COMPONENT = "set-phone-acct-suggestion-component"; private static final String COMMAND_UNREGISTER_PHONE_ACCOUNT = "unregister-phone-account"; @@ -84,7 +84,7 @@ public final class Telecom extends BaseCommand { private ComponentName mComponent; private String mAccountId; private ITelecomService mTelecomService; - private ITelephony mTelephonyService; + private TelephonyManager mTelephonyManager; private IUserManager mUserManager; @Override @@ -100,7 +100,6 @@ public final class Telecom extends BaseCommand { + "<USER_SN>\n" + "usage: telecom set-test-call-redirection-app <PACKAGE>\n" + "usage: telecom set-test-call-screening-app <PACKAGE>\n" - + "usage: telecom set-test-auto-mode-app <PACKAGE>\n" + "usage: telecom set-phone-acct-suggestion-component <COMPONENT>\n" + "usage: telecom add-or-remove-call-companion-app <PACKAGE> <1/0>\n" + "usage: telecom register-sim-phone-account <COMPONENT> <ID> <USER_SN>" @@ -156,9 +155,10 @@ public final class Telecom extends BaseCommand { return; } - mTelephonyService = ITelephony.Stub.asInterface( - ServiceManager.getService(Context.TELEPHONY_SERVICE)); - if (mTelephonyService == null) { + Looper.prepareMainLooper(); + Context context = ActivityThread.systemMain().getSystemContext(); + mTelephonyManager = context.getSystemService(TelephonyManager.class); + if (mTelephonyManager == null) { Log.w(this, "onRun: Can't access telephony service."); showError("Error: Could not access the Telephony Service. Is the system running?"); return; @@ -192,9 +192,6 @@ public final class Telecom extends BaseCommand { case COMMAND_ADD_OR_REMOVE_CALL_COMPANION_APP: runAddOrRemoveCallCompanionApp(); break; - case COMMAND_SET_TEST_AUTO_MODE_APP: - runSetTestAutoModeApp(); - break; case COMMAND_SET_PHONE_ACCOUNT_SUGGESTION_COMPONENT: runSetTestPhoneAcctSuggestionComponent(); break; @@ -306,11 +303,6 @@ public final class Telecom extends BaseCommand { mTelecomService.addOrRemoveTestCallCompanionApp(packageName, isAddedBool); } - private void runSetTestAutoModeApp() throws RemoteException { - final String packageName = nextArg(); - mTelecomService.setTestAutoModeApp(packageName); - } - private void runSetTestPhoneAcctSuggestionComponent() throws RemoteException { final String componentName = nextArg(); mTelecomService.setTestPhoneAcctSuggestionComponent(componentName); @@ -362,7 +354,7 @@ public final class Telecom extends BaseCommand { } int numSims = Integer.parseInt(nextArgRequired()); System.out.println("Setting sim count to " + numSims + ". Device may reboot"); - mTelephonyService.switchMultiSimConfig(numSims); + mTelephonyManager.switchMultiSimConfig(numSims); } /** @@ -376,8 +368,7 @@ public final class Telecom extends BaseCommand { private void runGetMaxPhones() throws RemoteException { // This assumes the max number of SIMs is 2, which it currently is - if (TelephonyManager.MULTISIM_ALLOWED - == mTelephonyService.isMultiSimSupported("com.android.commands.telecom")) { + if (TelephonyManager.MULTISIM_ALLOWED == mTelephonyManager.isMultiSimSupported()) { System.out.println("2"); } else { System.out.println("1"); diff --git a/core/java/android/annotation/UnsupportedAppUsage.java b/core/java/android/annotation/UnsupportedAppUsage.java index 204d71d93cd8..1af48cb63079 100644 --- a/core/java/android/annotation/UnsupportedAppUsage.java +++ b/core/java/android/annotation/UnsupportedAppUsage.java @@ -148,6 +148,18 @@ public @interface UnsupportedAppUsage { String publicAlternatives() default ""; /** + * Override the default source position when generating an index of the annotations. + * + * <p>This is intended for use by tools that generate java source code, to point to the + * original source position of the annotation, rather than the position within the generated + * code. It should never be set manually. + * + * <p>The format of the value is "path/to/file:startline:startcol:endline:endcol" indicating + * the position of the annotation itself. + */ + String overrideSourcePosition() default ""; + + /** * Container for {@link UnsupportedAppUsage} that allows it to be applied repeatedly to types. */ @Retention(CLASS) diff --git a/core/java/android/app/IntentService.java b/core/java/android/app/IntentService.java index 11c747f5db17..74fb99a0909f 100644 --- a/core/java/android/app/IntentService.java +++ b/core/java/android/app/IntentService.java @@ -44,13 +44,6 @@ import android.os.Message; * long as necessary (and will not block the application's main loop), but * only one request will be processed at a time. * - * <p class="note"><b>Note:</b> IntentService is subject to all the - * <a href="/preview/features/background.html">background execution limits</a> - * imposed with Android 8.0 (API level 26). In most cases, you are better off - * using {@link android.support.v4.app.JobIntentService}, which uses jobs - * instead of services when running on Android 8.0 or higher. - * </p> - * * <div class="special reference"> * <h3>Developer Guides</h3> * <p>For a detailed discussion about how to create services, read the @@ -59,8 +52,14 @@ import android.os.Message; * </div> * * @see android.support.v4.app.JobIntentService - * @see android.os.AsyncTask + * + * @deprecated IntentService is subject to all the + * <a href="/preview/features/background.html">background execution limits</a> + * imposed with Android 8.0 (API level 26). Consider using {@link androidx.work.WorkManager} + * or {@link androidx.core.app.JobIntentService}, which uses jobs + * instead of services when running on Android 8.0 or higher. */ +@Deprecated public abstract class IntentService extends Service { private volatile Looper mServiceLooper; @UnsupportedAppUsage diff --git a/core/java/android/app/Service.java b/core/java/android/app/Service.java index 1f91b3f431a1..9b62e3b3af98 100644 --- a/core/java/android/app/Service.java +++ b/core/java/android/app/Service.java @@ -57,7 +57,7 @@ import java.lang.annotation.RetentionPolicy; * networking) operations, it should spawn its own thread in which to do that * work. More information on this can be found in * <a href="{@docRoot}guide/topics/fundamentals/processes-and-threads.html">Processes and - * Threads</a>. The {@link IntentService} class is available + * Threads</a>. The {@link androidx.core.app.JobIntentService} class is available * as a standard implementation of Service that has its own thread where it * schedules its work to be done.</p> * diff --git a/core/java/android/app/timedetector/ManualTimeSuggestion.java b/core/java/android/app/timedetector/ManualTimeSuggestion.java index e7d619a27607..471606da4d75 100644 --- a/core/java/android/app/timedetector/ManualTimeSuggestion.java +++ b/core/java/android/app/timedetector/ManualTimeSuggestion.java @@ -85,7 +85,8 @@ public final class ManualTimeSuggestion implements Parcelable { @NonNull public List<String> getDebugInfo() { - return Collections.unmodifiableList(mDebugInfo); + return mDebugInfo == null + ? Collections.emptyList() : Collections.unmodifiableList(mDebugInfo); } /** diff --git a/core/java/android/app/timedetector/PhoneTimeSuggestion.java b/core/java/android/app/timedetector/PhoneTimeSuggestion.java index 233dbbc42f50..dd02af7a3ac7 100644 --- a/core/java/android/app/timedetector/PhoneTimeSuggestion.java +++ b/core/java/android/app/timedetector/PhoneTimeSuggestion.java @@ -23,7 +23,6 @@ import android.os.Parcelable; import android.util.TimestampedValue; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Objects; @@ -52,20 +51,25 @@ public final class PhoneTimeSuggestion implements Parcelable { }; private final int mPhoneId; - @Nullable private TimestampedValue<Long> mUtcTime; + @Nullable private final TimestampedValue<Long> mUtcTime; @Nullable private ArrayList<String> mDebugInfo; - public PhoneTimeSuggestion(int phoneId) { - mPhoneId = phoneId; + private PhoneTimeSuggestion(Builder builder) { + mPhoneId = builder.mPhoneId; + mUtcTime = builder.mUtcTime; + mDebugInfo = builder.mDebugInfo != null ? new ArrayList<>(builder.mDebugInfo) : null; } private static PhoneTimeSuggestion createFromParcel(Parcel in) { int phoneId = in.readInt(); - PhoneTimeSuggestion suggestion = new PhoneTimeSuggestion(phoneId); - suggestion.setUtcTime(in.readParcelable(null /* classLoader */)); + PhoneTimeSuggestion suggestion = new PhoneTimeSuggestion.Builder(phoneId) + .setUtcTime(in.readParcelable(null /* classLoader */)) + .build(); @SuppressWarnings("unchecked") ArrayList<String> debugInfo = (ArrayList<String>) in.readArrayList(null /* classLoader */); - suggestion.mDebugInfo = debugInfo; + if (debugInfo != null) { + suggestion.addDebugInfo(debugInfo); + } return suggestion; } @@ -85,10 +89,6 @@ public final class PhoneTimeSuggestion implements Parcelable { return mPhoneId; } - public void setUtcTime(@Nullable TimestampedValue<Long> utcTime) { - mUtcTime = utcTime; - } - @Nullable public TimestampedValue<Long> getUtcTime() { return mUtcTime; @@ -96,7 +96,8 @@ public final class PhoneTimeSuggestion implements Parcelable { @NonNull public List<String> getDebugInfo() { - return Collections.unmodifiableList(mDebugInfo); + return mDebugInfo == null + ? Collections.emptyList() : Collections.unmodifiableList(mDebugInfo); } /** @@ -104,11 +105,23 @@ public final class PhoneTimeSuggestion implements Parcelable { * information is present in {@link #toString()} but is not considered for * {@link #equals(Object)} and {@link #hashCode()}. */ - public void addDebugInfo(String... debugInfos) { + public void addDebugInfo(String debugInfo) { if (mDebugInfo == null) { mDebugInfo = new ArrayList<>(); } - mDebugInfo.addAll(Arrays.asList(debugInfos)); + mDebugInfo.add(debugInfo); + } + + /** + * Associates information with the instance that can be useful for debugging / logging. The + * information is present in {@link #toString()} but is not considered for + * {@link #equals(Object)} and {@link #hashCode()}. + */ + public void addDebugInfo(@NonNull List<String> debugInfo) { + if (mDebugInfo == null) { + mDebugInfo = new ArrayList<>(debugInfo.size()); + } + mDebugInfo.addAll(debugInfo); } @Override @@ -137,4 +150,39 @@ public final class PhoneTimeSuggestion implements Parcelable { + ", mDebugInfo=" + mDebugInfo + '}'; } + + /** + * Builds {@link PhoneTimeSuggestion} instances. + * + * @hide + */ + public static class Builder { + private final int mPhoneId; + private TimestampedValue<Long> mUtcTime; + private List<String> mDebugInfo; + + public Builder(int phoneId) { + mPhoneId = phoneId; + } + + /** Returns the builder for call chaining. */ + public Builder setUtcTime(TimestampedValue<Long> utcTime) { + mUtcTime = utcTime; + return this; + } + + /** Returns the builder for call chaining. */ + public Builder addDebugInfo(@NonNull String debugInfo) { + if (mDebugInfo == null) { + mDebugInfo = new ArrayList<>(); + } + mDebugInfo.add(debugInfo); + return this; + } + + /** Returns the {@link PhoneTimeSuggestion}. */ + public PhoneTimeSuggestion build() { + return new PhoneTimeSuggestion(this); + } + } } diff --git a/core/java/android/app/timezonedetector/TimeZoneDetector.java b/core/java/android/app/timezonedetector/TimeZoneDetector.java index 909cbc2ccdf7..387a36bba608 100644 --- a/core/java/android/app/timezonedetector/TimeZoneDetector.java +++ b/core/java/android/app/timezonedetector/TimeZoneDetector.java @@ -17,6 +17,7 @@ package android.app.timezonedetector; import android.annotation.NonNull; +import android.annotation.RequiresPermission; import android.annotation.SystemService; import android.content.Context; import android.os.RemoteException; @@ -26,10 +27,11 @@ import android.util.Log; /** * The interface through which system components can send signals to the TimeZoneDetectorService. + * * @hide */ @SystemService(Context.TIME_ZONE_DETECTOR_SERVICE) -public final class TimeZoneDetector { +public class TimeZoneDetector { private static final String TAG = "timezonedetector.TimeZoneDetector"; private static final boolean DEBUG = false; @@ -41,10 +43,11 @@ public final class TimeZoneDetector { } /** - * Suggests the current time zone to the detector. The detector may ignore the signal if better - * signals are available such as those that come from more reliable sources or were - * determined more recently. + * Suggests the current time zone, determined using telephony signals, to the detector. The + * detector may ignore the signal based on system settings, whether better information is + * available, and so on. */ + @RequiresPermission(android.Manifest.permission.SET_TIME_ZONE) public void suggestPhoneTimeZone(@NonNull PhoneTimeZoneSuggestion timeZoneSuggestion) { if (DEBUG) { Log.d(TAG, "suggestPhoneTimeZone called: " + timeZoneSuggestion); @@ -56,4 +59,28 @@ public final class TimeZoneDetector { } } + /** + * Suggests the current time zone, determined for the user's manually information, to the + * detector. The detector may ignore the signal based on system settings. + */ + @RequiresPermission(android.Manifest.permission.SET_TIME_ZONE) + public void suggestManualTimeZone(@NonNull ManualTimeZoneSuggestion timeZoneSuggestion) { + if (DEBUG) { + Log.d(TAG, "suggestManualTimeZone called: " + timeZoneSuggestion); + } + try { + mITimeZoneDetectorService.suggestManualTimeZone(timeZoneSuggestion); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * A shared utility method to create a {@link ManualTimeZoneSuggestion}. + */ + public static ManualTimeZoneSuggestion createManualTimeZoneSuggestion(String tzId, String why) { + ManualTimeZoneSuggestion suggestion = new ManualTimeZoneSuggestion(tzId); + suggestion.addDebugInfo(why); + return suggestion; + } } diff --git a/core/java/android/bluetooth/BluetoothA2dp.java b/core/java/android/bluetooth/BluetoothA2dp.java index accdd8dc64bd..8ed61b6c87e3 100644 --- a/core/java/android/bluetooth/BluetoothA2dp.java +++ b/core/java/android/bluetooth/BluetoothA2dp.java @@ -610,7 +610,7 @@ public final class BluetoothA2dp implements BluetoothProfile { if (uuids == null) return false; for (ParcelUuid uuid : uuids) { - if (BluetoothUuid.isAvrcpTarget(uuid)) { + if (uuid.equals(BluetoothUuid.AVRCP_TARGET)) { return true; } } diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java index 9b5280d48f45..3f8cb627e382 100644 --- a/core/java/android/bluetooth/BluetoothAdapter.java +++ b/core/java/android/bluetooth/BluetoothAdapter.java @@ -862,18 +862,7 @@ public final class BluetoothAdapter { */ @RequiresPermission(Manifest.permission.BLUETOOTH) public boolean isEnabled() { - try { - mServiceLock.readLock().lock(); - if (mService != null) { - return mService.isEnabled(); - } - } catch (RemoteException e) { - Log.e(TAG, "", e); - } finally { - mServiceLock.readLock().unlock(); - } - - return false; + return getState() == BluetoothAdapter.STATE_ON; } /** diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java index 0be3eca8239e..49187dcde342 100644 --- a/core/java/android/bluetooth/BluetoothDevice.java +++ b/core/java/android/bluetooth/BluetoothDevice.java @@ -1131,20 +1131,7 @@ public final class BluetoothDevice implements Parcelable { */ @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN) public boolean createBond() { - final IBluetooth service = sService; - if (service == null) { - Log.e(TAG, "BT not enabled. Cannot create bond to Remote Device"); - return false; - } - try { - Log.i(TAG, "createBond() for device " + getAddress() - + " called by pid: " + Process.myPid() - + " tid: " + Process.myTid()); - return service.createBond(this, TRANSPORT_AUTO); - } catch (RemoteException e) { - Log.e(TAG, "", e); - } - return false; + return createBond(TRANSPORT_AUTO); } /** @@ -1165,23 +1152,7 @@ public final class BluetoothDevice implements Parcelable { */ @UnsupportedAppUsage public boolean createBond(int transport) { - final IBluetooth service = sService; - if (service == null) { - Log.e(TAG, "BT not enabled. Cannot create bond to Remote Device"); - return false; - } - if (TRANSPORT_AUTO > transport || transport > TRANSPORT_LE) { - throw new IllegalArgumentException(transport + " is not a valid Bluetooth transport"); - } - try { - Log.i(TAG, "createBond() for device " + getAddress() - + " called by pid: " + Process.myPid() - + " tid: " + Process.myTid()); - return service.createBond(this, transport); - } catch (RemoteException e) { - Log.e(TAG, "", e); - } - return false; + return createBondOutOfBand(transport, null); } /** @@ -1209,7 +1180,7 @@ public final class BluetoothDevice implements Parcelable { return false; } try { - return service.createBondOutOfBand(this, transport, oobData); + return service.createBond(this, transport, oobData); } catch (RemoteException e) { Log.e(TAG, "", e); } diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java index ea3831a869fc..0955b103a8e8 100644 --- a/core/java/android/bluetooth/BluetoothHeadset.java +++ b/core/java/android/bluetooth/BluetoothHeadset.java @@ -559,7 +559,7 @@ public final class BluetoothHeadset implements BluetoothProfile { * * <p> The device should already be paired. * Priority can be one of {@link BluetoothProfile#PRIORITY_ON} or - * {@link BluetoothProfile#PRIORITY_OFF}, + * {@link BluetoothProfile#PRIORITY_OFF} * * @param device Paired bluetooth device * @param priority @@ -1133,8 +1133,9 @@ public final class BluetoothHeadset implements BluetoothProfile { * is active. * @hide */ + @SystemApi + @Nullable @RequiresPermission(android.Manifest.permission.BLUETOOTH) - @UnsupportedAppUsage public BluetoothDevice getActiveDevice() { if (VDBG) { Log.d(TAG, "getActiveDevice"); diff --git a/core/java/android/bluetooth/BluetoothHeadsetClient.java b/core/java/android/bluetooth/BluetoothHeadsetClient.java index a8e1fd26ad44..7ee29ff1c50b 100644 --- a/core/java/android/bluetooth/BluetoothHeadsetClient.java +++ b/core/java/android/bluetooth/BluetoothHeadsetClient.java @@ -557,7 +557,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile { * Set priority of the profile * * <p> The device should already be paired. - * Priority can be one of {@link #PRIORITY_ON} or {@link #PRIORITY_OFF}, + * Priority can be one of {@link #PRIORITY_ON} or {@link #PRIORITY_OFF} * * @param device Paired bluetooth device * @param priority diff --git a/core/java/android/bluetooth/BluetoothUuid.java b/core/java/android/bluetooth/BluetoothUuid.java index bc3c9a9ebf4b..7e96c23af4b9 100644 --- a/core/java/android/bluetooth/BluetoothUuid.java +++ b/core/java/android/bluetooth/BluetoothUuid.java @@ -16,8 +16,10 @@ package android.bluetooth; +import android.annotation.NonNull; +import android.annotation.Nullable; +import android.annotation.SystemApi; import android.annotation.UnsupportedAppUsage; -import android.os.Build; import android.os.ParcelUuid; import java.nio.ByteBuffer; @@ -31,6 +33,7 @@ import java.util.UUID; * * @hide */ +@SystemApi public final class BluetoothUuid { /* See Bluetooth Assigned Numbers document - SDP section, to get the values of UUIDs @@ -39,167 +42,157 @@ public final class BluetoothUuid { * The following 128 bit values are calculated as: * uuid * 2^96 + BASE_UUID */ - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) - public static final ParcelUuid AudioSink = + + /** @hide */ + @NonNull + @SystemApi + public static final ParcelUuid A2DP_SINK = ParcelUuid.fromString("0000110B-0000-1000-8000-00805F9B34FB"); - public static final ParcelUuid AudioSource = + /** @hide */ + @NonNull + @SystemApi + public static final ParcelUuid A2DP_SOURCE = ParcelUuid.fromString("0000110A-0000-1000-8000-00805F9B34FB"); - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) - public static final ParcelUuid AdvAudioDist = + /** @hide */ + @NonNull + @SystemApi + public static final ParcelUuid ADV_AUDIO_DIST = ParcelUuid.fromString("0000110D-0000-1000-8000-00805F9B34FB"); - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) + /** @hide */ + @NonNull + @SystemApi public static final ParcelUuid HSP = ParcelUuid.fromString("00001108-0000-1000-8000-00805F9B34FB"); + /** @hide */ + @NonNull + @SystemApi public static final ParcelUuid HSP_AG = ParcelUuid.fromString("00001112-0000-1000-8000-00805F9B34FB"); - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) - public static final ParcelUuid Handsfree = + /** @hide */ + @NonNull + @SystemApi + public static final ParcelUuid HFP = ParcelUuid.fromString("0000111E-0000-1000-8000-00805F9B34FB"); - public static final ParcelUuid Handsfree_AG = + /** @hide */ + @NonNull + @SystemApi + public static final ParcelUuid HFP_AG = ParcelUuid.fromString("0000111F-0000-1000-8000-00805F9B34FB"); - public static final ParcelUuid AvrcpController = + /** @hide */ + @NonNull + @SystemApi + public static final ParcelUuid AVRCP_CONTROLLER = ParcelUuid.fromString("0000110E-0000-1000-8000-00805F9B34FB"); - public static final ParcelUuid AvrcpTarget = + /** @hide */ + @NonNull + @SystemApi + public static final ParcelUuid AVRCP_TARGET = ParcelUuid.fromString("0000110C-0000-1000-8000-00805F9B34FB"); - @UnsupportedAppUsage - public static final ParcelUuid ObexObjectPush = + /** @hide */ + @NonNull + @SystemApi + public static final ParcelUuid OBEX_OBJECT_PUSH = ParcelUuid.fromString("00001105-0000-1000-8000-00805f9b34fb"); - public static final ParcelUuid Hid = + /** @hide */ + @NonNull + @SystemApi + public static final ParcelUuid HID = ParcelUuid.fromString("00001124-0000-1000-8000-00805f9b34fb"); - @UnsupportedAppUsage - public static final ParcelUuid Hogp = + /** @hide */ + @NonNull + @SystemApi + public static final ParcelUuid HOGP = ParcelUuid.fromString("00001812-0000-1000-8000-00805f9b34fb"); + /** @hide */ + @NonNull + @SystemApi public static final ParcelUuid PANU = ParcelUuid.fromString("00001115-0000-1000-8000-00805F9B34FB"); - @UnsupportedAppUsage + /** @hide */ + @NonNull + @SystemApi public static final ParcelUuid NAP = ParcelUuid.fromString("00001116-0000-1000-8000-00805F9B34FB"); + /** @hide */ + @NonNull + @SystemApi public static final ParcelUuid BNEP = ParcelUuid.fromString("0000000f-0000-1000-8000-00805F9B34FB"); + /** @hide */ + @NonNull + @SystemApi public static final ParcelUuid PBAP_PCE = ParcelUuid.fromString("0000112e-0000-1000-8000-00805F9B34FB"); - @UnsupportedAppUsage + /** @hide */ + @NonNull + @SystemApi public static final ParcelUuid PBAP_PSE = ParcelUuid.fromString("0000112f-0000-1000-8000-00805F9B34FB"); + /** @hide */ + @NonNull + @SystemApi public static final ParcelUuid MAP = ParcelUuid.fromString("00001134-0000-1000-8000-00805F9B34FB"); + /** @hide */ + @NonNull + @SystemApi public static final ParcelUuid MNS = ParcelUuid.fromString("00001133-0000-1000-8000-00805F9B34FB"); + /** @hide */ + @NonNull + @SystemApi public static final ParcelUuid MAS = ParcelUuid.fromString("00001132-0000-1000-8000-00805F9B34FB"); + /** @hide */ + @NonNull + @SystemApi public static final ParcelUuid SAP = ParcelUuid.fromString("0000112D-0000-1000-8000-00805F9B34FB"); - public static final ParcelUuid HearingAid = + /** @hide */ + @NonNull + @SystemApi + public static final ParcelUuid HEARING_AID = ParcelUuid.fromString("0000FDF0-0000-1000-8000-00805f9b34fb"); + /** @hide */ + @NonNull + @SystemApi public static final ParcelUuid BASE_UUID = ParcelUuid.fromString("00000000-0000-1000-8000-00805F9B34FB"); - /** Length of bytes for 16 bit UUID */ + /** + * Length of bytes for 16 bit UUID + * + * @hide + */ + @SystemApi public static final int UUID_BYTES_16_BIT = 2; - /** Length of bytes for 32 bit UUID */ + /** + * Length of bytes for 32 bit UUID + * + * @hide + */ + @SystemApi public static final int UUID_BYTES_32_BIT = 4; - /** Length of bytes for 128 bit UUID */ - public static final int UUID_BYTES_128_BIT = 16; - - @UnsupportedAppUsage - public static final ParcelUuid[] RESERVED_UUIDS = { - AudioSink, AudioSource, AdvAudioDist, HSP, Handsfree, AvrcpController, AvrcpTarget, - ObexObjectPush, PANU, NAP, MAP, MNS, MAS, SAP}; - - @UnsupportedAppUsage - public static boolean isAudioSource(ParcelUuid uuid) { - return uuid.equals(AudioSource); - } - - public static boolean isAudioSink(ParcelUuid uuid) { - return uuid.equals(AudioSink); - } - - @UnsupportedAppUsage - public static boolean isAdvAudioDist(ParcelUuid uuid) { - return uuid.equals(AdvAudioDist); - } - - public static boolean isHandsfree(ParcelUuid uuid) { - return uuid.equals(Handsfree); - } - - public static boolean isHeadset(ParcelUuid uuid) { - return uuid.equals(HSP); - } - - public static boolean isAvrcpController(ParcelUuid uuid) { - return uuid.equals(AvrcpController); - } - - @UnsupportedAppUsage - public static boolean isAvrcpTarget(ParcelUuid uuid) { - return uuid.equals(AvrcpTarget); - } - - public static boolean isInputDevice(ParcelUuid uuid) { - return uuid.equals(Hid); - } - - public static boolean isPanu(ParcelUuid uuid) { - return uuid.equals(PANU); - } - - public static boolean isNap(ParcelUuid uuid) { - return uuid.equals(NAP); - } - - public static boolean isBnep(ParcelUuid uuid) { - return uuid.equals(BNEP); - } - - public static boolean isMap(ParcelUuid uuid) { - return uuid.equals(MAP); - } - - public static boolean isMns(ParcelUuid uuid) { - return uuid.equals(MNS); - } - - public static boolean isMas(ParcelUuid uuid) { - return uuid.equals(MAS); - } - - public static boolean isSap(ParcelUuid uuid) { - return uuid.equals(SAP); - } - /** - * Returns true if ParcelUuid is present in uuidArray + * Length of bytes for 128 bit UUID * - * @param uuidArray - Array of ParcelUuids - * @param uuid + * @hide */ - @UnsupportedAppUsage - public static boolean isUuidPresent(ParcelUuid[] uuidArray, ParcelUuid uuid) { - if ((uuidArray == null || uuidArray.length == 0) && uuid == null) { - return true; - } - - if (uuidArray == null) { - return false; - } - - for (ParcelUuid element : uuidArray) { - if (element.equals(uuid)) return true; - } - return false; - } + @SystemApi + public static final int UUID_BYTES_128_BIT = 16; /** * Returns true if there any common ParcelUuids in uuidA and uuidB. * * @param uuidA - List of ParcelUuids * @param uuidB - List of ParcelUuids + * + * @hide */ - @UnsupportedAppUsage - public static boolean containsAnyUuid(ParcelUuid[] uuidA, ParcelUuid[] uuidB) { + @SystemApi + public static boolean containsAnyUuid(@Nullable ParcelUuid[] uuidA, + @Nullable ParcelUuid[] uuidB) { if (uuidA == null && uuidB == null) return true; if (uuidA == null) { @@ -218,29 +211,6 @@ public final class BluetoothUuid { } /** - * Returns true if all the ParcelUuids in ParcelUuidB are present in - * ParcelUuidA - * - * @param uuidA - Array of ParcelUuidsA - * @param uuidB - Array of ParcelUuidsB - */ - public static boolean containsAllUuids(ParcelUuid[] uuidA, ParcelUuid[] uuidB) { - if (uuidA == null && uuidB == null) return true; - - if (uuidA == null) { - return uuidB.length == 0; - } - - if (uuidB == null) return true; - - HashSet<ParcelUuid> uuidSet = new HashSet<ParcelUuid>(Arrays.asList(uuidA)); - for (ParcelUuid uuid : uuidB) { - if (!uuidSet.contains(uuid)) return false; - } - return true; - } - - /** * Extract the Service Identifier or the actual uuid from the Parcel Uuid. * For example, if 0000110B-0000-1000-8000-00805F9B34FB is the parcel Uuid, * this function will return 110B @@ -248,7 +218,7 @@ public final class BluetoothUuid { * @param parcelUuid * @return the service identifier. */ - public static int getServiceIdentifierFromParcelUuid(ParcelUuid parcelUuid) { + private static int getServiceIdentifierFromParcelUuid(ParcelUuid parcelUuid) { UUID uuid = parcelUuid.getUuid(); long value = (uuid.getMostSignificantBits() & 0xFFFFFFFF00000000L) >>> 32; return (int) value; @@ -262,8 +232,12 @@ public final class BluetoothUuid { * @param uuidBytes Byte representation of uuid. * @return {@link ParcelUuid} parsed from bytes. * @throws IllegalArgumentException If the {@code uuidBytes} cannot be parsed. + * + * @hide */ - public static ParcelUuid parseUuidFrom(byte[] uuidBytes) { + @NonNull + @SystemApi + public static ParcelUuid parseUuidFrom(@Nullable byte[] uuidBytes) { if (uuidBytes == null) { throw new IllegalArgumentException("uuidBytes cannot be null"); } @@ -305,6 +279,8 @@ public final class BluetoothUuid { * @param uuid uuid to parse. * @return shortest representation of {@code uuid} as bytes. * @throws IllegalArgumentException If the {@code uuid} is null. + * + * @hide */ public static byte[] uuidToBytes(ParcelUuid uuid) { if (uuid == null) { @@ -345,6 +321,8 @@ public final class BluetoothUuid { * * @param parcelUuid * @return true if the parcelUuid can be converted to 16 bit uuid, false otherwise. + * + * @hide */ @UnsupportedAppUsage public static boolean is16BitUuid(ParcelUuid parcelUuid) { @@ -361,6 +339,8 @@ public final class BluetoothUuid { * * @param parcelUuid * @return true if the parcelUuid can be converted to 32 bit uuid, false otherwise. + * + * @hide */ @UnsupportedAppUsage public static boolean is32BitUuid(ParcelUuid parcelUuid) { @@ -373,4 +353,6 @@ public final class BluetoothUuid { } return ((uuid.getMostSignificantBits() & 0xFFFFFFFFL) == 0x1000L); } + + private BluetoothUuid() {} } diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index 56bacf29ac73..a6e070e54e87 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -1006,7 +1006,7 @@ public class ConnectivityManager { * * @hide */ - @RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL) + @RequiresPermission(android.Manifest.permission.NETWORK_STACK) @Nullable public Network getActiveNetworkForUid(int uid) { return getActiveNetworkForUid(uid, false); @@ -1135,7 +1135,7 @@ public class ConnectivityManager { * * {@hide} */ - @RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL) + @RequiresPermission(android.Manifest.permission.NETWORK_STACK) @UnsupportedAppUsage public NetworkInfo getActiveNetworkInfoForUid(int uid) { return getActiveNetworkInfoForUid(uid, false); @@ -1370,10 +1370,14 @@ public class ConnectivityManager { * The system network validation may be using different strategies to detect captive portals, * so this method does not necessarily return a URL used by the system. It only returns a URL * that may be relevant for other components trying to detect captive portals. + * * @hide + * @deprecated This API returns URL which is not guaranteed to be one of the URLs used by the + * system. */ + @Deprecated @SystemApi - @RequiresPermission(android.Manifest.permission.LOCAL_MAC_ADDRESS) + @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public String getCaptivePortalServerUrl() { try { return mService.getCaptivePortalServerUrl(); @@ -2400,6 +2404,7 @@ public class ConnectivityManager { * @return an array of 0 or more {@code String} of tethered dhcp ranges. * {@hide} */ + @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public String[] getTetheredDhcpRanges() { try { return mService.getTetheredDhcpRanges(); @@ -2979,7 +2984,7 @@ public class ConnectivityManager { * HTTP proxy. A {@code null} value will clear the global HTTP proxy. * @hide */ - @RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL) + @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setGlobalProxy(ProxyInfo p) { try { mService.setGlobalProxy(p); @@ -3124,6 +3129,7 @@ public class ConnectivityManager { * Get the mobile provisioning url. * {@hide} */ + @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public String getMobileProvisioningUrl() { try { return mService.getMobileProvisioningUrl(); @@ -3170,6 +3176,7 @@ public class ConnectivityManager { /** {@hide} - returns the factory serial number */ @UnsupportedAppUsage + @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public int registerNetworkFactory(Messenger messenger, String name) { try { return mService.registerNetworkFactory(messenger, name); @@ -3180,6 +3187,7 @@ public class ConnectivityManager { /** {@hide} */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) + @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public void unregisterNetworkFactory(Messenger messenger) { try { mService.unregisterNetworkFactory(messenger); @@ -3197,6 +3205,7 @@ public class ConnectivityManager { * Register a NetworkAgent with ConnectivityService. * @return NetID corresponding to NetworkAgent. */ + @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public int registerNetworkAgent(Messenger messenger, NetworkInfo ni, LinkProperties lp, NetworkCapabilities nc, int score, NetworkMisc misc) { return registerNetworkAgent(messenger, ni, lp, nc, score, misc, @@ -3208,6 +3217,7 @@ public class ConnectivityManager { * Register a NetworkAgent with ConnectivityService. * @return NetID corresponding to NetworkAgent. */ + @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public int registerNetworkAgent(Messenger messenger, NetworkInfo ni, LinkProperties lp, NetworkCapabilities nc, int score, NetworkMisc misc, int factorySerialNumber) { try { @@ -4202,7 +4212,7 @@ public class ConnectivityManager { * * @hide */ - @RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL) + @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void startCaptivePortalApp(Network network) { try { mService.startCaptivePortalApp(network); @@ -4318,6 +4328,7 @@ public class ConnectivityManager { * Resets all connectivity manager settings back to factory defaults. * @hide */ + @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void factoryReset() { try { mService.factoryReset(); diff --git a/core/java/android/net/MacAddress.aidl b/core/java/android/net/MacAddress.aidl new file mode 100644 index 000000000000..48a18a7ac821 --- /dev/null +++ b/core/java/android/net/MacAddress.aidl @@ -0,0 +1,20 @@ +/** + * + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.net; + +@JavaOnlyStableParcelable parcelable MacAddress; diff --git a/core/java/android/net/Network.java b/core/java/android/net/Network.java index 3f56def6d7d5..f12ba1367d98 100644 --- a/core/java/android/net/Network.java +++ b/core/java/android/net/Network.java @@ -63,7 +63,7 @@ public class Network implements Parcelable { /** * @hide */ - @UnsupportedAppUsage + @SystemApi public final int netId; // Objects used to perform per-network operations such as getSocketFactory diff --git a/core/java/android/net/TrafficStats.java b/core/java/android/net/TrafficStats.java index 1c6a48434adc..bf4884aa96a7 100644 --- a/core/java/android/net/TrafficStats.java +++ b/core/java/android/net/TrafficStats.java @@ -16,6 +16,7 @@ package android.net; +import android.annotation.NonNull; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.annotation.TestApi; @@ -595,8 +596,15 @@ public class TrafficStats { return total; } - /** {@hide} */ - public static long getTxPackets(String iface) { + /** + * Return the number of packets transmitted on the specified interface since + * device boot. Statistics are measured at the network layer, so both TCP and + * UDP usage are included. + * + * @param iface The name of the interface. + * @return The number of transmitted packets. + */ + public static long getTxPackets(@NonNull String iface) { try { return getStatsService().getIfaceStats(iface, TYPE_TX_PACKETS); } catch (RemoteException e) { @@ -604,8 +612,15 @@ public class TrafficStats { } } - /** {@hide} */ - public static long getRxPackets(String iface) { + /** + * Return the number of packets received on the specified interface since + * device boot. Statistics are measured at the network layer, so both TCP + * and UDP usage are included. + * + * @param iface The name of the interface. + * @return The number of received packets. + */ + public static long getRxPackets(@NonNull String iface) { try { return getStatsService().getIfaceStats(iface, TYPE_RX_PACKETS); } catch (RemoteException e) { diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java index 387775b7ccdc..d016ec4d7c7b 100644 --- a/core/java/android/os/BatteryStats.java +++ b/core/java/android/os/BatteryStats.java @@ -27,7 +27,7 @@ import android.content.pm.ApplicationInfo; import android.server.ServerProtoEnums; import android.service.batterystats.BatteryStatsServiceDumpHistoryProto; import android.service.batterystats.BatteryStatsServiceDumpProto; -import android.telephony.SignalStrength; +import android.telephony.CellSignalStrength; import android.telephony.TelephonyManager; import android.text.format.DateFormat; import android.util.ArrayMap; @@ -2509,7 +2509,7 @@ public abstract class BatteryStats implements Parcelable { new String[] {"in", "out", "em", "off"}), new BitDescription(HistoryItem.STATE_PHONE_SIGNAL_STRENGTH_MASK, HistoryItem.STATE_PHONE_SIGNAL_STRENGTH_SHIFT, "phone_signal_strength", "Pss", - SignalStrength.SIGNAL_STRENGTH_NAMES, + new String[] { "none", "poor", "moderate", "good", "great" }, new String[] { "0", "1", "2", "3", "4" }), new BitDescription(HistoryItem.STATE_BRIGHTNESS_MASK, HistoryItem.STATE_BRIGHTNESS_SHIFT, "brightness", "Sb", @@ -3856,14 +3856,14 @@ public abstract class BatteryStats implements Parcelable { dumpLine(pw, 0 /* uid */, category, SCREEN_BRIGHTNESS_DATA, args); // Dump signal strength stats - args = new Object[SignalStrength.NUM_SIGNAL_STRENGTH_BINS]; - for (int i=0; i<SignalStrength.NUM_SIGNAL_STRENGTH_BINS; i++) { + args = new Object[CellSignalStrength.getNumSignalStrengthLevels()]; + for (int i = 0; i < CellSignalStrength.getNumSignalStrengthLevels(); i++) { args[i] = getPhoneSignalStrengthTime(i, rawRealtime, which) / 1000; } dumpLine(pw, 0 /* uid */, category, SIGNAL_STRENGTH_TIME_DATA, args); dumpLine(pw, 0 /* uid */, category, SIGNAL_SCANNING_TIME_DATA, getPhoneSignalScanningTime(rawRealtime, which) / 1000); - for (int i=0; i<SignalStrength.NUM_SIGNAL_STRENGTH_BINS; i++) { + for (int i = 0; i < CellSignalStrength.getNumSignalStrengthLevels(); i++) { args[i] = getPhoneSignalStrengthCount(i, which); } dumpLine(pw, 0 /* uid */, category, SIGNAL_STRENGTH_COUNT_DATA, args); @@ -4931,7 +4931,7 @@ public abstract class BatteryStats implements Parcelable { "good (-108dBm to -98dBm): ", "great (greater than -98dBm): "}; didOne = false; - final int numCellularRxBins = Math.min(SignalStrength.NUM_SIGNAL_STRENGTH_BINS, + final int numCellularRxBins = Math.min(CellSignalStrength.getNumSignalStrengthLevels(), cellularRxSignalStrengthDescription.length); for (int i=0; i<numCellularRxBins; i++) { final long time = getPhoneSignalStrengthTime(i, rawRealtime, which); @@ -8186,7 +8186,7 @@ public abstract class BatteryStats implements Parcelable { which); // Phone signal strength (SIGNAL_STRENGTH_TIME_DATA and SIGNAL_STRENGTH_COUNT_DATA) - for (int i = 0; i < SignalStrength.NUM_SIGNAL_STRENGTH_BINS; ++i) { + for (int i = 0; i < CellSignalStrength.getNumSignalStrengthLevels(); ++i) { final long pssToken = proto.start(SystemProto.PHONE_SIGNAL_STRENGTH); proto.write(SystemProto.PhoneSignalStrength.NAME, i); dumpTimer(proto, SystemProto.PhoneSignalStrength.TOTAL, getPhoneSignalStrengthTimer(i), diff --git a/core/java/android/os/connectivity/CellularBatteryStats.java b/core/java/android/os/connectivity/CellularBatteryStats.java index 2e0904048d40..6adab0644cb5 100644 --- a/core/java/android/os/connectivity/CellularBatteryStats.java +++ b/core/java/android/os/connectivity/CellularBatteryStats.java @@ -18,9 +18,8 @@ package android.os.connectivity; import android.os.BatteryStats; import android.os.Parcel; import android.os.Parcelable; - +import android.telephony.CellSignalStrength; import android.telephony.ModemActivityInfo; -import android.telephony.SignalStrength; import java.util.Arrays; @@ -209,7 +208,7 @@ public final class CellularBatteryStats implements Parcelable { public void setTimeInRxSignalStrengthLevelMs(long[] t) { mTimeInRxSignalStrengthLevelMs = Arrays.copyOfRange(t, 0, - Math.min(t.length, SignalStrength.NUM_SIGNAL_STRENGTH_BINS)); + Math.min(t.length, CellSignalStrength.getNumSignalStrengthLevels())); return; } @@ -245,11 +244,11 @@ public final class CellularBatteryStats implements Parcelable { mEnergyConsumedMaMs = 0; mTimeInRatMs = new long[BatteryStats.NUM_DATA_CONNECTION_TYPES]; Arrays.fill(mTimeInRatMs, 0); - mTimeInRxSignalStrengthLevelMs = new long[SignalStrength.NUM_SIGNAL_STRENGTH_BINS]; + mTimeInRxSignalStrengthLevelMs = new long[CellSignalStrength.getNumSignalStrengthLevels()]; Arrays.fill(mTimeInRxSignalStrengthLevelMs, 0); mTxTimeMs = new long[ModemActivityInfo.TX_POWER_LEVELS]; Arrays.fill(mTxTimeMs, 0); mMonitoredRailChargeConsumedMaMs = 0; return; } -}
\ No newline at end of file +} diff --git a/core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl b/core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl new file mode 100644 index 000000000000..0ae353d2741f --- /dev/null +++ b/core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.os.incremental; + +/** + * Wraps two file descriptors that Incremental Service uses to communicate + * with Incremental FileSystem. + * @hide + */ +parcelable IncrementalFileSystemControlParcel { + @nullable ParcelFileDescriptor cmd; + @nullable ParcelFileDescriptor log; +} diff --git a/core/java/android/provider/BlockedNumberContract.java b/core/java/android/provider/BlockedNumberContract.java index dd2ea81d747b..1eb76648f7b2 100644 --- a/core/java/android/provider/BlockedNumberContract.java +++ b/core/java/android/provider/BlockedNumberContract.java @@ -16,6 +16,7 @@ package android.provider; import android.annotation.IntDef; +import android.annotation.SystemApi; import android.annotation.WorkerThread; import android.content.Context; import android.net.Uri; @@ -239,6 +240,7 @@ public class BlockedNumberContract { * blocked. * @hide */ + @SystemApi public static final int STATUS_NOT_BLOCKED = 0; /** @@ -246,6 +248,7 @@ public class BlockedNumberContract { * because it is in the list of blocked numbers maintained by the provider. * @hide */ + @SystemApi public static final int STATUS_BLOCKED_IN_LIST = 1; /** @@ -253,6 +256,7 @@ public class BlockedNumberContract { * because it is from a restricted number. * @hide */ + @SystemApi public static final int STATUS_BLOCKED_RESTRICTED = 2; /** @@ -260,6 +264,7 @@ public class BlockedNumberContract { * because it is from an unknown number. * @hide */ + @SystemApi public static final int STATUS_BLOCKED_UNKNOWN_NUMBER = 3; /** @@ -267,6 +272,7 @@ public class BlockedNumberContract { * because it is from a pay phone. * @hide */ + @SystemApi public static final int STATUS_BLOCKED_PAYPHONE = 4; /** @@ -274,12 +280,14 @@ public class BlockedNumberContract { * because it is from a number not in the users contacts. * @hide */ + @SystemApi public static final int STATUS_BLOCKED_NOT_IN_CONTACTS = 5; /** * Integer reason indicating whether a call was blocked, and if so why. * @hide */ + @SystemApi public static final String RES_BLOCK_STATUS = "block_status"; /** @hide */ @@ -290,6 +298,31 @@ public class BlockedNumberContract { "can_current_user_block_numbers"; /** @hide */ + @SystemApi + public static final String METHOD_NOTIFY_EMERGENCY_CONTACT = "notify_emergency_contact"; + + /** @hide */ + public static final String METHOD_END_BLOCK_SUPPRESSION = "end_block_suppression"; + + /** @hide */ + @SystemApi + public static final String METHOD_SHOULD_SYSTEM_BLOCK_NUMBER = "should_system_block_number"; + + /** @hide */ + public static final String METHOD_GET_BLOCK_SUPPRESSION_STATUS = + "get_block_suppression_status"; + + /** @hide */ + public static final String METHOD_SHOULD_SHOW_EMERGENCY_CALL_NOTIFICATION = + "should_show_emergency_call_notification"; + + /** @hide */ + public static final String METHOD_GET_ENHANCED_BLOCK_SETTING = "get_enhanced_block_setting"; + + /** @hide */ + public static final String METHOD_SET_ENHANCED_BLOCK_SETTING = "set_enhanced_block_setting"; + + /** @hide */ public static final String RES_CAN_BLOCK_NUMBERS = "can_block"; /** @hide */ @@ -406,26 +439,11 @@ public class BlockedNumberContract { public static final String ACTION_BLOCK_SUPPRESSION_STATE_CHANGED = "android.provider.action.BLOCK_SUPPRESSION_STATE_CHANGED"; - public static final String METHOD_NOTIFY_EMERGENCY_CONTACT = "notify_emergency_contact"; - - public static final String METHOD_END_BLOCK_SUPPRESSION = "end_block_suppression"; - - public static final String METHOD_SHOULD_SYSTEM_BLOCK_NUMBER = "should_system_block_number"; - - public static final String METHOD_GET_BLOCK_SUPPRESSION_STATUS = - "get_block_suppression_status"; - - public static final String METHOD_SHOULD_SHOW_EMERGENCY_CALL_NOTIFICATION = - "should_show_emergency_call_notification"; - public static final String RES_IS_BLOCKING_SUPPRESSED = "blocking_suppressed"; public static final String RES_BLOCKING_SUPPRESSED_UNTIL_TIMESTAMP = "blocking_suppressed_until_timestamp"; - public static final String METHOD_GET_ENHANCED_BLOCK_SETTING = "get_enhanced_block_setting"; - public static final String METHOD_SET_ENHANCED_BLOCK_SETTING = "set_enhanced_block_setting"; - /* Preference key of block numbers not in contacts setting. */ public static final String ENHANCED_SETTING_KEY_BLOCK_UNREGISTERED = "block_numbers_not_in_contacts_setting"; diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java index 5063b2c698a3..ebdde0a54a86 100644 --- a/core/java/android/provider/Telephony.java +++ b/core/java/android/provider/Telephony.java @@ -45,7 +45,6 @@ import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.Patterns; -import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.SmsApplication; import java.lang.annotation.Retention; @@ -1344,7 +1343,7 @@ public final class Telephony { } String format = intent.getStringExtra("format"); - int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, + int subId = intent.getIntExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, SubscriptionManager.getDefaultSmsSubscriptionId()); Rlog.v(TAG, " getMessagesFromIntent sub_id : " + subId); @@ -4055,9 +4054,7 @@ public final class Telephony { /** * The subscription which received this cell broadcast message. - * @deprecated use {@link #SLOT_INDEX} instead. * <P>Type: INTEGER</P> - * @hide */ public static final String SUB_ID = "sub_id"; @@ -4331,6 +4328,7 @@ public final class Telephony { public static final String[] QUERY_COLUMNS_FWK = { _ID, SLOT_INDEX, + SUB_ID, GEOGRAPHICAL_SCOPE, PLMN, LAC, diff --git a/telephony/java/android/telephony/DataConnectionRealTimeInfo.aidl b/core/java/android/telephony/DataConnectionRealTimeInfo.aidl index 70fbb1180e15..70fbb1180e15 100644 --- a/telephony/java/android/telephony/DataConnectionRealTimeInfo.aidl +++ b/core/java/android/telephony/DataConnectionRealTimeInfo.aidl diff --git a/telephony/java/android/telephony/DataConnectionRealTimeInfo.java b/core/java/android/telephony/DataConnectionRealTimeInfo.java index 8106f5f30d26..8106f5f30d26 100644 --- a/telephony/java/android/telephony/DataConnectionRealTimeInfo.java +++ b/core/java/android/telephony/DataConnectionRealTimeInfo.java diff --git a/telephony/java/android/telephony/SubscriptionPlan.aidl b/core/java/android/telephony/SubscriptionPlan.aidl index 655df3a71b3d..655df3a71b3d 100755 --- a/telephony/java/android/telephony/SubscriptionPlan.aidl +++ b/core/java/android/telephony/SubscriptionPlan.aidl diff --git a/telephony/java/android/telephony/SubscriptionPlan.java b/core/java/android/telephony/SubscriptionPlan.java index ec2050fb1a44..ec2050fb1a44 100644 --- a/telephony/java/android/telephony/SubscriptionPlan.java +++ b/core/java/android/telephony/SubscriptionPlan.java diff --git a/core/java/android/telephony/TelephonyRegistryManager.java b/core/java/android/telephony/TelephonyRegistryManager.java index 5c427309e823..308c8b3c9833 100644 --- a/core/java/android/telephony/TelephonyRegistryManager.java +++ b/core/java/android/telephony/TelephonyRegistryManager.java @@ -463,6 +463,19 @@ public class TelephonyRegistryManager { } /** + * Sim activation type: voice + * @see #notifyVoiceActivationStateChanged + * @hide + */ + public static final int SIM_ACTIVATION_TYPE_VOICE = 0; + /** + * Sim activation type: data + * @see #notifyDataActivationStateChanged + * @hide + */ + public static final int SIM_ACTIVATION_TYPE_DATA = 1; + + /** * Notify data activation state changed on certain subscription. * @see TelephonyManager#getDataActivationState() * @@ -477,7 +490,7 @@ public class TelephonyRegistryManager { @SimActivationState int activationState) { try { sRegistry.notifySimActivationStateChangedForPhoneId(slotIndex, subId, - TelephonyManager.SIM_ACTIVATION_TYPE_DATA, activationState); + SIM_ACTIVATION_TYPE_DATA, activationState); } catch (RemoteException ex) { // system process is dead } @@ -498,7 +511,7 @@ public class TelephonyRegistryManager { @SimActivationState int activationState) { try { sRegistry.notifySimActivationStateChangedForPhoneId(slotIndex, subId, - TelephonyManager.SIM_ACTIVATION_TYPE_VOICE, activationState); + SIM_ACTIVATION_TYPE_VOICE, activationState); } catch (RemoteException ex) { // system process is dead } diff --git a/core/java/com/android/internal/compat/CompatibilityChangeInfo.java b/core/java/com/android/internal/compat/CompatibilityChangeInfo.java index e48e2df4043c..16628d71712c 100644 --- a/core/java/com/android/internal/compat/CompatibilityChangeInfo.java +++ b/core/java/com/android/internal/compat/CompatibilityChangeInfo.java @@ -30,6 +30,7 @@ public class CompatibilityChangeInfo implements Parcelable { private final @Nullable String mName; private final int mEnableAfterTargetSdk; private final boolean mDisabled; + private final @Nullable String mDescription; public long getId() { return mChangeId; @@ -48,12 +49,18 @@ public class CompatibilityChangeInfo implements Parcelable { return mDisabled; } + public String getDescription() { + return mDescription; + } + public CompatibilityChangeInfo( - Long changeId, String name, int enableAfterTargetSdk, boolean disabled) { + Long changeId, String name, int enableAfterTargetSdk, boolean disabled, + String description) { this.mChangeId = changeId; this.mName = name; this.mEnableAfterTargetSdk = enableAfterTargetSdk; this.mDisabled = disabled; + this.mDescription = description; } private CompatibilityChangeInfo(Parcel in) { @@ -61,6 +68,7 @@ public class CompatibilityChangeInfo implements Parcelable { mName = in.readString(); mEnableAfterTargetSdk = in.readInt(); mDisabled = in.readBoolean(); + mDescription = in.readString(); } @Override @@ -74,6 +82,7 @@ public class CompatibilityChangeInfo implements Parcelable { dest.writeString(mName); dest.writeInt(mEnableAfterTargetSdk); dest.writeBoolean(mDisabled); + dest.writeString(mDescription); } public static final Parcelable.Creator<CompatibilityChangeInfo> CREATOR = diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java index e1a640eeaf5b..427474c2962a 100644 --- a/core/java/com/android/internal/os/BatteryStatsImpl.java +++ b/core/java/com/android/internal/os/BatteryStatsImpl.java @@ -58,6 +58,7 @@ import android.os.connectivity.CellularBatteryStats; import android.os.connectivity.GpsBatteryStats; import android.os.connectivity.WifiBatteryStats; import android.provider.Settings; +import android.telephony.CellSignalStrength; import android.telephony.DataConnectionRealTimeInfo; import android.telephony.ModemActivityInfo; import android.telephony.ServiceState; @@ -830,7 +831,7 @@ public class BatteryStatsImpl extends BatteryStats { int mPhoneSignalStrengthBin = -1; int mPhoneSignalStrengthBinRaw = -1; final StopwatchTimer[] mPhoneSignalStrengthsTimer = - new StopwatchTimer[SignalStrength.NUM_SIGNAL_STRENGTH_BINS]; + new StopwatchTimer[CellSignalStrength.getNumSignalStrengthLevels()]; StopwatchTimer mPhoneSignalScanningTimer; @@ -5130,7 +5131,7 @@ public class BatteryStatsImpl extends BatteryStats { void stopAllPhoneSignalStrengthTimersLocked(int except) { final long elapsedRealtime = mClocks.elapsedRealtime(); - for (int i = 0; i < SignalStrength.NUM_SIGNAL_STRENGTH_BINS; i++) { + for (int i = 0; i < CellSignalStrength.getNumSignalStrengthLevels(); i++) { if (i == except) { continue; } @@ -5145,7 +5146,7 @@ public class BatteryStatsImpl extends BatteryStats { // In this case we will always be STATE_OUT_OF_SERVICE, so need // to infer that we are scanning from other data. if (state == ServiceState.STATE_OUT_OF_SERVICE - && signalBin > SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { + && signalBin > CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { state = ServiceState.STATE_IN_SERVICE; } } @@ -5168,7 +5169,7 @@ public class BatteryStatsImpl extends BatteryStats { // In this case we will always be STATE_OUT_OF_SERVICE, so need // to infer that we are scanning from other data. if (state == ServiceState.STATE_OUT_OF_SERVICE - && strengthBin > SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { + && strengthBin > CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { state = ServiceState.STATE_IN_SERVICE; } } @@ -5185,7 +5186,7 @@ public class BatteryStatsImpl extends BatteryStats { // bin and have the scanning bit set. } else if (state == ServiceState.STATE_OUT_OF_SERVICE) { scanning = true; - strengthBin = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; + strengthBin = CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; if (!mPhoneSignalScanningTimer.isRunningLocked()) { mHistoryCur.states |= HistoryItem.STATE_PHONE_SCANNING_FLAG; newHistory = true; @@ -9785,7 +9786,7 @@ public class BatteryStatsImpl extends BatteryStats { mDeviceLightIdlingTimer = new StopwatchTimer(mClocks, null, -15, null, mOnBatteryTimeBase); mDeviceIdlingTimer = new StopwatchTimer(mClocks, null, -12, null, mOnBatteryTimeBase); mPhoneOnTimer = new StopwatchTimer(mClocks, null, -3, null, mOnBatteryTimeBase); - for (int i=0; i<SignalStrength.NUM_SIGNAL_STRENGTH_BINS; i++) { + for (int i = 0; i < CellSignalStrength.getNumSignalStrengthLevels(); i++) { mPhoneSignalStrengthsTimer[i] = new StopwatchTimer(mClocks, null, -200-i, null, mOnBatteryTimeBase); } @@ -10494,7 +10495,7 @@ public class BatteryStatsImpl extends BatteryStats { mFlashlightOnTimer.reset(false); mCameraOnTimer.reset(false); mBluetoothScanTimer.reset(false); - for (int i=0; i<SignalStrength.NUM_SIGNAL_STRENGTH_BINS; i++) { + for (int i = 0; i < CellSignalStrength.getNumSignalStrengthLevels(); i++) { mPhoneSignalStrengthsTimer[i].reset(false); } mPhoneSignalScanningTimer.reset(false); @@ -11055,7 +11056,7 @@ public class BatteryStatsImpl extends BatteryStats { mPowerProfile.getAveragePower(PowerProfile.POWER_MODEM_CONTROLLER_RX); int[] txTimeMs = deltaInfo.getTxTimeMillis(); for (int i = 0; i < Math.min(txTimeMs.length, - SignalStrength.NUM_SIGNAL_STRENGTH_BINS); i++) { + CellSignalStrength.getNumSignalStrengthLevels()); i++) { energyUsed += txTimeMs[i] * mPowerProfile.getAveragePower( PowerProfile.POWER_MODEM_CONTROLLER_TX, i); } @@ -12604,7 +12605,8 @@ public class BatteryStatsImpl extends BatteryStats { for (int i = 0; i < timeInRatMs.length; i++) { timeInRatMs[i] = getPhoneDataConnectionTime(i, rawRealTime, which) / 1000; } - long[] timeInRxSignalStrengthLevelMs = new long[SignalStrength.NUM_SIGNAL_STRENGTH_BINS]; + long[] timeInRxSignalStrengthLevelMs = + new long[CellSignalStrength.getNumSignalStrengthLevels()]; for (int i = 0; i < timeInRxSignalStrengthLevelMs.length; i++) { timeInRxSignalStrengthLevelMs[i] = getPhoneSignalStrengthTime(i, rawRealTime, which) / 1000; @@ -13608,7 +13610,7 @@ public class BatteryStatsImpl extends BatteryStats { mDeviceLightIdlingTimer.readSummaryFromParcelLocked(in); mDeviceIdlingTimer.readSummaryFromParcelLocked(in); mPhoneOnTimer.readSummaryFromParcelLocked(in); - for (int i=0; i<SignalStrength.NUM_SIGNAL_STRENGTH_BINS; i++) { + for (int i = 0; i < CellSignalStrength.getNumSignalStrengthLevels(); i++) { mPhoneSignalStrengthsTimer[i].readSummaryFromParcelLocked(in); } mPhoneSignalScanningTimer.readSummaryFromParcelLocked(in); @@ -14093,7 +14095,7 @@ public class BatteryStatsImpl extends BatteryStats { mDeviceLightIdlingTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS); mDeviceIdlingTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS); mPhoneOnTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS); - for (int i=0; i<SignalStrength.NUM_SIGNAL_STRENGTH_BINS; i++) { + for (int i = 0; i < CellSignalStrength.getNumSignalStrengthLevels(); i++) { mPhoneSignalStrengthsTimer[i].writeSummaryFromParcelLocked(out, NOWREAL_SYS); } mPhoneSignalScanningTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS); @@ -14571,7 +14573,7 @@ public class BatteryStatsImpl extends BatteryStats { mOnBatteryTimeBase, in); mDeviceIdlingTimer = new StopwatchTimer(mClocks, null, -12, null, mOnBatteryTimeBase, in); mPhoneOnTimer = new StopwatchTimer(mClocks, null, -3, null, mOnBatteryTimeBase, in); - for (int i=0; i<SignalStrength.NUM_SIGNAL_STRENGTH_BINS; i++) { + for (int i = 0; i < CellSignalStrength.getNumSignalStrengthLevels(); i++) { mPhoneSignalStrengthsTimer[i] = new StopwatchTimer(mClocks, null, -200-i, null, mOnBatteryTimeBase, in); } @@ -14790,7 +14792,7 @@ public class BatteryStatsImpl extends BatteryStats { mDeviceLightIdlingTimer.writeToParcel(out, uSecRealtime); mDeviceIdlingTimer.writeToParcel(out, uSecRealtime); mPhoneOnTimer.writeToParcel(out, uSecRealtime); - for (int i=0; i<SignalStrength.NUM_SIGNAL_STRENGTH_BINS; i++) { + for (int i = 0; i < CellSignalStrength.getNumSignalStrengthLevels(); i++) { mPhoneSignalStrengthsTimer[i].writeToParcel(out, uSecRealtime); } mPhoneSignalScanningTimer.writeToParcel(out, uSecRealtime); @@ -14981,7 +14983,7 @@ public class BatteryStatsImpl extends BatteryStats { mDeviceIdlingTimer.logState(pr, " "); pr.println("*** Phone timer:"); mPhoneOnTimer.logState(pr, " "); - for (int i=0; i<SignalStrength.NUM_SIGNAL_STRENGTH_BINS; i++) { + for (int i = 0; i < CellSignalStrength.getNumSignalStrengthLevels(); i++) { pr.println("*** Phone signal strength #" + i + ":"); mPhoneSignalStrengthsTimer[i].logState(pr, " "); } diff --git a/core/java/com/android/internal/os/MobileRadioPowerCalculator.java b/core/java/com/android/internal/os/MobileRadioPowerCalculator.java index 9e8f06d994f0..7c77d285bfc3 100644 --- a/core/java/com/android/internal/os/MobileRadioPowerCalculator.java +++ b/core/java/com/android/internal/os/MobileRadioPowerCalculator.java @@ -16,14 +16,14 @@ package com.android.internal.os; import android.os.BatteryStats; -import android.telephony.SignalStrength; +import android.telephony.CellSignalStrength; import android.util.Log; public class MobileRadioPowerCalculator extends PowerCalculator { private static final String TAG = "MobileRadioPowerController"; private static final boolean DEBUG = BatteryStatsHelper.DEBUG; private final double mPowerRadioOn; - private final double[] mPowerBins = new double[SignalStrength.NUM_SIGNAL_STRENGTH_BINS]; + private final double[] mPowerBins = new double[CellSignalStrength.getNumSignalStrengthLevels()]; private final double mPowerScan; private BatteryStats mStats; private long mTotalAppMobileActiveMs = 0; diff --git a/core/jni/Android.bp b/core/jni/Android.bp index 7b612776012a..49c029cb7545 100644 --- a/core/jni/Android.bp +++ b/core/jni/Android.bp @@ -279,6 +279,7 @@ cc_library_shared { "libmediametrics", "libmeminfo", "libaudioclient", + "libaudiofoundation", "libaudiopolicy", "libjpeg", "libusbhost", diff --git a/core/jni/android_media_AudioSystem.cpp b/core/jni/android_media_AudioSystem.cpp index 686a91901b5f..541b937860c3 100644 --- a/core/jni/android_media_AudioSystem.cpp +++ b/core/jni/android_media_AudioSystem.cpp @@ -27,6 +27,7 @@ #include "core_jni_helpers.h" #include <audiomanager/AudioManager.h> +#include <media/AudioDeviceTypeAddr.h> #include <media/AudioSystem.h> #include <media/AudioPolicy.h> #include <media/MicrophoneInfo.h> @@ -2015,9 +2016,10 @@ static jint android_media_AudioSystem_setUidDeviceAffinities(JNIEnv *env, jobjec if (!env->IsInstanceOf(addrJobj, stringClass)) { return (jint) AUDIO_JAVA_BAD_VALUE; } - String8 address = String8(env->GetStringUTFChars((jstring) addrJobj, NULL)); + const char* address = env->GetStringUTFChars((jstring) addrJobj, NULL); AudioDeviceTypeAddr dev = AudioDeviceTypeAddr(typesPtr[i], address); deviceVector.add(dev); + env->ReleaseStringUTFChars((jstring) addrJobj, address); } env->ReleaseIntArrayElements(deviceTypes, typesPtr, 0); @@ -2248,6 +2250,20 @@ android_media_AudioSystem_setRttEnabled(JNIEnv *env, jobject thiz, jboolean enab return (jint) check_AudioSystem_Command(AudioSystem::setRttEnabled(enabled)); } +static jint +android_media_AudioSystem_setAudioHalPids(JNIEnv *env, jobject clazz, jintArray jPids) +{ + if (jPids == NULL) { + return (jint)AUDIO_JAVA_BAD_VALUE; + } + pid_t *nPidsArray = (pid_t *)env->GetIntArrayElements(jPids, NULL); + std::vector<pid_t> nPids(nPidsArray, nPidsArray + env->GetArrayLength(jPids)); + status_t status = AudioSystem::setAudioHalPids(nPids); + env->ReleaseIntArrayElements(jPids, nPidsArray, 0); + jint jStatus = nativeToJavaStatus(status); + return jStatus; +} + // ---------------------------------------------------------------------------- static const JNINativeMethod gMethods[] = { @@ -2326,6 +2342,7 @@ static const JNINativeMethod gMethods[] = { (void*)android_media_AudioSystem_getHwOffloadEncodingFormatsSupportedForA2DP}, {"setAllowedCapturePolicy", "(II)I", (void *)android_media_AudioSystem_setAllowedCapturePolicy}, {"setRttEnabled", "(Z)I", (void *)android_media_AudioSystem_setRttEnabled}, + {"setAudioHalPids", "([I)I", (void *)android_media_AudioSystem_setAudioHalPids}, }; static const JNINativeMethod gEventHandlerMethods[] = { diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index b5c4ba0cb57a..68f3c2e1cc9f 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1627,6 +1627,14 @@ <permission android:name="android.permission.NETWORK_STACK" android:protectionLevel="signature" /> + <!-- @SystemApi @hide Allows an application to observe network policy changes. --> + <permission android:name="android.permission.OBSERVE_NETWORK_POLICY" + android:protectionLevel="signature" /> + + <!-- @SystemApi @hide Allows applications to register network factory or agent --> + <permission android:name="android.permission.NETWORK_FACTORY" + android:protectionLevel="signature" /> + <!-- Allows Settings and SystemUI to call methods in Networking services <p>Not for use by third-party or privileged applications. @hide This should only be used by Settings and SystemUI. @@ -1762,7 +1770,11 @@ <permission android:name="android.permission.NFC_TRANSACTION_EVENT" android:protectionLevel="normal" /> - <!-- @SystemApi Allows an internal user to use privileged ConnectivityManager APIs. + <!-- @deprecated This permission used to allow too broad access to sensitive methods and all its + uses have been replaced by a more appropriate permission. Most uses have been replaced with + a NETWORK_STACK or NETWORK_SETTINGS check. Please look up the documentation of the + individual functions to figure out what permission now protects the individual function. + @SystemApi Allows an internal user to use privileged ConnectivityManager APIs. @hide --> <permission android:name="android.permission.CONNECTIVITY_INTERNAL" android:protectionLevel="signature|privileged" /> diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml index bb8f3d6a6811..8b211bb23a1f 100644 --- a/core/res/res/values-af/strings.xml +++ b/core/res/res/values-af/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Dien in"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Bestuurprogram werk tans"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Tik om die bestuurprogram te verlaat."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Verbinding of Wi-Fi-warmkol aktief"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Tik om op te stel."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Verbinding is gedeaktiveer"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Kontak jou administrateur vir besonderhede"</string> <string name="back_button_label" msgid="2300470004503343439">"Terug"</string> <string name="next_button_label" msgid="1080555104677992408">"Volgende"</string> <string name="skip_button_label" msgid="1275362299471631819">"Slaan oor"</string> diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml index b42fd20116d7..5def574e805a 100644 --- a/core/res/res/values-am/strings.xml +++ b/core/res/res/values-am/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"አስረክብ"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"የመንዳት መተግበሪያ እያሄደ ነው"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ከመንዳት መተግበሪያ ለመውጣት መታ ያድርጉ።"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"መሰካት ወይም ገባሪ ድረስ ነጥብ"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"ለማዋቀር መታ ያድርጉ።"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"እንደ ሞደም መሰካት ተሰናክሏል"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"ለዝርዝሮች የእርስዎን አስተዳዳሪ ያነጋግሩ"</string> <string name="back_button_label" msgid="2300470004503343439">"ተመለስ"</string> <string name="next_button_label" msgid="1080555104677992408">"ቀጥሎ"</string> <string name="skip_button_label" msgid="1275362299471631819">"ዝለል"</string> diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml index eab056331496..621e34dfaab4 100644 --- a/core/res/res/values-ar/strings.xml +++ b/core/res/res/values-ar/strings.xml @@ -1610,10 +1610,6 @@ <string name="submit" msgid="1602335572089911941">"إرسال"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"تطبيق القيادة قيد التشغيل"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"انقر للخروج من تطبيق القيادة."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"النطاق أو نقطة الاتصال نشطة"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"انقر للإعداد."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"تم إيقاف التوصيل"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"اتصل بالمشرف للحصول على التفاصيل"</string> <string name="back_button_label" msgid="2300470004503343439">"رجوع"</string> <string name="next_button_label" msgid="1080555104677992408">"التالي"</string> <string name="skip_button_label" msgid="1275362299471631819">"تخطي"</string> diff --git a/core/res/res/values-as/strings.xml b/core/res/res/values-as/strings.xml index 5a24461c0ccb..aabc1c94b7d9 100644 --- a/core/res/res/values-as/strings.xml +++ b/core/res/res/values-as/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"দাখিল কৰক"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"ড্ৰাইভিং এপ্ চলি আছে"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ড্ৰাইভিং এপৰ পৰা বাহিৰ হ\'বলৈ টিপক।"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"টেডাৰিং বা হটস্প\'ট সক্ৰিয় অৱস্থাত আছে"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"ছেট আপ কৰিবলৈ টিপক।"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"টেডাৰিং অক্ষম কৰি থোৱা হৈছে"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"সবিশেষ জানিবলৈ আপোনাৰ প্ৰশাসকৰ সৈতে যোগাযোগ কৰক"</string> <string name="back_button_label" msgid="2300470004503343439">"উভতি যাওক"</string> <string name="next_button_label" msgid="1080555104677992408">"পৰৱৰ্তী"</string> <string name="skip_button_label" msgid="1275362299471631819">"এৰি যাওক"</string> diff --git a/core/res/res/values-az/strings.xml b/core/res/res/values-az/strings.xml index 9ac4a2a05046..f3858f65f21f 100644 --- a/core/res/res/values-az/strings.xml +++ b/core/res/res/values-az/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Göndər"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Sürücülük tətbiqi işləyir"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Sürücülük tətbiqindən çıxmaq üçün klikləyin."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Tezerinq və ya hotspot aktivdir"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Quraşdırmaq üçün tıklayın."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Birləşmə deaktivdir"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Məlumat üçün adminlə əlaqə saxlayın"</string> <string name="back_button_label" msgid="2300470004503343439">"Geri"</string> <string name="next_button_label" msgid="1080555104677992408">"Növbəti"</string> <string name="skip_button_label" msgid="1275362299471631819">"Keç"</string> diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml index 363b5ea6e79d..211b0447e0a9 100644 --- a/core/res/res/values-b+sr+Latn/strings.xml +++ b/core/res/res/values-b+sr+Latn/strings.xml @@ -1544,10 +1544,6 @@ <string name="submit" msgid="1602335572089911941">"Pošalji"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Aplikacija za vožnju je pokrenuta"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Dodirnite da biste izašli iz aplikacije za vožnju."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Aktivno povezivanje sa internetom preko mobilnog uređaja ili hotspot"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Dodirnite da biste podesili."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Privezivanje je onemogućeno"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Potražite detalje od administratora"</string> <string name="back_button_label" msgid="2300470004503343439">"Nazad"</string> <string name="next_button_label" msgid="1080555104677992408">"Next"</string> <string name="skip_button_label" msgid="1275362299471631819">"Preskoči"</string> diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml index 18e345ac70ec..7a681c22c04b 100644 --- a/core/res/res/values-be/strings.xml +++ b/core/res/res/values-be/strings.xml @@ -1566,10 +1566,6 @@ <string name="submit" msgid="1602335572089911941">"Перадаць"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Праграма для ваджэння ўключана"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Націсніце, каб выйсці з праграмы для ваджэння."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"USB-мадэм або кропка доступу Wi-Fi актыўныя"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Дакраніцеся, каб наладзіць."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Рэжым мадэма адключаны"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Звярніцеся да адміністратара па падрабязную інфармацыю"</string> <string name="back_button_label" msgid="2300470004503343439">"Назад"</string> <string name="next_button_label" msgid="1080555104677992408">"Далей"</string> <string name="skip_button_label" msgid="1275362299471631819">"Прапусціць"</string> diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml index 231132288325..79d674970fe5 100644 --- a/core/res/res/values-bg/strings.xml +++ b/core/res/res/values-bg/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Изпращане"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Приложението за шофиране е включено"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Докоснете, за да излезете от приложението за шофиране."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Има активна споделена връзка или безжична точка за достъп"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Докоснете, за да настроите."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Функцията за тетъринг е деактивирана"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Свържете се с администратора си за подробности"</string> <string name="back_button_label" msgid="2300470004503343439">"Назад"</string> <string name="next_button_label" msgid="1080555104677992408">"Напред"</string> <string name="skip_button_label" msgid="1275362299471631819">"Пропускане"</string> diff --git a/core/res/res/values-bn/strings.xml b/core/res/res/values-bn/strings.xml index fc7022dc0ff1..cbba869720a4 100644 --- a/core/res/res/values-bn/strings.xml +++ b/core/res/res/values-bn/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"জমা দিন"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"ড্রাইভিং অ্যাপ চালু আছে"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ড্রাইভিং অ্যাপ বন্ধ করতে ট্যাপ করুন।"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"টিথারিং বা হটস্পট সক্রিয় আছে"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"সেট আপ করার জন্য আলতো চাপুন৷"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"টিথারিং অক্ষম করা আছে"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"বিশদ বিবরণের জন্য প্রশাসকের সাথে যোগাযোগ করুন"</string> <string name="back_button_label" msgid="2300470004503343439">"ফিরুন"</string> <string name="next_button_label" msgid="1080555104677992408">"পরবর্তী"</string> <string name="skip_button_label" msgid="1275362299471631819">"এড়িয়ে যান"</string> diff --git a/core/res/res/values-bs/strings.xml b/core/res/res/values-bs/strings.xml index 1d5a7d8fc524..1978c72c2dfa 100644 --- a/core/res/res/values-bs/strings.xml +++ b/core/res/res/values-bs/strings.xml @@ -1546,10 +1546,6 @@ <string name="submit" msgid="1602335572089911941">"Potvrdi"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Aplikacija za vožnju je pokrenuta"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Dodirnite za izlaz iz aplikacije za vožnju."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Uređaj dijeli vezu ili djeluje kao pristupna tačka"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Dodirnite za postavke"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Povezivanje putem mobitela je onemogućeno"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Kontaktirajte svog administratora za dodatne detalje"</string> <string name="back_button_label" msgid="2300470004503343439">"Nazad"</string> <string name="next_button_label" msgid="1080555104677992408">"Naprijed"</string> <string name="skip_button_label" msgid="1275362299471631819">"Preskoči"</string> diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml index da6ccb0ba68b..d46e72bcd400 100644 --- a/core/res/res/values-ca/strings.xml +++ b/core/res/res/values-ca/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Envia"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"S\'està executant l\'aplicació de conducció"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Toca per sortir de l\'aplicació de conducció."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Compartició de xarxa o punt d\'accés Wi-Fi activat"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Toca per configurar."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"La compartició de xarxa està desactivada"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contacta amb el teu administrador per obtenir més informació"</string> <string name="back_button_label" msgid="2300470004503343439">"Enrere"</string> <string name="next_button_label" msgid="1080555104677992408">"Següent"</string> <string name="skip_button_label" msgid="1275362299471631819">"Omet"</string> diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml index a0e3e2117440..eccab3ff5742 100644 --- a/core/res/res/values-cs/strings.xml +++ b/core/res/res/values-cs/strings.xml @@ -1566,10 +1566,6 @@ <string name="submit" msgid="1602335572089911941">"Odeslat"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Jízdní aplikace je spuštěna"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Jízdní aplikaci zavřete klepnutím."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Sdílené připojení nebo hotspot je aktivní."</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Klepnutím zahájíte nastavení."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering je zakázán"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"O podrobnosti požádejte administrátora"</string> <string name="back_button_label" msgid="2300470004503343439">"Zpět"</string> <string name="next_button_label" msgid="1080555104677992408">"Další"</string> <string name="skip_button_label" msgid="1275362299471631819">"Přeskočit"</string> diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml index 80256eebdf98..c66615d6d2a7 100644 --- a/core/res/res/values-da/strings.xml +++ b/core/res/res/values-da/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Send"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Bilkørselsappen er aktiv"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Tryk for at lukke bilkørselsappen."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Netdeling eller hotspot er aktivt"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Tryk for at konfigurere"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Netdeling er deaktiveret"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Kontakt din administrator for at få oplysninger"</string> <string name="back_button_label" msgid="2300470004503343439">"Tilbage"</string> <string name="next_button_label" msgid="1080555104677992408">"Næste"</string> <string name="skip_button_label" msgid="1275362299471631819">"Spring over"</string> diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml index 4344b3d8eff3..ee6327179a39 100644 --- a/core/res/res/values-de/strings.xml +++ b/core/res/res/values-de/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Senden"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Fahr-App wird ausgeführt"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Tippen, um die Fahr-App zu beenden."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering oder Hotspot aktiv"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Zum Einrichten tippen."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering ist deaktiviert"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Bitte wende dich für weitere Informationen an den Administrator"</string> <string name="back_button_label" msgid="2300470004503343439">"Zurück"</string> <string name="next_button_label" msgid="1080555104677992408">"Weiter"</string> <string name="skip_button_label" msgid="1275362299471631819">"Überspringen"</string> diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml index 538151159ce9..e5dc5f8e1c3d 100644 --- a/core/res/res/values-el/strings.xml +++ b/core/res/res/values-el/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Υποβολή"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Η εφαρμογή οδήγησης εκτελείται"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Πατήστε για να εξέλθετε από την εφαρμογή οδήγησης."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Πρόσδεση ή σύνδεση σημείου πρόσβασης ενεργή"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Πατήστε για ρύθμιση."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Η σύνδεση είναι απενεργοποιημένη"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Επικοινωνήστε με τον διαχειριστή σας για λεπτομέρειες"</string> <string name="back_button_label" msgid="2300470004503343439">"Πίσω"</string> <string name="next_button_label" msgid="1080555104677992408">"Επόμενο"</string> <string name="skip_button_label" msgid="1275362299471631819">"Παράλειψη"</string> diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml index a90fef7db74f..185b2ef80442 100644 --- a/core/res/res/values-en-rAU/strings.xml +++ b/core/res/res/values-en-rAU/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Submit"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Driving app is running"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Tap to exit driving app."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering or hotspot active"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Tap to set up."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering is disabled"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contact your admin for details"</string> <string name="back_button_label" msgid="2300470004503343439">"Back"</string> <string name="next_button_label" msgid="1080555104677992408">"Next"</string> <string name="skip_button_label" msgid="1275362299471631819">"Skip"</string> diff --git a/core/res/res/values-en-rCA/strings.xml b/core/res/res/values-en-rCA/strings.xml index b60f6e980e01..8fbba65db543 100644 --- a/core/res/res/values-en-rCA/strings.xml +++ b/core/res/res/values-en-rCA/strings.xml @@ -1520,10 +1520,6 @@ <string name="submit" msgid="1602335572089911941">"Submit"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Driving app is running"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Tap to exit driving app."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering or hotspot active"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Tap to set up."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering is disabled"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contact your admin for details"</string> <string name="back_button_label" msgid="2300470004503343439">"Back"</string> <string name="next_button_label" msgid="1080555104677992408">"Next"</string> <string name="skip_button_label" msgid="1275362299471631819">"Skip"</string> diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml index a90fef7db74f..185b2ef80442 100644 --- a/core/res/res/values-en-rGB/strings.xml +++ b/core/res/res/values-en-rGB/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Submit"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Driving app is running"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Tap to exit driving app."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering or hotspot active"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Tap to set up."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering is disabled"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contact your admin for details"</string> <string name="back_button_label" msgid="2300470004503343439">"Back"</string> <string name="next_button_label" msgid="1080555104677992408">"Next"</string> <string name="skip_button_label" msgid="1275362299471631819">"Skip"</string> diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml index a90fef7db74f..185b2ef80442 100644 --- a/core/res/res/values-en-rIN/strings.xml +++ b/core/res/res/values-en-rIN/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Submit"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Driving app is running"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Tap to exit driving app."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering or hotspot active"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Tap to set up."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering is disabled"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contact your admin for details"</string> <string name="back_button_label" msgid="2300470004503343439">"Back"</string> <string name="next_button_label" msgid="1080555104677992408">"Next"</string> <string name="skip_button_label" msgid="1275362299471631819">"Skip"</string> diff --git a/core/res/res/values-en-rXC/strings.xml b/core/res/res/values-en-rXC/strings.xml index b6f667496888..6b5df5dab330 100644 --- a/core/res/res/values-en-rXC/strings.xml +++ b/core/res/res/values-en-rXC/strings.xml @@ -1520,10 +1520,6 @@ <string name="submit" msgid="1602335572089911941">"Submit"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Driving app is running"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Tap to exit driving app."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering or hotspot active"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Tap to set up."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering is disabled"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contact your admin for details"</string> <string name="back_button_label" msgid="2300470004503343439">"Back"</string> <string name="next_button_label" msgid="1080555104677992408">"Next"</string> <string name="skip_button_label" msgid="1275362299471631819">"Skip"</string> diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml index d058728a7833..1c2e944b85dc 100644 --- a/core/res/res/values-es-rUS/strings.xml +++ b/core/res/res/values-es-rUS/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Enviar"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Se está ejecutando la app de conducción"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Presiona para salir de la app de conducción."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Anclaje a red o zona activa conectados"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Presiona para configurar."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Se inhabilitó la conexión mediante dispositivo portátil"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Para obtener más información, comunícate con el administrador"</string> <string name="back_button_label" msgid="2300470004503343439">"Atrás"</string> <string name="next_button_label" msgid="1080555104677992408">"Siguiente"</string> <string name="skip_button_label" msgid="1275362299471631819">"Omitir"</string> diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml index 54a3860df985..791da881e6b1 100644 --- a/core/res/res/values-es/strings.xml +++ b/core/res/res/values-es/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Enviar"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Aplicación de conducción en uso"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Toca para salir de la aplicación de conducción."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Compartir conexión/Zona Wi-Fi activada"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Toca para configurar."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"La conexión compartida está inhabilitada"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Ponte en contacto con el administrador para obtener más información"</string> <string name="back_button_label" msgid="2300470004503343439">"Atrás"</string> <string name="next_button_label" msgid="1080555104677992408">"Siguiente"</string> <string name="skip_button_label" msgid="1275362299471631819">"Saltar"</string> diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml index 6e212d75cc8f..ceb1ebd64646 100644 --- a/core/res/res/values-et/strings.xml +++ b/core/res/res/values-et/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Saada"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Sõidurakendus töötab"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Puudutage sõidurakendusest väljumiseks."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Jagamine või kuumkoht on aktiivne"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Puudutage seadistamiseks."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Jagamine on keelatud"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Lisateabe saamiseks võtke ühendust oma administraatoriga"</string> <string name="back_button_label" msgid="2300470004503343439">"Tagasi"</string> <string name="next_button_label" msgid="1080555104677992408">"Järgmine"</string> <string name="skip_button_label" msgid="1275362299471631819">"Jäta vahele"</string> diff --git a/core/res/res/values-eu/strings.xml b/core/res/res/values-eu/strings.xml index 1ba4da2d0c1c..905bbd256e39 100644 --- a/core/res/res/values-eu/strings.xml +++ b/core/res/res/values-eu/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"Bidali"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Abian da gidatzeko aplikazioa"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Sakatu gidatzeko aplikaziotik irteteko."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Konexioa partekatzea edo sare publikoa aktibo"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Sakatu konfiguratzeko."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Desgaituta dago konexioa partekatzeko aukera"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Xehetasunak lortzeko, jarri administratzailearekin harremanetan"</string> <string name="back_button_label" msgid="2300470004503343439">"Atzera"</string> <string name="next_button_label" msgid="1080555104677992408">"Hurrengoa"</string> <string name="skip_button_label" msgid="1275362299471631819">"Saltatu"</string> diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml index 43c9b983090a..79969bc709d3 100644 --- a/core/res/res/values-fa/strings.xml +++ b/core/res/res/values-fa/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"ارسال"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"برنامه رانندگی درحال اجرا است"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"برای خروج از برنامه رانندگی ضربه بزنید."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"اتصال داده با سیم یا نقطه اتصال فعال"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"برای راهاندازی ضربه بزنید."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"اتصال به اینترنت با تلفن همراه غیرفعال شده است"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"برای جزئیات، با سرپرستتان تماس بگیرید"</string> <string name="back_button_label" msgid="2300470004503343439">"برگشت"</string> <string name="next_button_label" msgid="1080555104677992408">"بعدی"</string> <string name="skip_button_label" msgid="1275362299471631819">"رد شدن"</string> diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml index 1b2d5331cce5..bf8b37e910fa 100644 --- a/core/res/res/values-fi/strings.xml +++ b/core/res/res/values-fi/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Lähetä"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Ajosovellus on käynnissä"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Poistu ajosovelluksesta napauttamalla."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Internetin jakaminen tai yhteyspiste käytössä"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Määritä napauttamalla."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Yhteyden jakaminen poistettu käytöstä"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Kysy lisätietoja järjestelmänvalvojalta."</string> <string name="back_button_label" msgid="2300470004503343439">"Takaisin"</string> <string name="next_button_label" msgid="1080555104677992408">"Seuraava"</string> <string name="skip_button_label" msgid="1275362299471631819">"Ohita"</string> diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml index 41597434215b..59075ca3901f 100644 --- a/core/res/res/values-fr-rCA/strings.xml +++ b/core/res/res/values-fr-rCA/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Envoyer"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"L\'application de conduite est en cours d\'exécution"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Touchez pour quitter l\'application de conduite."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Partage de connexion ou point d\'accès sans fil activé"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Touchez pour configurer."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Le partage de connexion est désactivé"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Communiquez avec votre administrateur pour obtenir plus de détails"</string> <string name="back_button_label" msgid="2300470004503343439">"Précédent"</string> <string name="next_button_label" msgid="1080555104677992408">"Suivante"</string> <string name="skip_button_label" msgid="1275362299471631819">"Passer"</string> diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml index 72fe0d67718c..1f496a77d9c1 100644 --- a/core/res/res/values-fr/strings.xml +++ b/core/res/res/values-fr/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Envoyer"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"L\'application de conduite est en cours d\'exécution"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Appuyez ici pour quitter l\'application de conduite."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Partage de connexion ou point d\'accès sans fil activé"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Appuyez ici pour configurer."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Le partage de connexion est désactivé"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Pour en savoir plus, contactez votre administrateur"</string> <string name="back_button_label" msgid="2300470004503343439">"Retour"</string> <string name="next_button_label" msgid="1080555104677992408">"Suivant"</string> <string name="skip_button_label" msgid="1275362299471631819">"Ignorer"</string> diff --git a/core/res/res/values-gl/strings.xml b/core/res/res/values-gl/strings.xml index 36a47fb8f23a..4c7c0bdcb79f 100644 --- a/core/res/res/values-gl/strings.xml +++ b/core/res/res/values-gl/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"Enviar"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Estase executando a aplicación de condución"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Toca para saír da aplicación de condución."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Conexión compartida ou zona wifi activada"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Tocar para configurar."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"A conexión compartida está desactivada"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contacta co administrador para obter información"</string> <string name="back_button_label" msgid="2300470004503343439">"Volver"</string> <string name="next_button_label" msgid="1080555104677992408">"Seguinte"</string> <string name="skip_button_label" msgid="1275362299471631819">"Omitir"</string> diff --git a/core/res/res/values-gu/strings.xml b/core/res/res/values-gu/strings.xml index b8e26122c63d..b87b49e68d1a 100644 --- a/core/res/res/values-gu/strings.xml +++ b/core/res/res/values-gu/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"સબમિટ કરો"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"ડ્રાઇવિંગ ઍપ ચાલી રહી છે"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ડ્રાઇવિંગ ઍપથી બહાર નીકળવા માટે ટૅપ કરો."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"ટિથરિંગ અથવા હૉટસ્પૉટ સક્રિય"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"સેટ કરવા માટે ટૅપ કરો."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"ટિથરિંગ અક્ષમ કરેલ છે"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"વિગતો માટે તમારા વ્યવસ્થાપકનો સંપર્ક કરો"</string> <string name="back_button_label" msgid="2300470004503343439">"પાછળ"</string> <string name="next_button_label" msgid="1080555104677992408">"આગલું"</string> <string name="skip_button_label" msgid="1275362299471631819">"છોડો"</string> diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml index dca9f86503ee..91946d5c5567 100644 --- a/core/res/res/values-hi/strings.xml +++ b/core/res/res/values-hi/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"सबमिट करें"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"ड्राइविंग ऐप्लिकेशन चल रहा है"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ड्राइविंग ऐप्लिकेशन से निकलने के लिए टैप करें."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"टेदरिंग या हॉटस्पॉट सक्रिय"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"सेट करने के लिए टैप करें."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"टेदरिंग अक्षम है"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"जानकारी के लिए अपने एडमिन से संपर्क करें"</string> <string name="back_button_label" msgid="2300470004503343439">"वापस जाएं"</string> <string name="next_button_label" msgid="1080555104677992408">"आगे बढ़ें"</string> <string name="skip_button_label" msgid="1275362299471631819">"अभी नहीं"</string> diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml index 478fdad7cdae..46908d393b5f 100644 --- a/core/res/res/values-hr/strings.xml +++ b/core/res/res/values-hr/strings.xml @@ -1544,10 +1544,6 @@ <string name="submit" msgid="1602335572089911941">"Pošalji"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Pokrenuta je aplikacija za vožnju"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Dodirnite za zatvaranje aplikacije za vožnju."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Ograničenje ili aktivan hotspot"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Dodirnite da biste postavili."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Modemsko je povezivanje onemogućeno"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Obratite se administratoru da biste saznali pojedinosti"</string> <string name="back_button_label" msgid="2300470004503343439">"Natrag"</string> <string name="next_button_label" msgid="1080555104677992408">"Dalje"</string> <string name="skip_button_label" msgid="1275362299471631819">"Preskoči"</string> diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml index 2632482a43a1..f011c099f353 100644 --- a/core/res/res/values-hu/strings.xml +++ b/core/res/res/values-hu/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Elküldés"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Az autós alkalmazás fut"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Koppintson ide az autós alkalmazásból való kilépéshez."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Megosztás vagy aktív hotspot"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Koppintson a beállításhoz."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Az internetmegosztás le van tiltva"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"A részletekért forduljon rendszergazdájához"</string> <string name="back_button_label" msgid="2300470004503343439">"Vissza"</string> <string name="next_button_label" msgid="1080555104677992408">"Tovább"</string> <string name="skip_button_label" msgid="1275362299471631819">"Kihagyás"</string> diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml index 5f3026cf2d96..f0ab24c0d491 100644 --- a/core/res/res/values-hy/strings.xml +++ b/core/res/res/values-hy/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Ուղարկել"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Հավելվածն աշխատում է"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Հպեք՝ հավելվածը փակելու համար:"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Մոդեմի ռեժիմը միացված է"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Հպեք՝ կարգավորելու համար:"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Մոդեմի ռեժիմն անջատված է"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Մանրամասների համար դիմեք ձեր ադմինիստրատորին"</string> <string name="back_button_label" msgid="2300470004503343439">"Հետ"</string> <string name="next_button_label" msgid="1080555104677992408">"Հաջորդը"</string> <string name="skip_button_label" msgid="1275362299471631819">"Բաց թողնել"</string> diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml index dc7731957174..61b9341ceecf 100644 --- a/core/res/res/values-in/strings.xml +++ b/core/res/res/values-in/strings.xml @@ -1521,11 +1521,7 @@ <string name="reset" msgid="2448168080964209908">"Setel ulang"</string> <string name="submit" msgid="1602335572089911941">"Kirim"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Aplikasi mengemudi sedang berjalan"</string> - <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Tap untuk keluar dari aplikasi mengemudi."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering (Penambatan) atau hotspot aktif"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Tap untuk menyiapkan."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering dinonaktifkan"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Hubungi admin untuk mengetahui detailnya"</string> + <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Ketuk untuk keluar dari aplikasi mengemudi."</string> <string name="back_button_label" msgid="2300470004503343439">"Kembali"</string> <string name="next_button_label" msgid="1080555104677992408">"Selanjutnya"</string> <string name="skip_button_label" msgid="1275362299471631819">"Lewati"</string> diff --git a/core/res/res/values-is/strings.xml b/core/res/res/values-is/strings.xml index 3f8c96013ae4..5253f56e48bc 100644 --- a/core/res/res/values-is/strings.xml +++ b/core/res/res/values-is/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"Senda"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Akstursforrit er í gangi"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Ýttu til að loka akstursforritinu."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Kveikt á tjóðrun eða aðgangsstað"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Ýttu til að setja upp."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Slökkt er á tjóðrun"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Hafðu samband við kerfisstjórann til að fá upplýsingar"</string> <string name="back_button_label" msgid="2300470004503343439">"Til baka"</string> <string name="next_button_label" msgid="1080555104677992408">"Áfram"</string> <string name="skip_button_label" msgid="1275362299471631819">"Sleppa"</string> diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml index 255510a1208a..de1df1d2ea17 100644 --- a/core/res/res/values-it/strings.xml +++ b/core/res/res/values-it/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Invia"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"App di guida in esecuzione"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Tocca per uscire dall\'app di guida."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering oppure hotspot attivo"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Tocca per impostare."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering disattivato"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contatta il tuo amministratore per avere informazioni dettagliate"</string> <string name="back_button_label" msgid="2300470004503343439">"Indietro"</string> <string name="next_button_label" msgid="1080555104677992408">"Avanti"</string> <string name="skip_button_label" msgid="1275362299471631819">"Ignora"</string> diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml index a42f6cc61f74..1ea8cdf27eb0 100644 --- a/core/res/res/values-iw/strings.xml +++ b/core/res/res/values-iw/strings.xml @@ -1566,10 +1566,6 @@ <string name="submit" msgid="1602335572089911941">"שלח"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"אפליקציית הנהיגה פועלת"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"יש להקיש כדי לצאת מאפליקציית הנהיגה."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"שיתוף אינטרנט פעיל"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"הקש כדי להגדיר."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"שיתוף האינטרנט בין ניידים מושבת"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"לפרטים, יש לפנות למנהל המערכת"</string> <string name="back_button_label" msgid="2300470004503343439">"הקודם"</string> <string name="next_button_label" msgid="1080555104677992408">"הבא"</string> <string name="skip_button_label" msgid="1275362299471631819">"דילוג"</string> diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml index 9e466cb4ac32..d0deea22cf8e 100644 --- a/core/res/res/values-ja/strings.xml +++ b/core/res/res/values-ja/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"送信"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"運転アプリを実行しています"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"運転アプリを終了するにはタップしてください。"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"テザリングまたはアクセスポイントが有効です"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"タップしてセットアップします。"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"テザリングは無効に設定されています"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"詳しくは、管理者にお問い合わせください"</string> <string name="back_button_label" msgid="2300470004503343439">"戻る"</string> <string name="next_button_label" msgid="1080555104677992408">"次へ"</string> <string name="skip_button_label" msgid="1275362299471631819">"スキップ"</string> diff --git a/core/res/res/values-ka/strings.xml b/core/res/res/values-ka/strings.xml index c6e636d6469f..f06d65861f96 100644 --- a/core/res/res/values-ka/strings.xml +++ b/core/res/res/values-ka/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"გაგზავნა"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"მართვის აპი გაშვებულია"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"შეეხეთ მართვის აპიდან გასასვლელად."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"ტეტერინგი ან უსადენო ქსელი აქტიურია"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"შეეხეთ დასაყენებლად."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"ტეტერინგი გათიშულია"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"დამატებითი ინფორმაციისთვის დაუკავშირდით თქვენს ადმინისტრატორს"</string> <string name="back_button_label" msgid="2300470004503343439">"უკან"</string> <string name="next_button_label" msgid="1080555104677992408">"მომდევნო"</string> <string name="skip_button_label" msgid="1275362299471631819">"გამოტოვება"</string> diff --git a/core/res/res/values-kk/strings.xml b/core/res/res/values-kk/strings.xml index 5b8028d19d37..efd377fe406f 100644 --- a/core/res/res/values-kk/strings.xml +++ b/core/res/res/values-kk/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"Жіберу"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Көлік жүргізу қолданбасы қосулы"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Көлік жүргізу қолданбасынан шығу үшін түртіңіз."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Тетеринг немесе хотспот қосулы"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Реттеу үшін түртіңіз."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Тетеринг өшірілді"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Мәліметтерді әкімшіден алыңыз"</string> <string name="back_button_label" msgid="2300470004503343439">"Артқа"</string> <string name="next_button_label" msgid="1080555104677992408">"Келесі"</string> <string name="skip_button_label" msgid="1275362299471631819">"Өткізіп жіберу"</string> diff --git a/core/res/res/values-km/strings.xml b/core/res/res/values-km/strings.xml index 494f26a3bf7c..dbf3dbbf62d9 100644 --- a/core/res/res/values-km/strings.xml +++ b/core/res/res/values-km/strings.xml @@ -1524,10 +1524,6 @@ <string name="submit" msgid="1602335572089911941">"ដាក់ស្នើ"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"កម្មវិធីបើកបរកំពុងដំណើរការ"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ចុចដើម្បីចាកចេញពីកម្មវិធីបើកបរ។"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"ភ្ជាប់ ឬហតស្ពតសកម្ម"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"ប៉ះដើម្បីកំណត់"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"ការភ្ជាប់ត្រូវបានបិទ"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"ទាក់ទងអ្នកគ្រប់គ្រងរបស់អ្នកសម្រាប់ព័ត៌មានលម្អិត"</string> <string name="back_button_label" msgid="2300470004503343439">"ថយក្រោយ"</string> <string name="next_button_label" msgid="1080555104677992408">"បន្ទាប់"</string> <string name="skip_button_label" msgid="1275362299471631819">"រំលង"</string> diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml index 5c1fe245ebb3..68bc9b1ac23c 100644 --- a/core/res/res/values-kn/strings.xml +++ b/core/res/res/values-kn/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"ಸಲ್ಲಿಸು"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"ಡ್ರೈವಿಂಗ್ ಅಪ್ಲಿಕೇಶನ್ ಚಾಲನೆಯಲ್ಲಿದೆ"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ಡ್ರೈವಿಂಗ್ ಅಪ್ಲಿಕೇಶನ್ ನಿರ್ಗಮಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"ಟೆಥರಿಂಗ್ ಅಥವಾ ಹಾಟ್ಸ್ಪಾಟ್ ಸಕ್ರಿಯವಾಗಿದೆ"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"ಹೊಂದಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"ಟೆಥರಿಂಗ್ ಅನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"ವಿವರಗಳಿಗಾಗಿ ನಿಮ್ಮ ನಿರ್ವಾಹಕರನ್ನು ಸಂಪರ್ಕಿಸಿ"</string> <string name="back_button_label" msgid="2300470004503343439">"ಹಿಂದೆ"</string> <string name="next_button_label" msgid="1080555104677992408">"ಮುಂದಿನದು"</string> <string name="skip_button_label" msgid="1275362299471631819">"ಸ್ಕಿಪ್"</string> diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml index 1409e33a9f38..913bd335225f 100644 --- a/core/res/res/values-ko/strings.xml +++ b/core/res/res/values-ko/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"제출"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"운전 앱 실행 중"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"운전 앱을 종료하려면 탭하세요."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"테더링 또는 핫스팟 사용"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"설정하려면 탭하세요."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"테더링이 사용 중지됨"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"자세한 정보는 관리자에게 문의하세요."</string> <string name="back_button_label" msgid="2300470004503343439">"뒤로"</string> <string name="next_button_label" msgid="1080555104677992408">"다음"</string> <string name="skip_button_label" msgid="1275362299471631819">"건너뛰기"</string> diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml index b66ec15830e1..2021d77b1ae7 100644 --- a/core/res/res/values-ky/strings.xml +++ b/core/res/res/values-ky/strings.xml @@ -1524,10 +1524,6 @@ <string name="submit" msgid="1602335572089911941">"Тапшыруу"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Унаа айдоо колдонмосу иштеп жатат"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Унаа айдоо колдонмосунан чыгуу үчүн таптаңыз."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Жалгаштыруу же хотспот жандырылган"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Жөндөө үчүн таптап коюңуз."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Жалгаштыруу функциясы өчүрүлгөн"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Кеңири маалымат үчүн администраторуңузга кайрылыңыз"</string> <string name="back_button_label" msgid="2300470004503343439">"Артка"</string> <string name="next_button_label" msgid="1080555104677992408">"Кийинки"</string> <string name="skip_button_label" msgid="1275362299471631819">"Өткөрүп жиберүү"</string> diff --git a/core/res/res/values-lo/strings.xml b/core/res/res/values-lo/strings.xml index 84c4000a3139..99a373f4079a 100644 --- a/core/res/res/values-lo/strings.xml +++ b/core/res/res/values-lo/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"ສົ່ງຂໍ້ມູນ"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"ແອັບຂັບລົດກຳລັງເຮັດວຽກຢູ່"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ແຕະເພື່ອອອກຈາກແອັບຂັບລົດ."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"ເປີດການປ່ອຍສັນຍານ ຫຼືຮັອດສະປອດແລ້ວ"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"ແຕະເພື່ອຕັ້ງຄ່າ."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"ການປ່ອຍສັນຍານຖືກປິດໄວ້"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"ຕິດຕໍ່ຜູ້ເບິ່ງແຍງລະບົບສຳລັບລາຍລະອຽດ"</string> <string name="back_button_label" msgid="2300470004503343439">"ກັບຄືນ"</string> <string name="next_button_label" msgid="1080555104677992408">"ຕໍ່ໄປ"</string> <string name="skip_button_label" msgid="1275362299471631819">"ຂ້າມ"</string> diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml index 2d6e4cb9366b..22ff01f01d14 100644 --- a/core/res/res/values-lt/strings.xml +++ b/core/res/res/values-lt/strings.xml @@ -1566,10 +1566,6 @@ <string name="submit" msgid="1602335572089911941">"Pateikti"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Veikia vairavimo programa"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Palieskite, kad išeitumėte iš vairavimo programos."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Susietas ar aktyvus"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Palieskite, kad nustatytumėte."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Įrenginio kaip modemo naudojimas išjungtas"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Jei reikia išsamios informacijos, susisiekite su administratoriumi"</string> <string name="back_button_label" msgid="2300470004503343439">"Atgal"</string> <string name="next_button_label" msgid="1080555104677992408">"Kitas"</string> <string name="skip_button_label" msgid="1275362299471631819">"Praleisti"</string> diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml index 93f86e6b7051..bac9c5dd909b 100644 --- a/core/res/res/values-lv/strings.xml +++ b/core/res/res/values-lv/strings.xml @@ -1544,10 +1544,6 @@ <string name="submit" msgid="1602335572089911941">"Iesniegt"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Autovadīšanas lietotne darbojas"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Pieskarieties, lai izietu no autovadīšanas lietotnes"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Piesaiste vai tīklājs ir aktīvs."</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Pieskarieties, lai iestatītu."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Piesaiste ir atspējota"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Lai iegūtu detalizētu informāciju, sazinieties ar savu administratoru."</string> <string name="back_button_label" msgid="2300470004503343439">"Atpakaļ"</string> <string name="next_button_label" msgid="1080555104677992408">"Tālāk"</string> <string name="skip_button_label" msgid="1275362299471631819">"Izlaist"</string> diff --git a/core/res/res/values-mk/strings.xml b/core/res/res/values-mk/strings.xml index 20d42ade08cf..bca844957624 100644 --- a/core/res/res/values-mk/strings.xml +++ b/core/res/res/values-mk/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"Поднеси"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Апликацијата за возење работи"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Допрете за да излезете од апликацијата за возење."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Поврзувањето или точката на пристап се активни"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Допрете за поставување."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Врзувањето е оневозможено"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Контактирајте со администраторот за детали"</string> <string name="back_button_label" msgid="2300470004503343439">"Назад"</string> <string name="next_button_label" msgid="1080555104677992408">"Следно"</string> <string name="skip_button_label" msgid="1275362299471631819">"Прескокни"</string> diff --git a/core/res/res/values-ml/strings.xml b/core/res/res/values-ml/strings.xml index ca822380ff37..99219977276c 100644 --- a/core/res/res/values-ml/strings.xml +++ b/core/res/res/values-ml/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"സമർപ്പിക്കുക"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"ഡ്രൈവിംഗ് ആപ്പ് റൺ ചെയ്യുകയാണ്"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ഡ്രൈവിംഗ് ആപ്പിൽ നിന്ന് പുറത്തുകടക്കാൻ ടാപ്പ് ചെയ്യുക."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"ടെതറിംഗ് അല്ലെങ്കിൽ ഹോട്ട്സ്പോട്ട് സജീവമാണ്"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"സജ്ജമാക്കാൻ ടാപ്പുചെയ്യുക."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"ടെതറിംഗ് പ്രവർത്തനരഹിതമാക്കിയിരിക്കുന്നു"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"വിശദവിവരങ്ങൾക്ക് നിങ്ങളുടെ അഡ്മിനെ ബന്ധപ്പെടുക"</string> <string name="back_button_label" msgid="2300470004503343439">"മടങ്ങുക"</string> <string name="next_button_label" msgid="1080555104677992408">"അടുത്തത്"</string> <string name="skip_button_label" msgid="1275362299471631819">"ഒഴിവാക്കുക"</string> diff --git a/core/res/res/values-mn/strings.xml b/core/res/res/values-mn/strings.xml index 6a6974d1a6d9..3c58743a83f4 100644 --- a/core/res/res/values-mn/strings.xml +++ b/core/res/res/values-mn/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Илгээх"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Жолоо барих апп ажиллаж байна"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Жолооны аппаас гарахын тулд товшино уу."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Модем болгох эсвэл идэвхтэй цэг болгох"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Тохируулахын тулд товшино уу."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Модем болгох боломжгүй байна"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Дэлгэрэнгүй мэдээлэл авахын тулд админтайгаа холбогдоно уу"</string> <string name="back_button_label" msgid="2300470004503343439">"Буцах"</string> <string name="next_button_label" msgid="1080555104677992408">"Дараах"</string> <string name="skip_button_label" msgid="1275362299471631819">"Алгасах"</string> diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml index e27883234376..e40a47d2acd6 100644 --- a/core/res/res/values-mr/strings.xml +++ b/core/res/res/values-mr/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"सबमिट करा"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"ड्रायव्हिंग अॅप चालू आहे"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ड्रायव्हिंग अॅपमधून बाहेर पाडण्यासाठी टॅप करा."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"टेदरिंग किंवा हॉटस्पॉट सक्रिय"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"सेट करण्यासाठी टॅप करा."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"टेदरिंग बंद आहे"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"तपशीलांसाठी तुमच्या प्रशासकाशी संपर्क साधा"</string> <string name="back_button_label" msgid="2300470004503343439">"मागे"</string> <string name="next_button_label" msgid="1080555104677992408">"पुढील"</string> <string name="skip_button_label" msgid="1275362299471631819">"वगळा"</string> diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml index 61739ef76742..0cc883bcfc70 100644 --- a/core/res/res/values-ms/strings.xml +++ b/core/res/res/values-ms/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Serah"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Apl memandu sedang berjalan"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Ketik untuk keluar daripada apl memandu."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Penambatan atau titik panas aktif"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Ketik untuk membuat persediaan."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Penambatan dilumpuhkan"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Hubungi pentadbir anda untuk maklumat lanjut"</string> <string name="back_button_label" msgid="2300470004503343439">"Kembali"</string> <string name="next_button_label" msgid="1080555104677992408">"Seterusnya"</string> <string name="skip_button_label" msgid="1275362299471631819">"Langkau"</string> diff --git a/core/res/res/values-my/strings.xml b/core/res/res/values-my/strings.xml index c45cf0505dfb..0679e27709c4 100644 --- a/core/res/res/values-my/strings.xml +++ b/core/res/res/values-my/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"ပေးပို့ရန်"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"ကားမောင်းသည့်အက်ပ် ပွင့်နေပါသည်"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ကားမောင်းသည့်အက်ပ်မှ ထွက်ရန် တို့ပါ။"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"တဆင့်ပြန်လည်လွှင့်ခြင်း သို့မဟုတ် ဟော့စပေါ့ ဖွင့်ထားသည်"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"စနစ်ထည့်သွင်းရန် တို့ပါ။"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"မိုဘိုင်းဖုန်းကို မိုဒမ်အဖြစ်သုံးခြင်းအား ပိတ်ထားသည်"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"အသေးစိတ်အချက်အလက်များအတွက် သင့်စီမံခန့်ခွဲသူကို ဆက်သွယ်ပါ"</string> <string name="back_button_label" msgid="2300470004503343439">"နောက်သို့"</string> <string name="next_button_label" msgid="1080555104677992408">"ရှေ့သို့"</string> <string name="skip_button_label" msgid="1275362299471631819">"ကျော်ရန်"</string> diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml index 02efec65ef35..2d63fbdb704c 100644 --- a/core/res/res/values-nb/strings.xml +++ b/core/res/res/values-nb/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Send inn"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Kjøreappen kjører"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Trykk for å lukke kjøreappen."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Internettdeling eller trådløs sone er aktiv"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Trykk for å konfigurere."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Internettdeling er slått av"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Ta kontakt med administratoren din for å få mer informasjon"</string> <string name="back_button_label" msgid="2300470004503343439">"Tilbake"</string> <string name="next_button_label" msgid="1080555104677992408">"Neste"</string> <string name="skip_button_label" msgid="1275362299471631819">"Hopp over"</string> diff --git a/core/res/res/values-ne/strings.xml b/core/res/res/values-ne/strings.xml index b51f4b541477..afa07f4f9643 100644 --- a/core/res/res/values-ne/strings.xml +++ b/core/res/res/values-ne/strings.xml @@ -1528,10 +1528,6 @@ <string name="submit" msgid="1602335572089911941">"पेस गर्नुहोस्"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"ड्राइभिङ अनुप्रयोग चलिरहेको छ"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ड्राइभिङ अनुप्रयोगबाट बाहिर निस्कन ट्याप गर्नुहोस्।"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"टेथर गर्ने वा हटस्पट सक्रिय"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"सेटअप गर्न ट्याप गर्नुहोस्।"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"टेदरिङलाई असक्षम पारिएको छ"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"विवरणहरूका लागि आफ्ना प्रशासकलाई सम्पर्क गर्नुहोस्"</string> <string name="back_button_label" msgid="2300470004503343439">"पछाडि"</string> <string name="next_button_label" msgid="1080555104677992408">"अर्को"</string> <string name="skip_button_label" msgid="1275362299471631819">"छोड्नुहोस्"</string> diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml index bc55c4502362..cff7c5154c63 100644 --- a/core/res/res/values-nl/strings.xml +++ b/core/res/res/values-nl/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Verzenden"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Auto-app wordt uitgevoerd"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Tik om de auto-app te sluiten."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering of hotspot actief"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Tik om in te stellen."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering is uitgeschakeld"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Neem contact op met je beheerder voor meer informatie"</string> <string name="back_button_label" msgid="2300470004503343439">"Vorige"</string> <string name="next_button_label" msgid="1080555104677992408">"Volgende"</string> <string name="skip_button_label" msgid="1275362299471631819">"Overslaan"</string> diff --git a/core/res/res/values-or/strings.xml b/core/res/res/values-or/strings.xml index eb7e6ae4e645..af6d87812680 100644 --- a/core/res/res/values-or/strings.xml +++ b/core/res/res/values-or/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"ଦାଖଲ କରନ୍ତୁ"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"ଡ୍ରାଇଭିଙ୍ଗ ଆପ୍ ଚାଲୁଛି"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ଡ୍ରାଇଭିଙ୍ଗ ଆପ୍ରୁ ବାହାରିବା ପାଇଁ ଟାପ୍ କରନ୍ତୁ।"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"ଟିଥରିଙ୍ଗ କିମ୍ୱା ହଟସ୍ପଟ୍ ସକ୍ରିୟ ଅଛି"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"ସେଟଅପ୍ କରିବାକୁ ଟାପ୍ କରନ୍ତୁ।"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"ଟିଥରିଙ୍ଗ ଅକ୍ଷମ କରାଯାଇଛି"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"ବିବରଣୀ ପାଇଁ ନିଜ ଆଡମିନ୍ଙ୍କ ସହ ଯୋଗାଯୋଗ କରନ୍ତୁ"</string> <string name="back_button_label" msgid="2300470004503343439">"ଫେରନ୍ତୁ"</string> <string name="next_button_label" msgid="1080555104677992408">"ପରବର୍ତ୍ତୀ"</string> <string name="skip_button_label" msgid="1275362299471631819">"ଛାଡ଼ିଦିଅନ୍ତୁ"</string> diff --git a/core/res/res/values-pa/strings.xml b/core/res/res/values-pa/strings.xml index b46f321d4530..bf014335dee4 100644 --- a/core/res/res/values-pa/strings.xml +++ b/core/res/res/values-pa/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"ਪ੍ਰਸਤੁਤ ਕਰੋ"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"ਗੱਡੀ ਚਲਾਉਣ ਸੰਬੰਧੀ ਐਪ ਚੱਲ ਰਹੀ ਹੈ"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ਗੱਡੀ ਚਲਾਉਣ ਸੰਬੰਧੀ ਐਪ ਤੋਂ ਬਾਹਰ ਜਾਣ ਲਈ ਟੈਪ ਕਰੋ।"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"ਟੈਦਰਿੰਗ ਜਾਂ ਹੌਟਸਪੌਟ ਕਿਰਿਆਸ਼ੀਲ"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"ਸਥਾਪਤ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ।"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"ਟੈਦਰਿੰਗ ਨੂੰ ਅਯੋਗ ਬਣਾਇਆ ਗਿਆ ਹੈ"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"ਵੇਰਵਿਆਂ ਲਈ ਆਪਣੇ ਪ੍ਰਸ਼ਾਸਕ ਨੂੰ ਸੰਪਰਕ ਕਰੋ"</string> <string name="back_button_label" msgid="2300470004503343439">"ਪਿੱਛੇ"</string> <string name="next_button_label" msgid="1080555104677992408">"ਅੱਗੇ"</string> <string name="skip_button_label" msgid="1275362299471631819">"ਛੱਡੋ"</string> diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml index 07e89327118a..747e4d563886 100644 --- a/core/res/res/values-pl/strings.xml +++ b/core/res/res/values-pl/strings.xml @@ -1566,10 +1566,6 @@ <string name="submit" msgid="1602335572089911941">"Prześlij"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Tryb samochodowy jest włączony"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Kliknij, by zakończyć tryb samochodowy."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Aktywny tethering lub punkt dostępu"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Kliknij, by skonfigurować."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering został wyłączony"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Aby uzyskać szczegółowe informacje, skontaktuj się z administratorem"</string> <string name="back_button_label" msgid="2300470004503343439">"Wróć"</string> <string name="next_button_label" msgid="1080555104677992408">"Dalej"</string> <string name="skip_button_label" msgid="1275362299471631819">"Pomiń"</string> diff --git a/core/res/res/values-pt-rBR/strings.xml b/core/res/res/values-pt-rBR/strings.xml index ae01cfb3772e..a53c43cf7697 100644 --- a/core/res/res/values-pt-rBR/strings.xml +++ b/core/res/res/values-pt-rBR/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Enviar"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"O app para carro está sendo usado"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Toque para sair do app para carro."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Vínculo ou ponto de acesso ativo"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Toque para configurar."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering desativado"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Fale com seu administrador para saber detalhes"</string> <string name="back_button_label" msgid="2300470004503343439">"Voltar"</string> <string name="next_button_label" msgid="1080555104677992408">"Avançar"</string> <string name="skip_button_label" msgid="1275362299471631819">"Pular"</string> diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml index d501cd7be670..0160b2253fc2 100644 --- a/core/res/res/values-pt-rPT/strings.xml +++ b/core/res/res/values-pt-rPT/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Enviar"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"A aplicação de condução está em execução."</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Toque para sair da aplicação de condução."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Ligação ponto a ponto ou hotspot activos"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Toque para configurar."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"A ligação (à Internet) via telemóvel está desativada."</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contacte o gestor para obter detalhes."</string> <string name="back_button_label" msgid="2300470004503343439">"Anterior"</string> <string name="next_button_label" msgid="1080555104677992408">"Seguinte"</string> <string name="skip_button_label" msgid="1275362299471631819">"Ignorar"</string> diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml index ae01cfb3772e..a53c43cf7697 100644 --- a/core/res/res/values-pt/strings.xml +++ b/core/res/res/values-pt/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Enviar"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"O app para carro está sendo usado"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Toque para sair do app para carro."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Vínculo ou ponto de acesso ativo"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Toque para configurar."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering desativado"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Fale com seu administrador para saber detalhes"</string> <string name="back_button_label" msgid="2300470004503343439">"Voltar"</string> <string name="next_button_label" msgid="1080555104677992408">"Avançar"</string> <string name="skip_button_label" msgid="1275362299471631819">"Pular"</string> diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml index ad08ca4edbab..811001f8dcf2 100644 --- a/core/res/res/values-ro/strings.xml +++ b/core/res/res/values-ro/strings.xml @@ -1544,10 +1544,6 @@ <string name="submit" msgid="1602335572089911941">"Trimiteți"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Aplicația pentru condus rulează"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Atingeți ca să ieșiți din aplicația pentru condus."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering sau hotspot activ"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Atingeți ca să configurați."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tetheringul este dezactivat"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contactați administratorul pentru detalii"</string> <string name="back_button_label" msgid="2300470004503343439">"Înapoi"</string> <string name="next_button_label" msgid="1080555104677992408">"Înainte"</string> <string name="skip_button_label" msgid="1275362299471631819">"Omiteți"</string> diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml index ae9d4831f64b..008ef89764f0 100644 --- a/core/res/res/values-ru/strings.xml +++ b/core/res/res/values-ru/strings.xml @@ -1566,10 +1566,6 @@ <string name="submit" msgid="1602335572089911941">"Отправить"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Приложение для вождения включено"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Нажмите, чтобы выйти из приложения для вождения."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Включен режим модема"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Нажмите, чтобы настроить."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Включить режим модема нельзя"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Обратитесь к администратору, чтобы узнать подробности."</string> <string name="back_button_label" msgid="2300470004503343439">"Назад"</string> <string name="next_button_label" msgid="1080555104677992408">"Далее"</string> <string name="skip_button_label" msgid="1275362299471631819">"Пропустить"</string> diff --git a/core/res/res/values-si/strings.xml b/core/res/res/values-si/strings.xml index 2eeaad6eb7fa..88e4c4eaed5b 100644 --- a/core/res/res/values-si/strings.xml +++ b/core/res/res/values-si/strings.xml @@ -1524,10 +1524,6 @@ <string name="submit" msgid="1602335572089911941">"යොමු කරන්න"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"රියදුරු යෙදුම ධාවනය වේ."</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"රියදුරු යෙදුමෙන් පිටවීම සඳහා තට්ටු කරන්න."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"ටෙදරින් හෝ හොට්ස්පොට් සක්රීයයි"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"පිහිටුවීමට තට්ටු කරන්න."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"ටෙදරින් අබල කර ඇත"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"විස්තර සඳහා ඔබගේ පරිපාලක අමතන්න"</string> <string name="back_button_label" msgid="2300470004503343439">"ආපසු"</string> <string name="next_button_label" msgid="1080555104677992408">"මීලඟ"</string> <string name="skip_button_label" msgid="1275362299471631819">"මඟ හරින්න"</string> diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml index 714f0b40e9b3..94882eea86cd 100644 --- a/core/res/res/values-sk/strings.xml +++ b/core/res/res/values-sk/strings.xml @@ -1566,10 +1566,6 @@ <string name="submit" msgid="1602335572089911941">"Odoslať"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Aplikácia na šoférovanie je spustená"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Klepnutím ukončíte aplikáciu na šoférovanie"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering alebo prístupový bod je aktívny"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Klepnutím prejdete na nastavenie."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering je deaktivovaný"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"O podrobnosti požiadajte svojho správcu"</string> <string name="back_button_label" msgid="2300470004503343439">"Späť"</string> <string name="next_button_label" msgid="1080555104677992408">"Ďalej"</string> <string name="skip_button_label" msgid="1275362299471631819">"Preskočiť"</string> diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml index d776d0a8d224..ee554c48e1de 100644 --- a/core/res/res/values-sl/strings.xml +++ b/core/res/res/values-sl/strings.xml @@ -1566,10 +1566,6 @@ <string name="submit" msgid="1602335572089911941">"Pošlji"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Aplikacija za vožnjo se izvaja"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Dotaknite se, če želite zapreti aplikacijo za vožnjo."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Aktivna povezava z internetom ali dostopna točka sta aktivni"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Dotaknite se, če želite nastaviti."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Povezava z internetom prek mobilnega telefona je onemogočena"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Za podrobnosti se obrnite na skrbnika"</string> <string name="back_button_label" msgid="2300470004503343439">"Nazaj"</string> <string name="next_button_label" msgid="1080555104677992408">"Naprej"</string> <string name="skip_button_label" msgid="1275362299471631819">"Preskoči"</string> diff --git a/core/res/res/values-sq/strings.xml b/core/res/res/values-sq/strings.xml index ce9c564d482e..e4ec7bb0c6aa 100644 --- a/core/res/res/values-sq/strings.xml +++ b/core/res/res/values-sq/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"Dërgo"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Aplikacioni i drejtimit të makinës është në ekzekutim"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Trokit për të dalë nga aplikacioni i drejtimit të makinës."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Lidhja e çiftimit ose ajo e qasjes në zona publike interneti është aktive"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Trokit për ta konfiguruar."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Lidhja e çiftimit është çaktivizuar"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Kontakto me administratorin për detaje"</string> <string name="back_button_label" msgid="2300470004503343439">"Prapa"</string> <string name="next_button_label" msgid="1080555104677992408">"Përpara"</string> <string name="skip_button_label" msgid="1275362299471631819">"Kapërce"</string> diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml index 1d7ae45994c8..896e7622819a 100644 --- a/core/res/res/values-sr/strings.xml +++ b/core/res/res/values-sr/strings.xml @@ -1544,10 +1544,6 @@ <string name="submit" msgid="1602335572089911941">"Пошаљи"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Апликација за вожњу је покренута"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Додирните да бисте изашли из апликације за вожњу."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Активно повезивање са интернетом преко мобилног уређаја или хотспот"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Додирните да бисте подесили."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Привезивање је онемогућено"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Потражите детаље од администратора"</string> <string name="back_button_label" msgid="2300470004503343439">"Назад"</string> <string name="next_button_label" msgid="1080555104677992408">"Next"</string> <string name="skip_button_label" msgid="1275362299471631819">"Прескочи"</string> diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml index 02f47d9f7d2d..d004bf48c3c8 100644 --- a/core/res/res/values-sv/strings.xml +++ b/core/res/res/values-sv/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Skicka"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Bilkörningsappen körs"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Tryck här om du vill avsluta bilkörningsappen."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Internetdelning eller surfzon aktiverad"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Tryck om du vill konfigurera."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Internetdelning har inaktiverats"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Kontakta administratören om du vill veta mer"</string> <string name="back_button_label" msgid="2300470004503343439">"Tillbaka"</string> <string name="next_button_label" msgid="1080555104677992408">"Nästa"</string> <string name="skip_button_label" msgid="1275362299471631819">"Hoppa över"</string> diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml index 358c1fbbad59..13c668cdc792 100644 --- a/core/res/res/values-sw/strings.xml +++ b/core/res/res/values-sw/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Wasilisha"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Umewasha programu ya kuendesha gari"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Gusa ili ufunge programu ya kuendesha gari."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Kushiriki au kusambaza intaneti kumewashwa"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Gusa ili uweke mipangilio."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Umezima kipengele cha kusambaza mtandao"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Wasiliana na msimamizi wako ili upate maelezo zaidi"</string> <string name="back_button_label" msgid="2300470004503343439">"Nyuma"</string> <string name="next_button_label" msgid="1080555104677992408">"Ifuatayo"</string> <string name="skip_button_label" msgid="1275362299471631819">"Ruka"</string> diff --git a/core/res/res/values-ta/strings.xml b/core/res/res/values-ta/strings.xml index 41f81efc084f..8c5f0b679d9a 100644 --- a/core/res/res/values-ta/strings.xml +++ b/core/res/res/values-ta/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"சமர்ப்பி"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"\'வாகனம் ஓட்டும் பயன்முறை’ ஆனில் உள்ளது"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"வாகனம் ஓட்டும் பயன்முறையிலிருந்து வெளியேற, தட்டவும்."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"டெதெரிங்/ஹாட்ஸ்பாட் இயங்குகிறது"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"அமைக்க, தட்டவும்."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"இணைப்பு முறை முடக்கப்பட்டுள்ளது"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"விவரங்களுக்கு, உங்கள் நிர்வாகியைத் தொடர்புகொள்ளவும்"</string> <string name="back_button_label" msgid="2300470004503343439">"முந்தையது"</string> <string name="next_button_label" msgid="1080555104677992408">"அடுத்து"</string> <string name="skip_button_label" msgid="1275362299471631819">"தவிர்"</string> diff --git a/core/res/res/values-te/strings.xml b/core/res/res/values-te/strings.xml index a1cf66a2e0e0..ebc219033811 100644 --- a/core/res/res/values-te/strings.xml +++ b/core/res/res/values-te/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"సమర్పించు"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"డ్రైవింగ్ యాప్ అమలవుతోంది"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"డ్రైవింగ్ యాప్ నుండి నిష్క్రమించడం కోసం నొక్కండి."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"టీథర్ చేయబడినది లేదా హాట్స్పాట్ సక్రియంగా ఉండేది"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"సెటప్ చేయడానికి నొక్కండి."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"టెథెరింగ్ నిలిపివేయబడింది"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"వివరాల కోసం మీ నిర్వాహకులను సంప్రదించండి"</string> <string name="back_button_label" msgid="2300470004503343439">"వెనుకకు"</string> <string name="next_button_label" msgid="1080555104677992408">"తర్వాత"</string> <string name="skip_button_label" msgid="1275362299471631819">"దాటవేయి"</string> diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml index 54d7b3252761..3d7386da4df4 100644 --- a/core/res/res/values-th/strings.xml +++ b/core/res/res/values-th/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"ส่ง"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"แอปสำหรับการขับขี่ทำงานอยู่"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"แตะเพื่อออกจากแอปสำหรับการขับขี่"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"การปล่อยสัญญาณหรือฮอตสปอตทำงานอยู่"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"แตะเพื่อตั้งค่า"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"ปิดใช้การเชื่อมต่ออินเทอร์เน็ตผ่านมือถือแล้ว"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"ติดต่อผู้ดูแลระบบเพื่อขอรายละเอียด"</string> <string name="back_button_label" msgid="2300470004503343439">"กลับ"</string> <string name="next_button_label" msgid="1080555104677992408">"ถัดไป"</string> <string name="skip_button_label" msgid="1275362299471631819">"ข้าม"</string> diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml index d3c7852c347a..04730dd00c96 100644 --- a/core/res/res/values-tl/strings.xml +++ b/core/res/res/values-tl/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Isumite"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Tumatakbo ang driving app"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Mag-tap para lumabas sa app sa pagmamaneho."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Pagsasama o aktibong hotspot"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"I-tap upang i-set up."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Naka-disable ang pag-tether"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Makipag-ugnayan sa iyong admin para sa mga detalye"</string> <string name="back_button_label" msgid="2300470004503343439">"Bumalik"</string> <string name="next_button_label" msgid="1080555104677992408">"Susunod"</string> <string name="skip_button_label" msgid="1275362299471631819">"Laktawan"</string> diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml index 23b6031a40f0..0afa2580386b 100644 --- a/core/res/res/values-tr/strings.xml +++ b/core/res/res/values-tr/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Gönder"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Sürüş uygulaması çalışıyor"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Sürüş uygulamasından çıkmak için dokunun."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering veya hotspot etkin"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Ayarlamak için dokunun."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering devre dışı bırakıldı"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Ayrıntılı bilgi için yöneticinize başvurun"</string> <string name="back_button_label" msgid="2300470004503343439">"Geri"</string> <string name="next_button_label" msgid="1080555104677992408">"İleri"</string> <string name="skip_button_label" msgid="1275362299471631819">"Atla"</string> diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml index 41ad7b5dac73..5cd7b01890f1 100644 --- a/core/res/res/values-uk/strings.xml +++ b/core/res/res/values-uk/strings.xml @@ -1566,10 +1566,6 @@ <string name="submit" msgid="1602335572089911941">"Надіслати"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Працює додаток для автомобілів"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Торкніться, щоб вийти з додатка для автомобілів."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Прив\'язка чи точка дост. активна"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Торкніться, щоб налаштувати."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Використання телефона в режимі модема вимкнено"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Щоб дізнатися більше, зв’яжіться з адміністратором"</string> <string name="back_button_label" msgid="2300470004503343439">"Назад"</string> <string name="next_button_label" msgid="1080555104677992408">"Далі"</string> <string name="skip_button_label" msgid="1275362299471631819">"Пропустити"</string> diff --git a/core/res/res/values-ur/strings.xml b/core/res/res/values-ur/strings.xml index 52a1bbc6b0b7..cc44519950bf 100644 --- a/core/res/res/values-ur/strings.xml +++ b/core/res/res/values-ur/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"جمع کرائیں"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"ڈرائیونگ ایپ چل رہی ہے"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"ڈرائیونگ ایپ سے باہر نکلنے کے لئے تھپتھپائيں۔"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"ٹیدرنگ یا ہاٹ اسپاٹ فعال"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"سیٹ اپ کرنے کیلئے تھپتھپائیں۔"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"ٹیدرنگ غیر فعال ہے"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"تفصیلات کے لئے اپنے منتظم سے رابطہ کریں"</string> <string name="back_button_label" msgid="2300470004503343439">"واپس جائیں"</string> <string name="next_button_label" msgid="1080555104677992408">"اگلا"</string> <string name="skip_button_label" msgid="1275362299471631819">"نظر انداز کریں"</string> diff --git a/core/res/res/values-uz/strings.xml b/core/res/res/values-uz/strings.xml index 92d767544312..fbde78d0cc65 100644 --- a/core/res/res/values-uz/strings.xml +++ b/core/res/res/values-uz/strings.xml @@ -1523,10 +1523,6 @@ <string name="submit" msgid="1602335572089911941">"Yuborish"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Avtomobil ilovasi ishlayapti"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Avtomobil ilovasidan chiqish uchun bosing"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Modem rejimi yoniq"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Sozlash uchun bosing."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Modem rejimi faolsizlantirildi"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Tafsilotlari uchun administratoringizga murojaat qiling"</string> <string name="back_button_label" msgid="2300470004503343439">"Orqaga"</string> <string name="next_button_label" msgid="1080555104677992408">"Keyingisi"</string> <string name="skip_button_label" msgid="1275362299471631819">"Tashlab o‘tish"</string> diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml index f3ae7631acb7..f3b5a47c0e04 100644 --- a/core/res/res/values-vi/strings.xml +++ b/core/res/res/values-vi/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Gửi"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Ứng dụng lái xe đang chạy"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Nhấn để thoát khỏi ứng dụng lái xe."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Chức năng điểm truy cập Internet hoặc điểm phát sóng đang hoạt động"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Nhấn để thiết lập."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Đã tắt tính năng chia sẻ kết nối"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Hãy liên hệ với quản trị viên của bạn để biết chi tiết"</string> <string name="back_button_label" msgid="2300470004503343439">"Quay lại"</string> <string name="next_button_label" msgid="1080555104677992408">"Tiếp theo"</string> <string name="skip_button_label" msgid="1275362299471631819">"Bỏ qua"</string> diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml index a2f863985fbd..37c196f2e719 100644 --- a/core/res/res/values-zh-rCN/strings.xml +++ b/core/res/res/values-zh-rCN/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"提交"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"驾驶应用正在运行"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"点按即可退出驾驶应用。"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"网络共享或热点已启用"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"点按即可进行设置。"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"网络共享已停用"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"请与您的管理员联系以了解详情"</string> <string name="back_button_label" msgid="2300470004503343439">"上一步"</string> <string name="next_button_label" msgid="1080555104677992408">"下一步"</string> <string name="skip_button_label" msgid="1275362299471631819">"跳过"</string> diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml index c559ec251397..504058c794fb 100644 --- a/core/res/res/values-zh-rHK/strings.xml +++ b/core/res/res/values-zh-rHK/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"提交"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"駕駛應用程式執行中"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"輕按即可退出駕駛應用程式。"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"已啟用網絡共享或熱點"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"輕按即可設定。"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"網絡共享已停用"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"請聯絡您的管理員以瞭解詳情"</string> <string name="back_button_label" msgid="2300470004503343439">"返回"</string> <string name="next_button_label" msgid="1080555104677992408">"繼續"</string> <string name="skip_button_label" msgid="1275362299471631819">"略過"</string> diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml index 77bbcb26960b..b3b02212c8d2 100644 --- a/core/res/res/values-zh-rTW/strings.xml +++ b/core/res/res/values-zh-rTW/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"提交"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"行車應用程式執行中"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"輕觸即可結束行車應用程式。"</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"網路共用或無線基地台已啟用"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"輕觸即可進行設定。"</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"數據連線已停用"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"詳情請洽你的管理員"</string> <string name="back_button_label" msgid="2300470004503343439">"返回"</string> <string name="next_button_label" msgid="1080555104677992408">"繼續"</string> <string name="skip_button_label" msgid="1275362299471631819">"略過"</string> diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml index ec66a724fd93..76db0b39755f 100644 --- a/core/res/res/values-zu/strings.xml +++ b/core/res/res/values-zu/strings.xml @@ -1522,10 +1522,6 @@ <string name="submit" msgid="1602335572089911941">"Hambisa"</string> <string name="car_mode_disable_notification_title" msgid="5704265646471239078">"Uhlelo lokusebenza lokushayela luyasebenza"</string> <string name="car_mode_disable_notification_message" msgid="7647248420931129377">"Thepha ukuze uphume kuhlelo lokusebenza lokushayela."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"Ukusebenzisa njengemodemu noma i-hotspot ephathekayo kuvuliwe"</string> - <string name="tethered_notification_message" msgid="2113628520792055377">"Thepha ukuze usethe."</string> - <string name="disable_tether_notification_title" msgid="7526977944111313195">"Ukusebenzisa ifoni njengemodemu kukhutshaziwe"</string> - <string name="disable_tether_notification_message" msgid="2913366428516852495">"Xhumana nomphathi wakho ukuze uthole imininingwane"</string> <string name="back_button_label" msgid="2300470004503343439">"Emuva"</string> <string name="next_button_label" msgid="1080555104677992408">"Okulandelayo"</string> <string name="skip_button_label" msgid="1275362299471631819">"Yeqa"</string> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index d52b71c5393a..4c25a7a08cf5 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -508,7 +508,7 @@ --> <string translatable="false" name="config_mobile_hotspot_provision_app_no_ui"></string> <!-- Sent in response to a provisioning check. The caller must hold the - permission android.permission.CONNECTIVITY_INTERNAL for Settings to + permission android.permission.TETHER_PRIVILEGED for Settings to receive this response. See config_mobile_hotspot_provision_response @@ -3015,9 +3015,6 @@ <!-- String array containing numbers that shouldn't be logged. Country-specific. --> <string-array name="unloggable_phone_numbers" /> - <!-- Flag specifying whether or not IMS will use the dynamic ImsResolver --> - <bool name="config_dynamic_bind_ims">false</bool> - <!-- Cellular data service package name to bind to by default. If none is specified in an overlay, an empty string is passed in --> <string name="config_wwan_data_service_package" translatable="false">com.android.phone</string> @@ -3677,14 +3674,13 @@ --> <string name="config_defaultWellbeingPackage" translatable="false"></string> - <!-- The package name for the system telephony apps. This package must be trusted, as it will be granted with permissions with special telephony protection level. Note, framework by default support multiple telephony apps, each package name is separated by comma. Example: "com.android.phone,com.android.stk,com.android.providers.telephony" --> - <string name="config_telephonyPackages" translatable="false">"com.android.phone,com.android.stk,com.android.providers.telephony,com.android.ons"</string> + <string name="config_telephonyPackages" translatable="false">"com.android.phone,com.android.stk,com.android.providers.telephony,com.android.ons,com.android.cellbroadcastservice"</string> <!-- The component name for the default system attention service. This service must be trusted, as it can be activated without explicit consent of the user. @@ -3855,6 +3851,8 @@ instead of 'Emergency calls only' when SIM is unready. --> <string-array translatable="false" name="config_display_no_service_when_sim_unready"> <item>"DE"</item> + <item>"GB"</item> + <item>"JP"</item> </string-array> <!-- Class names of device specific services inheriting com.android.server.SystemService. The diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 3585226b73ff..fdfedea4bd13 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -3955,18 +3955,6 @@ <string name="car_mode_disable_notification_title">Driving app is running</string> <string name="car_mode_disable_notification_message">Tap to exit driving app.</string> - <!-- Strings for tethered notification --> - <!-- Shown when the device is tethered --> - <string name="tethered_notification_title">Tethering or hotspot active</string> - <string name="tethered_notification_message">Tap to set up.</string> - - <!-- Strings for tether disabling notification --> - <!-- This notification is shown when tethering has been disabled on a user's device. - The device is managed by the user's employer. Tethering can't be turned on unless the - IT administrator allows it. The noun "admin" is another reference for "IT administrator." --> - <string name="disable_tether_notification_title">Tethering is disabled</string> - <string name="disable_tether_notification_message">Contact your admin for details</string> - <!-- Strings for possible PreferenceActivity Back/Next buttons --> <string name="back_button_label">Back</string> <string name="next_button_label">Next</string> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 29aa74baf58f..a1f66d352bcf 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -296,7 +296,6 @@ <java-symbol type="bool" name="config_hotswapCapable" /> <java-symbol type="bool" name="config_mms_content_disposition_support" /> <java-symbol type="string" name="config_ims_package" /> - <java-symbol type="bool" name="config_dynamic_bind_ims" /> <java-symbol type="string" name="config_wwan_network_service_package" /> <java-symbol type="string" name="config_wlan_network_service_package" /> <java-symbol type="string" name="config_wwan_network_service_class" /> @@ -1990,9 +1989,6 @@ <java-symbol type="drawable" name="stat_sys_battery_charge" /> <java-symbol type="drawable" name="stat_sys_battery_unknown" /> <java-symbol type="drawable" name="stat_sys_data_usb" /> - <java-symbol type="drawable" name="stat_sys_tether_bluetooth" /> - <java-symbol type="drawable" name="stat_sys_tether_general" /> - <java-symbol type="drawable" name="stat_sys_tether_usb" /> <java-symbol type="drawable" name="stat_sys_throttled" /> <java-symbol type="drawable" name="vpn_connected" /> <java-symbol type="drawable" name="vpn_disconnected" /> @@ -2186,10 +2182,6 @@ <java-symbol type="string" name="select_keyboard_layout_notification_message" /> <java-symbol type="string" name="smv_application" /> <java-symbol type="string" name="smv_process" /> - <java-symbol type="string" name="tethered_notification_message" /> - <java-symbol type="string" name="tethered_notification_title" /> - <java-symbol type="string" name="disable_tether_notification_message" /> - <java-symbol type="string" name="disable_tether_notification_title" /> <java-symbol type="string" name="adb_debugging_notification_channel_tv" /> <java-symbol type="string" name="usb_accessory_notification_title" /> <java-symbol type="string" name="usb_mtp_notification_title" /> diff --git a/core/tests/ConnectivityManagerTest/AndroidManifest.xml b/core/tests/ConnectivityManagerTest/AndroidManifest.xml index a391e1feb28f..796d7e8ff407 100644 --- a/core/tests/ConnectivityManagerTest/AndroidManifest.xml +++ b/core/tests/ConnectivityManagerTest/AndroidManifest.xml @@ -73,9 +73,9 @@ <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android:name="android.permission.WRITE_SETTINGS" /> <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" /> - <!-- This permission is added for API call setAirplaneMode() in ConnectivityManager --> - <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" /> <uses-permission android:name="android.permission.TETHER_PRIVILEGED" /> + <!-- This permission is added for API call setAirplaneMode() in ConnectivityManager --> + <uses-permission android:name="android.permission.NETWORK_SETTINGS" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.DEVICE_POWER" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> diff --git a/core/tests/coretests/src/android/app/timedetector/ManualTimeSuggestionTest.java b/core/tests/coretests/src/android/app/timedetector/ManualTimeSuggestionTest.java new file mode 100644 index 000000000000..de6f8f7231fa --- /dev/null +++ b/core/tests/coretests/src/android/app/timedetector/ManualTimeSuggestionTest.java @@ -0,0 +1,66 @@ +/* + * Copyright 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app.timedetector; + +import static android.app.timezonedetector.ParcelableTestSupport.assertRoundTripParcelable; +import static android.app.timezonedetector.ParcelableTestSupport.roundTripParcelable; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; + +import android.util.TimestampedValue; + +import org.junit.Test; + +public class ManualTimeSuggestionTest { + + private static final TimestampedValue<Long> ARBITRARY_TIME = + new TimestampedValue<>(1111L, 2222L); + + @Test + public void testEquals() { + ManualTimeSuggestion one = new ManualTimeSuggestion(ARBITRARY_TIME); + assertEquals(one, one); + + ManualTimeSuggestion two = new ManualTimeSuggestion(ARBITRARY_TIME); + assertEquals(one, two); + assertEquals(two, one); + + TimestampedValue<Long> differentTime = new TimestampedValue<>( + ARBITRARY_TIME.getReferenceTimeMillis() + 1, + ARBITRARY_TIME.getValue()); + ManualTimeSuggestion three = new ManualTimeSuggestion(differentTime); + assertNotEquals(one, three); + assertNotEquals(three, one); + + // DebugInfo must not be considered in equals(). + one.addDebugInfo("Debug info 1"); + two.addDebugInfo("Debug info 2"); + assertEquals(one, two); + } + + @Test + public void testParcelable() { + ManualTimeSuggestion suggestion = new ManualTimeSuggestion(ARBITRARY_TIME); + assertRoundTripParcelable(suggestion); + + // DebugInfo should also be stored (but is not checked by equals() + suggestion.addDebugInfo("This is debug info"); + ManualTimeSuggestion rtSuggestion = roundTripParcelable(suggestion); + assertEquals(suggestion.getDebugInfo(), rtSuggestion.getDebugInfo()); + } +} diff --git a/core/tests/coretests/src/android/app/timedetector/PhoneTimeSuggestionTest.java b/core/tests/coretests/src/android/app/timedetector/PhoneTimeSuggestionTest.java index c9a86dcea84c..bee270e5f5c9 100644 --- a/core/tests/coretests/src/android/app/timedetector/PhoneTimeSuggestionTest.java +++ b/core/tests/coretests/src/android/app/timedetector/PhoneTimeSuggestionTest.java @@ -16,11 +16,12 @@ package android.app.timedetector; +import static android.app.timezonedetector.ParcelableTestSupport.assertRoundTripParcelable; +import static android.app.timezonedetector.ParcelableTestSupport.roundTripParcelable; + import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; -import android.os.Parcel; -import android.os.Parcelable; import android.util.TimestampedValue; import org.junit.Test; @@ -30,53 +31,67 @@ public class PhoneTimeSuggestionTest { @Test public void testEquals() { - PhoneTimeSuggestion one = new PhoneTimeSuggestion(PHONE_ID); - assertEquals(one, one); - - PhoneTimeSuggestion two = new PhoneTimeSuggestion(PHONE_ID); - assertEquals(one, two); - assertEquals(two, one); - - one.setUtcTime(new TimestampedValue<>(1111L, 2222L)); - assertEquals(one, one); - - two.setUtcTime(new TimestampedValue<>(1111L, 2222L)); - assertEquals(one, two); - assertEquals(two, one); - - PhoneTimeSuggestion three = new PhoneTimeSuggestion(PHONE_ID + 1); - three.setUtcTime(new TimestampedValue<>(1111L, 2222L)); - assertNotEquals(one, three); - assertNotEquals(three, one); + PhoneTimeSuggestion.Builder builder1 = new PhoneTimeSuggestion.Builder(PHONE_ID); + { + PhoneTimeSuggestion one = builder1.build(); + assertEquals(one, one); + } + + PhoneTimeSuggestion.Builder builder2 = new PhoneTimeSuggestion.Builder(PHONE_ID); + { + PhoneTimeSuggestion one = builder1.build(); + PhoneTimeSuggestion two = builder2.build(); + assertEquals(one, two); + assertEquals(two, one); + } + + builder1.setUtcTime(new TimestampedValue<>(1111L, 2222L)); + { + PhoneTimeSuggestion one = builder1.build(); + assertEquals(one, one); + } + + builder2.setUtcTime(new TimestampedValue<>(1111L, 2222L)); + { + PhoneTimeSuggestion one = builder1.build(); + PhoneTimeSuggestion two = builder2.build(); + assertEquals(one, two); + assertEquals(two, one); + } + + PhoneTimeSuggestion.Builder builder3 = new PhoneTimeSuggestion.Builder(PHONE_ID + 1); + builder3.setUtcTime(new TimestampedValue<>(1111L, 2222L)); + { + PhoneTimeSuggestion one = builder1.build(); + PhoneTimeSuggestion three = builder3.build(); + assertNotEquals(one, three); + assertNotEquals(three, one); + } // DebugInfo must not be considered in equals(). - one.addDebugInfo("Debug info 1"); - two.addDebugInfo("Debug info 2"); - assertEquals(one, two); + builder1.addDebugInfo("Debug info 1"); + builder2.addDebugInfo("Debug info 2"); + { + PhoneTimeSuggestion one = builder1.build(); + PhoneTimeSuggestion two = builder2.build(); + assertEquals(one, two); + } } @Test public void testParcelable() { - PhoneTimeSuggestion one = new PhoneTimeSuggestion(PHONE_ID); - assertEquals(one, roundTripParcelable(one)); + PhoneTimeSuggestion.Builder builder = new PhoneTimeSuggestion.Builder(PHONE_ID); + assertRoundTripParcelable(builder.build()); - one.setUtcTime(new TimestampedValue<>(1111L, 2222L)); - assertEquals(one, roundTripParcelable(one)); + builder.setUtcTime(new TimestampedValue<>(1111L, 2222L)); + assertRoundTripParcelable(builder.build()); // DebugInfo should also be stored (but is not checked by equals() - one.addDebugInfo("This is debug info"); - PhoneTimeSuggestion two = roundTripParcelable(one); - assertEquals(one.getDebugInfo(), two.getDebugInfo()); - } - - @SuppressWarnings("unchecked") - private static <T extends Parcelable> T roundTripParcelable(T one) { - Parcel parcel = Parcel.obtain(); - parcel.writeTypedObject(one, 0); - parcel.setDataPosition(0); - - T toReturn = (T) parcel.readTypedObject(PhoneTimeSuggestion.CREATOR); - parcel.recycle(); - return toReturn; + { + PhoneTimeSuggestion suggestion1 = builder.build(); + builder.addDebugInfo("This is debug info"); + PhoneTimeSuggestion rtSuggestion1 = roundTripParcelable(suggestion1); + assertEquals(suggestion1.getDebugInfo(), rtSuggestion1.getDebugInfo()); + } } } diff --git a/core/tests/utiltests/AndroidManifest.xml b/core/tests/utiltests/AndroidManifest.xml index 4ef4b1fe9120..8e0f1d244c52 100644 --- a/core/tests/utiltests/AndroidManifest.xml +++ b/core/tests/utiltests/AndroidManifest.xml @@ -30,7 +30,6 @@ <uses-permission android:name="android.permission.MANAGE_NETWORK_POLICY" /> <uses-permission android:name="android.permission.READ_NETWORK_USAGE_HISTORY" /> - <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.MANAGE_USERS" /> <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" /> diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml index 9064abf6ba36..375b35ca2498 100644 --- a/data/etc/privapp-permissions-platform.xml +++ b/data/etc/privapp-permissions-platform.xml @@ -329,8 +329,10 @@ applications that come with the platform <permission name="android.permission.REQUEST_NOTIFICATION_ASSISTANT_SERVICE" /> <!-- Permission required to test ExplicitHealthCheckServiceImpl. --> <permission name="android.permission.BIND_EXPLICIT_HEALTH_CHECK_SERVICE"/> - <!-- Permission required for UiModeManager cts test. --> + <!-- Permission required for UiModeManager CTS test. --> <permission name="android.permission.ENTER_CAR_MODE_PRIORITIZED"/> + <!-- Permission required for Telecom car mode CTS tests. --> + <permission name="android.permission.CONTROL_INCALL_EXPERIENCE"/> </privapp-permissions> <privapp-permissions package="com.android.statementservice"> diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java index bb731a8189f9..3455c4f01ff9 100644 --- a/media/java/android/media/AudioSystem.java +++ b/media/java/android/media/AudioSystem.java @@ -30,7 +30,9 @@ import android.util.Log; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; +import java.util.HashSet; import java.util.Map; +import java.util.Set; /* IF YOU CHANGE ANY OF THE CONSTANTS IN THIS FILE, DO NOT FORGET * TO UPDATE THE CORRESPONDING NATIVE GLUE AND AudioManager.java. @@ -541,51 +543,75 @@ public class AudioSystem public static final int DEVICE_OUT_DEFAULT = DEVICE_BIT_DEFAULT; - public static final int DEVICE_OUT_ALL = (DEVICE_OUT_EARPIECE | - DEVICE_OUT_SPEAKER | - DEVICE_OUT_WIRED_HEADSET | - DEVICE_OUT_WIRED_HEADPHONE | - DEVICE_OUT_BLUETOOTH_SCO | - DEVICE_OUT_BLUETOOTH_SCO_HEADSET | - DEVICE_OUT_BLUETOOTH_SCO_CARKIT | - DEVICE_OUT_BLUETOOTH_A2DP | - DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | - DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER | - DEVICE_OUT_HDMI | - DEVICE_OUT_ANLG_DOCK_HEADSET | - DEVICE_OUT_DGTL_DOCK_HEADSET | - DEVICE_OUT_USB_ACCESSORY | - DEVICE_OUT_USB_DEVICE | - DEVICE_OUT_REMOTE_SUBMIX | - DEVICE_OUT_TELEPHONY_TX | - DEVICE_OUT_LINE | - DEVICE_OUT_HDMI_ARC | - DEVICE_OUT_SPDIF | - DEVICE_OUT_FM | - DEVICE_OUT_AUX_LINE | - DEVICE_OUT_SPEAKER_SAFE | - DEVICE_OUT_IP | - DEVICE_OUT_BUS | - DEVICE_OUT_PROXY | - DEVICE_OUT_USB_HEADSET | - DEVICE_OUT_HEARING_AID | - DEVICE_OUT_DEFAULT); - public static final int DEVICE_OUT_ALL_A2DP = (DEVICE_OUT_BLUETOOTH_A2DP | - DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | - DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER); - public static final int DEVICE_OUT_ALL_SCO = (DEVICE_OUT_BLUETOOTH_SCO | - DEVICE_OUT_BLUETOOTH_SCO_HEADSET | - DEVICE_OUT_BLUETOOTH_SCO_CARKIT); + // Deprecated in R because multiple device types are no longer accessed as a bit mask. + // Removing this will get lint warning about changing hidden apis. @UnsupportedAppUsage public static final int DEVICE_OUT_ALL_USB = (DEVICE_OUT_USB_ACCESSORY | DEVICE_OUT_USB_DEVICE | DEVICE_OUT_USB_HEADSET); - public static final int DEVICE_OUT_ALL_HDMI_SYSTEM_AUDIO = (DEVICE_OUT_AUX_LINE | - DEVICE_OUT_HDMI_ARC | - DEVICE_OUT_SPDIF); - public static final int DEVICE_ALL_HDMI_SYSTEM_AUDIO_AND_SPEAKER = - (DEVICE_OUT_ALL_HDMI_SYSTEM_AUDIO | - DEVICE_OUT_SPEAKER); + + public static final Set<Integer> DEVICE_OUT_ALL_SET; + public static final Set<Integer> DEVICE_OUT_ALL_A2DP_SET; + public static final Set<Integer> DEVICE_OUT_ALL_SCO_SET; + public static final Set<Integer> DEVICE_OUT_ALL_USB_SET; + public static final Set<Integer> DEVICE_OUT_ALL_HDMI_SYSTEM_AUDIO_SET; + public static final Set<Integer> DEVICE_ALL_HDMI_SYSTEM_AUDIO_AND_SPEAKER_SET; + static { + DEVICE_OUT_ALL_SET = new HashSet<>(); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_EARPIECE); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_SPEAKER); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_WIRED_HEADSET); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_WIRED_HEADPHONE); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_BLUETOOTH_SCO); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_BLUETOOTH_SCO_HEADSET); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_BLUETOOTH_SCO_CARKIT); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_BLUETOOTH_A2DP); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_HDMI); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_ANLG_DOCK_HEADSET); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_DGTL_DOCK_HEADSET); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_USB_ACCESSORY); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_USB_DEVICE); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_REMOTE_SUBMIX); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_TELEPHONY_TX); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_LINE); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_HDMI_ARC); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_SPDIF); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_FM); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_AUX_LINE); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_SPEAKER_SAFE); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_IP); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_BUS); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_PROXY); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_USB_HEADSET); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_HEARING_AID); + DEVICE_OUT_ALL_SET.add(DEVICE_OUT_DEFAULT); + + DEVICE_OUT_ALL_A2DP_SET = new HashSet<>(); + DEVICE_OUT_ALL_A2DP_SET.add(DEVICE_OUT_BLUETOOTH_A2DP); + DEVICE_OUT_ALL_A2DP_SET.add(DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES); + DEVICE_OUT_ALL_A2DP_SET.add(DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER); + + DEVICE_OUT_ALL_SCO_SET = new HashSet<>(); + DEVICE_OUT_ALL_SCO_SET.add(DEVICE_OUT_BLUETOOTH_SCO); + DEVICE_OUT_ALL_SCO_SET.add(DEVICE_OUT_BLUETOOTH_SCO_HEADSET); + DEVICE_OUT_ALL_SCO_SET.add(DEVICE_OUT_BLUETOOTH_SCO_CARKIT); + + DEVICE_OUT_ALL_USB_SET = new HashSet<>(); + DEVICE_OUT_ALL_USB_SET.add(DEVICE_OUT_USB_ACCESSORY); + DEVICE_OUT_ALL_USB_SET.add(DEVICE_OUT_USB_DEVICE); + DEVICE_OUT_ALL_USB_SET.add(DEVICE_OUT_USB_HEADSET); + + DEVICE_OUT_ALL_HDMI_SYSTEM_AUDIO_SET = new HashSet<>(); + DEVICE_OUT_ALL_HDMI_SYSTEM_AUDIO_SET.add(DEVICE_OUT_AUX_LINE); + DEVICE_OUT_ALL_HDMI_SYSTEM_AUDIO_SET.add(DEVICE_OUT_HDMI_ARC); + DEVICE_OUT_ALL_HDMI_SYSTEM_AUDIO_SET.add(DEVICE_OUT_SPDIF); + + DEVICE_ALL_HDMI_SYSTEM_AUDIO_AND_SPEAKER_SET = new HashSet<>(); + DEVICE_ALL_HDMI_SYSTEM_AUDIO_AND_SPEAKER_SET.addAll(DEVICE_OUT_ALL_HDMI_SYSTEM_AUDIO_SET); + DEVICE_ALL_HDMI_SYSTEM_AUDIO_AND_SPEAKER_SET.add(DEVICE_OUT_SPEAKER); + } // input devices @UnsupportedAppUsage @@ -633,37 +659,47 @@ public class AudioSystem @UnsupportedAppUsage public static final int DEVICE_IN_DEFAULT = DEVICE_BIT_IN | DEVICE_BIT_DEFAULT; - public static final int DEVICE_IN_ALL = (DEVICE_IN_COMMUNICATION | - DEVICE_IN_AMBIENT | - DEVICE_IN_BUILTIN_MIC | - DEVICE_IN_BLUETOOTH_SCO_HEADSET | - DEVICE_IN_WIRED_HEADSET | - DEVICE_IN_HDMI | - DEVICE_IN_TELEPHONY_RX | - DEVICE_IN_BACK_MIC | - DEVICE_IN_REMOTE_SUBMIX | - DEVICE_IN_ANLG_DOCK_HEADSET | - DEVICE_IN_DGTL_DOCK_HEADSET | - DEVICE_IN_USB_ACCESSORY | - DEVICE_IN_USB_DEVICE | - DEVICE_IN_FM_TUNER | - DEVICE_IN_TV_TUNER | - DEVICE_IN_LINE | - DEVICE_IN_SPDIF | - DEVICE_IN_BLUETOOTH_A2DP | - DEVICE_IN_LOOPBACK | - DEVICE_IN_IP | - DEVICE_IN_BUS | - DEVICE_IN_PROXY | - DEVICE_IN_USB_HEADSET | - DEVICE_IN_BLUETOOTH_BLE | - DEVICE_IN_HDMI_ARC | - DEVICE_IN_ECHO_REFERENCE | - DEVICE_IN_DEFAULT); - public static final int DEVICE_IN_ALL_SCO = DEVICE_IN_BLUETOOTH_SCO_HEADSET; - public static final int DEVICE_IN_ALL_USB = (DEVICE_IN_USB_ACCESSORY | - DEVICE_IN_USB_DEVICE | - DEVICE_IN_USB_HEADSET); + public static final Set<Integer> DEVICE_IN_ALL_SET; + public static final Set<Integer> DEVICE_IN_ALL_SCO_SET; + public static final Set<Integer> DEVICE_IN_ALL_USB_SET; + static { + DEVICE_IN_ALL_SET = new HashSet<>(); + DEVICE_IN_ALL_SET.add(DEVICE_IN_COMMUNICATION); + DEVICE_IN_ALL_SET.add(DEVICE_IN_AMBIENT); + DEVICE_IN_ALL_SET.add(DEVICE_IN_BUILTIN_MIC); + DEVICE_IN_ALL_SET.add(DEVICE_IN_BLUETOOTH_SCO_HEADSET); + DEVICE_IN_ALL_SET.add(DEVICE_IN_WIRED_HEADSET); + DEVICE_IN_ALL_SET.add(DEVICE_IN_HDMI); + DEVICE_IN_ALL_SET.add(DEVICE_IN_TELEPHONY_RX); + DEVICE_IN_ALL_SET.add(DEVICE_IN_BACK_MIC); + DEVICE_IN_ALL_SET.add(DEVICE_IN_REMOTE_SUBMIX); + DEVICE_IN_ALL_SET.add(DEVICE_IN_ANLG_DOCK_HEADSET); + DEVICE_IN_ALL_SET.add(DEVICE_IN_DGTL_DOCK_HEADSET); + DEVICE_IN_ALL_SET.add(DEVICE_IN_USB_ACCESSORY); + DEVICE_IN_ALL_SET.add(DEVICE_IN_USB_DEVICE); + DEVICE_IN_ALL_SET.add(DEVICE_IN_FM_TUNER); + DEVICE_IN_ALL_SET.add(DEVICE_IN_TV_TUNER); + DEVICE_IN_ALL_SET.add(DEVICE_IN_LINE); + DEVICE_IN_ALL_SET.add(DEVICE_IN_SPDIF); + DEVICE_IN_ALL_SET.add(DEVICE_IN_BLUETOOTH_A2DP); + DEVICE_IN_ALL_SET.add(DEVICE_IN_LOOPBACK); + DEVICE_IN_ALL_SET.add(DEVICE_IN_IP); + DEVICE_IN_ALL_SET.add(DEVICE_IN_BUS); + DEVICE_IN_ALL_SET.add(DEVICE_IN_PROXY); + DEVICE_IN_ALL_SET.add(DEVICE_IN_USB_HEADSET); + DEVICE_IN_ALL_SET.add(DEVICE_IN_BLUETOOTH_BLE); + DEVICE_IN_ALL_SET.add(DEVICE_IN_HDMI_ARC); + DEVICE_IN_ALL_SET.add(DEVICE_IN_ECHO_REFERENCE); + DEVICE_IN_ALL_SET.add(DEVICE_IN_DEFAULT); + + DEVICE_IN_ALL_SCO_SET = new HashSet<>(); + DEVICE_IN_ALL_SCO_SET.add(DEVICE_IN_BLUETOOTH_SCO_HEADSET); + + DEVICE_IN_ALL_USB_SET = new HashSet<>(); + DEVICE_IN_ALL_USB_SET.add(DEVICE_IN_USB_ACCESSORY); + DEVICE_IN_ALL_USB_SET.add(DEVICE_IN_USB_DEVICE); + DEVICE_IN_ALL_USB_SET.add(DEVICE_IN_USB_HEADSET); + } // device states, must match AudioSystem::device_connection_state @UnsupportedAppUsage @@ -1124,6 +1160,12 @@ public class AudioSystem */ public static native boolean isHapticPlaybackSupported(); + /** + * Send audio HAL server process pids to native audioserver process for use + * when generating audio HAL servers tombstones + */ + public static native int setAudioHalPids(int[] pids); + // Items shared with audio service /** @@ -1216,6 +1258,40 @@ public class AudioSystem return getPlatformType(context) == PLATFORM_TELEVISION || forceSingleVolume; } + /** + * Return a set of audio device types from a bit mask audio device type, which may + * represent multiple audio device types. + * FIXME: Remove this when getting ride of bit mask usage of audio device types. + */ + public static Set<Integer> generateAudioDeviceTypesSet(int types) { + Set<Integer> deviceTypes = new HashSet<>(); + Set<Integer> allDeviceTypes = + (types & DEVICE_BIT_IN) == 0 ? DEVICE_OUT_ALL_SET : DEVICE_IN_ALL_SET; + for (int deviceType : allDeviceTypes) { + if ((types & deviceType) == deviceType) { + deviceTypes.add(deviceType); + } + } + return deviceTypes; + } + + /** + * Return the intersection of two audio device types collections. + */ + public static Set<Integer> intersectionAudioDeviceTypes( + @NonNull Set<Integer> a, @NonNull Set<Integer> b) { + Set<Integer> intersection = new HashSet<>(a); + intersection.retainAll(b); + return intersection; + } + + /** + * Return true if the audio device types collection only contains the given device type. + */ + public static boolean isSingleAudioDeviceType(@NonNull Set<Integer> types, int type) { + return types.size() == 1 && types.contains(type); + } + public static final int DEFAULT_MUTE_STREAMS_AFFECTED = (1 << STREAM_MUSIC) | (1 << STREAM_RING) | diff --git a/media/java/android/media/MediaScannerConnection.java b/media/java/android/media/MediaScannerConnection.java index 471fa2c4bad9..aafbd447c908 100644 --- a/media/java/android/media/MediaScannerConnection.java +++ b/media/java/android/media/MediaScannerConnection.java @@ -220,7 +220,7 @@ public class MediaScannerConnection implements ServiceConnection { /** * Convenience for constructing a {@link MediaScannerConnection}, calling - * {@link #connect} on it, and calling {@link #scanFile} with the given + * {@link #connect} on it, and calling {@link #scanFile(String, String)} with the given * <var>path</var> and <var>mimeType</var> when the connection is * established. * @param context The caller's Context, required for establishing a connection to diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java index 785dd561d1b7..96aee512c090 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java @@ -44,8 +44,8 @@ public class A2dpProfile implements LocalBluetoothProfile { private final CachedBluetoothDeviceManager mDeviceManager; static final ParcelUuid[] SINK_UUIDS = { - BluetoothUuid.AudioSink, - BluetoothUuid.AdvAudioDist, + BluetoothUuid.A2DP_SINK, + BluetoothUuid.ADV_AUDIO_DIST, }; static final String NAME = "A2DP"; diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java index 4ce9d3e2dff2..55765dd40d36 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpSinkProfile.java @@ -40,8 +40,8 @@ final class A2dpSinkProfile implements LocalBluetoothProfile { private final CachedBluetoothDeviceManager mDeviceManager; static final ParcelUuid[] SRC_UUIDS = { - BluetoothUuid.AudioSource, - BluetoothUuid.AdvAudioDist, + BluetoothUuid.A2DP_SOURCE, + BluetoothUuid.ADV_AUDIO_DIST, }; static final String NAME = "A2DPSink"; diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothDeviceFilter.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothDeviceFilter.java index 8dec86ac3614..b8ad321d6dd3 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothDeviceFilter.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothDeviceFilter.java @@ -22,6 +22,8 @@ import android.bluetooth.BluetoothUuid; import android.os.ParcelUuid; import android.util.Log; +import com.android.internal.util.ArrayUtils; + /** * BluetoothDeviceFilter contains a static method that returns a * Filter object that returns whether or not the BluetoothDevice @@ -130,7 +132,7 @@ public final class BluetoothDeviceFilter { @Override boolean matches(ParcelUuid[] uuids, BluetoothClass btClass) { if (uuids != null) { - if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.ObexObjectPush)) { + if (ArrayUtils.contains(uuids, BluetoothUuid.OBEX_OBJECT_PUSH)) { return true; } } @@ -144,7 +146,7 @@ public final class BluetoothDeviceFilter { @Override boolean matches(ParcelUuid[] uuids, BluetoothClass btClass) { if (uuids != null) { - if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.PANU)) { + if (ArrayUtils.contains(uuids, BluetoothUuid.PANU)) { return true; } } @@ -158,7 +160,7 @@ public final class BluetoothDeviceFilter { @Override boolean matches(ParcelUuid[] uuids, BluetoothClass btClass) { if (uuids != null) { - if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.NAP)) { + if (ArrayUtils.contains(uuids, BluetoothUuid.NAP)) { return true; } } diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java index 9a16825fe1f3..56be3bbbc226 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java @@ -32,6 +32,7 @@ import android.util.Log; import androidx.annotation.VisibleForTesting; +import com.android.internal.util.ArrayUtils; import com.android.settingslib.R; import com.android.settingslib.Utils; @@ -609,9 +610,9 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> ParcelUuid[] uuids = mDevice.getUuids(); long timeout = MAX_UUID_DELAY_FOR_AUTO_CONNECT; - if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.Hogp)) { + if (ArrayUtils.contains(uuids, BluetoothUuid.HOGP)) { timeout = MAX_HOGP_DELAY_FOR_AUTO_CONNECT; - } else if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.HearingAid)) { + } else if (ArrayUtils.contains(uuids, BluetoothUuid.HEARING_AID)) { timeout = MAX_HEARING_AIDS_DELAY_FOR_AUTO_CONNECT; } diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java index c1933fd87633..9f7b7181b19f 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java @@ -45,7 +45,7 @@ public class HeadsetProfile implements LocalBluetoothProfile { static final ParcelUuid[] UUIDS = { BluetoothUuid.HSP, - BluetoothUuid.Handsfree, + BluetoothUuid.HFP, }; static final String NAME = "HEADSET"; diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HfpClientProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HfpClientProfile.java index 4bdbc3196556..860b77d1ebcd 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HfpClientProfile.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HfpClientProfile.java @@ -44,7 +44,7 @@ final class HfpClientProfile implements LocalBluetoothProfile { static final ParcelUuid[] SRC_UUIDS = { BluetoothUuid.HSP_AG, - BluetoothUuid.Handsfree_AG, + BluetoothUuid.HFP_AG, }; static final String NAME = "HEADSET_CLIENT"; diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java index 29c6d719641a..ae2acbea8e4d 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java @@ -30,8 +30,8 @@ import android.bluetooth.BluetoothMapClient; import android.bluetooth.BluetoothPan; import android.bluetooth.BluetoothPbap; import android.bluetooth.BluetoothPbapClient; -import android.bluetooth.BluetoothSap; import android.bluetooth.BluetoothProfile; +import android.bluetooth.BluetoothSap; import android.bluetooth.BluetoothUuid; import android.content.Context; import android.content.Intent; @@ -40,6 +40,7 @@ import android.util.Log; import androidx.annotation.VisibleForTesting; +import com.android.internal.util.ArrayUtils; import com.android.internal.util.CollectionUtils; import java.util.ArrayList; @@ -471,43 +472,40 @@ public class LocalBluetoothProfileManager { } if (mHeadsetProfile != null) { - if ((BluetoothUuid.isUuidPresent(localUuids, BluetoothUuid.HSP_AG) && - BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.HSP)) || - (BluetoothUuid.isUuidPresent(localUuids, BluetoothUuid.Handsfree_AG) && - BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.Handsfree))) { + if ((ArrayUtils.contains(localUuids, BluetoothUuid.HSP_AG) + && ArrayUtils.contains(uuids, BluetoothUuid.HSP)) + || (ArrayUtils.contains(localUuids, BluetoothUuid.HFP_AG) + && ArrayUtils.contains(uuids, BluetoothUuid.HFP))) { profiles.add(mHeadsetProfile); removedProfiles.remove(mHeadsetProfile); } } if ((mHfpClientProfile != null) && - BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.Handsfree_AG) && - BluetoothUuid.isUuidPresent(localUuids, BluetoothUuid.Handsfree)) { + ArrayUtils.contains(uuids, BluetoothUuid.HFP_AG) + && ArrayUtils.contains(localUuids, BluetoothUuid.HFP)) { profiles.add(mHfpClientProfile); removedProfiles.remove(mHfpClientProfile); } - if (BluetoothUuid.containsAnyUuid(uuids, A2dpProfile.SINK_UUIDS) && - mA2dpProfile != null) { + if (BluetoothUuid.containsAnyUuid(uuids, A2dpProfile.SINK_UUIDS) && mA2dpProfile != null) { profiles.add(mA2dpProfile); removedProfiles.remove(mA2dpProfile); } - if (BluetoothUuid.containsAnyUuid(uuids, A2dpSinkProfile.SRC_UUIDS) && - mA2dpSinkProfile != null) { + if (BluetoothUuid.containsAnyUuid(uuids, A2dpSinkProfile.SRC_UUIDS) + && mA2dpSinkProfile != null) { profiles.add(mA2dpSinkProfile); removedProfiles.remove(mA2dpSinkProfile); } - if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.ObexObjectPush) && - mOppProfile != null) { + if (ArrayUtils.contains(uuids, BluetoothUuid.OBEX_OBJECT_PUSH) && mOppProfile != null) { profiles.add(mOppProfile); removedProfiles.remove(mOppProfile); } - if ((BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.Hid) || - BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.Hogp)) && - mHidProfile != null) { + if ((ArrayUtils.contains(uuids, BluetoothUuid.HID) + || ArrayUtils.contains(uuids, BluetoothUuid.HOGP)) && mHidProfile != null) { profiles.add(mHidProfile); removedProfiles.remove(mHidProfile); } @@ -520,8 +518,8 @@ public class LocalBluetoothProfileManager { if(isPanNapConnected) if(DEBUG) Log.d(TAG, "Valid PAN-NAP connection exists."); - if ((BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.NAP) && - mPanProfile != null) || isPanNapConnected) { + if ((ArrayUtils.contains(uuids, BluetoothUuid.NAP) && mPanProfile != null) + || isPanNapConnected) { profiles.add(mPanProfile); removedProfiles.remove(mPanProfile); } @@ -545,20 +543,18 @@ public class LocalBluetoothProfileManager { removedProfiles.remove(mMapClientProfile); } - if ((mPbapClientProfile != null) && - BluetoothUuid.isUuidPresent(localUuids, BluetoothUuid.PBAP_PCE) && - BluetoothUuid.containsAnyUuid(uuids, PbapClientProfile.SRC_UUIDS)) { + if ((mPbapClientProfile != null) && ArrayUtils.contains(localUuids, BluetoothUuid.PBAP_PCE) + && BluetoothUuid.containsAnyUuid(uuids, PbapClientProfile.SRC_UUIDS)) { profiles.add(mPbapClientProfile); removedProfiles.remove(mPbapClientProfile); } - if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.HearingAid) && - mHearingAidProfile != null) { + if (ArrayUtils.contains(uuids, BluetoothUuid.HEARING_AID) && mHearingAidProfile != null) { profiles.add(mHearingAidProfile); removedProfiles.remove(mHearingAidProfile); } - if (mSapProfile != null && BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.SAP)) { + if (mSapProfile != null && ArrayUtils.contains(uuids, BluetoothUuid.SAP)) { profiles.add(mSapProfile); removedProfiles.remove(mSapProfile); } diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapServerProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapServerProfile.java index 17104e4e96cd..d91226e02878 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapServerProfile.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapServerProfile.java @@ -46,7 +46,7 @@ public class PbapServerProfile implements LocalBluetoothProfile { // The UUIDs indicate that remote device might access pbap server static final ParcelUuid[] PBAB_CLIENT_UUIDS = { BluetoothUuid.HSP, - BluetoothUuid.Handsfree, + BluetoothUuid.HFP, BluetoothUuid.PBAP_PCE }; diff --git a/packages/SettingsLib/src/com/android/settingslib/graph/SignalDrawable.java b/packages/SettingsLib/src/com/android/settingslib/graph/SignalDrawable.java index 5ac788e1b374..3b41fa99d6c4 100644 --- a/packages/SettingsLib/src/com/android/settingslib/graph/SignalDrawable.java +++ b/packages/SettingsLib/src/com/android/settingslib/graph/SignalDrawable.java @@ -32,7 +32,7 @@ import android.graphics.PorterDuffXfermode; import android.graphics.Rect; import android.graphics.drawable.DrawableWrapper; import android.os.Handler; -import android.telephony.SignalStrength; +import android.telephony.CellSignalStrength; import android.util.LayoutDirection; import android.util.PathParser; @@ -145,7 +145,7 @@ public class SignalDrawable extends DrawableWrapper { private int unpackLevel(int packedState) { int numBins = (packedState & NUM_LEVEL_MASK) >> NUM_LEVEL_SHIFT; - int levelOffset = numBins == (SignalStrength.NUM_SIGNAL_STRENGTH_BINS + 1) ? 10 : 0; + int levelOffset = numBins == (CellSignalStrength.getNumSignalStrengthLevels() + 1) ? 10 : 0; int level = (packedState & LEVEL_MASK); return level + levelOffset; } diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManagerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManagerTest.java index 5d5872ea2354..fd5b05311247 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManagerTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManagerTest.java @@ -132,7 +132,7 @@ public class LocalBluetoothProfileManagerTest { mShadowBluetoothAdapter.setSupportedProfiles(generateList( new int[] {BluetoothProfile.HID_HOST})); mProfileManager.updateLocalProfiles(); - ParcelUuid[] uuids = new ParcelUuid[]{BluetoothUuid.Hid}; + ParcelUuid[] uuids = new ParcelUuid[]{BluetoothUuid.HID}; ParcelUuid[] localUuids = new ParcelUuid[]{}; List<LocalBluetoothProfile> profiles = new ArrayList<>(); List<LocalBluetoothProfile> removedProfiles = new ArrayList<>(); diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml index 13fc881624ec..092eedf87f9d 100644 --- a/packages/Shell/AndroidManifest.xml +++ b/packages/Shell/AndroidManifest.xml @@ -207,9 +207,12 @@ <!-- Permission required for CTS test - CrossProfileAppsHostSideTest --> <uses-permission android:name="android.permission.INTERACT_ACROSS_PROFILES"/> - <!-- Permission requried for CTS test - UiModeManagerTest --> + <!-- Permission required for CTS test - UiModeManagerTest --> <uses-permission android:name="android.permission.ENTER_CAR_MODE_PRIORITIZED"/> + <!-- Permission required for CTS test - CarModeInCallServiceTest --> + <uses-permission android:name="android.permission.CONTROL_INCALL_EXPERIENCE"/> + <application android:label="@string/app_label" android:theme="@android:style/Theme.DeviceDefault.DayNight" android:defaultToDeviceProtectedStorage="true" diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java index 91c6ab162dd7..f91deeadba7b 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java @@ -26,6 +26,7 @@ import android.content.Intent; import android.net.ConnectivityManager; import android.net.NetworkCapabilities; import android.os.Looper; +import android.telephony.CellSignalStrength; import android.telephony.ServiceState; import android.telephony.SignalStrength; import android.telephony.SubscriptionInfo; @@ -180,7 +181,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest { @Test public void testCdmaSignalRoaming() { - for (int testStrength = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; + for (int testStrength = CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; testStrength <= SignalStrength.SIGNAL_STRENGTH_GREAT; testStrength++) { setupDefaultSignal(); setCdma(); @@ -203,7 +204,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest { @Test public void testQsSignalStrength() { - for (int testStrength = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; + for (int testStrength = CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; testStrength <= SignalStrength.SIGNAL_STRENGTH_GREAT; testStrength++) { setupDefaultSignal(); setLevel(testStrength); @@ -216,7 +217,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest { @Test public void testCdmaQsSignalStrength() { - for (int testStrength = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; + for (int testStrength = CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; testStrength <= SignalStrength.SIGNAL_STRENGTH_GREAT; testStrength++) { setupDefaultSignal(); setCdma(); diff --git a/core/res/res/drawable-hdpi/stat_sys_tether_bluetooth.png b/packages/Tethering/res/drawable-hdpi/stat_sys_tether_bluetooth.png Binary files differindex 9451174d65d7..9451174d65d7 100644 --- a/core/res/res/drawable-hdpi/stat_sys_tether_bluetooth.png +++ b/packages/Tethering/res/drawable-hdpi/stat_sys_tether_bluetooth.png diff --git a/core/res/res/drawable-hdpi/stat_sys_tether_general.png b/packages/Tethering/res/drawable-hdpi/stat_sys_tether_general.png Binary files differindex 79d5756ae38e..79d5756ae38e 100644 --- a/core/res/res/drawable-hdpi/stat_sys_tether_general.png +++ b/packages/Tethering/res/drawable-hdpi/stat_sys_tether_general.png diff --git a/core/res/res/drawable-hdpi/stat_sys_tether_usb.png b/packages/Tethering/res/drawable-hdpi/stat_sys_tether_usb.png Binary files differindex cae1bd1b2574..cae1bd1b2574 100644 --- a/core/res/res/drawable-hdpi/stat_sys_tether_usb.png +++ b/packages/Tethering/res/drawable-hdpi/stat_sys_tether_usb.png diff --git a/core/res/res/drawable-ldpi/stat_sys_tether_bluetooth.png b/packages/Tethering/res/drawable-ldpi/stat_sys_tether_bluetooth.png Binary files differindex ffe8e8c98232..ffe8e8c98232 100644 --- a/core/res/res/drawable-ldpi/stat_sys_tether_bluetooth.png +++ b/packages/Tethering/res/drawable-ldpi/stat_sys_tether_bluetooth.png diff --git a/core/res/res/drawable-ldpi/stat_sys_tether_general.png b/packages/Tethering/res/drawable-ldpi/stat_sys_tether_general.png Binary files differindex ca20f7352090..ca20f7352090 100644 --- a/core/res/res/drawable-ldpi/stat_sys_tether_general.png +++ b/packages/Tethering/res/drawable-ldpi/stat_sys_tether_general.png diff --git a/core/res/res/drawable-ldpi/stat_sys_tether_usb.png b/packages/Tethering/res/drawable-ldpi/stat_sys_tether_usb.png Binary files differindex 65e907565ec1..65e907565ec1 100644 --- a/core/res/res/drawable-ldpi/stat_sys_tether_usb.png +++ b/packages/Tethering/res/drawable-ldpi/stat_sys_tether_usb.png diff --git a/core/res/res/drawable-mdpi/stat_sys_tether_bluetooth.png b/packages/Tethering/res/drawable-mdpi/stat_sys_tether_bluetooth.png Binary files differindex f42dae0fdcb9..f42dae0fdcb9 100644 --- a/core/res/res/drawable-mdpi/stat_sys_tether_bluetooth.png +++ b/packages/Tethering/res/drawable-mdpi/stat_sys_tether_bluetooth.png diff --git a/core/res/res/drawable-mdpi/stat_sys_tether_general.png b/packages/Tethering/res/drawable-mdpi/stat_sys_tether_general.png Binary files differindex 065516185ad4..065516185ad4 100644 --- a/core/res/res/drawable-mdpi/stat_sys_tether_general.png +++ b/packages/Tethering/res/drawable-mdpi/stat_sys_tether_general.png diff --git a/core/res/res/drawable-mdpi/stat_sys_tether_usb.png b/packages/Tethering/res/drawable-mdpi/stat_sys_tether_usb.png Binary files differindex 2e2b8ca2e9cb..2e2b8ca2e9cb 100644 --- a/core/res/res/drawable-mdpi/stat_sys_tether_usb.png +++ b/packages/Tethering/res/drawable-mdpi/stat_sys_tether_usb.png diff --git a/core/res/res/drawable-xhdpi/stat_sys_tether_bluetooth.png b/packages/Tethering/res/drawable-xhdpi/stat_sys_tether_bluetooth.png Binary files differindex 3f57d1c76ccb..3f57d1c76ccb 100644 --- a/core/res/res/drawable-xhdpi/stat_sys_tether_bluetooth.png +++ b/packages/Tethering/res/drawable-xhdpi/stat_sys_tether_bluetooth.png diff --git a/core/res/res/drawable-xhdpi/stat_sys_tether_general.png b/packages/Tethering/res/drawable-xhdpi/stat_sys_tether_general.png Binary files differindex 34b0cb36736a..34b0cb36736a 100644 --- a/core/res/res/drawable-xhdpi/stat_sys_tether_general.png +++ b/packages/Tethering/res/drawable-xhdpi/stat_sys_tether_general.png diff --git a/core/res/res/drawable-xhdpi/stat_sys_tether_usb.png b/packages/Tethering/res/drawable-xhdpi/stat_sys_tether_usb.png Binary files differindex 36afe485b5bb..36afe485b5bb 100644 --- a/core/res/res/drawable-xhdpi/stat_sys_tether_usb.png +++ b/packages/Tethering/res/drawable-xhdpi/stat_sys_tether_usb.png diff --git a/core/res/res/drawable-xxhdpi/stat_sys_tether_bluetooth.png b/packages/Tethering/res/drawable-xxhdpi/stat_sys_tether_bluetooth.png Binary files differindex 25acfbb01ba4..25acfbb01ba4 100644 --- a/core/res/res/drawable-xxhdpi/stat_sys_tether_bluetooth.png +++ b/packages/Tethering/res/drawable-xxhdpi/stat_sys_tether_bluetooth.png diff --git a/core/res/res/drawable-xxhdpi/stat_sys_tether_general.png b/packages/Tethering/res/drawable-xxhdpi/stat_sys_tether_general.png Binary files differindex 5c656012e615..5c656012e615 100644 --- a/core/res/res/drawable-xxhdpi/stat_sys_tether_general.png +++ b/packages/Tethering/res/drawable-xxhdpi/stat_sys_tether_general.png diff --git a/core/res/res/drawable-xxhdpi/stat_sys_tether_usb.png b/packages/Tethering/res/drawable-xxhdpi/stat_sys_tether_usb.png Binary files differindex 28b4b5438e55..28b4b5438e55 100644 --- a/core/res/res/drawable-xxhdpi/stat_sys_tether_usb.png +++ b/packages/Tethering/res/drawable-xxhdpi/stat_sys_tether_usb.png diff --git a/packages/Tethering/res/values-af/strings.xml b/packages/Tethering/res/values-af/strings.xml new file mode 100644 index 000000000000..1258805378ea --- /dev/null +++ b/packages/Tethering/res/values-af/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Verbinding of Wi-Fi-warmkol aktief"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Tik om op te stel."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Verbinding is gedeaktiveer"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Kontak jou administrateur vir besonderhede"</string> +</resources> diff --git a/packages/Tethering/res/values-am/strings.xml b/packages/Tethering/res/values-am/strings.xml new file mode 100644 index 000000000000..9c36192257c0 --- /dev/null +++ b/packages/Tethering/res/values-am/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"መሰካት ወይም ገባሪ ድረስ ነጥብ"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"ለማዋቀር መታ ያድርጉ።"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"እንደ ሞደም መሰካት ተሰናክሏል"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"ለዝርዝሮች የእርስዎን አስተዳዳሪ ያነጋግሩ"</string> +</resources> diff --git a/packages/Tethering/res/values-ar/strings.xml b/packages/Tethering/res/values-ar/strings.xml new file mode 100644 index 000000000000..9f84ce4090c6 --- /dev/null +++ b/packages/Tethering/res/values-ar/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"النطاق أو نقطة الاتصال نشطة"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"انقر للإعداد."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"تم إيقاف التوصيل"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"اتصل بالمشرف للحصول على التفاصيل"</string> +</resources> diff --git a/packages/Tethering/res/values-as/strings.xml b/packages/Tethering/res/values-as/strings.xml new file mode 100644 index 000000000000..8855822e7c8b --- /dev/null +++ b/packages/Tethering/res/values-as/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"টেডাৰিং বা হটস্প\'ট সক্ৰিয় অৱস্থাত আছে"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"ছেট আপ কৰিবলৈ টিপক।"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"টেডাৰিং অক্ষম কৰি থোৱা হৈছে"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"সবিশেষ জানিবলৈ আপোনাৰ প্ৰশাসকৰ সৈতে যোগাযোগ কৰক"</string> +</resources> diff --git a/packages/Tethering/res/values-az/strings.xml b/packages/Tethering/res/values-az/strings.xml new file mode 100644 index 000000000000..eba50eb636c1 --- /dev/null +++ b/packages/Tethering/res/values-az/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Tezerinq və ya hotspot aktivdir"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Quraşdırmaq üçün tıklayın."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Birləşmə deaktivdir"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Məlumat üçün adminlə əlaqə saxlayın"</string> +</resources> diff --git a/packages/Tethering/res/values-b+sr+Latn/strings.xml b/packages/Tethering/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000000..5b0e488ba5e6 --- /dev/null +++ b/packages/Tethering/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Aktivno povezivanje sa internetom preko mobilnog uređaja ili hotspot"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Dodirnite da biste podesili."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Privezivanje je onemogućeno"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Potražite detalje od administratora"</string> +</resources> diff --git a/packages/Tethering/res/values-be/strings.xml b/packages/Tethering/res/values-be/strings.xml new file mode 100644 index 000000000000..5966c7155ecd --- /dev/null +++ b/packages/Tethering/res/values-be/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"USB-мадэм або хот-спот Wi-Fi актыўныя"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Дакраніцеся, каб наладзіць."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Рэжым мадэма адключаны"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Звярніцеся да адміністратара па падрабязную інфармацыю"</string> +</resources> diff --git a/packages/Tethering/res/values-bg/strings.xml b/packages/Tethering/res/values-bg/strings.xml new file mode 100644 index 000000000000..ed58d7311aca --- /dev/null +++ b/packages/Tethering/res/values-bg/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Има активна споделена връзка или безжична точка за достъп"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Докоснете, за да настроите."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Функцията за тетъринг е деактивирана"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Свържете се с администратора си за подробности"</string> +</resources> diff --git a/packages/Tethering/res/values-bn/strings.xml b/packages/Tethering/res/values-bn/strings.xml new file mode 100644 index 000000000000..8d9880aa9aca --- /dev/null +++ b/packages/Tethering/res/values-bn/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"টিথারিং বা হটস্পট সক্রিয় আছে"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"সেট-আপ করার জন্য আলতো চাপুন৷"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"টিথারিং অক্ষম করা আছে"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"বিশদ বিবরণের জন্য প্রশাসকের সাথে যোগাযোগ করুন"</string> +</resources> diff --git a/packages/Tethering/res/values-bs/strings.xml b/packages/Tethering/res/values-bs/strings.xml new file mode 100644 index 000000000000..2361b9dd382c --- /dev/null +++ b/packages/Tethering/res/values-bs/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Uređaj dijeli vezu ili djeluje kao pristupna tačka"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Dodirnite za postavke"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Povezivanje putem mobitela je onemogućeno"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Kontaktirajte svog administratora za dodatne detalje"</string> +</resources> diff --git a/packages/Tethering/res/values-ca/strings.xml b/packages/Tethering/res/values-ca/strings.xml new file mode 100644 index 000000000000..6752b519e218 --- /dev/null +++ b/packages/Tethering/res/values-ca/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Compartició de xarxa o punt d\'accés Wi-Fi activat"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Toca per configurar."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"La compartició de xarxa està desactivada"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contacta amb el teu administrador per obtenir més informació"</string> +</resources> diff --git a/packages/Tethering/res/values-cs/strings.xml b/packages/Tethering/res/values-cs/strings.xml new file mode 100644 index 000000000000..5fdd53adf15c --- /dev/null +++ b/packages/Tethering/res/values-cs/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Sdílené připojení nebo hotspot je aktivní."</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Klepnutím zahájíte nastavení."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering je zakázán"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"O podrobnosti požádejte administrátora"</string> +</resources> diff --git a/packages/Tethering/res/values-da/strings.xml b/packages/Tethering/res/values-da/strings.xml new file mode 100644 index 000000000000..2775dfa551cb --- /dev/null +++ b/packages/Tethering/res/values-da/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Netdeling eller hotspot er aktivt"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Tryk for at konfigurere"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Netdeling er deaktiveret"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Kontakt din administrator for at få oplysninger"</string> +</resources> diff --git a/packages/Tethering/res/values-de/strings.xml b/packages/Tethering/res/values-de/strings.xml new file mode 100644 index 000000000000..9046cd5e1144 --- /dev/null +++ b/packages/Tethering/res/values-de/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering oder Hotspot aktiv"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Zum Einrichten tippen."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering ist deaktiviert"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Bitte wende dich für weitere Informationen an den Administrator"</string> +</resources> diff --git a/packages/Tethering/res/values-el/strings.xml b/packages/Tethering/res/values-el/strings.xml new file mode 100644 index 000000000000..3b9f53733b8a --- /dev/null +++ b/packages/Tethering/res/values-el/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Πρόσδεση ή σύνδεση σημείου πρόσβασης ενεργή"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Πατήστε για ρύθμιση."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Η σύνδεση είναι απενεργοποιημένη"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Επικοινωνήστε με τον διαχειριστή σας για λεπτομέρειες"</string> +</resources> diff --git a/packages/Tethering/res/values-en-rAU/strings.xml b/packages/Tethering/res/values-en-rAU/strings.xml new file mode 100644 index 000000000000..56b88a5fb3e1 --- /dev/null +++ b/packages/Tethering/res/values-en-rAU/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering or hotspot active"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Tap to set up."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering is disabled"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contact your admin for details"</string> +</resources> diff --git a/packages/Tethering/res/values-en-rCA/strings.xml b/packages/Tethering/res/values-en-rCA/strings.xml new file mode 100644 index 000000000000..56b88a5fb3e1 --- /dev/null +++ b/packages/Tethering/res/values-en-rCA/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering or hotspot active"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Tap to set up."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering is disabled"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contact your admin for details"</string> +</resources> diff --git a/packages/Tethering/res/values-en-rGB/strings.xml b/packages/Tethering/res/values-en-rGB/strings.xml new file mode 100644 index 000000000000..56b88a5fb3e1 --- /dev/null +++ b/packages/Tethering/res/values-en-rGB/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering or hotspot active"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Tap to set up."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering is disabled"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contact your admin for details"</string> +</resources> diff --git a/packages/Tethering/res/values-en-rIN/strings.xml b/packages/Tethering/res/values-en-rIN/strings.xml new file mode 100644 index 000000000000..56b88a5fb3e1 --- /dev/null +++ b/packages/Tethering/res/values-en-rIN/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering or hotspot active"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Tap to set up."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering is disabled"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contact your admin for details"</string> +</resources> diff --git a/packages/Tethering/res/values-en-rXC/strings.xml b/packages/Tethering/res/values-en-rXC/strings.xml new file mode 100644 index 000000000000..7f47fc89d2af --- /dev/null +++ b/packages/Tethering/res/values-en-rXC/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering or hotspot active"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Tap to set up."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering is disabled"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contact your admin for details"</string> +</resources> diff --git a/packages/Tethering/res/values-es-rUS/strings.xml b/packages/Tethering/res/values-es-rUS/strings.xml new file mode 100644 index 000000000000..e4618b8cec96 --- /dev/null +++ b/packages/Tethering/res/values-es-rUS/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Anclaje a red o zona activa conectados"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Presiona para configurar."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Se inhabilitó la conexión mediante dispositivo portátil"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Para obtener más información, comunícate con el administrador"</string> +</resources> diff --git a/packages/Tethering/res/values-es/strings.xml b/packages/Tethering/res/values-es/strings.xml new file mode 100644 index 000000000000..8dc1575ce8ea --- /dev/null +++ b/packages/Tethering/res/values-es/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Compartir conexión/Zona Wi-Fi activada"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Toca para configurar."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"La conexión compartida está inhabilitada"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Ponte en contacto con el administrador para obtener más información"</string> +</resources> diff --git a/packages/Tethering/res/values-et/strings.xml b/packages/Tethering/res/values-et/strings.xml new file mode 100644 index 000000000000..872c8a74cc59 --- /dev/null +++ b/packages/Tethering/res/values-et/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Jagamine või kuumkoht on aktiivne"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Puudutage seadistamiseks."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Jagamine on keelatud"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Lisateabe saamiseks võtke ühendust oma administraatoriga"</string> +</resources> diff --git a/packages/Tethering/res/values-eu/strings.xml b/packages/Tethering/res/values-eu/strings.xml new file mode 100644 index 000000000000..6c4605e616c1 --- /dev/null +++ b/packages/Tethering/res/values-eu/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Konexioa partekatzea edo sare publikoa aktibo"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Sakatu konfiguratzeko."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Desgaituta dago konexioa partekatzeko aukera"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Xehetasunak lortzeko, jarri administratzailearekin harremanetan"</string> +</resources> diff --git a/packages/Tethering/res/values-fa/strings.xml b/packages/Tethering/res/values-fa/strings.xml new file mode 100644 index 000000000000..bc2ee23609c3 --- /dev/null +++ b/packages/Tethering/res/values-fa/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"اشتراکگذاری اینترنت یا نقطه اتصال فعال"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"برای راهاندازی ضربه بزنید."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"اشتراکگذاری اینترنت غیرفعال است"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"برای جزئیات، با سرپرستتان تماس بگیرید"</string> +</resources> diff --git a/packages/Tethering/res/values-fi/strings.xml b/packages/Tethering/res/values-fi/strings.xml new file mode 100644 index 000000000000..ff0fca6502df --- /dev/null +++ b/packages/Tethering/res/values-fi/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Internetin jakaminen tai yhteyspiste käytössä"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Määritä napauttamalla."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Yhteyden jakaminen poistettu käytöstä"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Kysy lisätietoja järjestelmänvalvojalta."</string> +</resources> diff --git a/packages/Tethering/res/values-fr-rCA/strings.xml b/packages/Tethering/res/values-fr-rCA/strings.xml new file mode 100644 index 000000000000..1f5df0ee0cb0 --- /dev/null +++ b/packages/Tethering/res/values-fr-rCA/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Partage de connexion ou point d\'accès sans fil activé"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Touchez pour configurer."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Le partage de connexion est désactivé"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Communiquez avec votre administrateur pour obtenir plus de détails"</string> +</resources> diff --git a/packages/Tethering/res/values-fr/strings.xml b/packages/Tethering/res/values-fr/strings.xml new file mode 100644 index 000000000000..daf7c9d830d5 --- /dev/null +++ b/packages/Tethering/res/values-fr/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Partage de connexion ou point d\'accès sans fil activé"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Appuyez ici pour configurer."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Le partage de connexion est désactivé"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Pour en savoir plus, contactez votre administrateur"</string> +</resources> diff --git a/packages/Tethering/res/values-gl/strings.xml b/packages/Tethering/res/values-gl/strings.xml new file mode 100644 index 000000000000..0d16a1de094f --- /dev/null +++ b/packages/Tethering/res/values-gl/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Conexión compartida ou zona wifi activada"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Tocar para configurar."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"A conexión compartida está desactivada"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contacta co administrador para obter información"</string> +</resources> diff --git a/packages/Tethering/res/values-gu/strings.xml b/packages/Tethering/res/values-gu/strings.xml new file mode 100644 index 000000000000..9d6b02f85fc9 --- /dev/null +++ b/packages/Tethering/res/values-gu/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"ટિથરિંગ અથવા હૉટસ્પૉટ સક્રિય"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"સેટ કરવા માટે ટૅપ કરો."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"ટિથરિંગ અક્ષમ કરેલ છે"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"વિગતો માટે તમારા વ્યવસ્થાપકનો સંપર્ક કરો"</string> +</resources> diff --git a/packages/Tethering/res/values-hi/strings.xml b/packages/Tethering/res/values-hi/strings.xml new file mode 100644 index 000000000000..9c29d9a8f9a1 --- /dev/null +++ b/packages/Tethering/res/values-hi/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"टेदरिंग या हॉटस्पॉट सक्रिय"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"सेट करने के लिए टैप करें."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"टेदरिंग अक्षम है"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"जानकारी के लिए अपने एडमिन से संपर्क करें"</string> +</resources> diff --git a/packages/Tethering/res/values-hr/strings.xml b/packages/Tethering/res/values-hr/strings.xml new file mode 100644 index 000000000000..d0d25bb755aa --- /dev/null +++ b/packages/Tethering/res/values-hr/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Ograničenje ili aktivan hotspot"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Dodirnite da biste postavili."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Modemsko je povezivanje onemogućeno"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Obratite se administratoru da biste saznali pojedinosti"</string> +</resources> diff --git a/packages/Tethering/res/values-hu/strings.xml b/packages/Tethering/res/values-hu/strings.xml new file mode 100644 index 000000000000..31296599231e --- /dev/null +++ b/packages/Tethering/res/values-hu/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Megosztás vagy aktív hotspot"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Koppintson a beállításhoz."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Az internetmegosztás le van tiltva"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"A részletekért forduljon rendszergazdájához"</string> +</resources> diff --git a/packages/Tethering/res/values-hy/strings.xml b/packages/Tethering/res/values-hy/strings.xml new file mode 100644 index 000000000000..8ba6435fd58e --- /dev/null +++ b/packages/Tethering/res/values-hy/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Մոդեմի ռեժիմը միացված է"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Հպեք՝ կարգավորելու համար:"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Մոդեմի ռեժիմն անջատված է"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Մանրամասների համար դիմեք ձեր ադմինիստրատորին"</string> +</resources> diff --git a/packages/Tethering/res/values-in/strings.xml b/packages/Tethering/res/values-in/strings.xml new file mode 100644 index 000000000000..1e093ab237e8 --- /dev/null +++ b/packages/Tethering/res/values-in/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering (Penambatan) atau hotspot aktif"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Ketuk untuk menyiapkan."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering dinonaktifkan"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Hubungi admin untuk mengetahui detailnya"</string> +</resources> diff --git a/packages/Tethering/res/values-is/strings.xml b/packages/Tethering/res/values-is/strings.xml new file mode 100644 index 000000000000..f5769d5344ae --- /dev/null +++ b/packages/Tethering/res/values-is/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Kveikt á tjóðrun eða aðgangsstað"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Ýttu til að setja upp."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Slökkt er á tjóðrun"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Hafðu samband við kerfisstjórann til að fá upplýsingar"</string> +</resources> diff --git a/packages/Tethering/res/values-it/strings.xml b/packages/Tethering/res/values-it/strings.xml new file mode 100644 index 000000000000..e0b3724325fc --- /dev/null +++ b/packages/Tethering/res/values-it/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering oppure hotspot attivo"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Tocca per impostare."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering disattivato"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contatta il tuo amministratore per avere informazioni dettagliate"</string> +</resources> diff --git a/packages/Tethering/res/values-iw/strings.xml b/packages/Tethering/res/values-iw/strings.xml new file mode 100644 index 000000000000..c002c44b2361 --- /dev/null +++ b/packages/Tethering/res/values-iw/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"שיתוף אינטרנט פעיל"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"הקש כדי להגדיר."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"שיתוף האינטרנט בין ניידים מושבת"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"לפרטים, יש לפנות למנהל המערכת"</string> +</resources> diff --git a/packages/Tethering/res/values-ja/strings.xml b/packages/Tethering/res/values-ja/strings.xml new file mode 100644 index 000000000000..314bde00df02 --- /dev/null +++ b/packages/Tethering/res/values-ja/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"テザリングまたはアクセスポイントが有効です"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"タップしてセットアップします。"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"テザリングは無効に設定されています"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"詳しくは、管理者にお問い合わせください"</string> +</resources> diff --git a/packages/Tethering/res/values-ka/strings.xml b/packages/Tethering/res/values-ka/strings.xml new file mode 100644 index 000000000000..7bbd81d3435a --- /dev/null +++ b/packages/Tethering/res/values-ka/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"ტეტერინგი ან უსადენო ქსელი აქტიურია"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"შეეხეთ დასაყენებლად."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"ტეტერინგი გათიშულია"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"დამატებითი ინფორმაციისთვის დაუკავშირდით თქვენს ადმინისტრატორს"</string> +</resources> diff --git a/packages/Tethering/res/values-kk/strings.xml b/packages/Tethering/res/values-kk/strings.xml new file mode 100644 index 000000000000..7fd87a159657 --- /dev/null +++ b/packages/Tethering/res/values-kk/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Тетеринг немесе хотспот қосулы"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Реттеу үшін түртіңіз."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Тетеринг өшірілді"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Мәліметтерді әкімшіден алыңыз"</string> +</resources> diff --git a/packages/Tethering/res/values-km/strings.xml b/packages/Tethering/res/values-km/strings.xml new file mode 100644 index 000000000000..2f852246790c --- /dev/null +++ b/packages/Tethering/res/values-km/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"ភ្ជាប់ ឬហតស្ពតសកម្ម"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"ប៉ះដើម្បីកំណត់"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"ការភ្ជាប់ត្រូវបានបិទ"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"ទាក់ទងអ្នកគ្រប់គ្រងរបស់អ្នកសម្រាប់ព័ត៌មានលម្អិត"</string> +</resources> diff --git a/packages/Tethering/res/values-kn/strings.xml b/packages/Tethering/res/values-kn/strings.xml new file mode 100644 index 000000000000..f11a83ea40ee --- /dev/null +++ b/packages/Tethering/res/values-kn/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"ಟೆಥರಿಂಗ್ ಅಥವಾ ಹಾಟ್ಸ್ಪಾಟ್ ಸಕ್ರಿಯವಾಗಿದೆ"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"ಹೊಂದಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"ಟೆಥರಿಂಗ್ ಅನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"ವಿವರಗಳಿಗಾಗಿ ನಿಮ್ಮ ನಿರ್ವಾಹಕರನ್ನು ಸಂಪರ್ಕಿಸಿ"</string> +</resources> diff --git a/packages/Tethering/res/values-ko/strings.xml b/packages/Tethering/res/values-ko/strings.xml new file mode 100644 index 000000000000..57f24f5b1ae2 --- /dev/null +++ b/packages/Tethering/res/values-ko/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"테더링 또는 핫스팟 사용"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"설정하려면 탭하세요."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"테더링이 사용 중지됨"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"자세한 정보는 관리자에게 문의하세요."</string> +</resources> diff --git a/packages/Tethering/res/values-ky/strings.xml b/packages/Tethering/res/values-ky/strings.xml new file mode 100644 index 000000000000..79854859d41e --- /dev/null +++ b/packages/Tethering/res/values-ky/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Жалгаштыруу же хотспот жандырылган"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Жөндөө үчүн таптап коюңуз."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Жалгаштыруу функциясы өчүрүлгөн"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Кеңири маалымат үчүн администраторуңузга кайрылыңыз"</string> +</resources> diff --git a/packages/Tethering/res/values-lo/strings.xml b/packages/Tethering/res/values-lo/strings.xml new file mode 100644 index 000000000000..78f1585f60f7 --- /dev/null +++ b/packages/Tethering/res/values-lo/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"ເປີດການປ່ອຍສັນຍານ ຫຼືຮັອດສະປອດແລ້ວ"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"ແຕະເພື່ອຕັ້ງຄ່າ."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"ການປ່ອຍສັນຍານຖືກປິດໄວ້"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"ຕິດຕໍ່ຜູ້ເບິ່ງແຍງລະບົບສຳລັບລາຍລະອຽດ"</string> +</resources> diff --git a/packages/Tethering/res/values-lt/strings.xml b/packages/Tethering/res/values-lt/strings.xml new file mode 100644 index 000000000000..ebff8ac9d1f1 --- /dev/null +++ b/packages/Tethering/res/values-lt/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Susietas ar aktyvus"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Palieskite, kad nustatytumėte."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Įrenginio kaip modemo naudojimas išjungtas"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Jei reikia išsamios informacijos, susisiekite su administratoriumi"</string> +</resources> diff --git a/packages/Tethering/res/values-lv/strings.xml b/packages/Tethering/res/values-lv/strings.xml new file mode 100644 index 000000000000..54d0048b526a --- /dev/null +++ b/packages/Tethering/res/values-lv/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Piesaiste vai tīklājs ir aktīvs."</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Pieskarieties, lai iestatītu."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Piesaiste ir atspējota"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Lai iegūtu detalizētu informāciju, sazinieties ar savu administratoru."</string> +</resources> diff --git a/packages/Tethering/res/values-mk/strings.xml b/packages/Tethering/res/values-mk/strings.xml new file mode 100644 index 000000000000..0fab8aa4761f --- /dev/null +++ b/packages/Tethering/res/values-mk/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Поврзувањето или точката на пристап се активни"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Допрете за поставување."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Врзувањето е оневозможено"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Контактирајте со администраторот за детали"</string> +</resources> diff --git a/packages/Tethering/res/values-ml/strings.xml b/packages/Tethering/res/values-ml/strings.xml new file mode 100644 index 000000000000..fd7e556e3899 --- /dev/null +++ b/packages/Tethering/res/values-ml/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"ടെതറിംഗ് അല്ലെങ്കിൽ ഹോട്ട്സ്പോട്ട് സജീവമാണ്"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"സജ്ജമാക്കാൻ ടാപ്പുചെയ്യുക."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"ടെതറിംഗ് പ്രവർത്തനരഹിതമാക്കിയിരിക്കുന്നു"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"വിശദവിവരങ്ങൾക്ക് നിങ്ങളുടെ അഡ്മിനെ ബന്ധപ്പെടുക"</string> +</resources> diff --git a/packages/Tethering/res/values-mn/strings.xml b/packages/Tethering/res/values-mn/strings.xml new file mode 100644 index 000000000000..4596577c5d95 --- /dev/null +++ b/packages/Tethering/res/values-mn/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Модем болгох эсвэл идэвхтэй цэг болгох"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Тохируулахын тулд товшино уу."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Модем болгох боломжгүй байна"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Дэлгэрэнгүй мэдээлэл авахын тулд админтайгаа холбогдоно уу"</string> +</resources> diff --git a/packages/Tethering/res/values-mr/strings.xml b/packages/Tethering/res/values-mr/strings.xml new file mode 100644 index 000000000000..85c9ade4feee --- /dev/null +++ b/packages/Tethering/res/values-mr/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"टेदरिंग किंवा हॉटस्पॉट सक्रिय"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"सेट करण्यासाठी टॅप करा."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"टेदरिंग बंद आहे"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"तपशीलांसाठी तुमच्या प्रशासकाशी संपर्क साधा"</string> +</resources> diff --git a/packages/Tethering/res/values-ms/strings.xml b/packages/Tethering/res/values-ms/strings.xml new file mode 100644 index 000000000000..ec6bdbda08e7 --- /dev/null +++ b/packages/Tethering/res/values-ms/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Penambatan atau titik panas aktif"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Ketik untuk membuat persediaan."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Penambatan dilumpuhkan"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Hubungi pentadbir anda untuk maklumat lanjut"</string> +</resources> diff --git a/packages/Tethering/res/values-my/strings.xml b/packages/Tethering/res/values-my/strings.xml new file mode 100644 index 000000000000..83978b67d433 --- /dev/null +++ b/packages/Tethering/res/values-my/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"တဆင့်ပြန်လည်လွှင့်ခြင်း သို့မဟုတ် ဟော့စပေါ့ ဖွင့်ထားသည်"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"စနစ်ထည့်သွင်းရန် တို့ပါ။"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"မိုဘိုင်းဖုန်းကို မိုဒမ်အဖြစ်သုံးခြင်းအား ပိတ်ထားသည်"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"အသေးစိတ်အချက်အလက်များအတွက် သင့်စီမံခန့်ခွဲသူကို ဆက်သွယ်ပါ"</string> +</resources> diff --git a/packages/Tethering/res/values-nb/strings.xml b/packages/Tethering/res/values-nb/strings.xml new file mode 100644 index 000000000000..9abf32dd7bf1 --- /dev/null +++ b/packages/Tethering/res/values-nb/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Internettdeling eller trådløs sone er aktiv"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Trykk for å konfigurere."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Internettdeling er slått av"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Ta kontakt med administratoren din for å få mer informasjon"</string> +</resources> diff --git a/packages/Tethering/res/values-ne/strings.xml b/packages/Tethering/res/values-ne/strings.xml new file mode 100644 index 000000000000..c8869298a546 --- /dev/null +++ b/packages/Tethering/res/values-ne/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"टेथर गर्ने वा हटस्पट सक्रिय"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"सेटअप गर्न ट्याप गर्नुहोस्।"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"टेदरिङलाई असक्षम पारिएको छ"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"विवरणहरूका लागि आफ्ना प्रशासकलाई सम्पर्क गर्नुहोस्"</string> +</resources> diff --git a/packages/Tethering/res/values-nl/strings.xml b/packages/Tethering/res/values-nl/strings.xml new file mode 100644 index 000000000000..0ec4bff62154 --- /dev/null +++ b/packages/Tethering/res/values-nl/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering of hotspot actief"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Tik om in te stellen."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering is uitgeschakeld"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Neem contact op met je beheerder voor meer informatie"</string> +</resources> diff --git a/packages/Tethering/res/values-or/strings.xml b/packages/Tethering/res/values-or/strings.xml new file mode 100644 index 000000000000..457685795a16 --- /dev/null +++ b/packages/Tethering/res/values-or/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"ଟିଥରିଙ୍ଗ କିମ୍ୱା ହଟସ୍ପଟ୍ ସକ୍ରିୟ ଅଛି"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"ସେଟଅପ୍ କରିବାକୁ ଟାପ୍ କରନ୍ତୁ।"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"ଟିଥରିଙ୍ଗ ଅକ୍ଷମ କରାଯାଇଛି"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"ବିବରଣୀ ପାଇଁ ନିଜ ଆଡମିନ୍ଙ୍କ ସହ ଯୋଗାଯୋଗ କରନ୍ତୁ"</string> +</resources> diff --git a/packages/Tethering/res/values-pa/strings.xml b/packages/Tethering/res/values-pa/strings.xml new file mode 100644 index 000000000000..deddf2ea27f7 --- /dev/null +++ b/packages/Tethering/res/values-pa/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"ਟੈਦਰਿੰਗ ਜਾਂ ਹੌਟਸਪੌਟ ਕਿਰਿਆਸ਼ੀਲ"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"ਸਥਾਪਤ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ।"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"ਟੈਦਰਿੰਗ ਨੂੰ ਅਯੋਗ ਬਣਾਇਆ ਗਿਆ ਹੈ"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"ਵੇਰਵਿਆਂ ਲਈ ਆਪਣੇ ਪ੍ਰਸ਼ਾਸਕ ਨੂੰ ਸੰਪਰਕ ਕਰੋ"</string> +</resources> diff --git a/packages/Tethering/res/values-pl/strings.xml b/packages/Tethering/res/values-pl/strings.xml new file mode 100644 index 000000000000..48d8468935a1 --- /dev/null +++ b/packages/Tethering/res/values-pl/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Aktywny tethering lub punkt dostępu"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Kliknij, by skonfigurować."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering został wyłączony"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Aby uzyskać szczegółowe informacje, skontaktuj się z administratorem"</string> +</resources> diff --git a/packages/Tethering/res/values-pt-rBR/strings.xml b/packages/Tethering/res/values-pt-rBR/strings.xml new file mode 100644 index 000000000000..32c22b8713b5 --- /dev/null +++ b/packages/Tethering/res/values-pt-rBR/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Ponto de acesso ou tethering ativo"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Toque para configurar."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering desativado"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Fale com seu administrador para saber detalhes"</string> +</resources> diff --git a/packages/Tethering/res/values-pt-rPT/strings.xml b/packages/Tethering/res/values-pt-rPT/strings.xml new file mode 100644 index 000000000000..641e22f44f25 --- /dev/null +++ b/packages/Tethering/res/values-pt-rPT/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Ligação ponto a ponto ou hotspot activos"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Toque para configurar."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"A ligação (à Internet) via telemóvel está desativada."</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contacte o gestor para obter detalhes."</string> +</resources> diff --git a/packages/Tethering/res/values-pt/strings.xml b/packages/Tethering/res/values-pt/strings.xml new file mode 100644 index 000000000000..32c22b8713b5 --- /dev/null +++ b/packages/Tethering/res/values-pt/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Ponto de acesso ou tethering ativo"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Toque para configurar."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering desativado"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Fale com seu administrador para saber detalhes"</string> +</resources> diff --git a/packages/Tethering/res/values-ro/strings.xml b/packages/Tethering/res/values-ro/strings.xml new file mode 100644 index 000000000000..f861f733b4a1 --- /dev/null +++ b/packages/Tethering/res/values-ro/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering sau hotspot activ"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Atingeți ca să configurați."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tetheringul este dezactivat"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Contactați administratorul pentru detalii"</string> +</resources> diff --git a/packages/Tethering/res/values-ru/strings.xml b/packages/Tethering/res/values-ru/strings.xml new file mode 100644 index 000000000000..027cb410c54c --- /dev/null +++ b/packages/Tethering/res/values-ru/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Включен режим модема"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Нажмите, чтобы настроить."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Включить режим модема нельзя"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Обратитесь к администратору, чтобы узнать подробности."</string> +</resources> diff --git a/packages/Tethering/res/values-si/strings.xml b/packages/Tethering/res/values-si/strings.xml new file mode 100644 index 000000000000..7d8599f2c2d9 --- /dev/null +++ b/packages/Tethering/res/values-si/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"ටෙදරින් හෝ හොට්ස්පොට් සක්රීයයි"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"පිහිටුවීමට තට්ටු කරන්න."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"ටෙදරින් අබල කර ඇත"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"විස්තර සඳහා ඔබගේ පරිපාලක අමතන්න"</string> +</resources> diff --git a/packages/Tethering/res/values-sk/strings.xml b/packages/Tethering/res/values-sk/strings.xml new file mode 100644 index 000000000000..a8fe297c0088 --- /dev/null +++ b/packages/Tethering/res/values-sk/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering alebo prístupový bod je aktívny"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Klepnutím prejdete na nastavenie."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering je deaktivovaný"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"O podrobnosti požiadajte svojho správcu"</string> +</resources> diff --git a/packages/Tethering/res/values-sl/strings.xml b/packages/Tethering/res/values-sl/strings.xml new file mode 100644 index 000000000000..b5e5e3856f7b --- /dev/null +++ b/packages/Tethering/res/values-sl/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Aktivna povezava z internetom ali dostopna točka sta aktivni"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Dotaknite se, če želite nastaviti."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Povezava z internetom prek mobilnega telefona je onemogočena"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Za podrobnosti se obrnite na skrbnika"</string> +</resources> diff --git a/packages/Tethering/res/values-sq/strings.xml b/packages/Tethering/res/values-sq/strings.xml new file mode 100644 index 000000000000..fdd4906cc51e --- /dev/null +++ b/packages/Tethering/res/values-sq/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Lidhja e çiftimit ose ajo e qasjes në zona publike interneti është aktive"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Trokit për ta konfiguruar."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Lidhja e çiftimit është çaktivizuar"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Kontakto me administratorin për detaje"</string> +</resources> diff --git a/packages/Tethering/res/values-sr/strings.xml b/packages/Tethering/res/values-sr/strings.xml new file mode 100644 index 000000000000..9fab34589724 --- /dev/null +++ b/packages/Tethering/res/values-sr/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Активно повезивање са интернетом преко мобилног уређаја или хотспот"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Додирните да бисте подесили."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Привезивање је онемогућено"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Потражите детаље од администратора"</string> +</resources> diff --git a/packages/Tethering/res/values-sv/strings.xml b/packages/Tethering/res/values-sv/strings.xml new file mode 100644 index 000000000000..10eeb0fe12e1 --- /dev/null +++ b/packages/Tethering/res/values-sv/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Internetdelning eller surfzon aktiverad"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Tryck om du vill konfigurera."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Internetdelning har inaktiverats"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Kontakta administratören om du vill veta mer"</string> +</resources> diff --git a/packages/Tethering/res/values-sw/strings.xml b/packages/Tethering/res/values-sw/strings.xml new file mode 100644 index 000000000000..335396307730 --- /dev/null +++ b/packages/Tethering/res/values-sw/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Kushiriki au kusambaza intaneti kumewashwa"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Gusa ili uweke mipangilio."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Umezima kipengele cha kusambaza mtandao"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Wasiliana na msimamizi wako ili upate maelezo zaidi"</string> +</resources> diff --git a/packages/Tethering/res/values-ta/strings.xml b/packages/Tethering/res/values-ta/strings.xml new file mode 100644 index 000000000000..b1e5cc241376 --- /dev/null +++ b/packages/Tethering/res/values-ta/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"டெதெரிங்/ஹாட்ஸ்பாட் இயங்குகிறது"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"அமைக்க, தட்டவும்."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"இணைப்பு முறை முடக்கப்பட்டுள்ளது"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"விவரங்களுக்கு, உங்கள் நிர்வாகியைத் தொடர்புகொள்ளவும்"</string> +</resources> diff --git a/packages/Tethering/res/values-te/strings.xml b/packages/Tethering/res/values-te/strings.xml new file mode 100644 index 000000000000..aae40dee40db --- /dev/null +++ b/packages/Tethering/res/values-te/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"టీథర్ చేయబడినది లేదా హాట్స్పాట్ సక్రియంగా ఉండేది"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"సెటప్ చేయడానికి నొక్కండి."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"టెథెరింగ్ నిలిపివేయబడింది"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"వివరాల కోసం మీ నిర్వాహకులను సంప్రదించండి"</string> +</resources> diff --git a/packages/Tethering/res/values-th/strings.xml b/packages/Tethering/res/values-th/strings.xml new file mode 100644 index 000000000000..1b800565ad1f --- /dev/null +++ b/packages/Tethering/res/values-th/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"การปล่อยสัญญาณหรือฮอตสปอตทำงานอยู่"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"แตะเพื่อตั้งค่า"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"ปิดใช้การเชื่อมต่ออินเทอร์เน็ตผ่านมือถือแล้ว"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"ติดต่อผู้ดูแลระบบเพื่อขอรายละเอียด"</string> +</resources> diff --git a/packages/Tethering/res/values-tl/strings.xml b/packages/Tethering/res/values-tl/strings.xml new file mode 100644 index 000000000000..12863f90e15a --- /dev/null +++ b/packages/Tethering/res/values-tl/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Pagsasama o aktibong hotspot"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"I-tap upang i-set up."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Naka-disable ang pag-tether"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Makipag-ugnayan sa iyong admin para sa mga detalye"</string> +</resources> diff --git a/packages/Tethering/res/values-tr/strings.xml b/packages/Tethering/res/values-tr/strings.xml new file mode 100644 index 000000000000..bfcf1ace2cf7 --- /dev/null +++ b/packages/Tethering/res/values-tr/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Tethering veya hotspot etkin"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Ayarlamak için dokunun."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Tethering devre dışı bırakıldı"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Ayrıntılı bilgi için yöneticinize başvurun"</string> +</resources> diff --git a/packages/Tethering/res/values-uk/strings.xml b/packages/Tethering/res/values-uk/strings.xml new file mode 100644 index 000000000000..8e159c072350 --- /dev/null +++ b/packages/Tethering/res/values-uk/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Прив\'язка чи точка дост. активна"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Торкніться, щоб налаштувати."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Використання телефона в режимі модема вимкнено"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Щоб дізнатися більше, зв’яжіться з адміністратором"</string> +</resources> diff --git a/packages/Tethering/res/values-ur/strings.xml b/packages/Tethering/res/values-ur/strings.xml new file mode 100644 index 000000000000..89195d4aae29 --- /dev/null +++ b/packages/Tethering/res/values-ur/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"ٹیدرنگ یا ہاٹ اسپاٹ فعال"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"سیٹ اپ کرنے کیلئے تھپتھپائیں۔"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"ٹیدرنگ غیر فعال ہے"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"تفصیلات کے لئے اپنے منتظم سے رابطہ کریں"</string> +</resources> diff --git a/packages/Tethering/res/values-uz/strings.xml b/packages/Tethering/res/values-uz/strings.xml new file mode 100644 index 000000000000..0ac4d4a7410a --- /dev/null +++ b/packages/Tethering/res/values-uz/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Modem rejimi yoniq"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Sozlash uchun bosing."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Modem rejimi faolsizlantirildi"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Tafsilotlari uchun administratoringizga murojaat qiling"</string> +</resources> diff --git a/packages/Tethering/res/values-vi/strings.xml b/packages/Tethering/res/values-vi/strings.xml new file mode 100644 index 000000000000..85a4db8aa5da --- /dev/null +++ b/packages/Tethering/res/values-vi/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Chức năng điểm truy cập Internet hoặc điểm phát sóng đang hoạt động"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Nhấn để thiết lập."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Đã tắt tính năng chia sẻ kết nối"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Hãy liên hệ với quản trị viên của bạn để biết chi tiết"</string> +</resources> diff --git a/packages/Tethering/res/values-zh-rCN/strings.xml b/packages/Tethering/res/values-zh-rCN/strings.xml new file mode 100644 index 000000000000..ff1fe039531c --- /dev/null +++ b/packages/Tethering/res/values-zh-rCN/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"网络共享或热点已启用"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"点按即可进行设置。"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"网络共享已停用"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"请与您的管理员联系以了解详情"</string> +</resources> diff --git a/packages/Tethering/res/values-zh-rHK/strings.xml b/packages/Tethering/res/values-zh-rHK/strings.xml new file mode 100644 index 000000000000..0de39fac97f8 --- /dev/null +++ b/packages/Tethering/res/values-zh-rHK/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"已啟用網絡共享或熱點"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"輕按即可設定。"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"網絡共享已停用"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"請聯絡您的管理員以瞭解詳情"</string> +</resources> diff --git a/packages/Tethering/res/values-zh-rTW/strings.xml b/packages/Tethering/res/values-zh-rTW/strings.xml new file mode 100644 index 000000000000..9a117bbca43f --- /dev/null +++ b/packages/Tethering/res/values-zh-rTW/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"網路共用或無線基地台已啟用"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"輕觸即可進行設定。"</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"數據連線已停用"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"詳情請洽你的管理員"</string> +</resources> diff --git a/packages/Tethering/res/values-zu/strings.xml b/packages/Tethering/res/values-zu/strings.xml new file mode 100644 index 000000000000..8fe10d86cb03 --- /dev/null +++ b/packages/Tethering/res/values-zu/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="tethered_notification_title" msgid="3146694234398202601">"Ukusebenzisa njengemodemu noma i-hotspot ephathekayo kuvuliwe"</string> + <string name="tethered_notification_message" msgid="2113628520792055377">"Thepha ukuze usethe."</string> + <string name="disable_tether_notification_title" msgid="7526977944111313195">"Ukusebenzisa ifoni njengemodemu kukhutshaziwe"</string> + <string name="disable_tether_notification_message" msgid="2913366428516852495">"Xhumana nomphathi wakho ukuze uthole imininingwane"</string> +</resources> diff --git a/packages/Tethering/res/values/strings.xml b/packages/Tethering/res/values/strings.xml new file mode 100644 index 000000000000..ca866a946ea2 --- /dev/null +++ b/packages/Tethering/res/values/strings.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <!-- Shown when the device is tethered --> + <!-- Strings for tethered notification title [CHAR LIMIT=200] --> + <string name="tethered_notification_title">Tethering or hotspot active</string> + <!-- Strings for tethered notification message [CHAR LIMIT=200] --> + <string name="tethered_notification_message">Tap to set up.</string> + + <!-- This notification is shown when tethering has been disabled on a user's device. + The device is managed by the user's employer. Tethering can't be turned on unless the + IT administrator allows it. The noun "admin" is another reference for "IT administrator." --> + <!-- Strings for tether disabling notification title [CHAR LIMIT=200] --> + <string name="disable_tether_notification_title">Tethering is disabled</string> + <!-- Strings for tether disabling notification message [CHAR LIMIT=200] --> + <string name="disable_tether_notification_message">Contact your admin for details</string> +</resources>
\ No newline at end of file diff --git a/packages/Tethering/src/com/android/server/connectivity/tethering/Tethering.java b/packages/Tethering/src/com/android/server/connectivity/tethering/Tethering.java index f1228129cd92..7c78ef8994a2 100644 --- a/packages/Tethering/src/com/android/server/connectivity/tethering/Tethering.java +++ b/packages/Tethering/src/com/android/server/connectivity/tethering/Tethering.java @@ -109,6 +109,7 @@ import com.android.internal.util.MessageUtils; import com.android.internal.util.Protocol; import com.android.internal.util.State; import com.android.internal.util.StateMachine; +import com.android.tethering.R; import java.io.FileDescriptor; import java.io.PrintWriter; @@ -675,14 +676,14 @@ public class Tethering { int icon = 0; switch(id) { case SystemMessage.NOTE_TETHER_USB: - icon = com.android.internal.R.drawable.stat_sys_tether_usb; + icon = R.drawable.stat_sys_tether_usb; break; case SystemMessage.NOTE_TETHER_BLUETOOTH: - icon = com.android.internal.R.drawable.stat_sys_tether_bluetooth; + icon = R.drawable.stat_sys_tether_bluetooth; break; case SystemMessage.NOTE_TETHER_GENERAL: default: - icon = com.android.internal.R.drawable.stat_sys_tether_general; + icon = R.drawable.stat_sys_tether_general; break; } @@ -702,16 +703,16 @@ public class Tethering { PendingIntent pi = PendingIntent.getActivityAsUser(mContext, 0, intent, 0, null, UserHandle.CURRENT); - Resources r = Resources.getSystem(); + Resources r = mContext.getResources(); final CharSequence title; final CharSequence message; if (tetheringOn) { - title = r.getText(com.android.internal.R.string.tethered_notification_title); - message = r.getText(com.android.internal.R.string.tethered_notification_message); + title = r.getText(R.string.tethered_notification_title); + message = r.getText(R.string.tethered_notification_message); } else { - title = r.getText(com.android.internal.R.string.disable_tether_notification_title); - message = r.getText(com.android.internal.R.string.disable_tether_notification_message); + title = r.getText(R.string.disable_tether_notification_title); + message = r.getText(R.string.disable_tether_notification_message); } if (mTetheredNotificationBuilder == null) { @@ -909,7 +910,7 @@ public class Tethering { if (newlyDisallowed && isTetheringActiveOnDevice) { mWrapper.showTetheredNotification( - com.android.internal.R.drawable.stat_sys_tether_general, false); + R.drawable.stat_sys_tether_general, false); mWrapper.untetherAll(); } } diff --git a/packages/VpnDialogs/AndroidManifest.xml b/packages/VpnDialogs/AndroidManifest.xml index 469bdc69c78a..e4de6259e07d 100644 --- a/packages/VpnDialogs/AndroidManifest.xml +++ b/packages/VpnDialogs/AndroidManifest.xml @@ -21,7 +21,6 @@ <uses-permission android:name="android.permission.CONTROL_VPN" /> <uses-permission android:name="android.permission.CONTROL_ALWAYS_ON_VPN" /> - <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" /> <uses-permission android:name="android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS"/> <application android:label="VpnDialogs" diff --git a/services/Android.bp b/services/Android.bp index f765e63e6754..ef40a351c8d1 100644 --- a/services/Android.bp +++ b/services/Android.bp @@ -64,3 +64,8 @@ platform_compat_config { name: "services-platform-compat-config", src: ":services", } + +filegroup { + name: "art-profile", + srcs: ["art-profile"], +} diff --git a/services/core/java/com/android/server/AnyMotionDetector.java b/services/core/java/com/android/server/AnyMotionDetector.java index 8c5ee7f35027..316306df4f48 100644 --- a/services/core/java/com/android/server/AnyMotionDetector.java +++ b/services/core/java/com/android/server/AnyMotionDetector.java @@ -231,8 +231,8 @@ public class AnyMotionDetector { Slog.d(TAG, "mCurrentGravityVector = " + currentGravityVectorString); Slog.d(TAG, "mPreviousGravityVector = " + previousGravityVectorString); } - mRunningStats.reset(); status = getStationaryStatus(); + mRunningStats.reset(); if (DEBUG) Slog.d(TAG, "getStationaryStatus() returned " + status); if (status != RESULT_UNKNOWN) { if (mWakeLock.isHeld()) { diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java index 798a4c663c51..cdfd310a85ae 100644 --- a/services/core/java/com/android/server/BluetoothManagerService.java +++ b/services/core/java/com/android/server/BluetoothManagerService.java @@ -613,22 +613,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { } public boolean isEnabled() { - if ((Binder.getCallingUid() != Process.SYSTEM_UID) && (!checkIfCallerIsForegroundUser())) { - Slog.w(TAG, "isEnabled(): not allowed for non-active and non system user"); - return false; - } - - try { - mBluetoothLock.readLock().lock(); - if (mBluetooth != null) { - return mBluetooth.isEnabled(); - } - } catch (RemoteException e) { - Slog.e(TAG, "isEnabled()", e); - } finally { - mBluetoothLock.readLock().unlock(); - } - return false; + return getState() == BluetoothAdapter.STATE_ON; } public int getState() { @@ -1766,14 +1751,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub { //Do enable request try { - if (!mQuietEnable) { - if (!mBluetooth.enable()) { - Slog.e(TAG, "IBluetooth.enable() returned false"); - } - } else { - if (!mBluetooth.enableNoAutoConnect()) { - Slog.e(TAG, "IBluetooth.enableNoAutoConnect() returned false"); - } + if (!mBluetooth.enable(mQuietEnable)) { + Slog.e(TAG, "IBluetooth.enable() returned false"); } } catch (RemoteException e) { Slog.e(TAG, "Unable to call enable()", e); @@ -2048,14 +2027,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub { } else if (mBluetooth != null) { //Enable bluetooth try { - if (!mQuietEnable) { - if (!mBluetooth.enable()) { - Slog.e(TAG, "IBluetooth.enable() returned false"); - } - } else { - if (!mBluetooth.enableNoAutoConnect()) { - Slog.e(TAG, "IBluetooth.enableNoAutoConnect() returned false"); - } + if (!mBluetooth.enable(mQuietEnable)) { + Slog.e(TAG, "IBluetooth.enable() returned false"); } } catch (RemoteException e) { Slog.e(TAG, "Unable to call enable()", e); diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 9e6fd9e64fec..753c1171aeb3 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -1395,7 +1395,7 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override public Network getActiveNetworkForUid(int uid, boolean ignoreBlocked) { - enforceConnectivityInternalPermission(); + NetworkStack.checkNetworkStackPermission(mContext); return getActiveNetworkForUidInternal(uid, ignoreBlocked); } @@ -1437,7 +1437,7 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override public NetworkInfo getActiveNetworkInfoForUid(int uid, boolean ignoreBlocked) { - enforceConnectivityInternalPermission(); + NetworkStack.checkNetworkStackPermission(mContext); final NetworkState state = getUnfilteredActiveNetworkState(uid); filterNetworkStateForUid(state, uid, ignoreBlocked); return state.networkInfo; @@ -1656,8 +1656,8 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override public NetworkState[] getAllNetworkState() { - // Require internal since we're handing out IMSI details - enforceConnectivityInternalPermission(); + // This contains IMSI details, so make sure the caller is privileged. + NetworkStack.checkNetworkStackPermission(mContext); final ArrayList<NetworkState> result = Lists.newArrayList(); for (Network network : getAllNetworks()) { @@ -1735,7 +1735,7 @@ public class ConnectivityService extends IConnectivityManager.Stub } enforceChangePermission(); if (mProtectedNetworks.contains(networkType)) { - enforceConnectivityInternalPermission(); + enforceConnectivityRestrictedNetworksPermission(); } InetAddress addr; @@ -2005,6 +2005,12 @@ public class ConnectivityService extends IConnectivityManager.Stub NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK); } + private void enforceNetworkFactoryPermission() { + mContext.enforceCallingOrSelfPermission( + android.Manifest.permission.NETWORK_FACTORY, + "ConnectivityService"); + } + private boolean checkSettingsPermission() { return checkAnyPermissionOf( android.Manifest.permission.NETWORK_SETTINGS, @@ -2024,18 +2030,19 @@ public class ConnectivityService extends IConnectivityManager.Stub "ConnectivityService"); } - private void enforceConnectivityInternalPermission() { - enforceAnyPermissionOf( - android.Manifest.permission.CONNECTIVITY_INTERNAL, - NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK); - } - private void enforceControlAlwaysOnVpnPermission() { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.CONTROL_ALWAYS_ON_VPN, "ConnectivityService"); } + private void enforceNetworkStackOrSettingsPermission() { + enforceAnyPermissionOf( + android.Manifest.permission.NETWORK_SETTINGS, + android.Manifest.permission.NETWORK_STACK, + NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK); + } + private void enforceNetworkStackSettingsOrSetup() { enforceAnyPermissionOf( android.Manifest.permission.NETWORK_SETTINGS, @@ -2063,7 +2070,11 @@ public class ConnectivityService extends IConnectivityManager.Stub "ConnectivityService"); return; } catch (SecurityException e) { /* fallback to ConnectivityInternalPermission */ } - enforceConnectivityInternalPermission(); + // TODO: Remove this fallback check after all apps have declared + // CONNECTIVITY_USE_RESTRICTED_NETWORKS. + mContext.enforceCallingOrSelfPermission( + android.Manifest.permission.CONNECTIVITY_INTERNAL, + "ConnectivityService"); } private void enforceKeepalivePermission() { @@ -2072,7 +2083,7 @@ public class ConnectivityService extends IConnectivityManager.Stub // Public because it's used by mLockdownTracker. public void sendConnectedBroadcast(NetworkInfo info) { - enforceConnectivityInternalPermission(); + NetworkStack.checkNetworkStackPermission(mContext); sendGeneralBroadcast(info, CONNECTIVITY_ACTION); } @@ -3589,7 +3600,7 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override public void startCaptivePortalApp(Network network) { - enforceConnectivityInternalPermission(); + enforceNetworkStackOrSettingsPermission(); mHandler.post(() -> { NetworkAgentInfo nai = getNetworkAgentInfoForNetwork(network); if (nai == null) return; @@ -4080,7 +4091,7 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override public String[] getTetheredDhcpRanges() { - enforceConnectivityInternalPermission(); + enforceSettingsPermission(); return mTetheringManager.getTetheredDhcpRanges(); } @@ -4304,7 +4315,7 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override public void setGlobalProxy(final ProxyInfo proxyProperties) { - enforceConnectivityInternalPermission(); + NetworkStack.checkNetworkStackPermission(mContext); mProxyTracker.setGlobalProxy(proxyProperties); } @@ -4843,7 +4854,7 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override public String getMobileProvisioningUrl() { - enforceConnectivityInternalPermission(); + enforceSettingsPermission(); String url = getProvisioningUrlBaseFromFile(); if (TextUtils.isEmpty(url)) { url = mContext.getResources().getString(R.string.mobile_provisioning_url); @@ -4869,7 +4880,7 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override public void setProvisioningNotificationVisible(boolean visible, int networkType, String action) { - enforceConnectivityInternalPermission(); + enforceSettingsPermission(); if (!ConnectivityManager.isNetworkTypeValid(networkType)) { return; } @@ -5457,7 +5468,7 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override public int registerNetworkFactory(Messenger messenger, String name) { - enforceConnectivityInternalPermission(); + enforceNetworkFactoryPermission(); NetworkFactoryInfo nfi = new NetworkFactoryInfo(name, messenger, new AsyncChannel(), NetworkFactory.SerialNumber.nextSerialNumber()); mHandler.sendMessage(mHandler.obtainMessage(EVENT_REGISTER_NETWORK_FACTORY, nfi)); @@ -5472,7 +5483,7 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override public void unregisterNetworkFactory(Messenger messenger) { - enforceConnectivityInternalPermission(); + enforceNetworkFactoryPermission(); mHandler.sendMessage(mHandler.obtainMessage(EVENT_UNREGISTER_NETWORK_FACTORY, messenger)); } @@ -5571,7 +5582,7 @@ public class ConnectivityService extends IConnectivityManager.Stub public int registerNetworkAgent(Messenger messenger, NetworkInfo networkInfo, LinkProperties linkProperties, NetworkCapabilities networkCapabilities, int currentScore, NetworkMisc networkMisc, int factorySerialNumber) { - enforceConnectivityInternalPermission(); + enforceNetworkFactoryPermission(); LinkProperties lp = new LinkProperties(linkProperties); lp.ensureDirectlyConnectedRoutes(); @@ -7012,7 +7023,7 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override public String getCaptivePortalServerUrl() { - enforceConnectivityInternalPermission(); + enforceNetworkStackOrSettingsPermission(); String settingUrl = mContext.getResources().getString( R.string.config_networkCaptivePortalServerUrl); @@ -7065,7 +7076,7 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override public void factoryReset() { - enforceConnectivityInternalPermission(); + enforceSettingsPermission(); if (mUserManager.hasUserRestriction(UserManager.DISALLOW_NETWORK_RESET)) { return; diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java index 9efaad848ccc..840b7af19890 100644 --- a/services/core/java/com/android/server/NetworkManagementService.java +++ b/services/core/java/com/android/server/NetworkManagementService.java @@ -18,7 +18,7 @@ package com.android.server; import static android.Manifest.permission.CONNECTIVITY_INTERNAL; import static android.Manifest.permission.NETWORK_SETTINGS; -import static android.Manifest.permission.NETWORK_STACK; +import static android.Manifest.permission.OBSERVE_NETWORK_POLICY; import static android.Manifest.permission.SHUTDOWN; import static android.net.INetd.FIREWALL_BLACKLIST; import static android.net.INetd.FIREWALL_CHAIN_DOZABLE; @@ -54,6 +54,7 @@ import android.net.IpPrefix; import android.net.LinkAddress; import android.net.Network; import android.net.NetworkPolicyManager; +import android.net.NetworkStack; import android.net.NetworkStats; import android.net.NetworkUtils; import android.net.RouteInfo; @@ -312,13 +313,13 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void registerObserver(INetworkManagementEventObserver observer) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); mObservers.register(observer); } @Override public void unregisterObserver(INetworkManagementEventObserver observer) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); mObservers.unregister(observer); } @@ -453,7 +454,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void registerTetheringStatsProvider(ITetheringStatsProvider provider, String name) { - mContext.enforceCallingOrSelfPermission(NETWORK_STACK, TAG); + NetworkStack.checkNetworkStackPermission(mContext); Preconditions.checkNotNull(provider); synchronized(mTetheringStatsProviders) { mTetheringStatsProviders.put(provider, name); @@ -462,7 +463,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void unregisterTetheringStatsProvider(ITetheringStatsProvider provider) { - mContext.enforceCallingOrSelfPermission(NETWORK_STACK, TAG); + NetworkStack.checkNetworkStackPermission(mContext); synchronized(mTetheringStatsProviders) { mTetheringStatsProviders.remove(provider); } @@ -470,7 +471,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void tetherLimitReached(ITetheringStatsProvider provider) { - mContext.enforceCallingOrSelfPermission(NETWORK_STACK, TAG); + NetworkStack.checkNetworkStackPermission(mContext); synchronized(mTetheringStatsProviders) { if (!mTetheringStatsProviders.containsKey(provider)) { return; @@ -737,7 +738,9 @@ public class NetworkManagementService extends INetworkManagementService.Stub { // @Override public String[] listInterfaces() { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + // TODO: Remove CONNECTIVITY_INTERNAL after bluetooth tethering has no longer called these + // APIs. + NetworkStack.checkNetworkStackPermissionOr(mContext, CONNECTIVITY_INTERNAL); try { return mNetdService.interfaceGetList(); } catch (RemoteException | ServiceSpecificException e) { @@ -787,7 +790,9 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public InterfaceConfiguration getInterfaceConfig(String iface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + // TODO: Remove CONNECTIVITY_INTERNAL after bluetooth tethering has no longer called these + // APIs. + NetworkStack.checkNetworkStackPermissionOr(mContext, CONNECTIVITY_INTERNAL); final InterfaceConfigurationParcel result; try { result = mNetdService.interfaceGetCfg(iface); @@ -805,7 +810,9 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void setInterfaceConfig(String iface, InterfaceConfiguration cfg) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + // TODO: Remove CONNECTIVITY_INTERNAL after bluetooth tethering has no longer called these + // APIs. + NetworkStack.checkNetworkStackPermissionOr(mContext, CONNECTIVITY_INTERNAL); LinkAddress linkAddr = cfg.getLinkAddress(); if (linkAddr == null || linkAddr.getAddress() == null) { throw new IllegalStateException("Null LinkAddress given"); @@ -822,7 +829,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void setInterfaceDown(String iface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); final InterfaceConfiguration ifcg = getInterfaceConfig(iface); ifcg.setInterfaceDown(); setInterfaceConfig(iface, ifcg); @@ -830,7 +837,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void setInterfaceUp(String iface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); final InterfaceConfiguration ifcg = getInterfaceConfig(iface); ifcg.setInterfaceUp(); setInterfaceConfig(iface, ifcg); @@ -838,7 +845,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void setInterfaceIpv6PrivacyExtensions(String iface, boolean enable) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.interfaceSetIPv6PrivacyExtensions(iface, enable); } catch (RemoteException | ServiceSpecificException e) { @@ -850,7 +857,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { IPv6 addresses on interface down, but we need to do full clean up here */ @Override public void clearInterfaceAddresses(String iface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.interfaceClearAddrs(iface); } catch (RemoteException | ServiceSpecificException e) { @@ -860,7 +867,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void enableIpv6(String iface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.interfaceSetEnableIPv6(iface, true); } catch (RemoteException | ServiceSpecificException e) { @@ -879,7 +886,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void disableIpv6(String iface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.interfaceSetEnableIPv6(iface, false); } catch (RemoteException | ServiceSpecificException e) { @@ -898,7 +905,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { } private void modifyRoute(boolean add, int netId, RouteInfo route) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); final String ifName = route.getInterface(); final String dst = route.getDestination().toString(); @@ -963,7 +970,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void setMtu(String iface, int mtu) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.interfaceSetMtu(iface, mtu); @@ -982,7 +989,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public boolean getIpForwardingEnabled() throws IllegalStateException{ - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { final boolean isEnabled = mNetdService.ipfwdEnabled(); @@ -994,7 +1001,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void setIpForwardingEnabled(boolean enable) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { if (enable) { mNetdService.ipfwdEnableForwarding("tethering"); @@ -1013,7 +1020,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void startTetheringWithConfiguration(boolean usingLegacyDnsProxy, String[] dhcpRange) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); // an odd number of addrs will fail try { mNetdService.tetherStartWithConfiguration(usingLegacyDnsProxy, dhcpRange); @@ -1024,7 +1031,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void stopTethering() { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.tetherStop(); } catch (RemoteException | ServiceSpecificException e) { @@ -1034,7 +1041,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public boolean isTetheringStarted() { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { final boolean isEnabled = mNetdService.tetherIsEnabled(); @@ -1046,7 +1053,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void tetherInterface(String iface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.tetherInterfaceAdd(iface); } catch (RemoteException | ServiceSpecificException e) { @@ -1061,7 +1068,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void untetherInterface(String iface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.tetherInterfaceRemove(iface); } catch (RemoteException | ServiceSpecificException e) { @@ -1073,7 +1080,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public String[] listTetheredInterfaces() { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { return mNetdService.tetherInterfaceList(); } catch (RemoteException | ServiceSpecificException e) { @@ -1083,7 +1090,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void setDnsForwarders(Network network, String[] dns) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); int netId = (network != null) ? network.netId : ConnectivityManager.NETID_UNSET; @@ -1096,7 +1103,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public String[] getDnsForwarders() { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { return mNetdService.tetherDnsList(); } catch (RemoteException | ServiceSpecificException e) { @@ -1127,19 +1134,19 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void startInterfaceForwarding(String fromIface, String toIface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); modifyInterfaceForward(true, fromIface, toIface); } @Override public void stopInterfaceForwarding(String fromIface, String toIface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); modifyInterfaceForward(false, fromIface, toIface); } @Override public void enableNat(String internalInterface, String externalInterface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.tetherAddForward(internalInterface, externalInterface); } catch (RemoteException | ServiceSpecificException e) { @@ -1149,7 +1156,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void disableNat(String internalInterface, String externalInterface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.tetherRemoveForward(internalInterface, externalInterface); } catch (RemoteException | ServiceSpecificException e) { @@ -1159,7 +1166,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void addIdleTimer(String iface, int timeout, final int type) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); if (DBG) Slog.d(TAG, "Adding idletimer"); @@ -1189,7 +1196,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void removeIdleTimer(String iface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); if (DBG) Slog.d(TAG, "Removing idletimer"); @@ -1213,7 +1220,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void setInterfaceQuota(String iface, long quotaBytes) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); synchronized (mQuotaLock) { if (mActiveQuotas.containsKey(iface)) { @@ -1244,7 +1251,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void removeInterfaceQuota(String iface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); synchronized (mQuotaLock) { if (!mActiveQuotas.containsKey(iface)) { @@ -1277,7 +1284,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void setInterfaceAlert(String iface, long alertBytes) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); // quick sanity check if (!mActiveQuotas.containsKey(iface)) { @@ -1301,7 +1308,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void removeInterfaceAlert(String iface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); synchronized (mQuotaLock) { if (!mActiveAlerts.containsKey(iface)) { @@ -1321,7 +1328,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void setGlobalAlert(long alertBytes) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.bandwidthSetGlobalAlert(alertBytes); @@ -1331,7 +1338,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { } private void setUidOnMeteredNetworkList(int uid, boolean blacklist, boolean enable) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); synchronized (mQuotaLock) { boolean oldEnable; @@ -1431,7 +1438,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void setAllowOnlyVpnForUids(boolean add, UidRange[] uidRanges) throws ServiceSpecificException { - mContext.enforceCallingOrSelfPermission(NETWORK_STACK, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.networkRejectNonSecureVpn(add, toStableParcels(uidRanges)); } catch (ServiceSpecificException e) { @@ -1472,7 +1479,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void setUidCleartextNetworkPolicy(int uid, int policy) { if (Binder.getCallingUid() != uid) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); } synchronized (mQuotaLock) { @@ -1506,7 +1513,6 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public boolean isBandwidthControlEnabled() { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); return true; } @@ -1557,7 +1563,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public NetworkStats getNetworkStatsTethering(int how) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 1); synchronized (mTetheringStatsProviders) { @@ -1575,7 +1581,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void addVpnUidRanges(int netId, UidRange[] ranges) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.networkAddUidRanges(netId, toStableParcels(ranges)); @@ -1586,7 +1592,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void removeVpnUidRanges(int netId, UidRange[] ranges) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.networkRemoveUidRanges(netId, toStableParcels(ranges)); } catch (RemoteException | ServiceSpecificException e) { @@ -2020,7 +2026,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { } private void modifyInterfaceInNetwork(boolean add, int netId, String iface) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { if (add) { mNetdService.networkAddInterface(netId, iface); @@ -2034,7 +2040,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void addLegacyRouteForNetId(int netId, RouteInfo routeInfo, int uid) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); final LinkAddress la = routeInfo.getDestinationLinkAddress(); final String ifName = routeInfo.getInterface(); @@ -2055,7 +2061,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void setDefaultNetId(int netId) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.networkSetDefault(netId); @@ -2066,7 +2072,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void clearDefaultNetId() { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.networkClearDefault(); @@ -2077,7 +2083,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void setNetworkPermission(int netId, int permission) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.networkSetPermissionForNetwork(netId, permission); @@ -2088,7 +2094,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void allowProtect(int uid) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.networkSetProtectAllow(uid); @@ -2099,7 +2105,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public void denyProtect(int uid) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); try { mNetdService.networkSetProtectDeny(uid); @@ -2145,7 +2151,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { @Override public boolean isNetworkRestricted(int uid) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + mContext.enforceCallingOrSelfPermission(OBSERVE_NETWORK_POLICY, TAG); return isNetworkRestrictedInternal(uid); } diff --git a/services/core/java/com/android/server/NsdService.java b/services/core/java/com/android/server/NsdService.java index 3efef017d24f..b9b7bf73c1e6 100644 --- a/services/core/java/com/android/server/NsdService.java +++ b/services/core/java/com/android/server/NsdService.java @@ -16,19 +16,18 @@ package com.android.server; -import android.content.Context; import android.content.ContentResolver; +import android.content.Context; import android.content.Intent; -import android.content.pm.PackageManager; import android.database.ContentObserver; +import android.net.NetworkStack; import android.net.Uri; -import android.net.nsd.NsdServiceInfo; import android.net.nsd.DnsSdTxtRecord; import android.net.nsd.INsdManager; import android.net.nsd.NsdManager; -import android.os.Binder; -import android.os.HandlerThread; +import android.net.nsd.NsdServiceInfo; import android.os.Handler; +import android.os.HandlerThread; import android.os.Message; import android.os.Messenger; import android.os.UserHandle; @@ -38,6 +37,12 @@ import android.util.Slog; import android.util.SparseArray; import android.util.SparseIntArray; +import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.util.AsyncChannel; +import com.android.internal.util.DumpUtils; +import com.android.internal.util.State; +import com.android.internal.util.StateMachine; + import java.io.FileDescriptor; import java.io.PrintWriter; import java.net.InetAddress; @@ -45,13 +50,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.concurrent.CountDownLatch; -import com.android.internal.annotations.VisibleForTesting; -import com.android.internal.util.AsyncChannel; -import com.android.internal.util.DumpUtils; -import com.android.internal.util.Protocol; -import com.android.internal.util.State; -import com.android.internal.util.StateMachine; - /** * Network Service Discovery Service handles remote service discovery operation requests by * implementing the INsdManager interface. @@ -565,8 +563,7 @@ public class NsdService extends INsdManager.Stub { } public void setEnabled(boolean isEnabled) { - mContext.enforceCallingOrSelfPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL, - "NsdService"); + NetworkStack.checkNetworkStackPermission(mContext); mNsdSettings.putEnabledStatus(isEnabled); notifyEnabled(isEnabled); } diff --git a/services/core/java/com/android/server/OWNERS b/services/core/java/com/android/server/OWNERS index a9c38bcf2532..76e0c137d2f5 100644 --- a/services/core/java/com/android/server/OWNERS +++ b/services/core/java/com/android/server/OWNERS @@ -4,3 +4,6 @@ per-file ConnectivityService.java,NetworkManagementService.java,NsdService.java # Vibrator / Threads per-file VibratorService.java, DisplayThread.java = michaelwr@google.com per-file VibratorService.java, DisplayThread.java = ogunwale@google.com + +# Zram writeback +per-file ZramWriteback.java = minchan@google.com, rajekumar@google.com, srnvs@google.com diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java index f8b0072e0017..8436e3885244 100644 --- a/services/core/java/com/android/server/TelephonyRegistry.java +++ b/services/core/java/com/android/server/TelephonyRegistry.java @@ -17,6 +17,8 @@ package com.android.server; import static android.telephony.TelephonyManager.ACTION_MULTI_SIM_CONFIG_CHANGED; +import static android.telephony.TelephonyRegistryManager.SIM_ACTIVATION_TYPE_DATA; +import static android.telephony.TelephonyRegistryManager.SIM_ACTIVATION_TYPE_VOICE; import static java.util.Arrays.copyOf; @@ -37,6 +39,7 @@ import android.os.IBinder; import android.os.Message; import android.os.RemoteException; import android.os.UserHandle; +import android.telephony.Annotation; import android.telephony.Annotation.DataFailureCause; import android.telephony.Annotation.RadioPowerState; import android.telephony.Annotation.SrvccState; @@ -1202,10 +1205,10 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { synchronized (mRecords) { if (validatePhoneId(phoneId)) { switch (activationType) { - case TelephonyManager.SIM_ACTIVATION_TYPE_VOICE: + case SIM_ACTIVATION_TYPE_VOICE: mVoiceActivationState[phoneId] = activationState; break; - case TelephonyManager.SIM_ACTIVATION_TYPE_DATA: + case SIM_ACTIVATION_TYPE_DATA: mDataActivationState[phoneId] = activationState; break; default: @@ -1218,10 +1221,10 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { + " state=" + activationState); } try { - if ((activationType == TelephonyManager.SIM_ACTIVATION_TYPE_VOICE) && - r.matchPhoneStateListenerEvent( - PhoneStateListener.LISTEN_VOICE_ACTIVATION_STATE) && - idMatch(r.subId, subId, phoneId)) { + if ((activationType == SIM_ACTIVATION_TYPE_VOICE) + && r.matchPhoneStateListenerEvent( + PhoneStateListener.LISTEN_VOICE_ACTIVATION_STATE) + && idMatch(r.subId, subId, phoneId)) { if (DBG) { log("notifyVoiceActivationStateForPhoneId: callback.onVASC r=" + r + " subId=" + subId + " phoneId=" + phoneId @@ -1229,10 +1232,10 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } r.callback.onVoiceActivationStateChanged(activationState); } - if ((activationType == TelephonyManager.SIM_ACTIVATION_TYPE_DATA) && - r.matchPhoneStateListenerEvent( - PhoneStateListener.LISTEN_DATA_ACTIVATION_STATE) && - idMatch(r.subId, subId, phoneId)) { + if ((activationType == SIM_ACTIVATION_TYPE_DATA) + && r.matchPhoneStateListenerEvent( + PhoneStateListener.LISTEN_DATA_ACTIVATION_STATE) + && idMatch(r.subId, subId, phoneId)) { if (DBG) { log("notifyDataActivationStateForPhoneId: callback.onDASC r=" + r + " subId=" + subId + " phoneId=" + phoneId @@ -1563,8 +1566,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { && (mDataConnectionState[phoneId] != state || mDataConnectionNetworkType[phoneId] != networkType)) { String str = "onDataConnectionStateChanged(" - + TelephonyManager.dataStateToString(state) - + ", " + TelephonyManager.getNetworkTypeName(networkType) + + dataStateToString(state) + + ", " + getNetworkTypeName(networkType) + ") subId=" + subId + ", phoneId=" + phoneId; log(str); mLocalLog.log(str); @@ -2676,4 +2679,73 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } } } + + /** + * Convert data state to string + * + * @return The data state in string format. + */ + private String dataStateToString(@TelephonyManager.DataState int state) { + switch (state) { + case TelephonyManager.DATA_DISCONNECTED: return "DISCONNECTED"; + case TelephonyManager.DATA_CONNECTING: return "CONNECTING"; + case TelephonyManager.DATA_CONNECTED: return "CONNECTED"; + case TelephonyManager.DATA_SUSPENDED: return "SUSPENDED"; + } + return "UNKNOWN(" + state + ")"; + } + + /** + * Returns a string representation of the radio technology (network type) + * currently in use on the device. + * @param subId for which network type is returned + * @return the name of the radio technology + * + */ + private String getNetworkTypeName(@Annotation.NetworkType int type) { + switch (type) { + case TelephonyManager.NETWORK_TYPE_GPRS: + return "GPRS"; + case TelephonyManager.NETWORK_TYPE_EDGE: + return "EDGE"; + case TelephonyManager.NETWORK_TYPE_UMTS: + return "UMTS"; + case TelephonyManager.NETWORK_TYPE_HSDPA: + return "HSDPA"; + case TelephonyManager.NETWORK_TYPE_HSUPA: + return "HSUPA"; + case TelephonyManager.NETWORK_TYPE_HSPA: + return "HSPA"; + case TelephonyManager.NETWORK_TYPE_CDMA: + return "CDMA"; + case TelephonyManager.NETWORK_TYPE_EVDO_0: + return "CDMA - EvDo rev. 0"; + case TelephonyManager.NETWORK_TYPE_EVDO_A: + return "CDMA - EvDo rev. A"; + case TelephonyManager.NETWORK_TYPE_EVDO_B: + return "CDMA - EvDo rev. B"; + case TelephonyManager.NETWORK_TYPE_1xRTT: + return "CDMA - 1xRTT"; + case TelephonyManager.NETWORK_TYPE_LTE: + return "LTE"; + case TelephonyManager.NETWORK_TYPE_EHRPD: + return "CDMA - eHRPD"; + case TelephonyManager.NETWORK_TYPE_IDEN: + return "iDEN"; + case TelephonyManager.NETWORK_TYPE_HSPAP: + return "HSPA+"; + case TelephonyManager.NETWORK_TYPE_GSM: + return "GSM"; + case TelephonyManager.NETWORK_TYPE_TD_SCDMA: + return "TD_SCDMA"; + case TelephonyManager.NETWORK_TYPE_IWLAN: + return "IWLAN"; + case TelephonyManager.NETWORK_TYPE_LTE_CA: + return "LTE_CA"; + case TelephonyManager.NETWORK_TYPE_NR: + return "NR"; + default: + return "UNKNOWN"; + } + } } diff --git a/services/core/java/com/android/server/ZramWriteback.java b/services/core/java/com/android/server/ZramWriteback.java index 49bf29bff284..5d97def129a4 100644 --- a/services/core/java/com/android/server/ZramWriteback.java +++ b/services/core/java/com/android/server/ZramWriteback.java @@ -60,6 +60,7 @@ public final class ZramWriteback extends JobService { private static final String MARK_IDLE_DELAY_PROP = "ro.zram.mark_idle_delay_mins"; private static final String FIRST_WB_DELAY_PROP = "ro.zram.first_wb_delay_mins"; private static final String PERIODIC_WB_DELAY_PROP = "ro.zram.periodic_wb_delay_hours"; + private static final String FORCE_WRITEBACK_PROP = "zram.force_writeback"; private void markPagesAsIdle() { String idlePath = String.format(IDLE_SYS, sZramDeviceId); @@ -122,11 +123,12 @@ public final class ZramWriteback extends JobService { private static void schedNextWriteback(Context context) { int nextWbDelay = SystemProperties.getInt(PERIODIC_WB_DELAY_PROP, 24); + boolean forceWb = SystemProperties.getBoolean(FORCE_WRITEBACK_PROP, false); JobScheduler js = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE); js.schedule(new JobInfo.Builder(WRITEBACK_IDLE_JOB_ID, sZramWriteback) .setMinimumLatency(TimeUnit.HOURS.toMillis(nextWbDelay)) - .setRequiresDeviceIdle(true) + .setRequiresDeviceIdle(!forceWb) .build()); } @@ -167,6 +169,7 @@ public final class ZramWriteback extends JobService { public static void scheduleZramWriteback(Context context) { int markIdleDelay = SystemProperties.getInt(MARK_IDLE_DELAY_PROP, 20); int firstWbDelay = SystemProperties.getInt(FIRST_WB_DELAY_PROP, 180); + boolean forceWb = SystemProperties.getBoolean(FORCE_WRITEBACK_PROP, false); JobScheduler js = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE); @@ -182,7 +185,7 @@ public final class ZramWriteback extends JobService { // by ro.zram.periodic_wb_delay_hours. js.schedule(new JobInfo.Builder(WRITEBACK_IDLE_JOB_ID, sZramWriteback) .setMinimumLatency(TimeUnit.MINUTES.toMillis(firstWbDelay)) - .setRequiresDeviceIdle(true) + .setRequiresDeviceIdle(!forceWb) .build()); } } diff --git a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java index d9e4844209d0..59070c706a9c 100644 --- a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java +++ b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java @@ -3029,7 +3029,7 @@ final class ActivityManagerShellCommand extends ShellCommand { pw.println(" --receiver-permission <PERMISSION>: Require receiver to hold permission."); pw.println(" instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w]"); pw.println(" [--user <USER_ID> | current]"); - pw.println(" [--no-hidden-api-checks [--no-test-api-checks]]"); + pw.println(" [--no-hidden-api-checks [--no-test-api-access]]"); pw.println(" [--no-isolated-storage]"); pw.println(" [--no-window-animation] [--abi <ABI>] <COMPONENT>"); pw.println(" Start an Instrumentation. Typically this target <COMPONENT> is in the"); @@ -3049,7 +3049,7 @@ final class ActivityManagerShellCommand extends ShellCommand { pw.println(" --user <USER_ID> | current: Specify user instrumentation runs in;"); pw.println(" current user if not specified."); pw.println(" --no-hidden-api-checks: disable restrictions on use of hidden API."); - pw.println(" --no-test-api-checks: disable restrictions to test APIs, if hidden"); + pw.println(" --no-test-api-access: do not allow access to test APIs, if hidden"); pw.println(" API checks are enabled."); pw.println(" --no-isolated-storage: don't use isolated storage sandbox and "); pw.println(" mount full external storage"); diff --git a/services/core/java/com/android/server/audio/AudioDeviceInventory.java b/services/core/java/com/android/server/audio/AudioDeviceInventory.java index 90973a888a9d..37add3da5a48 100644 --- a/services/core/java/com/android/server/audio/AudioDeviceInventory.java +++ b/services/core/java/com/android/server/audio/AudioDeviceInventory.java @@ -35,7 +35,6 @@ import android.os.RemoteCallbackList; import android.os.RemoteException; import android.os.UserHandle; import android.text.TextUtils; -import android.util.ArrayMap; import android.util.ArraySet; import android.util.Log; import android.util.Slog; @@ -44,6 +43,9 @@ import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.Set; /** * Class to manage the inventory of all connected devices. @@ -56,7 +58,7 @@ public class AudioDeviceInventory { // Actual list of connected devices // Key for map created from DeviceInfo.makeDeviceListKey() - private final ArrayMap<String, DeviceInfo> mConnectedDevices = new ArrayMap<>(); + private final LinkedHashMap<String, DeviceInfo> mConnectedDevices = new LinkedHashMap<>(); private @NonNull AudioDeviceBroker mDeviceBroker; @@ -146,8 +148,7 @@ public class AudioDeviceInventory { */ /*package*/ void onRestoreDevices() { synchronized (mConnectedDevices) { - for (int i = 0; i < mConnectedDevices.size(); i++) { - DeviceInfo di = mConnectedDevices.valueAt(i); + for (DeviceInfo di : mConnectedDevices.values()) { AudioSystem.setDeviceConnectionState( di.mDeviceType, AudioSystem.DEVICE_STATE_AVAILABLE, @@ -372,9 +373,14 @@ public class AudioDeviceInventory { mDeviceBroker.postObserveDevicesForAllStreams(); } - private static final int DEVICE_OVERRIDE_A2DP_ROUTE_ON_PLUG = - AudioSystem.DEVICE_OUT_WIRED_HEADSET | AudioSystem.DEVICE_OUT_WIRED_HEADPHONE - | AudioSystem.DEVICE_OUT_LINE | AudioSystem.DEVICE_OUT_ALL_USB; + private static final Set<Integer> DEVICE_OVERRIDE_A2DP_ROUTE_ON_PLUG_SET; + static { + DEVICE_OVERRIDE_A2DP_ROUTE_ON_PLUG_SET = new HashSet<>(); + DEVICE_OVERRIDE_A2DP_ROUTE_ON_PLUG_SET.add(AudioSystem.DEVICE_OUT_WIRED_HEADSET); + DEVICE_OVERRIDE_A2DP_ROUTE_ON_PLUG_SET.add(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE); + DEVICE_OVERRIDE_A2DP_ROUTE_ON_PLUG_SET.add(AudioSystem.DEVICE_OUT_LINE); + DEVICE_OVERRIDE_A2DP_ROUTE_ON_PLUG_SET.addAll(AudioSystem.DEVICE_OUT_ALL_USB_SET); + } /*package*/ void onSetWiredDeviceConnectionState( AudioDeviceInventory.WiredDeviceConnectionState wdcs) { @@ -382,7 +388,7 @@ public class AudioDeviceInventory { synchronized (mConnectedDevices) { if ((wdcs.mState == AudioService.CONNECTION_STATE_DISCONNECTED) - && ((wdcs.mType & DEVICE_OVERRIDE_A2DP_ROUTE_ON_PLUG) != 0)) { + && DEVICE_OVERRIDE_A2DP_ROUTE_ON_PLUG_SET.contains(wdcs.mType)) { mDeviceBroker.setBluetoothA2dpOnInt(true, "onSetWiredDeviceConnectionState state DISCONNECTED"); } @@ -393,7 +399,7 @@ public class AudioDeviceInventory { return; } if (wdcs.mState != AudioService.CONNECTION_STATE_DISCONNECTED) { - if ((wdcs.mType & DEVICE_OVERRIDE_A2DP_ROUTE_ON_PLUG) != 0) { + if (DEVICE_OVERRIDE_A2DP_ROUTE_ON_PLUG_SET.contains(wdcs.mType)) { mDeviceBroker.setBluetoothA2dpOnInt(false, "onSetWiredDeviceConnectionState state not DISCONNECTED"); } @@ -764,13 +770,19 @@ public class AudioDeviceInventory { // - none of these devices are connected anymore after one is disconnected AND // - the device being disconnected is actually used for music. // Access synchronized on mConnectedDevices - private int mBecomingNoisyIntentDevices = - AudioSystem.DEVICE_OUT_WIRED_HEADSET | AudioSystem.DEVICE_OUT_WIRED_HEADPHONE - | AudioSystem.DEVICE_OUT_ALL_A2DP | AudioSystem.DEVICE_OUT_HDMI - | AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET - | AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET - | AudioSystem.DEVICE_OUT_ALL_USB | AudioSystem.DEVICE_OUT_LINE - | AudioSystem.DEVICE_OUT_HEARING_AID; + private static final Set<Integer> BECOMING_NOISY_INTENT_DEVICES_SET; + static { + BECOMING_NOISY_INTENT_DEVICES_SET = new HashSet<>(); + BECOMING_NOISY_INTENT_DEVICES_SET.add(AudioSystem.DEVICE_OUT_WIRED_HEADSET); + BECOMING_NOISY_INTENT_DEVICES_SET.add(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE); + BECOMING_NOISY_INTENT_DEVICES_SET.add(AudioSystem.DEVICE_OUT_HDMI); + BECOMING_NOISY_INTENT_DEVICES_SET.add(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET); + BECOMING_NOISY_INTENT_DEVICES_SET.add(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET); + BECOMING_NOISY_INTENT_DEVICES_SET.add(AudioSystem.DEVICE_OUT_LINE); + BECOMING_NOISY_INTENT_DEVICES_SET.add(AudioSystem.DEVICE_OUT_HEARING_AID); + BECOMING_NOISY_INTENT_DEVICES_SET.addAll(AudioSystem.DEVICE_OUT_ALL_A2DP_SET); + BECOMING_NOISY_INTENT_DEVICES_SET.addAll(AudioSystem.DEVICE_OUT_ALL_USB_SET); + } // must be called before removing the device from mConnectedDevices // musicDevice argument is used when not AudioSystem.DEVICE_NONE instead of querying @@ -781,16 +793,15 @@ public class AudioDeviceInventory { if (state != AudioService.CONNECTION_STATE_DISCONNECTED) { return 0; } - if ((device & mBecomingNoisyIntentDevices) == 0) { + if (!BECOMING_NOISY_INTENT_DEVICES_SET.contains(device)) { return 0; } int delay = 0; - int devices = 0; - for (int i = 0; i < mConnectedDevices.size(); i++) { - int dev = mConnectedDevices.valueAt(i).mDeviceType; - if (((dev & AudioSystem.DEVICE_BIT_IN) == 0) - && ((dev & mBecomingNoisyIntentDevices) != 0)) { - devices |= dev; + Set<Integer> devices = new HashSet<>(); + for (DeviceInfo di : mConnectedDevices.values()) { + if (((di.mDeviceType & AudioSystem.DEVICE_BIT_IN) == 0) + && BECOMING_NOISY_INTENT_DEVICES_SET.contains(di.mDeviceType)) { + devices.add(di.mDeviceType); } } if (musicDevice == AudioSystem.DEVICE_NONE) { @@ -801,8 +812,9 @@ public class AudioDeviceInventory { // because music routing is altered in this case. // also checks whether media routing if affected by a dynamic policy or mirroring if (((device == musicDevice) || mDeviceBroker.isInCommunication()) - && (device == devices) && !mDeviceBroker.hasMediaDynamicPolicy() - && ((musicDevice & AudioSystem.DEVICE_OUT_REMOTE_SUBMIX) == 0)) { + && AudioSystem.isSingleAudioDeviceType(devices, device) + && !mDeviceBroker.hasMediaDynamicPolicy() + && (musicDevice != AudioSystem.DEVICE_OUT_REMOTE_SUBMIX)) { if (!AudioSystem.isStreamActive(AudioSystem.STREAM_MUSIC, 0 /*not looking in past*/) && !mDeviceBroker.hasAudioFocusUsers()) { // no media playback, not a "becoming noisy" situation, otherwise it could cause diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 48f08e3226e3..25fdf6447061 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -61,6 +61,7 @@ import android.hardware.hdmi.HdmiPlaybackClient; import android.hardware.hdmi.HdmiTvClient; import android.hardware.input.InputManager; import android.hardware.usb.UsbManager; +import android.hidl.manager.V1_0.IServiceManager; import android.media.AudioAttributes; import android.media.AudioFocusInfo; import android.media.AudioFocusRequest; @@ -146,12 +147,15 @@ import java.io.PrintWriter; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.NoSuchElementException; import java.util.Objects; +import java.util.Set; import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicBoolean; @@ -498,18 +502,20 @@ public class AudioService extends IAudioService.Stub private volatile IRingtonePlayer mRingtonePlayer; // Devices for which the volume is fixed (volume is either max or muted) - int mFixedVolumeDevices = AudioSystem.DEVICE_OUT_HDMI | - AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET | - AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET | - AudioSystem.DEVICE_OUT_HDMI_ARC | - AudioSystem.DEVICE_OUT_SPDIF | - AudioSystem.DEVICE_OUT_AUX_LINE; + Set<Integer> mFixedVolumeDevices = new HashSet<>(Arrays.asList( + AudioSystem.DEVICE_OUT_HDMI, + AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET, + AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET, + AudioSystem.DEVICE_OUT_HDMI_ARC, + AudioSystem.DEVICE_OUT_SPDIF, + AudioSystem.DEVICE_OUT_AUX_LINE)); // Devices for which the volume is always max, no volume panel - int mFullVolumeDevices = 0; + Set<Integer> mFullVolumeDevices = new HashSet<>(); // Devices for the which use the "absolute volume" concept (framework sends audio signal // full scale, and volume control separately) and can be used for multiple use cases reflected // by the audio mode (e.g. media playback in MODE_NORMAL, and phone calls in MODE_IN_CALL). - int mAbsVolumeMultiModeCaseDevices = AudioSystem.DEVICE_OUT_HEARING_AID; + Set<Integer> mAbsVolumeMultiModeCaseDevices = new HashSet<>( + Arrays.asList(AudioSystem.DEVICE_OUT_HEARING_AID)); private final boolean mMonitorRotation; @@ -721,6 +727,8 @@ public class AudioService extends IAudioService.Stub AudioSystem.setErrorCallback(mAudioSystemCallback); + updateAudioHalPids(); + boolean cameraSoundForced = readCameraSoundForced(); mCameraSoundForced = new Boolean(cameraSoundForced); sendMsg(mAudioHandler, @@ -858,13 +866,14 @@ public class AudioService extends IAudioService.Stub } mHdmiTvClient = mHdmiManager.getTvClient(); if (mHdmiTvClient != null) { - mFixedVolumeDevices &= ~AudioSystem.DEVICE_ALL_HDMI_SYSTEM_AUDIO_AND_SPEAKER; + mFixedVolumeDevices.removeAll( + AudioSystem.DEVICE_ALL_HDMI_SYSTEM_AUDIO_AND_SPEAKER_SET); } mHdmiPlaybackClient = mHdmiManager.getPlaybackClient(); if (mHdmiPlaybackClient != null) { // not a television: HDMI output will be always at max - mFixedVolumeDevices &= ~AudioSystem.DEVICE_OUT_HDMI; - mFullVolumeDevices |= AudioSystem.DEVICE_OUT_HDMI; + mFixedVolumeDevices.remove(AudioSystem.DEVICE_OUT_HDMI); + mFullVolumeDevices.add(AudioSystem.DEVICE_OUT_HDMI); } mHdmiAudioSystemClient = mHdmiManager.getAudioSystemClient(); } @@ -949,6 +958,8 @@ public class AudioService extends IAudioService.Stub } Log.e(TAG, "Audioserver started."); + updateAudioHalPids(); + // indicate to audio HAL that we start the reconfiguration phase after a media // server crash // Note that we only execute this when the media server @@ -1119,7 +1130,7 @@ public class AudioService extends IAudioService.Stub @AudioService.ConnectionState int state, String caller) { if (state == AudioService.CONNECTION_STATE_CONNECTED) { // DEVICE_OUT_HDMI is now connected - if ((AudioSystem.DEVICE_OUT_HDMI & mSafeMediaVolumeDevices) != 0) { + if (mSafeMediaVolumeDevices.contains(AudioSystem.DEVICE_OUT_HDMI)) { sendMsg(mAudioHandler, MSG_CHECK_MUSIC_ACTIVE, SENDMSG_REPLACE, @@ -1750,8 +1761,8 @@ public class AudioService extends IAudioService.Stub // skip a2dp absolute volume control request when the device // is not an a2dp device - if ((device & AudioSystem.DEVICE_OUT_ALL_A2DP) == 0 && - (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) != 0) { + if (!AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device) + && (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) != 0) { return; } @@ -1772,14 +1783,14 @@ public class AudioService extends IAudioService.Stub flags &= ~AudioManager.FLAG_FIXED_VOLUME; if ((streamTypeAlias == AudioSystem.STREAM_MUSIC) && - ((device & mFixedVolumeDevices) != 0)) { + mFixedVolumeDevices.contains(device)) { flags |= AudioManager.FLAG_FIXED_VOLUME; // Always toggle between max safe volume and 0 for fixed volume devices where safe // volume is enforced, and max and 0 for the others. // This is simulated by stepping by the full allowed volume range if (mSafeMediaVolumeState == SAFE_MEDIA_VOLUME_ACTIVE && - (device & mSafeMediaVolumeDevices) != 0) { + mSafeMediaVolumeDevices.contains(device)) { step = safeMediaVolumeIndex(device); } else { step = streamState.getMaxIndex(); @@ -1849,7 +1860,7 @@ public class AudioService extends IAudioService.Stub !checkSafeMediaVolume(streamTypeAlias, aliasIndex + step, device)) { Log.e(TAG, "adjustStreamVolume() safe volume index = " + oldIndex); mVolumeController.postDisplaySafeVolumeWarning(flags); - } else if (((device & mFullVolumeDevices) == 0) + } else if (!mFullVolumeDevices.contains(device) && (streamState.adjustIndex(direction * step, device, caller) || streamState.mIsMuted)) { // Post message to set system volume (it in turn will post a @@ -1878,9 +1889,9 @@ public class AudioService extends IAudioService.Stub int newIndex = mStreamStates[streamType].getIndex(device); // Check if volume update should be send to AVRCP - if (streamTypeAlias == AudioSystem.STREAM_MUSIC && - (device & AudioSystem.DEVICE_OUT_ALL_A2DP) != 0 && - (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) == 0) { + if (streamTypeAlias == AudioSystem.STREAM_MUSIC + && AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device) + && (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) == 0) { if (DEBUG_VOL) { Log.d(TAG, "adjustSreamVolume: postSetAvrcpAbsoluteVolumeIndex index=" + newIndex + "stream=" + streamType); @@ -1889,7 +1900,7 @@ public class AudioService extends IAudioService.Stub } // Check if volume update should be send to Hearing Aid - if ((device & AudioSystem.DEVICE_OUT_HEARING_AID) != 0) { + if (device == AudioSystem.DEVICE_OUT_HEARING_AID) { // only modify the hearing aid attenuation when the stream to modify matches // the one expected by the hearing aid if (streamType == getHearingAidStreamType()) { @@ -1911,7 +1922,7 @@ public class AudioService extends IAudioService.Stub if (mHdmiCecSink && streamTypeAlias == AudioSystem.STREAM_MUSIC // vol change on a full volume device - && ((device & mFullVolumeDevices) != 0)) { + && mFullVolumeDevices.contains(device)) { int keyCode = KeyEvent.KEYCODE_UNKNOWN; switch (direction) { case AudioManager.ADJUST_RAISE: @@ -2279,13 +2290,17 @@ public class AudioService extends IAudioService.Stub int streamType = getHearingAidStreamType(newMode); - final int device = AudioSystem.getDevicesForStream(streamType); - if ((device & mAbsVolumeMultiModeCaseDevices) == 0) { + final Set<Integer> deviceTypes = AudioSystem.generateAudioDeviceTypesSet( + AudioSystem.getDevicesForStream(streamType)); + final Set<Integer> absVolumeMultiModeCaseDevices = AudioSystem.intersectionAudioDeviceTypes( + mAbsVolumeMultiModeCaseDevices, deviceTypes); + if (absVolumeMultiModeCaseDevices.isEmpty()) { return; } // handling of specific interfaces goes here: - if ((device & mAbsVolumeMultiModeCaseDevices) == AudioSystem.DEVICE_OUT_HEARING_AID) { + if (AudioSystem.isSingleAudioDeviceType( + absVolumeMultiModeCaseDevices, AudioSystem.DEVICE_OUT_HEARING_AID)) { final int index = getStreamVolume(streamType); sVolumeLogger.log(new VolumeEvent(VolumeEvent.VOL_MODE_CHANGE_HEARING_AID, newMode, streamType, index)); @@ -2312,8 +2327,8 @@ public class AudioService extends IAudioService.Stub // skip a2dp absolute volume control request when the device // is not an a2dp device - if ((device & AudioSystem.DEVICE_OUT_ALL_A2DP) == 0 && - (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) != 0) { + if (!AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device) + && (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) != 0) { return; } // If we are being called by the system (e.g. hardware keys) check for current user @@ -2345,7 +2360,7 @@ public class AudioService extends IAudioService.Stub index = rescaleIndex(index * 10, streamType, streamTypeAlias); if (streamTypeAlias == AudioSystem.STREAM_MUSIC - && (device & AudioSystem.DEVICE_OUT_ALL_A2DP) != 0 + && AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device) && (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) == 0) { if (DEBUG_VOL) { Log.d(TAG, "setStreamVolume postSetAvrcpAbsoluteVolumeIndex index=" + index @@ -2354,7 +2369,7 @@ public class AudioService extends IAudioService.Stub mDeviceBroker.postSetAvrcpAbsoluteVolumeIndex(index / 10); } - if ((device & AudioSystem.DEVICE_OUT_HEARING_AID) != 0 + if (device == AudioSystem.DEVICE_OUT_HEARING_AID && streamType == getHearingAidStreamType()) { Log.i(TAG, "setStreamVolume postSetHearingAidVolumeIndex index=" + index + " stream=" + streamType); @@ -2367,13 +2382,13 @@ public class AudioService extends IAudioService.Stub flags &= ~AudioManager.FLAG_FIXED_VOLUME; if ((streamTypeAlias == AudioSystem.STREAM_MUSIC) && - ((device & mFixedVolumeDevices) != 0)) { + mFixedVolumeDevices.contains(device)) { flags |= AudioManager.FLAG_FIXED_VOLUME; // volume is either 0 or max allowed for fixed volume devices if (index != 0) { if (mSafeMediaVolumeState == SAFE_MEDIA_VOLUME_ACTIVE && - (device & mSafeMediaVolumeDevices) != 0) { + mSafeMediaVolumeDevices.contains(device)) { index = safeMediaVolumeIndex(device); } else { index = streamState.getMaxIndex(); @@ -2556,7 +2571,7 @@ public class AudioService extends IAudioService.Stub if (streamType == AudioSystem.STREAM_MUSIC) { flags = updateFlagsForTvPlatform(flags); - if ((device & mFullVolumeDevices) != 0) { + if (mFullVolumeDevices.contains(device)) { flags &= ~AudioManager.FLAG_SHOW_UI; } } @@ -2602,7 +2617,7 @@ public class AudioService extends IAudioService.Stub int device, boolean force, String caller) { - if ((device & mFullVolumeDevices) != 0) { + if (mFullVolumeDevices.contains(device)) { return; } VolumeStreamState streamState = mStreamStates[streamType]; @@ -2719,8 +2734,8 @@ public class AudioService extends IAudioService.Stub if (!hasRmtSbmxFullVolDeathHandlerFor(cb)) { mRmtSbmxFullVolDeathHandlers.add(new RmtSbmxFullVolDeathHandler(cb)); if (mRmtSbmxFullVolRefCount == 0) { - mFullVolumeDevices |= AudioSystem.DEVICE_OUT_REMOTE_SUBMIX; - mFixedVolumeDevices |= AudioSystem.DEVICE_OUT_REMOTE_SUBMIX; + mFullVolumeDevices.add(AudioSystem.DEVICE_OUT_REMOTE_SUBMIX); + mFixedVolumeDevices.add(AudioSystem.DEVICE_OUT_REMOTE_SUBMIX); applyRequired = true; } mRmtSbmxFullVolRefCount++; @@ -2729,8 +2744,8 @@ public class AudioService extends IAudioService.Stub if (discardRmtSbmxFullVolDeathHandlerFor(cb) && (mRmtSbmxFullVolRefCount > 0)) { mRmtSbmxFullVolRefCount--; if (mRmtSbmxFullVolRefCount == 0) { - mFullVolumeDevices &= ~AudioSystem.DEVICE_OUT_REMOTE_SUBMIX; - mFixedVolumeDevices &= ~AudioSystem.DEVICE_OUT_REMOTE_SUBMIX; + mFullVolumeDevices.remove(AudioSystem.DEVICE_OUT_REMOTE_SUBMIX); + mFixedVolumeDevices.remove(AudioSystem.DEVICE_OUT_REMOTE_SUBMIX); applyRequired = true; } } @@ -2815,7 +2830,7 @@ public class AudioService extends IAudioService.Stub index = 0; } if (index != 0 && (mStreamVolumeAlias[streamType] == AudioSystem.STREAM_MUSIC) && - (device & mFixedVolumeDevices) != 0) { + mFixedVolumeDevices.contains(device)) { index = mStreamStates[streamType].getMaxIndex(); } return (index + 5) / 10; @@ -3673,7 +3688,7 @@ public class AudioService extends IAudioService.Stub if (mSafeMediaVolumeState == SAFE_MEDIA_VOLUME_INACTIVE) { int device = getDeviceForStream(AudioSystem.STREAM_MUSIC); - if ((device & mSafeMediaVolumeDevices) != 0) { + if (mSafeMediaVolumeDevices.contains(device)) { sendMsg(mAudioHandler, MSG_CHECK_MUSIC_ACTIVE, SENDMSG_REPLACE, @@ -4214,6 +4229,8 @@ public class AudioService extends IAudioService.Stub // retain the device on the A2DP output as the other must not correspond to an active // selection if not the speaker. // - HDMI-CEC system audio mode only output: give priority to available item in order. + // FIXME: Haven't applied audio device type refactor to this API + // as it is going to be deprecated. if ((device & AudioSystem.DEVICE_OUT_SPEAKER) != 0) { device = AudioSystem.DEVICE_OUT_SPEAKER; } else if ((device & AudioSystem.DEVICE_OUT_HDMI_ARC) != 0) { @@ -4223,7 +4240,11 @@ public class AudioService extends IAudioService.Stub } else if ((device & AudioSystem.DEVICE_OUT_AUX_LINE) != 0) { device = AudioSystem.DEVICE_OUT_AUX_LINE; } else { - device &= AudioSystem.DEVICE_OUT_ALL_A2DP; + for (int deviceType : AudioSystem.DEVICE_OUT_ALL_A2DP_SET) { + if ((deviceType & device) == deviceType) { + return deviceType; + } + } } } return device; @@ -4356,12 +4377,16 @@ public class AudioService extends IAudioService.Stub mDeviceBroker.postBluetoothA2dpDeviceConfigChange(device); } - private static final int DEVICE_MEDIA_UNMUTED_ON_PLUG = - AudioSystem.DEVICE_OUT_WIRED_HEADSET | AudioSystem.DEVICE_OUT_WIRED_HEADPHONE | - AudioSystem.DEVICE_OUT_LINE | - AudioSystem.DEVICE_OUT_ALL_A2DP | - AudioSystem.DEVICE_OUT_ALL_USB | - AudioSystem.DEVICE_OUT_HDMI; + private static final Set<Integer> DEVICE_MEDIA_UNMUTED_ON_PLUG_SET; + static { + DEVICE_MEDIA_UNMUTED_ON_PLUG_SET = new HashSet<>(); + DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.add(AudioSystem.DEVICE_OUT_WIRED_HEADSET); + DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.add(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE); + DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.add(AudioSystem.DEVICE_OUT_LINE); + DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.addAll(AudioSystem.DEVICE_OUT_ALL_A2DP_SET); + DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.addAll(AudioSystem.DEVICE_OUT_ALL_USB_SET); + DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.add(AudioSystem.DEVICE_OUT_HDMI); + } /** only public for mocking/spying, do not call outside of AudioService */ @VisibleForTesting @@ -4377,7 +4402,7 @@ public class AudioService extends IAudioService.Stub } if (mNm.getZenMode() != Settings.Global.ZEN_MODE_NO_INTERRUPTIONS - && (newDevice & DEVICE_MEDIA_UNMUTED_ON_PLUG) != 0 + && DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.contains(newDevice) && mStreamStates[AudioSystem.STREAM_MUSIC].mIsMuted && mStreamStates[AudioSystem.STREAM_MUSIC].getIndex(newDevice) != 0 && (newDevice & AudioSystem.getDevicesForStream(AudioSystem.STREAM_MUSIC)) != 0) { @@ -4506,14 +4531,7 @@ public class AudioService extends IAudioService.Stub } } synchronized (VolumeStreamState.class) { - int remainingDevices = AudioSystem.DEVICE_OUT_ALL; - - for (int i = 0; remainingDevices != 0; i++) { - int device = (1 << i); - if ((device & remainingDevices) == 0) { - continue; - } - remainingDevices &= ~device; + for (int device : AudioSystem.DEVICE_OUT_ALL_SET) { // retrieve current volume for device // if no volume stored for current stream and device, use default volume if default @@ -4573,11 +4591,12 @@ public class AudioService extends IAudioService.Stub int index; if (mIsMuted) { index = 0; - } else if ((device & AudioSystem.DEVICE_OUT_ALL_A2DP) != 0 && isAvrcpAbsVolSupported) { + } else if (AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device) + && isAvrcpAbsVolSupported) { index = getAbsoluteVolumeIndex((getIndex(device) + 5)/10); - } else if ((device & mFullVolumeDevices) != 0) { + } else if (mFullVolumeDevices.contains(device)) { index = (mIndexMax + 5)/10; - } else if ((device & AudioSystem.DEVICE_OUT_HEARING_AID) != 0) { + } else if (device == AudioSystem.DEVICE_OUT_HEARING_AID) { index = (mIndexMax + 5)/10; } else { index = (getIndex(device) + 5)/10; @@ -4595,12 +4614,12 @@ public class AudioService extends IAudioService.Stub if (device != AudioSystem.DEVICE_OUT_DEFAULT) { if (mIsMuted) { index = 0; - } else if ((device & AudioSystem.DEVICE_OUT_ALL_A2DP) != 0 && - isAvrcpAbsVolSupported) { + } else if (AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device) + && isAvrcpAbsVolSupported) { index = getAbsoluteVolumeIndex((getIndex(device) + 5)/10); - } else if ((device & mFullVolumeDevices) != 0) { + } else if (mFullVolumeDevices.contains(device)) { index = (mIndexMax + 5)/10; - } else if ((device & AudioSystem.DEVICE_OUT_HEARING_AID) != 0) { + } else if (device == AudioSystem.DEVICE_OUT_HEARING_AID) { index = (mIndexMax + 5)/10; } else { index = (mIndexMap.valueAt(i) + 5)/10; @@ -4661,7 +4680,7 @@ public class AudioService extends IAudioService.Stub && device == AudioSystem.DEVICE_OUT_SPEAKER) { for (int i = 0; i < mIndexMap.size(); i++) { int otherDevice = mIndexMap.keyAt(i); - if ((otherDevice & AudioSystem.DEVICE_OUT_ALL_SCO) != 0) { + if (AudioSystem.DEVICE_OUT_ALL_SCO_SET.contains(otherDevice)) { mIndexMap.put(otherDevice, index); } } @@ -4799,8 +4818,8 @@ public class AudioService extends IAudioService.Stub for (int i = 0; i < mIndexMap.size(); i++) { int device = mIndexMap.keyAt(i); int index = mIndexMap.valueAt(i); - if (((device & mFullVolumeDevices) != 0) - || (((device & mFixedVolumeDevices) != 0) && index != 0)) { + if (mFullVolumeDevices.contains(device) + || (mFixedVolumeDevices.contains(device) && index != 0)) { mIndexMap.put(device, mIndexMax); } applyDeviceVolume_syncVSS(device, isAvrcpAbsVolSupported); @@ -4971,7 +4990,7 @@ public class AudioService extends IAudioService.Stub // that may have a different device selected int streamDevice = getDeviceForStream(streamType); if ((device != streamDevice) && isAvrcpAbsVolSupported - && ((device & AudioSystem.DEVICE_OUT_ALL_A2DP) != 0)) { + && AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device)) { mStreamStates[streamType].applyDeviceVolume_syncVSS(device, isAvrcpAbsVolSupported); } @@ -5300,7 +5319,7 @@ public class AudioService extends IAudioService.Stub } /*package*/ void checkMusicActive(int deviceType, String caller) { - if ((deviceType & mSafeMediaVolumeDevices) != 0) { + if (mSafeMediaVolumeDevices.contains(deviceType)) { sendMsg(mAudioHandler, MSG_CHECK_MUSIC_ACTIVE, SENDMSG_REPLACE, @@ -5746,9 +5765,9 @@ public class AudioService extends IAudioService.Stub // the headset is compliant to EN 60950 with a max loudness of 100dB SPL. private int mSafeUsbMediaVolumeIndex; // mSafeMediaVolumeDevices lists the devices for which safe media volume is enforced, - /*package*/ final int mSafeMediaVolumeDevices = AudioSystem.DEVICE_OUT_WIRED_HEADSET - | AudioSystem.DEVICE_OUT_WIRED_HEADPHONE - | AudioSystem.DEVICE_OUT_USB_HEADSET; + /*package*/ final Set<Integer> mSafeMediaVolumeDevices = new HashSet<>( + Arrays.asList(AudioSystem.DEVICE_OUT_WIRED_HEADSET, + AudioSystem.DEVICE_OUT_WIRED_HEADPHONE, AudioSystem.DEVICE_OUT_USB_HEADSET)); // mMusicActiveMs is the cumulative time of music activity since safe volume was disabled. // When this time reaches UNSAFE_VOLUME_MUSIC_ACTIVE_MS_MAX, the safe media volume is re-enabled // automatically. mMusicActiveMs is rounded to a multiple of MUSIC_ACTIVE_POLL_PERIOD_MS. @@ -5758,7 +5777,7 @@ public class AudioService extends IAudioService.Stub private static final int SAFE_VOLUME_CONFIGURE_TIMEOUT_MS = 30000; // 30s after boot completed private int safeMediaVolumeIndex(int device) { - if ((device & mSafeMediaVolumeDevices) == 0) { + if (!mSafeMediaVolumeDevices.contains(device)) { return MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]; } if (device == AudioSystem.DEVICE_OUT_USB_HEADSET) { @@ -5793,14 +5812,9 @@ public class AudioService extends IAudioService.Stub private void enforceSafeMediaVolume(String caller) { VolumeStreamState streamState = mStreamStates[AudioSystem.STREAM_MUSIC]; - int devices = mSafeMediaVolumeDevices; - int i = 0; + Set<Integer> devices = mSafeMediaVolumeDevices; - while (devices != 0) { - int device = 1 << i++; - if ((device & devices) == 0) { - continue; - } + for (int device : devices) { int index = streamState.getIndex(device); if (index > safeMediaVolumeIndex(device)) { streamState.setIndex(safeMediaVolumeIndex(device), device, caller); @@ -5812,16 +5826,15 @@ public class AudioService extends IAudioService.Stub streamState, 0); } - devices &= ~device; } } private boolean checkSafeMediaVolume(int streamType, int index, int device) { synchronized (mSafeMediaVolumeStateLock) { - if ((mSafeMediaVolumeState == SAFE_MEDIA_VOLUME_ACTIVE) && - (mStreamVolumeAlias[streamType] == AudioSystem.STREAM_MUSIC) && - ((device & mSafeMediaVolumeDevices) != 0) && - (index > safeMediaVolumeIndex(device))) { + if ((mSafeMediaVolumeState == SAFE_MEDIA_VOLUME_ACTIVE) + && (mStreamVolumeAlias[streamType] == AudioSystem.STREAM_MUSIC) + && (mSafeMediaVolumeDevices.contains(device)) + && (index > safeMediaVolumeIndex(device))) { return false; } return true; @@ -5862,14 +5875,14 @@ public class AudioService extends IAudioService.Stub if (DEBUG_VOL) { Log.d(TAG, "CEC sink: setting HDMI as full vol device"); } - mFullVolumeDevices |= AudioSystem.DEVICE_OUT_HDMI; + mFullVolumeDevices.add(AudioSystem.DEVICE_OUT_HDMI); } else { if (DEBUG_VOL) { Log.d(TAG, "TV, no CEC: setting HDMI as regular vol device"); } // Android TV devices without CEC service apply software volume on // HDMI output - mFullVolumeDevices &= ~AudioSystem.DEVICE_OUT_HDMI; + mFullVolumeDevices.remove(AudioSystem.DEVICE_OUT_HDMI); } checkAddAllFixedVolumeDevices(AudioSystem.DEVICE_OUT_HDMI, @@ -6090,6 +6103,19 @@ public class AudioService extends IAudioService.Stub pw.println(); } + private String dumpDeviceTypes(@NonNull Set<Integer> deviceTypes) { + Iterator<Integer> it = deviceTypes.iterator(); + if (!it.hasNext()) { + return ""; + } + final StringBuilder sb = new StringBuilder(); + sb.append("0x" + Integer.toHexString(it.next())); + while (it.hasNext()) { + sb.append("," + "0x" + Integer.toHexString(it.next())); + } + return sb.toString(); + } + @Override protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return; @@ -6126,7 +6152,7 @@ public class AudioService extends IAudioService.Stub pw.println(mDeviceBroker.isAvrcpAbsoluteVolumeSupported()); pw.print(" mIsSingleVolume="); pw.println(mIsSingleVolume); pw.print(" mUseFixedVolume="); pw.println(mUseFixedVolume); - pw.print(" mFixedVolumeDevices=0x"); pw.println(Integer.toHexString(mFixedVolumeDevices)); + pw.print(" mFixedVolumeDevices="); pw.println(dumpDeviceTypes(mFixedVolumeDevices)); pw.print(" mHdmiCecSink="); pw.println(mHdmiCecSink); pw.print(" mHdmiAudioSystemClient="); pw.println(mHdmiAudioSystemClient); pw.print(" mHdmiPlaybackClient="); pw.println(mHdmiPlaybackClient); @@ -7291,6 +7317,41 @@ public class AudioService extends IAudioService.Stub } //====================== + // Audio HAL process dump + //====================== + + private static final String AUDIO_HAL_SERVICE_PREFIX = "android.hardware.audio"; + + private Set<Integer> getAudioHalPids() { + try { + IServiceManager serviceManager = IServiceManager.getService(); + ArrayList<IServiceManager.InstanceDebugInfo> dump = + serviceManager.debugDump(); + HashSet<Integer> pids = new HashSet<>(); + for (IServiceManager.InstanceDebugInfo info : dump) { + if (info.pid != IServiceManager.PidConstant.NO_PID + && info.interfaceName != null + && info.interfaceName.startsWith(AUDIO_HAL_SERVICE_PREFIX)) { + pids.add(info.pid); + } + } + return pids; + } catch (RemoteException e) { + return new HashSet<Integer>(); + } + } + + private void updateAudioHalPids() { + Set<Integer> pidsSet = getAudioHalPids(); + if (pidsSet.isEmpty()) { + Slog.w(TAG, "Could not retrieve audio HAL service pids"); + return; + } + int[] pidsArray = pidsSet.stream().mapToInt(Integer::intValue).toArray(); + AudioSystem.setAudioHalPids(pidsArray); + } + + //====================== // misc //====================== private final HashMap<IBinder, AudioPolicyProxy> mAudioPolicies = diff --git a/services/core/java/com/android/server/compat/CompatChange.java b/services/core/java/com/android/server/compat/CompatChange.java index 95582f73035a..2eec4199217f 100644 --- a/services/core/java/com/android/server/compat/CompatChange.java +++ b/services/core/java/com/android/server/compat/CompatChange.java @@ -55,7 +55,7 @@ public final class CompatChange extends CompatibilityChangeInfo { private Map<String, Boolean> mPackageOverrides; public CompatChange(long changeId) { - this(changeId, null, -1, false); + this(changeId, null, -1, false, null); } /** @@ -66,8 +66,8 @@ public final class CompatChange extends CompatibilityChangeInfo { * @param disabled If {@code true}, overrides any {@code enableAfterTargetSdk} set. */ public CompatChange(long changeId, @Nullable String name, int enableAfterTargetSdk, - boolean disabled) { - super(changeId, name, enableAfterTargetSdk, disabled); + boolean disabled, String description) { + super(changeId, name, enableAfterTargetSdk, disabled, description); } /** @@ -75,7 +75,7 @@ public final class CompatChange extends CompatibilityChangeInfo { */ public CompatChange(Change change) { super(change.getId(), change.getName(), change.getEnableAfterTargetSdk(), - change.getDisabled()); + change.getDisabled(), change.getDescription()); } void registerListener(ChangeListener listener) { diff --git a/services/core/java/com/android/server/compat/CompatConfig.java b/services/core/java/com/android/server/compat/CompatConfig.java index 39c6e7552e3c..cf83dd630a29 100644 --- a/services/core/java/com/android/server/compat/CompatConfig.java +++ b/services/core/java/com/android/server/compat/CompatConfig.java @@ -319,7 +319,8 @@ final class CompatConfig { changeInfos[i] = new CompatibilityChangeInfo(change.getId(), change.getName(), change.getEnableAfterTargetSdk(), - change.getDisabled()); + change.getDisabled(), + change.getDescription()); } return changeInfos; } diff --git a/services/core/java/com/android/server/connectivity/IpConnectivityMetrics.java b/services/core/java/com/android/server/connectivity/IpConnectivityMetrics.java index 79b56c6027f8..33f6ed597204 100644 --- a/services/core/java/com/android/server/connectivity/IpConnectivityMetrics.java +++ b/services/core/java/com/android/server/connectivity/IpConnectivityMetrics.java @@ -20,6 +20,7 @@ import android.content.Context; import android.net.ConnectivityMetricsEvent; import android.net.IIpConnectivityMetrics; import android.net.INetdEventCallback; +import android.net.NetworkStack; import android.net.metrics.ApfProgramEvent; import android.net.metrics.IpConnectivityLog; import android.os.Binder; @@ -276,7 +277,7 @@ final public class IpConnectivityMetrics extends SystemService { @Override public int logEvent(ConnectivityMetricsEvent event) { - enforceConnectivityInternalPermission(); + NetworkStack.checkNetworkStackPermission(getContext()); return append(event); } @@ -299,10 +300,6 @@ final public class IpConnectivityMetrics extends SystemService { } } - private void enforceConnectivityInternalPermission() { - enforcePermission(android.Manifest.permission.CONNECTIVITY_INTERNAL); - } - private void enforceDumpPermission() { enforcePermission(android.Manifest.permission.DUMP); } diff --git a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java index bc83780ad82d..21795184b1bd 100644 --- a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java +++ b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java @@ -31,7 +31,6 @@ import android.net.NetworkSpecifier; import android.net.StringNetworkSpecifier; import android.net.wifi.WifiInfo; import android.os.UserHandle; -import android.telephony.AccessNetworkConstants.TransportType; import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.text.TextUtils; @@ -105,8 +104,7 @@ public class NetworkNotificationManager { return -1; } - // TODO: Remove @TransportType or change it to @Transport. - private static String getTransportName(@TransportType int transportType) { + private static String getTransportName(final int transportType) { Resources r = Resources.getSystem(); String[] networkTypes = r.getStringArray(R.array.network_switch_type_name); try { diff --git a/services/core/java/com/android/server/connectivity/PermissionMonitor.java b/services/core/java/com/android/server/connectivity/PermissionMonitor.java index 56f4959a9714..f0b7150dd84f 100644 --- a/services/core/java/com/android/server/connectivity/PermissionMonitor.java +++ b/services/core/java/com/android/server/connectivity/PermissionMonitor.java @@ -17,7 +17,6 @@ package com.android.server.connectivity; import static android.Manifest.permission.CHANGE_NETWORK_STATE; -import static android.Manifest.permission.CONNECTIVITY_INTERNAL; import static android.Manifest.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS; import static android.Manifest.permission.INTERNET; import static android.Manifest.permission.NETWORK_STACK; @@ -25,6 +24,7 @@ import static android.Manifest.permission.UPDATE_DEVICE_STATS; import static android.content.pm.PackageInfo.REQUESTED_PERMISSION_GRANTED; import static android.content.pm.PackageManager.GET_PERMISSIONS; import static android.content.pm.PackageManager.MATCH_ANY_USER; +import static android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK; import static android.os.Process.INVALID_UID; import static android.os.Process.SYSTEM_UID; @@ -259,7 +259,8 @@ public class PermissionMonitor { return true; } } - return hasPermission(app, CONNECTIVITY_INTERNAL) + + return hasPermission(app, PERMISSION_MAINLINE_NETWORK_STACK) || hasPermission(app, NETWORK_STACK) || hasPermission(app, CONNECTIVITY_USE_RESTRICTED_NETWORKS); } diff --git a/services/core/java/com/android/server/net/LockdownVpnTracker.java b/services/core/java/com/android/server/net/LockdownVpnTracker.java index 77fbe41ebb88..4cb41da026c7 100644 --- a/services/core/java/com/android/server/net/LockdownVpnTracker.java +++ b/services/core/java/com/android/server/net/LockdownVpnTracker.java @@ -16,7 +16,7 @@ package com.android.server.net; -import static android.Manifest.permission.CONNECTIVITY_INTERNAL; +import static android.Manifest.permission.NETWORK_STACK; import static android.provider.Settings.ACTION_VPN_SETTINGS; import android.annotation.NonNull; @@ -202,8 +202,7 @@ public class LockdownVpnTracker { mVpn.setLockdown(true); final IntentFilter resetFilter = new IntentFilter(ACTION_LOCKDOWN_RESET); - mContext.registerReceiver(mResetReceiver, resetFilter, CONNECTIVITY_INTERNAL, mHandler); - + mContext.registerReceiver(mResetReceiver, resetFilter, NETWORK_STACK, mHandler); handleStateChangedLocked(); } diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java index d610561cae08..327b685fba9b 100644 --- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java +++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java @@ -20,6 +20,9 @@ import static android.Manifest.permission.ACCESS_NETWORK_STATE; import static android.Manifest.permission.CONNECTIVITY_INTERNAL; import static android.Manifest.permission.MANAGE_NETWORK_POLICY; import static android.Manifest.permission.MANAGE_SUBSCRIPTION_PLANS; +import static android.Manifest.permission.NETWORK_SETTINGS; +import static android.Manifest.permission.NETWORK_STACK; +import static android.Manifest.permission.OBSERVE_NETWORK_POLICY; import static android.Manifest.permission.READ_NETWORK_USAGE_HISTORY; import static android.Manifest.permission.READ_PHONE_STATE; import static android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE; @@ -33,6 +36,7 @@ import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_AWARE; import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE; import static android.content.pm.PackageManager.MATCH_DISABLED_COMPONENTS; import static android.content.pm.PackageManager.MATCH_UNINSTALLED_PACKAGES; +import static android.content.pm.PackageManager.PERMISSION_GRANTED; import static android.net.ConnectivityManager.CONNECTIVITY_ACTION; import static android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_DISABLED; import static android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_ENABLED; @@ -153,6 +157,7 @@ import android.net.NetworkPolicyManager; import android.net.NetworkQuotaInfo; import android.net.NetworkRequest; import android.net.NetworkSpecifier; +import android.net.NetworkStack; import android.net.NetworkState; import android.net.NetworkStats; import android.net.NetworkTemplate; @@ -820,7 +825,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { // watch for network interfaces to be claimed final IntentFilter connFilter = new IntentFilter(CONNECTIVITY_ACTION); - mContext.registerReceiver(mConnReceiver, connFilter, CONNECTIVITY_INTERNAL, mHandler); + mContext.registerReceiver(mConnReceiver, connFilter, NETWORK_STACK, mHandler); // listen for package changes to update policy final IntentFilter packageFilter = new IntentFilter(); @@ -1122,7 +1127,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { @Override public void limitReached(String limitName, String iface) { // only someone like NMS should be calling us - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); if (!LIMIT_GLOBAL_ALERT.equals(limitName)) { mHandler.obtainMessage(MSG_LIMIT_REACHED, iface).sendToTarget(); @@ -1477,7 +1482,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { private BroadcastReceiver mConnReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { - // on background handler thread, and verified CONNECTIVITY_INTERNAL + // on background handler thread, and verified NETWORK_STACK // permission above. updateNetworksInternal(); } @@ -2715,17 +2720,35 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { return changed; } + private boolean checkAnyPermissionOf(String... permissions) { + for (String permission : permissions) { + if (mContext.checkCallingOrSelfPermission(permission) == PERMISSION_GRANTED) { + return true; + } + } + return false; + } + + private void enforceAnyPermissionOf(String... permissions) { + if (!checkAnyPermissionOf(permissions)) { + throw new SecurityException("Requires one of the following permissions: " + + String.join(", ", permissions) + "."); + } + } + @Override public void registerListener(INetworkPolicyListener listener) { - // TODO: create permission for observing network policy - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + // TODO: Remove CONNECTIVITY_INTERNAL and the *AnyPermissionOf methods above after all apps + // have declared OBSERVE_NETWORK_POLICY. + enforceAnyPermissionOf(CONNECTIVITY_INTERNAL, OBSERVE_NETWORK_POLICY); mListeners.register(listener); } @Override public void unregisterListener(INetworkPolicyListener listener) { - // TODO: create permission for observing network policy - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + // TODO: Remove CONNECTIVITY_INTERNAL and the *AnyPermissionOf methods above after all apps + // have declared OBSERVE_NETWORK_POLICY. + enforceAnyPermissionOf(CONNECTIVITY_INTERNAL, OBSERVE_NETWORK_POLICY); mListeners.unregister(listener); } @@ -4948,7 +4971,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { @Override public void factoryReset(String subscriber) { - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + mContext.enforceCallingOrSelfPermission(NETWORK_SETTINGS, TAG); if (mUserManager.hasUserRestriction(UserManager.DISALLOW_NETWORK_RESET)) { return; @@ -4981,7 +5004,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { public boolean isUidNetworkingBlocked(int uid, boolean isNetworkMetered) { final long startTime = mStatLogger.getTime(); - mContext.enforceCallingOrSelfPermission(MANAGE_NETWORK_POLICY, TAG); + mContext.enforceCallingOrSelfPermission(OBSERVE_NETWORK_POLICY, TAG); final int uidRules; final boolean isBackgroundRestricted; synchronized (mUidRulesFirstLock) { diff --git a/services/core/java/com/android/server/net/NetworkStatsService.java b/services/core/java/com/android/server/net/NetworkStatsService.java index e473c96980b6..16424f2fef76 100644 --- a/services/core/java/com/android/server/net/NetworkStatsService.java +++ b/services/core/java/com/android/server/net/NetworkStatsService.java @@ -17,7 +17,6 @@ package com.android.server.net; import static android.Manifest.permission.ACCESS_NETWORK_STATE; -import static android.Manifest.permission.CONNECTIVITY_INTERNAL; import static android.Manifest.permission.READ_NETWORK_USAGE_HISTORY; import static android.content.Intent.ACTION_SHUTDOWN; import static android.content.Intent.ACTION_UID_REMOVED; @@ -91,6 +90,7 @@ import android.net.Network; import android.net.NetworkCapabilities; import android.net.NetworkIdentity; import android.net.NetworkInfo; +import android.net.NetworkStack; import android.net.NetworkState; import android.net.NetworkStats; import android.net.NetworkStats.NonMonotonicObserver; @@ -1020,8 +1020,6 @@ public class NetworkStatsService extends INetworkStatsService.Stub { private BroadcastReceiver mTetherReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { - // on background handler thread, and verified CONNECTIVITY_INTERNAL - // permission above. performPoll(FLAG_PERSIST_NETWORK); } }; @@ -1095,7 +1093,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub { @Override public void limitReached(String limitName, String iface) { // only someone like NMS should be calling us - mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + NetworkStack.checkNetworkStackPermission(mContext); if (LIMIT_GLOBAL_ALERT.equals(limitName)) { // kick off background poll to collect network stats unless there is already diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java index 204f186f9e13..31960e47ffce 100644 --- a/services/core/java/com/android/server/pm/UserManagerService.java +++ b/services/core/java/com/android/server/pm/UserManagerService.java @@ -2257,14 +2257,14 @@ public class UserManagerService extends IUserManager.Stub { return mContext.getResources().getString(com.android.internal.R.string.owner_name); } - private void scheduleWriteUser(UserData UserData) { + private void scheduleWriteUser(UserData userData) { if (DBG) { debug("scheduleWriteUser"); } // No need to wrap it within a lock -- worst case, we'll just post the same message // twice. - if (!mHandler.hasMessages(WRITE_USER_MSG, UserData)) { - Message msg = mHandler.obtainMessage(WRITE_USER_MSG, UserData); + if (!mHandler.hasMessages(WRITE_USER_MSG, userData)) { + Message msg = mHandler.obtainMessage(WRITE_USER_MSG, userData); mHandler.sendMessageDelayed(msg, WRITE_USER_DELAY); } } diff --git a/services/core/java/com/android/server/timedetector/SimpleTimeDetectorStrategy.java b/services/core/java/com/android/server/timedetector/SimpleTimeDetectorStrategy.java index 0b970bfc0076..340fe3dbaa97 100644 --- a/services/core/java/com/android/server/timedetector/SimpleTimeDetectorStrategy.java +++ b/services/core/java/com/android/server/timedetector/SimpleTimeDetectorStrategy.java @@ -150,7 +150,8 @@ public final class SimpleTimeDetectorStrategy implements TimeDetectorStrategy { if (!mCallback.isAutoTimeDetectionEnabled()) { if (DBG) { Slog.d(LOG_TAG, "Auto time detection is not enabled." - + " time=" + time + + " origin=" + origin + + ", time=" + time + ", cause=" + cause); } return; @@ -159,7 +160,8 @@ public final class SimpleTimeDetectorStrategy implements TimeDetectorStrategy { if (mCallback.isAutoTimeDetectionEnabled()) { if (DBG) { Slog.d(LOG_TAG, "Auto time detection is enabled." - + " time=" + time + + " origin=" + origin + + ", time=" + time + ", cause=" + cause); } return; @@ -232,23 +234,24 @@ public final class SimpleTimeDetectorStrategy implements TimeDetectorStrategy { @Override public synchronized void dump(@NonNull PrintWriter pw, @Nullable String[] args) { - pw.println("mLastPhoneSuggestion=" + mLastPhoneSuggestion); - pw.println("mLastAutoSystemClockTimeSet=" + mLastAutoSystemClockTimeSet); - pw.println("mLastAutoSystemClockTime=" + mLastAutoSystemClockTime); - pw.println("mLastAutoSystemClockTimeSendNetworkBroadcast=" - + mLastAutoSystemClockTimeSendNetworkBroadcast); - IndentingPrintWriter ipw = new IndentingPrintWriter(pw, " "); - - ipw.println("TimeDetectorStrategyImpl logs:"); + ipw.println("TimeDetectorStrategy:"); ipw.increaseIndent(); // level 1 + ipw.println("mLastPhoneSuggestion=" + mLastPhoneSuggestion); + ipw.println("mLastAutoSystemClockTimeSet=" + mLastAutoSystemClockTimeSet); + ipw.println("mLastAutoSystemClockTime=" + mLastAutoSystemClockTime); + ipw.println("mLastAutoSystemClockTimeSendNetworkBroadcast=" + + mLastAutoSystemClockTimeSendNetworkBroadcast); + + ipw.println("Time change log:"); ipw.increaseIndent(); // level 2 mTimeChangesLog.dump(ipw); ipw.decreaseIndent(); // level 2 ipw.decreaseIndent(); // level 1 + ipw.flush(); } @GuardedBy("this") diff --git a/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java b/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java index 32cee2de3d75..0a6c2e776072 100644 --- a/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java +++ b/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java @@ -39,6 +39,12 @@ public interface TimeDetectorStrategy { /** * The interface used by the strategy to interact with the surrounding service. + * + * <p>Note: Because the system properties-derived value {@link #isAutoTimeDetectionEnabled()} + * can be modified independently and from different threads (and processes!). its use is prone + * to race conditions. That will be true until the responsibility for setting their values is + * moved to {@link TimeDetectorStrategy}. There are similar issues with + * {@link #systemClockMillis()} while any process can modify the system clock. */ interface Callback { diff --git a/services/core/jni/com_android_server_VibratorService.cpp b/services/core/jni/com_android_server_VibratorService.cpp index 612a1e7074f9..dcff5a11aca0 100644 --- a/services/core/jni/com_android_server_VibratorService.cpp +++ b/services/core/jni/com_android_server_VibratorService.cpp @@ -338,7 +338,7 @@ static jlong vibratorPerformEffect(JNIEnv* env, jclass, jlong effect, jlong stre if (auto hal = getHal<aidl::IVibrator>()) { int32_t lengthMs; sp<AidlVibratorCallback> effectCallback = new AidlVibratorCallback(env, vibration); - aidl::Effect effectType(static_cast<aidl::Effect>(strength)); + aidl::Effect effectType(static_cast<aidl::Effect>(effect)); aidl::EffectStrength effectStrength(static_cast<aidl::EffectStrength>(strength)); auto status = hal->call(&aidl::IVibrator::perform, effectType, effectStrength, effectCallback, &lengthMs); diff --git a/services/core/xsd/platform-compat-config.xsd b/services/core/xsd/platform-compat-config.xsd index ee39e507aff1..a70568f5911a 100644 --- a/services/core/xsd/platform-compat-config.xsd +++ b/services/core/xsd/platform-compat-config.xsd @@ -28,6 +28,7 @@ <xs:attribute type="xs:string" name="name" use="required"/> <xs:attribute type="xs:boolean" name="disabled"/> <xs:attribute type="xs:int" name="enableAfterTargetSdk"/> + <xs:attribute type="xs:string" name="description"/> </xs:extension> </xs:simpleContent> </xs:complexType> diff --git a/services/core/xsd/platform-compat-schema/current.txt b/services/core/xsd/platform-compat-schema/current.txt index 84567851da2c..3a33f63361a5 100644 --- a/services/core/xsd/platform-compat-schema/current.txt +++ b/services/core/xsd/platform-compat-schema/current.txt @@ -3,11 +3,13 @@ package com.android.server.compat.config { public class Change { ctor public Change(); + method public String getDescription(); method public boolean getDisabled(); method public int getEnableAfterTargetSdk(); method public long getId(); method public String getName(); method public String getValue(); + method public void setDescription(String); method public void setDisabled(boolean); method public void setEnableAfterTargetSdk(int); method public void setId(long); diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index e8617bce920e..127b8e016d15 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -135,6 +135,8 @@ import android.app.admin.SystemUpdatePolicy; import android.app.backup.IBackupManager; import android.app.timedetector.ManualTimeSuggestion; import android.app.timedetector.TimeDetector; +import android.app.timezonedetector.ManualTimeZoneSuggestion; +import android.app.timezonedetector.TimeZoneDetector; import android.app.trust.TrustManager; import android.app.usage.UsageStatsManagerInternal; import android.content.ActivityNotFoundException; @@ -1956,6 +1958,10 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { return mContext.getSystemService(TimeDetector.class); } + TimeZoneDetector getTimeZoneDetector() { + return mContext.getSystemService(TimeZoneDetector.class); + } + ConnectivityManager getConnectivityManager() { return mContext.getSystemService(ConnectivityManager.class); } @@ -10880,8 +10886,11 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { if (mInjector.settingsGlobalGetInt(Global.AUTO_TIME_ZONE, 0) == 1) { return false; } + ManualTimeZoneSuggestion manualTimeZoneSuggestion = + TimeZoneDetector.createManualTimeZoneSuggestion( + timeZone, "DevicePolicyManagerService: setTimeZone"); mInjector.binderWithCleanCallingIdentity(() -> - mInjector.getAlarmManager().setTimeZone(timeZone)); + mInjector.getTimeZoneDetector().suggestManualTimeZone(manualTimeZoneSuggestion)); return true; } diff --git a/services/net/java/android/net/ip/IpClientCallbacks.java b/services/net/java/android/net/ip/IpClientCallbacks.java index db01ae4d4d9c..61cd88aac921 100644 --- a/services/net/java/android/net/ip/IpClientCallbacks.java +++ b/services/net/java/android/net/ip/IpClientCallbacks.java @@ -17,8 +17,11 @@ package android.net.ip; import android.net.DhcpResults; +import android.net.Layer2PacketParcelable; import android.net.LinkProperties; +import java.util.List; + /** * Callbacks for handling IpClient events. * @@ -116,4 +119,9 @@ public class IpClientCallbacks { * whenever 464xlat is being started or stopped. */ public void setNeighborDiscoveryOffload(boolean enable) {} + + /** + * Invoked on starting preconnection process. + */ + public void onPreconnectionStart(List<Layer2PacketParcelable> packets) {} } diff --git a/services/net/java/android/net/ip/IpClientManager.java b/services/net/java/android/net/ip/IpClientManager.java index 1e653cd29aed..4b7ed3c7b72f 100644 --- a/services/net/java/android/net/ip/IpClientManager.java +++ b/services/net/java/android/net/ip/IpClientManager.java @@ -234,7 +234,7 @@ public class IpClientManager { slot, KeepalivePacketDataUtil.toStableParcelable(pkt)); return true; } catch (RemoteException e) { - log("Error adding Keepalive Packet Filter ", e); + log("Error adding NAT-T Keepalive Packet Filter ", e); return false; } finally { Binder.restoreCallingIdentity(token); @@ -272,4 +272,22 @@ public class IpClientManager { Binder.restoreCallingIdentity(token); } } + + /** + * Notify IpClient that preconnection is complete and that the link is ready for use. + * The success parameter indicates whether the packets passed in by 'onPreconnectionStart' + * were successfully sent to the network or not. + */ + public boolean notifyPreconnectionComplete(boolean success) { + final long token = Binder.clearCallingIdentity(); + try { + mIpClient.notifyPreconnectionComplete(success); + return true; + } catch (RemoteException e) { + log("Error notifying IpClient Preconnection completed", e); + return false; + } finally { + Binder.restoreCallingIdentity(token); + } + } } diff --git a/services/net/java/android/net/ip/IpClientUtil.java b/services/net/java/android/net/ip/IpClientUtil.java index 714ade12435b..4d60e6239376 100644 --- a/services/net/java/android/net/ip/IpClientUtil.java +++ b/services/net/java/android/net/ip/IpClientUtil.java @@ -20,12 +20,14 @@ import static android.net.shared.IpConfigurationParcelableUtil.fromStableParcela import android.content.Context; import android.net.DhcpResultsParcelable; +import android.net.Layer2PacketParcelable; import android.net.LinkProperties; import android.net.NetworkStackClient; import android.os.ConditionVariable; import java.io.FileDescriptor; import java.io.PrintWriter; +import java.util.List; /** @@ -176,6 +178,12 @@ public class IpClientUtil { mCb.setNeighborDiscoveryOffload(enable); } + // Invoked on starting preconnection process. + @Override + public void onPreconnectionStart(List<Layer2PacketParcelable> packets) { + mCb.onPreconnectionStart(packets); + } + @Override public int getInterfaceVersion() { return this.VERSION; diff --git a/services/tests/servicestests/AndroidManifest.xml b/services/tests/servicestests/AndroidManifest.xml index 178ae2533664..61fe01f1ca6f 100644 --- a/services/tests/servicestests/AndroidManifest.xml +++ b/services/tests/servicestests/AndroidManifest.xml @@ -34,12 +34,13 @@ <uses-permission android:name="android.permission.REORDER_TASKS" /> <uses-permission android:name="android.permission.MANAGE_NETWORK_POLICY" /> <uses-permission android:name="android.permission.READ_NETWORK_USAGE_HISTORY" /> - <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" /> + <uses-permission android:name="android.permission.OBSERVE_NETWORK_POLICY" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.MANAGE_USERS" /> <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" /> <uses-permission android:name="android.permission.MANAGE_DEVICE_ADMINS" /> <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" /> + <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android:name="android.permission.PACKET_KEEPALIVE_OFFLOAD" /> diff --git a/services/tests/servicestests/src/com/android/server/compat/CompatConfigTest.java b/services/tests/servicestests/src/com/android/server/compat/CompatConfigTest.java index f8c87fcb4ef6..72679769be8e 100644 --- a/services/tests/servicestests/src/com/android/server/compat/CompatConfigTest.java +++ b/services/tests/servicestests/src/com/android/server/compat/CompatConfigTest.java @@ -73,36 +73,36 @@ public class CompatConfigTest { @Test public void testDisabledChangeDisabled() { CompatConfig pc = new CompatConfig(); - pc.addChange(new CompatChange(1234L, "MY_CHANGE", -1, true)); + pc.addChange(new CompatChange(1234L, "MY_CHANGE", -1, true, "")); assertThat(pc.isChangeEnabled(1234L, makeAppInfo("com.some.package", 1))).isFalse(); } @Test public void testTargetSdkChangeDisabled() { CompatConfig pc = new CompatConfig(); - pc.addChange(new CompatChange(1234L, "MY_CHANGE", 2, false)); + pc.addChange(new CompatChange(1234L, "MY_CHANGE", 2, false, null)); assertThat(pc.isChangeEnabled(1234L, makeAppInfo("com.some.package", 2))).isFalse(); } @Test public void testTargetSdkChangeEnabled() { CompatConfig pc = new CompatConfig(); - pc.addChange(new CompatChange(1234L, "MY_CHANGE", 2, false)); + pc.addChange(new CompatChange(1234L, "MY_CHANGE", 2, false, "")); assertThat(pc.isChangeEnabled(1234L, makeAppInfo("com.some.package", 3))).isTrue(); } @Test public void testDisabledOverrideTargetSdkChange() { CompatConfig pc = new CompatConfig(); - pc.addChange(new CompatChange(1234L, "MY_CHANGE", 2, true)); + pc.addChange(new CompatChange(1234L, "MY_CHANGE", 2, true, null)); assertThat(pc.isChangeEnabled(1234L, makeAppInfo("com.some.package", 3))).isFalse(); } @Test public void testGetDisabledChanges() { CompatConfig pc = new CompatConfig(); - pc.addChange(new CompatChange(1234L, "MY_CHANGE", -1, true)); - pc.addChange(new CompatChange(2345L, "OTHER_CHANGE", -1, false)); + pc.addChange(new CompatChange(1234L, "MY_CHANGE", -1, true, null)); + pc.addChange(new CompatChange(2345L, "OTHER_CHANGE", -1, false, null)); assertThat(pc.getDisabledChanges( makeAppInfo("com.some.package", 2))).asList().containsExactly(1234L); } @@ -110,9 +110,9 @@ public class CompatConfigTest { @Test public void testGetDisabledChangesSorted() { CompatConfig pc = new CompatConfig(); - pc.addChange(new CompatChange(1234L, "MY_CHANGE", 2, true)); - pc.addChange(new CompatChange(123L, "OTHER_CHANGE", 2, true)); - pc.addChange(new CompatChange(12L, "THIRD_CHANGE", 2, true)); + pc.addChange(new CompatChange(1234L, "MY_CHANGE", 2, true, null)); + pc.addChange(new CompatChange(123L, "OTHER_CHANGE", 2, true, null)); + pc.addChange(new CompatChange(12L, "THIRD_CHANGE", 2, true, null)); assertThat(pc.getDisabledChanges( makeAppInfo("com.some.package", 2))).asList().containsExactly(12L, 123L, 1234L); } @@ -120,7 +120,7 @@ public class CompatConfigTest { @Test public void testPackageOverrideEnabled() { CompatConfig pc = new CompatConfig(); - pc.addChange(new CompatChange(1234L, "MY_CHANGE", -1, true)); // disabled + pc.addChange(new CompatChange(1234L, "MY_CHANGE", -1, true, null)); // disabled pc.addOverride(1234L, "com.some.package", true); assertThat(pc.isChangeEnabled(1234L, makeAppInfo("com.some.package", 2))).isTrue(); assertThat(pc.isChangeEnabled(1234L, makeAppInfo("com.other.package", 2))).isFalse(); @@ -129,7 +129,7 @@ public class CompatConfigTest { @Test public void testPackageOverrideDisabled() { CompatConfig pc = new CompatConfig(); - pc.addChange(new CompatChange(1234L, "MY_CHANGE", -1, false)); + pc.addChange(new CompatChange(1234L, "MY_CHANGE", -1, false, null)); pc.addOverride(1234L, "com.some.package", false); assertThat(pc.isChangeEnabled(1234L, makeAppInfo("com.some.package", 2))).isFalse(); assertThat(pc.isChangeEnabled(1234L, makeAppInfo("com.other.package", 2))).isTrue(); @@ -152,7 +152,7 @@ public class CompatConfigTest { @Test public void testRemovePackageOverride() { CompatConfig pc = new CompatConfig(); - pc.addChange(new CompatChange(1234L, "MY_CHANGE", -1, false)); + pc.addChange(new CompatChange(1234L, "MY_CHANGE", -1, false, null)); pc.addOverride(1234L, "com.some.package", false); pc.removeOverride(1234L, "com.some.package"); assertThat(pc.isChangeEnabled(1234L, makeAppInfo("com.some.package", 2))).isTrue(); @@ -161,8 +161,8 @@ public class CompatConfigTest { @Test public void testLookupChangeId() { CompatConfig pc = new CompatConfig(); - pc.addChange(new CompatChange(1234L, "MY_CHANGE", -1, false)); - pc.addChange(new CompatChange(2345L, "ANOTHER_CHANGE", -1, false)); + pc.addChange(new CompatChange(1234L, "MY_CHANGE", -1, false, null)); + pc.addChange(new CompatChange(2345L, "ANOTHER_CHANGE", -1, false, null)); assertThat(pc.lookupChangeId("MY_CHANGE")).isEqualTo(1234L); } @@ -174,8 +174,9 @@ public class CompatConfigTest { @Test public void testReadConfig() { - Change[] changes = {new Change(1234L, "MY_CHANGE1", false, 2), new Change(1235L, - "MY_CHANGE2", true, null), new Change(1236L, "MY_CHANGE3", false, null)}; + Change[] changes = {new Change(1234L, "MY_CHANGE1", false, 2, null), new Change(1235L, + "MY_CHANGE2", true, null, "description"), new Change(1236L, "MY_CHANGE3", false, + null, "")}; File dir = createTempDir(); writeChangesToFile(changes, new File(dir.getPath() + "/platform_compat_config.xml")); @@ -191,9 +192,9 @@ public class CompatConfigTest { @Test public void testReadConfigMultipleFiles() { - Change[] changes1 = {new Change(1234L, "MY_CHANGE1", false, 2)}; - Change[] changes2 = {new Change(1235L, "MY_CHANGE2", true, null), new Change(1236L, - "MY_CHANGE3", false, null)}; + Change[] changes1 = {new Change(1234L, "MY_CHANGE1", false, 2, null)}; + Change[] changes2 = {new Change(1235L, "MY_CHANGE2", true, null, ""), new Change(1236L, + "MY_CHANGE3", false, null, null)}; File dir = createTempDir(); writeChangesToFile(changes1, 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 0fde850d3021..0763aa284b68 100644 --- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java +++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java @@ -23,6 +23,7 @@ import android.app.NotificationManager; import android.app.PendingIntent; import android.app.backup.IBackupManager; import android.app.timedetector.TimeDetector; +import android.app.timezonedetector.TimeZoneDetector; import android.app.usage.UsageStatsManagerInternal; import android.content.Context; import android.content.Intent; @@ -223,6 +224,11 @@ public class DevicePolicyManagerServiceTestable extends DevicePolicyManagerServi } @Override + TimeZoneDetector getTimeZoneDetector() { + return services.timeZoneDetector; + } + + @Override LockPatternUtils newLockPatternUtils() { return services.lockPatternUtils; } 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 b93b47ad74bd..7c0afedc63f0 100644 --- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java +++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java @@ -64,6 +64,8 @@ import android.app.admin.DevicePolicyManager; import android.app.admin.DevicePolicyManagerInternal; import android.app.admin.PasswordMetrics; import android.app.timedetector.ManualTimeSuggestion; +import android.app.timezonedetector.ManualTimeZoneSuggestion; +import android.app.timezonedetector.TimeZoneDetector; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Intent; @@ -3506,7 +3508,9 @@ public class DevicePolicyManagerTest extends DpmTestBase { mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID; setupDeviceOwner(); dpm.setTimeZone(admin1, "Asia/Shanghai"); - verify(getServices().alarmManager).setTimeZone("Asia/Shanghai"); + ManualTimeZoneSuggestion suggestion = + TimeZoneDetector.createManualTimeZoneSuggestion("Asia/Shanghai", "Test debug info"); + verify(getServices().timeZoneDetector).suggestManualTimeZone(suggestion); } public void testSetTimeZoneFailWithPO() throws Exception { 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 b208f828ee85..16d5db9b8b96 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.IActivityTaskManager; import android.app.NotificationManager; import android.app.backup.IBackupManager; import android.app.timedetector.TimeDetector; +import android.app.timezonedetector.TimeZoneDetector; import android.app.usage.UsageStatsManagerInternal; import android.content.BroadcastReceiver; import android.content.ContentValues; @@ -109,6 +110,7 @@ public class MockSystemServices { public final AccountManager accountManager; public final AlarmManager alarmManager; public final TimeDetector timeDetector; + public final TimeZoneDetector timeZoneDetector; public final KeyChain.KeyChainConnection keyChainConnection; /** Note this is a partial mock, not a real mock. */ public final PackageManager packageManager; @@ -149,6 +151,7 @@ public class MockSystemServices { accountManager = mock(AccountManager.class); alarmManager = mock(AlarmManager.class); timeDetector = mock(TimeDetector.class); + timeZoneDetector = mock(TimeZoneDetector.class); keyChainConnection = mock(KeyChain.KeyChainConnection.class, RETURNS_DEEP_STUBS); // Package manager is huge, so we use a partial mock instead. diff --git a/services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeDetectorStrategyTest.java b/services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeDetectorStrategyTest.java index 8a7edf746340..7a0a28dfbd16 100644 --- a/services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeDetectorStrategyTest.java +++ b/services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeDetectorStrategyTest.java @@ -640,9 +640,9 @@ public class SimpleTimeDetectorStrategyTest { private static PhoneTimeSuggestion createPhoneTimeSuggestion(int phoneId, TimestampedValue<Long> utcTime) { - PhoneTimeSuggestion timeSuggestion = new PhoneTimeSuggestion(phoneId); - timeSuggestion.setUtcTime(utcTime); - return timeSuggestion; + return new PhoneTimeSuggestion.Builder(phoneId) + .setUtcTime(utcTime) + .build(); } private ManualTimeSuggestion createManualTimeSuggestion(long timeMillis) { diff --git a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java index 9951e8597a8b..84b495f14c1f 100644 --- a/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java @@ -140,10 +140,10 @@ public class TimeDetectorServiceTest { private static PhoneTimeSuggestion createPhoneTimeSuggestion() { int phoneId = 1234; - PhoneTimeSuggestion suggestion = new PhoneTimeSuggestion(phoneId); TimestampedValue<Long> timeValue = new TimestampedValue<>(100L, 1_000_000L); - suggestion.setUtcTime(timeValue); - return suggestion; + return new PhoneTimeSuggestion.Builder(phoneId) + .setUtcTime(timeValue) + .build(); } private static ManualTimeSuggestion createManualTimeSuggestion() { diff --git a/services/tests/servicestests/test-apps/ConnTestApp/AndroidManifest.xml b/services/tests/servicestests/test-apps/ConnTestApp/AndroidManifest.xml index 909e9bb7bcd9..201cd05052ea 100644 --- a/services/tests/servicestests/test-apps/ConnTestApp/AndroidManifest.xml +++ b/services/tests/servicestests/test-apps/ConnTestApp/AndroidManifest.xml @@ -18,8 +18,7 @@ package="com.android.servicestests.apps.conntestapp"> <uses-permission android:name="android.permission.INTERNET" /> - <uses-permission android:name="android.permission.MANAGE_NETWORK_POLICY" /> - <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" /> + <uses-permission android:name="android.permission.OBSERVE_NETWORK_POLICY" /> <application> <activity android:name=".ConnTestActivity" diff --git a/services/usage/java/com/android/server/usage/AppStandbyController.java b/services/usage/java/com/android/server/usage/AppStandbyController.java index 75e8fb5a34fe..cb120fcb21d3 100644 --- a/services/usage/java/com/android/server/usage/AppStandbyController.java +++ b/services/usage/java/com/android/server/usage/AppStandbyController.java @@ -1356,7 +1356,8 @@ public class AppStandbyController { private void fetchCarrierPrivilegedAppsLocked() { TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class); - mCarrierPrivilegedApps = telephonyManager.getPackagesWithCarrierPrivilegesForAllPhones(); + mCarrierPrivilegedApps = + telephonyManager.getCarrierPrivilegedPackagesForAllActiveSubscriptions(); mHaveCarrierPrivilegedApps = true; if (DEBUG) { Slog.d(TAG, "apps with carrier privilege " + mCarrierPrivilegedApps); diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java index a0739c49fb76..86ad795b9ea2 100644 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -291,7 +291,6 @@ public final class Call { */ public static final int DIRECTION_OUTGOING = 1; - /** Call can currently be put on hold or unheld. */ public static final int CAPABILITY_HOLD = 0x00000001; @@ -571,6 +570,7 @@ public final class Call { private final Bundle mIntentExtras; private final long mCreationTimeMillis; private final @CallDirection int mCallDirection; + private final @Connection.VerificationStatus int mCallerNumberVerificationStatus; /** * Whether the supplied capabilities supports the specified capability. @@ -880,6 +880,15 @@ public final class Call { return mCallDirection; } + /** + * Gets the verification status for the phone number of an incoming call as identified in + * ATIS-1000082. + * @return the verification status. + */ + public @Connection.VerificationStatus int getCallerNumberVerificationStatus() { + return mCallerNumberVerificationStatus; + } + @Override public boolean equals(Object o) { if (o instanceof Details) { @@ -901,7 +910,9 @@ public final class Call { areBundlesEqual(mExtras, d.mExtras) && areBundlesEqual(mIntentExtras, d.mIntentExtras) && Objects.equals(mCreationTimeMillis, d.mCreationTimeMillis) && - Objects.equals(mCallDirection, d.mCallDirection); + Objects.equals(mCallDirection, d.mCallDirection) && + Objects.equals(mCallerNumberVerificationStatus, + d.mCallerNumberVerificationStatus); } return false; } @@ -923,7 +934,8 @@ public final class Call { mExtras, mIntentExtras, mCreationTimeMillis, - mCallDirection); + mCallDirection, + mCallerNumberVerificationStatus); } /** {@hide} */ @@ -944,7 +956,8 @@ public final class Call { Bundle extras, Bundle intentExtras, long creationTimeMillis, - int callDirection) { + int callDirection, + int callerNumberVerificationStatus) { mTelecomCallId = telecomCallId; mHandle = handle; mHandlePresentation = handlePresentation; @@ -962,6 +975,7 @@ public final class Call { mIntentExtras = intentExtras; mCreationTimeMillis = creationTimeMillis; mCallDirection = callDirection; + mCallerNumberVerificationStatus = callerNumberVerificationStatus; } /** {@hide} */ @@ -983,7 +997,8 @@ public final class Call { parcelableCall.getExtras(), parcelableCall.getIntentExtras(), parcelableCall.getCreationTimeMillis(), - parcelableCall.getCallDirection()); + parcelableCall.getCallDirection(), + parcelableCall.getCallerNumberVerificationStatus()); } @Override diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index 4c22ba9715b0..c06327995bc0 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -16,6 +16,7 @@ package android.telecom; +import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; @@ -35,9 +36,7 @@ import android.os.Message; import android.os.ParcelFileDescriptor; import android.os.RemoteException; import android.os.SystemClock; -import android.telephony.Annotation.RilRadioTechnology; -import android.telephony.ServiceState; -import android.telephony.TelephonyManager; +import android.telephony.ims.ImsStreamMediaProfile; import android.util.ArraySet; import android.view.Surface; @@ -50,6 +49,8 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; import java.nio.channels.Channels; import java.util.ArrayList; import java.util.Arrays; @@ -153,6 +154,32 @@ public abstract class Connection extends Conferenceable { public static final int STATE_PULLING_CALL = 7; /** + * Indicates that the network could not perform verification. + */ + public static final int VERIFICATION_STATUS_NOT_VERIFIED = 0; + + /** + * Indicates that verification by the network passed. This indicates there is a high likelihood + * that the call originated from a valid source. + */ + public static final int VERIFICATION_STATUS_PASSED = 1; + + /** + * Indicates that verification by the network failed. This indicates there is a high likelihood + * that the call did not originate from a valid source. + */ + public static final int VERIFICATION_STATUS_FAILED = 2; + + /**@hide*/ + @Retention(RetentionPolicy.SOURCE) + @IntDef(prefix = "VERIFICATION_STATUS_", value = { + VERIFICATION_STATUS_NOT_VERIFIED, + VERIFICATION_STATUS_PASSED, + VERIFICATION_STATUS_FAILED + }) + public @interface VerificationStatus {} + + /** * Connection can currently be put on hold or unheld. This is distinct from * {@link #CAPABILITY_SUPPORT_HOLD} in that although a connection may support 'hold' most times, * it does not at the moment support the function. This can be true while the call is in the @@ -475,6 +502,52 @@ public abstract class Connection extends Conferenceable { //********************************************************************************************** /** + * Define IMS Audio Codec + */ + // Current audio codec is NONE + public static final int AUDIO_CODEC_NONE = ImsStreamMediaProfile.AUDIO_QUALITY_NONE; // 0 + // Current audio codec is AMR + public static final int AUDIO_CODEC_AMR = ImsStreamMediaProfile.AUDIO_QUALITY_AMR; // 1 + // Current audio codec is AMR_WB + public static final int AUDIO_CODEC_AMR_WB = ImsStreamMediaProfile.AUDIO_QUALITY_AMR_WB; // 2 + // Current audio codec is QCELP13K + public static final int AUDIO_CODEC_QCELP13K = ImsStreamMediaProfile.AUDIO_QUALITY_QCELP13K; //3 + // Current audio codec is EVRC + public static final int AUDIO_CODEC_EVRC = ImsStreamMediaProfile.AUDIO_QUALITY_EVRC; // 4 + // Current audio codec is EVRC_B + public static final int AUDIO_CODEC_EVRC_B = ImsStreamMediaProfile.AUDIO_QUALITY_EVRC_B; // 5 + // Current audio codec is EVRC_WB + public static final int AUDIO_CODEC_EVRC_WB = ImsStreamMediaProfile.AUDIO_QUALITY_EVRC_WB; // 6 + // Current audio codec is EVRC_NW + public static final int AUDIO_CODEC_EVRC_NW = ImsStreamMediaProfile.AUDIO_QUALITY_EVRC_NW; // 7 + // Current audio codec is GSM_EFR + public static final int AUDIO_CODEC_GSM_EFR = ImsStreamMediaProfile.AUDIO_QUALITY_GSM_EFR; // 8 + // Current audio codec is GSM_FR + public static final int AUDIO_CODEC_GSM_FR = ImsStreamMediaProfile.AUDIO_QUALITY_GSM_FR; // 9 + // Current audio codec is GSM_HR + public static final int AUDIO_CODEC_GSM_HR = ImsStreamMediaProfile.AUDIO_QUALITY_GSM_HR; // 10 + // Current audio codec is G711U + public static final int AUDIO_CODEC_G711U = ImsStreamMediaProfile.AUDIO_QUALITY_G711U; // 11 + // Current audio codec is G723 + public static final int AUDIO_CODEC_G723 = ImsStreamMediaProfile.AUDIO_QUALITY_G723; // 12 + // Current audio codec is G711A + public static final int AUDIO_CODEC_G711A = ImsStreamMediaProfile.AUDIO_QUALITY_G711A; // 13 + // Current audio codec is G722 + public static final int AUDIO_CODEC_G722 = ImsStreamMediaProfile.AUDIO_QUALITY_G722; // 14 + // Current audio codec is G711AB + public static final int AUDIO_CODEC_G711AB = ImsStreamMediaProfile.AUDIO_QUALITY_G711AB; // 15 + // Current audio codec is G729 + public static final int AUDIO_CODEC_G729 = ImsStreamMediaProfile.AUDIO_QUALITY_G729; // 16 + // Current audio codec is EVS_NB + public static final int AUDIO_CODEC_EVS_NB = ImsStreamMediaProfile.AUDIO_QUALITY_EVS_NB; // 17 + // Current audio codec is EVS_WB + public static final int AUDIO_CODEC_EVS_WB = ImsStreamMediaProfile.AUDIO_QUALITY_EVS_WB; // 18 + // Current audio codec is EVS_SWB + public static final int AUDIO_CODEC_EVS_SWB = ImsStreamMediaProfile.AUDIO_QUALITY_EVS_SWB; // 19 + // Current audio codec is EVS_FB + public static final int AUDIO_CODEC_EVS_FB = ImsStreamMediaProfile.AUDIO_QUALITY_EVS_FB; // 20 + + /** * Connection extra key used to store the last forwarded number associated with the current * connection. Used to communicate to the user interface that the connection was forwarded via * the specified number. @@ -567,6 +640,13 @@ public abstract class Connection extends Conferenceable { "android.telecom.extra.IS_RTT_AUDIO_PRESENT"; /** + * The audio codec in use for the current {@link Connection}, if known. Valid values include + * {@link #AUDIO_CODEC_AMR_WB} and {@link #AUDIO_CODEC_EVS_WB}. + */ + public static final String EXTRA_AUDIO_CODEC = + "android.telecom.extra.AUDIO_CODEC"; + + /** * Connection event used to inform Telecom that it should play the on hold tone. This is used * to play a tone when the peer puts the current call on hold. Sent to Telecom via * {@link #sendConnectionEvent(String, Bundle)}. @@ -1803,6 +1883,12 @@ public abstract class Connection extends Conferenceable { private Set<String> mPreviousExtraKeys; /** + * The verification status for an incoming call's phone number. + */ + private @VerificationStatus int mCallerNumberVerificationStatus; + + + /** * Create a new Connection. */ public Connection() {} @@ -3304,4 +3390,26 @@ public abstract class Connection extends Conferenceable { public void setCallDirection(@Call.Details.CallDirection int callDirection) { mCallDirection = callDirection; } + + /** + * Gets the verification status for the phone number of an incoming call as identified in + * ATIS-1000082. + * @return the verification status. + */ + public @VerificationStatus int getCallerNumberVerificationStatus() { + return mCallerNumberVerificationStatus; + } + + /** + * Sets the verification status for the phone number of an incoming call as identified in + * ATIS-1000082. + * <p> + * This property can only be set at the time of creation of a {@link Connection} being returned + * by + * {@link ConnectionService#onCreateIncomingConnection(PhoneAccountHandle, ConnectionRequest)}. + */ + public void setCallerNumberVerificationStatus( + @VerificationStatus int callerNumberVerificationStatus) { + mCallerNumberVerificationStatus = callerNumberVerificationStatus; + } } diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index 812b805675e5..3a0494e17db9 100644 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -1621,7 +1621,8 @@ public abstract class ConnectionService extends Service { connection.getStatusHints(), connection.getDisconnectCause(), createIdList(connection.getConferenceables()), - connection.getExtras())); + connection.getExtras(), + connection.getCallerNumberVerificationStatus())); if (isIncoming && request.shouldShowIncomingCallUi() && isSelfManaged) { // Tell ConnectionService to show its incoming call UX. @@ -2156,7 +2157,8 @@ public abstract class ConnectionService extends Service { emptyList, connection.getExtras(), conferenceId, - connection.getCallDirection()); + connection.getCallDirection(), + Connection.VERIFICATION_STATUS_NOT_VERIFIED); mAdapter.addExistingConnection(id, parcelableConnection); } } diff --git a/telecomm/java/android/telecom/ParcelableCall.java b/telecomm/java/android/telecom/ParcelableCall.java index fdc324308d7a..a234bb0af8fa 100644 --- a/telecomm/java/android/telecom/ParcelableCall.java +++ b/telecomm/java/android/telecom/ParcelableCall.java @@ -16,7 +16,6 @@ package android.telecom; -import android.annotation.Nullable; import android.annotation.UnsupportedAppUsage; import android.net.Uri; import android.os.Build; @@ -66,6 +65,7 @@ public final class ParcelableCall implements Parcelable { private final Bundle mExtras; private final long mCreationTimeMillis; private final int mCallDirection; + private final int mCallerNumberVerificationStatus; public ParcelableCall( String id, @@ -94,7 +94,8 @@ public final class ParcelableCall implements Parcelable { Bundle intentExtras, Bundle extras, long creationTimeMillis, - int callDirection) { + int callDirection, + int callerNumberVerificationStatus) { mId = id; mState = state; mDisconnectCause = disconnectCause; @@ -122,6 +123,7 @@ public final class ParcelableCall implements Parcelable { mExtras = extras; mCreationTimeMillis = creationTimeMillis; mCallDirection = callDirection; + mCallerNumberVerificationStatus = callerNumberVerificationStatus; } /** The unique ID of the call. */ @@ -322,6 +324,15 @@ public final class ParcelableCall implements Parcelable { return mCallDirection; } + /** + * Gets the verification status for the phone number of an incoming call as identified in + * ATIS-1000082. + * @return the verification status. + */ + public @Connection.VerificationStatus int getCallerNumberVerificationStatus() { + return mCallerNumberVerificationStatus; + } + /** Responsible for creating ParcelableCall objects for deserialized Parcels. */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public static final @android.annotation.NonNull Parcelable.Creator<ParcelableCall> CREATOR = @@ -360,6 +371,7 @@ public final class ParcelableCall implements Parcelable { ParcelableRttCall rttCall = source.readParcelable(classLoader); long creationTimeMillis = source.readLong(); int callDirection = source.readInt(); + int callerNumberVerificationStatus = source.readInt(); return new ParcelableCall( id, state, @@ -387,7 +399,8 @@ public final class ParcelableCall implements Parcelable { intentExtras, extras, creationTimeMillis, - callDirection); + callDirection, + callerNumberVerificationStatus); } @Override @@ -433,6 +446,7 @@ public final class ParcelableCall implements Parcelable { destination.writeParcelable(mRttCall, 0); destination.writeLong(mCreationTimeMillis); destination.writeInt(mCallDirection); + destination.writeInt(mCallerNumberVerificationStatus); } @Override diff --git a/telecomm/java/android/telecom/ParcelableConnection.java b/telecomm/java/android/telecom/ParcelableConnection.java index 4734af6371d4..2b9ce9b46ad7 100644 --- a/telecomm/java/android/telecom/ParcelableConnection.java +++ b/telecomm/java/android/telecom/ParcelableConnection.java @@ -54,6 +54,7 @@ public final class ParcelableConnection implements Parcelable { private final Bundle mExtras; private String mParentCallId; private @Call.Details.CallDirection int mCallDirection; + private @Connection.VerificationStatus int mCallerNumberVerificationStatus; /** @hide */ public ParcelableConnection( @@ -77,12 +78,13 @@ public final class ParcelableConnection implements Parcelable { List<String> conferenceableConnectionIds, Bundle extras, String parentCallId, - @Call.Details.CallDirection int callDirection) { + @Call.Details.CallDirection int callDirection, + @Connection.VerificationStatus int callerNumberVerificationStatus) { this(phoneAccount, state, capabilities, properties, supportedAudioRoutes, address, addressPresentation, callerDisplayName, callerDisplayNamePresentation, videoProvider, videoState, ringbackRequested, isVoipAudioMode, connectTimeMillis, connectElapsedTimeMillis, statusHints, disconnectCause, conferenceableConnectionIds, - extras); + extras, callerNumberVerificationStatus); mParentCallId = parentCallId; mCallDirection = callDirection; } @@ -107,7 +109,8 @@ public final class ParcelableConnection implements Parcelable { StatusHints statusHints, DisconnectCause disconnectCause, List<String> conferenceableConnectionIds, - Bundle extras) { + Bundle extras, + @Connection.VerificationStatus int callerNumberVerificationStatus) { mPhoneAccount = phoneAccount; mState = state; mConnectionCapabilities = capabilities; @@ -129,6 +132,7 @@ public final class ParcelableConnection implements Parcelable { mExtras = extras; mParentCallId = null; mCallDirection = Call.Details.DIRECTION_UNKNOWN; + mCallerNumberVerificationStatus = callerNumberVerificationStatus; } public PhoneAccountHandle getPhoneAccount() { @@ -227,6 +231,10 @@ public final class ParcelableConnection implements Parcelable { return mCallDirection; } + public @Connection.VerificationStatus int getCallerNumberVerificationStatus() { + return mCallerNumberVerificationStatus; + } + @Override public String toString() { return new StringBuilder() @@ -276,6 +284,7 @@ public final class ParcelableConnection implements Parcelable { String parentCallId = source.readString(); long connectElapsedTimeMillis = source.readLong(); int callDirection = source.readInt(); + int callerNumberVerificationStatus = source.readInt(); return new ParcelableConnection( phoneAccount, @@ -298,7 +307,8 @@ public final class ParcelableConnection implements Parcelable { conferenceableConnectionIds, extras, parentCallId, - callDirection); + callDirection, + callerNumberVerificationStatus); } @Override @@ -338,5 +348,6 @@ public final class ParcelableConnection implements Parcelable { destination.writeString(mParentCallId); destination.writeLong(mConnectElapsedTimeMillis); destination.writeInt(mCallDirection); + destination.writeInt(mCallerNumberVerificationStatus); } } diff --git a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl index 33fdb9c5146e..cedc4b9c036f 100644 --- a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl +++ b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl @@ -309,8 +309,6 @@ interface ITelecomService { void addOrRemoveTestCallCompanionApp(String packageName, boolean isAdded); - void setTestAutoModeApp(String packageName); - /** * @see TelecomServiceImpl#setSystemDialer */ diff --git a/telephony/java/com/android/internal/telephony/TelephonyPermissions.java b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java index 8a852eea5610..606fd5b89791 100644 --- a/telephony/java/com/android/internal/telephony/TelephonyPermissions.java +++ b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java @@ -150,6 +150,27 @@ public final class TelephonyPermissions { return false; } + /** + * Check whether the app with the given pid/uid can read phone state. + * + * <p>This method behaves in one of the following ways: + * <ul> + * <li>return true: if the caller has the READ_PRIVILEGED_PHONE_STATE permission, the + * READ_PHONE_STATE runtime permission, or carrier privileges on the given subId. + * <li>throw SecurityException: if the caller didn't declare any of these permissions, or, for + * apps which support runtime permissions, if the caller does not currently have any of + * these permissions. + * <li>return false: if the caller lacks all of these permissions and doesn't support runtime + * permissions. This implies that the user revoked the ability to read phone state + * manually (via AppOps). In this case we can't throw as it would break app compatibility, + * so we return false to indicate that the calling function should return dummy data. + * </ul> + * + * <p>Note: for simplicity, this method always returns false for callers using legacy + * permissions and who have had READ_PHONE_STATE revoked, even if they are carrier-privileged. + * Such apps should migrate to runtime permissions or stop requiring READ_PHONE_STATE on P+ + * devices. + */ @VisibleForTesting public static boolean checkReadPhoneState( Context context, Supplier<ITelephony> telephonySupplier, int subId, int pid, int uid, @@ -202,6 +223,20 @@ public final class TelephonyPermissions { callingPackage, message); } + /** + * Check whether the app with the given pid/uid can read phone state, or has carrier + * privileges on any active subscription. + * + * <p>If the app does not have carrier privilege, this method will return {@code false} instead + * of throwing a SecurityException. Therefore, the callers cannot tell the difference + * between M+ apps which declare the runtime permission but do not have it, and pre-M apps + * which declare the static permission but had access revoked via AppOps. Apps in the former + * category expect SecurityExceptions; apps in the latter don't. So this method is suitable for + * use only if the behavior in both scenarios is meant to be identical. + * + * @return {@code true} if the app can read phone state or has carrier privilege; + * {@code false} otherwise. + */ @VisibleForTesting public static boolean checkReadPhoneStateOnAnyActiveSub( Context context, Supplier<ITelephony> telephonySupplier, int pid, int uid, @@ -449,6 +484,11 @@ public final class TelephonyPermissions { context, TELEPHONY_SUPPLIER, subId, pid, uid, callingPackage); } + /** + * Check whether the app with the given pid/uid can read the call log. + * @return {@code true} if the specified app has the read call log permission and AppOpp granted + * to it, {@code false} otherwise. + */ @VisibleForTesting public static boolean checkReadCallLog( Context context, Supplier<ITelephony> telephonySupplier, int subId, int pid, int uid, @@ -485,6 +525,12 @@ public final class TelephonyPermissions { callingPackage, message); } + /** + * Returns whether the caller can read phone numbers. + * + * <p>Besides apps with the ability to read phone state per {@link #checkReadPhoneState}, the + * default SMS app and apps with READ_SMS or READ_PHONE_NUMBERS can also read phone numbers. + */ @VisibleForTesting public static boolean checkReadPhoneNumber( Context context, Supplier<ITelephony> telephonySupplier, int subId, int pid, int uid, @@ -523,10 +569,10 @@ public final class TelephonyPermissions { } catch (SecurityException readPhoneNumberSecurityException) { } - throw new SecurityException(message + ": Neither user " + uid + - " nor current process has " + android.Manifest.permission.READ_PHONE_STATE + - ", " + android.Manifest.permission.READ_SMS + ", or " + - android.Manifest.permission.READ_PHONE_NUMBERS); + throw new SecurityException(message + ": Neither user " + uid + + " nor current process has " + android.Manifest.permission.READ_PHONE_STATE + + ", " + android.Manifest.permission.READ_SMS + ", or " + + android.Manifest.permission.READ_PHONE_NUMBERS); } /** @@ -537,8 +583,8 @@ public final class TelephonyPermissions { */ public static void enforceCallingOrSelfModifyPermissionOrCarrierPrivilege( Context context, int subId, String message) { - if (context.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE) == - PERMISSION_GRANTED) { + if (context.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE) + == PERMISSION_GRANTED) { return; } @@ -580,8 +626,8 @@ public final class TelephonyPermissions { } if (DBG) { - Rlog.d(LOG_TAG, "No READ_PRIVILEDED_PHONE_STATE permission, " + - "check carrier privilege next."); + Rlog.d(LOG_TAG, "No READ_PRIVILEDED_PHONE_STATE permission, " + + "check carrier privilege next."); } enforceCallingOrSelfCarrierPrivilege(subId, message); @@ -606,8 +652,8 @@ public final class TelephonyPermissions { private static void enforceCarrierPrivilege( Supplier<ITelephony> telephonySupplier, int subId, int uid, String message) { - if (getCarrierPrivilegeStatus(telephonySupplier, subId, uid) != - TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS) { + if (getCarrierPrivilegeStatus(telephonySupplier, subId, uid) + != TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS) { if (DBG) Rlog.e(LOG_TAG, "No Carrier Privilege."); throw new SecurityException(message); } diff --git a/telephony/java/android/telephony/AccessNetworkConstants.java b/telephony/java/android/telephony/AccessNetworkConstants.java index a0aa60b74ba0..bb28df2b64eb 100644 --- a/telephony/java/android/telephony/AccessNetworkConstants.java +++ b/telephony/java/android/telephony/AccessNetworkConstants.java @@ -80,6 +80,7 @@ public final class AccessNetworkConstants { public static final int EUTRAN = 3; public static final int CDMA2000 = 4; public static final int IWLAN = 5; + public static final int NGRAN = 6; /** @hide */ private AccessNetworkType() {} @@ -93,6 +94,7 @@ public final class AccessNetworkConstants { case EUTRAN: return "EUTRAN"; case CDMA2000: return "CDMA2000"; case IWLAN: return "IWLAN"; + case NGRAN: return "NGRAN"; default: return Integer.toString(type); } } @@ -247,6 +249,61 @@ public final class AccessNetworkConstants { private CdmaBands() {}; } + /** + * Frequency bands for NGRAN + */ + public static final class NgranBands { + /** FR1 bands */ + public static final int BAND_1 = 1; + public static final int BAND_2 = 2; + public static final int BAND_3 = 3; + public static final int BAND_5 = 5; + public static final int BAND_7 = 7; + public static final int BAND_8 = 8; + public static final int BAND_12 = 12; + public static final int BAND_14 = 14; + public static final int BAND_18 = 18; + public static final int BAND_20 = 20; + public static final int BAND_25 = 25; + public static final int BAND_28 = 28; + public static final int BAND_29 = 29; + public static final int BAND_30 = 30; + public static final int BAND_34 = 34; + public static final int BAND_38 = 38; + public static final int BAND_39 = 39; + public static final int BAND_40 = 40; + public static final int BAND_41 = 41; + public static final int BAND_48 = 48; + public static final int BAND_50 = 50; + public static final int BAND_51 = 51; + public static final int BAND_65 = 65; + public static final int BAND_66 = 66; + public static final int BAND_70 = 70; + public static final int BAND_71 = 71; + public static final int BAND_74 = 74; + public static final int BAND_75 = 75; + public static final int BAND_76 = 76; + public static final int BAND_77 = 77; + public static final int BAND_78 = 78; + public static final int BAND_79 = 79; + public static final int BAND_80 = 80; + public static final int BAND_81 = 81; + public static final int BAND_82 = 82; + public static final int BAND_83 = 83; + public static final int BAND_84 = 84; + public static final int BAND_86 = 86; + public static final int BAND_90 = 90; + + /** FR2 bands */ + public static final int BAND_257 = 257; + public static final int BAND_258 = 258; + public static final int BAND_260 = 260; + public static final int BAND_261 = 261; + + /** @hide */ + private NgranBands() {}; + } + /** @hide */ private AccessNetworkConstants() {}; } diff --git a/telephony/java/android/telephony/Annotation.java b/telephony/java/android/telephony/Annotation.java index 72f758eba39a..f89bbc7d179a 100644 --- a/telephony/java/android/telephony/Annotation.java +++ b/telephony/java/android/telephony/Annotation.java @@ -1,6 +1,7 @@ package android.telephony; import android.annotation.IntDef; +import android.telecom.Connection; import android.telephony.data.ApnSetting; import java.lang.annotation.Retention; @@ -509,4 +510,30 @@ public class Annotation { ServiceState.RIL_RADIO_TECHNOLOGY_LTE_CA, ServiceState.RIL_RADIO_TECHNOLOGY_NR}) public @interface RilRadioTechnology {} + + @IntDef({ + Connection.AUDIO_CODEC_NONE, + Connection.AUDIO_CODEC_AMR, + Connection.AUDIO_CODEC_AMR_WB, + Connection.AUDIO_CODEC_QCELP13K, + Connection.AUDIO_CODEC_EVRC, + Connection.AUDIO_CODEC_EVRC_B, + Connection.AUDIO_CODEC_EVRC_WB, + Connection.AUDIO_CODEC_EVRC_NW, + Connection.AUDIO_CODEC_GSM_EFR, + Connection.AUDIO_CODEC_GSM_FR, + Connection.AUDIO_CODEC_G711U, + Connection.AUDIO_CODEC_G723, + Connection.AUDIO_CODEC_G711A, + Connection.AUDIO_CODEC_G722, + Connection.AUDIO_CODEC_G711AB, + Connection.AUDIO_CODEC_G729, + Connection.AUDIO_CODEC_EVS_NB, + Connection.AUDIO_CODEC_EVS_WB, + Connection.AUDIO_CODEC_EVS_SWB, + Connection.AUDIO_CODEC_EVS_FB + }) + @Retention(RetentionPolicy.SOURCE) + public @interface ImsAudioCodec { + } } diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 78ba5b0fe8e6..92c6e938d727 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -1049,6 +1049,9 @@ public class CarrierConfigManager { * * When {@code false}, the old behavior is used, where the toggle in accessibility settings is * used to set the IMS stack's RTT enabled state. + * + * @deprecated -- this flag no longer does anything. Remove once the new behavior is verified. + * * @hide */ public static final String KEY_IGNORE_RTT_MODE_SETTING_BOOL = @@ -3478,7 +3481,7 @@ public class CarrierConfigManager { sDefaults.putInt(KEY_IMS_DTMF_TONE_DELAY_INT, 0); sDefaults.putInt(KEY_CDMA_DTMF_TONE_DELAY_INT, 100); sDefaults.putBoolean(KEY_CALL_FORWARDING_MAP_NON_NUMBER_TO_VOICEMAIL_BOOL, false); - sDefaults.putBoolean(KEY_IGNORE_RTT_MODE_SETTING_BOOL, false); + sDefaults.putBoolean(KEY_IGNORE_RTT_MODE_SETTING_BOOL, true); sDefaults.putInt(KEY_CDMA_3WAYCALL_FLASH_DELAY_INT , 0); sDefaults.putBoolean(KEY_SUPPORT_CONFERENCE_CALL_BOOL, true); sDefaults.putBoolean(KEY_SUPPORT_IMS_CONFERENCE_CALL_BOOL, true); diff --git a/telephony/java/android/telephony/CellSignalStrength.java b/telephony/java/android/telephony/CellSignalStrength.java index e65b048ec0a5..cb8fdf0141b8 100644 --- a/telephony/java/android/telephony/CellSignalStrength.java +++ b/telephony/java/android/telephony/CellSignalStrength.java @@ -46,11 +46,6 @@ public abstract class CellSignalStrength { protected static final int NUM_SIGNAL_STRENGTH_THRESHOLDS = NUM_SIGNAL_STRENGTH_BINS - 1; /** @hide */ - public static final String[] SIGNAL_STRENGTH_NAMES = { - "none", "poor", "moderate", "good", "great" - }; - - /** @hide */ protected CellSignalStrength() { } @@ -157,4 +152,12 @@ public abstract class CellSignalStrength { if ((value < rangeMin || value > rangeMax) && value != special) return CellInfo.UNAVAILABLE; return value; } + + /** + * Returns the number of signal strength levels. + * @return Number of signal strength levels, enforced to be 5 + */ + public static final int getNumSignalStrengthLevels() { + return NUM_SIGNAL_STRENGTH_BINS; + } } diff --git a/telephony/java/android/telephony/RadioAccessSpecifier.java b/telephony/java/android/telephony/RadioAccessSpecifier.java index 690e44a52647..a403095eeceb 100644 --- a/telephony/java/android/telephony/RadioAccessSpecifier.java +++ b/telephony/java/android/telephony/RadioAccessSpecifier.java @@ -97,8 +97,9 @@ public final class RadioAccessSpecifier implements Parcelable { * Returns the frequency bands that need to be scanned. * * The returned value is defined in either of {@link AccessNetworkConstants.GeranBand}, - * {@link AccessNetworkConstants.UtranBand} and {@link AccessNetworkConstants.EutranBand}, and - * it depends on the returned value of {@link #getRadioAccessNetwork()}. + * {@link AccessNetworkConstants.UtranBand}, {@link AccessNetworkConstants.EutranBand}, + * and {@link AccessNetworkConstants.NgranBands}, and it depends on + * the returned value of {@link #getRadioAccessNetwork()}. */ public int[] getBands() { return mBands == null ? null : mBands.clone(); diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java index 480c9d9450f4..9aafc1be5831 100644 --- a/telephony/java/android/telephony/SignalStrength.java +++ b/telephony/java/android/telephony/SignalStrength.java @@ -60,12 +60,6 @@ public class SignalStrength implements Parcelable { @UnsupportedAppUsage public static final int NUM_SIGNAL_STRENGTH_BINS = 5; - /** SIGNAL_STRENGTH_NAMES is currently used by BatteryStats, but to-be-removed soon. */ - /** @hide */ - public static final String[] SIGNAL_STRENGTH_NAMES = { - "none", "poor", "moderate", "good", "great" - }; - /** * Indicates the invalid measures of signal strength. * diff --git a/telephony/java/android/telephony/SmsCbMessage.java b/telephony/java/android/telephony/SmsCbMessage.java index 737ead1f8131..c7f952954d5f 100644 --- a/telephony/java/android/telephony/SmsCbMessage.java +++ b/telephony/java/android/telephony/SmsCbMessage.java @@ -29,6 +29,7 @@ import android.telephony.CbGeoUtils.Geometry; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.util.ArrayList; import java.util.List; /** @@ -205,7 +206,9 @@ public final class SmsCbMessage implements Parcelable { /** CMAS warning area coordinates. */ private final List<Geometry> mGeometries; - private int mSlotIndex = 0; + private final int mSlotIndex; + + private final int mSubId; /** * Create a new SmsCbMessage with the specified data. @@ -214,11 +217,11 @@ public final class SmsCbMessage implements Parcelable { public SmsCbMessage(int messageFormat, int geographicalScope, int serialNumber, @NonNull SmsCbLocation location, int serviceCategory, @Nullable String language, @Nullable String body, int priority, @Nullable SmsCbEtwsInfo etwsWarningInfo, - @Nullable SmsCbCmasInfo cmasWarningInfo, int slotIndex) { + @Nullable SmsCbCmasInfo cmasWarningInfo, int slotIndex, int subId) { this(messageFormat, geographicalScope, serialNumber, location, serviceCategory, language, body, priority, etwsWarningInfo, cmasWarningInfo, 0 /* maximumWaitingTime */, - null /* geometries */, System.currentTimeMillis(), slotIndex); + null /* geometries */, System.currentTimeMillis(), slotIndex, subId); } /** @@ -226,10 +229,12 @@ public final class SmsCbMessage implements Parcelable { * coordinates information. */ public SmsCbMessage(int messageFormat, int geographicalScope, int serialNumber, - @NonNull SmsCbLocation location, int serviceCategory, @Nullable String language, - @Nullable String body, int priority, @Nullable SmsCbEtwsInfo etwsWarningInfo, - @Nullable SmsCbCmasInfo cmasWarningInfo, int maximumWaitTimeSec, - @Nullable List<Geometry> geometries, long receivedTimeMillis, int slotIndex) { + @NonNull SmsCbLocation location, int serviceCategory, + @Nullable String language, @Nullable String body, int priority, + @Nullable SmsCbEtwsInfo etwsWarningInfo, + @Nullable SmsCbCmasInfo cmasWarningInfo, int maximumWaitTimeSec, + @Nullable List<Geometry> geometries, long receivedTimeMillis, int slotIndex, + int subId) { mMessageFormat = messageFormat; mGeographicalScope = geographicalScope; mSerialNumber = serialNumber; @@ -244,6 +249,7 @@ public final class SmsCbMessage implements Parcelable { mGeometries = geometries; mMaximumWaitTimeSec = maximumWaitTimeSec; mSlotIndex = slotIndex; + mSubId = subId; } /** @@ -282,6 +288,7 @@ public final class SmsCbMessage implements Parcelable { mGeometries = geoStr != null ? CbGeoUtils.parseGeometriesFromString(geoStr) : null; mMaximumWaitTimeSec = in.readInt(); mSlotIndex = in.readInt(); + mSubId = in.readInt(); } /** @@ -317,6 +324,7 @@ public final class SmsCbMessage implements Parcelable { mGeometries != null ? CbGeoUtils.encodeGeometriesToString(mGeometries) : null); dest.writeInt(mMaximumWaitTimeSec); dest.writeInt(mSlotIndex); + dest.writeInt(mSubId); } @NonNull @@ -400,13 +408,17 @@ public final class SmsCbMessage implements Parcelable { } /** - * Get the warning area coordinates information represent by polygons and circles. - * @return a list of geometries, {@link Nullable} means there is no coordinate information - * associated to this message. + * Get the warning area coordinates information represented by polygons and circles. + * @return a list of geometries, or an empty list if there is no coordinate information + * associated with this message. * @hide */ - @Nullable + @SystemApi + @NonNull public List<Geometry> getGeometries() { + if (mGeometries == null) { + return new ArrayList<>(); + } return mGeometries; } @@ -427,14 +439,22 @@ public final class SmsCbMessage implements Parcelable { } /** - * Get the slotIndex associated with this message. - * @return the slotIndex associated with this message + * Get the slot index associated with this message. + * @return the slot index associated with this message */ public int getSlotIndex() { return mSlotIndex; } /** + * Get the subscription id associated with this message. + * @return the subscription id associated with this message + */ + public int getSubscriptionId() { + return mSubId; + } + + /** * Get the message format ({@link #MESSAGE_FORMAT_3GPP} or {@link #MESSAGE_FORMAT_3GPP2}). * @return an integer representing 3GPP or 3GPP2 message format */ @@ -536,6 +556,7 @@ public final class SmsCbMessage implements Parcelable { public ContentValues getContentValues() { ContentValues cv = new ContentValues(16); cv.put(CellBroadcasts.SLOT_INDEX, mSlotIndex); + cv.put(CellBroadcasts.SUB_ID, mSubId); cv.put(CellBroadcasts.GEOGRAPHICAL_SCOPE, mGeographicalScope); if (mLocation.getPlmn() != null) { cv.put(CellBroadcasts.PLMN, mLocation.getPlmn()); @@ -577,7 +598,6 @@ public final class SmsCbMessage implements Parcelable { } cv.put(CellBroadcasts.MAXIMUM_WAIT_TIME, mMaximumWaitTimeSec); - cv.put(CellBroadcasts.SLOT_INDEX, mSlotIndex); return cv; } @@ -600,6 +620,7 @@ public final class SmsCbMessage implements Parcelable { int format = cursor.getInt(cursor.getColumnIndexOrThrow(CellBroadcasts.MESSAGE_FORMAT)); int priority = cursor.getInt(cursor.getColumnIndexOrThrow(CellBroadcasts.MESSAGE_PRIORITY)); int slotIndex = cursor.getInt(cursor.getColumnIndexOrThrow(CellBroadcasts.SLOT_INDEX)); + int subId = cursor.getInt(cursor.getColumnIndexOrThrow(CellBroadcasts.SUB_ID)); String plmn; int plmnColumn = cursor.getColumnIndex(CellBroadcasts.PLMN); @@ -697,13 +718,13 @@ public final class SmsCbMessage implements Parcelable { return new SmsCbMessage(format, geoScope, serialNum, location, category, language, body, priority, etwsInfo, cmasInfo, maximumWaitTimeSec, geometries, - receivedTimeMillis, slotIndex); + receivedTimeMillis, slotIndex, subId); } /** * @return {@code True} if this message needs geo-fencing check. */ public boolean needGeoFencingCheck() { - return mMaximumWaitTimeSec > 0 && mGeometries != null; + return mMaximumWaitTimeSec > 0 && mGeometries != null && !mGeometries.isEmpty(); } } diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java index 999c5cac08c8..fbbc9518065d 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java @@ -3104,7 +3104,11 @@ public class SubscriptionManager { } /** - * Enables or disables a subscription. This is currently used in the settings page. + * Enables or disables a subscription. This is currently used in the settings page. It will + * fail and return false if operation is not supported or failed. + * + * To disable an active subscription on a physical (non-Euicc) SIM, + * {@link #canDisablePhysicalSubscription} needs to be true. * * <p> * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required @@ -3136,6 +3140,38 @@ public class SubscriptionManager { } /** + * Whether it's supported to disable / re-enable a subscription on a physical (non-euicc) SIM. + * + * Physical SIM refers non-euicc, or aka non-programmable SIM. + * + * It provides whether a physical SIM card can be disabled without taking it out, which is done + * via {@link #setSubscriptionEnabled(int, boolean)} API. + * + * Requires Permission: READ_PRIVILEGED_PHONE_STATE. + * + * @return whether can disable subscriptions on physical SIMs. + * + * @hide + */ + @SystemApi + @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) + public boolean canDisablePhysicalSubscription() { + if (VDBG) { + logd("canDisablePhysicalSubscription"); + } + try { + ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); + if (iSub != null) { + return iSub.canDisablePhysicalSubscription(); + } + } catch (RemoteException ex) { + // ignore it + } + + return false; + } + + /** * DO NOT USE. * This API is designed for features that are not finished at this point. Do not call this API. * @hide diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 9f15bb7b2703..f1abe04cdafa 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -4583,17 +4583,6 @@ public class TelephonyManager { } /** - * Sim activation type: voice - * @hide - */ - public static final int SIM_ACTIVATION_TYPE_VOICE = 0; - /** - * Sim activation type: data - * @hide - */ - public static final int SIM_ACTIVATION_TYPE_DATA = 1; - - /** * Initial SIM activation state, unknown. Not set by any carrier apps. * @hide */ @@ -8019,17 +8008,25 @@ public class TelephonyManager { return Collections.EMPTY_LIST; } - /** @hide */ - public List<String> getPackagesWithCarrierPrivilegesForAllPhones() { + /** + * Get the names of packages with carrier privileges for all the active subscriptions. + * + * @hide + */ + @SystemApi + @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) + @NonNull + public List<String> getCarrierPrivilegedPackagesForAllActiveSubscriptions() { try { ITelephony telephony = getITelephony(); if (telephony != null) { return telephony.getPackagesWithCarrierPrivilegesForAllPhones(); } } catch (RemoteException ex) { - Rlog.e(TAG, "getPackagesWithCarrierPrivilegesForAllPhones RemoteException", ex); + Rlog.e(TAG, "getCarrierPrivilegedPackagesForAllActiveSubscriptions RemoteException", + ex); } catch (NullPointerException ex) { - Rlog.e(TAG, "getPackagesWithCarrierPrivilegesForAllPhones NPE", ex); + Rlog.e(TAG, "getCarrierPrivilegedPackagesForAllActiveSubscriptions NPE", ex); } return Collections.EMPTY_LIST; } diff --git a/telephony/java/com/android/internal/telephony/ISub.aidl b/telephony/java/com/android/internal/telephony/ISub.aidl index 7cc37d0d2b15..92aab4b12330 100755 --- a/telephony/java/com/android/internal/telephony/ISub.aidl +++ b/telephony/java/com/android/internal/telephony/ISub.aidl @@ -283,4 +283,6 @@ interface ISub { boolean setAlwaysAllowMmsData(int subId, boolean alwaysAllow); int getActiveDataSubscriptionId(); + + boolean canDisablePhysicalSubscription(); } diff --git a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java index b357fa43008f..8b95617e82c8 100644 --- a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java +++ b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java @@ -878,9 +878,10 @@ public class SmsMessage extends SmsMessageBase { * Parses a broadcast SMS, possibly containing a CMAS alert. * * @param plmn the PLMN for a broadcast SMS - * @param subId + * @param slotIndex SIM slot index + * @param subId Subscription id */ - public SmsCbMessage parseBroadcastSms(String plmn, int subId) { + public SmsCbMessage parseBroadcastSms(String plmn, int slotIndex, int subId) { BearerData bData = BearerData.decode(mEnvelope.bearerData, mEnvelope.serviceCategory); if (bData == null) { Rlog.w(LOG_TAG, "BearerData.decode() returned null"); @@ -896,7 +897,7 @@ public class SmsMessage extends SmsMessageBase { return new SmsCbMessage(SmsCbMessage.MESSAGE_FORMAT_3GPP2, SmsCbMessage.GEOGRAPHICAL_SCOPE_PLMN_WIDE, bData.messageId, location, mEnvelope.serviceCategory, bData.getLanguage(), bData.userData.payloadStr, - bData.priority, null, bData.cmasWarningInfo, subId); + bData.priority, null, bData.cmasWarningInfo, slotIndex, subId); } /** diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmSmsCbMessage.java b/telephony/java/com/android/internal/telephony/gsm/GsmSmsCbMessage.java index 5766287d6691..bdd1fab34a3c 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmSmsCbMessage.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmSmsCbMessage.java @@ -32,6 +32,7 @@ import android.telephony.CbGeoUtils.LatLng; import android.telephony.CbGeoUtils.Polygon; import android.telephony.SmsCbLocation; import android.telephony.SmsCbMessage; +import android.telephony.SubscriptionManager; import android.util.Pair; import android.util.Slog; @@ -95,6 +96,14 @@ public class GsmSmsCbMessage { public static SmsCbMessage createSmsCbMessage(Context context, SmsCbHeader header, SmsCbLocation location, byte[][] pdus, int slotIndex) throws IllegalArgumentException { + SubscriptionManager sm = (SubscriptionManager) context.getSystemService( + Context.TELEPHONY_SUBSCRIPTION_SERVICE); + int subId = SubscriptionManager.DEFAULT_SUBSCRIPTION_ID; + int[] subIds = sm.getSubscriptionIds(slotIndex); + if (subIds != null && subIds.length > 0) { + subId = subIds[0]; + } + long receivedTimeMillis = System.currentTimeMillis(); if (header.isEtwsPrimaryNotification()) { // ETSI TS 23.041 ETWS Primary Notification message @@ -105,7 +114,8 @@ public class GsmSmsCbMessage { header.getSerialNumber(), location, header.getServiceCategory(), null, getEtwsPrimaryMessage(context, header.getEtwsInfo().getWarningType()), SmsCbMessage.MESSAGE_PRIORITY_EMERGENCY, header.getEtwsInfo(), - header.getCmasInfo(), 0, null /* geometries */, receivedTimeMillis, slotIndex); + header.getCmasInfo(), 0, null /* geometries */, receivedTimeMillis, slotIndex, + subId); } else if (header.isUmtsFormat()) { // UMTS format has only 1 PDU byte[] pdu = pdus[0]; @@ -139,7 +149,7 @@ public class GsmSmsCbMessage { header.getGeographicalScope(), header.getSerialNumber(), location, header.getServiceCategory(), language, body, priority, header.getEtwsInfo(), header.getCmasInfo(), maximumWaitingTimeSec, geometries, - receivedTimeMillis, slotIndex); + receivedTimeMillis, slotIndex, subId); } else { String language = null; StringBuilder sb = new StringBuilder(); @@ -155,7 +165,7 @@ public class GsmSmsCbMessage { header.getGeographicalScope(), header.getSerialNumber(), location, header.getServiceCategory(), language, sb.toString(), priority, header.getEtwsInfo(), header.getCmasInfo(), 0, null /* geometries */, - receivedTimeMillis, slotIndex); + receivedTimeMillis, slotIndex, subId); } } diff --git a/tests/net/AndroidManifest.xml b/tests/net/AndroidManifest.xml index dcacb6dd7b10..638b6d1d7b5a 100644 --- a/tests/net/AndroidManifest.xml +++ b/tests/net/AndroidManifest.xml @@ -32,7 +32,7 @@ <uses-permission android:name="android.permission.GET_DETAILED_TASKS" /> <uses-permission android:name="android.permission.MANAGE_NETWORK_POLICY" /> <uses-permission android:name="android.permission.READ_NETWORK_USAGE_HISTORY" /> - <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" /> + <uses-permission android:name="android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.MANAGE_USERS" /> <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" /> @@ -45,6 +45,8 @@ <uses-permission android:name="android.permission.MANAGE_ACTIVITY_STACKS" /> <uses-permission android:name="android.permission.INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.NETWORK_STACK" /> + <uses-permission android:name="android.permission.OBSERVE_NETWORK_POLICY" /> + <uses-permission android:name="android.permission.NETWORK_FACTORY" /> <application> <uses-library android:name="android.test.runner" /> diff --git a/tests/net/java/com/android/server/connectivity/PermissionMonitorTest.java b/tests/net/java/com/android/server/connectivity/PermissionMonitorTest.java index 7fee7b73cd0e..76e3e2fced6f 100644 --- a/tests/net/java/com/android/server/connectivity/PermissionMonitorTest.java +++ b/tests/net/java/com/android/server/connectivity/PermissionMonitorTest.java @@ -265,6 +265,8 @@ public class PermissionMonitorTest { assertFalse(mPermissionMonitor.hasNetworkPermission(app)); app = systemPackageInfoWithPermissions(CONNECTIVITY_USE_RESTRICTED_NETWORKS); assertFalse(mPermissionMonitor.hasNetworkPermission(app)); + app = systemPackageInfoWithPermissions(CONNECTIVITY_INTERNAL); + assertFalse(mPermissionMonitor.hasNetworkPermission(app)); } @Test @@ -274,7 +276,7 @@ public class PermissionMonitorTest { PARTITION_SYSTEM, VERSION_P, MOCK_UID1, CHANGE_NETWORK_STATE)); assertTrue(hasRestrictedNetworkPermission( PARTITION_SYSTEM, VERSION_P, MOCK_UID1, NETWORK_STACK)); - assertTrue(hasRestrictedNetworkPermission( + assertFalse(hasRestrictedNetworkPermission( PARTITION_SYSTEM, VERSION_P, MOCK_UID1, CONNECTIVITY_INTERNAL)); assertTrue(hasRestrictedNetworkPermission( PARTITION_SYSTEM, VERSION_P, MOCK_UID1, CONNECTIVITY_USE_RESTRICTED_NETWORKS)); @@ -283,7 +285,7 @@ public class PermissionMonitorTest { assertFalse(hasRestrictedNetworkPermission(PARTITION_SYSTEM, VERSION_Q, MOCK_UID1)); assertFalse(hasRestrictedNetworkPermission( - PARTITION_SYSTEM, VERSION_Q, MOCK_UID1, CHANGE_WIFI_STATE)); + PARTITION_SYSTEM, VERSION_Q, MOCK_UID1, CONNECTIVITY_INTERNAL)); } @Test @@ -291,14 +293,14 @@ public class PermissionMonitorTest { doReturn(VERSION_P).when(mPermissionMonitor).getDeviceFirstSdkInt(); assertTrue(hasRestrictedNetworkPermission(PARTITION_SYSTEM, VERSION_P, SYSTEM_UID)); assertTrue(hasRestrictedNetworkPermission( - PARTITION_SYSTEM, VERSION_P, SYSTEM_UID, CHANGE_WIFI_STATE)); + PARTITION_SYSTEM, VERSION_P, SYSTEM_UID, CONNECTIVITY_INTERNAL)); assertTrue(hasRestrictedNetworkPermission( PARTITION_SYSTEM, VERSION_P, SYSTEM_UID, CONNECTIVITY_USE_RESTRICTED_NETWORKS)); doReturn(VERSION_Q).when(mPermissionMonitor).getDeviceFirstSdkInt(); assertFalse(hasRestrictedNetworkPermission(PARTITION_SYSTEM, VERSION_Q, SYSTEM_UID)); assertFalse(hasRestrictedNetworkPermission( - PARTITION_SYSTEM, VERSION_Q, SYSTEM_UID, CHANGE_WIFI_STATE)); + PARTITION_SYSTEM, VERSION_Q, SYSTEM_UID, CONNECTIVITY_INTERNAL)); assertTrue(hasRestrictedNetworkPermission( PARTITION_SYSTEM, VERSION_Q, SYSTEM_UID, CONNECTIVITY_USE_RESTRICTED_NETWORKS)); } @@ -319,7 +321,7 @@ public class PermissionMonitorTest { assertFalse(hasRestrictedNetworkPermission(PARTITION_VENDOR, VERSION_Q, MOCK_UID1)); assertFalse(hasRestrictedNetworkPermission( - PARTITION_VENDOR, VERSION_Q, MOCK_UID1, CHANGE_WIFI_STATE)); + PARTITION_VENDOR, VERSION_Q, MOCK_UID1, CONNECTIVITY_INTERNAL)); assertFalse(hasRestrictedNetworkPermission( PARTITION_VENDOR, VERSION_Q, MOCK_UID1, CHANGE_NETWORK_STATE)); } @@ -337,7 +339,7 @@ public class PermissionMonitorTest { public void testHasUseBackgroundNetworksPermission() throws Exception { assertFalse(mPermissionMonitor.hasUseBackgroundNetworksPermission(SYSTEM_UID)); assertBackgroundPermission(false, SYSTEM_PACKAGE1, SYSTEM_UID); - assertBackgroundPermission(false, SYSTEM_PACKAGE1, SYSTEM_UID, CHANGE_WIFI_STATE); + assertBackgroundPermission(false, SYSTEM_PACKAGE1, SYSTEM_UID, CONNECTIVITY_INTERNAL); assertBackgroundPermission(true, SYSTEM_PACKAGE1, SYSTEM_UID, CHANGE_NETWORK_STATE); assertBackgroundPermission(true, SYSTEM_PACKAGE1, SYSTEM_UID, NETWORK_STACK); @@ -348,8 +350,9 @@ public class PermissionMonitorTest { assertFalse(mPermissionMonitor.hasUseBackgroundNetworksPermission(MOCK_UID2)); assertBackgroundPermission(false, MOCK_PACKAGE2, MOCK_UID2); - assertBackgroundPermission(true, MOCK_PACKAGE2, MOCK_UID2, + assertBackgroundPermission(false, MOCK_PACKAGE2, MOCK_UID2, CONNECTIVITY_INTERNAL); + assertBackgroundPermission(true, MOCK_PACKAGE2, MOCK_UID2, NETWORK_STACK); } private class NetdMonitor { diff --git a/tools/processors/unsupportedappusage/Android.bp b/tools/processors/unsupportedappusage/Android.bp deleted file mode 100644 index 1e96234543c8..000000000000 --- a/tools/processors/unsupportedappusage/Android.bp +++ /dev/null @@ -1,34 +0,0 @@ - -java_library_host { - name: "unsupportedappusage-annotation-processor-lib", - srcs: [ - "src/**/*.java", - ], - static_libs: [ - "guava", - "unsupportedappusage-annotation" - ], - openjdk9: { - javacflags: [ - "--add-modules=jdk.compiler", - "--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", - ], - }, -} - -java_plugin { - name: "unsupportedappusage-annotation-processor", - processor_class: "android.processor.unsupportedappusage.UnsupportedAppUsageProcessor", - - java_resources: [ - "META-INF/**/*", - ], - static_libs: [ - "unsupportedappusage-annotation-processor-lib" - ], - - use_tools_jar: true, -} diff --git a/tools/processors/unsupportedappusage/META-INF/services/javax.annotation.processing.Processor b/tools/processors/unsupportedappusage/META-INF/services/javax.annotation.processing.Processor deleted file mode 100644 index 4a969d319070..000000000000 --- a/tools/processors/unsupportedappusage/META-INF/services/javax.annotation.processing.Processor +++ /dev/null @@ -1 +0,0 @@ -android.processor.unsupportedappusage.UnsupportedAppUsageProcessor diff --git a/tools/processors/unsupportedappusage/src/android/processor/unsupportedappusage/SignatureBuilder.java b/tools/processors/unsupportedappusage/src/android/processor/unsupportedappusage/SignatureBuilder.java deleted file mode 100644 index 65fc733fa364..000000000000 --- a/tools/processors/unsupportedappusage/src/android/processor/unsupportedappusage/SignatureBuilder.java +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright (C) 2018 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.processor.unsupportedappusage; - -import static javax.lang.model.element.ElementKind.PACKAGE; -import static javax.tools.Diagnostic.Kind.ERROR; -import static javax.tools.Diagnostic.Kind.WARNING; - -import com.google.common.base.Strings; -import com.google.common.collect.ImmutableMap; -import com.sun.tools.javac.code.Type; - -import java.lang.annotation.Annotation; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import javax.annotation.processing.Messager; -import javax.lang.model.element.Element; -import javax.lang.model.element.ExecutableElement; -import javax.lang.model.element.PackageElement; -import javax.lang.model.element.TypeElement; -import javax.lang.model.element.VariableElement; -import javax.lang.model.type.ArrayType; -import javax.lang.model.type.DeclaredType; -import javax.lang.model.type.TypeKind; -import javax.lang.model.type.TypeMirror; - -/** - * Builds a dex signature for a given method or field. - */ -public class SignatureBuilder { - - private static final Map<TypeKind, String> TYPE_MAP = ImmutableMap.<TypeKind, String>builder() - .put(TypeKind.BOOLEAN, "Z") - .put(TypeKind.BYTE, "B") - .put(TypeKind.CHAR, "C") - .put(TypeKind.DOUBLE, "D") - .put(TypeKind.FLOAT, "F") - .put(TypeKind.INT, "I") - .put(TypeKind.LONG, "J") - .put(TypeKind.SHORT, "S") - .put(TypeKind.VOID, "V") - .build(); - - private final Messager mMessager; - - /** - * Exception used internally when we can't build a signature. Whenever this is thrown, an error - * will also be written to the Messager. - */ - private class SignatureBuilderException extends Exception { - public SignatureBuilderException(String message) { - super(message); - } - - public void report(Element offendingElement) { - mMessager.printMessage(ERROR, getMessage(), offendingElement); - } - } - - public SignatureBuilder(Messager messager) { - mMessager = messager; - } - - /** - * Returns a list of enclosing elements for the given element, with the package first, and - * excluding the element itself. - */ - private List<Element> getEnclosingElements(Element e) { - List<Element> enclosing = new ArrayList<>(); - e = e.getEnclosingElement(); // don't include the element itself. - while (e != null) { - enclosing.add(e); - e = e.getEnclosingElement(); - } - Collections.reverse(enclosing); - return enclosing; - } - - /** - * Get the dex signature for a clazz, in format "Lpackage/name/Outer$Inner;" - */ - private String getClassSignature(TypeElement clazz) { - StringBuilder sb = new StringBuilder("L"); - for (Element enclosing : getEnclosingElements(clazz)) { - switch (enclosing.getKind()) { - case MODULE: - // ignore this. - break; - case PACKAGE: - sb.append(((PackageElement) enclosing) - .getQualifiedName() - .toString() - .replace('.', '/')); - sb.append('/'); - break; - default: - sb.append(enclosing.getSimpleName()).append('$'); - break; - } - - } - return sb - .append(clazz.getSimpleName()) - .append(";") - .toString(); - } - - /** - * Returns the type signature for a given type. For primitive types, a single character. - * For classes, the class signature. For arrays, a "[" preceeding the component type. - */ - private String getTypeSignature(TypeMirror type) throws SignatureBuilderException { - String sig = TYPE_MAP.get(type.getKind()); - if (sig != null) { - return sig; - } - switch (type.getKind()) { - case ARRAY: - return "[" + getTypeSignature(((ArrayType) type).getComponentType()); - case DECLARED: - Element declaring = ((DeclaredType) type).asElement(); - if (!(declaring instanceof TypeElement)) { - throw new SignatureBuilderException( - "Can't handle declared type of kind " + declaring.getKind()); - } - return getClassSignature((TypeElement) declaring); - case TYPEVAR: - Type.TypeVar typeVar = (Type.TypeVar) type; - if (typeVar.getLowerBound().getKind() != TypeKind.NULL) { - return getTypeSignature(typeVar.getLowerBound()); - } else if (typeVar.getUpperBound().getKind() != TypeKind.NULL) { - return getTypeSignature(typeVar.getUpperBound()); - } else { - throw new SignatureBuilderException("Can't handle typevar with no bound"); - } - - default: - throw new SignatureBuilderException("Can't handle type of kind " + type.getKind()); - } - } - - /** - * Get the signature for an executable, either a method or a constructor. - * - * @param name "<init>" for constructor, else the method name - * @param method The executable element in question. - */ - private String getExecutableSignature(CharSequence name, ExecutableElement method) - throws SignatureBuilderException { - StringBuilder sig = new StringBuilder(); - sig.append(getClassSignature((TypeElement) method.getEnclosingElement())) - .append("->") - .append(name) - .append("("); - for (VariableElement param : method.getParameters()) { - sig.append(getTypeSignature(param.asType())); - } - sig.append(")") - .append(getTypeSignature(method.getReturnType())); - return sig.toString(); - } - - private String buildMethodSignature(ExecutableElement method) throws SignatureBuilderException { - return getExecutableSignature(method.getSimpleName(), method); - } - - private String buildConstructorSignature(ExecutableElement cons) - throws SignatureBuilderException { - return getExecutableSignature("<init>", cons); - } - - private String buildFieldSignature(VariableElement field) throws SignatureBuilderException { - StringBuilder sig = new StringBuilder(); - sig.append(getClassSignature((TypeElement) field.getEnclosingElement())) - .append("->") - .append(field.getSimpleName()) - .append(":") - .append(getTypeSignature(field.asType())) - ; - return sig.toString(); - } - - /** - * Creates the signature for an annotated element. - * - * @param annotationType type of annotation being processed. - * @param element element for which we want to create a signature. - */ - public String buildSignature(Class<? extends Annotation> annotationType, Element element) { - try { - String signature; - switch (element.getKind()) { - case METHOD: - signature = buildMethodSignature((ExecutableElement) element); - break; - case CONSTRUCTOR: - signature = buildConstructorSignature((ExecutableElement) element); - break; - case FIELD: - signature = buildFieldSignature((VariableElement) element); - break; - default: - return null; - } - // Obtain annotation objects - Annotation annotation = element.getAnnotation(annotationType); - if (annotation == null) { - throw new IllegalStateException( - "Element doesn't have any UnsupportedAppUsage annotation"); - } - try { - Method expectedSignatureMethod = annotationType.getMethod("expectedSignature"); - // If we have an expected signature on the annotation, warn if it doesn't match. - String expectedSignature = expectedSignatureMethod.invoke(annotation).toString(); - if (!Strings.isNullOrEmpty(expectedSignature)) { - if (!signature.equals(expectedSignature)) { - mMessager.printMessage( - WARNING, - String.format( - "Expected signature doesn't match generated signature.\n" - + " Expected: %s\n Generated: %s", - expectedSignature, signature), - element); - } - } - return signature; - } catch (NoSuchMethodException e) { - throw new IllegalStateException( - "Annotation type does not have expectedSignature parameter", e); - } catch (IllegalAccessException | InvocationTargetException e) { - throw new IllegalStateException( - "Could not get expectedSignature parameter for annotation", e); - } - } catch (SignatureBuilderException problem) { - problem.report(element); - return null; - } - } -} diff --git a/tools/processors/unsupportedappusage/src/android/processor/unsupportedappusage/UnsupportedAppUsageProcessor.java b/tools/processors/unsupportedappusage/src/android/processor/unsupportedappusage/UnsupportedAppUsageProcessor.java deleted file mode 100644 index 5bb956a1fea2..000000000000 --- a/tools/processors/unsupportedappusage/src/android/processor/unsupportedappusage/UnsupportedAppUsageProcessor.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (C) 2018 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.processor.unsupportedappusage; - -import static javax.tools.StandardLocation.CLASS_OUTPUT; - -import com.google.common.base.Joiner; -import com.google.common.collect.ImmutableSet; -import com.sun.tools.javac.model.JavacElements; -import com.sun.tools.javac.tree.JCTree; -import com.sun.tools.javac.util.Pair; -import com.sun.tools.javac.util.Position; - -import java.io.IOException; -import java.io.PrintStream; -import java.lang.annotation.Annotation; -import java.net.URLEncoder; -import java.util.Map; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Stream; - -import javax.annotation.processing.AbstractProcessor; -import javax.annotation.processing.RoundEnvironment; -import javax.annotation.processing.SupportedAnnotationTypes; -import javax.lang.model.SourceVersion; -import javax.lang.model.element.AnnotationMirror; -import javax.lang.model.element.AnnotationValue; -import javax.lang.model.element.Element; -import javax.lang.model.element.ExecutableElement; -import javax.lang.model.element.TypeElement; - -/** - * Annotation processor for {@link UnsupportedAppUsage} annotations. - * - * This processor currently outputs a CSV file with a mapping of dex signatures to corresponding - * source positions. - * - * This is used for automating updates to the annotations themselves. - */ -@SupportedAnnotationTypes({"android.annotation.UnsupportedAppUsage", - "dalvik.annotation.compat.UnsupportedAppUsage" -}) -public class UnsupportedAppUsageProcessor extends AbstractProcessor { - - // Package name for writing output. Output will be written to the "class output" location within - // this package. - private static final String PACKAGE = "unsupportedappusage"; - private static final String INDEX_CSV = "unsupportedappusage_index.csv"; - - private static final ImmutableSet<Class<? extends Annotation>> SUPPORTED_ANNOTATIONS = - ImmutableSet.of(android.annotation.UnsupportedAppUsage.class, - dalvik.annotation.compat.UnsupportedAppUsage.class); - private static final ImmutableSet<String> SUPPORTED_ANNOTATION_NAMES = - SUPPORTED_ANNOTATIONS.stream().map(annotation -> annotation.getCanonicalName()).collect( - ImmutableSet.toImmutableSet()); - - @Override - public SourceVersion getSupportedSourceVersion() { - return SourceVersion.latest(); - } - - /** - * Write the contents of a stream to a text file, with one line per item. - */ - private void writeToFile(String name, - String headerLine, - Stream<?> contents) throws IOException { - PrintStream out = new PrintStream(processingEnv.getFiler().createResource( - CLASS_OUTPUT, - PACKAGE, - name) - .openOutputStream()); - out.println(headerLine); - contents.forEach(o -> out.println(o)); - if (out.checkError()) { - throw new IOException("Error when writing to " + name); - } - out.close(); - } - - /** - * Find the annotation mirror for the @UnsupportedAppUsage annotation on the given element. - */ - private AnnotationMirror getUnsupportedAppUsageAnnotationMirror(Element e) { - for (AnnotationMirror m : e.getAnnotationMirrors()) { - TypeElement type = (TypeElement) m.getAnnotationType().asElement(); - if (SUPPORTED_ANNOTATION_NAMES.contains(type.getQualifiedName().toString())) { - return m; - } - } - return null; - } - - /** - * Returns a CSV header line for the columns returned by - * {@link #getAnnotationIndex(String, Element)}. - */ - private String getCsvHeaders() { - return Joiner.on(',').join( - "signature", - "file", - "startline", - "startcol", - "endline", - "endcol", - "properties" - ); - } - - private String encodeAnnotationProperties(AnnotationMirror annotation) { - StringBuilder sb = new StringBuilder(); - for (Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> e - : annotation.getElementValues().entrySet()) { - if (sb.length() > 0) { - sb.append("&"); - } - sb.append(e.getKey().getSimpleName()) - .append("=") - .append(URLEncoder.encode(e.getValue().toString())); - } - return sb.toString(); - } - - /** - * Maps an annotated element to the source position of the @UnsupportedAppUsage annotation - * attached to it. It returns CSV in the format: - * dex-signature,filename,start-line,start-col,end-line,end-col - * - * The positions refer to the annotation itself, *not* the annotated member. This can therefore - * be used to read just the annotation from the file, and to perform in-place edits on it. - * - * @param signature the dex signature for the element. - * @param annotatedElement The annotated element - * @return A single line of CSV text - */ - private String getAnnotationIndex(String signature, Element annotatedElement) { - JavacElements javacElem = (JavacElements) processingEnv.getElementUtils(); - AnnotationMirror unsupportedAppUsage = - getUnsupportedAppUsageAnnotationMirror(annotatedElement); - Pair<JCTree, JCTree.JCCompilationUnit> pair = - javacElem.getTreeAndTopLevel(annotatedElement, unsupportedAppUsage, null); - Position.LineMap lines = pair.snd.lineMap; - return Joiner.on(",").join( - signature, - pair.snd.getSourceFile().getName(), - lines.getLineNumber(pair.fst.pos().getStartPosition()), - lines.getColumnNumber(pair.fst.pos().getStartPosition()), - lines.getLineNumber(pair.fst.pos().getEndPosition(pair.snd.endPositions)), - lines.getColumnNumber(pair.fst.pos().getEndPosition(pair.snd.endPositions)), - encodeAnnotationProperties(unsupportedAppUsage)); - } - - /** - * This is the main entry point in the processor, called by the compiler. - */ - @Override - public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { - Map<String, Element> signatureMap = new TreeMap<>(); - SignatureBuilder sb = new SignatureBuilder(processingEnv.getMessager()); - for (Class<? extends Annotation> supportedAnnotation : SUPPORTED_ANNOTATIONS) { - Set<? extends Element> annotated = roundEnv.getElementsAnnotatedWith( - supportedAnnotation); - if (annotated.size() == 0) { - continue; - } - // Build signatures for each annotated member and put them in a map from signature to - // member. - for (Element e : annotated) { - String sig = sb.buildSignature(supportedAnnotation, e); - if (sig != null) { - signatureMap.put(sig, e); - } - } - } - - if (!signatureMap.isEmpty()) { - try { - writeToFile(INDEX_CSV, - getCsvHeaders(), - signatureMap.entrySet() - .stream() - .map(e -> getAnnotationIndex(e.getKey(), e.getValue()))); - } catch (IOException e) { - throw new RuntimeException("Failed to write output", e); - } - } - return true; - } -} diff --git a/tools/processors/unsupportedappusage/test/src/android/processor/unsupportedappusage/CsvReader.java b/tools/processors/unsupportedappusage/test/src/android/processor/unsupportedappusage/CsvReader.java deleted file mode 100644 index 23db99e81194..000000000000 --- a/tools/processors/unsupportedappusage/test/src/android/processor/unsupportedappusage/CsvReader.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2019 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.processor.unsupportedappusage; - -import com.google.common.base.Splitter; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CsvReader { - - private final Splitter mSplitter; - private final List<String> mColumns; - private final List<Map<String, String>> mContents; - - public CsvReader(InputStream in) throws IOException { - mSplitter = Splitter.on(","); - BufferedReader br = new BufferedReader(new InputStreamReader(in)); - mColumns = mSplitter.splitToList(br.readLine()); - mContents = new ArrayList<>(); - String line = br.readLine(); - while (line != null) { - List<String> contents = mSplitter.splitToList(line); - Map<String, String> contentMap = new HashMap<>(); - for (int i = 0; i < Math.min(contents.size(), mColumns.size()); ++i) { - contentMap.put(mColumns.get(i), contents.get(i)); - } - mContents.add(contentMap); - line = br.readLine(); - } - br.close(); - } - - public List<String> getColumns() { - return mColumns; - } - - public List<Map<String, String>> getContents() { - return mContents; - } -} diff --git a/tools/processors/unsupportedappusage/test/src/android/processor/unsupportedappusage/UnsupportedAppUsageProcessorTest.java b/tools/processors/unsupportedappusage/test/src/android/processor/unsupportedappusage/UnsupportedAppUsageProcessorTest.java deleted file mode 100644 index 012e88f17924..000000000000 --- a/tools/processors/unsupportedappusage/test/src/android/processor/unsupportedappusage/UnsupportedAppUsageProcessorTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (C) 2019 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.processor.unsupportedappusage; - -import static com.google.common.truth.Truth.assertThat; - -import com.android.javac.Javac; - -import com.google.common.base.Joiner; - -import org.junit.Before; -import org.junit.Test; - -import java.io.IOException; -import java.util.Map; - -public class UnsupportedAppUsageProcessorTest { - - private Javac mJavac; - - @Before - public void setup() throws IOException { - mJavac = new Javac(); - mJavac.addSource("dalvik.annotation.compat.UnsupportedAppUsage", Joiner.on('\n').join( - "package dalvik.annotation.compat;", - "public @interface UnsupportedAppUsage {", - " String expectedSignature() default \"\";\n", - " String someProperty() default \"\";", - "}")); - } - - private CsvReader compileAndReadCsv() throws IOException { - mJavac.compileWithAnnotationProcessor(new UnsupportedAppUsageProcessor()); - return new CsvReader( - mJavac.getOutputFile("unsupportedappusage/unsupportedappusage_index.csv")); - } - - @Test - public void testSignatureFormat() throws Exception { - mJavac.addSource("a.b.Class", Joiner.on('\n').join( - "package a.b;", - "import dalvik.annotation.compat.UnsupportedAppUsage;", - "public class Class {", - " @UnsupportedAppUsage", - " public void method() {}", - "}")); - assertThat(compileAndReadCsv().getContents().get(0)).containsEntry( - "signature", "La/b/Class;->method()V" - ); - } - - @Test - public void testSourcePosition() throws Exception { - mJavac.addSource("a.b.Class", Joiner.on('\n').join( - "package a.b;", // 1 - "import dalvik.annotation.compat.UnsupportedAppUsage;", // 2 - "public class Class {", // 3 - " @UnsupportedAppUsage", // 4 - " public void method() {}", // 5 - "}")); - Map<String, String> row = compileAndReadCsv().getContents().get(0); - assertThat(row).containsEntry("startline", "4"); - assertThat(row).containsEntry("startcol", "3"); - assertThat(row).containsEntry("endline", "4"); - assertThat(row).containsEntry("endcol", "23"); - } - - @Test - public void testAnnotationProperties() throws Exception { - mJavac.addSource("a.b.Class", Joiner.on('\n').join( - "package a.b;", // 1 - "import dalvik.annotation.compat.UnsupportedAppUsage;", // 2 - "public class Class {", // 3 - " @UnsupportedAppUsage(someProperty=\"value\")", // 4 - " public void method() {}", // 5 - "}")); - assertThat(compileAndReadCsv().getContents().get(0)).containsEntry( - "properties", "someProperty=%22value%22"); - } - - -} diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index b53b2aaaf547..671b3c715012 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -1200,6 +1200,7 @@ public class WifiManager { * <li>allowedAuthAlgorithms</li> * <li>allowedPairwiseCiphers</li> * <li>allowedGroupCiphers</li> + * <li>status</li> * </ul> * @return a list of network configurations in the form of a list * of {@link WifiConfiguration} objects. |