Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
VolumeZen: Sound & Notifications settings.
Browse files Browse the repository at this point in the history
- Add sound settings under the newly combined Sound & Notifications
  top-level settings page.
- New slider preferences for setting audio stream volumes.
- Migrate checkbox prefs to switch prefs.
- New settings subpage for touch sounds.
- New settings subpage for "Showing notifications"
- New setting pref for displaying intercepted notifications in zen mode.
- New tri-state lockscreen notifications pref.
- Add priority + sensitivity options to app notification dialog.
- Remove badges on app notifications row, migrate to subtitle text.
- Migrate strings to common spot in strings.xml
- Remove heads up setting.
- Remove tweaks category (unused).
- Clean up notification settings, separate out into a code section per option.
- Clean up _settings.xml files, prefix each pref with option name.
- Add appropriate indexing data to each settings page.

Depends on f/b change Ic30aa575ae07650cee62c8c1d83b6bc69395cf0d

Change-Id: If700385a7d0057f6c4c4bcf6e648dcf88b8ebff2
  • Loading branch information
John Spurlock committed May 18, 2014
1 parent ba046c0 commit 81bef1d
Show file tree
Hide file tree
Showing 17 changed files with 1,324 additions and 341 deletions.
47 changes: 47 additions & 0 deletions AndroidManifest.xml
Expand Up @@ -1722,6 +1722,53 @@
android:resource="@id/notification_settings" />
</activity>

<activity android:name="Settings$NotificationDisplaySettingsActivity"
android:label="@string/notification_display_settings"
android:exported="true"
android:taskAffinity=""
android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.settings.ACTION_NOTIFICATION_DISPLAY_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.NotificationDisplaySettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
android:resource="@id/notification_settings" />
</activity>

<activity android:name="Settings$TouchSoundSettingsActivity"
android:label="@string/touch_sound_settings"
android:exported="true"
android:taskAffinity=""
android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.settings.ACTION_TOUCH_SOUND_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.TouchSoundSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
android:resource="@id/notification_settings" />
</activity>

<activity android:name="Settings$AppNotificationSettingsActivity"
android:label="@string/app_notifications_title"
android:exported="true"
android:taskAffinity=""
android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.settings.ACTION_APP_NOTIFICATION_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.notification.AppNotificationSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
android:resource="@id/notification_settings" />
</activity>

<!-- Show regulatory info (from settings item or dialing "*#07#") -->
<activity android:name="RegulatoryInfoDisplayActivity"
Expand Down
2 changes: 1 addition & 1 deletion proguard.flags
Expand Up @@ -12,8 +12,8 @@
-keep class com.android.settings.accounts.*
-keep class com.android.settings.fuelgauge.*
-keep class com.android.settings.users.*
-keep class com.android.settings.NotificationStation
-keep class com.android.settings.nfc.*
-keep class com.android.settings.notification.*

# Keep click responders
-keepclassmembers class com.android.settings.inputmethod.UserDictionaryAddWordActivity {
Expand Down
32 changes: 12 additions & 20 deletions res/layout/notification_app.xml
Expand Up @@ -33,26 +33,6 @@
android:contentDescription="@null"
android:scaleType="center" />

<ImageView
android:id="@android:id/icon1"
android:layout_width="@dimen/notification_app_icon_badge_size"
android:layout_height="@dimen/notification_app_icon_badge_size"
android:layout_marginLeft="@dimen/notification_app_icon_badge_margin"
android:layout_marginTop="@dimen/notification_app_icon_badge_margin"
android:background="#bb8b0000"
android:contentDescription="@null" />

<ImageView
android:id="@android:id/icon2"
android:layout_width="@dimen/notification_app_icon_badge_size"
android:layout_height="@dimen/notification_app_icon_badge_size"
android:layout_alignBottom="@android:id/icon"
android:layout_alignEnd="@android:id/icon"
android:layout_marginBottom="@dimen/notification_app_icon_badge_margin"
android:layout_marginEnd="@dimen/notification_app_icon_badge_margin"
android:background="#bb006400"
android:contentDescription="@null" />

<TextView
android:id="@android:id/title"
android:layout_width="match_parent"
Expand All @@ -63,6 +43,18 @@
android:singleLine="true"
android:textAlignment="viewStart"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="@dimen/notification_app_icon_size"
android:layout_toEndOf="@android:id/icon"
android:gravity="bottom"
android:ellipsize="end"
android:singleLine="true"
android:textAlignment="viewStart"
android:textColor="#888"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>

<View
Expand Down
18 changes: 18 additions & 0 deletions res/layout/notification_app_dialog.xml
Expand Up @@ -44,4 +44,22 @@
android:text="@string/app_notifications_dialog_show"
android:textAppearance="?android:attr/textAppearanceListItem" />

<CheckBox
android:id="@android:id/button2"
android:layout_width="match_parent"
android:layout_height="@dimen/notification_app_icon_size"
android:layout_below="@android:id/button1"
android:layout_marginStart="@dimen/content_margin_left"
android:text="@string/app_notifications_dialog_priority"
android:textAppearance="?android:attr/textAppearanceListItem" />

<CheckBox
android:id="@android:id/button3"
android:layout_width="match_parent"
android:layout_height="@dimen/notification_app_icon_size"
android:layout_below="@android:id/button2"
android:layout_marginStart="@dimen/content_margin_left"
android:text="@string/app_notifications_dialog_visibility"
android:textAppearance="?android:attr/textAppearanceListItem" />

</RelativeLayout>

0 comments on commit 81bef1d

Please sign in to comment.