Ranem NotificationType.UNDEFINED to UNKNOWN
parent
17c152596b
commit
92c629c351
|
@ -279,7 +279,7 @@ public class NotificationListener extends NotificationListenerService {
|
||||||
notificationSpec.type = NotificationType.FACEBOOK;
|
notificationSpec.type = NotificationType.FACEBOOK;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
notificationSpec.type = NotificationType.UNDEFINED;
|
notificationSpec.type = NotificationType.UNKNOWN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class PebbleReceiver extends BroadcastReceiver {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notificationSpec.title != null) {
|
if (notificationSpec.title != null) {
|
||||||
notificationSpec.type = NotificationType.UNDEFINED;
|
notificationSpec.type = NotificationType.UNKNOWN;
|
||||||
String sender = intent.getStringExtra("sender");
|
String sender = intent.getStringExtra("sender");
|
||||||
if ("Conversations".equals(sender)) {
|
if ("Conversations".equals(sender)) {
|
||||||
notificationSpec.type = NotificationType.CHAT;
|
notificationSpec.type = NotificationType.CHAT;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package nodomain.freeyourgadget.gadgetbridge.model;
|
||||||
|
|
||||||
public enum NotificationType {
|
public enum NotificationType {
|
||||||
|
|
||||||
UNDEFINED,
|
UNKNOWN,
|
||||||
|
|
||||||
CHAT,
|
CHAT,
|
||||||
EMAIL,
|
EMAIL,
|
||||||
|
|
|
@ -578,7 +578,7 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
|
||||||
task = "chat message received";
|
task = "chat message received";
|
||||||
alertLevel = MiBand2Service.ALERT_LEVEL_MESSAGE;
|
alertLevel = MiBand2Service.ALERT_LEVEL_MESSAGE;
|
||||||
break;
|
break;
|
||||||
case UNDEFINED:
|
case UNKNOWN:
|
||||||
default:
|
default:
|
||||||
task = "generic notification received";
|
task = "generic notification received";
|
||||||
alertLevel = MiBand2Service.ALERT_LEVEL_VIBRATE_ONLY;
|
alertLevel = MiBand2Service.ALERT_LEVEL_VIBRATE_ONLY;
|
||||||
|
|
|
@ -554,7 +554,7 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
|
||||||
case FACEBOOK:
|
case FACEBOOK:
|
||||||
performPreferredNotification("chat message received", origin, null);
|
performPreferredNotification("chat message received", origin, null);
|
||||||
break;
|
break;
|
||||||
case UNDEFINED:
|
case UNKNOWN:
|
||||||
default:
|
default:
|
||||||
performPreferredNotification("generic notification received", origin, null);
|
performPreferredNotification("generic notification received", origin, null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,18 +230,18 @@
|
||||||
android:defaultValue="@string/p_waterdrop"
|
android:defaultValue="@string/p_waterdrop"
|
||||||
android:entries="@array/vibration_profile"
|
android:entries="@array/vibration_profile"
|
||||||
android:entryValues="@array/vibration_profile_values"
|
android:entryValues="@array/vibration_profile_values"
|
||||||
android:key="mi_vibration_profile_undefined"
|
android:key="mi_vibration_profile_unknown"
|
||||||
android:title="@string/miband_prefs_vibration"
|
android:title="@string/miband_prefs_vibration"
|
||||||
android:summary="%s" />
|
android:summary="%s" />
|
||||||
|
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:defaultValue="3"
|
android:defaultValue="3"
|
||||||
android:inputType="number"
|
android:inputType="number"
|
||||||
android:key="mi_vibration_count_undefined"
|
android:key="mi_vibration_count_unknown"
|
||||||
android:maxLength="1"
|
android:maxLength="1"
|
||||||
android:title="@string/pref_title_notifications_repetitions" />
|
android:title="@string/pref_title_notifications_repetitions" />
|
||||||
<Preference
|
<Preference
|
||||||
android:key="mi_try_undefined"
|
android:key="mi_try_unknown"
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
android:title="@string/vibration_try"/>
|
android:title="@string/vibration_try"/>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
Loading…
Reference in New Issue