Merge "Only run "core" apps when encrypting device." into ics-factoryrom
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index 3d3a373..150880c 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -1782,7 +1782,8 @@
* <p>
* The most common case is to call this with one account type, e.g.:
* <p>
- * <pre> newChooseAccountsIntent(null, null, new String[]{"com.google"}, null);</pre>
+ * <pre> newChooseAccountsIntent(null, null, new String[]{"com.google"}, false, null,
+ * null, null, null);</pre>
* @param selectedAccount if specified, indicates that the {@link Account} is the currently
* selected one, according to the caller's definition of selected.
* @param allowableAccounts an optional {@link ArrayList} of accounts that are allowed to be
@@ -1792,13 +1793,14 @@
* when adding an account.
* @param alwaysPromptForAccount if set the account chooser screen is always shown, otherwise
* it is only shown when there is more than one account from which to choose
- * @param descriptionOverrideText if set, this string is used as the description in the
+ * @param descriptionOverrideText if non-null this string is used as the description in the
* accounts chooser screen rather than the default
- * @param addAccountAuthTokenType This {@link Bundle} is passed as the {@link #addAccount}
- * authTokenType
- * @param addAccountRequiredFeatures This {@link Bundle} is passed as the {@link #addAccount}
- * requiredFeatures
+ * @param addAccountAuthTokenType this string is passed as the {@link #addAccount}
+ * authTokenType parameter
+ * @param addAccountRequiredFeatures this string array is passed as the {@link #addAccount}
+ * requiredFeatures parameter
* @param addAccountOptions This {@link Bundle} is passed as the {@link #addAccount} options
+ * parameter
* @return an {@link Intent} that can be used to launch the ChooseAccount activity flow.
*/
static public Intent newChooseAccountIntent(Account selectedAccount,
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index d78a7a3..d680f36 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -1193,6 +1193,11 @@
}
super.setEnabled(enabled);
prepareCursorControllers();
+ if (enabled) {
+ // Make sure IME is updated with current editor info.
+ InputMethodManager imm = InputMethodManager.peekInstance();
+ if (imm != null) imm.restartInput(this);
+ }
}
/**
diff --git a/core/java/com/android/internal/widget/TransportControlView.java b/core/java/com/android/internal/widget/TransportControlView.java
index f9c2cce..1c7ad617 100644
--- a/core/java/com/android/internal/widget/TransportControlView.java
+++ b/core/java/com/android/internal/widget/TransportControlView.java
@@ -102,6 +102,9 @@
case MSG_SET_ARTWORK:
if (mClientGeneration == msg.arg1) {
+ if (mMetadata.bitmap != null) {
+ mMetadata.bitmap.recycle();
+ }
mMetadata.bitmap = (Bitmap) msg.obj;
mAlbumArt.setImageBitmap(mMetadata.bitmap);
}
diff --git a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
index 42ea4f29..ae152fb 100644
--- a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
@@ -1019,7 +1019,7 @@
sendMessage(msg);
}
- public abstract boolean isAnyActiveDataConnections();
+ public abstract boolean isDisconnected();
protected void onSetUserDataEnabled(boolean enabled) {
synchronized (mDataEnabledLock) {
diff --git a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
index 01b807d..1b3ee1e 100644
--- a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
@@ -403,7 +403,14 @@
public void powerOffRadioSafely(DataConnectionTracker dcTracker) {
synchronized (this) {
if (!mPendingRadioPowerOffAfterDataOff) {
- if (dcTracker.isAnyActiveDataConnections()) {
+ // To minimize race conditions we call cleanUpAllConnections on
+ // both if else paths instead of before this isDisconnected test.
+ if (dcTracker.isDisconnected()) {
+ // To minimize race conditions we do this after isDisconnected
+ dcTracker.cleanUpAllConnections(Phone.REASON_RADIO_TURNED_OFF);
+ if (DBG) log("Data disconnected, turn off radio right away.");
+ hangupAndPowerOff();
+ } else {
dcTracker.cleanUpAllConnections(Phone.REASON_RADIO_TURNED_OFF);
Message msg = Message.obtain(this);
msg.what = EVENT_SET_RADIO_POWER_OFF;
@@ -415,10 +422,6 @@
log("Cannot send delayed Msg, turn off radio right away.");
hangupAndPowerOff();
}
- } else {
- dcTracker.cleanUpAllConnections(Phone.REASON_RADIO_TURNED_OFF);
- if (DBG) log("Data disconnected, turn off radio right away.");
- hangupAndPowerOff();
}
}
}
diff --git a/telephony/java/com/android/internal/telephony/TelephonyProperties.java b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
index abb4523..101dd55 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyProperties.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
@@ -182,4 +182,9 @@
* in commercial configuration.
*/
static final String PROPERTY_TEST_CSIM = "persist.radio.test-csim";
+
+ /**
+ * Set to true to indicate a test ims registration required.
+ */
+ static final String PROPERTY_IMS_REG_REQUIRED = "persist.radio.imsregrequired";
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
index 078e51d..4dace82 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
@@ -946,8 +946,8 @@
}
@Override
- public boolean isAnyActiveDataConnections() {
- return (mState != State.IDLE);
+ public boolean isDisconnected() {
+ return ((mState == State.IDLE) || (mState == State.FAILED));
}
@Override
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index dd8a60a..ebf5e65 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -1961,7 +1961,8 @@
return false;
}
- protected boolean isDisconnected() {
+ @Override
+ public boolean isDisconnected() {
for (ApnContext apnContext : mApnContexts.values()) {
if (!apnContext.isDisconnected()) {
// At least one context was not disconnected return false
@@ -2348,11 +2349,6 @@
}
@Override
- public boolean isAnyActiveDataConnections() {
- return isConnected();
- }
-
- @Override
protected void log(String s) {
Log.d(LOG_TAG, "[GsmDCT] "+ s);
}