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

Commit be061f8e authored by narinder Rana's avatar narinder Rana
Browse files

add lineageos.preference.HideNotificationSwitchPreference

parent f23af7ec
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -92,11 +92,18 @@
            android:title="@string/snooze_options_title"
            settings:controller="com.android.settings.notification.SnoozeNotificationPreferenceController" />

        <SwitchPreference
            android:key="hide_notification_icons"
<!--        <SwitchPreference-->
<!--            android:key="hide_notification_icons"-->
<!--            android:title="@string/hide_notification_icons"-->
<!--            settings:controller="com.android.settings.notification.HideNotificationIconsPreferenceController"-->
<!--             />-->

        <lineageos.preference.HideNotificationSwitchPreference
            android:key="heads_up_notifications_enabled"
            android:title="@string/hide_notification_icons"
            settings:controller="com.android.settings.notification.HideNotificationIconsPreferenceController"
           />
<!--        android:summary="@string/heads_up_notifications_enabled_summary"-->

        <!--settings:controller="com.android.settings.notification.HideNotificationIconsPreferenceController"-->
        <SwitchPreference
            android:key="asst_capabilities_actions_replies"
@@ -110,6 +117,8 @@
            android:title="@string/notification_badging_title"
            settings:controller="com.android.settings.notification.BadgingNotificationPreferenceController"/>



        <!-- Pulse notification light -->
        <SwitchPreference
            android:key="notification_pulse"
+0 −59
Original line number Diff line number Diff line
@@ -49,22 +49,15 @@ public class HideNotificationIconsPreferenceController extends TogglePreferenceC

        super(context, preferenceKey);

        Log.e("Setting....", "Setting ...HideNotificationIconsPreferenceController.................. ");
    }

    @Override
    public int getAvailabilityStatus() {
        Log.e("Setting....", "Setting ...getAvailabilityStatus.................. ");

        return AVAILABLE;
    }

    @Override
    public boolean isChecked() {


        Log.e("Setting....", "Setting ...isChecked.................. ");

        return Settings.Secure.getInt(mContext.getContentResolver(),
                LineageSettings.System.HIDE_NOTIFICATIONICON_LEFT_SYSTEM_ICON, OFF) == ON;
    }
@@ -82,56 +75,4 @@ public class HideNotificationIconsPreferenceController extends TogglePreferenceC
        return out;
    }

//
//
//
//        AbstractPreferenceController
//        implements PreferenceControllerMixin, Preference.OnPreferenceChangeListener {
//
//            static final String HIDE_NOTIFICATIONICON_LEFT_SYSTEM_ICON = "hide_notificationIcon_left_system_icon";
//
//    public HideNotificationIconsPreferenceController(Context context) {
//                super(context);
//            }
//
//
//            @Override
//            public boolean isAvailable() {
//                Log.e("Setting....", "Setting ...isAvailable ");
//                // LineageSettings.System.HIDE_NOTIFICATIONICON_LEFT_SYSTEM_ICON;
//                return true;
//            }
//
//            @Override
//            public String getPreferenceKey() {
//                Log.e("Setting....", "Setting ...getPreferenceKey ");
//                return HIDE_NOTIFICATIONICON_LEFT_SYSTEM_ICON;
//            }
//
//            @Override
//            public void updateState(Preference preference) {
//                Log.e("Setting....", "Setting ...updateState ");
//                ((TwoStatePreference) preference).setChecked(LineageSettings.System.getInt(
//                        mContext.getContentResolver(),
//                        LineageSettings.System.HIDE_NOTIFICATIONICON_LEFT_SYSTEM_ICON,
//                        0) == 1);
//
//
//            }
//
//
//
//            @Override
//            public boolean onPreferenceChange(Preference preference, Object newValue) {
//
//                Log.e("Setting....", "Setting ...onPreferenceChange ");
//                LineageSettings.System.putInt(
//                        mContext.getContentResolver(),
//                        LineageSettings.System.HIDE_NOTIFICATIONICON_LEFT_SYSTEM_ICON,
//                        (Boolean) newValue ? 1 : 0);
//                return true;
//    }



}