mirror of
https://gitlab.com/neothefox/LayTray
synced 2026-03-23 13:44:53 +03:00
Better NotificationChannel handling
Bumped the version to 1.8
This commit is contained in:
parent
bccc0bca6c
commit
85ee301a16
@ -6,8 +6,8 @@ android {
|
||||
applicationId "space.neothefox.laytray"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 26
|
||||
versionCode 8
|
||||
versionName "1.7"
|
||||
versionCode 9
|
||||
versionName "1.8"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
|
||||
@ -54,15 +54,18 @@ implements SharedPreferences.OnSharedPreferenceChangeListener{
|
||||
iconManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
|
||||
iconChannel = new NotificationChannel(
|
||||
channelId,
|
||||
"LayTray IconChannel",
|
||||
NotificationManager.IMPORTANCE_DEFAULT);
|
||||
iconChannel.setShowBadge(false);
|
||||
iconChannel.enableLights(false);
|
||||
iconChannel.enableVibration(false);
|
||||
iconChannel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
|
||||
iconManager.createNotificationChannel(iconChannel);
|
||||
iconChannel = iconManager.getNotificationChannel(channelId);
|
||||
if(iconChannel == null) {
|
||||
iconChannel = new NotificationChannel(
|
||||
channelId,
|
||||
getString(R.string.title_icon_channel),
|
||||
NotificationManager.IMPORTANCE_DEFAULT);
|
||||
iconChannel.setShowBadge(false);
|
||||
iconChannel.enableLights(false);
|
||||
iconChannel.enableVibration(false);
|
||||
iconChannel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
|
||||
iconManager.createNotificationChannel(iconChannel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -55,4 +55,5 @@
|
||||
<string name="title_about">Аб праграме</string>
|
||||
<string name="close">Зачыніць</string>
|
||||
<string name="unsupported_device">Тэлефон не падтрымліваецца</string>
|
||||
<string name="title_icon_channel">Iконкa раскладкі</string>
|
||||
</resources>
|
||||
|
||||
@ -55,4 +55,5 @@
|
||||
<string name="title_about">О программе</string>
|
||||
<string name="close">Закрыть</string>
|
||||
<string name="unsupported_device">Телефон не поддерживается</string>
|
||||
<string name="title_icon_channel">Иконка раскладки</string>
|
||||
</resources>
|
||||
@ -8,6 +8,7 @@
|
||||
<string name="unsupported_device">Unsupported phone</string>
|
||||
<string name="unsupported_device_description" translatable="false">This phone is missing the BlackBerry Keyboard. LayTray will not work without it.</string>
|
||||
<string name="close">Close</string>
|
||||
<string name="title_icon_channel">Layout icon</string>
|
||||
<!-- Strings related to Settings -->
|
||||
|
||||
<!-- Example General settings -->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user