Merge "Change Java APIs to use multiple routed devices" into main
diff --git a/core/api/current.txt b/core/api/current.txt
index a03f8c5..cbc3529 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -6235,6 +6235,7 @@
}
public class KeyguardManager {
+ method @FlaggedApi("android.app.device_unlock_listener") @RequiresPermission(android.Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE) public void addDeviceLockedStateListener(@NonNull java.util.concurrent.Executor, @NonNull android.app.KeyguardManager.DeviceLockedStateListener);
method @RequiresPermission(android.Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE) public void addKeyguardLockedStateListener(@NonNull java.util.concurrent.Executor, @NonNull android.app.KeyguardManager.KeyguardLockedStateListener);
method @Deprecated public android.content.Intent createConfirmDeviceCredentialIntent(CharSequence, CharSequence);
method @Deprecated @RequiresPermission(android.Manifest.permission.DISABLE_KEYGUARD) public void exitKeyguardSecurely(android.app.KeyguardManager.OnKeyguardExitResult);
@@ -6244,10 +6245,15 @@
method public boolean isKeyguardLocked();
method public boolean isKeyguardSecure();
method @Deprecated public android.app.KeyguardManager.KeyguardLock newKeyguardLock(String);
+ method @FlaggedApi("android.app.device_unlock_listener") @RequiresPermission(android.Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE) public void removeDeviceLockedStateListener(@NonNull android.app.KeyguardManager.DeviceLockedStateListener);
method @RequiresPermission(android.Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE) public void removeKeyguardLockedStateListener(@NonNull android.app.KeyguardManager.KeyguardLockedStateListener);
method public void requestDismissKeyguard(@NonNull android.app.Activity, @Nullable android.app.KeyguardManager.KeyguardDismissCallback);
}
+ @FlaggedApi("android.app.device_unlock_listener") @java.lang.FunctionalInterface public static interface KeyguardManager.DeviceLockedStateListener {
+ method public void onDeviceLockedStateChanged(boolean);
+ }
+
public abstract static class KeyguardManager.KeyguardDismissCallback {
ctor public KeyguardManager.KeyguardDismissCallback();
method public void onDismissCancelled();
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index 25434e8..decfc8c 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -15146,6 +15146,32 @@
method @NonNull public android.telephony.CellIdentityWcdma sanitizeLocationInfo();
}
+ @FlaggedApi("com.android.internal.telephony.flags.cellular_identifier_disclosure_indications") public final class CellularIdentifierDisclosure implements android.os.Parcelable {
+ method public int describeContents();
+ method public int getCellularIdentifier();
+ method public int getNasProtocolMessage();
+ method @NonNull public String getPlmn();
+ method public boolean isEmergency();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field public static final int CELLULAR_IDENTIFIER_IMEI = 2; // 0x2
+ field public static final int CELLULAR_IDENTIFIER_IMSI = 1; // 0x1
+ field public static final int CELLULAR_IDENTIFIER_SUCI = 3; // 0x3
+ field public static final int CELLULAR_IDENTIFIER_UNKNOWN = 0; // 0x0
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CellularIdentifierDisclosure> CREATOR;
+ field public static final int NAS_PROTOCOL_MESSAGE_ATTACH_REQUEST = 1; // 0x1
+ field public static final int NAS_PROTOCOL_MESSAGE_AUTHENTICATION_AND_CIPHERING_RESPONSE = 6; // 0x6
+ field public static final int NAS_PROTOCOL_MESSAGE_CM_REESTABLISHMENT_REQUEST = 9; // 0x9
+ field public static final int NAS_PROTOCOL_MESSAGE_CM_SERVICE_REQUEST = 10; // 0xa
+ field public static final int NAS_PROTOCOL_MESSAGE_DEREGISTRATION_REQUEST = 8; // 0x8
+ field public static final int NAS_PROTOCOL_MESSAGE_DETACH_REQUEST = 3; // 0x3
+ field public static final int NAS_PROTOCOL_MESSAGE_IDENTITY_RESPONSE = 2; // 0x2
+ field public static final int NAS_PROTOCOL_MESSAGE_IMSI_DETACH_INDICATION = 11; // 0xb
+ field public static final int NAS_PROTOCOL_MESSAGE_LOCATION_UPDATE_REQUEST = 5; // 0x5
+ field public static final int NAS_PROTOCOL_MESSAGE_REGISTRATION_REQUEST = 7; // 0x7
+ field public static final int NAS_PROTOCOL_MESSAGE_TRACKING_AREA_UPDATE_REQUEST = 4; // 0x4
+ field public static final int NAS_PROTOCOL_MESSAGE_UNKNOWN = 0; // 0x0
+ }
+
public final class DataFailCause {
field @Deprecated public static final int VSNCP_APN_UNATHORIZED = 2238; // 0x8be
}
@@ -15597,6 +15623,75 @@
field public static final int USER_NOT_MEMBER_OF_CUG = 87; // 0x57
}
+ @FlaggedApi("com.android.internal.telephony.flags.security_algorithms_update_indications") public final class SecurityAlgorithmUpdate implements android.os.Parcelable {
+ method public int describeContents();
+ method public int getConnectionEvent();
+ method public int getEncryption();
+ method public int getIntegrity();
+ method public boolean isUnprotectedEmergency();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field public static final int CONNECTION_EVENT_AS_SIGNALLING_5G = 11; // 0xb
+ field public static final int CONNECTION_EVENT_AS_SIGNALLING_LTE = 5; // 0x5
+ field public static final int CONNECTION_EVENT_CS_SIGNALLING_3G = 2; // 0x2
+ field public static final int CONNECTION_EVENT_CS_SIGNALLING_GSM = 0; // 0x0
+ field public static final int CONNECTION_EVENT_NAS_SIGNALLING_5G = 10; // 0xa
+ field public static final int CONNECTION_EVENT_NAS_SIGNALLING_LTE = 4; // 0x4
+ field public static final int CONNECTION_EVENT_PS_SIGNALLING_3G = 3; // 0x3
+ field public static final int CONNECTION_EVENT_PS_SIGNALLING_GPRS = 1; // 0x1
+ field public static final int CONNECTION_EVENT_VOLTE_RTP = 8; // 0x8
+ field public static final int CONNECTION_EVENT_VOLTE_RTP_SOS = 9; // 0x9
+ field public static final int CONNECTION_EVENT_VOLTE_SIP = 6; // 0x6
+ field public static final int CONNECTION_EVENT_VOLTE_SIP_SOS = 7; // 0x7
+ field public static final int CONNECTION_EVENT_VONR_RTP = 14; // 0xe
+ field public static final int CONNECTION_EVENT_VONR_RTP_SOS = 15; // 0xf
+ field public static final int CONNECTION_EVENT_VONR_SIP = 12; // 0xc
+ field public static final int CONNECTION_EVENT_VONR_SIP_SOS = 13; // 0xd
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SecurityAlgorithmUpdate> CREATOR;
+ field public static final int SECURITY_ALGORITHM_A50 = 0; // 0x0
+ field public static final int SECURITY_ALGORITHM_A51 = 1; // 0x1
+ field public static final int SECURITY_ALGORITHM_A52 = 2; // 0x2
+ field public static final int SECURITY_ALGORITHM_A53 = 3; // 0x3
+ field public static final int SECURITY_ALGORITHM_A54 = 4; // 0x4
+ field public static final int SECURITY_ALGORITHM_AES_CBC = 71; // 0x47
+ field public static final int SECURITY_ALGORITHM_AES_EDE3_CBC = 73; // 0x49
+ field public static final int SECURITY_ALGORITHM_AES_GCM = 69; // 0x45
+ field public static final int SECURITY_ALGORITHM_AES_GMAC = 70; // 0x46
+ field public static final int SECURITY_ALGORITHM_AUTH_HMAC_SHA2_256_128 = 101; // 0x65
+ field public static final int SECURITY_ALGORITHM_DES_EDE3_CBC = 72; // 0x48
+ field public static final int SECURITY_ALGORITHM_EEA0 = 41; // 0x29
+ field public static final int SECURITY_ALGORITHM_EEA1 = 42; // 0x2a
+ field public static final int SECURITY_ALGORITHM_EEA2 = 43; // 0x2b
+ field public static final int SECURITY_ALGORITHM_EEA3 = 44; // 0x2c
+ field public static final int SECURITY_ALGORITHM_ENCR_AES_CBC = 100; // 0x64
+ field public static final int SECURITY_ALGORITHM_ENCR_AES_GCM_16 = 99; // 0x63
+ field public static final int SECURITY_ALGORITHM_GEA0 = 14; // 0xe
+ field public static final int SECURITY_ALGORITHM_GEA1 = 15; // 0xf
+ field public static final int SECURITY_ALGORITHM_GEA2 = 16; // 0x10
+ field public static final int SECURITY_ALGORITHM_GEA3 = 17; // 0x11
+ field public static final int SECURITY_ALGORITHM_GEA4 = 18; // 0x12
+ field public static final int SECURITY_ALGORITHM_GEA5 = 19; // 0x13
+ field public static final int SECURITY_ALGORITHM_HMAC_MD5_96 = 75; // 0x4b
+ field public static final int SECURITY_ALGORITHM_HMAC_SHA1_96 = 74; // 0x4a
+ field public static final int SECURITY_ALGORITHM_IMS_NULL = 67; // 0x43
+ field public static final int SECURITY_ALGORITHM_NEA0 = 55; // 0x37
+ field public static final int SECURITY_ALGORITHM_NEA1 = 56; // 0x38
+ field public static final int SECURITY_ALGORITHM_NEA2 = 57; // 0x39
+ field public static final int SECURITY_ALGORITHM_NEA3 = 58; // 0x3a
+ field public static final int SECURITY_ALGORITHM_ORYX = 124; // 0x7c
+ field public static final int SECURITY_ALGORITHM_OTHER = 114; // 0x72
+ field public static final int SECURITY_ALGORITHM_RTP = 85; // 0x55
+ field public static final int SECURITY_ALGORITHM_SIP_NO_IPSEC_CONFIG = 66; // 0x42
+ field public static final int SECURITY_ALGORITHM_SIP_NULL = 68; // 0x44
+ field public static final int SECURITY_ALGORITHM_SRTP_AES_COUNTER = 87; // 0x57
+ field public static final int SECURITY_ALGORITHM_SRTP_AES_F8 = 88; // 0x58
+ field public static final int SECURITY_ALGORITHM_SRTP_HMAC_SHA1 = 89; // 0x59
+ field public static final int SECURITY_ALGORITHM_SRTP_NULL = 86; // 0x56
+ field public static final int SECURITY_ALGORITHM_UEA0 = 29; // 0x1d
+ field public static final int SECURITY_ALGORITHM_UEA1 = 30; // 0x1e
+ field public static final int SECURITY_ALGORITHM_UEA2 = 31; // 0x1f
+ field public static final int SECURITY_ALGORITHM_UNKNOWN = 113; // 0x71
+ }
+
public class ServiceState implements android.os.Parcelable {
method @Nullable public android.telephony.NetworkRegistrationInfo getNetworkRegistrationInfo(int, int);
method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoListForDomain(int);
@@ -15821,6 +15916,7 @@
field @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public static final int EVENT_CALL_FORWARDING_INDICATOR_CHANGED = 4; // 0x4
field public static final int EVENT_CALL_STATE_CHANGED = 6; // 0x6
field public static final int EVENT_CARRIER_NETWORK_CHANGED = 17; // 0x11
+ field @FlaggedApi("com.android.internal.telephony.flags.cellular_identifier_disclosure_indications") @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int EVENT_CELLULAR_IDENTIFIER_DISCLOSED_CHANGED = 47; // 0x2f
field @RequiresPermission(allOf={android.Manifest.permission.READ_PHONE_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION}) public static final int EVENT_CELL_INFO_CHANGED = 11; // 0xb
field @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public static final int EVENT_CELL_LOCATION_CHANGED = 5; // 0x5
field public static final int EVENT_DATA_ACTIVATION_STATE_CHANGED = 19; // 0x13
@@ -15845,6 +15941,7 @@
field @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) public static final int EVENT_PRECISE_DATA_CONNECTION_STATE_CHANGED = 13; // 0xd
field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int EVENT_RADIO_POWER_STATE_CHANGED = 24; // 0x18
field @RequiresPermission(allOf={android.Manifest.permission.READ_PRECISE_PHONE_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION}) public static final int EVENT_REGISTRATION_FAILURE = 31; // 0x1f
+ field @FlaggedApi("com.android.internal.telephony.flags.cellular_identifier_disclosure_indications") @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int EVENT_SECURITY_ALGORITHMS_CHANGED = 46; // 0x2e
field public static final int EVENT_SERVICE_STATE_CHANGED = 1; // 0x1
field public static final int EVENT_SIGNAL_STRENGTHS_CHANGED = 9; // 0x9
field public static final int EVENT_SIGNAL_STRENGTH_CHANGED = 2; // 0x2
@@ -15863,6 +15960,10 @@
method @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) public default void onCallStatesChanged(@NonNull java.util.List<android.telephony.CallState>);
}
+ @FlaggedApi("com.android.internal.telephony.flags.cellular_identifier_disclosure_indications") public static interface TelephonyCallback.CellularIdentifierDisclosedListener {
+ method public void onCellularIdentifierDisclosedChanged(@NonNull android.telephony.CellularIdentifierDisclosure);
+ }
+
public static interface TelephonyCallback.DataEnabledListener {
method @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) public void onDataEnabledChanged(boolean, int);
}
@@ -15901,6 +16002,10 @@
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void onRadioPowerStateChanged(int);
}
+ @FlaggedApi("com.android.internal.telephony.flags.security_algorithms_update_indications") public static interface TelephonyCallback.SecurityAlgorithmsListener {
+ method public void onSecurityAlgorithmsChanged(@NonNull android.telephony.SecurityAlgorithmUpdate);
+ }
+
@FlaggedApi("com.android.internal.telephony.flags.simultaneous_calling_indications") public static interface TelephonyCallback.SimultaneousCellularCallingSupportListener {
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void onSimultaneousCellularCallingSubscriptionsChanged(@NonNull java.util.Set<java.lang.Integer>);
}
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index 8fd2cd5..44bcc2a 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -3398,6 +3398,10 @@
ctor public BarringInfo.BarringServiceInfo(int, boolean, int, int);
}
+ @FlaggedApi("com.android.internal.telephony.flags.cellular_identifier_disclosure_indications") public final class CellularIdentifierDisclosure implements android.os.Parcelable {
+ ctor public CellularIdentifierDisclosure(int, int, @NonNull String, boolean);
+ }
+
public class MbmsDownloadSession implements java.lang.AutoCloseable {
field public static final String MBMS_DOWNLOAD_SERVICE_OVERRIDE_METADATA = "mbms-download-service-override";
}
@@ -3425,6 +3429,10 @@
ctor @Deprecated public PreciseDataConnectionState(int, int, int, @NonNull String, @Nullable android.net.LinkProperties, int);
}
+ @FlaggedApi("com.android.internal.telephony.flags.security_algorithms_update_indications") public final class SecurityAlgorithmUpdate implements android.os.Parcelable {
+ ctor public SecurityAlgorithmUpdate(int, int, int, boolean);
+ }
+
public class ServiceState implements android.os.Parcelable {
method public void addNetworkRegistrationInfo(android.telephony.NetworkRegistrationInfo);
method public int getDataNetworkType();
diff --git a/core/java/android/app/KeyguardManager.java b/core/java/android/app/KeyguardManager.java
index 62820ad..67f7bee 100644
--- a/core/java/android/app/KeyguardManager.java
+++ b/core/java/android/app/KeyguardManager.java
@@ -18,6 +18,7 @@
import android.Manifest;
import android.annotation.CallbackExecutor;
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -52,7 +53,9 @@
import android.view.IWindowManager;
import android.view.WindowManagerGlobal;
+import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.policy.IDeviceLockedStateListener;
import com.android.internal.policy.IKeyguardDismissCallback;
import com.android.internal.policy.IKeyguardLockedStateListener;
import com.android.internal.util.Preconditions;
@@ -253,6 +256,26 @@
private final ArrayMap<KeyguardLockedStateListener, Executor>
mKeyguardLockedStateListeners = new ArrayMap<>();
+ private final IDeviceLockedStateListener mIDeviceLockedStateListener =
+ new IDeviceLockedStateListener.Stub() {
+ @Override
+ public void onDeviceLockedStateChanged(boolean isDeviceLocked) {
+ if (!Flags.deviceUnlockListener()) {
+ return;
+ }
+ synchronized (mDeviceLockedStateListeners) {
+ mDeviceLockedStateListeners.forEach((listener, executor) -> {
+ executor.execute(
+ () -> listener.onDeviceLockedStateChanged(isDeviceLocked));
+ });
+ }
+ }
+ };
+
+ @GuardedBy("mDeviceLockedStateListeners")
+ private final ArrayMap<DeviceLockedStateListener, Executor>
+ mDeviceLockedStateListeners = new ArrayMap<>();
+
/**
* Get an intent to prompt the user to confirm credentials (pin, pattern, password or biometrics
* if enrolled) for the current user of the device. The caller is expected to launch this
@@ -1370,4 +1393,77 @@
}
}
}
+
+
+ /**
+ * Listener for device locked state changes.
+ */
+ @FunctionalInterface
+ @FlaggedApi(Flags.FLAG_DEVICE_UNLOCK_LISTENER)
+ public interface DeviceLockedStateListener {
+ /**
+ * Callback function that executes when the device locked state changes.
+ */
+ void onDeviceLockedStateChanged(boolean isDeviceLocked);
+ }
+
+
+ /**
+ * Registers a listener to execute when the device locked state changes.
+ *
+ * @param executor The {@link Executor} where the {@code listener} will be invoked
+ * @param listener The listener to add to receive device locked state changes.
+ *
+ * @see #isDeviceLocked()
+ * @see #removeDeviceLockedStateListener(DeviceLockedStateListener)
+ */
+ @RequiresPermission(Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE)
+ @FlaggedApi(Flags.FLAG_DEVICE_UNLOCK_LISTENER)
+ public void addDeviceLockedStateListener(@NonNull @CallbackExecutor Executor executor,
+ @NonNull DeviceLockedStateListener listener) {
+ if (!Flags.deviceUnlockListener()) {
+ return;
+ }
+
+ synchronized (mDeviceLockedStateListeners) {
+ mDeviceLockedStateListeners.put(listener, executor);
+ if (mDeviceLockedStateListeners.size() > 1) {
+ return;
+ }
+ try {
+ mTrustManager.registerDeviceLockedStateListener(mIDeviceLockedStateListener,
+ mContext.getDeviceId());
+ } catch (RemoteException re) {
+ Log.d(TAG, "TrustManager service died", re);
+ }
+ }
+ }
+
+ /**
+ * Unregisters a listener that executes when the device locked state changes.
+ *
+ * @param listener The listener to remove.
+ *
+ * @see #isDeviceLocked()
+ * @see #addDeviceLockedStateListener(Executor, DeviceLockedStateListener)
+ */
+ @RequiresPermission(Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE)
+ @FlaggedApi(Flags.FLAG_DEVICE_UNLOCK_LISTENER)
+ public void removeDeviceLockedStateListener(@NonNull DeviceLockedStateListener listener) {
+ if (!Flags.deviceUnlockListener()) {
+ return;
+ }
+
+ synchronized (mDeviceLockedStateListeners) {
+ mDeviceLockedStateListeners.remove(listener);
+ if (!mDeviceLockedStateListeners.isEmpty()) {
+ return;
+ }
+ try {
+ mTrustManager.unregisterDeviceLockedStateListener(mIDeviceLockedStateListener);
+ } catch (RemoteException re) {
+ Log.d(TAG, "TrustManager service died", re);
+ }
+ }
+ }
}
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index cfe0ff9..1c23ec7 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -9520,7 +9520,6 @@
contentView.setViewVisibility(R.id.icon, View.GONE);
contentView.setViewVisibility(R.id.conversation_face_pile, View.GONE);
contentView.setViewVisibility(R.id.conversation_icon, View.VISIBLE);
- contentView.setBoolean(R.id.conversation_icon, "setApplyCircularCrop", true);
contentView.setImageViewIcon(R.id.conversation_icon, conversationIcon);
} else if (mIsGroupConversation) {
contentView.setViewVisibility(R.id.icon, View.GONE);
diff --git a/core/java/android/app/keyguard.aconfig b/core/java/android/app/keyguard.aconfig
new file mode 100644
index 0000000..9cd1c15
--- /dev/null
+++ b/core/java/android/app/keyguard.aconfig
@@ -0,0 +1,10 @@
+package: "android.app"
+container: "system"
+
+flag {
+ namespace: "wallet_integration"
+ name: "device_unlock_listener"
+ is_exported: true
+ description: "Enable listener API for device unlock."
+ bug: "296195355"
+}
\ No newline at end of file
diff --git a/core/java/android/app/trust/ITrustManager.aidl b/core/java/android/app/trust/ITrustManager.aidl
index 730bb73..ffa5488 100644
--- a/core/java/android/app/trust/ITrustManager.aidl
+++ b/core/java/android/app/trust/ITrustManager.aidl
@@ -18,6 +18,7 @@
import android.app.trust.ITrustListener;
import android.hardware.biometrics.BiometricSourceType;
+import com.android.internal.policy.IDeviceLockedStateListener;
/**
* System private API to comunicate with trust service.
@@ -43,4 +44,8 @@
boolean isActiveUnlockRunning(int userId);
@EnforcePermission("ACCESS_FINE_LOCATION")
boolean isInSignificantPlace();
+ @EnforcePermission("SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE")
+ void registerDeviceLockedStateListener(in IDeviceLockedStateListener listener, int deviceId);
+ @EnforcePermission("SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE")
+ void unregisterDeviceLockedStateListener(in IDeviceLockedStateListener listener);
}
diff --git a/core/java/android/app/trust/TrustManager.java b/core/java/android/app/trust/TrustManager.java
index 1ef83cd..8c8970e 100644
--- a/core/java/android/app/trust/TrustManager.java
+++ b/core/java/android/app/trust/TrustManager.java
@@ -31,6 +31,8 @@
import android.os.RemoteException;
import android.util.ArrayMap;
+import com.android.internal.policy.IDeviceLockedStateListener;
+
import java.util.ArrayList;
import java.util.List;
@@ -259,6 +261,35 @@
}
/**
+ * Registers a listener for device lock state events.
+ *
+ * Requires the {@link android.Manifest.permission#SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE}
+ * permission.
+ */
+ public void registerDeviceLockedStateListener(final IDeviceLockedStateListener listener,
+ int deviceId) {
+ try {
+ mService.registerDeviceLockedStateListener(listener, deviceId);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Unregisters a listener for device lock state events.
+ *
+ * Requires the {@link android.Manifest.permission#SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE}
+ * permission.
+ */
+ public void unregisterDeviceLockedStateListener(final IDeviceLockedStateListener listener) {
+ try {
+ mService.unregisterDeviceLockedStateListener(listener);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* @return whether {@param userId} has enabled and configured trust agents. Ignores short-term
* unavailability of trust due to {@link LockPatternUtils.StrongAuthTracker}.
*/
diff --git a/core/java/android/content/pm/parsing/ApkLiteParseUtils.java b/core/java/android/content/pm/parsing/ApkLiteParseUtils.java
index e9e8578..05c8f31 100644
--- a/core/java/android/content/pm/parsing/ApkLiteParseUtils.java
+++ b/core/java/android/content/pm/parsing/ApkLiteParseUtils.java
@@ -537,6 +537,9 @@
hasBindDeviceAdminPermission);
break;
case TAG_USES_SDK_LIBRARY:
+ if (!android.content.pm.Flags.sdkDependencyInstaller()) {
+ break;
+ }
String usesSdkLibName = parser.getAttributeValue(
ANDROID_RES_NAMESPACE, "name");
long usesSdkLibVersionMajor = parser.getAttributeIntValue(
diff --git a/core/java/android/telephony/PhoneStateListener.java b/core/java/android/telephony/PhoneStateListener.java
index 1df3b43..c16a510 100644
--- a/core/java/android/telephony/PhoneStateListener.java
+++ b/core/java/android/telephony/PhoneStateListener.java
@@ -1712,6 +1712,15 @@
@NonNull NtnSignalStrength ntnSignalStrength) {
// not supported on the deprecated interface - Use TelephonyCallback instead
}
+
+ public final void onSecurityAlgorithmsChanged(SecurityAlgorithmUpdate update) {
+ // not supported on the deprecated interface - Use TelephonyCallback instead
+ }
+
+ public final void onCellularIdentifierDisclosedChanged(
+ CellularIdentifierDisclosure disclosure) {
+ // not supported on the deprecated interface - Use TelephonyCallback instead
+ }
}
private void log(String s) {
diff --git a/core/java/android/telephony/TelephonyCallback.java b/core/java/android/telephony/TelephonyCallback.java
index 0d1dc46..2c585e6 100644
--- a/core/java/android/telephony/TelephonyCallback.java
+++ b/core/java/android/telephony/TelephonyCallback.java
@@ -705,6 +705,28 @@
public static final int EVENT_CARRIER_ROAMING_NTN_SIGNAL_STRENGTH_CHANGED = 45;
/**
+ * Event for changes to mobile network ciphering algorithms.
+ * See {@link SecurityAlgorithmsListener#onSecurityAlgorithmsChanged}
+ *
+ * @hide
+ */
+ @FlaggedApi(Flags.FLAG_CELLULAR_IDENTIFIER_DISCLOSURE_INDICATIONS)
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ @SystemApi
+ public static final int EVENT_SECURITY_ALGORITHMS_CHANGED = 46;
+
+ /**
+ * Event for updates to sensitive device identifier disclosures (IMSI, IMEI, unciphered SUCI).
+ * See {@link CellularIdentifierDisclosedListener#onCellularIdentifierDisclosedChanged}
+ *
+ * @hide
+ */
+ @FlaggedApi(Flags.FLAG_CELLULAR_IDENTIFIER_DISCLOSURE_INDICATIONS)
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ @SystemApi
+ public static final int EVENT_CELLULAR_IDENTIFIER_DISCLOSED_CHANGED = 47;
+
+ /**
* @hide
*/
@IntDef(prefix = {"EVENT_"}, value = {
@@ -752,7 +774,9 @@
EVENT_CARRIER_ROAMING_NTN_MODE_CHANGED,
EVENT_CARRIER_ROAMING_NTN_ELIGIBLE_STATE_CHANGED,
EVENT_CARRIER_ROAMING_NTN_AVAILABLE_SERVICES_CHANGED,
- EVENT_CARRIER_ROAMING_NTN_SIGNAL_STRENGTH_CHANGED
+ EVENT_CARRIER_ROAMING_NTN_SIGNAL_STRENGTH_CHANGED,
+ EVENT_SECURITY_ALGORITHMS_CHANGED,
+ EVENT_CELLULAR_IDENTIFIER_DISCLOSED_CHANGED
})
@Retention(RetentionPolicy.SOURCE)
public @interface TelephonyEvent {
@@ -1827,6 +1851,41 @@
}
/**
+ * Interface for CellularIdentifierDisclosedListener
+ * @hide
+ */
+ @SystemApi
+ @FlaggedApi(Flags.FLAG_CELLULAR_IDENTIFIER_DISCLOSURE_INDICATIONS)
+ public interface CellularIdentifierDisclosedListener {
+ /**
+ * Callback invoked when a device identifier (IMSI, IMEI, or unciphered SUCI)
+ * is disclosed over the network before a security context is established
+ * ("pre-authentication").
+ *
+ * @param disclosure details of the identifier disclosure
+ * See {@link CellularIdentifierDisclosure} for more details
+ */
+ void onCellularIdentifierDisclosedChanged(@NonNull CellularIdentifierDisclosure disclosure);
+ }
+
+ /**
+ * Interface for SecurityAlgorithmsListener
+ * @hide
+ */
+ @SystemApi
+ @FlaggedApi(Flags.FLAG_SECURITY_ALGORITHMS_UPDATE_INDICATIONS)
+ public interface SecurityAlgorithmsListener {
+ /**
+ * Callback invoked when the most recently reported security algorithms has changed,
+ * per a specified connection event.
+ *
+ * @param securityAlgorithmUpdate details of the security algorithm update
+ * See {@link SecurityAlgorithmUpdate} for more details
+ */
+ void onSecurityAlgorithmsChanged(@NonNull SecurityAlgorithmUpdate securityAlgorithmUpdate);
+ }
+
+ /**
* The callback methods need to be called on the handler thread where
* this object was created. If the binder did that for us it'd be nice.
* <p>
@@ -2302,5 +2361,27 @@
() -> listener.onCarrierRoamingNtnSignalStrengthChanged(ntnSignalStrength)));
}
+
+ public void onSecurityAlgorithmsChanged(SecurityAlgorithmUpdate update) {
+ if (!Flags.securityAlgorithmsUpdateIndications()) return;
+
+ SecurityAlgorithmsListener listener =
+ (SecurityAlgorithmsListener) mTelephonyCallbackWeakRef.get();
+ if (listener == null) return;
+
+ Binder.withCleanCallingIdentity(() -> mExecutor.execute(
+ () -> listener.onSecurityAlgorithmsChanged(update)));
+ }
+
+ public void onCellularIdentifierDisclosedChanged(CellularIdentifierDisclosure disclosure) {
+ if (!Flags.cellularIdentifierDisclosureIndications()) return;
+
+ CellularIdentifierDisclosedListener listener =
+ (CellularIdentifierDisclosedListener) mTelephonyCallbackWeakRef.get();
+ if (listener == null) return;
+
+ Binder.withCleanCallingIdentity(() -> mExecutor.execute(
+ () -> listener.onCellularIdentifierDisclosedChanged(disclosure)));
+ }
}
}
diff --git a/core/java/android/telephony/TelephonyRegistryManager.java b/core/java/android/telephony/TelephonyRegistryManager.java
index 90b0bb3..4ec429d 100644
--- a/core/java/android/telephony/TelephonyRegistryManager.java
+++ b/core/java/android/telephony/TelephonyRegistryManager.java
@@ -1154,6 +1154,40 @@
}
}
+ /**
+ * Notify external listeners that the radio security algorithms have changed.
+ * @param slotIndex for the phone object that got updated
+ * @param subId for which the security algorithm changed
+ * @param update details of the security algorithm update
+ * @hide
+ */
+ public void notifySecurityAlgorithmsChanged(
+ int slotIndex, int subId, SecurityAlgorithmUpdate update) {
+ try {
+ sRegistry.notifySecurityAlgorithmsChanged(slotIndex, subId, update);
+ } catch (RemoteException ex) {
+ // system server crash
+ throw ex.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Notify external listeners of a new cellular identifier disclosure change.
+ * @param slotIndex for the phone object that the disclosure applies to
+ * @param subId for which the disclosure applies to
+ * @param disclosure details of the identifier disclosure
+ * @hide
+ */
+ public void notifyCellularIdentifierDisclosedChanged(
+ int slotIndex, int subId, CellularIdentifierDisclosure disclosure) {
+ try {
+ sRegistry.notifyCellularIdentifierDisclosedChanged(slotIndex, subId, disclosure);
+ } catch (RemoteException ex) {
+ // system server crash
+ throw ex.rethrowFromSystemServer();
+ }
+ }
+
/**
* Processes potential event changes from the provided {@link TelephonyCallback}.
*
@@ -1313,6 +1347,15 @@
eventList.add(TelephonyCallback.EVENT_CARRIER_ROAMING_NTN_AVAILABLE_SERVICES_CHANGED);
eventList.add(TelephonyCallback.EVENT_CARRIER_ROAMING_NTN_SIGNAL_STRENGTH_CHANGED);
}
+
+ if (telephonyCallback instanceof TelephonyCallback.CellularIdentifierDisclosedListener) {
+ eventList.add(TelephonyCallback.EVENT_CELLULAR_IDENTIFIER_DISCLOSED_CHANGED);
+ }
+
+ if (telephonyCallback instanceof TelephonyCallback.SecurityAlgorithmsListener) {
+ eventList.add(TelephonyCallback.EVENT_SECURITY_ALGORITHMS_CHANGED);
+ }
+
return eventList;
}
diff --git a/core/java/android/view/ScaleGestureDetector.java b/core/java/android/view/ScaleGestureDetector.java
index 5a28d5f..80ae3c3 100644
--- a/core/java/android/view/ScaleGestureDetector.java
+++ b/core/java/android/view/ScaleGestureDetector.java
@@ -437,16 +437,16 @@
}
}
- /**
- * Return whether the quick scale gesture, in which the user performs a double tap followed by a
- * swipe, should perform scaling. {@see #setQuickScaleEnabled(boolean)}.
- */
+ /**
+ * Return whether the quick scale gesture, in which the user performs a double tap followed by a
+ * swipe, should perform scaling. {@see #setQuickScaleEnabled(boolean)}.
+ */
public boolean isQuickScaleEnabled() {
return mQuickScaleEnabled;
}
/**
- * Sets whether the associates {@link OnScaleGestureListener} should receive
+ * Sets whether the associated {@link OnScaleGestureListener} should receive
* onScale callbacks when the user uses a stylus and presses the button.
* Note that this is enabled by default if the app targets API 23 and newer.
*
diff --git a/core/java/com/android/internal/policy/IDeviceLockedStateListener.aidl b/core/java/com/android/internal/policy/IDeviceLockedStateListener.aidl
new file mode 100644
index 0000000..cc626f6
--- /dev/null
+++ b/core/java/com/android/internal/policy/IDeviceLockedStateListener.aidl
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.policy;
+
+oneway interface IDeviceLockedStateListener {
+ void onDeviceLockedStateChanged(boolean isDeviceLocked);
+}
\ No newline at end of file
diff --git a/core/java/com/android/internal/telephony/IPhoneStateListener.aidl b/core/java/com/android/internal/telephony/IPhoneStateListener.aidl
index 0e85e04..bf8a565 100644
--- a/core/java/com/android/internal/telephony/IPhoneStateListener.aidl
+++ b/core/java/com/android/internal/telephony/IPhoneStateListener.aidl
@@ -20,6 +20,7 @@
import android.telephony.CallState;
import android.telephony.CellIdentity;
import android.telephony.CellInfo;
+import android.telephony.CellularIdentifierDisclosure;
import android.telephony.DataConnectionRealTimeInfo;
import android.telephony.LinkCapacityEstimate;
import android.telephony.TelephonyDisplayInfo;
@@ -28,6 +29,7 @@
import android.telephony.PreciseCallState;
import android.telephony.PreciseDataConnectionState;
import android.telephony.satellite.NtnSignalStrength;
+import android.telephony.SecurityAlgorithmUpdate;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
import android.telephony.emergency.EmergencyNumber;
@@ -87,4 +89,6 @@
void onCarrierRoamingNtnEligibleStateChanged(in boolean eligible);
void onCarrierRoamingNtnAvailableServicesChanged(in int[] availableServices);
void onCarrierRoamingNtnSignalStrengthChanged(in NtnSignalStrength ntnSignalStrength);
+ void onSecurityAlgorithmsChanged(in SecurityAlgorithmUpdate update);
+ void onCellularIdentifierDisclosedChanged(in CellularIdentifierDisclosure disclosure);
}
diff --git a/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl b/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl
index 0f268d5d..a296fbd1 100644
--- a/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl
+++ b/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl
@@ -23,6 +23,7 @@
import android.telephony.CallQuality;
import android.telephony.CellIdentity;
import android.telephony.CellInfo;
+import android.telephony.CellularIdentifierDisclosure;
import android.telephony.LinkCapacityEstimate;
import android.telephony.TelephonyDisplayInfo;
import android.telephony.ims.ImsReasonInfo;
@@ -30,6 +31,7 @@
import android.telephony.PhysicalChannelConfig;
import android.telephony.PreciseDataConnectionState;
import android.telephony.satellite.NtnSignalStrength;
+import android.telephony.SecurityAlgorithmUpdate;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
import android.telephony.emergency.EmergencyNumber;
@@ -132,4 +134,7 @@
void removeSatelliteStateChangeListener(ISatelliteStateChangeListener listener, String pkg);
void notifySatelliteStateChanged(boolean isEnabled);
+ void notifySecurityAlgorithmsChanged(int phoneId, int subId, in SecurityAlgorithmUpdate update);
+ void notifyCellularIdentifierDisclosedChanged(
+ int phoneId, int subId, in CellularIdentifierDisclosure disclosure);
}
diff --git a/core/java/com/android/internal/widget/NotificationRowIconView.java b/core/java/com/android/internal/widget/NotificationRowIconView.java
index 5fc61b0..c96e979 100644
--- a/core/java/com/android/internal/widget/NotificationRowIconView.java
+++ b/core/java/com/android/internal/widget/NotificationRowIconView.java
@@ -19,12 +19,7 @@
import android.annotation.Nullable;
import android.app.Flags;
import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.BitmapShader;
-import android.graphics.Canvas;
-import android.graphics.Paint;
import android.graphics.Rect;
-import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
import android.util.AttributeSet;
@@ -41,7 +36,6 @@
public class NotificationRowIconView extends CachingIconView {
private NotificationIconProvider mIconProvider;
- private boolean mApplyCircularCrop = false;
private Drawable mAppIcon = null;
// Padding, background and colors set on the view prior to being overridden when showing the app
@@ -221,84 +215,6 @@
}
}
- @Nullable
- @Override
- Drawable loadSizeRestrictedIcon(@Nullable Icon icon) {
- final Drawable original = super.loadSizeRestrictedIcon(icon);
- final Drawable result;
- if (mApplyCircularCrop) {
- result = makeCircularDrawable(original);
- } else {
- result = original;
- }
-
- return result;
- }
-
- /**
- * Enables circle crop that makes given image circular
- */
- @RemotableViewMethod(asyncImpl = "setApplyCircularCropAsync")
- public void setApplyCircularCrop(boolean applyCircularCrop) {
- mApplyCircularCrop = applyCircularCrop;
- }
-
- /**
- * Async version of {@link NotificationRowIconView#setApplyCircularCrop}
- */
- public Runnable setApplyCircularCropAsync(boolean applyCircularCrop) {
- mApplyCircularCrop = applyCircularCrop;
- return () -> {
- };
- }
-
- @Nullable
- private Drawable makeCircularDrawable(@Nullable Drawable original) {
- if (original == null) {
- return original;
- }
-
- final Bitmap source = drawableToBitmap(original);
-
- int size = Math.min(source.getWidth(), source.getHeight());
-
- Bitmap squared = Bitmap.createScaledBitmap(source, size, size, /* filter= */ false);
- Bitmap result = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
-
- final Canvas canvas = new Canvas(result);
- final Paint paint = new Paint();
- paint.setShader(
- new BitmapShader(squared, BitmapShader.TileMode.CLAMP,
- BitmapShader.TileMode.CLAMP));
- paint.setAntiAlias(true);
- float radius = size / 2f;
- canvas.drawCircle(radius, radius, radius, paint);
- return new BitmapDrawable(getResources(), result);
- }
-
- private static Bitmap drawableToBitmap(Drawable drawable) {
- if (drawable instanceof BitmapDrawable bitmapDrawable) {
- final Bitmap bitmap = bitmapDrawable.getBitmap();
- if (bitmap.getConfig() == Bitmap.Config.HARDWARE) {
- return bitmap.copy(Bitmap.Config.ARGB_8888, false);
- } else {
- return bitmap;
- }
- }
-
- int width = drawable.getIntrinsicWidth();
- width = width > 0 ? width : 1;
- int height = drawable.getIntrinsicHeight();
- height = height > 0 ? height : 1;
-
- Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(bitmap);
- drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
- drawable.draw(canvas);
-
- return bitmap;
- }
-
/**
* A provider that allows this view to verify whether it should use the app icon instead of the
* icon provided to it via setImageIcon, as well as actually fetching the app icon. It should
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 0046405..7fcbf19 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -5587,7 +5587,8 @@
<permission android:name="android.permission.BIND_VISUAL_QUERY_DETECTION_SERVICE"
android:protectionLevel="signature" />
- <!-- Allows an application to subscribe to keyguard locked (i.e., showing) state.
+ <!-- Allows an application to subscribe to device locked and keyguard locked (i.e., showing)
+ state.
<p>Protection level: signature|role
<p>Intended for use by ROLE_ASSISTANT and signature apps only.
-->
diff --git a/core/res/res/layout/notification_template_material_messaging_compact_heads_up.xml b/core/res/res/layout/notification_template_material_messaging_compact_heads_up.xml
index 82920ba..149a5a9 100644
--- a/core/res/res/layout/notification_template_material_messaging_compact_heads_up.xml
+++ b/core/res/res/layout/notification_template_material_messaging_compact_heads_up.xml
@@ -34,12 +34,14 @@
android:maxDrawableWidth="@dimen/notification_icon_circle_size"
android:maxDrawableHeight="@dimen/notification_icon_circle_size"
/>
- <com.android.internal.widget.NotificationRowIconView
+ <com.android.internal.widget.CachingIconView
android:id="@+id/conversation_icon"
android:layout_width="@dimen/notification_icon_circle_size"
android:layout_height="@dimen/notification_icon_circle_size"
android:layout_gravity="center_vertical|start"
android:layout_marginStart="@dimen/notification_icon_circle_start"
+ android:background="@drawable/notification_icon_circle"
+ android:clipToOutline="true"
android:maxDrawableWidth="@dimen/notification_icon_circle_size"
android:maxDrawableHeight="@dimen/notification_icon_circle_size"
android:scaleType="centerCrop"
diff --git a/core/tests/coretests/src/android/content/pm/parsing/ApkLiteParseUtilsTest.java b/core/tests/coretests/src/android/content/pm/parsing/ApkLiteParseUtilsTest.java
index 0db49a7..ecacdb2 100644
--- a/core/tests/coretests/src/android/content/pm/parsing/ApkLiteParseUtilsTest.java
+++ b/core/tests/coretests/src/android/content/pm/parsing/ApkLiteParseUtilsTest.java
@@ -33,6 +33,7 @@
import android.os.FileUtils;
import android.os.ParcelFileDescriptor;
import android.platform.test.annotations.Presubmit;
+import android.platform.test.annotations.RequiresFlagsEnabled;
import android.util.ArraySet;
import android.util.PackageUtils;
@@ -61,6 +62,7 @@
import java.util.Set;
@Presubmit
+@RequiresFlagsEnabled(android.content.pm.Flags.FLAG_SDK_DEPENDENCY_INSTALLER)
public class ApkLiteParseUtilsTest {
@Rule
diff --git a/libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml b/libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml
index a18a251..bfd9c81 100644
--- a/libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml
+++ b/libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml
@@ -23,7 +23,7 @@
android:clipChildren="false"
android:clipToPadding="false"
android:paddingBottom="@dimen/desktop_mode_handle_menu_pill_elevation"
- android:paddingRight="@dimen/desktop_mode_handle_menu_pill_elevation"
+ android:paddingEnd="@dimen/desktop_mode_handle_menu_pill_elevation"
android:orientation="vertical">
<LinearLayout
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt
index 54c247b..62be2c7 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt
@@ -238,8 +238,12 @@
val taskBounds = taskInfo.getConfiguration().windowConfiguration.bounds
updateGlobalMenuPosition(taskBounds, captionX, captionY)
if (layoutResId == R.layout.desktop_mode_app_header) {
- // Align the handle menu to the left side of the caption.
- menuX = marginMenuStart
+ // Align the handle menu to the start of the header.
+ menuX = if (context.isRtl()) {
+ taskBounds.width() - menuWidth - marginMenuStart
+ } else {
+ marginMenuStart
+ }
menuY = captionY + marginMenuTop
} else {
if (DesktopModeFlags.ENABLE_HANDLE_INPUT_FIX.isTrue()) {
@@ -261,10 +265,17 @@
val nonFreeformX = captionX + (captionWidth / 2) - (menuWidth / 2)
when {
taskInfo.isFreeform -> {
- globalMenuPosition.set(
- /* x = */ taskBounds.left + marginMenuStart,
- /* y = */ taskBounds.top + captionY + marginMenuTop
- )
+ if (context.isRtl()) {
+ globalMenuPosition.set(
+ /* x= */ taskBounds.right - menuWidth - marginMenuStart,
+ /* y= */ taskBounds.top + captionY + marginMenuTop
+ )
+ } else {
+ globalMenuPosition.set(
+ /* x= */ taskBounds.left + marginMenuStart,
+ /* y= */ taskBounds.top + captionY + marginMenuTop
+ )
+ }
}
taskInfo.isFullscreen -> {
globalMenuPosition.set(
@@ -430,6 +441,9 @@
return context.resources.getDimensionPixelSize(resourceId)
}
+ private fun Context.isRtl() =
+ resources.configuration.layoutDirection == View.LAYOUT_DIRECTION_RTL
+
fun close() {
handleMenuView?.animateCloseMenu {
handleMenuViewContainer?.releaseView()
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipOnGoToHomeTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipOnGoToHomeTest.kt
index a248303..fd4328d 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipOnGoToHomeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipOnGoToHomeTest.kt
@@ -16,16 +16,18 @@
package com.android.wm.shell.flicker.pip
+import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.subject.exceptions.ExceptionMessageBuilder
import android.tools.flicker.subject.exceptions.IncorrectRegionException
import android.tools.flicker.subject.layers.LayerSubject
-import androidx.test.filters.FlakyTest
-import androidx.test.filters.RequiresDevice
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.EnterPipTransition
import org.junit.Assume
import org.junit.FixMethodOrder
@@ -35,6 +37,7 @@
import org.junit.runners.Parameterized
import kotlin.math.abs
+
/**
* Test entering pip from an app via auto-enter property when navigating to home.
*
@@ -60,6 +63,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
open class AutoEnterPipOnGoToHomeTest(flicker: LegacyFlickerTest) : EnterPipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = { transitions { tapl.goHome() } }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipWithSourceRectHintTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipWithSourceRectHintTest.kt
index df952c9..d4ad4ef8 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipWithSourceRectHintTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipWithSourceRectHintTest.kt
@@ -17,10 +17,12 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.traces.component.ComponentNameMatcher
+import com.android.wm.shell.Flags
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
@@ -52,6 +54,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class AutoEnterPipWithSourceRectHintTest(flicker: LegacyFlickerTest) :
AutoEnterPipOnGoToHomeTest(flicker) {
override val defaultEnterPip: FlickerBuilder.() -> Unit = {
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt
index 302b8c4..cc6e4b5 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt
@@ -17,6 +17,7 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
@@ -53,6 +54,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class ClosePipBySwipingDownTest(flicker: LegacyFlickerTest) : ClosePipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions {
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt
index 77a1edb..53725fa 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt
@@ -17,9 +17,11 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.ClosePipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -52,6 +54,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class ClosePipWithDismissButtonTest(flicker: LegacyFlickerTest) : ClosePipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions { pipApp.closePipWindow(wmHelper) }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt
index 6e32d64..a1551b7 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt
@@ -17,9 +17,11 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.EnterPipTransition
import org.junit.Assume
import org.junit.FixMethodOrder
@@ -43,6 +45,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class EnterPipOnUserLeaveHintTest(flicker: LegacyFlickerTest) : EnterPipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = { transitions { tapl.goHome() } }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt
index 9a6cb61..ea5b3e5 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt
@@ -19,6 +19,7 @@
import android.app.Activity
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.assertions.FlickerTest
import android.tools.flicker.junit.FlickerParametersRunnerFactory
@@ -32,6 +33,7 @@
import com.android.server.wm.flicker.helpers.FixedOrientationAppHelper
import com.android.server.wm.flicker.testapp.ActivityOptions.Pip.ACTION_ENTER_PIP
import com.android.server.wm.flicker.testapp.ActivityOptions.PortraitOnlyActivity.EXTRA_FIXED_ORIENTATION
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import com.android.wm.shell.flicker.pip.common.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE
import com.android.wm.shell.flicker.pip.common.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_PORTRAIT
@@ -68,6 +70,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class EnterPipToOtherOrientation(flicker: LegacyFlickerTest) : PipTransition(flicker) {
private val testApp = FixedOrientationAppHelper(instrumentation)
private val startingBounds = WindowUtils.getDisplayBounds(Rotation.ROTATION_90)
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt
index 6b4751c..a109c4b 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt
@@ -16,9 +16,11 @@
package com.android.wm.shell.flicker.pip
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.EnterPipTransition
import org.junit.FixMethodOrder
import org.junit.runner.RunWith
@@ -49,6 +51,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
open class EnterPipViaAppUiButtonTest(flicker: LegacyFlickerTest) : EnterPipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions { pipApp.clickEnterPipButton(wmHelper) }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt
index 8d0bc0f..14ec303 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt
@@ -16,9 +16,11 @@
package com.android.wm.shell.flicker.pip
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.ExitPipToAppTransition
import org.junit.FixMethodOrder
import org.junit.runner.RunWith
@@ -51,6 +53,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class ExitPipToAppViaExpandButtonTest(flicker: LegacyFlickerTest) :
ExitPipToAppTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt
index 939f328..8a34b5e 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt
@@ -16,9 +16,11 @@
package com.android.wm.shell.flicker.pip
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.ExitPipToAppTransition
import org.junit.FixMethodOrder
import org.junit.runner.RunWith
@@ -50,6 +52,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class ExitPipToAppViaIntentTest(flicker: LegacyFlickerTest) : ExitPipToAppTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
setup {
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt
index 258663b..4f189fc 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt
@@ -17,12 +17,14 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
import android.tools.traces.component.ComponentNameMatcher
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -54,6 +56,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class ExpandPipOnDoubleClickTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions { pipApp.doubleClickPipWindow(wmHelper) }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt
index 1964e3c..4d72b03d 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt
@@ -17,11 +17,13 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -33,6 +35,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class ExpandPipOnPinchOpenTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions { pipApp.pinchOpenPipWindow(wmHelper, 0.25f, 30) }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenAutoEnterPipOnGoToHomeTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenAutoEnterPipOnGoToHomeTest.kt
index 5f8ac2a..1c40d89 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenAutoEnterPipOnGoToHomeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenAutoEnterPipOnGoToHomeTest.kt
@@ -16,7 +16,10 @@
package com.android.wm.shell.flicker.pip
+import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
@@ -24,10 +27,9 @@
import android.tools.flicker.legacy.LegacyFlickerTestFactory
import android.tools.helpers.WindowUtils
import android.tools.traces.parsers.toFlickerComponent
-import androidx.test.filters.FlakyTest
-import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import com.android.server.wm.flicker.testapp.ActivityOptions
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.utils.SplitScreenUtils
import org.junit.Assume
import org.junit.FixMethodOrder
@@ -62,6 +64,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class FromSplitScreenAutoEnterPipOnGoToHomeTest(flicker: LegacyFlickerTest) :
AutoEnterPipOnGoToHomeTest(flicker) {
private val portraitDisplayBounds = WindowUtils.getDisplayBounds(Rotation.ROTATION_0)
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenEnterPipOnUserLeaveHintTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenEnterPipOnUserLeaveHintTest.kt
index 48c85a8..12e2328 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenEnterPipOnUserLeaveHintTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenEnterPipOnUserLeaveHintTest.kt
@@ -16,7 +16,10 @@
package com.android.wm.shell.flicker.pip
+import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
@@ -24,10 +27,9 @@
import android.tools.flicker.legacy.LegacyFlickerTestFactory
import android.tools.helpers.WindowUtils
import android.tools.traces.parsers.toFlickerComponent
-import androidx.test.filters.FlakyTest
-import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import com.android.server.wm.flicker.testapp.ActivityOptions
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.EnterPipTransition
import com.android.wm.shell.flicker.utils.SplitScreenUtils
import org.junit.Assume
@@ -63,6 +65,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class FromSplitScreenEnterPipOnUserLeaveHintTest(flicker: LegacyFlickerTest) :
EnterPipTransition(flicker) {
private val portraitDisplayBounds = WindowUtils.getDisplayBounds(Rotation.ROTATION_0)
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt
index ee62cf5..d979b42 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt
@@ -17,10 +17,12 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
-import androidx.test.filters.RequiresDevice
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.MovePipShelfHeightTransition
import com.android.wm.shell.flicker.utils.Direction
import org.junit.FixMethodOrder
@@ -56,6 +58,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class MovePipDownOnShelfHeightChange(flicker: LegacyFlickerTest) :
MovePipShelfHeightTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt
index 04fedf4..88d78ed 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt
@@ -17,6 +17,7 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.assertions.FlickerTest
import android.tools.flicker.junit.FlickerParametersRunnerFactory
@@ -27,6 +28,7 @@
import android.tools.traces.component.ComponentNameMatcher
import com.android.server.wm.flicker.helpers.ImeAppHelper
import com.android.server.wm.flicker.helpers.setRotation
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -41,6 +43,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class MovePipOnImeVisibilityChangeTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
private val imeApp = ImeAppHelper(instrumentation)
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt
index 4d643f7..c533800 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt
@@ -17,10 +17,12 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
-import androidx.test.filters.RequiresDevice
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.MovePipShelfHeightTransition
import com.android.wm.shell.flicker.utils.Direction
import org.junit.FixMethodOrder
@@ -56,6 +58,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
open class MovePipUpOnShelfHeightChangeTest(flicker: LegacyFlickerTest) :
MovePipShelfHeightTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
@@ -65,7 +68,8 @@
}
/** Checks that the visible region of [pipApp] window always moves up during the animation. */
- @Presubmit @Test fun pipWindowMovesUp() = pipWindowMoves(Direction.UP)
+ @Presubmit
+ @Test fun pipWindowMovesUp() = pipWindowMoves(Direction.UP)
/** Checks that the visible region of [pipApp] layer always moves up during the animation. */
@Presubmit @Test fun pipLayerMovesUp() = pipLayerMoves(Direction.UP)
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipAspectRatioChangeTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipAspectRatioChangeTest.kt
index 429774f..04016a9 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipAspectRatioChangeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipAspectRatioChangeTest.kt
@@ -17,11 +17,13 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -33,6 +35,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class PipAspectRatioChangeTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions { pipApp.changeAspectRatio(wmHelper) }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragTest.kt
index a4df69f..6bcaabc 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragTest.kt
@@ -18,11 +18,13 @@
import android.platform.test.annotations.Presubmit
import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
import com.android.server.wm.flicker.testapp.ActivityOptions
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -35,6 +37,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class PipDragTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
private var isDraggedLeft: Boolean = true
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt
index cbd4a52..d82bfdd 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt
@@ -17,16 +17,18 @@
package com.android.wm.shell.flicker.pip
import android.graphics.Rect
+import android.platform.test.annotations.FlakyTest
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
import android.tools.flicker.rules.RemoveAllTasksButHomeRule
-import androidx.test.filters.FlakyTest
-import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.helpers.setRotation
import com.android.server.wm.flicker.testapp.ActivityOptions
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -40,6 +42,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class PipDragThenSnapTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
// represents the direction in which the pip window should be snapping
private var willSnapRight: Boolean = true
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt
index 16d08e5..dbc97d0 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt
@@ -17,13 +17,15 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
import android.tools.flicker.subject.exceptions.IncorrectRegionException
-import androidx.test.filters.RequiresDevice
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -36,6 +38,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class PipPinchInTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions { pipApp.pinchInPipWindow(wmHelper, 0.4f, 30) }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt
index 578a9b5..9d46ac1 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt
@@ -17,8 +17,11 @@
package com.android.wm.shell.flicker.pip
import android.app.Activity
+import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.assertions.FlickerTest
import android.tools.flicker.junit.FlickerParametersRunnerFactory
@@ -26,10 +29,9 @@
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
import android.tools.helpers.WindowUtils
-import androidx.test.filters.FlakyTest
-import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.testapp.ActivityOptions
import com.android.server.wm.flicker.testapp.ActivityOptions.PortraitOnlyActivity.EXTRA_FIXED_ORIENTATION
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import com.android.wm.shell.flicker.pip.common.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE
import org.junit.Assume
@@ -48,6 +50,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
open class SetRequestedOrientationWhilePinned(flicker: LegacyFlickerTest) : PipTransition(flicker) {
private val startingBounds = WindowUtils.getDisplayBounds(Rotation.ROTATION_0)
private val endingBounds = WindowUtils.getDisplayBounds(Rotation.ROTATION_90)
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt
index c6cf341..e72251f 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt
@@ -17,6 +17,7 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.assertions.FlickerTest
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
@@ -25,6 +26,7 @@
import android.tools.helpers.WindowUtils
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import com.android.server.wm.flicker.helpers.setRotation
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -58,6 +60,7 @@
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class ShowPipAndRotateDisplay(flicker: LegacyFlickerTest) : PipTransition(flicker) {
private val testApp = SimpleAppHelper(instrumentation)
private val screenBoundsStart = WindowUtils.getDisplayBounds(flicker.scenario.startRotation)
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt
index bc2bfdb..c37bf35 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt
@@ -20,6 +20,7 @@
import android.content.Intent
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
+import android.platform.test.flag.junit.DeviceFlagsValueProvider
import android.tools.Rotation
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
@@ -31,9 +32,14 @@
import com.android.server.wm.flicker.testapp.ActivityOptions
import com.android.wm.shell.flicker.BaseTest
import com.google.common.truth.Truth
+import org.junit.Rule
import org.junit.Test
abstract class PipTransition(flicker: LegacyFlickerTest) : BaseTest(flicker) {
+ @JvmField
+ @Rule
+ val checkFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule()
+
protected val pipApp = PipAppHelper(instrumentation)
protected val displayBounds = WindowUtils.getDisplayBounds(flicker.scenario.startRotation)
protected val broadcastActionTrigger = BroadcastActionTrigger(instrumentation)
diff --git a/media/java/android/media/quality/IMediaQualityManager.aidl b/media/java/android/media/quality/IMediaQualityManager.aidl
index aaedf21..7ff0ff4 100644
--- a/media/java/android/media/quality/IMediaQualityManager.aidl
+++ b/media/java/android/media/quality/IMediaQualityManager.aidl
@@ -53,6 +53,8 @@
void registerSoundProfileCallback(in ISoundProfileCallback cb);
void registerAmbientBacklightCallback(in IAmbientBacklightCallback cb);
+ void unregisterAmbientBacklightCallback(in IAmbientBacklightCallback cb);
+
List<ParamCapability> getParamCapabilities(in List<String> names);
boolean isSupported();
diff --git a/media/java/android/media/tv/extension/pvr/IDeleteRecordedContentsCallback.aidl b/media/java/android/media/tv/extension/pvr/IDeleteRecordedContentsCallback.aidl
new file mode 100644
index 0000000..62f1511
--- /dev/null
+++ b/media/java/android/media/tv/extension/pvr/IDeleteRecordedContentsCallback.aidl
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.tv.extension.pvr;
+
+/**
+ * @hide
+ */
+oneway interface IDeleteRecordedContentsCallback {
+ void onRecordedContentsDeleted(in String[] contentUri, in int[] result);
+}
diff --git a/media/java/android/media/tv/extension/pvr/IGetInfoRecordedContentsCallback.aidl b/media/java/android/media/tv/extension/pvr/IGetInfoRecordedContentsCallback.aidl
new file mode 100644
index 0000000..64f8fc2
--- /dev/null
+++ b/media/java/android/media/tv/extension/pvr/IGetInfoRecordedContentsCallback.aidl
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.tv.extension.pvr;
+
+/**
+ * @hide
+ */
+interface IGetInfoRecordedContentsCallback {
+ void onRecordedContentsGetInfo(int result);
+}
diff --git a/media/java/android/media/tv/extension/pvr/IRecordedContents.aidl b/media/java/android/media/tv/extension/pvr/IRecordedContents.aidl
new file mode 100644
index 0000000..74a15b8
--- /dev/null
+++ b/media/java/android/media/tv/extension/pvr/IRecordedContents.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.tv.extension.pvr;
+
+import android.media.tv.extension.pvr.IDeleteRecordedContentsCallback;
+import android.media.tv.extension.pvr.IGetInfoRecordedContentsCallback;
+
+
+/**
+ * @hide
+ */
+interface IRecordedContents {
+ // Delete recorded contents by URIs
+ // using callback to notify the result or any errors during the deletion process.
+ void deleteRecordedContents(in String[] contentUri,
+ in IDeleteRecordedContentsCallback callback);
+ // Get the channel lock status for recorded content identified by the URI provided in sync way.
+ int getRecordedContentsLockInfoSync(String contentUri);
+ // Get the channel lock status for recorded content identified by the URI provided in async way.
+ void getRecordedContentsLockInfoAsync(String contentUri,
+ in IGetInfoRecordedContentsCallback callback);
+}
diff --git a/media/java/android/media/tv/extension/signal/IAnalogAudioInfo.aidl b/media/java/android/media/tv/extension/signal/IAnalogAudioInfo.aidl
new file mode 100644
index 0000000..742191f
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/IAnalogAudioInfo.aidl
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.tv.extension.signal;
+
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+interface IAnalogAudioInfo {
+ Bundle getAnalogAudioInfo(String sessionToken);
+}
diff --git a/media/java/android/media/tv/extension/signal/IAudioSignalInfo.aidl b/media/java/android/media/tv/extension/signal/IAudioSignalInfo.aidl
new file mode 100644
index 0000000..4c953a0
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/IAudioSignalInfo.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.tv.extension.signal;
+
+import android.media.tv.extension.signal.IAudioSignalInfoListener;
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+interface IAudioSignalInfo {
+ // Get audio signal information.
+ Bundle getAudioSignalInfo(String sessionToken);
+ // Notify TIS whether user selects audio track via mts button on the remote control.
+ void notifyMtsSelectTrackFlag(boolean mtsFlag);
+ // Get the audio track id selected via mts.
+ String getMtsSelectedTrackId();
+ // Register a listener to receive the updated audio signal information.
+ void addAudioSignalInfoListener(String clientToken, in IAudioSignalInfoListener listener);
+ // Remove a listener for audio signal information update notifications.
+ void removeAudioSignalInfoListener(in IAudioSignalInfoListener listener);
+}
diff --git a/media/java/android/media/tv/extension/signal/IAudioSignalInfoListener.aidl b/media/java/android/media/tv/extension/signal/IAudioSignalInfoListener.aidl
new file mode 100644
index 0000000..adf239a
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/IAudioSignalInfoListener.aidl
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.tv.extension.signal;
+
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+oneway interface IAudioSignalInfoListener {
+ void onAudioSignalInfoChanged(String sessionToken, in Bundle changedSignalInfo);
+}
diff --git a/media/java/android/media/tv/extension/signal/IHdmiSignalInfoListener.aidl b/media/java/android/media/tv/extension/signal/IHdmiSignalInfoListener.aidl
new file mode 100644
index 0000000..bd468b2
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/IHdmiSignalInfoListener.aidl
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.tv.extension.signal;
+
+/**
+ * @hide
+ */
+oneway interface IHdmiSignalInfoListener {
+ void onSignalInfoChanged(String sessionToken);
+ void onLowLatencyModeChanged(int enable);
+}
diff --git a/media/java/android/media/tv/extension/signal/IHdmiSignalInterface.aidl b/media/java/android/media/tv/extension/signal/IHdmiSignalInterface.aidl
new file mode 100644
index 0000000..39625e3
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/IHdmiSignalInterface.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.tv.extension.signal;
+
+import android.media.tv.extension.signal.IHdmiSignalInfoListener;
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+interface IHdmiSignalInterface {
+ // Register a listener for Hdmi Signal Info updates.
+ void addHdmiSignalInfoListener(String inputId, in IHdmiSignalInfoListener listener);
+ // Remove a listener for Hdmi Signal Info update notifications.
+ void removeHdmiSignalInfoListener(String inputId, in IHdmiSignalInfoListener listener);
+ // Obtain HdmiSignalInfo based on the inputId and sessionToken.
+ Bundle getHdmiSignalInfo(String sessionToken);
+ // Enable/disable low-latency decoding mode.
+ void setLowLatency(String sessionToken, int mode);
+ // Enable/disable force-VRR mode.
+ void setForceVrr(String sessionToken, int mode);
+}
diff --git a/media/java/android/media/tv/extension/signal/ITunerFrontendSignalInfoInterface.aidl b/media/java/android/media/tv/extension/signal/ITunerFrontendSignalInfoInterface.aidl
new file mode 100644
index 0000000..7f05e70
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/ITunerFrontendSignalInfoInterface.aidl
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.tv.extension.signal;
+
+import android.media.tv.extension.signal.ITunerFrontendSignalInfoListener;
+import android.os.Bundle;
+
+/**
+* @hide
+*/
+interface ITunerFrontendSignalInfoInterface {
+ Bundle getFrontendSignalInfo(String sessionToken);
+ void setFrontendSignalInfoListener(in ITunerFrontendSignalInfoListener listener);
+}
diff --git a/media/java/android/media/tv/extension/signal/ITunerFrontendSignalInfoListener.aidl b/media/java/android/media/tv/extension/signal/ITunerFrontendSignalInfoListener.aidl
new file mode 100644
index 0000000..9c22a35
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/ITunerFrontendSignalInfoListener.aidl
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.tv.extension.signal;
+
+/**
+* @hide
+*/
+oneway interface ITunerFrontendSignalInfoListener {
+ void onFrontendStatusChanged(int frontendStatus);
+}
diff --git a/media/java/android/media/tv/extension/signal/IVideoSignalInfo.aidl b/media/java/android/media/tv/extension/signal/IVideoSignalInfo.aidl
new file mode 100644
index 0000000..b17142a
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/IVideoSignalInfo.aidl
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.tv.extension.signal;
+
+import android.media.tv.extension.signal.IVideoSignalInfoListener;
+import android.os.Bundle;
+
+
+/**
+ * @hide
+ */
+interface IVideoSignalInfo {
+ void addVideoSignalInfoListener(String clientToken, in IVideoSignalInfoListener listener);
+ void removeVideoSignalInfoListener(in IVideoSignalInfoListener listener);
+ Bundle getVideoSignalInfo(String sessionToken);
+}
diff --git a/media/java/android/media/tv/extension/signal/IVideoSignalInfoListener.aidl b/media/java/android/media/tv/extension/signal/IVideoSignalInfoListener.aidl
new file mode 100644
index 0000000..aafc192
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/IVideoSignalInfoListener.aidl
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.tv.extension.signal;
+
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+oneway interface IVideoSignalInfoListener {
+ void onVideoSignalInfoChanged(String sessionToken, in Bundle changedSignalInfo);
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/dagger/NotificationsLogModule.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/dagger/NotificationsLogModule.kt
index 7dd4cde..d3359d3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/dagger/NotificationsLogModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/dagger/NotificationsLogModule.kt
@@ -32,6 +32,7 @@
import com.android.systemui.log.dagger.UnseenNotificationLog
import com.android.systemui.log.dagger.VisualStabilityLog
import com.android.systemui.statusbar.notification.NotifPipelineFlags
+import com.android.systemui.statusbar.notification.promoted.PromotedNotificationLog
import com.android.systemui.util.Compile
import dagger.Module
import dagger.Provides
@@ -117,6 +118,14 @@
return factory.create("NotifSectionLog", 1000, /* maxSize */ false /* systrace */)
}
+ /** Provides a [LogBuffer] for use by promoted notifications. */
+ @Provides
+ @SysUISingleton
+ @PromotedNotificationLog
+ fun providesPromotedNotificationLog(factory: LogBufferFactory): LogBuffer {
+ return factory.create("PromotedNotifLog", 50)
+ }
+
/** */
@Provides
@SysUISingleton
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationLog.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationLog.kt
new file mode 100644
index 0000000..f9d9c97
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationLog.kt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.promoted
+
+import javax.inject.Qualifier
+
+/** A [com.android.systemui.log.LogBuffer] for use by promoted notifications. */
+@Qualifier
+@MustBeDocumented
+@Retention(AnnotationRetention.RUNTIME)
+annotation class PromotedNotificationLog
diff --git a/services/core/Android.bp b/services/core/Android.bp
index aea16b0..b13277e 100644
--- a/services/core/Android.bp
+++ b/services/core/Android.bp
@@ -131,6 +131,7 @@
srcs: [
":android.hardware.tv.hdmi.connection-V1-java-source",
":android.hardware.tv.hdmi.earc-V1-java-source",
+ ":android.hardware.tv.mediaquality-V1-java-source",
":statslog-art-java-gen",
":statslog-contexthub-java-gen",
":services.core-aidl-sources",
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index fa22862..e57b009 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -65,6 +65,7 @@
import android.telephony.CellSignalStrengthNr;
import android.telephony.CellSignalStrengthTdscdma;
import android.telephony.CellSignalStrengthWcdma;
+import android.telephony.CellularIdentifierDisclosure;
import android.telephony.DisconnectCause;
import android.telephony.LinkCapacityEstimate;
import android.telephony.LocationAccessPolicy;
@@ -76,6 +77,7 @@
import android.telephony.PreciseDataConnectionState;
import android.telephony.PreciseDisconnectCause;
import android.telephony.Rlog;
+import android.telephony.SecurityAlgorithmUpdate;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
import android.telephony.SubscriptionInfo;
@@ -590,7 +592,9 @@
|| events.contains(TelephonyCallback.EVENT_ALLOWED_NETWORK_TYPE_LIST_CHANGED)
|| events.contains(TelephonyCallback.EVENT_EMERGENCY_CALLBACK_MODE_CHANGED)
|| events.contains(TelephonyCallback
- .EVENT_SIMULTANEOUS_CELLULAR_CALLING_SUBSCRIPTIONS_CHANGED);
+ .EVENT_SIMULTANEOUS_CELLULAR_CALLING_SUBSCRIPTIONS_CHANGED)
+ || events.contains(TelephonyCallback.EVENT_CELLULAR_IDENTIFIER_DISCLOSED_CHANGED)
+ || events.contains(TelephonyCallback.EVENT_SECURITY_ALGORITHMS_CHANGED);
}
private static final int MSG_USER_SWITCHED = 1;
@@ -897,7 +901,6 @@
mIsSatelliteEnabled = new AtomicBoolean();
mWasSatelliteEnabledNotified = new AtomicBoolean();
-
for (int i = 0; i < numPhones; i++) {
mCallState[i] = TelephonyManager.CALL_STATE_IDLE;
mDataActivity[i] = TelephonyManager.DATA_ACTIVITY_NONE;
@@ -3825,7 +3828,6 @@
}
}
-
/**
* Notify external listeners that carrier roaming non-terrestrial network
* signal strength changed.
@@ -3835,7 +3837,7 @@
public void notifyCarrierRoamingNtnSignalStrengthChanged(int subId,
@NonNull NtnSignalStrength ntnSignalStrength) {
if (!checkNotifyPermission("notifyCarrierRoamingNtnSignalStrengthChanged")) {
- log("nnotifyCarrierRoamingNtnSignalStrengthChanged: caller does not have required "
+ log("notifyCarrierRoamingNtnSignalStrengthChanged: caller does not have required "
+ "permissions.");
return;
}
@@ -3863,6 +3865,98 @@
}
}
+ /**
+ * Notify that the radio security algorithms have changed.
+ *
+ * @param phoneId the phone id.
+ * @param subId the subId.
+ * @param update the security algorithm update.
+ */
+ public void notifySecurityAlgorithmsChanged(int phoneId, int subId,
+ SecurityAlgorithmUpdate update) {
+ if (!Flags.securityAlgorithmsUpdateIndications()) {
+ log("Not available due to securityAlgorithmsUpdateIndications() flag");
+ return;
+ }
+ if (!checkNotifyPermission("notifySecurityAlgorithmChanged()")) {
+ return;
+ }
+
+ synchronized (mRecords) {
+ if (validatePhoneId(phoneId)) {
+ if (update == null) {
+ loge("SecurityAlgorithmUpdate is null, subId=" + subId
+ + ", phoneId=" + phoneId);
+ // Listeners shouldn't be updated for null updates.
+ return;
+ }
+
+ for (Record r : mRecords) {
+ if (r.matchTelephonyCallbackEvent(
+ TelephonyCallback.EVENT_SECURITY_ALGORITHMS_CHANGED)
+ && idMatch(r, subId, phoneId)) {
+ try {
+ if (VDBG) {
+ log("notifySecurityAlgorithmsChanged: securityAlgorithmUpdate= "
+ + update);
+ }
+ r.callback.onSecurityAlgorithmsChanged(update);
+ } catch (RemoteException ex) {
+ mRemoveList.add(r.binder);
+ }
+ }
+ }
+ }
+ handleRemoveListLocked();
+ }
+ }
+
+ /**
+ * Notify of a cellular identifier disclosure.
+ *
+ * @param phoneId the phone id.
+ * @param subId the subId.
+ * @param disclosure the cellular identifier disclosure.
+ */
+ public void notifyCellularIdentifierDisclosedChanged(int phoneId, int subId,
+ @NonNull CellularIdentifierDisclosure disclosure) {
+ if (!Flags.cellularIdentifierDisclosureIndications()) {
+ log("Not available due to cellularIdentifierDisclosureIndications() flag");
+ return;
+ }
+ if (!checkNotifyPermission("notifyCellularIdentifierDisclosedChanged()")) {
+ return;
+ }
+
+ synchronized (mRecords) {
+ if (validatePhoneId(phoneId)) {
+ if (disclosure == null) {
+ loge("CellularIdentifierDisclosure is null, subId=" + subId
+ + ", phoneId=" + phoneId);
+ // Listeners shouldn't be updated for null disclosures.
+ return;
+ }
+
+ for (Record r : mRecords) {
+ if (r.matchTelephonyCallbackEvent(
+ TelephonyCallback.EVENT_CELLULAR_IDENTIFIER_DISCLOSED_CHANGED)
+ && idMatch(r, subId, phoneId)) {
+ try {
+ if (VDBG) {
+ log("notifyCellularIdentifierDisclosedChanged: disclosure= "
+ + disclosure);
+ }
+ r.callback.onCellularIdentifierDisclosedChanged(disclosure);
+ } catch (RemoteException ex) {
+ mRemoveList.add(r.binder);
+ }
+ }
+ }
+ }
+ handleRemoveListLocked();
+ }
+ }
+
@NeverCompile // Avoid size overhead of debugging code.
@Override
public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
diff --git a/services/core/java/com/android/server/media/quality/MediaQualityService.java b/services/core/java/com/android/server/media/quality/MediaQualityService.java
index 1f8a200..aa0da5d 100644
--- a/services/core/java/com/android/server/media/quality/MediaQualityService.java
+++ b/services/core/java/com/android/server/media/quality/MediaQualityService.java
@@ -16,8 +16,17 @@
package com.android.server.media.quality;
+import static android.media.quality.AmbientBacklightEvent.AMBIENT_BACKLIGHT_EVENT_ENABLED;
+import static android.media.quality.AmbientBacklightEvent.AMBIENT_BACKLIGHT_EVENT_DISABLED;
+import static android.media.quality.AmbientBacklightEvent.AMBIENT_BACKLIGHT_EVENT_METADATA;
+import static android.media.quality.AmbientBacklightEvent.AMBIENT_BACKLIGHT_EVENT_INTERRUPTED;
+
+import android.annotation.NonNull;
import android.content.ContentValues;
import android.content.Context;
+import android.hardware.tv.mediaquality.IMediaQuality;
+import android.media.quality.AmbientBacklightEvent;
+import android.media.quality.AmbientBacklightMetadata;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.media.quality.AmbientBacklightSettings;
@@ -29,17 +38,27 @@
import android.media.quality.ParamCapability;
import android.media.quality.PictureProfile;
import android.media.quality.SoundProfile;
+import android.os.Binder;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.text.TextUtils;
+import android.util.Slog;
import android.os.Bundle;
import android.util.Log;
import com.android.server.SystemService;
+import com.android.server.utils.Slogf;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
import java.util.Locale;
/**
@@ -51,11 +70,16 @@
private static final boolean DEBUG = false;
private static final String TAG = "MediaQualityService";
private final Context mContext;
+ private IMediaQuality mMediaQuality;
+ private final Object mLock = new Object();
+ private final HalAmbientBacklightCallback mHalAmbientBacklightCallback;
+ private final Map<String, AmbientBacklightCallbackRecord> mCallbackRecords = new HashMap<>();
private final MediaQualityDbHelper mMediaQualityDbHelper;
public MediaQualityService(Context context) {
super(context);
mContext = context;
+ mHalAmbientBacklightCallback = new HalAmbientBacklightCallback();
mMediaQualityDbHelper = new MediaQualityDbHelper(mContext);
mMediaQualityDbHelper.setWriteAheadLoggingEnabled(true);
mMediaQualityDbHelper.setIdleConnectionTimeout(30);
@@ -63,6 +87,18 @@
@Override
public void onStart() {
+ IBinder binder = ServiceManager.getService(IMediaQuality.DESCRIPTOR + "/default");
+ if (binder != null) {
+ Slogf.d(TAG, "binder is not null");
+ mMediaQuality = IMediaQuality.Stub.asInterface(binder);
+ if (mMediaQuality != null) {
+ try {
+ mMediaQuality.setCallback(mHalAmbientBacklightCallback);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Failed to set ambient backlight detector callback", e);
+ }
+ }
+ }
publishBinderService(Context.MEDIA_QUALITY_SERVICE, new BinderService());
}
@@ -288,14 +324,89 @@
@Override
public void registerAmbientBacklightCallback(IAmbientBacklightCallback callback) {
+ if (DEBUG) {
+ Slogf.d(TAG, "registerAmbientBacklightCallback");
+ }
+
+ String callingPackageName = getCallingPackageName();
+
+ synchronized (mCallbackRecords) {
+ AmbientBacklightCallbackRecord record = mCallbackRecords.get(callingPackageName);
+ if (record != null) {
+ if (record.mCallback.asBinder().equals(callback.asBinder())) {
+ Slog.w(TAG, "AmbientBacklight Callback already registered");
+ return;
+ }
+ record.release();
+ mCallbackRecords.remove(callingPackageName);
+ }
+ mCallbackRecords.put(callingPackageName,
+ new AmbientBacklightCallbackRecord(callingPackageName, callback));
+ }
+ }
+
+ @Override
+ public void unregisterAmbientBacklightCallback(IAmbientBacklightCallback callback) {
+ if (DEBUG) {
+ Slogf.d(TAG, "unregisterAmbientBacklightCallback");
+ }
+
+ synchronized (mCallbackRecords) {
+ for (AmbientBacklightCallbackRecord record : mCallbackRecords.values()) {
+ if (record.mCallback.asBinder().equals(callback.asBinder())) {
+ record.release();
+ mCallbackRecords.remove(record.mPackageName);
+ return;
+ }
+ }
+ }
}
@Override
public void setAmbientBacklightSettings(AmbientBacklightSettings settings) {
+ if (DEBUG) {
+ Slogf.d(TAG, "setAmbientBacklightSettings " + settings);
+ }
+
+ try {
+ if (mMediaQuality != null) {
+ android.hardware.tv.mediaquality.AmbientBacklightSettings halSettings =
+ new android.hardware.tv.mediaquality.AmbientBacklightSettings();
+ halSettings.packageName = getCallingPackageName();
+ halSettings.source = (byte) settings.getSource();
+ halSettings.maxFramerate = settings.getMaxFps();
+ halSettings.colorFormat = (byte) settings.getColorFormat();
+ halSettings.hZonesNumber = settings.getHorizontalZonesNumber();
+ halSettings.vZonesNumber = settings.getVerticalZonesNumber();
+ halSettings.hasLetterbox = settings.isLetterboxOmitted();
+ halSettings.threshold = settings.getThreshold();
+
+ mMediaQuality.setAmbientBacklightDetector(halSettings);
+
+ mHalAmbientBacklightCallback.setAmbientBacklightClientPackageName(
+ getCallingPackageName());
+
+ if (DEBUG) {
+ Slogf.d(TAG, "set ambient settings package: " + halSettings.packageName);
+ }
+ }
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Failed to set ambient backlight settings", e);
+ }
}
@Override
public void setAmbientBacklightEnabled(boolean enabled) {
+ if (DEBUG) {
+ Slogf.d(TAG, "setAmbientBacklightEnabled " + enabled);
+ }
+ try {
+ if (mMediaQuality != null) {
+ mMediaQuality.setAmbientBacklightDetectionEnabled(enabled);
+ }
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Failed to set ambient backlight enabled", e);
+ }
}
@Override
@@ -353,4 +464,168 @@
return false;
}
}
+
+ private final class AmbientBacklightCallbackRecord implements IBinder.DeathRecipient {
+ final String mPackageName;
+ final IAmbientBacklightCallback mCallback;
+
+ AmbientBacklightCallbackRecord(@NonNull String pkgName,
+ @NonNull IAmbientBacklightCallback cb) {
+ mPackageName = pkgName;
+ mCallback = cb;
+ try {
+ mCallback.asBinder().linkToDeath(this, 0);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Failed to link to death", e);
+ }
+ }
+
+ void release() {
+ try {
+ mCallback.asBinder().unlinkToDeath(this, 0);
+ } catch (NoSuchElementException e) {
+ Slog.e(TAG, "Failed to unlink to death", e);
+ }
+ }
+
+ @Override
+ public void binderDied() {
+ synchronized (mCallbackRecords) {
+ mCallbackRecords.remove(mPackageName);
+ }
+ }
+ }
+
+ private final class HalAmbientBacklightCallback
+ extends android.hardware.tv.mediaquality.IMediaQualityCallback.Stub {
+ private final Object mLock = new Object();
+ private String mAmbientBacklightClientPackageName;
+
+ void setAmbientBacklightClientPackageName(@NonNull String packageName) {
+ synchronized (mLock) {
+ if (TextUtils.equals(mAmbientBacklightClientPackageName, packageName)) {
+ return;
+ }
+ handleAmbientBacklightInterrupted();
+ mAmbientBacklightClientPackageName = packageName;
+ }
+ }
+
+ void handleAmbientBacklightInterrupted() {
+ synchronized (mCallbackRecords) {
+ if (mAmbientBacklightClientPackageName == null) {
+ Slog.e(TAG, "Invalid package name in interrupted event");
+ return;
+ }
+ AmbientBacklightCallbackRecord record = mCallbackRecords.get(
+ mAmbientBacklightClientPackageName);
+ if (record == null) {
+ Slog.e(TAG, "Callback record not found for ambient backlight");
+ return;
+ }
+ AmbientBacklightEvent event =
+ new AmbientBacklightEvent(
+ AMBIENT_BACKLIGHT_EVENT_INTERRUPTED, null);
+ try {
+ record.mCallback.onAmbientBacklightEvent(event);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Deliver ambient backlight interrupted event failed", e);
+ }
+ }
+ }
+
+ void handleAmbientBacklightEnabled(boolean enabled) {
+ AmbientBacklightEvent event =
+ new AmbientBacklightEvent(
+ enabled ? AMBIENT_BACKLIGHT_EVENT_ENABLED :
+ AMBIENT_BACKLIGHT_EVENT_DISABLED, null);
+ synchronized (mCallbackRecords) {
+ for (AmbientBacklightCallbackRecord record : mCallbackRecords.values()) {
+ try {
+ record.mCallback.onAmbientBacklightEvent(event);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Deliver ambient backlight enabled event failed", e);
+ }
+ }
+ }
+ }
+
+ void handleAmbientBacklightMetadataEvent(
+ @NonNull android.hardware.tv.mediaquality.AmbientBacklightMetadata
+ halMetadata) {
+ if (!TextUtils.equals(mAmbientBacklightClientPackageName,
+ halMetadata.settings.packageName)) {
+ Slog.e(TAG, "Invalid package name in metadata event");
+ return;
+ }
+
+ AmbientBacklightMetadata metadata =
+ new AmbientBacklightMetadata(
+ halMetadata.settings.packageName,
+ halMetadata.compressAlgorithm,
+ halMetadata.settings.source,
+ halMetadata.settings.colorFormat,
+ halMetadata.settings.hZonesNumber,
+ halMetadata.settings.vZonesNumber,
+ halMetadata.zonesColors);
+ AmbientBacklightEvent event =
+ new AmbientBacklightEvent(
+ AMBIENT_BACKLIGHT_EVENT_METADATA, metadata);
+
+ synchronized (mCallbackRecords) {
+ AmbientBacklightCallbackRecord record = mCallbackRecords
+ .get(halMetadata.settings.packageName);
+ if (record == null) {
+ Slog.e(TAG, "Callback record not found for ambient backlight metadata");
+ return;
+ }
+
+ try {
+ record.mCallback.onAmbientBacklightEvent(event);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Deliver ambient backlight metadata event failed", e);
+ }
+ }
+ }
+
+ @Override
+ public void notifyAmbientBacklightEvent(
+ android.hardware.tv.mediaquality.AmbientBacklightEvent halEvent) {
+ synchronized (mLock) {
+ if (halEvent.getTag() == android.hardware.tv.mediaquality
+ .AmbientBacklightEvent.Tag.enabled) {
+ boolean enabled = halEvent.getEnabled();
+ if (enabled) {
+ handleAmbientBacklightEnabled(true);
+ } else {
+ handleAmbientBacklightEnabled(false);
+ }
+ } else if (halEvent.getTag() == android.hardware.tv.mediaquality
+ .AmbientBacklightEvent.Tag.metadata) {
+ handleAmbientBacklightMetadataEvent(halEvent.getMetadata());
+ } else {
+ Slog.e(TAG, "Invalid event type in ambient backlight event");
+ }
+ }
+ }
+
+ @Override
+ public synchronized String getInterfaceHash() throws android.os.RemoteException {
+ return android.hardware.tv.mediaquality.IMediaQualityCallback.Stub.HASH;
+ }
+
+ @Override
+ public int getInterfaceVersion() throws android.os.RemoteException {
+ return android.hardware.tv.mediaquality.IMediaQualityCallback.Stub.VERSION;
+ }
+ }
+
+ private String getCallingPackageName() {
+ final String[] packages = mContext.getPackageManager().getPackagesForUid(
+ Binder.getCallingUid());
+ if (packages != null && packages.length > 0) {
+ return packages[0];
+ }
+ return "unknown";
+ }
}
diff --git a/services/core/java/com/android/server/pm/InstallPackageHelper.java b/services/core/java/com/android/server/pm/InstallPackageHelper.java
index d9e7696..8168c54 100644
--- a/services/core/java/com/android/server/pm/InstallPackageHelper.java
+++ b/services/core/java/com/android/server/pm/InstallPackageHelper.java
@@ -1029,12 +1029,14 @@
if (reconciledPackages == null) {
return;
}
- if (Flags.improveInstallFreeze()) {
- prepPerformDexoptIfNeeded(reconciledPackages);
- }
- if (renameAndUpdatePaths(requests)
- && commitInstallPackages(reconciledPackages)) {
- success = true;
+ if (renameAndUpdatePaths(requests)) {
+ // rename before dexopt because art will encoded the path in the odex/vdex file
+ if (Flags.improveInstallFreeze()) {
+ prepPerformDexoptIfNeeded(reconciledPackages);
+ }
+ if (commitInstallPackages(reconciledPackages)) {
+ success = true;
+ }
}
}
} finally {
diff --git a/services/core/java/com/android/server/pm/LauncherAppsService.java b/services/core/java/com/android/server/pm/LauncherAppsService.java
index 2c09423..286333c 100644
--- a/services/core/java/com/android/server/pm/LauncherAppsService.java
+++ b/services/core/java/com/android/server/pm/LauncherAppsService.java
@@ -96,7 +96,6 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.IInterface;
-import android.os.Looper;
import android.os.ParcelFileDescriptor;
import android.os.Process;
import android.os.RemoteCallbackList;
@@ -2667,6 +2666,7 @@
}
final String[] packagesNullExtras = packagesWithoutExtras.toArray(
new String[packagesWithoutExtras.size()]);
+
final int n = mListeners.beginBroadcast();
try {
for (int i = 0; i < n; i++) {
@@ -2852,7 +2852,7 @@
class SecureSettingsObserver extends ContentObserver {
SecureSettingsObserver() {
- super(new Handler(Looper.getMainLooper()));
+ super(mCallbackHandler);
}
@Override
@@ -2866,32 +2866,29 @@
if (privateProfile.getIdentifier() == UserHandle.USER_NULL) {
return;
}
-
final int n = mListeners.beginBroadcast();
try {
for (int i = 0; i < n; i++) {
- final IOnAppsChangedListener listener =
- mListeners.getBroadcastItem(i);
+ final IOnAppsChangedListener listener = mListeners.getBroadcastItem(i);
final BroadcastCookie cookie =
- (BroadcastCookie) mListeners.getBroadcastCookie(
- i);
+ (BroadcastCookie) mListeners.getBroadcastCookie(i);
if (!isEnabledProfileOf(cookie, privateProfile,
"onSecureSettingsChange")) {
Log.d(TAG, "onSecureSettingsChange: Skipping - profile not enabled"
+ " or not accessible for package=" + cookie.packageName
+ ", packageUid=" + cookie.callingUid);
- } else {
- try {
- Log.d(TAG,
- "onUserConfigChanged: triggering onUserConfigChanged");
- listener.onUserConfigChanged(
- mUserManagerInternal.getLauncherUserInfo(
- privateProfile.getIdentifier()));
- } catch (RemoteException re) {
- Slog.d(TAG, "onUserConfigChanged: Callback failed ", re);
- }
+ continue;
+ }
+ try {
+ Log.d(TAG, "onUserConfigChanged: triggering onUserConfigChanged");
+ listener.onUserConfigChanged(
+ mUserManagerInternal.getLauncherUserInfo(
+ privateProfile.getIdentifier()));
+ } catch (RemoteException re) {
+ Slog.d(TAG, "onUserConfigChanged: Callback failed ", re);
}
}
+
} finally {
mListeners.finishBroadcast();
}
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java
index 465ac2f..887e186 100644
--- a/services/core/java/com/android/server/trust/TrustManagerService.java
+++ b/services/core/java/com/android/server/trust/TrustManagerService.java
@@ -61,6 +61,7 @@
import android.os.Looper;
import android.os.Message;
import android.os.PersistableBundle;
+import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.UserHandle;
@@ -84,6 +85,7 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.content.PackageMonitor;
import com.android.internal.infra.AndroidFuture;
+import com.android.internal.policy.IDeviceLockedStateListener;
import com.android.internal.util.DumpUtils;
import com.android.internal.widget.LockPatternUtils;
import com.android.internal.widget.LockSettingsInternal;
@@ -105,6 +107,7 @@
import java.util.Collection;
import java.util.List;
import java.util.Objects;
+import java.util.stream.IntStream;
/**
* Manages trust agents and trust listeners.
@@ -253,6 +256,10 @@
new SparseArray<>();
private final SparseArray<TrustableTimeoutAlarmListener>
mIdleTrustableTimeoutAlarmListenerForUser = new SparseArray<>();
+
+ private final RemoteCallbackList<IDeviceLockedStateListener>
+ mDeviceLockedStateListeners = new RemoteCallbackList<>();
+
private AlarmManager mAlarmManager;
private final Object mAlarmLock = new Object();
@@ -1090,6 +1097,7 @@
if (changed) {
notifyTrustAgentsOfDeviceLockState(userId, locked);
notifyKeystoreOfDeviceLockState(userId, locked);
+ notifyDeviceLockedListenersForUser(userId, locked);
// Also update the user's profiles who have unified challenge, since they
// share the same unlocked state (see {@link #isDeviceLocked(int)})
for (int profileHandle : mUserManager.getEnabledProfileIds(userId)) {
@@ -1910,6 +1918,26 @@
return mIsInSignificantPlace;
}
+ @EnforcePermission(Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE)
+ @Override
+ public void registerDeviceLockedStateListener(IDeviceLockedStateListener listener,
+ int deviceId) {
+ super.registerDeviceLockedStateListener_enforcePermission();
+ if (deviceId != Context.DEVICE_ID_DEFAULT) {
+ // Virtual devices are considered insecure.
+ return;
+ }
+ mDeviceLockedStateListeners.register(listener,
+ Integer.valueOf(UserHandle.getUserId(Binder.getCallingUid())));
+ }
+
+ @EnforcePermission(Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE)
+ @Override
+ public void unregisterDeviceLockedStateListener(IDeviceLockedStateListener listener) {
+ super.unregisterDeviceLockedStateListener_enforcePermission();
+ mDeviceLockedStateListeners.unregister(listener);
+ }
+
private void enforceReportPermission() {
mContext.enforceCallingOrSelfPermission(
Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE, "reporting trust events");
@@ -2031,6 +2059,7 @@
}
notifyKeystoreOfDeviceLockState(userId, locked);
+ notifyDeviceLockedListenersForUser(userId, locked);
if (locked) {
try {
@@ -2497,4 +2526,24 @@
updateTrust(mUserId, 0 /* flags */);
}
}
+
+ private void notifyDeviceLockedListenersForUser(int userId, boolean locked) {
+ int numListeners = mDeviceLockedStateListeners.beginBroadcast();
+ try {
+ IntStream.range(0, numListeners).forEach(i -> {
+ try {
+ Integer uid = (Integer) mDeviceLockedStateListeners.getBroadcastCookie(i);
+ if (userId == uid.intValue()) {
+ mDeviceLockedStateListeners.getBroadcastItem(i)
+ .onDeviceLockedStateChanged(locked);
+ }
+ } catch (RemoteException re) {
+ Log.i(TAG, "Service died", re);
+ }
+ });
+
+ } finally {
+ mDeviceLockedStateListeners.finishBroadcast();
+ }
+ }
}
diff --git a/telephony/java/android/telephony/CellularIdentifierDisclosure.aidl b/telephony/java/android/telephony/CellularIdentifierDisclosure.aidl
new file mode 100644
index 0000000..1e41d6e
--- /dev/null
+++ b/telephony/java/android/telephony/CellularIdentifierDisclosure.aidl
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/** @hide */
+package android.telephony;
+
+parcelable CellularIdentifierDisclosure;
diff --git a/telephony/java/android/telephony/CellularIdentifierDisclosure.java b/telephony/java/android/telephony/CellularIdentifierDisclosure.java
index 7b2db6d..0b6a70f 100644
--- a/telephony/java/android/telephony/CellularIdentifierDisclosure.java
+++ b/telephony/java/android/telephony/CellularIdentifierDisclosure.java
@@ -16,11 +16,16 @@
package android.telephony;
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.SystemApi;
+import android.annotation.TestApi;
import android.os.Parcel;
import android.os.Parcelable;
+import com.android.internal.telephony.flags.Flags;
+
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Objects;
@@ -31,16 +36,88 @@
*
* @hide
*/
+@SystemApi
+@FlaggedApi(Flags.FLAG_CELLULAR_IDENTIFIER_DISCLOSURE_INDICATIONS)
public final class CellularIdentifierDisclosure implements Parcelable {
private static final String TAG = "CellularIdentifierDisclosure";
+ /* Non-access stratum protocol messages */
+ /** Unknown */
+ public static final int NAS_PROTOCOL_MESSAGE_UNKNOWN = 0;
+ /** ATTACH REQUESTS. Sample reference: TS 24.301 8.2.4 Applies to 2g, 3g, and 4g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_ATTACH_REQUEST = 1;
+ /** IDENTITY RESPONSE. Sample Reference: TS 24.301 8.2.19.
+ * Applies to 2g, 3g, 4g, and 5g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_IDENTITY_RESPONSE = 2;
+ /** DETACH_REQUEST. Sample Reference: TS 24.301 8.2.11. Applies to 2g, 3g, and 4g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_DETACH_REQUEST = 3;
+ /** TRACKING AREA UPDATE (TAU) REQUEST. Sample Reference: 3GPP TS 24.301 8.2.29.
+ * Note: that per the spec, only temporary IDs should be sent in the TAU Request, but since the
+ * EPS Mobile Identity field supports IMSIs, this is included as an extra safety measure to
+ * combat implementation bugs. Applies to 4g and 5g networks. */
+ public static final int NAS_PROTOCOL_MESSAGE_TRACKING_AREA_UPDATE_REQUEST = 4;
+ /** LOCATION UPDATE REQUEST. Sample Reference: TS 24.008 4.4.3. Applies to 2g and 3g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_LOCATION_UPDATE_REQUEST = 5;
+ /** AUTHENTICATION AND CIPHERING RESPONSE. Reference: 3GPP TS 24.008 4.7.7.1.
+ * Applies to 2g and 3g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_AUTHENTICATION_AND_CIPHERING_RESPONSE = 6;
+ /** REGISTRATION REQUEST. Reference: 3GPP TS 24.501 8.2.6. Applies to 5g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_REGISTRATION_REQUEST = 7;
+ /** DEREGISTRATION REQUEST. Reference: 3GPP TS 24.501 8.2.12. Applies to 5g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_DEREGISTRATION_REQUEST = 8;
+ /** CONNECTION MANAGEMENT REESTABLISHMENT REQUEST. Reference: 3GPP TS 24.008 9.2.4.
+ * Applies to 2g and 3g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_CM_REESTABLISHMENT_REQUEST = 9;
+ /** CONNECTION MANAGEMENT SERVICE REQUEST. Reference: 3GPP TS 24.008 9.2.9.
+ * Applies to 2g and 3g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_CM_SERVICE_REQUEST = 10;
+ /** IMEI DETATCH INDICATION. Reference: 3GPP TS 24.008 9.2.14.
+ * Applies to 2g and 3g networks. Used for circuit-switched detach. */
+ public static final int NAS_PROTOCOL_MESSAGE_IMSI_DETACH_INDICATION = 11;
+
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = {"NAS_PROTOCOL_MESSAGE_"}, value = {NAS_PROTOCOL_MESSAGE_UNKNOWN,
+ NAS_PROTOCOL_MESSAGE_ATTACH_REQUEST, NAS_PROTOCOL_MESSAGE_IDENTITY_RESPONSE,
+ NAS_PROTOCOL_MESSAGE_DETACH_REQUEST, NAS_PROTOCOL_MESSAGE_TRACKING_AREA_UPDATE_REQUEST,
+ NAS_PROTOCOL_MESSAGE_LOCATION_UPDATE_REQUEST,
+ NAS_PROTOCOL_MESSAGE_AUTHENTICATION_AND_CIPHERING_RESPONSE,
+ NAS_PROTOCOL_MESSAGE_REGISTRATION_REQUEST, NAS_PROTOCOL_MESSAGE_DEREGISTRATION_REQUEST,
+ NAS_PROTOCOL_MESSAGE_CM_REESTABLISHMENT_REQUEST,
+ NAS_PROTOCOL_MESSAGE_CM_SERVICE_REQUEST, NAS_PROTOCOL_MESSAGE_IMSI_DETACH_INDICATION})
+ public @interface NasProtocolMessage {
+ }
+
+ /* Cellular identifiers */
+ /** Unknown */
+ public static final int CELLULAR_IDENTIFIER_UNKNOWN = 0;
+ /** IMSI (International Mobile Subscriber Identity) */
+ public static final int CELLULAR_IDENTIFIER_IMSI = 1;
+ /** IMEI (International Mobile Equipment Identity) */
+ public static final int CELLULAR_IDENTIFIER_IMEI = 2;
+ /** 5G-specific SUCI (Subscription Concealed Identifier) */
+ public static final int CELLULAR_IDENTIFIER_SUCI = 3;
+
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = {"CELLULAR_IDENTIFIER_"}, value = {CELLULAR_IDENTIFIER_UNKNOWN,
+ CELLULAR_IDENTIFIER_IMSI, CELLULAR_IDENTIFIER_IMEI, CELLULAR_IDENTIFIER_SUCI})
+ public @interface CellularIdentifier {
+ }
+
private @NasProtocolMessage int mNasProtocolMessage;
private @CellularIdentifier int mCellularIdentifier;
private String mPlmn;
private boolean mIsEmergency;
+ /**
+ * Constructor for new CellularIdentifierDisclosure instances.
+ *
+ * @hide
+ */
+ @TestApi
public CellularIdentifierDisclosure(@NasProtocolMessage int nasProtocolMessage,
- @CellularIdentifier int cellularIdentifier, String plmn, boolean isEmergency) {
+ @CellularIdentifier int cellularIdentifier, @NonNull String plmn, boolean isEmergency) {
mNasProtocolMessage = nasProtocolMessage;
mCellularIdentifier = cellularIdentifier;
mPlmn = plmn;
@@ -51,18 +128,30 @@
readFromParcel(in);
}
+ /**
+ * @return the NAS protocol message associated with the disclosed identifier.
+ */
public @NasProtocolMessage int getNasProtocolMessage() {
return mNasProtocolMessage;
}
+ /**
+ * @return the identifier disclosed.
+ */
public @CellularIdentifier int getCellularIdentifier() {
return mCellularIdentifier;
}
- public String getPlmn() {
+ /**
+ * @return the PLMN associated with the disclosure.
+ */
+ @NonNull public String getPlmn() {
return mPlmn;
}
+ /**
+ * @return if the disclosure is associated with an emergency call.
+ */
public boolean isEmergency() {
return mIsEmergency;
}
@@ -73,14 +162,14 @@
}
@Override
- public void writeToParcel(Parcel out, int flags) {
+ public void writeToParcel(@NonNull Parcel out, int flags) {
out.writeInt(mNasProtocolMessage);
out.writeInt(mCellularIdentifier);
out.writeBoolean(mIsEmergency);
out.writeString8(mPlmn);
}
- public static final Parcelable.Creator<CellularIdentifierDisclosure> CREATOR =
+ public static final @NonNull Parcelable.Creator<CellularIdentifierDisclosure> CREATOR =
new Parcelable.Creator<CellularIdentifierDisclosure>() {
public CellularIdentifierDisclosure createFromParcel(Parcel in) {
return new CellularIdentifierDisclosure(in);
@@ -120,42 +209,4 @@
mIsEmergency = in.readBoolean();
mPlmn = in.readString8();
}
-
- public static final int NAS_PROTOCOL_MESSAGE_UNKNOWN = 0;
- public static final int NAS_PROTOCOL_MESSAGE_ATTACH_REQUEST = 1;
- public static final int NAS_PROTOCOL_MESSAGE_IDENTITY_RESPONSE = 2;
- public static final int NAS_PROTOCOL_MESSAGE_DETACH_REQUEST = 3;
- public static final int NAS_PROTOCOL_MESSAGE_TRACKING_AREA_UPDATE_REQUEST = 4;
- public static final int NAS_PROTOCOL_MESSAGE_LOCATION_UPDATE_REQUEST = 5;
- public static final int NAS_PROTOCOL_MESSAGE_AUTHENTICATION_AND_CIPHERING_RESPONSE = 6;
- public static final int NAS_PROTOCOL_MESSAGE_REGISTRATION_REQUEST = 7;
- public static final int NAS_PROTOCOL_MESSAGE_DEREGISTRATION_REQUEST = 8;
- public static final int NAS_PROTOCOL_MESSAGE_CM_REESTABLISHMENT_REQUEST = 9;
- public static final int NAS_PROTOCOL_MESSAGE_CM_SERVICE_REQUEST = 10;
- public static final int NAS_PROTOCOL_MESSAGE_IMSI_DETACH_INDICATION = 11;
-
- /** @hide */
- @Retention(RetentionPolicy.SOURCE)
- @IntDef(prefix = {"NAS_PROTOCOL_MESSAGE_"}, value = {NAS_PROTOCOL_MESSAGE_UNKNOWN,
- NAS_PROTOCOL_MESSAGE_ATTACH_REQUEST, NAS_PROTOCOL_MESSAGE_IDENTITY_RESPONSE,
- NAS_PROTOCOL_MESSAGE_DETACH_REQUEST, NAS_PROTOCOL_MESSAGE_TRACKING_AREA_UPDATE_REQUEST,
- NAS_PROTOCOL_MESSAGE_LOCATION_UPDATE_REQUEST,
- NAS_PROTOCOL_MESSAGE_AUTHENTICATION_AND_CIPHERING_RESPONSE,
- NAS_PROTOCOL_MESSAGE_REGISTRATION_REQUEST, NAS_PROTOCOL_MESSAGE_DEREGISTRATION_REQUEST,
- NAS_PROTOCOL_MESSAGE_CM_REESTABLISHMENT_REQUEST,
- NAS_PROTOCOL_MESSAGE_CM_SERVICE_REQUEST, NAS_PROTOCOL_MESSAGE_IMSI_DETACH_INDICATION})
- public @interface NasProtocolMessage {
- }
-
- public static final int CELLULAR_IDENTIFIER_UNKNOWN = 0;
- public static final int CELLULAR_IDENTIFIER_IMSI = 1;
- public static final int CELLULAR_IDENTIFIER_IMEI = 2;
- public static final int CELLULAR_IDENTIFIER_SUCI = 3;
-
- /** @hide */
- @Retention(RetentionPolicy.SOURCE)
- @IntDef(prefix = {"CELLULAR_IDENTIFIER_"}, value = {CELLULAR_IDENTIFIER_UNKNOWN,
- CELLULAR_IDENTIFIER_IMSI, CELLULAR_IDENTIFIER_IMEI, CELLULAR_IDENTIFIER_SUCI})
- public @interface CellularIdentifier {
- }
}
diff --git a/telephony/java/android/telephony/SecurityAlgorithmUpdate.aidl b/telephony/java/android/telephony/SecurityAlgorithmUpdate.aidl
new file mode 100644
index 0000000..bee30bd
--- /dev/null
+++ b/telephony/java/android/telephony/SecurityAlgorithmUpdate.aidl
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/** @hide */
+package android.telephony;
+
+parcelable SecurityAlgorithmUpdate;
diff --git a/telephony/java/android/telephony/SecurityAlgorithmUpdate.java b/telephony/java/android/telephony/SecurityAlgorithmUpdate.java
index 57209eb..d635b55 100644
--- a/telephony/java/android/telephony/SecurityAlgorithmUpdate.java
+++ b/telephony/java/android/telephony/SecurityAlgorithmUpdate.java
@@ -16,11 +16,16 @@
package android.telephony;
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.SystemApi;
+import android.annotation.TestApi;
import android.os.Parcel;
import android.os.Parcelable;
+import com.android.internal.telephony.flags.Flags;
+
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Objects;
@@ -31,14 +36,189 @@
*
* @hide
*/
+@SystemApi
+@FlaggedApi(Flags.FLAG_SECURITY_ALGORITHMS_UPDATE_INDICATIONS)
public final class SecurityAlgorithmUpdate implements Parcelable {
private static final String TAG = "SecurityAlgorithmUpdate";
+ /** 2G GSM circuit switched */
+ public static final int CONNECTION_EVENT_CS_SIGNALLING_GSM = 0;
+ /** 2G GPRS packet services */
+ public static final int CONNECTION_EVENT_PS_SIGNALLING_GPRS = 1;
+ /** 3G circuit switched*/
+ public static final int CONNECTION_EVENT_CS_SIGNALLING_3G = 2;
+ /** 3G packet switched*/
+ public static final int CONNECTION_EVENT_PS_SIGNALLING_3G = 3;
+ /** 4G Non-access stratum */
+ public static final int CONNECTION_EVENT_NAS_SIGNALLING_LTE = 4;
+ /** 4G Access-stratum */
+ public static final int CONNECTION_EVENT_AS_SIGNALLING_LTE = 5;
+ /** VOLTE SIP */
+ public static final int CONNECTION_EVENT_VOLTE_SIP = 6;
+ /** VOLTE SIP SOS (emergency) */
+ public static final int CONNECTION_EVENT_VOLTE_SIP_SOS = 7;
+ /** VOLTE RTP */
+ public static final int CONNECTION_EVENT_VOLTE_RTP = 8;
+ /** VOLTE RTP SOS (emergency) */
+ public static final int CONNECTION_EVENT_VOLTE_RTP_SOS = 9;
+ /** 5G Non-access stratum */
+ public static final int CONNECTION_EVENT_NAS_SIGNALLING_5G = 10;
+ /** 5G Access stratum */
+ public static final int CONNECTION_EVENT_AS_SIGNALLING_5G = 11;
+ /** VoNR SIP */
+ public static final int CONNECTION_EVENT_VONR_SIP = 12;
+ /** VoNR SIP SOS (emergency) */
+ public static final int CONNECTION_EVENT_VONR_SIP_SOS = 13;
+ /** VoNR RTP */
+ public static final int CONNECTION_EVENT_VONR_RTP = 14;
+ /** VoNR RTP SOS (emergency) */
+ public static final int CONNECTION_EVENT_VONR_RTP_SOS = 15;
+
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = {"CONNECTION_EVENT_"}, value = {CONNECTION_EVENT_CS_SIGNALLING_GSM,
+ CONNECTION_EVENT_PS_SIGNALLING_GPRS, CONNECTION_EVENT_CS_SIGNALLING_3G,
+ CONNECTION_EVENT_PS_SIGNALLING_3G, CONNECTION_EVENT_NAS_SIGNALLING_LTE,
+ CONNECTION_EVENT_AS_SIGNALLING_LTE, CONNECTION_EVENT_VOLTE_SIP,
+ CONNECTION_EVENT_VOLTE_SIP_SOS, CONNECTION_EVENT_VOLTE_RTP,
+ CONNECTION_EVENT_VOLTE_RTP_SOS, CONNECTION_EVENT_NAS_SIGNALLING_5G,
+ CONNECTION_EVENT_AS_SIGNALLING_5G, CONNECTION_EVENT_VONR_SIP,
+ CONNECTION_EVENT_VONR_SIP_SOS, CONNECTION_EVENT_VONR_RTP,
+ CONNECTION_EVENT_VONR_RTP_SOS})
+ public @interface ConnectionEvent {
+ }
+
+ /* GSM CS services, see 3GPP TS 43.020 for details */
+ /** A5/0 - the null cipher */
+ public static final int SECURITY_ALGORITHM_A50 = 0;
+ /** A5/1 cipher */
+ public static final int SECURITY_ALGORITHM_A51 = 1;
+ /** A5/2 cipher */
+ public static final int SECURITY_ALGORITHM_A52 = 2;
+ /** A5/3 cipher */
+ public static final int SECURITY_ALGORITHM_A53 = 3;
+ /** A5/4 cipher */
+ public static final int SECURITY_ALGORITHM_A54 = 4;
+ /* GPRS PS services (3GPP TS 43.020) */
+ /** GEA0 - null cipher */
+ public static final int SECURITY_ALGORITHM_GEA0 = 14;
+ /** GEA1 cipher */
+ public static final int SECURITY_ALGORITHM_GEA1 = 15;
+ /** GEA2 cipher */
+ public static final int SECURITY_ALGORITHM_GEA2 = 16;
+ /** GEA3 cipher */
+ public static final int SECURITY_ALGORITHM_GEA3 = 17;
+ /** GEA4 cipher */
+ public static final int SECURITY_ALGORITHM_GEA4 = 18;
+ /** GEA5 cipher */
+ public static final int SECURITY_ALGORITHM_GEA5 = 19;
+ /* 3G PS/CS services (3GPP TS 33.102) */
+ /** UEA0 - null cipher */
+ public static final int SECURITY_ALGORITHM_UEA0 = 29;
+ /** UEA1 cipher */
+ public static final int SECURITY_ALGORITHM_UEA1 = 30;
+ /** UEA2 cipher */
+ public static final int SECURITY_ALGORITHM_UEA2 = 31;
+ /* 4G PS services & 5G NSA (3GPP TS 33.401) */
+ /** EEA0 - null cipher */
+ public static final int SECURITY_ALGORITHM_EEA0 = 41;
+ /** EEA1 */
+ public static final int SECURITY_ALGORITHM_EEA1 = 42;
+ /** EEA2 */
+ public static final int SECURITY_ALGORITHM_EEA2 = 43;
+ /** EEA3 */
+ public static final int SECURITY_ALGORITHM_EEA3 = 44;
+ /* 5G PS services (3GPP TS 33.401 for 5G NSA and 3GPP TS 33.501 for 5G SA) */
+ /** NEA0 - the null cipher */
+ public static final int SECURITY_ALGORITHM_NEA0 = 55;
+ /** NEA1 */
+ public static final int SECURITY_ALGORITHM_NEA1 = 56;
+ /** NEA2 */
+ public static final int SECURITY_ALGORITHM_NEA2 = 57;
+ /** NEA3 */
+ public static final int SECURITY_ALGORITHM_NEA3 = 58;
+ /* IMS and SIP layer security (See 3GPP TS 33.203) */
+ /** No IPsec config */
+ public static final int SECURITY_ALGORITHM_SIP_NO_IPSEC_CONFIG = 66;
+ /** No IMS security, recommended to use SIP_NO_IPSEC_CONFIG and SIP_NULL instead */
+ public static final int SECURITY_ALGORITHM_IMS_NULL = 67;
+ /* IPSEC is present */
+ /** SIP security is not enabled */
+ public static final int SECURITY_ALGORITHM_SIP_NULL = 68;
+ /** AES GCM mode */
+ public static final int SECURITY_ALGORITHM_AES_GCM = 69;
+ /** AES GMAC mode */
+ public static final int SECURITY_ALGORITHM_AES_GMAC = 70;
+ /** AES CBC mode */
+ public static final int SECURITY_ALGORITHM_AES_CBC = 71;
+ /** DES EDE3 CBC mode */
+ public static final int SECURITY_ALGORITHM_DES_EDE3_CBC = 72;
+ /** AES EDE3 CBC mode */
+ public static final int SECURITY_ALGORITHM_AES_EDE3_CBC = 73;
+ /** HMAC SHA1 96 */
+ public static final int SECURITY_ALGORITHM_HMAC_SHA1_96 = 74;
+ /** HMAC MD5 96 */
+ public static final int SECURITY_ALGORITHM_HMAC_MD5_96 = 75;
+ /* RTP and SRTP (see 3GPP TS 33.328) */
+ /** RTP only, SRTP is not being used */
+ public static final int SECURITY_ALGORITHM_RTP = 85;
+ /* When SRTP is available and used */
+ /** SRTP with null ciphering */
+ public static final int SECURITY_ALGORITHM_SRTP_NULL = 86;
+ /** SRTP with AES counter mode */
+ public static final int SECURITY_ALGORITHM_SRTP_AES_COUNTER = 87;
+ /** SRTP with AES F8 mode */
+ public static final int SECURITY_ALGORITHM_SRTP_AES_F8 = 88;
+ /** SRTP with HMAC SHA1 */
+ public static final int SECURITY_ALGORITHM_SRTP_HMAC_SHA1 = 89;
+ /* Ciphers for ePDG (3GPP TS 33.402) */
+ /** ePDG encryption - AES GCM mode */
+ public static final int SECURITY_ALGORITHM_ENCR_AES_GCM_16 = 99;
+ /** ePDG encryption - AES GCM CBC mode */
+ public static final int SECURITY_ALGORITHM_ENCR_AES_CBC = 100;
+ /** ePDG authentication - HMAC SHA1 256 128 */
+ public static final int SECURITY_ALGORITHM_AUTH_HMAC_SHA2_256_128 = 101;
+ /** Unknown */
+ public static final int SECURITY_ALGORITHM_UNKNOWN = 113;
+ /** Other */
+ public static final int SECURITY_ALGORITHM_OTHER = 114;
+ /** Proprietary algorithms */
+ public static final int SECURITY_ALGORITHM_ORYX = 124;
+
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = {"CONNECTION_EVENT_"}, value = {SECURITY_ALGORITHM_A50, SECURITY_ALGORITHM_A51,
+ SECURITY_ALGORITHM_A52, SECURITY_ALGORITHM_A53,
+ SECURITY_ALGORITHM_A54, SECURITY_ALGORITHM_GEA0, SECURITY_ALGORITHM_GEA1,
+ SECURITY_ALGORITHM_GEA2, SECURITY_ALGORITHM_GEA3, SECURITY_ALGORITHM_GEA4,
+ SECURITY_ALGORITHM_GEA5, SECURITY_ALGORITHM_UEA0, SECURITY_ALGORITHM_UEA1,
+ SECURITY_ALGORITHM_UEA2, SECURITY_ALGORITHM_EEA0, SECURITY_ALGORITHM_EEA1,
+ SECURITY_ALGORITHM_EEA2, SECURITY_ALGORITHM_EEA3, SECURITY_ALGORITHM_NEA0,
+ SECURITY_ALGORITHM_NEA1, SECURITY_ALGORITHM_NEA2, SECURITY_ALGORITHM_NEA3,
+ SECURITY_ALGORITHM_SIP_NO_IPSEC_CONFIG, SECURITY_ALGORITHM_IMS_NULL,
+ SECURITY_ALGORITHM_SIP_NULL, SECURITY_ALGORITHM_AES_GCM,
+ SECURITY_ALGORITHM_AES_GMAC, SECURITY_ALGORITHM_AES_CBC,
+ SECURITY_ALGORITHM_DES_EDE3_CBC, SECURITY_ALGORITHM_AES_EDE3_CBC,
+ SECURITY_ALGORITHM_HMAC_SHA1_96, SECURITY_ALGORITHM_HMAC_MD5_96,
+ SECURITY_ALGORITHM_RTP, SECURITY_ALGORITHM_SRTP_NULL,
+ SECURITY_ALGORITHM_SRTP_AES_COUNTER, SECURITY_ALGORITHM_SRTP_AES_F8,
+ SECURITY_ALGORITHM_SRTP_HMAC_SHA1, SECURITY_ALGORITHM_ENCR_AES_GCM_16,
+ SECURITY_ALGORITHM_ENCR_AES_CBC, SECURITY_ALGORITHM_AUTH_HMAC_SHA2_256_128,
+ SECURITY_ALGORITHM_UNKNOWN, SECURITY_ALGORITHM_OTHER, SECURITY_ALGORITHM_ORYX})
+ public @interface SecurityAlgorithm {
+ }
+
private @ConnectionEvent int mConnectionEvent;
private @SecurityAlgorithm int mEncryption;
private @SecurityAlgorithm int mIntegrity;
private boolean mIsUnprotectedEmergency;
+ /**
+ * Constructor for new SecurityAlgorithmUpdate instances.
+ *
+ * @hide
+ */
+ @TestApi
public SecurityAlgorithmUpdate(@ConnectionEvent int connectionEvent,
@SecurityAlgorithm int encryption, @SecurityAlgorithm int integrity,
boolean isUnprotectedEmergency) {
@@ -52,18 +232,30 @@
readFromParcel(in);
}
+ /**
+ * @return the connection event.
+ */
public @ConnectionEvent int getConnectionEvent() {
return mConnectionEvent;
}
+ /**
+ * @return the encryption algorithm.
+ */
public @SecurityAlgorithm int getEncryption() {
return mEncryption;
}
+ /**
+ * @return the integrity algorithm.
+ */
public @SecurityAlgorithm int getIntegrity() {
return mIntegrity;
}
+ /**
+ * @return if the security algorithm update is associated with an unprotected emergency call.
+ */
public boolean isUnprotectedEmergency() {
return mIsUnprotectedEmergency;
}
@@ -74,7 +266,7 @@
}
@Override
- public void writeToParcel(Parcel out, int flags) {
+ public void writeToParcel(@NonNull Parcel out, int flags) {
out.writeInt(mConnectionEvent);
out.writeInt(mEncryption);
out.writeInt(mIntegrity);
@@ -88,7 +280,7 @@
mIsUnprotectedEmergency = in.readBoolean();
}
- public static final Parcelable.Creator<SecurityAlgorithmUpdate> CREATOR =
+ public static final @NonNull Parcelable.Creator<SecurityAlgorithmUpdate> CREATOR =
new Parcelable.Creator<SecurityAlgorithmUpdate>() {
public SecurityAlgorithmUpdate createFromParcel(Parcel in) {
return new SecurityAlgorithmUpdate(in);
@@ -121,103 +313,4 @@
public int hashCode() {
return Objects.hash(mConnectionEvent, mEncryption, mIntegrity, mIsUnprotectedEmergency);
}
-
- public static final int CONNECTION_EVENT_CS_SIGNALLING_GSM = 0;
- public static final int CONNECTION_EVENT_PS_SIGNALLING_GPRS = 1;
- public static final int CONNECTION_EVENT_CS_SIGNALLING_3G = 2;
- public static final int CONNECTION_EVENT_PS_SIGNALLING_3G = 3;
- public static final int CONNECTION_EVENT_NAS_SIGNALLING_LTE = 4;
- public static final int CONNECTION_EVENT_AS_SIGNALLING_LTE = 5;
- public static final int CONNECTION_EVENT_VOLTE_SIP = 6;
- public static final int CONNECTION_EVENT_VOLTE_SIP_SOS = 7;
- public static final int CONNECTION_EVENT_VOLTE_RTP = 8;
- public static final int CONNECTION_EVENT_VOLTE_RTP_SOS = 9;
- public static final int CONNECTION_EVENT_NAS_SIGNALLING_5G = 10;
- public static final int CONNECTION_EVENT_AS_SIGNALLING_5G = 11;
- public static final int CONNECTION_EVENT_VONR_SIP = 12;
- public static final int CONNECTION_EVENT_VONR_SIP_SOS = 13;
- public static final int CONNECTION_EVENT_VONR_RTP = 14;
- public static final int CONNECTION_EVENT_VONR_RTP_SOS = 15;
-
- /** @hide */
- @Retention(RetentionPolicy.SOURCE)
- @IntDef(prefix = {"CONNECTION_EVENT_"}, value = {CONNECTION_EVENT_CS_SIGNALLING_GSM,
- CONNECTION_EVENT_PS_SIGNALLING_GPRS, CONNECTION_EVENT_CS_SIGNALLING_3G,
- CONNECTION_EVENT_PS_SIGNALLING_3G, CONNECTION_EVENT_NAS_SIGNALLING_LTE,
- CONNECTION_EVENT_AS_SIGNALLING_LTE, CONNECTION_EVENT_VOLTE_SIP,
- CONNECTION_EVENT_VOLTE_SIP_SOS, CONNECTION_EVENT_VOLTE_RTP,
- CONNECTION_EVENT_VOLTE_RTP_SOS, CONNECTION_EVENT_NAS_SIGNALLING_5G,
- CONNECTION_EVENT_AS_SIGNALLING_5G, CONNECTION_EVENT_VONR_SIP,
- CONNECTION_EVENT_VONR_SIP_SOS, CONNECTION_EVENT_VONR_RTP,
- CONNECTION_EVENT_VONR_RTP_SOS})
- public @interface ConnectionEvent {
- }
-
- public static final int SECURITY_ALGORITHM_A50 = 0;
- public static final int SECURITY_ALGORITHM_A51 = 1;
- public static final int SECURITY_ALGORITHM_A52 = 2;
- public static final int SECURITY_ALGORITHM_A53 = 3;
- public static final int SECURITY_ALGORITHM_A54 = 4;
- public static final int SECURITY_ALGORITHM_GEA0 = 14;
- public static final int SECURITY_ALGORITHM_GEA1 = 15;
- public static final int SECURITY_ALGORITHM_GEA2 = 16;
- public static final int SECURITY_ALGORITHM_GEA3 = 17;
- public static final int SECURITY_ALGORITHM_GEA4 = 18;
- public static final int SECURITY_ALGORITHM_GEA5 = 19;
- public static final int SECURITY_ALGORITHM_UEA0 = 29;
- public static final int SECURITY_ALGORITHM_UEA1 = 30;
- public static final int SECURITY_ALGORITHM_UEA2 = 31;
- public static final int SECURITY_ALGORITHM_EEA0 = 41;
- public static final int SECURITY_ALGORITHM_EEA1 = 42;
- public static final int SECURITY_ALGORITHM_EEA2 = 43;
- public static final int SECURITY_ALGORITHM_EEA3 = 44;
- public static final int SECURITY_ALGORITHM_NEA0 = 55;
- public static final int SECURITY_ALGORITHM_NEA1 = 56;
- public static final int SECURITY_ALGORITHM_NEA2 = 57;
- public static final int SECURITY_ALGORITHM_NEA3 = 58;
- public static final int SECURITY_ALGORITHM_SIP_NO_IPSEC_CONFIG = 66;
- public static final int SECURITY_ALGORITHM_IMS_NULL = 67;
- public static final int SECURITY_ALGORITHM_SIP_NULL = 68;
- public static final int SECURITY_ALGORITHM_AES_GCM = 69;
- public static final int SECURITY_ALGORITHM_AES_GMAC = 70;
- public static final int SECURITY_ALGORITHM_AES_CBC = 71;
- public static final int SECURITY_ALGORITHM_DES_EDE3_CBC = 72;
- public static final int SECURITY_ALGORITHM_AES_EDE3_CBC = 73;
- public static final int SECURITY_ALGORITHM_HMAC_SHA1_96 = 74;
- public static final int SECURITY_ALGORITHM_HMAC_MD5_96 = 75;
- public static final int SECURITY_ALGORITHM_RTP = 85;
- public static final int SECURITY_ALGORITHM_SRTP_NULL = 86;
- public static final int SECURITY_ALGORITHM_SRTP_AES_COUNTER = 87;
- public static final int SECURITY_ALGORITHM_SRTP_AES_F8 = 88;
- public static final int SECURITY_ALGORITHM_SRTP_HMAC_SHA1 = 89;
- public static final int SECURITY_ALGORITHM_ENCR_AES_GCM_16 = 99;
- public static final int SECURITY_ALGORITHM_ENCR_AES_CBC = 100;
- public static final int SECURITY_ALGORITHM_AUTH_HMAC_SHA2_256_128 = 101;
- public static final int SECURITY_ALGORITHM_UNKNOWN = 113;
- public static final int SECURITY_ALGORITHM_OTHER = 114;
- public static final int SECURITY_ALGORITHM_ORYX = 124;
-
- /** @hide */
- @Retention(RetentionPolicy.SOURCE)
- @IntDef(prefix = {"CONNECTION_EVENT_"}, value = {SECURITY_ALGORITHM_A50, SECURITY_ALGORITHM_A51,
- SECURITY_ALGORITHM_A52, SECURITY_ALGORITHM_A53,
- SECURITY_ALGORITHM_A54, SECURITY_ALGORITHM_GEA0, SECURITY_ALGORITHM_GEA1,
- SECURITY_ALGORITHM_GEA2, SECURITY_ALGORITHM_GEA3, SECURITY_ALGORITHM_GEA4,
- SECURITY_ALGORITHM_GEA5, SECURITY_ALGORITHM_UEA0, SECURITY_ALGORITHM_UEA1,
- SECURITY_ALGORITHM_UEA2, SECURITY_ALGORITHM_EEA0, SECURITY_ALGORITHM_EEA1,
- SECURITY_ALGORITHM_EEA2, SECURITY_ALGORITHM_EEA3, SECURITY_ALGORITHM_NEA0,
- SECURITY_ALGORITHM_NEA1, SECURITY_ALGORITHM_NEA2, SECURITY_ALGORITHM_NEA3,
- SECURITY_ALGORITHM_SIP_NO_IPSEC_CONFIG, SECURITY_ALGORITHM_IMS_NULL,
- SECURITY_ALGORITHM_SIP_NULL, SECURITY_ALGORITHM_AES_GCM,
- SECURITY_ALGORITHM_AES_GMAC, SECURITY_ALGORITHM_AES_CBC,
- SECURITY_ALGORITHM_DES_EDE3_CBC, SECURITY_ALGORITHM_AES_EDE3_CBC,
- SECURITY_ALGORITHM_HMAC_SHA1_96, SECURITY_ALGORITHM_HMAC_MD5_96,
- SECURITY_ALGORITHM_RTP, SECURITY_ALGORITHM_SRTP_NULL,
- SECURITY_ALGORITHM_SRTP_AES_COUNTER, SECURITY_ALGORITHM_SRTP_AES_F8,
- SECURITY_ALGORITHM_SRTP_HMAC_SHA1, SECURITY_ALGORITHM_ENCR_AES_GCM_16,
- SECURITY_ALGORITHM_ENCR_AES_CBC, SECURITY_ALGORITHM_AUTH_HMAC_SHA2_256_128,
- SECURITY_ALGORITHM_UNKNOWN, SECURITY_ALGORITHM_OTHER, SECURITY_ALGORITHM_ORYX})
- public @interface SecurityAlgorithm {
- }
-
}