2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 22:25:08 +00:00

Explain that the notification can be hidden in Android 9

This commit is contained in:
Albert Vaca
2018-10-25 19:19:57 +02:00
parent 39ac8c9096
commit 6771024a00
2 changed files with 4 additions and 0 deletions

View File

@@ -299,5 +299,6 @@
<string name="settings_more_settings_text">Per-device settings can be found under \'Plugin settings\' from within a device.</string>
<string name="setting_persistent_notification">Show persistent notification</string>
<string name="setting_persistent_notification_oreo_description">Required by Android since Android 8.0</string>
<string name="setting_persistent_notification_pie_description">Since Android 9.0, this notification can only be minimized by long tapping on it</string>
</resources>

View File

@@ -88,6 +88,9 @@ public class SettingsFragment extends PreferenceFragmentCompat implements MainAc
notificationSwitch.setChecked(NotificationHelper.isPersistentNotificationEnabled(context));
notificationSwitch.setTitle(R.string.setting_persistent_notification);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
notificationSwitch.setSummary(R.string.setting_persistent_notification_pie_description);
notificationSwitch.setEnabled(false);
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
notificationSwitch.setSummary(R.string.setting_persistent_notification_oreo_description);
notificationSwitch.setEnabled(false);
}