Merge "Importance slider updates." into nyc-dev
diff --git a/api/current.txt b/api/current.txt
index f9e1d58..ebda35c 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -34402,7 +34402,7 @@
field public static final int DOWNLOAD_STATUS_RETRY_ON_CARRIER_NETWORK = 1; // 0x1
field public static final int RECEIVE_OPTIONS_DEFAULT = 0; // 0x0
field public static final int RECEIVE_OPTIONS_DROP = 1; // 0x1
- field public static final int RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_ENCRYPTED_STORAGE_UNAVAILABLE = 2; // 0x2
+ field public static final int RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_PROTECTED_STORAGE_UNAVAILABLE = 2; // 0x2
field public static final int SEND_FLAG_REQUEST_DELIVERY_STATUS = 1; // 0x1
field public static final int SEND_STATUS_ERROR = 2; // 0x2
field public static final int SEND_STATUS_OK = 0; // 0x0
@@ -37203,69 +37203,47 @@
public class TelephonyManager {
method public boolean canChangeDtmfToneLength();
+ method public android.telephony.TelephonyManager createForSubscriptionId(int);
method public java.util.List<android.telephony.CellInfo> getAllCellInfo();
method public int getCallState();
- method public int getCallState(int);
method public android.telephony.CellLocation getCellLocation();
method public int getDataActivity();
- method public int getDataNetworkType(int);
+ method public int getDataNetworkType();
method public int getDataState();
method public java.lang.String getDeviceId();
method public java.lang.String getDeviceId(int);
method public java.lang.String getDeviceSoftwareVersion();
method public java.lang.String getGroupIdLevel1();
- method public java.lang.String getGroupIdLevel1(int);
method public java.lang.String getIccAuthentication(int, int, java.lang.String);
- method public java.lang.String getIccAuthentication(int, int, int, java.lang.String);
- method public java.lang.String getLine1AlphaTag(int);
method public java.lang.String getLine1Number();
- method public java.lang.String getLine1Number(int);
method public java.lang.String getMmsUAProfUrl();
method public java.lang.String getMmsUserAgent();
method public deprecated java.util.List<android.telephony.NeighboringCellInfo> getNeighboringCellInfo();
method public java.lang.String getNetworkCountryIso();
- method public java.lang.String getNetworkCountryIso(int);
method public java.lang.String getNetworkOperator();
- method public java.lang.String getNetworkOperator(int);
method public java.lang.String getNetworkOperatorName();
- method public java.lang.String getNetworkOperatorName(int);
method public int getNetworkType();
- method public int getNetworkType(int);
method public int getPhoneCount();
method public int getPhoneType();
method public java.lang.String getSimCountryIso();
- method public java.lang.String getSimCountryIso(int);
method public java.lang.String getSimOperator();
- method public java.lang.String getSimOperator(int);
method public java.lang.String getSimOperatorName();
- method public java.lang.String getSimOperatorName(int);
method public java.lang.String getSimSerialNumber();
- method public java.lang.String getSimSerialNumber(int);
method public int getSimState();
method public java.lang.String getSubscriberId();
- method public java.lang.String getSubscriberId(int);
method public java.lang.String getVoiceMailAlphaTag();
- method public java.lang.String getVoiceMailAlphaTag(int);
method public java.lang.String getVoiceMailNumber();
- method public java.lang.String getVoiceMailNumber(int);
- method public int getVoiceNetworkType(int);
+ method public int getVoiceNetworkType();
method public android.net.Uri getVoicemailRingtoneUri(android.telecom.PhoneAccountHandle);
method public boolean hasCarrierPrivileges();
- method public boolean hasCarrierPrivileges(int);
method public boolean hasIccCard();
method public boolean iccCloseLogicalChannel(int);
- method public boolean iccCloseLogicalChannel(int, int);
method public byte[] iccExchangeSimIO(int, int, int, int, int, java.lang.String);
- method public byte[] iccExchangeSimIO(int, int, int, int, int, int, java.lang.String);
method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(java.lang.String);
- method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(int, java.lang.String);
method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, java.lang.String);
- method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, int, java.lang.String);
method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String);
- method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, int, java.lang.String);
method public boolean isHearingAidCompatibilitySupported();
method public boolean isNetworkRoaming();
- method public boolean isNetworkRoaming(int);
method public boolean isSmsCapable();
method public boolean isTtyModeSupported();
method public boolean isVoiceCapable();
@@ -37273,15 +37251,10 @@
method public boolean isWorldPhone();
method public void listen(android.telephony.PhoneStateListener, int);
method public java.lang.String sendEnvelopeWithStatus(java.lang.String);
- method public java.lang.String sendEnvelopeWithStatus(int, java.lang.String);
method public boolean setLine1NumberForDisplay(java.lang.String, java.lang.String);
- method public boolean setLine1NumberForDisplay(int, java.lang.String, java.lang.String);
method public boolean setOperatorBrandOverride(java.lang.String);
- method public boolean setOperatorBrandOverride(int, java.lang.String);
method public boolean setPreferredNetworkTypeToGlobal();
- method public boolean setPreferredNetworkTypeToGlobal(int);
method public boolean setVoiceMailNumber(java.lang.String, java.lang.String);
- method public boolean setVoiceMailNumber(int, java.lang.String, java.lang.String);
field public static final java.lang.String ACTION_CONFIGURE_VOICEMAIL = "android.telephony.action.CONFIGURE_VOICEMAIL";
field public static final java.lang.String ACTION_PHONE_STATE_CHANGED = "android.intent.action.PHONE_STATE";
field public static final java.lang.String ACTION_RESPOND_VIA_MESSAGE = "android.intent.action.RESPOND_VIA_MESSAGE";
@@ -42387,7 +42360,6 @@
method public boolean hasNestedScrollingParent();
method public boolean hasOnClickListeners();
method public boolean hasOverlappingRendering();
- method public boolean hasPointerCapture();
method public boolean hasTransientState();
method public boolean hasWindowFocus();
method public static android.view.View inflate(android.content.Context, int, android.view.ViewGroup);
@@ -42518,7 +42490,6 @@
method public void postOnAnimation(java.lang.Runnable);
method public void postOnAnimationDelayed(java.lang.Runnable, long);
method public void refreshDrawableState();
- method public void releasePointerCapture();
method public boolean removeCallbacks(java.lang.Runnable);
method public void removeOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener);
method public void removeOnLayoutChangeListener(android.view.View.OnLayoutChangeListener);
@@ -42529,7 +42500,6 @@
method public boolean requestFocus(int, android.graphics.Rect);
method public final boolean requestFocusFromTouch();
method public void requestLayout();
- method public void requestPointerCapture();
method public boolean requestRectangleOnScreen(android.graphics.Rect);
method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean);
method public final void requestUnbufferedDispatch(android.view.MotionEvent);
diff --git a/api/system-current.txt b/api/system-current.txt
index 24ed720..0b6ac73 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -37108,7 +37108,7 @@
field public static final int DOWNLOAD_STATUS_RETRY_ON_CARRIER_NETWORK = 1; // 0x1
field public static final int RECEIVE_OPTIONS_DEFAULT = 0; // 0x0
field public static final int RECEIVE_OPTIONS_DROP = 1; // 0x1
- field public static final int RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_ENCRYPTED_STORAGE_UNAVAILABLE = 2; // 0x2
+ field public static final int RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_PROTECTED_STORAGE_UNAVAILABLE = 2; // 0x2
field public static final int SEND_FLAG_REQUEST_DELIVERY_STATUS = 1; // 0x1
field public static final int SEND_STATUS_ERROR = 2; // 0x2
field public static final int SEND_STATUS_OK = 0; // 0x0
@@ -40140,6 +40140,7 @@
method public boolean canChangeDtmfToneLength();
method public int checkCarrierPrivilegesForPackage(java.lang.String);
method public int checkCarrierPrivilegesForPackageAnyPhone(java.lang.String);
+ method public android.telephony.TelephonyManager createForSubscriptionId(int);
method public void dial(java.lang.String);
method public boolean disableDataConnectivity();
method public boolean enableDataConnectivity();
@@ -40147,7 +40148,6 @@
method public boolean endCall();
method public java.util.List<android.telephony.CellInfo> getAllCellInfo();
method public int getCallState();
- method public int getCallState(int);
method public java.util.List<java.lang.String> getCarrierPackageNamesForIntent(android.content.Intent);
method public java.util.List<java.lang.String> getCarrierPackageNamesForIntentAndPhone(android.content.Intent, int);
method public java.lang.String getCdmaMdn();
@@ -40160,68 +40160,46 @@
method public int getDataActivity();
method public boolean getDataEnabled();
method public boolean getDataEnabled(int);
- method public int getDataNetworkType(int);
+ method public int getDataNetworkType();
method public int getDataState();
method public java.lang.String getDeviceId();
method public java.lang.String getDeviceId(int);
method public java.lang.String getDeviceSoftwareVersion();
method public java.lang.String getGroupIdLevel1();
- method public java.lang.String getGroupIdLevel1(int);
method public java.lang.String getIccAuthentication(int, int, java.lang.String);
- method public java.lang.String getIccAuthentication(int, int, int, java.lang.String);
- method public java.lang.String getLine1AlphaTag(int);
method public java.lang.String getLine1Number();
- method public java.lang.String getLine1Number(int);
method public java.lang.String getMmsUAProfUrl();
method public java.lang.String getMmsUserAgent();
method public deprecated java.util.List<android.telephony.NeighboringCellInfo> getNeighboringCellInfo();
method public java.lang.String getNetworkCountryIso();
- method public java.lang.String getNetworkCountryIso(int);
method public java.lang.String getNetworkOperator();
- method public java.lang.String getNetworkOperator(int);
method public java.lang.String getNetworkOperatorName();
- method public java.lang.String getNetworkOperatorName(int);
method public int getNetworkType();
- method public int getNetworkType(int);
method public int getPhoneCount();
method public int getPhoneType();
method public java.lang.String getSimCountryIso();
- method public java.lang.String getSimCountryIso(int);
method public java.lang.String getSimOperator();
- method public java.lang.String getSimOperator(int);
method public java.lang.String getSimOperatorName();
- method public java.lang.String getSimOperatorName(int);
method public java.lang.String getSimSerialNumber();
- method public java.lang.String getSimSerialNumber(int);
method public int getSimState();
method public java.lang.String getSubscriberId();
- method public java.lang.String getSubscriberId(int);
method public java.lang.String getVoiceMailAlphaTag();
- method public java.lang.String getVoiceMailAlphaTag(int);
method public java.lang.String getVoiceMailNumber();
- method public java.lang.String getVoiceMailNumber(int);
- method public int getVoiceNetworkType(int);
+ method public int getVoiceNetworkType();
method public android.net.Uri getVoicemailRingtoneUri(android.telecom.PhoneAccountHandle);
method public boolean handlePinMmi(java.lang.String);
method public boolean handlePinMmiForSubscriber(int, java.lang.String);
method public boolean hasCarrierPrivileges();
- method public boolean hasCarrierPrivileges(int);
method public boolean hasIccCard();
method public boolean iccCloseLogicalChannel(int);
- method public boolean iccCloseLogicalChannel(int, int);
method public byte[] iccExchangeSimIO(int, int, int, int, int, java.lang.String);
- method public byte[] iccExchangeSimIO(int, int, int, int, int, int, java.lang.String);
method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(java.lang.String);
- method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(int, java.lang.String);
method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, java.lang.String);
- method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, int, java.lang.String);
method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String);
- method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, int, java.lang.String);
method public boolean isDataConnectivityPossible();
method public boolean isHearingAidCompatibilitySupported();
method public boolean isIdle();
method public boolean isNetworkRoaming();
- method public boolean isNetworkRoaming(int);
method public boolean isOffhook();
method public boolean isRadioOn();
method public boolean isRinging();
@@ -40234,19 +40212,14 @@
method public void listen(android.telephony.PhoneStateListener, int);
method public boolean needsOtaServiceProvisioning();
method public java.lang.String sendEnvelopeWithStatus(java.lang.String);
- method public java.lang.String sendEnvelopeWithStatus(int, java.lang.String);
method public void setDataEnabled(boolean);
method public void setDataEnabled(int, boolean);
method public boolean setLine1NumberForDisplay(java.lang.String, java.lang.String);
- method public boolean setLine1NumberForDisplay(int, java.lang.String, java.lang.String);
method public boolean setOperatorBrandOverride(java.lang.String);
- method public boolean setOperatorBrandOverride(int, java.lang.String);
method public boolean setPreferredNetworkTypeToGlobal();
- method public boolean setPreferredNetworkTypeToGlobal(int);
method public boolean setRadio(boolean);
method public boolean setRadioPower(boolean);
method public boolean setVoiceMailNumber(java.lang.String, java.lang.String);
- method public boolean setVoiceMailNumber(int, java.lang.String, java.lang.String);
method public void silenceRinger();
method public boolean supplyPin(java.lang.String);
method public int[] supplyPinReportResult(java.lang.String);
@@ -45385,7 +45358,6 @@
method public boolean hasNestedScrollingParent();
method public boolean hasOnClickListeners();
method public boolean hasOverlappingRendering();
- method public boolean hasPointerCapture();
method public boolean hasTransientState();
method public boolean hasWindowFocus();
method public static android.view.View inflate(android.content.Context, int, android.view.ViewGroup);
@@ -45516,7 +45488,6 @@
method public void postOnAnimation(java.lang.Runnable);
method public void postOnAnimationDelayed(java.lang.Runnable, long);
method public void refreshDrawableState();
- method public void releasePointerCapture();
method public boolean removeCallbacks(java.lang.Runnable);
method public void removeOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener);
method public void removeOnLayoutChangeListener(android.view.View.OnLayoutChangeListener);
@@ -45527,7 +45498,6 @@
method public boolean requestFocus(int, android.graphics.Rect);
method public final boolean requestFocusFromTouch();
method public void requestLayout();
- method public void requestPointerCapture();
method public boolean requestRectangleOnScreen(android.graphics.Rect);
method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean);
method public final void requestUnbufferedDispatch(android.view.MotionEvent);
diff --git a/api/test-current.txt b/api/test-current.txt
index b6ebf8a..d277fd7 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -34479,7 +34479,7 @@
field public static final int DOWNLOAD_STATUS_RETRY_ON_CARRIER_NETWORK = 1; // 0x1
field public static final int RECEIVE_OPTIONS_DEFAULT = 0; // 0x0
field public static final int RECEIVE_OPTIONS_DROP = 1; // 0x1
- field public static final int RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_ENCRYPTED_STORAGE_UNAVAILABLE = 2; // 0x2
+ field public static final int RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_PROTECTED_STORAGE_UNAVAILABLE = 2; // 0x2
field public static final int SEND_FLAG_REQUEST_DELIVERY_STATUS = 1; // 0x1
field public static final int SEND_STATUS_ERROR = 2; // 0x2
field public static final int SEND_STATUS_OK = 0; // 0x0
@@ -37280,69 +37280,47 @@
public class TelephonyManager {
method public boolean canChangeDtmfToneLength();
+ method public android.telephony.TelephonyManager createForSubscriptionId(int);
method public java.util.List<android.telephony.CellInfo> getAllCellInfo();
method public int getCallState();
- method public int getCallState(int);
method public android.telephony.CellLocation getCellLocation();
method public int getDataActivity();
- method public int getDataNetworkType(int);
+ method public int getDataNetworkType();
method public int getDataState();
method public java.lang.String getDeviceId();
method public java.lang.String getDeviceId(int);
method public java.lang.String getDeviceSoftwareVersion();
method public java.lang.String getGroupIdLevel1();
- method public java.lang.String getGroupIdLevel1(int);
method public java.lang.String getIccAuthentication(int, int, java.lang.String);
- method public java.lang.String getIccAuthentication(int, int, int, java.lang.String);
- method public java.lang.String getLine1AlphaTag(int);
method public java.lang.String getLine1Number();
- method public java.lang.String getLine1Number(int);
method public java.lang.String getMmsUAProfUrl();
method public java.lang.String getMmsUserAgent();
method public deprecated java.util.List<android.telephony.NeighboringCellInfo> getNeighboringCellInfo();
method public java.lang.String getNetworkCountryIso();
- method public java.lang.String getNetworkCountryIso(int);
method public java.lang.String getNetworkOperator();
- method public java.lang.String getNetworkOperator(int);
method public java.lang.String getNetworkOperatorName();
- method public java.lang.String getNetworkOperatorName(int);
method public int getNetworkType();
- method public int getNetworkType(int);
method public int getPhoneCount();
method public int getPhoneType();
method public java.lang.String getSimCountryIso();
- method public java.lang.String getSimCountryIso(int);
method public java.lang.String getSimOperator();
- method public java.lang.String getSimOperator(int);
method public java.lang.String getSimOperatorName();
- method public java.lang.String getSimOperatorName(int);
method public java.lang.String getSimSerialNumber();
- method public java.lang.String getSimSerialNumber(int);
method public int getSimState();
method public java.lang.String getSubscriberId();
- method public java.lang.String getSubscriberId(int);
method public java.lang.String getVoiceMailAlphaTag();
- method public java.lang.String getVoiceMailAlphaTag(int);
method public java.lang.String getVoiceMailNumber();
- method public java.lang.String getVoiceMailNumber(int);
- method public int getVoiceNetworkType(int);
+ method public int getVoiceNetworkType();
method public android.net.Uri getVoicemailRingtoneUri(android.telecom.PhoneAccountHandle);
method public boolean hasCarrierPrivileges();
- method public boolean hasCarrierPrivileges(int);
method public boolean hasIccCard();
method public boolean iccCloseLogicalChannel(int);
- method public boolean iccCloseLogicalChannel(int, int);
method public byte[] iccExchangeSimIO(int, int, int, int, int, java.lang.String);
- method public byte[] iccExchangeSimIO(int, int, int, int, int, int, java.lang.String);
method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(java.lang.String);
- method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(int, java.lang.String);
method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, java.lang.String);
- method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, int, java.lang.String);
method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String);
- method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, int, java.lang.String);
method public boolean isHearingAidCompatibilitySupported();
method public boolean isNetworkRoaming();
- method public boolean isNetworkRoaming(int);
method public boolean isSmsCapable();
method public boolean isTtyModeSupported();
method public boolean isVoiceCapable();
@@ -37350,15 +37328,10 @@
method public boolean isWorldPhone();
method public void listen(android.telephony.PhoneStateListener, int);
method public java.lang.String sendEnvelopeWithStatus(java.lang.String);
- method public java.lang.String sendEnvelopeWithStatus(int, java.lang.String);
method public boolean setLine1NumberForDisplay(java.lang.String, java.lang.String);
- method public boolean setLine1NumberForDisplay(int, java.lang.String, java.lang.String);
method public boolean setOperatorBrandOverride(java.lang.String);
- method public boolean setOperatorBrandOverride(int, java.lang.String);
method public boolean setPreferredNetworkTypeToGlobal();
- method public boolean setPreferredNetworkTypeToGlobal(int);
method public boolean setVoiceMailNumber(java.lang.String, java.lang.String);
- method public boolean setVoiceMailNumber(int, java.lang.String, java.lang.String);
field public static final java.lang.String ACTION_CONFIGURE_VOICEMAIL = "android.telephony.action.CONFIGURE_VOICEMAIL";
field public static final java.lang.String ACTION_PHONE_STATE_CHANGED = "android.intent.action.PHONE_STATE";
field public static final java.lang.String ACTION_RESPOND_VIA_MESSAGE = "android.intent.action.RESPOND_VIA_MESSAGE";
@@ -42466,7 +42439,6 @@
method public boolean hasNestedScrollingParent();
method public boolean hasOnClickListeners();
method public boolean hasOverlappingRendering();
- method public boolean hasPointerCapture();
method public boolean hasTransientState();
method public boolean hasWindowFocus();
method public static android.view.View inflate(android.content.Context, int, android.view.ViewGroup);
@@ -42597,7 +42569,6 @@
method public void postOnAnimation(java.lang.Runnable);
method public void postOnAnimationDelayed(java.lang.Runnable, long);
method public void refreshDrawableState();
- method public void releasePointerCapture();
method public boolean removeCallbacks(java.lang.Runnable);
method public void removeOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener);
method public void removeOnLayoutChangeListener(android.view.View.OnLayoutChangeListener);
@@ -42608,7 +42579,6 @@
method public boolean requestFocus(int, android.graphics.Rect);
method public final boolean requestFocusFromTouch();
method public void requestLayout();
- method public void requestPointerCapture();
method public boolean requestRectangleOnScreen(android.graphics.Rect);
method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean);
method public final void requestUnbufferedDispatch(android.view.MotionEvent);
diff --git a/core/java/android/hardware/input/IInputManager.aidl b/core/java/android/hardware/input/IInputManager.aidl
index 49c106e..a9c09c4 100644
--- a/core/java/android/hardware/input/IInputManager.aidl
+++ b/core/java/android/hardware/input/IInputManager.aidl
@@ -81,6 +81,4 @@
void setPointerIconType(int typeId);
void setCustomPointerIcon(in PointerIcon icon);
-
- void setPointerIconDetached(boolean detached);
}
diff --git a/core/java/android/hardware/input/InputManager.java b/core/java/android/hardware/input/InputManager.java
index a5aeae3..803337b 100644
--- a/core/java/android/hardware/input/InputManager.java
+++ b/core/java/android/hardware/input/InputManager.java
@@ -893,24 +893,6 @@
}
}
- /**
- * Update the pointer icon status. When detached, the pointer icon disappears, and further
- * mouse location will be stuck at the current point. Mouse movement events will still arrive,
- * and movement should be handled through {@link MotionEvent.AXIS_RELATIVE_X} and
- * {@link MotionEvent.AXIS_RELATIVE_Y}.
- *
- * @param detached true if the icon will be detached from the actual mouse movement.
- *
- * @hide
- */
- public void setPointerIconDetached(boolean detached) {
- try {
- mIm.setPointerIconDetached(detached);
- } catch (RemoteException ex) {
- throw ex.rethrowFromSystemServer();
- }
- }
-
private void populateInputDevicesLocked() {
if (mInputDevicesChangedListener == null) {
final InputDevicesChangedListener listener = new InputDevicesChangedListener();
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
index fbf7b26..485bbd1 100644
--- a/core/java/android/os/storage/StorageManager.java
+++ b/core/java/android/os/storage/StorageManager.java
@@ -114,6 +114,8 @@
/** {@hide} */
public static final int FLAG_INCLUDE_INVISIBLE = 1 << 10;
+ private static volatile IMountService sMountService = null;
+
private final Context mContext;
private final ContentResolver mResolver;
@@ -1064,15 +1066,17 @@
/** {@hide} */
public static boolean isUserKeyUnlocked(int userId) {
- final IMountService mount = IMountService.Stub
- .asInterface(ServiceManager.getService("mount"));
- if (mount == null) {
+ if (sMountService == null) {
+ sMountService = IMountService.Stub
+ .asInterface(ServiceManager.getService("mount"));
+ }
+ if (sMountService == null) {
Slog.w(TAG, "Early during boot, assuming locked");
return false;
}
final long token = Binder.clearCallingIdentity();
try {
- return mount.isUserKeyUnlocked(userId);
+ return sMountService.isUserKeyUnlocked(userId);
} catch (RemoteException e) {
throw e.rethrowAsRuntimeException();
} finally {
diff --git a/core/java/android/service/carrier/CarrierMessagingService.java b/core/java/android/service/carrier/CarrierMessagingService.java
index 140341c..88a78c3 100644
--- a/core/java/android/service/carrier/CarrierMessagingService.java
+++ b/core/java/android/service/carrier/CarrierMessagingService.java
@@ -56,7 +56,7 @@
* new message notification should be shown.
*
* @see #RECEIVE_OPTIONS_DROP
- * @see #RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_ENCRYPTED_STORAGE_UNAVAILABLE
+ * @see #RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_PROTECTED_STORAGE_UNAVAILABLE
*/
public static final int RECEIVE_OPTIONS_DEFAULT = 0;
@@ -72,7 +72,7 @@
* credential-encrypted storage of the device is not available before the user unlocks the
* phone. It is only applicable to devices that support file-based encryption.
*/
- public static final int RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_ENCRYPTED_STORAGE_UNAVAILABLE = 0x2;
+ public static final int RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_PROTECTED_STORAGE_UNAVAILABLE = 0x2;
/**
* Indicates that an SMS or MMS message was successfully sent.
@@ -148,7 +148,7 @@
* @param subId SMS subscription ID of the SIM
* @param callback result callback. Call with a bitmask integer to indicate how the incoming
* text SMS should be handled by the platform. Use {@link #RECEIVE_OPTIONS_DROP} and
- * {@link #RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_ENCRYPTED_STORAGE_UNAVAILABLE}
+ * {@link #RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_PROTECTED_STORAGE_UNAVAILABLE}
* to set the flags in the bitmask.
*/
public void onReceiveTextSms(@NonNull MessagePdu pdu, @NonNull String format,
@@ -157,7 +157,7 @@
@Override
public void onReceiveResult(Boolean result) throws RemoteException {
callback.onReceiveResult(result ? RECEIVE_OPTIONS_DEFAULT : RECEIVE_OPTIONS_DROP
- | RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_ENCRYPTED_STORAGE_UNAVAILABLE);
+ | RECEIVE_OPTIONS_SKIP_NOTIFY_WHEN_CREDENTIAL_PROTECTED_STORAGE_UNAVAILABLE);
}
});
}
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index f1f4964..414882a 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -15262,7 +15262,6 @@
destroyDrawingCache();
cleanupDraw();
- releasePointerCapture();
mCurrentAnimation = null;
}
@@ -21836,57 +21835,6 @@
return mPointerIcon;
}
-
- /**
- * Request capturing further mouse events.
- *
- * When the view captures, the pointer icon will disappear and will not change its
- * position. Further pointer events will come to the capturing view, and the pointer movements
- * will can be detected through {@link MotionEvent#AXIS_RELATIVE_X} and
- * {@link MotionEvent#AXIS_RELATIVE_Y}. Non-mouse events (touchscreens, or stylus) will not
- * be affected.
- *
- * The capture will be released through {@link #releasePointerCapture()}, or will be lost
- * automatically when the view or containing window disappear.
- *
- * @return true when succeeds.
- * @see #releasePointerCapture()
- * @see #hasPointerCapture()
- */
- public void requestPointerCapture() {
- final ViewRootImpl viewRootImpl = getViewRootImpl();
- if (viewRootImpl != null) {
- viewRootImpl.requestPointerCapture(this);
- }
- }
-
-
- /**
- * Release the current capture of mouse events.
- *
- * If the view does not have the capture, it will do nothing.
- * @see #requestPointerCapture()
- * @see #hasPointerCapture()
- */
- public void releasePointerCapture() {
- final ViewRootImpl viewRootImpl = getViewRootImpl();
- if (viewRootImpl != null) {
- viewRootImpl.releasePointerCapture(this);
- }
- }
-
- /**
- * Checks the capture status of mouse events.
- *
- * @return true if the view has the capture.
- * @see #requestPointerCapture()
- * @see #hasPointerCapture()
- */
- public boolean hasPointerCapture() {
- final ViewRootImpl viewRootImpl = getViewRootImpl();
- return (viewRootImpl != null) && viewRootImpl.hasPointerCapture(this);
- }
-
//
// Properties
//
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 1c6600d..d812cb4 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -3168,32 +3168,6 @@
}
}
- void requestPointerCapture(View view) {
- if (!mAttachInfo.mHasWindowFocus) {
- Log.w(mTag, "Can't set capture if it's not focused.");
- return;
- }
- if (mCapturingView == view) {
- return;
- }
- mCapturingView = view;
- InputManager.getInstance().setPointerIconDetached(true);
- return;
- }
-
- void releasePointerCapture(View view) {
- if (mCapturingView != view || mCapturingView == null) {
- return;
- }
-
- mCapturingView = null;
- InputManager.getInstance().setPointerIconDetached(false);
- }
-
- boolean hasPointerCapture(View view) {
- return view != null && mCapturingView == view;
- }
-
@Override
public void requestChildFocus(View child, View focused) {
if (DEBUG_INPUT_RESIZE) {
@@ -3271,10 +3245,6 @@
mView = null;
mAttachInfo.mRootView = null;
- if (mCapturingView != null) {
- releasePointerCapture(mCapturingView);
- }
-
mSurface.release();
if (mInputQueueCallback != null && mInputQueue != null) {
@@ -3615,8 +3585,6 @@
.softInputMode &=
~WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION;
mHasHadWindowFocus = true;
- } else if (mCapturingView != null) {
- releasePointerCapture(mCapturingView);
}
}
} break;
diff --git a/libs/input/PointerController.cpp b/libs/input/PointerController.cpp
index 61f78cc..27193b7 100644
--- a/libs/input/PointerController.cpp
+++ b/libs/input/PointerController.cpp
@@ -90,7 +90,6 @@
mLocked.lastFrameUpdatedTime = 0;
mLocked.buttonState = 0;
- mLocked.iconDetached = false;
mPolicy->loadPointerIcon(&mLocked.pointerIcon);
@@ -185,10 +184,6 @@
}
void PointerController::setPositionLocked(float x, float y) {
- if (mLocked.iconDetached) {
- return;
- }
-
float minX, minY, maxX, maxY;
if (getBoundsLocked(&minX, &minY, &maxX, &maxY)) {
if (x <= minX) {
@@ -222,10 +217,6 @@
// Remove the inactivity timeout, since we are fading now.
removeInactivityTimeoutLocked();
- if (mLocked.iconDetached) {
- return;
- }
-
// Start fading.
if (transition == TRANSITION_IMMEDIATE) {
mLocked.pointerFadeDirection = 0;
@@ -243,10 +234,6 @@
// Always reset the inactivity timer.
resetInactivityTimeoutLocked();
- if (mLocked.iconDetached) {
- return;
- }
-
// Start unfading.
if (transition == TRANSITION_IMMEDIATE) {
mLocked.pointerFadeDirection = 0;
@@ -362,22 +349,6 @@
updatePointerLocked();
}
-void PointerController::detachPointerIcon(bool detached) {
- AutoMutex _l(mLock);
-
- if (mLocked.iconDetached == detached) {
- return;
- }
-
- mLocked.iconDetached = detached;
- if (detached) {
- mLocked.pointerFadeDirection = -1;
- } else {
- mLocked.pointerFadeDirection = 1;
- }
- startAnimationLocked();
-}
-
void PointerController::setDisplayViewport(int32_t width, int32_t height, int32_t orientation) {
AutoMutex _l(mLock);
diff --git a/libs/input/PointerController.h b/libs/input/PointerController.h
index b47139a..99292d7 100644
--- a/libs/input/PointerController.h
+++ b/libs/input/PointerController.h
@@ -111,10 +111,6 @@
void setInactivityTimeout(InactivityTimeout inactivityTimeout);
void reloadPointerResources();
- /* Detach or attach the pointer icon status. When detached, the pointer icon disappears
- * and the icon location does not change at all. */
- void detachPointerIcon(bool detached);
-
private:
static const size_t MAX_RECYCLED_SPRITES = 12;
static const size_t MAX_SPOTS = 12;
@@ -184,8 +180,6 @@
int32_t buttonState;
- bool iconDetached;
-
Vector<Spot*> spots;
Vector<sp<Sprite> > recycledSprites;
} mLocked;
diff --git a/packages/SystemUI/res/drawable/ic_hotspot_unavailable.xml b/packages/SystemUI/res/drawable/ic_hotspot_unavailable.xml
new file mode 100644
index 0000000..736cfd8
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_hotspot_unavailable.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:name="root"
+ android:height="48dp"
+ android:width="48dp"
+ android:viewportHeight="48"
+ android:viewportWidth="48"
+ android:tint="@color/qs_tile_tint_unavailable" >
+ <group
+ android:name="ic_hotspot"
+ android:translateX="23.97354"
+ android:translateY="24.26306" >
+ <group
+ android:name="ic_hotspot_pivot"
+ android:translateX="-23.21545"
+ android:translateY="-18.86649" >
+ <clip-path
+ android:name="mask"
+ android:pathData="M 38.8337860107,-40.3974914551 c 0.0,0.0 -38.4077911377,30.8523712158 -38.4077911377,30.8523712158 c 0.0,0.0 43.1884765625,43.515335083 43.1884765625,43.515335083 c 0.0,0.0 -2.4169921875,2.57838439941 -2.4169921875,2.57838439941 c 0.0,0.0 -42.9885101318,-43.0112609863 -42.9885101318,-43.0112609863 c 0.0,0.0 -32.6199798584,25.1699066162 -32.6199798584,25.1699066162 c 0.0,0.0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0.0,0.0 27.6589050293,-22.6579437256 27.6589050293,-22.6579437256 c 0.0,0.0 -30.8645172119,-34.00390625 -30.8645172119,-34.00390625 c 0.0,0.0 2.70756530762,-1.99278259277 2.70756530762,-1.99278259277 c 0.0,0.0 1.53030395508,-0.876571655273 1.53030395508,-0.876571655274 c 0.0,0.0 2.85780334473,-3.12069702148 2.85780334473,-3.12069702148 c 0.0,0.0 13.0984039307,13.025604248 13.0984039307,13.025604248 c 0.0,0.0 -3.13299560547,2.82977294922 -3.13299560547,2.82977294922 c 0.0,0.0 16.571762085,22.0471801758 16.571762085,22.0471801758 c 0.0,0.0 42.8175811768,-34.3554534912 42.8175811768,-34.3554534912 c 0.0,0.0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z" />
+ <group
+ android:name="cross" >
+ <path
+ android:name="cross_1"
+ android:pathData="M 4.44044494629,2.24310302734 c 0.0,0.0 35.4000396729,35.3999633789 35.4000396729,35.3999633789 "
+ android:strokeColor="#FFFFFFFF"
+ android:strokeAlpha="1"
+ android:strokeWidth="3.5"
+ android:fillColor="#00000000" />
+ </group>
+ <group
+ android:name="hotspot"
+ android:translateX="23.481"
+ android:translateY="18.71151" >
+ <group
+ android:name="circles"
+ android:translateX="-0.23909"
+ android:translateY="-0.10807" >
+ <path
+ android:name="circle_3"
+ android:pathData="M 0.0843505859375,-2.93901062012 c -2.30102539062,0.0 -4.16702270508,1.86602783203 -4.16702270508,4.16702270508 c 0.0,2.29898071289 1.86599731445,4.16598510742 4.16702270508,4.16598510742 c 2.29998779297,0.0 4.16598510742,-1.86700439453 4.16598510742,-4.16598510742 c 0.0,-2.30099487305 -1.86599731445,-4.16702270508 -4.16598510742,-4.16702270508 Z M 11.1185302734,5.83390808105 c 0.0,0.0 0.0009765625,0.00100708007812 0.0009765625,0.00100708007812 c 0.14501953125,-0.356994628906 0.27099609375,-0.725006103516 0.382995605469,-1.09799194336 c 0.0570068359375,-0.195007324219 0.101013183594,-0.394989013672 0.149017333984,-0.595001220703 c 0.0690002441406,-0.281005859375 0.126983642578,-0.563995361328 0.175994873047,-0.851989746094 c 0.0270080566406,-0.169006347656 0.0559997558594,-0.337005615234 0.0759887695313,-0.509002685547 c 0.0580139160156,-0.468017578125 0.0970153808594,-0.942993164062 0.0970153808593,-1.4280090332 c 0.0,0.0 0.0,-0.00100708007812 0.0,-0.00100708007812 c 0.0,-5.03900146484 -3.11099243164,-9.3450012207 -7.5119934082,-11.1229858398 c -0.00601196289062,-0.00299072265625 -0.0130004882812,-0.0050048828125 -0.0190124511719,-0.00701904296875 c -0.686004638672,-0.275970458984 -1.39999389648,-0.492980957031 -2.14099121094,-0.638977050781 c -0.072998046875,-0.0150146484375 -0.149017333984,-0.02099609375 -0.222991943359,-0.0339965820313 c -0.302001953125,-0.0540161132812 -0.605010986328,-0.106018066406 -0.916015625,-0.136016845703 c -0.389984130859,-0.0390014648438 -0.786987304688,-0.0599975585938 -1.18899536133,-0.0599975585937 c -0.402008056641,0.0 -0.799011230469,0.02099609375 -1.19000244141,0.0599975585937 c -0.304992675781,0.0299987792969 -0.602996826172,0.0809936523438 -0.901000976563,0.132995605469 c -0.0790100097656,0.0150146484375 -0.160003662109,0.02099609375 -0.238006591797,0.0370178222656 c -0.368988037109,0.0719909667969 -0.730987548828,0.164001464844 -1.08700561523,0.269989013672 c -0.00299072265625,0.00100708007812 -0.0059814453125,0.00201416015625 -0.00900268554687,0.0020141601562 c -0.351989746094,0.10498046875 -0.694000244141,0.226989746094 -1.0309753418,0.361999511719 c -0.0110168457031,0.00399780273438 -0.0220031738281,0.00698852539062 -0.0320129394531,0.0119934082031 c -4.40200805664,1.77798461914 -7.51098632812,6.083984375 -7.5119934082,11.1229858398 c 0.0,0.00799560546875 0.00198364257812,0.0160217285156 0.0019836425781,0.0240173339844 c 0.00100708007812,0.475006103516 0.0380249023438,0.940002441406 0.0950012207032,1.39898681641 c 0.02001953125,0.175994873047 0.0490112304688,0.348999023438 0.0780029296875,0.523010253906 c 0.0469970703125,0.281982421875 0.105010986328,0.557983398438 0.171997070312,0.833984375 c 0.0480041503906,0.204010009766 0.093017578125,0.410003662109 0.152008056641,0.610015869141 c 0.110992431641,0.372009277344 0.238006591797,0.736999511719 0.382019042969,1.09298706055 c 0.0,0.0 0.0009765625,0.0 0.0009765625,0.0 c 1.00701904297,2.48400878906 2.81301879883,4.56100463867 5.11001586914,5.89501953125 c 0.0,0.0 2.01599121094,-3.48300170898 2.01599121094,-3.48300170898 c -2.03900146484,-1.18402099609 -3.5119934082,-3.22500610352 -3.89898681641,-5.63900756836 c 0.0,0.0 0.0009765625,-0.00100708007812 0.0009765625,-0.00100708007812 c -0.0220031738281,-0.130981445312 -0.0369873046875,-0.265991210938 -0.052978515625,-0.399993896484 c -0.0290222167969,-0.274993896484 -0.0570068359375,-0.552001953125 -0.0570068359375,-0.834991455078 c 0.0,0.0 0.0,-0.0190124511719 0.0,-0.0190124511719 c 0.0,-3.98999023438 2.92498779297,-7.28900146484 6.74398803711,-7.89199829102 c 0.0,0.0 0.0180053710938,0.0169982910156 0.0180053710938,0.0169982910156 c 0.404998779297,-0.0639953613281 0.81298828125,-0.125 1.23599243164,-0.125 c 0.0,0.0 0.00201416015625,0.0 0.00201416015624,0.0 c 0.0,0.0 0.00299072265625,0.0 0.00299072265626,0.0 c 0.423004150391,0.0 0.830017089844,0.0610046386719 1.23501586914,0.125 c 0.0,0.0 0.0169982910156,-0.0180053710938 0.0169982910156,-0.0180053710938 c 3.81997680664,0.60400390625 6.74499511719,3.90301513672 6.74499511719,7.89199829102 c 0.0,0.292999267578 -0.0280151367188,0.578002929688 -0.0589904785156,0.861999511719 c -0.0150146484375,0.132019042969 -0.0290222167969,0.264007568359 -0.051025390625,0.393005371094 c -0.385986328125,2.41500854492 -1.85897827148,4.45599365234 -3.89797973633,5.64001464844 c 0.0,0.0 2.01599121094,3.48300170898 2.01599121094,3.48300170898 c 2.29699707031,-1.33401489258 4.10299682617,-3.41101074219 5.11001586914,-5.89602661133 Z M 19.9300231934,2.95698547363 c 0.0059814453125,-0.0659790039062 0.0159912109375,-0.130981445312 0.02099609375,-0.196990966797 c 0.031982421875,-0.462005615234 0.0479736328125,-0.928009033203 0.0489807128906,-1.39700317383 c 0,0.0 0,-0.00997924804688 0,-0.00997924804687 c 0,0.0 0,-0.00100708007812 0,-0.00100708007813 c 0,-7.22500610352 -3.84399414062,-13.5360107422 -9.58599853516,-17.0500183105 c -1.06500244141,-0.652984619141 -2.19299316406,-1.20599365234 -3.37799072266,-1.65197753906 c -0.157989501953,-0.0599975585938 -0.317016601562,-0.118011474609 -0.476989746094,-0.174011230469 c -0.317016601562,-0.110992431641 -0.634002685547,-0.218994140625 -0.9580078125,-0.31298828125 c -0.470001220703,-0.139007568359 -0.944000244141,-0.264007568359 -1.4280090332,-0.368011474609 c -0.186004638672,-0.0390014648438 -0.376983642578,-0.0669860839844 -0.565002441406,-0.101013183594 c -0.414001464844,-0.0759887695312 -0.832000732422,-0.140991210938 -1.25500488281,-0.190979003906 c -0.184997558594,-0.0220031738281 -0.369995117188,-0.0429992675781 -0.556976318359,-0.0599975585937 c -0.592010498047,-0.0530090332031 -1.18801879883,-0.0899963378906 -1.79602050781,-0.0899963378907 c -0.605987548828,0.0 -1.20300292969,0.0369873046875 -1.79598999023,0.0899963378907 c -0.186004638672,0.0169982910156 -0.371002197266,0.0379943847656 -0.555999755859,0.0599975585937 c -0.423004150391,0.0499877929688 -0.842010498047,0.114990234375 -1.25601196289,0.190979003906 c -0.18798828125,0.0350036621094 -0.377990722656,0.06201171875 -0.563995361328,0.101013183594 c -0.483001708984,0.10400390625 -0.959991455078,0.22900390625 -1.42999267578,0.368011474609 c -0.321990966797,0.093994140625 -0.638000488281,0.201995849609 -0.953002929688,0.311981201172 c -0.162994384766,0.0570068359375 -0.324005126953,0.115997314453 -0.484985351562,0.177001953125 c -1.18099975586,0.445007324219 -2.30599975586,0.997009277344 -3.36801147461,1.64700317383 c -0.00201416015625,0.00100708007812 -0.00399780273438,0.00201416015625 -0.0060119628907,0.0029907226562 c -5.74099731445,3.51400756836 -9.58499145508,9.82501220703 -9.58599853516,17.0500183105 c 0,0.0 0,0.00100708007812 0,0.00100708007813 c 0,0.0059814453125 0.00100708007812,0.0130004882812 0.0010070800781,0.0199890136719 c 0.0,0.466003417969 0.0169982910156,0.928009033203 0.0490112304688,1.38598632812 c 0.0050048828125,0.0690002441406 0.0159912109375,0.136016845703 0.02099609375,0.206024169922 c 0.031982421875,0.401000976562 0.0719909667969,0.799987792969 0.127990722656,1.19400024414 c 0.00201416015625,0.0189819335938 0.00701904296875,0.0369873046875 0.010009765625,0.0569763183594 c 0.888000488281,6.17202758789 4.59799194336,11.4250183105 9.7799987793,14.4309997559 c 0.0,0.0 2.00198364258,-3.458984375 2.00198364258,-3.458984375 c -2.58599853516,-1.5 -4.708984375,-3.70401000977 -6.11697387695,-6.34399414063 c 0.0,0.0 0.0169982910156,-0.0180053710938 0.0169982910156,-0.0180053710938 c -0.890014648438,-1.67098999023 -1.50601196289,-3.5110168457 -1.76000976562,-5.46499633789 c -0.00698852539062,-0.0500183105469 -0.010009765625,-0.102020263672 -0.0159912109375,-0.152008056641 c -0.0330200195312,-0.273010253906 -0.0610046386719,-0.545989990234 -0.0800170898437,-0.821990966797 c -0.0220031738281,-0.343017578125 -0.0350036621094,-0.68701171875 -0.0350036621094,-1.03500366211 c 0,-6.53701782227 3.92599487305,-12.1480102539 9.54299926758,-14.6310119629 c 0.157012939453,-0.0700073242188 0.313995361328,-0.135986328125 0.472015380859,-0.199981689453 c 0.373992919922,-0.151000976562 0.751983642578,-0.294006347656 1.13900756836,-0.417022705078 c 0.108978271484,-0.0350036621094 0.221984863281,-0.0619812011719 0.332000732422,-0.0950012207031 c 0.349975585938,-0.102996826172 0.705993652344,-0.194976806641 1.06597900391,-0.273986816406 c 0.114013671875,-0.0249938964844 0.227996826172,-0.052001953125 0.342010498047,-0.0750122070313 c 0.440002441406,-0.0869750976562 0.885986328125,-0.154998779297 1.33700561523,-0.203979492188 c 0.10400390625,-0.0120239257812 0.209991455078,-0.02001953125 0.315002441406,-0.0299987792969 c 0.47998046875,-0.0429992675781 0.963989257812,-0.072998046875 1.45397949219,-0.072998046875 c 0.492004394531,0.0 0.975006103516,0.0299987792969 1.45401000977,0.072998046875 c 0.105987548828,0.00997924804688 0.212005615234,0.0179748535156 0.316986083984,0.0299987792969 c 0.450012207031,0.0489807128906 0.89501953125,0.117004394531 1.33502197266,0.203002929688 c 0.115997314453,0.0239868164062 0.22998046875,0.0509948730469 0.345001220703,0.0769958496094 c 0.358001708984,0.0780029296875 0.710998535156,0.169982910156 1.06097412109,0.272003173828 c 0.111022949219,0.0329895019531 0.226013183594,0.0609741210938 0.336029052734,0.0969848632813 c 0.385986328125,0.123016357422 0.761993408203,0.265014648438 1.13497924805,0.415008544922 c 0.160003662109,0.0650024414062 0.319000244141,0.131988525391 0.477020263672,0.201995849609 c 5.61599731445,2.48400878906 9.53997802734,8.09399414062 9.53997802734,14.6310119629 c 0,0.346984863281 -0.0130004882812,0.690979003906 -0.0350036621094,1.03399658203 c -0.0179748535156,0.274993896484 -0.0469970703125,0.548004150391 -0.0789794921875,0.819000244141 c -0.00601196289062,0.052001953125 -0.010009765625,0.10498046875 -0.0160217285156,0.154998779297 c -0.252990722656,1.95498657227 -0.871002197266,3.79400634766 -1.75997924805,5.46499633789 c 0.0,0.0 0.0169982910156,0.0180053710938 0.0169982910156,0.0180053710938 c -1.40802001953,2.63998413086 -3.53100585938,4.84399414062 -6.11700439453,6.34399414063 c 0.0,0.0 2.00198364258,3.458984375 2.00198364258,3.458984375 c 5.18402099609,-3.00698852539 8.89501953125,-8.26300048828 9.78100585938,-14.4379882813 c 0.00201416015625,-0.0169982910156 0.00601196289062,-0.0320129394531 0.0079956054688,-0.0490112304688 c 0.0570068359375,-0.39697265625 0.0970153808594,-0.798980712891 0.129028320312,-1.20300292969 Z"
+ android:fillColor="#FFFFFFFF"
+ android:fillAlpha="1" />
+ </group>
+ </group>
+ </group>
+ </group>
+</vector>
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
index 3587262..1c134c1 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
@@ -16,15 +16,22 @@
package com.android.systemui.qs.tiles;
+import android.content.BroadcastReceiver;
+import android.content.Context;
import android.content.Intent;
+import android.content.IntentFilter;
import android.os.UserManager;
import android.provider.Settings;
+import android.provider.Settings.Global;
+import android.text.SpannableStringBuilder;
+import android.text.style.ForegroundColorSpan;
import android.widget.Switch;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.MetricsProto.MetricsEvent;
import com.android.systemui.R;
+import com.android.systemui.qs.GlobalSetting;
import com.android.systemui.qs.QSTile;
import com.android.systemui.statusbar.policy.HotspotController;
@@ -36,12 +43,22 @@
private final AnimationIcon mDisable =
new AnimationIcon(R.drawable.ic_hotspot_disable_animation,
R.drawable.ic_hotspot_enable);
+ private final Icon mUnavailable =
+ ResourceIcon.get(R.drawable.ic_hotspot_unavailable);
private final HotspotController mController;
private final Callback mCallback = new Callback();
+ private final GlobalSetting mAirplaneMode;
+ private boolean mListening;
public HotspotTile(Host host) {
super(host);
mController = host.getHotspotController();
+ mAirplaneMode = new GlobalSetting(mContext, mHandler, Global.AIRPLANE_MODE_ON) {
+ @Override
+ protected void handleValueChanged(int value) {
+ refreshState();
+ }
+ };
}
@Override
@@ -61,11 +78,18 @@
@Override
public void setListening(boolean listening) {
+ if (mListening == listening) return;
+ mListening = listening;
if (listening) {
mController.addCallback(mCallback);
+ final IntentFilter filter = new IntentFilter();
+ filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED);
+ mContext.registerReceiver(mReceiver, filter);
} else {
mController.removeCallback(mCallback);
+ mContext.unregisterReceiver(mReceiver);
}
+ mAirplaneMode.setListening(listening);
}
@Override
@@ -76,6 +100,9 @@
@Override
protected void handleClick() {
final boolean isEnabled = (Boolean) mState.value;
+ if (!isEnabled && mAirplaneMode.getValue() != 0) {
+ return;
+ }
MetricsLogger.action(mContext, getMetricsCategory(), !isEnabled);
mController.setHotspotEnabled(!isEnabled);
}
@@ -96,6 +123,13 @@
state.value = mController.isHotspotEnabled();
}
state.icon = state.value ? mEnable : mDisable;
+ if (mAirplaneMode.getValue() != 0) {
+ final int disabledColor = mHost.getContext().getColor(R.color.qs_tile_tint_unavailable);
+ state.label = new SpannableStringBuilder().append(state.label,
+ new ForegroundColorSpan(disabledColor),
+ SpannableStringBuilder.SPAN_INCLUSIVE_INCLUSIVE);
+ state.icon = mUnavailable;
+ }
state.minimalAccessibilityClassName = state.expandedAccessibilityClassName
= Switch.class.getName();
state.contentDescription = state.label;
@@ -121,4 +155,13 @@
refreshState(enabled);
}
};
+
+ private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (Intent.ACTION_AIRPLANE_MODE_CHANGED.equals(intent.getAction())) {
+ refreshState();
+ }
+ }
+ };
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index c53ab59..6f6b02d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -41,6 +41,9 @@
import android.widget.Chronometer;
import android.widget.ImageView;
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.MetricsProto;
+import com.android.internal.logging.MetricsProto.MetricsEvent;
import com.android.internal.util.NotificationColorUtil;
import com.android.systemui.R;
import com.android.systemui.classifier.FalsingManager;
@@ -138,11 +141,14 @@
@Override
public void onClick(View v) {
if (!mShowingPublic && mGroupManager.isSummaryOfGroup(mStatusBarNotification)) {
- mGroupManager.toggleGroupExpansion(mStatusBarNotification);
- mOnExpandClickListener.onExpandClicked(mEntry,
- mGroupManager.isGroupExpanded(mStatusBarNotification));
+ final boolean wasExpanded = mGroupManager.isGroupExpanded(mStatusBarNotification);
+ boolean nowExpanded = mGroupManager.toggleGroupExpansion(mStatusBarNotification);
+ mOnExpandClickListener.onExpandClicked(mEntry, nowExpanded);
mGroupExpansionChanging = true;
updateBackgroundForGroupState();
+ MetricsLogger.action(mContext, MetricsEvent.ACTION_NOTIFICATION_GROUP_EXPANDER,
+ nowExpanded);
+ logExpansionEvent(true /* userAction */, wasExpanded);
} else {
boolean nowExpanded;
if (isPinned()) {
@@ -154,6 +160,8 @@
}
notifyHeightChanged(true);
mOnExpandClickListener.onExpandClicked(mEntry, nowExpanded);
+ MetricsLogger.action(mContext, MetricsEvent.ACTION_NOTIFICATION_EXPANDER,
+ nowExpanded);
}
}
};
@@ -1019,7 +1027,9 @@
public void setUserExpanded(boolean userExpanded, boolean allowChildExpansion) {
mFalsingManager.setNotificationExpanded();
if (mIsSummaryWithChildren && !mShowingPublic && allowChildExpansion) {
+ final boolean wasExpanded = mGroupManager.isGroupExpanded(mStatusBarNotification);
mGroupManager.setGroupExpanded(mStatusBarNotification, userExpanded);
+ logExpansionEvent(true /* userAction */, wasExpanded);
return;
}
if (userExpanded && !mExpandable) return;
@@ -1505,7 +1515,10 @@
}
private void logExpansionEvent(boolean userAction, boolean wasExpanded) {
- final boolean nowExpanded = isExpanded();
+ boolean nowExpanded = isExpanded();
+ if (mIsSummaryWithChildren) {
+ nowExpanded = mGroupManager.isGroupExpanded(mStatusBarNotification);
+ }
if (wasExpanded != nowExpanded && mLogger != null) {
mLogger.logNotificationExpansion(mLoggingKey, userAction, nowExpanded) ;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
index 0df1204..9ecff18d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
@@ -323,12 +323,14 @@
: group.summary.row;
}
- public void toggleGroupExpansion(StatusBarNotification sbn) {
+ /** @return group expansion state after toggling. */
+ public boolean toggleGroupExpansion(StatusBarNotification sbn) {
NotificationGroup group = mGroupMap.get(getGroupKey(sbn));
if (group == null) {
- return;
+ return false;
}
setGroupExpanded(group, !group.expanded);
+ return group.expanded;
}
private boolean isIsolated(StatusBarNotification sbn) {
diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto
index 46da957..f8cdf9b 100644
--- a/proto/src/metrics_constants.proto
+++ b/proto/src/metrics_constants.proto
@@ -2206,6 +2206,12 @@
// Settings launched from expanded quick settings.
ACTION_QS_EXPANDED_SETTINGS_LAUNCH = 406;
+ // Notification expansion state toggled by the expand affordance.
+ ACTION_NOTIFICATION_EXPANDER = 407;
+
+ // Notification group expansion state toggled by the expand affordance.
+ ACTION_NOTIFICATION_GROUP_EXPANDER = 408;
+
// Add new aosp constants above this line.
// END OF AOSP CONSTANTS
}
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index 32b9429..dd9baf4 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -1055,18 +1055,27 @@
}
/**
- * @return {@code true} if the set of users blocked whilst waiting for VPN to connect includes
- * the UID {@param uid}, {@code false} otherwise.
+ * @return {@code true} if {@param uid} is blocked by an always-on VPN.
+ * A UID is blocked if it's included in one of the mBlockedUsers ranges and the VPN is
+ * not connected, or if the VPN is connected but does not apply to the UID.
*
* @see #mBlockedUsers
*/
public synchronized boolean isBlockingUid(int uid) {
- for (UidRange uidRange : mBlockedUsers) {
- if (uidRange.contains(uid)) {
- return true;
- }
+ if (!mLockdown) {
+ return false;
}
- return false;
+
+ if (mNetworkInfo.isConnected()) {
+ return !appliesToUid(uid);
+ } else {
+ for (UidRange uidRange : mBlockedUsers) {
+ if (uidRange.contains(uid)) {
+ return true;
+ }
+ }
+ return false;
+ }
}
private native int jniCreate(int mtu);
diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java
index 0daa8ba..aa1d73f 100644
--- a/services/core/java/com/android/server/input/InputManagerService.java
+++ b/services/core/java/com/android/server/input/InputManagerService.java
@@ -222,7 +222,6 @@
private static native void nativeSetPointerIconType(long ptr, int iconId);
private static native void nativeReloadPointerIcons(long ptr);
private static native void nativeSetCustomPointerIcon(long ptr, PointerIcon icon);
- private static native void nativeSetPointerIconDetached(long ptr, boolean detached);
// Input event injection constants defined in InputDispatcher.h.
private static final int INPUT_EVENT_INJECTION_SUCCEEDED = 0;
@@ -1503,11 +1502,6 @@
nativeSetFocusedApplication(mPtr, application);
}
- @Override
- public void setPointerIconDetached(boolean detached) {
- nativeSetPointerIconDetached(mPtr, detached);
- }
-
public void setInputDispatchMode(boolean enabled, boolean frozen) {
nativeSetInputDispatchMode(mPtr, enabled, frozen);
}
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java
index 7c89e9f..367f8cb 100644
--- a/services/core/java/com/android/server/notification/NotificationRecord.java
+++ b/services/core/java/com/android/server/notification/NotificationRecord.java
@@ -318,8 +318,12 @@
public void setContactAffinity(float contactAffinity) {
mContactAffinity = contactAffinity;
+ if (mImportance < IMPORTANCE_HIGH &&
+ mContactAffinity >= ValidateNotificationPeople.STARRED_CONTACT) {
+ setImportance(IMPORTANCE_HIGH, getPeopleExplanation());
+ }
if (mImportance < IMPORTANCE_DEFAULT &&
- mContactAffinity > ValidateNotificationPeople.VALID_CONTACT) {
+ mContactAffinity >= ValidateNotificationPeople.VALID_CONTACT) {
setImportance(IMPORTANCE_DEFAULT, getPeopleExplanation());
}
}
diff --git a/services/core/jni/com_android_server_input_InputManagerService.cpp b/services/core/jni/com_android_server_input_InputManagerService.cpp
index 2e82cec..2f72a5c 100644
--- a/services/core/jni/com_android_server_input_InputManagerService.cpp
+++ b/services/core/jni/com_android_server_input_InputManagerService.cpp
@@ -207,7 +207,6 @@
void setPointerIconType(int32_t iconId);
void reloadPointerIcons();
void setCustomPointerIcon(const SpriteIcon& icon);
- void setPointerIconDetached(bool detached);
/* --- InputReaderPolicyInterface implementation --- */
@@ -712,14 +711,6 @@
mInputManager->getDispatcher()->setFocusedApplication(applicationHandle);
}
-void NativeInputManager::setPointerIconDetached(bool detached) {
- AutoMutex _l(mLock);
- sp<PointerController> controller = mLocked.pointerController.promote();
- if (controller != NULL) {
- controller->detachPointerIcon(detached);
- }
-}
-
void NativeInputManager::setInputDispatchMode(bool enabled, bool frozen) {
mInputManager->getDispatcher()->setInputDispatchMode(enabled, frozen);
}
@@ -1332,12 +1323,6 @@
im->setFocusedApplication(env, applicationHandleObj);
}
-static void nativeSetPointerIconDetached(JNIEnv* env, jclass /* clazz */, jlong ptr,
- jboolean detached) {
- NativeInputManager* im = reinterpret_cast<NativeInputManager*>(ptr);
- im->setPointerIconDetached(detached);
-}
-
static void nativeSetInputDispatchMode(JNIEnv* /* env */,
jclass /* clazz */, jlong ptr, jboolean enabled, jboolean frozen) {
NativeInputManager* im = reinterpret_cast<NativeInputManager*>(ptr);
@@ -1520,8 +1505,6 @@
(void*) nativeSetInputWindows },
{ "nativeSetFocusedApplication", "(JLcom/android/server/input/InputApplicationHandle;)V",
(void*) nativeSetFocusedApplication },
- { "nativeSetPointerIconDetached", "(JZ)V",
- (void*) nativeSetPointerIconDetached },
{ "nativeSetInputDispatchMode", "(JZZ)V",
(void*) nativeSetInputDispatchMode },
{ "nativeSetSystemUiVisibility", "(JI)V",
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 5fed594..2304346 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -66,6 +66,12 @@
* a reference to an instance through
* {@link android.content.Context#getSystemService
* Context.getSystemService(Context.TELEPHONY_SERVICE)}.
+ *
+ * The returned TelephonyManager will use the default subscription for all calls.
+ * To call an API for a specific subscription, use {@link #createForSubscriptionId(int)}. e.g.
+ * <code>
+ * telephonyManager = defaultSubTelephonyManager.createForSubscriptionId(subId);
+ * </code>
* <p>
* Note that access to some telephony information is
* permission-protected. Your application cannot access the protected
@@ -101,6 +107,7 @@
}
private final Context mContext;
+ private final int mSubId;
private SubscriptionManager mSubscriptionManager;
private static String multiSimConfig =
@@ -121,6 +128,12 @@
/** @hide */
public TelephonyManager(Context context) {
+ this(context, SubscriptionManager.DEFAULT_SUBSCRIPTION_ID);
+ }
+
+ /** @hide */
+ public TelephonyManager(Context context, int subId) {
+ mSubId = subId;
Context appContext = context.getApplicationContext();
if (appContext != null) {
mContext = appContext;
@@ -138,6 +151,7 @@
/** @hide */
private TelephonyManager() {
mContext = null;
+ mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
}
private static TelephonyManager sInstance = new TelephonyManager();
@@ -231,6 +245,16 @@
return (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
}
+ /**
+ * Create a new TelephonyManager object pinned to the given subscription ID.
+ *
+ * @return a TelephonyManager that uses the given subId for all calls.
+ */
+ public TelephonyManager createForSubscriptionId(int subId) {
+ // Don't reuse any TelephonyManager objects.
+ return new TelephonyManager(mContext, subId);
+ }
+
/** {@hide} */
public boolean isMultiSimEnabled() {
return (multiSimConfig.equals("dsds") || multiSimConfig.equals("dsda") ||
@@ -923,7 +947,7 @@
* @hide
*/
public void enableLocationUpdates() {
- enableLocationUpdates(getDefaultSubscription());
+ enableLocationUpdates(getSubId());
}
/**
@@ -935,8 +959,8 @@
* CONTROL_LOCATION_UPDATES}
*
* @param subId for which the location updates are enabled
+ * @hide
*/
- /** @hide */
public void enableLocationUpdates(int subId) {
try {
ITelephony telephony = getITelephony();
@@ -957,7 +981,7 @@
* @hide
*/
public void disableLocationUpdates() {
- disableLocationUpdates(getDefaultSubscription());
+ disableLocationUpdates(getSubId());
}
/** @hide */
@@ -1018,7 +1042,7 @@
*/
@SystemApi
public int getCurrentPhoneType() {
- return getCurrentPhoneType(getDefaultSubscription());
+ return getCurrentPhoneType(getSubId());
}
/**
@@ -1029,8 +1053,8 @@
* @see #PHONE_TYPE_CDMA
*
* @param subId for which phone type is returned
+ * @hide
*/
- /** {@hide} */
@SystemApi
public int getCurrentPhoneType(int subId) {
int phoneId;
@@ -1258,7 +1282,7 @@
* on a CDMA network).
*/
public String getNetworkOperatorName() {
- return getNetworkOperatorName(getDefaultSubscription());
+ return getNetworkOperatorName(getSubId());
}
/**
@@ -1269,6 +1293,7 @@
* unreliable on CDMA networks (use {@link #getPhoneType()} to determine if
* on a CDMA network).
* @param subId
+ * @hide
*/
public String getNetworkOperatorName(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
@@ -1295,6 +1320,7 @@
* on a CDMA network).
*
* @param subId
+ * @hide
*/
public String getNetworkOperator(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
@@ -1323,7 +1349,7 @@
* Availability: Only when user registered to a network.
*/
public boolean isNetworkRoaming() {
- return isNetworkRoaming(getDefaultSubscription());
+ return isNetworkRoaming(getSubId());
}
/**
@@ -1333,6 +1359,7 @@
* Availability: Only when user registered to a network.
*
* @param subId
+ * @hide
*/
public boolean isNetworkRoaming(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
@@ -1361,6 +1388,7 @@
* on a CDMA network).
*
* @param subId for which Network CountryIso is returned
+ * @hide
*/
public String getNetworkCountryIso(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
@@ -1469,6 +1497,7 @@
* <p>
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * @hide
*/
public int getNetworkType(int subId) {
try {
@@ -1513,10 +1542,9 @@
* <p>
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
- * @hide
*/
public int getDataNetworkType() {
- return getDataNetworkType(getDefaultSubscription());
+ return getDataNetworkType(getSubId());
}
/**
@@ -1529,6 +1557,7 @@
* <p>
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * @hide
*/
public int getDataNetworkType(int subId) {
try{
@@ -1554,10 +1583,9 @@
* <p>
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
- * @hide
*/
public int getVoiceNetworkType() {
- return getVoiceNetworkType(getDefaultSubscription());
+ return getVoiceNetworkType(getSubId());
}
/**
@@ -1566,6 +1594,7 @@
* <p>
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * @hide
*/
public int getVoiceNetworkType(int subId) {
try{
@@ -1835,6 +1864,7 @@
* @see #getSimState
*
* @param subId for which SimOperator is returned
+ * @hide
*/
public String getSimOperator(int subId) {
return getSimOperatorNumeric(subId);
@@ -1911,6 +1941,7 @@
* @see #getSimState
*
* @param subId for which SimOperatorName is returned
+ * @hide
*/
public String getSimOperatorName(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
@@ -1938,6 +1969,7 @@
* Returns the ISO country code equivalent for the SIM provider's country code.
*
* @param subId for which SimCountryIso is returned
+ * @hide
*/
public String getSimCountryIso(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
@@ -1962,7 +1994,7 @@
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
*/
public String getSimSerialNumber() {
- return getSimSerialNumber(getDefaultSubscription());
+ return getSimSerialNumber(getSubId());
}
/**
@@ -1972,6 +2004,7 @@
* @param subId for which Sim Serial number is returned
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * @hide
*/
public String getSimSerialNumber(int subId) {
try {
@@ -2002,7 +2035,7 @@
* @hide
*/
public int getLteOnCdmaMode() {
- return getLteOnCdmaMode(getDefaultSubscription());
+ return getLteOnCdmaMode(getSubId());
}
/**
@@ -2017,8 +2050,8 @@
* <p>
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * @hide
*/
- /** {@hide} */
public int getLteOnCdmaMode(int subId) {
try {
ITelephony telephony = getITelephony();
@@ -2048,7 +2081,7 @@
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
*/
public String getSubscriberId() {
- return getSubscriberId(getDefaultSubscription());
+ return getSubscriberId(getSubId());
}
/**
@@ -2060,6 +2093,7 @@
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
*
* @param subId whose subscriber id is returned
+ * @hide
*/
public String getSubscriberId(int subId) {
try {
@@ -2104,6 +2138,7 @@
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
*
* @param subId whose subscriber id is returned
+ * @hide
*/
public String getGroupIdLevel1(int subId) {
try {
@@ -2131,7 +2166,7 @@
* The default SMS app can also use this.
*/
public String getLine1Number() {
- return getLine1Number(getDefaultSubscription());
+ return getLine1Number(getSubId());
}
/**
@@ -2146,6 +2181,7 @@
* The default SMS app can also use this.
*
* @param subId whose phone number for line 1 is returned
+ * @hide
*/
public String getLine1Number(int subId) {
String number = null;
@@ -2186,7 +2222,7 @@
* @return true if the operation was executed correctly.
*/
public boolean setLine1NumberForDisplay(String alphaTag, String number) {
- return setLine1NumberForDisplay(getDefaultSubscription(), alphaTag, number);
+ return setLine1NumberForDisplay(getSubId(), alphaTag, number);
}
/**
@@ -2202,6 +2238,7 @@
* @param alphaTag alpha-tagging of the dailing nubmer
* @param number The dialing number
* @return true if the operation was executed correctly.
+ * @hide
*/
public boolean setLine1NumberForDisplay(int subId, String alphaTag, String number) {
try {
@@ -2224,7 +2261,7 @@
* nobody seems to call this.
*/
public String getLine1AlphaTag() {
- return getLine1AlphaTag(getDefaultSubscription());
+ return getLine1AlphaTag(getSubId());
}
/**
@@ -2236,6 +2273,7 @@
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
* @param subId whose alphabetic identifier associated with line 1 is returned
* nobody seems to call this.
+ * @hide
*/
public String getLine1AlphaTag(int subId) {
String alphaTag = null;
@@ -2292,7 +2330,7 @@
* @hide
*/
public String getMsisdn() {
- return getMsisdn(getDefaultSubscription());
+ return getMsisdn(getSubId());
}
/**
@@ -2303,8 +2341,8 @@
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
*
* @param subId for which msisdn is returned
+ * @hide
*/
- /** {@hide} */
public String getMsisdn(int subId) {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -2326,7 +2364,7 @@
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
*/
public String getVoiceMailNumber() {
- return getVoiceMailNumber(getDefaultSubscription());
+ return getVoiceMailNumber(getSubId());
}
/**
@@ -2336,6 +2374,7 @@
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
* @param subId whose voice mail number is returned
+ * @hide
*/
public String getVoiceMailNumber(int subId) {
try {
@@ -2360,7 +2399,7 @@
* @hide
*/
public String getCompleteVoiceMailNumber() {
- return getCompleteVoiceMailNumber(getDefaultSubscription());
+ return getCompleteVoiceMailNumber(getSubId());
}
/**
@@ -2370,8 +2409,8 @@
* {@link android.Manifest.permission#CALL_PRIVILEGED CALL_PRIVILEGED}
*
* @param subId
+ * @hide
*/
- /** {@hide} */
public String getCompleteVoiceMailNumber(int subId) {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -2396,7 +2435,7 @@
* @param number The voicemail number.
*/
public boolean setVoiceMailNumber(String alphaTag, String number) {
- return setVoiceMailNumber(getDefaultSubscription(), alphaTag, number);
+ return setVoiceMailNumber(getSubId(), alphaTag, number);
}
/**
@@ -2408,6 +2447,7 @@
* @param subId The subscription id.
* @param alphaTag The alpha tag to display.
* @param number The voicemail number.
+ * @hide
*/
public boolean setVoiceMailNumber(int subId, String alphaTag, String number) {
try {
@@ -2429,7 +2469,7 @@
* @hide
*/
public int getVoiceMessageCount() {
- return getVoiceMessageCount(getDefaultSubscription());
+ return getVoiceMessageCount(getSubId());
}
/**
@@ -2438,8 +2478,8 @@
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
* @param subId whose voice message count is returned
+ * @hide
*/
- /** {@hide} */
public int getVoiceMessageCount(int subId) {
try {
ITelephony telephony = getITelephony();
@@ -2462,7 +2502,7 @@
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
*/
public String getVoiceMailAlphaTag() {
- return getVoiceMailAlphaTag(getDefaultSubscription());
+ return getVoiceMailAlphaTag(getSubId());
}
/**
@@ -2473,6 +2513,7 @@
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
* @param subId whose alphabetic identifier associated with the
* voice mail number is returned
+ * @hide
*/
public String getVoiceMailAlphaTag(int subId) {
try {
@@ -2590,6 +2631,7 @@
* for a subscription.
*
* @param subId whose call state is returned
+ * @hide
*/
public int getCallState(int subId) {
int phoneId = SubscriptionManager.getPhoneId(subId);
@@ -2759,7 +2801,7 @@
* @hide
*/
public int getCdmaEriIconIndex() {
- return getCdmaEriIconIndex(getDefaultSubscription());
+ return getCdmaEriIconIndex(getSubId());
}
/**
@@ -2767,8 +2809,8 @@
* <p>
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * @hide
*/
- /** {@hide} */
public int getCdmaEriIconIndex(int subId) {
try {
ITelephony telephony = getITelephony();
@@ -2794,7 +2836,7 @@
* @hide
*/
public int getCdmaEriIconMode() {
- return getCdmaEriIconMode(getDefaultSubscription());
+ return getCdmaEriIconMode(getSubId());
}
/**
@@ -2805,8 +2847,8 @@
* <p>
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * @hide
*/
- /** {@hide} */
public int getCdmaEriIconMode(int subId) {
try {
ITelephony telephony = getITelephony();
@@ -2830,7 +2872,7 @@
* @hide
*/
public String getCdmaEriText() {
- return getCdmaEriText(getDefaultSubscription());
+ return getCdmaEriText(getSubId());
}
/**
@@ -2839,8 +2881,8 @@
* <p>
* Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ * @hide
*/
- /** {@hide} */
public String getCdmaEriText(int subId) {
try {
ITelephony telephony = getITelephony();
@@ -2993,7 +3035,7 @@
* @return an IccOpenLogicalChannelResponse object.
*/
public IccOpenLogicalChannelResponse iccOpenLogicalChannel(String AID) {
- return iccOpenLogicalChannel(getDefaultSubscription(), AID);
+ return iccOpenLogicalChannel(getSubId(), AID);
}
/**
@@ -3008,6 +3050,7 @@
* @param subId The subscription to use.
* @param AID Application id. See ETSI 102.221 and 101.220.
* @return an IccOpenLogicalChannelResponse object.
+ * @hide
*/
public IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId, String AID) {
try {
@@ -3034,7 +3077,7 @@
* @return true if the channel was closed successfully.
*/
public boolean iccCloseLogicalChannel(int channel) {
- return iccCloseLogicalChannel(getDefaultSubscription(), channel);
+ return iccCloseLogicalChannel(getSubId(), channel);
}
/**
@@ -3050,6 +3093,7 @@
* @param channel is the channel id to be closed as retruned by a successful
* iccOpenLogicalChannel.
* @return true if the channel was closed successfully.
+ * @hide
*/
public boolean iccCloseLogicalChannel(int subId, int channel) {
try {
@@ -3085,7 +3129,7 @@
*/
public String iccTransmitApduLogicalChannel(int channel, int cla,
int instruction, int p1, int p2, int p3, String data) {
- return iccTransmitApduLogicalChannel(getDefaultSubscription(), channel, cla,
+ return iccTransmitApduLogicalChannel(getSubId(), channel, cla,
instruction, p1, p2, p3, data);
}
@@ -3110,6 +3154,7 @@
* @param data Data to be sent with the APDU.
* @return The APDU response from the ICC card with the status appended at
* the end.
+ * @hide
*/
public String iccTransmitApduLogicalChannel(int subId, int channel, int cla,
int instruction, int p1, int p2, int p3, String data) {
@@ -3145,7 +3190,7 @@
*/
public String iccTransmitApduBasicChannel(int cla,
int instruction, int p1, int p2, int p3, String data) {
- return iccTransmitApduBasicChannel(getDefaultSubscription(), cla,
+ return iccTransmitApduBasicChannel(getSubId(), cla,
instruction, p1, p2, p3, data);
}
@@ -3168,6 +3213,7 @@
* @param data Data to be sent with the APDU.
* @return The APDU response from the ICC card with the status appended at
* the end.
+ * @hide
*/
public String iccTransmitApduBasicChannel(int subId, int cla,
int instruction, int p1, int p2, int p3, String data) {
@@ -3199,7 +3245,7 @@
*/
public byte[] iccExchangeSimIO(int fileID, int command, int p1, int p2, int p3,
String filePath) {
- return iccExchangeSimIO(getDefaultSubscription(), fileID, command, p1, p2, p3, filePath);
+ return iccExchangeSimIO(getSubId(), fileID, command, p1, p2, p3, filePath);
}
/**
@@ -3217,6 +3263,7 @@
* @param p3 P3 value of the APDU command.
* @param filePath
* @return The APDU response.
+ * @hide
*/
public byte[] iccExchangeSimIO(int subId, int fileID, int command, int p1, int p2,
int p3, String filePath) {
@@ -3245,7 +3292,7 @@
* returns an empty string.
*/
public String sendEnvelopeWithStatus(String content) {
- return sendEnvelopeWithStatus(getDefaultSubscription(), content);
+ return sendEnvelopeWithStatus(getSubId(), content);
}
/**
@@ -3262,6 +3309,7 @@
* @return The APDU response from the ICC card in hexadecimal format
* with the last 4 bytes being the status word. If the command fails,
* returns an empty string.
+ * @hide
*/
public String sendEnvelopeWithStatus(int subId, String content) {
try {
@@ -3381,6 +3429,19 @@
}
/**
+ * Return an appropriate subscription ID for any situation.
+ *
+ * If this object has been created with {@link #createForSubscriptionId}, then the provided
+ * subId is returned. Otherwise, the default subId will be returned.
+ */
+ private int getSubId() {
+ if (mSubId == SubscriptionManager.DEFAULT_SUBSCRIPTION_ID) {
+ return getDefaultSubscription();
+ }
+ return mSubId;
+ }
+
+ /**
* Returns Default subscription.
*/
private static int getDefaultSubscription() {
@@ -3662,7 +3723,7 @@
* @see #hasCarrierPrivileges
*/
public String getIccAuthentication(int appType, int authType, String data) {
- return getIccAuthentication(getDefaultSubscription(), appType, authType, data);
+ return getIccAuthentication(getSubId(), appType, authType, data);
}
/**
@@ -3680,8 +3741,8 @@
* @return the response of authentication, or null if not available
*
* @see #hasCarrierPrivileges
+ * @hide
*/
-
public String getIccAuthentication(int subId, int appType, int authType, String data) {
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -3760,6 +3821,7 @@
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
*
* @hide
+ * TODO: Add an overload that takes no args.
*/
public void setNetworkSelectionModeAutomatic(int subId) {
try {
@@ -3785,6 +3847,7 @@
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
*
* @hide
+ * TODO: Add an overload that takes no args.
*/
public CellNetworkScanResult getCellNetworkScanResults(int subId) {
try {
@@ -3808,6 +3871,7 @@
* Or the calling app has carrier privileges. @see #hasCarrierPrivileges
*
* @hide
+ * TODO: Add an overload that takes no args.
*/
public boolean setNetworkSelectionModeManual(int subId, OperatorInfo operator,
boolean persistSelection) {
@@ -3859,7 +3923,7 @@
* @return true on success; false on any failure.
*/
public boolean setPreferredNetworkTypeToGlobal() {
- return setPreferredNetworkTypeToGlobal(getDefaultSubscription());
+ return setPreferredNetworkTypeToGlobal(getSubId());
}
/**
@@ -3870,6 +3934,7 @@
* @see #hasCarrierPrivileges
*
* @return true on success; false on any failure.
+ * @hide
*/
public boolean setPreferredNetworkTypeToGlobal(int subId) {
return setPreferredNetworkType(subId, RILConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA);
@@ -3919,7 +3984,7 @@
* @return true if the app has carrier privileges.
*/
public boolean hasCarrierPrivileges() {
- return hasCarrierPrivileges(getDefaultSubscription());
+ return hasCarrierPrivileges(getSubId());
}
/**
@@ -3931,12 +3996,13 @@
*
* @param subId The subscription to use.
* @return true if the app has carrier privileges.
+ * @hide
*/
public boolean hasCarrierPrivileges(int subId) {
try {
ITelephony telephony = getITelephony();
if (telephony != null) {
- return telephony.getCarrierPrivilegeStatus(subId) ==
+ return telephony.getCarrierPrivilegeStatus(mSubId) ==
CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;
}
} catch (RemoteException ex) {
@@ -3962,7 +4028,7 @@
* @return true if the operation was executed correctly.
*/
public boolean setOperatorBrandOverride(String brand) {
- return setOperatorBrandOverride(getDefaultSubscription(), brand);
+ return setOperatorBrandOverride(getSubId(), brand);
}
/**
@@ -3979,6 +4045,7 @@
* @param subId The subscription to use.
* @param brand The brand name to display/set.
* @return true if the operation was executed correctly.
+ * @hide
*/
public boolean setOperatorBrandOverride(int subId, String brand) {
try {
@@ -4015,7 +4082,7 @@
public boolean setRoamingOverride(List<String> gsmRoamingList,
List<String> gsmNonRoamingList, List<String> cdmaRoamingList,
List<String> cdmaNonRoamingList) {
- return setRoamingOverride(getDefaultSubscription(), gsmRoamingList, gsmNonRoamingList,
+ return setRoamingOverride(getSubId(), gsmRoamingList, gsmNonRoamingList,
cdmaRoamingList, cdmaNonRoamingList);
}
@@ -4062,7 +4129,7 @@
/** @hide */
@SystemApi
public String getCdmaMdn() {
- return getCdmaMdn(getDefaultSubscription());
+ return getCdmaMdn(getSubId());
}
/** @hide */
@@ -4083,7 +4150,7 @@
/** @hide */
@SystemApi
public String getCdmaMin() {
- return getCdmaMin(getDefaultSubscription());
+ return getCdmaMin(getSubId());
}
/** @hide */
@@ -4626,7 +4693,8 @@
* retrieves value for setting "name", and if that is not found throws
* SettingNotFoundException
*
- * @hide */
+ * @hide
+ */
public static int getIntWithSubId(ContentResolver cr, String name, int subId)
throws SettingNotFoundException {
try {