优化代码

heatbeat
Matthew 3 months ago
parent 341045651c
commit 2167afa1d8

@ -162,8 +162,6 @@ public class MicroPhotoService extends Service {
private ServiceHandler mHander = null; private ServiceHandler mHander = null;
private Messenger mMessenger = null; private Messenger mMessenger = null;
private static AtomicInteger mPendingIntentFeed = new AtomicInteger();
private String mModelName = null; private String mModelName = null;
public static boolean isRunning = false; public static boolean isRunning = false;
@ -1527,7 +1525,7 @@ public class MicroPhotoService extends Service {
Intent intent = new Intent(); Intent intent = new Intent();
intent.setAction(ACTION_GPS_TIMEOUT); intent.setAction(ACTION_GPS_TIMEOUT);
mPreviousGpsTimer = PendingIntent.getBroadcast(this, mPendingIntentFeed.getAndIncrement(), intent, 0); mPreviousGpsTimer = PendingIntent.getBroadcast(this, BROADCAST_REQUEST_CODE_GPS, intent, 0);
alarmManager.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime() + mGpsTimeout, mPreviousGpsTimer); alarmManager.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime() + mGpsTimeout, mPreviousGpsTimer);
} catch (Exception ex) { } catch (Exception ex) {

Loading…
Cancel
Save