Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1137f872 authored by Fan Zhang's avatar Fan Zhang
Browse files

Use new settings preference theme in sysui tuner

- Also removed deprecated activity manifest entry for tuneractivity

Change-Id: Id3a8d25cd9e2bf18c999e273714a2b82fd14ffe8
Fix: 36663882
Test: visual
parent b0577592
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -270,21 +270,9 @@
                <action android:name="com.android.settings.action.EXTRA_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.category"
                    android:value="com.android.settings.category.system" />
        </activity>

        <activity-alias android:name=".tuner.TunerSettingLink"
                        android:targetActivity=".tuner.TunerActivity"
                        android:enabled="false"
                        android:process=":tuner">
            <intent-filter android:priority="1">
                <action android:name="com.android.settings.action.EXTRA_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.category"
                    android:value="com.android.settings.category.ia.system" />
        </activity-alias>
        </activity>

        <activity-alias android:name=".DemoMode"
                  android:targetActivity=".tuner.TunerActivity"
+0 −44
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2015 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.
-->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content">

    <RadioButton
        android:id="@+id/radio_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:clickable="false"
        android:focusable="false"
        android:layout_marginEnd="4dp" />

    <View
        android:layout_width="1dp"
        android:layout_height="match_parent"
        android:background="?android:attr/listDivider" />

    <Switch
        android:id="@*android:id/switch_widget"
        android:layout_width="50dp"
        android:layout_height="wrap_content"
        android:focusable="false"
        android:clickable="false"
        android:background="@null" />

</LinearLayout>
+1 −2
Original line number Diff line number Diff line
@@ -435,8 +435,7 @@
        <item name="preferenceTheme">@style/TunerPreferenceTheme</item>
    </style>

    <style name="TunerPreferenceTheme" parent="@android:style/Theme.DeviceDefault.Settings">
        <item name="dropdownPreferenceStyle">@style/Preference.DropDown.Material</item>
    <style name="TunerPreferenceTheme" parent="@style/PreferenceThemeOverlay.SettingsBase">
    </style>

    <style name="TextAppearance.NotificationInfo">
+0 −2
Original line number Diff line number Diff line
@@ -33,8 +33,6 @@ public class TunerActivity extends SettingsDrawerActivity implements
        PreferenceFragment.OnPreferenceStartFragmentCallback,
        PreferenceFragment.OnPreferenceStartScreenCallback {

    static final String ACTIVITY_ALIAS_NAME = "com.android.systemui.tuner.TunerSettingLink";

    private static final String TAG_TUNER = "tuner";

    protected void onCreate(Bundle savedInstanceState) {
+0 −6
Original line number Diff line number Diff line
@@ -68,12 +68,6 @@ public abstract class TunerService {
                enabled ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
                        : PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
                PackageManager.DONT_KILL_APP);

        userContext(context).getPackageManager().setComponentEnabledSetting(
                new ComponentName(context, TunerActivity.ACTIVITY_ALIAS_NAME),
                enabled ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
                        : PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
                PackageManager.DONT_KILL_APP);
    }

    public static final boolean isTunerEnabled(Context context) {