Revert" Cherish:Import ThemePicker Browser"
this commit 491132188e.
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
@@ -22,17 +22,6 @@
|
|||||||
android:key="system_theme_category"
|
android:key="system_theme_category"
|
||||||
android:title="@string/theme_type_title">
|
android:title="@string/theme_type_title">
|
||||||
|
|
||||||
<Preference
|
|
||||||
android:key="theme_select_activity"
|
|
||||||
android:title="@string/theme_select_title"
|
|
||||||
android:icon="@drawable/ic_system_theme"
|
|
||||||
android:summary="@string/theme_select_summary"
|
|
||||||
android:persistent="false" >
|
|
||||||
<intent android:action="android.intent.action.MAIN"
|
|
||||||
android:targetPackage="com.android.customization"
|
|
||||||
android:targetClass="com.android.customization.picker.CustomizationPickerActivity" />
|
|
||||||
</Preference>
|
|
||||||
|
|
||||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||||
android:key="accent_color"
|
android:key="accent_color"
|
||||||
android:icon="@drawable/ic_accent_picker"
|
android:icon="@drawable/ic_accent_picker"
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ public class ThemeSettings extends SettingsPreferenceFragment implements
|
|||||||
private static final String ACCENT_COLOR_PROP = "persist.sys.theme.accentcolor";
|
private static final String ACCENT_COLOR_PROP = "persist.sys.theme.accentcolor";
|
||||||
private static final String GRADIENT_COLOR = "gradient_color";
|
private static final String GRADIENT_COLOR = "gradient_color";
|
||||||
private static final String GRADIENT_COLOR_PROP = "persist.sys.theme.gradientcolor";
|
private static final String GRADIENT_COLOR_PROP = "persist.sys.theme.gradientcolor";
|
||||||
private static final String CUSTOM_THEME_BROWSE = "theme_select_activity";
|
|
||||||
static final int DEFAULT_QS_PANEL_COLOR = 0xffffffff;
|
static final int DEFAULT_QS_PANEL_COLOR = 0xffffffff;
|
||||||
static final int DEFAULT = 0xff1a73e8;
|
static final int DEFAULT = 0xff1a73e8;
|
||||||
|
|
||||||
@@ -67,7 +66,6 @@ public class ThemeSettings extends SettingsPreferenceFragment implements
|
|||||||
private ColorPickerPreference mThemeColor;
|
private ColorPickerPreference mThemeColor;
|
||||||
private ColorPickerPreference mGradientColor;
|
private ColorPickerPreference mGradientColor;
|
||||||
private ListPreference mThemeSwitch;
|
private ListPreference mThemeSwitch;
|
||||||
private Preference mThemeBrowse;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle icicle) {
|
public void onCreate(Bundle icicle) {
|
||||||
@@ -240,13 +238,6 @@ public class ThemeSettings extends SettingsPreferenceFragment implements
|
|||||||
mGradientColor.setOnPreferenceChangeListener(this);
|
mGradientColor.setOnPreferenceChangeListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isBrowseThemesAvailable() {
|
|
||||||
PackageManager pm = getPackageManager();
|
|
||||||
Intent browse = new Intent();
|
|
||||||
browse.setClassName("com.android.customization", "com.android.customization.picker.CustomizationPickerActivity");
|
|
||||||
return pm.resolveActivity(browse, 0) != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void handleBackgrounds(Boolean state, Context context, int mode, String[] overlays) {
|
private void handleBackgrounds(Boolean state, Context context, int mode, String[] overlays) {
|
||||||
if (context != null) {
|
if (context != null) {
|
||||||
Objects.requireNonNull(context.getSystemService(UiModeManager.class))
|
Objects.requireNonNull(context.getSystemService(UiModeManager.class))
|
||||||
|
|||||||
Reference in New Issue
Block a user