@Override
  public ComponentName startService(Intent intent) {
    StartServiceListener listener = DependencyInjector.getStartServiceListener();
    if ((listener != null) && (listener.onStartServiceInvoked(this, intent))) {
      return null;
    }

    return super.startService(intent);
  }
Base class for {@link AppCompatPreferenceActivity} instances to make them more testable.
java/com/google/android/apps/authenticator/testability/TestablePreferenceActivity.java