Merge "Update R accessibility assets and strings (8/n)" into rvc-dev
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 9396a15..5a6ad4a 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -4913,19 +4913,19 @@
<!-- Title for the accessibility tutorial dialog in gesture navigation settings. [CHAR LIMIT=50] -->
<string name="accessibility_tutorial_dialog_title_gesture_settings">Use new accessibility gesture</string>
<!-- Message for the accessibility tutorial dialog when user enables an accessibility service while using the 3-button nav bar. [CHAR LIMIT=NONE] -->
- <string name="accessibility_tutorial_dialog_message_button">To turn this app on or off, tap the accessibility button <xliff:g id="accessibility_icon" example="[Icon]">%s</xliff:g> on the bottom of your screen.\n\nTo switch between apps, touch & hold the accessibility button.</string>
+ <string name="accessibility_tutorial_dialog_message_button">To turn this feature on or off, tap the accessibility button <xliff:g id="accessibility_icon" example="[Icon]">%s</xliff:g> on the bottom of your screen.\n\nTo switch between features, touch & hold the accessibility button.</string>
<!-- Instruction for the accessibility tutorial dialog in accessibility service with volume keys. [CHAR LIMIT=100] -->
- <string name="accessibility_tutorial_dialog_message_volume">To turn this app on or off, press & hold both volume keys for 1 second.</string>
+ <string name="accessibility_tutorial_dialog_message_volume">To turn this feature on or off, press & hold both volume keys.</string>
<!-- Instruction for the accessibility tutorial dialog in accessibility service with triple tap. [CHAR LIMIT=100] -->
<string name="accessibility_tutorial_dialog_message_triple">To start and stop magnification, triple-tap anywhere on your screen.</string>
<!-- Message for the accessibility tutorial dialog when user enables an accessibility service while using gesture navigation and touch exploration is not enabled. [CHAR LIMIT=NONE] -->
- <string name="accessibility_tutorial_dialog_message_gesture">To turn this app on or off, swipe up from the bottom of the screen with two fingers.\n\nTo switch between apps, swipe up with two fingers and hold.</string>
+ <string name="accessibility_tutorial_dialog_message_gesture">To turn this feature on or off, swipe up from the bottom of the screen with 2 fingers.\n\nTo switch between features, swipe up with 2 fingers and hold.</string>
<!-- Message for the accessibility tutorial dialog when user enables an accessibility service while using gesture navigation and touch exploration is enabled. [CHAR LIMIT=NONE] -->
- <string name="accessibility_tutorial_dialog_message_gesture_talkback">To turn this app on or off, swipe up from the bottom of the screen with three fingers.\n\nTo switch between apps, swipe up with three fingers and hold.</string>
+ <string name="accessibility_tutorial_dialog_message_gesture_talkback">To turn this feature on or off, swipe up from the bottom of the screen with 3 fingers.\n\nTo switch between features, swipe up with 3 fingers and hold.</string>
<!-- Message for the accessibility tutorial dialog when user chooses gesture navigation in navigation settings, an accessibility service is using the accessibility button, and touch exploration is disabled. [CHAR LIMIT=NONE] -->
- <string name="accessibility_tutorial_dialog_message_gesture_settings">To turn an accessibility app on or off, swipe up from the bottom of the screen with two fingers.\n\nTo switch between apps, swipe up with two fingers and hold.</string>
+ <string name="accessibility_tutorial_dialog_message_gesture_settings">To turn an accessibility feature on or off, swipe up from the bottom of the screen with 2 fingers.\n\nTo switch between features, swipe up with 2 fingers and hold.</string>
<!-- Message for the accessibility tutorial dialog when user chooses gesture navigation in navigation settings, an accessibility service is using the accessibility button, and touch exploration is enabled. [CHAR LIMIT=NONE] -->
- <string name="accessibility_tutorial_dialog_message_gesture_settings_talkback">To turn an accessibility app on or off, swipe up from the bottom of the screen with three fingers.\n\nTo switch between apps, swipe up with three fingers and hold.</string>
+ <string name="accessibility_tutorial_dialog_message_gesture_settings_talkback">To turn an accessibility feature on or off, swipe up from the bottom of the screen with 3 fingers.\n\nTo switch between features, swipe up with 3 fingers and hold.</string>
<!-- Button for the accessibility tutorial dialog to dismiss the dialog when user clicks it. [CHAR LIMIT=10] -->
<string name="accessibility_tutorial_dialog_button">Got it</string>
<!-- Title for accessibility shortcut preference for accessibility apps. [CHAR LIMIT=40] -->
diff --git a/src/com/android/settings/network/ims/ImsQueryController.java b/src/com/android/settings/network/ims/ImsQueryController.java
index 068a805..3f17da2 100644
--- a/src/com/android/settings/network/ims/ImsQueryController.java
+++ b/src/com/android/settings/network/ims/ImsQueryController.java
@@ -83,6 +83,9 @@
@VisibleForTesting
boolean isProvisionedOnDevice(int subId) {
+ if (!SubscriptionManager.isValidSubscriptionId(subId)) {
+ return false;
+ }
return (new ImsQueryProvisioningStat(subId, mCapability, mTech)).query();
}
diff --git a/src/com/android/settings/network/ims/VolteQueryImsState.java b/src/com/android/settings/network/ims/VolteQueryImsState.java
index 22fb529..1fa72d7 100644
--- a/src/com/android/settings/network/ims/VolteQueryImsState.java
+++ b/src/com/android/settings/network/ims/VolteQueryImsState.java
@@ -60,6 +60,9 @@
*/
@VisibleForTesting
boolean isEnabledByUser(int subId) {
+ if (!SubscriptionManager.isValidSubscriptionId(subId)) {
+ return false;
+ }
return (new ImsQueryEnhanced4gLteModeUserSetting(subId)).query();
}
@@ -75,6 +78,9 @@
* @return true when VoLTE has been enabled, otherwise false
*/
public boolean isVoLteProvisioned() {
+ if (!SubscriptionManager.isValidSubscriptionId(mSubId)) {
+ return false;
+ }
if (!isProvisionedOnDevice(mSubId)) {
return false;
}
@@ -92,6 +98,9 @@
* @return true when VoLTE can be performed, otherwise false
*/
public boolean isReadyToVoLte() {
+ if (!SubscriptionManager.isValidSubscriptionId(mSubId)) {
+ return false;
+ }
return isVoLteProvisioned()
&& MobileNetworkUtils.isImsServiceStateReady(getImsManager(mSubId));
}
diff --git a/src/com/android/settings/network/ims/VtQueryImsState.java b/src/com/android/settings/network/ims/VtQueryImsState.java
index c077603..f6de512 100644
--- a/src/com/android/settings/network/ims/VtQueryImsState.java
+++ b/src/com/android/settings/network/ims/VtQueryImsState.java
@@ -59,6 +59,9 @@
*/
@VisibleForTesting
boolean isEnabledByUser(int subId) {
+ if (!SubscriptionManager.isValidSubscriptionId(subId)) {
+ return false;
+ }
return (new ImsQueryVtUserSetting(subId)).query();
}
diff --git a/src/com/android/settings/network/ims/WifiCallingQueryImsState.java b/src/com/android/settings/network/ims/WifiCallingQueryImsState.java
index 1667b7f..bdf021c 100644
--- a/src/com/android/settings/network/ims/WifiCallingQueryImsState.java
+++ b/src/com/android/settings/network/ims/WifiCallingQueryImsState.java
@@ -56,6 +56,9 @@
*/
@VisibleForTesting
boolean isEnabledByUser(int subId) {
+ if (!SubscriptionManager.isValidSubscriptionId(subId)) {
+ return false;
+ }
return (new ImsQueryWfcUserSetting(subId)).query();
}
@@ -71,6 +74,9 @@
* @return true when Wifi Calling has been enabled, otherwise false
*/
public boolean isWifiCallingProvisioned() {
+ if (!SubscriptionManager.isValidSubscriptionId(mSubId)) {
+ return false;
+ }
final ImsManager imsManager = getImsManager(mSubId);
if (imsManager == null) {
return false;
@@ -86,6 +92,9 @@
* @return true when Wifi Calling can be performed, otherwise false
*/
public boolean isReadyToWifiCalling() {
+ if (!SubscriptionManager.isValidSubscriptionId(mSubId)) {
+ return false;
+ }
return isWifiCallingProvisioned()
&& MobileNetworkUtils.isImsServiceStateReady(getImsManager(mSubId));
}
diff --git a/src/com/android/settings/network/telephony/DisabledSubscriptionController.java b/src/com/android/settings/network/telephony/DisabledSubscriptionController.java
index e6cace4..b5febdd 100644
--- a/src/com/android/settings/network/telephony/DisabledSubscriptionController.java
+++ b/src/com/android/settings/network/telephony/DisabledSubscriptionController.java
@@ -28,16 +28,21 @@
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceScreen;
-import com.android.settings.core.BasePreferenceController;
import com.android.settings.network.SubscriptionsChangeListener;
-public class DisabledSubscriptionController extends BasePreferenceController implements
+/**
+ * Preference controller group which can hide UI option from visible when SIM is no longer in
+ * active.
+ */
+public class DisabledSubscriptionController extends TelephonyBasePreferenceController implements
SubscriptionsChangeListener.SubscriptionsChangeListenerClient, LifecycleObserver {
private PreferenceCategory mCategory;
- private int mSubId;
private SubscriptionsChangeListener mChangeListener;
private SubscriptionManager mSubscriptionManager;
+ /**
+ * Constructor of preference controller
+ */
public DisabledSubscriptionController(Context context, String preferenceKey) {
super(context, preferenceKey);
mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
@@ -45,6 +50,9 @@
mChangeListener = new SubscriptionsChangeListener(context, this);
}
+ /**
+ * Re-initialize the configuration based on subscription id provided
+ */
public void init(Lifecycle lifecycle, int subId) {
lifecycle.addObserver(this);
mSubId = subId;
@@ -69,7 +77,7 @@
}
private void update() {
- if (mCategory == null || mSubId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
+ if (mCategory == null || !SubscriptionManager.isValidSubscriptionId(mSubId)) {
return;
}
// TODO b/135222940: re-evaluate whether to use mSubscriptionManager#isSubscriptionEnabled
@@ -77,7 +85,7 @@
}
@Override
- public int getAvailabilityStatus() {
+ public int getAvailabilityStatus(int subId) {
return AVAILABLE_UNSEARCHABLE;
}
diff --git a/src/com/android/settings/network/telephony/cdma/CdmaBasePreferenceController.java b/src/com/android/settings/network/telephony/cdma/CdmaBasePreferenceController.java
index 07805b0..a100d70 100644
--- a/src/com/android/settings/network/telephony/cdma/CdmaBasePreferenceController.java
+++ b/src/com/android/settings/network/telephony/cdma/CdmaBasePreferenceController.java
@@ -44,7 +44,6 @@
protected Preference mPreference;
protected TelephonyManager mTelephonyManager;
protected PreferenceManager mPreferenceManager;
- protected int mSubId;
private DataContentObserver mDataContentObserver;
public CdmaBasePreferenceController(Context context, String key) {
diff --git a/src/com/android/settings/wifi/WifiNoInternetDialog.java b/src/com/android/settings/wifi/WifiNoInternetDialog.java
index 1c83c80..ccfda3a 100644
--- a/src/com/android/settings/wifi/WifiNoInternetDialog.java
+++ b/src/com/android/settings/wifi/WifiNoInternetDialog.java
@@ -117,7 +117,7 @@
finish();
return;
}
- mNetworkName = nc.getSSID();
+ mNetworkName = nc.getSsid();
if (mNetworkName != null) {
mNetworkName = WifiInfo.sanitizeSsid(mNetworkName);
}