@Test(expected = IllegalStateException.class) public void callGetInstanceBeforeInstall() { LocationCollectionClient.getInstance(); }
@NonNull static LocationCollectionClient getInstance() { synchronized (lock) { if (locationCollectionClient != null) { return locationCollectionClient; } else { throw new IllegalStateException("LocationCollectionClient is not installed."); } } }
LocationCollectionClient implements SharedPreferences.OnSharedPreferenceChangeListener { @NonNull static LocationCollectionClient getInstance() { synchronized (lock) { if (locationCollectionClient != null) { return locationCollectionClient; } else { throw new IllegalStateException("LocationCollectionClient is not installed."); } } } }
LocationCollectionClient implements SharedPreferences.OnSharedPreferenceChangeListener { @NonNull static LocationCollectionClient getInstance() { synchronized (lock) { if (locationCollectionClient != null) { return locationCollectionClient; } else { throw new IllegalStateException("LocationCollectionClient is not installed."); } } } @VisibleForTesting  LocationCollectionClient(@NonNull LocationEngineController collectionController,
                           @NonNull HandlerThread handlerThread,
                           @NonNull SessionIdentifier sessionIdentifier,
                           @NonNull SharedPreferences sharedPreferences,
                           @NonNull MapboxTelemetry telemetry); }
LocationCollectionClient implements SharedPreferences.OnSharedPreferenceChangeListener { @NonNull static LocationCollectionClient getInstance() { synchronized (lock) { if (locationCollectionClient != null) { return locationCollectionClient; } else { throw new IllegalStateException("LocationCollectionClient is not installed."); } } } @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 { @NonNull static LocationCollectionClient getInstance() { synchronized (lock) { if (locationCollectionClient != null) { return locationCollectionClient; } else { throw new IllegalStateException("LocationCollectionClient is not installed."); } } } @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; }