@Test public void pauseGeofence_nativePaused() { mTestProvider.pauseHardwareGeofence(GEOFENCE_ID); verify(mMockNative).pauseGeofence(eq(GEOFENCE_ID)); }
@Override public boolean pauseHardwareGeofence(int geofenceId) { return runOnHandlerThread(() -> { boolean paused = mNative.pauseGeofence(geofenceId); if (paused) { GeofenceEntry entry = mGeofenceEntries.get(geofenceId); if (entry != null) { entry.paused = true; } } return paused; }); }
GnssGeofenceProvider extends IGpsGeofenceHardware.Stub { @Override public boolean pauseHardwareGeofence(int geofenceId) { return runOnHandlerThread(() -> { boolean paused = mNative.pauseGeofence(geofenceId); if (paused) { GeofenceEntry entry = mGeofenceEntries.get(geofenceId); if (entry != null) { entry.paused = true; } } return paused; }); } }
GnssGeofenceProvider extends IGpsGeofenceHardware.Stub { @Override public boolean pauseHardwareGeofence(int geofenceId) { return runOnHandlerThread(() -> { boolean paused = mNative.pauseGeofence(geofenceId); if (paused) { GeofenceEntry entry = mGeofenceEntries.get(geofenceId); if (entry != null) { entry.paused = true; } } return paused; }); } GnssGeofenceProvider(Looper looper); @VisibleForTesting  GnssGeofenceProvider(Looper looper, GnssGeofenceProviderNative gnssGeofenceProviderNative); }
GnssGeofenceProvider extends IGpsGeofenceHardware.Stub { @Override public boolean pauseHardwareGeofence(int geofenceId) { return runOnHandlerThread(() -> { boolean paused = mNative.pauseGeofence(geofenceId); if (paused) { GeofenceEntry entry = mGeofenceEntries.get(geofenceId); if (entry != null) { entry.paused = true; } } return paused; }); } GnssGeofenceProvider(Looper looper); @VisibleForTesting  GnssGeofenceProvider(Looper looper, GnssGeofenceProviderNative gnssGeofenceProviderNative); @Override boolean isHardwareGeofenceSupported(); @Override boolean addCircularHardwareGeofence(int geofenceId, double latitude,
            double longitude, double radius, int lastTransition, int monitorTransitions,
            int notificationResponsiveness, int unknownTimer); @Override boolean removeHardwareGeofence(int geofenceId); @Override boolean pauseHardwareGeofence(int geofenceId); @Override boolean resumeHardwareGeofence(int geofenceId, int monitorTransitions); }
GnssGeofenceProvider extends IGpsGeofenceHardware.Stub { @Override public boolean pauseHardwareGeofence(int geofenceId) { return runOnHandlerThread(() -> { boolean paused = mNative.pauseGeofence(geofenceId); if (paused) { GeofenceEntry entry = mGeofenceEntries.get(geofenceId); if (entry != null) { entry.paused = true; } } return paused; }); } GnssGeofenceProvider(Looper looper); @VisibleForTesting  GnssGeofenceProvider(Looper looper, GnssGeofenceProviderNative gnssGeofenceProviderNative); @Override boolean isHardwareGeofenceSupported(); @Override boolean addCircularHardwareGeofence(int geofenceId, double latitude,
            double longitude, double radius, int lastTransition, int monitorTransitions,
            int notificationResponsiveness, int unknownTimer); @Override boolean removeHardwareGeofence(int geofenceId); @Override boolean pauseHardwareGeofence(int geofenceId); @Override boolean resumeHardwareGeofence(int geofenceId, int monitorTransitions);  }