Merge "Refactor methods to access/modify BluetoothDevice alias and name"
diff --git a/api/current.txt b/api/current.txt
index edf6d98..19fd711 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -4244,8 +4244,8 @@
method public android.app.AlertDialog show();
}
- public class AliasActivity extends android.app.Activity {
- ctor public AliasActivity();
+ @Deprecated public class AliasActivity extends android.app.Activity {
+ ctor @Deprecated public AliasActivity();
}
public class AppComponentFactory {
@@ -44040,6 +44040,9 @@
field public static final int DATA_CYCLE_THRESHOLD_DISABLED = -2; // 0xfffffffe
field public static final String EXTRA_SLOT_INDEX = "android.telephony.extra.SLOT_INDEX";
field public static final String EXTRA_SUBSCRIPTION_INDEX = "android.telephony.extra.SUBSCRIPTION_INDEX";
+ field public static final String KEY_5G_NR_SSRSRP_THRESHOLDS_INT_ARRAY = "5g_nr_ssrsrp_thresholds_int_array";
+ field public static final String KEY_5G_NR_SSRSRQ_THRESHOLDS_INT_ARRAY = "5g_nr_ssrsrq_thresholds_int_array";
+ field public static final String KEY_5G_NR_SSSINR_THRESHOLDS_INT_ARRAY = "5g_nr_sssinr_thresholds_int_array";
field public static final String KEY_ADDITIONAL_CALL_SETTING_BOOL = "additional_call_setting_bool";
field public static final String KEY_ALLOW_ADDING_APNS_BOOL = "allow_adding_apns_bool";
field public static final String KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL = "allow_add_call_during_video_call";
@@ -44171,6 +44174,7 @@
field public static final String KEY_OPPORTUNISTIC_NETWORK_ENTRY_THRESHOLD_RSSNR_INT = "opportunistic_network_entry_threshold_rssnr_int";
field public static final String KEY_OPPORTUNISTIC_NETWORK_EXIT_THRESHOLD_RSRP_INT = "opportunistic_network_exit_threshold_rsrp_int";
field public static final String KEY_OPPORTUNISTIC_NETWORK_EXIT_THRESHOLD_RSSNR_INT = "opportunistic_network_exit_threshold_rssnr_int";
+ field public static final String KEY_PARAMETERS_USE_FOR_5G_NR_SIGNAL_BAR_INT = "parameters_use_for_5g_nr_signal_bar_int";
field public static final String KEY_PREFER_2G_BOOL = "prefer_2g_bool";
field public static final String KEY_PREVENT_CLIR_ACTIVATION_AND_DEACTIVATION_CODE_BOOL = "prevent_clir_activation_and_deactivation_code_bool";
field public static final String KEY_RADIO_RESTART_FAILURE_CAUSES_INT_ARRAY = "radio_restart_failure_causes_int_array";
@@ -45498,11 +45502,13 @@
method @RequiresPermission("android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS") public void updateSubscriptionNickname(int, @Nullable String, @NonNull android.app.PendingIntent);
field public static final String ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS = "android.telephony.euicc.action.MANAGE_EMBEDDED_SUBSCRIPTIONS";
field public static final String ACTION_NOTIFY_CARRIER_SETUP_INCOMPLETE = "android.telephony.euicc.action.NOTIFY_CARRIER_SETUP_INCOMPLETE";
+ field public static final String ACTION_START_EUICC_ACTIVATION = "android.telephony.euicc.action.START_EUICC_ACTIVATION";
field public static final int EMBEDDED_SUBSCRIPTION_RESULT_ERROR = 2; // 0x2
field public static final int EMBEDDED_SUBSCRIPTION_RESULT_OK = 0; // 0x0
field public static final int EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR = 1; // 0x1
field public static final String EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DETAILED_CODE";
field public static final String EXTRA_EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTION = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTION";
+ field public static final String EXTRA_USE_QR_SCANNER = "android.telephony.euicc.extra.USE_QR_SCANNER";
field public static final String META_DATA_CARRIER_ICON = "android.telephony.euicc.carriericon";
}
diff --git a/api/system-current.txt b/api/system-current.txt
index faa54fd..2a8fb63 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -4705,6 +4705,7 @@
method public boolean isPortableHotspotSupported();
method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isWifiApEnabled();
method public boolean isWifiScannerSupported();
+ method @RequiresPermission("android.permission.NETWORK_SETTINGS") public void registerSoftApCallback(@NonNull android.net.wifi.WifiManager.SoftApCallback, @Nullable java.util.concurrent.Executor);
method @RequiresPermission("android.permission.WIFI_UPDATE_USABILITY_STATS_SCORE") public void removeOnWifiUsabilityStatsListener(@NonNull android.net.wifi.WifiManager.OnWifiUsabilityStatsListener);
method @RequiresPermission(anyOf={"android.permission.NETWORK_SETTINGS", android.Manifest.permission.NETWORK_SETUP_WIZARD, "android.permission.NETWORK_STACK"}) public void save(@NonNull android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiManager.ActionListener);
method @RequiresPermission("android.permission.WIFI_SET_DEVICE_MOBILITY_STATE") public void setDeviceMobilityState(int);
@@ -4763,6 +4764,11 @@
method public void onWifiUsabilityStats(int, boolean, @NonNull android.net.wifi.WifiUsabilityStatsEntry);
}
+ public static interface WifiManager.SoftApCallback {
+ method public void onConnectedClientsChanged(@NonNull java.util.List<android.net.wifi.WifiClient>);
+ method public void onStateChanged(int, int);
+ }
+
public class WifiNetworkConnectionStatistics implements android.os.Parcelable {
ctor public WifiNetworkConnectionStatistics(int, int);
ctor public WifiNetworkConnectionStatistics();
@@ -6557,7 +6563,7 @@
method public android.service.euicc.DownloadSubscriptionResult onDownloadSubscription(int, @NonNull android.telephony.euicc.DownloadableSubscription, boolean, boolean, @Nullable android.os.Bundle);
method @Deprecated public int onDownloadSubscription(int, @NonNull android.telephony.euicc.DownloadableSubscription, boolean, boolean);
method @Deprecated public abstract int onEraseSubscriptions(int);
- method public int onEraseSubscriptionsWithOptions(int, @android.telephony.euicc.EuiccCardManager.ResetOption int);
+ method public int onEraseSubscriptions(int, @android.telephony.euicc.EuiccCardManager.ResetOption int);
method public abstract android.service.euicc.GetDefaultDownloadableSubscriptionListResult onGetDefaultDownloadableSubscriptionList(int, boolean);
method public abstract android.service.euicc.GetDownloadableSubscriptionMetadataResult onGetDownloadableSubscriptionMetadata(int, android.telephony.euicc.DownloadableSubscription, boolean);
method public abstract String onGetEid(int);
@@ -6577,6 +6583,8 @@
field public static final String ACTION_RESOLVE_DEACTIVATE_SIM = "android.service.euicc.action.RESOLVE_DEACTIVATE_SIM";
field public static final String ACTION_RESOLVE_NO_PRIVILEGES = "android.service.euicc.action.RESOLVE_NO_PRIVILEGES";
field public static final String ACTION_RESOLVE_RESOLVABLE_ERRORS = "android.service.euicc.action.RESOLVE_RESOLVABLE_ERRORS";
+ field public static final String ACTION_START_CARRIER_ACTIVATION = "android.service.euicc.action.START_CARRIER_ACTIVATION";
+ field public static final String ACTION_START_EUICC_ACTIVATION = "android.service.euicc.action.START_EUICC_ACTIVATION";
field public static final String ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED = "android.service.euicc.action.TOGGLE_SUBSCRIPTION_PRIVILEGED";
field public static final String CATEGORY_EUICC_UI = "android.service.euicc.category.EUICC_UI";
field public static final String EUICC_SERVICE_INTERFACE = "android.service.euicc.EuiccService";
@@ -7662,6 +7670,7 @@
public final class DataSpecificRegistrationInfo implements android.os.Parcelable {
method public int describeContents();
method @NonNull public android.telephony.LteVopsSupportInfo getLteVopsSupportInfo();
+ method public boolean isUsingCarrierAggregation();
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.DataSpecificRegistrationInfo> CREATOR;
}
@@ -7774,6 +7783,7 @@
method @Nullable public android.telephony.CellIdentity getCellIdentity();
method @Nullable public android.telephony.DataSpecificRegistrationInfo getDataSpecificInfo();
method public int getDomain();
+ method public int getNrState();
method public int getRegistrationState();
method public int getRejectCause();
method public int getRoamingType();
@@ -8016,6 +8026,9 @@
method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoList();
method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoListForDomain(int);
method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoListForTransportType(int);
+ method public int getNrFrequencyRange();
+ method @Nullable public String getOperatorAlphaLongRaw();
+ method @Nullable public String getOperatorAlphaShortRaw();
field public static final int ROAMING_TYPE_DOMESTIC = 2; // 0x2
field public static final int ROAMING_TYPE_INTERNATIONAL = 3; // 0x3
field public static final int ROAMING_TYPE_NOT_ROAMING = 0; // 0x0
@@ -8605,7 +8618,7 @@
public class EuiccManager {
method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void continueOperation(android.content.Intent, android.os.Bundle);
method @Deprecated @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void eraseSubscriptions(@NonNull android.app.PendingIntent);
- method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void eraseSubscriptionsWithOptions(@android.telephony.euicc.EuiccCardManager.ResetOption int, @NonNull android.app.PendingIntent);
+ method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void eraseSubscriptions(@android.telephony.euicc.EuiccCardManager.ResetOption int, @NonNull android.app.PendingIntent);
method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void getDefaultDownloadableSubscriptionList(android.app.PendingIntent);
method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void getDownloadableSubscriptionMetadata(android.telephony.euicc.DownloadableSubscription, android.app.PendingIntent);
method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public int getOtaStatus();
@@ -8628,6 +8641,7 @@
field public static final String EXTRA_ENABLE_SUBSCRIPTION = "android.telephony.euicc.extra.ENABLE_SUBSCRIPTION";
field public static final String EXTRA_FORCE_PROVISION = "android.telephony.euicc.extra.FORCE_PROVISION";
field public static final String EXTRA_FROM_SUBSCRIPTION_ID = "android.telephony.euicc.extra.FROM_SUBSCRIPTION_ID";
+ field public static final String EXTRA_PHYSICAL_SLOT_ID = "android.telephony.euicc.extra.PHYSICAL_SLOT_ID";
field public static final String EXTRA_SUBSCRIPTION_ID = "android.telephony.euicc.extra.SUBSCRIPTION_ID";
field public static final String EXTRA_SUBSCRIPTION_NICKNAME = "android.telephony.euicc.extra.SUBSCRIPTION_NICKNAME";
}
diff --git a/core/java/android/app/AliasActivity.java b/core/java/android/app/AliasActivity.java
index 3756529..37be901 100644
--- a/core/java/android/app/AliasActivity.java
+++ b/core/java/android/app/AliasActivity.java
@@ -39,7 +39,10 @@
* To use this activity, you should include in the manifest for the associated
* component an entry named "android.app.alias". It is a reference to an XML
* resource describing an intent that launches the real application.
+ *
+ * @deprecated Use {@code <activity-alias>} or subclass Activity directly.
*/
+@Deprecated
public class AliasActivity extends Activity {
/**
* This is the name under which you should store in your component the
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index 646f0dc..46a128a 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -173,8 +173,6 @@
import android.telephony.TelephonyManager;
import android.telephony.euicc.EuiccCardManager;
import android.telephony.euicc.EuiccManager;
-import android.telephony.ims.ImsManager;
-import android.telephony.ims.RcsMessageManager;
import android.util.ArrayMap;
import android.util.Log;
import android.view.ContextThemeWrapper;
@@ -623,22 +621,6 @@
return new SubscriptionManager(ctx.getOuterContext());
}});
- registerService(Context.TELEPHONY_RCS_MESSAGE_SERVICE, RcsMessageManager.class,
- new CachedServiceFetcher<RcsMessageManager>() {
- @Override
- public RcsMessageManager createService(ContextImpl ctx) {
- return new RcsMessageManager(ctx.getOuterContext());
- }
- });
-
- registerService(Context.TELEPHONY_IMS_SERVICE, ImsManager.class,
- new CachedServiceFetcher<ImsManager>() {
- @Override
- public ImsManager createService(ContextImpl ctx) {
- return new ImsManager(ctx.getOuterContext());
- }
- });
-
registerService(Context.CARRIER_CONFIG_SERVICE, CarrierConfigManager.class,
new CachedServiceFetcher<CarrierConfigManager>() {
@Override
diff --git a/core/java/android/os/RecoverySystem.java b/core/java/android/os/RecoverySystem.java
index 48fc2a6..e3f6e12 100644
--- a/core/java/android/os/RecoverySystem.java
+++ b/core/java/android/os/RecoverySystem.java
@@ -888,7 +888,7 @@
}
List<SubscriptionInfo> invisibleSubs = new ArrayList<>();
for (SubscriptionInfo sub : availableSubs) {
- if (sub.isEmbedded() && !subscriptionManager.isSubscriptionVisible(sub)) {
+ if (sub.isEmbedded() && sub.getGroupUuid() != null && sub.isOpportunistic()) {
invisibleSubs.add(sub);
}
}
diff --git a/core/java/android/os/image/DynamicSystemManager.java b/core/java/android/os/image/DynamicSystemManager.java
index 0e00d5e..4c92c28 100644
--- a/core/java/android/os/image/DynamicSystemManager.java
+++ b/core/java/android/os/image/DynamicSystemManager.java
@@ -101,6 +101,19 @@
}
}
/**
+ * Start DynamicSystem installation.
+ *
+ * @return true if the call succeeds
+ */
+ @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM)
+ public boolean startInstallation() {
+ try {
+ return mService.startInstallation();
+ } catch (RemoteException e) {
+ throw new RuntimeException(e.toString());
+ }
+ }
+ /**
* Start DynamicSystem installation. This call may take an unbounded amount of time. The caller
* may use another thread to call the getStartProgress() to get the progress.
*
@@ -112,9 +125,9 @@
* true.
*/
@RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM)
- public Session startInstallation(String name, long size, boolean readOnly) {
+ public Session createPartition(String name, long size, boolean readOnly) {
try {
- if (mService.startInstallation(name, size, readOnly)) {
+ if (mService.createPartition(name, size, readOnly)) {
return new Session();
} else {
return null;
@@ -123,7 +136,18 @@
throw new RuntimeException(e.toString());
}
}
-
+ /**
+ * Finish a previously started installation. Installations without a cooresponding
+ * finishInstallation() will be cleaned up during device boot.
+ */
+ @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM)
+ public boolean finishInstallation() {
+ try {
+ return mService.finishInstallation();
+ } catch (RemoteException e) {
+ throw new RuntimeException(e.toString());
+ }
+ }
/**
* Query the progress of the current installation operation. This can be called while the
* installation is in progress.
diff --git a/core/java/android/os/image/IDynamicSystemService.aidl b/core/java/android/os/image/IDynamicSystemService.aidl
index 75f6785..69cbab2 100644
--- a/core/java/android/os/image/IDynamicSystemService.aidl
+++ b/core/java/android/os/image/IDynamicSystemService.aidl
@@ -21,15 +21,26 @@
interface IDynamicSystemService
{
/**
- * Start DynamicSystem installation. This call may take 60~90 seconds. The caller
+ * Start DynamicSystem installation.
+ * @return true if the call succeeds
+ */
+ boolean startInstallation();
+
+ /**
+ * Create a DSU partition. This call may take 60~90 seconds. The caller
* may use another thread to call the getStartProgress() to get the progress.
- *
* @param name The DSU partition name
* @param size Size of the DSU image in bytes
* @param readOnly True if this partition is readOnly
* @return true if the call succeeds
*/
- boolean startInstallation(@utf8InCpp String name, long size, boolean readOnly);
+ boolean createPartition(@utf8InCpp String name, long size, boolean readOnly);
+
+ /**
+ * Finish a previously started installation. Installations without
+ * a cooresponding finishInstallation() will be cleaned up during device boot.
+ */
+ boolean finishInstallation();
/**
* Query the progress of the current installation operation. This can be called while
diff --git a/core/java/android/service/euicc/EuiccService.java b/core/java/android/service/euicc/EuiccService.java
index 12c2580..bc6a9e8 100644
--- a/core/java/android/service/euicc/EuiccService.java
+++ b/core/java/android/service/euicc/EuiccService.java
@@ -21,6 +21,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.SdkConstant;
import android.annotation.SystemApi;
import android.app.Service;
import android.content.Intent;
@@ -104,6 +105,26 @@
"android.service.euicc.action.BIND_CARRIER_PROVISIONING_SERVICE";
/**
+ * Intent action sent by the LPA to launch a carrier app Activity for eSIM activation, e.g. a
+ * carrier login screen. Carrier apps wishing to support this activation method must implement
+ * an Activity that responds to this intent action. Upon completion, the Activity must return
+ * one of the following results to the LPA:
+ *
+ * <p>{@code Activity.RESULT_CANCELED}: The LPA should treat this as an back button and abort
+ * the activation flow.
+ * <p>{@code Activity.RESULT_OK}: The LPA should try to get an activation code from the carrier
+ * app by binding to the carrier app service implementing
+ * {@link #ACTION_BIND_CARRIER_PROVISIONING_SERVICE}.
+ * <p>{@code Activity.RESULT_OK} with
+ * {@link android.telephony.euicc.EuiccManager#EXTRA_USE_QR_SCANNER} set to true: The LPA should
+ * start a QR scanner for the user to scan an eSIM profile QR code.
+ * <p>For other results: The LPA should treat this as an error.
+ **/
+ @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_START_CARRIER_ACTIVATION =
+ "android.service.euicc.action.START_CARRIER_ACTIVATION";
+
+ /**
* @see android.telephony.euicc.EuiccManager#ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS
* The difference is this one is used by system to bring up the LUI.
*/
@@ -138,6 +159,15 @@
public static final String ACTION_RENAME_SUBSCRIPTION_PRIVILEGED =
"android.service.euicc.action.RENAME_SUBSCRIPTION_PRIVILEGED";
+ /**
+ * @see android.telephony.euicc.EuiccManager#ACTION_START_EUICC_ACTIVATION. This is
+ * a protected intent that can only be sent by the system, and requires the
+ * {@link android.Manifest.permission#BIND_EUICC_SERVICE} permission.
+ */
+ @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_START_EUICC_ACTIVATION =
+ "android.service.euicc.action.START_EUICC_ACTIVATION";
+
// LUI resolution actions. These are called by the platform to resolve errors in situations that
// require user interaction.
// TODO(b/33075886): Define extras for any input parameters to these dialogs once they are
@@ -516,7 +546,7 @@
* @see android.telephony.euicc.EuiccManager#eraseSubscriptions
*
* @deprecated From R, callers should specify a flag for specific set of subscriptions to erase
- * and use {@link #onEraseSubscriptionsWithOptions(int, int)} instead
+ * and use {@link #onEraseSubscriptions(int, int)} instead
*/
@Deprecated
public abstract int onEraseSubscriptions(int slotId);
@@ -533,7 +563,7 @@
* constants or any implementation-specific code starting with {@link #RESULT_FIRST_USER}.
* @see android.telephony.euicc.EuiccManager#eraseSubscriptionsWithOptions
*/
- public int onEraseSubscriptionsWithOptions(int slotIndex, @ResetOption int options) {
+ public int onEraseSubscriptions(int slotIndex, @ResetOption int options) {
throw new UnsupportedOperationException(
"This method must be overridden to enable the ResetOption parameter");
}
@@ -779,8 +809,7 @@
mExecutor.execute(new Runnable() {
@Override
public void run() {
- int result = EuiccService.this.onEraseSubscriptionsWithOptions(
- slotIndex, options);
+ int result = EuiccService.this.onEraseSubscriptions(slotIndex, options);
try {
callback.onComplete(result);
} catch (RemoteException e) {
diff --git a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java
index 738c425..19ae970 100644
--- a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java
+++ b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java
@@ -102,9 +102,10 @@
Thread thread =
new Thread(
() -> {
- mDynSystem.startInstallation("userdata", mUserdataSize, false);
+ mDynSystem.startInstallation();
+ mDynSystem.createPartition("userdata", mUserdataSize, false);
mInstallationSession =
- mDynSystem.startInstallation("system", mSystemSize, true);
+ mDynSystem.createPartition("system", mSystemSize, true);
});
thread.start();
@@ -157,6 +158,7 @@
reportedInstalledSize = installedSize;
}
}
+ mDynSystem.finishInstallation();
return null;
} catch (Exception e) {
diff --git a/packages/SettingsLib/src/com/android/settingslib/DeviceInfoUtils.java b/packages/SettingsLib/src/com/android/settingslib/DeviceInfoUtils.java
index bc5a2c0..69bd0ed 100644
--- a/packages/SettingsLib/src/com/android/settingslib/DeviceInfoUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/DeviceInfoUtils.java
@@ -29,6 +29,8 @@
import android.telephony.PhoneNumberUtils;
import android.telephony.SubscriptionInfo;
import android.telephony.TelephonyManager;
+import android.text.BidiFormatter;
+import android.text.TextDirectionHeuristics;
import android.text.TextUtils;
import android.text.format.DateFormat;
import android.util.Log;
@@ -206,4 +208,15 @@
return sb.toString();
}
+ /**
+ * To get the formatting text for display in a potentially opposite-directionality context
+ * without garbling.
+ * @param subscriptionInfo {@link SubscriptionInfo} subscription information.
+ * @return Returns phone number with Bidi format.
+ */
+ public static String getBidiFormattedPhoneNumber(Context context,
+ SubscriptionInfo subscriptionInfo) {
+ final String phoneNumber = getFormattedPhoneNumber(context, subscriptionInfo);
+ return BidiFormatter.getInstance().unicodeWrap(phoneNumber, TextDirectionHeuristics.LTR);
+ }
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/OWNERS b/packages/SettingsLib/src/com/android/settingslib/wifi/OWNERS
index d5d2e9e..f506b7c 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/OWNERS
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/OWNERS
@@ -1,7 +1,7 @@
# Default reviewers for this and subdirectories.
+qal@google.com
+arcwang@google.com
+govenliu@google.com
asapperstein@google.com
-asargent@google.com
-dling@google.com
-zhfan@google.com
# Emergency approvers in case the above are not available
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java
index 4b56f03..f73ca1c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java
@@ -24,6 +24,7 @@
import android.net.wifi.WifiClient;
import android.net.wifi.WifiManager;
import android.os.Handler;
+import android.os.HandlerExecutor;
import android.os.UserManager;
import android.util.Log;
@@ -109,7 +110,8 @@
mCallbacks.add(callback);
if (mWifiManager != null) {
if (mCallbacks.size() == 1) {
- mWifiManager.registerSoftApCallback(this, mMainHandler);
+ mWifiManager.registerSoftApCallback(this,
+ new HandlerExecutor(mMainHandler));
} else {
// mWifiManager#registerSoftApCallback triggers a call to
// onConnectedClientsChanged on the Main Handler. In order to always update
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/HotspotControllerImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/HotspotControllerImplTest.java
index 7f32ad5..7496e3a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/HotspotControllerImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/HotspotControllerImplTest.java
@@ -43,6 +43,7 @@
import org.mockito.invocation.InvocationOnMock;
import java.util.ArrayList;
+import java.util.concurrent.Executor;
@SmallTest
@RunWith(AndroidTestingRunner.class)
@@ -73,7 +74,7 @@
.onConnectedClientsChanged(new ArrayList<>());
return null;
}).when(mWifiManager).registerSoftApCallback(any(WifiManager.SoftApCallback.class),
- any(Handler.class));
+ any(Executor.class));
mController = new HotspotControllerImpl(mContext, new Handler(mLooper.getLooper()));
}
diff --git a/services/core/java/com/android/server/DynamicSystemService.java b/services/core/java/com/android/server/DynamicSystemService.java
index 190e6cf..7b02b6e 100644
--- a/services/core/java/com/android/server/DynamicSystemService.java
+++ b/services/core/java/com/android/server/DynamicSystemService.java
@@ -18,7 +18,6 @@
import android.content.Context;
import android.content.pm.PackageManager;
-import android.gsi.GsiInstallParams;
import android.gsi.GsiProgress;
import android.gsi.IGsiService;
import android.gsi.IGsid;
@@ -47,6 +46,7 @@
private static final int GSID_ROUGH_TIMEOUT_MS = 8192;
private static final String PATH_DEFAULT = "/data/gsi";
private Context mContext;
+ private String mInstallPath;
private volatile IGsiService mGsiService;
DynamicSystemService(Context context) {
@@ -115,8 +115,8 @@
}
@Override
- public boolean startInstallation(String name, long size, boolean readOnly)
- throws RemoteException {
+ public boolean startInstallation() throws RemoteException {
+ IGsiService service = getGsiService();
// priority from high to low: sysprop -> sdcard -> /data
String path = SystemProperties.get("os.aot.path");
if (path.isEmpty()) {
@@ -138,14 +138,19 @@
}
Slog.i(TAG, "startInstallation -> " + path);
}
+ mInstallPath = path;
+ if (service.openInstall(path) != 0) {
+ Slog.i(TAG, "Failed to open " + path);
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean createPartition(String name, long size, boolean readOnly)
+ throws RemoteException {
IGsiService service = getGsiService();
- GsiInstallParams installParams = new GsiInstallParams();
- installParams.installDir = path;
- installParams.name = name;
- installParams.size = size;
- installParams.wipe = readOnly;
- installParams.readOnly = readOnly;
- if (service.beginGsiInstall(installParams) != 0) {
+ if (service.createPartition(name, size, readOnly) != 0) {
Slog.i(TAG, "Failed to install " + name);
return false;
}
@@ -153,6 +158,16 @@
}
@Override
+ public boolean finishInstallation() throws RemoteException {
+ IGsiService service = getGsiService();
+ if (service.closeInstall() != 0) {
+ Slog.i(TAG, "Failed to finish installation");
+ return false;
+ }
+ return true;
+ }
+
+ @Override
public GsiProgress getInstallationProgress() throws RemoteException {
return getGsiService().getInstallProgress();
}
@@ -190,6 +205,8 @@
@Override
public boolean remove() throws RemoteException {
+ IGsiService gsiService = getGsiService();
+ String install_dir = gsiService.getInstalledGsiImageDir();
return getGsiService().removeGsi();
}
diff --git a/services/tests/servicestests/src/com/android/server/DynamicSystemServiceTest.java b/services/tests/servicestests/src/com/android/server/DynamicSystemServiceTest.java
index 0605d9e..50437b4 100644
--- a/services/tests/servicestests/src/com/android/server/DynamicSystemServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/DynamicSystemServiceTest.java
@@ -36,7 +36,7 @@
public void test1() {
assertTrue("dynamic_system service available", mService != null);
try {
- mService.startInstallation("userdata", 8L << 30, false);
+ mService.startInstallation();
fail("DynamicSystemService did not throw SecurityException as expected");
} catch (SecurityException e) {
// expected
diff --git a/telecomm/java/android/telecom/Logging/Session.java b/telecomm/java/android/telecom/Logging/Session.java
index 95a47e1..d82e93f 100644
--- a/telecomm/java/android/telecom/Logging/Session.java
+++ b/telecomm/java/android/telecom/Logging/Session.java
@@ -237,7 +237,10 @@
// keep track of calls and bail if we hit the recursion limit
private String getFullSessionId(int parentCount) {
if (parentCount >= SESSION_RECURSION_LIMIT) {
- Log.w(LOG_TAG, "getFullSessionId: Hit recursion limit!");
+ // Don't use Telecom's Log.w here or it will cause infinite recursion because it will
+ // try to add session information to this logging statement, which will cause it to hit
+ // this condition again and so on...
+ android.util.Slog.w(LOG_TAG, "getFullSessionId: Hit recursion limit!");
return TRUNCATE_STRING + mSessionId;
}
// Cache mParentSession locally to prevent a concurrency problem where
@@ -265,7 +268,11 @@
Session topNode = this;
while (topNode.getParentSession() != null) {
if (currParentCount >= SESSION_RECURSION_LIMIT) {
- Log.w(LOG_TAG, "getRootSession: Hit recursion limit from " + callingMethod);
+ // Don't use Telecom's Log.w here or it will cause infinite recursion because it
+ // will try to add session information to this logging statement, which will cause
+ // it to hit this condition again and so on...
+ android.util.Slog.w(LOG_TAG, "getRootSession: Hit recursion limit from "
+ + callingMethod);
break;
}
topNode = topNode.getParentSession();
@@ -289,7 +296,10 @@
private void printSessionTree(int tabI, StringBuilder sb, int currChildCount) {
// Prevent infinite recursion.
if (currChildCount >= SESSION_RECURSION_LIMIT) {
- Log.w(LOG_TAG, "printSessionTree: Hit recursion limit!");
+ // Don't use Telecom's Log.w here or it will cause infinite recursion because it will
+ // try to add session information to this logging statement, which will cause it to hit
+ // this condition again and so on...
+ android.util.Slog.w(LOG_TAG, "printSessionTree: Hit recursion limit!");
sb.append(TRUNCATE_STRING);
return;
}
@@ -315,7 +325,10 @@
private synchronized void getFullMethodPath(StringBuilder sb, boolean truncatePath,
int parentCount) {
if (parentCount >= SESSION_RECURSION_LIMIT) {
- Log.w(LOG_TAG, "getFullMethodPath: Hit recursion limit!");
+ // Don't use Telecom's Log.w here or it will cause infinite recursion because it will
+ // try to add session information to this logging statement, which will cause it to hit
+ // this condition again and so on...
+ android.util.Slog.w(LOG_TAG, "getFullMethodPath: Hit recursion limit!");
sb.append(TRUNCATE_STRING);
return;
}
diff --git a/telecomm/java/android/telecom/Logging/SessionManager.java b/telecomm/java/android/telecom/Logging/SessionManager.java
index 49c3a72..ac30058 100644
--- a/telecomm/java/android/telecom/Logging/SessionManager.java
+++ b/telecomm/java/android/telecom/Logging/SessionManager.java
@@ -202,7 +202,18 @@
return createSubsession(false);
}
- private synchronized Session createSubsession(boolean isStartedFromActiveSession) {
+ /**
+ * Creates a new subsession based on an existing session. Will not be started until
+ * {@link #continueSession(Session, String)} or {@link #cancelSubsession(Session)} is called.
+ * <p>
+ * Only public for testing!
+ * @param isStartedFromActiveSession true if this subsession is being created for a task on the
+ * same thread, false if it is being created for a related task on another thread.
+ * @return a new {@link Session}, call {@link #continueSession(Session, String)} to continue the
+ * session and {@link #endSession()} when done with this subsession.
+ */
+ @VisibleForTesting
+ public synchronized Session createSubsession(boolean isStartedFromActiveSession) {
int threadId = getCallingThreadId();
Session threadSession = mSessionMapper.get(threadId);
if (threadSession == null) {
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index e9249df2..f34c7a8 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -2287,6 +2287,77 @@
"use_only_rsrp_for_lte_signal_bar_bool";
/**
+ * List of 4 customized 5G SS reference signal received power (SSRSRP) thresholds.
+ *
+ * Reference: 3GPP TS 38.215
+ *
+ * 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]"
+ *
+ * This key is considered invalid if the format is violated. If the key is invalid or
+ * not configured, a default value set will apply.
+ */
+ public static final String KEY_5G_NR_SSRSRP_THRESHOLDS_INT_ARRAY =
+ "5g_nr_ssrsrp_thresholds_int_array";
+
+ /**
+ * List of 4 customized 5G SS reference signal received quality (SSRSRQ) thresholds.
+ *
+ * Reference: 3GPP TS 38.215
+ *
+ * 4 threshold integers must be within the boundaries [-20 dB, -3 dB], and the levels are:
+ * "NONE: [-23, threshold1]"
+ * "POOR: (threshold1, threshold2]"
+ * "MODERATE: (threshold2, threshold3]"
+ * "GOOD: (threshold3, threshold4]"
+ * "EXCELLENT: (threshold4, -3]"
+ *
+ * This key is considered invalid if the format is violated. If the key is invalid or
+ * not configured, a default value set will apply.
+ */
+ public static final String KEY_5G_NR_SSRSRQ_THRESHOLDS_INT_ARRAY =
+ "5g_nr_ssrsrq_thresholds_int_array";
+
+ /**
+ * List of 4 customized 5G SS signal-to-noise and interference ratio (SSSINR) thresholds.
+ *
+ * Reference: 3GPP TS 38.215,
+ * 3GPP TS 38.133 10.1.16.1
+ *
+ * 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]"
+ *
+ * This key is considered invalid if the format is violated. If the key is invalid or
+ * not configured, a default value set will apply.
+ */
+ public static final String KEY_5G_NR_SSSINR_THRESHOLDS_INT_ARRAY =
+ "5g_nr_sssinr_thresholds_int_array";
+
+ /**
+ * Bit-field integer to determine whether to use SS reference signal received power (SSRSRP),
+ * SS reference signal received quality (SSRSRQ), or/and SS signal-to-noise and interference
+ * ratio (SSSINR) for the number of 5G NR signal bars. If multiple measures are set bit, the
+ * parameter whose value is smallest is used to indicate the signal bar.
+ *
+ * SSRSRP = 1 << 0,
+ * SSRSRQ = 1 << 1,
+ * SSSINR = 1 << 2,
+ *
+ * Reference: 3GPP TS 38.215,
+ * 3GPP TS 38.133 10.1.16.1
+ */
+ public static final String KEY_PARAMETERS_USE_FOR_5G_NR_SIGNAL_BAR_INT =
+ "parameters_use_for_5g_nr_signal_bar_int";
+
+ /**
* Key identifying if voice call barring notification is required to be shown to the user.
* @hide
*/
diff --git a/telephony/java/android/telephony/DataSpecificRegistrationInfo.java b/telephony/java/android/telephony/DataSpecificRegistrationInfo.java
index 407ced7..270eafe 100644
--- a/telephony/java/android/telephony/DataSpecificRegistrationInfo.java
+++ b/telephony/java/android/telephony/DataSpecificRegistrationInfo.java
@@ -203,9 +203,12 @@
}
/**
+ * Get whether network has configured carrier aggregation or not.
+ *
* @return {@code true} if using carrier aggregation.
* @hide
*/
+ @SystemApi
public boolean isUsingCarrierAggregation() {
return mIsUsingCarrierAggregation;
}
diff --git a/telephony/java/android/telephony/NetworkRegistrationInfo.java b/telephony/java/android/telephony/NetworkRegistrationInfo.java
index 3e02871..bbf746fc 100644
--- a/telephony/java/android/telephony/NetworkRegistrationInfo.java
+++ b/telephony/java/android/telephony/NetworkRegistrationInfo.java
@@ -323,9 +323,12 @@
public @Domain int getDomain() { return mDomain; }
/**
+ * Get the 5G NR connection state.
+ *
* @return the 5G NR connection state.
* @hide
*/
+ @SystemApi
public @NRState int getNrState() {
return mNrState;
}
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index c575129..3fd8990 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -988,6 +988,9 @@
case RIL_RADIO_TECHNOLOGY_LTE_CA:
rtString = "LTE_CA";
break;
+ case RIL_RADIO_TECHNOLOGY_NR:
+ rtString = "LTE_NR";
+ break;
default:
rtString = "Unexpected";
Rlog.w(LOG_TAG, "Unexpected radioTechnology=" + rt);
@@ -1406,9 +1409,12 @@
}
/**
+ * Get the 5G NR frequency range the device is currently registered.
+ *
* @return the frequency range of 5G NR.
* @hide
*/
+ @SystemApi
public @FrequencyRange int getNrFrequencyRange() {
return mNrFrequencyRange;
}
@@ -1486,44 +1492,44 @@
/** @hide */
public static int rilRadioTechnologyToNetworkType(@RilRadioTechnology int rat) {
switch(rat) {
- case ServiceState.RIL_RADIO_TECHNOLOGY_GPRS:
+ case RIL_RADIO_TECHNOLOGY_GPRS:
return TelephonyManager.NETWORK_TYPE_GPRS;
- case ServiceState.RIL_RADIO_TECHNOLOGY_EDGE:
+ case RIL_RADIO_TECHNOLOGY_EDGE:
return TelephonyManager.NETWORK_TYPE_EDGE;
- case ServiceState.RIL_RADIO_TECHNOLOGY_UMTS:
+ case RIL_RADIO_TECHNOLOGY_UMTS:
return TelephonyManager.NETWORK_TYPE_UMTS;
- case ServiceState.RIL_RADIO_TECHNOLOGY_HSDPA:
+ case RIL_RADIO_TECHNOLOGY_HSDPA:
return TelephonyManager.NETWORK_TYPE_HSDPA;
- case ServiceState.RIL_RADIO_TECHNOLOGY_HSUPA:
+ case RIL_RADIO_TECHNOLOGY_HSUPA:
return TelephonyManager.NETWORK_TYPE_HSUPA;
- case ServiceState.RIL_RADIO_TECHNOLOGY_HSPA:
+ case RIL_RADIO_TECHNOLOGY_HSPA:
return TelephonyManager.NETWORK_TYPE_HSPA;
- case ServiceState.RIL_RADIO_TECHNOLOGY_IS95A:
- case ServiceState.RIL_RADIO_TECHNOLOGY_IS95B:
+ case RIL_RADIO_TECHNOLOGY_IS95A:
+ case RIL_RADIO_TECHNOLOGY_IS95B:
return TelephonyManager.NETWORK_TYPE_CDMA;
- case ServiceState.RIL_RADIO_TECHNOLOGY_1xRTT:
+ case RIL_RADIO_TECHNOLOGY_1xRTT:
return TelephonyManager.NETWORK_TYPE_1xRTT;
- case ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_0:
+ case RIL_RADIO_TECHNOLOGY_EVDO_0:
return TelephonyManager.NETWORK_TYPE_EVDO_0;
- case ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_A:
+ case RIL_RADIO_TECHNOLOGY_EVDO_A:
return TelephonyManager.NETWORK_TYPE_EVDO_A;
- case ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_B:
+ case RIL_RADIO_TECHNOLOGY_EVDO_B:
return TelephonyManager.NETWORK_TYPE_EVDO_B;
- case ServiceState.RIL_RADIO_TECHNOLOGY_EHRPD:
+ case RIL_RADIO_TECHNOLOGY_EHRPD:
return TelephonyManager.NETWORK_TYPE_EHRPD;
- case ServiceState.RIL_RADIO_TECHNOLOGY_LTE:
+ case RIL_RADIO_TECHNOLOGY_LTE:
return TelephonyManager.NETWORK_TYPE_LTE;
- case ServiceState.RIL_RADIO_TECHNOLOGY_HSPAP:
+ case RIL_RADIO_TECHNOLOGY_HSPAP:
return TelephonyManager.NETWORK_TYPE_HSPAP;
- case ServiceState.RIL_RADIO_TECHNOLOGY_GSM:
+ case RIL_RADIO_TECHNOLOGY_GSM:
return TelephonyManager.NETWORK_TYPE_GSM;
- case ServiceState.RIL_RADIO_TECHNOLOGY_TD_SCDMA:
+ case RIL_RADIO_TECHNOLOGY_TD_SCDMA:
return TelephonyManager.NETWORK_TYPE_TD_SCDMA;
- case ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN:
+ case RIL_RADIO_TECHNOLOGY_IWLAN:
return TelephonyManager.NETWORK_TYPE_IWLAN;
- case ServiceState.RIL_RADIO_TECHNOLOGY_LTE_CA:
+ case RIL_RADIO_TECHNOLOGY_LTE_CA:
return TelephonyManager.NETWORK_TYPE_LTE_CA;
- case ServiceState.RIL_RADIO_TECHNOLOGY_NR:
+ case RIL_RADIO_TECHNOLOGY_NR:
return TelephonyManager.NETWORK_TYPE_NR;
default:
return TelephonyManager.NETWORK_TYPE_UNKNOWN;
@@ -1554,6 +1560,7 @@
return AccessNetworkType.CDMA2000;
case RIL_RADIO_TECHNOLOGY_LTE:
case RIL_RADIO_TECHNOLOGY_LTE_CA:
+ case RIL_RADIO_TECHNOLOGY_NR:
return AccessNetworkType.EUTRAN;
case RIL_RADIO_TECHNOLOGY_IWLAN:
return AccessNetworkType.IWLAN;
@@ -1567,43 +1574,45 @@
public static int networkTypeToRilRadioTechnology(int networkType) {
switch(networkType) {
case TelephonyManager.NETWORK_TYPE_GPRS:
- return ServiceState.RIL_RADIO_TECHNOLOGY_GPRS;
+ return RIL_RADIO_TECHNOLOGY_GPRS;
case TelephonyManager.NETWORK_TYPE_EDGE:
- return ServiceState.RIL_RADIO_TECHNOLOGY_EDGE;
+ return RIL_RADIO_TECHNOLOGY_EDGE;
case TelephonyManager.NETWORK_TYPE_UMTS:
- return ServiceState.RIL_RADIO_TECHNOLOGY_UMTS;
+ return RIL_RADIO_TECHNOLOGY_UMTS;
case TelephonyManager.NETWORK_TYPE_HSDPA:
- return ServiceState.RIL_RADIO_TECHNOLOGY_HSDPA;
+ return RIL_RADIO_TECHNOLOGY_HSDPA;
case TelephonyManager.NETWORK_TYPE_HSUPA:
- return ServiceState.RIL_RADIO_TECHNOLOGY_HSUPA;
+ return RIL_RADIO_TECHNOLOGY_HSUPA;
case TelephonyManager.NETWORK_TYPE_HSPA:
- return ServiceState.RIL_RADIO_TECHNOLOGY_HSPA;
+ return RIL_RADIO_TECHNOLOGY_HSPA;
case TelephonyManager.NETWORK_TYPE_CDMA:
- return ServiceState.RIL_RADIO_TECHNOLOGY_IS95A;
+ return RIL_RADIO_TECHNOLOGY_IS95A;
case TelephonyManager.NETWORK_TYPE_1xRTT:
- return ServiceState.RIL_RADIO_TECHNOLOGY_1xRTT;
+ return RIL_RADIO_TECHNOLOGY_1xRTT;
case TelephonyManager.NETWORK_TYPE_EVDO_0:
- return ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_0;
+ return RIL_RADIO_TECHNOLOGY_EVDO_0;
case TelephonyManager.NETWORK_TYPE_EVDO_A:
- return ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_A;
+ return RIL_RADIO_TECHNOLOGY_EVDO_A;
case TelephonyManager.NETWORK_TYPE_EVDO_B:
- return ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_B;
+ return RIL_RADIO_TECHNOLOGY_EVDO_B;
case TelephonyManager.NETWORK_TYPE_EHRPD:
- return ServiceState.RIL_RADIO_TECHNOLOGY_EHRPD;
+ return RIL_RADIO_TECHNOLOGY_EHRPD;
case TelephonyManager.NETWORK_TYPE_LTE:
- return ServiceState.RIL_RADIO_TECHNOLOGY_LTE;
+ return RIL_RADIO_TECHNOLOGY_LTE;
case TelephonyManager.NETWORK_TYPE_HSPAP:
- return ServiceState.RIL_RADIO_TECHNOLOGY_HSPAP;
+ return RIL_RADIO_TECHNOLOGY_HSPAP;
case TelephonyManager.NETWORK_TYPE_GSM:
- return ServiceState.RIL_RADIO_TECHNOLOGY_GSM;
+ return RIL_RADIO_TECHNOLOGY_GSM;
case TelephonyManager.NETWORK_TYPE_TD_SCDMA:
- return ServiceState.RIL_RADIO_TECHNOLOGY_TD_SCDMA;
+ return RIL_RADIO_TECHNOLOGY_TD_SCDMA;
case TelephonyManager.NETWORK_TYPE_IWLAN:
- return ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN;
+ return RIL_RADIO_TECHNOLOGY_IWLAN;
case TelephonyManager.NETWORK_TYPE_LTE_CA:
- return ServiceState.RIL_RADIO_TECHNOLOGY_LTE_CA;
+ return RIL_RADIO_TECHNOLOGY_LTE_CA;
+ case TelephonyManager.NETWORK_TYPE_NR:
+ return RIL_RADIO_TECHNOLOGY_NR;
default:
- return ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN;
+ return RIL_RADIO_TECHNOLOGY_UNKNOWN;
}
}
@@ -1692,7 +1701,8 @@
|| radioTechnology == RIL_RADIO_TECHNOLOGY_GSM
|| radioTechnology == RIL_RADIO_TECHNOLOGY_TD_SCDMA
|| radioTechnology == RIL_RADIO_TECHNOLOGY_IWLAN
- || radioTechnology == RIL_RADIO_TECHNOLOGY_LTE_CA;
+ || radioTechnology == RIL_RADIO_TECHNOLOGY_LTE_CA
+ || radioTechnology == RIL_RADIO_TECHNOLOGY_NR;
}
@@ -1968,8 +1978,11 @@
/**
* The current registered raw data network operator name in long alphanumeric format.
*
+ * @return long raw name of operator, null if unregistered or unknown
* @hide
*/
+ @Nullable
+ @SystemApi
public String getOperatorAlphaLongRaw() {
return mOperatorAlphaLongRaw;
}
@@ -1984,8 +1997,11 @@
/**
* The current registered raw data network operator name in short alphanumeric format.
*
+ * @return short raw name of operator, null if unregistered or unknown
* @hide
*/
+ @Nullable
+ @SystemApi
public String getOperatorAlphaShortRaw() {
return mOperatorAlphaShortRaw;
}
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 4f85888..55212cd 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -2784,6 +2784,8 @@
/** Class of broadly defined "4G" networks. {@hide} */
@UnsupportedAppUsage
public static final int NETWORK_CLASS_4_G = 3;
+ /** Class of broadly defined "5G" networks. {@hide} */
+ public static final int NETWORK_CLASS_5_G = 4;
/**
* Return general class of network type, such as "3G" or "4G". In cases
@@ -2816,6 +2818,8 @@
case NETWORK_TYPE_IWLAN:
case NETWORK_TYPE_LTE_CA:
return NETWORK_CLASS_4_G;
+ case NETWORK_TYPE_NR:
+ return NETWORK_CLASS_5_G;
default:
return NETWORK_CLASS_UNKNOWN;
}
diff --git a/telephony/java/android/telephony/euicc/EuiccManager.java b/telephony/java/android/telephony/euicc/EuiccManager.java
index 0025c7a..cb66a96 100644
--- a/telephony/java/android/telephony/euicc/EuiccManager.java
+++ b/telephony/java/android/telephony/euicc/EuiccManager.java
@@ -189,6 +189,29 @@
"android.telephony.euicc.action.RENAME_SUBSCRIPTION_PRIVILEGED";
/**
+ * Intent action sent by a carrier app to launch the eSIM activation flow provided by the LPA UI
+ * (LUI). The carrier app must send this intent with one of the following:
+ *
+ * <p>{@link #EXTRA_USE_QR_SCANNER} not set or set to false: The LPA should try to get an
+ * activation code from the carrier app by binding to the carrier app service implementing
+ * {@link android.service.euicc.EuiccService#ACTION_BIND_CARRIER_PROVISIONING_SERVICE}.
+ * <p>{@link #EXTRA_USE_QR_SCANNER} set to true: The LPA should launch a QR scanner for the user
+ * to scan an eSIM profile QR code.
+ *
+ * <p>Upon completion, the LPA should return one of the following results to the carrier app:
+ *
+ * <p>{@code Activity.RESULT_OK}: The LPA has succeeded in downloading the new eSIM profile.
+ * <p>{@code Activity.RESULT_CANCELED}: The carrier app should treat this as if the user pressed
+ * the back button.
+ * <p>Anything else: The carrier app should treat this as an error.
+ *
+ * <p>LPA needs to check if caller's package name is allowed to perform this action.
+ **/
+ @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_START_EUICC_ACTIVATION =
+ "android.telephony.euicc.action.START_EUICC_ACTIVATION";
+
+ /**
* Result code for an operation indicating that the operation succeeded.
*/
public static final int EMBEDDED_SUBSCRIPTION_RESULT_OK = 0;
@@ -342,10 +365,20 @@
*
* @hide
*/
- // TODO: Make this a @SystemApi.
+ @SystemApi
public static final String EXTRA_PHYSICAL_SLOT_ID =
"android.telephony.euicc.extra.PHYSICAL_SLOT_ID";
+
+ /**
+ * Key for an extra set on actions {@link #ACTION_START_EUICC_ACTIVATION} providing a boolean
+ * value of whether to start eSIM activation with QR scanner.
+ *
+ * <p>Expected type of the extra data: boolean
+ **/
+ public static final String EXTRA_USE_QR_SCANNER =
+ "android.telephony.euicc.extra.USE_QR_SCANNER";
+
/**
* Optional meta-data attribute for a carrier app providing an icon to use to represent the
* carrier. If not provided, the app's launcher icon will be used as a fallback.
@@ -830,7 +863,7 @@
* @param callbackIntent a PendingIntent to launch when the operation completes.
*
* @deprecated From R, callers should specify a flag for specific set of subscriptions to erase
- * and use {@link #eraseSubscriptionsWithOptions(int, PendingIntent)} instead
+ * and use {@link #eraseSubscriptions(int, PendingIntent)} instead
*
* @hide
*/
@@ -862,7 +895,7 @@
*/
@SystemApi
@RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
- public void eraseSubscriptionsWithOptions(
+ public void eraseSubscriptions(
@ResetOption int options, @NonNull PendingIntent callbackIntent) {
if (!isEnabled()) {
sendUnavailableError(callbackIntent);
diff --git a/tools/hiddenapi/generate_hiddenapi_lists.py b/tools/hiddenapi/generate_hiddenapi_lists.py
index e883c6b..46105f4 100755
--- a/tools/hiddenapi/generate_hiddenapi_lists.py
+++ b/tools/hiddenapi/generate_hiddenapi_lists.py
@@ -241,8 +241,6 @@
flags = csv[1:]
if (FLAG_PUBLIC_API in flags) or (FLAG_SYSTEM_API in flags):
flags.append(FLAG_WHITELIST)
- elif FLAG_TEST_API in flags:
- flags.append(FLAG_GREYLIST)
self._dict[csv[0]].update(flags)
def assign_flag(self, flag, apis, source="<unknown>"):
diff --git a/tools/hiddenapi/generate_hiddenapi_lists_test.py b/tools/hiddenapi/generate_hiddenapi_lists_test.py
index 4dc880b..55c3a7d 100755
--- a/tools/hiddenapi/generate_hiddenapi_lists_test.py
+++ b/tools/hiddenapi/generate_hiddenapi_lists_test.py
@@ -53,14 +53,22 @@
# Test new additions.
flags.parse_and_merge_csv([
'A,' + FLAG_GREYLIST,
- 'B,' + FLAG_BLACKLIST + ',' + FLAG_GREYLIST_MAX_O ])
- self.assertEqual(flags.generate_csv(),
- [ 'A,' + FLAG_GREYLIST,
- 'B,' + FLAG_BLACKLIST + "," + FLAG_GREYLIST_MAX_O ])
+ 'B,' + FLAG_BLACKLIST + ',' + FLAG_GREYLIST_MAX_O,
+ 'C,' + FLAG_SYSTEM_API + ',' + FLAG_WHITELIST,
+ 'D,' + FLAG_GREYLIST+ ',' + FLAG_TEST_API,
+ 'E,' + FLAG_BLACKLIST+ ',' + FLAG_TEST_API,
+ ])
+ self.assertEqual(flags.generate_csv(), [
+ 'A,' + FLAG_GREYLIST,
+ 'B,' + FLAG_BLACKLIST + "," + FLAG_GREYLIST_MAX_O,
+ 'C,' + FLAG_SYSTEM_API + ',' + FLAG_WHITELIST,
+ 'D,' + FLAG_GREYLIST+ ',' + FLAG_TEST_API,
+ 'E,' + FLAG_BLACKLIST+ ',' + FLAG_TEST_API,
+ ])
# Test unknown flag.
with self.assertRaises(AssertionError):
- flags.parse_and_merge_csv([ 'C,foo' ])
+ flags.parse_and_merge_csv([ 'Z,foo' ])
def test_assign_flag(self):
flags = FlagsDict()
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index d9c1bf2..68355c6 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -3121,6 +3121,7 @@
*
* @hide
*/
+ @SystemApi
public interface SoftApCallback {
/**
* Called when soft AP state changes.
@@ -3149,11 +3150,11 @@
* @hide
*/
private class SoftApCallbackProxy extends ISoftApCallback.Stub {
- private final Handler mHandler;
+ private final Executor mExecutor;
private final SoftApCallback mCallback;
- SoftApCallbackProxy(Looper looper, SoftApCallback callback) {
- mHandler = new Handler(looper);
+ SoftApCallbackProxy(Executor executor, SoftApCallback callback) {
+ mExecutor = executor;
mCallback = callback;
}
@@ -3164,7 +3165,8 @@
+ ", failureReason=" + failureReason);
}
- mHandler.post(() -> {
+ Binder.clearCallingIdentity();
+ mExecutor.execute(() -> {
mCallback.onStateChanged(state, failureReason);
});
}
@@ -3176,7 +3178,8 @@
+ clients.size() + " clients");
}
- mHandler.post(() -> {
+ Binder.clearCallingIdentity();
+ mExecutor.execute(() -> {
mCallback.onConnectedClientsChanged(clients);
});
}
@@ -3195,21 +3198,22 @@
* <p>
*
* @param callback Callback for soft AP events
- * @param handler The Handler on whose thread to execute the callbacks of the {@code callback}
- * object. If null, then the application's main thread will be used.
+ * @param executor The executor to execute the callbacks of the {@code executor}
+ * object. If null, then the application's main executor will be used.
*
* @hide
*/
+ @SystemApi
@RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
public void registerSoftApCallback(@NonNull SoftApCallback callback,
- @Nullable Handler handler) {
+ @Nullable @CallbackExecutor Executor executor) {
if (callback == null) throw new IllegalArgumentException("callback cannot be null");
- Log.v(TAG, "registerSoftApCallback: callback=" + callback + ", handler=" + handler);
+ Log.v(TAG, "registerSoftApCallback: callback=" + callback + ", executor=" + executor);
- Looper looper = (handler == null) ? mContext.getMainLooper() : handler.getLooper();
+ executor = (executor == null) ? mContext.getMainExecutor() : executor;
Binder binder = new Binder();
try {
- mService.registerSoftApCallback(binder, new SoftApCallbackProxy(looper, callback),
+ mService.registerSoftApCallback(binder, new SoftApCallbackProxy(executor, callback),
callback.hashCode());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
diff --git a/wifi/tests/src/android/net/wifi/WifiManagerTest.java b/wifi/tests/src/android/net/wifi/WifiManagerTest.java
index e149194..cfdb6f1 100644
--- a/wifi/tests/src/android/net/wifi/WifiManagerTest.java
+++ b/wifi/tests/src/android/net/wifi/WifiManagerTest.java
@@ -66,6 +66,7 @@
import android.net.wifi.WifiManager.TrafficStateCallback;
import android.os.Build;
import android.os.Handler;
+import android.os.HandlerExecutor;
import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;
@@ -685,7 +686,7 @@
@Test
public void registerSoftApCallbackThrowsIllegalArgumentExceptionOnNullArgumentForCallback() {
try {
- mWifiManager.registerSoftApCallback(null, mHandler);
+ mWifiManager.registerSoftApCallback(null, new HandlerExecutor(mHandler));
fail("expected IllegalArgumentException");
} catch (IllegalArgumentException expected) {
}
@@ -710,7 +711,7 @@
public void registerSoftApCallbackUsesMainLooperOnNullArgumentForHandler() {
when(mContext.getMainLooper()).thenReturn(mLooper.getLooper());
mWifiManager.registerSoftApCallback(mSoftApCallback, null);
- verify(mContext).getMainLooper();
+ verify(mContext).getMainExecutor();
}
/**
@@ -718,7 +719,7 @@
*/
@Test
public void registerSoftApCallbackCallGoesToWifiServiceImpl() throws Exception {
- mWifiManager.registerSoftApCallback(mSoftApCallback, mHandler);
+ mWifiManager.registerSoftApCallback(mSoftApCallback, new HandlerExecutor(mHandler));
verify(mWifiService).registerSoftApCallback(any(IBinder.class),
any(ISoftApCallback.Stub.class), anyInt());
}
@@ -729,7 +730,7 @@
@Test
public void unregisterSoftApCallbackCallGoesToWifiServiceImpl() throws Exception {
ArgumentCaptor<Integer> callbackIdentifier = ArgumentCaptor.forClass(Integer.class);
- mWifiManager.registerSoftApCallback(mSoftApCallback, mHandler);
+ mWifiManager.registerSoftApCallback(mSoftApCallback, new HandlerExecutor(mHandler));
verify(mWifiService).registerSoftApCallback(any(IBinder.class),
any(ISoftApCallback.Stub.class), callbackIdentifier.capture());
@@ -744,7 +745,7 @@
public void softApCallbackProxyCallsOnStateChanged() throws Exception {
ArgumentCaptor<ISoftApCallback.Stub> callbackCaptor =
ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
- mWifiManager.registerSoftApCallback(mSoftApCallback, mHandler);
+ mWifiManager.registerSoftApCallback(mSoftApCallback, new HandlerExecutor(mHandler));
verify(mWifiService).registerSoftApCallback(any(IBinder.class), callbackCaptor.capture(),
anyInt());
@@ -760,7 +761,7 @@
public void softApCallbackProxyCallsOnConnectedClientsChanged() throws Exception {
ArgumentCaptor<ISoftApCallback.Stub> callbackCaptor =
ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
- mWifiManager.registerSoftApCallback(mSoftApCallback, mHandler);
+ mWifiManager.registerSoftApCallback(mSoftApCallback, new HandlerExecutor(mHandler));
verify(mWifiService).registerSoftApCallback(any(IBinder.class), callbackCaptor.capture(),
anyInt());
@@ -777,7 +778,7 @@
public void softApCallbackProxyCallsOnMultipleUpdates() throws Exception {
ArgumentCaptor<ISoftApCallback.Stub> callbackCaptor =
ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
- mWifiManager.registerSoftApCallback(mSoftApCallback, mHandler);
+ mWifiManager.registerSoftApCallback(mSoftApCallback, new HandlerExecutor(mHandler));
verify(mWifiService).registerSoftApCallback(any(IBinder.class), callbackCaptor.capture(),
anyInt());
@@ -801,7 +802,7 @@
ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
TestLooper altLooper = new TestLooper();
Handler altHandler = new Handler(altLooper.getLooper());
- mWifiManager.registerSoftApCallback(mSoftApCallback, altHandler);
+ mWifiManager.registerSoftApCallback(mSoftApCallback, new HandlerExecutor(altHandler));
verify(mWifiService).registerSoftApCallback(any(IBinder.class), callbackCaptor.capture(),
anyInt());
@@ -815,7 +816,7 @@
*/
@Test
public void testCorrectLooperIsUsedForSoftApCallbackHandler() throws Exception {
- mWifiManager.registerSoftApCallback(mSoftApCallback, mHandler);
+ mWifiManager.registerSoftApCallback(mSoftApCallback, new HandlerExecutor(mHandler));
mLooper.dispatchAll();
verify(mWifiService).registerSoftApCallback(any(IBinder.class),
any(ISoftApCallback.Stub.class), anyInt());