Use more AndroidX preference

This commit is contained in:
TacoTheDank 2020-08-31 19:19:34 -04:00
parent 50e803b018
commit 3c3e2eda8b
7 changed files with 13 additions and 10 deletions

View File

@ -21,9 +21,10 @@ import android.accounts.AccountManager;
import android.content.Context; import android.content.Context;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.os.Build; import android.os.Build;
import android.preference.PreferenceManager;
import android.util.Log; import android.util.Log;
import androidx.preference.PreferenceManager;
import org.microg.gms.common.PackageUtils; import org.microg.gms.common.PackageUtils;
import java.io.IOException; import java.io.IOException;

View File

@ -8,7 +8,8 @@ package org.microg.gms.checkin;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import androidx.preference.PreferenceManager;
public class CheckinPrefs implements SharedPreferences.OnSharedPreferenceChangeListener { public class CheckinPrefs implements SharedPreferences.OnSharedPreferenceChangeListener {
public static final String PREF_ENABLE_CHECKIN = "checkin_enable_service"; public static final String PREF_ENABLE_CHECKIN = "checkin_enable_service";

View File

@ -21,9 +21,10 @@ import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.net.ConnectivityManager; import android.net.ConnectivityManager;
import android.net.NetworkInfo; import android.net.NetworkInfo;
import android.preference.PreferenceManager;
import android.util.Log; import android.util.Log;
import androidx.preference.PreferenceManager;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;

View File

@ -18,12 +18,12 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/account_manager_title"> <PreferenceCategory android:title="@string/account_manager_title">
<SwitchPreference <SwitchPreferenceCompat
android:defaultValue="true" android:defaultValue="true"
android:key="auth_manager_trust_google" android:key="auth_manager_trust_google"
android:summary="@string/pref_auth_trust_google_summary" android:summary="@string/pref_auth_trust_google_summary"
android:title="@string/pref_auth_trust_google_title"/> android:title="@string/pref_auth_trust_google_title"/>
<SwitchPreference <SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"
android:key="auth_manager_visible" android:key="auth_manager_visible"
android:summary="@string/pref_auth_visible_summary" android:summary="@string/pref_auth_visible_summary"

View File

@ -17,7 +17,7 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreference <SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"
android:key="gcm_confirm_new_apps" android:key="gcm_confirm_new_apps"
android:summary="@string/pref_gcm_confirm_new_apps_summary" android:summary="@string/pref_gcm_confirm_new_apps_summary"

View File

@ -16,13 +16,13 @@
--> -->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreference <SwitchPreferenceCompat
android:defaultValue="true" android:defaultValue="true"
android:enabled="false" android:enabled="false"
android:key="network_google_enabled" android:key="network_google_enabled"
android:summary="If disabled, all connections to Google servers usually done by microG will be denied. This overrides service specific settings." android:summary="If disabled, all connections to Google servers usually done by microG will be denied. This overrides service specific settings."
android:title="Allow connecting to Google servers"/> android:title="Allow connecting to Google servers"/>
<SwitchPreference <SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"
android:dependency="network_google_enabled" android:dependency="network_google_enabled"
android:enabled="false" android:enabled="false"

View File

@ -10,14 +10,14 @@
android:key="prefcat_push_app_settings" android:key="prefcat_push_app_settings"
android:layout="@layout/preference_category_no_label"> android:layout="@layout/preference_category_no_label">
<SwitchPreference <SwitchPreferenceCompat
android:defaultValue="true" android:defaultValue="true"
android:key="pref_push_app_allow_register" android:key="pref_push_app_allow_register"
android:persistent="false" android:persistent="false"
android:summary="@string/pref_push_app_allow_register_summary" android:summary="@string/pref_push_app_allow_register_summary"
android:title="@string/pref_push_app_allow_register_title" /> android:title="@string/pref_push_app_allow_register_title" />
<SwitchPreference <SwitchPreferenceCompat
android:defaultValue="true" android:defaultValue="true"
android:key="pref_push_app_wake_for_delivery" android:key="pref_push_app_wake_for_delivery"
android:persistent="false" android:persistent="false"