HeadsUp: Stop showing notifications when selected applications on top

Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
xyyx
2018-09-07 16:40:31 +05:30
committed by Hưng Phan
parent a0d84ada10
commit 3076662eed
5 changed files with 360 additions and 0 deletions

7
res/drawable/ic_plus.xml Normal file
View File

@@ -0,0 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="?android:attr/colorControlNormal" android:pathData="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" />
</vector>

View File

@@ -500,4 +500,16 @@
<string name="qs_bg_use_new_tint">QS tile colors</string>
<string name="qs_bg_use_new_tint_summary">Use accent color for qs tile icons and background</string>
<!-- Heads up -->
<string name="heads_up_notifications">Heads Up</string>
<string name="heads_up_summary">Customize Heads Up Behavior</string>
<string name="summary_heads_up_enabled">Pop-up notifications are enabled</string>
<string name="summary_heads_up_disabled">Pop-up notifications are disabled</string>
<string name="add_heads_up_package">Add app</string>
<string name="add_heads_up_stoplist_summary">Disable heads up notifications in these applications</string>
<string name="heads_up_stoplist_title">Applist</string>
<string name="profile_choose_app">Choose app</string>
<string name="dialog_delete_title">Delete</string>
<string name="dialog_delete_message">Remove selected item?</string>
</resources>

View File

@@ -17,6 +17,14 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/notifications_title"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<!-- Heads up -->
<Preference
android:key="heads_up_notifications"
android:title="@string/heads_up_notifications"
android:summary="@string/heads_up_summary"
android:icon="@drawable/ic_plus"
android:fragment="com.cherish.settings.fragments.HeadsUpSettings" />
<Preference
android:key="notification_light"

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 The CherishOS 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.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/notifications_title"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<!-- Heads up -->
<Preference
android:key="heads_up_notifications"
android:title="@string/heads_up_notifications"
android:summary="@string/heads_up_summary"
android:fragment="com.cherish.settings.fragments.HeadsUpSettings" />
<Preference
android:key="notification_light"
android:fragment="com.android.settings.applications.manageapplications.ManageApplications"
android:title="@string/notification_light_settings" >
<extra
android:name="classname"
android:value="com.android.settings.Settings$NotificationAppListActivity" />
</Preference>
<Preference
android:key="charging_light"
android:icon="@drawable/ic_battery_almostfull"
android:fragment="com.cherish.settings.fragments.BatteryLightSettings"
android:title="@string/battery_light_settings" />
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="notification_sound_vib_screen_on"
android:icon="@drawable/ic_notification"
android:title="@string/notification_sound_vib_screen_on_title"
android:summary="@string/notification_sound_vib_screen_on_summary"
android:defaultValue="true" />
</PreferenceScreen>