1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-08-04 13:02:12 +02:00
Gadgetbridge/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/NotificationConfiguration.java

116 lines
3.1 KiB
Java
Raw Normal View History

package nodomain.freeyourgadget.gadgetbridge.devices.qhybrid;
import android.util.Log;
import java.io.Serializable;
2019-10-24 19:44:35 +02:00
import nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.misfit.PlayNotificationRequest;
2019-10-28 12:35:22 +01:00
public class NotificationConfiguration implements Serializable {
private short min, hour, subEye = -1;
private String packageName, appName;
2019-10-21 15:14:32 +02:00
private PlayNotificationRequest.VibrationType vibration;
private boolean respectSilentMode;
private long id = -1;
2019-10-28 12:35:22 +01:00
NotificationConfiguration(short min, short hour, String packageName, String appName, boolean respectSilentMode, PlayNotificationRequest.VibrationType vibration) {
this.min = min;
this.hour = hour;
this.packageName = packageName;
this.appName = appName;
this.respectSilentMode = respectSilentMode;
this.vibration = vibration;
}
2019-10-28 12:35:22 +01:00
public NotificationConfiguration(short min, short hour, short subEye, PlayNotificationRequest.VibrationType vibration) {
2019-10-24 19:44:35 +02:00
this.min = min;
this.hour = hour;
2019-10-28 12:35:22 +01:00
this.subEye = subEye;
2019-10-24 19:44:35 +02:00
this.vibration = vibration;
}
public NotificationConfiguration(short min, short hour, String packageName, String appName, boolean respectSilentMode, PlayNotificationRequest.VibrationType vibration, long id) {
this.min = min;
this.hour = hour;
this.packageName = packageName;
this.appName = appName;
this.respectSilentMode = respectSilentMode;
this.vibration = vibration;
this.id = id;
}
2019-10-28 12:35:22 +01:00
NotificationConfiguration(String packageName, String appName) {
this.min = -1;
this.hour = -1;
this.packageName = packageName;
this.appName = appName;
this.respectSilentMode = false;
2019-10-21 15:14:32 +02:00
this.vibration = PlayNotificationRequest.VibrationType.SINGLE_NORMAL;
this.id = -1;
}
2019-10-21 15:14:32 +02:00
public PlayNotificationRequest.VibrationType getVibration() {
return vibration;
}
2019-10-21 15:14:32 +02:00
public void setVibration(PlayNotificationRequest.VibrationType vibration) {
this.vibration = vibration;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public boolean getRespectSilentMode() {
Log.d("Config", "respect: " + respectSilentMode);
return respectSilentMode;
}
public void setRespectSilentMode(boolean respectSilentMode) {
this.respectSilentMode = respectSilentMode;
}
public void setMin(short min) {
this.min = min;
}
public void setHour(short hour) {
this.hour = hour;
}
public void setPackageName(String packageName) {
this.packageName = packageName;
}
public void setAppName(String appName) {
this.appName = appName;
}
public short getMin() {
return min;
}
public short getHour() {
return hour;
}
2019-10-28 12:35:22 +01:00
public short getSubEye() {
return subEye;
2019-10-24 19:44:35 +02:00
}
2019-10-28 12:35:22 +01:00
public void setSubEye(short subEye) {
this.subEye = subEye;
2019-10-24 19:44:35 +02:00
}
public String getPackageName() {
return packageName;
}
public String getAppName() {
return appName;
}
}