cleanup.
This commit is contained in:
parent
a283586a3c
commit
815c3c17a9
1 changed files with 0 additions and 41 deletions
|
@ -354,47 +354,6 @@ public class ListenerService extends WearableListenerService implements GoogleAp
|
||||||
params.putString("actionstring", actionstring);
|
params.putString("actionstring", actionstring);
|
||||||
intent.putExtras(params);
|
intent.putExtras(params);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
|
||||||
/*
|
|
||||||
if(confirmThread != null){
|
|
||||||
confirmThread.invalidate();
|
|
||||||
}
|
|
||||||
|
|
||||||
Intent actionIntent = new Intent(this, ListenerService.class);
|
|
||||||
actionIntent.setAction(ACTION_CONFIRMATION);
|
|
||||||
actionIntent.putExtra("actionstring", actionstring);
|
|
||||||
PendingIntent actionPendingIntent = PendingIntent.getService(this, 0, actionIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_UPDATE_CURRENT);;
|
|
||||||
|
|
||||||
long[] vibratePattern = new long[]{0, 100, 50, 100, 50};
|
|
||||||
|
|
||||||
NotificationCompat.Builder notificationBuilder =
|
|
||||||
new NotificationCompat.Builder(this)
|
|
||||||
.setSmallIcon(R.drawable.ic_icon)
|
|
||||||
.setContentTitle(title)
|
|
||||||
.setContentText(message)
|
|
||||||
.setContentIntent(actionPendingIntent)
|
|
||||||
.setPriority(NotificationCompat.PRIORITY_MAX)
|
|
||||||
.setVibrate(vibratePattern)
|
|
||||||
.setStyle(new NotificationCompat.BigTextStyle().bigText(message))
|
|
||||||
.extend(new NotificationCompat.WearableExtender())
|
|
||||||
.addAction(R.drawable.ic_confirm, title, actionPendingIntent);
|
|
||||||
|
|
||||||
NotificationManagerCompat notificationManager =
|
|
||||||
NotificationManagerCompat.from(this);
|
|
||||||
|
|
||||||
notificationManager.notify(CONFIRM_NOTIF_ID, notificationBuilder.build());
|
|
||||||
|
|
||||||
// keep the confirmation dialog open for one minute.
|
|
||||||
scheduleDismissConfirm(60);
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
private void scheduleDismissConfirm(final int seconds) {
|
|
||||||
if(confirmThread != null){
|
|
||||||
confirmThread.invalidate();
|
|
||||||
}
|
|
||||||
confirmThread = new DismissThread(CONFIRM_NOTIF_ID, seconds);
|
|
||||||
confirmThread.start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void scheduleDismissBolusprogress(final int seconds) {
|
private void scheduleDismissBolusprogress(final int seconds) {
|
||||||
|
|
Loading…
Reference in a new issue