Merge "Convert Android.mk file to Android.bp"
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 98d1919..a1949dd 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -129,7 +129,7 @@
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.SEND_RESPOND_VIA_MESSAGE" />
<uses-permission android:name="android.permission.SET_TIME_ZONE" />
- <uses-permission android:name="android.permission.SUGGEST_PHONE_TIME_AND_ZONE" />
+ <uses-permission android:name="android.permission.SUGGEST_TELEPHONY_TIME_AND_ZONE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 8d84baf..fca8acf 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -15,21 +15,6 @@
-->
<resources>
- <!-- Base attributes available to CheckBoxPreference. Copied from frameworks/base/core/res. -->
- <declare-styleable name="CheckBoxPreference">
- <!-- The summary for the Preference in a PreferenceActivity screen when the
- CheckBoxPreference is checked. If separate on/off summaries are not
- needed, the summary attribute can be used instead. -->
- <attr name="android:summaryOn" />
- <!-- The summary for the Preference in a PreferenceActivity screen when the
- CheckBoxPreference is unchecked. If separate on/off summaries are not
- needed, the summary attribute can be used instead. -->
- <attr name="android:summaryOff" />
- <!-- The state (true for on, or false for off) that causes dependents to be disabled. By default,
- dependents will be disabled when this is unchecked, so the value of this preference is false. -->
- <attr name="android:disableDependentsState" />
- </declare-styleable>
-
<declare-styleable name="EditPhoneNumberPreference">
<!-- The enable button text. -->
<attr name="enableButtonText" format="string" />
diff --git a/src/com/android/phone/EditPhoneNumberPreference.java b/src/com/android/phone/EditPhoneNumberPreference.java
index 35af20d..74b8a45 100644
--- a/src/com/android/phone/EditPhoneNumberPreference.java
+++ b/src/com/android/phone/EditPhoneNumberPreference.java
@@ -136,9 +136,9 @@
a.recycle();
//get the summary settings, use CheckBoxPreference as the standard.
- a = context.obtainStyledAttributes(attrs, R.styleable.CheckBoxPreference, 0, 0);
- mSummaryOn = a.getString(R.styleable.CheckBoxPreference_summaryOn);
- mSummaryOff = a.getString(R.styleable.CheckBoxPreference_summaryOff);
+ a = context.obtainStyledAttributes(attrs, android.R.styleable.CheckBoxPreference, 0, 0);
+ mSummaryOn = a.getString(android.R.styleable.CheckBoxPreference_summaryOn);
+ mSummaryOff = a.getString(android.R.styleable.CheckBoxPreference_summaryOff);
a.recycle();
}
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 1873482..41a82bc 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -5604,24 +5604,15 @@
}
/**
- * Get whether mobile data is enabled.
+ * Checks if the device is capable of mobile data by considering whether whether the
+ * user has enabled mobile data, whether the carrier has enabled mobile data, and
+ * whether the network policy allows data connections.
*
- * Comparable to {@link #isUserDataEnabled(int)}, this considers all factors deciding
- * whether mobile data is actually enabled.
- *
- * Accepts either ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE or carrier privileges.
- *
- * @return {@code true} if data is enabled else {@code false}
+ * @return {@code true} if the overall data connection is capable; {@code false} if not.
*/
@Override
public boolean isDataEnabled(int subId) {
- try {
- mApp.enforceCallingOrSelfPermission(android.Manifest.permission.ACCESS_NETWORK_STATE,
- null);
- } catch (Exception e) {
- TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege(
- mApp, subId, "isDataEnabled");
- }
+ enforceReadPrivilegedPermission("isDataEnabled");
final long identity = Binder.clearCallingIdentity();
try {