@Test public void callUninstallBeforeInstall() { assertThat(LocationCollectionClient.uninstall()).isFalse(); }
static boolean uninstall() { boolean uninstalled = false; synchronized (lock) { if (locationCollectionClient != null) { locationCollectionClient.locationEngineController.onDestroy(); locationCollectionClient.settingsChangeHandlerThread.quit(); locationCollectionClient.sharedPreferences.unregisterOnSharedPreferenceChangeListener(locationCollectionClient); locationCollectionClient = null; uninstalled = true; } } return uninstalled; }
LocationCollectionClient implements SharedPreferences.OnSharedPreferenceChangeListener { static boolean uninstall() { boolean uninstalled = false; synchronized (lock) { if (locationCollectionClient != null) { locationCollectionClient.locationEngineController.onDestroy(); locationCollectionClient.settingsChangeHandlerThread.quit(); locationCollectionClient.sharedPreferences.unregisterOnSharedPreferenceChangeListener(locationCollectionClient); locationCollectionClient = null; uninstalled = true; } } return uninstalled; } }
LocationCollectionClient implements SharedPreferences.OnSharedPreferenceChangeListener { static boolean uninstall() { boolean uninstalled = false; synchronized (lock) { if (locationCollectionClient != null) { locationCollectionClient.locationEngineController.onDestroy(); locationCollectionClient.settingsChangeHandlerThread.quit(); locationCollectionClient.sharedPreferences.unregisterOnSharedPreferenceChangeListener(locationCollectionClient); locationCollectionClient = null; uninstalled = true; } } return uninstalled; } @VisibleForTesting  LocationCollectionClient(@NonNull LocationEngineController collectionController,
                           @NonNull HandlerThread handlerThread,
                           @NonNull SessionIdentifier sessionIdentifier,
                           @NonNull SharedPreferences sharedPreferences,
                           @NonNull MapboxTelemetry telemetry); }
LocationCollectionClient implements SharedPreferences.OnSharedPreferenceChangeListener { static boolean uninstall() { boolean uninstalled = false; synchronized (lock) { if (locationCollectionClient != null) { locationCollectionClient.locationEngineController.onDestroy(); locationCollectionClient.settingsChangeHandlerThread.quit(); locationCollectionClient.sharedPreferences.unregisterOnSharedPreferenceChangeListener(locationCollectionClient); locationCollectionClient = null; uninstalled = true; } } return uninstalled; } @VisibleForTesting  LocationCollectionClient(@NonNull LocationEngineController collectionController,
                           @NonNull HandlerThread handlerThread,
                           @NonNull SessionIdentifier sessionIdentifier,
                           @NonNull SharedPreferences sharedPreferences,
                           @NonNull MapboxTelemetry telemetry); static LocationCollectionClient install(@NonNull Context context, long defaultInterval); @Override void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key); }
LocationCollectionClient implements SharedPreferences.OnSharedPreferenceChangeListener { static boolean uninstall() { boolean uninstalled = false; synchronized (lock) { if (locationCollectionClient != null) { locationCollectionClient.locationEngineController.onDestroy(); locationCollectionClient.settingsChangeHandlerThread.quit(); locationCollectionClient.sharedPreferences.unregisterOnSharedPreferenceChangeListener(locationCollectionClient); locationCollectionClient = null; uninstalled = true; } } return uninstalled; } @VisibleForTesting  LocationCollectionClient(@NonNull LocationEngineController collectionController,
                           @NonNull HandlerThread handlerThread,
                           @NonNull SessionIdentifier sessionIdentifier,
                           @NonNull SharedPreferences sharedPreferences,
                           @NonNull MapboxTelemetry telemetry); static LocationCollectionClient install(@NonNull Context context, long defaultInterval); @Override void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key); static final int DEFAULT_SESSION_ROTATION_INTERVAL_HOURS; }