@Test public void register_nativeStarted() { mTestProvider.registerWithService(); verify(mMockNative).startMeasurementCollection(anyBoolean()); }
@Override protected int registerWithService() { int devOptions = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0); int fullTrackingToggled = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.ENABLE_GNSS_RAW_MEAS_FULL_TRACKING, 0); boolean enableFullTracking = (devOptions == 1 ) && (fullTrackingToggled == 1 ); boolean result = mNative.startMeasurementCollection(enableFullTracking); if (result) { mIsCollectionStarted = true; mEnableFullTracking = enableFullTracking; return RemoteListenerHelper.RESULT_SUCCESS; } else { return RemoteListenerHelper.RESULT_INTERNAL_ERROR; } }
GnssMeasurementsProvider extends
        RemoteListenerHelper<IGnssMeasurementsListener> { @Override protected int registerWithService() { int devOptions = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0); int fullTrackingToggled = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.ENABLE_GNSS_RAW_MEAS_FULL_TRACKING, 0); boolean enableFullTracking = (devOptions == 1 ) && (fullTrackingToggled == 1 ); boolean result = mNative.startMeasurementCollection(enableFullTracking); if (result) { mIsCollectionStarted = true; mEnableFullTracking = enableFullTracking; return RemoteListenerHelper.RESULT_SUCCESS; } else { return RemoteListenerHelper.RESULT_INTERNAL_ERROR; } } }
GnssMeasurementsProvider extends
        RemoteListenerHelper<IGnssMeasurementsListener> { @Override protected int registerWithService() { int devOptions = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0); int fullTrackingToggled = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.ENABLE_GNSS_RAW_MEAS_FULL_TRACKING, 0); boolean enableFullTracking = (devOptions == 1 ) && (fullTrackingToggled == 1 ); boolean result = mNative.startMeasurementCollection(enableFullTracking); if (result) { mIsCollectionStarted = true; mEnableFullTracking = enableFullTracking; return RemoteListenerHelper.RESULT_SUCCESS; } else { return RemoteListenerHelper.RESULT_INTERNAL_ERROR; } } protected  GnssMeasurementsProvider(Context context, Handler handler); @VisibleForTesting  GnssMeasurementsProvider(Context context, Handler handler,
            GnssMeasurementProviderNative aNative); }
GnssMeasurementsProvider extends
        RemoteListenerHelper<IGnssMeasurementsListener> { @Override protected int registerWithService() { int devOptions = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0); int fullTrackingToggled = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.ENABLE_GNSS_RAW_MEAS_FULL_TRACKING, 0); boolean enableFullTracking = (devOptions == 1 ) && (fullTrackingToggled == 1 ); boolean result = mNative.startMeasurementCollection(enableFullTracking); if (result) { mIsCollectionStarted = true; mEnableFullTracking = enableFullTracking; return RemoteListenerHelper.RESULT_SUCCESS; } else { return RemoteListenerHelper.RESULT_INTERNAL_ERROR; } } protected  GnssMeasurementsProvider(Context context, Handler handler); @VisibleForTesting  GnssMeasurementsProvider(Context context, Handler handler,
            GnssMeasurementProviderNative aNative); @Override boolean isAvailableInPlatform(); void onMeasurementsAvailable(final GnssMeasurementsEvent event); void onCapabilitiesUpdated(boolean isGnssMeasurementsSupported); void onGpsEnabledChanged(); }
GnssMeasurementsProvider extends
        RemoteListenerHelper<IGnssMeasurementsListener> { @Override protected int registerWithService() { int devOptions = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0); int fullTrackingToggled = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.ENABLE_GNSS_RAW_MEAS_FULL_TRACKING, 0); boolean enableFullTracking = (devOptions == 1 ) && (fullTrackingToggled == 1 ); boolean result = mNative.startMeasurementCollection(enableFullTracking); if (result) { mIsCollectionStarted = true; mEnableFullTracking = enableFullTracking; return RemoteListenerHelper.RESULT_SUCCESS; } else { return RemoteListenerHelper.RESULT_INTERNAL_ERROR; } } protected  GnssMeasurementsProvider(Context context, Handler handler); @VisibleForTesting  GnssMeasurementsProvider(Context context, Handler handler,
            GnssMeasurementProviderNative aNative); @Override boolean isAvailableInPlatform(); void onMeasurementsAvailable(final GnssMeasurementsEvent event); void onCapabilitiesUpdated(boolean isGnssMeasurementsSupported); void onGpsEnabledChanged();  }