Merge "Remove fullstop at end of phrases" into nyc-dev
diff --git a/res/values/ids.xml b/res/values/ids.xml
index 2fbf70b..f9334e4 100644
--- a/res/values/ids.xml
+++ b/res/values/ids.xml
@@ -18,4 +18,10 @@
-->
<resources>
<item type="id" name="preference_highlight_key" />
+
+ <item type="id" name="lock_none" />
+ <item type="id" name="lock_pin" />
+ <item type="id" name="lock_password" />
+
+ <item type="id" name="encrypt_dont_require_password" />
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 74f4af0..7967333 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1967,10 +1967,20 @@
<string-array name="wifi_calling_mode_choices">
<item>Wi-Fi preferred</item>
<item>Cellular preferred</item>
+ <item>Wi-Fi only</item>
</string-array>
<string-array name="wifi_calling_mode_values">
<item>"2"</item>
<item>"1"</item>
+ <item>"0"</item>
+ </string-array>
+ <string-array name="wifi_calling_mode_choices_without_wifi_only">
+ <item>Wi-Fi preferred</item>
+ <item>Cellular preferred</item>
+ </string-array>
+ <string-array name="wifi_calling_mode_values_without_wifi_only">
+ <item>"2"</item>
+ <item>"1"</item>
</string-array>
<!-- Wi-Fi Calling settings. Text displayed when Wi-Fi Calling is off -->
<string name="wifi_calling_off_explanation">When Wi-Fi calling is on, your phone can route calls via Wi-Fi networks or your carrier\u2019s network, depending on your preference and which signal is stronger. Before turning on this feature, check with your carrier regarding fees and other details.</string>
diff --git a/src/com/android/settings/ApnEditor.java b/src/com/android/settings/ApnEditor.java
index 102d6cc..3163b63 100644
--- a/src/com/android/settings/ApnEditor.java
+++ b/src/com/android/settings/ApnEditor.java
@@ -453,11 +453,7 @@
return null;
} else {
String[] values = mRes.getStringArray(R.array.mvno_type_entries);
- if (values[mvnoIndex].equals("None")) {
- mMvnoMatchData.setEnabled(false);
- } else {
- mMvnoMatchData.setEnabled(true);
- }
+ mMvnoMatchData.setEnabled(mvnoIndex != 0);
if (newValue != null && newValue.equals(oldValue) == false) {
if (values[mvnoIndex].equals("SPN")) {
mMvnoMatchData.setText(mTelephonyManager.getSimOperatorName());
diff --git a/src/com/android/settings/ChooseLockGeneric.java b/src/com/android/settings/ChooseLockGeneric.java
index bb597a6..5eb17b2 100644
--- a/src/com/android/settings/ChooseLockGeneric.java
+++ b/src/com/android/settings/ChooseLockGeneric.java
@@ -350,6 +350,11 @@
protected void addPreferences() {
addPreferencesFromResource(R.xml.security_settings_picker);
+
+ // Used for testing purposes
+ findPreference(KEY_UNLOCK_SET_NONE).setViewId(R.id.lock_none);
+ findPreference(KEY_UNLOCK_SET_PIN).setViewId(R.id.lock_pin);
+ findPreference(KEY_UNLOCK_SET_PASSWORD).setViewId(R.id.lock_password);
}
private void updatePreferenceText() {
diff --git a/src/com/android/settings/ConfirmDeviceCredentialBaseActivity.java b/src/com/android/settings/ConfirmDeviceCredentialBaseActivity.java
index e6dd5e0..c56a956 100644
--- a/src/com/android/settings/ConfirmDeviceCredentialBaseActivity.java
+++ b/src/com/android/settings/ConfirmDeviceCredentialBaseActivity.java
@@ -31,7 +31,6 @@
private boolean mDark;
private boolean mEnterAnimationPending;
private boolean mFirstTimeVisible = true;
- private final Handler mHandler = new Handler();
@Override
protected void onCreate(Bundle savedState) {
@@ -76,7 +75,6 @@
mFirstTimeVisible = false;
prepareEnterAnimation();
mEnterAnimationPending = true;
- mHandler.postDelayed(mEnterAnimationCompleteTimeoutRunnable, 1000);
}
}
@@ -92,7 +90,6 @@
public void onEnterAnimationComplete() {
super.onEnterAnimationComplete();
if (mEnterAnimationPending) {
- mHandler.removeCallbacks(mEnterAnimationCompleteTimeoutRunnable);
startEnterAnimation();
mEnterAnimationPending = false;
}
@@ -105,15 +102,4 @@
public void startEnterAnimation() {
getFragment().startEnterAnimation();
}
-
- /**
- * Workaround for a bug in window manager which results that onEnterAnimationComplete doesn't
- * get called in all cases.
- */
- private final Runnable mEnterAnimationCompleteTimeoutRunnable = new Runnable() {
- @Override
- public void run() {
- onEnterAnimationComplete();
- }
- };
}
diff --git a/src/com/android/settings/CryptKeeper.java b/src/com/android/settings/CryptKeeper.java
index 594cd38..1b37066 100644
--- a/src/com/android/settings/CryptKeeper.java
+++ b/src/com/android/settings/CryptKeeper.java
@@ -799,8 +799,6 @@
// Asynchronously throw up the IME, since there are issues with requesting it to be shown
// immediately.
if (mLockPatternView == null && !mCooldown) {
- getWindow().setSoftInputMode(
- WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
mHandler.postDelayed(new Runnable() {
@Override public void run() {
imm.showSoftInputUnchecked(0, null);
diff --git a/src/com/android/settings/EncryptionInterstitial.java b/src/com/android/settings/EncryptionInterstitial.java
index 16c5a55..89eba7c 100644
--- a/src/com/android/settings/EncryptionInterstitial.java
+++ b/src/com/android/settings/EncryptionInterstitial.java
@@ -90,6 +90,10 @@
addPreferencesFromResource(R.xml.security_settings_encryption_interstitial);
+ // Used for testing purposes
+ findPreference(KEY_ENCRYPT_DONT_REQUIRE_PASSWORD)
+ .setViewId(R.id.encrypt_dont_require_password);
+
mRequirePasswordToDecrypt = findPreference(KEY_ENCRYPT_REQUIRE_PASSWORD);
mDontRequirePasswordToDecrypt = findPreference(KEY_ENCRYPT_DONT_REQUIRE_PASSWORD);
boolean forFingerprint = getActivity().getIntent().getBooleanExtra(
diff --git a/src/com/android/settings/WifiCallingSettings.java b/src/com/android/settings/WifiCallingSettings.java
index da83cad..3602295 100644
--- a/src/com/android/settings/WifiCallingSettings.java
+++ b/src/com/android/settings/WifiCallingSettings.java
@@ -168,12 +168,20 @@
CarrierConfigManager configManager = (CarrierConfigManager)
getSystemService(Context.CARRIER_CONFIG_SERVICE);
+ boolean isWifiOnlySupported = true;
if (configManager != null) {
PersistableBundle b = configManager.getConfig();
if (b != null) {
mEditableWfcMode = b.getBoolean(CarrierConfigManager.KEY_EDITABLE_WFC_MODE_BOOL);
+ isWifiOnlySupported = b.getBoolean(
+ CarrierConfigManager.KEY_CARRIER_WFC_SUPPORTS_WIFI_ONLY_BOOL, true);
}
}
+
+ if (!isWifiOnlySupported) {
+ mButtonWfcMode.setEntries(R.array.wifi_calling_mode_choices_without_wifi_only);
+ mButtonWfcMode.setEntryValues(R.array.wifi_calling_mode_values_without_wifi_only);
+ }
}
@Override
diff --git a/src/com/android/settings/applications/AppStateNotificationBridge.java b/src/com/android/settings/applications/AppStateNotificationBridge.java
index e8db2aa..b936351 100644
--- a/src/com/android/settings/applications/AppStateNotificationBridge.java
+++ b/src/com/android/settings/applications/AppStateNotificationBridge.java
@@ -70,6 +70,9 @@
@Override
public boolean filterApp(AppEntry info) {
+ if (info == null || info.extraInfo == null) {
+ return false;
+ }
if (info.extraInfo instanceof AppRow) {
AppRow row = (AppRow) info.extraInfo;
return row.banned;
@@ -85,7 +88,7 @@
@Override
public boolean filterApp(AppEntry info) {
- if (info == null) {
+ if (info == null || info.extraInfo == null) {
return false;
}
AppRow row = (AppRow) info.extraInfo;
@@ -101,7 +104,10 @@
@Override
public boolean filterApp(AppEntry info) {
- return info.extraInfo != null && ((AppRow) info.extraInfo).appBypassDnd;
+ if (info == null || info.extraInfo == null) {
+ return false;
+ }
+ return ((AppRow) info.extraInfo).appBypassDnd;
}
};
@@ -112,7 +118,10 @@
@Override
public boolean filterApp(AppEntry info) {
- return info.extraInfo != null && ((AppRow) info.extraInfo).lockScreenSecure
+ if (info == null || info.extraInfo == null) {
+ return false;
+ }
+ return ((AppRow) info.extraInfo).lockScreenSecure
&& ((AppRow) info.extraInfo).appVisOverride == Notification.VISIBILITY_PRIVATE;
}
};
@@ -124,7 +133,10 @@
@Override
public boolean filterApp(AppEntry info) {
- return info.extraInfo != null && ((AppRow) info.extraInfo).lockScreenSecure
+ if (info == null || info.extraInfo == null) {
+ return false;
+ }
+ return ((AppRow) info.extraInfo).lockScreenSecure
&& ((AppRow) info.extraInfo).appVisOverride == Notification.VISIBILITY_SECRET;
}
};