mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-25 10:22:16 -05:00
IRCService: Extracting constants and reordering class members.
This commit is contained in:
parent
89ff98b93d
commit
35a8d93cd0
@ -58,14 +58,16 @@ import android.os.SystemClock;
|
|||||||
*/
|
*/
|
||||||
public class IRCService extends Service
|
public class IRCService extends Service
|
||||||
{
|
{
|
||||||
private final IRCBinder binder;
|
public static final String ACTION_FOREGROUND = "org.yaaic.service.foreground";
|
||||||
private final HashMap<Integer, IRCConnection> connections;
|
public static final String ACTION_BACKGROUND = "org.yaaic.service.background";
|
||||||
private boolean foreground = false;
|
public static final String ACTION_ACK_NEW_MENTIONS = "org.yaaic.service.ack_new_mentions";
|
||||||
private final ArrayList<String> connectedServerTitles;
|
public static final String EXTRA_ACK_SERVERID = "org.yaaic.service.ack_serverid";
|
||||||
private final LinkedHashMap<String, Conversation> mentions;
|
public static final String EXTRA_ACK_CONVTITLE = "org.yaaic.service.ack_convtitle";
|
||||||
private int newMentions = 0;
|
|
||||||
|
|
||||||
private static final int FOREGROUND_NOTIFICATION = 1;
|
private static final int FOREGROUND_NOTIFICATION = 1;
|
||||||
|
private static final int NOTIFICATION_LED_OFF_MS = 1000;
|
||||||
|
private static final int NOTIFICATION_LED_ON_MS = 300;
|
||||||
|
private static final int NOTIFICATION_LED_COLOR = 0xff00ff00;
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
private static final Class[] mStartForegroundSignature = new Class[] { int.class, Notification.class };
|
private static final Class[] mStartForegroundSignature = new Class[] { int.class, Notification.class };
|
||||||
@ -74,11 +76,12 @@ public class IRCService extends Service
|
|||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
private static final Class[] mSetForegroudSignaure = new Class[] { boolean.class };
|
private static final Class[] mSetForegroudSignaure = new Class[] { boolean.class };
|
||||||
|
|
||||||
public static final String ACTION_FOREGROUND = "org.yaaic.service.foreground";
|
private final IRCBinder binder;
|
||||||
public static final String ACTION_BACKGROUND = "org.yaaic.service.background";
|
private final HashMap<Integer, IRCConnection> connections;
|
||||||
public static final String ACTION_ACK_NEW_MENTIONS = "org.yaaic.service.ack_new_mentions";
|
private boolean foreground = false;
|
||||||
public static final String EXTRA_ACK_SERVERID = "org.yaaic.service.ack_serverid";
|
private final ArrayList<String> connectedServerTitles;
|
||||||
public static final String EXTRA_ACK_CONVTITLE = "org.yaaic.service.ack_convtitle";
|
private final LinkedHashMap<String, Conversation> mentions;
|
||||||
|
private int newMentions = 0;
|
||||||
|
|
||||||
private NotificationManager notificationManager;
|
private NotificationManager notificationManager;
|
||||||
private Method mStartForeground;
|
private Method mStartForeground;
|
||||||
@ -257,9 +260,9 @@ public class IRCService extends Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (light) {
|
if (light) {
|
||||||
notification.ledARGB = 0xff00ff00;
|
notification.ledARGB = NOTIFICATION_LED_COLOR;
|
||||||
notification.ledOnMS = 300;
|
notification.ledOnMS = NOTIFICATION_LED_ON_MS;
|
||||||
notification.ledOffMS = 1000;
|
notification.ledOffMS = NOTIFICATION_LED_OFF_MS;
|
||||||
notification.flags |= Notification.FLAG_SHOW_LIGHTS;
|
notification.flags |= Notification.FLAG_SHOW_LIGHTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user