|
|
@ -1025,9 +1025,14 @@ public class MicroPhotoService extends Service {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
Intent intent = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
|
|
|
|
Intent intent = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
|
|
|
|
|
|
|
|
int noDelay = 1;
|
|
|
|
|
|
|
|
intent.putExtra("noDelay", noDelay);
|
|
|
|
PendingIntent restartIntent = PendingIntent.getActivity(context, 0, intent, 0);
|
|
|
|
PendingIntent restartIntent = PendingIntent.getActivity(context, 0, intent, 0);
|
|
|
|
AlarmManager mgr = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
|
|
|
|
AlarmManager mgr = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
|
|
|
|
mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 500, restartIntent);
|
|
|
|
// mgr.setExactAndAllowWhileIdle(AlarmManager.RTC, System.currentTimeMillis() + 500, restartIntent);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mgr.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime() + 500, restartIntent);
|
|
|
|
|
|
|
|
|
|
|
|
System.exit(0);
|
|
|
|
System.exit(0);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|