Snap for 13190096 from c847dc7e0e
to 25Q2-release
Change-Id: Iac3bcc01420bf43f3b967b3ce77d984a741fbe55
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:theme="@style/Theme.Material3.DynamicColors.DayNight"
|
||||
android:theme="@style/Theme.Network"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
@@ -49,13 +49,12 @@
|
||||
android:visibility="gone">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/vpn_label"
|
||||
style="@style/vpn_input_label"
|
||||
android:id="@+id/name_layout"
|
||||
android:hint="@string/vpn_name"
|
||||
app:endIconMode="clear_text"
|
||||
app:helperTextEnabled="true"
|
||||
app:helperText="@string/vpn_required"
|
||||
app:errorEnabled="true">
|
||||
app:helperText="@string/vpn_field_required">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/vpn_value"
|
||||
android:id="@+id/name"
|
||||
@@ -71,13 +70,12 @@
|
||||
android:entries="@array/vpn_types"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/vpn_label"
|
||||
style="@style/vpn_input_label"
|
||||
android:id="@+id/server_layout"
|
||||
android:hint="@string/vpn_server"
|
||||
app:endIconMode="clear_text"
|
||||
app:helperTextEnabled="true"
|
||||
app:helperText="@string/vpn_required"
|
||||
app:errorEnabled="true">
|
||||
app:helperText="@string/vpn_field_required">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/vpn_value"
|
||||
android:id="@+id/server"/>
|
||||
@@ -89,13 +87,12 @@
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/vpn_label"
|
||||
style="@style/vpn_input_label"
|
||||
android:id="@+id/ipsec_identifier_layout"
|
||||
android:hint="@string/vpn_ipsec_identifier"
|
||||
app:endIconMode="clear_text"
|
||||
app:helperTextEnabled="true"
|
||||
app:helperText="@string/vpn_required"
|
||||
app:errorEnabled="true">
|
||||
app:helperText="@string/vpn_field_required">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/vpn_value"
|
||||
android:id="@+id/ipsec_identifier"/>
|
||||
@@ -108,13 +105,12 @@
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/vpn_label"
|
||||
style="@style/vpn_input_label"
|
||||
android:id="@+id/ipsec_secret_layout"
|
||||
android:hint="@string/vpn_ipsec_secret"
|
||||
app:endIconMode="password_toggle"
|
||||
app:helperTextEnabled="true"
|
||||
app:helperText="@string/vpn_required"
|
||||
app:errorEnabled="true">
|
||||
app:helperText="@string/vpn_field_required">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/vpn_value"
|
||||
android:id="@+id/ipsec_secret"
|
||||
@@ -184,13 +180,10 @@
|
||||
android:visibility="gone" >
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/vpn_label"
|
||||
style="@style/vpn_input_label"
|
||||
android:id="@+id/vpn_proxy_host_layout"
|
||||
android:hint="@string/proxy_hostname_label"
|
||||
app:endIconMode="clear_text"
|
||||
app:helperTextEnabled="true"
|
||||
app:helperText="@string/vpn_optional"
|
||||
app:errorEnabled="true">
|
||||
app:endIconMode="clear_text">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/vpn_value"
|
||||
android:id="@+id/vpn_proxy_host"
|
||||
@@ -198,13 +191,10 @@
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/vpn_label"
|
||||
style="@style/vpn_input_label"
|
||||
android:id="@+id/vpn_proxy_port_layout"
|
||||
android:hint="@string/proxy_port_label"
|
||||
app:endIconMode="clear_text"
|
||||
app:helperTextEnabled="true"
|
||||
app:helperText="@string/vpn_optional"
|
||||
app:errorEnabled="true">
|
||||
app:endIconMode="clear_text">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/vpn_value"
|
||||
android:id="@+id/vpn_proxy_port"
|
||||
@@ -219,26 +209,20 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/vpn_label"
|
||||
style="@style/vpn_input_label"
|
||||
android:id="@+id/username_layout"
|
||||
android:hint="@string/vpn_username"
|
||||
app:endIconMode="clear_text"
|
||||
app:helperTextEnabled="true"
|
||||
app:helperText="@string/vpn_optional"
|
||||
app:errorEnabled="true">
|
||||
android:hint="@string/vpn_username_optional"
|
||||
app:endIconMode="clear_text">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/vpn_value"
|
||||
android:id="@+id/username"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/vpn_label"
|
||||
style="@style/vpn_input_label"
|
||||
android:id="@+id/password_layout"
|
||||
android:hint="@string/vpn_password"
|
||||
app:endIconMode="password_toggle"
|
||||
app:helperTextEnabled="true"
|
||||
app:helperText="@string/vpn_optional"
|
||||
app:errorEnabled="true">
|
||||
android:hint="@string/vpn_password_optional"
|
||||
app:endIconMode="password_toggle">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/vpn_value"
|
||||
android:id="@+id/password"
|
||||
|
@@ -364,7 +364,7 @@
|
||||
<!-- HTTP proxy settings. Button to clear the proxy box. -->
|
||||
<string name="proxy_clear_text">Clear</string>
|
||||
<!-- HTTP proxy settings. The port number label. -->
|
||||
<string name="proxy_port_label">Proxy port</string>
|
||||
<string name="proxy_port_label">Proxy port (optional)</string>
|
||||
<!-- HTTP proxy settings. The exclusion list label. -->
|
||||
<string name="proxy_exclusionlist_label">Bypass proxy for</string>
|
||||
<!-- HTTP proxy settings. The button to restore the defaults. -->
|
||||
@@ -372,7 +372,7 @@
|
||||
<!-- HTTP proxy settings. The button to save. -->
|
||||
<string name="proxy_action_text">Done</string>
|
||||
<!-- HTTP proxy settings. The text field for the hostname -->
|
||||
<string name="proxy_hostname_label">Proxy hostname</string>
|
||||
<string name="proxy_hostname_label">Proxy hostname (optional)</string>
|
||||
<!-- HTTP proxy settings. Title if there is an error-->
|
||||
<string name="proxy_error">Attention</string>
|
||||
<!-- HTTP proxy settings. Button to get rid of error box-->
|
||||
@@ -7262,15 +7262,15 @@ Data usage charges may apply.</string>
|
||||
<string name="data_usage_metered_yes">Metered</string>
|
||||
|
||||
<!-- Input label for the name of a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_name">Name</string>
|
||||
<string name="vpn_name">Name*</string>
|
||||
<!-- Input label for the type of a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_type">Type</string>
|
||||
<!-- Input label for the server address of a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_server">Server address</string>
|
||||
<string name="vpn_server">Server address*</string>
|
||||
<!-- Input label for the IPSec identifier of a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_ipsec_identifier">IPSec identifier</string>
|
||||
<string name="vpn_ipsec_identifier">IPSec identifier*</string>
|
||||
<!-- Input label for the IPSec pre-shared key of a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_ipsec_secret">IPSec pre-shared key</string>
|
||||
<string name="vpn_ipsec_secret">IPSec pre-shared key*</string>
|
||||
<!-- Selection label for the IPSec user certificate of a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_ipsec_user_cert">IPSec user certificate</string>
|
||||
<!-- Selection label for the IPSec CA certificate of a VPN profile. [CHAR LIMIT=40] -->
|
||||
@@ -7279,10 +7279,14 @@ Data usage charges may apply.</string>
|
||||
<string name="vpn_ipsec_server_cert">IPSec server certificate</string>
|
||||
<!-- Checkbox label to show advanced options of a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_show_options">Show advanced options</string>
|
||||
<!-- Input label for the username of a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_username">Username</string>
|
||||
<!-- Input label for the password of a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_password">Password</string>
|
||||
<!-- Input label for the optional username of a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_username_optional">Username (optional)</string>
|
||||
<!-- Input label for the optional password of a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_password_optional">Password (optional)</string>
|
||||
<!-- Input label for the required username of a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_username_required">Username*</string>
|
||||
<!-- Input label for the required password of a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_password_required">Password*</string>
|
||||
<!-- Checkbox label to save the username and the password in a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_save_login">Save account information</string>
|
||||
<!-- Hint for not using an optional feature in a VPN profile. [CHAR LIMIT=40] -->
|
||||
@@ -7295,12 +7299,9 @@ Data usage charges may apply.</string>
|
||||
generic error. [CHAR LIMIT=120] -->
|
||||
<string name="vpn_always_on_invalid_reason_other">The information entered doesn\'t support
|
||||
always-on VPN</string>
|
||||
<!-- Hint for an optional field in a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_optional">(optional)</string>
|
||||
<!-- Hint for a required field in a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_required">(required)</string>
|
||||
<!-- Error message displayed below the VPN EditText when the filed is required. [CHAR LIMIT=NONE] -->
|
||||
<string name="vpn_field_required">The field is required</string>
|
||||
<string name="vpn_field_required">*required</string>
|
||||
|
||||
<!-- Button label to cancel changing a VPN profile. [CHAR LIMIT=40] -->
|
||||
<string name="vpn_cancel">Cancel</string>
|
||||
|
@@ -207,6 +207,10 @@
|
||||
<item name="android:textColorHint">?android:attr/textColorSecondary</item>
|
||||
</style>
|
||||
|
||||
<style name="vpn_input_label" parent="vpn_label">
|
||||
<item name="android:paddingBottom">8dp</item>
|
||||
</style>
|
||||
|
||||
<style name="vpn_warning">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
|
@@ -28,8 +28,13 @@ import android.os.VibrationAttributes;
|
||||
import android.os.Vibrator;
|
||||
import android.provider.Settings;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.widget.SettingsMainSwitchPreferenceController;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
import com.android.settingslib.core.lifecycle.LifecycleObserver;
|
||||
import com.android.settingslib.core.lifecycle.events.OnStart;
|
||||
import com.android.settingslib.core.lifecycle.events.OnStop;
|
||||
@@ -42,11 +47,12 @@ import com.android.settingslib.core.lifecycle.events.OnStop;
|
||||
* be disabled by this setting, except the flagged alerts and accessibility touch feedback.
|
||||
*/
|
||||
// LINT.IfChange
|
||||
public class VibrationMainSwitchPreferenceController extends SettingsMainSwitchPreferenceController
|
||||
public class VibrationMainSwitchPreferenceController extends TogglePreferenceController
|
||||
implements LifecycleObserver, OnStart, OnStop {
|
||||
|
||||
private final ContentObserver mSettingObserver;
|
||||
private final Vibrator mVibrator;
|
||||
private @Nullable Preference mPreference;
|
||||
|
||||
public VibrationMainSwitchPreferenceController(Context context, String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
@@ -55,7 +61,9 @@ public class VibrationMainSwitchPreferenceController extends SettingsMainSwitchP
|
||||
mSettingObserver = new ContentObserver(handler) {
|
||||
@Override
|
||||
public void onChange(boolean selfChange, Uri uri) {
|
||||
updateState(mSwitchPreference);
|
||||
if (mPreference != null) {
|
||||
updateState(mPreference);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -65,6 +73,12 @@ public class VibrationMainSwitchPreferenceController extends SettingsMainSwitchP
|
||||
return AVAILABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayPreference(@NonNull PreferenceScreen screen) {
|
||||
super.displayPreference(screen);
|
||||
mPreference = screen.findPreference(getPreferenceKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
mContext.getContentResolver().registerContentObserver(
|
||||
|
@@ -21,8 +21,6 @@ import android.os.UserManager
|
||||
import android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE
|
||||
import android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC
|
||||
import android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceScreen
|
||||
import com.android.settings.R
|
||||
import com.android.settings.contract.KEY_ADAPTIVE_BRIGHTNESS
|
||||
import com.android.settings.flags.Flags
|
||||
@@ -37,19 +35,16 @@ import com.android.settingslib.datastore.SettingsStore
|
||||
import com.android.settingslib.datastore.SettingsSystemStore
|
||||
import com.android.settingslib.metadata.BooleanValuePreference
|
||||
import com.android.settingslib.metadata.PreferenceAvailabilityProvider
|
||||
import com.android.settingslib.metadata.PreferenceMetadata
|
||||
import com.android.settingslib.metadata.ProvidePreferenceScreen
|
||||
import com.android.settingslib.metadata.ReadWritePermit
|
||||
import com.android.settingslib.metadata.SensitivityLevel
|
||||
import com.android.settingslib.metadata.preferenceHierarchy
|
||||
import com.android.settingslib.preference.PreferenceScreenBinding
|
||||
import com.android.settingslib.preference.PreferenceScreenCreator
|
||||
|
||||
@ProvidePreferenceScreen(AutoBrightnessScreen.KEY)
|
||||
class AutoBrightnessScreen :
|
||||
PreferenceScreenCreator,
|
||||
PreferenceScreenBinding, // binding for screen page
|
||||
PrimarySwitchPreferenceBinding, // binding for screen entry point widget
|
||||
PrimarySwitchPreferenceBinding,
|
||||
PreferenceActionMetricsProvider,
|
||||
PreferenceAvailabilityProvider,
|
||||
PreferenceRestrictionMixin,
|
||||
@@ -106,12 +101,6 @@ class AutoBrightnessScreen :
|
||||
override val useAdminDisabledSummary: Boolean
|
||||
get() = true
|
||||
|
||||
override fun bind(preference: Preference, metadata: PreferenceMetadata) =
|
||||
when (preference) {
|
||||
is PreferenceScreen -> super<PreferenceScreenBinding>.bind(preference, metadata)
|
||||
else -> super<PrimarySwitchPreferenceBinding>.bind(preference, metadata)
|
||||
}
|
||||
|
||||
/**
|
||||
* The datastore for brightness, which is persisted as integer but the external type is boolean.
|
||||
*/
|
||||
|
@@ -21,7 +21,6 @@ import android.app.settings.SettingsEnums.ACTION_DARK_THEME
|
||||
import android.content.Context
|
||||
import android.os.PowerManager
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceScreen
|
||||
import com.android.settings.R
|
||||
import com.android.settings.contract.KEY_DARK_THEME
|
||||
import com.android.settings.flags.Flags
|
||||
@@ -36,15 +35,13 @@ import com.android.settingslib.metadata.ProvidePreferenceScreen
|
||||
import com.android.settingslib.metadata.ReadWritePermit
|
||||
import com.android.settingslib.metadata.SensitivityLevel
|
||||
import com.android.settingslib.metadata.preferenceHierarchy
|
||||
import com.android.settingslib.preference.PreferenceScreenBinding
|
||||
import com.android.settingslib.preference.PreferenceScreenCreator
|
||||
|
||||
// LINT.IfChange
|
||||
@ProvidePreferenceScreen(DarkModeScreen.KEY)
|
||||
class DarkModeScreen(context: Context) :
|
||||
PreferenceScreenCreator,
|
||||
PreferenceScreenBinding, // binding for screen page
|
||||
PrimarySwitchPreferenceBinding, // binding for screen entry point widget
|
||||
PrimarySwitchPreferenceBinding,
|
||||
PreferenceActionMetricsProvider,
|
||||
BooleanValuePreference,
|
||||
PreferenceSummaryProvider {
|
||||
@@ -94,11 +91,8 @@ class DarkModeScreen(context: Context) :
|
||||
override fun storage(context: Context): KeyValueStore = darkModeStorage
|
||||
|
||||
override fun bind(preference: Preference, metadata: PreferenceMetadata) {
|
||||
super.bind(preference, metadata)
|
||||
if (preference is DarkModePreference) preference.setCatalystEnabled(true)
|
||||
when (preference) {
|
||||
is PreferenceScreen -> super<PreferenceScreenBinding>.bind(preference, metadata)
|
||||
else -> super<PrimarySwitchPreferenceBinding>.bind(preference, metadata)
|
||||
}
|
||||
}
|
||||
|
||||
override fun isEnabled(context: Context) = !context.isPowerSaveMode()
|
||||
|
@@ -27,34 +27,44 @@ import android.os.Looper;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.widget.SettingsMainSwitchPreferenceController;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
import com.android.settingslib.core.lifecycle.LifecycleObserver;
|
||||
import com.android.settingslib.core.lifecycle.events.OnStart;
|
||||
import com.android.settingslib.core.lifecycle.events.OnStop;
|
||||
|
||||
/** The controller to handle double tap power button main switch enable or disable state. */
|
||||
public class DoubleTapPowerMainSwitchPreferenceController
|
||||
extends SettingsMainSwitchPreferenceController
|
||||
extends TogglePreferenceController
|
||||
implements LifecycleObserver, OnStart, OnStop {
|
||||
|
||||
private final ContentObserver mSettingsObserver =
|
||||
new ContentObserver(new Handler(Looper.getMainLooper())) {
|
||||
@Override
|
||||
public void onChange(boolean selfChange, @Nullable Uri uri) {
|
||||
if (mSwitchPreference == null || uri == null) {
|
||||
if (mPreference == null || uri == null) {
|
||||
return;
|
||||
}
|
||||
updateState(mSwitchPreference);
|
||||
updateState(mPreference);
|
||||
}
|
||||
};
|
||||
|
||||
private @Nullable Preference mPreference;
|
||||
|
||||
public DoubleTapPowerMainSwitchPreferenceController(
|
||||
@NonNull Context context, @NonNull String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayPreference(@NonNull PreferenceScreen screen) {
|
||||
super.displayPreference(screen);
|
||||
mPreference = screen.findPreference(getPreferenceKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return DoubleTapPowerSettingsUtils
|
||||
|
@@ -76,6 +76,7 @@ public class AppLocalePickerFragment extends DashboardFragment implements
|
||||
|
||||
private static final String TAG = "AppLocalePickerFragment";
|
||||
private static final String EXTRA_EXPAND_SEARCH_VIEW = "expand_search_view";
|
||||
private static final String EXTRA_SEARCH_VIEW_QUERY = "search_view_query";
|
||||
private static final String KEY_PREFERENCE_APP_LOCALE_LIST = "app_locale_list";
|
||||
private static final String KEY_PREFERENCE_APP_LOCALE_SUGGESTED_LIST =
|
||||
"app_locale_suggested_list";
|
||||
@@ -108,6 +109,7 @@ public class AppLocalePickerFragment extends DashboardFragment implements
|
||||
@Nullable
|
||||
private ApplicationInfo mApplicationInfo;
|
||||
private boolean mIsNumberingMode;
|
||||
private CharSequence mPreviousSearch = null;
|
||||
|
||||
@Override
|
||||
public void onCreate(@NonNull Bundle icicle) {
|
||||
@@ -137,6 +139,7 @@ public class AppLocalePickerFragment extends DashboardFragment implements
|
||||
mExpandSearch = mActivity.getIntent().getBooleanExtra(EXTRA_EXPAND_SEARCH_VIEW, false);
|
||||
if (icicle != null) {
|
||||
mExpandSearch = icicle.getBoolean(EXTRA_EXPAND_SEARCH_VIEW);
|
||||
mPreviousSearch = icicle.getCharSequence(EXTRA_SEARCH_VIEW_QUERY);
|
||||
}
|
||||
|
||||
AppLocaleCollector appLocaleCollector = new AppLocaleCollector(mActivity, mPackageName);
|
||||
@@ -163,6 +166,7 @@ public class AppLocalePickerFragment extends DashboardFragment implements
|
||||
super.onSaveInstanceState(outState);
|
||||
if (mSearchView != null) {
|
||||
outState.putBoolean(EXTRA_EXPAND_SEARCH_VIEW, !mSearchView.isIconified());
|
||||
outState.putCharSequence(EXTRA_SEARCH_VIEW_QUERY, mSearchView.getQuery());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,6 +185,15 @@ public class AppLocalePickerFragment extends DashboardFragment implements
|
||||
if (mExpandSearch) {
|
||||
searchMenuItem.expandActionView();
|
||||
}
|
||||
// Restore previous search status
|
||||
if (!TextUtils.isEmpty(mPreviousSearch)) {
|
||||
searchMenuItem.expandActionView();
|
||||
mSearchView.setIconified(false);
|
||||
mSearchView.setActivated(true);
|
||||
mSearchView.setQuery(mPreviousSearch, true /* submit */);
|
||||
} else {
|
||||
mSearchView.setQuery(null, false /* submit */);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -69,6 +69,7 @@ public class SystemLocalePickerFragment extends DashboardFragment implements
|
||||
|
||||
private static final String TAG = "SystemLocalePickerFragment";
|
||||
private static final String EXTRA_EXPAND_SEARCH_VIEW = "expand_search_view";
|
||||
private static final String EXTRA_SEARCH_VIEW_QUERY = "search_view_query";
|
||||
private static final String KEY_PREFERENCE_SYSTEM_LOCALE_LIST = "system_locale_list";
|
||||
private static final String KEY_PREFERENCE_SYSTEM_LOCALE_SUGGESTED_LIST =
|
||||
"system_locale_suggested_list";
|
||||
@@ -90,6 +91,7 @@ public class SystemLocalePickerFragment extends DashboardFragment implements
|
||||
private RecyclerView mRecyclerView;
|
||||
private Activity mActivity;
|
||||
private boolean mExpandSearch;
|
||||
private CharSequence mPreviousSearch = null;
|
||||
|
||||
@Override
|
||||
public void onCreate(@NonNull Bundle icicle) {
|
||||
@@ -103,6 +105,7 @@ public class SystemLocalePickerFragment extends DashboardFragment implements
|
||||
mExpandSearch = mActivity.getIntent().getBooleanExtra(EXTRA_EXPAND_SEARCH_VIEW, false);
|
||||
if (icicle != null) {
|
||||
mExpandSearch = icicle.getBoolean(EXTRA_EXPAND_SEARCH_VIEW);
|
||||
mPreviousSearch = icicle.getCharSequence(EXTRA_SEARCH_VIEW_QUERY);
|
||||
}
|
||||
|
||||
SystemLocaleCollector systemLocaleCollector = new SystemLocaleCollector(getContext(), null);
|
||||
@@ -135,6 +138,7 @@ public class SystemLocalePickerFragment extends DashboardFragment implements
|
||||
super.onSaveInstanceState(outState);
|
||||
if (mSearchView != null) {
|
||||
outState.putBoolean(EXTRA_EXPAND_SEARCH_VIEW, !mSearchView.isIconified());
|
||||
outState.putCharSequence(EXTRA_SEARCH_VIEW_QUERY, mSearchView.getQuery());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,6 +157,15 @@ public class SystemLocalePickerFragment extends DashboardFragment implements
|
||||
if (mExpandSearch) {
|
||||
searchMenuItem.expandActionView();
|
||||
}
|
||||
// Restore previous search status
|
||||
if (!TextUtils.isEmpty(mPreviousSearch)) {
|
||||
searchMenuItem.expandActionView();
|
||||
mSearchView.setIconified(false);
|
||||
mSearchView.setActivated(true);
|
||||
mSearchView.setQuery(mPreviousSearch, true /* submit */);
|
||||
} else {
|
||||
mSearchView.setQuery(null, false /* submit */);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -23,15 +23,14 @@ import android.provider.Settings;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.widget.SettingsMainSwitchPreferenceController;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
|
||||
/**
|
||||
* {@link SettingsMainSwitchPreferenceController}
|
||||
* {@link TogglePreferenceController}
|
||||
* that controls whether Adaptive connectivity option is enabled.
|
||||
*/
|
||||
// LINT.IfChange
|
||||
public class AdaptiveConnectivityTogglePreferenceController extends
|
||||
SettingsMainSwitchPreferenceController {
|
||||
public class AdaptiveConnectivityTogglePreferenceController extends TogglePreferenceController {
|
||||
|
||||
private final WifiManager mWifiManager;
|
||||
|
||||
|
@@ -43,13 +43,13 @@ import com.android.settingslib.metadata.PreferenceMetadata
|
||||
import com.android.settingslib.metadata.PreferenceSummaryProvider
|
||||
import com.android.settingslib.metadata.ProvidePreferenceScreen
|
||||
import com.android.settingslib.metadata.preferenceHierarchy
|
||||
import com.android.settingslib.preference.PreferenceScreenBinding
|
||||
import com.android.settingslib.preference.PreferenceBinding
|
||||
import com.android.settingslib.preference.PreferenceScreenCreator
|
||||
|
||||
@ProvidePreferenceScreen(MobileNetworkListScreen.KEY)
|
||||
class MobileNetworkListScreen :
|
||||
PreferenceScreenCreator,
|
||||
PreferenceScreenBinding,
|
||||
PreferenceBinding,
|
||||
PreferenceAvailabilityProvider,
|
||||
PreferenceSummaryProvider,
|
||||
PreferenceLifecycleProvider,
|
||||
|
@@ -25,10 +25,12 @@ import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import android.provider.Settings;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.widget.SettingsMainSwitchPreferenceController;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
import com.android.settingslib.core.lifecycle.LifecycleObserver;
|
||||
import com.android.settingslib.core.lifecycle.events.OnPause;
|
||||
import com.android.settingslib.core.lifecycle.events.OnResume;
|
||||
@@ -38,10 +40,11 @@ import com.android.settingslib.core.lifecycle.events.OnResume;
|
||||
* Allows user to turn bubbles on or off for the device.
|
||||
*/
|
||||
public class BubbleNotificationPreferenceController extends
|
||||
SettingsMainSwitchPreferenceController implements LifecycleObserver, OnResume, OnPause {
|
||||
TogglePreferenceController implements LifecycleObserver, OnResume, OnPause {
|
||||
|
||||
private static final String TAG = "BubbleNotifPrefContr";
|
||||
|
||||
private @Nullable Preference mPreference;
|
||||
private SettingObserver mSettingObserver;
|
||||
|
||||
public BubbleNotificationPreferenceController(Context context, String preferenceKey) {
|
||||
@@ -49,10 +52,11 @@ public class BubbleNotificationPreferenceController extends
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayPreference(PreferenceScreen screen) {
|
||||
public void displayPreference(@NonNull PreferenceScreen screen) {
|
||||
super.displayPreference(screen);
|
||||
if (mSwitchPreference != null) {
|
||||
mSettingObserver = new SettingObserver(mSwitchPreference);
|
||||
mPreference = screen.findPreference(getPreferenceKey());
|
||||
if (mPreference != null) {
|
||||
mSettingObserver = new SettingObserver(mPreference);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -21,10 +21,9 @@ import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.android.settings.widget.SettingsMainSwitchPreferenceController;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
|
||||
public class BundleGlobalPreferenceController extends
|
||||
SettingsMainSwitchPreferenceController {
|
||||
public class BundleGlobalPreferenceController extends TogglePreferenceController {
|
||||
|
||||
NotificationBackend mBackend;
|
||||
|
||||
|
@@ -22,10 +22,9 @@ import android.service.notification.Adjustment;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.android.settings.widget.SettingsMainSwitchPreferenceController;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
|
||||
public class BundleTypePreferenceController extends
|
||||
SettingsMainSwitchPreferenceController {
|
||||
public class BundleTypePreferenceController extends TogglePreferenceController {
|
||||
|
||||
static final String PROMO_KEY = "promotions";
|
||||
static final String NEWS_KEY = "news";
|
||||
|
@@ -33,10 +33,10 @@ import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.server.notification.Flags;
|
||||
import com.android.settings.widget.SettingsMainSwitchPreferenceController;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
|
||||
public class LockScreenNotificationsGlobalPreferenceController
|
||||
extends SettingsMainSwitchPreferenceController
|
||||
extends TogglePreferenceController
|
||||
implements LifecycleEventObserver {
|
||||
|
||||
public static final int ON = 1;
|
||||
|
@@ -22,10 +22,9 @@ import android.provider.Settings;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.android.server.notification.Flags;
|
||||
import com.android.settings.widget.SettingsMainSwitchPreferenceController;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
|
||||
public class PoliteNotificationGlobalPreferenceController extends
|
||||
SettingsMainSwitchPreferenceController {
|
||||
public class PoliteNotificationGlobalPreferenceController extends TogglePreferenceController {
|
||||
|
||||
public static final int ON = 1;
|
||||
public static final int OFF = 0;
|
||||
|
@@ -21,10 +21,9 @@ import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.android.settings.widget.SettingsMainSwitchPreferenceController;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
|
||||
public class SummarizationGlobalPreferenceController extends
|
||||
SettingsMainSwitchPreferenceController {
|
||||
public class SummarizationGlobalPreferenceController extends TogglePreferenceController {
|
||||
|
||||
NotificationBackend mBackend;
|
||||
|
||||
|
@@ -76,7 +76,6 @@ class ConfigDialog extends AlertDialog implements TextWatcher,
|
||||
private TextInputGroup mServerInput;
|
||||
private TextInputGroup mUsernameInput;
|
||||
private TextInputGroup mPasswordInput;
|
||||
private TextView mPassword;
|
||||
private Spinner mProxySettings;
|
||||
private TextView mProxyHost;
|
||||
private TextView mProxyPort;
|
||||
@@ -211,8 +210,10 @@ class ConfigDialog extends AlertDialog implements TextWatcher,
|
||||
setTitle(context.getString(R.string.vpn_connect_to, mProfile.name));
|
||||
|
||||
setUsernamePasswordVisibility(mProfile.type);
|
||||
mUsernameInput.setHelperText(context.getString(R.string.vpn_required));
|
||||
mPasswordInput.setHelperText(context.getString(R.string.vpn_required));
|
||||
mUsernameInput.setLabel(context.getString(R.string.vpn_username_required));
|
||||
mUsernameInput.setHelperText(context.getString(R.string.vpn_field_required));
|
||||
mPasswordInput.setLabel(context.getString(R.string.vpn_password_required));
|
||||
mPasswordInput.setHelperText(context.getString(R.string.vpn_field_required));
|
||||
|
||||
// Create a button to connect the network.
|
||||
setButton(DialogInterface.BUTTON_POSITIVE,
|
||||
|
@@ -19,6 +19,7 @@ package com.android.settings.widget
|
||||
import android.content.Context
|
||||
import androidx.preference.Preference
|
||||
import com.android.settingslib.metadata.PreferenceMetadata
|
||||
import com.android.settingslib.metadata.getPreferenceTitle
|
||||
import com.android.settingslib.preference.PreferenceBinding
|
||||
import com.android.settingslib.widget.FooterPreference
|
||||
import com.android.settingslib.widget.preference.footer.R
|
||||
|
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021 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.
|
||||
*/
|
||||
|
||||
package com.android.settings.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
import com.android.settingslib.widget.MainSwitchPreference;
|
||||
|
||||
/**
|
||||
* Preference controller for MainSwitchPreference.
|
||||
*
|
||||
* @deprecated Use {@link TogglePreferenceController} directly
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class SettingsMainSwitchPreferenceController extends
|
||||
TogglePreferenceController implements OnCheckedChangeListener {
|
||||
|
||||
protected MainSwitchPreference mSwitchPreference;
|
||||
|
||||
public SettingsMainSwitchPreferenceController(Context context, String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayPreference(PreferenceScreen screen) {
|
||||
super.displayPreference(screen);
|
||||
final Preference pref = screen.findPreference(getPreferenceKey());
|
||||
if (pref != null && pref instanceof MainSwitchPreference) {
|
||||
mSwitchPreference = (MainSwitchPreference) pref;
|
||||
mSwitchPreference.addOnSwitchChangeListener(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
mSwitchPreference.setChecked(isChecked);
|
||||
setChecked(isChecked);
|
||||
}
|
||||
}
|
@@ -59,6 +59,12 @@ open class TextInputGroup(
|
||||
editText.addTextChangedListener(watcher)
|
||||
}
|
||||
|
||||
var label: String
|
||||
get() = layout.hint?.toString() ?: ""
|
||||
set(value) {
|
||||
layout.setHint(value)
|
||||
}
|
||||
|
||||
var text: String
|
||||
get() = editText.text?.toString() ?: ""
|
||||
set(value) {
|
||||
@@ -75,6 +81,7 @@ open class TextInputGroup(
|
||||
get() = layout.error?.toString() ?: ""
|
||||
set(value) {
|
||||
layout.setError(value)
|
||||
if (value.isEmpty()) layout.isErrorEnabled = false
|
||||
}
|
||||
|
||||
open fun validate(): Boolean {
|
||||
|
@@ -97,7 +97,7 @@ class ColorInversionPreferenceTest {
|
||||
fun getSummary_colorInversionOn_verifySummary() {
|
||||
SettingsSecureStore.get(appContext).setInt(SETTING_KEY, AccessibilityUtil.State.ON)
|
||||
|
||||
assertThat(colorInversionPreference.getPreferenceSummary(appContext)).isEqualTo(
|
||||
assertThat(colorInversionPreference.getSummary(appContext)).isEqualTo(
|
||||
appContext.getText(
|
||||
R.string.color_inversion_state_on
|
||||
)
|
||||
@@ -108,7 +108,7 @@ class ColorInversionPreferenceTest {
|
||||
fun getSummary_colorInversionOff_verifySummary() {
|
||||
SettingsSecureStore.get(appContext).setInt(SETTING_KEY, AccessibilityUtil.State.OFF)
|
||||
|
||||
assertThat(colorInversionPreference.getPreferenceSummary(appContext)).isEqualTo(
|
||||
assertThat(colorInversionPreference.getSummary(appContext)).isEqualTo(
|
||||
appContext.getText(
|
||||
R.string.color_inversion_state_off
|
||||
)
|
||||
|
@@ -97,7 +97,7 @@ class DaltonizerPreferenceTest {
|
||||
fun getSummary_daltonizerOn_verifySummary() {
|
||||
SettingsSecureStore.get(appContext).setInt(SETTING_KEY, AccessibilityUtil.State.ON)
|
||||
|
||||
assertThat(daltonizerPreference.getPreferenceSummary(appContext)).isEqualTo(
|
||||
assertThat(daltonizerPreference.getSummary(appContext)).isEqualTo(
|
||||
appContext.getText(
|
||||
R.string.daltonizer_state_on
|
||||
)
|
||||
@@ -108,7 +108,7 @@ class DaltonizerPreferenceTest {
|
||||
fun getSummary_daltonizerOff_verifySummary() {
|
||||
SettingsSecureStore.get(appContext).setInt(SETTING_KEY, AccessibilityUtil.State.OFF)
|
||||
|
||||
assertThat(daltonizerPreference.getPreferenceSummary(appContext)).isEqualTo(
|
||||
assertThat(daltonizerPreference.getSummary(appContext)).isEqualTo(
|
||||
appContext.getText(
|
||||
R.string.daltonizer_state_off
|
||||
)
|
||||
|
@@ -57,7 +57,7 @@ class TetherScreenTest : CatalystScreenTestCase() {
|
||||
fun getPreferenceTitle_tetherConfigDisallowed_shouldShowAll() {
|
||||
ShadowRestrictedLockUtilsInternal.setRestricted(true)
|
||||
|
||||
assertThat(preferenceScreenCreator.getPreferenceTitle(appContext)).isEqualTo(
|
||||
assertThat(preferenceScreenCreator.getTitle(appContext)).isEqualTo(
|
||||
appContext.getString(R.string.tether_settings_title_all))
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ class TetherScreenTest : CatalystScreenTestCase() {
|
||||
ShadowRestrictedLockUtilsInternal.setRestricted(false)
|
||||
val tm = appContext.getSystemService(TetheringManager::class.java)
|
||||
|
||||
assertThat(preferenceScreenCreator.getPreferenceTitle(appContext)).isEqualTo(
|
||||
assertThat(preferenceScreenCreator.getTitle(appContext)).isEqualTo(
|
||||
appContext.getText(Utils.getTetheringLabel(tm)))
|
||||
}
|
||||
|
||||
|
@@ -31,7 +31,6 @@ import static org.mockito.Mockito.when;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
import android.provider.Settings;
|
||||
import android.widget.Switch;
|
||||
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.test.core.app.ApplicationProvider;
|
||||
@@ -66,9 +65,6 @@ public class BubbleNotificationPreferenceControllerTest {
|
||||
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
|
||||
private PreferenceScreen mScreen;
|
||||
|
||||
@Mock
|
||||
private Switch mSwitch;
|
||||
|
||||
private BubbleNotificationPreferenceController mController;
|
||||
private MainSwitchPreference mPreference;
|
||||
|
||||
@@ -113,7 +109,7 @@ public class BubbleNotificationPreferenceControllerTest {
|
||||
public void onSwitchChanged_true_settingIsOff_flagShouldOn() {
|
||||
Settings.Global.putInt(mContext.getContentResolver(), NOTIFICATION_BUBBLES, OFF);
|
||||
|
||||
mController.onCheckedChanged(mSwitch, true);
|
||||
mController.setChecked(true);
|
||||
|
||||
assertThat(Settings.Global.getInt(mContext.getContentResolver(),
|
||||
NOTIFICATION_BUBBLES, OFF)).isEqualTo(ON);
|
||||
@@ -123,7 +119,7 @@ public class BubbleNotificationPreferenceControllerTest {
|
||||
public void onSwitchChanged_false_settingIsOn_flagShouldOff() {
|
||||
Settings.Global.putInt(mContext.getContentResolver(), NOTIFICATION_BUBBLES, ON);
|
||||
|
||||
mController.onCheckedChanged(mSwitch, false);
|
||||
mController.setChecked(false);
|
||||
|
||||
assertThat(Settings.Global.getInt(mContext.getContentResolver(),
|
||||
NOTIFICATION_BUBBLES, ON)).isEqualTo(OFF);
|
||||
|
@@ -18,6 +18,7 @@ package com.android.settings.supervision
|
||||
import android.content.Context
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.android.settings.R
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -30,7 +31,7 @@ class SupervisionChangePinPreferenceTest {
|
||||
|
||||
@Test
|
||||
fun getTitle() {
|
||||
assertThat(supervisionChangePinPreference.getPreferenceTitle(context))
|
||||
.isEqualTo("Change PIN")
|
||||
assertThat(supervisionChangePinPreference.title)
|
||||
.isEqualTo(R.string.supervision_change_pin_preference_title)
|
||||
}
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@ package com.android.settings.supervision
|
||||
import android.content.Context
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.android.settings.R
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -35,13 +36,13 @@ class SupervisionPinManagementScreenTest {
|
||||
|
||||
@Test
|
||||
fun getTitle() {
|
||||
assertThat(supervisionPinManagementScreen.getPreferenceTitle(context))
|
||||
.isEqualTo("Manage PIN")
|
||||
assertThat(supervisionPinManagementScreen.title)
|
||||
.isEqualTo(R.string.supervision_pin_management_preference_title)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun getSummary_addPin() {
|
||||
assertThat(supervisionPinManagementScreen.getPreferenceSummary(context))
|
||||
.isEqualTo("Add a PIN recovery method")
|
||||
assertThat(supervisionPinManagementScreen.summary)
|
||||
.isEqualTo(R.string.supervision_pin_management_preference_summary_add)
|
||||
}
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@ package com.android.settings.supervision
|
||||
import android.content.Context
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.android.settings.R
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -30,7 +31,7 @@ class SupervisionPinRecoveryPreferenceTest {
|
||||
|
||||
@Test
|
||||
fun getTitle() {
|
||||
assertThat(supervisionPinRecoveryPreference.getPreferenceTitle(context))
|
||||
.isEqualTo("Forgot PIN")
|
||||
assertThat(supervisionPinRecoveryPreference.title)
|
||||
.isEqualTo(R.string.supervision_add_forgot_pin_preference_title)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@ package com.android.settings.supervision
|
||||
import android.content.Context
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.android.settings.R
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -35,7 +36,7 @@ class SupervisionWebContentFiltersScreenTest {
|
||||
|
||||
@Test
|
||||
fun getTitle() {
|
||||
assertThat(supervisionWebContentFiltersScreen.getPreferenceTitle(context))
|
||||
.isEqualTo("Web content filters")
|
||||
assertThat(supervisionWebContentFiltersScreen.title)
|
||||
.isEqualTo(R.string.supervision_web_content_filters_title)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user