diff options
206 files changed, 5136 insertions, 3306 deletions
diff --git a/Android.bp b/Android.bp index 75274eb84f63..7ceb727d1890 100644 --- a/Android.bp +++ b/Android.bp @@ -294,6 +294,17 @@ filegroup { ] } +java_library { + name: "framework-updatable-stubs-module_libs_api", + static_libs: [ + "framework-sdkextensions-stubs-module_libs_api", + "framework-tethering-stubs-module_libs_api", + "updatable_media_stubs", + ], + sdk_version: "module_current", + visibility: [":__pkg__"], +} + filegroup { name: "framework-all-sources", srcs: [ @@ -324,9 +335,11 @@ java_defaults { "rs/java", "sax/java", "telecomm/java", - "telephony/java", "wifi/java", "wifi/aidl-export", + + // TODO(b/147699819): remove this + "telephony/java", ], }, } @@ -396,7 +409,7 @@ java_defaults { "app-compat-annotations", "ext", "unsupportedappusage", - "updatable_media_stubs", + "framework-updatable-stubs-module_libs_api", ], jarjar_rules: ":framework-jarjar-rules", @@ -455,9 +468,6 @@ java_library { name: "framework-minus-apex", defaults: ["framework-defaults"], srcs: [":framework-non-updatable-sources"], - libs: [ - "framework-tethering-stubs", - ], installable: true, javac_shard_size: 150, required: [ @@ -494,9 +504,7 @@ java_library { installable: false, // this lib is a build-only library static_libs: [ "framework-minus-apex", - "updatable_media_stubs", - "framework-sdkextensions-stubs-systemapi", - "framework-tethering-stubs", + "framework-updatable-stubs-module_libs_api", ], sdk_version: "core_platform", apex_available: ["//apex_available:platform"], @@ -511,9 +519,7 @@ java_library { visibility: [ // DO NOT ADD ANY MORE ENTRIES TO THIS LIST "//external/robolectric-shadows:__subpackages__", - "//frameworks/base/packages/Tethering/common/TetheringLib:__subpackages__", "//frameworks/layoutlib:__subpackages__", - "//frameworks/opt/net/ike:__subpackages__", ], } @@ -614,6 +620,7 @@ gensrcs { filegroup { name: "framework-annotations", srcs: [ + "core/java/android/annotation/Hide.java", "core/java/android/annotation/NonNull.java", "core/java/android/annotation/Nullable.java", "core/java/android/annotation/IntDef.java", @@ -667,6 +674,18 @@ filegroup { ], } +filegroup { + name: "framework-services-net-module-wifi-shared-srcs", + srcs: [ + "core/java/android/net/DhcpResults.java", + "core/java/android/net/shared/Inet4AddressUtils.java", + "core/java/android/net/shared/InetAddressUtils.java", + "core/java/android/net/util/IpUtils.java", + "core/java/android/util/LocalLog.java", + "core/java/com/android/internal/util/Preconditions.java", + ], +} + // keep these files in sync with the package/Tethering/jarjar-rules.txt for the tethering module. filegroup { name: "framework-tethering-shared-srcs", diff --git a/StubLibraries.bp b/StubLibraries.bp index 84b36255df51..e8aa3936d889 100644 --- a/StubLibraries.bp +++ b/StubLibraries.bp @@ -41,7 +41,7 @@ packages_to_document = [ ] stubs_defaults { - name: "metalava-non-updatable-api-stubs-default", + name: "metalava-base-api-stubs-default", srcs: [ ":framework-non-updatable-sources", "core/java/**/*.logtags", @@ -57,21 +57,23 @@ stubs_defaults { merge_annotations_dirs: [ "metalava-manual", ], - api_levels_annotations_enabled: true, - api_levels_annotations_dirs: [ - "sdk-dir", - "api-versions-jars-dir", - ], + api_levels_annotations_enabled: false, filter_packages: packages_to_document, } stubs_defaults { - name: "metalava-api-stubs-default", - defaults: ["metalava-non-updatable-api-stubs-default"], + name: "metalava-full-api-stubs-default", + defaults: ["metalava-base-api-stubs-default"], srcs: [":framework-updatable-sources"], sdk_version: "core_platform", } +stubs_defaults { + name: "metalava-non-updatable-api-stubs-default", + defaults: ["metalava-base-api-stubs-default"], + sdk_version: "system_current", +} + ///////////////////////////////////////////////////////////////////// // *-api-stubs-docs modules providing source files for the stub libraries ///////////////////////////////////////////////////////////////////// @@ -81,7 +83,7 @@ stubs_defaults { // modules droidstubs { name: "api-stubs-docs", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-full-api-stubs-default"], api_filename: "public_api.txt", private_api_filename: "private.txt", removed_api_filename: "removed.txt", @@ -120,11 +122,10 @@ module_libs = " " + droidstubs { name: "system-api-stubs-docs", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-full-api-stubs-default"], api_tag_name: "SYSTEM", api_filename: "system-api.txt", private_api_filename: "system-private.txt", - private_dex_api_filename: "system-private-dex.txt", removed_api_filename: "system-removed.txt", arg_files: [ "core/res/AndroidManifest.xml", @@ -151,7 +152,7 @@ droidstubs { droidstubs { name: "test-api-stubs-docs", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-full-api-stubs-default"], api_tag_name: "TEST", api_filename: "test-api.txt", removed_api_filename: "test-removed.txt", @@ -184,7 +185,7 @@ droidstubs { droidstubs { name: "module-lib-api", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-full-api-stubs-default"], arg_files: ["core/res/AndroidManifest.xml"], args: metalava_framework_docs_args + module_libs, check_api: { @@ -212,7 +213,7 @@ droidstubs { droidstubs { name: "module-lib-api-stubs-docs", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-non-updatable-api-stubs-default"], arg_files: ["core/res/AndroidManifest.xml"], args: metalava_framework_docs_args + priv_apps + module_libs, } @@ -262,6 +263,7 @@ java_library_static { name: "android_module_lib_stubs_current", srcs: [ ":module-lib-api-stubs-docs" ], defaults: ["framework-stubs-default"], + libs: ["android_system_stubs_current"], } ///////////////////////////////////////////////////////////////////// @@ -313,12 +315,10 @@ java_library_static { droidstubs { name: "hiddenapi-lists-docs", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-full-api-stubs-default"], arg_files: [ "core/res/AndroidManifest.xml", ], - dex_api_filename: "public-dex.txt", - private_dex_api_filename: "private-dex.txt", removed_dex_api_filename: "removed-dex.txt", args: metalava_framework_docs_args + " --show-unannotated " + @@ -328,7 +328,7 @@ droidstubs { droidstubs { name: "hiddenapi-mappings", - defaults: ["metalava-api-stubs-default"], + defaults: ["metalava-full-api-stubs-default"], srcs: [ ":opt-telephony-common-srcs", ], diff --git a/apex/Android.bp b/apex/Android.bp index 051986e758d3..151091137c9c 100644 --- a/apex/Android.bp +++ b/apex/Android.bp @@ -43,6 +43,7 @@ stubs_defaults { name: "framework-module-stubs-defaults-publicapi", args: mainline_stubs_args, installable: false, + sdk_version: "current", } stubs_defaults { @@ -50,6 +51,7 @@ stubs_defaults { args: mainline_stubs_args + priv_apps, srcs: [":framework-annotations"], installable: false, + sdk_version: "system_current", } // The defaults for module_libs comes in two parts - defaults for API checks @@ -62,6 +64,7 @@ stubs_defaults { args: mainline_stubs_args + module_libs, srcs: [":framework-annotations"], installable: false, + sdk_version: "module_current", } stubs_defaults { @@ -69,4 +72,5 @@ stubs_defaults { args: mainline_stubs_args + module_libs + priv_apps, srcs: [":framework-annotations"], installable: false, + sdk_version: "module_current", } diff --git a/api/current.txt b/api/current.txt index 0f37db2b586f..f97e5f656afd 100644 --- a/api/current.txt +++ b/api/current.txt @@ -19555,8 +19555,7 @@ package android.icu.number { method public T numberFormatterSecond(android.icu.number.UnlocalizedNumberFormatter); } - public abstract class Precision implements java.lang.Cloneable { - method public Object clone(); + public abstract class Precision { method public static android.icu.number.CurrencyPrecision currency(android.icu.util.Currency.CurrencyUsage); method public static android.icu.number.FractionPrecision fixedFraction(int); method public static android.icu.number.Precision fixedSignificantDigits(int); @@ -19579,8 +19578,7 @@ package android.icu.number { method public static android.icu.number.Scale powerOfTen(int); } - public class ScientificNotation extends android.icu.number.Notation implements java.lang.Cloneable { - method public Object clone(); + public class ScientificNotation extends android.icu.number.Notation { method public android.icu.number.ScientificNotation withExponentSignDisplay(android.icu.number.NumberFormatter.SignDisplay); method public android.icu.number.ScientificNotation withMinExponentDigits(int); } @@ -45900,6 +45898,7 @@ package android.telephony { method public String getMmsUserAgent(); method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getNai(); method public String getNetworkCountryIso(); + method @NonNull public String getNetworkCountryIso(int); method public String getNetworkOperator(); method public String getNetworkOperatorName(); method @RequiresPermission(anyOf={"android.permission.READ_PRIVILEGED_PHONE_STATE", android.Manifest.permission.READ_PRECISE_PHONE_STATE}) public int getNetworkSelectionMode(); @@ -46010,6 +46009,7 @@ package android.telephony { field public static final int DATA_DISCONNECTING = 4; // 0x4 field public static final int DATA_SUSPENDED = 3; // 0x3 field public static final int DATA_UNKNOWN = -1; // 0xffffffff + field public static final String EXTRA_ACTIVE_SIM_SUPPORTED_COUNT = "android.telephony.extra.ACTIVE_SIM_SUPPORTED_COUNT"; field public static final String EXTRA_CALL_VOICEMAIL_INTENT = "android.telephony.extra.CALL_VOICEMAIL_INTENT"; field public static final String EXTRA_CARRIER_ID = "android.telephony.extra.CARRIER_ID"; field public static final String EXTRA_CARRIER_NAME = "android.telephony.extra.CARRIER_NAME"; @@ -46019,7 +46019,6 @@ package android.telephony { field public static final String EXTRA_LAUNCH_VOICEMAIL_SETTINGS_INTENT = "android.telephony.extra.LAUNCH_VOICEMAIL_SETTINGS_INTENT"; field public static final String EXTRA_NETWORK_COUNTRY = "android.telephony.extra.NETWORK_COUNTRY"; field public static final String EXTRA_NOTIFICATION_COUNT = "android.telephony.extra.NOTIFICATION_COUNT"; - field public static final String EXTRA_NUM_OF_ACTIVE_SIM_SUPPORTED = "android.telephony.extra.NUM_OF_ACTIVE_SIM_SUPPORTED"; field public static final String EXTRA_PHONE_ACCOUNT_HANDLE = "android.telephony.extra.PHONE_ACCOUNT_HANDLE"; field public static final String EXTRA_SPECIFIC_CARRIER_ID = "android.telephony.extra.SPECIFIC_CARRIER_ID"; field public static final String EXTRA_SPECIFIC_CARRIER_NAME = "android.telephony.extra.SPECIFIC_CARRIER_NAME"; @@ -46062,7 +46061,6 @@ package android.telephony { field public static final int NETWORK_TYPE_UNKNOWN = 0; // 0x0 field public static final int PHONE_TYPE_CDMA = 2; // 0x2 field public static final int PHONE_TYPE_GSM = 1; // 0x1 - field public static final int PHONE_TYPE_IMS = 5; // 0x5 field public static final int PHONE_TYPE_NONE = 0; // 0x0 field public static final int PHONE_TYPE_SIP = 3; // 0x3 field public static final int SET_OPPORTUNISTIC_SUB_INACTIVE_SUBSCRIPTION = 2; // 0x2 diff --git a/api/module-lib-current.txt b/api/module-lib-current.txt index 1d646d476a77..7d137b90d467 100644 --- a/api/module-lib-current.txt +++ b/api/module-lib-current.txt @@ -29,7 +29,7 @@ package android.net { field @NonNull public static final android.os.Parcelable.Creator<android.net.TetheredClient.AddressInfo> CREATOR; } - public class TetheringConstants { + public final class TetheringConstants { field public static final String EXTRA_ADD_TETHER_TYPE = "extraAddTetherType"; field public static final String EXTRA_PROVISION_CALLBACK = "extraProvisionCallback"; field public static final String EXTRA_REM_TETHER_TYPE = "extraRemTetherType"; diff --git a/api/system-current.txt b/api/system-current.txt index 4191c55c3752..13b3d31765d4 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -134,6 +134,7 @@ package android { field public static final String NETWORK_SETUP_WIZARD = "android.permission.NETWORK_SETUP_WIZARD"; field public static final String NETWORK_SIGNAL_STRENGTH_WAKEUP = "android.permission.NETWORK_SIGNAL_STRENGTH_WAKEUP"; field public static final String NETWORK_STACK = "android.permission.NETWORK_STACK"; + field public static final String NETWORK_STATS_PROVIDER = "android.permission.NETWORK_STATS_PROVIDER"; 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"; @@ -186,7 +187,7 @@ package android { field public static final String REVIEW_ACCESSIBILITY_SERVICES = "android.permission.REVIEW_ACCESSIBILITY_SERVICES"; field public static final String REVOKE_RUNTIME_PERMISSIONS = "android.permission.REVOKE_RUNTIME_PERMISSIONS"; field public static final String SCORE_NETWORKS = "android.permission.SCORE_NETWORKS"; - field public static final String SECURE_ELEMENT_PRIVILEGED = "android.permission.SECURE_ELEMENT_PRIVILEGED"; + field public static final String SECURE_ELEMENT_PRIVILEGED_OPERATION = "android.permission.SECURE_ELEMENT_PRIVILEGED_OPERATION"; field public static final String SEND_DEVICE_CUSTOMIZATION_READY = "android.permission.SEND_DEVICE_CUSTOMIZATION_READY"; field public static final String SEND_SHOW_SUSPENDED_APP_DETAILS = "android.permission.SEND_SHOW_SUSPENDED_APP_DETAILS"; field public static final String SEND_SMS_NO_CONFIRMATION = "android.permission.SEND_SMS_NO_CONFIRMATION"; @@ -998,8 +999,8 @@ package android.app.compat { public final class CompatChanges { method public static boolean isChangeEnabled(long); - method public static boolean isChangeEnabled(long, @NonNull String, @NonNull android.os.UserHandle); - method public static boolean isChangeEnabled(long, int); + method @RequiresPermission(allOf={"android.permission.READ_COMPAT_CHANGE_CONFIG", "android.permission.LOG_COMPAT_CHANGE"}) public static boolean isChangeEnabled(long, @NonNull String, @NonNull android.os.UserHandle); + method @RequiresPermission(allOf={"android.permission.READ_COMPAT_CHANGE_CONFIG", "android.permission.LOG_COMPAT_CHANGE"}) public static boolean isChangeEnabled(long, int); } } @@ -1239,7 +1240,8 @@ package android.app.usage { } public class NetworkStatsManager { - method @NonNull @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public android.net.netstats.provider.NetworkStatsProviderCallback registerNetworkStatsProvider(@NonNull String, @NonNull android.net.netstats.provider.AbstractNetworkStatsProvider); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STATS_PROVIDER, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void registerNetworkStatsProvider(@NonNull String, @NonNull android.net.netstats.provider.NetworkStatsProvider); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STATS_PROVIDER, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void unregisterNetworkStatsProvider(@NonNull android.net.netstats.provider.NetworkStatsProvider); } public static final class UsageEvents.Event { @@ -4556,6 +4558,7 @@ package android.net { public final class LinkProperties implements android.os.Parcelable { ctor public LinkProperties(@Nullable android.net.LinkProperties); + ctor public LinkProperties(@Nullable android.net.LinkProperties, boolean); method public boolean addDnsServer(@NonNull java.net.InetAddress); method public boolean addLinkAddress(@NonNull android.net.LinkAddress); method public boolean addPcscfServer(@NonNull java.net.InetAddress); @@ -4578,7 +4581,6 @@ package android.net { method public boolean isIpv6Provisioned(); method public boolean isProvisioned(); method public boolean isReachable(@NonNull java.net.InetAddress); - method @NonNull public android.net.LinkProperties makeSensitiveFieldsParcelingCopy(); method public boolean removeDnsServer(@NonNull java.net.InetAddress); method public boolean removeLinkAddress(@NonNull android.net.LinkAddress); method public boolean removeRoute(@NonNull android.net.RouteInfo); @@ -4780,7 +4782,6 @@ package android.net { field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkStats> CREATOR; field public static final int DEFAULT_NETWORK_NO = 0; // 0x0 field public static final int DEFAULT_NETWORK_YES = 1; // 0x1 - field @Nullable public static final String IFACE_ALL; field public static final String IFACE_VT = "vt_data0"; field public static final int METERED_NO = 0; // 0x0 field public static final int METERED_YES = 1; // 0x1 @@ -5180,21 +5181,17 @@ package android.net.metrics { package android.net.netstats.provider { - public abstract class AbstractNetworkStatsProvider { - ctor public AbstractNetworkStatsProvider(); - method public abstract void requestStatsUpdate(int); - method public abstract void setAlert(long); - method public abstract void setLimit(@NonNull String, long); + public abstract class NetworkStatsProvider { + ctor public NetworkStatsProvider(); + method public void notifyAlertReached(); + method public void notifyLimitReached(); + method public void notifyStatsUpdated(int, @NonNull android.net.NetworkStats, @NonNull android.net.NetworkStats); + method public abstract void onRequestStatsUpdate(int); + method public abstract void onSetAlert(long); + method public abstract void onSetLimit(@NonNull String, long); field public static final int QUOTA_UNLIMITED = -1; // 0xffffffff } - public class NetworkStatsProviderCallback { - method public void onAlertReached(); - method public void onLimitReached(); - method public void onStatsUpdated(int, @NonNull android.net.NetworkStats, @NonNull android.net.NetworkStats); - method public void unregister(); - } - } package android.net.sip { @@ -5983,13 +5980,15 @@ package android.os { field public static final String ACTION_UPDATE_CARRIER_PROVISIONING_URLS = "android.intent.action.UPDATE_CARRIER_PROVISIONING_URLS"; field public static final String ACTION_UPDATE_CONVERSATION_ACTIONS = "android.intent.action.UPDATE_CONVERSATION_ACTIONS"; field public static final String ACTION_UPDATE_CT_LOGS = "android.intent.action.UPDATE_CT_LOGS"; - field public static final String ACTION_UPDATE_EMERGENCY_NUMBER_DB = "android.os.action.UPDATE_EMERGENCY_NUMBER_DB"; + field @RequiresPermission("android.permission.UPDATE_CONFIG") public static final String ACTION_UPDATE_EMERGENCY_NUMBER_DB = "android.os.action.UPDATE_EMERGENCY_NUMBER_DB"; field public static final String ACTION_UPDATE_INTENT_FIREWALL = "android.intent.action.UPDATE_INTENT_FIREWALL"; field public static final String ACTION_UPDATE_LANG_ID = "android.intent.action.UPDATE_LANG_ID"; field public static final String ACTION_UPDATE_NETWORK_WATCHLIST = "android.intent.action.UPDATE_NETWORK_WATCHLIST"; field public static final String ACTION_UPDATE_PINS = "android.intent.action.UPDATE_PINS"; field public static final String ACTION_UPDATE_SMART_SELECTION = "android.intent.action.UPDATE_SMART_SELECTION"; field public static final String ACTION_UPDATE_SMS_SHORT_CODES = "android.intent.action.UPDATE_SMS_SHORT_CODES"; + field public static final String EXTRA_REQUIRED_HASH = "android.os.extra.REQUIRED_HASH"; + field public static final String EXTRA_VERSION = "android.os.extra.VERSION"; } public class Environment { @@ -6645,18 +6644,6 @@ 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"; @@ -7129,7 +7116,7 @@ package android.provider { package android.se.omapi { public final class Reader { - method @RequiresPermission(android.Manifest.permission.SECURE_ELEMENT_PRIVILEGED) public boolean reset(); + method @RequiresPermission(android.Manifest.permission.SECURE_ELEMENT_PRIVILEGED_OPERATION) public boolean reset(); } } @@ -8958,19 +8945,6 @@ package android.telephony { field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int LISTEN_VOICE_ACTIVATION_STATE = 131072; // 0x20000 } - public final class PinResult implements android.os.Parcelable { - ctor public PinResult(int, int); - method public int describeContents(); - method public int getAttemptsRemaining(); - method @NonNull public static android.telephony.PinResult getDefaultFailedResult(); - method public int getType(); - method public void writeToParcel(@NonNull android.os.Parcel, int); - field @NonNull public static final android.os.Parcelable.Creator<android.telephony.PinResult> CREATOR; - field public static final int PIN_RESULT_TYPE_FAILURE = 2; // 0x2 - field public static final int PIN_RESULT_TYPE_INCORRECT = 1; // 0x1 - field public static final int PIN_RESULT_TYPE_SUCCESS = 0; // 0x0 - } - public final class PreciseCallState implements android.os.Parcelable { ctor public PreciseCallState(int, int, int, int, int); method public int describeContents(); @@ -9099,10 +9073,8 @@ package android.telephony { } public class ServiceState implements android.os.Parcelable { - method @NonNull public android.telephony.ServiceState createLocationInfoSanitizedCopy(boolean); method public void fillInNotifierBundle(@NonNull android.os.Bundle); method public int getDataNetworkType(); - method public int getDataRegistrationState(); method public boolean getDataRoamingFromRegistration(); method @Nullable public android.telephony.NetworkRegistrationInfo getNetworkRegistrationInfo(int, int); method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoListForDomain(int); @@ -9269,7 +9241,7 @@ package android.telephony { public class SubscriptionManager { method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean canDisablePhysicalSubscription(); - method public boolean canManageSubscription(@Nullable android.telephony.SubscriptionInfo, @Nullable String); + method public boolean canManageSubscription(@NonNull android.telephony.SubscriptionInfo, @NonNull String); method @NonNull public int[] getActiveAndHiddenSubscriptionIdList(); method @NonNull public int[] getActiveSubscriptionIdList(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.SubscriptionInfo getActiveSubscriptionInfoForIcc(@NonNull String); @@ -9284,7 +9256,7 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDefaultVoiceSubscriptionId(int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setPreferredDataSubscriptionId(int, boolean, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setSubscriptionEnabled(int, boolean); - method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUiccApplicationsEnabled(boolean, int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUiccApplicationsEnabled(int, boolean); field @RequiresPermission(android.Manifest.permission.MANAGE_SUBSCRIPTION_PLANS) public static final String ACTION_SUBSCRIPTION_PLANS_CHANGED = "android.telephony.action.SUBSCRIPTION_PLANS_CHANGED"; field @NonNull public static final android.net.Uri ADVANCED_CALLING_ENABLED_CONTENT_URI; field public static final int PROFILE_CLASS_DEFAULT = -1; // 0xffffffff @@ -9352,7 +9324,6 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String getCdmaMin(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String getCdmaMin(int); method public String getCdmaPrlVersion(); - method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getCdmaRoamingMode(); method public int getCurrentPhoneType(); method public int getCurrentPhoneType(int); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getDataActivationState(); @@ -9362,14 +9333,13 @@ package android.telephony { method @NonNull public java.util.List<android.telephony.data.ApnSetting> getDevicePolicyOverrideApns(@NonNull android.content.Context); method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getDeviceSoftwareVersion(int); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean getEmergencyCallbackMode(); - method public int getEmergencyNumberDbVersion(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getEmergencyNumberDbVersion(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimDomain(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String[] getIsimImpu(); method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimIst(); method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.Map<java.lang.Integer,java.lang.Integer> getLogicalToPhysicalSlotMapping(); method public int getMaxNumberOfSimultaneouslyActiveSims(); method public static long getMaxNumberVerificationTimeoutMillis(); - method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getNetworkCountryIso(int); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public long getPreferredNetworkTypeBitmask(); method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public int getRadioPowerState(); method public int getSimApplicationState(); @@ -9391,8 +9361,7 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isAnyRadioPoweredOn(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isApplicationOnUicc(int); method public boolean isCurrentSimOperator(@NonNull String, int, @Nullable String); - method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataAllowedInVoiceCall(); - method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataConnectionEnabled(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataConnectionAllowed(); method public boolean isDataConnectivityPossible(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataEnabledForApn(int); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isEmergencyAssistanceEnabled(); @@ -9421,6 +9390,7 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void resetAllCarrierActions(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void resetCarrierKeysForImsiEncryption(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void resetIms(int); + method @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public void resetOtaEmergencyNumberDbFilePath(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean resetRadioConfig(); method @RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL) public void resetSettings(); method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setAllowedCarriers(int, java.util.List<android.service.carrier.CarrierIdentifier>); @@ -9431,10 +9401,7 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setCallWaitingStatus(boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCarrierDataEnabled(boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setCarrierRestrictionRules(@NonNull android.telephony.CarrierRestrictionRules); - method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setCdmaRoamingMode(int); - method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setCdmaSubscriptionMode(int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataActivationState(int); - method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setDataAllowedDuringVoiceCall(boolean); method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataEnabled(int, boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataRoamingEnabled(boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setIccLockEnabled(boolean, @NonNull String); @@ -9453,15 +9420,13 @@ package android.telephony { method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoiceActivationState(int); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void shutdownAllRadios(); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean supplyPin(String); - method @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public android.telephony.PinResult supplyPinReportPinResult(@NonNull String); method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int[] supplyPinReportResult(String); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean supplyPuk(String, String); - method @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public android.telephony.PinResult supplyPukReportPinResult(@NonNull String, @NonNull String); method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int[] supplyPukReportResult(String, String); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean switchSlots(int[]); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void toggleRadioOnOff(); + method @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public void updateOtaEmergencyNumberDbFilePath(@NonNull android.os.ParcelFileDescriptor); method public void updateServiceLocation(); - method @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public void updateTestOtaEmergencyNumberDbFilePath(@NonNull String); field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final String ACTION_ANOMALY_REPORTED = "android.telephony.action.ANOMALY_REPORTED"; field public static final String ACTION_CARRIER_SIGNAL_DEFAULT_NETWORK_AVAILABLE = "com.android.internal.telephony.CARRIER_SIGNAL_DEFAULT_NETWORK_AVAILABLE"; field public static final String ACTION_CARRIER_SIGNAL_PCO_VALUE = "com.android.internal.telephony.CARRIER_SIGNAL_PCO_VALUE"; @@ -9486,9 +9451,6 @@ package android.telephony { field public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1; // 0x1 field public static final int CARRIER_PRIVILEGE_STATUS_NO_ACCESS = 0; // 0x0 field public static final int CARRIER_PRIVILEGE_STATUS_RULES_NOT_LOADED = -1; // 0xffffffff - field public static final int CDMA_SUBSCRIPTION_NV = 1; // 0x1 - field public static final int CDMA_SUBSCRIPTION_RUIM_SIM = 0; // 0x0 - field public static final int CDMA_SUBSCRIPTION_UNKNOWN = -1; // 0xffffffff field public static final int CHANGE_ICC_LOCK_SUCCESS = 2147483647; // 0x7fffffff field public static final String EXTRA_ANOMALY_DESCRIPTION = "android.telephony.extra.ANOMALY_DESCRIPTION"; field public static final String EXTRA_ANOMALY_ID = "android.telephony.extra.ANOMALY_ID"; @@ -9545,7 +9507,6 @@ package android.telephony { field public static final long NETWORK_TYPE_BITMASK_TD_SCDMA = 65536L; // 0x10000L field public static final long NETWORK_TYPE_BITMASK_UMTS = 4L; // 0x4L field public static final long NETWORK_TYPE_BITMASK_UNKNOWN = 0L; // 0x0L - field public static final int PHONE_TYPE_THIRD_PARTY = 4; // 0x4 field public static final int RADIO_POWER_OFF = 0; // 0x0 field public static final int RADIO_POWER_ON = 1; // 0x1 field public static final int RADIO_POWER_UNAVAILABLE = 2; // 0x2 @@ -9625,23 +9586,6 @@ package android.telephony.cdma { package android.telephony.data { - public class ApnSetting implements android.os.Parcelable { - method @NonNull public static String getApnTypesStringFromBitmask(int); - field public static final String TYPE_ALL_STRING = "*"; - field public static final String TYPE_CBS_STRING = "cbs"; - field public static final String TYPE_DEFAULT_STRING = "default"; - field public static final String TYPE_DUN_STRING = "dun"; - field public static final String TYPE_EMERGENCY_STRING = "emergency"; - field public static final String TYPE_FOTA_STRING = "fota"; - field public static final String TYPE_HIPRI_STRING = "hipri"; - field public static final String TYPE_IA_STRING = "ia"; - field public static final String TYPE_IMS_STRING = "ims"; - field public static final String TYPE_MCX_STRING = "mcx"; - field public static final String TYPE_MMS_STRING = "mms"; - field public static final String TYPE_SUPL_STRING = "supl"; - field public static final String TYPE_XCAP_STRING = "xcap"; - } - public final class DataCallResponse implements android.os.Parcelable { method public int describeContents(); method @NonNull public java.util.List<android.net.LinkAddress> getAddresses(); diff --git a/api/test-current.txt b/api/test-current.txt index 0c7db06bc0ba..14daeb872eed 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -62,6 +62,7 @@ package android.app { method @RequiresPermission(android.Manifest.permission.PACKAGE_USAGE_STATS) public void removeOnUidImportanceListener(android.app.ActivityManager.OnUidImportanceListener); method public static void resumeAppSwitches() throws android.os.RemoteException; method @RequiresPermission(android.Manifest.permission.CHANGE_CONFIGURATION) public void scheduleApplicationInfoChanged(java.util.List<java.lang.String>, int); + method @RequiresPermission(android.Manifest.permission.CHANGE_CONFIGURATION) public boolean updateMccMncConfiguration(@NonNull String, @NonNull String); } public static interface ActivityManager.OnUidImportanceListener { @@ -1477,6 +1478,7 @@ package android.net { public final class LinkProperties implements android.os.Parcelable { ctor public LinkProperties(@Nullable android.net.LinkProperties); + ctor public LinkProperties(@Nullable android.net.LinkProperties, boolean); method public boolean addDnsServer(@NonNull java.net.InetAddress); method public boolean addLinkAddress(@NonNull android.net.LinkAddress); method @Nullable public android.net.Uri getCaptivePortalApiUrl(); @@ -1491,7 +1493,6 @@ package android.net { method public boolean isIpv6Provisioned(); method public boolean isProvisioned(); method public boolean isReachable(@NonNull java.net.InetAddress); - method @NonNull public android.net.LinkProperties makeSensitiveFieldsParcelingCopy(); method public boolean removeDnsServer(@NonNull java.net.InetAddress); method public boolean removeLinkAddress(@NonNull android.net.LinkAddress); method public boolean removeRoute(@NonNull android.net.RouteInfo); @@ -3244,17 +3245,17 @@ package android.telephony { method public java.util.List<java.lang.String> getCarrierPackageNamesForIntent(android.content.Intent); method @Nullable public static android.content.ComponentName getDefaultRespondViaMessageApplication(@NonNull android.content.Context, boolean); method @NonNull public java.util.List<android.telephony.data.ApnSetting> getDevicePolicyOverrideApns(@NonNull android.content.Context); - method public int getEmergencyNumberDbVersion(); + method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public int getEmergencyNumberDbVersion(); method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getLine1AlphaTag(); - method @NonNull @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getNetworkCountryIso(int); method public android.util.Pair<java.lang.Integer,java.lang.Integer> getRadioHalVersion(); method public boolean modifyDevicePolicyOverrideApn(@NonNull android.content.Context, int, @NonNull android.telephony.data.ApnSetting); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void refreshUiccProfile(); + method @RequiresPermission("android.permission.READ_ACTIVE_EMERGENCY_SESSION") public void resetOtaEmergencyNumberDbFilePath(); method @Deprecated public void setCarrierTestOverride(String, String, String, String, String, String, String); method public void setCarrierTestOverride(String, String, String, String, String, String, String, String, String); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSystemSelectionChannels(@NonNull java.util.List<android.telephony.RadioAccessSpecifier>, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSystemSelectionChannels(@NonNull java.util.List<android.telephony.RadioAccessSpecifier>); - method @RequiresPermission("android.permission.READ_ACTIVE_EMERGENCY_SESSION") public void updateTestOtaEmergencyNumberDbFilePath(@NonNull String); + method @RequiresPermission("android.permission.READ_ACTIVE_EMERGENCY_SESSION") public void updateOtaEmergencyNumberDbFilePath(@NonNull android.os.ParcelFileDescriptor); field public static final int CARRIER_PRIVILEGE_STATUS_ERROR_LOADING_RULES = -2; // 0xfffffffe field public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1; // 0x1 field public static final int CARRIER_PRIVILEGE_STATUS_NO_ACCESS = 0; // 0x0 diff --git a/config/preloaded-classes-blacklist b/config/preloaded-classes-blacklist index 7cfde8a119f2..5e54559d4b9b 100644 --- a/config/preloaded-classes-blacklist +++ b/config/preloaded-classes-blacklist @@ -4,4 +4,4 @@ android.os.AsyncTask android.os.FileObserver android.speech.tts.TextToSpeech$Connection$SetupConnectionAsyncTask android.widget.Magnifier -sun.nio.fs.UnixChannelFactory + diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index ae1b0ccf4b6d..1e50077e1dc9 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -3881,6 +3881,7 @@ public class ActivityManager { * @hide */ @SystemApi + @TestApi @RequiresPermission(android.Manifest.permission.CHANGE_CONFIGURATION) public boolean updateMccMncConfiguration(@NonNull String mcc, @NonNull String mnc) { if (mcc == null || mnc == null) { diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 5afd82f198a7..dee013c98546 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -5311,6 +5311,10 @@ public class DevicePolicyManager { throwIfParentInstance("isAlwaysOnVpnLockdownEnabled"); if (mService != null) { try { + // Starting from Android R, the caller can pass the permission check in + // DevicePolicyManagerService if it holds android.permission.MAINLINE_NETWORK_STACK. + // Note that the android.permission.MAINLINE_NETWORK_STACK is a signature permission + // which is used by the NetworkStack mainline module. return mService.isAlwaysOnVpnLockdownEnabled(admin); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); diff --git a/core/java/android/app/compat/CompatChanges.java b/core/java/android/app/compat/CompatChanges.java index e289a2775b79..6689507daadc 100644 --- a/core/java/android/app/compat/CompatChanges.java +++ b/core/java/android/app/compat/CompatChanges.java @@ -17,6 +17,7 @@ package android.app.compat; import android.annotation.NonNull; +import android.annotation.RequiresPermission; import android.annotation.SystemApi; import android.compat.Compatibility; import android.content.Context; @@ -59,14 +60,13 @@ public final class CompatChanges { * <p> Note that this involves a binder call to the system server (unless running in the system * server). If the binder call fails, a {@code RuntimeException} will be thrown. * - * <p> Caller must have android.permission.READ_COMPAT_CHANGE_CONFIG permission. If it - * doesn't, a {@code RuntimeException} will be thrown. - * * @param changeId The ID of the compatibility change in question. * @param packageName The package name of the app in question. * @param user The user that the operation is done for. * @return {@code true} if the change is enabled for the current app. */ + @RequiresPermission(allOf = {android.Manifest.permission.READ_COMPAT_CHANGE_CONFIG, + android.Manifest.permission.LOG_COMPAT_CHANGE}) public static boolean isChangeEnabled(long changeId, @NonNull String packageName, @NonNull UserHandle user) { IPlatformCompat platformCompat = IPlatformCompat.Stub.asInterface( @@ -89,9 +89,6 @@ public final class CompatChanges { * <p> Note that this involves a binder call to the system server (unless running in the system * server). If the binder call fails, {@code RuntimeException} will be thrown. * - * <p> Caller must have android.permission.READ_COMPAT_CHANGE_CONFIG permission. If it - * doesn't, a {@code RuntimeException} will be thrown. - * * <p> Returns {@code true} if there are no installed packages for the required UID, or if the * change is enabled for ALL of the installed packages associated with the provided UID. Please * use a more specific API if you want a different behaviour for multi-package UIDs. @@ -100,6 +97,8 @@ public final class CompatChanges { * @param uid The UID of the app in question. * @return {@code true} if the change is enabled for the current app. */ + @RequiresPermission(allOf = {android.Manifest.permission.READ_COMPAT_CHANGE_CONFIG, + android.Manifest.permission.LOG_COMPAT_CHANGE}) public static boolean isChangeEnabled(long changeId, int uid) { IPlatformCompat platformCompat = IPlatformCompat.Stub.asInterface( ServiceManager.getService(Context.PLATFORM_COMPAT_SERVICE)); diff --git a/core/java/android/app/role/OWNERS b/core/java/android/app/role/OWNERS new file mode 100644 index 000000000000..b94d98827d71 --- /dev/null +++ b/core/java/android/app/role/OWNERS @@ -0,0 +1,6 @@ +svetoslavganov@google.com +moltmann@google.com +zhanghai@google.com +evanseverson@google.com +eugenesusla@google.com +ntmyren@google.com diff --git a/core/java/android/app/usage/NetworkStatsManager.java b/core/java/android/app/usage/NetworkStatsManager.java index 5b98188300c9..d6e77624a967 100644 --- a/core/java/android/app/usage/NetworkStatsManager.java +++ b/core/java/android/app/usage/NetworkStatsManager.java @@ -29,10 +29,10 @@ import android.net.ConnectivityManager; import android.net.DataUsageRequest; import android.net.INetworkStatsService; import android.net.NetworkIdentity; +import android.net.NetworkStack; import android.net.NetworkTemplate; -import android.net.netstats.provider.AbstractNetworkStatsProvider; -import android.net.netstats.provider.NetworkStatsProviderCallback; -import android.net.netstats.provider.NetworkStatsProviderWrapper; +import android.net.netstats.provider.INetworkStatsProviderCallback; +import android.net.netstats.provider.NetworkStatsProvider; import android.os.Binder; import android.os.Handler; import android.os.Looper; @@ -527,32 +527,53 @@ public class NetworkStatsManager { /** * Registers a custom provider of {@link android.net.NetworkStats} to provide network statistics - * to the system. To unregister, invoke {@link NetworkStatsProviderCallback#unregister()}. + * to the system. To unregister, invoke {@link #unregisterNetworkStatsProvider}. * Note that no de-duplication of statistics between providers is performed, so each provider - * must only report network traffic that is not being reported by any other provider. + * must only report network traffic that is not being reported by any other provider. Also note + * that the provider cannot be re-registered after unregistering. * * @param tag a human readable identifier of the custom network stats provider. This is only * used for debugging. - * @param provider the subclass of {@link AbstractNetworkStatsProvider} that needs to be + * @param provider the subclass of {@link NetworkStatsProvider} that needs to be * registered to the system. - * @return a {@link NetworkStatsProviderCallback}, which can be used to report events to the - * system or unregister the provider. * @hide */ @SystemApi - @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) - @NonNull public NetworkStatsProviderCallback registerNetworkStatsProvider( + @RequiresPermission(anyOf = { + android.Manifest.permission.NETWORK_STATS_PROVIDER, + NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) + @NonNull public void registerNetworkStatsProvider( @NonNull String tag, - @NonNull AbstractNetworkStatsProvider provider) { + @NonNull NetworkStatsProvider provider) { try { - final NetworkStatsProviderWrapper wrapper = new NetworkStatsProviderWrapper(provider); - return new NetworkStatsProviderCallback( - mService.registerNetworkStatsProvider(tag, wrapper)); + if (provider.getProviderCallbackBinder() != null) { + throw new IllegalArgumentException("provider is already registered"); + } + final INetworkStatsProviderCallback cbBinder = + mService.registerNetworkStatsProvider(tag, provider.getProviderBinder()); + provider.setProviderCallbackBinder(cbBinder); + } catch (RemoteException e) { + e.rethrowAsRuntimeException(); + } + } + + /** + * Unregisters an instance of {@link NetworkStatsProvider}. + * + * @param provider the subclass of {@link NetworkStatsProvider} that needs to be + * unregistered to the system. + * @hide + */ + @SystemApi + @RequiresPermission(anyOf = { + android.Manifest.permission.NETWORK_STATS_PROVIDER, + NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) + @NonNull public void unregisterNetworkStatsProvider(@NonNull NetworkStatsProvider provider) { + try { + provider.getProviderCallbackBinderOrThrow().unregister(); } catch (RemoteException e) { e.rethrowAsRuntimeException(); } - // Unreachable code, but compiler doesn't know about it. - return null; } private static NetworkTemplate createTemplate(int networkType, String subscriberId) { diff --git a/core/java/android/hardware/usb/OWNERS b/core/java/android/hardware/usb/OWNERS new file mode 100644 index 000000000000..8ee72b577f3c --- /dev/null +++ b/core/java/android/hardware/usb/OWNERS @@ -0,0 +1,6 @@ +badhri@google.com +elaurent@google.com +moltmann@google.com +albertccwang@google.com +jameswei@google.com +howardyen@google.com
\ No newline at end of file diff --git a/core/java/android/inputmethodservice/OWNERS b/core/java/android/inputmethodservice/OWNERS new file mode 100644 index 000000000000..444719701df2 --- /dev/null +++ b/core/java/android/inputmethodservice/OWNERS @@ -0,0 +1,3 @@ +set noparent + +include ../../../../services/core/java/com/android/server/inputmethod/OWNERS diff --git a/core/java/android/net/ConnectivityDiagnosticsManager.java b/core/java/android/net/ConnectivityDiagnosticsManager.java index d009144034f0..32df599bb6d1 100644 --- a/core/java/android/net/ConnectivityDiagnosticsManager.java +++ b/core/java/android/net/ConnectivityDiagnosticsManager.java @@ -136,7 +136,7 @@ public class ConnectivityDiagnosticsManager { * {@link #NETWORK_VALIDATION_RESULT_PARTIALLY_VALID}, * {@link #NETWORK_VALIDATION_RESULT_SKIPPED}. * - * @see android.net.NetworkCapabilities#CAPABILITY_VALIDATED + * @see android.net.NetworkCapabilities#NET_CAPABILITY_VALIDATED */ @NetworkValidationResult public static final String KEY_NETWORK_VALIDATION_RESULT = "networkValidationResult"; @@ -368,7 +368,14 @@ public class ConnectivityDiagnosticsManager { /** Class that includes information for a suspected data stall on a specific Network */ public static final class DataStallReport implements Parcelable { + /** + * Indicates that the Data Stall was detected using DNS events. + */ public static final int DETECTION_METHOD_DNS_EVENTS = 1; + + /** + * Indicates that the Data Stall was detected using TCP metrics. + */ public static final int DETECTION_METHOD_TCP_METRICS = 2; /** @hide */ diff --git a/core/java/android/net/ITestNetworkManager.aidl b/core/java/android/net/ITestNetworkManager.aidl index d586038ebb89..2a863adde581 100644 --- a/core/java/android/net/ITestNetworkManager.aidl +++ b/core/java/android/net/ITestNetworkManager.aidl @@ -33,7 +33,7 @@ interface ITestNetworkManager TestNetworkInterface createTapInterface(); void setupTestNetwork(in String iface, in LinkProperties lp, in boolean isMetered, - in IBinder binder); + in int[] administratorUids, in IBinder binder); void teardownTestNetwork(int netId); } diff --git a/core/java/android/net/KeepalivePacketData.java b/core/java/android/net/KeepalivePacketData.java index 2b8b7e69dec9..6c0ba2f63a80 100644 --- a/core/java/android/net/KeepalivePacketData.java +++ b/core/java/android/net/KeepalivePacketData.java @@ -22,7 +22,6 @@ import static android.net.InvalidPacketException.ERROR_INVALID_PORT; import android.annotation.NonNull; import android.annotation.SystemApi; import android.net.util.IpUtils; -import android.os.Parcel; import android.util.Log; import java.net.InetAddress; @@ -30,7 +29,6 @@ import java.net.InetAddress; /** * Represents the actual packets that are sent by the * {@link android.net.SocketKeepalive} API. - * * @hide */ @SystemApi @@ -54,6 +52,9 @@ public class KeepalivePacketData { /** Packet data. A raw byte string of packet data, not including the link-layer header. */ private final byte[] mPacket; + // Note: If you add new fields, please modify the parcelling code in the child classes. + + // This should only be constructed via static factory methods, such as // nattKeepalivePacket. /** @@ -87,21 +88,4 @@ public class KeepalivePacketData { return mPacket.clone(); } - /** @hide */ - public void writeToParcel(Parcel out, int flags) { - out.writeString(srcAddress.getHostAddress()); - out.writeString(dstAddress.getHostAddress()); - out.writeInt(srcPort); - out.writeInt(dstPort); - out.writeByteArray(mPacket); - } - - /** @hide */ - protected KeepalivePacketData(Parcel in) { - srcAddress = NetworkUtils.numericToInetAddress(in.readString()); - dstAddress = NetworkUtils.numericToInetAddress(in.readString()); - srcPort = in.readInt(); - dstPort = in.readInt(); - mPacket = in.createByteArray(); - } } diff --git a/core/java/android/net/LinkProperties.java b/core/java/android/net/LinkProperties.java index 732ceb560cab..fe3f91940e2b 100644 --- a/core/java/android/net/LinkProperties.java +++ b/core/java/android/net/LinkProperties.java @@ -167,7 +167,19 @@ public final class LinkProperties implements Parcelable { this(source, false /* parcelSensitiveFields */); } - private LinkProperties(@Nullable LinkProperties source, boolean parcelSensitiveFields) { + /** + * Create a copy of a {@link LinkProperties} that may preserve fields that were set + * based on the permissions of the process that originally received it. + * + * <p>By default {@link LinkProperties} does not preserve such fields during parceling, as + * they should not be shared outside of the process that receives them without appropriate + * checks. + * @param parcelSensitiveFields Whether the sensitive fields should be kept when parceling + * @hide + */ + @SystemApi + @TestApi + public LinkProperties(@Nullable LinkProperties source, boolean parcelSensitiveFields) { mParcelSensitiveFields = parcelSensitiveFields; if (source == null) return; mIfaceName = source.mIfaceName; @@ -1561,22 +1573,6 @@ public final class LinkProperties implements Parcelable { } /** - * Create a copy of this {@link LinkProperties} that will preserve fields that were set - * based on the permissions of the process that received this {@link LinkProperties}. - * - * <p>By default {@link LinkProperties} does not preserve such fields during parceling, as - * they should not be shared outside of the process that receives them without appropriate - * checks. - * @hide - */ - @SystemApi - @TestApi - @NonNull - public LinkProperties makeSensitiveFieldsParcelingCopy() { - return new LinkProperties(this, true /* parcelSensitiveFields */); - } - - /** * Compares this {@code LinkProperties} instance against the target * LinkProperties in {@code obj}. Two LinkPropertieses are equal if * all their fields are equal in values. diff --git a/core/java/android/net/Network.java b/core/java/android/net/Network.java index 8d1ab332ce12..c145b2bc1881 100644 --- a/core/java/android/net/Network.java +++ b/core/java/android/net/Network.java @@ -61,6 +61,7 @@ import javax.net.SocketFactory; public class Network implements Parcelable { /** + * The unique id of the network. * @hide */ @SystemApi diff --git a/core/java/android/net/NetworkStats.java b/core/java/android/net/NetworkStats.java index 2f536ffd8ca6..0fc74b089409 100644 --- a/core/java/android/net/NetworkStats.java +++ b/core/java/android/net/NetworkStats.java @@ -21,7 +21,6 @@ import static android.os.Process.CLAT_UID; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; -import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.compat.annotation.UnsupportedAppUsage; import android.os.Parcel; @@ -58,9 +57,12 @@ import java.util.function.Predicate; public final class NetworkStats implements Parcelable { private static final String TAG = "NetworkStats"; - /** {@link #iface} value when interface details unavailable. */ - @SuppressLint("CompileTimeConstant") + /** + * {@link #iface} value when interface details unavailable. + * @hide + */ @Nullable public static final String IFACE_ALL = null; + /** * Virtual network interface for video telephony. This is for VT data usage counting * purpose. @@ -248,7 +250,13 @@ public final class NetworkStats implements Parcelable { @UnsupportedAppUsage private long[] operations; - /** @hide */ + /** + * Basic element of network statistics. Contains the number of packets and number of bytes + * transferred on both directions in a given set of conditions. See + * {@link Entry#Entry(String, int, int, int, int, int, int, long, long, long, long, long)}. + * + * @hide + */ @SystemApi public static class Entry { /** @hide */ @@ -319,6 +327,35 @@ public final class NetworkStats implements Parcelable { rxBytes, rxPackets, txBytes, txPackets, operations); } + /** + * Construct a {@link Entry} object by giving statistics of packet and byte transferred on + * both direction, and associated with a set of given conditions. + * + * @param iface interface name of this {@link Entry}. Or null if not specified. + * @param uid uid of this {@link Entry}. {@link #UID_TETHERING} if this {@link Entry} is + * for tethering. Or {@link #UID_ALL} if this {@link NetworkStats} is only + * counting iface stats. + * @param set usage state of this {@link Entry}. Should be one of the following + * values: {@link #SET_DEFAULT}, {@link #SET_FOREGROUND}. + * @param tag tag of this {@link Entry}. + * @param metered metered state of this {@link Entry}. Should be one of the following + * values: {link #METERED_YES}, {link #METERED_NO}. + * @param roaming roaming state of this {@link Entry}. Should be one of the following + * values: {link #ROAMING_YES}, {link #ROAMING_NO}. + * @param defaultNetwork default network status of this {@link Entry}. Should be one + * of the following values: {link #DEFAULT_NETWORK_YES}, + * {link #DEFAULT_NETWORK_NO}. + * @param rxBytes Number of bytes received for this {@link Entry}. Statistics should + * represent the contents of IP packets, including IP headers. + * @param rxPackets Number of packets received for this {@link Entry}. Statistics should + * represent the contents of IP packets, including IP headers. + * @param txBytes Number of bytes transmitted for this {@link Entry}. Statistics should + * represent the contents of IP packets, including IP headers. + * @param txPackets Number of bytes transmitted for this {@link Entry}. Statistics should + * represent the contents of IP packets, including IP headers. + * @param operations count of network operations performed for this {@link Entry}. This can + * be used to derive bytes-per-operation. + */ public Entry(@Nullable String iface, int uid, @State int set, int tag, @Meteredness int metered, @Roaming int roaming, @DefaultNetwork int defaultNetwork, long rxBytes, long rxPackets, long txBytes, long txPackets, long operations) { @@ -466,7 +503,7 @@ public final class NetworkStats implements Parcelable { NetworkStats.Entry entry = null; for (int i = 0; i < size; i++) { entry = getValues(i, entry); - clone.addEntry(entry); + clone.insertEntry(entry); } return clone; } @@ -493,26 +530,26 @@ public final class NetworkStats implements Parcelable { /** @hide */ @VisibleForTesting - public NetworkStats addIfaceValues( + public NetworkStats insertEntry( String iface, long rxBytes, long rxPackets, long txBytes, long txPackets) { - return addEntry( + return insertEntry( iface, UID_ALL, SET_DEFAULT, TAG_NONE, rxBytes, rxPackets, txBytes, txPackets, 0L); } /** @hide */ @VisibleForTesting - public NetworkStats addEntry(String iface, int uid, int set, int tag, long rxBytes, + public NetworkStats insertEntry(String iface, int uid, int set, int tag, long rxBytes, long rxPackets, long txBytes, long txPackets, long operations) { - return addEntry(new Entry( + return insertEntry(new Entry( iface, uid, set, tag, rxBytes, rxPackets, txBytes, txPackets, operations)); } /** @hide */ @VisibleForTesting - public NetworkStats addEntry(String iface, int uid, int set, int tag, int metered, int roaming, - int defaultNetwork, long rxBytes, long rxPackets, long txBytes, long txPackets, - long operations) { - return addEntry(new Entry( + public NetworkStats insertEntry(String iface, int uid, int set, int tag, int metered, + int roaming, int defaultNetwork, long rxBytes, long rxPackets, long txBytes, + long txPackets, long operations) { + return insertEntry(new Entry( iface, uid, set, tag, metered, roaming, defaultNetwork, rxBytes, rxPackets, txBytes, txPackets, operations)); } @@ -522,7 +559,7 @@ public final class NetworkStats implements Parcelable { * object can be recycled across multiple calls. * @hide */ - public NetworkStats addEntry(Entry entry) { + public NetworkStats insertEntry(Entry entry) { if (size >= capacity) { final int newLength = Math.max(size, 10) * 3 / 2; iface = Arrays.copyOf(iface, newLength); @@ -665,7 +702,7 @@ public final class NetworkStats implements Parcelable { entry.roaming, entry.defaultNetwork); if (i == -1) { // only create new entry when positive contribution - addEntry(entry); + insertEntry(entry); } else { rxBytes[i] += entry.rxBytes; rxPackets[i] += entry.rxPackets; @@ -1003,7 +1040,7 @@ public final class NetworkStats implements Parcelable { entry.operations = Math.max(entry.operations, 0); } - result.addEntry(entry); + result.insertEntry(entry); } return result; diff --git a/core/java/android/net/TestNetworkManager.java b/core/java/android/net/TestNetworkManager.java index 4ac4a69e4b1b..c3284df39713 100644 --- a/core/java/android/net/TestNetworkManager.java +++ b/core/java/android/net/TestNetworkManager.java @@ -16,6 +16,7 @@ package android.net; import android.annotation.NonNull; +import android.annotation.Nullable; import android.annotation.TestApi; import android.os.IBinder; import android.os.RemoteException; @@ -53,6 +54,19 @@ public class TestNetworkManager { } } + private void setupTestNetwork( + @NonNull String iface, + @Nullable LinkProperties lp, + boolean isMetered, + @NonNull int[] administratorUids, + @NonNull IBinder binder) { + try { + mService.setupTestNetwork(iface, lp, isMetered, administratorUids, binder); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + /** * Sets up a capability-limited, testing-only network for a given interface * @@ -66,11 +80,7 @@ public class TestNetworkManager { public void setupTestNetwork( @NonNull LinkProperties lp, boolean isMetered, @NonNull IBinder binder) { Preconditions.checkNotNull(lp, "Invalid LinkProperties"); - try { - mService.setupTestNetwork(lp.getInterfaceName(), lp, isMetered, binder); - } catch (RemoteException e) { - throw e.rethrowFromSystemServer(); - } + setupTestNetwork(lp.getInterfaceName(), lp, isMetered, new int[0], binder); } /** @@ -82,11 +92,21 @@ public class TestNetworkManager { */ @TestApi public void setupTestNetwork(@NonNull String iface, @NonNull IBinder binder) { - try { - mService.setupTestNetwork(iface, null, true, binder); - } catch (RemoteException e) { - throw e.rethrowFromSystemServer(); - } + setupTestNetwork(iface, null, true, new int[0], binder); + } + + /** + * Sets up a capability-limited, testing-only network for a given interface with the given + * administrator UIDs. + * + * @param iface the name of the interface to be used for the Network LinkProperties. + * @param administratorUids The administrator UIDs to be used for the test-only network + * @param binder A binder object guarding the lifecycle of this test network. + * @hide + */ + public void setupTestNetwork( + @NonNull String iface, @NonNull int[] administratorUids, @NonNull IBinder binder) { + setupTestNetwork(iface, null, true, administratorUids, binder); } /** diff --git a/core/java/android/net/netstats/provider/AbstractNetworkStatsProvider.java b/core/java/android/net/netstats/provider/AbstractNetworkStatsProvider.java deleted file mode 100644 index 740aa92ad484..000000000000 --- a/core/java/android/net/netstats/provider/AbstractNetworkStatsProvider.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.net.netstats.provider; - -import android.annotation.NonNull; -import android.annotation.SystemApi; -import android.net.NetworkStats; - -/** - * A base class that allows external modules to implement a custom network statistics provider. - * @hide - */ -@SystemApi -public abstract class AbstractNetworkStatsProvider { - /** - * A value used by {@link #setLimit} and {@link #setAlert} indicates there is no limit. - */ - public static final int QUOTA_UNLIMITED = -1; - - /** - * Called by {@code NetworkStatsService} when global polling is needed. Custom - * implementation of providers MUST respond to it by calling - * {@link NetworkStatsProviderCallback#onStatsUpdated} within one minute. Responding - * later than this may cause the stats to be dropped. - * - * @param token a positive number identifying the new state of the system under which - * {@link NetworkStats} have to be gathered from now on. When this is called, - * custom implementations of providers MUST report the latest stats with the - * previous token, under which stats were being gathered so far. - */ - public abstract void requestStatsUpdate(int token); - - /** - * Called by {@code NetworkStatsService} when setting the interface quota for the specified - * upstream interface. When this is called, the custom implementation should block all egress - * packets on the {@code iface} associated with the provider when {@code quotaBytes} bytes have - * been reached, and MUST respond to it by calling - * {@link NetworkStatsProviderCallback#onLimitReached()}. - * - * @param iface the interface requiring the operation. - * @param quotaBytes the quota defined as the number of bytes, starting from zero and counting - * from now. A value of {@link #QUOTA_UNLIMITED} indicates there is no limit. - */ - public abstract void setLimit(@NonNull String iface, long quotaBytes); - - /** - * Called by {@code NetworkStatsService} when setting the alert bytes. Custom implementations - * MUST call {@link NetworkStatsProviderCallback#onAlertReached()} when {@code quotaBytes} bytes - * have been reached. Unlike {@link #setLimit(String, long)}, the custom implementation should - * not block all egress packets. - * - * @param quotaBytes the quota defined as the number of bytes, starting from zero and counting - * from now. A value of {@link #QUOTA_UNLIMITED} indicates there is no alert. - */ - public abstract void setAlert(long quotaBytes); -} diff --git a/core/java/android/net/netstats/provider/INetworkStatsProvider.aidl b/core/java/android/net/netstats/provider/INetworkStatsProvider.aidl index 55b3d4edb157..4078b249218c 100644 --- a/core/java/android/net/netstats/provider/INetworkStatsProvider.aidl +++ b/core/java/android/net/netstats/provider/INetworkStatsProvider.aidl @@ -22,7 +22,7 @@ package android.net.netstats.provider; * @hide */ oneway interface INetworkStatsProvider { - void requestStatsUpdate(int token); - void setLimit(String iface, long quotaBytes); - void setAlert(long quotaBytes); + void onRequestStatsUpdate(int token); + void onSetLimit(String iface, long quotaBytes); + void onSetAlert(long quotaBytes); } diff --git a/core/java/android/net/netstats/provider/INetworkStatsProviderCallback.aidl b/core/java/android/net/netstats/provider/INetworkStatsProviderCallback.aidl index 3ea9318f10d4..bd336dd348fe 100644 --- a/core/java/android/net/netstats/provider/INetworkStatsProviderCallback.aidl +++ b/core/java/android/net/netstats/provider/INetworkStatsProviderCallback.aidl @@ -24,8 +24,8 @@ import android.net.NetworkStats; * @hide */ oneway interface INetworkStatsProviderCallback { - void onStatsUpdated(int token, in NetworkStats ifaceStats, in NetworkStats uidStats); - void onAlertReached(); - void onLimitReached(); + void notifyStatsUpdated(int token, in NetworkStats ifaceStats, in NetworkStats uidStats); + void notifyAlertReached(); + void notifyLimitReached(); void unregister(); } diff --git a/core/java/android/net/netstats/provider/NetworkStatsProvider.java b/core/java/android/net/netstats/provider/NetworkStatsProvider.java new file mode 100644 index 000000000000..7639d2244cfe --- /dev/null +++ b/core/java/android/net/netstats/provider/NetworkStatsProvider.java @@ -0,0 +1,195 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.net.netstats.provider; + +import android.annotation.NonNull; +import android.annotation.Nullable; +import android.annotation.SystemApi; +import android.net.NetworkStats; +import android.os.RemoteException; + +/** + * A base class that allows external modules to implement a custom network statistics provider. + * @hide + */ +@SystemApi +public abstract class NetworkStatsProvider { + /** + * A value used by {@link #onSetLimit} and {@link #onSetAlert} indicates there is no limit. + */ + public static final int QUOTA_UNLIMITED = -1; + + @NonNull private final INetworkStatsProvider mProviderBinder = + new INetworkStatsProvider.Stub() { + + @Override + public void onRequestStatsUpdate(int token) { + NetworkStatsProvider.this.onRequestStatsUpdate(token); + } + + @Override + public void onSetLimit(String iface, long quotaBytes) { + NetworkStatsProvider.this.onSetLimit(iface, quotaBytes); + } + + @Override + public void onSetAlert(long quotaBytes) { + NetworkStatsProvider.this.onSetAlert(quotaBytes); + } + }; + + // The binder given by the service when successfully registering. Only null before registering, + // never null once non-null. + @Nullable + private INetworkStatsProviderCallback mProviderCbBinder; + + /** + * Return the binder invoked by the service and redirect function calls to the overridden + * methods. + * @hide + */ + @NonNull + public INetworkStatsProvider getProviderBinder() { + return mProviderBinder; + } + + /** + * Store the binder that was returned by the service when successfully registering. Note that + * the provider cannot be re-registered. Hence this method can only be called once per provider. + * + * @hide + */ + public void setProviderCallbackBinder(@NonNull INetworkStatsProviderCallback binder) { + if (mProviderCbBinder != null) { + throw new IllegalArgumentException("provider is already registered"); + } + mProviderCbBinder = binder; + } + + /** + * Get the binder that was returned by the service when successfully registering. Or null if the + * provider was never registered. + * + * @hide + */ + @Nullable + public INetworkStatsProviderCallback getProviderCallbackBinder() { + return mProviderCbBinder; + } + + /** + * Get the binder that was returned by the service when successfully registering. Throw an + * {@link IllegalStateException} if the provider is not registered. + * + * @hide + */ + @NonNull + public INetworkStatsProviderCallback getProviderCallbackBinderOrThrow() { + if (mProviderCbBinder == null) { + throw new IllegalStateException("the provider is not registered"); + } + return mProviderCbBinder; + } + + /** + * Notify the system of new network statistics. + * + * Send the network statistics recorded since the last call to {@link #notifyStatsUpdated}. Must + * be called as soon as possible after {@link NetworkStatsProvider#onRequestStatsUpdate(int)} + * being called. Responding later increases the probability stats will be dropped. The + * provider can also call this whenever it wants to reports new stats for any reason. + * Note that the system will not necessarily immediately propagate the statistics to + * reflect the update. + * + * @param token the token under which these stats were gathered. Providers can call this method + * with the current token as often as they want, until the token changes. + * {@see NetworkStatsProvider#onRequestStatsUpdate()} + * @param ifaceStats the {@link NetworkStats} per interface to be reported. + * The provider should not include any traffic that is already counted by + * kernel interface counters. + * @param uidStats the same stats as above, but counts {@link NetworkStats} + * per uid. + */ + public void notifyStatsUpdated(int token, @NonNull NetworkStats ifaceStats, + @NonNull NetworkStats uidStats) { + try { + getProviderCallbackBinderOrThrow().notifyStatsUpdated(token, ifaceStats, uidStats); + } catch (RemoteException e) { + e.rethrowAsRuntimeException(); + } + } + + /** + * Notify system that the quota set by {@code onSetAlert} has been reached. + */ + public void notifyAlertReached() { + try { + getProviderCallbackBinderOrThrow().notifyAlertReached(); + } catch (RemoteException e) { + e.rethrowAsRuntimeException(); + } + } + + /** + * Notify system that the quota set by {@code onSetLimit} has been reached. + */ + public void notifyLimitReached() { + try { + getProviderCallbackBinderOrThrow().notifyLimitReached(); + } catch (RemoteException e) { + e.rethrowAsRuntimeException(); + } + } + + /** + * Called by {@code NetworkStatsService} when it requires to know updated stats. + * The provider MUST respond by calling {@link #notifyStatsUpdated} as soon as possible. + * Responding later increases the probability stats will be dropped. Memory allowing, the + * system will try to take stats into account up to one minute after calling + * {@link #onRequestStatsUpdate}. + * + * @param token a positive number identifying the new state of the system under which + * {@link NetworkStats} have to be gathered from now on. When this is called, + * custom implementations of providers MUST tally and report the latest stats with + * the previous token, under which stats were being gathered so far. + */ + public abstract void onRequestStatsUpdate(int token); + + /** + * Called by {@code NetworkStatsService} when setting the interface quota for the specified + * upstream interface. When this is called, the custom implementation should block all egress + * packets on the {@code iface} associated with the provider when {@code quotaBytes} bytes have + * been reached, and MUST respond to it by calling + * {@link NetworkStatsProvider#notifyLimitReached()}. + * + * @param iface the interface requiring the operation. + * @param quotaBytes the quota defined as the number of bytes, starting from zero and counting + * from now. A value of {@link #QUOTA_UNLIMITED} indicates there is no limit. + */ + public abstract void onSetLimit(@NonNull String iface, long quotaBytes); + + /** + * Called by {@code NetworkStatsService} when setting the alert bytes. Custom implementations + * MUST call {@link NetworkStatsProvider#notifyAlertReached()} when {@code quotaBytes} bytes + * have been reached. Unlike {@link #onSetLimit(String, long)}, the custom implementation should + * not block all egress packets. + * + * @param quotaBytes the quota defined as the number of bytes, starting from zero and counting + * from now. A value of {@link #QUOTA_UNLIMITED} indicates there is no alert. + */ + public abstract void onSetAlert(long quotaBytes); +} diff --git a/core/java/android/net/netstats/provider/NetworkStatsProviderCallback.java b/core/java/android/net/netstats/provider/NetworkStatsProviderCallback.java deleted file mode 100644 index e17a8eee7ff0..000000000000 --- a/core/java/android/net/netstats/provider/NetworkStatsProviderCallback.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.net.netstats.provider; - -import android.annotation.NonNull; -import android.annotation.SuppressLint; -import android.annotation.SystemApi; -import android.net.NetworkStats; -import android.os.RemoteException; - -/** - * A callback class that allows callers to report events to the system. - * @hide - */ -@SystemApi -@SuppressLint("CallbackMethodName") -public class NetworkStatsProviderCallback { - @NonNull private final INetworkStatsProviderCallback mBinder; - - /** @hide */ - public NetworkStatsProviderCallback(@NonNull INetworkStatsProviderCallback binder) { - mBinder = binder; - } - - /** - * Notify the system of new network statistics. - * - * Send the network statistics recorded since the last call to {@link #onStatsUpdated}. Must be - * called within one minute of {@link AbstractNetworkStatsProvider#requestStatsUpdate(int)} - * being called. The provider can also call this whenever it wants to reports new stats for any - * reason. Note that the system will not necessarily immediately propagate the statistics to - * reflect the update. - * - * @param token the token under which these stats were gathered. Providers can call this method - * with the current token as often as they want, until the token changes. - * {@see AbstractNetworkStatsProvider#requestStatsUpdate()} - * @param ifaceStats the {@link NetworkStats} per interface to be reported. - * The provider should not include any traffic that is already counted by - * kernel interface counters. - * @param uidStats the same stats as above, but counts {@link NetworkStats} - * per uid. - */ - public void onStatsUpdated(int token, @NonNull NetworkStats ifaceStats, - @NonNull NetworkStats uidStats) { - try { - mBinder.onStatsUpdated(token, ifaceStats, uidStats); - } catch (RemoteException e) { - e.rethrowAsRuntimeException(); - } - } - - /** - * Notify system that the quota set by {@code setAlert} has been reached. - */ - public void onAlertReached() { - try { - mBinder.onAlertReached(); - } catch (RemoteException e) { - e.rethrowAsRuntimeException(); - } - } - - /** - * Notify system that the quota set by {@code setLimit} has been reached. - */ - public void onLimitReached() { - try { - mBinder.onLimitReached(); - } catch (RemoteException e) { - e.rethrowAsRuntimeException(); - } - } - - /** - * Unregister the provider and the referencing callback. - */ - public void unregister() { - try { - mBinder.unregister(); - } catch (RemoteException e) { - // Ignore error. - } - } -} diff --git a/core/java/android/net/netstats/provider/NetworkStatsProviderWrapper.java b/core/java/android/net/netstats/provider/NetworkStatsProviderWrapper.java deleted file mode 100644 index 4bf7c9bc086e..000000000000 --- a/core/java/android/net/netstats/provider/NetworkStatsProviderWrapper.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.net.netstats.provider; - -import android.annotation.NonNull; - -/** - * A wrapper class of {@link INetworkStatsProvider} that hides the binder interface from exposing - * to outer world. - * - * @hide - */ -public class NetworkStatsProviderWrapper extends INetworkStatsProvider.Stub { - @NonNull final AbstractNetworkStatsProvider mProvider; - - public NetworkStatsProviderWrapper(AbstractNetworkStatsProvider provider) { - mProvider = provider; - } - - @Override - public void requestStatsUpdate(int token) { - mProvider.requestStatsUpdate(token); - } - - @Override - public void setLimit(@NonNull String iface, long quotaBytes) { - mProvider.setLimit(iface, quotaBytes); - } - - @Override - public void setAlert(long quotaBytes) { - mProvider.setAlert(quotaBytes); - } -} diff --git a/core/java/android/os/ConfigUpdate.java b/core/java/android/os/ConfigUpdate.java index 9c999b202797..590fbb36a0e8 100644 --- a/core/java/android/os/ConfigUpdate.java +++ b/core/java/android/os/ConfigUpdate.java @@ -16,6 +16,7 @@ package android.os; +import android.annotation.RequiresPermission; import android.annotation.SystemApi; /** @@ -114,20 +115,36 @@ public final class ConfigUpdate { = "android.os.action.UPDATE_CARRIER_ID_DB"; /** - * Broadcast intent action indicating that the updated emergency number database is available. - * <p>Extra: "VERSION" the numeric version of the new data. Devices should only install if the - * update version is newer than the current one. - * <p>Extra: "REQUIRED_HASH" the hash of the current update data. - * <p>Input: {@link android.content.Intent#getData} is URI of downloaded emergency number file. - * Devices should pick up the downloaded file and persist to the database - * {@code com.android.internal.telephony.emergency.EmergencyNumberTracker}. + * Update the emergency number database into the devices. + * <p>Extra: {@link #EXTRA_VERSION} the numeric version of the database. + * <p>Extra: {@link #EXTRA_REQUIRED_HASH} the hash of the database. + * <p>Input: {@link android.content.Intent#getData} the URI to download emergency number + * database. * * @hide */ @SystemApi + @RequiresPermission(android.Manifest.permission.UPDATE_CONFIG) public static final String ACTION_UPDATE_EMERGENCY_NUMBER_DB = "android.os.action.UPDATE_EMERGENCY_NUMBER_DB"; + /** + * An integer to indicate the numeric version of the new data. Devices should only install + * if the update version is newer than the current one. + * + * @hide + */ + @SystemApi + public static final String EXTRA_VERSION = "android.os.extra.VERSION"; + + /** + * A string to indicate the hash of the data. + * + * @hide + */ + @SystemApi + public static final String EXTRA_REQUIRED_HASH = "android.os.extra.REQUIRED_HASH"; + private ConfigUpdate() { } } diff --git a/core/java/android/os/Handler.java b/core/java/android/os/Handler.java index fa7404c5b139..51df971c6e50 100644 --- a/core/java/android/os/Handler.java +++ b/core/java/android/os/Handler.java @@ -792,6 +792,17 @@ public class Handler { } /** + * Remove any pending posts of messages with code 'what' and whose obj is + * 'object' that are in the message queue. If <var>object</var> is null, + * all messages will be removed. + * + *@hide + */ + public final void removeEqualMessages(int what, @Nullable Object object) { + mQueue.removeEqualMessages(this, what, object); + } + + /** * Remove any pending posts of callbacks and sent messages whose * <var>obj</var> is <var>token</var>. If <var>token</var> is null, * all callbacks and messages will be removed. @@ -801,6 +812,16 @@ public class Handler { } /** + * Remove any pending posts of callbacks and sent messages whose + * <var>obj</var> is <var>token</var>. If <var>token</var> is null, + * all callbacks and messages will be removed. + * + *@hide + */ + public final void removeCallbacksAndEqualMessages(@Nullable Object token) { + mQueue.removeCallbacksAndEqualMessages(this, token); + } + /** * Check if there are any pending posts of messages with code 'what' in * the message queue. */ @@ -825,6 +846,16 @@ public class Handler { } /** + * Check if there are any pending posts of messages with code 'what' and + * whose obj is 'object' in the message queue. + * + *@hide + */ + public final boolean hasEqualMessages(int what, @Nullable Object object) { + return mQueue.hasEqualMessages(this, what, object); + } + + /** * Check if there are any pending posts of messages with callback r in * the message queue. */ diff --git a/core/java/android/os/MessageQueue.java b/core/java/android/os/MessageQueue.java index 4e910577dd49..529350461cd8 100644 --- a/core/java/android/os/MessageQueue.java +++ b/core/java/android/os/MessageQueue.java @@ -617,6 +617,23 @@ public final class MessageQueue { } } + boolean hasEqualMessages(Handler h, int what, Object object) { + if (h == null) { + return false; + } + + synchronized (this) { + Message p = mMessages; + while (p != null) { + if (p.target == h && p.what == what && (object == null || object.equals(p.obj))) { + return true; + } + p = p.next; + } + return false; + } + } + @UnsupportedAppUsage boolean hasMessages(Handler h, Runnable r, Object object) { if (h == null) { @@ -686,6 +703,40 @@ public final class MessageQueue { } } + void removeEqualMessages(Handler h, int what, Object object) { + if (h == null) { + return; + } + + synchronized (this) { + Message p = mMessages; + + // Remove all messages at front. + while (p != null && p.target == h && p.what == what + && (object == null || object.equals(p.obj))) { + Message n = p.next; + mMessages = n; + p.recycleUnchecked(); + p = n; + } + + // Remove all messages after front. + while (p != null) { + Message n = p.next; + if (n != null) { + if (n.target == h && n.what == what + && (object == null || object.equals(n.obj))) { + Message nn = n.next; + n.recycleUnchecked(); + p.next = nn; + continue; + } + } + p = n; + } + } + } + void removeMessages(Handler h, Runnable r, Object object) { if (h == null || r == null) { return; @@ -720,6 +771,41 @@ public final class MessageQueue { } } + void removeEqualMessages(Handler h, Runnable r, Object object) { + if (h == null || r == null) { + return; + } + + synchronized (this) { + Message p = mMessages; + + // Remove all messages at front. + while (p != null && p.target == h && p.callback == r + && (object == null || object.equals(p.obj))) { + Message n = p.next; + mMessages = n; + p.recycleUnchecked(); + p = n; + } + + // Remove all messages after front. + while (p != null) { + Message n = p.next; + if (n != null) { + if (n.target == h && n.callback == r + && (object == null || object.equals(n.obj))) { + Message nn = n.next; + n.recycleUnchecked(); + p.next = nn; + continue; + } + } + p = n; + } + } + } + + void removeCallbacksAndMessages(Handler h, Object object) { if (h == null) { return; @@ -753,6 +839,39 @@ public final class MessageQueue { } } + void removeCallbacksAndEqualMessages(Handler h, Object object) { + if (h == null) { + return; + } + + synchronized (this) { + Message p = mMessages; + + // Remove all messages at front. + while (p != null && p.target == h + && (object == null || object.equals(p.obj))) { + Message n = p.next; + mMessages = n; + p.recycleUnchecked(); + p = n; + } + + // Remove all messages after front. + while (p != null) { + Message n = p.next; + if (n != null) { + if (n.target == h && (object == null || object.equals(n.obj))) { + Message nn = n.next; + n.recycleUnchecked(); + p.next = nn; + continue; + } + } + p = n; + } + } + } + private void removeAllMessagesLocked() { Message p = mMessages; while (p != null) { diff --git a/core/java/android/provider/BlockedNumberContract.java b/core/java/android/provider/BlockedNumberContract.java index 1eb76648f7b2..dd2ea81d747b 100644 --- a/core/java/android/provider/BlockedNumberContract.java +++ b/core/java/android/provider/BlockedNumberContract.java @@ -16,7 +16,6 @@ package android.provider; import android.annotation.IntDef; -import android.annotation.SystemApi; import android.annotation.WorkerThread; import android.content.Context; import android.net.Uri; @@ -240,7 +239,6 @@ public class BlockedNumberContract { * blocked. * @hide */ - @SystemApi public static final int STATUS_NOT_BLOCKED = 0; /** @@ -248,7 +246,6 @@ 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; /** @@ -256,7 +253,6 @@ public class BlockedNumberContract { * because it is from a restricted number. * @hide */ - @SystemApi public static final int STATUS_BLOCKED_RESTRICTED = 2; /** @@ -264,7 +260,6 @@ public class BlockedNumberContract { * because it is from an unknown number. * @hide */ - @SystemApi public static final int STATUS_BLOCKED_UNKNOWN_NUMBER = 3; /** @@ -272,7 +267,6 @@ public class BlockedNumberContract { * because it is from a pay phone. * @hide */ - @SystemApi public static final int STATUS_BLOCKED_PAYPHONE = 4; /** @@ -280,14 +274,12 @@ 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 */ @@ -298,31 +290,6 @@ 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 */ @@ -439,11 +406,26 @@ 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/se/omapi/Reader.java b/core/java/android/se/omapi/Reader.java index 7f68d9188650..90c934d189fa 100644 --- a/core/java/android/se/omapi/Reader.java +++ b/core/java/android/se/omapi/Reader.java @@ -160,7 +160,7 @@ public final class Reader { * @hide */ @SystemApi - @RequiresPermission(android.Manifest.permission.SECURE_ELEMENT_PRIVILEGED) + @RequiresPermission(android.Manifest.permission.SECURE_ELEMENT_PRIVILEGED_OPERATION) public boolean reset() { if (!mService.isConnected()) { Log.e(TAG, "service is not connected"); diff --git a/core/java/android/telephony/CellBroadcastIntents.java b/core/java/android/telephony/CellBroadcastIntents.java index 32d330e1a47f..921ad3c74681 100644 --- a/core/java/android/telephony/CellBroadcastIntents.java +++ b/core/java/android/telephony/CellBroadcastIntents.java @@ -81,7 +81,6 @@ public class CellBroadcastIntents { int initialCode, int slotIndex) { Intent backgroundIntent = new Intent(Telephony.Sms.Intents.SMS_CB_RECEIVED_ACTION); backgroundIntent.putExtra(EXTRA_MESSAGE, smsCbMessage); - backgroundIntent.setFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); putPhoneIdAndSubIdExtra(context, backgroundIntent, slotIndex); String receiverPermission = Manifest.permission.RECEIVE_SMS; diff --git a/core/java/android/view/inputmethod/OWNERS b/core/java/android/view/inputmethod/OWNERS new file mode 100644 index 000000000000..244cc30e089e --- /dev/null +++ b/core/java/android/view/inputmethod/OWNERS @@ -0,0 +1,3 @@ +set noparent + +include ../../../../../services/core/java/com/android/server/inputmethod/OWNERS diff --git a/core/java/android/webkit/DateSorter.java b/core/java/android/webkit/DateSorter.java index fede244f2720..90d44db3eff4 100644 --- a/core/java/android/webkit/DateSorter.java +++ b/core/java/android/webkit/DateSorter.java @@ -19,11 +19,11 @@ package android.webkit; import android.content.Context; import android.content.res.Resources; +import com.android.icu.text.DateSorterBridge; + import java.util.Calendar; import java.util.Locale; -import libcore.icu.LocaleData; - /** * Sorts dates into the following groups: * Today @@ -69,9 +69,9 @@ public class DateSorter { if (locale == null) { locale = Locale.getDefault(); } - LocaleData localeData = LocaleData.get(locale); - mLabels[0] = localeData.today; - mLabels[1] = localeData.yesterday; + DateSorterBridge dateSorterBridge = DateSorterBridge.createInstance(locale); + mLabels[0] = dateSorterBridge.getToday(); + mLabels[1] = dateSorterBridge.getYesterday(); int resId = com.android.internal.R.plurals.last_num_days; String format = resources.getQuantityString(resId, NUM_DAYS_AGO); diff --git a/core/java/com/android/internal/inputmethod/OWNERS b/core/java/com/android/internal/inputmethod/OWNERS new file mode 100644 index 000000000000..fc0e5d4dea2b --- /dev/null +++ b/core/java/com/android/internal/inputmethod/OWNERS @@ -0,0 +1,3 @@ +set noparent + +include ../../../../../../services/core/java/com/android/server/inputmethod/OWNERS diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index 300f71af5dd5..021f48746889 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -122,12 +122,6 @@ public class ZygoteInit { private static boolean sPreloadComplete; - /** - * Cached classloader to use for the system server. Will only be populated in the system - * server process. - */ - private static ClassLoader sCachedSystemServerClassLoader = null; - static void preload(TimingsTraceLog bootTimingsTraceLog) { Log.d(TAG, "begin preload"); bootTimingsTraceLog.traceBegin("BeginPreload"); @@ -499,13 +493,7 @@ public class ZygoteInit { final String systemServerClasspath = Os.getenv("SYSTEMSERVERCLASSPATH"); if (systemServerClasspath != null) { - if (performSystemServerDexOpt(systemServerClasspath)) { - // Throw away the cached classloader. If we compiled here, the classloader would - // not have had AoT-ed artifacts. - // Note: This only works in a very special environment where selinux enforcement is - // disabled, e.g., Mac builds. - sCachedSystemServerClassLoader = null; - } + performSystemServerDexOpt(systemServerClasspath); // Capturing profiles is only supported for debug or eng builds since selinux normally // prevents it. if (shouldProfileSystemServer() && (Build.IS_USERDEBUG || Build.IS_ENG)) { @@ -537,9 +525,10 @@ public class ZygoteInit { throw new IllegalStateException("Unexpected return from WrapperInit.execApplication"); } else { - createSystemServerClassLoader(); - ClassLoader cl = sCachedSystemServerClassLoader; - if (cl != null) { + ClassLoader cl = null; + if (systemServerClasspath != null) { + cl = createPathClassLoader(systemServerClasspath, parsedArgs.mTargetSdkVersion); + Thread.currentThread().setContextClassLoader(cl); } @@ -555,24 +544,6 @@ public class ZygoteInit { } /** - * Create the classloader for the system server and store it in - * {@link sCachedSystemServerClassLoader}. This function may be called through JNI in - * system server startup, when the runtime is in a critically low state. Do not do - * extended computation etc here. - */ - private static void createSystemServerClassLoader() { - if (sCachedSystemServerClassLoader != null) { - return; - } - final String systemServerClasspath = Os.getenv("SYSTEMSERVERCLASSPATH"); - // TODO: Should we run optimization here? - if (systemServerClasspath != null) { - sCachedSystemServerClassLoader = createPathClassLoader(systemServerClasspath, - VMRuntime.SDK_VERSION_CUR_DEVELOPMENT); - } - } - - /** * Note that preparing the profiles for system server does not require special selinux * permissions. From the installer perspective the system server is a regular package which can * capture profile information. @@ -636,16 +607,15 @@ public class ZygoteInit { /** * Performs dex-opt on the elements of {@code classPath}, if needed. We choose the instruction - * set of the current runtime. If something was compiled, return true. + * set of the current runtime. */ - private static boolean performSystemServerDexOpt(String classPath) { + private static void performSystemServerDexOpt(String classPath) { final String[] classPathElements = classPath.split(":"); final IInstalld installd = IInstalld.Stub .asInterface(ServiceManager.getService("installd")); final String instructionSet = VMRuntime.getRuntime().vmInstructionSet(); String classPathForElement = ""; - boolean compiledSomething = false; for (String classPathElement : classPathElements) { // We default to the verify filter because the compilation will happen on /data and // system server cannot load executable code outside /system. @@ -686,7 +656,6 @@ public class ZygoteInit { uuid, classLoaderContext, seInfo, false /* downgrade */, targetSdkVersion, /*profileName*/ null, /*dexMetadataPath*/ null, "server-dexopt"); - compiledSomething = true; } catch (RemoteException | ServiceSpecificException e) { // Ignore (but log), we need this on the classpath for fallback mode. Log.w(TAG, "Failed compiling classpath element for system server: " @@ -697,8 +666,6 @@ public class ZygoteInit { classPathForElement = encodeSystemServerClassPath( classPathForElement, classPathElement); } - - return compiledSomething; } /** diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp index 0ce61de270f8..22f0478ce841 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp @@ -113,15 +113,11 @@ typedef const std::function<void(std::string)>& fail_fn_t; static pid_t gSystemServerPid = 0; -static constexpr const char* kZygoteClassName = "com/android/internal/os/Zygote"; +static const char kZygoteClassName[] = "com/android/internal/os/Zygote"; static jclass gZygoteClass; static jmethodID gCallPostForkSystemServerHooks; static jmethodID gCallPostForkChildHooks; -static constexpr const char* kZygoteInitClassName = "com/android/internal/os/ZygoteInit"; -static jclass gZygoteInitClass; -static jmethodID gCreateSystemServerClassLoader; - static bool gIsSecurityEnforced = true; /** @@ -1221,15 +1217,6 @@ static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids, fail_fn("Error calling post fork system server hooks."); } - // Prefetch the classloader for the system server. This is done early to - // allow a tie-down of the proper system server selinux domain. - env->CallStaticVoidMethod(gZygoteInitClass, gCreateSystemServerClassLoader); - if (env->ExceptionCheck()) { - // Be robust here. The Java code will attempt to create the classloader - // at a later point (but may not have rights to use AoT artifacts). - env->ExceptionClear(); - } - // TODO(oth): Remove hardcoded label here (b/117874058). static const char* kSystemServerLabel = "u:r:system_server:s0"; if (selinux_android_setcon(kSystemServerLabel) != 0) { @@ -1908,13 +1895,6 @@ int register_com_android_internal_os_Zygote(JNIEnv* env) { gCallPostForkChildHooks = GetStaticMethodIDOrDie(env, gZygoteClass, "callPostForkChildHooks", "(IZZLjava/lang/String;)V"); - gZygoteInitClass = MakeGlobalRefOrDie(env, FindClassOrDie(env, kZygoteInitClassName)); - gCreateSystemServerClassLoader = GetStaticMethodIDOrDie(env, gZygoteInitClass, - "createSystemServerClassLoader", - "()V"); - - RegisterMethodsOrDie(env, "com/android/internal/os/Zygote", gMethods, NELEM(gMethods)); - - return JNI_OK; + return RegisterMethodsOrDie(env, "com/android/internal/os/Zygote", gMethods, NELEM(gMethods)); } } // namespace android diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 9817cebf1c83..e6dc15f911de 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1645,6 +1645,10 @@ <permission android:name="android.permission.NETWORK_FACTORY" android:protectionLevel="signature" /> + <!-- @SystemApi @hide Allows applications to access network stats provider --> + <permission android:name="android.permission.NETWORK_STATS_PROVIDER" + android:protectionLevel="signature" /> + <!-- Allows Settings and SystemUI to call methods in Networking services <p>Not for use by third-party or privileged applications. @SystemApi @TestApi @@ -1794,7 +1798,7 @@ and bypass OMAPI AccessControlEnforcer. <p>Not for use by third-party applications. @hide --> - <permission android:name="android.permission.SECURE_ELEMENT_PRIVILEGED" + <permission android:name="android.permission.SECURE_ELEMENT_PRIVILEGED_OPERATION" android:protectionLevel="signature|privileged" /> <!-- @deprecated This permission used to allow too broad access to sensitive methods and all its diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 8810ac459f63..492ea68dd515 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -3450,8 +3450,6 @@ <!-- A notification is shown when connected network without internet due to private dns validation failed. This is the notification's message. [CHAR LIMIT=NONE] --> <string name="private_dns_broken_detailed">Private DNS server cannot be accessed</string> - <!-- A notification is shown after the user logs in to a captive portal network, to indicate that the network should now have internet connectivity. This is the message of notification. [CHAR LIMIT=50] --> - <string name="captive_portal_logged_in_detailed">Connected</string> <!-- A notification is shown when the user connects to a network that doesn't have access to some services (e.g. Push notifications may not work). This is the notification's title. [CHAR LIMIT=50] --> <string name="network_partial_connectivity"><xliff:g id="network_ssid" example="GoogleGuest">%1$s</xliff:g> has limited connectivity</string> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 076885637f76..ad7acae18666 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -735,7 +735,6 @@ <java-symbol type="string" name="capability_title_canControlMagnification" /> <java-symbol type="string" name="capability_desc_canPerformGestures" /> <java-symbol type="string" name="capability_title_canPerformGestures" /> - <java-symbol type="string" name="captive_portal_logged_in_detailed" /> <java-symbol type="string" name="cfTemplateForwarded" /> <java-symbol type="string" name="cfTemplateForwardedTime" /> <java-symbol type="string" name="cfTemplateNotForwarded" /> diff --git a/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java b/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java index 5d42915fc82b..4b42f4ae9888 100644 --- a/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java +++ b/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java @@ -268,7 +268,7 @@ public class BandwidthTest extends InstrumentationTestCase { File snd_stat = new File (root_filepath + "tcp_snd"); int tx = BandwidthTestUtil.parseIntValueFromFile(snd_stat); NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 1); - stats.addEntry(NetworkStats.IFACE_ALL, uid, NetworkStats.SET_DEFAULT, + stats.insertEntry(NetworkStats.IFACE_ALL, uid, NetworkStats.SET_DEFAULT, NetworkStats.TAG_NONE, rx, 0, tx, 0, 0); return stats; } diff --git a/core/tests/benchmarks/src/android/net/NetworkStatsBenchmark.java b/core/tests/benchmarks/src/android/net/NetworkStatsBenchmark.java index 239f971664e9..3ebe1039d975 100644 --- a/core/tests/benchmarks/src/android/net/NetworkStatsBenchmark.java +++ b/core/tests/benchmarks/src/android/net/NetworkStatsBenchmark.java @@ -54,7 +54,7 @@ public class NetworkStatsBenchmark { recycle.txBytes = 150000; recycle.txPackets = 1500; recycle.operations = 0; - mNetworkStats.addEntry(recycle); + mNetworkStats.insertEntry(recycle); if (recycle.set == 1) { uid++; } @@ -70,7 +70,7 @@ public class NetworkStatsBenchmark { recycle.txBytes = 180000 * mSize; recycle.txPackets = 1200 * mSize; recycle.operations = 0; - mNetworkStats.addEntry(recycle); + mNetworkStats.insertEntry(recycle); } } diff --git a/data/etc/framework-sysconfig.xml b/data/etc/framework-sysconfig.xml index b0d2de17527d..ad001da899ec 100644 --- a/data/etc/framework-sysconfig.xml +++ b/data/etc/framework-sysconfig.xml @@ -19,11 +19,29 @@ <!-- Broadcast actions that are currently exempted from O+ background delivery restrictions. --> - <allow-implicit-broadcast action="android.intent.action.SIM_STATE_CHANGED" /> - <allow-implicit-broadcast action="android.intent.action.PACKAGE_CHANGED" /> + <allow-implicit-broadcast action="android.intent.action.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED" /> + <allow-implicit-broadcast action="android.intent.action.ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED" /> + <allow-implicit-broadcast action="android.intent.action.DATA_SMS_RECEIVED" /> <allow-implicit-broadcast action="android.intent.action.MEDIA_SCANNER_SCAN_FILE" /> - <allow-implicit-broadcast action="android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION" /> + <allow-implicit-broadcast action="android.intent.action.PACKAGE_CHANGED" /> + <allow-implicit-broadcast action="android.intent.action.SIM_STATE_CHANGED" /> <allow-implicit-broadcast action="android.media.action.CLOSE_AUDIO_EFFECT_CONTROL_SESSION" /> + <allow-implicit-broadcast action="android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION" /> + <allow-implicit-broadcast action="android.provider.Telephony.SECRET_CODE" /> + <allow-implicit-broadcast action="android.provider.Telephony.SMS_CB_RECEIVED" /> + <allow-implicit-broadcast action="android.provider.Telephony.SMS_DELIVER" /> + <allow-implicit-broadcast action="android.provider.Telephony.SMS_RECEIVED" /> + <allow-implicit-broadcast action="android.provider.Telephony.SMS_REJECTED" /> + <allow-implicit-broadcast action="android.provider.Telephony.WAP_PUSH_DELIVER" /> + <allow-implicit-broadcast action="android.provider.Telephony.WAP_PUSH_RECEIVED" /> + <allow-implicit-broadcast action="android.telephony.action.CARRIER_CONFIG_CHANGED" /> + <allow-implicit-broadcast action="android.telephony.action.DEFAULT_SMS_SUBSCRIPTION_CHANGED" /> + <allow-implicit-broadcast action="android.telephony.action.DEFAULT_SUBSCRIPTION_CHANGED" /> + <allow-implicit-broadcast action="android.telephony.action.SECRET_CODE" /> + <allow-implicit-broadcast action="android.telephony.action.SIM_APPLICATION_STATE_CHANGED" /> + <allow-implicit-broadcast action="android.telephony.action.SIM_CARD_STATE_CHANGED" /> + <allow-implicit-broadcast action="android.telephony.action.SIM_SLOT_STATUS_CHANGED" /> + <!-- Whitelist of what components are permitted as backup data transports. The 'service' attribute here is a flattened ComponentName string. --> diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml index e00702384713..e9d149db331d 100644 --- a/data/etc/privapp-permissions-platform.xml +++ b/data/etc/privapp-permissions-platform.xml @@ -39,11 +39,6 @@ applications that come with the platform <permission name="android.permission.CRYPT_KEEPER"/> </privapp-permissions> - <privapp-permissions package="com.android.captiveportallogin"> - <permission name="android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS"/> - <permission name="android.permission.NETWORK_BYPASS_PRIVATE_DNS"/> - </privapp-permissions> - <privapp-permissions package="com.android.cellbroadcastreceiver"> <permission name="android.permission.INTERACT_ACROSS_USERS"/> <permission name="android.permission.MANAGE_USERS"/> @@ -238,6 +233,7 @@ applications that come with the platform </privapp-permissions> <privapp-permissions package="com.android.networkstack.tethering"> + <permission name="android.permission.BLUETOOTH_PRIVILEGED" /> <permission name="android.permission.MANAGE_USB"/> <permission name="android.permission.MODIFY_PHONE_STATE"/> <permission name="android.permission.READ_NETWORK_USAGE_HISTORY"/> diff --git a/keystore/tests/OWNERS b/keystore/tests/OWNERS index 9e65f88b3366..86c31f403da0 100644 --- a/keystore/tests/OWNERS +++ b/keystore/tests/OWNERS @@ -1,5 +1,4 @@ # Android Enterprise security team eranm@google.com -irinaid@google.com pgrafov@google.com rubinxu@google.com diff --git a/libs/androidfw/LocaleDataTables.cpp b/libs/androidfw/LocaleDataTables.cpp index e748bd886ebc..6c6c5c9f4e22 100644 --- a/libs/androidfw/LocaleDataTables.cpp +++ b/libs/androidfw/LocaleDataTables.cpp @@ -15,1474 +15,1478 @@ const char SCRIPT_CODES[][4] = { /* 11 */ {'C', 'a', 'r', 'i'}, /* 12 */ {'C', 'h', 'a', 'm'}, /* 13 */ {'C', 'h', 'e', 'r'}, - /* 14 */ {'C', 'o', 'p', 't'}, - /* 15 */ {'C', 'p', 'r', 't'}, - /* 16 */ {'C', 'y', 'r', 'l'}, - /* 17 */ {'D', 'e', 'v', 'a'}, - /* 18 */ {'E', 'g', 'y', 'p'}, - /* 19 */ {'E', 't', 'h', 'i'}, - /* 20 */ {'G', 'e', 'o', 'r'}, - /* 21 */ {'G', 'o', 'n', 'g'}, - /* 22 */ {'G', 'o', 'n', 'm'}, - /* 23 */ {'G', 'o', 't', 'h'}, - /* 24 */ {'G', 'r', 'e', 'k'}, - /* 25 */ {'G', 'u', 'j', 'r'}, - /* 26 */ {'G', 'u', 'r', 'u'}, - /* 27 */ {'H', 'a', 'n', 's'}, - /* 28 */ {'H', 'a', 'n', 't'}, - /* 29 */ {'H', 'a', 't', 'r'}, - /* 30 */ {'H', 'e', 'b', 'r'}, - /* 31 */ {'H', 'l', 'u', 'w'}, - /* 32 */ {'H', 'm', 'n', 'g'}, - /* 33 */ {'H', 'm', 'n', 'p'}, - /* 34 */ {'I', 't', 'a', 'l'}, - /* 35 */ {'J', 'p', 'a', 'n'}, - /* 36 */ {'K', 'a', 'l', 'i'}, - /* 37 */ {'K', 'a', 'n', 'a'}, - /* 38 */ {'K', 'h', 'a', 'r'}, - /* 39 */ {'K', 'h', 'm', 'r'}, - /* 40 */ {'K', 'n', 'd', 'a'}, - /* 41 */ {'K', 'o', 'r', 'e'}, - /* 42 */ {'L', 'a', 'n', 'a'}, - /* 43 */ {'L', 'a', 'o', 'o'}, - /* 44 */ {'L', 'a', 't', 'n'}, - /* 45 */ {'L', 'e', 'p', 'c'}, - /* 46 */ {'L', 'i', 'n', 'a'}, - /* 47 */ {'L', 'i', 's', 'u'}, - /* 48 */ {'L', 'y', 'c', 'i'}, - /* 49 */ {'L', 'y', 'd', 'i'}, - /* 50 */ {'M', 'a', 'n', 'd'}, - /* 51 */ {'M', 'a', 'n', 'i'}, - /* 52 */ {'M', 'e', 'r', 'c'}, - /* 53 */ {'M', 'l', 'y', 'm'}, - /* 54 */ {'M', 'o', 'n', 'g'}, - /* 55 */ {'M', 'r', 'o', 'o'}, - /* 56 */ {'M', 'y', 'm', 'r'}, - /* 57 */ {'N', 'a', 'r', 'b'}, - /* 58 */ {'N', 'k', 'o', 'o'}, - /* 59 */ {'N', 's', 'h', 'u'}, - /* 60 */ {'O', 'g', 'a', 'm'}, - /* 61 */ {'O', 'r', 'k', 'h'}, - /* 62 */ {'O', 'r', 'y', 'a'}, - /* 63 */ {'O', 's', 'g', 'e'}, - /* 64 */ {'P', 'a', 'u', 'c'}, - /* 65 */ {'P', 'h', 'l', 'i'}, - /* 66 */ {'P', 'h', 'n', 'x'}, - /* 67 */ {'P', 'l', 'r', 'd'}, - /* 68 */ {'P', 'r', 't', 'i'}, - /* 69 */ {'R', 'u', 'n', 'r'}, - /* 70 */ {'S', 'a', 'm', 'r'}, - /* 71 */ {'S', 'a', 'r', 'b'}, - /* 72 */ {'S', 'a', 'u', 'r'}, - /* 73 */ {'S', 'g', 'n', 'w'}, - /* 74 */ {'S', 'i', 'n', 'h'}, - /* 75 */ {'S', 'o', 'g', 'd'}, - /* 76 */ {'S', 'o', 'r', 'a'}, - /* 77 */ {'S', 'o', 'y', 'o'}, - /* 78 */ {'S', 'y', 'r', 'c'}, - /* 79 */ {'T', 'a', 'l', 'e'}, - /* 80 */ {'T', 'a', 'l', 'u'}, - /* 81 */ {'T', 'a', 'm', 'l'}, - /* 82 */ {'T', 'a', 'n', 'g'}, - /* 83 */ {'T', 'a', 'v', 't'}, - /* 84 */ {'T', 'e', 'l', 'u'}, - /* 85 */ {'T', 'f', 'n', 'g'}, - /* 86 */ {'T', 'h', 'a', 'a'}, - /* 87 */ {'T', 'h', 'a', 'i'}, - /* 88 */ {'T', 'i', 'b', 't'}, - /* 89 */ {'U', 'g', 'a', 'r'}, - /* 90 */ {'V', 'a', 'i', 'i'}, - /* 91 */ {'W', 'c', 'h', 'o'}, - /* 92 */ {'X', 'p', 'e', 'o'}, - /* 93 */ {'X', 's', 'u', 'x'}, - /* 94 */ {'Y', 'i', 'i', 'i'}, - /* 95 */ {'~', '~', '~', 'A'}, - /* 96 */ {'~', '~', '~', 'B'}, + /* 14 */ {'C', 'h', 'r', 's'}, + /* 15 */ {'C', 'o', 'p', 't'}, + /* 16 */ {'C', 'p', 'r', 't'}, + /* 17 */ {'C', 'y', 'r', 'l'}, + /* 18 */ {'D', 'e', 'v', 'a'}, + /* 19 */ {'E', 'g', 'y', 'p'}, + /* 20 */ {'E', 't', 'h', 'i'}, + /* 21 */ {'G', 'e', 'o', 'r'}, + /* 22 */ {'G', 'o', 'n', 'g'}, + /* 23 */ {'G', 'o', 'n', 'm'}, + /* 24 */ {'G', 'o', 't', 'h'}, + /* 25 */ {'G', 'r', 'e', 'k'}, + /* 26 */ {'G', 'u', 'j', 'r'}, + /* 27 */ {'G', 'u', 'r', 'u'}, + /* 28 */ {'H', 'a', 'n', 's'}, + /* 29 */ {'H', 'a', 'n', 't'}, + /* 30 */ {'H', 'a', 't', 'r'}, + /* 31 */ {'H', 'e', 'b', 'r'}, + /* 32 */ {'H', 'l', 'u', 'w'}, + /* 33 */ {'H', 'm', 'n', 'g'}, + /* 34 */ {'H', 'm', 'n', 'p'}, + /* 35 */ {'I', 't', 'a', 'l'}, + /* 36 */ {'J', 'p', 'a', 'n'}, + /* 37 */ {'K', 'a', 'l', 'i'}, + /* 38 */ {'K', 'a', 'n', 'a'}, + /* 39 */ {'K', 'h', 'a', 'r'}, + /* 40 */ {'K', 'h', 'm', 'r'}, + /* 41 */ {'K', 'i', 't', 's'}, + /* 42 */ {'K', 'n', 'd', 'a'}, + /* 43 */ {'K', 'o', 'r', 'e'}, + /* 44 */ {'L', 'a', 'n', 'a'}, + /* 45 */ {'L', 'a', 'o', 'o'}, + /* 46 */ {'L', 'a', 't', 'n'}, + /* 47 */ {'L', 'e', 'p', 'c'}, + /* 48 */ {'L', 'i', 'n', 'a'}, + /* 49 */ {'L', 'i', 's', 'u'}, + /* 50 */ {'L', 'y', 'c', 'i'}, + /* 51 */ {'L', 'y', 'd', 'i'}, + /* 52 */ {'M', 'a', 'n', 'd'}, + /* 53 */ {'M', 'a', 'n', 'i'}, + /* 54 */ {'M', 'e', 'r', 'c'}, + /* 55 */ {'M', 'l', 'y', 'm'}, + /* 56 */ {'M', 'o', 'n', 'g'}, + /* 57 */ {'M', 'r', 'o', 'o'}, + /* 58 */ {'M', 'y', 'm', 'r'}, + /* 59 */ {'N', 'a', 'r', 'b'}, + /* 60 */ {'N', 'k', 'o', 'o'}, + /* 61 */ {'N', 's', 'h', 'u'}, + /* 62 */ {'O', 'g', 'a', 'm'}, + /* 63 */ {'O', 'r', 'k', 'h'}, + /* 64 */ {'O', 'r', 'y', 'a'}, + /* 65 */ {'O', 's', 'g', 'e'}, + /* 66 */ {'P', 'a', 'u', 'c'}, + /* 67 */ {'P', 'h', 'l', 'i'}, + /* 68 */ {'P', 'h', 'n', 'x'}, + /* 69 */ {'P', 'l', 'r', 'd'}, + /* 70 */ {'P', 'r', 't', 'i'}, + /* 71 */ {'R', 'u', 'n', 'r'}, + /* 72 */ {'S', 'a', 'm', 'r'}, + /* 73 */ {'S', 'a', 'r', 'b'}, + /* 74 */ {'S', 'a', 'u', 'r'}, + /* 75 */ {'S', 'g', 'n', 'w'}, + /* 76 */ {'S', 'i', 'n', 'h'}, + /* 77 */ {'S', 'o', 'g', 'd'}, + /* 78 */ {'S', 'o', 'r', 'a'}, + /* 79 */ {'S', 'o', 'y', 'o'}, + /* 80 */ {'S', 'y', 'r', 'c'}, + /* 81 */ {'T', 'a', 'l', 'e'}, + /* 82 */ {'T', 'a', 'l', 'u'}, + /* 83 */ {'T', 'a', 'm', 'l'}, + /* 84 */ {'T', 'a', 'n', 'g'}, + /* 85 */ {'T', 'a', 'v', 't'}, + /* 86 */ {'T', 'e', 'l', 'u'}, + /* 87 */ {'T', 'f', 'n', 'g'}, + /* 88 */ {'T', 'h', 'a', 'a'}, + /* 89 */ {'T', 'h', 'a', 'i'}, + /* 90 */ {'T', 'i', 'b', 't'}, + /* 91 */ {'U', 'g', 'a', 'r'}, + /* 92 */ {'V', 'a', 'i', 'i'}, + /* 93 */ {'W', 'c', 'h', 'o'}, + /* 94 */ {'X', 'p', 'e', 'o'}, + /* 95 */ {'X', 's', 'u', 'x'}, + /* 96 */ {'Y', 'i', 'i', 'i'}, + /* 97 */ {'~', '~', '~', 'A'}, + /* 98 */ {'~', '~', '~', 'B'}, }; const std::unordered_map<uint32_t, uint8_t> LIKELY_SCRIPTS({ - {0x61610000u, 44u}, // aa -> Latn - {0xA0000000u, 44u}, // aai -> Latn - {0xA8000000u, 44u}, // aak -> Latn - {0xD0000000u, 44u}, // aau -> Latn - {0x61620000u, 16u}, // ab -> Cyrl - {0xA0200000u, 44u}, // abi -> Latn - {0xC0200000u, 16u}, // abq -> Cyrl - {0xC4200000u, 44u}, // abr -> Latn - {0xCC200000u, 44u}, // abt -> Latn - {0xE0200000u, 44u}, // aby -> Latn - {0x8C400000u, 44u}, // acd -> Latn - {0x90400000u, 44u}, // ace -> Latn - {0x9C400000u, 44u}, // ach -> Latn - {0x80600000u, 44u}, // ada -> Latn - {0x90600000u, 44u}, // ade -> Latn - {0xA4600000u, 44u}, // adj -> Latn - {0xBC600000u, 88u}, // adp -> Tibt - {0xE0600000u, 16u}, // ady -> Cyrl - {0xE4600000u, 44u}, // adz -> Latn + {0x61610000u, 46u}, // aa -> Latn + {0xA0000000u, 46u}, // aai -> Latn + {0xA8000000u, 46u}, // aak -> Latn + {0xD0000000u, 46u}, // aau -> Latn + {0x61620000u, 17u}, // ab -> Cyrl + {0xA0200000u, 46u}, // abi -> Latn + {0xC0200000u, 17u}, // abq -> Cyrl + {0xC4200000u, 46u}, // abr -> Latn + {0xCC200000u, 46u}, // abt -> Latn + {0xE0200000u, 46u}, // aby -> Latn + {0x8C400000u, 46u}, // acd -> Latn + {0x90400000u, 46u}, // ace -> Latn + {0x9C400000u, 46u}, // ach -> Latn + {0x80600000u, 46u}, // ada -> Latn + {0x90600000u, 46u}, // ade -> Latn + {0xA4600000u, 46u}, // adj -> Latn + {0xBC600000u, 90u}, // adp -> Tibt + {0xE0600000u, 17u}, // ady -> Cyrl + {0xE4600000u, 46u}, // adz -> Latn {0x61650000u, 4u}, // ae -> Avst {0x84800000u, 1u}, // aeb -> Arab - {0xE0800000u, 44u}, // aey -> Latn - {0x61660000u, 44u}, // af -> Latn - {0x88C00000u, 44u}, // agc -> Latn - {0x8CC00000u, 44u}, // agd -> Latn - {0x98C00000u, 44u}, // agg -> Latn - {0xB0C00000u, 44u}, // agm -> Latn - {0xB8C00000u, 44u}, // ago -> Latn - {0xC0C00000u, 44u}, // agq -> Latn - {0x80E00000u, 44u}, // aha -> Latn - {0xACE00000u, 44u}, // ahl -> Latn + {0xE0800000u, 46u}, // aey -> Latn + {0x61660000u, 46u}, // af -> Latn + {0x88C00000u, 46u}, // agc -> Latn + {0x8CC00000u, 46u}, // agd -> Latn + {0x98C00000u, 46u}, // agg -> Latn + {0xB0C00000u, 46u}, // agm -> Latn + {0xB8C00000u, 46u}, // ago -> Latn + {0xC0C00000u, 46u}, // agq -> Latn + {0x80E00000u, 46u}, // aha -> Latn + {0xACE00000u, 46u}, // ahl -> Latn {0xB8E00000u, 0u}, // aho -> Ahom - {0x99200000u, 44u}, // ajg -> Latn - {0x616B0000u, 44u}, // ak -> Latn - {0xA9400000u, 93u}, // akk -> Xsux - {0x81600000u, 44u}, // ala -> Latn - {0xA1600000u, 44u}, // ali -> Latn - {0xB5600000u, 44u}, // aln -> Latn - {0xCD600000u, 16u}, // alt -> Cyrl - {0x616D0000u, 19u}, // am -> Ethi - {0xB1800000u, 44u}, // amm -> Latn - {0xB5800000u, 44u}, // amn -> Latn - {0xB9800000u, 44u}, // amo -> Latn - {0xBD800000u, 44u}, // amp -> Latn - {0x616E0000u, 44u}, // an -> Latn - {0x89A00000u, 44u}, // anc -> Latn - {0xA9A00000u, 44u}, // ank -> Latn - {0xB5A00000u, 44u}, // ann -> Latn - {0xE1A00000u, 44u}, // any -> Latn - {0xA5C00000u, 44u}, // aoj -> Latn - {0xB1C00000u, 44u}, // aom -> Latn - {0xE5C00000u, 44u}, // aoz -> Latn + {0x99200000u, 46u}, // ajg -> Latn + {0x616B0000u, 46u}, // ak -> Latn + {0xA9400000u, 95u}, // akk -> Xsux + {0x81600000u, 46u}, // ala -> Latn + {0xA1600000u, 46u}, // ali -> Latn + {0xB5600000u, 46u}, // aln -> Latn + {0xCD600000u, 17u}, // alt -> Cyrl + {0x616D0000u, 20u}, // am -> Ethi + {0xB1800000u, 46u}, // amm -> Latn + {0xB5800000u, 46u}, // amn -> Latn + {0xB9800000u, 46u}, // amo -> Latn + {0xBD800000u, 46u}, // amp -> Latn + {0x616E0000u, 46u}, // an -> Latn + {0x89A00000u, 46u}, // anc -> Latn + {0xA9A00000u, 46u}, // ank -> Latn + {0xB5A00000u, 46u}, // ann -> Latn + {0xE1A00000u, 46u}, // any -> Latn + {0xA5C00000u, 46u}, // aoj -> Latn + {0xB1C00000u, 46u}, // aom -> Latn + {0xE5C00000u, 46u}, // aoz -> Latn {0x89E00000u, 1u}, // apc -> Arab {0x8DE00000u, 1u}, // apd -> Arab - {0x91E00000u, 44u}, // ape -> Latn - {0xC5E00000u, 44u}, // apr -> Latn - {0xC9E00000u, 44u}, // aps -> Latn - {0xE5E00000u, 44u}, // apz -> Latn + {0x91E00000u, 46u}, // ape -> Latn + {0xC5E00000u, 46u}, // apr -> Latn + {0xC9E00000u, 46u}, // aps -> Latn + {0xE5E00000u, 46u}, // apz -> Latn {0x61720000u, 1u}, // ar -> Arab - {0x61725842u, 96u}, // ar-XB -> ~~~B + {0x61725842u, 98u}, // ar-XB -> ~~~B {0x8A200000u, 2u}, // arc -> Armi - {0x9E200000u, 44u}, // arh -> Latn - {0xB6200000u, 44u}, // arn -> Latn - {0xBA200000u, 44u}, // aro -> Latn + {0x9E200000u, 46u}, // arh -> Latn + {0xB6200000u, 46u}, // arn -> Latn + {0xBA200000u, 46u}, // aro -> Latn {0xC2200000u, 1u}, // arq -> Arab {0xCA200000u, 1u}, // ars -> Arab {0xE2200000u, 1u}, // ary -> Arab {0xE6200000u, 1u}, // arz -> Arab {0x61730000u, 7u}, // as -> Beng - {0x82400000u, 44u}, // asa -> Latn - {0x92400000u, 73u}, // ase -> Sgnw - {0x9A400000u, 44u}, // asg -> Latn - {0xBA400000u, 44u}, // aso -> Latn - {0xCE400000u, 44u}, // ast -> Latn - {0x82600000u, 44u}, // ata -> Latn - {0x9A600000u, 44u}, // atg -> Latn - {0xA6600000u, 44u}, // atj -> Latn - {0xE2800000u, 44u}, // auy -> Latn - {0x61760000u, 16u}, // av -> Cyrl + {0x82400000u, 46u}, // asa -> Latn + {0x92400000u, 75u}, // ase -> Sgnw + {0x9A400000u, 46u}, // asg -> Latn + {0xBA400000u, 46u}, // aso -> Latn + {0xCE400000u, 46u}, // ast -> Latn + {0x82600000u, 46u}, // ata -> Latn + {0x9A600000u, 46u}, // atg -> Latn + {0xA6600000u, 46u}, // atj -> Latn + {0xE2800000u, 46u}, // auy -> Latn + {0x61760000u, 17u}, // av -> Cyrl {0xAEA00000u, 1u}, // avl -> Arab - {0xB6A00000u, 44u}, // avn -> Latn - {0xCEA00000u, 44u}, // avt -> Latn - {0xD2A00000u, 44u}, // avu -> Latn - {0x82C00000u, 17u}, // awa -> Deva - {0x86C00000u, 44u}, // awb -> Latn - {0xBAC00000u, 44u}, // awo -> Latn - {0xDEC00000u, 44u}, // awx -> Latn - {0x61790000u, 44u}, // ay -> Latn - {0x87000000u, 44u}, // ayb -> Latn - {0x617A0000u, 44u}, // az -> Latn + {0xB6A00000u, 46u}, // avn -> Latn + {0xCEA00000u, 46u}, // avt -> Latn + {0xD2A00000u, 46u}, // avu -> Latn + {0x82C00000u, 18u}, // awa -> Deva + {0x86C00000u, 46u}, // awb -> Latn + {0xBAC00000u, 46u}, // awo -> Latn + {0xDEC00000u, 46u}, // awx -> Latn + {0x61790000u, 46u}, // ay -> Latn + {0x87000000u, 46u}, // ayb -> Latn + {0x617A0000u, 46u}, // az -> Latn {0x617A4951u, 1u}, // az-IQ -> Arab {0x617A4952u, 1u}, // az-IR -> Arab - {0x617A5255u, 16u}, // az-RU -> Cyrl - {0x62610000u, 16u}, // ba -> Cyrl + {0x617A5255u, 17u}, // az-RU -> Cyrl + {0x62610000u, 17u}, // ba -> Cyrl {0xAC010000u, 1u}, // bal -> Arab - {0xB4010000u, 44u}, // ban -> Latn - {0xBC010000u, 17u}, // bap -> Deva - {0xC4010000u, 44u}, // bar -> Latn - {0xC8010000u, 44u}, // bas -> Latn - {0xD4010000u, 44u}, // bav -> Latn + {0xB4010000u, 46u}, // ban -> Latn + {0xBC010000u, 18u}, // bap -> Deva + {0xC4010000u, 46u}, // bar -> Latn + {0xC8010000u, 46u}, // bas -> Latn + {0xD4010000u, 46u}, // bav -> Latn {0xDC010000u, 5u}, // bax -> Bamu - {0x80210000u, 44u}, // bba -> Latn - {0x84210000u, 44u}, // bbb -> Latn - {0x88210000u, 44u}, // bbc -> Latn - {0x8C210000u, 44u}, // bbd -> Latn - {0xA4210000u, 44u}, // bbj -> Latn - {0xBC210000u, 44u}, // bbp -> Latn - {0xC4210000u, 44u}, // bbr -> Latn - {0x94410000u, 44u}, // bcf -> Latn - {0x9C410000u, 44u}, // bch -> Latn - {0xA0410000u, 44u}, // bci -> Latn - {0xB0410000u, 44u}, // bcm -> Latn - {0xB4410000u, 44u}, // bcn -> Latn - {0xB8410000u, 44u}, // bco -> Latn - {0xC0410000u, 19u}, // bcq -> Ethi - {0xD0410000u, 44u}, // bcu -> Latn - {0x8C610000u, 44u}, // bdd -> Latn - {0x62650000u, 16u}, // be -> Cyrl - {0x94810000u, 44u}, // bef -> Latn - {0x9C810000u, 44u}, // beh -> Latn + {0x80210000u, 46u}, // bba -> Latn + {0x84210000u, 46u}, // bbb -> Latn + {0x88210000u, 46u}, // bbc -> Latn + {0x8C210000u, 46u}, // bbd -> Latn + {0xA4210000u, 46u}, // bbj -> Latn + {0xBC210000u, 46u}, // bbp -> Latn + {0xC4210000u, 46u}, // bbr -> Latn + {0x94410000u, 46u}, // bcf -> Latn + {0x9C410000u, 46u}, // bch -> Latn + {0xA0410000u, 46u}, // bci -> Latn + {0xB0410000u, 46u}, // bcm -> Latn + {0xB4410000u, 46u}, // bcn -> Latn + {0xB8410000u, 46u}, // bco -> Latn + {0xC0410000u, 20u}, // bcq -> Ethi + {0xD0410000u, 46u}, // bcu -> Latn + {0x8C610000u, 46u}, // bdd -> Latn + {0x62650000u, 17u}, // be -> Cyrl + {0x94810000u, 46u}, // bef -> Latn + {0x9C810000u, 46u}, // beh -> Latn {0xA4810000u, 1u}, // bej -> Arab - {0xB0810000u, 44u}, // bem -> Latn - {0xCC810000u, 44u}, // bet -> Latn - {0xD8810000u, 44u}, // bew -> Latn - {0xDC810000u, 44u}, // bex -> Latn - {0xE4810000u, 44u}, // bez -> Latn - {0x8CA10000u, 44u}, // bfd -> Latn - {0xC0A10000u, 81u}, // bfq -> Taml + {0xB0810000u, 46u}, // bem -> Latn + {0xCC810000u, 46u}, // bet -> Latn + {0xD8810000u, 46u}, // bew -> Latn + {0xDC810000u, 46u}, // bex -> Latn + {0xE4810000u, 46u}, // bez -> Latn + {0x8CA10000u, 46u}, // bfd -> Latn + {0xC0A10000u, 83u}, // bfq -> Taml {0xCCA10000u, 1u}, // bft -> Arab - {0xE0A10000u, 17u}, // bfy -> Deva - {0x62670000u, 16u}, // bg -> Cyrl - {0x88C10000u, 17u}, // bgc -> Deva + {0xE0A10000u, 18u}, // bfy -> Deva + {0x62670000u, 17u}, // bg -> Cyrl + {0x88C10000u, 18u}, // bgc -> Deva {0xB4C10000u, 1u}, // bgn -> Arab - {0xDCC10000u, 24u}, // bgx -> Grek - {0x84E10000u, 17u}, // bhb -> Deva - {0x98E10000u, 44u}, // bhg -> Latn - {0xA0E10000u, 17u}, // bhi -> Deva - {0xACE10000u, 44u}, // bhl -> Latn - {0xB8E10000u, 17u}, // bho -> Deva - {0xE0E10000u, 44u}, // bhy -> Latn - {0x62690000u, 44u}, // bi -> Latn - {0x85010000u, 44u}, // bib -> Latn - {0x99010000u, 44u}, // big -> Latn - {0xA9010000u, 44u}, // bik -> Latn - {0xB1010000u, 44u}, // bim -> Latn - {0xB5010000u, 44u}, // bin -> Latn - {0xB9010000u, 44u}, // bio -> Latn - {0xC1010000u, 44u}, // biq -> Latn - {0x9D210000u, 44u}, // bjh -> Latn - {0xA1210000u, 19u}, // bji -> Ethi - {0xA5210000u, 17u}, // bjj -> Deva - {0xB5210000u, 44u}, // bjn -> Latn - {0xB9210000u, 44u}, // bjo -> Latn - {0xC5210000u, 44u}, // bjr -> Latn - {0xCD210000u, 44u}, // bjt -> Latn - {0xE5210000u, 44u}, // bjz -> Latn - {0x89410000u, 44u}, // bkc -> Latn - {0xB1410000u, 44u}, // bkm -> Latn - {0xC1410000u, 44u}, // bkq -> Latn - {0xD1410000u, 44u}, // bku -> Latn - {0xD5410000u, 44u}, // bkv -> Latn - {0xCD610000u, 83u}, // blt -> Tavt - {0x626D0000u, 44u}, // bm -> Latn - {0x9D810000u, 44u}, // bmh -> Latn - {0xA9810000u, 44u}, // bmk -> Latn - {0xC1810000u, 44u}, // bmq -> Latn - {0xD1810000u, 44u}, // bmu -> Latn + {0xDCC10000u, 25u}, // bgx -> Grek + {0x84E10000u, 18u}, // bhb -> Deva + {0x98E10000u, 46u}, // bhg -> Latn + {0xA0E10000u, 18u}, // bhi -> Deva + {0xACE10000u, 46u}, // bhl -> Latn + {0xB8E10000u, 18u}, // bho -> Deva + {0xE0E10000u, 46u}, // bhy -> Latn + {0x62690000u, 46u}, // bi -> Latn + {0x85010000u, 46u}, // bib -> Latn + {0x99010000u, 46u}, // big -> Latn + {0xA9010000u, 46u}, // bik -> Latn + {0xB1010000u, 46u}, // bim -> Latn + {0xB5010000u, 46u}, // bin -> Latn + {0xB9010000u, 46u}, // bio -> Latn + {0xC1010000u, 46u}, // biq -> Latn + {0x9D210000u, 46u}, // bjh -> Latn + {0xA1210000u, 20u}, // bji -> Ethi + {0xA5210000u, 18u}, // bjj -> Deva + {0xB5210000u, 46u}, // bjn -> Latn + {0xB9210000u, 46u}, // bjo -> Latn + {0xC5210000u, 46u}, // bjr -> Latn + {0xCD210000u, 46u}, // bjt -> Latn + {0xE5210000u, 46u}, // bjz -> Latn + {0x89410000u, 46u}, // bkc -> Latn + {0xB1410000u, 46u}, // bkm -> Latn + {0xC1410000u, 46u}, // bkq -> Latn + {0xD1410000u, 46u}, // bku -> Latn + {0xD5410000u, 46u}, // bkv -> Latn + {0xCD610000u, 85u}, // blt -> Tavt + {0x626D0000u, 46u}, // bm -> Latn + {0x9D810000u, 46u}, // bmh -> Latn + {0xA9810000u, 46u}, // bmk -> Latn + {0xC1810000u, 46u}, // bmq -> Latn + {0xD1810000u, 46u}, // bmu -> Latn {0x626E0000u, 7u}, // bn -> Beng - {0x99A10000u, 44u}, // bng -> Latn - {0xB1A10000u, 44u}, // bnm -> Latn - {0xBDA10000u, 44u}, // bnp -> Latn - {0x626F0000u, 88u}, // bo -> Tibt - {0xA5C10000u, 44u}, // boj -> Latn - {0xB1C10000u, 44u}, // bom -> Latn - {0xB5C10000u, 44u}, // bon -> Latn + {0x99A10000u, 46u}, // bng -> Latn + {0xB1A10000u, 46u}, // bnm -> Latn + {0xBDA10000u, 46u}, // bnp -> Latn + {0x626F0000u, 90u}, // bo -> Tibt + {0xA5C10000u, 46u}, // boj -> Latn + {0xB1C10000u, 46u}, // bom -> Latn + {0xB5C10000u, 46u}, // bon -> Latn {0xE1E10000u, 7u}, // bpy -> Beng - {0x8A010000u, 44u}, // bqc -> Latn + {0x8A010000u, 46u}, // bqc -> Latn {0xA2010000u, 1u}, // bqi -> Arab - {0xBE010000u, 44u}, // bqp -> Latn - {0xD6010000u, 44u}, // bqv -> Latn - {0x62720000u, 44u}, // br -> Latn - {0x82210000u, 17u}, // bra -> Deva + {0xBE010000u, 46u}, // bqp -> Latn + {0xD6010000u, 46u}, // bqv -> Latn + {0x62720000u, 46u}, // br -> Latn + {0x82210000u, 18u}, // bra -> Deva {0x9E210000u, 1u}, // brh -> Arab - {0xDE210000u, 17u}, // brx -> Deva - {0xE6210000u, 44u}, // brz -> Latn - {0x62730000u, 44u}, // bs -> Latn - {0xA6410000u, 44u}, // bsj -> Latn + {0xDE210000u, 18u}, // brx -> Deva + {0xE6210000u, 46u}, // brz -> Latn + {0x62730000u, 46u}, // bs -> Latn + {0xA6410000u, 46u}, // bsj -> Latn {0xC2410000u, 6u}, // bsq -> Bass - {0xCA410000u, 44u}, // bss -> Latn - {0xCE410000u, 19u}, // bst -> Ethi - {0xBA610000u, 44u}, // bto -> Latn - {0xCE610000u, 44u}, // btt -> Latn - {0xD6610000u, 17u}, // btv -> Deva - {0x82810000u, 16u}, // bua -> Cyrl - {0x8A810000u, 44u}, // buc -> Latn - {0x8E810000u, 44u}, // bud -> Latn - {0x9A810000u, 44u}, // bug -> Latn - {0xAA810000u, 44u}, // buk -> Latn - {0xB2810000u, 44u}, // bum -> Latn - {0xBA810000u, 44u}, // buo -> Latn - {0xCA810000u, 44u}, // bus -> Latn - {0xD2810000u, 44u}, // buu -> Latn - {0x86A10000u, 44u}, // bvb -> Latn - {0x8EC10000u, 44u}, // bwd -> Latn - {0xC6C10000u, 44u}, // bwr -> Latn - {0x9EE10000u, 44u}, // bxh -> Latn - {0x93010000u, 44u}, // bye -> Latn - {0xB7010000u, 19u}, // byn -> Ethi - {0xC7010000u, 44u}, // byr -> Latn - {0xCB010000u, 44u}, // bys -> Latn - {0xD7010000u, 44u}, // byv -> Latn - {0xDF010000u, 44u}, // byx -> Latn - {0x83210000u, 44u}, // bza -> Latn - {0x93210000u, 44u}, // bze -> Latn - {0x97210000u, 44u}, // bzf -> Latn - {0x9F210000u, 44u}, // bzh -> Latn - {0xDB210000u, 44u}, // bzw -> Latn - {0x63610000u, 44u}, // ca -> Latn - {0xB4020000u, 44u}, // can -> Latn - {0xA4220000u, 44u}, // cbj -> Latn - {0x9C420000u, 44u}, // cch -> Latn + {0xCA410000u, 46u}, // bss -> Latn + {0xCE410000u, 20u}, // bst -> Ethi + {0xBA610000u, 46u}, // bto -> Latn + {0xCE610000u, 46u}, // btt -> Latn + {0xD6610000u, 18u}, // btv -> Deva + {0x82810000u, 17u}, // bua -> Cyrl + {0x8A810000u, 46u}, // buc -> Latn + {0x8E810000u, 46u}, // bud -> Latn + {0x9A810000u, 46u}, // bug -> Latn + {0xAA810000u, 46u}, // buk -> Latn + {0xB2810000u, 46u}, // bum -> Latn + {0xBA810000u, 46u}, // buo -> Latn + {0xCA810000u, 46u}, // bus -> Latn + {0xD2810000u, 46u}, // buu -> Latn + {0x86A10000u, 46u}, // bvb -> Latn + {0x8EC10000u, 46u}, // bwd -> Latn + {0xC6C10000u, 46u}, // bwr -> Latn + {0x9EE10000u, 46u}, // bxh -> Latn + {0x93010000u, 46u}, // bye -> Latn + {0xB7010000u, 20u}, // byn -> Ethi + {0xC7010000u, 46u}, // byr -> Latn + {0xCB010000u, 46u}, // bys -> Latn + {0xD7010000u, 46u}, // byv -> Latn + {0xDF010000u, 46u}, // byx -> Latn + {0x83210000u, 46u}, // bza -> Latn + {0x93210000u, 46u}, // bze -> Latn + {0x97210000u, 46u}, // bzf -> Latn + {0x9F210000u, 46u}, // bzh -> Latn + {0xDB210000u, 46u}, // bzw -> Latn + {0x63610000u, 46u}, // ca -> Latn + {0xB4020000u, 46u}, // can -> Latn + {0xA4220000u, 46u}, // cbj -> Latn + {0x9C420000u, 46u}, // cch -> Latn {0xBC420000u, 9u}, // ccp -> Cakm - {0x63650000u, 16u}, // ce -> Cyrl - {0x84820000u, 44u}, // ceb -> Latn - {0x80A20000u, 44u}, // cfa -> Latn - {0x98C20000u, 44u}, // cgg -> Latn - {0x63680000u, 44u}, // ch -> Latn - {0xA8E20000u, 44u}, // chk -> Latn - {0xB0E20000u, 16u}, // chm -> Cyrl - {0xB8E20000u, 44u}, // cho -> Latn - {0xBCE20000u, 44u}, // chp -> Latn + {0x63650000u, 17u}, // ce -> Cyrl + {0x84820000u, 46u}, // ceb -> Latn + {0x80A20000u, 46u}, // cfa -> Latn + {0x98C20000u, 46u}, // cgg -> Latn + {0x63680000u, 46u}, // ch -> Latn + {0xA8E20000u, 46u}, // chk -> Latn + {0xB0E20000u, 17u}, // chm -> Cyrl + {0xB8E20000u, 46u}, // cho -> Latn + {0xBCE20000u, 46u}, // chp -> Latn {0xC4E20000u, 13u}, // chr -> Cher - {0x89020000u, 44u}, // cic -> Latn + {0x89020000u, 46u}, // cic -> Latn {0x81220000u, 1u}, // cja -> Arab {0xB1220000u, 12u}, // cjm -> Cham - {0xD5220000u, 44u}, // cjv -> Latn + {0xD5220000u, 46u}, // cjv -> Latn {0x85420000u, 1u}, // ckb -> Arab - {0xAD420000u, 44u}, // ckl -> Latn - {0xB9420000u, 44u}, // cko -> Latn - {0xE1420000u, 44u}, // cky -> Latn - {0x81620000u, 44u}, // cla -> Latn - {0x91820000u, 44u}, // cme -> Latn - {0x99820000u, 77u}, // cmg -> Soyo - {0x636F0000u, 44u}, // co -> Latn - {0xBDC20000u, 14u}, // cop -> Copt - {0xC9E20000u, 44u}, // cps -> Latn + {0xAD420000u, 46u}, // ckl -> Latn + {0xB9420000u, 46u}, // cko -> Latn + {0xE1420000u, 46u}, // cky -> Latn + {0x81620000u, 46u}, // cla -> Latn + {0x91820000u, 46u}, // cme -> Latn + {0x99820000u, 79u}, // cmg -> Soyo + {0x636F0000u, 46u}, // co -> Latn + {0xBDC20000u, 15u}, // cop -> Copt + {0xC9E20000u, 46u}, // cps -> Latn {0x63720000u, 10u}, // cr -> Cans - {0x9E220000u, 16u}, // crh -> Cyrl + {0x9E220000u, 17u}, // crh -> Cyrl {0xA6220000u, 10u}, // crj -> Cans {0xAA220000u, 10u}, // crk -> Cans {0xAE220000u, 10u}, // crl -> Cans {0xB2220000u, 10u}, // crm -> Cans - {0xCA220000u, 44u}, // crs -> Latn - {0x63730000u, 44u}, // cs -> Latn - {0x86420000u, 44u}, // csb -> Latn + {0xCA220000u, 46u}, // crs -> Latn + {0x63730000u, 46u}, // cs -> Latn + {0x86420000u, 46u}, // csb -> Latn {0xDA420000u, 10u}, // csw -> Cans - {0x8E620000u, 64u}, // ctd -> Pauc - {0x63750000u, 16u}, // cu -> Cyrl - {0x63760000u, 16u}, // cv -> Cyrl - {0x63790000u, 44u}, // cy -> Latn - {0x64610000u, 44u}, // da -> Latn - {0x8C030000u, 44u}, // dad -> Latn - {0x94030000u, 44u}, // daf -> Latn - {0x98030000u, 44u}, // dag -> Latn - {0x9C030000u, 44u}, // dah -> Latn - {0xA8030000u, 44u}, // dak -> Latn - {0xC4030000u, 16u}, // dar -> Cyrl - {0xD4030000u, 44u}, // dav -> Latn - {0x8C230000u, 44u}, // dbd -> Latn - {0xC0230000u, 44u}, // dbq -> Latn + {0x8E620000u, 66u}, // ctd -> Pauc + {0x63750000u, 17u}, // cu -> Cyrl + {0x63760000u, 17u}, // cv -> Cyrl + {0x63790000u, 46u}, // cy -> Latn + {0x64610000u, 46u}, // da -> Latn + {0x8C030000u, 46u}, // dad -> Latn + {0x94030000u, 46u}, // daf -> Latn + {0x98030000u, 46u}, // dag -> Latn + {0x9C030000u, 46u}, // dah -> Latn + {0xA8030000u, 46u}, // dak -> Latn + {0xC4030000u, 17u}, // dar -> Cyrl + {0xD4030000u, 46u}, // dav -> Latn + {0x8C230000u, 46u}, // dbd -> Latn + {0xC0230000u, 46u}, // dbq -> Latn {0x88430000u, 1u}, // dcc -> Arab - {0xB4630000u, 44u}, // ddn -> Latn - {0x64650000u, 44u}, // de -> Latn - {0x8C830000u, 44u}, // ded -> Latn - {0xB4830000u, 44u}, // den -> Latn - {0x80C30000u, 44u}, // dga -> Latn - {0x9CC30000u, 44u}, // dgh -> Latn - {0xA0C30000u, 44u}, // dgi -> Latn + {0xB4630000u, 46u}, // ddn -> Latn + {0x64650000u, 46u}, // de -> Latn + {0x8C830000u, 46u}, // ded -> Latn + {0xB4830000u, 46u}, // den -> Latn + {0x80C30000u, 46u}, // dga -> Latn + {0x9CC30000u, 46u}, // dgh -> Latn + {0xA0C30000u, 46u}, // dgi -> Latn {0xACC30000u, 1u}, // dgl -> Arab - {0xC4C30000u, 44u}, // dgr -> Latn - {0xE4C30000u, 44u}, // dgz -> Latn - {0x81030000u, 44u}, // dia -> Latn - {0x91230000u, 44u}, // dje -> Latn - {0xA5A30000u, 44u}, // dnj -> Latn - {0x85C30000u, 44u}, // dob -> Latn + {0xC4C30000u, 46u}, // dgr -> Latn + {0xE4C30000u, 46u}, // dgz -> Latn + {0x81030000u, 46u}, // dia -> Latn + {0x91230000u, 46u}, // dje -> Latn + {0xA5A30000u, 46u}, // dnj -> Latn + {0x85C30000u, 46u}, // dob -> Latn {0xA1C30000u, 1u}, // doi -> Arab - {0xBDC30000u, 44u}, // dop -> Latn - {0xD9C30000u, 44u}, // dow -> Latn - {0x9E230000u, 54u}, // drh -> Mong - {0xA2230000u, 44u}, // dri -> Latn - {0xCA230000u, 19u}, // drs -> Ethi - {0x86430000u, 44u}, // dsb -> Latn - {0xB2630000u, 44u}, // dtm -> Latn - {0xBE630000u, 44u}, // dtp -> Latn - {0xCA630000u, 44u}, // dts -> Latn - {0xE2630000u, 17u}, // dty -> Deva - {0x82830000u, 44u}, // dua -> Latn - {0x8A830000u, 44u}, // duc -> Latn - {0x8E830000u, 44u}, // dud -> Latn - {0x9A830000u, 44u}, // dug -> Latn - {0x64760000u, 86u}, // dv -> Thaa - {0x82A30000u, 44u}, // dva -> Latn - {0xDAC30000u, 44u}, // dww -> Latn - {0xBB030000u, 44u}, // dyo -> Latn - {0xD3030000u, 44u}, // dyu -> Latn - {0x647A0000u, 88u}, // dz -> Tibt - {0x9B230000u, 44u}, // dzg -> Latn - {0xD0240000u, 44u}, // ebu -> Latn - {0x65650000u, 44u}, // ee -> Latn - {0xA0A40000u, 44u}, // efi -> Latn - {0xACC40000u, 44u}, // egl -> Latn - {0xE0C40000u, 18u}, // egy -> Egyp - {0x81440000u, 44u}, // eka -> Latn - {0xE1440000u, 36u}, // eky -> Kali - {0x656C0000u, 24u}, // el -> Grek - {0x81840000u, 44u}, // ema -> Latn - {0xA1840000u, 44u}, // emi -> Latn - {0x656E0000u, 44u}, // en -> Latn - {0x656E5841u, 95u}, // en-XA -> ~~~A - {0xB5A40000u, 44u}, // enn -> Latn - {0xC1A40000u, 44u}, // enq -> Latn - {0x656F0000u, 44u}, // eo -> Latn - {0xA2240000u, 44u}, // eri -> Latn - {0x65730000u, 44u}, // es -> Latn - {0x9A440000u, 22u}, // esg -> Gonm - {0xD2440000u, 44u}, // esu -> Latn - {0x65740000u, 44u}, // et -> Latn - {0xC6640000u, 44u}, // etr -> Latn - {0xCE640000u, 34u}, // ett -> Ital - {0xD2640000u, 44u}, // etu -> Latn - {0xDE640000u, 44u}, // etx -> Latn - {0x65750000u, 44u}, // eu -> Latn - {0xBAC40000u, 44u}, // ewo -> Latn - {0xCEE40000u, 44u}, // ext -> Latn + {0xBDC30000u, 46u}, // dop -> Latn + {0xD9C30000u, 46u}, // dow -> Latn + {0x9E230000u, 56u}, // drh -> Mong + {0xA2230000u, 46u}, // dri -> Latn + {0xCA230000u, 20u}, // drs -> Ethi + {0x86430000u, 46u}, // dsb -> Latn + {0xB2630000u, 46u}, // dtm -> Latn + {0xBE630000u, 46u}, // dtp -> Latn + {0xCA630000u, 46u}, // dts -> Latn + {0xE2630000u, 18u}, // dty -> Deva + {0x82830000u, 46u}, // dua -> Latn + {0x8A830000u, 46u}, // duc -> Latn + {0x8E830000u, 46u}, // dud -> Latn + {0x9A830000u, 46u}, // dug -> Latn + {0x64760000u, 88u}, // dv -> Thaa + {0x82A30000u, 46u}, // dva -> Latn + {0xDAC30000u, 46u}, // dww -> Latn + {0xBB030000u, 46u}, // dyo -> Latn + {0xD3030000u, 46u}, // dyu -> Latn + {0x647A0000u, 90u}, // dz -> Tibt + {0x9B230000u, 46u}, // dzg -> Latn + {0xD0240000u, 46u}, // ebu -> Latn + {0x65650000u, 46u}, // ee -> Latn + {0xA0A40000u, 46u}, // efi -> Latn + {0xACC40000u, 46u}, // egl -> Latn + {0xE0C40000u, 19u}, // egy -> Egyp + {0x81440000u, 46u}, // eka -> Latn + {0xE1440000u, 37u}, // eky -> Kali + {0x656C0000u, 25u}, // el -> Grek + {0x81840000u, 46u}, // ema -> Latn + {0xA1840000u, 46u}, // emi -> Latn + {0x656E0000u, 46u}, // en -> Latn + {0x656E5841u, 97u}, // en-XA -> ~~~A + {0xB5A40000u, 46u}, // enn -> Latn + {0xC1A40000u, 46u}, // enq -> Latn + {0x656F0000u, 46u}, // eo -> Latn + {0xA2240000u, 46u}, // eri -> Latn + {0x65730000u, 46u}, // es -> Latn + {0x9A440000u, 23u}, // esg -> Gonm + {0xD2440000u, 46u}, // esu -> Latn + {0x65740000u, 46u}, // et -> Latn + {0xC6640000u, 46u}, // etr -> Latn + {0xCE640000u, 35u}, // ett -> Ital + {0xD2640000u, 46u}, // etu -> Latn + {0xDE640000u, 46u}, // etx -> Latn + {0x65750000u, 46u}, // eu -> Latn + {0xBAC40000u, 46u}, // ewo -> Latn + {0xCEE40000u, 46u}, // ext -> Latn {0x66610000u, 1u}, // fa -> Arab - {0x80050000u, 44u}, // faa -> Latn - {0x84050000u, 44u}, // fab -> Latn - {0x98050000u, 44u}, // fag -> Latn - {0xA0050000u, 44u}, // fai -> Latn - {0xB4050000u, 44u}, // fan -> Latn - {0x66660000u, 44u}, // ff -> Latn - {0xA0A50000u, 44u}, // ffi -> Latn - {0xB0A50000u, 44u}, // ffm -> Latn - {0x66690000u, 44u}, // fi -> Latn + {0x80050000u, 46u}, // faa -> Latn + {0x84050000u, 46u}, // fab -> Latn + {0x98050000u, 46u}, // fag -> Latn + {0xA0050000u, 46u}, // fai -> Latn + {0xB4050000u, 46u}, // fan -> Latn + {0x66660000u, 46u}, // ff -> Latn + {0xA0A50000u, 46u}, // ffi -> Latn + {0xB0A50000u, 46u}, // ffm -> Latn + {0x66690000u, 46u}, // fi -> Latn {0x81050000u, 1u}, // fia -> Arab - {0xAD050000u, 44u}, // fil -> Latn - {0xCD050000u, 44u}, // fit -> Latn - {0x666A0000u, 44u}, // fj -> Latn - {0xC5650000u, 44u}, // flr -> Latn - {0xBD850000u, 44u}, // fmp -> Latn - {0x666F0000u, 44u}, // fo -> Latn - {0x8DC50000u, 44u}, // fod -> Latn - {0xB5C50000u, 44u}, // fon -> Latn - {0xC5C50000u, 44u}, // for -> Latn - {0x91E50000u, 44u}, // fpe -> Latn - {0xCA050000u, 44u}, // fqs -> Latn - {0x66720000u, 44u}, // fr -> Latn - {0x8A250000u, 44u}, // frc -> Latn - {0xBE250000u, 44u}, // frp -> Latn - {0xC6250000u, 44u}, // frr -> Latn - {0xCA250000u, 44u}, // frs -> Latn + {0xAD050000u, 46u}, // fil -> Latn + {0xCD050000u, 46u}, // fit -> Latn + {0x666A0000u, 46u}, // fj -> Latn + {0xC5650000u, 46u}, // flr -> Latn + {0xBD850000u, 46u}, // fmp -> Latn + {0x666F0000u, 46u}, // fo -> Latn + {0x8DC50000u, 46u}, // fod -> Latn + {0xB5C50000u, 46u}, // fon -> Latn + {0xC5C50000u, 46u}, // for -> Latn + {0x91E50000u, 46u}, // fpe -> Latn + {0xCA050000u, 46u}, // fqs -> Latn + {0x66720000u, 46u}, // fr -> Latn + {0x8A250000u, 46u}, // frc -> Latn + {0xBE250000u, 46u}, // frp -> Latn + {0xC6250000u, 46u}, // frr -> Latn + {0xCA250000u, 46u}, // frs -> Latn {0x86850000u, 1u}, // fub -> Arab - {0x8E850000u, 44u}, // fud -> Latn - {0x92850000u, 44u}, // fue -> Latn - {0x96850000u, 44u}, // fuf -> Latn - {0x9E850000u, 44u}, // fuh -> Latn - {0xC2850000u, 44u}, // fuq -> Latn - {0xC6850000u, 44u}, // fur -> Latn - {0xD6850000u, 44u}, // fuv -> Latn - {0xE2850000u, 44u}, // fuy -> Latn - {0xC6A50000u, 44u}, // fvr -> Latn - {0x66790000u, 44u}, // fy -> Latn - {0x67610000u, 44u}, // ga -> Latn - {0x80060000u, 44u}, // gaa -> Latn - {0x94060000u, 44u}, // gaf -> Latn - {0x98060000u, 44u}, // gag -> Latn - {0x9C060000u, 44u}, // gah -> Latn - {0xA4060000u, 44u}, // gaj -> Latn - {0xB0060000u, 44u}, // gam -> Latn - {0xB4060000u, 27u}, // gan -> Hans - {0xD8060000u, 44u}, // gaw -> Latn - {0xE0060000u, 44u}, // gay -> Latn - {0x80260000u, 44u}, // gba -> Latn - {0x94260000u, 44u}, // gbf -> Latn - {0xB0260000u, 17u}, // gbm -> Deva - {0xE0260000u, 44u}, // gby -> Latn + {0x8E850000u, 46u}, // fud -> Latn + {0x92850000u, 46u}, // fue -> Latn + {0x96850000u, 46u}, // fuf -> Latn + {0x9E850000u, 46u}, // fuh -> Latn + {0xC2850000u, 46u}, // fuq -> Latn + {0xC6850000u, 46u}, // fur -> Latn + {0xD6850000u, 46u}, // fuv -> Latn + {0xE2850000u, 46u}, // fuy -> Latn + {0xC6A50000u, 46u}, // fvr -> Latn + {0x66790000u, 46u}, // fy -> Latn + {0x67610000u, 46u}, // ga -> Latn + {0x80060000u, 46u}, // gaa -> Latn + {0x94060000u, 46u}, // gaf -> Latn + {0x98060000u, 46u}, // gag -> Latn + {0x9C060000u, 46u}, // gah -> Latn + {0xA4060000u, 46u}, // gaj -> Latn + {0xB0060000u, 46u}, // gam -> Latn + {0xB4060000u, 28u}, // gan -> Hans + {0xD8060000u, 46u}, // gaw -> Latn + {0xE0060000u, 46u}, // gay -> Latn + {0x80260000u, 46u}, // gba -> Latn + {0x94260000u, 46u}, // gbf -> Latn + {0xB0260000u, 18u}, // gbm -> Deva + {0xE0260000u, 46u}, // gby -> Latn {0xE4260000u, 1u}, // gbz -> Arab - {0xC4460000u, 44u}, // gcr -> Latn - {0x67640000u, 44u}, // gd -> Latn - {0x90660000u, 44u}, // gde -> Latn - {0xB4660000u, 44u}, // gdn -> Latn - {0xC4660000u, 44u}, // gdr -> Latn - {0x84860000u, 44u}, // geb -> Latn - {0xA4860000u, 44u}, // gej -> Latn - {0xAC860000u, 44u}, // gel -> Latn - {0xE4860000u, 19u}, // gez -> Ethi - {0xA8A60000u, 44u}, // gfk -> Latn - {0xB4C60000u, 17u}, // ggn -> Deva - {0xC8E60000u, 44u}, // ghs -> Latn - {0xAD060000u, 44u}, // gil -> Latn - {0xB1060000u, 44u}, // gim -> Latn + {0xC4460000u, 46u}, // gcr -> Latn + {0x67640000u, 46u}, // gd -> Latn + {0x90660000u, 46u}, // gde -> Latn + {0xB4660000u, 46u}, // gdn -> Latn + {0xC4660000u, 46u}, // gdr -> Latn + {0x84860000u, 46u}, // geb -> Latn + {0xA4860000u, 46u}, // gej -> Latn + {0xAC860000u, 46u}, // gel -> Latn + {0xE4860000u, 20u}, // gez -> Ethi + {0xA8A60000u, 46u}, // gfk -> Latn + {0xB4C60000u, 18u}, // ggn -> Deva + {0xC8E60000u, 46u}, // ghs -> Latn + {0xAD060000u, 46u}, // gil -> Latn + {0xB1060000u, 46u}, // gim -> Latn {0xA9260000u, 1u}, // gjk -> Arab - {0xB5260000u, 44u}, // gjn -> Latn + {0xB5260000u, 46u}, // gjn -> Latn {0xD1260000u, 1u}, // gju -> Arab - {0xB5460000u, 44u}, // gkn -> Latn - {0xBD460000u, 44u}, // gkp -> Latn - {0x676C0000u, 44u}, // gl -> Latn + {0xB5460000u, 46u}, // gkn -> Latn + {0xBD460000u, 46u}, // gkp -> Latn + {0x676C0000u, 46u}, // gl -> Latn {0xA9660000u, 1u}, // glk -> Arab - {0xB1860000u, 44u}, // gmm -> Latn - {0xD5860000u, 19u}, // gmv -> Ethi - {0x676E0000u, 44u}, // gn -> Latn - {0x8DA60000u, 44u}, // gnd -> Latn - {0x99A60000u, 44u}, // gng -> Latn - {0x8DC60000u, 44u}, // god -> Latn - {0x95C60000u, 19u}, // gof -> Ethi - {0xA1C60000u, 44u}, // goi -> Latn - {0xB1C60000u, 17u}, // gom -> Deva - {0xB5C60000u, 84u}, // gon -> Telu - {0xC5C60000u, 44u}, // gor -> Latn - {0xC9C60000u, 44u}, // gos -> Latn - {0xCDC60000u, 23u}, // got -> Goth - {0x86260000u, 44u}, // grb -> Latn - {0x8A260000u, 15u}, // grc -> Cprt + {0xB1860000u, 46u}, // gmm -> Latn + {0xD5860000u, 20u}, // gmv -> Ethi + {0x676E0000u, 46u}, // gn -> Latn + {0x8DA60000u, 46u}, // gnd -> Latn + {0x99A60000u, 46u}, // gng -> Latn + {0x8DC60000u, 46u}, // god -> Latn + {0x95C60000u, 20u}, // gof -> Ethi + {0xA1C60000u, 46u}, // goi -> Latn + {0xB1C60000u, 18u}, // gom -> Deva + {0xB5C60000u, 86u}, // gon -> Telu + {0xC5C60000u, 46u}, // gor -> Latn + {0xC9C60000u, 46u}, // gos -> Latn + {0xCDC60000u, 24u}, // got -> Goth + {0x86260000u, 46u}, // grb -> Latn + {0x8A260000u, 16u}, // grc -> Cprt {0xCE260000u, 7u}, // grt -> Beng - {0xDA260000u, 44u}, // grw -> Latn - {0xDA460000u, 44u}, // gsw -> Latn - {0x67750000u, 25u}, // gu -> Gujr - {0x86860000u, 44u}, // gub -> Latn - {0x8A860000u, 44u}, // guc -> Latn - {0x8E860000u, 44u}, // gud -> Latn - {0xC6860000u, 44u}, // gur -> Latn - {0xDA860000u, 44u}, // guw -> Latn - {0xDE860000u, 44u}, // gux -> Latn - {0xE6860000u, 44u}, // guz -> Latn - {0x67760000u, 44u}, // gv -> Latn - {0x96A60000u, 44u}, // gvf -> Latn - {0xC6A60000u, 17u}, // gvr -> Deva - {0xCAA60000u, 44u}, // gvs -> Latn + {0xDA260000u, 46u}, // grw -> Latn + {0xDA460000u, 46u}, // gsw -> Latn + {0x67750000u, 26u}, // gu -> Gujr + {0x86860000u, 46u}, // gub -> Latn + {0x8A860000u, 46u}, // guc -> Latn + {0x8E860000u, 46u}, // gud -> Latn + {0xC6860000u, 46u}, // gur -> Latn + {0xDA860000u, 46u}, // guw -> Latn + {0xDE860000u, 46u}, // gux -> Latn + {0xE6860000u, 46u}, // guz -> Latn + {0x67760000u, 46u}, // gv -> Latn + {0x96A60000u, 46u}, // gvf -> Latn + {0xC6A60000u, 18u}, // gvr -> Deva + {0xCAA60000u, 46u}, // gvs -> Latn {0x8AC60000u, 1u}, // gwc -> Arab - {0xA2C60000u, 44u}, // gwi -> Latn + {0xA2C60000u, 46u}, // gwi -> Latn {0xCEC60000u, 1u}, // gwt -> Arab - {0xA3060000u, 44u}, // gyi -> Latn - {0x68610000u, 44u}, // ha -> Latn + {0xA3060000u, 46u}, // gyi -> Latn + {0x68610000u, 46u}, // ha -> Latn {0x6861434Du, 1u}, // ha-CM -> Arab {0x68615344u, 1u}, // ha-SD -> Arab - {0x98070000u, 44u}, // hag -> Latn - {0xA8070000u, 27u}, // hak -> Hans - {0xB0070000u, 44u}, // ham -> Latn - {0xD8070000u, 44u}, // haw -> Latn + {0x98070000u, 46u}, // hag -> Latn + {0xA8070000u, 28u}, // hak -> Hans + {0xB0070000u, 46u}, // ham -> Latn + {0xD8070000u, 46u}, // haw -> Latn {0xE4070000u, 1u}, // haz -> Arab - {0x84270000u, 44u}, // hbb -> Latn - {0xE0670000u, 19u}, // hdy -> Ethi - {0x68650000u, 30u}, // he -> Hebr - {0xE0E70000u, 44u}, // hhy -> Latn - {0x68690000u, 17u}, // hi -> Deva - {0x81070000u, 44u}, // hia -> Latn - {0x95070000u, 44u}, // hif -> Latn - {0x99070000u, 44u}, // hig -> Latn - {0x9D070000u, 44u}, // hih -> Latn - {0xAD070000u, 44u}, // hil -> Latn - {0x81670000u, 44u}, // hla -> Latn - {0xD1670000u, 31u}, // hlu -> Hluw - {0x8D870000u, 67u}, // hmd -> Plrd - {0xCD870000u, 44u}, // hmt -> Latn + {0x84270000u, 46u}, // hbb -> Latn + {0xE0670000u, 20u}, // hdy -> Ethi + {0x68650000u, 31u}, // he -> Hebr + {0xE0E70000u, 46u}, // hhy -> Latn + {0x68690000u, 18u}, // hi -> Deva + {0x81070000u, 46u}, // hia -> Latn + {0x95070000u, 46u}, // hif -> Latn + {0x99070000u, 46u}, // hig -> Latn + {0x9D070000u, 46u}, // hih -> Latn + {0xAD070000u, 46u}, // hil -> Latn + {0x81670000u, 46u}, // hla -> Latn + {0xD1670000u, 32u}, // hlu -> Hluw + {0x8D870000u, 69u}, // hmd -> Plrd + {0xCD870000u, 46u}, // hmt -> Latn {0x8DA70000u, 1u}, // hnd -> Arab - {0x91A70000u, 17u}, // hne -> Deva - {0xA5A70000u, 32u}, // hnj -> Hmng - {0xB5A70000u, 44u}, // hnn -> Latn + {0x91A70000u, 18u}, // hne -> Deva + {0xA5A70000u, 33u}, // hnj -> Hmng + {0xB5A70000u, 46u}, // hnn -> Latn {0xB9A70000u, 1u}, // hno -> Arab - {0x686F0000u, 44u}, // ho -> Latn - {0x89C70000u, 17u}, // hoc -> Deva - {0xA5C70000u, 17u}, // hoj -> Deva - {0xCDC70000u, 44u}, // hot -> Latn - {0x68720000u, 44u}, // hr -> Latn - {0x86470000u, 44u}, // hsb -> Latn - {0xB6470000u, 27u}, // hsn -> Hans - {0x68740000u, 44u}, // ht -> Latn - {0x68750000u, 44u}, // hu -> Latn - {0xA2870000u, 44u}, // hui -> Latn + {0x686F0000u, 46u}, // ho -> Latn + {0x89C70000u, 18u}, // hoc -> Deva + {0xA5C70000u, 18u}, // hoj -> Deva + {0xCDC70000u, 46u}, // hot -> Latn + {0x68720000u, 46u}, // hr -> Latn + {0x86470000u, 46u}, // hsb -> Latn + {0xB6470000u, 28u}, // hsn -> Hans + {0x68740000u, 46u}, // ht -> Latn + {0x68750000u, 46u}, // hu -> Latn + {0xA2870000u, 46u}, // hui -> Latn {0x68790000u, 3u}, // hy -> Armn - {0x687A0000u, 44u}, // hz -> Latn - {0x69610000u, 44u}, // ia -> Latn - {0xB4080000u, 44u}, // ian -> Latn - {0xC4080000u, 44u}, // iar -> Latn - {0x80280000u, 44u}, // iba -> Latn - {0x84280000u, 44u}, // ibb -> Latn - {0xE0280000u, 44u}, // iby -> Latn - {0x80480000u, 44u}, // ica -> Latn - {0x9C480000u, 44u}, // ich -> Latn - {0x69640000u, 44u}, // id -> Latn - {0x8C680000u, 44u}, // idd -> Latn - {0xA0680000u, 44u}, // idi -> Latn - {0xD0680000u, 44u}, // idu -> Latn - {0x90A80000u, 44u}, // ife -> Latn - {0x69670000u, 44u}, // ig -> Latn - {0x84C80000u, 44u}, // igb -> Latn - {0x90C80000u, 44u}, // ige -> Latn - {0x69690000u, 94u}, // ii -> Yiii - {0xA5280000u, 44u}, // ijj -> Latn - {0x696B0000u, 44u}, // ik -> Latn - {0xA9480000u, 44u}, // ikk -> Latn - {0xCD480000u, 44u}, // ikt -> Latn - {0xD9480000u, 44u}, // ikw -> Latn - {0xDD480000u, 44u}, // ikx -> Latn - {0xB9680000u, 44u}, // ilo -> Latn - {0xB9880000u, 44u}, // imo -> Latn - {0x696E0000u, 44u}, // in -> Latn - {0x9DA80000u, 16u}, // inh -> Cyrl - {0x696F0000u, 44u}, // io -> Latn - {0xD1C80000u, 44u}, // iou -> Latn - {0xA2280000u, 44u}, // iri -> Latn - {0x69730000u, 44u}, // is -> Latn - {0x69740000u, 44u}, // it -> Latn + {0x687A0000u, 46u}, // hz -> Latn + {0x69610000u, 46u}, // ia -> Latn + {0xB4080000u, 46u}, // ian -> Latn + {0xC4080000u, 46u}, // iar -> Latn + {0x80280000u, 46u}, // iba -> Latn + {0x84280000u, 46u}, // ibb -> Latn + {0xE0280000u, 46u}, // iby -> Latn + {0x80480000u, 46u}, // ica -> Latn + {0x9C480000u, 46u}, // ich -> Latn + {0x69640000u, 46u}, // id -> Latn + {0x8C680000u, 46u}, // idd -> Latn + {0xA0680000u, 46u}, // idi -> Latn + {0xD0680000u, 46u}, // idu -> Latn + {0x90A80000u, 46u}, // ife -> Latn + {0x69670000u, 46u}, // ig -> Latn + {0x84C80000u, 46u}, // igb -> Latn + {0x90C80000u, 46u}, // ige -> Latn + {0x69690000u, 96u}, // ii -> Yiii + {0xA5280000u, 46u}, // ijj -> Latn + {0x696B0000u, 46u}, // ik -> Latn + {0xA9480000u, 46u}, // ikk -> Latn + {0xCD480000u, 46u}, // ikt -> Latn + {0xD9480000u, 46u}, // ikw -> Latn + {0xDD480000u, 46u}, // ikx -> Latn + {0xB9680000u, 46u}, // ilo -> Latn + {0xB9880000u, 46u}, // imo -> Latn + {0x696E0000u, 46u}, // in -> Latn + {0x9DA80000u, 17u}, // inh -> Cyrl + {0x696F0000u, 46u}, // io -> Latn + {0xD1C80000u, 46u}, // iou -> Latn + {0xA2280000u, 46u}, // iri -> Latn + {0x69730000u, 46u}, // is -> Latn + {0x69740000u, 46u}, // it -> Latn {0x69750000u, 10u}, // iu -> Cans - {0x69770000u, 30u}, // iw -> Hebr - {0xB2C80000u, 44u}, // iwm -> Latn - {0xCAC80000u, 44u}, // iws -> Latn - {0x9F280000u, 44u}, // izh -> Latn - {0xA3280000u, 44u}, // izi -> Latn - {0x6A610000u, 35u}, // ja -> Jpan - {0x84090000u, 44u}, // jab -> Latn - {0xB0090000u, 44u}, // jam -> Latn - {0xB8290000u, 44u}, // jbo -> Latn - {0xD0290000u, 44u}, // jbu -> Latn - {0xB4890000u, 44u}, // jen -> Latn - {0xA8C90000u, 44u}, // jgk -> Latn - {0xB8C90000u, 44u}, // jgo -> Latn - {0x6A690000u, 30u}, // ji -> Hebr - {0x85090000u, 44u}, // jib -> Latn - {0x89890000u, 44u}, // jmc -> Latn - {0xAD890000u, 17u}, // jml -> Deva - {0x82290000u, 44u}, // jra -> Latn - {0xCE890000u, 44u}, // jut -> Latn - {0x6A760000u, 44u}, // jv -> Latn - {0x6A770000u, 44u}, // jw -> Latn - {0x6B610000u, 20u}, // ka -> Geor - {0x800A0000u, 16u}, // kaa -> Cyrl - {0x840A0000u, 44u}, // kab -> Latn - {0x880A0000u, 44u}, // kac -> Latn - {0x8C0A0000u, 44u}, // kad -> Latn - {0xA00A0000u, 44u}, // kai -> Latn - {0xA40A0000u, 44u}, // kaj -> Latn - {0xB00A0000u, 44u}, // kam -> Latn - {0xB80A0000u, 44u}, // kao -> Latn - {0x8C2A0000u, 16u}, // kbd -> Cyrl - {0xB02A0000u, 44u}, // kbm -> Latn - {0xBC2A0000u, 44u}, // kbp -> Latn - {0xC02A0000u, 44u}, // kbq -> Latn - {0xDC2A0000u, 44u}, // kbx -> Latn + {0x69770000u, 31u}, // iw -> Hebr + {0xB2C80000u, 46u}, // iwm -> Latn + {0xCAC80000u, 46u}, // iws -> Latn + {0x9F280000u, 46u}, // izh -> Latn + {0xA3280000u, 46u}, // izi -> Latn + {0x6A610000u, 36u}, // ja -> Jpan + {0x84090000u, 46u}, // jab -> Latn + {0xB0090000u, 46u}, // jam -> Latn + {0xB8290000u, 46u}, // jbo -> Latn + {0xD0290000u, 46u}, // jbu -> Latn + {0xB4890000u, 46u}, // jen -> Latn + {0xA8C90000u, 46u}, // jgk -> Latn + {0xB8C90000u, 46u}, // jgo -> Latn + {0x6A690000u, 31u}, // ji -> Hebr + {0x85090000u, 46u}, // jib -> Latn + {0x89890000u, 46u}, // jmc -> Latn + {0xAD890000u, 18u}, // jml -> Deva + {0x82290000u, 46u}, // jra -> Latn + {0xCE890000u, 46u}, // jut -> Latn + {0x6A760000u, 46u}, // jv -> Latn + {0x6A770000u, 46u}, // jw -> Latn + {0x6B610000u, 21u}, // ka -> Geor + {0x800A0000u, 17u}, // kaa -> Cyrl + {0x840A0000u, 46u}, // kab -> Latn + {0x880A0000u, 46u}, // kac -> Latn + {0x8C0A0000u, 46u}, // kad -> Latn + {0xA00A0000u, 46u}, // kai -> Latn + {0xA40A0000u, 46u}, // kaj -> Latn + {0xB00A0000u, 46u}, // kam -> Latn + {0xB80A0000u, 46u}, // kao -> Latn + {0x8C2A0000u, 17u}, // kbd -> Cyrl + {0xB02A0000u, 46u}, // kbm -> Latn + {0xBC2A0000u, 46u}, // kbp -> Latn + {0xC02A0000u, 46u}, // kbq -> Latn + {0xDC2A0000u, 46u}, // kbx -> Latn {0xE02A0000u, 1u}, // kby -> Arab - {0x984A0000u, 44u}, // kcg -> Latn - {0xA84A0000u, 44u}, // kck -> Latn - {0xAC4A0000u, 44u}, // kcl -> Latn - {0xCC4A0000u, 44u}, // kct -> Latn - {0x906A0000u, 44u}, // kde -> Latn + {0x984A0000u, 46u}, // kcg -> Latn + {0xA84A0000u, 46u}, // kck -> Latn + {0xAC4A0000u, 46u}, // kcl -> Latn + {0xCC4A0000u, 46u}, // kct -> Latn + {0x906A0000u, 46u}, // kde -> Latn {0x9C6A0000u, 1u}, // kdh -> Arab - {0xAC6A0000u, 44u}, // kdl -> Latn - {0xCC6A0000u, 87u}, // kdt -> Thai - {0x808A0000u, 44u}, // kea -> Latn - {0xB48A0000u, 44u}, // ken -> Latn - {0xE48A0000u, 44u}, // kez -> Latn - {0xB8AA0000u, 44u}, // kfo -> Latn - {0xC4AA0000u, 17u}, // kfr -> Deva - {0xE0AA0000u, 17u}, // kfy -> Deva - {0x6B670000u, 44u}, // kg -> Latn - {0x90CA0000u, 44u}, // kge -> Latn - {0x94CA0000u, 44u}, // kgf -> Latn - {0xBCCA0000u, 44u}, // kgp -> Latn - {0x80EA0000u, 44u}, // kha -> Latn - {0x84EA0000u, 80u}, // khb -> Talu - {0xB4EA0000u, 17u}, // khn -> Deva - {0xC0EA0000u, 44u}, // khq -> Latn - {0xC8EA0000u, 44u}, // khs -> Latn - {0xCCEA0000u, 56u}, // kht -> Mymr + {0xAC6A0000u, 46u}, // kdl -> Latn + {0xCC6A0000u, 89u}, // kdt -> Thai + {0x808A0000u, 46u}, // kea -> Latn + {0xB48A0000u, 46u}, // ken -> Latn + {0xE48A0000u, 46u}, // kez -> Latn + {0xB8AA0000u, 46u}, // kfo -> Latn + {0xC4AA0000u, 18u}, // kfr -> Deva + {0xE0AA0000u, 18u}, // kfy -> Deva + {0x6B670000u, 46u}, // kg -> Latn + {0x90CA0000u, 46u}, // kge -> Latn + {0x94CA0000u, 46u}, // kgf -> Latn + {0xBCCA0000u, 46u}, // kgp -> Latn + {0x80EA0000u, 46u}, // kha -> Latn + {0x84EA0000u, 82u}, // khb -> Talu + {0xB4EA0000u, 18u}, // khn -> Deva + {0xC0EA0000u, 46u}, // khq -> Latn + {0xC8EA0000u, 46u}, // khs -> Latn + {0xCCEA0000u, 58u}, // kht -> Mymr {0xD8EA0000u, 1u}, // khw -> Arab - {0xE4EA0000u, 44u}, // khz -> Latn - {0x6B690000u, 44u}, // ki -> Latn - {0xA50A0000u, 44u}, // kij -> Latn - {0xD10A0000u, 44u}, // kiu -> Latn - {0xD90A0000u, 44u}, // kiw -> Latn - {0x6B6A0000u, 44u}, // kj -> Latn - {0x8D2A0000u, 44u}, // kjd -> Latn - {0x992A0000u, 43u}, // kjg -> Laoo - {0xC92A0000u, 44u}, // kjs -> Latn - {0xE12A0000u, 44u}, // kjy -> Latn - {0x6B6B0000u, 16u}, // kk -> Cyrl + {0xE4EA0000u, 46u}, // khz -> Latn + {0x6B690000u, 46u}, // ki -> Latn + {0xA50A0000u, 46u}, // kij -> Latn + {0xD10A0000u, 46u}, // kiu -> Latn + {0xD90A0000u, 46u}, // kiw -> Latn + {0x6B6A0000u, 46u}, // kj -> Latn + {0x8D2A0000u, 46u}, // kjd -> Latn + {0x992A0000u, 45u}, // kjg -> Laoo + {0xC92A0000u, 46u}, // kjs -> Latn + {0xE12A0000u, 46u}, // kjy -> Latn + {0x6B6B0000u, 17u}, // kk -> Cyrl {0x6B6B4146u, 1u}, // kk-AF -> Arab {0x6B6B434Eu, 1u}, // kk-CN -> Arab {0x6B6B4952u, 1u}, // kk-IR -> Arab {0x6B6B4D4Eu, 1u}, // kk-MN -> Arab - {0x894A0000u, 44u}, // kkc -> Latn - {0xA54A0000u, 44u}, // kkj -> Latn - {0x6B6C0000u, 44u}, // kl -> Latn - {0xB56A0000u, 44u}, // kln -> Latn - {0xC16A0000u, 44u}, // klq -> Latn - {0xCD6A0000u, 44u}, // klt -> Latn - {0xDD6A0000u, 44u}, // klx -> Latn - {0x6B6D0000u, 39u}, // km -> Khmr - {0x858A0000u, 44u}, // kmb -> Latn - {0x9D8A0000u, 44u}, // kmh -> Latn - {0xB98A0000u, 44u}, // kmo -> Latn - {0xC98A0000u, 44u}, // kms -> Latn - {0xD18A0000u, 44u}, // kmu -> Latn - {0xD98A0000u, 44u}, // kmw -> Latn - {0x6B6E0000u, 40u}, // kn -> Knda - {0x95AA0000u, 44u}, // knf -> Latn - {0xBDAA0000u, 44u}, // knp -> Latn - {0x6B6F0000u, 41u}, // ko -> Kore - {0xA1CA0000u, 16u}, // koi -> Cyrl - {0xA9CA0000u, 17u}, // kok -> Deva - {0xADCA0000u, 44u}, // kol -> Latn - {0xC9CA0000u, 44u}, // kos -> Latn - {0xE5CA0000u, 44u}, // koz -> Latn - {0x91EA0000u, 44u}, // kpe -> Latn - {0x95EA0000u, 44u}, // kpf -> Latn - {0xB9EA0000u, 44u}, // kpo -> Latn - {0xC5EA0000u, 44u}, // kpr -> Latn - {0xDDEA0000u, 44u}, // kpx -> Latn - {0x860A0000u, 44u}, // kqb -> Latn - {0x960A0000u, 44u}, // kqf -> Latn - {0xCA0A0000u, 44u}, // kqs -> Latn - {0xE20A0000u, 19u}, // kqy -> Ethi - {0x6B720000u, 44u}, // kr -> Latn - {0x8A2A0000u, 16u}, // krc -> Cyrl - {0xA22A0000u, 44u}, // kri -> Latn - {0xA62A0000u, 44u}, // krj -> Latn - {0xAE2A0000u, 44u}, // krl -> Latn - {0xCA2A0000u, 44u}, // krs -> Latn - {0xD22A0000u, 17u}, // kru -> Deva + {0x894A0000u, 46u}, // kkc -> Latn + {0xA54A0000u, 46u}, // kkj -> Latn + {0x6B6C0000u, 46u}, // kl -> Latn + {0xB56A0000u, 46u}, // kln -> Latn + {0xC16A0000u, 46u}, // klq -> Latn + {0xCD6A0000u, 46u}, // klt -> Latn + {0xDD6A0000u, 46u}, // klx -> Latn + {0x6B6D0000u, 40u}, // km -> Khmr + {0x858A0000u, 46u}, // kmb -> Latn + {0x9D8A0000u, 46u}, // kmh -> Latn + {0xB98A0000u, 46u}, // kmo -> Latn + {0xC98A0000u, 46u}, // kms -> Latn + {0xD18A0000u, 46u}, // kmu -> Latn + {0xD98A0000u, 46u}, // kmw -> Latn + {0x6B6E0000u, 42u}, // kn -> Knda + {0x95AA0000u, 46u}, // knf -> Latn + {0xBDAA0000u, 46u}, // knp -> Latn + {0x6B6F0000u, 43u}, // ko -> Kore + {0xA1CA0000u, 17u}, // koi -> Cyrl + {0xA9CA0000u, 18u}, // kok -> Deva + {0xADCA0000u, 46u}, // kol -> Latn + {0xC9CA0000u, 46u}, // kos -> Latn + {0xE5CA0000u, 46u}, // koz -> Latn + {0x91EA0000u, 46u}, // kpe -> Latn + {0x95EA0000u, 46u}, // kpf -> Latn + {0xB9EA0000u, 46u}, // kpo -> Latn + {0xC5EA0000u, 46u}, // kpr -> Latn + {0xDDEA0000u, 46u}, // kpx -> Latn + {0x860A0000u, 46u}, // kqb -> Latn + {0x960A0000u, 46u}, // kqf -> Latn + {0xCA0A0000u, 46u}, // kqs -> Latn + {0xE20A0000u, 20u}, // kqy -> Ethi + {0x6B720000u, 46u}, // kr -> Latn + {0x8A2A0000u, 17u}, // krc -> Cyrl + {0xA22A0000u, 46u}, // kri -> Latn + {0xA62A0000u, 46u}, // krj -> Latn + {0xAE2A0000u, 46u}, // krl -> Latn + {0xCA2A0000u, 46u}, // krs -> Latn + {0xD22A0000u, 18u}, // kru -> Deva {0x6B730000u, 1u}, // ks -> Arab - {0x864A0000u, 44u}, // ksb -> Latn - {0x8E4A0000u, 44u}, // ksd -> Latn - {0x964A0000u, 44u}, // ksf -> Latn - {0x9E4A0000u, 44u}, // ksh -> Latn - {0xA64A0000u, 44u}, // ksj -> Latn - {0xC64A0000u, 44u}, // ksr -> Latn - {0x866A0000u, 19u}, // ktb -> Ethi - {0xB26A0000u, 44u}, // ktm -> Latn - {0xBA6A0000u, 44u}, // kto -> Latn - {0xC66A0000u, 44u}, // ktr -> Latn - {0x6B750000u, 44u}, // ku -> Latn + {0x864A0000u, 46u}, // ksb -> Latn + {0x8E4A0000u, 46u}, // ksd -> Latn + {0x964A0000u, 46u}, // ksf -> Latn + {0x9E4A0000u, 46u}, // ksh -> Latn + {0xA64A0000u, 46u}, // ksj -> Latn + {0xC64A0000u, 46u}, // ksr -> Latn + {0x866A0000u, 20u}, // ktb -> Ethi + {0xB26A0000u, 46u}, // ktm -> Latn + {0xBA6A0000u, 46u}, // kto -> Latn + {0xC66A0000u, 46u}, // ktr -> Latn + {0x6B750000u, 46u}, // ku -> Latn {0x6B754952u, 1u}, // ku-IR -> Arab {0x6B754C42u, 1u}, // ku-LB -> Arab - {0x868A0000u, 44u}, // kub -> Latn - {0x8E8A0000u, 44u}, // kud -> Latn - {0x928A0000u, 44u}, // kue -> Latn - {0xA68A0000u, 44u}, // kuj -> Latn - {0xB28A0000u, 16u}, // kum -> Cyrl - {0xB68A0000u, 44u}, // kun -> Latn - {0xBE8A0000u, 44u}, // kup -> Latn - {0xCA8A0000u, 44u}, // kus -> Latn - {0x6B760000u, 16u}, // kv -> Cyrl - {0x9AAA0000u, 44u}, // kvg -> Latn - {0xC6AA0000u, 44u}, // kvr -> Latn + {0x868A0000u, 46u}, // kub -> Latn + {0x8E8A0000u, 46u}, // kud -> Latn + {0x928A0000u, 46u}, // kue -> Latn + {0xA68A0000u, 46u}, // kuj -> Latn + {0xB28A0000u, 17u}, // kum -> Cyrl + {0xB68A0000u, 46u}, // kun -> Latn + {0xBE8A0000u, 46u}, // kup -> Latn + {0xCA8A0000u, 46u}, // kus -> Latn + {0x6B760000u, 17u}, // kv -> Cyrl + {0x9AAA0000u, 46u}, // kvg -> Latn + {0xC6AA0000u, 46u}, // kvr -> Latn {0xDEAA0000u, 1u}, // kvx -> Arab - {0x6B770000u, 44u}, // kw -> Latn - {0xA6CA0000u, 44u}, // kwj -> Latn - {0xBACA0000u, 44u}, // kwo -> Latn - {0xC2CA0000u, 44u}, // kwq -> Latn - {0x82EA0000u, 44u}, // kxa -> Latn - {0x8AEA0000u, 19u}, // kxc -> Ethi - {0x92EA0000u, 44u}, // kxe -> Latn - {0xB2EA0000u, 87u}, // kxm -> Thai + {0x6B770000u, 46u}, // kw -> Latn + {0xA6CA0000u, 46u}, // kwj -> Latn + {0xBACA0000u, 46u}, // kwo -> Latn + {0xC2CA0000u, 46u}, // kwq -> Latn + {0x82EA0000u, 46u}, // kxa -> Latn + {0x8AEA0000u, 20u}, // kxc -> Ethi + {0x92EA0000u, 46u}, // kxe -> Latn + {0xB2EA0000u, 89u}, // kxm -> Thai {0xBEEA0000u, 1u}, // kxp -> Arab - {0xDAEA0000u, 44u}, // kxw -> Latn - {0xE6EA0000u, 44u}, // kxz -> Latn - {0x6B790000u, 16u}, // ky -> Cyrl + {0xDAEA0000u, 46u}, // kxw -> Latn + {0xE6EA0000u, 46u}, // kxz -> Latn + {0x6B790000u, 17u}, // ky -> Cyrl {0x6B79434Eu, 1u}, // ky-CN -> Arab - {0x6B795452u, 44u}, // ky-TR -> Latn - {0x930A0000u, 44u}, // kye -> Latn - {0xDF0A0000u, 44u}, // kyx -> Latn - {0xA72A0000u, 44u}, // kzj -> Latn - {0xC72A0000u, 44u}, // kzr -> Latn - {0xCF2A0000u, 44u}, // kzt -> Latn - {0x6C610000u, 44u}, // la -> Latn - {0x840B0000u, 46u}, // lab -> Lina - {0x8C0B0000u, 30u}, // lad -> Hebr - {0x980B0000u, 44u}, // lag -> Latn + {0x6B795452u, 46u}, // ky-TR -> Latn + {0x930A0000u, 46u}, // kye -> Latn + {0xDF0A0000u, 46u}, // kyx -> Latn + {0xA72A0000u, 46u}, // kzj -> Latn + {0xC72A0000u, 46u}, // kzr -> Latn + {0xCF2A0000u, 46u}, // kzt -> Latn + {0x6C610000u, 46u}, // la -> Latn + {0x840B0000u, 48u}, // lab -> Lina + {0x8C0B0000u, 31u}, // lad -> Hebr + {0x980B0000u, 46u}, // lag -> Latn {0x9C0B0000u, 1u}, // lah -> Arab - {0xA40B0000u, 44u}, // laj -> Latn - {0xC80B0000u, 44u}, // las -> Latn - {0x6C620000u, 44u}, // lb -> Latn - {0x902B0000u, 16u}, // lbe -> Cyrl - {0xD02B0000u, 44u}, // lbu -> Latn - {0xD82B0000u, 44u}, // lbw -> Latn - {0xB04B0000u, 44u}, // lcm -> Latn - {0xBC4B0000u, 87u}, // lcp -> Thai - {0x846B0000u, 44u}, // ldb -> Latn - {0x8C8B0000u, 44u}, // led -> Latn - {0x908B0000u, 44u}, // lee -> Latn - {0xB08B0000u, 44u}, // lem -> Latn - {0xBC8B0000u, 45u}, // lep -> Lepc - {0xC08B0000u, 44u}, // leq -> Latn - {0xD08B0000u, 44u}, // leu -> Latn - {0xE48B0000u, 16u}, // lez -> Cyrl - {0x6C670000u, 44u}, // lg -> Latn - {0x98CB0000u, 44u}, // lgg -> Latn - {0x6C690000u, 44u}, // li -> Latn - {0x810B0000u, 44u}, // lia -> Latn - {0x8D0B0000u, 44u}, // lid -> Latn - {0x950B0000u, 17u}, // lif -> Deva - {0x990B0000u, 44u}, // lig -> Latn - {0x9D0B0000u, 44u}, // lih -> Latn - {0xA50B0000u, 44u}, // lij -> Latn - {0xC90B0000u, 47u}, // lis -> Lisu - {0xBD2B0000u, 44u}, // ljp -> Latn + {0xA40B0000u, 46u}, // laj -> Latn + {0xC80B0000u, 46u}, // las -> Latn + {0x6C620000u, 46u}, // lb -> Latn + {0x902B0000u, 17u}, // lbe -> Cyrl + {0xD02B0000u, 46u}, // lbu -> Latn + {0xD82B0000u, 46u}, // lbw -> Latn + {0xB04B0000u, 46u}, // lcm -> Latn + {0xBC4B0000u, 89u}, // lcp -> Thai + {0x846B0000u, 46u}, // ldb -> Latn + {0x8C8B0000u, 46u}, // led -> Latn + {0x908B0000u, 46u}, // lee -> Latn + {0xB08B0000u, 46u}, // lem -> Latn + {0xBC8B0000u, 47u}, // lep -> Lepc + {0xC08B0000u, 46u}, // leq -> Latn + {0xD08B0000u, 46u}, // leu -> Latn + {0xE48B0000u, 17u}, // lez -> Cyrl + {0x6C670000u, 46u}, // lg -> Latn + {0x98CB0000u, 46u}, // lgg -> Latn + {0x6C690000u, 46u}, // li -> Latn + {0x810B0000u, 46u}, // lia -> Latn + {0x8D0B0000u, 46u}, // lid -> Latn + {0x950B0000u, 18u}, // lif -> Deva + {0x990B0000u, 46u}, // lig -> Latn + {0x9D0B0000u, 46u}, // lih -> Latn + {0xA50B0000u, 46u}, // lij -> Latn + {0xC90B0000u, 49u}, // lis -> Lisu + {0xBD2B0000u, 46u}, // ljp -> Latn {0xA14B0000u, 1u}, // lki -> Arab - {0xCD4B0000u, 44u}, // lkt -> Latn - {0x916B0000u, 44u}, // lle -> Latn - {0xB56B0000u, 44u}, // lln -> Latn - {0xB58B0000u, 84u}, // lmn -> Telu - {0xB98B0000u, 44u}, // lmo -> Latn - {0xBD8B0000u, 44u}, // lmp -> Latn - {0x6C6E0000u, 44u}, // ln -> Latn - {0xC9AB0000u, 44u}, // lns -> Latn - {0xD1AB0000u, 44u}, // lnu -> Latn - {0x6C6F0000u, 43u}, // lo -> Laoo - {0xA5CB0000u, 44u}, // loj -> Latn - {0xA9CB0000u, 44u}, // lok -> Latn - {0xADCB0000u, 44u}, // lol -> Latn - {0xC5CB0000u, 44u}, // lor -> Latn - {0xC9CB0000u, 44u}, // los -> Latn - {0xE5CB0000u, 44u}, // loz -> Latn + {0xCD4B0000u, 46u}, // lkt -> Latn + {0x916B0000u, 46u}, // lle -> Latn + {0xB56B0000u, 46u}, // lln -> Latn + {0xB58B0000u, 86u}, // lmn -> Telu + {0xB98B0000u, 46u}, // lmo -> Latn + {0xBD8B0000u, 46u}, // lmp -> Latn + {0x6C6E0000u, 46u}, // ln -> Latn + {0xC9AB0000u, 46u}, // lns -> Latn + {0xD1AB0000u, 46u}, // lnu -> Latn + {0x6C6F0000u, 45u}, // lo -> Laoo + {0xA5CB0000u, 46u}, // loj -> Latn + {0xA9CB0000u, 46u}, // lok -> Latn + {0xADCB0000u, 46u}, // lol -> Latn + {0xC5CB0000u, 46u}, // lor -> Latn + {0xC9CB0000u, 46u}, // los -> Latn + {0xE5CB0000u, 46u}, // loz -> Latn {0x8A2B0000u, 1u}, // lrc -> Arab - {0x6C740000u, 44u}, // lt -> Latn - {0x9A6B0000u, 44u}, // ltg -> Latn - {0x6C750000u, 44u}, // lu -> Latn - {0x828B0000u, 44u}, // lua -> Latn - {0xBA8B0000u, 44u}, // luo -> Latn - {0xE28B0000u, 44u}, // luy -> Latn + {0x6C740000u, 46u}, // lt -> Latn + {0x9A6B0000u, 46u}, // ltg -> Latn + {0x6C750000u, 46u}, // lu -> Latn + {0x828B0000u, 46u}, // lua -> Latn + {0xBA8B0000u, 46u}, // luo -> Latn + {0xE28B0000u, 46u}, // luy -> Latn {0xE68B0000u, 1u}, // luz -> Arab - {0x6C760000u, 44u}, // lv -> Latn - {0xAECB0000u, 87u}, // lwl -> Thai - {0x9F2B0000u, 27u}, // lzh -> Hans - {0xE72B0000u, 44u}, // lzz -> Latn - {0x8C0C0000u, 44u}, // mad -> Latn - {0x940C0000u, 44u}, // maf -> Latn - {0x980C0000u, 17u}, // mag -> Deva - {0xA00C0000u, 17u}, // mai -> Deva - {0xA80C0000u, 44u}, // mak -> Latn - {0xB40C0000u, 44u}, // man -> Latn - {0xB40C474Eu, 58u}, // man-GN -> Nkoo - {0xC80C0000u, 44u}, // mas -> Latn - {0xD80C0000u, 44u}, // maw -> Latn - {0xE40C0000u, 44u}, // maz -> Latn - {0x9C2C0000u, 44u}, // mbh -> Latn - {0xB82C0000u, 44u}, // mbo -> Latn - {0xC02C0000u, 44u}, // mbq -> Latn - {0xD02C0000u, 44u}, // mbu -> Latn - {0xD82C0000u, 44u}, // mbw -> Latn - {0xA04C0000u, 44u}, // mci -> Latn - {0xBC4C0000u, 44u}, // mcp -> Latn - {0xC04C0000u, 44u}, // mcq -> Latn - {0xC44C0000u, 44u}, // mcr -> Latn - {0xD04C0000u, 44u}, // mcu -> Latn - {0x806C0000u, 44u}, // mda -> Latn + {0x6C760000u, 46u}, // lv -> Latn + {0xAECB0000u, 89u}, // lwl -> Thai + {0x9F2B0000u, 28u}, // lzh -> Hans + {0xE72B0000u, 46u}, // lzz -> Latn + {0x8C0C0000u, 46u}, // mad -> Latn + {0x940C0000u, 46u}, // maf -> Latn + {0x980C0000u, 18u}, // mag -> Deva + {0xA00C0000u, 18u}, // mai -> Deva + {0xA80C0000u, 46u}, // mak -> Latn + {0xB40C0000u, 46u}, // man -> Latn + {0xB40C474Eu, 60u}, // man-GN -> Nkoo + {0xC80C0000u, 46u}, // mas -> Latn + {0xD80C0000u, 46u}, // maw -> Latn + {0xE40C0000u, 46u}, // maz -> Latn + {0x9C2C0000u, 46u}, // mbh -> Latn + {0xB82C0000u, 46u}, // mbo -> Latn + {0xC02C0000u, 46u}, // mbq -> Latn + {0xD02C0000u, 46u}, // mbu -> Latn + {0xD82C0000u, 46u}, // mbw -> Latn + {0xA04C0000u, 46u}, // mci -> Latn + {0xBC4C0000u, 46u}, // mcp -> Latn + {0xC04C0000u, 46u}, // mcq -> Latn + {0xC44C0000u, 46u}, // mcr -> Latn + {0xD04C0000u, 46u}, // mcu -> Latn + {0x806C0000u, 46u}, // mda -> Latn {0x906C0000u, 1u}, // mde -> Arab - {0x946C0000u, 16u}, // mdf -> Cyrl - {0x9C6C0000u, 44u}, // mdh -> Latn - {0xA46C0000u, 44u}, // mdj -> Latn - {0xC46C0000u, 44u}, // mdr -> Latn - {0xDC6C0000u, 19u}, // mdx -> Ethi - {0x8C8C0000u, 44u}, // med -> Latn - {0x908C0000u, 44u}, // mee -> Latn - {0xA88C0000u, 44u}, // mek -> Latn - {0xB48C0000u, 44u}, // men -> Latn - {0xC48C0000u, 44u}, // mer -> Latn - {0xCC8C0000u, 44u}, // met -> Latn - {0xD08C0000u, 44u}, // meu -> Latn + {0x946C0000u, 17u}, // mdf -> Cyrl + {0x9C6C0000u, 46u}, // mdh -> Latn + {0xA46C0000u, 46u}, // mdj -> Latn + {0xC46C0000u, 46u}, // mdr -> Latn + {0xDC6C0000u, 20u}, // mdx -> Ethi + {0x8C8C0000u, 46u}, // med -> Latn + {0x908C0000u, 46u}, // mee -> Latn + {0xA88C0000u, 46u}, // mek -> Latn + {0xB48C0000u, 46u}, // men -> Latn + {0xC48C0000u, 46u}, // mer -> Latn + {0xCC8C0000u, 46u}, // met -> Latn + {0xD08C0000u, 46u}, // meu -> Latn {0x80AC0000u, 1u}, // mfa -> Arab - {0x90AC0000u, 44u}, // mfe -> Latn - {0xB4AC0000u, 44u}, // mfn -> Latn - {0xB8AC0000u, 44u}, // mfo -> Latn - {0xC0AC0000u, 44u}, // mfq -> Latn - {0x6D670000u, 44u}, // mg -> Latn - {0x9CCC0000u, 44u}, // mgh -> Latn - {0xACCC0000u, 44u}, // mgl -> Latn - {0xB8CC0000u, 44u}, // mgo -> Latn - {0xBCCC0000u, 17u}, // mgp -> Deva - {0xE0CC0000u, 44u}, // mgy -> Latn - {0x6D680000u, 44u}, // mh -> Latn - {0xA0EC0000u, 44u}, // mhi -> Latn - {0xACEC0000u, 44u}, // mhl -> Latn - {0x6D690000u, 44u}, // mi -> Latn - {0x950C0000u, 44u}, // mif -> Latn - {0xB50C0000u, 44u}, // min -> Latn - {0xC90C0000u, 29u}, // mis -> Hatr - {0xD90C0000u, 44u}, // miw -> Latn - {0x6D6B0000u, 16u}, // mk -> Cyrl + {0x90AC0000u, 46u}, // mfe -> Latn + {0xB4AC0000u, 46u}, // mfn -> Latn + {0xB8AC0000u, 46u}, // mfo -> Latn + {0xC0AC0000u, 46u}, // mfq -> Latn + {0x6D670000u, 46u}, // mg -> Latn + {0x9CCC0000u, 46u}, // mgh -> Latn + {0xACCC0000u, 46u}, // mgl -> Latn + {0xB8CC0000u, 46u}, // mgo -> Latn + {0xBCCC0000u, 18u}, // mgp -> Deva + {0xE0CC0000u, 46u}, // mgy -> Latn + {0x6D680000u, 46u}, // mh -> Latn + {0xA0EC0000u, 46u}, // mhi -> Latn + {0xACEC0000u, 46u}, // mhl -> Latn + {0x6D690000u, 46u}, // mi -> Latn + {0x950C0000u, 46u}, // mif -> Latn + {0xB50C0000u, 46u}, // min -> Latn + {0xC90C0000u, 30u}, // mis -> Hatr + {0xD90C0000u, 46u}, // miw -> Latn + {0x6D6B0000u, 17u}, // mk -> Cyrl {0xA14C0000u, 1u}, // mki -> Arab - {0xAD4C0000u, 44u}, // mkl -> Latn - {0xBD4C0000u, 44u}, // mkp -> Latn - {0xD94C0000u, 44u}, // mkw -> Latn - {0x6D6C0000u, 53u}, // ml -> Mlym - {0x916C0000u, 44u}, // mle -> Latn - {0xBD6C0000u, 44u}, // mlp -> Latn - {0xC96C0000u, 44u}, // mls -> Latn - {0xB98C0000u, 44u}, // mmo -> Latn - {0xD18C0000u, 44u}, // mmu -> Latn - {0xDD8C0000u, 44u}, // mmx -> Latn - {0x6D6E0000u, 16u}, // mn -> Cyrl - {0x6D6E434Eu, 54u}, // mn-CN -> Mong - {0x81AC0000u, 44u}, // mna -> Latn - {0x95AC0000u, 44u}, // mnf -> Latn + {0xAD4C0000u, 46u}, // mkl -> Latn + {0xBD4C0000u, 46u}, // mkp -> Latn + {0xD94C0000u, 46u}, // mkw -> Latn + {0x6D6C0000u, 55u}, // ml -> Mlym + {0x916C0000u, 46u}, // mle -> Latn + {0xBD6C0000u, 46u}, // mlp -> Latn + {0xC96C0000u, 46u}, // mls -> Latn + {0xB98C0000u, 46u}, // mmo -> Latn + {0xD18C0000u, 46u}, // mmu -> Latn + {0xDD8C0000u, 46u}, // mmx -> Latn + {0x6D6E0000u, 17u}, // mn -> Cyrl + {0x6D6E434Eu, 56u}, // mn-CN -> Mong + {0x81AC0000u, 46u}, // mna -> Latn + {0x95AC0000u, 46u}, // mnf -> Latn {0xA1AC0000u, 7u}, // mni -> Beng - {0xD9AC0000u, 56u}, // mnw -> Mymr - {0x6D6F0000u, 44u}, // mo -> Latn - {0x81CC0000u, 44u}, // moa -> Latn - {0x91CC0000u, 44u}, // moe -> Latn - {0x9DCC0000u, 44u}, // moh -> Latn - {0xC9CC0000u, 44u}, // mos -> Latn - {0xDDCC0000u, 44u}, // mox -> Latn - {0xBDEC0000u, 44u}, // mpp -> Latn - {0xC9EC0000u, 44u}, // mps -> Latn - {0xCDEC0000u, 44u}, // mpt -> Latn - {0xDDEC0000u, 44u}, // mpx -> Latn - {0xAE0C0000u, 44u}, // mql -> Latn - {0x6D720000u, 17u}, // mr -> Deva - {0x8E2C0000u, 17u}, // mrd -> Deva - {0xA62C0000u, 16u}, // mrj -> Cyrl - {0xBA2C0000u, 55u}, // mro -> Mroo - {0x6D730000u, 44u}, // ms -> Latn + {0xD9AC0000u, 58u}, // mnw -> Mymr + {0x6D6F0000u, 46u}, // mo -> Latn + {0x81CC0000u, 46u}, // moa -> Latn + {0x91CC0000u, 46u}, // moe -> Latn + {0x9DCC0000u, 46u}, // moh -> Latn + {0xC9CC0000u, 46u}, // mos -> Latn + {0xDDCC0000u, 46u}, // mox -> Latn + {0xBDEC0000u, 46u}, // mpp -> Latn + {0xC9EC0000u, 46u}, // mps -> Latn + {0xCDEC0000u, 46u}, // mpt -> Latn + {0xDDEC0000u, 46u}, // mpx -> Latn + {0xAE0C0000u, 46u}, // mql -> Latn + {0x6D720000u, 18u}, // mr -> Deva + {0x8E2C0000u, 18u}, // mrd -> Deva + {0xA62C0000u, 17u}, // mrj -> Cyrl + {0xBA2C0000u, 57u}, // mro -> Mroo + {0x6D730000u, 46u}, // ms -> Latn {0x6D734343u, 1u}, // ms-CC -> Arab {0x6D734944u, 1u}, // ms-ID -> Arab - {0x6D740000u, 44u}, // mt -> Latn - {0x8A6C0000u, 44u}, // mtc -> Latn - {0x966C0000u, 44u}, // mtf -> Latn - {0xA26C0000u, 44u}, // mti -> Latn - {0xC66C0000u, 17u}, // mtr -> Deva - {0x828C0000u, 44u}, // mua -> Latn - {0xC68C0000u, 44u}, // mur -> Latn - {0xCA8C0000u, 44u}, // mus -> Latn - {0x82AC0000u, 44u}, // mva -> Latn - {0xB6AC0000u, 44u}, // mvn -> Latn + {0x6D740000u, 46u}, // mt -> Latn + {0x8A6C0000u, 46u}, // mtc -> Latn + {0x966C0000u, 46u}, // mtf -> Latn + {0xA26C0000u, 46u}, // mti -> Latn + {0xC66C0000u, 18u}, // mtr -> Deva + {0x828C0000u, 46u}, // mua -> Latn + {0xC68C0000u, 46u}, // mur -> Latn + {0xCA8C0000u, 46u}, // mus -> Latn + {0x82AC0000u, 46u}, // mva -> Latn + {0xB6AC0000u, 46u}, // mvn -> Latn {0xE2AC0000u, 1u}, // mvy -> Arab - {0xAACC0000u, 44u}, // mwk -> Latn - {0xC6CC0000u, 17u}, // mwr -> Deva - {0xD6CC0000u, 44u}, // mwv -> Latn - {0xDACC0000u, 33u}, // mww -> Hmnp - {0x8AEC0000u, 44u}, // mxc -> Latn - {0xB2EC0000u, 44u}, // mxm -> Latn - {0x6D790000u, 56u}, // my -> Mymr - {0xAB0C0000u, 44u}, // myk -> Latn - {0xB30C0000u, 19u}, // mym -> Ethi - {0xD70C0000u, 16u}, // myv -> Cyrl - {0xDB0C0000u, 44u}, // myw -> Latn - {0xDF0C0000u, 44u}, // myx -> Latn - {0xE70C0000u, 50u}, // myz -> Mand - {0xAB2C0000u, 44u}, // mzk -> Latn - {0xB32C0000u, 44u}, // mzm -> Latn + {0xAACC0000u, 46u}, // mwk -> Latn + {0xC6CC0000u, 18u}, // mwr -> Deva + {0xD6CC0000u, 46u}, // mwv -> Latn + {0xDACC0000u, 34u}, // mww -> Hmnp + {0x8AEC0000u, 46u}, // mxc -> Latn + {0xB2EC0000u, 46u}, // mxm -> Latn + {0x6D790000u, 58u}, // my -> Mymr + {0xAB0C0000u, 46u}, // myk -> Latn + {0xB30C0000u, 20u}, // mym -> Ethi + {0xD70C0000u, 17u}, // myv -> Cyrl + {0xDB0C0000u, 46u}, // myw -> Latn + {0xDF0C0000u, 46u}, // myx -> Latn + {0xE70C0000u, 52u}, // myz -> Mand + {0xAB2C0000u, 46u}, // mzk -> Latn + {0xB32C0000u, 46u}, // mzm -> Latn {0xB72C0000u, 1u}, // mzn -> Arab - {0xBF2C0000u, 44u}, // mzp -> Latn - {0xDB2C0000u, 44u}, // mzw -> Latn - {0xE72C0000u, 44u}, // mzz -> Latn - {0x6E610000u, 44u}, // na -> Latn - {0x880D0000u, 44u}, // nac -> Latn - {0x940D0000u, 44u}, // naf -> Latn - {0xA80D0000u, 44u}, // nak -> Latn - {0xB40D0000u, 27u}, // nan -> Hans - {0xBC0D0000u, 44u}, // nap -> Latn - {0xC00D0000u, 44u}, // naq -> Latn - {0xC80D0000u, 44u}, // nas -> Latn - {0x6E620000u, 44u}, // nb -> Latn - {0x804D0000u, 44u}, // nca -> Latn - {0x904D0000u, 44u}, // nce -> Latn - {0x944D0000u, 44u}, // ncf -> Latn - {0x9C4D0000u, 44u}, // nch -> Latn - {0xB84D0000u, 44u}, // nco -> Latn - {0xD04D0000u, 44u}, // ncu -> Latn - {0x6E640000u, 44u}, // nd -> Latn - {0x886D0000u, 44u}, // ndc -> Latn - {0xC86D0000u, 44u}, // nds -> Latn - {0x6E650000u, 17u}, // ne -> Deva - {0x848D0000u, 44u}, // neb -> Latn - {0xD88D0000u, 17u}, // new -> Deva - {0xDC8D0000u, 44u}, // nex -> Latn - {0xC4AD0000u, 44u}, // nfr -> Latn - {0x6E670000u, 44u}, // ng -> Latn - {0x80CD0000u, 44u}, // nga -> Latn - {0x84CD0000u, 44u}, // ngb -> Latn - {0xACCD0000u, 44u}, // ngl -> Latn - {0x84ED0000u, 44u}, // nhb -> Latn - {0x90ED0000u, 44u}, // nhe -> Latn - {0xD8ED0000u, 44u}, // nhw -> Latn - {0x950D0000u, 44u}, // nif -> Latn - {0xA10D0000u, 44u}, // nii -> Latn - {0xA50D0000u, 44u}, // nij -> Latn - {0xB50D0000u, 44u}, // nin -> Latn - {0xD10D0000u, 44u}, // niu -> Latn - {0xE10D0000u, 44u}, // niy -> Latn - {0xE50D0000u, 44u}, // niz -> Latn - {0xB92D0000u, 44u}, // njo -> Latn - {0x994D0000u, 44u}, // nkg -> Latn - {0xB94D0000u, 44u}, // nko -> Latn - {0x6E6C0000u, 44u}, // nl -> Latn - {0x998D0000u, 44u}, // nmg -> Latn - {0xE58D0000u, 44u}, // nmz -> Latn - {0x6E6E0000u, 44u}, // nn -> Latn - {0x95AD0000u, 44u}, // nnf -> Latn - {0x9DAD0000u, 44u}, // nnh -> Latn - {0xA9AD0000u, 44u}, // nnk -> Latn - {0xB1AD0000u, 44u}, // nnm -> Latn - {0xBDAD0000u, 91u}, // nnp -> Wcho - {0x6E6F0000u, 44u}, // no -> Latn - {0x8DCD0000u, 42u}, // nod -> Lana - {0x91CD0000u, 17u}, // noe -> Deva - {0xB5CD0000u, 69u}, // non -> Runr - {0xBDCD0000u, 44u}, // nop -> Latn - {0xD1CD0000u, 44u}, // nou -> Latn - {0xBA0D0000u, 58u}, // nqo -> Nkoo - {0x6E720000u, 44u}, // nr -> Latn - {0x862D0000u, 44u}, // nrb -> Latn + {0xBF2C0000u, 46u}, // mzp -> Latn + {0xDB2C0000u, 46u}, // mzw -> Latn + {0xE72C0000u, 46u}, // mzz -> Latn + {0x6E610000u, 46u}, // na -> Latn + {0x880D0000u, 46u}, // nac -> Latn + {0x940D0000u, 46u}, // naf -> Latn + {0xA80D0000u, 46u}, // nak -> Latn + {0xB40D0000u, 28u}, // nan -> Hans + {0xBC0D0000u, 46u}, // nap -> Latn + {0xC00D0000u, 46u}, // naq -> Latn + {0xC80D0000u, 46u}, // nas -> Latn + {0x6E620000u, 46u}, // nb -> Latn + {0x804D0000u, 46u}, // nca -> Latn + {0x904D0000u, 46u}, // nce -> Latn + {0x944D0000u, 46u}, // ncf -> Latn + {0x9C4D0000u, 46u}, // nch -> Latn + {0xB84D0000u, 46u}, // nco -> Latn + {0xD04D0000u, 46u}, // ncu -> Latn + {0x6E640000u, 46u}, // nd -> Latn + {0x886D0000u, 46u}, // ndc -> Latn + {0xC86D0000u, 46u}, // nds -> Latn + {0x6E650000u, 18u}, // ne -> Deva + {0x848D0000u, 46u}, // neb -> Latn + {0xD88D0000u, 18u}, // new -> Deva + {0xDC8D0000u, 46u}, // nex -> Latn + {0xC4AD0000u, 46u}, // nfr -> Latn + {0x6E670000u, 46u}, // ng -> Latn + {0x80CD0000u, 46u}, // nga -> Latn + {0x84CD0000u, 46u}, // ngb -> Latn + {0xACCD0000u, 46u}, // ngl -> Latn + {0x84ED0000u, 46u}, // nhb -> Latn + {0x90ED0000u, 46u}, // nhe -> Latn + {0xD8ED0000u, 46u}, // nhw -> Latn + {0x950D0000u, 46u}, // nif -> Latn + {0xA10D0000u, 46u}, // nii -> Latn + {0xA50D0000u, 46u}, // nij -> Latn + {0xB50D0000u, 46u}, // nin -> Latn + {0xD10D0000u, 46u}, // niu -> Latn + {0xE10D0000u, 46u}, // niy -> Latn + {0xE50D0000u, 46u}, // niz -> Latn + {0xB92D0000u, 46u}, // njo -> Latn + {0x994D0000u, 46u}, // nkg -> Latn + {0xB94D0000u, 46u}, // nko -> Latn + {0x6E6C0000u, 46u}, // nl -> Latn + {0x998D0000u, 46u}, // nmg -> Latn + {0xE58D0000u, 46u}, // nmz -> Latn + {0x6E6E0000u, 46u}, // nn -> Latn + {0x95AD0000u, 46u}, // nnf -> Latn + {0x9DAD0000u, 46u}, // nnh -> Latn + {0xA9AD0000u, 46u}, // nnk -> Latn + {0xB1AD0000u, 46u}, // nnm -> Latn + {0xBDAD0000u, 93u}, // nnp -> Wcho + {0x6E6F0000u, 46u}, // no -> Latn + {0x8DCD0000u, 44u}, // nod -> Lana + {0x91CD0000u, 18u}, // noe -> Deva + {0xB5CD0000u, 71u}, // non -> Runr + {0xBDCD0000u, 46u}, // nop -> Latn + {0xD1CD0000u, 46u}, // nou -> Latn + {0xBA0D0000u, 60u}, // nqo -> Nkoo + {0x6E720000u, 46u}, // nr -> Latn + {0x862D0000u, 46u}, // nrb -> Latn {0xAA4D0000u, 10u}, // nsk -> Cans - {0xB64D0000u, 44u}, // nsn -> Latn - {0xBA4D0000u, 44u}, // nso -> Latn - {0xCA4D0000u, 44u}, // nss -> Latn - {0xB26D0000u, 44u}, // ntm -> Latn - {0xC66D0000u, 44u}, // ntr -> Latn - {0xA28D0000u, 44u}, // nui -> Latn - {0xBE8D0000u, 44u}, // nup -> Latn - {0xCA8D0000u, 44u}, // nus -> Latn - {0xD68D0000u, 44u}, // nuv -> Latn - {0xDE8D0000u, 44u}, // nux -> Latn - {0x6E760000u, 44u}, // nv -> Latn - {0x86CD0000u, 44u}, // nwb -> Latn - {0xC2ED0000u, 44u}, // nxq -> Latn - {0xC6ED0000u, 44u}, // nxr -> Latn - {0x6E790000u, 44u}, // ny -> Latn - {0xB30D0000u, 44u}, // nym -> Latn - {0xB70D0000u, 44u}, // nyn -> Latn - {0xA32D0000u, 44u}, // nzi -> Latn - {0x6F630000u, 44u}, // oc -> Latn - {0x88CE0000u, 44u}, // ogc -> Latn - {0xC54E0000u, 44u}, // okr -> Latn - {0xD54E0000u, 44u}, // okv -> Latn - {0x6F6D0000u, 44u}, // om -> Latn - {0x99AE0000u, 44u}, // ong -> Latn - {0xB5AE0000u, 44u}, // onn -> Latn - {0xC9AE0000u, 44u}, // ons -> Latn - {0xB1EE0000u, 44u}, // opm -> Latn - {0x6F720000u, 62u}, // or -> Orya - {0xBA2E0000u, 44u}, // oro -> Latn + {0xB64D0000u, 46u}, // nsn -> Latn + {0xBA4D0000u, 46u}, // nso -> Latn + {0xCA4D0000u, 46u}, // nss -> Latn + {0xB26D0000u, 46u}, // ntm -> Latn + {0xC66D0000u, 46u}, // ntr -> Latn + {0xA28D0000u, 46u}, // nui -> Latn + {0xBE8D0000u, 46u}, // nup -> Latn + {0xCA8D0000u, 46u}, // nus -> Latn + {0xD68D0000u, 46u}, // nuv -> Latn + {0xDE8D0000u, 46u}, // nux -> Latn + {0x6E760000u, 46u}, // nv -> Latn + {0x86CD0000u, 46u}, // nwb -> Latn + {0xC2ED0000u, 46u}, // nxq -> Latn + {0xC6ED0000u, 46u}, // nxr -> Latn + {0x6E790000u, 46u}, // ny -> Latn + {0xB30D0000u, 46u}, // nym -> Latn + {0xB70D0000u, 46u}, // nyn -> Latn + {0xA32D0000u, 46u}, // nzi -> Latn + {0x6F630000u, 46u}, // oc -> Latn + {0x88CE0000u, 46u}, // ogc -> Latn + {0xC54E0000u, 46u}, // okr -> Latn + {0xD54E0000u, 46u}, // okv -> Latn + {0x6F6D0000u, 46u}, // om -> Latn + {0x99AE0000u, 46u}, // ong -> Latn + {0xB5AE0000u, 46u}, // onn -> Latn + {0xC9AE0000u, 46u}, // ons -> Latn + {0xB1EE0000u, 46u}, // opm -> Latn + {0x6F720000u, 64u}, // or -> Orya + {0xBA2E0000u, 46u}, // oro -> Latn {0xD22E0000u, 1u}, // oru -> Arab - {0x6F730000u, 16u}, // os -> Cyrl - {0x824E0000u, 63u}, // osa -> Osge + {0x6F730000u, 17u}, // os -> Cyrl + {0x824E0000u, 65u}, // osa -> Osge {0x826E0000u, 1u}, // ota -> Arab - {0xAA6E0000u, 61u}, // otk -> Orkh - {0xB32E0000u, 44u}, // ozm -> Latn - {0x70610000u, 26u}, // pa -> Guru + {0xAA6E0000u, 63u}, // otk -> Orkh + {0xB32E0000u, 46u}, // ozm -> Latn + {0x70610000u, 27u}, // pa -> Guru {0x7061504Bu, 1u}, // pa-PK -> Arab - {0x980F0000u, 44u}, // pag -> Latn - {0xAC0F0000u, 65u}, // pal -> Phli - {0xB00F0000u, 44u}, // pam -> Latn - {0xBC0F0000u, 44u}, // pap -> Latn - {0xD00F0000u, 44u}, // pau -> Latn - {0xA02F0000u, 44u}, // pbi -> Latn - {0x8C4F0000u, 44u}, // pcd -> Latn - {0xB04F0000u, 44u}, // pcm -> Latn - {0x886F0000u, 44u}, // pdc -> Latn - {0xCC6F0000u, 44u}, // pdt -> Latn - {0x8C8F0000u, 44u}, // ped -> Latn - {0xB88F0000u, 92u}, // peo -> Xpeo - {0xDC8F0000u, 44u}, // pex -> Latn - {0xACAF0000u, 44u}, // pfl -> Latn + {0x980F0000u, 46u}, // pag -> Latn + {0xAC0F0000u, 67u}, // pal -> Phli + {0xB00F0000u, 46u}, // pam -> Latn + {0xBC0F0000u, 46u}, // pap -> Latn + {0xD00F0000u, 46u}, // pau -> Latn + {0xA02F0000u, 46u}, // pbi -> Latn + {0x8C4F0000u, 46u}, // pcd -> Latn + {0xB04F0000u, 46u}, // pcm -> Latn + {0x886F0000u, 46u}, // pdc -> Latn + {0xCC6F0000u, 46u}, // pdt -> Latn + {0x8C8F0000u, 46u}, // ped -> Latn + {0xB88F0000u, 94u}, // peo -> Xpeo + {0xDC8F0000u, 46u}, // pex -> Latn + {0xACAF0000u, 46u}, // pfl -> Latn {0xACEF0000u, 1u}, // phl -> Arab - {0xB4EF0000u, 66u}, // phn -> Phnx - {0xAD0F0000u, 44u}, // pil -> Latn - {0xBD0F0000u, 44u}, // pip -> Latn + {0xB4EF0000u, 68u}, // phn -> Phnx + {0xAD0F0000u, 46u}, // pil -> Latn + {0xBD0F0000u, 46u}, // pip -> Latn {0x814F0000u, 8u}, // pka -> Brah - {0xB94F0000u, 44u}, // pko -> Latn - {0x706C0000u, 44u}, // pl -> Latn - {0x816F0000u, 44u}, // pla -> Latn - {0xC98F0000u, 44u}, // pms -> Latn - {0x99AF0000u, 44u}, // png -> Latn - {0xB5AF0000u, 44u}, // pnn -> Latn - {0xCDAF0000u, 24u}, // pnt -> Grek - {0xB5CF0000u, 44u}, // pon -> Latn - {0x81EF0000u, 17u}, // ppa -> Deva - {0xB9EF0000u, 44u}, // ppo -> Latn - {0x822F0000u, 38u}, // pra -> Khar + {0xB94F0000u, 46u}, // pko -> Latn + {0x706C0000u, 46u}, // pl -> Latn + {0x816F0000u, 46u}, // pla -> Latn + {0xC98F0000u, 46u}, // pms -> Latn + {0x99AF0000u, 46u}, // png -> Latn + {0xB5AF0000u, 46u}, // pnn -> Latn + {0xCDAF0000u, 25u}, // pnt -> Grek + {0xB5CF0000u, 46u}, // pon -> Latn + {0x81EF0000u, 18u}, // ppa -> Deva + {0xB9EF0000u, 46u}, // ppo -> Latn + {0x822F0000u, 39u}, // pra -> Khar {0x8E2F0000u, 1u}, // prd -> Arab - {0x9A2F0000u, 44u}, // prg -> Latn + {0x9A2F0000u, 46u}, // prg -> Latn {0x70730000u, 1u}, // ps -> Arab - {0xCA4F0000u, 44u}, // pss -> Latn - {0x70740000u, 44u}, // pt -> Latn - {0xBE6F0000u, 44u}, // ptp -> Latn - {0xD28F0000u, 44u}, // puu -> Latn - {0x82CF0000u, 44u}, // pwa -> Latn - {0x71750000u, 44u}, // qu -> Latn - {0x8A900000u, 44u}, // quc -> Latn - {0x9A900000u, 44u}, // qug -> Latn - {0xA0110000u, 44u}, // rai -> Latn - {0xA4110000u, 17u}, // raj -> Deva - {0xB8110000u, 44u}, // rao -> Latn - {0x94510000u, 44u}, // rcf -> Latn - {0xA4910000u, 44u}, // rej -> Latn - {0xAC910000u, 44u}, // rel -> Latn - {0xC8910000u, 44u}, // res -> Latn - {0xB4D10000u, 44u}, // rgn -> Latn + {0xCA4F0000u, 46u}, // pss -> Latn + {0x70740000u, 46u}, // pt -> Latn + {0xBE6F0000u, 46u}, // ptp -> Latn + {0xD28F0000u, 46u}, // puu -> Latn + {0x82CF0000u, 46u}, // pwa -> Latn + {0x71750000u, 46u}, // qu -> Latn + {0x8A900000u, 46u}, // quc -> Latn + {0x9A900000u, 46u}, // qug -> Latn + {0xA0110000u, 46u}, // rai -> Latn + {0xA4110000u, 18u}, // raj -> Deva + {0xB8110000u, 46u}, // rao -> Latn + {0x94510000u, 46u}, // rcf -> Latn + {0xA4910000u, 46u}, // rej -> Latn + {0xAC910000u, 46u}, // rel -> Latn + {0xC8910000u, 46u}, // res -> Latn + {0xB4D10000u, 46u}, // rgn -> Latn {0x98F10000u, 1u}, // rhg -> Arab - {0x81110000u, 44u}, // ria -> Latn - {0x95110000u, 85u}, // rif -> Tfng - {0x95114E4Cu, 44u}, // rif-NL -> Latn - {0xC9310000u, 17u}, // rjs -> Deva + {0x81110000u, 46u}, // ria -> Latn + {0x95110000u, 87u}, // rif -> Tfng + {0x95114E4Cu, 46u}, // rif-NL -> Latn + {0xC9310000u, 18u}, // rjs -> Deva {0xCD510000u, 7u}, // rkt -> Beng - {0x726D0000u, 44u}, // rm -> Latn - {0x95910000u, 44u}, // rmf -> Latn - {0xB9910000u, 44u}, // rmo -> Latn + {0x726D0000u, 46u}, // rm -> Latn + {0x95910000u, 46u}, // rmf -> Latn + {0xB9910000u, 46u}, // rmo -> Latn {0xCD910000u, 1u}, // rmt -> Arab - {0xD1910000u, 44u}, // rmu -> Latn - {0x726E0000u, 44u}, // rn -> Latn - {0x81B10000u, 44u}, // rna -> Latn - {0x99B10000u, 44u}, // rng -> Latn - {0x726F0000u, 44u}, // ro -> Latn - {0x85D10000u, 44u}, // rob -> Latn - {0x95D10000u, 44u}, // rof -> Latn - {0xB9D10000u, 44u}, // roo -> Latn - {0xBA310000u, 44u}, // rro -> Latn - {0xB2710000u, 44u}, // rtm -> Latn - {0x72750000u, 16u}, // ru -> Cyrl - {0x92910000u, 16u}, // rue -> Cyrl - {0x9A910000u, 44u}, // rug -> Latn - {0x72770000u, 44u}, // rw -> Latn - {0xAAD10000u, 44u}, // rwk -> Latn - {0xBAD10000u, 44u}, // rwo -> Latn - {0xD3110000u, 37u}, // ryu -> Kana - {0x73610000u, 17u}, // sa -> Deva - {0x94120000u, 44u}, // saf -> Latn - {0x9C120000u, 16u}, // sah -> Cyrl - {0xC0120000u, 44u}, // saq -> Latn - {0xC8120000u, 44u}, // sas -> Latn - {0xCC120000u, 44u}, // sat -> Latn - {0xD4120000u, 44u}, // sav -> Latn - {0xE4120000u, 72u}, // saz -> Saur - {0x80320000u, 44u}, // sba -> Latn - {0x90320000u, 44u}, // sbe -> Latn - {0xBC320000u, 44u}, // sbp -> Latn - {0x73630000u, 44u}, // sc -> Latn - {0xA8520000u, 17u}, // sck -> Deva + {0xD1910000u, 46u}, // rmu -> Latn + {0x726E0000u, 46u}, // rn -> Latn + {0x81B10000u, 46u}, // rna -> Latn + {0x99B10000u, 46u}, // rng -> Latn + {0x726F0000u, 46u}, // ro -> Latn + {0x85D10000u, 46u}, // rob -> Latn + {0x95D10000u, 46u}, // rof -> Latn + {0xB9D10000u, 46u}, // roo -> Latn + {0xBA310000u, 46u}, // rro -> Latn + {0xB2710000u, 46u}, // rtm -> Latn + {0x72750000u, 17u}, // ru -> Cyrl + {0x92910000u, 17u}, // rue -> Cyrl + {0x9A910000u, 46u}, // rug -> Latn + {0x72770000u, 46u}, // rw -> Latn + {0xAAD10000u, 46u}, // rwk -> Latn + {0xBAD10000u, 46u}, // rwo -> Latn + {0xD3110000u, 38u}, // ryu -> Kana + {0x73610000u, 18u}, // sa -> Deva + {0x94120000u, 46u}, // saf -> Latn + {0x9C120000u, 17u}, // sah -> Cyrl + {0xC0120000u, 46u}, // saq -> Latn + {0xC8120000u, 46u}, // sas -> Latn + {0xCC120000u, 46u}, // sat -> Latn + {0xD4120000u, 46u}, // sav -> Latn + {0xE4120000u, 74u}, // saz -> Saur + {0x80320000u, 46u}, // sba -> Latn + {0x90320000u, 46u}, // sbe -> Latn + {0xBC320000u, 46u}, // sbp -> Latn + {0x73630000u, 46u}, // sc -> Latn + {0xA8520000u, 18u}, // sck -> Deva {0xAC520000u, 1u}, // scl -> Arab - {0xB4520000u, 44u}, // scn -> Latn - {0xB8520000u, 44u}, // sco -> Latn - {0xC8520000u, 44u}, // scs -> Latn + {0xB4520000u, 46u}, // scn -> Latn + {0xB8520000u, 46u}, // sco -> Latn + {0xC8520000u, 46u}, // scs -> Latn {0x73640000u, 1u}, // sd -> Arab - {0x88720000u, 44u}, // sdc -> Latn + {0x88720000u, 46u}, // sdc -> Latn {0x9C720000u, 1u}, // sdh -> Arab - {0x73650000u, 44u}, // se -> Latn - {0x94920000u, 44u}, // sef -> Latn - {0x9C920000u, 44u}, // seh -> Latn - {0xA0920000u, 44u}, // sei -> Latn - {0xC8920000u, 44u}, // ses -> Latn - {0x73670000u, 44u}, // sg -> Latn - {0x80D20000u, 60u}, // sga -> Ogam - {0xC8D20000u, 44u}, // sgs -> Latn - {0xD8D20000u, 19u}, // sgw -> Ethi - {0xE4D20000u, 44u}, // sgz -> Latn - {0x73680000u, 44u}, // sh -> Latn - {0xA0F20000u, 85u}, // shi -> Tfng - {0xA8F20000u, 44u}, // shk -> Latn - {0xB4F20000u, 56u}, // shn -> Mymr + {0x73650000u, 46u}, // se -> Latn + {0x94920000u, 46u}, // sef -> Latn + {0x9C920000u, 46u}, // seh -> Latn + {0xA0920000u, 46u}, // sei -> Latn + {0xC8920000u, 46u}, // ses -> Latn + {0x73670000u, 46u}, // sg -> Latn + {0x80D20000u, 62u}, // sga -> Ogam + {0xC8D20000u, 46u}, // sgs -> Latn + {0xD8D20000u, 20u}, // sgw -> Ethi + {0xE4D20000u, 46u}, // sgz -> Latn + {0x73680000u, 46u}, // sh -> Latn + {0xA0F20000u, 87u}, // shi -> Tfng + {0xA8F20000u, 46u}, // shk -> Latn + {0xB4F20000u, 58u}, // shn -> Mymr {0xD0F20000u, 1u}, // shu -> Arab - {0x73690000u, 74u}, // si -> Sinh - {0x8D120000u, 44u}, // sid -> Latn - {0x99120000u, 44u}, // sig -> Latn - {0xAD120000u, 44u}, // sil -> Latn - {0xB1120000u, 44u}, // sim -> Latn - {0xC5320000u, 44u}, // sjr -> Latn - {0x736B0000u, 44u}, // sk -> Latn - {0x89520000u, 44u}, // skc -> Latn + {0x73690000u, 76u}, // si -> Sinh + {0x8D120000u, 46u}, // sid -> Latn + {0x99120000u, 46u}, // sig -> Latn + {0xAD120000u, 46u}, // sil -> Latn + {0xB1120000u, 46u}, // sim -> Latn + {0xC5320000u, 46u}, // sjr -> Latn + {0x736B0000u, 46u}, // sk -> Latn + {0x89520000u, 46u}, // skc -> Latn {0xC5520000u, 1u}, // skr -> Arab - {0xC9520000u, 44u}, // sks -> Latn - {0x736C0000u, 44u}, // sl -> Latn - {0x8D720000u, 44u}, // sld -> Latn - {0xA1720000u, 44u}, // sli -> Latn - {0xAD720000u, 44u}, // sll -> Latn - {0xE1720000u, 44u}, // sly -> Latn - {0x736D0000u, 44u}, // sm -> Latn - {0x81920000u, 44u}, // sma -> Latn - {0xA5920000u, 44u}, // smj -> Latn - {0xB5920000u, 44u}, // smn -> Latn - {0xBD920000u, 70u}, // smp -> Samr - {0xC1920000u, 44u}, // smq -> Latn - {0xC9920000u, 44u}, // sms -> Latn - {0x736E0000u, 44u}, // sn -> Latn - {0x89B20000u, 44u}, // snc -> Latn - {0xA9B20000u, 44u}, // snk -> Latn - {0xBDB20000u, 44u}, // snp -> Latn - {0xDDB20000u, 44u}, // snx -> Latn - {0xE1B20000u, 44u}, // sny -> Latn - {0x736F0000u, 44u}, // so -> Latn - {0x99D20000u, 75u}, // sog -> Sogd - {0xA9D20000u, 44u}, // sok -> Latn - {0xC1D20000u, 44u}, // soq -> Latn - {0xD1D20000u, 87u}, // sou -> Thai - {0xE1D20000u, 44u}, // soy -> Latn - {0x8DF20000u, 44u}, // spd -> Latn - {0xADF20000u, 44u}, // spl -> Latn - {0xC9F20000u, 44u}, // sps -> Latn - {0x73710000u, 44u}, // sq -> Latn - {0x73720000u, 16u}, // sr -> Cyrl - {0x73724D45u, 44u}, // sr-ME -> Latn - {0x7372524Fu, 44u}, // sr-RO -> Latn - {0x73725255u, 44u}, // sr-RU -> Latn - {0x73725452u, 44u}, // sr-TR -> Latn - {0x86320000u, 76u}, // srb -> Sora - {0xB6320000u, 44u}, // srn -> Latn - {0xC6320000u, 44u}, // srr -> Latn - {0xDE320000u, 17u}, // srx -> Deva - {0x73730000u, 44u}, // ss -> Latn - {0x8E520000u, 44u}, // ssd -> Latn - {0x9A520000u, 44u}, // ssg -> Latn - {0xE2520000u, 44u}, // ssy -> Latn - {0x73740000u, 44u}, // st -> Latn - {0xAA720000u, 44u}, // stk -> Latn - {0xC2720000u, 44u}, // stq -> Latn - {0x73750000u, 44u}, // su -> Latn - {0x82920000u, 44u}, // sua -> Latn - {0x92920000u, 44u}, // sue -> Latn - {0xAA920000u, 44u}, // suk -> Latn - {0xC6920000u, 44u}, // sur -> Latn - {0xCA920000u, 44u}, // sus -> Latn - {0x73760000u, 44u}, // sv -> Latn - {0x73770000u, 44u}, // sw -> Latn + {0xC9520000u, 46u}, // sks -> Latn + {0x736C0000u, 46u}, // sl -> Latn + {0x8D720000u, 46u}, // sld -> Latn + {0xA1720000u, 46u}, // sli -> Latn + {0xAD720000u, 46u}, // sll -> Latn + {0xE1720000u, 46u}, // sly -> Latn + {0x736D0000u, 46u}, // sm -> Latn + {0x81920000u, 46u}, // sma -> Latn + {0xA5920000u, 46u}, // smj -> Latn + {0xB5920000u, 46u}, // smn -> Latn + {0xBD920000u, 72u}, // smp -> Samr + {0xC1920000u, 46u}, // smq -> Latn + {0xC9920000u, 46u}, // sms -> Latn + {0x736E0000u, 46u}, // sn -> Latn + {0x89B20000u, 46u}, // snc -> Latn + {0xA9B20000u, 46u}, // snk -> Latn + {0xBDB20000u, 46u}, // snp -> Latn + {0xDDB20000u, 46u}, // snx -> Latn + {0xE1B20000u, 46u}, // sny -> Latn + {0x736F0000u, 46u}, // so -> Latn + {0x99D20000u, 77u}, // sog -> Sogd + {0xA9D20000u, 46u}, // sok -> Latn + {0xC1D20000u, 46u}, // soq -> Latn + {0xD1D20000u, 89u}, // sou -> Thai + {0xE1D20000u, 46u}, // soy -> Latn + {0x8DF20000u, 46u}, // spd -> Latn + {0xADF20000u, 46u}, // spl -> Latn + {0xC9F20000u, 46u}, // sps -> Latn + {0x73710000u, 46u}, // sq -> Latn + {0x73720000u, 17u}, // sr -> Cyrl + {0x73724D45u, 46u}, // sr-ME -> Latn + {0x7372524Fu, 46u}, // sr-RO -> Latn + {0x73725255u, 46u}, // sr-RU -> Latn + {0x73725452u, 46u}, // sr-TR -> Latn + {0x86320000u, 78u}, // srb -> Sora + {0xB6320000u, 46u}, // srn -> Latn + {0xC6320000u, 46u}, // srr -> Latn + {0xDE320000u, 18u}, // srx -> Deva + {0x73730000u, 46u}, // ss -> Latn + {0x8E520000u, 46u}, // ssd -> Latn + {0x9A520000u, 46u}, // ssg -> Latn + {0xE2520000u, 46u}, // ssy -> Latn + {0x73740000u, 46u}, // st -> Latn + {0xAA720000u, 46u}, // stk -> Latn + {0xC2720000u, 46u}, // stq -> Latn + {0x73750000u, 46u}, // su -> Latn + {0x82920000u, 46u}, // sua -> Latn + {0x92920000u, 46u}, // sue -> Latn + {0xAA920000u, 46u}, // suk -> Latn + {0xC6920000u, 46u}, // sur -> Latn + {0xCA920000u, 46u}, // sus -> Latn + {0x73760000u, 46u}, // sv -> Latn + {0x73770000u, 46u}, // sw -> Latn {0x86D20000u, 1u}, // swb -> Arab - {0x8AD20000u, 44u}, // swc -> Latn - {0x9AD20000u, 44u}, // swg -> Latn - {0xBED20000u, 44u}, // swp -> Latn - {0xD6D20000u, 17u}, // swv -> Deva - {0xB6F20000u, 44u}, // sxn -> Latn - {0xDAF20000u, 44u}, // sxw -> Latn + {0x8AD20000u, 46u}, // swc -> Latn + {0x9AD20000u, 46u}, // swg -> Latn + {0xBED20000u, 46u}, // swp -> Latn + {0xD6D20000u, 18u}, // swv -> Deva + {0xB6F20000u, 46u}, // sxn -> Latn + {0xDAF20000u, 46u}, // sxw -> Latn {0xAF120000u, 7u}, // syl -> Beng - {0xC7120000u, 78u}, // syr -> Syrc - {0xAF320000u, 44u}, // szl -> Latn - {0x74610000u, 81u}, // ta -> Taml - {0xA4130000u, 17u}, // taj -> Deva - {0xAC130000u, 44u}, // tal -> Latn - {0xB4130000u, 44u}, // tan -> Latn - {0xC0130000u, 44u}, // taq -> Latn - {0x88330000u, 44u}, // tbc -> Latn - {0x8C330000u, 44u}, // tbd -> Latn - {0x94330000u, 44u}, // tbf -> Latn - {0x98330000u, 44u}, // tbg -> Latn - {0xB8330000u, 44u}, // tbo -> Latn - {0xD8330000u, 44u}, // tbw -> Latn - {0xE4330000u, 44u}, // tbz -> Latn - {0xA0530000u, 44u}, // tci -> Latn - {0xE0530000u, 40u}, // tcy -> Knda - {0x8C730000u, 79u}, // tdd -> Tale - {0x98730000u, 17u}, // tdg -> Deva - {0x9C730000u, 17u}, // tdh -> Deva - {0xD0730000u, 44u}, // tdu -> Latn - {0x74650000u, 84u}, // te -> Telu - {0x8C930000u, 44u}, // ted -> Latn - {0xB0930000u, 44u}, // tem -> Latn - {0xB8930000u, 44u}, // teo -> Latn - {0xCC930000u, 44u}, // tet -> Latn - {0xA0B30000u, 44u}, // tfi -> Latn - {0x74670000u, 16u}, // tg -> Cyrl + {0xC7120000u, 80u}, // syr -> Syrc + {0xAF320000u, 46u}, // szl -> Latn + {0x74610000u, 83u}, // ta -> Taml + {0xA4130000u, 18u}, // taj -> Deva + {0xAC130000u, 46u}, // tal -> Latn + {0xB4130000u, 46u}, // tan -> Latn + {0xC0130000u, 46u}, // taq -> Latn + {0x88330000u, 46u}, // tbc -> Latn + {0x8C330000u, 46u}, // tbd -> Latn + {0x94330000u, 46u}, // tbf -> Latn + {0x98330000u, 46u}, // tbg -> Latn + {0xB8330000u, 46u}, // tbo -> Latn + {0xD8330000u, 46u}, // tbw -> Latn + {0xE4330000u, 46u}, // tbz -> Latn + {0xA0530000u, 46u}, // tci -> Latn + {0xE0530000u, 42u}, // tcy -> Knda + {0x8C730000u, 81u}, // tdd -> Tale + {0x98730000u, 18u}, // tdg -> Deva + {0x9C730000u, 18u}, // tdh -> Deva + {0xD0730000u, 46u}, // tdu -> Latn + {0x74650000u, 86u}, // te -> Telu + {0x8C930000u, 46u}, // ted -> Latn + {0xB0930000u, 46u}, // tem -> Latn + {0xB8930000u, 46u}, // teo -> Latn + {0xCC930000u, 46u}, // tet -> Latn + {0xA0B30000u, 46u}, // tfi -> Latn + {0x74670000u, 17u}, // tg -> Cyrl {0x7467504Bu, 1u}, // tg-PK -> Arab - {0x88D30000u, 44u}, // tgc -> Latn - {0xB8D30000u, 44u}, // tgo -> Latn - {0xD0D30000u, 44u}, // tgu -> Latn - {0x74680000u, 87u}, // th -> Thai - {0xACF30000u, 17u}, // thl -> Deva - {0xC0F30000u, 17u}, // thq -> Deva - {0xC4F30000u, 17u}, // thr -> Deva - {0x74690000u, 19u}, // ti -> Ethi - {0x95130000u, 44u}, // tif -> Latn - {0x99130000u, 19u}, // tig -> Ethi - {0xA9130000u, 44u}, // tik -> Latn - {0xB1130000u, 44u}, // tim -> Latn - {0xB9130000u, 44u}, // tio -> Latn - {0xD5130000u, 44u}, // tiv -> Latn - {0x746B0000u, 44u}, // tk -> Latn - {0xAD530000u, 44u}, // tkl -> Latn - {0xC5530000u, 44u}, // tkr -> Latn - {0xCD530000u, 17u}, // tkt -> Deva - {0x746C0000u, 44u}, // tl -> Latn - {0x95730000u, 44u}, // tlf -> Latn - {0xDD730000u, 44u}, // tlx -> Latn - {0xE1730000u, 44u}, // tly -> Latn - {0x9D930000u, 44u}, // tmh -> Latn - {0xE1930000u, 44u}, // tmy -> Latn - {0x746E0000u, 44u}, // tn -> Latn - {0x9DB30000u, 44u}, // tnh -> Latn - {0x746F0000u, 44u}, // to -> Latn - {0x95D30000u, 44u}, // tof -> Latn - {0x99D30000u, 44u}, // tog -> Latn - {0xC1D30000u, 44u}, // toq -> Latn - {0xA1F30000u, 44u}, // tpi -> Latn - {0xB1F30000u, 44u}, // tpm -> Latn - {0xE5F30000u, 44u}, // tpz -> Latn - {0xBA130000u, 44u}, // tqo -> Latn - {0x74720000u, 44u}, // tr -> Latn - {0xD2330000u, 44u}, // tru -> Latn - {0xD6330000u, 44u}, // trv -> Latn + {0x88D30000u, 46u}, // tgc -> Latn + {0xB8D30000u, 46u}, // tgo -> Latn + {0xD0D30000u, 46u}, // tgu -> Latn + {0x74680000u, 89u}, // th -> Thai + {0xACF30000u, 18u}, // thl -> Deva + {0xC0F30000u, 18u}, // thq -> Deva + {0xC4F30000u, 18u}, // thr -> Deva + {0x74690000u, 20u}, // ti -> Ethi + {0x95130000u, 46u}, // tif -> Latn + {0x99130000u, 20u}, // tig -> Ethi + {0xA9130000u, 46u}, // tik -> Latn + {0xB1130000u, 46u}, // tim -> Latn + {0xB9130000u, 46u}, // tio -> Latn + {0xD5130000u, 46u}, // tiv -> Latn + {0x746B0000u, 46u}, // tk -> Latn + {0xAD530000u, 46u}, // tkl -> Latn + {0xC5530000u, 46u}, // tkr -> Latn + {0xCD530000u, 18u}, // tkt -> Deva + {0x746C0000u, 46u}, // tl -> Latn + {0x95730000u, 46u}, // tlf -> Latn + {0xDD730000u, 46u}, // tlx -> Latn + {0xE1730000u, 46u}, // tly -> Latn + {0x9D930000u, 46u}, // tmh -> Latn + {0xE1930000u, 46u}, // tmy -> Latn + {0x746E0000u, 46u}, // tn -> Latn + {0x9DB30000u, 46u}, // tnh -> Latn + {0x746F0000u, 46u}, // to -> Latn + {0x95D30000u, 46u}, // tof -> Latn + {0x99D30000u, 46u}, // tog -> Latn + {0xC1D30000u, 46u}, // toq -> Latn + {0xA1F30000u, 46u}, // tpi -> Latn + {0xB1F30000u, 46u}, // tpm -> Latn + {0xE5F30000u, 46u}, // tpz -> Latn + {0xBA130000u, 46u}, // tqo -> Latn + {0x74720000u, 46u}, // tr -> Latn + {0xD2330000u, 46u}, // tru -> Latn + {0xD6330000u, 46u}, // trv -> Latn {0xDA330000u, 1u}, // trw -> Arab - {0x74730000u, 44u}, // ts -> Latn - {0x8E530000u, 24u}, // tsd -> Grek - {0x96530000u, 17u}, // tsf -> Deva - {0x9A530000u, 44u}, // tsg -> Latn - {0xA6530000u, 88u}, // tsj -> Tibt - {0xDA530000u, 44u}, // tsw -> Latn - {0x74740000u, 16u}, // tt -> Cyrl - {0x8E730000u, 44u}, // ttd -> Latn - {0x92730000u, 44u}, // tte -> Latn - {0xA6730000u, 44u}, // ttj -> Latn - {0xC6730000u, 44u}, // ttr -> Latn - {0xCA730000u, 87u}, // tts -> Thai - {0xCE730000u, 44u}, // ttt -> Latn - {0x9E930000u, 44u}, // tuh -> Latn - {0xAE930000u, 44u}, // tul -> Latn - {0xB2930000u, 44u}, // tum -> Latn - {0xC2930000u, 44u}, // tuq -> Latn - {0x8EB30000u, 44u}, // tvd -> Latn - {0xAEB30000u, 44u}, // tvl -> Latn - {0xD2B30000u, 44u}, // tvu -> Latn - {0x9ED30000u, 44u}, // twh -> Latn - {0xC2D30000u, 44u}, // twq -> Latn - {0x9AF30000u, 82u}, // txg -> Tang - {0x74790000u, 44u}, // ty -> Latn - {0x83130000u, 44u}, // tya -> Latn - {0xD7130000u, 16u}, // tyv -> Cyrl - {0xB3330000u, 44u}, // tzm -> Latn - {0xD0340000u, 44u}, // ubu -> Latn - {0xB0740000u, 16u}, // udm -> Cyrl + {0x74730000u, 46u}, // ts -> Latn + {0x8E530000u, 25u}, // tsd -> Grek + {0x96530000u, 18u}, // tsf -> Deva + {0x9A530000u, 46u}, // tsg -> Latn + {0xA6530000u, 90u}, // tsj -> Tibt + {0xDA530000u, 46u}, // tsw -> Latn + {0x74740000u, 17u}, // tt -> Cyrl + {0x8E730000u, 46u}, // ttd -> Latn + {0x92730000u, 46u}, // tte -> Latn + {0xA6730000u, 46u}, // ttj -> Latn + {0xC6730000u, 46u}, // ttr -> Latn + {0xCA730000u, 89u}, // tts -> Thai + {0xCE730000u, 46u}, // ttt -> Latn + {0x9E930000u, 46u}, // tuh -> Latn + {0xAE930000u, 46u}, // tul -> Latn + {0xB2930000u, 46u}, // tum -> Latn + {0xC2930000u, 46u}, // tuq -> Latn + {0x8EB30000u, 46u}, // tvd -> Latn + {0xAEB30000u, 46u}, // tvl -> Latn + {0xD2B30000u, 46u}, // tvu -> Latn + {0x9ED30000u, 46u}, // twh -> Latn + {0xC2D30000u, 46u}, // twq -> Latn + {0x9AF30000u, 84u}, // txg -> Tang + {0x74790000u, 46u}, // ty -> Latn + {0x83130000u, 46u}, // tya -> Latn + {0xD7130000u, 17u}, // tyv -> Cyrl + {0xB3330000u, 46u}, // tzm -> Latn + {0xD0340000u, 46u}, // ubu -> Latn + {0xB0740000u, 17u}, // udm -> Cyrl {0x75670000u, 1u}, // ug -> Arab - {0x75674B5Au, 16u}, // ug-KZ -> Cyrl - {0x75674D4Eu, 16u}, // ug-MN -> Cyrl - {0x80D40000u, 89u}, // uga -> Ugar - {0x756B0000u, 16u}, // uk -> Cyrl - {0xA1740000u, 44u}, // uli -> Latn - {0x85940000u, 44u}, // umb -> Latn + {0x75674B5Au, 17u}, // ug-KZ -> Cyrl + {0x75674D4Eu, 17u}, // ug-MN -> Cyrl + {0x80D40000u, 91u}, // uga -> Ugar + {0x756B0000u, 17u}, // uk -> Cyrl + {0xA1740000u, 46u}, // uli -> Latn + {0x85940000u, 46u}, // umb -> Latn {0xC5B40000u, 7u}, // unr -> Beng - {0xC5B44E50u, 17u}, // unr-NP -> Deva + {0xC5B44E50u, 18u}, // unr-NP -> Deva {0xDDB40000u, 7u}, // unx -> Beng - {0xA9D40000u, 44u}, // uok -> Latn + {0xA9D40000u, 46u}, // uok -> Latn {0x75720000u, 1u}, // ur -> Arab - {0xA2340000u, 44u}, // uri -> Latn - {0xCE340000u, 44u}, // urt -> Latn - {0xDA340000u, 44u}, // urw -> Latn - {0x82540000u, 44u}, // usa -> Latn - {0xC6740000u, 44u}, // utr -> Latn - {0x9EB40000u, 44u}, // uvh -> Latn - {0xAEB40000u, 44u}, // uvl -> Latn - {0x757A0000u, 44u}, // uz -> Latn + {0xA2340000u, 46u}, // uri -> Latn + {0xCE340000u, 46u}, // urt -> Latn + {0xDA340000u, 46u}, // urw -> Latn + {0x82540000u, 46u}, // usa -> Latn + {0xC6740000u, 46u}, // utr -> Latn + {0x9EB40000u, 46u}, // uvh -> Latn + {0xAEB40000u, 46u}, // uvl -> Latn + {0x757A0000u, 46u}, // uz -> Latn {0x757A4146u, 1u}, // uz-AF -> Arab - {0x757A434Eu, 16u}, // uz-CN -> Cyrl - {0x98150000u, 44u}, // vag -> Latn - {0xA0150000u, 90u}, // vai -> Vaii - {0xB4150000u, 44u}, // van -> Latn - {0x76650000u, 44u}, // ve -> Latn - {0x88950000u, 44u}, // vec -> Latn - {0xBC950000u, 44u}, // vep -> Latn - {0x76690000u, 44u}, // vi -> Latn - {0x89150000u, 44u}, // vic -> Latn - {0xD5150000u, 44u}, // viv -> Latn - {0xC9750000u, 44u}, // vls -> Latn - {0x95950000u, 44u}, // vmf -> Latn - {0xD9950000u, 44u}, // vmw -> Latn - {0x766F0000u, 44u}, // vo -> Latn - {0xCDD50000u, 44u}, // vot -> Latn - {0xBA350000u, 44u}, // vro -> Latn - {0xB6950000u, 44u}, // vun -> Latn - {0xCE950000u, 44u}, // vut -> Latn - {0x77610000u, 44u}, // wa -> Latn - {0x90160000u, 44u}, // wae -> Latn - {0xA4160000u, 44u}, // waj -> Latn - {0xAC160000u, 19u}, // wal -> Ethi - {0xB4160000u, 44u}, // wan -> Latn - {0xC4160000u, 44u}, // war -> Latn - {0xBC360000u, 44u}, // wbp -> Latn - {0xC0360000u, 84u}, // wbq -> Telu - {0xC4360000u, 17u}, // wbr -> Deva - {0xA0560000u, 44u}, // wci -> Latn - {0xC4960000u, 44u}, // wer -> Latn - {0xA0D60000u, 44u}, // wgi -> Latn - {0x98F60000u, 44u}, // whg -> Latn - {0x85160000u, 44u}, // wib -> Latn - {0xD1160000u, 44u}, // wiu -> Latn - {0xD5160000u, 44u}, // wiv -> Latn - {0x81360000u, 44u}, // wja -> Latn - {0xA1360000u, 44u}, // wji -> Latn - {0xC9760000u, 44u}, // wls -> Latn - {0xB9960000u, 44u}, // wmo -> Latn - {0x89B60000u, 44u}, // wnc -> Latn + {0x757A434Eu, 17u}, // uz-CN -> Cyrl + {0x98150000u, 46u}, // vag -> Latn + {0xA0150000u, 92u}, // vai -> Vaii + {0xB4150000u, 46u}, // van -> Latn + {0x76650000u, 46u}, // ve -> Latn + {0x88950000u, 46u}, // vec -> Latn + {0xBC950000u, 46u}, // vep -> Latn + {0x76690000u, 46u}, // vi -> Latn + {0x89150000u, 46u}, // vic -> Latn + {0xD5150000u, 46u}, // viv -> Latn + {0xC9750000u, 46u}, // vls -> Latn + {0x95950000u, 46u}, // vmf -> Latn + {0xD9950000u, 46u}, // vmw -> Latn + {0x766F0000u, 46u}, // vo -> Latn + {0xCDD50000u, 46u}, // vot -> Latn + {0xBA350000u, 46u}, // vro -> Latn + {0xB6950000u, 46u}, // vun -> Latn + {0xCE950000u, 46u}, // vut -> Latn + {0x77610000u, 46u}, // wa -> Latn + {0x90160000u, 46u}, // wae -> Latn + {0xA4160000u, 46u}, // waj -> Latn + {0xAC160000u, 20u}, // wal -> Ethi + {0xB4160000u, 46u}, // wan -> Latn + {0xC4160000u, 46u}, // war -> Latn + {0xBC360000u, 46u}, // wbp -> Latn + {0xC0360000u, 86u}, // wbq -> Telu + {0xC4360000u, 18u}, // wbr -> Deva + {0xA0560000u, 46u}, // wci -> Latn + {0xC4960000u, 46u}, // wer -> Latn + {0xA0D60000u, 46u}, // wgi -> Latn + {0x98F60000u, 46u}, // whg -> Latn + {0x85160000u, 46u}, // wib -> Latn + {0xD1160000u, 46u}, // wiu -> Latn + {0xD5160000u, 46u}, // wiv -> Latn + {0x81360000u, 46u}, // wja -> Latn + {0xA1360000u, 46u}, // wji -> Latn + {0xC9760000u, 46u}, // wls -> Latn + {0xB9960000u, 46u}, // wmo -> Latn + {0x89B60000u, 46u}, // wnc -> Latn {0xA1B60000u, 1u}, // wni -> Arab - {0xD1B60000u, 44u}, // wnu -> Latn - {0x776F0000u, 44u}, // wo -> Latn - {0x85D60000u, 44u}, // wob -> Latn - {0xC9D60000u, 44u}, // wos -> Latn - {0xCA360000u, 44u}, // wrs -> Latn - {0x9A560000u, 21u}, // wsg -> Gong - {0xAA560000u, 44u}, // wsk -> Latn - {0xB2760000u, 17u}, // wtm -> Deva - {0xD2960000u, 27u}, // wuu -> Hans - {0xD6960000u, 44u}, // wuv -> Latn - {0x82D60000u, 44u}, // wwa -> Latn - {0xD4170000u, 44u}, // xav -> Latn - {0xA0370000u, 44u}, // xbi -> Latn + {0xD1B60000u, 46u}, // wnu -> Latn + {0x776F0000u, 46u}, // wo -> Latn + {0x85D60000u, 46u}, // wob -> Latn + {0xC9D60000u, 46u}, // wos -> Latn + {0xCA360000u, 46u}, // wrs -> Latn + {0x9A560000u, 22u}, // wsg -> Gong + {0xAA560000u, 46u}, // wsk -> Latn + {0xB2760000u, 18u}, // wtm -> Deva + {0xD2960000u, 28u}, // wuu -> Hans + {0xD6960000u, 46u}, // wuv -> Latn + {0x82D60000u, 46u}, // wwa -> Latn + {0xD4170000u, 46u}, // xav -> Latn + {0xA0370000u, 46u}, // xbi -> Latn + {0xB8570000u, 14u}, // xco -> Chrs {0xC4570000u, 11u}, // xcr -> Cari - {0xC8970000u, 44u}, // xes -> Latn - {0x78680000u, 44u}, // xh -> Latn - {0x81770000u, 44u}, // xla -> Latn - {0x89770000u, 48u}, // xlc -> Lyci - {0x8D770000u, 49u}, // xld -> Lydi - {0x95970000u, 20u}, // xmf -> Geor - {0xB5970000u, 51u}, // xmn -> Mani - {0xC5970000u, 52u}, // xmr -> Merc - {0x81B70000u, 57u}, // xna -> Narb - {0xC5B70000u, 17u}, // xnr -> Deva - {0x99D70000u, 44u}, // xog -> Latn - {0xB5D70000u, 44u}, // xon -> Latn - {0xC5F70000u, 68u}, // xpr -> Prti - {0x86370000u, 44u}, // xrb -> Latn - {0x82570000u, 71u}, // xsa -> Sarb - {0xA2570000u, 44u}, // xsi -> Latn - {0xB2570000u, 44u}, // xsm -> Latn - {0xC6570000u, 17u}, // xsr -> Deva - {0x92D70000u, 44u}, // xwe -> Latn - {0xB0180000u, 44u}, // yam -> Latn - {0xB8180000u, 44u}, // yao -> Latn - {0xBC180000u, 44u}, // yap -> Latn - {0xC8180000u, 44u}, // yas -> Latn - {0xCC180000u, 44u}, // yat -> Latn - {0xD4180000u, 44u}, // yav -> Latn - {0xE0180000u, 44u}, // yay -> Latn - {0xE4180000u, 44u}, // yaz -> Latn - {0x80380000u, 44u}, // yba -> Latn - {0x84380000u, 44u}, // ybb -> Latn - {0xE0380000u, 44u}, // yby -> Latn - {0xC4980000u, 44u}, // yer -> Latn - {0xC4D80000u, 44u}, // ygr -> Latn - {0xD8D80000u, 44u}, // ygw -> Latn - {0x79690000u, 30u}, // yi -> Hebr - {0xB9580000u, 44u}, // yko -> Latn - {0x91780000u, 44u}, // yle -> Latn - {0x99780000u, 44u}, // ylg -> Latn - {0xAD780000u, 44u}, // yll -> Latn - {0xAD980000u, 44u}, // yml -> Latn - {0x796F0000u, 44u}, // yo -> Latn - {0xB5D80000u, 44u}, // yon -> Latn - {0x86380000u, 44u}, // yrb -> Latn - {0x92380000u, 44u}, // yre -> Latn - {0xAE380000u, 44u}, // yrl -> Latn - {0xCA580000u, 44u}, // yss -> Latn - {0x82980000u, 44u}, // yua -> Latn - {0x92980000u, 28u}, // yue -> Hant - {0x9298434Eu, 27u}, // yue-CN -> Hans - {0xA6980000u, 44u}, // yuj -> Latn - {0xCE980000u, 44u}, // yut -> Latn - {0xDA980000u, 44u}, // yuw -> Latn - {0x7A610000u, 44u}, // za -> Latn - {0x98190000u, 44u}, // zag -> Latn + {0xC8970000u, 46u}, // xes -> Latn + {0x78680000u, 46u}, // xh -> Latn + {0x81770000u, 46u}, // xla -> Latn + {0x89770000u, 50u}, // xlc -> Lyci + {0x8D770000u, 51u}, // xld -> Lydi + {0x95970000u, 21u}, // xmf -> Geor + {0xB5970000u, 53u}, // xmn -> Mani + {0xC5970000u, 54u}, // xmr -> Merc + {0x81B70000u, 59u}, // xna -> Narb + {0xC5B70000u, 18u}, // xnr -> Deva + {0x99D70000u, 46u}, // xog -> Latn + {0xB5D70000u, 46u}, // xon -> Latn + {0xC5F70000u, 70u}, // xpr -> Prti + {0x86370000u, 46u}, // xrb -> Latn + {0x82570000u, 73u}, // xsa -> Sarb + {0xA2570000u, 46u}, // xsi -> Latn + {0xB2570000u, 46u}, // xsm -> Latn + {0xC6570000u, 18u}, // xsr -> Deva + {0x92D70000u, 46u}, // xwe -> Latn + {0xB0180000u, 46u}, // yam -> Latn + {0xB8180000u, 46u}, // yao -> Latn + {0xBC180000u, 46u}, // yap -> Latn + {0xC8180000u, 46u}, // yas -> Latn + {0xCC180000u, 46u}, // yat -> Latn + {0xD4180000u, 46u}, // yav -> Latn + {0xE0180000u, 46u}, // yay -> Latn + {0xE4180000u, 46u}, // yaz -> Latn + {0x80380000u, 46u}, // yba -> Latn + {0x84380000u, 46u}, // ybb -> Latn + {0xE0380000u, 46u}, // yby -> Latn + {0xC4980000u, 46u}, // yer -> Latn + {0xC4D80000u, 46u}, // ygr -> Latn + {0xD8D80000u, 46u}, // ygw -> Latn + {0x79690000u, 31u}, // yi -> Hebr + {0xB9580000u, 46u}, // yko -> Latn + {0x91780000u, 46u}, // yle -> Latn + {0x99780000u, 46u}, // ylg -> Latn + {0xAD780000u, 46u}, // yll -> Latn + {0xAD980000u, 46u}, // yml -> Latn + {0x796F0000u, 46u}, // yo -> Latn + {0xB5D80000u, 46u}, // yon -> Latn + {0x86380000u, 46u}, // yrb -> Latn + {0x92380000u, 46u}, // yre -> Latn + {0xAE380000u, 46u}, // yrl -> Latn + {0xCA580000u, 46u}, // yss -> Latn + {0x82980000u, 46u}, // yua -> Latn + {0x92980000u, 29u}, // yue -> Hant + {0x9298434Eu, 28u}, // yue-CN -> Hans + {0xA6980000u, 46u}, // yuj -> Latn + {0xCE980000u, 46u}, // yut -> Latn + {0xDA980000u, 46u}, // yuw -> Latn + {0x7A610000u, 46u}, // za -> Latn + {0x98190000u, 46u}, // zag -> Latn {0xA4790000u, 1u}, // zdj -> Arab - {0x80990000u, 44u}, // zea -> Latn - {0x9CD90000u, 85u}, // zgh -> Tfng - {0x7A680000u, 27u}, // zh -> Hans - {0x7A684155u, 28u}, // zh-AU -> Hant - {0x7A68424Eu, 28u}, // zh-BN -> Hant - {0x7A684742u, 28u}, // zh-GB -> Hant - {0x7A684746u, 28u}, // zh-GF -> Hant - {0x7A68484Bu, 28u}, // zh-HK -> Hant - {0x7A684944u, 28u}, // zh-ID -> Hant - {0x7A684D4Fu, 28u}, // zh-MO -> Hant - {0x7A684D59u, 28u}, // zh-MY -> Hant - {0x7A685041u, 28u}, // zh-PA -> Hant - {0x7A685046u, 28u}, // zh-PF -> Hant - {0x7A685048u, 28u}, // zh-PH -> Hant - {0x7A685352u, 28u}, // zh-SR -> Hant - {0x7A685448u, 28u}, // zh-TH -> Hant - {0x7A685457u, 28u}, // zh-TW -> Hant - {0x7A685553u, 28u}, // zh-US -> Hant - {0x7A68564Eu, 28u}, // zh-VN -> Hant - {0xDCF90000u, 59u}, // zhx -> Nshu - {0x81190000u, 44u}, // zia -> Latn - {0xB1790000u, 44u}, // zlm -> Latn - {0xA1990000u, 44u}, // zmi -> Latn - {0x91B90000u, 44u}, // zne -> Latn - {0x7A750000u, 44u}, // zu -> Latn - {0x83390000u, 44u}, // zza -> Latn + {0x80990000u, 46u}, // zea -> Latn + {0x9CD90000u, 87u}, // zgh -> Tfng + {0x7A680000u, 28u}, // zh -> Hans + {0x7A684155u, 29u}, // zh-AU -> Hant + {0x7A68424Eu, 29u}, // zh-BN -> Hant + {0x7A684742u, 29u}, // zh-GB -> Hant + {0x7A684746u, 29u}, // zh-GF -> Hant + {0x7A68484Bu, 29u}, // zh-HK -> Hant + {0x7A684944u, 29u}, // zh-ID -> Hant + {0x7A684D4Fu, 29u}, // zh-MO -> Hant + {0x7A684D59u, 29u}, // zh-MY -> Hant + {0x7A685041u, 29u}, // zh-PA -> Hant + {0x7A685046u, 29u}, // zh-PF -> Hant + {0x7A685048u, 29u}, // zh-PH -> Hant + {0x7A685352u, 29u}, // zh-SR -> Hant + {0x7A685448u, 29u}, // zh-TH -> Hant + {0x7A685457u, 29u}, // zh-TW -> Hant + {0x7A685553u, 29u}, // zh-US -> Hant + {0x7A68564Eu, 29u}, // zh-VN -> Hant + {0xDCF90000u, 61u}, // zhx -> Nshu + {0x81190000u, 46u}, // zia -> Latn + {0xCD590000u, 41u}, // zkt -> Kits + {0xB1790000u, 46u}, // zlm -> Latn + {0xA1990000u, 46u}, // zmi -> Latn + {0x91B90000u, 46u}, // zne -> Latn + {0x7A750000u, 46u}, // zu -> Latn + {0x83390000u, 46u}, // zza -> Latn }); std::unordered_set<uint64_t> REPRESENTATIVE_LOCALES({ @@ -1829,6 +1833,7 @@ std::unordered_set<uint64_t> REPRESENTATIVE_LOCALES({ 0xC66A4D594C61746ELLU, // ktr_Latn_MY 0x6B75495141726162LLU, // ku_Arab_IQ 0x6B7554524C61746ELLU, // ku_Latn_TR + 0x6B75474559657A69LLU, // ku_Yezi_GE 0xB28A52554379726CLLU, // kum_Cyrl_RU 0x6B7652554379726CLLU, // kv_Cyrl_RU 0xC6AA49444C61746ELLU, // kvr_Latn_ID @@ -2199,6 +2204,7 @@ std::unordered_set<uint64_t> REPRESENTATIVE_LOCALES({ 0xB276494E44657661LLU, // wtm_Deva_IN 0xD296434E48616E73LLU, // wuu_Hans_CN 0xD41742524C61746ELLU, // xav_Latn_BR + 0xB857555A43687273LLU, // xco_Chrs_UZ 0xC457545243617269LLU, // xcr_Cari_TR 0x78685A414C61746ELLU, // xh_Latn_ZA 0x897754524C796369LLU, // xlc_Lyci_TR @@ -2231,6 +2237,7 @@ std::unordered_set<uint64_t> REPRESENTATIVE_LOCALES({ 0x7A68434E48616E73LLU, // zh_Hans_CN 0x7A68545748616E74LLU, // zh_Hant_TW 0xDCF9434E4E736875LLU, // zhx_Nshu_CN + 0xCD59434E4B697473LLU, // zkt_Kits_CN 0xB17954474C61746ELLU, // zlm_Latn_TG 0xA1994D594C61746ELLU, // zmi_Latn_MY 0x7A755A414C61746ELLU, // zu_Latn_ZA diff --git a/media/jni/audioeffect/Visualizer.cpp b/media/jni/audioeffect/Visualizer.cpp index 83f3b6ed6217..efeb3352d393 100644 --- a/media/jni/audioeffect/Visualizer.cpp +++ b/media/jni/audioeffect/Visualizer.cpp @@ -120,8 +120,9 @@ status_t Visualizer::setCaptureCallBack(capture_cbk_t cbk, void* user, uint32_t } if (mCaptureThread != 0) { + sp<CaptureThread> t = mCaptureThread; mCaptureLock.unlock(); - mCaptureThread->requestExitAndWait(); + t->requestExitAndWait(); mCaptureLock.lock(); } diff --git a/media/tests/EffectsTest/res/layout/visualizertest.xml b/media/tests/EffectsTest/res/layout/visualizertest.xml index 50ac7bbd8cd0..18d7a3648fbf 100644 --- a/media/tests/EffectsTest/res/layout/visualizertest.xml +++ b/media/tests/EffectsTest/res/layout/visualizertest.xml @@ -56,6 +56,37 @@ android:layout_height="wrap_content" android:scaleType="fitXY"/> + <LinearLayout android:id="@+id/visuMultithreadedLayout" + android:orientation="horizontal" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="10dip" + android:layout_marginTop="10dip" + android:layout_marginRight="10dip" + android:layout_marginBottom="10dip" > + + <TextView android:id="@+id/visuMultithreaded" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:layout_weight="1.0" + android:layout_gravity="center_vertical|left" + android:text="@string/effect_multithreaded" + style="@android:style/TextAppearance.Medium" /> + + <ToggleButton android:id="@+id/visuMultithreadedOnOff" + android:layout_width="wrap_content" + android:layout_height="fill_parent" + android:layout_gravity="center_vertical|right" + android:layout_weight="0.0" /> + + </LinearLayout> + + <ImageView + android:src="@android:drawable/divider_horizontal_dark" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:scaleType="fitXY"/> + <LinearLayout android:id="@+id/visuControlLayout" android:orientation="horizontal" android:layout_width="fill_parent" diff --git a/media/tests/EffectsTest/res/values/strings.xml b/media/tests/EffectsTest/res/values/strings.xml index 2a8518417565..7c12da1274e3 100644 --- a/media/tests/EffectsTest/res/values/strings.xml +++ b/media/tests/EffectsTest/res/values/strings.xml @@ -35,4 +35,6 @@ <string name="effect_attach_off">Attach</string> <string name="effect_attach_on">Detach</string> <string name="send_level_name">Send Level</string> + <!-- Toggles use of a multi-threaded client for an effect [CHAR LIMIT=24] --> + <string name="effect_multithreaded">Multithreaded Use</string> </resources> diff --git a/media/tests/EffectsTest/src/com/android/effectstest/VisualizerInstance.java b/media/tests/EffectsTest/src/com/android/effectstest/VisualizerInstance.java new file mode 100644 index 000000000000..817bd3d7bf5e --- /dev/null +++ b/media/tests/EffectsTest/src/com/android/effectstest/VisualizerInstance.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.effectstest; + +interface VisualizerInstance { + void enableDataCaptureListener(boolean enable); + boolean getEnabled(); + void release(); + void setEnabled(boolean enabled); + void startStopCapture(boolean start); +} diff --git a/media/tests/EffectsTest/src/com/android/effectstest/VisualizerInstanceMT.java b/media/tests/EffectsTest/src/com/android/effectstest/VisualizerInstanceMT.java new file mode 100644 index 000000000000..89cfbebe17ce --- /dev/null +++ b/media/tests/EffectsTest/src/com/android/effectstest/VisualizerInstanceMT.java @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.effectstest; + +import android.os.Handler; +import android.os.Looper; +import android.util.Log; + +import com.android.internal.annotations.GuardedBy; + +class VisualizerInstanceMT implements VisualizerInstance { + + private static final String TAG = "VisualizerInstanceMT"; + + private final Object mLock = new Object(); + private final int mThreadCount; + @GuardedBy("mLock") + private Handler mVisualizerHandler; + @GuardedBy("mLock") + private VisualizerInstanceSync mVisualizer; + + VisualizerInstanceMT(int session, Handler uiHandler, int extraThreadCount) { + Log.d(TAG, "Multi-threaded constructor"); + mThreadCount = 1 + extraThreadCount; + Thread t = new Thread() { + @Override public void run() { + Looper.prepare(); + VisualizerInstanceSync v = new VisualizerInstanceSync(session, uiHandler); + synchronized (mLock) { + mVisualizerHandler = new Handler(); + mVisualizer = v; + } + Looper.loop(); + } + }; + t.start(); + } + + private VisualizerInstance getVisualizer() { + synchronized (mLock) { + return mVisualizer != null ? new VisualizerInstanceSync(mVisualizer) : null; + } + } + + private interface VisualizerOperation { + void run(VisualizerInstance v); + } + + private void runOperationMt(VisualizerOperation op) { + final VisualizerInstance v = getVisualizer(); + if (v == null) return; + for (int i = 0; i < mThreadCount; ++i) { + Thread t = new Thread() { + @Override + public void run() { + op.run(v); + } + }; + t.start(); + } + } + + @Override + public void enableDataCaptureListener(boolean enable) { + runOperationMt(v -> v.enableDataCaptureListener(enable)); + } + + @Override + public boolean getEnabled() { + final VisualizerInstance v = getVisualizer(); + return v != null ? v.getEnabled() : false; + } + + @Override + public void release() { + runOperationMt(v -> v.release()); + synchronized (mLock) { + if (mVisualizerHandler == null) return; + mVisualizerHandler.post(() -> { + synchronized (mLock) { + mVisualizerHandler = null; + mVisualizer = null; + Looper.myLooper().quitSafely(); + } + Log.d(TAG, "Exiting looper"); + }); + } + } + + @Override + public void setEnabled(boolean enabled) { + runOperationMt(v -> v.setEnabled(enabled)); + } + + @Override + public void startStopCapture(boolean start) { + runOperationMt(v -> v.startStopCapture(start)); + } +} diff --git a/media/tests/EffectsTest/src/com/android/effectstest/VisualizerInstanceSync.java b/media/tests/EffectsTest/src/com/android/effectstest/VisualizerInstanceSync.java new file mode 100644 index 000000000000..e64f4e5785c8 --- /dev/null +++ b/media/tests/EffectsTest/src/com/android/effectstest/VisualizerInstanceSync.java @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.effectstest; + +import android.media.audiofx.Visualizer; +import android.os.Handler; +import android.os.Message; +import android.util.Log; + +// This class only has `final' members, thus any thread-safety concerns +// can only come from the Visualizer effect class. +class VisualizerInstanceSync implements VisualizerInstance { + + private static final String TAG = "VisualizerInstance"; + + private final Handler mUiHandler; + private final Visualizer mVisualizer; + private final VisualizerTestHandler mVisualizerTestHandler; + private final VisualizerListener mVisualizerListener; + + VisualizerInstanceSync(int session, Handler uiHandler) { + mUiHandler = uiHandler; + try { + mVisualizer = new Visualizer(session); + } catch (UnsupportedOperationException e) { + Log.e(TAG, "Visualizer library not loaded"); + throw new RuntimeException("Cannot initialize effect"); + } catch (RuntimeException e) { + throw e; + } + mVisualizerTestHandler = new VisualizerTestHandler(); + mVisualizerListener = new VisualizerListener(); + } + + // Not a "deep" copy, only copies the references. + VisualizerInstanceSync(VisualizerInstanceSync other) { + mUiHandler = other.mUiHandler; + mVisualizer = other.mVisualizer; + mVisualizerTestHandler = other.mVisualizerTestHandler; + mVisualizerListener = other.mVisualizerListener; + } + + @Override + public void enableDataCaptureListener(boolean enable) { + mVisualizer.setDataCaptureListener(enable ? mVisualizerListener : null, + 10000, enable, enable); + } + + @Override + public boolean getEnabled() { + return mVisualizer.getEnabled(); + } + + @Override + public void release() { + mVisualizer.release(); + Log.d(TAG, "Visualizer released"); + } + + @Override + public void setEnabled(boolean enabled) { + mVisualizer.setEnabled(enabled); + } + + @Override + public void startStopCapture(boolean start) { + mVisualizerTestHandler.sendMessage(mVisualizerTestHandler.obtainMessage( + start ? MSG_START_CAPTURE : MSG_STOP_CAPTURE)); + } + + private static final int MSG_START_CAPTURE = 0; + private static final int MSG_STOP_CAPTURE = 1; + private static final int MSG_NEW_CAPTURE = 2; + private static final int CAPTURE_PERIOD_MS = 100; + + private static int[] dataToMinMaxCenter(byte[] data, int len) { + int[] minMaxCenter = new int[3]; + minMaxCenter[0] = data[0]; + minMaxCenter[1] = data[len - 1]; + minMaxCenter[2] = data[len / 2]; + return minMaxCenter; + } + + private class VisualizerTestHandler extends Handler { + private final int mCaptureSize; + private boolean mActive = false; + + VisualizerTestHandler() { + mCaptureSize = mVisualizer.getCaptureSize(); + } + + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case MSG_START_CAPTURE: + if (!mActive) { + Log.d(TAG, "Start capture"); + mActive = true; + sendMessageDelayed(obtainMessage(MSG_NEW_CAPTURE), CAPTURE_PERIOD_MS); + } + break; + case MSG_STOP_CAPTURE: + if (mActive) { + Log.d(TAG, "Stop capture"); + mActive = false; + } + break; + case MSG_NEW_CAPTURE: + if (mActive) { + if (mCaptureSize > 0) { + byte[] data = new byte[mCaptureSize]; + if (mVisualizer.getWaveForm(data) == Visualizer.SUCCESS) { + int len = data.length < mCaptureSize ? data.length : mCaptureSize; + mUiHandler.sendMessage( + mUiHandler.obtainMessage( + VisualizerTest.MSG_DISPLAY_WAVEFORM_VAL, + dataToMinMaxCenter(data, len))); + } + if (mVisualizer.getFft(data) == Visualizer.SUCCESS) { + int len = data.length < mCaptureSize ? data.length : mCaptureSize; + mUiHandler.sendMessage( + mUiHandler.obtainMessage(VisualizerTest.MSG_DISPLAY_FFT_VAL, + dataToMinMaxCenter(data, len))); + } + } + sendMessageDelayed(obtainMessage(MSG_NEW_CAPTURE), CAPTURE_PERIOD_MS); + } + break; + } + } + } + + private class VisualizerListener implements Visualizer.OnDataCaptureListener { + @Override + public void onWaveFormDataCapture(Visualizer visualizer, byte[] waveform, + int samplingRate) { + if (visualizer == mVisualizer && waveform.length > 0) { + Log.d(TAG, "onWaveFormDataCapture(): " + waveform[0] + + " smp rate: " + samplingRate / 1000); + mUiHandler.sendMessage( + mUiHandler.obtainMessage(VisualizerTest.MSG_DISPLAY_WAVEFORM_VAL, + dataToMinMaxCenter(waveform, waveform.length))); + } + } + + @Override + public void onFftDataCapture(Visualizer visualizer, byte[] fft, int samplingRate) { + if (visualizer == mVisualizer && fft.length > 0) { + Log.d(TAG, "onFftDataCapture(): " + fft[0]); + mUiHandler.sendMessage( + mUiHandler.obtainMessage(VisualizerTest.MSG_DISPLAY_FFT_VAL, + dataToMinMaxCenter(fft, fft.length))); + } + } + } +} diff --git a/media/tests/EffectsTest/src/com/android/effectstest/VisualizerTest.java b/media/tests/EffectsTest/src/com/android/effectstest/VisualizerTest.java index 7db1d8d8625e..2e141c5ef7c8 100644 --- a/media/tests/EffectsTest/src/com/android/effectstest/VisualizerTest.java +++ b/media/tests/EffectsTest/src/com/android/effectstest/VisualizerTest.java @@ -17,51 +17,42 @@ package com.android.effectstest; import android.app.Activity; -import android.content.Context; -import android.content.Intent; -import android.media.audiofx.Visualizer; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.util.Log; import android.view.KeyEvent; -import android.view.Menu; import android.view.View; -import android.view.View.OnClickListener; -import android.view.ViewGroup; -import android.widget.Button; import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.EditText; import android.widget.TextView; import android.widget.ToggleButton; -import android.widget.SeekBar; -import java.nio.ByteOrder; -import java.nio.ByteBuffer; import java.util.HashMap; -import java.util.Map; public class VisualizerTest extends Activity implements OnCheckedChangeListener { private final static String TAG = "Visualizer Test"; - private Visualizer mVisualizer; + private VisualizerInstance mVisualizer; + ToggleButton mMultithreadedButton; ToggleButton mOnOffButton; ToggleButton mReleaseButton; + boolean mUseMTInstance; boolean mEnabled; EditText mSessionText; static int sSession = 0; - int mCaptureSize; ToggleButton mCallbackButton; boolean mCallbackOn; - VisualizerListener mVisualizerListener; - private static HashMap<Integer, Visualizer> sInstances = new HashMap<Integer, Visualizer>(10); - private VisualizerTestHandler mVisualizerTestHandler = null; + private static HashMap<Integer, VisualizerInstance> sInstances = + new HashMap<Integer, VisualizerInstance>(10); + private Handler mUiHandler; public VisualizerTest() { Log.d(TAG, "contructor"); + mUiHandler = new UiHandler(Looper.getMainLooper()); } @Override @@ -76,109 +67,45 @@ public class VisualizerTest extends Activity implements OnCheckedChangeListener mSessionText.setOnKeyListener(mSessionKeyListener); mSessionText.setText(Integer.toString(sSession)); - mReleaseButton = (ToggleButton)findViewById(R.id.visuReleaseButton); - mOnOffButton = (ToggleButton)findViewById(R.id.visualizerOnOff); - mCallbackButton = (ToggleButton)findViewById(R.id.visuCallbackOnOff); + mMultithreadedButton = (ToggleButton) findViewById(R.id.visuMultithreadedOnOff); + mReleaseButton = (ToggleButton) findViewById(R.id.visuReleaseButton); + mOnOffButton = (ToggleButton) findViewById(R.id.visualizerOnOff); + mCallbackButton = (ToggleButton) findViewById(R.id.visuCallbackOnOff); mCallbackOn = false; mCallbackButton.setChecked(mCallbackOn); - mVisualizerTestHandler = new VisualizerTestHandler(); - mVisualizerListener = new VisualizerListener(); - - getEffect(sSession); - - if (mVisualizer != null) { + mMultithreadedButton.setOnCheckedChangeListener(this); + if (getEffect(sSession) != null) { mReleaseButton.setOnCheckedChangeListener(this); mOnOffButton.setOnCheckedChangeListener(this); mCallbackButton.setOnCheckedChangeListener(this); } } - private static final int MSG_START_CAPTURE = 0; - private static final int MSG_STOP_CAPTURE = 1; - private static final int MSG_NEW_CAPTURE = 2; - private static final int CAPTURE_PERIOD_MS = 100; + public static final int MSG_DISPLAY_WAVEFORM_VAL = 0; + public static final int MSG_DISPLAY_FFT_VAL = 1; + + private class UiHandler extends Handler { + UiHandler(Looper looper) { + super(looper); + } - private class VisualizerTestHandler extends Handler { - boolean mActive = false; @Override public void handleMessage(Message msg) { switch (msg.what) { - case MSG_START_CAPTURE: - if (!mActive) { - Log.d(TAG, "Start capture"); - mActive = true; - sendMessageDelayed(obtainMessage(MSG_NEW_CAPTURE, 0, 0, null), CAPTURE_PERIOD_MS); - } - break; - case MSG_STOP_CAPTURE: - if (mActive) { - Log.d(TAG, "Stop capture"); - mActive = false; - } - break; - case MSG_NEW_CAPTURE: - if (mActive && mVisualizer != null) { - if (mCaptureSize > 0) { - byte[] data = new byte[mCaptureSize]; - if (mVisualizer.getWaveForm(data) == Visualizer.SUCCESS) { - int len = data.length < mCaptureSize ? data.length : mCaptureSize; - displayVal(R.id.waveformMin, data[0]); - displayVal(R.id.waveformMax, data[len-1]); - displayVal(R.id.waveformCenter, data[len/2]); - }; - if (mVisualizer.getFft(data) == Visualizer.SUCCESS) { - int len = data.length < mCaptureSize ? data.length : mCaptureSize; - displayVal(R.id.fftMin, data[0]); - displayVal(R.id.fftMax, data[len-1]); - displayVal(R.id.fftCenter, data[len/2]); - }; - } - sendMessageDelayed(obtainMessage(MSG_NEW_CAPTURE, 0, 0, null), CAPTURE_PERIOD_MS); - } - break; - } - } - } - - private class VisualizerListener implements Visualizer.OnDataCaptureListener { - - public VisualizerListener() { - } - public void onWaveFormDataCapture(Visualizer visualizer, byte[] waveform, int samplingRate) { - if (visualizer == mVisualizer) { - if (waveform.length > 0) { - Log.d(TAG, "onWaveFormDataCapture(): "+waveform[0]+" smp rate: "+samplingRate/1000); - displayVal(R.id.waveformMin, waveform[0]); - displayVal(R.id.waveformMax, waveform[waveform.length - 1]); - displayVal(R.id.waveformCenter, waveform[waveform.length/2]); + case MSG_DISPLAY_WAVEFORM_VAL: + case MSG_DISPLAY_FFT_VAL: + int[] minMaxCenter = (int[]) msg.obj; + boolean waveform = msg.what == MSG_DISPLAY_WAVEFORM_VAL; + displayVal(waveform ? R.id.waveformMin : R.id.fftMin, minMaxCenter[0]); + displayVal(waveform ? R.id.waveformMax : R.id.fftMax, minMaxCenter[1]); + displayVal(waveform ? R.id.waveformCenter : R.id.fftCenter, minMaxCenter[2]); + break; } - } - } - public void onFftDataCapture(Visualizer visualizer, byte[] fft, int samplingRate) { - if (visualizer == mVisualizer) { - if (fft.length > 0) { - Log.d(TAG, "onFftDataCapture(): "+fft[0]); - displayVal(R.id.fftMin, fft[0]); - displayVal(R.id.fftMax, fft[fft.length - 1]); - displayVal(R.id.fftCenter, fft[fft.length/2]); - } - } } } - @Override - public void onResume() { - super.onResume(); - } - - @Override - public void onPause() { - super.onPause(); - } - - private View.OnKeyListener mSessionKeyListener - = new View.OnKeyListener() { + private View.OnKeyListener mSessionKeyListener = new View.OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_DOWN) { switch (keyCode) { @@ -199,29 +126,26 @@ public class VisualizerTest extends Activity implements OnCheckedChangeListener }; // OnCheckedChangeListener + @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { + if (buttonView.getId() == R.id.visuMultithreadedOnOff) { + mUseMTInstance = isChecked; + Log.d(TAG, "Multi-threaded client: " + (isChecked ? "enabled" : "disabled")); + } if (buttonView.getId() == R.id.visualizerOnOff) { if (mVisualizer != null) { mEnabled = isChecked; mCallbackButton.setEnabled(!mEnabled); if (mCallbackOn && mEnabled) { - mVisualizer.setDataCaptureListener(mVisualizerListener, - 10000, - true, - true); + mVisualizer.enableDataCaptureListener(true); } mVisualizer.setEnabled(mEnabled); if (mCallbackOn) { if (!mEnabled) { - mVisualizer.setDataCaptureListener(null, - 10000, - false, - false); + mVisualizer.enableDataCaptureListener(false); } } else { - int msg = isChecked ? MSG_START_CAPTURE : MSG_STOP_CAPTURE; - mVisualizerTestHandler.sendMessage( - mVisualizerTestHandler.obtainMessage(msg, 0, 0, null)); + mVisualizer.startStopCapture(isChecked); } } } @@ -248,16 +172,15 @@ public class VisualizerTest extends Activity implements OnCheckedChangeListener } - private void getEffect(int session) { + private VisualizerInstance getEffect(int session) { synchronized (sInstances) { if (sInstances.containsKey(session)) { mVisualizer = sInstances.get(session); } else { - try{ - mVisualizer = new Visualizer(session); - } catch (UnsupportedOperationException e) { - Log.e(TAG,"Visualizer library not loaded"); - throw (new RuntimeException("Cannot initialize effect")); + try { + mVisualizer = mUseMTInstance + ? new VisualizerInstanceMT(session, mUiHandler, 0 /*extraThreadCount*/) + : new VisualizerInstanceSync(session, mUiHandler); } catch (RuntimeException e) { throw e; } @@ -267,8 +190,6 @@ public class VisualizerTest extends Activity implements OnCheckedChangeListener mReleaseButton.setEnabled(false); mOnOffButton.setEnabled(false); if (mVisualizer != null) { - mCaptureSize = mVisualizer.getCaptureSize(); - mReleaseButton.setChecked(true); mReleaseButton.setEnabled(true); @@ -278,6 +199,7 @@ public class VisualizerTest extends Activity implements OnCheckedChangeListener mCallbackButton.setEnabled(!mEnabled); } + return mVisualizer; } private void putEffect(int session) { @@ -286,9 +208,8 @@ public class VisualizerTest extends Activity implements OnCheckedChangeListener synchronized (sInstances) { if (mVisualizer != null) { mVisualizer.release(); - Log.d(TAG,"Visualizer released"); - mVisualizer = null; sInstances.remove(session); + mVisualizer = null; } } } diff --git a/packages/SystemUI/res/drawable/ic_qs_nfc_enabled.xml b/packages/SystemUI/res/drawable/ic_qs_nfc.xml index becb18ad8ba2..2c080964b48e 100644 --- a/packages/SystemUI/res/drawable/ic_qs_nfc_enabled.xml +++ b/packages/SystemUI/res/drawable/ic_qs_nfc.xml @@ -14,8 +14,8 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" - android:height="24dp" + android:width="48dp" + android:height="48dp" android:viewportWidth="24" android:viewportHeight="24"> diff --git a/packages/SystemUI/res/drawable/ic_qs_nfc_disabled.xml b/packages/SystemUI/res/drawable/ic_qs_nfc_disabled.xml deleted file mode 100644 index 558f3d083f42..000000000000 --- a/packages/SystemUI/res/drawable/ic_qs_nfc_disabled.xml +++ /dev/null @@ -1,31 +0,0 @@ -<!-- - Copyright (C) 2016 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="24dp" - android:height="24dp" - android:viewportWidth="24" - android:viewportHeight="24"> - - <path - android:pathData="M4 20h16V4H4v16z" /> - <path - android:fillColor="#4DFFFFFF" - android:pathData="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1 .9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 -18H4V4h16v16zM18 6h-5c-1.1 0-2 .9-2 2v2.28c-.6 .35 -1 .98-1 1.72 0 1.1 .9 2 2 -2s2-.9 2-2c0-.74-.4-1.38-1-1.72V8h3v8H8V8h2V6H6v12h12V6z" /> - <path - android:pathData="M0 0h24v24H0z" /> -</vector> diff --git a/packages/SystemUI/res/layout/menu_ime.xml b/packages/SystemUI/res/layout/menu_ime.xml index 24374e80b211..df717f601763 100644 --- a/packages/SystemUI/res/layout/menu_ime.xml +++ b/packages/SystemUI/res/layout/menu_ime.xml @@ -17,13 +17,13 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto" android:id="@+id/menu_container" - android:layout_width="@dimen/navigation_key_width" + android:layout_width="@dimen/navigation_side_padding" android:layout_height="match_parent" android:importantForAccessibility="no" > <!-- Use nav button width & height=match_parent for parent FrameLayout and buttons because they are placed inside a view that has a size controlled by weight. Ensure weight is large enough to - support icon size. --> + support icon size. Use layout_width=navigation_side_padding like other navbar buttons. --> <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu" diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java index 476a239de721..d0bd073e2480 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java @@ -38,6 +38,8 @@ import javax.inject.Inject; /** Quick settings tile: Enable/Disable NFC **/ public class NfcTile extends QSTileImpl<BooleanState> { + private final Icon mIcon = ResourceIcon.get(R.drawable.ic_qs_nfc); + private NfcAdapter mAdapter; private boolean mListening; @@ -105,8 +107,7 @@ public class NfcTile extends QSTileImpl<BooleanState> { state.state = getAdapter() == null ? Tile.STATE_UNAVAILABLE : state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE; - state.icon = ResourceIcon.get( - state.value ? R.drawable.ic_qs_nfc_enabled : R.drawable.ic_qs_nfc_disabled); + state.icon = mIcon; state.label = mContext.getString(R.string.quick_settings_nfc_label); state.expandedAccessibilityClassName = Switch.class.getName(); state.contentDescription = state.label; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationInterruptionStateProvider.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationInterruptionStateProvider.java index ef09434aa395..7f7db2f3ed3d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationInterruptionStateProvider.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationInterruptionStateProvider.java @@ -23,6 +23,7 @@ import android.app.NotificationManager; import android.content.Context; import android.database.ContentObserver; import android.hardware.display.AmbientDisplayConfiguration; +import android.os.Build; import android.os.PowerManager; import android.os.RemoteException; import android.os.ServiceManager; @@ -53,7 +54,7 @@ public class NotificationInterruptionStateProvider { private static final String TAG = "InterruptionStateProvider"; private static final boolean DEBUG = false; - private static final boolean DEBUG_HEADS_UP = true; + private static final boolean DEBUG_HEADS_UP = Build.IS_DEBUGGABLE; private static final boolean ENABLE_HEADS_UP = true; private static final String SETTING_HEADS_UP_TICKER = "ticker_gets_heads_up"; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java index 7892381ae19f..48534f6c985a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java @@ -577,7 +577,7 @@ public class MobileSignalController extends SignalController< } boolean isDataDisabled() { - return !mPhone.isDataConnectionEnabled(); + return !mPhone.isDataConnectionAllowed(); } @VisibleForTesting diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java index c08726de9b66..e3d8ea2f9048 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java @@ -17,6 +17,7 @@ package com.android.systemui.statusbar.policy; import static android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED; +import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR; import static android.net.wifi.WifiManager.TrafficStateCallback.DATA_ACTIVITY_IN; import static android.net.wifi.WifiManager.TrafficStateCallback.DATA_ACTIVITY_INOUT; import static android.net.wifi.WifiManager.TrafficStateCallback.DATA_ACTIVITY_NONE; @@ -160,6 +161,7 @@ public class NetworkControllerImpl extends BroadcastReceiver ServiceState mLastServiceState; private boolean mUserSetup; private boolean mSimDetected; + private boolean mForceCellularValidated; /** * Construct this controller object and register for updates. @@ -275,12 +277,41 @@ public class NetworkControllerImpl extends BroadcastReceiver mPhoneStateListener = new PhoneStateListener(bgLooper) { @Override public void onActiveDataSubscriptionIdChanged(int subId) { + // For data switching from A to B, we assume B is validated for up to 2 seconds iff: + // 1) A and B are in the same subscription group e.g. CBRS data switch. And + // 2) A was validated before the switch. + // This is to provide smooth transition for UI without showing cross during data + // switch. + if (keepCellularValidationBitInSwitch(mActiveMobileDataSubscription, subId)) { + if (DEBUG) Log.d(TAG, ": mForceCellularValidated to true."); + mForceCellularValidated = true; + mReceiverHandler.removeCallbacks(mClearForceValidated); + mReceiverHandler.postDelayed(mClearForceValidated, 2000); + } mActiveMobileDataSubscription = subId; doUpdateMobileControllers(); } }; } + private final Runnable mClearForceValidated = () -> { + if (DEBUG) Log.d(TAG, ": mClearForceValidated"); + mForceCellularValidated = false; + updateConnectivity(); + }; + + boolean isInGroupDataSwitch(int subId1, int subId2) { + SubscriptionInfo info1 = mSubscriptionManager.getActiveSubscriptionInfo(subId1); + SubscriptionInfo info2 = mSubscriptionManager.getActiveSubscriptionInfo(subId2); + return (info1 != null && info2 != null && info1.getGroupUuid() != null + && info1.getGroupUuid().equals(info2.getGroupUuid())); + } + + boolean keepCellularValidationBitInSwitch(int sourceSubId, int destSubId) { + return mValidatedTransports.get(TRANSPORT_CELLULAR) + && isInGroupDataSwitch(sourceSubId, destSubId); + } + public DataSaverController getDataSaverController() { return mDataSaverController; } @@ -794,6 +825,8 @@ public class NetworkControllerImpl extends BroadcastReceiver } } + if (mForceCellularValidated) mValidatedTransports.set(TRANSPORT_CELLULAR); + if (CHATTY) { Log.d(TAG, "updateConnectivity: mConnectedTransports=" + mConnectedTransports); Log.d(TAG, "updateConnectivity: mValidatedTransports=" + mValidatedTransports); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java index 264905483ddc..698185fe5154 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java @@ -176,7 +176,7 @@ public class NetworkControllerBaseTest extends SysuiTestCase { protected void setupNetworkController() { // For now just pretend to be the data sim, so we can test that too. mSubId = SubscriptionManager.DEFAULT_SUBSCRIPTION_ID; - when(mMockTm.isDataConnectionEnabled()).thenReturn(true); + when(mMockTm.isDataConnectionAllowed()).thenReturn(true); setDefaultSubId(mSubId); setSubscriptions(mSubId); mMobileSignalController = mNetworkController.mMobileSignalControllers.get(mSubId); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java index 6b02ff01aafa..bac1b8ca240c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java @@ -119,7 +119,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest { @Test public void testNoInternetIcon_withDefaultSub() { setupNetworkController(); - when(mMockTm.isDataConnectionEnabled()).thenReturn(false); + when(mMockTm.isDataConnectionAllowed()).thenReturn(false); setupDefaultSignal(); updateDataConnectionState(TelephonyManager.DATA_CONNECTED, 0); setConnectivityViaBroadcast(NetworkCapabilities.TRANSPORT_CELLULAR, false, false); @@ -133,7 +133,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest { @Test public void testDataDisabledIcon_withDefaultSub() { setupNetworkController(); - when(mMockTm.isDataConnectionEnabled()).thenReturn(false); + when(mMockTm.isDataConnectionAllowed()).thenReturn(false); setupDefaultSignal(); updateDataConnectionState(TelephonyManager.DATA_DISCONNECTED, 0); setConnectivityViaBroadcast(NetworkCapabilities.TRANSPORT_CELLULAR, false, false); @@ -147,7 +147,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest { @Test public void testNonDefaultSIM_showsFullSignal_connected() { setupNetworkController(); - when(mMockTm.isDataConnectionEnabled()).thenReturn(false); + when(mMockTm.isDataConnectionAllowed()).thenReturn(false); setupDefaultSignal(); setDefaultSubId(mSubId + 1); updateDataConnectionState(TelephonyManager.DATA_CONNECTED, 0); @@ -162,7 +162,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest { @Test public void testNonDefaultSIM_showsFullSignal_disconnected() { setupNetworkController(); - when(mMockTm.isDataConnectionEnabled()).thenReturn(false); + when(mMockTm.isDataConnectionAllowed()).thenReturn(false); setupDefaultSignal(); setDefaultSubId(mSubId + 1); updateDataConnectionState(TelephonyManager.DATA_DISCONNECTED, 0); @@ -177,7 +177,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest { @Test public void testDataDisabledIcon_UserNotSetup() { setupNetworkController(); - when(mMockTm.isDataConnectionEnabled()).thenReturn(false); + when(mMockTm.isDataConnectionAllowed()).thenReturn(false); setupDefaultSignal(); updateDataConnectionState(TelephonyManager.DATA_DISCONNECTED, 0); setConnectivityViaBroadcast(NetworkCapabilities.TRANSPORT_CELLULAR, false, false); @@ -192,7 +192,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest { @Test public void testAlwaysShowDataRatIcon() { setupDefaultSignal(); - when(mMockTm.isDataConnectionEnabled()).thenReturn(false); + when(mMockTm.isDataConnectionAllowed()).thenReturn(false); updateDataConnectionState(TelephonyManager.DATA_DISCONNECTED, TelephonyManager.NETWORK_TYPE_GSM); diff --git a/packages/Tethering/AndroidManifest.xml b/packages/Tethering/AndroidManifest.xml index c71d0d7bc543..9328611f5d3f 100644 --- a/packages/Tethering/AndroidManifest.xml +++ b/packages/Tethering/AndroidManifest.xml @@ -27,7 +27,7 @@ added to the privileged permissions whitelist for that package. --> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.BLUETOOTH" /> - <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> + <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" /> <uses-permission android:name="android.permission.BROADCAST_STICKY" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android:name="android.permission.MANAGE_USB" /> diff --git a/packages/Tethering/common/TetheringLib/Android.bp b/packages/Tethering/common/TetheringLib/Android.bp index 5b73dd53a285..2fbba68f1e03 100644 --- a/packages/Tethering/common/TetheringLib/Android.bp +++ b/packages/Tethering/common/TetheringLib/Android.bp @@ -62,26 +62,14 @@ java_library { apex_available: ["com.android.tethering"], } -droidstubs { - name: "framework-tethering-stubs-sources", - defaults: ["framework-module-stubs-defaults-module_libs_api"], +stubs_defaults { + name: "framework-tethering-stubs-defaults", srcs: [ "src/android/net/TetheredClient.java", "src/android/net/TetheringManager.java", "src/android/net/TetheringConstants.java", ], - libs: [ - "tethering-aidl-interfaces-java", - "framework-all", - ], - sdk_version: "core_platform", -} - -java_library { - name: "framework-tethering-stubs", - srcs: [":framework-tethering-stubs-sources"], - libs: ["framework-all"], - sdk_version: "core_platform", + libs: ["tethering-aidl-interfaces-java"], } filegroup { @@ -101,3 +89,53 @@ filegroup { ], path: "src" } + +droidstubs { + name: "framework-tethering-stubs-srcs-publicapi", + defaults: [ + "framework-module-stubs-defaults-publicapi", + "framework-tethering-stubs-defaults", + ], +} + +droidstubs { + name: "framework-tethering-stubs-srcs-systemapi", + defaults: [ + "framework-module-stubs-defaults-systemapi", + "framework-tethering-stubs-defaults", + ], +} + +droidstubs { + name: "framework-tethering-api-module_libs_api", + defaults: [ + "framework-module-api-defaults-module_libs_api", + "framework-tethering-stubs-defaults", + ], +} + +droidstubs { + name: "framework-tethering-stubs-srcs-module_libs_api", + defaults: [ + "framework-module-stubs-defaults-module_libs_api", + "framework-tethering-stubs-defaults", + ], +} + +java_library { + name: "framework-tethering-stubs-publicapi", + srcs: [":framework-tethering-stubs-srcs-publicapi"], + sdk_version: "current", +} + +java_library { + name: "framework-tethering-stubs-systemapi", + srcs: [":framework-tethering-stubs-srcs-systemapi"], + sdk_version: "system_current", +} + +java_library { + name: "framework-tethering-stubs-module_libs_api", + srcs: [":framework-tethering-stubs-srcs-module_libs_api"], + sdk_version: "module_current", +} diff --git a/packages/Tethering/common/TetheringLib/src/android/net/TetheredClient.java b/packages/Tethering/common/TetheringLib/src/android/net/TetheredClient.java index 8b8b9e57a500..48be0d96425c 100644 --- a/packages/Tethering/common/TetheringLib/src/android/net/TetheredClient.java +++ b/packages/Tethering/common/TetheringLib/src/android/net/TetheredClient.java @@ -64,16 +64,26 @@ public final class TetheredClient implements Parcelable { dest.writeInt(mTetheringType); } + /** + * Get the MAC address used to identify the client. + */ @NonNull public MacAddress getMacAddress() { return mMacAddress; } + /** + * Get information on the list of addresses that are associated with the client. + */ @NonNull public List<AddressInfo> getAddresses() { return new ArrayList<>(mAddresses); } + /** + * Get the type of tethering used by the client. + * @return one of the {@code TetheringManager#TETHERING_*} constants. + */ public int getTetheringType() { return mTetheringType; } @@ -115,45 +125,47 @@ public final class TetheredClient implements Parcelable { private final LinkAddress mAddress; @Nullable private final String mHostname; - // TODO: use LinkAddress expiration time once it is supported - private final long mExpirationTime; /** @hide */ public AddressInfo(@NonNull LinkAddress address, @Nullable String hostname) { - this(address, hostname, 0); - } - - /** @hide */ - public AddressInfo(@NonNull LinkAddress address, String hostname, long expirationTime) { this.mAddress = address; this.mHostname = hostname; - this.mExpirationTime = expirationTime; } private AddressInfo(Parcel in) { - this(in.readParcelable(null), in.readString(), in.readLong()); + this(in.readParcelable(null), in.readString()); } @Override public void writeToParcel(@NonNull Parcel dest, int flags) { dest.writeParcelable(mAddress, flags); dest.writeString(mHostname); - dest.writeLong(mExpirationTime); } + /** + * Get the link address (including prefix length and lifetime) used by the client. + * + * This may be an IPv4 or IPv6 address. + */ @NonNull public LinkAddress getAddress() { return mAddress; } + /** + * Get the hostname that was advertised by the client when obtaining its address, if any. + */ @Nullable public String getHostname() { return mHostname; } - /** @hide TODO: use expiration time in LinkAddress */ + /** + * Get the expiration time of the address assigned to the client. + * @hide + */ public long getExpirationTime() { - return mExpirationTime; + return mAddress.getExpirationTime(); } @Override @@ -163,7 +175,7 @@ public final class TetheredClient implements Parcelable { @Override public int hashCode() { - return Objects.hash(mAddress, mHostname, mExpirationTime); + return Objects.hash(mAddress, mHostname); } @Override @@ -173,8 +185,7 @@ public final class TetheredClient implements Parcelable { // Use .equals() for addresses as all changes, including address expiry changes, // should be included. return other.mAddress.equals(mAddress) - && Objects.equals(mHostname, other.mHostname) - && mExpirationTime == other.mExpirationTime; + && Objects.equals(mHostname, other.mHostname); } @NonNull diff --git a/packages/Tethering/common/TetheringLib/src/android/net/TetheringConstants.java b/packages/Tethering/common/TetheringLib/src/android/net/TetheringConstants.java index a18f5da60cad..fd6f171487a9 100644 --- a/packages/Tethering/common/TetheringLib/src/android/net/TetheringConstants.java +++ b/packages/Tethering/common/TetheringLib/src/android/net/TetheringConstants.java @@ -32,7 +32,7 @@ import android.os.ResultReceiver; * @hide */ @SystemApi(client = MODULE_LIBRARIES) -public class TetheringConstants { +public final class TetheringConstants { /** An explicit private class to avoid exposing constructor.*/ private TetheringConstants() { } diff --git a/packages/Tethering/res/values-af/strings.xml b/packages/Tethering/res/values-af/strings.xml index 1258805378ea..f06d1a208fd8 100644 --- a/packages/Tethering/res/values-af/strings.xml +++ b/packages/Tethering/res/values-af/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Verbinding of warmkol is aktief"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Tik om op te stel."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Verbinding is gedeaktiveer"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Kontak jou administrateur vir besonderhede"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Warmkol- en verbindingstatus"</string> </resources> diff --git a/packages/Tethering/res/values-am/strings.xml b/packages/Tethering/res/values-am/strings.xml index 9c36192257c0..aa0e6934492f 100644 --- a/packages/Tethering/res/values-am/strings.xml +++ b/packages/Tethering/res/values-am/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"እንደ ሞደም መሰካት ወይም መገናኛ ነጥብ ገባሪ"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"ለማዋቀር መታ ያድርጉ።"</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"እንደ ሞደም መሰካት ተሰናክሏል"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"ለዝርዝሮች የእርስዎን አስተዳዳሪ ያነጋግሩ"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"መገናኛ ነጥብ እና እንደ ሞደም የመሰካት ሁኔታ"</string> </resources> diff --git a/packages/Tethering/res/values-ar/strings.xml b/packages/Tethering/res/values-ar/strings.xml index 9f84ce4090c6..ce7372085b9d 100644 --- a/packages/Tethering/res/values-ar/strings.xml +++ b/packages/Tethering/res/values-ar/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"النطاق نشط أو نقطة الاتصال نشطة"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"انقر للإعداد."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"التوصيل متوقف."</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"تواصَل مع المشرف للحصول على التفاصيل."</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"حالة نقطة الاتصال والتوصيل"</string> </resources> diff --git a/packages/Tethering/res/values-as/strings.xml b/packages/Tethering/res/values-as/strings.xml deleted file mode 100644 index 8855822e7c8b..000000000000 --- a/packages/Tethering/res/values-as/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?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 index eba50eb636c1..82661f48e86f 100644 --- a/packages/Tethering/res/values-az/strings.xml +++ b/packages/Tethering/res/values-az/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Birləşmə və ya hotspot aktivdir"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Ayarlamaq üçün toxunun."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Birləşmə deaktivdir"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Detallar üçün adminlə əlaqə saxlayın"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Hotspot & birləşmə statusu"</string> </resources> diff --git a/packages/Tethering/res/values-b+sr+Latn/strings.xml b/packages/Tethering/res/values-b+sr+Latn/strings.xml index 5b0e488ba5e6..0f1fb9e1590d 100644 --- a/packages/Tethering/res/values-b+sr+Latn/strings.xml +++ b/packages/Tethering/res/values-b+sr+Latn/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Privezivanje ili hotspot je aktivan"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Dodirnite da biste podesili."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Privezivanje je onemogućeno"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Potražite detalje od administratora"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Status hotspota i privezivanja"</string> </resources> diff --git a/packages/Tethering/res/values-be/strings.xml b/packages/Tethering/res/values-be/strings.xml index 5966c7155ecd..31c6957a3c12 100644 --- a/packages/Tethering/res/values-be/strings.xml +++ b/packages/Tethering/res/values-be/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Мадэм або хот-спот актыўныя"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Дакраніцеся, каб наладзіць."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Рэжым мадэма выключаны"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Звярніцеся да адміністратара па падрабязную інфармацыю"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Стан \"Хот-спот і мадэм\""</string> </resources> diff --git a/packages/Tethering/res/values-bg/strings.xml b/packages/Tethering/res/values-bg/strings.xml index ed58d7311aca..22d03202f5c0 100644 --- a/packages/Tethering/res/values-bg/strings.xml +++ b/packages/Tethering/res/values-bg/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Има активна споделена връзка или точка за достъп"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Докоснете, за да настроите."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Функцията за тетъринг е деактивирана"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Свържете се с администратора си за подробности"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Състояние на функцията за точка за достъп и тетъринг"</string> </resources> diff --git a/packages/Tethering/res/values-bn/strings.xml b/packages/Tethering/res/values-bn/strings.xml deleted file mode 100644 index 8d9880aa9aca..000000000000 --- a/packages/Tethering/res/values-bn/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?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 index 2361b9dd382c..f22180d4d7b0 100644 --- a/packages/Tethering/res/values-bs/strings.xml +++ b/packages/Tethering/res/values-bs/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Aktivno je povezivanje putem mobitela ili pristupna tačka"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Dodirnite da postavite."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Povezivanje putem mobitela je onemogućeno"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Kontaktirajte svog administratora za detalje"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Status pristupne tačke i povezivanja putem mobitela"</string> </resources> diff --git a/packages/Tethering/res/values-ca/strings.xml b/packages/Tethering/res/values-ca/strings.xml index 6752b519e218..a91a9b4fbc7c 100644 --- a/packages/Tethering/res/values-ca/strings.xml +++ b/packages/Tethering/res/values-ca/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Compartició de xarxa o punt d\'accés Wi‑Fi activat"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Toca per configurar."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"La compartició de xarxa està desactivada"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Contacta amb el teu administrador per obtenir més informació"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Estat del punt d\'accés Wi‑Fi i de la compartició de xarxa"</string> </resources> diff --git a/packages/Tethering/res/values-cs/strings.xml b/packages/Tethering/res/values-cs/strings.xml index 5fdd53adf15c..4a8ce53b4c4f 100644 --- a/packages/Tethering/res/values-cs/strings.xml +++ b/packages/Tethering/res/values-cs/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Tethering nebo hotspot je aktivní"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Klepnutím zahájíte nastavení."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tethering je zakázán"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"O podrobnosti požádejte administrátora"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Stav hotspotu a tetheringu"</string> </resources> diff --git a/packages/Tethering/res/values-da/strings.xml b/packages/Tethering/res/values-da/strings.xml index 2775dfa551cb..1fe048bf58c0 100644 --- a/packages/Tethering/res/values-da/strings.xml +++ b/packages/Tethering/res/values-da/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Netdeling eller hotspot er aktivt"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Tryk for at konfigurere."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Netdeling er deaktiveret"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Kontakt din administrator for at få oplysninger"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Status for hotspot og netdeling"</string> </resources> diff --git a/packages/Tethering/res/values-de/strings.xml b/packages/Tethering/res/values-de/strings.xml deleted file mode 100644 index 9046cd5e1144..000000000000 --- a/packages/Tethering/res/values-de/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?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 index 3b9f53733b8a..045d707e82cd 100644 --- a/packages/Tethering/res/values-el/strings.xml +++ b/packages/Tethering/res/values-el/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Πρόσδεση ή σύνδεση σημείου πρόσβασης ενεργή"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Πατήστε για ρύθμιση."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Η σύνδεση είναι απενεργοποιημένη"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Επικοινωνήστε με τον διαχειριστή σας για λεπτομέρειες"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Κατάσταση σημείου πρόσβασης Wi-Fi και σύνδεσης"</string> </resources> diff --git a/packages/Tethering/res/values-en-rAU/strings.xml b/packages/Tethering/res/values-en-rAU/strings.xml index 56b88a5fb3e1..14bf2aa88fa5 100644 --- a/packages/Tethering/res/values-en-rAU/strings.xml +++ b/packages/Tethering/res/values-en-rAU/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Tethering or hotspot active"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Tap to set up."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tethering is disabled"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Contact your admin for details"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Hotspot and tethering status"</string> </resources> diff --git a/packages/Tethering/res/values-en-rCA/strings.xml b/packages/Tethering/res/values-en-rCA/strings.xml index 56b88a5fb3e1..14bf2aa88fa5 100644 --- a/packages/Tethering/res/values-en-rCA/strings.xml +++ b/packages/Tethering/res/values-en-rCA/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Tethering or hotspot active"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Tap to set up."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tethering is disabled"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Contact your admin for details"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Hotspot and tethering status"</string> </resources> diff --git a/packages/Tethering/res/values-en-rGB/strings.xml b/packages/Tethering/res/values-en-rGB/strings.xml index 56b88a5fb3e1..14bf2aa88fa5 100644 --- a/packages/Tethering/res/values-en-rGB/strings.xml +++ b/packages/Tethering/res/values-en-rGB/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Tethering or hotspot active"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Tap to set up."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tethering is disabled"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Contact your admin for details"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Hotspot and tethering status"</string> </resources> diff --git a/packages/Tethering/res/values-en-rIN/strings.xml b/packages/Tethering/res/values-en-rIN/strings.xml index 56b88a5fb3e1..14bf2aa88fa5 100644 --- a/packages/Tethering/res/values-en-rIN/strings.xml +++ b/packages/Tethering/res/values-en-rIN/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Tethering or hotspot active"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Tap to set up."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tethering is disabled"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Contact your admin for details"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Hotspot and tethering status"</string> </resources> diff --git a/packages/Tethering/res/values-en-rXC/strings.xml b/packages/Tethering/res/values-en-rXC/strings.xml index 7f47fc89d2af..43f504c244a3 100644 --- a/packages/Tethering/res/values-en-rXC/strings.xml +++ b/packages/Tethering/res/values-en-rXC/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Tethering or hotspot active"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Tap to set up."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tethering is disabled"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Contact your admin for details"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Hotspot & tethering status"</string> </resources> diff --git a/packages/Tethering/res/values-es-rUS/strings.xml b/packages/Tethering/res/values-es-rUS/strings.xml index e4618b8cec96..8706a93e674a 100644 --- a/packages/Tethering/res/values-es-rUS/strings.xml +++ b/packages/Tethering/res/values-es-rUS/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Anclaje a red o zona activa conectados"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Presiona para configurar esta opción."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Se inhabilitó la conexión mediante dispositivo portátil"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Para obtener más información, comunícate con el administrador"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Estado del hotspot y la conexión mediante dispositivo portátil"</string> </resources> diff --git a/packages/Tethering/res/values-es/strings.xml b/packages/Tethering/res/values-es/strings.xml index 8dc1575ce8ea..67f8f2eb3dcc 100644 --- a/packages/Tethering/res/values-es/strings.xml +++ b/packages/Tethering/res/values-es/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Conexión compartida o punto de acceso activos"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Toca para configurar."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"La conexión compartida está inhabilitada"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Solicita más información a tu administrador"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Estado del punto de acceso y de la conexión compartida"</string> </resources> diff --git a/packages/Tethering/res/values-et/strings.xml b/packages/Tethering/res/values-et/strings.xml index 872c8a74cc59..1ebf7b124d05 100644 --- a/packages/Tethering/res/values-et/strings.xml +++ b/packages/Tethering/res/values-et/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Jagamine või kuumkoht on aktiivne"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Puudutage seadistamiseks."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Jagamine on keelatud"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Lisateabe saamiseks võtke ühendust oma administraatoriga"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Kuumkoha ja jagamise olek"</string> </resources> diff --git a/packages/Tethering/res/values-eu/strings.xml b/packages/Tethering/res/values-eu/strings.xml index 6c4605e616c1..8e39d4789e2c 100644 --- a/packages/Tethering/res/values-eu/strings.xml +++ b/packages/Tethering/res/values-eu/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Konexioa partekatzea edo sare publikoa aktibo"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Sakatu konfiguratzeko."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Desgaituta dago konexioa partekatzeko aukera"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Xehetasunak lortzeko, jarri administratzailearekin harremanetan"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Sare publikoaren eta konexioa partekatzeko eginbidearen egoera"</string> </resources> diff --git a/packages/Tethering/res/values-fa/strings.xml b/packages/Tethering/res/values-fa/strings.xml index bc2ee23609c3..ee722ffbe784 100644 --- a/packages/Tethering/res/values-fa/strings.xml +++ b/packages/Tethering/res/values-fa/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"اشتراکگذاری اینترنت یا نقطه اتصال فعال"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"برای راهاندازی ضربه بزنید."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"اشتراکگذاری اینترنت غیرفعال است"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"برای جزئیات، با سرپرستتان تماس بگیرید"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"وضعیت نقطه اتصال و اشتراکگذاری اینترنت"</string> </resources> diff --git a/packages/Tethering/res/values-fi/strings.xml b/packages/Tethering/res/values-fi/strings.xml index ff0fca6502df..fae2e8e9a217 100644 --- a/packages/Tethering/res/values-fi/strings.xml +++ b/packages/Tethering/res/values-fi/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Yhteyden jakaminen tai hotspot käytössä"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Ota käyttöön napauttamalla."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Yhteyden jakaminen on poistettu käytöstä"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Pyydä lisätietoja järjestelmänvalvojalta"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Hotspotin ja yhteyden jakamisen tila"</string> </resources> diff --git a/packages/Tethering/res/values-fr-rCA/strings.xml b/packages/Tethering/res/values-fr-rCA/strings.xml index 1f5df0ee0cb0..afe5df8c5b3a 100644 --- a/packages/Tethering/res/values-fr-rCA/strings.xml +++ b/packages/Tethering/res/values-fr-rCA/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Partage de connexion ou point d\'accès sans fil activé"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Touchez pour configurer."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Le partage de connexion est désactivé"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Communiquez avec votre administrateur pour obtenir plus de détails"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Point d\'accès et partage de connexion"</string> </resources> diff --git a/packages/Tethering/res/values-fr/strings.xml b/packages/Tethering/res/values-fr/strings.xml index daf7c9d830d5..4d54be124bb1 100644 --- a/packages/Tethering/res/values-fr/strings.xml +++ b/packages/Tethering/res/values-fr/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Partage de connexion ou point d\'accès activé"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Appuyez pour effectuer la configuration."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Le partage de connexion est désactivé"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Pour en savoir plus, contactez votre administrateur"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"État du point d\'accès et du partage de connexion"</string> </resources> diff --git a/packages/Tethering/res/values-gl/strings.xml b/packages/Tethering/res/values-gl/strings.xml index 0d16a1de094f..8f803e9cda88 100644 --- a/packages/Tethering/res/values-gl/strings.xml +++ b/packages/Tethering/res/values-gl/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Conexión compartida ou zona wifi activada"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Toca para configurar."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"A conexión compartida está desactivada"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Contacta co administrador para obter información"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Estado da zona wifi e da conexión compartida"</string> </resources> diff --git a/packages/Tethering/res/values-gu/strings.xml b/packages/Tethering/res/values-gu/strings.xml deleted file mode 100644 index 9d6b02f85fc9..000000000000 --- a/packages/Tethering/res/values-gu/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?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 deleted file mode 100644 index 9c29d9a8f9a1..000000000000 --- a/packages/Tethering/res/values-hi/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?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 index d0d25bb755aa..9727bc9dc4a3 100644 --- a/packages/Tethering/res/values-hr/strings.xml +++ b/packages/Tethering/res/values-hr/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Modemsko povezivanje ili žarišna točka aktivni"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Dodirnite da biste postavili."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Modemsko je povezivanje onemogućeno"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Obratite se administratoru da biste saznali pojedinosti"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Status žarišne točke i modemskog povezivanja"</string> </resources> diff --git a/packages/Tethering/res/values-hu/strings.xml b/packages/Tethering/res/values-hu/strings.xml index 31296599231e..ce4ccbec6c1f 100644 --- a/packages/Tethering/res/values-hu/strings.xml +++ b/packages/Tethering/res/values-hu/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Megosztás vagy aktív hotspot"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Koppintson a beállításhoz."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Az internetmegosztás le van tiltva"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"A részletekért forduljon rendszergazdájához"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Hotspot és internetmegosztás állapota"</string> </resources> diff --git a/packages/Tethering/res/values-hy/strings.xml b/packages/Tethering/res/values-hy/strings.xml index 8ba6435fd58e..b4a68483af78 100644 --- a/packages/Tethering/res/values-hy/strings.xml +++ b/packages/Tethering/res/values-hy/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Մոդեմի ռեժիմը միացված է"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Հպեք՝ կարգավորելու համար։"</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Մոդեմի ռեժիմն անջատված է"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Մանրամասների համար դիմեք ձեր ադմինիստրատորին"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Թեժ կետի և մոդեմի ռեժիմի կարգավիճակը"</string> </resources> diff --git a/packages/Tethering/res/values-in/strings.xml b/packages/Tethering/res/values-in/strings.xml index 1e093ab237e8..6f33685eb912 100644 --- a/packages/Tethering/res/values-in/strings.xml +++ b/packages/Tethering/res/values-in/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Tethering atau hotspot aktif"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Ketuk untuk menyiapkan."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tethering dinonaktifkan"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Hubungi admin untuk mengetahui detailnya"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Status hotspot & tethering"</string> </resources> diff --git a/packages/Tethering/res/values-is/strings.xml b/packages/Tethering/res/values-is/strings.xml index f5769d5344ae..c149818a56c0 100644 --- a/packages/Tethering/res/values-is/strings.xml +++ b/packages/Tethering/res/values-is/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Kveikt á tjóðrun eða aðgangsstað"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Ýttu til að setja upp."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Slökkt er á tjóðrun"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Hafðu samband við kerfisstjórann til að fá upplýsingar"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Staða heits reits og tjóðrunar"</string> </resources> diff --git a/packages/Tethering/res/values-it/strings.xml b/packages/Tethering/res/values-it/strings.xml index e0b3724325fc..09d0c92ce6a5 100644 --- a/packages/Tethering/res/values-it/strings.xml +++ b/packages/Tethering/res/values-it/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Hotspot o tethering attivo"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Tocca per impostare."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tethering disattivato"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Contatta il tuo amministratore per avere informazioni dettagliate"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Stato hotspot e tethering"</string> </resources> diff --git a/packages/Tethering/res/values-iw/strings.xml b/packages/Tethering/res/values-iw/strings.xml index c002c44b2361..101fb514b4cb 100644 --- a/packages/Tethering/res/values-iw/strings.xml +++ b/packages/Tethering/res/values-iw/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"נקודה לשיתוף אינטרנט או שיתוף אינטרנט בין מכשירים: בסטטוס פעיל"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"יש להקיש כדי להגדיר."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"שיתוף האינטרנט בין מכשירים מושבת"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"לפרטים, יש לפנות למנהל המערכת"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"סטטוס של נקודה לשיתוף אינטרנט ושיתוף אינטרנט בין מכשירים"</string> </resources> diff --git a/packages/Tethering/res/values-ja/strings.xml b/packages/Tethering/res/values-ja/strings.xml index 314bde00df02..214780dfa4ce 100644 --- a/packages/Tethering/res/values-ja/strings.xml +++ b/packages/Tethering/res/values-ja/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"テザリングまたはアクセス ポイントが有効です"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"タップしてセットアップします。"</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"テザリングは無効に設定されています"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"詳しくは、管理者にお問い合わせください"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"アクセス ポイントとテザリングのステータス"</string> </resources> diff --git a/packages/Tethering/res/values-ka/strings.xml b/packages/Tethering/res/values-ka/strings.xml index 7bbd81d3435a..68dcecc174ad 100644 --- a/packages/Tethering/res/values-ka/strings.xml +++ b/packages/Tethering/res/values-ka/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"ტეტერინგი ან უსადენო ქსელი აქტიურია"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"შეეხეთ დასაყენებლად."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"ტეტერინგი გათიშულია"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"დამატებითი ინფორმაციისთვის დაუკავშირდით თქვენს ადმინისტრატორს"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"უსადენო ქსელის და ტეტერინგის სტატუსი"</string> </resources> diff --git a/packages/Tethering/res/values-kk/strings.xml b/packages/Tethering/res/values-kk/strings.xml index 7fd87a159657..39de1665456b 100644 --- a/packages/Tethering/res/values-kk/strings.xml +++ b/packages/Tethering/res/values-kk/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Тетеринг немесе хотспот қосулы"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Реттеу үшін түртіңіз."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Тетеринг өшірілді."</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Мәліметтерді әкімшіден алыңыз."</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Хотспот және тетеринг күйі"</string> </resources> diff --git a/packages/Tethering/res/values-km/strings.xml b/packages/Tethering/res/values-km/strings.xml index 2f852246790c..be0f0aa69e0f 100644 --- a/packages/Tethering/res/values-km/strings.xml +++ b/packages/Tethering/res/values-km/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"ការភ្ជាប់ ឬហតស្ប៉តកំពុងដំណើរការ"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"ចុចដើម្បីរៀបចំ។"</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"ការភ្ជាប់ត្រូវបានបិទ"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"ទាក់ទងអ្នកគ្រប់គ្រងរបស់អ្នក ដើម្បីទទួលបានព័ត៌មានលម្អិត"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"ស្ថានភាពការភ្ជាប់ និងហតស្ប៉ត"</string> </resources> diff --git a/packages/Tethering/res/values-kn/strings.xml b/packages/Tethering/res/values-kn/strings.xml deleted file mode 100644 index f11a83ea40ee..000000000000 --- a/packages/Tethering/res/values-kn/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?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 index 57f24f5b1ae2..7ce45a24ef89 100644 --- a/packages/Tethering/res/values-ko/strings.xml +++ b/packages/Tethering/res/values-ko/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"테더링 또는 핫스팟 사용"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"설정하려면 탭하세요."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"테더링이 사용 중지됨"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"자세한 정보는 관리자에게 문의하세요."</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"핫스팟 및 테더링 상태"</string> </resources> diff --git a/packages/Tethering/res/values-ky/strings.xml b/packages/Tethering/res/values-ky/strings.xml index 79854859d41e..9a5088e44edc 100644 --- a/packages/Tethering/res/values-ky/strings.xml +++ b/packages/Tethering/res/values-ky/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Жалгаштыруу же хотспот жандырылган"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Жөндөө үчүн таптап коюңуз."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Жалгаштыруу функциясы өчүрүлгөн"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Кеңири маалымат үчүн администраторуңузга кайрылыңыз"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Хотспот жана байланыш түйүнүүн статусу"</string> </resources> diff --git a/packages/Tethering/res/values-lo/strings.xml b/packages/Tethering/res/values-lo/strings.xml index 78f1585f60f7..738423735624 100644 --- a/packages/Tethering/res/values-lo/strings.xml +++ b/packages/Tethering/res/values-lo/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"ເປີດການປ່ອຍສັນຍານ ຫຼື ຮັອດສະປອດແລ້ວ"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"ແຕະເພື່ອຕັ້ງຄ່າ."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"ການປ່ອຍສັນຍານຖືກປິດໄວ້"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"ຕິດຕໍ່ຜູ້ເບິ່ງແຍງລະບົບສຳລັບລາຍລະອຽດ"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"ສະຖານະຮັອດສະປອດ ແລະ ການປ່ອຍສັນຍານ"</string> </resources> diff --git a/packages/Tethering/res/values-lt/strings.xml b/packages/Tethering/res/values-lt/strings.xml index ebff8ac9d1f1..dc4fdf592d7b 100644 --- a/packages/Tethering/res/values-lt/strings.xml +++ b/packages/Tethering/res/values-lt/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Įrenginys naudojamas kaip modemas arba įjungtas viešosios interneto prieigos taškas"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Palieskite, kad nustatytumėte."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Įrenginio kaip modemo naudojimas išjungtas"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Jei reikia išsamios informacijos, susisiekite su administratoriumi"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Viešosios interneto prieigos taško ir įrenginio kaip modemo naudojimo būsena"</string> </resources> diff --git a/packages/Tethering/res/values-lv/strings.xml b/packages/Tethering/res/values-lv/strings.xml index 54d0048b526a..db0401aa429a 100644 --- a/packages/Tethering/res/values-lv/strings.xml +++ b/packages/Tethering/res/values-lv/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Piesaiste vai tīklājs ir aktīvs."</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Pieskarieties, lai to iestatītu."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Piesaiste ir atspējota"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Lai iegūtu detalizētu informāciju, sazinieties ar savu administratoru."</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Tīklāja un piesaistes statuss"</string> </resources> diff --git a/packages/Tethering/res/values-mk/strings.xml b/packages/Tethering/res/values-mk/strings.xml index 0fab8aa4761f..ad255b620175 100644 --- a/packages/Tethering/res/values-mk/strings.xml +++ b/packages/Tethering/res/values-mk/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Активно е врзување или точка на пристап"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Допрете за поставување."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Врзувањето е оневозможено"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Контактирајте со администраторот за детали"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Статус на точката на пристап и врзувањето"</string> </resources> diff --git a/packages/Tethering/res/values-ml/strings.xml b/packages/Tethering/res/values-ml/strings.xml deleted file mode 100644 index fd7e556e3899..000000000000 --- a/packages/Tethering/res/values-ml/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?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 index 4596577c5d95..ed5b69bb2f59 100644 --- a/packages/Tethering/res/values-mn/strings.xml +++ b/packages/Tethering/res/values-mn/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Модем болгох эсвэл сүлжээний цэг идэвхтэй байна"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Тохируулахын тулд товшино уу."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Модем болгохыг идэвхгүй болгосон"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Дэлгэрэнгүй мэдээлэл авахын тулд админтайгаа холбогдоно уу"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Сүлжээний цэг болон модем болгох төлөв"</string> </resources> diff --git a/packages/Tethering/res/values-mr/strings.xml b/packages/Tethering/res/values-mr/strings.xml deleted file mode 100644 index 85c9ade4feee..000000000000 --- a/packages/Tethering/res/values-mr/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?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 index ec6bdbda08e7..09c5a0e0597b 100644 --- a/packages/Tethering/res/values-ms/strings.xml +++ b/packages/Tethering/res/values-ms/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Penambatan atau tempat liputan aktif"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Ketik untuk membuat persediaan."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Penambatan dilumpuhkan"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Hubungi pentadbir anda untuk mendapatkan maklumat lanjut"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Status tempat liputan & penambatan"</string> </resources> diff --git a/packages/Tethering/res/values-my/strings.xml b/packages/Tethering/res/values-my/strings.xml index 83978b67d433..ff960866002d 100644 --- a/packages/Tethering/res/values-my/strings.xml +++ b/packages/Tethering/res/values-my/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"မိုဘိုင်းဖုန်းသုံး ချိတ်ဆက်မျှဝေခြင်း သို့မဟုတ် ဟော့စပေါ့ ဖွင့်ထားသည်"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"စနစ်ထည့်သွင်းရန် တို့ပါ။"</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"မိုဘိုင်းဖုန်းသုံး ချိတ်ဆက်မျှဝေခြင်းကို ပိတ်ထားသည်"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"အသေးစိတ်အတွက် သင့်စီမံခန့်ခွဲသူကို ဆက်သွယ်ပါ"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"ဟော့စပေါ့နှင့် မိုဘိုင်းဖုန်းသုံး ချိတ်ဆက်မျှဝေခြင်း အခြေအနေ"</string> </resources> diff --git a/packages/Tethering/res/values-nb/strings.xml b/packages/Tethering/res/values-nb/strings.xml index 9abf32dd7bf1..d6e1fee1039b 100644 --- a/packages/Tethering/res/values-nb/strings.xml +++ b/packages/Tethering/res/values-nb/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Internettdeling eller Wi-Fi-sone er aktiv"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Trykk for å konfigurere."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Internettdeling er slått av"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Ta kontakt med administratoren din for å få mer informasjon"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Status for Wi-Fi-sone og internettdeling"</string> </resources> diff --git a/packages/Tethering/res/values-ne/strings.xml b/packages/Tethering/res/values-ne/strings.xml deleted file mode 100644 index c8869298a546..000000000000 --- a/packages/Tethering/res/values-ne/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?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 index 0ec4bff62154..49f8fd6ee726 100644 --- a/packages/Tethering/res/values-nl/strings.xml +++ b/packages/Tethering/res/values-nl/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Tethering of hotspot actief"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Tik om in te stellen."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tethering is uitgeschakeld"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Neem contact op met je beheerder voor meer informatie"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Status van hotspot en tethering"</string> </resources> diff --git a/packages/Tethering/res/values-or/strings.xml b/packages/Tethering/res/values-or/strings.xml deleted file mode 100644 index 457685795a16..000000000000 --- a/packages/Tethering/res/values-or/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?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 deleted file mode 100644 index deddf2ea27f7..000000000000 --- a/packages/Tethering/res/values-pa/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?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 index 48d8468935a1..98cfbbbddbd1 100644 --- a/packages/Tethering/res/values-pl/strings.xml +++ b/packages/Tethering/res/values-pl/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Aktywny tethering lub punkt dostępu"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Kliknij, by skonfigurować"</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tethering został wyłączony"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Aby uzyskać szczegółowe informacje, skontaktuj się z administratorem"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Hotspot i tethering – stan"</string> </resources> diff --git a/packages/Tethering/res/values-pt-rBR/strings.xml b/packages/Tethering/res/values-pt-rBR/strings.xml index 32c22b8713b5..338f8fcc1b6b 100644 --- a/packages/Tethering/res/values-pt-rBR/strings.xml +++ b/packages/Tethering/res/values-pt-rBR/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Ponto de acesso ou tethering ativo"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Toque para configurar."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tethering desativado"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Fale com seu administrador para saber detalhes"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Status de ponto de acesso e tethering"</string> </resources> diff --git a/packages/Tethering/res/values-pt-rPT/strings.xml b/packages/Tethering/res/values-pt-rPT/strings.xml index 641e22f44f25..a06f033f5a90 100644 --- a/packages/Tethering/res/values-pt-rPT/strings.xml +++ b/packages/Tethering/res/values-pt-rPT/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Ligação (à Internet) via telemóvel ou zona Wi-Fi ativos"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Toque para configurar."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"A ligação (à Internet) via telemóvel está desativada."</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Contacte o administrador para obter detalhes."</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Estado da zona Wi-Fi e da ligação (à Internet) via telemóvel"</string> </resources> diff --git a/packages/Tethering/res/values-pt/strings.xml b/packages/Tethering/res/values-pt/strings.xml index 32c22b8713b5..338f8fcc1b6b 100644 --- a/packages/Tethering/res/values-pt/strings.xml +++ b/packages/Tethering/res/values-pt/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Ponto de acesso ou tethering ativo"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Toque para configurar."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tethering desativado"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Fale com seu administrador para saber detalhes"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Status de ponto de acesso e tethering"</string> </resources> diff --git a/packages/Tethering/res/values-ro/strings.xml b/packages/Tethering/res/values-ro/strings.xml index f861f733b4a1..7480ec559efa 100644 --- a/packages/Tethering/res/values-ro/strings.xml +++ b/packages/Tethering/res/values-ro/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Tethering sau hotspot activ"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Atingeți ca să configurați."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tetheringul este dezactivat"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Contactați administratorul pentru detalii"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Starea hotspotului și a tetheringului"</string> </resources> diff --git a/packages/Tethering/res/values-ru/strings.xml b/packages/Tethering/res/values-ru/strings.xml index 027cb410c54c..3153e0b9a00e 100644 --- a/packages/Tethering/res/values-ru/strings.xml +++ b/packages/Tethering/res/values-ru/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Включен режим модема или хот-спот"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Нажмите, чтобы настроить."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Использование телефона в качестве модема запрещено"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Чтобы узнать подробности, обратитесь к администратору."</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Статус хот-спота и режима модема"</string> </resources> diff --git a/packages/Tethering/res/values-si/strings.xml b/packages/Tethering/res/values-si/strings.xml index 7d8599f2c2d9..2b117bc227de 100644 --- a/packages/Tethering/res/values-si/strings.xml +++ b/packages/Tethering/res/values-si/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"ටෙදරින් හෝ හොට්ස්පොට් සක්රීයයි"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"පිහිටුවීමට තට්ටු කරන්න."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"ටෙදරින් අබල කර ඇත"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"විස්තර සඳහා ඔබගේ පරිපාලක අමතන්න"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"හොට්ස්පොට් & ටෙදරින් තත්ත්වය"</string> </resources> diff --git a/packages/Tethering/res/values-sk/strings.xml b/packages/Tethering/res/values-sk/strings.xml index a8fe297c0088..e1db50a41bc2 100644 --- a/packages/Tethering/res/values-sk/strings.xml +++ b/packages/Tethering/res/values-sk/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Tethering alebo prístupový bod je aktívny"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Klepnutím prejdete na nastavenie."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tethering je deaktivovaný"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"O podrobnosti požiadajte svojho správcu"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Stav hotspotu a tetheringu"</string> </resources> diff --git a/packages/Tethering/res/values-sl/strings.xml b/packages/Tethering/res/values-sl/strings.xml index b5e5e3856f7b..bcfe487050ad 100644 --- a/packages/Tethering/res/values-sl/strings.xml +++ b/packages/Tethering/res/values-sl/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Povezava z internetom prek mobilnega telefona ali dostopna točka je aktivna"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Dotaknite se, če želite nastaviti."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Povezava z internetom prek mobilnega telefona je onemogočena"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Za podrobnosti se obrnite na skrbnika"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Stanje dostopne točke in povezave z internetom prek mobilnega telefona"</string> </resources> diff --git a/packages/Tethering/res/values-sq/strings.xml b/packages/Tethering/res/values-sq/strings.xml index fdd4906cc51e..2e5602076823 100644 --- a/packages/Tethering/res/values-sq/strings.xml +++ b/packages/Tethering/res/values-sq/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Ndarja e internetit ose zona e qasjes së internetit është aktive"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Trokit për ta konfiguruar."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Ndarja e internetit është çaktivizuar"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Kontakto me administratorin për detaje"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Statusi i zonës së qasjes dhe ndarjes së internetit"</string> </resources> diff --git a/packages/Tethering/res/values-sr/strings.xml b/packages/Tethering/res/values-sr/strings.xml index 9fab34589724..09c7c16739c7 100644 --- a/packages/Tethering/res/values-sr/strings.xml +++ b/packages/Tethering/res/values-sr/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Привезивање или хотспот је активан"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Додирните да бисте подесили."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Привезивање је онемогућено"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Потражите детаље од администратора"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Статус хотспота и привезивања"</string> </resources> diff --git a/packages/Tethering/res/values-sv/strings.xml b/packages/Tethering/res/values-sv/strings.xml index 10eeb0fe12e1..adb6b8184c08 100644 --- a/packages/Tethering/res/values-sv/strings.xml +++ b/packages/Tethering/res/values-sv/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Internetdelning eller surfzon har aktiverats"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Tryck om du vill konfigurera."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Internetdelning har inaktiverats"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Kontakta administratören om du vill veta mer"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Trådlös surfzon och internetdelning har inaktiverats"</string> </resources> diff --git a/packages/Tethering/res/values-sw/strings.xml b/packages/Tethering/res/values-sw/strings.xml index 335396307730..3f10e47901f2 100644 --- a/packages/Tethering/res/values-sw/strings.xml +++ b/packages/Tethering/res/values-sw/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Kusambaza mtandao au mtandaopepe umewashwa"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Gusa ili uweke mipangilio."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Umezima kipengele cha kusambaza mtandao"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Wasiliana na msimamizi wako ili upate maelezo zaidi"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Mtandaopepe na hali ya kusambaza mtandao"</string> </resources> diff --git a/packages/Tethering/res/values-ta/strings.xml b/packages/Tethering/res/values-ta/strings.xml deleted file mode 100644 index b1e5cc241376..000000000000 --- a/packages/Tethering/res/values-ta/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?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 deleted file mode 100644 index aae40dee40db..000000000000 --- a/packages/Tethering/res/values-te/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?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 index 1b800565ad1f..33a8b0c59278 100644 --- a/packages/Tethering/res/values-th/strings.xml +++ b/packages/Tethering/res/values-th/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"การเชื่อมต่ออินเทอร์เน็ตผ่านมือถือหรือฮอตสปอตทำงานอยู่"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"แตะเพื่อตั้งค่า"</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"ปิดใช้การเชื่อมต่ออินเทอร์เน็ตผ่านมือถือแล้ว"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"ติดต่อผู้ดูแลระบบเพื่อขอรายละเอียด"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"สถานะฮอตสปอตและการเชื่อมต่ออินเทอร์เน็ตผ่านมือถือ"</string> </resources> diff --git a/packages/Tethering/res/values-tl/strings.xml b/packages/Tethering/res/values-tl/strings.xml index 12863f90e15a..0f31daf53ca2 100644 --- a/packages/Tethering/res/values-tl/strings.xml +++ b/packages/Tethering/res/values-tl/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Aktibo ang pag-tether o hotspot"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"I-tap para i-set up."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Naka-disable ang pag-tether"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Makipag-ugnayan sa iyong admin para sa mga detalye"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Status ng hotspot at pag-tether"</string> </resources> diff --git a/packages/Tethering/res/values-tr/strings.xml b/packages/Tethering/res/values-tr/strings.xml index bfcf1ace2cf7..aaa264f04d31 100644 --- a/packages/Tethering/res/values-tr/strings.xml +++ b/packages/Tethering/res/values-tr/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Tethering veya hotspot etkin"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Ayarlamak için dokunun."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Tethering devre dışı bırakıldı"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Ayrıntılı bilgi için yöneticinize başvurun"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Hotspot ve tethering durumu"</string> </resources> diff --git a/packages/Tethering/res/values-uk/strings.xml b/packages/Tethering/res/values-uk/strings.xml index 8e159c072350..875ba84b4e37 100644 --- a/packages/Tethering/res/values-uk/strings.xml +++ b/packages/Tethering/res/values-uk/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Модем чи точка доступу активні"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Натисніть, щоб налаштувати."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Використання телефона як модема вимкнено"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Щоб дізнатися більше, зв\'яжіться з адміністратором"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Статус точки доступу та модема"</string> </resources> diff --git a/packages/Tethering/res/values-ur/strings.xml b/packages/Tethering/res/values-ur/strings.xml deleted file mode 100644 index 89195d4aae29..000000000000 --- a/packages/Tethering/res/values-ur/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?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 index 0ac4d4a7410a..50b39983391b 100644 --- a/packages/Tethering/res/values-uz/strings.xml +++ b/packages/Tethering/res/values-uz/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Modem rejimi yoki hotspot yoniq"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Sozlash uchun bosing."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Modem rejimi faolsizlantirildi"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Tafsilotlari uchun administratoringizga murojaat qiling"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Hotspot va modem rejimi holati"</string> </resources> diff --git a/packages/Tethering/res/values-vi/strings.xml b/packages/Tethering/res/values-vi/strings.xml index 85a4db8aa5da..b6e294221c09 100644 --- a/packages/Tethering/res/values-vi/strings.xml +++ b/packages/Tethering/res/values-vi/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Tính năng chia sẻ kết nối hoặc điểm phát sóng đang hoạt động"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Hãy nhấn để thiết lập."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Đã tắt tính năng chia sẻ kết nối"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Hãy liên hệ với quản trị viên của bạn để biết chi tiết"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"Trạng thái điểm phát sóng và trạng thái chia sẻ kết nối"</string> </resources> diff --git a/packages/Tethering/res/values-zh-rCN/strings.xml b/packages/Tethering/res/values-zh-rCN/strings.xml index ff1fe039531c..55e2f1a76b91 100644 --- a/packages/Tethering/res/values-zh-rCN/strings.xml +++ b/packages/Tethering/res/values-zh-rCN/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"网络共享或热点已启用"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"点按即可设置。"</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"网络共享已停用"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"如需了解详情,请与您的管理员联系"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"热点和网络共享状态"</string> </resources> diff --git a/packages/Tethering/res/values-zh-rHK/strings.xml b/packages/Tethering/res/values-zh-rHK/strings.xml index 0de39fac97f8..5d4c4e86ff7d 100644 --- a/packages/Tethering/res/values-zh-rHK/strings.xml +++ b/packages/Tethering/res/values-zh-rHK/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"網絡共享或熱點已啟用"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"輕按即可設定。"</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"網絡共享已停用"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"請聯絡您的管理員以瞭解詳情"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"熱點和網絡共享狀態"</string> </resources> diff --git a/packages/Tethering/res/values-zh-rTW/strings.xml b/packages/Tethering/res/values-zh-rTW/strings.xml index 9a117bbca43f..a6561a2dfe16 100644 --- a/packages/Tethering/res/values-zh-rTW/strings.xml +++ b/packages/Tethering/res/values-zh-rTW/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"數據連線或無線基地台已啟用"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"輕觸即可進行設定。"</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"數據連線已停用"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"詳情請洽你的管理員"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"無線基地台與數據連線狀態"</string> </resources> diff --git a/packages/Tethering/res/values-zu/strings.xml b/packages/Tethering/res/values-zu/strings.xml index 8fe10d86cb03..aa65c80df5cd 100644 --- a/packages/Tethering/res/values-zu/strings.xml +++ b/packages/Tethering/res/values-zu/strings.xml @@ -1,8 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <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> + <string name="tethered_notification_title" msgid="6426563586025792944">"Ukusebenzisa njengemodemu noma i-hotspot ephathekayo kuvuliwe"</string> + <string name="tethered_notification_message" msgid="64800879503420696">"Thepha ukuze usethe."</string> + <string name="disable_tether_notification_title" msgid="3004509127903564191">"Ukusebenzisa ifoni njengemodemu kukhutshaziwe"</string> + <string name="disable_tether_notification_message" msgid="6717523799293901476">"Xhumana nomphathi wakho ukuze uthole imininingwane"</string> + <string name="notification_channel_tethering_status" msgid="2663463891530932727">"I-Hotspot nesimo sokusebenzisa ifoni njengemodemu"</string> </resources> diff --git a/packages/Tethering/src/android/net/ip/IpServer.java b/packages/Tethering/src/android/net/ip/IpServer.java index 38f8609e217f..6c0c432d46dc 100644 --- a/packages/Tethering/src/android/net/ip/IpServer.java +++ b/packages/Tethering/src/android/net/ip/IpServer.java @@ -24,6 +24,7 @@ import static android.net.util.NetworkConstants.FF; import static android.net.util.NetworkConstants.RFC7421_PREFIX_LENGTH; import static android.net.util.NetworkConstants.asByte; import static android.net.util.TetheringMessageBase.BASE_IPSERVER; +import static android.system.OsConstants.RT_SCOPE_UNIVERSE; import android.net.INetd; import android.net.INetworkStackStatusCallback; @@ -448,7 +449,9 @@ public class IpServer extends StateMachine { final ArrayList<TetheredClient> leases = new ArrayList<>(); for (DhcpLeaseParcelable lease : leaseParcelables) { final LinkAddress address = new LinkAddress( - intToInet4AddressHTH(lease.netAddr), lease.prefixLength); + intToInet4AddressHTH(lease.netAddr), lease.prefixLength, + 0 /* flags */, RT_SCOPE_UNIVERSE /* as per RFC6724#3.2 */, + lease.expTime /* deprecationTime */, lease.expTime /* expirationTime */); final MacAddress macAddress; try { @@ -460,7 +463,7 @@ public class IpServer extends StateMachine { } final TetheredClient.AddressInfo addressInfo = new TetheredClient.AddressInfo( - address, lease.hostname, lease.expTime); + address, lease.hostname); leases.add(new TetheredClient( macAddress, Collections.singletonList(addressInfo), diff --git a/packages/Tethering/src/com/android/server/connectivity/tethering/OffloadController.java b/packages/Tethering/src/com/android/server/connectivity/tethering/OffloadController.java index a402ffa47355..d43c5c682f67 100644 --- a/packages/Tethering/src/com/android/server/connectivity/tethering/OffloadController.java +++ b/packages/Tethering/src/com/android/server/connectivity/tethering/OffloadController.java @@ -39,8 +39,7 @@ import android.net.RouteInfo; import android.net.netlink.ConntrackMessage; import android.net.netlink.NetlinkConstants; import android.net.netlink.NetlinkSocket; -import android.net.netstats.provider.AbstractNetworkStatsProvider; -import android.net.netstats.provider.NetworkStatsProviderCallback; +import android.net.netstats.provider.NetworkStatsProvider; import android.net.util.SharedLog; import android.os.Handler; import android.provider.Settings; @@ -89,8 +88,8 @@ public class OffloadController { private final Handler mHandler; private final OffloadHardwareInterface mHwInterface; private final ContentResolver mContentResolver; - private final @NonNull OffloadTetheringStatsProvider mStatsProvider; - private final @Nullable NetworkStatsProviderCallback mStatsProviderCb; + @Nullable + private final OffloadTetheringStatsProvider mStatsProvider; private final SharedLog mLog; private final HashMap<String, LinkProperties> mDownstreams; private boolean mConfigInitialized; @@ -124,19 +123,18 @@ public class OffloadController { mHandler = h; mHwInterface = hwi; mContentResolver = contentResolver; - mStatsProvider = new OffloadTetheringStatsProvider(); mLog = log.forSubComponent(TAG); mDownstreams = new HashMap<>(); mExemptPrefixes = new HashSet<>(); mLastLocalPrefixStrs = new HashSet<>(); - NetworkStatsProviderCallback providerCallback = null; + OffloadTetheringStatsProvider provider = new OffloadTetheringStatsProvider(); try { - providerCallback = nsm.registerNetworkStatsProvider( - getClass().getSimpleName(), mStatsProvider); + nsm.registerNetworkStatsProvider(getClass().getSimpleName(), provider); } catch (RuntimeException e) { Log.wtf(TAG, "Cannot register offload stats provider: " + e); + provider = null; } - mStatsProviderCb = providerCallback; + mStatsProvider = provider; } /** Start hardware offload. */ @@ -185,7 +183,7 @@ public class OffloadController { // and we need to synchronize stats and limits between // software and hardware forwarding. updateStatsForAllUpstreams(); - mStatsProvider.pushTetherStats(); + if (mStatsProvider != null) mStatsProvider.pushTetherStats(); } @Override @@ -198,7 +196,7 @@ public class OffloadController { // limits set take into account any software tethering // traffic that has been happening in the meantime. updateStatsForAllUpstreams(); - mStatsProvider.pushTetherStats(); + if (mStatsProvider != null) mStatsProvider.pushTetherStats(); // [2] (Re)Push all state. computeAndPushLocalPrefixes(UpdateType.FORCE); pushAllDownstreamState(); @@ -217,10 +215,12 @@ public class OffloadController { // TODO: rev the HAL so that it provides an interface name. updateStatsForCurrentUpstream(); - mStatsProvider.pushTetherStats(); - // Push stats to service does not cause the service react to it immediately. - // Inform the service about limit reached. - if (mStatsProviderCb != null) mStatsProviderCb.onLimitReached(); + if (mStatsProvider != null) { + mStatsProvider.pushTetherStats(); + // Push stats to service does not cause the service react to it + // immediately. Inform the service about limit reached. + mStatsProvider.notifyLimitReached(); + } } @Override @@ -263,13 +263,17 @@ public class OffloadController { } @VisibleForTesting - class OffloadTetheringStatsProvider extends AbstractNetworkStatsProvider { + class OffloadTetheringStatsProvider extends NetworkStatsProvider { // These stats must only ever be touched on the handler thread. @NonNull private NetworkStats mIfaceStats = new NetworkStats(0L, 0); @NonNull private NetworkStats mUidStats = new NetworkStats(0L, 0); + /** + * A helper function that collect tether stats from local hashmap. Note that this does not + * invoke binder call. + */ @VisibleForTesting @NonNull NetworkStats getTetherStats(@NonNull StatsType how) { @@ -287,7 +291,7 @@ public class OffloadController { } @Override - public void setLimit(String iface, long quotaBytes) { + public void onSetLimit(String iface, long quotaBytes) { // Listen for all iface is necessary since upstream might be changed after limit // is set. mHandler.post(() -> { @@ -315,13 +319,12 @@ public class OffloadController { */ public void pushTetherStats() { // TODO: remove the accumulated stats and report the diff from HAL directly. - if (null == mStatsProviderCb) return; final NetworkStats ifaceDiff = getTetherStats(StatsType.STATS_PER_IFACE).subtract(mIfaceStats); final NetworkStats uidDiff = getTetherStats(StatsType.STATS_PER_UID).subtract(mUidStats); try { - mStatsProviderCb.onStatsUpdated(0 /* token */, ifaceDiff, uidDiff); + notifyStatsUpdated(0 /* token */, ifaceDiff, uidDiff); mIfaceStats = mIfaceStats.add(ifaceDiff); mUidStats = mUidStats.add(uidDiff); } catch (RuntimeException e) { @@ -330,7 +333,7 @@ public class OffloadController { } @Override - public void requestStatsUpdate(int token) { + public void onRequestStatsUpdate(int token) { // Do not attempt to update stats by querying the offload HAL // synchronously from a different thread than the Handler thread. http://b/64771555. mHandler.post(() -> { @@ -340,7 +343,7 @@ public class OffloadController { } @Override - public void setAlert(long quotaBytes) { + public void onSetAlert(long quotaBytes) { // TODO: Ask offload HAL to notify alert without stopping traffic. } } diff --git a/packages/Tethering/tests/unit/src/android/net/TetheredClientTest.kt b/packages/Tethering/tests/unit/src/android/net/TetheredClientTest.kt index d85389aeb625..a20a0dfd9c89 100644 --- a/packages/Tethering/tests/unit/src/android/net/TetheredClientTest.kt +++ b/packages/Tethering/tests/unit/src/android/net/TetheredClientTest.kt @@ -20,6 +20,7 @@ import android.net.InetAddresses.parseNumericAddress import android.net.TetheredClient.AddressInfo import android.net.TetheringManager.TETHERING_BLUETOOTH import android.net.TetheringManager.TETHERING_USB +import android.system.OsConstants.RT_SCOPE_UNIVERSE import androidx.test.filters.SmallTest import androidx.test.runner.AndroidJUnit4 import com.android.testutils.assertParcelSane @@ -30,11 +31,19 @@ import kotlin.test.assertNotEquals private val TEST_MACADDR = MacAddress.fromBytes(byteArrayOf(12, 23, 34, 45, 56, 67)) private val TEST_OTHER_MACADDR = MacAddress.fromBytes(byteArrayOf(23, 34, 45, 56, 67, 78)) -private val TEST_ADDR1 = LinkAddress(parseNumericAddress("192.168.113.3"), 24) -private val TEST_ADDR2 = LinkAddress(parseNumericAddress("fe80::1:2:3"), 64) +private val TEST_ADDR1 = makeLinkAddress("192.168.113.3", prefixLength = 24, expTime = 123L) +private val TEST_ADDR2 = makeLinkAddress("fe80::1:2:3", prefixLength = 64, expTime = 456L) private val TEST_ADDRINFO1 = AddressInfo(TEST_ADDR1, "test_hostname") private val TEST_ADDRINFO2 = AddressInfo(TEST_ADDR2, null) +private fun makeLinkAddress(addr: String, prefixLength: Int, expTime: Long) = LinkAddress( + parseNumericAddress(addr), + prefixLength, + 0 /* flags */, + RT_SCOPE_UNIVERSE, + expTime /* deprecationTime */, + expTime /* expirationTime */) + @RunWith(AndroidJUnit4::class) @SmallTest class TetheredClientTest { diff --git a/packages/Tethering/tests/unit/src/com/android/server/connectivity/tethering/ConnectedClientsTrackerTest.kt b/packages/Tethering/tests/unit/src/com/android/server/connectivity/tethering/ConnectedClientsTrackerTest.kt index 56f3e21cbffe..1cdc3bbb9933 100644 --- a/packages/Tethering/tests/unit/src/com/android/server/connectivity/tethering/ConnectedClientsTrackerTest.kt +++ b/packages/Tethering/tests/unit/src/com/android/server/connectivity/tethering/ConnectedClientsTrackerTest.kt @@ -46,23 +46,28 @@ class ConnectedClientsTrackerTest { private val client1Addr = MacAddress.fromString("01:23:45:67:89:0A") private val client1 = TetheredClient(client1Addr, listOf( - AddressInfo(LinkAddress("192.168.43.44/32"), null /* hostname */, clock.time + 20)), + makeAddrInfo("192.168.43.44/32", null /* hostname */, clock.time + 20)), TETHERING_WIFI) private val wifiClient1 = makeWifiClient(client1Addr) private val client2Addr = MacAddress.fromString("02:34:56:78:90:AB") - private val client2Exp30AddrInfo = AddressInfo( - LinkAddress("192.168.43.45/32"), "my_hostname", clock.time + 30) + private val client2Exp30AddrInfo = makeAddrInfo( + "192.168.43.45/32", "my_hostname", clock.time + 30) private val client2 = TetheredClient(client2Addr, listOf( client2Exp30AddrInfo, - AddressInfo(LinkAddress("2001:db8:12::34/72"), "other_hostname", clock.time + 10)), + makeAddrInfo("2001:db8:12::34/72", "other_hostname", clock.time + 10)), TETHERING_WIFI) private val wifiClient2 = makeWifiClient(client2Addr) private val client3Addr = MacAddress.fromString("03:45:67:89:0A:BC") private val client3 = TetheredClient(client3Addr, - listOf(AddressInfo(LinkAddress("2001:db8:34::34/72"), "other_other_hostname", - clock.time + 10)), + listOf(makeAddrInfo("2001:db8:34::34/72", "other_other_hostname", clock.time + 10)), TETHERING_USB) + private fun makeAddrInfo(addr: String, hostname: String?, expTime: Long) = + LinkAddress(addr).let { + AddressInfo(LinkAddress(it.address, it.prefixLength, it.flags, it.scope, + expTime /* deprecationTime */, expTime /* expirationTime */), hostname) + } + @Test fun testUpdateConnectedClients() { doReturn(emptyList<TetheredClient>()).`when`(server1).allLeases diff --git a/packages/Tethering/tests/unit/src/com/android/server/connectivity/tethering/OffloadControllerTest.java b/packages/Tethering/tests/unit/src/com/android/server/connectivity/tethering/OffloadControllerTest.java index 7e62e5aca993..1d100e63215b 100644 --- a/packages/Tethering/tests/unit/src/com/android/server/connectivity/tethering/OffloadControllerTest.java +++ b/packages/Tethering/tests/unit/src/com/android/server/connectivity/tethering/OffloadControllerTest.java @@ -33,6 +33,8 @@ import static com.android.testutils.MiscAssertsKt.assertContainsAll; import static com.android.testutils.MiscAssertsKt.assertThrows; import static com.android.testutils.NetworkStatsUtilsKt.orderInsensitiveEquals; +import static junit.framework.Assert.assertNotNull; + import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.anyInt; @@ -61,8 +63,7 @@ import android.net.LinkProperties; import android.net.NetworkStats; import android.net.NetworkStats.Entry; import android.net.RouteInfo; -import android.net.netstats.provider.AbstractNetworkStatsProvider; -import android.net.netstats.provider.NetworkStatsProviderCallback; +import android.net.netstats.provider.INetworkStatsProviderCallback; import android.net.util.SharedLog; import android.os.Handler; import android.os.Looper; @@ -108,12 +109,10 @@ public class OffloadControllerTest { @Mock private ApplicationInfo mApplicationInfo; @Mock private Context mContext; @Mock private NetworkStatsManager mStatsManager; - @Mock private NetworkStatsProviderCallback mTetherStatsProviderCb; + @Mock private INetworkStatsProviderCallback mTetherStatsProviderCb; + private OffloadController.OffloadTetheringStatsProvider mTetherStatsProvider; private final ArgumentCaptor<ArrayList> mStringArrayCaptor = ArgumentCaptor.forClass(ArrayList.class); - private final ArgumentCaptor<OffloadController.OffloadTetheringStatsProvider> - mTetherStatsProviderCaptor = - ArgumentCaptor.forClass(OffloadController.OffloadTetheringStatsProvider.class); private final ArgumentCaptor<OffloadHardwareInterface.ControlCallback> mControlCallbackCaptor = ArgumentCaptor.forClass(OffloadHardwareInterface.ControlCallback.class); private MockContentResolver mContentResolver; @@ -126,8 +125,6 @@ public class OffloadControllerTest { mContentResolver.addProvider(Settings.AUTHORITY, new FakeSettingsProvider()); when(mContext.getContentResolver()).thenReturn(mContentResolver); FakeSettingsProvider.clearSettingsProvider(); - when(mStatsManager.registerNetworkStatsProvider(anyString(), any())) - .thenReturn(mTetherStatsProviderCb); } @After public void tearDown() throws Exception { @@ -154,8 +151,14 @@ public class OffloadControllerTest { private OffloadController makeOffloadController() throws Exception { OffloadController offload = new OffloadController(new Handler(Looper.getMainLooper()), mHardware, mContentResolver, mStatsManager, new SharedLog("test")); + final ArgumentCaptor<OffloadController.OffloadTetheringStatsProvider> + tetherStatsProviderCaptor = + ArgumentCaptor.forClass(OffloadController.OffloadTetheringStatsProvider.class); verify(mStatsManager).registerNetworkStatsProvider(anyString(), - mTetherStatsProviderCaptor.capture()); + tetherStatsProviderCaptor.capture()); + mTetherStatsProvider = tetherStatsProviderCaptor.getValue(); + assertNotNull(mTetherStatsProvider); + mTetherStatsProvider.setProviderCallbackBinder(mTetherStatsProviderCb); return offload; } @@ -413,9 +416,6 @@ public class OffloadControllerTest { final OffloadController offload = makeOffloadController(); offload.start(); - final OffloadController.OffloadTetheringStatsProvider provider = - mTetherStatsProviderCaptor.getValue(); - final String ethernetIface = "eth1"; final String mobileIface = "rmnet_data0"; @@ -443,8 +443,8 @@ public class OffloadControllerTest { inOrder.verify(mHardware, times(1)).getForwardedStats(eq(mobileIface)); // Verify that the fetched stats are stored. - final NetworkStats ifaceStats = provider.getTetherStats(STATS_PER_IFACE); - final NetworkStats uidStats = provider.getTetherStats(STATS_PER_UID); + final NetworkStats ifaceStats = mTetherStatsProvider.getTetherStats(STATS_PER_IFACE); + final NetworkStats uidStats = mTetherStatsProvider.getTetherStats(STATS_PER_UID); final NetworkStats expectedIfaceStats = new NetworkStats(0L, 2) .addValues(buildTestEntry(STATS_PER_IFACE, mobileIface, 999, 99999)) .addValues(buildTestEntry(STATS_PER_IFACE, ethernetIface, 12345, 54321)); @@ -462,13 +462,12 @@ public class OffloadControllerTest { NetworkStats.class); // Force pushing stats update to verify the stats reported. - provider.pushTetherStats(); - verify(mTetherStatsProviderCb, times(1)).onStatsUpdated(anyInt(), - ifaceStatsCaptor.capture(), uidStatsCaptor.capture()); + mTetherStatsProvider.pushTetherStats(); + verify(mTetherStatsProviderCb, times(1)) + .notifyStatsUpdated(anyInt(), ifaceStatsCaptor.capture(), uidStatsCaptor.capture()); assertTrue(orderInsensitiveEquals(expectedIfaceStats, ifaceStatsCaptor.getValue())); assertTrue(orderInsensitiveEquals(expectedUidStats, uidStatsCaptor.getValue())); - when(mHardware.getForwardedStats(eq(ethernetIface))).thenReturn( new ForwardedStats(100000, 100000)); offload.setUpstreamLinkProperties(null); @@ -483,8 +482,8 @@ public class OffloadControllerTest { inOrder.verifyNoMoreInteractions(); // Verify that the stored stats is accumulated. - final NetworkStats ifaceStatsAccu = provider.getTetherStats(STATS_PER_IFACE); - final NetworkStats uidStatsAccu = provider.getTetherStats(STATS_PER_UID); + final NetworkStats ifaceStatsAccu = mTetherStatsProvider.getTetherStats(STATS_PER_IFACE); + final NetworkStats uidStatsAccu = mTetherStatsProvider.getTetherStats(STATS_PER_UID); final NetworkStats expectedIfaceStatsAccu = new NetworkStats(0L, 2) .addValues(buildTestEntry(STATS_PER_IFACE, mobileIface, 999, 99999)) .addValues(buildTestEntry(STATS_PER_IFACE, ethernetIface, 112345, 154321)); @@ -498,7 +497,7 @@ public class OffloadControllerTest { // Verify that only diff of stats is reported. reset(mTetherStatsProviderCb); - provider.pushTetherStats(); + mTetherStatsProvider.pushTetherStats(); final NetworkStats expectedIfaceStatsDiff = new NetworkStats(0L, 2) .addValues(buildTestEntry(STATS_PER_IFACE, mobileIface, 0, 0)) .addValues(buildTestEntry(STATS_PER_IFACE, ethernetIface, 100000, 100000)); @@ -506,8 +505,8 @@ public class OffloadControllerTest { final NetworkStats expectedUidStatsDiff = new NetworkStats(0L, 2) .addValues(buildTestEntry(STATS_PER_UID, mobileIface, 0, 0)) .addValues(buildTestEntry(STATS_PER_UID, ethernetIface, 100000, 100000)); - verify(mTetherStatsProviderCb, times(1)).onStatsUpdated(anyInt(), - ifaceStatsCaptor.capture(), uidStatsCaptor.capture()); + verify(mTetherStatsProviderCb, times(1)) + .notifyStatsUpdated(anyInt(), ifaceStatsCaptor.capture(), uidStatsCaptor.capture()); assertTrue(orderInsensitiveEquals(expectedIfaceStatsDiff, ifaceStatsCaptor.getValue())); assertTrue(orderInsensitiveEquals(expectedUidStatsDiff, uidStatsCaptor.getValue())); } @@ -529,19 +528,18 @@ public class OffloadControllerTest { lp.setInterfaceName(ethernetIface); offload.setUpstreamLinkProperties(lp); - AbstractNetworkStatsProvider provider = mTetherStatsProviderCaptor.getValue(); final InOrder inOrder = inOrder(mHardware); when(mHardware.setUpstreamParameters(any(), any(), any(), any())).thenReturn(true); when(mHardware.setDataLimit(anyString(), anyLong())).thenReturn(true); // Applying an interface quota to the current upstream immediately sends it to the hardware. - provider.setLimit(ethernetIface, ethernetLimit); + mTetherStatsProvider.onSetLimit(ethernetIface, ethernetLimit); waitForIdle(); inOrder.verify(mHardware).setDataLimit(ethernetIface, ethernetLimit); inOrder.verifyNoMoreInteractions(); // Applying an interface quota to another upstream does not take any immediate action. - provider.setLimit(mobileIface, mobileLimit); + mTetherStatsProvider.onSetLimit(mobileIface, mobileLimit); waitForIdle(); inOrder.verify(mHardware, never()).setDataLimit(anyString(), anyLong()); @@ -554,7 +552,7 @@ public class OffloadControllerTest { // Setting a limit of ITetheringStatsProvider.QUOTA_UNLIMITED causes the limit to be set // to Long.MAX_VALUE. - provider.setLimit(mobileIface, ITetheringStatsProvider.QUOTA_UNLIMITED); + mTetherStatsProvider.onSetLimit(mobileIface, ITetheringStatsProvider.QUOTA_UNLIMITED); waitForIdle(); inOrder.verify(mHardware).setDataLimit(mobileIface, Long.MAX_VALUE); @@ -562,7 +560,7 @@ public class OffloadControllerTest { when(mHardware.setUpstreamParameters(any(), any(), any(), any())).thenReturn(false); lp.setInterfaceName(ethernetIface); offload.setUpstreamLinkProperties(lp); - provider.setLimit(mobileIface, mobileLimit); + mTetherStatsProvider.onSetLimit(mobileIface, mobileLimit); waitForIdle(); inOrder.verify(mHardware, never()).setDataLimit(anyString(), anyLong()); @@ -571,7 +569,7 @@ public class OffloadControllerTest { when(mHardware.setDataLimit(anyString(), anyLong())).thenReturn(false); lp.setInterfaceName(mobileIface); offload.setUpstreamLinkProperties(lp); - provider.setLimit(mobileIface, mobileLimit); + mTetherStatsProvider.onSetLimit(mobileIface, mobileLimit); waitForIdle(); inOrder.verify(mHardware).getForwardedStats(ethernetIface); inOrder.verify(mHardware).stopOffloadControl(); @@ -587,7 +585,7 @@ public class OffloadControllerTest { OffloadHardwareInterface.ControlCallback callback = mControlCallbackCaptor.getValue(); callback.onStoppedLimitReached(); - verify(mTetherStatsProviderCb, times(1)).onStatsUpdated(anyInt(), any(), any()); + verify(mTetherStatsProviderCb, times(1)).notifyStatsUpdated(anyInt(), any(), any()); } @Test @@ -691,7 +689,7 @@ public class OffloadControllerTest { verify(mHardware, times(1)).getForwardedStats(eq(RMNET0)); verify(mHardware, times(1)).getForwardedStats(eq(WLAN0)); // TODO: verify the exact stats reported. - verify(mTetherStatsProviderCb, times(1)).onStatsUpdated(anyInt(), any(), any()); + verify(mTetherStatsProviderCb, times(1)).notifyStatsUpdated(anyInt(), any(), any()); verifyNoMoreInteractions(mTetherStatsProviderCb); verifyNoMoreInteractions(mHardware); } @@ -756,7 +754,7 @@ public class OffloadControllerTest { // Verify forwarded stats behaviour. verify(mHardware, times(1)).getForwardedStats(eq(RMNET0)); verify(mHardware, times(1)).getForwardedStats(eq(WLAN0)); - verify(mTetherStatsProviderCb, times(1)).onStatsUpdated(anyInt(), any(), any()); + verify(mTetherStatsProviderCb, times(1)).notifyStatsUpdated(anyInt(), any(), any()); verifyNoMoreInteractions(mTetherStatsProviderCb); // TODO: verify local prefixes and downstreams are also pushed to the HAL. diff --git a/services/Android.bp b/services/Android.bp index 5019bb173cd5..8ebad4efc1b5 100644 --- a/services/Android.bp +++ b/services/Android.bp @@ -72,7 +72,7 @@ java_library { libs: [ "android.hidl.manager-V1.0-java", - "framework-tethering-stubs", + "framework-tethering-stubs-module_libs_api", ], plugins: [ diff --git a/services/core/Android.bp b/services/core/Android.bp index 123c5d5622cd..3fcec2fad060 100644 --- a/services/core/Android.bp +++ b/services/core/Android.bp @@ -29,7 +29,7 @@ java_library_static { "android.hardware.tv.cec-V1.0-java", "android.hardware.vibrator-java", "app-compat-annotations", - "framework-tethering-stubs", + "framework-tethering-stubs-module_libs_api", "ike-stubs", ], diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index fae14fe707e0..13a988ca72cc 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -275,9 +275,6 @@ public class ConnectivityService extends IConnectivityManager.Stub // connect anyway?" dialog after the user selects a network that doesn't validate. private static final int PROMPT_UNVALIDATED_DELAY_MS = 8 * 1000; - // How long to dismiss network notification. - private static final int TIMEOUT_NOTIFICATION_DELAY_MS = 20 * 1000; - // Default to 30s linger time-out. Modifiable only for testing. private static final String LINGER_DELAY_PROPERTY = "persist.netmon.linger"; private static final int DEFAULT_LINGER_DELAY_MS = 30_000; @@ -525,18 +522,13 @@ public class ConnectivityService extends IConnectivityManager.Stub private static final int EVENT_PROVISIONING_NOTIFICATION = 43; /** - * This event can handle dismissing notification by given network id. - */ - private static final int EVENT_TIMEOUT_NOTIFICATION = 44; - - /** * Used to specify whether a network should be used even if connectivity is partial. * arg1 = whether to accept the network if its connectivity is partial (1 for true or 0 for * false) * arg2 = whether to remember this choice in the future (1 for true or 0 for false) * obj = network */ - private static final int EVENT_SET_ACCEPT_PARTIAL_CONNECTIVITY = 45; + private static final int EVENT_SET_ACCEPT_PARTIAL_CONNECTIVITY = 44; /** * Event for NetworkMonitor to inform ConnectivityService that the probe status has changed. @@ -545,7 +537,7 @@ public class ConnectivityService extends IConnectivityManager.Stub * arg1 = A bitmask to describe which probes are completed. * arg2 = A bitmask to describe which probes are successful. */ - public static final int EVENT_PROBE_STATUS_CHANGED = 46; + public static final int EVENT_PROBE_STATUS_CHANGED = 45; /** * Event for NetworkMonitor to inform ConnectivityService that captive portal data has changed. @@ -553,7 +545,7 @@ public class ConnectivityService extends IConnectivityManager.Stub * arg2 = netId * obj = captive portal data */ - private static final int EVENT_CAPPORT_DATA_CHANGED = 47; + private static final int EVENT_CAPPORT_DATA_CHANGED = 46; /** * Argument for {@link #EVENT_PROVISIONING_NOTIFICATION} to indicate that the notification @@ -1720,7 +1712,7 @@ public class ConnectivityService extends IConnectivityManager.Stub } if (checkSettingsPermission(callerPid, callerUid)) { - return lp.makeSensitiveFieldsParcelingCopy(); + return new LinkProperties(lp, true /* parcelSensitiveFields */); } final LinkProperties newLp = new LinkProperties(lp); @@ -2870,13 +2862,6 @@ public class ConnectivityService extends IConnectivityManager.Stub final boolean valid = ((testResult & NETWORK_VALIDATION_RESULT_VALID) != 0); final boolean wasValidated = nai.lastValidated; final boolean wasDefault = isDefaultNetwork(nai); - // Only show a connected notification if the network is pending validation - // after the captive portal app was open, and it has now validated. - if (nai.captivePortalValidationPending && valid) { - // User is now logged in, network validated. - nai.captivePortalValidationPending = false; - showNetworkNotification(nai, NotificationType.LOGGED_IN); - } if (DBG) { final String logMsg = !TextUtils.isEmpty(redirectUrl) @@ -3757,12 +3742,6 @@ public class ConnectivityService extends IConnectivityManager.Stub new CaptivePortal(new CaptivePortalImpl(network).asBinder())); appIntent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT | Intent.FLAG_ACTIVITY_NEW_TASK); - // This runs on a random binder thread, but getNetworkAgentInfoForNetwork is thread-safe, - // and captivePortalValidationPending is volatile. - final NetworkAgentInfo nai = getNetworkAgentInfoForNetwork(network); - if (nai != null) { - nai.captivePortalValidationPending = true; - } Binder.withCleanCallingIdentity(() -> mContext.startActivityAsUser(appIntent, UserHandle.CURRENT)); } @@ -3881,14 +3860,6 @@ public class ConnectivityService extends IConnectivityManager.Stub final String action; final boolean highPriority; switch (type) { - case LOGGED_IN: - action = Settings.ACTION_WIFI_SETTINGS; - mHandler.removeMessages(EVENT_TIMEOUT_NOTIFICATION); - mHandler.sendMessageDelayed(mHandler.obtainMessage(EVENT_TIMEOUT_NOTIFICATION, - nai.network.netId, 0), TIMEOUT_NOTIFICATION_DELAY_MS); - // High priority because it is a direct result of the user logging in to a portal. - highPriority = true; - break; case NO_INTERNET: action = ConnectivityManager.ACTION_PROMPT_UNVALIDATED; // High priority because it is only displayed for explicitly selected networks. @@ -3916,7 +3887,7 @@ public class ConnectivityService extends IConnectivityManager.Stub } Intent intent = new Intent(action); - if (type != NotificationType.LOGGED_IN && type != NotificationType.PRIVATE_DNS_BROKEN) { + if (type != NotificationType.PRIVATE_DNS_BROKEN) { intent.setData(Uri.fromParts("netId", Integer.toString(nai.network.netId), null)); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setClassName("com.android.settings", @@ -4132,9 +4103,6 @@ public class ConnectivityService extends IConnectivityManager.Stub case EVENT_DATA_SAVER_CHANGED: handleRestrictBackgroundChanged(toBool(msg.arg1)); break; - case EVENT_TIMEOUT_NOTIFICATION: - mNotifier.clearNotification(msg.arg1, NotificationType.LOGGED_IN); - break; } } } @@ -7917,8 +7885,15 @@ public class ConnectivityService extends IConnectivityManager.Stub return true; } - if (!mLocationPermissionChecker.checkLocationPermission( - callbackPackageName, null /* featureId */, callbackUid, null /* message */)) { + // LocationPermissionChecker#checkLocationPermission can throw SecurityException if the uid + // and package name don't match. Throwing on the CS thread is not acceptable, so wrap the + // call in a try-catch. + try { + if (!mLocationPermissionChecker.checkLocationPermission( + callbackPackageName, null /* featureId */, callbackUid, null /* message */)) { + return false; + } + } catch (SecurityException e) { return false; } diff --git a/services/core/java/com/android/server/TestNetworkService.java b/services/core/java/com/android/server/TestNetworkService.java index 95ac900d0535..f772a4a5a300 100644 --- a/services/core/java/com/android/server/TestNetworkService.java +++ b/services/core/java/com/android/server/TestNetworkService.java @@ -16,8 +16,6 @@ package com.android.server; -import static com.android.internal.util.Preconditions.checkNotNull; - import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; @@ -55,6 +53,8 @@ import java.net.InterfaceAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.util.ArrayList; +import java.util.List; +import java.util.Objects; import java.util.concurrent.atomic.AtomicInteger; /** @hide */ @@ -82,9 +82,9 @@ class TestNetworkService extends ITestNetworkManager.Stub { mHandlerThread.start(); mHandler = new Handler(mHandlerThread.getLooper()); - mContext = checkNotNull(context, "missing Context"); - mNMS = checkNotNull(netManager, "missing INetworkManagementService"); - mNetd = checkNotNull(NetdService.getInstance(), "could not get netd instance"); + mContext = Objects.requireNonNull(context, "missing Context"); + mNMS = Objects.requireNonNull(netManager, "missing INetworkManagementService"); + mNetd = Objects.requireNonNull(NetdService.getInstance(), "could not get netd instance"); } /** @@ -96,7 +96,7 @@ class TestNetworkService extends ITestNetworkManager.Stub { private TestNetworkInterface createInterface(boolean isTun, LinkAddress[] linkAddrs) { enforceTestNetworkPermissions(mContext); - checkNotNull(linkAddrs, "missing linkAddrs"); + Objects.requireNonNull(linkAddrs, "missing linkAddrs"); String ifacePrefix = isTun ? TEST_TUN_PREFIX : TEST_TAP_PREFIX; String iface = ifacePrefix + sTestTunIndex.getAndIncrement(); @@ -231,10 +231,11 @@ class TestNetworkService extends ITestNetworkManager.Stub { @Nullable LinkProperties lp, boolean isMetered, int callingUid, + @NonNull int[] administratorUids, @NonNull IBinder binder) throws RemoteException, SocketException { - checkNotNull(looper, "missing Looper"); - checkNotNull(context, "missing Context"); + Objects.requireNonNull(looper, "missing Looper"); + Objects.requireNonNull(context, "missing Context"); // iface and binder validity checked by caller // Build network info with special testing type @@ -249,6 +250,7 @@ class TestNetworkService extends ITestNetworkManager.Stub { nc.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_SUSPENDED); nc.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED); nc.setNetworkSpecifier(new StringNetworkSpecifier(iface)); + nc.setAdministratorUids(intArrayToList(administratorUids)); if (!isMetered) { nc.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED); } @@ -267,7 +269,7 @@ class TestNetworkService extends ITestNetworkManager.Stub { // Find the currently assigned addresses, and add them to LinkProperties boolean allowIPv4 = false, allowIPv6 = false; NetworkInterface netIntf = NetworkInterface.getByName(iface); - checkNotNull(netIntf, "No such network interface found: " + netIntf); + Objects.requireNonNull(netIntf, "No such network interface found: " + netIntf); for (InterfaceAddress intfAddr : netIntf.getInterfaceAddresses()) { lp.addLinkAddress( @@ -291,6 +293,14 @@ class TestNetworkService extends ITestNetworkManager.Stub { return new TestNetworkAgent(looper, context, ni, nc, lp, callingUid, binder); } + private List<Integer> intArrayToList(@NonNull int[] array) { + final List<Integer> list = new ArrayList<>(array.length); + for (final int i : array) { + list.add(i); + } + return list; + } + /** * Sets up a Network with extremely limited privileges, guarded by the MANAGE_TEST_NETWORKS * permission. @@ -302,11 +312,12 @@ class TestNetworkService extends ITestNetworkManager.Stub { @NonNull String iface, @Nullable LinkProperties lp, boolean isMetered, + @NonNull int[] administratorUids, @NonNull IBinder binder) { enforceTestNetworkPermissions(mContext); - checkNotNull(iface, "missing Iface"); - checkNotNull(binder, "missing IBinder"); + Objects.requireNonNull(iface, "missing Iface"); + Objects.requireNonNull(binder, "missing IBinder"); if (!(iface.startsWith(INetd.IPSEC_INTERFACE_PREFIX) || iface.startsWith(TEST_TUN_PREFIX))) { @@ -336,6 +347,7 @@ class TestNetworkService extends ITestNetworkManager.Stub { lp, isMetered, callingUid, + administratorUids, binder); mTestNetworkTracker.put(agent.getNetwork().netId, agent); diff --git a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java index 23b954c03cf3..2f047157d4aa 100644 --- a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java +++ b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java @@ -160,10 +160,6 @@ public class NetworkAgentInfo implements Comparable<NetworkAgentInfo> { // Whether a captive portal was found during the last network validation attempt. public boolean lastCaptivePortalDetected; - // Indicates the captive portal app was opened to show a login UI to the user, but the network - // has not validated yet. - public volatile boolean captivePortalValidationPending; - // Set to true when partial connectivity was detected. public boolean partialConnectivity; @@ -638,7 +634,6 @@ public class NetworkAgentInfo implements Comparable<NetworkAgentInfo> { + "acceptUnvalidated{" + networkAgentConfig.acceptUnvalidated + "} " + "everCaptivePortalDetected{" + everCaptivePortalDetected + "} " + "lastCaptivePortalDetected{" + lastCaptivePortalDetected + "} " - + "captivePortalValidationPending{" + captivePortalValidationPending + "} " + "partialConnectivity{" + partialConnectivity + "} " + "acceptPartialConnectivity{" + networkAgentConfig.acceptPartialConnectivity + "} " + "clat{" + clatd + "} " diff --git a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java index 25c761ab80ec..0925de8f9577 100644 --- a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java +++ b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java @@ -51,7 +51,6 @@ public class NetworkNotificationManager { LOST_INTERNET(SystemMessage.NOTE_NETWORK_LOST_INTERNET), NETWORK_SWITCH(SystemMessage.NOTE_NETWORK_SWITCH), NO_INTERNET(SystemMessage.NOTE_NETWORK_NO_INTERNET), - LOGGED_IN(SystemMessage.NOTE_NETWORK_LOGGED_IN), PARTIAL_CONNECTIVITY(SystemMessage.NOTE_NETWORK_PARTIAL_CONNECTIVITY), SIGN_IN(SystemMessage.NOTE_NETWORK_SIGN_IN), PRIVATE_DNS_BROKEN(SystemMessage.NOTE_NETWORK_PRIVATE_DNS_BROKEN); @@ -114,14 +113,10 @@ public class NetworkNotificationManager { } } - private static int getIcon(int transportType, NotificationType notifyType) { - if (transportType != TRANSPORT_WIFI) { - return R.drawable.stat_notify_rssi_in_range; - } - - return notifyType == NotificationType.LOGGED_IN - ? R.drawable.ic_wifi_signal_4 - : R.drawable.stat_notify_wifi_in_range; // TODO: Distinguish ! from ?. + private static int getIcon(int transportType) { + return (transportType == TRANSPORT_WIFI) + ? R.drawable.stat_notify_wifi_in_range : // TODO: Distinguish ! from ?. + R.drawable.stat_notify_rssi_in_range; } /** @@ -185,7 +180,7 @@ public class NetworkNotificationManager { Resources r = mContext.getResources(); final CharSequence title; final CharSequence details; - int icon = getIcon(transportType, notifyType); + int icon = getIcon(transportType); if (notifyType == NotificationType.NO_INTERNET && transportType == TRANSPORT_WIFI) { title = r.getString(R.string.wifi_no_internet, WifiInfo.sanitizeSsid(nai.networkCapabilities.getSSID())); @@ -235,9 +230,6 @@ public class NetworkNotificationManager { details = r.getString(R.string.network_available_sign_in_detailed, name); break; } - } else if (notifyType == NotificationType.LOGGED_IN) { - title = WifiInfo.sanitizeSsid(nai.networkCapabilities.getSSID()); - details = r.getString(R.string.captive_portal_logged_in_detailed); } else if (notifyType == NotificationType.NETWORK_SWITCH) { String fromTransport = getTransportName(transportType); String toTransport = getTransportName(approximateTransportType(switchToNai)); @@ -379,7 +371,6 @@ public class NetworkNotificationManager { case NETWORK_SWITCH: return 2; case LOST_INTERNET: - case LOGGED_IN: return 1; default: return 0; diff --git a/services/core/java/com/android/server/inputmethod/OWNERS b/services/core/java/com/android/server/inputmethod/OWNERS new file mode 100644 index 000000000000..25ef9facb216 --- /dev/null +++ b/services/core/java/com/android/server/inputmethod/OWNERS @@ -0,0 +1,6 @@ +set noparent + +ogunwale@google.com +yukawa@google.com +tarandeep@google.com +lumark@google.com diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerInternal.java b/services/core/java/com/android/server/net/NetworkPolicyManagerInternal.java index 563dcf7e1156..48f1ddb023fd 100644 --- a/services/core/java/com/android/server/net/NetworkPolicyManagerInternal.java +++ b/services/core/java/com/android/server/net/NetworkPolicyManagerInternal.java @@ -21,7 +21,7 @@ import static com.android.server.net.NetworkPolicyManagerService.isUidNetworking import android.annotation.NonNull; import android.net.Network; import android.net.NetworkTemplate; -import android.net.netstats.provider.AbstractNetworkStatsProvider; +import android.net.netstats.provider.NetworkStatsProvider; import android.telephony.SubscriptionPlan; import java.util.Set; @@ -130,8 +130,8 @@ public abstract class NetworkPolicyManagerInternal { Set<String> packageNames, int userId); /** - * Notifies that the specified {@link AbstractNetworkStatsProvider} has reached its quota - * which was set through {@link AbstractNetworkStatsProvider#setLimit(String, long)}. + * Notifies that the specified {@link NetworkStatsProvider} has reached its quota + * which was set through {@link NetworkStatsProvider#onSetLimit(String, long)}. * * @param tag the human readable identifier of the custom network stats provider. */ diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java index 10cf250acb14..a2a4e91aa9fe 100644 --- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java +++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java @@ -75,7 +75,7 @@ import static android.net.NetworkTemplate.MATCH_MOBILE; import static android.net.NetworkTemplate.MATCH_WIFI; import static android.net.NetworkTemplate.buildTemplateMobileAll; import static android.net.TrafficStats.MB_IN_BYTES; -import static android.net.netstats.provider.AbstractNetworkStatsProvider.QUOTA_UNLIMITED; +import static android.net.netstats.provider.NetworkStatsProvider.QUOTA_UNLIMITED; import static android.os.Trace.TRACE_TAG_NETWORK; import static android.provider.Settings.Global.NETPOLICY_OVERRIDE_ENABLED; import static android.provider.Settings.Global.NETPOLICY_QUOTA_ENABLED; diff --git a/services/core/java/com/android/server/net/NetworkStatsFactory.java b/services/core/java/com/android/server/net/NetworkStatsFactory.java index 22b01bee6c6a..75ffe35674d1 100644 --- a/services/core/java/com/android/server/net/NetworkStatsFactory.java +++ b/services/core/java/com/android/server/net/NetworkStatsFactory.java @@ -229,7 +229,7 @@ public class NetworkStatsFactory { entry.txPackets += reader.nextLong(); } - stats.addEntry(entry); + stats.insertEntry(entry); reader.finishLine(); } } catch (NullPointerException|NumberFormatException e) { @@ -279,7 +279,7 @@ public class NetworkStatsFactory { entry.txBytes = reader.nextLong(); entry.txPackets = reader.nextLong(); - stats.addEntry(entry); + stats.insertEntry(entry); reader.finishLine(); } } catch (NullPointerException|NumberFormatException e) { @@ -439,7 +439,7 @@ public class NetworkStatsFactory { if ((limitIfaces == null || ArrayUtils.contains(limitIfaces, entry.iface)) && (limitUid == UID_ALL || limitUid == entry.uid) && (limitTag == TAG_ALL || limitTag == entry.tag)) { - stats.addEntry(entry); + stats.insertEntry(entry); } reader.finishLine(); diff --git a/services/core/java/com/android/server/net/NetworkStatsService.java b/services/core/java/com/android/server/net/NetworkStatsService.java index 66e691a79f97..88fc0a6b11f7 100644 --- a/services/core/java/com/android/server/net/NetworkStatsService.java +++ b/services/core/java/com/android/server/net/NetworkStatsService.java @@ -17,12 +17,14 @@ package com.android.server.net; import static android.Manifest.permission.ACCESS_NETWORK_STATE; +import static android.Manifest.permission.NETWORK_STATS_PROVIDER; import static android.Manifest.permission.READ_NETWORK_USAGE_HISTORY; import static android.Manifest.permission.UPDATE_DEVICE_STATS; import static android.content.Intent.ACTION_SHUTDOWN; import static android.content.Intent.ACTION_UID_REMOVED; import static android.content.Intent.ACTION_USER_REMOVED; import static android.content.Intent.EXTRA_UID; +import static android.content.pm.PackageManager.PERMISSION_GRANTED; import static android.net.ConnectivityManager.ACTION_TETHER_STATE_CHANGED; import static android.net.ConnectivityManager.isNetworkTypeMobile; import static android.net.NetworkStack.checkNetworkStackPermission; @@ -101,7 +103,7 @@ import android.net.NetworkTemplate; import android.net.TrafficStats; import android.net.netstats.provider.INetworkStatsProvider; import android.net.netstats.provider.INetworkStatsProviderCallback; -import android.net.netstats.provider.NetworkStatsProviderCallback; +import android.net.netstats.provider.NetworkStatsProvider; import android.os.BestClock; import android.os.Binder; import android.os.DropBoxManager; @@ -556,7 +558,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub { } catch (RemoteException e) { // ignored; service lives in system_server } - invokeForAllStatsProviderCallbacks((cb) -> cb.mProvider.setAlert(mGlobalAlertBytes)); + invokeForAllStatsProviderCallbacks((cb) -> cb.mProvider.onSetAlert(mGlobalAlertBytes)); } @Override @@ -757,7 +759,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub { final NetworkStatsHistory.Entry entry = history.getValues(start, end, now, null); final NetworkStats stats = new NetworkStats(end - start, 1); - stats.addEntry(new NetworkStats.Entry(IFACE_ALL, UID_ALL, SET_ALL, TAG_NONE, + stats.insertEntry(new NetworkStats.Entry(IFACE_ALL, UID_ALL, SET_ALL, TAG_NONE, METERED_ALL, ROAMING_ALL, DEFAULT_NETWORK_ALL, entry.rxBytes, entry.rxPackets, entry.txBytes, entry.txPackets, entry.operations)); return stats; @@ -1374,7 +1376,8 @@ public class NetworkStatsService extends INetworkStatsService.Stub { Trace.traceBegin(TRACE_TAG_NETWORK, "provider.requestStatsUpdate"); final int registeredCallbackCount = mStatsProviderCbList.getRegisteredCallbackCount(); mStatsProviderSem.drainPermits(); - invokeForAllStatsProviderCallbacks((cb) -> cb.mProvider.requestStatsUpdate(0 /* unused */)); + invokeForAllStatsProviderCallbacks( + (cb) -> cb.mProvider.onRequestStatsUpdate(0 /* unused */)); try { mStatsProviderSem.tryAcquire(registeredCallbackCount, MAX_STATS_PROVIDER_POLL_WAIT_TIME_MS, TimeUnit.MILLISECONDS); @@ -1549,7 +1552,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub { @Override public void setStatsProviderLimitAsync(@NonNull String iface, long quota) { Slog.v(TAG, "setStatsProviderLimitAsync(" + iface + "," + quota + ")"); - invokeForAllStatsProviderCallbacks((cb) -> cb.mProvider.setLimit(iface, quota)); + invokeForAllStatsProviderCallbacks((cb) -> cb.mProvider.onSetLimit(iface, quota)); } } @@ -1793,6 +1796,24 @@ public class NetworkStatsService extends INetworkStatsService.Stub { } } + // TODO: It is copied from ConnectivityService, consider refactor these check permission + // functions to a proper util. + 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) + "."); + } + } + /** * Registers a custom provider of {@link android.net.NetworkStats} to combine the network * statistics that cannot be seen by the kernel to system. To unregister, invoke the @@ -1800,16 +1821,15 @@ public class NetworkStatsService extends INetworkStatsService.Stub { * * @param tag a human readable identifier of the custom network stats provider. * @param provider the {@link INetworkStatsProvider} binder corresponding to the - * {@link android.net.netstats.provider.AbstractNetworkStatsProvider} to be - * registered. + * {@link NetworkStatsProvider} to be registered. * - * @return a binder interface of - * {@link android.net.netstats.provider.NetworkStatsProviderCallback}, which can be - * used to report events to the system. + * @return a {@link INetworkStatsProviderCallback} binder + * interface, which can be used to report events to the system. */ public @NonNull INetworkStatsProviderCallback registerNetworkStatsProvider( @NonNull String tag, @NonNull INetworkStatsProvider provider) { - mContext.enforceCallingOrSelfPermission(UPDATE_DEVICE_STATS, TAG); + enforceAnyPermissionOf(NETWORK_STATS_PROVIDER, + NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK); Objects.requireNonNull(provider, "provider is null"); Objects.requireNonNull(tag, "tag is null"); try { @@ -1910,7 +1930,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub { } @Override - public void onStatsUpdated(int token, @Nullable NetworkStats ifaceStats, + public void notifyStatsUpdated(int token, @Nullable NetworkStats ifaceStats, @Nullable NetworkStats uidStats) { // TODO: 1. Use token to map ifaces to correct NetworkIdentity. // 2. Store the difference and store it directly to the recorder. @@ -1922,12 +1942,12 @@ public class NetworkStatsService extends INetworkStatsService.Stub { } @Override - public void onAlertReached() throws RemoteException { + public void notifyAlertReached() throws RemoteException { mAlertObserver.limitReached(LIMIT_GLOBAL_ALERT, null /* unused */); } @Override - public void onLimitReached() { + public void notifyLimitReached() { Log.d(TAG, mTag + ": onLimitReached"); LocalServices.getService(NetworkPolicyManagerInternal.class) .onStatsProviderLimitReached(mTag); diff --git a/services/core/java/com/android/server/pm/StagingManager.java b/services/core/java/com/android/server/pm/StagingManager.java index 8cc66b20f84d..1a55521cfa8b 100644 --- a/services/core/java/com/android/server/pm/StagingManager.java +++ b/services/core/java/com/android/server/pm/StagingManager.java @@ -39,6 +39,8 @@ import android.content.rollback.IRollbackManager; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; +import android.os.Looper; +import android.os.Message; import android.os.ParcelFileDescriptor; import android.os.ParcelableException; import android.os.PowerManager; @@ -59,6 +61,7 @@ import java.util.Arrays; import java.util.List; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; +import java.util.function.Consumer; import java.util.function.Predicate; import java.util.stream.Collectors; @@ -73,7 +76,7 @@ public class StagingManager { private final PackageInstallerService mPi; private final ApexManager mApexManager; private final PowerManager mPowerManager; - private final Handler mBgHandler; + private final PreRebootVerificationHandler mPreRebootVerificationHandler; @GuardedBy("mStagedSessions") private final SparseArray<PackageInstallerSession> mStagedSessions = new SparseArray<>(); @@ -82,7 +85,8 @@ public class StagingManager { mPi = pi; mApexManager = am; mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); - mBgHandler = BackgroundThread.getHandler(); + mPreRebootVerificationHandler = new PreRebootVerificationHandler( + BackgroundThread.get().getLooper()); } private void updateStoredSession(@NonNull PackageInstallerSession sessionInfo) { @@ -151,6 +155,14 @@ public class StagingManager { return; } + // Verify signing details for downgrade + // Allow downgrading from B to A iff it is possible to upgrade from A to B + if (existingApexPkg.getLongVersionCode() > newApexPkg.getLongVersionCode() + && existingSigningDetails.checkCapability(signingDetails, + PackageParser.SigningDetails.CertCapabilities.INSTALLED_DATA)) { + return; + } + throw new PackageManagerException(SessionInfo.STAGED_SESSION_VERIFICATION_FAILED, "APK-container signature of APEX package " + packageName + " with version " + newApexPkg.versionCodeMajor + " and path " + apexPath + " is not" @@ -242,75 +254,6 @@ public class StagingManager { return (session.params.installFlags & PackageManager.INSTALL_APEX) != 0; } - private void preRebootVerification(@NonNull PackageInstallerSession session) { - Slog.d(TAG, "Starting preRebootVerification for session " + session.sessionId); - final boolean hasApex = sessionContainsApex(session); - // APEX checks. For single-package sessions, check if they contain an APEX. For - // multi-package sessions, find all the child sessions that contain an APEX. - if (hasApex) { - try { - final List<PackageInfo> apexPackages = submitSessionToApexService(session); - for (PackageInfo apexPackage : apexPackages) { - validateApexSignature(apexPackage, session.params.installFlags); - } - } catch (PackageManagerException e) { - session.setStagedSessionFailed(e.error, e.getMessage()); - return; - } - } - - if (sessionContainsApk(session)) { - try { - Slog.d(TAG, "Running a pre-reboot verification for APKs in session " - + session.sessionId + " by performing a dry-run install"); - installApksInSession(session, /* preReboot */ true); - // TODO(b/118865310): abort the session on apexd. - } catch (PackageManagerException e) { - session.setStagedSessionFailed(e.error, e.getMessage()); - return; - } - } - - if ((session.params.installFlags & PackageManager.INSTALL_ENABLE_ROLLBACK) != 0) { - // If rollback is enabled for this session, we call through to the RollbackManager - // with the list of sessions it must enable rollback for. Note that notifyStagedSession - // is a synchronous operation. - final IRollbackManager rm = IRollbackManager.Stub.asInterface( - ServiceManager.getService(Context.ROLLBACK_SERVICE)); - try { - // NOTE: To stay consistent with the non-staged install flow, we don't fail the - // entire install if rollbacks can't be enabled. - if (!rm.notifyStagedSession(session.sessionId)) { - Slog.e(TAG, "Unable to enable rollback for session: " + session.sessionId); - } - } catch (RemoteException re) { - // Cannot happen, the rollback manager is in the same process. - } - } - - // Proactively mark session as ready before calling apexd. Although this call order looks - // counter-intuitive, this is the easiest way to ensure that session won't end up in the - // inconsistent state: - // - If device gets rebooted right before call to apexd, then apexd will never activate - // apex files of this staged session. This will result in StagingManager failing the - // session. - // On the other hand, if the order of the calls was inverted (first call apexd, then mark - // session as ready), then if a device gets rebooted right after the call to apexd, only - // apex part of the train will be applied, leaving device in an inconsistent state. - Slog.d(TAG, "Marking session " + session.sessionId + " as ready"); - session.setStagedSessionReady(); - if (!hasApex) { - // Session doesn't contain apex, nothing to do. - return; - } - try { - mApexManager.markStagedSessionReady(session.sessionId); - } catch (PackageManagerException e) { - session.setStagedSessionFailed(e.error, e.getMessage()); - } - } - - private boolean sessionContains(@NonNull PackageInstallerSession session, Predicate<PackageInstallerSession> filter) { if (!session.isMultiPackage()) { @@ -359,7 +302,7 @@ public class StagingManager { // Greedily re-trigger the pre-reboot verification. Slog.d(TAG, "Found pending staged session " + session.sessionId + " still to be " + "verified, resuming pre-reboot verification"); - mBgHandler.post(() -> preRebootVerification(session)); + mPreRebootVerificationHandler.startPreRebootVerification(session.sessionId); return; } if (!apexSessionInfo.isActivated && !apexSessionInfo.isSuccess) { @@ -468,34 +411,53 @@ public class StagingManager { } private void commitApkSession(@NonNull PackageInstallerSession apkSession, - int originalSessionId, boolean preReboot) throws PackageManagerException { + PackageInstallerSession originalSession, boolean preReboot) + throws PackageManagerException { final int errorCode = preReboot ? SessionInfo.STAGED_SESSION_VERIFICATION_FAILED : SessionInfo.STAGED_SESSION_ACTIVATION_FAILED; - if (!preReboot) { - if ((apkSession.params.installFlags & PackageManager.INSTALL_ENABLE_ROLLBACK) != 0) { - // If rollback is available for this session, notify the rollback - // manager of the apk session so it can properly enable rollback. - final IRollbackManager rm = IRollbackManager.Stub.asInterface( - ServiceManager.getService(Context.ROLLBACK_SERVICE)); - try { - rm.notifyStagedApkSession(originalSessionId, apkSession.sessionId); - } catch (RemoteException re) { - // Cannot happen, the rollback manager is in the same process. - } + if (preReboot) { + final LocalIntentReceiverAsync receiver = new LocalIntentReceiverAsync( + (Intent result) -> { + int status = result.getIntExtra(PackageInstaller.EXTRA_STATUS, + PackageInstaller.STATUS_FAILURE); + if (status != PackageInstaller.STATUS_SUCCESS) { + final String errorMessage = result.getStringExtra( + PackageInstaller.EXTRA_STATUS_MESSAGE); + Slog.e(TAG, "Failure to install APK staged session " + + originalSession.sessionId + " [" + errorMessage + "]"); + originalSession.setStagedSessionFailed(errorCode, errorMessage); + return; + } + mPreRebootVerificationHandler.notifyPreRebootVerification_Apk_Complete( + originalSession.sessionId); + }); + apkSession.commit(receiver.getIntentSender(), false); + return; + } + + if ((apkSession.params.installFlags & PackageManager.INSTALL_ENABLE_ROLLBACK) != 0) { + // If rollback is available for this session, notify the rollback + // manager of the apk session so it can properly enable rollback. + final IRollbackManager rm = IRollbackManager.Stub.asInterface( + ServiceManager.getService(Context.ROLLBACK_SERVICE)); + try { + rm.notifyStagedApkSession(originalSession.sessionId, apkSession.sessionId); + } catch (RemoteException re) { + Slog.e(TAG, "Failed to notifyStagedApkSession for session: " + + originalSession.sessionId, re); } } - final LocalIntentReceiver receiver = new LocalIntentReceiver(); + final LocalIntentReceiverSync receiver = new LocalIntentReceiverSync(); apkSession.commit(receiver.getIntentSender(), false); final Intent result = receiver.getResult(); final int status = result.getIntExtra(PackageInstaller.EXTRA_STATUS, PackageInstaller.STATUS_FAILURE); if (status != PackageInstaller.STATUS_SUCCESS) { - final String errorMessage = result.getStringExtra( PackageInstaller.EXTRA_STATUS_MESSAGE); - Slog.e(TAG, "Failure to install APK staged session " + originalSessionId + " [" - + errorMessage + "]"); + Slog.e(TAG, "Failure to install APK staged session " + + originalSession.sessionId + " [" + errorMessage + "]"); throw new PackageManagerException(errorCode, errorMessage); } } @@ -507,7 +469,7 @@ public class StagingManager { if (!session.isMultiPackage() && !isApexSession(session)) { // APK single-packaged staged session. Do a regular install. PackageInstallerSession apkSession = createAndWriteApkSession(session, preReboot); - commitApkSession(apkSession, session.sessionId, preReboot); + commitApkSession(apkSession, session, preReboot); } else if (session.isMultiPackage()) { // For multi-package staged sessions containing APKs, we identify which child sessions // contain an APK, and with those then create a new multi-package group of sessions, @@ -557,14 +519,14 @@ public class StagingManager { "Failed to add a child session " + apkChildSession.sessionId); } } - commitApkSession(apkParentSession, session.sessionId, preReboot); + commitApkSession(apkParentSession, session, preReboot); } // APEX single-package staged session, nothing to do. } void commitSession(@NonNull PackageInstallerSession session) { updateStoredSession(session); - mBgHandler.post(() -> preRebootVerification(session)); + mPreRebootVerificationHandler.startPreRebootVerification(session.sessionId); } @Nullable @@ -691,7 +653,7 @@ public class StagingManager { if (!session.isStagedSessionReady()) { // The framework got restarted before the pre-reboot verification could complete, // restart the verification. - mBgHandler.post(() -> preRebootVerification(session)); + mPreRebootVerificationHandler.startPreRebootVerification(session.sessionId); } else { // Session had already being marked ready. Start the checks to verify if there is any // follow-up work. @@ -699,14 +661,34 @@ public class StagingManager { } } - private static class LocalIntentReceiver { + private static class LocalIntentReceiverAsync { + final Consumer<Intent> mConsumer; + + LocalIntentReceiverAsync(Consumer<Intent> consumer) { + mConsumer = consumer; + } + + private IIntentSender.Stub mLocalSender = new IIntentSender.Stub() { + @Override + public void send(int code, Intent intent, String resolvedType, IBinder whitelistToken, + IIntentReceiver finishedReceiver, String requiredPermission, Bundle options) { + mConsumer.accept(intent); + } + }; + + public IntentSender getIntentSender() { + return new IntentSender((IIntentSender) mLocalSender); + } + } + + private static class LocalIntentReceiverSync { private final LinkedBlockingQueue<Intent> mResult = new LinkedBlockingQueue<>(); private IIntentSender.Stub mLocalSender = new IIntentSender.Stub() { @Override public void send(int code, Intent intent, String resolvedType, IBinder whitelistToken, - IIntentReceiver finishedReceiver, String requiredPermission, - Bundle options) { + IIntentReceiver finishedReceiver, String requiredPermission, + Bundle options) { try { mResult.offer(intent, 5, TimeUnit.SECONDS); } catch (InterruptedException e) { @@ -727,4 +709,189 @@ public class StagingManager { } } } + + private final class PreRebootVerificationHandler extends Handler { + + PreRebootVerificationHandler(Looper looper) { + super(looper); + } + + /** + * Handler for states of pre reboot verification. The states are arranged linearly (shown + * below) with each state either calling the next state, or calling some other method that + * eventually calls the next state. + * + * <p><ul> + * <li>MSG_PRE_REBOOT_VERIFICATION_START</li> + * <li>MSG_PRE_REBOOT_VERIFICATION_APEX</li> + * <li>MSG_PRE_REBOOT_VERIFICATION_APK</li> + * <li>MSG_PRE_REBOOT_VERIFICATION_END</li> + * </ul></p> + * + * Details about each of state can be found in corresponding handler of node. + */ + private static final int MSG_PRE_REBOOT_VERIFICATION_START = 1; + private static final int MSG_PRE_REBOOT_VERIFICATION_APEX = 2; + private static final int MSG_PRE_REBOOT_VERIFICATION_APK = 3; + private static final int MSG_PRE_REBOOT_VERIFICATION_END = 4; + + @Override + public void handleMessage(Message msg) { + final int sessionId = msg.arg1; + final PackageInstallerSession session; + synchronized (mStagedSessions) { + session = mStagedSessions.get(sessionId); + } + // Maybe session was aborted before pre-reboot verification was complete + if (session == null) { + Slog.d(TAG, "Stopping pre-reboot verification for sessionId: " + sessionId); + return; + } + switch (msg.what) { + case MSG_PRE_REBOOT_VERIFICATION_START: + handlePreRebootVerification_Start(session); + break; + case MSG_PRE_REBOOT_VERIFICATION_APEX: + handlePreRebootVerification_Apex(session); + break; + case MSG_PRE_REBOOT_VERIFICATION_APK: + handlePreRebootVerification_Apk(session); + break; + case MSG_PRE_REBOOT_VERIFICATION_END: + handlePreRebootVerification_End(session); + break; + } + } + + // Method for starting the pre-reboot verification + private void startPreRebootVerification(int sessionId) { + obtainMessage(MSG_PRE_REBOOT_VERIFICATION_START, sessionId, 0).sendToTarget(); + } + + private void notifyPreRebootVerification_Start_Complete(int sessionId) { + obtainMessage(MSG_PRE_REBOOT_VERIFICATION_APEX, sessionId, 0).sendToTarget(); + } + + private void notifyPreRebootVerification_Apex_Complete(int sessionId) { + obtainMessage(MSG_PRE_REBOOT_VERIFICATION_APK, sessionId, 0).sendToTarget(); + } + + private void notifyPreRebootVerification_Apk_Complete(int sessionId) { + obtainMessage(MSG_PRE_REBOOT_VERIFICATION_END, sessionId, 0).sendToTarget(); + } + + /** + * A dummy state for starting the pre reboot verification. + * + * See {@link PreRebootVerificationHandler} to see all nodes of pre reboot verification + */ + private void handlePreRebootVerification_Start(@NonNull PackageInstallerSession session) { + Slog.d(TAG, "Starting preRebootVerification for session " + session.sessionId); + notifyPreRebootVerification_Start_Complete(session.sessionId); + } + + /** + * Pre-reboot verification state for apex files: + * + * <p><ul> + * <li>submits session to apex service</li> + * <li>validates signatures of apex files</li> + * </ul></p> + */ + private void handlePreRebootVerification_Apex(@NonNull PackageInstallerSession session) { + final boolean hasApex = sessionContainsApex(session); + + // APEX checks. For single-package sessions, check if they contain an APEX. For + // multi-package sessions, find all the child sessions that contain an APEX. + if (hasApex) { + try { + final List<PackageInfo> apexPackages = + submitSessionToApexService(session); + for (PackageInfo apexPackage : apexPackages) { + validateApexSignature( + apexPackage, session.params.installFlags); + } + } catch (PackageManagerException e) { + session.setStagedSessionFailed(e.error, e.getMessage()); + return; + } + } + + notifyPreRebootVerification_Apex_Complete(session.sessionId); + } + + /** + * Pre-reboot verification state for apk files: + * <p><ul> + * <li>performs a dry-run install of apk</li> + * </ul></p> + */ + private void handlePreRebootVerification_Apk(@NonNull PackageInstallerSession session) { + if (!sessionContainsApk(session)) { + notifyPreRebootVerification_Apk_Complete(session.sessionId); + return; + } + + try { + Slog.d(TAG, "Running a pre-reboot verification for APKs in session " + + session.sessionId + " by performing a dry-run install"); + + // installApksInSession will notify the handler when APK verification is complete + installApksInSession(session, /* preReboot */ true); + // TODO(b/118865310): abort the session on apexd. + } catch (PackageManagerException e) { + session.setStagedSessionFailed(e.error, e.getMessage()); + } + } + + /** + * Pre-reboot verification state for wrapping up: + * <p><ul> + * <li>enables rollback if required</li> + * <li>marks session as ready</li> + * </ul></p> + */ + private void handlePreRebootVerification_End(@NonNull PackageInstallerSession session) { + if ((session.params.installFlags & PackageManager.INSTALL_ENABLE_ROLLBACK) != 0) { + // If rollback is enabled for this session, we call through to the RollbackManager + // with the list of sessions it must enable rollback for. Note that + // notifyStagedSession is a synchronous operation. + final IRollbackManager rm = IRollbackManager.Stub.asInterface( + ServiceManager.getService(Context.ROLLBACK_SERVICE)); + try { + // NOTE: To stay consistent with the non-staged install flow, we don't fail the + // entire install if rollbacks can't be enabled. + if (!rm.notifyStagedSession(session.sessionId)) { + Slog.e(TAG, "Unable to enable rollback for session: " + + session.sessionId); + } + } catch (RemoteException re) { + Slog.e(TAG, "Failed to notifyStagedSession for session: " + + session.sessionId, re); + } + } + + // Proactively mark session as ready before calling apexd. Although this call order + // looks counter-intuitive, this is the easiest way to ensure that session won't end up + // in the inconsistent state: + // - If device gets rebooted right before call to apexd, then apexd will never activate + // apex files of this staged session. This will result in StagingManager failing + // the session. + // On the other hand, if the order of the calls was inverted (first call apexd, then + // mark session as ready), then if a device gets rebooted right after the call to apexd, + // only apex part of the train will be applied, leaving device in an inconsistent state. + Slog.d(TAG, "Marking session " + session.sessionId + " as ready"); + session.setStagedSessionReady(); + final boolean hasApex = sessionContainsApex(session); + if (!hasApex) { + // Session doesn't contain apex, nothing to do. + return; + } + try { + mApexManager.markStagedSessionReady(session.sessionId); + } catch (PackageManagerException e) { + session.setStagedSessionFailed(e.error, e.getMessage()); + } + } + } } diff --git a/services/core/java/com/android/server/role/OWNERS b/services/core/java/com/android/server/role/OWNERS new file mode 100644 index 000000000000..b94d98827d71 --- /dev/null +++ b/services/core/java/com/android/server/role/OWNERS @@ -0,0 +1,6 @@ +svetoslavganov@google.com +moltmann@google.com +zhanghai@google.com +evanseverson@google.com +eugenesusla@google.com +ntmyren@google.com diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 03f64fca5591..cc8d2585ff6e 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -78,6 +78,7 @@ import static android.app.admin.DevicePolicyManager.WIPE_EXTERNAL_STORAGE; import static android.app.admin.DevicePolicyManager.WIPE_RESET_PROTECTION_DATA; import static android.app.admin.DevicePolicyManager.WIPE_SILENTLY; import static android.content.pm.PackageManager.MATCH_UNINSTALLED_PACKAGES; +import static android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK; import static android.provider.Settings.Global.PRIVATE_DNS_MODE; import static android.provider.Settings.Global.PRIVATE_DNS_SPECIFIER; import static android.provider.Telephony.Carriers.DPC_URI; @@ -133,10 +134,6 @@ import android.app.admin.StartInstallingUpdateCallback; import android.app.admin.SystemUpdateInfo; 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; @@ -1957,14 +1954,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { return mContext.getSystemService(AlarmManager.class); } - TimeDetector getTimeDetector() { - return mContext.getSystemService(TimeDetector.class); - } - - TimeZoneDetector getTimeZoneDetector() { - return mContext.getSystemService(TimeZoneDetector.class); - } - ConnectivityManager getConnectivityManager() { return mContext.getSystemService(ConnectivityManager.class); } @@ -5558,6 +5547,14 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { } } + private void enforceNetworkStackOrProfileOrDeviceOwner(ComponentName who) { + if (mContext.checkCallingPermission(PERMISSION_MAINLINE_NETWORK_STACK) + == PackageManager.PERMISSION_GRANTED) { + return; + } + enforceProfileOrDeviceOwner(who); + } + @Override public boolean approveCaCert(String alias, int userId, boolean approval) { enforceManageUsers(); @@ -6485,7 +6482,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { @Override public boolean isAlwaysOnVpnLockdownEnabled(ComponentName admin) throws SecurityException { - enforceProfileOrDeviceOwner(admin); + enforceNetworkStackOrProfileOrDeviceOwner(admin); final int userId = mInjector.userHandleGetCallingUserId(); final long token = mInjector.binderClearCallingIdentity(); @@ -10878,10 +10875,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { if (mInjector.settingsGlobalGetInt(Global.AUTO_TIME, 0) == 1) { return false; } - ManualTimeSuggestion manualTimeSuggestion = TimeDetector.createManualTimeSuggestion( - millis, "DevicePolicyManagerService: setTime"); - mInjector.binderWithCleanCallingIdentity( - () -> mInjector.getTimeDetector().suggestManualTime(manualTimeSuggestion)); + mInjector.binderWithCleanCallingIdentity(() -> mInjector.getAlarmManager().setTime(millis)); return true; } @@ -10893,11 +10887,8 @@ 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.getTimeZoneDetector().suggestManualTimeZone(manualTimeZoneSuggestion)); + mInjector.getAlarmManager().setTimeZone(timeZone)); return true; } diff --git a/services/net/Android.bp b/services/net/Android.bp index dbc2df8369f8..c54102fb1d3d 100644 --- a/services/net/Android.bp +++ b/services/net/Android.bp @@ -20,6 +20,44 @@ java_library_static { ], } +// Version of services.net for usage by the wifi mainline module. +// Note: This is compiled against module_current. +// TODO(b/145825329): This should be moved to networkstack-client, +// with dependencies moved to frameworks/libs/net right. +java_library { + name: "services.net-module-wifi", + srcs: [ + ":framework-services-net-module-wifi-shared-srcs", + ":net-module-utils-srcs", + "java/android/net/ip/IpClientCallbacks.java", + "java/android/net/ip/IpClientManager.java", + "java/android/net/ip/IpClientUtil.java", + "java/android/net/util/KeepalivePacketDataUtil.java", + "java/android/net/util/NetworkConstants.java", + "java/android/net/IpMemoryStore.java", + "java/android/net/NetworkMonitorManager.java", + "java/android/net/TcpKeepalivePacketData.java", + ], + sdk_version: "module_current", + libs: [ + "unsupportedappusage", + ], + static_libs: [ + "dnsresolver_aidl_interface-V2-java", + "netd_aidl_interface-unstable-java", + "netlink-client", + "networkstack-client", + "net-utils-services-common", + ], + apex_available: [ + "com.android.wifi", + ], + visibility: [ + "//frameworks/opt/net/wifi/service", + "//frameworks/opt/net/wifi/tests/wifitests", + ], +} + filegroup { name: "services-tethering-shared-srcs", srcs: [ diff --git a/services/net/java/android/net/IpMemoryStore.java b/services/net/java/android/net/IpMemoryStore.java index dcefb537d0a0..8df2e0d08e0e 100644 --- a/services/net/java/android/net/IpMemoryStore.java +++ b/services/net/java/android/net/IpMemoryStore.java @@ -18,6 +18,7 @@ package android.net; import android.annotation.NonNull; import android.content.Context; +import android.net.networkstack.ModuleNetworkStackClient; import android.util.Log; import com.android.internal.annotations.VisibleForTesting; @@ -41,7 +42,7 @@ public class IpMemoryStore extends IpMemoryStoreClient { super(context); mService = new CompletableFuture<>(); mTailNode = new AtomicReference<CompletableFuture<IIpMemoryStore>>(mService); - getNetworkStackClient().fetchIpMemoryStore( + getModuleNetworkStackClient(context).fetchIpMemoryStore( new IIpMemoryStoreCallbacks.Stub() { @Override public void onIpMemoryStoreFetched(@NonNull final IIpMemoryStore memoryStore) { @@ -85,8 +86,8 @@ public class IpMemoryStore extends IpMemoryStoreClient { } @VisibleForTesting - protected NetworkStackClient getNetworkStackClient() { - return NetworkStackClient.getInstance(); + protected ModuleNetworkStackClient getModuleNetworkStackClient(Context context) { + return ModuleNetworkStackClient.getInstance(context); } /** Gets an instance of the memory store */ diff --git a/services/net/java/android/net/TcpKeepalivePacketData.java b/services/net/java/android/net/TcpKeepalivePacketData.java index aad75ae16aa9..fcf3a56de448 100644 --- a/services/net/java/android/net/TcpKeepalivePacketData.java +++ b/services/net/java/android/net/TcpKeepalivePacketData.java @@ -74,6 +74,19 @@ public class TcpKeepalivePacketData extends KeepalivePacketData implements Parce ipTtl = tcpDetails.ttl; } + private TcpKeepalivePacketData(final InetAddress srcAddress, int srcPort, + final InetAddress dstAddress, int dstPort, final byte[] data, int tcpSeq, + int tcpAck, int tcpWnd, int tcpWndScale, int ipTos, int ipTtl) + throws InvalidPacketException { + super(srcAddress, srcPort, dstAddress, dstPort, data); + this.tcpSeq = tcpSeq; + this.tcpAck = tcpAck; + this.tcpWnd = tcpWnd; + this.tcpWndScale = tcpWndScale; + this.ipTos = ipTos; + this.ipTtl = ipTtl; + } + /** * Factory method to create tcp keepalive packet structure. */ @@ -169,7 +182,11 @@ public class TcpKeepalivePacketData extends KeepalivePacketData implements Parce /** Write to parcel. */ public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); + out.writeString(srcAddress.getHostAddress()); + out.writeString(dstAddress.getHostAddress()); + out.writeInt(srcPort); + out.writeInt(dstPort); + out.writeByteArray(getPacket()); out.writeInt(tcpSeq); out.writeInt(tcpAck); out.writeInt(tcpWnd); @@ -178,21 +195,32 @@ public class TcpKeepalivePacketData extends KeepalivePacketData implements Parce out.writeInt(ipTtl); } - private TcpKeepalivePacketData(Parcel in) { - super(in); - tcpSeq = in.readInt(); - tcpAck = in.readInt(); - tcpWnd = in.readInt(); - tcpWndScale = in.readInt(); - ipTos = in.readInt(); - ipTtl = in.readInt(); + private static TcpKeepalivePacketData readFromParcel(Parcel in) throws InvalidPacketException { + InetAddress srcAddress = InetAddresses.parseNumericAddress(in.readString()); + InetAddress dstAddress = InetAddresses.parseNumericAddress(in.readString()); + int srcPort = in.readInt(); + int dstPort = in.readInt(); + byte[] packet = in.createByteArray(); + int tcpSeq = in.readInt(); + int tcpAck = in.readInt(); + int tcpWnd = in.readInt(); + int tcpWndScale = in.readInt(); + int ipTos = in.readInt(); + int ipTtl = in.readInt(); + return new TcpKeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, packet, tcpSeq, + tcpAck, tcpWnd, tcpWndScale, ipTos, ipTtl); } /** Parcelable Creator. */ public static final @NonNull Parcelable.Creator<TcpKeepalivePacketData> CREATOR = new Parcelable.Creator<TcpKeepalivePacketData>() { public TcpKeepalivePacketData createFromParcel(Parcel in) { - return new TcpKeepalivePacketData(in); + try { + return readFromParcel(in); + } catch (InvalidPacketException e) { + throw new IllegalArgumentException( + "Invalid NAT-T keepalive data: " + e.error); + } } public TcpKeepalivePacketData[] newArray(int size) { diff --git a/services/net/java/android/net/ip/IpClientUtil.java b/services/net/java/android/net/ip/IpClientUtil.java index a3618b47171a..b329aeec4853 100644 --- a/services/net/java/android/net/ip/IpClientUtil.java +++ b/services/net/java/android/net/ip/IpClientUtil.java @@ -22,7 +22,7 @@ import android.content.Context; import android.net.DhcpResultsParcelable; import android.net.Layer2PacketParcelable; import android.net.LinkProperties; -import android.net.NetworkStackClient; +import android.net.networkstack.ModuleNetworkStackClient; import android.os.ConditionVariable; import java.io.FileDescriptor; @@ -75,11 +75,11 @@ public class IpClientUtil { * * <p>This is a convenience method to allow clients to use {@link IpClientCallbacks} instead of * {@link IIpClientCallbacks}. - * @see {@link NetworkStackClient#makeIpClient(String, IIpClientCallbacks)} + * @see {@link ModuleNetworkStackClient#makeIpClient(String, IIpClientCallbacks)} */ public static void makeIpClient(Context context, String ifName, IpClientCallbacks callback) { - // TODO: migrate clients and remove context argument - NetworkStackClient.getInstance().makeIpClient(ifName, new IpClientCallbacksProxy(callback)); + ModuleNetworkStackClient.getInstance(context) + .makeIpClient(ifName, new IpClientCallbacksProxy(callback)); } /** 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 0763aa284b68..2ce4c54a932b 100644 --- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java +++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java @@ -22,8 +22,6 @@ import android.app.IActivityTaskManager; 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; @@ -219,16 +217,6 @@ public class DevicePolicyManagerServiceTestable extends DevicePolicyManagerServi AlarmManager getAlarmManager() {return services.alarmManager;} @Override - TimeDetector getTimeDetector() { - return services.timeDetector; - } - - @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 7c0afedc63f0..9ae9824da3e2 100644 --- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java +++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java @@ -63,9 +63,6 @@ import android.app.admin.DeviceAdminReceiver; 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; @@ -3476,19 +3473,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID; setupDeviceOwner(); dpm.setTime(admin1, 0); - - BaseMatcher<ManualTimeSuggestion> hasZeroTime = new BaseMatcher<ManualTimeSuggestion>() { - @Override - public boolean matches(Object item) { - final ManualTimeSuggestion suggestion = (ManualTimeSuggestion) item; - return suggestion.getUtcTime().getValue() == 0; - } - @Override - public void describeTo(Description description) { - description.appendText("ManualTimeSuggestion{utcTime.value=0}"); - } - }; - verify(getServices().timeDetector).suggestManualTime(argThat(hasZeroTime)); + verify(getServices().alarmManager).setTime(0); } public void testSetTimeFailWithPO() throws Exception { @@ -3508,9 +3493,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID; setupDeviceOwner(); dpm.setTimeZone(admin1, "Asia/Shanghai"); - ManualTimeZoneSuggestion suggestion = - TimeZoneDetector.createManualTimeZoneSuggestion("Asia/Shanghai", "Test debug info"); - verify(getServices().timeZoneDetector).suggestManualTimeZone(suggestion); + verify(getServices().alarmManager).setTimeZone("Asia/Shanghai"); } public void testSetTimeZoneFailWithPO() throws Exception { diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java index 960f670904d6..35c115007385 100644 --- a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java +++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java @@ -207,8 +207,6 @@ public class DpmMockContext extends MockContext { switch (name) { case Context.ALARM_SERVICE: return mMockSystemServices.alarmManager; - case Context.TIME_DETECTOR_SERVICE: - return mMockSystemServices.timeDetector; case Context.USER_SERVICE: return mMockSystemServices.userManager; case Context.POWER_SERVICE: 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 16d5db9b8b96..8f0aeea3dbf8 100644 --- a/services/tests/servicestests/src/com/android/server/devicepolicy/MockSystemServices.java +++ b/services/tests/servicestests/src/com/android/server/devicepolicy/MockSystemServices.java @@ -31,8 +31,6 @@ import android.app.IActivityManager; 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,8 +107,6 @@ public class MockSystemServices { public final TelephonyManager telephonyManager; 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; @@ -150,8 +146,6 @@ public class MockSystemServices { telephonyManager = mock(TelephonyManager.class); 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/net/NetworkPolicyManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java index ece937a57247..f1662ff952f2 100644 --- a/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java @@ -1006,7 +1006,7 @@ public class NetworkPolicyManagerServiceTest { // pretend that 512 bytes total have happened stats = new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 256L, 2L, 256L, 2L); + .insertEntry(TEST_IFACE, 256L, 2L, 256L, 2L); when(mStatsService.getNetworkTotalBytes(sTemplateWifi, CYCLE_START, CYCLE_END)) .thenReturn(stats.getTotalBytes()); @@ -1198,11 +1198,11 @@ public class NetworkPolicyManagerServiceTest { history.recordData(start, end, new NetworkStats.Entry(DataUnit.MEGABYTES.toBytes(1440), 0L, 0L, 0L, 0)); stats.clear(); - stats.addEntry(IFACE_ALL, UID_A, SET_ALL, TAG_ALL, + stats.insertEntry(IFACE_ALL, UID_A, SET_ALL, TAG_ALL, DataUnit.MEGABYTES.toBytes(480), 0, 0, 0, 0); - stats.addEntry(IFACE_ALL, UID_B, SET_ALL, TAG_ALL, + stats.insertEntry(IFACE_ALL, UID_B, SET_ALL, TAG_ALL, DataUnit.MEGABYTES.toBytes(480), 0, 0, 0, 0); - stats.addEntry(IFACE_ALL, UID_C, SET_ALL, TAG_ALL, + stats.insertEntry(IFACE_ALL, UID_C, SET_ALL, TAG_ALL, DataUnit.MEGABYTES.toBytes(480), 0, 0, 0, 0); reset(mNotifManager); @@ -1226,9 +1226,9 @@ public class NetworkPolicyManagerServiceTest { history.recordData(start, end, new NetworkStats.Entry(DataUnit.MEGABYTES.toBytes(1440), 0L, 0L, 0L, 0)); stats.clear(); - stats.addEntry(IFACE_ALL, UID_A, SET_ALL, TAG_ALL, + stats.insertEntry(IFACE_ALL, UID_A, SET_ALL, TAG_ALL, DataUnit.MEGABYTES.toBytes(960), 0, 0, 0, 0); - stats.addEntry(IFACE_ALL, UID_B, SET_ALL, TAG_ALL, + stats.insertEntry(IFACE_ALL, UID_B, SET_ALL, TAG_ALL, DataUnit.MEGABYTES.toBytes(480), 0, 0, 0, 0); reset(mNotifManager); @@ -1260,7 +1260,7 @@ public class NetworkPolicyManagerServiceTest { // bring up wifi network with metered policy state = new NetworkState[] { buildWifi() }; stats = new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 0L, 0L, 0L, 0L); + .insertEntry(TEST_IFACE, 0L, 0L, 0L, 0L); { when(mConnManager.getAllNetworkState()).thenReturn(state); @@ -1692,7 +1692,7 @@ public class NetworkPolicyManagerServiceTest { final int CYCLE_DAY = 15; final NetworkStats stats = new NetworkStats(0L, 1); - stats.addEntry(TEST_IFACE, UID_A, SET_ALL, TAG_NONE, + stats.insertEntry(TEST_IFACE, UID_A, SET_ALL, TAG_NONE, 2999, 1, 2000, 1, 0); when(mStatsService.getNetworkTotalBytes(any(), anyLong(), anyLong())) .thenReturn(stats.getTotalBytes()); @@ -1716,7 +1716,7 @@ public class NetworkPolicyManagerServiceTest { reset(mStatsService); // Increase the usage. - stats.addEntry(TEST_IFACE, UID_A, SET_ALL, TAG_NONE, + stats.insertEntry(TEST_IFACE, UID_A, SET_ALL, TAG_NONE, 1000, 1, 999, 1, 0); when(mStatsService.getNetworkTotalBytes(any(), anyLong(), anyLong())) .thenReturn(stats.getTotalBytes()); diff --git a/services/usb/OWNERS b/services/usb/OWNERS index 7897a0c8555c..8ee72b577f3c 100644 --- a/services/usb/OWNERS +++ b/services/usb/OWNERS @@ -1,4 +1,6 @@ badhri@google.com elaurent@google.com moltmann@google.com -zhangjerry@google.com +albertccwang@google.com +jameswei@google.com +howardyen@google.com
\ No newline at end of file diff --git a/telecomm/java/android/telecom/CallRedirectionService.java b/telecomm/java/android/telecom/CallRedirectionService.java index 36c637723c0a..c832f53ae073 100644 --- a/telecomm/java/android/telecom/CallRedirectionService.java +++ b/telecomm/java/android/telecom/CallRedirectionService.java @@ -38,16 +38,14 @@ import com.android.internal.telecom.ICallRedirectionService; * * <p> * Below is an example manifest registration for a {@code CallRedirectionService}. - * <pre> * {@code * <service android:name="your.package.YourCallRedirectionServiceImplementation" - * android:permission="android.permission.BIND_REDIRECTION_SERVICE"> + * android:permission="android.permission.BIND_CALL_REDIRECTION_SERVICE"> * <intent-filter> * <action android:name="android.telecom.CallRedirectionService"/> * </intent-filter> * </service> * } - * </pre> */ public abstract class CallRedirectionService extends Service { /** diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 57a47d3d78c5..de35c00c8059 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -37,6 +37,8 @@ import android.telephony.ims.ImsReasonInfo; import com.android.internal.telephony.ICarrierConfigLoader; import com.android.telephony.Rlog; +import java.util.concurrent.TimeUnit; + /** * Provides access to telephony configuration values that are carrier-specific. */ @@ -2362,17 +2364,16 @@ public class CarrierConfigManager { * <p> If a measure is not set, signal criteria reporting from modem will not be triggered and * not be used for calculating signal level. If multiple measures are set bit, the parameter * whose value is smallest is used to indicate the signal level. + * <UL> + * <LI>RSRP = 1 << 0</LI> + * <LI>RSRQ = 1 << 1</LI> + * <LI>RSSNR = 1 << 2</LI> + * </UL> + * <p> The value of this key must be bitwise OR of {@link CellSignalStrengthLte#USE_RSRP}, + * {@link CellSignalStrengthLte#USE_RSRQ}, {@link CellSignalStrengthLte#USE_RSSNR}. * - * RSRP = 1 << 0, - * RSRQ = 1 << 1, - * RSSNR = 1 << 2, - * - * The value of this key must be bitwise OR of {@link CellSignalStrengthLte#USE_RSRP}, - * {@link CellSignalStrengthLte#USE_RSRQ}, {@link CellSignalStrengthLte#USE_RSSNR}. - * - * For example, if both RSRP and RSRQ are used, the value of key is 3 (1 << 0 | 1 << 1). - * If the key is invalid or not configured, a default value (RSRP = 1 << 0) - * will apply. + * <p> For example, if both RSRP and RSRQ are used, the value of key is 3 (1 << 0 | 1 << 1). + * If the key is invalid or not configured, a default value (RSRP = 1 << 0) will apply. * * @hide */ @@ -2381,16 +2382,18 @@ public class CarrierConfigManager { /** * List of 4 customized 5G SS reference signal received power (SSRSRP) thresholds. - * + * <p> * Reference: 3GPP TS 38.215 - * + * <p> * 4 threshold integers must be within the boundaries [-140 dB, -44 dB], and the levels are: - * "NONE: [-140, threshold1]" - * "POOR: (threshold1, threshold2]" - * "MODERATE: (threshold2, threshold3]" - * "GOOD: (threshold3, threshold4]" - * "EXCELLENT: (threshold4, -44]" - * + * <UL> + * <LI>"NONE: [-140, threshold1]"</LI> + * <LI>"POOR: (threshold1, threshold2]"</LI> + * <LI>"MODERATE: (threshold2, threshold3]"</LI> + * <LI>"GOOD: (threshold3, threshold4]"</LI> + * <LI>"EXCELLENT: (threshold4, -44]"</LI> + * </UL> + * <p> * This key is considered invalid if the format is violated. If the key is invalid or * not configured, a default value set will apply. */ @@ -2399,16 +2402,18 @@ public class CarrierConfigManager { /** * List of 4 customized 5G SS reference signal received quality (SSRSRQ) thresholds. - * + * <p> * Reference: 3GPP TS 38.215 - * + * <p> * 4 threshold integers must be within the boundaries [-20 dB, -3 dB], and the levels are: - * "NONE: [-20, threshold1]" - * "POOR: (threshold1, threshold2]" - * "MODERATE: (threshold2, threshold3]" - * "GOOD: (threshold3, threshold4]" - * "EXCELLENT: (threshold4, -3]" - * + * <UL> + * <LI>"NONE: [-20, threshold1]"</LI> + * <LI>"POOR: (threshold1, threshold2]"</LI> + * <LI>"MODERATE: (threshold2, threshold3]"</LI> + * <LI>"GOOD: (threshold3, threshold4]"</LI> + * <LI>"EXCELLENT: (threshold4, -3]"</LI> + * </UL> + * <p> * This key is considered invalid if the format is violated. If the key is invalid or * not configured, a default value set will apply. */ @@ -2417,17 +2422,19 @@ public class CarrierConfigManager { /** * List of 4 customized 5G SS signal-to-noise and interference ratio (SSSINR) thresholds. - * + * <p> * Reference: 3GPP TS 38.215, * 3GPP TS 38.133 10.1.16.1 - * + * <p> * 4 threshold integers must be within the boundaries [-23 dB, 40 dB], and the levels are: - * "NONE: [-23, threshold1]" - * "POOR: (threshold1, threshold2]" - * "MODERATE: (threshold2, threshold3]" - * "GOOD: (threshold3, threshold4]" - * "EXCELLENT: (threshold4, 40]" - * + * <UL> + * <LI>"NONE: [-23, threshold1]"</LI> + * <LI>"POOR: (threshold1, threshold2]"</LI> + * <LI>"MODERATE: (threshold2, threshold3]"</LI> + * <LI>"GOOD: (threshold3, threshold4]"</LI> + * <LI>"EXCELLENT: (threshold4, 40]"</LI> + * </UL> + * <p> * This key is considered invalid if the format is violated. If the key is invalid or * not configured, a default value set will apply. */ @@ -2442,19 +2449,19 @@ public class CarrierConfigManager { * <p> If a measure is not set, signal criteria reporting from modem will not be triggered and * not be used for calculating signal level. If multiple measures are set bit, the parameter * whose value is smallest is used to indicate the signal level. - * - * SSRSRP = 1 << 0, - * SSRSRQ = 1 << 1, - * SSSINR = 1 << 2, - * + * <UL> + * <LI>SSRSRP = 1 << 0</LI> + * <LI>SSRSRQ = 1 << 1</LI> + * <LI>SSSINR = 1 << 2</LI> + * </UL> * The value of this key must be bitwise OR of {@link CellSignalStrengthNr#USE_SSRSRP}, * {@link CellSignalStrengthNr#USE_SSRSRQ}, {@link CellSignalStrengthNr#USE_SSSINR}. * - * For example, if both SSRSRP and SSSINR are used, the value of key is 5 (1 << 0 | 1 << 2). + * <p> For example, if both SSRSRP and SSSINR are used, the value of key is 5 (1 << 0 | 1 << 2). * If the key is invalid or not configured, a default value (SSRSRP = 1 << 0) will apply. * - * Reference: 3GPP TS 38.215, - * 3GPP TS 38.133 10.1.16.1 + * <p> Reference: 3GPP TS 38.215, + * 3GPP TS 38.133 10.1.16.1 * * @hide */ @@ -3990,7 +3997,8 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_USE_CALLER_ID_USSD_BOOL, false); sDefaults.putInt(KEY_CALL_WAITING_SERVICE_CLASS_INT, 1 /* SERVICE_CLASS_VOICE */); sDefaults.putString(KEY_5G_ICON_CONFIGURATION_STRING, - "connected_mmwave:5G,connected:5G"); + "connected_mmwave:5G,connected:5G,not_restricted_rrc_idle:5G," + + "not_restricted_rrc_con:5G"); sDefaults.putInt(KEY_5G_ICON_DISPLAY_GRACE_PERIOD_SEC_INT, 0); /* Default value is 1 hour. */ sDefaults.putLong(KEY_5G_WATCHDOG_TIME_MS_LONG, 3600000); @@ -4054,7 +4062,7 @@ public class CarrierConfigManager { sDefaults.putLong(KEY_DATA_SWITCH_VALIDATION_TIMEOUT_LONG, 2000); sDefaults.putInt(KEY_PARAMETERS_USED_FOR_LTE_SIGNAL_BAR_INT, CellSignalStrengthLte.USE_RSRP); - sDefaults.putLong(KEY_DATA_SWITCH_VALIDATION_MIN_GAP_LONG, 0); + sDefaults.putLong(KEY_DATA_SWITCH_VALIDATION_MIN_GAP_LONG, TimeUnit.DAYS.toMillis(1)); sDefaults.putStringArray(KEY_MISSED_INCOMING_CALL_SMS_ORIGINATOR_STRING_ARRAY, new String[0]); sDefaults.putStringArray(KEY_MISSED_INCOMING_CALL_SMS_PATTERN_STRING_ARRAY, new String[0]); diff --git a/telephony/java/android/telephony/NetworkRegistrationInfo.java b/telephony/java/android/telephony/NetworkRegistrationInfo.java index 32ffb75f373c..d8a65517c90f 100644 --- a/telephony/java/android/telephony/NetworkRegistrationInfo.java +++ b/telephony/java/android/telephony/NetworkRegistrationInfo.java @@ -291,7 +291,7 @@ public final class NetworkRegistrationInfo implements Parcelable { mDataSpecificInfo = new DataSpecificRegistrationInfo( maxDataCalls, isDcNrRestricted, isNrAvailable, isEndcAvailable, lteVopsSupportInfo, isUsingCarrierAggregation); - updateNrState(mDataSpecificInfo); + updateNrState(); } private NetworkRegistrationInfo(Parcel source) { @@ -658,12 +658,12 @@ public final class NetworkRegistrationInfo implements Parcelable { * DCNR is not restricted and NR is supported by the selected PLMN. Otherwise the use of 5G * NR is restricted. * - * @param state data specific registration state contains the 5G NR indicators. + * @hide */ - private void updateNrState(DataSpecificRegistrationInfo state) { + public void updateNrState() { mNrState = NR_STATE_NONE; - if (state.isEnDcAvailable) { - if (!state.isDcNrRestricted && state.isNrAvailable) { + if (mDataSpecificInfo.isEnDcAvailable) { + if (!mDataSpecificInfo.isDcNrRestricted && mDataSpecificInfo.isNrAvailable) { mNrState = NR_STATE_NOT_RESTRICTED; } else { mNrState = NR_STATE_RESTRICTED; diff --git a/telephony/java/android/telephony/NetworkService.java b/telephony/java/android/telephony/NetworkService.java index 87d94bfda662..c75de42707a6 100644 --- a/telephony/java/android/telephony/NetworkService.java +++ b/telephony/java/android/telephony/NetworkService.java @@ -234,6 +234,9 @@ public abstract class NetworkService extends Service { * this method to facilitate the creation of {@link NetworkServiceProvider} instances. The system * will call this method after binding the network service for each active SIM slot id. * + * This methead is guaranteed to be invoked in {@link NetworkService}'s internal handler thread + * whose looper can be retrieved with {@link Looper.myLooper()} when override this method. + * * @param slotIndex SIM slot id the network service associated with. * @return Network service object. Null if failed to create the provider (e.g. invalid slot * index) diff --git a/telephony/java/android/telephony/PinResult.java b/telephony/java/android/telephony/PinResult.java index 683e85387c08..68c9d998ba92 100644 --- a/telephony/java/android/telephony/PinResult.java +++ b/telephony/java/android/telephony/PinResult.java @@ -19,7 +19,6 @@ package android.telephony; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; -import android.annotation.SystemApi; import android.os.Parcel; import android.os.Parcelable; @@ -32,7 +31,6 @@ import java.util.Objects; * * @hide */ -@SystemApi public final class PinResult implements Parcelable { /** @hide */ @IntDef({ diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java index f8e4bea9d98e..5cf33dec25ea 100644 --- a/telephony/java/android/telephony/ServiceState.java +++ b/telephony/java/android/telephony/ServiceState.java @@ -580,7 +580,6 @@ public class ServiceState implements Parcelable { * * @hide */ - @SystemApi public @RegState int getDataRegistrationState() { return getDataRegState(); } @@ -1993,7 +1992,6 @@ public class ServiceState implements Parcelable { * @return the copied ServiceState with location info sanitized. * @hide */ - @SystemApi @NonNull public ServiceState createLocationInfoSanitizedCopy(boolean removeCoarseLocation) { ServiceState state = new ServiceState(this); diff --git a/telephony/java/android/telephony/SubscriptionInfo.java b/telephony/java/android/telephony/SubscriptionInfo.java index 832771daa409..67eab0e1ff8c 100644 --- a/telephony/java/android/telephony/SubscriptionInfo.java +++ b/telephony/java/android/telephony/SubscriptionInfo.java @@ -798,7 +798,7 @@ public class SubscriptionInfo implements Parcelable { + " hplmns=" + Arrays.toString(mHplmns) + " subscriptionType=" + mSubscriptionType + " mGroupOwner=" + mGroupOwner - + " carrierConfigAccessRules=" + mCarrierConfigAccessRules + + " carrierConfigAccessRules=" + Arrays.toString(mCarrierConfigAccessRules) + " mAreUiccApplicationsEnabled=" + mAreUiccApplicationsEnabled + "}"; } diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java index d8cebfbef8a4..d87df08ffc80 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java @@ -2680,8 +2680,8 @@ public class SubscriptionManager { * @hide */ @SystemApi - public boolean canManageSubscription(@Nullable SubscriptionInfo info, - @Nullable String packageName) { + public boolean canManageSubscription(@NonNull SubscriptionInfo info, + @NonNull String packageName) { if (info == null || info.getAllAccessRules() == null || packageName == null) { return false; } @@ -3186,13 +3186,13 @@ public class SubscriptionManager { * * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required * - * @param enabled whether uicc applications are enabled or disabled. * @param subscriptionId which subscription to operate on. + * @param enabled whether uicc applications are enabled or disabled. * @hide */ @SystemApi @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE) - public void setUiccApplicationsEnabled(boolean enabled, int subscriptionId) { + public void setUiccApplicationsEnabled(int subscriptionId, boolean enabled) { if (VDBG) { logd("setUiccApplicationsEnabled subId= " + subscriptionId + " enable " + enabled); } diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index c2b4ec9d80a5..86b061512f1f 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -53,6 +53,7 @@ import android.os.Binder; import android.os.Build; import android.os.Bundle; import android.os.Handler; +import android.os.ParcelFileDescriptor; import android.os.PersistableBundle; import android.os.Process; import android.os.RemoteException; @@ -1030,7 +1031,7 @@ public class TelephonyManager { * or that all steps during multi-SIM change are done. To know those information you still need * to listen to SIM_STATE changes or active subscription changes. * - * See extra of {@link #EXTRA_NUM_OF_ACTIVE_SIM_SUPPORTED} for updated value. + * See extra of {@link #EXTRA_ACTIVE_SIM_SUPPORTED_COUNT} for updated value. */ public static final String ACTION_MULTI_SIM_CONFIG_CHANGED = "android.telephony.action.MULTI_SIM_CONFIG_CHANGED"; @@ -1040,6 +1041,8 @@ public class TelephonyManager { * The number of active SIM supported by current multi-SIM config. It's not related to how many * SIM/subscriptions are currently active. * + * Same value will be returned by {@link #getActiveModemCount()}. + * * For single SIM mode, it's 1. * For DSDS or DSDA mode, it's 2. * For triple-SIM mode, it's 3. @@ -1048,8 +1051,8 @@ public class TelephonyManager { * * type: integer */ - public static final String EXTRA_NUM_OF_ACTIVE_SIM_SUPPORTED = - "android.telephony.extra.NUM_OF_ACTIVE_SIM_SUPPORTED"; + public static final String EXTRA_ACTIVE_SIM_SUPPORTED_COUNT = + "android.telephony.extra.ACTIVE_SIM_SUPPORTED_COUNT"; /** * @hide @@ -2300,7 +2303,12 @@ public class TelephonyManager { public static final int PHONE_TYPE_CDMA = PhoneConstants.PHONE_TYPE_CDMA; /** Phone is via SIP. */ public static final int PHONE_TYPE_SIP = PhoneConstants.PHONE_TYPE_SIP; - /** Phone is via IMS. */ + + /** + * Phone is via IMS. + * + * @hide + */ public static final int PHONE_TYPE_IMS = PhoneConstants.PHONE_TYPE_IMS; /** @@ -2308,7 +2316,6 @@ public class TelephonyManager { * * @hide */ - @SystemApi public static final int PHONE_TYPE_THIRD_PARTY = PhoneConstants.PHONE_TYPE_THIRD_PARTY; /** @@ -2705,39 +2712,22 @@ public class TelephonyManager { /** * Returns the ISO-3166 country code equivalent of the MCC (Mobile Country Code) of the current * registered operator or the cell nearby, if available. - * <p> - * The ISO-3166 country code is provided in lowercase 2 character format. - * <p> - * Note: In multi-sim, this returns a shared emergency network country iso from other - * subscription if the subscription used to create the TelephonyManager doesn't camp on - * a network due to some reason (e.g. pin/puk locked), or sim is absent in the corresponding - * slot. + * * Note: Result may be unreliable on CDMA networks (use {@link #getPhoneType()} to determine * if on a CDMA network). * <p> * @return the lowercase 2 character ISO-3166 country code, or empty string if not available. */ public String getNetworkCountryIso() { - try { - ITelephony telephony = getITelephony(); - if (telephony == null) return ""; - return telephony.getNetworkCountryIsoForPhone(getPhoneId(), - null /* no permission check */, null); - } catch (RemoteException ex) { - return ""; - } + return getNetworkCountryIso(getSlotIndex()); } /** * Returns the ISO-3166 country code equivalent of the MCC (Mobile Country Code) of the current - * registered operator or the cell nearby, if available. - * <p> - * The ISO-3166 country code is provided in lowercase 2 character format. - * <p> - * Note: In multi-sim, this returns a shared emergency network country iso from other - * subscription if the subscription used to create the TelephonyManager doesn't camp on - * a network due to some reason (e.g. pin/puk locked), or sim is absent in the corresponding - * slot. + * registered operator or the cell nearby, if available. This is same as + * {@link #getNetworkCountryIso()} but allowing specifying the SIM slot index. This is used for + * accessing network country info from the SIM slot that does not have SIM inserted. + * * Note: Result may be unreliable on CDMA networks (use {@link #getPhoneType()} to determine * if on a CDMA network). * <p> @@ -2748,22 +2738,18 @@ public class TelephonyManager { * * @throws IllegalArgumentException when the slotIndex is invalid. * - * {@hide} */ - @SystemApi - @TestApi @NonNull - @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getNetworkCountryIso(int slotIndex) { try { - if (!SubscriptionManager.isValidSlotIndex(slotIndex)) { + if (slotIndex != SubscriptionManager.DEFAULT_SIM_SLOT_INDEX + && !SubscriptionManager.isValidSlotIndex(slotIndex)) { throw new IllegalArgumentException("invalid slot index " + slotIndex); } ITelephony telephony = getITelephony(); if (telephony == null) return ""; - return telephony.getNetworkCountryIsoForPhone(slotIndex, getOpPackageName(), - getFeatureId()); + return telephony.getNetworkCountryIsoForPhone(slotIndex); } catch (RemoteException ex) { return ""; } @@ -8691,7 +8677,6 @@ public class TelephonyManager { * * @hide */ - @SystemApi @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public PinResult supplyPinReportPinResult(@NonNull String pin) { @@ -8716,7 +8701,6 @@ public class TelephonyManager { * * @hide */ - @SystemApi @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public PinResult supplyPukReportPinResult(@NonNull String puk, @NonNull String pin) { @@ -8908,7 +8892,10 @@ public class TelephonyManager { } /** - * Shut down all the live radios over all the slot index. + * Shut down all the live radios over all the slot indexes. + * + * <p>To know when the radio has completed powering off, use + * {@link PhoneStateListener#LISTEN_SERVICE_STATE LISTEN_SERVICE_STATE}. * * @hide */ @@ -8921,7 +8908,8 @@ public class TelephonyManager { telephony.shutdownMobileRadios(); } } catch (RemoteException e) { - Log.e(TAG, "Error calling ITelephony#shutdownMobileRadios", e); + Log.e(TAG, "Error calling ITelephony#shutdownAllRadios", e); + e.rethrowAsRuntimeException(); } } @@ -8940,7 +8928,8 @@ public class TelephonyManager { return telephony.needMobileRadioShutdown(); } } catch (RemoteException e) { - Log.e(TAG, "Error calling ITelephony#needMobileRadioShutdown", e); + Log.e(TAG, "Error calling ITelephony#isAnyRadioPoweredOn", e); + e.rethrowAsRuntimeException(); } return false; } @@ -9170,7 +9159,6 @@ public class TelephonyManager { * * @hide */ - @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public @CdmaRoamingMode int getCdmaRoamingMode() { int mode = CDMA_ROAMING_MODE_RADIO_DEFAULT; @@ -9199,7 +9187,6 @@ public class TelephonyManager { * * @hide */ - @SystemApi @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setCdmaRoamingMode(@CdmaRoamingMode int mode) { try { @@ -9225,19 +9212,16 @@ public class TelephonyManager { /** Used for CDMA subscription mode, it'll be UNKNOWN if there is no Subscription source. * @hide */ - @SystemApi public static final int CDMA_SUBSCRIPTION_UNKNOWN = -1; /** Used for CDMA subscription mode: RUIM/SIM (default) * @hide */ - @SystemApi public static final int CDMA_SUBSCRIPTION_RUIM_SIM = 0; /** Used for CDMA subscription mode: NV -> non-volatile memory * @hide */ - @SystemApi public static final int CDMA_SUBSCRIPTION_NV = 1; /** @hide */ @@ -9256,7 +9240,6 @@ public class TelephonyManager { * * @hide */ - @SystemApi @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setCdmaSubscriptionMode(@CdmaSubscription int mode) { try { @@ -11109,21 +11092,21 @@ public class TelephonyManager { } /** - * Checks whether cellular data connection is enabled in the device. + * Checks whether cellular data connection is allowed in the device. * - * Whether cellular data connection is enabled, meaning upon request whether will try to setup - * metered data connection considering all factors below: - * 1) User turned on data setting {@link #isDataEnabled}. - * 2) Carrier allows data to be on. - * 3) Network policy. - * And possibly others. - * - * @return {@code true} if the overall data connection is capable; {@code false} if not. + * <p>Whether cellular data connection is allowed considers all factors below: + * <UL> + * <LI>User turned on data setting {@link #isDataEnabled}.</LI> + * <LI>Carrier allows data to be on.</LI> + * <LI>Network policy.</LI> + * <LI>And possibly others.</LI> + * </UL> + * @return {@code true} if the overall data connection is allowed; {@code false} if not. * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) - public boolean isDataConnectionEnabled() { + public boolean isDataConnectionAllowed() { boolean retVal = false; try { int subId = getSubId(SubscriptionManager.getDefaultDataSubscriptionId()); @@ -11131,8 +11114,9 @@ public class TelephonyManager { if (telephony != null) retVal = telephony.isDataEnabled(subId); } catch (RemoteException e) { - Log.e(TAG, "Error isDataConnectionEnabled", e); + Log.e(TAG, "Error isDataConnectionAllowed", e); } catch (NullPointerException e) { + return false; } return retVal; } @@ -11563,11 +11547,9 @@ public class TelephonyManager { } /** - * Override the file path for testing OTA emergency number database in a file partition. + * Override the file path for OTA emergency number database in a file partition. * - * @param otaFilePath The test OTA emergency number database file path; - * if "RESET", recover the original database file partition. - * Format: <root file folder>@<file path> + * @param otaParcelFileDescriptor parcelable file descriptor for OTA emergency number database. * * <p> Requires permission: * {@link android.Manifest.permission#READ_ACTIVE_EMERGENCY_SESSION} @@ -11577,16 +11559,42 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) @SystemApi @TestApi - public void updateTestOtaEmergencyNumberDbFilePath(@NonNull String otaFilePath) { + public void updateOtaEmergencyNumberDbFilePath( + @NonNull ParcelFileDescriptor otaParcelFileDescriptor) { try { ITelephony telephony = getITelephony(); if (telephony != null) { - telephony.updateTestOtaEmergencyNumberDbFilePath(otaFilePath); + telephony.updateOtaEmergencyNumberDbFilePath(otaParcelFileDescriptor); } else { throw new IllegalStateException("telephony service is null."); } } catch (RemoteException ex) { - Log.e(TAG, "notifyOtaEmergencyNumberDatabaseInstalled RemoteException", ex); + Log.e(TAG, "updateOtaEmergencyNumberDbFilePath RemoteException", ex); + ex.rethrowAsRuntimeException(); + } + } + + /** + * Reset the file path to default for OTA emergency number database in a file partition. + * + * <p> Requires permission: + * {@link android.Manifest.permission#READ_ACTIVE_EMERGENCY_SESSION} + * + * @hide + */ + @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) + @SystemApi + @TestApi + public void resetOtaEmergencyNumberDbFilePath() { + try { + ITelephony telephony = getITelephony(); + if (telephony != null) { + telephony.resetOtaEmergencyNumberDbFilePath(); + } else { + throw new IllegalStateException("telephony service is null."); + } + } catch (RemoteException ex) { + Log.e(TAG, "resetOtaEmergencyNumberDbFilePath RemoteException", ex); ex.rethrowAsRuntimeException(); } } @@ -11790,7 +11798,7 @@ public class TelephonyManager { } /** - * A test API to return the emergency number db version. + * Returns the emergency number database version. * * <p>Requires Permission: * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE} @@ -11799,6 +11807,7 @@ public class TelephonyManager { */ @TestApi @SystemApi + @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getEmergencyNumberDbVersion() { try { ITelephony telephony = getITelephony(); @@ -12588,7 +12597,6 @@ public class TelephonyManager { } /** -<<<<<<< HEAD * Gets the voice call forwarding info {@link CallForwardingInfo}, given the call forward * reason. * @@ -12788,7 +12796,6 @@ public class TelephonyManager { * * @hide */ - @SystemApi @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setDataAllowedDuringVoiceCall(boolean allow) { try { @@ -12817,7 +12824,6 @@ public class TelephonyManager { * * @hide */ - @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataAllowedInVoiceCall() { try { diff --git a/telephony/java/android/telephony/data/ApnSetting.java b/telephony/java/android/telephony/data/ApnSetting.java index 6e630e3a7024..158ada94e3c6 100644 --- a/telephony/java/android/telephony/data/ApnSetting.java +++ b/telephony/java/android/telephony/data/ApnSetting.java @@ -18,7 +18,6 @@ package android.telephony.data; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; -import android.annotation.SystemApi; import android.content.ContentValues; import android.database.Cursor; import android.hardware.radio.V1_5.ApnTypes; @@ -125,6 +124,15 @@ public class ApnSetting implements Parcelable { /** Authentication type for PAP or CHAP. */ public static final int AUTH_TYPE_PAP_OR_CHAP = 3; + /** @hide */ + @IntDef({ + Telephony.Carriers.SKIP_464XLAT_DEFAULT, + Telephony.Carriers.SKIP_464XLAT_DISABLE, + Telephony.Carriers.SKIP_464XLAT_ENABLE, + }) + @Retention(RetentionPolicy.SOURCE) + public @interface Skip464XlatStatus {} + /** * APN types for data connections. These are usage categories for an APN * entry. One APN entry may support multiple APN types, eg, a single APN @@ -138,7 +146,6 @@ public class ApnSetting implements Parcelable { * * @hide */ - @SystemApi public static final String TYPE_ALL_STRING = "*"; /** @@ -146,7 +153,6 @@ public class ApnSetting implements Parcelable { * * @hide */ - @SystemApi public static final String TYPE_DEFAULT_STRING = "default"; @@ -155,7 +161,6 @@ public class ApnSetting implements Parcelable { * * @hide */ - @SystemApi public static final String TYPE_MMS_STRING = "mms"; @@ -164,7 +169,6 @@ public class ApnSetting implements Parcelable { * * @hide */ - @SystemApi public static final String TYPE_SUPL_STRING = "supl"; /** @@ -172,7 +176,6 @@ public class ApnSetting implements Parcelable { * * @hide */ - @SystemApi public static final String TYPE_DUN_STRING = "dun"; /** @@ -180,7 +183,6 @@ public class ApnSetting implements Parcelable { * * @hide */ - @SystemApi public static final String TYPE_HIPRI_STRING = "hipri"; /** @@ -188,7 +190,6 @@ public class ApnSetting implements Parcelable { * * @hide */ - @SystemApi public static final String TYPE_FOTA_STRING = "fota"; /** @@ -196,7 +197,6 @@ public class ApnSetting implements Parcelable { * * @hide */ - @SystemApi public static final String TYPE_IMS_STRING = "ims"; /** @@ -204,7 +204,6 @@ public class ApnSetting implements Parcelable { * * @hide */ - @SystemApi public static final String TYPE_CBS_STRING = "cbs"; /** @@ -212,7 +211,6 @@ public class ApnSetting implements Parcelable { * * @hide */ - @SystemApi public static final String TYPE_IA_STRING = "ia"; /** @@ -221,7 +219,6 @@ public class ApnSetting implements Parcelable { * * @hide */ - @SystemApi public static final String TYPE_EMERGENCY_STRING = "emergency"; /** @@ -229,7 +226,6 @@ public class ApnSetting implements Parcelable { * * @hide */ - @SystemApi public static final String TYPE_MCX_STRING = "mcx"; /** @@ -237,7 +233,6 @@ public class ApnSetting implements Parcelable { * * @hide */ - @SystemApi public static final String TYPE_XCAP_STRING = "xcap"; @@ -741,7 +736,7 @@ public class ApnSetting implements Parcelable { * @return SKIP_464XLAT_DEFAULT, SKIP_464XLAT_DISABLE or SKIP_464XLAT_ENABLE * @hide */ - @Carriers.Skip464XlatStatus + @Skip464XlatStatus public int getSkip464Xlat() { return mSkip464Xlat; } @@ -1412,7 +1407,6 @@ public class ApnSetting implements Parcelable { * @return comma delimited list of APN types. * @hide */ - @SystemApi @NonNull public static String getApnTypesStringFromBitmask(int apnTypeBitmask) { List<String> types = new ArrayList<>(); @@ -2061,7 +2055,7 @@ public class ApnSetting implements Parcelable { * @param skip464xlat skip464xlat for this APN * @hide */ - public Builder setSkip464Xlat(@Carriers.Skip464XlatStatus int skip464xlat) { + public Builder setSkip464Xlat(@Skip464XlatStatus int skip464xlat) { this.mSkip464Xlat = skip464xlat; return this; } diff --git a/telephony/java/android/telephony/data/DataService.java b/telephony/java/android/telephony/data/DataService.java index 6c4e7ce51ebf..f56bbe13051c 100644 --- a/telephony/java/android/telephony/data/DataService.java +++ b/telephony/java/android/telephony/data/DataService.java @@ -458,6 +458,9 @@ public abstract class DataService extends Service { * this method to facilitate the creation of {@link DataServiceProvider} instances. The system * will call this method after binding the data service for each active SIM slot id. * + * This methead is guaranteed to be invoked in {@link DataService}'s internal handler thread + * whose looper can be retrieved with {@link Looper.myLooper()} when override this method. + * * @param slotIndex SIM slot id the data service associated with. * @return Data service object. Null if failed to create the provider (e.g. invalid slot index) */ diff --git a/telephony/java/android/telephony/ims/RcsUceAdapter.java b/telephony/java/android/telephony/ims/RcsUceAdapter.java index 6974420dbaf4..32fd8638f761 100644 --- a/telephony/java/android/telephony/ims/RcsUceAdapter.java +++ b/telephony/java/android/telephony/ims/RcsUceAdapter.java @@ -139,7 +139,7 @@ public class RcsUceAdapter { * UCE. * @hide */ - public static final int PUBLISH_STATE_200_OK = 1; + public static final int PUBLISH_STATE_OK = 1; /** * The hasn't published its capabilities since boot or hasn't gotten any publish response yet. @@ -179,7 +179,7 @@ public class RcsUceAdapter { /**@hide*/ @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = "PUBLISH_STATE_", value = { - PUBLISH_STATE_200_OK, + PUBLISH_STATE_OK, PUBLISH_STATE_NOT_PUBLISHED, PUBLISH_STATE_VOLTE_PROVISION_ERROR, PUBLISH_STATE_RCS_PROVISION_ERROR, @@ -303,7 +303,7 @@ public class RcsUceAdapter { * Gets the last publish result from the UCE service if the device is using an RCS presence * server. * @return The last publish result from the UCE service. If the device is using SIP OPTIONS, - * this method will return {@link #PUBLISH_STATE_200_OK} as well. + * this method will return {@link #PUBLISH_STATE_OK} as well. * @throws ImsException if the subscription associated with this instance of * {@link RcsUceAdapter} is valid, but the ImsService associated with the subscription is not * available. This can happen if the ImsService has crashed, for example, or if the subscription diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 123096c3e741..9f06734989b3 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -22,6 +22,7 @@ import android.content.IntentSender; import android.os.Bundle; import android.os.IBinder; import android.os.Messenger; +import android.os.ParcelFileDescriptor; import android.os.ResultReceiver; import android.os.WorkSource; import android.net.NetworkStats; @@ -281,7 +282,7 @@ interface ITelephony { * operator's MCC (Mobile Country Code). * @see android.telephony.TelephonyManager#getNetworkCountryIso */ - String getNetworkCountryIsoForPhone(int phoneId, String callingPkg, String callingFeatureId); + String getNetworkCountryIsoForPhone(int phoneId); /** * Returns the neighboring cell information of the device. @@ -2121,9 +2122,14 @@ interface ITelephony { void notifyOtaEmergencyNumberDbInstalled(); /** - * Override the file partition name for testing OTA emergency number database. + * Override a customized file partition name for OTA emergency number database. */ - void updateTestOtaEmergencyNumberDbFilePath(String otaFilePath); + void updateOtaEmergencyNumberDbFilePath(in ParcelFileDescriptor otaParcelFileDescriptor); + + /** + * Reset file partition to default for OTA emergency number database. + */ + void resetOtaEmergencyNumberDbFilePath(); /** * Enable or disable a logical modem stack associated with the slotIndex. diff --git a/tests/net/AndroidManifest.xml b/tests/net/AndroidManifest.xml index 480b12be91c8..009f817af407 100644 --- a/tests/net/AndroidManifest.xml +++ b/tests/net/AndroidManifest.xml @@ -47,6 +47,7 @@ <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" /> + <uses-permission android:name="android.permission.NETWORK_STATS_PROVIDER" /> <application> <uses-library android:name="android.test.runner" /> diff --git a/tests/net/common/Android.bp b/tests/net/common/Android.bp index e44d46088c43..46d680fc4511 100644 --- a/tests/net/common/Android.bp +++ b/tests/net/common/Android.bp @@ -20,6 +20,7 @@ java_library { name: "FrameworksNetCommonTests", srcs: ["java/**/*.java", "java/**/*.kt"], static_libs: [ + "androidx.core_core", "androidx.test.rules", "junit", "mockito-target-minus-junit4", diff --git a/tests/net/common/java/android/net/LinkPropertiesTest.java b/tests/net/common/java/android/net/LinkPropertiesTest.java index 48b65e592f39..2b5720a47eb6 100644 --- a/tests/net/common/java/android/net/LinkPropertiesTest.java +++ b/tests/net/common/java/android/net/LinkPropertiesTest.java @@ -29,12 +29,19 @@ import static org.junit.Assert.fail; import android.net.LinkProperties.ProvisioningChange; import android.net.util.LinkPropertiesUtils.CompareResult; +import android.os.Build; import android.system.OsConstants; import android.util.ArraySet; +import androidx.core.os.BuildCompat; import androidx.test.filters.SmallTest; import androidx.test.runner.AndroidJUnit4; +import com.android.testutils.DevSdkIgnoreRule; +import com.android.testutils.DevSdkIgnoreRule.IgnoreAfter; +import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo; + +import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -50,6 +57,9 @@ import java.util.Set; @RunWith(AndroidJUnit4.class) @SmallTest public class LinkPropertiesTest { + @Rule + public final DevSdkIgnoreRule ignoreRule = new DevSdkIgnoreRule(); + private static final InetAddress ADDRV4 = address("75.208.6.1"); private static final InetAddress ADDRV6 = address("2001:0db8:85a3:0000:0000:8a2e:0370:7334"); private static final InetAddress DNS1 = address("75.208.7.1"); @@ -76,13 +86,23 @@ public class LinkPropertiesTest { private static final LinkAddress LINKADDRV6 = new LinkAddress(ADDRV6, 128); private static final LinkAddress LINKADDRV6LINKLOCAL = new LinkAddress("fe80::1/64"); private static final Uri CAPPORT_API_URL = Uri.parse("https://test.example.com/capportapi"); - private static final CaptivePortalData CAPPORT_DATA = new CaptivePortalData.Builder() - .setVenueInfoUrl(Uri.parse("https://test.example.com/venue")).build(); + + // CaptivePortalData cannot be in a constant as it does not exist on Q. + // The test runner also crashes when scanning for tests if it is a return type. + private static Object getCaptivePortalData() { + return new CaptivePortalData.Builder() + .setVenueInfoUrl(Uri.parse("https://test.example.com/venue")).build(); + } private static InetAddress address(String addrString) { return InetAddresses.parseNumericAddress(addrString); } + private static boolean isAtLeastR() { + // BuildCompat.isAtLeastR is documented to return false on release SDKs (including R) + return Build.VERSION.SDK_INT > Build.VERSION_CODES.Q || BuildCompat.isAtLeastR(); + } + private void checkEmpty(final LinkProperties lp) { assertEquals(0, lp.getAllInterfaceNames().size()); assertEquals(0, lp.getAllAddresses().size()); @@ -98,14 +118,17 @@ public class LinkPropertiesTest { assertNull(lp.getHttpProxy()); assertNull(lp.getTcpBufferSizes()); assertNull(lp.getNat64Prefix()); - assertNull(lp.getDhcpServerAddress()); assertFalse(lp.isProvisioned()); assertFalse(lp.isIpv4Provisioned()); assertFalse(lp.isIpv6Provisioned()); assertFalse(lp.isPrivateDnsActive()); - assertFalse(lp.isWakeOnLanSupported()); - assertNull(lp.getCaptivePortalApiUrl()); - assertNull(lp.getCaptivePortalData()); + + if (isAtLeastR()) { + assertNull(lp.getDhcpServerAddress()); + assertFalse(lp.isWakeOnLanSupported()); + assertNull(lp.getCaptivePortalApiUrl()); + assertNull(lp.getCaptivePortalData()); + } } private LinkProperties makeTestObject() { @@ -127,10 +150,12 @@ public class LinkPropertiesTest { lp.setMtu(MTU); lp.setTcpBufferSizes(TCP_BUFFER_SIZES); lp.setNat64Prefix(new IpPrefix("2001:db8:0:64::/96")); - lp.setDhcpServerAddress(DHCPSERVER); - lp.setWakeOnLanSupported(true); - lp.setCaptivePortalApiUrl(CAPPORT_API_URL); - lp.setCaptivePortalData(CAPPORT_DATA); + if (isAtLeastR()) { + lp.setDhcpServerAddress(DHCPSERVER); + lp.setWakeOnLanSupported(true); + lp.setCaptivePortalApiUrl(CAPPORT_API_URL); + lp.setCaptivePortalData((CaptivePortalData) getCaptivePortalData()); + } return lp; } @@ -169,14 +194,19 @@ public class LinkPropertiesTest { assertTrue(source.isIdenticalTcpBufferSizes(target)); assertTrue(target.isIdenticalTcpBufferSizes(source)); - assertTrue(source.isIdenticalWakeOnLan(target)); - assertTrue(target.isIdenticalWakeOnLan(source)); + if (isAtLeastR()) { + assertTrue(source.isIdenticalDhcpServerAddress(target)); + assertTrue(source.isIdenticalDhcpServerAddress(source)); - assertTrue(source.isIdenticalCaptivePortalApiUrl(target)); - assertTrue(target.isIdenticalCaptivePortalApiUrl(source)); + assertTrue(source.isIdenticalWakeOnLan(target)); + assertTrue(target.isIdenticalWakeOnLan(source)); - assertTrue(source.isIdenticalCaptivePortalData(target)); - assertTrue(target.isIdenticalCaptivePortalData(source)); + assertTrue(source.isIdenticalCaptivePortalApiUrl(target)); + assertTrue(target.isIdenticalCaptivePortalApiUrl(source)); + + assertTrue(source.isIdenticalCaptivePortalData(target)); + assertTrue(target.isIdenticalCaptivePortalData(source)); + } // Check result of equals(). assertTrue(source.equals(target)); @@ -943,8 +973,7 @@ public class LinkPropertiesTest { assertEquals(new ArraySet<>(expectRemoved), (new ArraySet<>(result.removed))); } - @Test - public void testLinkPropertiesParcelable() throws Exception { + private static LinkProperties makeLinkPropertiesForParceling() { LinkProperties source = new LinkProperties(); source.setInterfaceName(NAME); @@ -978,17 +1007,29 @@ public class LinkPropertiesTest { source.setNat64Prefix(new IpPrefix("2001:db8:1:2:64:64::/96")); - source.setWakeOnLanSupported(true); - source.setCaptivePortalApiUrl(CAPPORT_API_URL); - source.setCaptivePortalData(CAPPORT_DATA); - - source.setDhcpServerAddress((Inet4Address) GATEWAY1); - final LinkProperties stacked = new LinkProperties(); stacked.setInterfaceName("test-stacked"); source.addStackedLink(stacked); - assertParcelSane(source.makeSensitiveFieldsParcelingCopy(), 18 /* fieldCount */); + return source; + } + + @Test @IgnoreAfter(Build.VERSION_CODES.Q) + public void testLinkPropertiesParcelable_Q() throws Exception { + final LinkProperties source = makeLinkPropertiesForParceling(); + assertParcelSane(source, 14 /* fieldCount */); + } + + @Test @IgnoreUpTo(Build.VERSION_CODES.Q) + public void testLinkPropertiesParcelable() throws Exception { + final LinkProperties source = makeLinkPropertiesForParceling(); + + source.setWakeOnLanSupported(true); + source.setCaptivePortalApiUrl(CAPPORT_API_URL); + source.setCaptivePortalData((CaptivePortalData) getCaptivePortalData()); + source.setDhcpServerAddress((Inet4Address) GATEWAY1); + assertParcelSane(new LinkProperties(source, true /* parcelSensitiveFields */), + 18 /* fieldCount */); // Verify that without using a sensitiveFieldsParcelingCopy, sensitive fields are cleared. final LinkProperties sanitized = new LinkProperties(source); @@ -997,7 +1038,8 @@ public class LinkPropertiesTest { assertEquals(sanitized, parcelingRoundTrip(source)); } - @Test + // Parceling of the scope was broken until Q-QPR2 + @Test @IgnoreUpTo(Build.VERSION_CODES.Q) public void testLinkLocalDnsServerParceling() throws Exception { final String strAddress = "fe80::1%lo"; final LinkProperties lp = new LinkProperties(); @@ -1120,7 +1162,7 @@ public class LinkPropertiesTest { assertFalse(lp.isPrivateDnsActive()); } - @Test + @Test @IgnoreUpTo(Build.VERSION_CODES.Q) public void testDhcpServerAddress() { final LinkProperties lp = makeTestObject(); assertEquals(DHCPSERVER, lp.getDhcpServerAddress()); @@ -1129,7 +1171,7 @@ public class LinkPropertiesTest { assertNull(lp.getDhcpServerAddress()); } - @Test + @Test @IgnoreUpTo(Build.VERSION_CODES.Q) public void testWakeOnLanSupported() { final LinkProperties lp = makeTestObject(); assertTrue(lp.isWakeOnLanSupported()); @@ -1138,7 +1180,7 @@ public class LinkPropertiesTest { assertFalse(lp.isWakeOnLanSupported()); } - @Test + @Test @IgnoreUpTo(Build.VERSION_CODES.Q) public void testCaptivePortalApiUrl() { final LinkProperties lp = makeTestObject(); assertEquals(CAPPORT_API_URL, lp.getCaptivePortalApiUrl()); @@ -1147,10 +1189,10 @@ public class LinkPropertiesTest { assertNull(lp.getCaptivePortalApiUrl()); } - @Test + @Test @IgnoreUpTo(Build.VERSION_CODES.Q) public void testCaptivePortalData() { final LinkProperties lp = makeTestObject(); - assertEquals(CAPPORT_DATA, lp.getCaptivePortalData()); + assertEquals(getCaptivePortalData(), lp.getCaptivePortalData()); lp.clear(); assertNull(lp.getCaptivePortalData()); diff --git a/tests/net/common/java/android/net/NetworkAgentConfigTest.kt b/tests/net/common/java/android/net/NetworkAgentConfigTest.kt index 173dbd1271f8..de65ba24972b 100644 --- a/tests/net/common/java/android/net/NetworkAgentConfigTest.kt +++ b/tests/net/common/java/android/net/NetworkAgentConfigTest.kt @@ -22,6 +22,9 @@ import androidx.test.runner.AndroidJUnit4 import com.android.testutils.DevSdkIgnoreRule import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo import com.android.testutils.assertParcelSane +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith @@ -43,4 +46,27 @@ class NetworkAgentConfigTest { }.build() assertParcelSane(config, 9) } + + @Test @IgnoreUpTo(Build.VERSION_CODES.Q) + fun testBuilder() { + val config = NetworkAgentConfig.Builder().apply { + setExplicitlySelected(true) + setLegacyType(ConnectivityManager.TYPE_ETHERNET) + setSubscriberId("MySubId") + setPartialConnectivityAcceptable(false) + setUnvalidatedConnectivityAcceptable(true) + setLegacyTypeName("TEST_NETWORK") + disableNat64Detection() + disableProvisioningNotification() + }.build() + + assertTrue(config.isExplicitlySelected()) + assertEquals(ConnectivityManager.TYPE_ETHERNET, config.getLegacyType()) + assertEquals("MySubId", config.getSubscriberId()) + assertFalse(config.isPartialConnectivityAcceptable()) + assertTrue(config.isUnvalidatedConnectivityAcceptable()) + assertEquals("TEST_NETWORK", config.getLegacyTypeName()) + assertFalse(config.isNat64DetectionEnabled()) + assertFalse(config.isProvisioningNotificationEnabled()) + } } diff --git a/tests/net/common/java/android/net/util/SocketUtilsTest.kt b/tests/net/common/java/android/net/util/SocketUtilsTest.kt index 9c7cfb0c716e..aaf97f36889b 100644 --- a/tests/net/common/java/android/net/util/SocketUtilsTest.kt +++ b/tests/net/common/java/android/net/util/SocketUtilsTest.kt @@ -14,8 +14,9 @@ * limitations under the License. */ -package android.net.util; +package android.net.util +import android.os.Build import android.system.NetlinkSocketAddress import android.system.Os import android.system.OsConstants.AF_INET @@ -26,18 +27,26 @@ import android.system.OsConstants.SOCK_DGRAM import android.system.PacketSocketAddress import androidx.test.filters.SmallTest import androidx.test.runner.AndroidJUnit4 +import com.android.testutils.DevSdkIgnoreRule +import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo import org.junit.Assert.assertEquals import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Assert.fail +import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith private const val TEST_INDEX = 123 private const val TEST_PORT = 555 +private const val FF_BYTE = 0xff.toByte() + @RunWith(AndroidJUnit4::class) @SmallTest class SocketUtilsTest { + @Rule @JvmField + val ignoreRule = DevSdkIgnoreRule() + @Test fun testMakeNetlinkSocketAddress() { val nlAddress = SocketUtils.makeNetlinkSocketAddress(TEST_PORT, RTMGRP_NEIGH) @@ -50,16 +59,21 @@ class SocketUtilsTest { } @Test - fun testMakePacketSocketAddress() { + fun testMakePacketSocketAddress_Q() { val pkAddress = SocketUtils.makePacketSocketAddress(ETH_P_ALL, TEST_INDEX) assertTrue("Not PacketSocketAddress object", pkAddress is PacketSocketAddress) - val ff = 0xff.toByte() - val pkAddress2 = SocketUtils.makePacketSocketAddress(TEST_INDEX, - byteArrayOf(ff, ff, ff, ff, ff, ff)) + val pkAddress2 = SocketUtils.makePacketSocketAddress(TEST_INDEX, ByteArray(6) { FF_BYTE }) assertTrue("Not PacketSocketAddress object", pkAddress2 is PacketSocketAddress) } + @Test @IgnoreUpTo(Build.VERSION_CODES.Q) + fun testMakePacketSocketAddress() { + val pkAddress = SocketUtils.makePacketSocketAddress( + ETH_P_ALL, TEST_INDEX, ByteArray(6) { FF_BYTE }) + assertTrue("Not PacketSocketAddress object", pkAddress is PacketSocketAddress) + } + @Test fun testCloseSocket() { // Expect no exception happening with null object. diff --git a/tests/net/java/android/net/IpMemoryStoreTest.java b/tests/net/java/android/net/IpMemoryStoreTest.java index b81ca36429ff..442ac5605e90 100644 --- a/tests/net/java/android/net/IpMemoryStoreTest.java +++ b/tests/net/java/android/net/IpMemoryStoreTest.java @@ -35,6 +35,7 @@ import android.net.ipmemorystore.IOnStatusListener; import android.net.ipmemorystore.NetworkAttributes; import android.net.ipmemorystore.NetworkAttributesParcelable; import android.net.ipmemorystore.Status; +import android.net.networkstack.ModuleNetworkStackClient; import android.os.RemoteException; import androidx.test.filters.SmallTest; @@ -67,7 +68,7 @@ public class IpMemoryStoreTest { @Mock Context mMockContext; @Mock - NetworkStackClient mNetworkStackClient; + ModuleNetworkStackClient mModuleNetworkStackClient; @Mock IIpMemoryStore mMockService; @Mock @@ -90,14 +91,14 @@ public class IpMemoryStoreTest { ((IIpMemoryStoreCallbacks) invocation.getArgument(0)) .onIpMemoryStoreFetched(mMockService); return null; - }).when(mNetworkStackClient).fetchIpMemoryStore(any()); + }).when(mModuleNetworkStackClient).fetchIpMemoryStore(any()); } else { - doNothing().when(mNetworkStackClient).fetchIpMemoryStore(mCbCaptor.capture()); + doNothing().when(mModuleNetworkStackClient).fetchIpMemoryStore(mCbCaptor.capture()); } mStore = new IpMemoryStore(mMockContext) { @Override - protected NetworkStackClient getNetworkStackClient() { - return mNetworkStackClient; + protected ModuleNetworkStackClient getModuleNetworkStackClient(Context ctx) { + return mModuleNetworkStackClient; } }; } diff --git a/tests/net/java/android/net/NetworkStatsTest.java b/tests/net/java/android/net/NetworkStatsTest.java index 33d77d288e15..e71d5995255d 100644 --- a/tests/net/java/android/net/NetworkStatsTest.java +++ b/tests/net/java/android/net/NetworkStatsTest.java @@ -64,15 +64,15 @@ public class NetworkStatsTest { @Test public void testFindIndex() throws Exception { final NetworkStats stats = new NetworkStats(TEST_START, 5) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 1024L, 8L, 0L, 0L, 10) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 0L, 0L, 1024L, 8L, 11) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_YES, 0L, 0L, 1024L, 8L, 11) - .addEntry(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 1024L, 8L, 1024L, 8L, 12) - .addEntry(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_YES, + .insertEntry(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_YES, DEFAULT_NETWORK_YES, 1024L, 8L, 1024L, 8L, 12); assertEquals(4, stats.findIndex(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, METERED_YES, @@ -94,21 +94,21 @@ public class NetworkStatsTest { @Test public void testFindIndexHinted() { final NetworkStats stats = new NetworkStats(TEST_START, 3) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 1024L, 8L, 0L, 0L, 10) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 0L, 0L, 1024L, 8L, 11) - .addEntry(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 1024L, 8L, 1024L, 8L, 12) - .addEntry(TEST_IFACE2, 100, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE2, 100, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 1024L, 8L, 0L, 0L, 10) - .addEntry(TEST_IFACE2, 101, SET_DEFAULT, 0xF00D, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE2, 101, SET_DEFAULT, 0xF00D, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 0L, 0L, 1024L, 8L, 11) - .addEntry(TEST_IFACE2, 101, SET_DEFAULT, 0xF00D, METERED_YES, ROAMING_NO, + .insertEntry(TEST_IFACE2, 101, SET_DEFAULT, 0xF00D, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_NO, 0L, 0L, 1024L, 8L, 11) - .addEntry(TEST_IFACE2, 102, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE2, 102, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 1024L, 8L, 1024L, 8L, 12) - .addEntry(TEST_IFACE2, 102, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_YES, + .insertEntry(TEST_IFACE2, 102, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_YES, DEFAULT_NETWORK_NO, 1024L, 8L, 1024L, 8L, 12); // verify that we correctly find across regardless of hinting @@ -143,27 +143,27 @@ public class NetworkStatsTest { assertEquals(0, stats.size()); assertEquals(4, stats.internalSize()); - stats.addEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + stats.insertEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 1L, 1L, 2L, 2L, 3); - stats.addEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + stats.insertEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 2L, 2L, 2L, 2L, 4); - stats.addEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_YES, + stats.insertEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_YES, DEFAULT_NETWORK_YES, 3L, 3L, 2L, 2L, 5); - stats.addEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_YES, + stats.insertEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_YES, DEFAULT_NETWORK_NO, 3L, 3L, 2L, 2L, 5); assertEquals(4, stats.size()); assertEquals(4, stats.internalSize()); - stats.addEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + stats.insertEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 4L, 40L, 4L, 40L, 7); - stats.addEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + stats.insertEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 5L, 50L, 4L, 40L, 8); - stats.addEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + stats.insertEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 6L, 60L, 5L, 50L, 10); - stats.addEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_YES, + stats.insertEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_YES, DEFAULT_NETWORK_YES, 7L, 70L, 5L, 50L, 11); - stats.addEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_YES, + stats.insertEntry(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_YES, DEFAULT_NETWORK_NO, 7L, 70L, 5L, 50L, 11); assertEquals(9, stats.size()); @@ -193,8 +193,8 @@ public class NetworkStatsTest { public void testCombineExisting() throws Exception { final NetworkStats stats = new NetworkStats(TEST_START, 10); - stats.addEntry(TEST_IFACE, 1001, SET_DEFAULT, TAG_NONE, 512L, 4L, 256L, 2L, 10); - stats.addEntry(TEST_IFACE, 1001, SET_DEFAULT, 0xff, 128L, 1L, 128L, 1L, 2); + stats.insertEntry(TEST_IFACE, 1001, SET_DEFAULT, TAG_NONE, 512L, 4L, 256L, 2L, 10); + stats.insertEntry(TEST_IFACE, 1001, SET_DEFAULT, 0xff, 128L, 1L, 128L, 1L, 2); stats.combineValues(TEST_IFACE, 1001, SET_DEFAULT, TAG_NONE, -128L, -1L, -128L, -1L, -1); @@ -215,12 +215,12 @@ public class NetworkStatsTest { @Test public void testSubtractIdenticalData() throws Exception { final NetworkStats before = new NetworkStats(TEST_START, 2) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12); + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11) + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12); final NetworkStats after = new NetworkStats(TEST_START, 2) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12); + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11) + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12); final NetworkStats result = after.subtract(before); @@ -234,12 +234,12 @@ public class NetworkStatsTest { @Test public void testSubtractIdenticalRows() throws Exception { final NetworkStats before = new NetworkStats(TEST_START, 2) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12); + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11) + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12); final NetworkStats after = new NetworkStats(TEST_START, 2) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1025L, 9L, 2L, 1L, 15) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 3L, 1L, 1028L, 9L, 20); + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1025L, 9L, 2L, 1L, 15) + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 3L, 1L, 1028L, 9L, 20); final NetworkStats result = after.subtract(before); @@ -253,13 +253,13 @@ public class NetworkStatsTest { @Test public void testSubtractNewRows() throws Exception { final NetworkStats before = new NetworkStats(TEST_START, 2) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12); + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11) + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12); final NetworkStats after = new NetworkStats(TEST_START, 3) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12) - .addEntry(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, 1024L, 8L, 1024L, 8L, 20); + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 1024L, 8L, 0L, 0L, 11) + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 0L, 0L, 1024L, 8L, 12) + .insertEntry(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, 1024L, 8L, 1024L, 8L, 20); final NetworkStats result = after.subtract(before); @@ -275,11 +275,11 @@ public class NetworkStatsTest { @Test public void testSubtractMissingRows() throws Exception { final NetworkStats before = new NetworkStats(TEST_START, 2) - .addEntry(TEST_IFACE, UID_ALL, SET_DEFAULT, TAG_NONE, 1024L, 0L, 0L, 0L, 0) - .addEntry(TEST_IFACE2, UID_ALL, SET_DEFAULT, TAG_NONE, 2048L, 0L, 0L, 0L, 0); + .insertEntry(TEST_IFACE, UID_ALL, SET_DEFAULT, TAG_NONE, 1024L, 0L, 0L, 0L, 0) + .insertEntry(TEST_IFACE2, UID_ALL, SET_DEFAULT, TAG_NONE, 2048L, 0L, 0L, 0L, 0); final NetworkStats after = new NetworkStats(TEST_START, 1) - .addEntry(TEST_IFACE2, UID_ALL, SET_DEFAULT, TAG_NONE, 2049L, 2L, 3L, 4L, 0); + .insertEntry(TEST_IFACE2, UID_ALL, SET_DEFAULT, TAG_NONE, 2049L, 2L, 3L, 4L, 0); final NetworkStats result = after.subtract(before); @@ -293,40 +293,40 @@ public class NetworkStatsTest { @Test public void testTotalBytes() throws Exception { final NetworkStats iface = new NetworkStats(TEST_START, 2) - .addEntry(TEST_IFACE, UID_ALL, SET_DEFAULT, TAG_NONE, 128L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE2, UID_ALL, SET_DEFAULT, TAG_NONE, 256L, 0L, 0L, 0L, 0L); + .insertEntry(TEST_IFACE, UID_ALL, SET_DEFAULT, TAG_NONE, 128L, 0L, 0L, 0L, 0L) + .insertEntry(TEST_IFACE2, UID_ALL, SET_DEFAULT, TAG_NONE, 256L, 0L, 0L, 0L, 0L); assertEquals(384L, iface.getTotalBytes()); final NetworkStats uidSet = new NetworkStats(TEST_START, 3) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 32L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 32L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_FOREGROUND, TAG_NONE, 32L, 0L, 0L, 0L, 0L); + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 32L, 0L, 0L, 0L, 0L) + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 32L, 0L, 0L, 0L, 0L) + .insertEntry(TEST_IFACE, 101, SET_FOREGROUND, TAG_NONE, 32L, 0L, 0L, 0L, 0L); assertEquals(96L, uidSet.getTotalBytes()); final NetworkStats uidTag = new NetworkStats(TEST_START, 6) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 16L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE2, 100, SET_DEFAULT, TAG_NONE, 16L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE2, 100, SET_DEFAULT, 0xF00D, 8L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE2, 100, SET_FOREGROUND, TAG_NONE, 16L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 16L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, 0xF00D, 8L, 0L, 0L, 0L, 0L); + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 16L, 0L, 0L, 0L, 0L) + .insertEntry(TEST_IFACE2, 100, SET_DEFAULT, TAG_NONE, 16L, 0L, 0L, 0L, 0L) + .insertEntry(TEST_IFACE2, 100, SET_DEFAULT, 0xF00D, 8L, 0L, 0L, 0L, 0L) + .insertEntry(TEST_IFACE2, 100, SET_FOREGROUND, TAG_NONE, 16L, 0L, 0L, 0L, 0L) + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 16L, 0L, 0L, 0L, 0L) + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, 0xF00D, 8L, 0L, 0L, 0L, 0L); assertEquals(64L, uidTag.getTotalBytes()); final NetworkStats uidMetered = new NetworkStats(TEST_START, 3) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 32L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_NO, 32L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_YES, 32L, 0L, 0L, 0L, 0L); assertEquals(96L, uidMetered.getTotalBytes()); final NetworkStats uidRoaming = new NetworkStats(TEST_START, 3) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 32L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_NO, 32L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_YES, + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_YES, DEFAULT_NETWORK_YES, 32L, 0L, 0L, 0L, 0L); assertEquals(96L, uidRoaming.getTotalBytes()); } @@ -343,11 +343,11 @@ public class NetworkStatsTest { @Test public void testGroupedByIfaceAll() throws Exception { final NetworkStats uidStats = new NetworkStats(TEST_START, 3) - .addEntry(IFACE_ALL, 100, SET_ALL, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(IFACE_ALL, 100, SET_ALL, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 128L, 8L, 0L, 2L, 20L) - .addEntry(IFACE_ALL, 101, SET_FOREGROUND, TAG_NONE, METERED_YES, ROAMING_NO, + .insertEntry(IFACE_ALL, 101, SET_FOREGROUND, TAG_NONE, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_NO, 128L, 8L, 0L, 2L, 20L) - .addEntry(IFACE_ALL, 101, SET_ALL, TAG_NONE, METERED_NO, ROAMING_YES, + .insertEntry(IFACE_ALL, 101, SET_ALL, TAG_NONE, METERED_NO, ROAMING_YES, DEFAULT_NETWORK_YES, 128L, 8L, 0L, 2L, 20L); final NetworkStats grouped = uidStats.groupedByIface(); @@ -361,19 +361,19 @@ public class NetworkStatsTest { @Test public void testGroupedByIface() throws Exception { final NetworkStats uidStats = new NetworkStats(TEST_START, 7) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 128L, 8L, 0L, 2L, 20L) - .addEntry(TEST_IFACE2, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE2, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 512L, 32L, 0L, 0L, 0L) - .addEntry(TEST_IFACE2, 100, SET_DEFAULT, 0xF00D, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE2, 100, SET_DEFAULT, 0xF00D, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 64L, 4L, 0L, 0L, 0L) - .addEntry(TEST_IFACE2, 100, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE2, 100, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 512L, 32L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 128L, 8L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, 0xF00D, METERED_YES, ROAMING_NO, + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, 0xF00D, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_NO, 128L, 8L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_YES, + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_YES, DEFAULT_NETWORK_YES, 128L, 8L, 0L, 0L, 0L); final NetworkStats grouped = uidStats.groupedByIface(); @@ -390,19 +390,19 @@ public class NetworkStatsTest { @Test public void testAddAllValues() { final NetworkStats first = new NetworkStats(TEST_START, 5) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_YES, 32L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 100, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, 100, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 32L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 100, SET_FOREGROUND, TAG_NONE, METERED_YES, ROAMING_YES, + .insertEntry(TEST_IFACE, 100, SET_FOREGROUND, TAG_NONE, METERED_YES, ROAMING_YES, DEFAULT_NETWORK_YES, 32L, 0L, 0L, 0L, 0L); final NetworkStats second = new NetworkStats(TEST_START, 2) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_YES, 32L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE2, UID_ALL, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE2, UID_ALL, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 32L, 0L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 100, SET_FOREGROUND, TAG_NONE, METERED_YES, ROAMING_YES, + .insertEntry(TEST_IFACE, 100, SET_FOREGROUND, TAG_NONE, METERED_YES, ROAMING_YES, DEFAULT_NETWORK_YES, 32L, 0L, 0L, 0L, 0L); first.combineAllValues(second); @@ -421,19 +421,19 @@ public class NetworkStatsTest { @Test public void testGetTotal() { final NetworkStats stats = new NetworkStats(TEST_START, 7) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 128L, 8L, 0L, 2L, 20L) - .addEntry(TEST_IFACE2, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE2, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 512L, 32L, 0L, 0L, 0L) - .addEntry(TEST_IFACE2, 100, SET_DEFAULT, 0xF00D, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE2, 100, SET_DEFAULT, 0xF00D, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 64L, 4L, 0L, 0L, 0L) - .addEntry(TEST_IFACE2, 100, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE2, 100, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 512L,32L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_YES, 128L, 8L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, 0xF00D, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, 0xF00D, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 128L, 8L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_YES, + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_YES, DEFAULT_NETWORK_NO, 128L, 8L, 0L, 0L, 0L); assertValues(stats.getTotal(null), 1408L, 88L, 0L, 2L, 20L); @@ -459,7 +459,7 @@ public class NetworkStatsTest { assertEquals(0, after.size()); // Test 1 item stats. - before.addEntry(TEST_IFACE, 99, SET_DEFAULT, TAG_NONE, 1L, 128L, 0L, 2L, 20L); + before.insertEntry(TEST_IFACE, 99, SET_DEFAULT, TAG_NONE, 1L, 128L, 0L, 2L, 20L); after = before.clone(); after.removeUids(new int[0]); assertEquals(1, after.size()); @@ -469,12 +469,12 @@ public class NetworkStatsTest { assertEquals(0, after.size()); // Append remaining test items. - before.addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 2L, 64L, 0L, 2L, 20L) - .addEntry(TEST_IFACE2, 100, SET_DEFAULT, TAG_NONE, 4L, 32L, 0L, 0L, 0L) - .addEntry(TEST_IFACE2, 100, SET_DEFAULT, 0xF00D, 8L, 16L, 0L, 0L, 0L) - .addEntry(TEST_IFACE2, 100, SET_FOREGROUND, TAG_NONE, 16L, 8L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 32L, 4L, 0L, 0L, 0L) - .addEntry(TEST_IFACE, 101, SET_DEFAULT, 0xF00D, 64L, 2L, 0L, 0L, 0L); + before.insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 2L, 64L, 0L, 2L, 20L) + .insertEntry(TEST_IFACE2, 100, SET_DEFAULT, TAG_NONE, 4L, 32L, 0L, 0L, 0L) + .insertEntry(TEST_IFACE2, 100, SET_DEFAULT, 0xF00D, 8L, 16L, 0L, 0L, 0L) + .insertEntry(TEST_IFACE2, 100, SET_FOREGROUND, TAG_NONE, 16L, 8L, 0L, 0L, 0L) + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 32L, 4L, 0L, 0L, 0L) + .insertEntry(TEST_IFACE, 101, SET_DEFAULT, 0xF00D, 64L, 2L, 0L, 0L, 0L); assertEquals(7, before.size()); // Test remove with empty uid list. @@ -505,12 +505,12 @@ public class NetworkStatsTest { @Test public void testClone() throws Exception { final NetworkStats original = new NetworkStats(TEST_START, 5) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 128L, 8L, 0L, 2L, 20L) - .addEntry(TEST_IFACE2, 100, SET_DEFAULT, TAG_NONE, 512L, 32L, 0L, 0L, 0L); + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 128L, 8L, 0L, 2L, 20L) + .insertEntry(TEST_IFACE2, 100, SET_DEFAULT, TAG_NONE, 512L, 32L, 0L, 0L, 0L); // make clone and mutate original final NetworkStats clone = original.clone(); - original.addEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 128L, 8L, 0L, 0L, 0L); + original.insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, 128L, 8L, 0L, 0L, 0L); assertEquals(3, original.size()); assertEquals(2, clone.size()); @@ -523,8 +523,8 @@ public class NetworkStatsTest { public void testAddWhenEmpty() throws Exception { final NetworkStats red = new NetworkStats(TEST_START, -1); final NetworkStats blue = new NetworkStats(TEST_START, 5) - .addEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 128L, 8L, 0L, 2L, 20L) - .addEntry(TEST_IFACE2, 100, SET_DEFAULT, TAG_NONE, 512L, 32L, 0L, 0L, 0L); + .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, 128L, 8L, 0L, 2L, 20L) + .insertEntry(TEST_IFACE2, 100, SET_DEFAULT, TAG_NONE, 512L, 32L, 0L, 0L, 0L); // We're mostly checking that we don't crash red.combineAllValues(blue); @@ -537,37 +537,37 @@ public class NetworkStatsTest { final String underlyingIface = "wlan0"; final int testTag1 = 8888; NetworkStats delta = new NetworkStats(TEST_START, 17) - .addEntry(tunIface, 10100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(tunIface, 10100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 39605L, 46L, 12259L, 55L, 0L) - .addEntry(tunIface, 10100, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(tunIface, 10100, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 0L, 0L, 0L, 0L, 0L) - .addEntry(tunIface, 10120, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(tunIface, 10120, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 72667L, 197L, 43909L, 241L, 0L) - .addEntry(tunIface, 10120, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(tunIface, 10120, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 9297L, 17L, 4128L, 21L, 0L) // VPN package also uses some traffic through unprotected network. - .addEntry(tunIface, tunUid, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(tunIface, tunUid, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 4983L, 10L, 1801L, 12L, 0L) - .addEntry(tunIface, tunUid, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(tunIface, tunUid, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 0L, 0L, 0L, 0L, 0L) // Tag entries - .addEntry(tunIface, 10120, SET_DEFAULT, testTag1, METERED_NO, ROAMING_NO, + .insertEntry(tunIface, 10120, SET_DEFAULT, testTag1, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 21691L, 41L, 13820L, 51L, 0L) - .addEntry(tunIface, 10120, SET_FOREGROUND, testTag1, METERED_NO, ROAMING_NO, + .insertEntry(tunIface, 10120, SET_FOREGROUND, testTag1, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 1281L, 2L, 665L, 2L, 0L) // Irrelevant entries - .addEntry(TEST_IFACE, 10100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, 10100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 1685L, 5L, 2070L, 6L, 0L) // Underlying Iface entries - .addEntry(underlyingIface, 10100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(underlyingIface, 10100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 5178L, 8L, 2139L, 11L, 0L) - .addEntry(underlyingIface, 10100, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, - DEFAULT_NETWORK_NO, 0L, 0L, 0L, 0L, 0L) - .addEntry(underlyingIface, tunUid, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(underlyingIface, 10100, SET_FOREGROUND, TAG_NONE, METERED_NO, + ROAMING_NO, DEFAULT_NETWORK_NO, 0L, 0L, 0L, 0L, 0L) + .insertEntry(underlyingIface, tunUid, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 149873L, 287L, 59217L /* smaller than sum(tun0) */, 299L /* smaller than sum(tun0) */, 0L) - .addEntry(underlyingIface, tunUid, SET_FOREGROUND, TAG_NONE, METERED_NO, ROAMING_NO, - DEFAULT_NETWORK_NO, 0L, 0L, 0L, 0L, 0L); + .insertEntry(underlyingIface, tunUid, SET_FOREGROUND, TAG_NONE, METERED_NO, + ROAMING_NO, DEFAULT_NETWORK_NO, 0L, 0L, 0L, 0L, 0L); delta.migrateTun(tunUid, tunIface, new String[]{underlyingIface}); assertEquals(20, delta.size()); @@ -635,19 +635,19 @@ public class NetworkStatsTest { final String underlyingIface = "wlan0"; NetworkStats delta = new NetworkStats(TEST_START, 9) // 2 different apps sent/receive data via tun0. - .addEntry(tunIface, 10100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(tunIface, 10100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L) - .addEntry(tunIface, 20100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(tunIface, 20100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 500L, 2L, 200L, 5L, 0L) // VPN package resends data through the tunnel (with exaggerated overhead) - .addEntry(tunIface, tunUid, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(tunIface, tunUid, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 240000, 100L, 120000L, 60L, 0L) // 1 app already has some traffic on the underlying interface, the other doesn't yet - .addEntry(underlyingIface, 10100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(underlyingIface, 10100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 1000L, 10L, 2000L, 20L, 0L) // Traffic through the underlying interface via the vpn app. // This test should redistribute this data correctly. - .addEntry(underlyingIface, tunUid, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(underlyingIface, tunUid, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, 75500L, 37L, 130000L, 70L, 0L); delta.migrateTun(tunUid, tunIface, new String[]{underlyingIface}); @@ -697,9 +697,9 @@ public class NetworkStatsTest { DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L); NetworkStats stats = new NetworkStats(TEST_START, 3) - .addEntry(entry1) - .addEntry(entry2) - .addEntry(entry3); + .insertEntry(entry1) + .insertEntry(entry2) + .insertEntry(entry3); stats.filter(UID_ALL, INTERFACES_ALL, TAG_ALL); assertEquals(3, stats.size()); @@ -724,9 +724,9 @@ public class NetworkStatsTest { DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L); NetworkStats stats = new NetworkStats(TEST_START, 3) - .addEntry(entry1) - .addEntry(entry2) - .addEntry(entry3); + .insertEntry(entry1) + .insertEntry(entry2) + .insertEntry(entry3); stats.filter(testUid, INTERFACES_ALL, TAG_ALL); assertEquals(2, stats.size()); @@ -755,10 +755,10 @@ public class NetworkStatsTest { DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L); NetworkStats stats = new NetworkStats(TEST_START, 4) - .addEntry(entry1) - .addEntry(entry2) - .addEntry(entry3) - .addEntry(entry4); + .insertEntry(entry1) + .insertEntry(entry2) + .insertEntry(entry3) + .insertEntry(entry4); stats.filter(UID_ALL, new String[] { testIf1, testIf2 }, TAG_ALL); assertEquals(3, stats.size()); @@ -778,8 +778,8 @@ public class NetworkStatsTest { DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L); NetworkStats stats = new NetworkStats(TEST_START, 3) - .addEntry(entry1) - .addEntry(entry2); + .insertEntry(entry1) + .insertEntry(entry2); stats.filter(UID_ALL, new String[] { }, TAG_ALL); assertEquals(0, stats.size()); @@ -802,9 +802,9 @@ public class NetworkStatsTest { DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L); NetworkStats stats = new NetworkStats(TEST_START, 3) - .addEntry(entry1) - .addEntry(entry2) - .addEntry(entry3); + .insertEntry(entry1) + .insertEntry(entry2) + .insertEntry(entry3); stats.filter(UID_ALL, INTERFACES_ALL, testTag); assertEquals(2, stats.size()); @@ -831,10 +831,10 @@ public class NetworkStatsTest { DEFAULT_NETWORK_NO, 50000L, 25L, 100000L, 50L, 0L); NetworkStats stats = new NetworkStats(TEST_START, 4) - .addEntry(entry1) - .addEntry(entry2) - .addEntry(entry3) - .addEntry(entry4); + .insertEntry(entry1) + .insertEntry(entry2) + .insertEntry(entry3) + .insertEntry(entry4); stats.filterDebugEntries(); @@ -891,14 +891,14 @@ public class NetworkStatsTest { 0 /* operations */); final NetworkStats statsXt = new NetworkStats(TEST_START, 3) - .addEntry(appEntry) - .addEntry(xtRootUidEntry) - .addEntry(otherEntry); + .insertEntry(appEntry) + .insertEntry(xtRootUidEntry) + .insertEntry(otherEntry); final NetworkStats statsEbpf = new NetworkStats(TEST_START, 3) - .addEntry(appEntry) - .addEntry(ebpfRootUidEntry) - .addEntry(otherEntry); + .insertEntry(appEntry) + .insertEntry(ebpfRootUidEntry) + .insertEntry(otherEntry); statsXt.apply464xlatAdjustments(stackedIface, false); statsEbpf.apply464xlatAdjustments(stackedIface, true); @@ -945,8 +945,8 @@ public class NetworkStatsTest { 0 /* operations */); NetworkStats stats = new NetworkStats(TEST_START, 2) - .addEntry(firstEntry) - .addEntry(secondEntry); + .insertEntry(firstEntry) + .insertEntry(secondEntry); // Empty map: no adjustment stats.apply464xlatAdjustments(new ArrayMap<>(), false); diff --git a/tests/net/java/com/android/server/ConnectivityServiceTest.java b/tests/net/java/com/android/server/ConnectivityServiceTest.java index c1999dba6903..f2ef94674bd8 100644 --- a/tests/net/java/com/android/server/ConnectivityServiceTest.java +++ b/tests/net/java/com/android/server/ConnectivityServiceTest.java @@ -2425,7 +2425,7 @@ public class ConnectivityServiceTest { assertEquals(expectedRequestCount, testFactory.getMyRequestCount()); assertTrue(testFactory.getMyStartRequested()); - testFactory.unregister(); + testFactory.terminate(); if (networkCallback != null) mCm.unregisterNetworkCallback(networkCallback); handlerThread.quit(); } @@ -2451,6 +2451,38 @@ public class ConnectivityServiceTest { } @Test + public void testNetworkFactoryUnregister() throws Exception { + final NetworkCapabilities filter = new NetworkCapabilities(); + filter.clearAll(); + + final HandlerThread handlerThread = new HandlerThread("testNetworkFactoryRequests"); + handlerThread.start(); + + // Checks that calling setScoreFilter on a NetworkFactory immediately before closing it + // does not crash. + for (int i = 0; i < 100; i++) { + final MockNetworkFactory testFactory = new MockNetworkFactory(handlerThread.getLooper(), + mServiceContext, "testFactory", filter); + // Register the factory and don't be surprised when the default request arrives. + testFactory.register(); + testFactory.expectAddRequestsWithScores(0); + testFactory.waitForNetworkRequests(1); + + testFactory.setScoreFilter(42); + testFactory.terminate(); + + if (i % 2 == 0) { + try { + testFactory.register(); + fail("Re-registering terminated NetworkFactory should throw"); + } catch (IllegalStateException expected) { + } + } + } + handlerThread.quit(); + } + + @Test public void testNoMutableNetworkRequests() throws Exception { PendingIntent pendingIntent = PendingIntent.getBroadcast(mContext, 0, new Intent("a"), 0); NetworkRequest request1 = new NetworkRequest.Builder() @@ -2750,9 +2782,6 @@ public class ConnectivityServiceTest { // Expect NET_CAPABILITY_VALIDATED onAvailable callback. validatedCallback.expectAvailableDoubleValidatedCallbacks(mWiFiNetworkAgent); - // Expect no notification to be shown when captive portal disappears by itself - verify(mNotificationManager, never()).notifyAsUser( - anyString(), eq(NotificationType.LOGGED_IN.eventId), any(), any()); // Break network connectivity. // Expect NET_CAPABILITY_VALIDATED onLost callback. @@ -2814,8 +2843,6 @@ public class ConnectivityServiceTest { mWiFiNetworkAgent.mNetworkMonitor.forceReevaluation(Process.myUid()); validatedCallback.expectAvailableCallbacksValidated(mWiFiNetworkAgent); captivePortalCallback.expectCallback(CallbackEntry.LOST, mWiFiNetworkAgent); - verify(mNotificationManager, times(1)).notifyAsUser(anyString(), - eq(NotificationType.LOGGED_IN.eventId), any(), eq(UserHandle.ALL)); mCm.unregisterNetworkCallback(validatedCallback); mCm.unregisterNetworkCallback(captivePortalCallback); @@ -3487,7 +3514,7 @@ public class ConnectivityServiceTest { cellNetworkCallback.expectCallback(CallbackEntry.LOST, mCellNetworkAgent); assertLength(1, mCm.getAllNetworks()); - testFactory.unregister(); + testFactory.terminate(); mCm.unregisterNetworkCallback(cellNetworkCallback); handlerThread.quit(); } @@ -3728,7 +3755,7 @@ public class ConnectivityServiceTest { mCm.requestNetwork(nr, networkCallback, timeoutMs); // pass timeout and validate that UNAVAILABLE is called - networkCallback.expectCallback(CallbackEntry.UNAVAILABLE, null); + networkCallback.expectCallback(CallbackEntry.UNAVAILABLE, (Network) null); // create a network satisfying request - validate that request not triggered mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI); @@ -3819,7 +3846,7 @@ public class ConnectivityServiceTest { // Simulate the factory releasing the request as unfulfillable and expect onUnavailable! testFactory.triggerUnfulfillable(requests.get(newRequestId)); - networkCallback.expectCallback(CallbackEntry.UNAVAILABLE, null); + networkCallback.expectCallback(CallbackEntry.UNAVAILABLE, (Network) null); testFactory.waitForRequests(); // unregister network callback - a no-op (since already freed by the @@ -3827,7 +3854,7 @@ public class ConnectivityServiceTest { mCm.unregisterNetworkCallback(networkCallback); } - testFactory.unregister(); + testFactory.terminate(); handlerThread.quit(); } @@ -6762,6 +6789,22 @@ public class ConnectivityServiceTest { } @Test + public void testCheckConnectivityDiagnosticsPermissionsWrongUidPackageName() throws Exception { + final NetworkAgentInfo naiWithoutUid = + new NetworkAgentInfo( + null, null, null, null, null, new NetworkCapabilities(), 0, + mServiceContext, null, null, mService, null, null, null, 0); + + mServiceContext.setPermission(android.Manifest.permission.NETWORK_STACK, PERMISSION_DENIED); + + assertFalse( + "Mismatched uid/package name should not pass the location permission check", + mService.checkConnectivityDiagnosticsPermissions( + Process.myPid() + 1, Process.myUid() + 1, naiWithoutUid, + mContext.getOpPackageName())); + } + + @Test public void testCheckConnectivityDiagnosticsPermissionsNoLocationPermission() throws Exception { final NetworkAgentInfo naiWithoutUid = new NetworkAgentInfo( diff --git a/tests/net/java/com/android/server/connectivity/NetworkNotificationManagerTest.java b/tests/net/java/com/android/server/connectivity/NetworkNotificationManagerTest.java index d57f2250fc5c..47db5d431671 100644 --- a/tests/net/java/com/android/server/connectivity/NetworkNotificationManagerTest.java +++ b/tests/net/java/com/android/server/connectivity/NetworkNotificationManagerTest.java @@ -238,20 +238,6 @@ public class NetworkNotificationManagerTest { } @Test - public void testSameLevelNotifications() { - final int id = 101; - final String tag = NetworkNotificationManager.tagFor(id); - - mManager.showNotification(id, LOGGED_IN, mWifiNai, mCellNai, null, false); - verify(mNotificationManager, times(1)) - .notifyAsUser(eq(tag), eq(LOGGED_IN.eventId), any(), any()); - - mManager.showNotification(id, LOST_INTERNET, mWifiNai, mCellNai, null, false); - verify(mNotificationManager, times(1)) - .notifyAsUser(eq(tag), eq(LOST_INTERNET.eventId), any(), any()); - } - - @Test public void testClearNotificationByType() { final int id = 101; final String tag = NetworkNotificationManager.tagFor(id); @@ -259,31 +245,25 @@ public class NetworkNotificationManagerTest { // clearNotification(int id, NotificationType notifyType) will check if given type is equal // to previous type or not. If they are equal then clear the notification; if they are not // equal then return. - - mManager.showNotification(id, LOGGED_IN, mWifiNai, mCellNai, null, false); + mManager.showNotification(id, NO_INTERNET, mWifiNai, mCellNai, null, false); verify(mNotificationManager, times(1)) - .notifyAsUser(eq(tag), eq(LOGGED_IN.eventId), any(), any()); + .notifyAsUser(eq(tag), eq(NO_INTERNET.eventId), any(), any()); - // Previous notification is LOGGED_IN and given type is LOGGED_IN too. The notification + // Previous notification is NO_INTERNET and given type is NO_INTERNET too. The notification // should be cleared. - mManager.clearNotification(id, LOGGED_IN); + mManager.clearNotification(id, NO_INTERNET); verify(mNotificationManager, times(1)) - .cancelAsUser(eq(tag), eq(LOGGED_IN.eventId), any()); - - mManager.showNotification(id, LOGGED_IN, mWifiNai, mCellNai, null, false); - verify(mNotificationManager, times(2)) - .notifyAsUser(eq(tag), eq(LOGGED_IN.eventId), any(), any()); + .cancelAsUser(eq(tag), eq(NO_INTERNET.eventId), any()); - // LOST_INTERNET notification popup after LOGGED_IN notification. - mManager.showNotification(id, LOST_INTERNET, mWifiNai, mCellNai, null, false); + // SIGN_IN is popped-up. + mManager.showNotification(id, SIGN_IN, mWifiNai, mCellNai, null, false); verify(mNotificationManager, times(1)) - .notifyAsUser(eq(tag), eq(LOST_INTERNET.eventId), any(), any()); + .notifyAsUser(eq(tag), eq(SIGN_IN.eventId), any(), any()); - // Previous notification is LOST_INTERNET and given type is LOGGED_IN. The notification - // shouldn't be cleared. - mManager.clearNotification(id, LOGGED_IN); - // LOST_INTERNET shouldn't be cleared. + // The notification type is not matching previous one, PARTIAL_CONNECTIVITY won't be + // cleared. + mManager.clearNotification(id, PARTIAL_CONNECTIVITY); verify(mNotificationManager, never()) - .cancelAsUser(eq(tag), eq(LOST_INTERNET.eventId), any()); + .cancelAsUser(eq(tag), eq(PARTIAL_CONNECTIVITY.eventId), any()); } } diff --git a/tests/net/java/com/android/server/net/NetworkStatsObserversTest.java b/tests/net/java/com/android/server/net/NetworkStatsObserversTest.java index f0e5774a5dea..a6f7a36ff01b 100644 --- a/tests/net/java/com/android/server/net/NetworkStatsObserversTest.java +++ b/tests/net/java/com/android/server/net/NetworkStatsObserversTest.java @@ -240,7 +240,7 @@ public class NetworkStatsObserversTest { // Baseline NetworkStats xtSnapshot = new NetworkStats(TEST_START, 1 /* initialSize */) - .addIfaceValues(TEST_IFACE, BASE_BYTES, 8L, BASE_BYTES, 16L); + .insertEntry(TEST_IFACE, BASE_BYTES, 8L, BASE_BYTES, 16L); NetworkStats uidSnapshot = null; mStatsObservers.updateStats( @@ -264,14 +264,14 @@ public class NetworkStatsObserversTest { // Baseline NetworkStats xtSnapshot = new NetworkStats(TEST_START, 1 /* initialSize */) - .addIfaceValues(TEST_IFACE, BASE_BYTES, 8L, BASE_BYTES, 16L); + .insertEntry(TEST_IFACE, BASE_BYTES, 8L, BASE_BYTES, 16L); NetworkStats uidSnapshot = null; mStatsObservers.updateStats( xtSnapshot, uidSnapshot, mActiveIfaces, mActiveUidIfaces, TEST_START); // Delta xtSnapshot = new NetworkStats(TEST_START, 1 /* initialSize */) - .addIfaceValues(TEST_IFACE, BASE_BYTES + 1024L, 10L, BASE_BYTES + 2048L, 20L); + .insertEntry(TEST_IFACE, BASE_BYTES + 1024L, 10L, BASE_BYTES + 2048L, 20L); mStatsObservers.updateStats( xtSnapshot, uidSnapshot, mActiveIfaces, mActiveUidIfaces, TEST_START); waitForObserverToIdle(); @@ -294,14 +294,14 @@ public class NetworkStatsObserversTest { // Baseline NetworkStats xtSnapshot = new NetworkStats(TEST_START, 1 /* initialSize */) - .addIfaceValues(TEST_IFACE, BASE_BYTES, 8L, BASE_BYTES, 16L); + .insertEntry(TEST_IFACE, BASE_BYTES, 8L, BASE_BYTES, 16L); NetworkStats uidSnapshot = null; mStatsObservers.updateStats( xtSnapshot, uidSnapshot, mActiveIfaces, mActiveUidIfaces, TEST_START); // Delta xtSnapshot = new NetworkStats(TEST_START + MINUTE_IN_MILLIS, 1 /* initialSize */) - .addIfaceValues(TEST_IFACE, BASE_BYTES + THRESHOLD_BYTES, 12L, + .insertEntry(TEST_IFACE, BASE_BYTES + THRESHOLD_BYTES, 12L, BASE_BYTES + THRESHOLD_BYTES, 22L); mStatsObservers.updateStats( xtSnapshot, uidSnapshot, mActiveIfaces, mActiveUidIfaces, TEST_START); @@ -326,14 +326,14 @@ public class NetworkStatsObserversTest { // Baseline NetworkStats xtSnapshot = null; NetworkStats uidSnapshot = new NetworkStats(TEST_START, 2 /* initialSize */) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, BASE_BYTES, 2L, BASE_BYTES, 2L, 0L); mStatsObservers.updateStats( xtSnapshot, uidSnapshot, mActiveIfaces, mActiveUidIfaces, TEST_START); // Delta uidSnapshot = new NetworkStats(TEST_START + 2 * MINUTE_IN_MILLIS, 2 /* initialSize */) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, BASE_BYTES + THRESHOLD_BYTES, 2L, BASE_BYTES + THRESHOLD_BYTES, 2L, 0L); mStatsObservers.updateStats( @@ -359,14 +359,14 @@ public class NetworkStatsObserversTest { // Baseline NetworkStats xtSnapshot = null; NetworkStats uidSnapshot = new NetworkStats(TEST_START, 2 /* initialSize */) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, BASE_BYTES, 2L, BASE_BYTES, 2L, 0L); mStatsObservers.updateStats( xtSnapshot, uidSnapshot, mActiveIfaces, mActiveUidIfaces, TEST_START); // Delta uidSnapshot = new NetworkStats(TEST_START + 2 * MINUTE_IN_MILLIS, 2 /* initialSize */) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, BASE_BYTES + THRESHOLD_BYTES, 2L, BASE_BYTES + THRESHOLD_BYTES, 2L, 0L); mStatsObservers.updateStats( @@ -391,14 +391,14 @@ public class NetworkStatsObserversTest { // Baseline NetworkStats xtSnapshot = null; NetworkStats uidSnapshot = new NetworkStats(TEST_START, 2 /* initialSize */) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, BASE_BYTES, 2L, BASE_BYTES, 2L, 0L); mStatsObservers.updateStats( xtSnapshot, uidSnapshot, mActiveIfaces, mActiveUidIfaces, TEST_START); // Delta uidSnapshot = new NetworkStats(TEST_START + 2 * MINUTE_IN_MILLIS, 2 /* initialSize */) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, BASE_BYTES + THRESHOLD_BYTES, 2L, BASE_BYTES + THRESHOLD_BYTES, 2L, 0L); mStatsObservers.updateStats( @@ -424,14 +424,14 @@ public class NetworkStatsObserversTest { // Baseline NetworkStats xtSnapshot = null; NetworkStats uidSnapshot = new NetworkStats(TEST_START, 2 /* initialSize */) - .addEntry(TEST_IFACE, UID_ANOTHER_USER, SET_DEFAULT, TAG_NONE, METERED_NO, + .insertEntry(TEST_IFACE, UID_ANOTHER_USER, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, BASE_BYTES, 2L, BASE_BYTES, 2L, 0L); mStatsObservers.updateStats( xtSnapshot, uidSnapshot, mActiveIfaces, mActiveUidIfaces, TEST_START); // Delta uidSnapshot = new NetworkStats(TEST_START + 2 * MINUTE_IN_MILLIS, 2 /* initialSize */) - .addEntry(TEST_IFACE, UID_ANOTHER_USER, SET_DEFAULT, TAG_NONE, METERED_NO, + .insertEntry(TEST_IFACE, UID_ANOTHER_USER, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, BASE_BYTES + THRESHOLD_BYTES, 2L, BASE_BYTES + THRESHOLD_BYTES, 2L, 0L); mStatsObservers.updateStats( diff --git a/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java b/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java index 36deca3e37b7..6be50c6560a0 100644 --- a/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java +++ b/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java @@ -263,7 +263,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { incrementCurrentTime(HOUR_IN_MILLIS); expectDefaultSettings(); expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 1024L, 1L, 2048L, 2L)); + .insertEntry(TEST_IFACE, 1024L, 1L, 2048L, 2L)); expectNetworkStatsUidDetail(buildEmptyStats()); forcePollAndWaitForIdle(); @@ -276,7 +276,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { incrementCurrentTime(DAY_IN_MILLIS); expectDefaultSettings(); expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 4096L, 4L, 8192L, 8L)); + .insertEntry(TEST_IFACE, 4096L, 4L, 8192L, 8L)); expectNetworkStatsUidDetail(buildEmptyStats()); forcePollAndWaitForIdle(); @@ -306,13 +306,13 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { incrementCurrentTime(HOUR_IN_MILLIS); expectDefaultSettings(); expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 1024L, 8L, 2048L, 16L)); + .insertEntry(TEST_IFACE, 1024L, 8L, 2048L, 16L)); expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 2) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 512L, 4L, 256L, 2L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xFAAD, 256L, 2L, 128L, 1L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_FOREGROUND, TAG_NONE, 512L, 4L, 256L, 2L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_FOREGROUND, 0xFAAD, 256L, 2L, 128L, 1L, 0L) - .addEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 128L, 1L, 128L, 1L, 0L)); + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 512L, 4L, 256L, 2L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xFAAD, 256L, 2L, 128L, 1L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_FOREGROUND, TAG_NONE, 512L, 4L, 256L, 2L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_FOREGROUND, 0xFAAD, 256L, 2L, 128L, 1L, 0L) + .insertEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 128L, 1L, 128L, 1L, 0L)); mService.setUidForeground(UID_RED, false); mService.incrementOperationCount(UID_RED, 0xFAAD, 4); mService.setUidForeground(UID_RED, true); @@ -375,7 +375,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { incrementCurrentTime(2 * HOUR_IN_MILLIS); expectSettings(0L, HOUR_IN_MILLIS, WEEK_IN_MILLIS); expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 512L, 4L, 512L, 4L)); + .insertEntry(TEST_IFACE, 512L, 4L, 512L, 4L)); expectNetworkStatsUidDetail(buildEmptyStats()); forcePollAndWaitForIdle(); @@ -415,11 +415,11 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { incrementCurrentTime(HOUR_IN_MILLIS); expectDefaultSettings(); expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 2048L, 16L, 512L, 4L)); + .insertEntry(TEST_IFACE, 2048L, 16L, 512L, 4L)); expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 3) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1536L, 12L, 512L, 4L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L) - .addEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 512L, 4L, 0L, 0L, 0L)); + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1536L, 12L, 512L, 4L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L) + .insertEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 512L, 4L, 0L, 0L, 0L)); mService.incrementOperationCount(UID_RED, 0xF00D, 10); forcePollAndWaitForIdle(); @@ -437,11 +437,11 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { expectDefaultSettings(); states = new NetworkState[] {buildMobile3gState(IMSI_2)}; expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 2048L, 16L, 512L, 4L)); + .insertEntry(TEST_IFACE, 2048L, 16L, 512L, 4L)); expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 3) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1536L, 12L, 512L, 4L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L) - .addEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 512L, 4L, 0L, 0L, 0L)); + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1536L, 12L, 512L, 4L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L) + .insertEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 512L, 4L, 0L, 0L, 0L)); mService.forceUpdateIfaces(NETWORKS_MOBILE, states, getActiveIface(states), new VpnInfo[0]); forcePollAndWaitForIdle(); @@ -451,12 +451,12 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { incrementCurrentTime(HOUR_IN_MILLIS); expectDefaultSettings(); expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 2176L, 17L, 1536L, 12L)); + .insertEntry(TEST_IFACE, 2176L, 17L, 1536L, 12L)); expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1536L, 12L, 512L, 4L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L) - .addEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 640L, 5L, 1024L, 8L, 0L) - .addEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, 0xFAAD, 128L, 1L, 1024L, 8L, 0L)); + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1536L, 12L, 512L, 4L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L) + .insertEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 640L, 5L, 1024L, 8L, 0L) + .insertEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, 0xFAAD, 128L, 1L, 1024L, 8L, 0L)); mService.incrementOperationCount(UID_BLUE, 0xFAAD, 10); forcePollAndWaitForIdle(); @@ -488,12 +488,13 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { incrementCurrentTime(HOUR_IN_MILLIS); expectDefaultSettings(); expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 4128L, 258L, 544L, 34L)); + .insertEntry(TEST_IFACE, 4128L, 258L, 544L, 34L)); expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 16L, 1L, 16L, 1L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xFAAD, 16L, 1L, 16L, 1L, 0L) - .addEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 4096L, 258L, 512L, 32L, 0L) - .addEntry(TEST_IFACE, UID_GREEN, SET_DEFAULT, TAG_NONE, 16L, 1L, 16L, 1L, 0L)); + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 16L, 1L, 16L, 1L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xFAAD, 16L, 1L, 16L, 1L, 0L) + .insertEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, + 4096L, 258L, 512L, 32L, 0L) + .insertEntry(TEST_IFACE, UID_GREEN, SET_DEFAULT, TAG_NONE, 16L, 1L, 16L, 1L, 0L)); mService.incrementOperationCount(UID_RED, 0xFAAD, 10); forcePollAndWaitForIdle(); @@ -509,12 +510,13 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { // special "removed" bucket. expectDefaultSettings(); expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 4128L, 258L, 544L, 34L)); + .insertEntry(TEST_IFACE, 4128L, 258L, 544L, 34L)); expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 16L, 1L, 16L, 1L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xFAAD, 16L, 1L, 16L, 1L, 0L) - .addEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 4096L, 258L, 512L, 32L, 0L) - .addEntry(TEST_IFACE, UID_GREEN, SET_DEFAULT, TAG_NONE, 16L, 1L, 16L, 1L, 0L)); + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 16L, 1L, 16L, 1L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xFAAD, 16L, 1L, 16L, 1L, 0L) + .insertEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, + 4096L, 258L, 512L, 32L, 0L) + .insertEntry(TEST_IFACE, UID_GREEN, SET_DEFAULT, TAG_NONE, 16L, 1L, 16L, 1L, 0L)); final Intent intent = new Intent(ACTION_UID_REMOVED); intent.putExtra(EXTRA_UID, UID_BLUE); mServiceContext.sendBroadcast(intent); @@ -546,8 +548,8 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { expectDefaultSettings(); expectNetworkStatsSummary(buildEmptyStats()); expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1024L, 8L, 1024L, 8L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L)); + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1024L, 8L, 1024L, 8L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L)); mService.incrementOperationCount(UID_RED, 0xF00D, 5); forcePollAndWaitForIdle(); @@ -562,8 +564,8 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { states = new NetworkState[] {buildMobile4gState(TEST_IFACE2)}; expectNetworkStatsSummary(buildEmptyStats()); expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1024L, 8L, 1024L, 8L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L)); + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1024L, 8L, 1024L, 8L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L)); mService.forceUpdateIfaces(NETWORKS_MOBILE, states, getActiveIface(states), new VpnInfo[0]); forcePollAndWaitForIdle(); @@ -574,10 +576,10 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { expectDefaultSettings(); expectNetworkStatsSummary(buildEmptyStats()); expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1024L, 8L, 1024L, 8L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L) - .addEntry(TEST_IFACE2, UID_RED, SET_DEFAULT, TAG_NONE, 512L, 4L, 256L, 2L, 0L) - .addEntry(TEST_IFACE2, UID_RED, SET_DEFAULT, 0xFAAD, 512L, 4L, 256L, 2L, 0L)); + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 1024L, 8L, 1024L, 8L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L) + .insertEntry(TEST_IFACE2, UID_RED, SET_DEFAULT, TAG_NONE, 512L, 4L, 256L, 2L, 0L) + .insertEntry(TEST_IFACE2, UID_RED, SET_DEFAULT, 0xFAAD, 512L, 4L, 256L, 2L, 0L)); mService.incrementOperationCount(UID_RED, 0xFAAD, 5); forcePollAndWaitForIdle(); @@ -601,9 +603,9 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { expectDefaultSettings(); expectNetworkStatsSummary(buildEmptyStats()); expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 50L, 5L, 50L, 5L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 10L, 1L, 10L, 1L, 0L) - .addEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 1024L, 8L, 512L, 4L, 0L)); + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 50L, 5L, 50L, 5L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 10L, 1L, 10L, 1L, 0L) + .insertEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 1024L, 8L, 512L, 4L, 0L)); mService.incrementOperationCount(UID_RED, 0xF00D, 1); forcePollAndWaitForIdle(); @@ -618,9 +620,10 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { expectDefaultSettings(); expectNetworkStatsSummary(buildEmptyStats()); expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 50L, 5L, 50L, 5L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 10L, 1L, 10L, 1L, 0L) - .addEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 2048L, 16L, 1024L, 8L, 0L)); + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 50L, 5L, 50L, 5L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 10L, 1L, 10L, 1L, 0L) + .insertEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, + 2048L, 16L, 1024L, 8L, 0L)); forcePollAndWaitForIdle(); // first verify entire history present @@ -664,9 +667,9 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { expectDefaultSettings(); expectNetworkStatsSummary(buildEmptyStats()); expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 3) - .addEntry(entry1) - .addEntry(entry2) - .addEntry(entry3)); + .insertEntry(entry1) + .insertEntry(entry2) + .insertEntry(entry3)); mService.incrementOperationCount(UID_RED, 0xF00D, 1); NetworkStats stats = mService.getDetailedUidStats(INTERFACES_ALL); @@ -714,11 +717,11 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { .thenReturn(augmentedIfaceFilter); when(mStatsFactory.readNetworkStatsDetail(eq(UID_ALL), any(), eq(TAG_ALL))) .thenReturn(new NetworkStats(getElapsedRealtime(), 1) - .addEntry(uidStats)); + .insertEntry(uidStats)); when(mNetManager.getNetworkStatsTethering(STATS_PER_UID)) .thenReturn(new NetworkStats(getElapsedRealtime(), 2) - .addEntry(tetheredStats1) - .addEntry(tetheredStats2)); + .insertEntry(tetheredStats1) + .insertEntry(tetheredStats2)); NetworkStats stats = mService.getDetailedUidStats(ifaceFilter); @@ -755,8 +758,8 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { expectDefaultSettings(); expectNetworkStatsSummary(buildEmptyStats()); expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 128L, 2L, 128L, 2L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 64L, 1L, 64L, 1L, 0L)); + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 128L, 2L, 128L, 2L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 64L, 1L, 64L, 1L, 0L)); mService.incrementOperationCount(UID_RED, 0xF00D, 1); forcePollAndWaitForIdle(); @@ -770,10 +773,10 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { expectDefaultSettings(); expectNetworkStatsSummary(buildEmptyStats()); expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 128L, 2L, 128L, 2L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 64L, 1L, 64L, 1L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_FOREGROUND, TAG_NONE, 32L, 2L, 32L, 2L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_FOREGROUND, 0xFAAD, 1L, 1L, 1L, 1L, 0L)); + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 128L, 2L, 128L, 2L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 64L, 1L, 64L, 1L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_FOREGROUND, TAG_NONE, 32L, 2L, 32L, 2L, 0L) + .insertEntry(TEST_IFACE, UID_RED, SET_FOREGROUND, 0xFAAD, 1L, 1L, 1L, 1L, 0L)); mService.setUidForeground(UID_RED, true); mService.incrementOperationCount(UID_RED, 0xFAAD, 1); @@ -814,9 +817,9 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { // and DEFAULT_NETWORK_YES, because these three properties aren't tracked at that layer. // We layer them on top by inspecting the iface properties. expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 128L, 2L, 128L, 2L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, METERED_NO, ROAMING_NO, + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, METERED_NO, ROAMING_NO, DEFAULT_NETWORK_YES, 64L, 1L, 64L, 1L, 0L)); mService.incrementOperationCount(UID_RED, 0xF00D, 1); @@ -853,9 +856,9 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { // ROAMING_NO, because metered and roaming isn't tracked at that layer. We layer it // on top by inspecting the iface properties. expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 1) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_ALL, ROAMING_NO, + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_ALL, ROAMING_NO, DEFAULT_NETWORK_YES, 128L, 2L, 128L, 2L, 0L) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, METERED_ALL, ROAMING_NO, + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, METERED_ALL, ROAMING_NO, DEFAULT_NETWORK_YES, 64L, 1L, 64L, 1L, 0L)); forcePollAndWaitForIdle(); @@ -888,17 +891,17 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { // Traffic seen by kernel counters (includes software tethering). final NetworkStats ifaceStats = new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 1536L, 12L, 384L, 3L); + .insertEntry(TEST_IFACE, 1536L, 12L, 384L, 3L); // Hardware tethering traffic, not seen by kernel counters. final NetworkStats tetherStatsHardware = new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 512L, 4L, 128L, 1L); + .insertEntry(TEST_IFACE, 512L, 4L, 128L, 1L); // Traffic for UID_RED. final NetworkStats uidStats = new NetworkStats(getElapsedRealtime(), 1) - .addEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 128L, 2L, 128L, 2L, 0L); + .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 128L, 2L, 128L, 2L, 0L); // All tethering traffic, both hardware and software. final NetworkStats tetherStats = new NetworkStats(getElapsedRealtime(), 1) - .addEntry(TEST_IFACE, UID_TETHERING, SET_DEFAULT, TAG_NONE, 1920L, 14L, 384L, 2L, + .insertEntry(TEST_IFACE, UID_TETHERING, SET_DEFAULT, TAG_NONE, 1920L, 14L, 384L, 2L, 0L); expectNetworkStatsSummary(ifaceStats, tetherStatsHardware); @@ -957,7 +960,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { incrementCurrentTime(HOUR_IN_MILLIS); expectDefaultSettings(); expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 1024L, 1L, 2048L, 2L)); + .insertEntry(TEST_IFACE, 1024L, 1L, 2048L, 2L)); expectNetworkStatsUidDetail(buildEmptyStats()); forcePollAndWaitForIdle(); @@ -972,7 +975,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { incrementCurrentTime(DAY_IN_MILLIS); expectDefaultSettings(); expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1) - .addIfaceValues(TEST_IFACE, 4096000L, 4L, 8192000L, 8L)); + .insertEntry(TEST_IFACE, 4096000L, 4L, 8192000L, 8L)); expectNetworkStatsUidDetail(buildEmptyStats()); forcePollAndWaitForIdle(); @@ -1026,7 +1029,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states), new VpnInfo[0]); // Verifies that one requestStatsUpdate will be called during iface update. - provider.expectStatsUpdate(0 /* unused */); + provider.expectOnRequestStatsUpdate(0 /* unused */); // Create some initial traffic and report to the service. incrementCurrentTime(HOUR_IN_MILLIS); @@ -1037,7 +1040,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { .addValues(new NetworkStats.Entry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_YES, 64L, 1L, 64L, 1L, 1L)); - cb.onStatsUpdated(0 /* unused */, expectedStats, expectedStats); + cb.notifyStatsUpdated(0 /* unused */, expectedStats, expectedStats); // Make another empty mutable stats object. This is necessary since the new NetworkStats // object will be used to compare with the old one in NetworkStatsRecoder, two of them @@ -1047,8 +1050,8 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { forcePollAndWaitForIdle(); // Verifies that one requestStatsUpdate and setAlert will be called during polling. - provider.expectStatsUpdate(0 /* unused */); - provider.expectSetAlert(MB_IN_BYTES); + provider.expectOnRequestStatsUpdate(0 /* unused */); + provider.expectOnSetAlert(MB_IN_BYTES); // Verifies that service recorded history, does not verify uid tag part. assertUidTotal(sTemplateWifi, UID_RED, 128L, 2L, 128L, 2L, 1); @@ -1082,13 +1085,13 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { assertNotNull(cb); // Simulates alert quota of the provider has been reached. - cb.onAlertReached(); + cb.notifyAlertReached(); HandlerUtilsKt.waitForIdle(mHandlerThread, WAIT_TIMEOUT); // Verifies that polling is triggered by alert reached. - provider.expectStatsUpdate(0 /* unused */); + provider.expectOnRequestStatsUpdate(0 /* unused */); // Verifies that global alert will be re-armed. - provider.expectSetAlert(MB_IN_BYTES); + provider.expectOnSetAlert(MB_IN_BYTES); } private static File getBaseDir(File statsDir) { |