diff options
14 files changed, 189 insertions, 202 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt index adbd06c10f47..adf1da9f9e75 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -17321,7 +17321,6 @@ package android.telephony.satellite { field public static final int NT_RADIO_TECHNOLOGY_NR_NTN = 2; // 0x2 field public static final int NT_RADIO_TECHNOLOGY_PROPRIETARY = 4; // 0x4 field public static final int NT_RADIO_TECHNOLOGY_UNKNOWN = 0; // 0x0 - field public static final int SATELLITE_ACCESS_BARRED = 16; // 0x10 field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_IDLE = 0; // 0x0 field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_FAILED = 7; // 0x7 field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_NONE = 6; // 0x6 @@ -17331,13 +17330,6 @@ package android.telephony.satellite { field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_FAILED = 3; // 0x3 field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_SUCCESS = 2; // 0x2 field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_UNKNOWN = -1; // 0xffffffff - field public static final int SATELLITE_ERROR = 1; // 0x1 - field public static final int SATELLITE_ERROR_NONE = 0; // 0x0 - field public static final int SATELLITE_INVALID_ARGUMENTS = 8; // 0x8 - field public static final int SATELLITE_INVALID_MODEM_STATE = 7; // 0x7 - field public static final int SATELLITE_INVALID_TELEPHONY_STATE = 6; // 0x6 - field public static final int SATELLITE_MODEM_BUSY = 22; // 0x16 - field public static final int SATELLITE_MODEM_ERROR = 4; // 0x4 field public static final int SATELLITE_MODEM_STATE_DATAGRAM_RETRYING = 3; // 0x3 field public static final int SATELLITE_MODEM_STATE_DATAGRAM_TRANSFERRING = 2; // 0x2 field public static final int SATELLITE_MODEM_STATE_IDLE = 0; // 0x0 @@ -17345,21 +17337,29 @@ package android.telephony.satellite { field public static final int SATELLITE_MODEM_STATE_OFF = 4; // 0x4 field public static final int SATELLITE_MODEM_STATE_UNAVAILABLE = 5; // 0x5 field public static final int SATELLITE_MODEM_STATE_UNKNOWN = -1; // 0xffffffff - field public static final int SATELLITE_NETWORK_ERROR = 5; // 0x5 - field public static final int SATELLITE_NETWORK_TIMEOUT = 17; // 0x11 - field public static final int SATELLITE_NOT_AUTHORIZED = 19; // 0x13 - field public static final int SATELLITE_NOT_REACHABLE = 18; // 0x12 - field public static final int SATELLITE_NOT_SUPPORTED = 20; // 0x14 - field public static final int SATELLITE_NO_RESOURCES = 12; // 0xc - field public static final int SATELLITE_RADIO_NOT_AVAILABLE = 10; // 0xa - field public static final int SATELLITE_REQUEST_ABORTED = 15; // 0xf - field public static final int SATELLITE_REQUEST_FAILED = 9; // 0x9 - field public static final int SATELLITE_REQUEST_IN_PROGRESS = 21; // 0x15 - field public static final int SATELLITE_REQUEST_NOT_SUPPORTED = 11; // 0xb - field public static final int SATELLITE_SERVER_ERROR = 2; // 0x2 - field public static final int SATELLITE_SERVICE_ERROR = 3; // 0x3 - field public static final int SATELLITE_SERVICE_NOT_PROVISIONED = 13; // 0xd - field public static final int SATELLITE_SERVICE_PROVISION_IN_PROGRESS = 14; // 0xe + field public static final int SATELLITE_RESULT_ACCESS_BARRED = 16; // 0x10 + field public static final int SATELLITE_RESULT_ERROR = 1; // 0x1 + field public static final int SATELLITE_RESULT_INVALID_ARGUMENTS = 8; // 0x8 + field public static final int SATELLITE_RESULT_INVALID_MODEM_STATE = 7; // 0x7 + field public static final int SATELLITE_RESULT_INVALID_TELEPHONY_STATE = 6; // 0x6 + field public static final int SATELLITE_RESULT_MODEM_BUSY = 22; // 0x16 + field public static final int SATELLITE_RESULT_MODEM_ERROR = 4; // 0x4 + field public static final int SATELLITE_RESULT_NETWORK_ERROR = 5; // 0x5 + field public static final int SATELLITE_RESULT_NETWORK_TIMEOUT = 17; // 0x11 + field public static final int SATELLITE_RESULT_NOT_AUTHORIZED = 19; // 0x13 + field public static final int SATELLITE_RESULT_NOT_REACHABLE = 18; // 0x12 + field public static final int SATELLITE_RESULT_NOT_SUPPORTED = 20; // 0x14 + field public static final int SATELLITE_RESULT_NO_RESOURCES = 12; // 0xc + field public static final int SATELLITE_RESULT_RADIO_NOT_AVAILABLE = 10; // 0xa + field public static final int SATELLITE_RESULT_REQUEST_ABORTED = 15; // 0xf + field public static final int SATELLITE_RESULT_REQUEST_FAILED = 9; // 0x9 + field public static final int SATELLITE_RESULT_REQUEST_IN_PROGRESS = 21; // 0x15 + field public static final int SATELLITE_RESULT_REQUEST_NOT_SUPPORTED = 11; // 0xb + field public static final int SATELLITE_RESULT_SERVER_ERROR = 2; // 0x2 + field public static final int SATELLITE_RESULT_SERVICE_ERROR = 3; // 0x3 + field public static final int SATELLITE_RESULT_SERVICE_NOT_PROVISIONED = 13; // 0xd + field public static final int SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS = 14; // 0xe + field public static final int SATELLITE_RESULT_SUCCESS = 0; // 0x0 } public static class SatelliteManager.SatelliteException extends java.lang.Exception { diff --git a/core/java/android/service/trust/OWNERS b/core/java/android/service/trust/OWNERS index 16eb19a58952..d3525250ebb6 100644 --- a/core/java/android/service/trust/OWNERS +++ b/core/java/android/service/trust/OWNERS @@ -1,3 +1,4 @@ # Bug component: 36824 jacobhobbie@google.com +dlm@google.com diff --git a/core/res/OWNERS b/core/res/OWNERS index b46902e3a8e9..0df7c2047bc1 100644 --- a/core/res/OWNERS +++ b/core/res/OWNERS @@ -52,3 +52,6 @@ per-file res/xml/power_profile_test.xml = file:/BATTERY_STATS_OWNERS # Telephony per-file res/values/config_telephony.xml = file:/platform/frameworks/opt/telephony:/OWNERS per-file res/xml/sms_short_codes.xml = file:/platform/frameworks/opt/telephony:/OWNERS + +# TV Input Framework +per-file res/values/config_tv_external_input_logging.xml = file:/services/core/java/com/android/server/tv/OWNERS diff --git a/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java b/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java index a9dd1cbbdbe3..a41fb64716e2 100644 --- a/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java +++ b/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java @@ -67,6 +67,7 @@ import android.view.View; import android.window.WindowContextInfo; import android.window.WindowTokenClientController; +import androidx.test.filters.FlakyTest; import androidx.test.filters.MediumTest; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.rule.ActivityTestRule; @@ -629,6 +630,7 @@ public class ActivityThreadTest { }); } + @FlakyTest(bugId = 298331121) @Test public void testHandleConfigurationChanged_DoesntOverrideActivityConfig() { final TestActivity activity = mActivityTestRule.launchActivity(new Intent()); diff --git a/packages/SystemUI/animation/Android.bp b/packages/SystemUI/animation/Android.bp index 8eb012d2e41c..6f53b42371c6 100644 --- a/packages/SystemUI/animation/Android.bp +++ b/packages/SystemUI/animation/Android.bp @@ -68,5 +68,6 @@ android_library { kotlincflags: ["-Xjvm-default=all"], // sdk_version must be specified, otherwise it compiles against private APIs. + min_sdk_version: "33", sdk_version: "current", } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java index 0ff1a9561748..67c0c94d6544 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java @@ -44,7 +44,6 @@ import com.android.systemui.navigationbar.NavigationBarView; import com.android.systemui.plugins.ActivityStarter.OnDismissAction; import com.android.systemui.qs.QSPanelController; import com.android.systemui.shared.system.RemoteAnimationRunnerCompat; -import com.android.systemui.statusbar.NotificationPresenter; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.util.Compile; @@ -183,8 +182,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner { return contextForUser.getPackageManager(); } - void start(); - boolean updateIsKeyguard(); boolean updateIsKeyguard(boolean forceStateChange); @@ -200,8 +197,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner { void onKeyguardViewManagerStatesUpdated(); - NotificationPresenter getPresenter(); - /** * Used to dispatch initial touch events before crossing the threshold to pull down the * notification shade. After that, since the launcher window is set to slippery, input @@ -220,8 +215,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner { /** */ boolean getCommandQueuePanelsEnabled(); - BiometricUnlockController getBiometricUnlockController(); - void showWirelessChargingAnimation(int batteryLevel); void checkBarModes(); @@ -230,9 +223,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner { void setInteracting(int barWindow, boolean interacting); - @Override - void dump(PrintWriter pwOriginal, String[] args); - /** @deprecated Use {@link DisplayMetricsRepository} instead. */ @Deprecated float getDisplayWidth(); @@ -281,8 +271,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner { void setBouncerShowing(boolean bouncerShowing); - int getWakefulnessState(); - boolean isScreenFullyOff(); void showScreenPinningRequest(int taskId, boolean allowCancel); @@ -323,8 +311,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner { boolean isBouncerShowingOverDream(); - boolean isKeyguardSecure(); - void updateNotificationPanelTouchState(); int getRotation(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt index 37038a357479..98ba6d91413f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt @@ -23,9 +23,7 @@ import com.android.systemui.animation.ActivityLaunchAnimator import com.android.systemui.navigationbar.NavigationBarView import com.android.systemui.plugins.ActivityStarter.OnDismissAction import com.android.systemui.qs.QSPanelController -import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow -import java.io.PrintWriter /** * Empty implementation of [CentralSurfaces] for variants only need to override portions of the @@ -41,15 +39,12 @@ abstract class CentralSurfacesEmptyImpl : CentralSurfaces { override fun getKeyguardMessageArea(): AuthKeyguardMessageArea? = null override fun isLaunchingActivityOverLockscreen() = false override fun onKeyguardViewManagerStatesUpdated() {} - override fun getPresenter(): NotificationPresenter? = null override fun onInputFocusTransfer(start: Boolean, cancel: Boolean, velocity: Float) {} override fun getCommandQueuePanelsEnabled() = false - override fun getBiometricUnlockController(): BiometricUnlockController? = null override fun showWirelessChargingAnimation(batteryLevel: Int) {} override fun checkBarModes() {} override fun updateBubblesVisibility() {} override fun setInteracting(barWindow: Int, interacting: Boolean) {} - override fun dump(pwOriginal: PrintWriter, args: Array<String>) {} override fun getDisplayWidth() = 0f override fun getDisplayHeight() = 0f override fun showKeyguard() {} @@ -77,7 +72,6 @@ abstract class CentralSurfacesEmptyImpl : CentralSurfaces { override fun showPinningEnterExitToast(entering: Boolean) {} override fun showPinningEscapeToast() {} override fun setBouncerShowing(bouncerShowing: Boolean) {} - override fun getWakefulnessState() = 0 override fun isScreenFullyOff() = false override fun showScreenPinningRequest(taskId: Int, allowCancel: Boolean) {} override fun getEmergencyActionIntent(): Intent? = null @@ -95,7 +89,6 @@ abstract class CentralSurfacesEmptyImpl : CentralSurfaces { override fun isBouncerShowing() = false override fun isBouncerShowingScrimmed() = false override fun isBouncerShowingOverDream() = false - override fun isKeyguardSecure() = false override fun updateNotificationPanelTouchState() {} override fun getRotation() = 0 override fun setBarStateForTest(state: Int) {} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index b32ccbd9064c..0277a36c91ad 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -1649,11 +1649,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { logStateToEventlog(); } - @Override - public NotificationPresenter getPresenter() { - return mPresenter; - } - @VisibleForTesting @Override public void setBarStateForTest(int state) { @@ -1728,11 +1723,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { } @Override - public BiometricUnlockController getBiometricUnlockController() { - return mBiometricUnlockController; - } - - @Override public void showTransientUnchecked() { if (!mTransientShown) { mTransientShown = true; @@ -2486,7 +2476,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mStatusBarKeyguardViewManager.reset(true); } else if (mState == StatusBarState.KEYGUARD && !mStatusBarKeyguardViewManager.primaryBouncerIsOrWillBeShowing() - && isKeyguardSecure()) { + && mStatusBarKeyguardViewManager.isSecure()) { mStatusBarKeyguardViewManager.showBouncer(true /* scrimmed */); } } @@ -2825,11 +2815,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { } }; - @Override - public int getWakefulnessState() { - return mWakefulnessLifecycle.getWakefulness(); - } - /** * @return true if the screen is currently fully off, i.e. has finished turning off and has * since not started turning on. @@ -2895,7 +2880,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { if (mDevicePolicyManager.getCameraDisabled(null, mLockscreenUserManager.getCurrentUserId())) { return false; - } else if (isKeyguardShowing() && isKeyguardSecure()) { + } else if (isKeyguardShowing() && mStatusBarKeyguardViewManager.isSecure()) { // Check if the admin has disabled the camera specifically for the keyguard return (mDevicePolicyManager.getKeyguardDisabledFeatures(null, mLockscreenUserManager.getCurrentUserId()) @@ -3198,11 +3183,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { return mBouncerShowingOverDream; } - @Override - public boolean isKeyguardSecure() { - return mStatusBarKeyguardViewManager.isSecure(); - } - // End Extra BaseStatusBarMethods. boolean isTransientShown() { diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 594712f72710..0d265a0f4c4a 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -5446,6 +5446,19 @@ public class ActivityManagerService extends IActivityManager.Stub intent = new Intent(Intent.ACTION_MAIN); } try { + if (allowlistToken != null) { + final int callingUid = Binder.getCallingUid(); + final String packageName; + final long token = Binder.clearCallingIdentity(); + try { + packageName = AppGlobals.getPackageManager().getNameForUid(callingUid); + } finally { + Binder.restoreCallingIdentity(token); + } + Slog.wtf(TAG, "Send a non-null allowlistToken to a non-PI target." + + " Calling package: " + packageName + "; intent: " + intent + + "; options: " + options); + } target.send(code, intent, resolvedType, allowlistToken, null, requiredPermission, options); } catch (RemoteException e) { diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java index ff35b192cccd..bfccd58b3f5d 100644 --- a/services/core/java/com/android/server/connectivity/Vpn.java +++ b/services/core/java/com/android/server/connectivity/Vpn.java @@ -3066,7 +3066,8 @@ public class Vpn { * <p>This variable controls the retry delay, and is reset when the VPN pass network * validation. */ - private int mValidationFailRetryCount = 0; + @VisibleForTesting(visibility = VisibleForTesting.Visibility.PRIVATE) + int mValidationFailRetryCount = 0; /** * The number of attempts since the last successful connection. @@ -3897,6 +3898,18 @@ public class Vpn { // Skip other invalid status if the scheduled recovery exists. if (mScheduledHandleDataStallFuture != null) return; + // Trigger network validation on the underlying network to possibly cause system + // switch default network or try recover if the current default network is broken. + // + // For the same underlying network, the first validation result should clarify if + // it's caused by broken underlying network. So only perform underlying network + // re-evaluation after first validation failure to prevent extra network resource + // costs on sending probes. + if (mValidationFailRetryCount == 0) { + mConnectivityManager.reportNetworkConnectivity( + mActiveNetwork, false /* hasConnectivity */); + } + if (mValidationFailRetryCount < MAX_MOBIKE_RECOVERY_ATTEMPT) { Log.d(TAG, "Validation failed"); diff --git a/telephony/java/android/telephony/satellite/SatelliteManager.java b/telephony/java/android/telephony/satellite/SatelliteManager.java index 9994002a4a37..75b5f555e909 100644 --- a/telephony/java/android/telephony/satellite/SatelliteManager.java +++ b/telephony/java/android/telephony/satellite/SatelliteManager.java @@ -101,26 +101,26 @@ public final class SatelliteManager { } /** - * Exception from the satellite service containing the {@link SatelliteError} error code. + * Exception from the satellite service containing the {@link SatelliteResult} error code. */ public static class SatelliteException extends Exception { - @SatelliteError private final int mErrorCode; + @SatelliteResult private final int mErrorCode; /** * Create a SatelliteException with a given error code. * - * @param errorCode The {@link SatelliteError}. + * @param errorCode The {@link SatelliteResult}. */ - public SatelliteException(@SatelliteError int errorCode) { + public SatelliteException(@SatelliteResult int errorCode) { mErrorCode = errorCode; } /** * Get the error code returned from the satellite service. * - * @return The {@link SatelliteError}. + * @return The {@link SatelliteResult}. */ - @SatelliteError public int getErrorCode() { + @SatelliteResult public int getErrorCode() { return mErrorCode; } } @@ -185,134 +185,134 @@ public final class SatelliteManager { /** * The request was successfully processed. */ - public static final int SATELLITE_ERROR_NONE = 0; + public static final int SATELLITE_RESULT_SUCCESS = 0; /** * A generic error which should be used only when other specific errors cannot be used. */ - public static final int SATELLITE_ERROR = 1; + public static final int SATELLITE_RESULT_ERROR = 1; /** * Error received from the satellite server. */ - public static final int SATELLITE_SERVER_ERROR = 2; + public static final int SATELLITE_RESULT_SERVER_ERROR = 2; /** * Error received from the vendor service. This generic error code should be used * only when the error cannot be mapped to other specific service error codes. */ - public static final int SATELLITE_SERVICE_ERROR = 3; + public static final int SATELLITE_RESULT_SERVICE_ERROR = 3; /** * Error received from satellite modem. This generic error code should be used only when * the error cannot be mapped to other specific modem error codes. */ - public static final int SATELLITE_MODEM_ERROR = 4; + public static final int SATELLITE_RESULT_MODEM_ERROR = 4; /** * Error received from the satellite network. This generic error code should be used only when * the error cannot be mapped to other specific network error codes. */ - public static final int SATELLITE_NETWORK_ERROR = 5; + public static final int SATELLITE_RESULT_NETWORK_ERROR = 5; /** * Telephony is not in a valid state to receive requests from clients. */ - public static final int SATELLITE_INVALID_TELEPHONY_STATE = 6; + public static final int SATELLITE_RESULT_INVALID_TELEPHONY_STATE = 6; /** * Satellite modem is not in a valid state to receive requests from clients. */ - public static final int SATELLITE_INVALID_MODEM_STATE = 7; + public static final int SATELLITE_RESULT_INVALID_MODEM_STATE = 7; /** * Either vendor service, or modem, or Telephony framework has received a request with * invalid arguments from its clients. */ - public static final int SATELLITE_INVALID_ARGUMENTS = 8; + public static final int SATELLITE_RESULT_INVALID_ARGUMENTS = 8; /** * Telephony framework failed to send a request or receive a response from the vendor service * or satellite modem due to internal error. */ - public static final int SATELLITE_REQUEST_FAILED = 9; + public static final int SATELLITE_RESULT_REQUEST_FAILED = 9; /** * Radio did not start or is resetting. */ - public static final int SATELLITE_RADIO_NOT_AVAILABLE = 10; + public static final int SATELLITE_RESULT_RADIO_NOT_AVAILABLE = 10; /** * The request is not supported by either the satellite modem or the network. */ - public static final int SATELLITE_REQUEST_NOT_SUPPORTED = 11; + public static final int SATELLITE_RESULT_REQUEST_NOT_SUPPORTED = 11; /** * Satellite modem or network has no resources available to handle requests from clients. */ - public static final int SATELLITE_NO_RESOURCES = 12; + public static final int SATELLITE_RESULT_NO_RESOURCES = 12; /** * Satellite service is not provisioned yet. */ - public static final int SATELLITE_SERVICE_NOT_PROVISIONED = 13; + public static final int SATELLITE_RESULT_SERVICE_NOT_PROVISIONED = 13; /** * Satellite service provision is already in progress. */ - public static final int SATELLITE_SERVICE_PROVISION_IN_PROGRESS = 14; + public static final int SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS = 14; /** * The ongoing request was aborted by either the satellite modem or the network. * This error is also returned when framework decides to abort current send request as one * of the previous send request failed. */ - public static final int SATELLITE_REQUEST_ABORTED = 15; + public static final int SATELLITE_RESULT_REQUEST_ABORTED = 15; /** * The device/subscriber is barred from accessing the satellite service. */ - public static final int SATELLITE_ACCESS_BARRED = 16; + public static final int SATELLITE_RESULT_ACCESS_BARRED = 16; /** * Satellite modem timeout to receive ACK or response from the satellite network after * sending a request to the network. */ - public static final int SATELLITE_NETWORK_TIMEOUT = 17; + public static final int SATELLITE_RESULT_NETWORK_TIMEOUT = 17; /** * Satellite network is not reachable from the modem. */ - public static final int SATELLITE_NOT_REACHABLE = 18; + public static final int SATELLITE_RESULT_NOT_REACHABLE = 18; /** * The device/subscriber is not authorized to register with the satellite service provider. */ - public static final int SATELLITE_NOT_AUTHORIZED = 19; + public static final int SATELLITE_RESULT_NOT_AUTHORIZED = 19; /** * The device does not support satellite. */ - public static final int SATELLITE_NOT_SUPPORTED = 20; + public static final int SATELLITE_RESULT_NOT_SUPPORTED = 20; /** * The current request is already in-progress. */ - public static final int SATELLITE_REQUEST_IN_PROGRESS = 21; + public static final int SATELLITE_RESULT_REQUEST_IN_PROGRESS = 21; /** * Satellite modem is currently busy due to which current request cannot be processed. */ - public static final int SATELLITE_MODEM_BUSY = 22; + public static final int SATELLITE_RESULT_MODEM_BUSY = 22; /** @hide */ - @IntDef(prefix = {"SATELLITE_"}, value = { - SATELLITE_ERROR_NONE, - SATELLITE_ERROR, - SATELLITE_SERVER_ERROR, - SATELLITE_SERVICE_ERROR, - SATELLITE_MODEM_ERROR, - SATELLITE_NETWORK_ERROR, - SATELLITE_INVALID_TELEPHONY_STATE, - SATELLITE_INVALID_MODEM_STATE, - SATELLITE_INVALID_ARGUMENTS, - SATELLITE_REQUEST_FAILED, - SATELLITE_RADIO_NOT_AVAILABLE, - SATELLITE_REQUEST_NOT_SUPPORTED, - SATELLITE_NO_RESOURCES, - SATELLITE_SERVICE_NOT_PROVISIONED, - SATELLITE_SERVICE_PROVISION_IN_PROGRESS, - SATELLITE_REQUEST_ABORTED, - SATELLITE_ACCESS_BARRED, - SATELLITE_NETWORK_TIMEOUT, - SATELLITE_NOT_REACHABLE, - SATELLITE_NOT_AUTHORIZED, - SATELLITE_NOT_SUPPORTED, - SATELLITE_REQUEST_IN_PROGRESS, - SATELLITE_MODEM_BUSY + @IntDef(prefix = {"SATELLITE_RESULT_"}, value = { + SATELLITE_RESULT_SUCCESS, + SATELLITE_RESULT_ERROR, + SATELLITE_RESULT_SERVER_ERROR, + SATELLITE_RESULT_SERVICE_ERROR, + SATELLITE_RESULT_MODEM_ERROR, + SATELLITE_RESULT_NETWORK_ERROR, + SATELLITE_RESULT_INVALID_TELEPHONY_STATE, + SATELLITE_RESULT_INVALID_MODEM_STATE, + SATELLITE_RESULT_INVALID_ARGUMENTS, + SATELLITE_RESULT_REQUEST_FAILED, + SATELLITE_RESULT_RADIO_NOT_AVAILABLE, + SATELLITE_RESULT_REQUEST_NOT_SUPPORTED, + SATELLITE_RESULT_NO_RESOURCES, + SATELLITE_RESULT_SERVICE_NOT_PROVISIONED, + SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS, + SATELLITE_RESULT_REQUEST_ABORTED, + SATELLITE_RESULT_ACCESS_BARRED, + SATELLITE_RESULT_NETWORK_TIMEOUT, + SATELLITE_RESULT_NOT_REACHABLE, + SATELLITE_RESULT_NOT_AUTHORIZED, + SATELLITE_RESULT_NOT_SUPPORTED, + SATELLITE_RESULT_REQUEST_IN_PROGRESS, + SATELLITE_RESULT_MODEM_BUSY }) @Retention(RetentionPolicy.SOURCE) - public @interface SatelliteError {} + public @interface SatelliteResult {} /** * Unknown Non-Terrestrial radio technology. This generic radio technology should be used @@ -403,7 +403,7 @@ public final class SatelliteManager { * {@code false} to disable. * @param enableDemoMode {@code true} to enable demo mode and {@code false} to disable. * @param executor The executor on which the error code listener will be called. - * @param resultListener Listener for the {@link SatelliteError} result of the operation. + * @param resultListener Listener for the {@link SatelliteResult} result of the operation. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. @@ -412,7 +412,7 @@ public final class SatelliteManager { public void requestSatelliteEnabled(boolean enableSatellite, boolean enableDemoMode, @NonNull @CallbackExecutor Executor executor, - @SatelliteError @NonNull Consumer<Integer> resultListener) { + @SatelliteResult @NonNull Consumer<Integer> resultListener) { Objects.requireNonNull(executor); Objects.requireNonNull(resultListener); @@ -446,7 +446,7 @@ public final class SatelliteManager { * will return a {@code boolean} with value {@code true} if the satellite modem * is enabled and {@code false} otherwise. * If the request is not successful, {@link OutcomeReceiver#onError(Throwable)} - * will return a {@link SatelliteException} with the {@link SatelliteError}. + * will return a {@link SatelliteException} with the {@link SatelliteResult}. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. @@ -464,7 +464,7 @@ public final class SatelliteManager { ResultReceiver receiver = new ResultReceiver(null) { @Override protected void onReceiveResult(int resultCode, Bundle resultData) { - if (resultCode == SATELLITE_ERROR_NONE) { + if (resultCode == SATELLITE_RESULT_SUCCESS) { if (resultData.containsKey(KEY_SATELLITE_ENABLED)) { boolean isSatelliteEnabled = resultData.getBoolean(KEY_SATELLITE_ENABLED); @@ -473,8 +473,8 @@ public final class SatelliteManager { } else { loge("KEY_SATELLITE_ENABLED does not exist."); executor.execute(() -> Binder.withCleanCallingIdentity(() -> - callback.onError( - new SatelliteException(SATELLITE_REQUEST_FAILED)))); + callback.onError(new SatelliteException( + SATELLITE_RESULT_REQUEST_FAILED)))); } } else { executor.execute(() -> Binder.withCleanCallingIdentity(() -> @@ -501,7 +501,7 @@ public final class SatelliteManager { * will return a {@code boolean} with value {@code true} if demo mode is enabled * and {@code false} otherwise. * If the request is not successful, {@link OutcomeReceiver#onError(Throwable)} - * will return a {@link SatelliteException} with the {@link SatelliteError}. + * will return a {@link SatelliteException} with the {@link SatelliteResult}. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. @@ -519,7 +519,7 @@ public final class SatelliteManager { ResultReceiver receiver = new ResultReceiver(null) { @Override protected void onReceiveResult(int resultCode, Bundle resultData) { - if (resultCode == SATELLITE_ERROR_NONE) { + if (resultCode == SATELLITE_RESULT_SUCCESS) { if (resultData.containsKey(KEY_DEMO_MODE_ENABLED)) { boolean isDemoModeEnabled = resultData.getBoolean(KEY_DEMO_MODE_ENABLED); @@ -528,8 +528,8 @@ public final class SatelliteManager { } else { loge("KEY_DEMO_MODE_ENABLED does not exist."); executor.execute(() -> Binder.withCleanCallingIdentity(() -> - callback.onError( - new SatelliteException(SATELLITE_REQUEST_FAILED)))); + callback.onError(new SatelliteException( + SATELLITE_RESULT_REQUEST_FAILED)))); } } else { executor.execute(() -> Binder.withCleanCallingIdentity(() -> @@ -556,7 +556,7 @@ public final class SatelliteManager { * will return a {@code boolean} with value {@code true} if the satellite * service is supported on the device and {@code false} otherwise. * If the request is not successful, {@link OutcomeReceiver#onError(Throwable)} - * will return a {@link SatelliteException} with the {@link SatelliteError}. + * will return a {@link SatelliteException} with the {@link SatelliteResult}. * * @throws IllegalStateException if the Telephony process is not currently available. */ @@ -572,7 +572,7 @@ public final class SatelliteManager { ResultReceiver receiver = new ResultReceiver(null) { @Override protected void onReceiveResult(int resultCode, Bundle resultData) { - if (resultCode == SATELLITE_ERROR_NONE) { + if (resultCode == SATELLITE_RESULT_SUCCESS) { if (resultData.containsKey(KEY_SATELLITE_SUPPORTED)) { boolean isSatelliteSupported = resultData.getBoolean(KEY_SATELLITE_SUPPORTED); @@ -581,8 +581,8 @@ public final class SatelliteManager { } else { loge("KEY_SATELLITE_SUPPORTED does not exist."); executor.execute(() -> Binder.withCleanCallingIdentity(() -> - callback.onError( - new SatelliteException(SATELLITE_REQUEST_FAILED)))); + callback.onError(new SatelliteException( + SATELLITE_RESULT_REQUEST_FAILED)))); } } else { executor.execute(() -> Binder.withCleanCallingIdentity(() -> @@ -608,7 +608,7 @@ public final class SatelliteManager { * If the request is successful, {@link OutcomeReceiver#onResult(Object)} * will return the {@link SatelliteCapabilities} of the satellite service. * If the request is not successful, {@link OutcomeReceiver#onError(Throwable)} - * will return a {@link SatelliteException} with the {@link SatelliteError}. + * will return a {@link SatelliteException} with the {@link SatelliteResult}. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. @@ -626,7 +626,7 @@ public final class SatelliteManager { ResultReceiver receiver = new ResultReceiver(null) { @Override protected void onReceiveResult(int resultCode, Bundle resultData) { - if (resultCode == SATELLITE_ERROR_NONE) { + if (resultCode == SATELLITE_RESULT_SUCCESS) { if (resultData.containsKey(KEY_SATELLITE_CAPABILITIES)) { SatelliteCapabilities capabilities = resultData.getParcelable(KEY_SATELLITE_CAPABILITIES, @@ -636,8 +636,8 @@ public final class SatelliteManager { } else { loge("KEY_SATELLITE_CAPABILITIES does not exist."); executor.execute(() -> Binder.withCleanCallingIdentity(() -> - callback.onError( - new SatelliteException(SATELLITE_REQUEST_FAILED)))); + callback.onError(new SatelliteException( + SATELLITE_RESULT_REQUEST_FAILED)))); } } else { executor.execute(() -> Binder.withCleanCallingIdentity(() -> @@ -794,13 +794,13 @@ public final class SatelliteManager { * Start receiving satellite transmission updates. * This can be called by the pointing UI when the user starts pointing to the satellite. * Modem should continue to report the pointing input as the device or satellite moves. - * Satellite transmission updates are started only on {@link #SATELLITE_ERROR_NONE}. + * Satellite transmission updates are started only on {@link #SATELLITE_RESULT_SUCCESS}. * All other results indicate that this operation failed. * Once satellite transmission updates begin, position and datagram transfer state updates * will be sent through {@link SatelliteTransmissionUpdateCallback}. * * @param executor The executor on which the callback and error code listener will be called. - * @param resultListener Listener for the {@link SatelliteError} result of the operation. + * @param resultListener Listener for the {@link SatelliteResult} result of the operation. * @param callback The callback to notify of satellite transmission updates. * * @throws SecurityException if the caller doesn't have required permission. @@ -809,7 +809,7 @@ public final class SatelliteManager { @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) public void startSatelliteTransmissionUpdates(@NonNull @CallbackExecutor Executor executor, - @SatelliteError @NonNull Consumer<Integer> resultListener, + @SatelliteResult @NonNull Consumer<Integer> resultListener, @NonNull SatelliteTransmissionUpdateCallback callback) { Objects.requireNonNull(executor); Objects.requireNonNull(resultListener); @@ -866,12 +866,12 @@ public final class SatelliteManager { * Stop receiving satellite transmission updates. * This can be called by the pointing UI when the user stops pointing to the satellite. * Satellite transmission updates are stopped and the callback is unregistered only on - * {@link #SATELLITE_ERROR_NONE}. All other results that this operation failed. + * {@link #SATELLITE_RESULT_SUCCESS}. All other results that this operation failed. * * @param callback The callback that was passed to {@link * #startSatelliteTransmissionUpdates(Executor, Consumer, SatelliteTransmissionUpdateCallback)}. * @param executor The executor on which the error code listener will be called. - * @param resultListener Listener for the {@link SatelliteError} result of the operation. + * @param resultListener Listener for the {@link SatelliteResult} result of the operation. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. @@ -881,7 +881,7 @@ public final class SatelliteManager { public void stopSatelliteTransmissionUpdates( @NonNull SatelliteTransmissionUpdateCallback callback, @NonNull @CallbackExecutor Executor executor, - @SatelliteError @NonNull Consumer<Integer> resultListener) { + @SatelliteResult @NonNull Consumer<Integer> resultListener) { Objects.requireNonNull(callback); Objects.requireNonNull(executor); Objects.requireNonNull(resultListener); @@ -905,7 +905,7 @@ public final class SatelliteManager { } else { loge("stopSatelliteTransmissionUpdates: No internal callback."); executor.execute(() -> Binder.withCleanCallingIdentity( - () -> resultListener.accept(SATELLITE_INVALID_ARGUMENTS))); + () -> resultListener.accept(SATELLITE_RESULT_INVALID_ARGUMENTS))); } } else { throw new IllegalStateException("telephony service is null."); @@ -927,7 +927,7 @@ public final class SatelliteManager { * request. Even when the cancellation is signaled, Telephony will * still trigger the callback to return the result of this request. * @param executor The executor on which the error code listener will be called. - * @param resultListener Listener for the {@link SatelliteError} result of the operation. + * @param resultListener Listener for the {@link SatelliteResult} result of the operation. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. @@ -937,7 +937,7 @@ public final class SatelliteManager { public void provisionSatelliteService(@NonNull String token, @NonNull byte[] provisionData, @Nullable CancellationSignal cancellationSignal, @NonNull @CallbackExecutor Executor executor, - @SatelliteError @NonNull Consumer<Integer> resultListener) { + @SatelliteResult @NonNull Consumer<Integer> resultListener) { Objects.requireNonNull(token); Objects.requireNonNull(executor); Objects.requireNonNull(resultListener); @@ -980,7 +980,7 @@ public final class SatelliteManager { * This should match with the token passed as input in * {@link #provisionSatelliteService(String, byte[], CancellationSignal, Executor, * Consumer)} - * @param resultListener Listener for the {@link SatelliteError} result of the operation. + * @param resultListener Listener for the {@link SatelliteResult} result of the operation. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. @@ -989,7 +989,7 @@ public final class SatelliteManager { public void deprovisionSatelliteService(@NonNull String token, @NonNull @CallbackExecutor Executor executor, - @SatelliteError @NonNull Consumer<Integer> resultListener) { + @SatelliteResult @NonNull Consumer<Integer> resultListener) { Objects.requireNonNull(token); Objects.requireNonNull(executor); Objects.requireNonNull(resultListener); @@ -1020,14 +1020,14 @@ public final class SatelliteManager { * @param executor The executor on which the callback will be called. * @param callback The callback to handle the satellite provision state changed event. * - * @return The {@link SatelliteError} result of the operation. + * @return The {@link SatelliteResult} result of the operation. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) - @SatelliteError public int registerForSatelliteProvisionStateChanged( + @SatelliteResult public int registerForSatelliteProvisionStateChanged( @NonNull @CallbackExecutor Executor executor, @NonNull SatelliteProvisionStateCallback callback) { Objects.requireNonNull(executor); @@ -1055,7 +1055,7 @@ public final class SatelliteManager { loge("registerForSatelliteProvisionStateChanged() RemoteException: " + ex); ex.rethrowFromSystemServer(); } - return SATELLITE_REQUEST_FAILED; + return SATELLITE_RESULT_REQUEST_FAILED; } /** @@ -1102,7 +1102,7 @@ public final class SatelliteManager { * will return a {@code boolean} with value {@code true} if the device is * provisioned with a satellite provider and {@code false} otherwise. * If the request is not successful, {@link OutcomeReceiver#onError(Throwable)} - * will return a {@link SatelliteException} with the {@link SatelliteError}. + * will return a {@link SatelliteException} with the {@link SatelliteResult}. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. @@ -1120,7 +1120,7 @@ public final class SatelliteManager { ResultReceiver receiver = new ResultReceiver(null) { @Override protected void onReceiveResult(int resultCode, Bundle resultData) { - if (resultCode == SATELLITE_ERROR_NONE) { + if (resultCode == SATELLITE_RESULT_SUCCESS) { if (resultData.containsKey(KEY_SATELLITE_PROVISIONED)) { boolean isSatelliteProvisioned = resultData.getBoolean(KEY_SATELLITE_PROVISIONED); @@ -1129,8 +1129,8 @@ public final class SatelliteManager { } else { loge("KEY_SATELLITE_PROVISIONED does not exist."); executor.execute(() -> Binder.withCleanCallingIdentity(() -> - callback.onError( - new SatelliteException(SATELLITE_REQUEST_FAILED)))); + callback.onError(new SatelliteException( + SATELLITE_RESULT_REQUEST_FAILED)))); } } else { executor.execute(() -> Binder.withCleanCallingIdentity(() -> @@ -1154,14 +1154,14 @@ public final class SatelliteManager { * @param executor The executor on which the callback will be called. * @param callback The callback to handle the satellite modem state changed event. * - * @return The {@link SatelliteError} result of the operation. + * @return The {@link SatelliteResult} result of the operation. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) - @SatelliteError public int registerForSatelliteModemStateChanged( + @SatelliteResult public int registerForSatelliteModemStateChanged( @NonNull @CallbackExecutor Executor executor, @NonNull SatelliteStateCallback callback) { Objects.requireNonNull(executor); @@ -1186,7 +1186,7 @@ public final class SatelliteManager { loge("registerForSatelliteModemStateChanged() RemoteException:" + ex); ex.rethrowFromSystemServer(); } - return SATELLITE_REQUEST_FAILED; + return SATELLITE_RESULT_REQUEST_FAILED; } /** @@ -1232,14 +1232,14 @@ public final class SatelliteManager { * @param callback The callback to handle incoming datagrams over satellite. * This callback with be invoked when a new datagram is received from satellite. * - * @return The {@link SatelliteError} result of the operation. + * @return The {@link SatelliteResult} result of the operation. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. */ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) - @SatelliteError public int registerForSatelliteDatagram( + @SatelliteResult public int registerForSatelliteDatagram( @NonNull @CallbackExecutor Executor executor, @NonNull SatelliteDatagramCallback callback) { Objects.requireNonNull(executor); @@ -1280,7 +1280,7 @@ public final class SatelliteManager { loge("registerForSatelliteDatagram() RemoteException:" + ex); ex.rethrowFromSystemServer(); } - return SATELLITE_REQUEST_FAILED; + return SATELLITE_RESULT_REQUEST_FAILED; } /** @@ -1327,7 +1327,7 @@ public final class SatelliteManager { * Consumer)} )} * * @param executor The executor on which the result listener will be called. - * @param resultListener Listener for the {@link SatelliteError} result of the operation. + * @param resultListener Listener for the {@link SatelliteResult} result of the operation. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. @@ -1335,7 +1335,7 @@ public final class SatelliteManager { @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION) public void pollPendingSatelliteDatagrams(@NonNull @CallbackExecutor Executor executor, - @SatelliteError @NonNull Consumer<Integer> resultListener) { + @SatelliteResult @NonNull Consumer<Integer> resultListener) { Objects.requireNonNull(executor); Objects.requireNonNull(resultListener); @@ -1380,7 +1380,7 @@ public final class SatelliteManager { * user activity and the application's ability to determine the * best possible UX experience for the user. * @param executor The executor on which the result listener will be called. - * @param resultListener Listener for the {@link SatelliteError} result of the operation. + * @param resultListener Listener for the {@link SatelliteResult} result of the operation. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. @@ -1390,7 +1390,7 @@ public final class SatelliteManager { public void sendSatelliteDatagram(@DatagramType int datagramType, @NonNull SatelliteDatagram datagram, boolean needFullScreenPointingUI, @NonNull @CallbackExecutor Executor executor, - @SatelliteError @NonNull Consumer<Integer> resultListener) { + @SatelliteResult @NonNull Consumer<Integer> resultListener) { Objects.requireNonNull(datagram); Objects.requireNonNull(executor); Objects.requireNonNull(resultListener); @@ -1426,7 +1426,7 @@ public final class SatelliteManager { * communication is allowed for the current location and * {@code false} otherwise. * If the request is not successful, {@link OutcomeReceiver#onError(Throwable)} - * will return a {@link SatelliteException} with the {@link SatelliteError}. + * will return a {@link SatelliteException} with the {@link SatelliteResult}. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. @@ -1445,7 +1445,7 @@ public final class SatelliteManager { ResultReceiver receiver = new ResultReceiver(null) { @Override protected void onReceiveResult(int resultCode, Bundle resultData) { - if (resultCode == SATELLITE_ERROR_NONE) { + if (resultCode == SATELLITE_RESULT_SUCCESS) { if (resultData.containsKey(KEY_SATELLITE_COMMUNICATION_ALLOWED)) { boolean isSatelliteCommunicationAllowed = resultData.getBoolean(KEY_SATELLITE_COMMUNICATION_ALLOWED); @@ -1454,8 +1454,8 @@ public final class SatelliteManager { } else { loge("KEY_SATELLITE_COMMUNICATION_ALLOWED does not exist."); executor.execute(() -> Binder.withCleanCallingIdentity(() -> - callback.onError( - new SatelliteException(SATELLITE_REQUEST_FAILED)))); + callback.onError(new SatelliteException( + SATELLITE_RESULT_REQUEST_FAILED)))); } } else { executor.execute(() -> Binder.withCleanCallingIdentity(() -> @@ -1484,7 +1484,7 @@ public final class SatelliteManager { * If the request is successful, {@link OutcomeReceiver#onResult(Object)} * will return the time after which the satellite will be visible. * If the request is not successful, {@link OutcomeReceiver#onError(Throwable)} - * will return a {@link SatelliteException} with the {@link SatelliteError}. + * will return a {@link SatelliteException} with the {@link SatelliteResult}. * * @throws SecurityException if the caller doesn't have required permission. * @throws IllegalStateException if the Telephony process is not currently available. @@ -1502,7 +1502,7 @@ public final class SatelliteManager { ResultReceiver receiver = new ResultReceiver(null) { @Override protected void onReceiveResult(int resultCode, Bundle resultData) { - if (resultCode == SATELLITE_ERROR_NONE) { + if (resultCode == SATELLITE_RESULT_SUCCESS) { if (resultData.containsKey(KEY_SATELLITE_NEXT_VISIBILITY)) { int nextVisibilityDuration = resultData.getInt(KEY_SATELLITE_NEXT_VISIBILITY); @@ -1512,8 +1512,8 @@ public final class SatelliteManager { } else { loge("KEY_SATELLITE_NEXT_VISIBILITY does not exist."); executor.execute(() -> Binder.withCleanCallingIdentity(() -> - callback.onError( - new SatelliteException(SATELLITE_REQUEST_FAILED)))); + callback.onError(new SatelliteException( + SATELLITE_RESULT_REQUEST_FAILED)))); } } else { executor.execute(() -> Binder.withCleanCallingIdentity(() -> diff --git a/telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java b/telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java index d7d892a7c30a..7ac06b04a8eb 100644 --- a/telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java +++ b/telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java @@ -43,7 +43,7 @@ public interface SatelliteTransmissionUpdateCallback { */ void onSendDatagramStateChanged( @SatelliteManager.SatelliteDatagramTransferState int state, int sendPendingCount, - @SatelliteManager.SatelliteError int errorCode); + @SatelliteManager.SatelliteResult int errorCode); /** * Called when satellite datagram receive state changed. @@ -54,5 +54,5 @@ public interface SatelliteTransmissionUpdateCallback { */ void onReceiveDatagramStateChanged( @SatelliteManager.SatelliteDatagramTransferState int state, int receivePendingCount, - @SatelliteManager.SatelliteError int errorCode); + @SatelliteManager.SatelliteResult int errorCode); } diff --git a/telephony/java/android/telephony/satellite/stub/ISatelliteListener.aidl b/telephony/java/android/telephony/satellite/stub/ISatelliteListener.aidl index 5e692151c604..d68716291b8e 100644 --- a/telephony/java/android/telephony/satellite/stub/ISatelliteListener.aidl +++ b/telephony/java/android/telephony/satellite/stub/ISatelliteListener.aidl @@ -19,7 +19,6 @@ package android.telephony.satellite.stub; import android.telephony.satellite.stub.NTRadioTechnology; import android.telephony.satellite.stub.PointingInfo; import android.telephony.satellite.stub.SatelliteDatagram; -import android.telephony.satellite.stub.SatelliteError; import android.telephony.satellite.stub.SatelliteModemState; /** diff --git a/telephony/java/android/telephony/satellite/stub/SatelliteError.aidl b/telephony/java/android/telephony/satellite/stub/SatelliteResult.aidl index 6a110a90276f..639b4831cb16 100644 --- a/telephony/java/android/telephony/satellite/stub/SatelliteError.aidl +++ b/telephony/java/android/telephony/satellite/stub/SatelliteResult.aidl @@ -20,91 +20,87 @@ package android.telephony.satellite.stub; * {@hide} */ @Backing(type="int") -enum SatelliteError { +enum SatelliteResult { /** * The request was successfully processed. */ - ERROR_NONE = 0, + SATELLITE_RESULT_SUCCESS = 0, /** * A generic error which should be used only when other specific errors cannot be used. */ - SATELLITE_ERROR = 1, + SATELLITE_RESULT_ERROR = 1, /** * Error received from the satellite server. */ - SERVER_ERROR = 2, + SATELLITE_RESULT_SERVER_ERROR = 2, /** * Error received from the vendor service. This generic error code should be used * only when the error cannot be mapped to other specific service error codes. */ - SERVICE_ERROR = 3, + SATELLITE_RESULT_SERVICE_ERROR = 3, /** * Error received from satellite modem. This generic error code should be used only when * the error cannot be mapped to other specific modem error codes. */ - MODEM_ERROR = 4, + SATELLITE_RESULT_MODEM_ERROR = 4, /** * Error received from the satellite network. This generic error code should be used only when * the error cannot be mapped to other specific network error codes. */ - NETWORK_ERROR = 5, - /** - * Telephony is not in a valid state to receive requests from clients. - */ - INVALID_TELEPHONY_STATE = 6, + SATELLITE_RESULT_NETWORK_ERROR = 5, /** * Satellite modem is not in a valid state to receive requests from clients. */ - INVALID_MODEM_STATE = 7, + SATELLITE_RESULT_INVALID_MODEM_STATE = 6, /** * Either vendor service, or modem, or Telephony framework has received a request with * invalid arguments from its clients. */ - INVALID_ARGUMENTS = 8, + SATELLITE_RESULT_INVALID_ARGUMENTS = 7, /** * Telephony framework failed to send a request or receive a response from the vendor service * or satellite modem due to internal error. */ - REQUEST_FAILED = 9, + SATELLITE_RESULT_REQUEST_FAILED = 8, /** * Radio did not start or is resetting. */ - RADIO_NOT_AVAILABLE = 10, + SATELLITE_RESULT_RADIO_NOT_AVAILABLE = 9, /** * The request is not supported by either the satellite modem or the network. */ - REQUEST_NOT_SUPPORTED = 11, + SATELLITE_RESULT_REQUEST_NOT_SUPPORTED = 10, /** * Satellite modem or network has no resources available to handle requests from clients. */ - NO_RESOURCES = 12, + SATELLITE_RESULT_NO_RESOURCES = 11, /** * Satellite service is not provisioned yet. */ - SERVICE_NOT_PROVISIONED = 13, + SATELLITE_RESULT_SERVICE_NOT_PROVISIONED = 12, /** * Satellite service provision is already in progress. */ - SERVICE_PROVISION_IN_PROGRESS = 14, + SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS = 13, /** * The ongoing request was aborted by either the satellite modem or the network. */ - REQUEST_ABORTED = 15, + SATELLITE_RESULT_REQUEST_ABORTED = 14, /** * The device/subscriber is barred from accessing the satellite service. */ - SATELLITE_ACCESS_BARRED = 16, + SATELLITE_RESULT_ACCESS_BARRED = 15, /** * Satellite modem timeout to receive ACK or response from the satellite network after * sending a request to the network. */ - NETWORK_TIMEOUT = 17, + SATELLITE_RESULT_NETWORK_TIMEOUT = 16, /** * Satellite network is not reachable from the modem. */ - SATELLITE_NOT_REACHABLE = 18, + SATELLITE_RESULT_NOT_REACHABLE = 17, /** * The device/subscriber is not authorized to register with the satellite service provider. */ - NOT_AUTHORIZED = 19 + SATELLITE_RESULT_NOT_AUTHORIZED = 18 } |