Enforce SeparatorWrap
This commit is contained in:
parent
b656cb91a2
commit
719af170a7
|
@ -116,8 +116,8 @@ public class EspressoTestUtils {
|
|||
String[] sharedPreferencesFileNames = new File(root, "shared_prefs").list();
|
||||
for (String fileName : sharedPreferencesFileNames) {
|
||||
System.out.println("Cleared database: " + fileName);
|
||||
InstrumentationRegistry.getTargetContext().
|
||||
getSharedPreferences(fileName.replace(".xml", ""), Context.MODE_PRIVATE).edit().clear().commit();
|
||||
InstrumentationRegistry.getTargetContext().getSharedPreferences(
|
||||
fileName.replace(".xml", ""), Context.MODE_PRIVATE).edit().clear().commit();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -126,11 +126,11 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
|
|||
|
||||
if (feedUrl == null) {
|
||||
Log.e(TAG, "feedUrl is null.");
|
||||
new AlertDialog.Builder(OnlineFeedViewActivity.this).
|
||||
setNeutralButton(android.R.string.ok,
|
||||
(dialog, which) -> finish()).
|
||||
setTitle(R.string.error_label).
|
||||
setMessage(R.string.null_value_podcast_error).create().show();
|
||||
new AlertDialog.Builder(OnlineFeedViewActivity.this)
|
||||
.setNeutralButton(android.R.string.ok, (dialog, which) -> finish())
|
||||
.setTitle(R.string.error_label)
|
||||
.setMessage(R.string.null_value_podcast_error)
|
||||
.show();
|
||||
} else {
|
||||
Log.d(TAG, "Activity was started with url " + feedUrl);
|
||||
setLoadingLayout();
|
||||
|
|
|
@ -74,16 +74,14 @@ public class GpodderPreferencesFragment extends PreferenceFragmentCompat {
|
|||
dialog.show();
|
||||
return true;
|
||||
});
|
||||
findPreference(PREF_GPODNET_SYNC).
|
||||
setOnPreferenceClickListener(preference -> {
|
||||
findPreference(PREF_GPODNET_SYNC).setOnPreferenceClickListener(preference -> {
|
||||
GpodnetSyncService.sendSyncIntent(getActivity().getApplicationContext());
|
||||
Toast toast = Toast.makeText(getActivity(), R.string.pref_gpodnet_sync_started,
|
||||
Toast.LENGTH_SHORT);
|
||||
toast.show();
|
||||
return true;
|
||||
});
|
||||
findPreference(PREF_GPODNET_FORCE_FULL_SYNC).
|
||||
setOnPreferenceClickListener(preference -> {
|
||||
findPreference(PREF_GPODNET_FORCE_FULL_SYNC).setOnPreferenceClickListener(preference -> {
|
||||
GpodnetPreferences.setLastSubscriptionSyncTimestamp(0L);
|
||||
GpodnetPreferences.setLastEpisodeActionsSyncTimestamp(0L);
|
||||
GpodnetPreferences.setLastSyncAttempt(false, 0);
|
||||
|
@ -94,17 +92,16 @@ public class GpodderPreferencesFragment extends PreferenceFragmentCompat {
|
|||
toast.show();
|
||||
return true;
|
||||
});
|
||||
findPreference(PREF_GPODNET_LOGOUT).setOnPreferenceClickListener(
|
||||
preference -> {
|
||||
findPreference(PREF_GPODNET_LOGOUT).setOnPreferenceClickListener(preference -> {
|
||||
GpodnetPreferences.logout();
|
||||
Toast toast = Toast.makeText(activity, R.string.pref_gpodnet_logout_toast, Toast.LENGTH_SHORT);
|
||||
toast.show();
|
||||
updateGpodnetPreferenceScreen();
|
||||
return true;
|
||||
});
|
||||
findPreference(PREF_GPODNET_HOSTNAME).setOnPreferenceClickListener(
|
||||
preference -> {
|
||||
GpodnetSetHostnameDialog.createDialog(activity).setOnDismissListener(dialog -> updateGpodnetPreferenceScreen());
|
||||
findPreference(PREF_GPODNET_HOSTNAME).setOnPreferenceClickListener(preference -> {
|
||||
GpodnetSetHostnameDialog.createDialog(activity).setOnDismissListener(
|
||||
dialog -> updateGpodnetPreferenceScreen());
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -43,8 +43,8 @@ public abstract class CastEnabledActivity extends AppCompatActivity
|
|||
return;
|
||||
}
|
||||
|
||||
PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).
|
||||
registerOnSharedPreferenceChangeListener(this);
|
||||
PreferenceManager.getDefaultSharedPreferences(getApplicationContext())
|
||||
.registerOnSharedPreferenceChangeListener(this);
|
||||
|
||||
castConsumer = new DefaultCastConsumer() {
|
||||
@Override
|
||||
|
|
|
@ -38,6 +38,33 @@
|
|||
<module name="FallThrough"/>
|
||||
<module name="UpperEll"/>
|
||||
<module name="ModifierOrder"/>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="id" value="SeparatorWrapDot"/>
|
||||
<property name="tokens" value="DOT"/>
|
||||
<property name="option" value="nl"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="id" value="SeparatorWrapComma"/>
|
||||
<property name="tokens" value="COMMA"/>
|
||||
<property name="option" value="EOL"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/258 -->
|
||||
<property name="id" value="SeparatorWrapEllipsis"/>
|
||||
<property name="tokens" value="ELLIPSIS"/>
|
||||
<property name="option" value="EOL"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/259 -->
|
||||
<property name="id" value="SeparatorWrapArrayDeclarator"/>
|
||||
<property name="tokens" value="ARRAY_DECLARATOR"/>
|
||||
<property name="option" value="EOL"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="id" value="SeparatorWrapMethodRef"/>
|
||||
<property name="tokens" value="METHOD_REF"/>
|
||||
<property name="option" value="nl"/>
|
||||
</module>
|
||||
<module name="PackageName">
|
||||
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
|
|
|
@ -1243,14 +1243,11 @@ public class CastManager extends BaseCastManager implements OnFailedListener {
|
|||
throw new NoConnectionException();
|
||||
}
|
||||
Log.d(TAG, "remoteMediaPlayer.seek() to position " + position);
|
||||
remoteMediaPlayer.seek(mApiClient,
|
||||
position,
|
||||
RESUME_STATE_UNCHANGED).
|
||||
setResultCallback(result -> {
|
||||
if (!result.getStatus().isSuccess()) {
|
||||
onFailed(R.string.cast_failed_seek, result.getStatus().getStatusCode());
|
||||
}
|
||||
});
|
||||
remoteMediaPlayer.seek(mApiClient, position, RESUME_STATE_UNCHANGED).setResultCallback(result -> {
|
||||
if (!result.getStatus().isSuccess()) {
|
||||
onFailed(R.string.cast_failed_seek, result.getStatus().getStatusCode());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -226,9 +226,7 @@ public class ItemEnqueuePositionCalculatorTest {
|
|||
private static FeedItem setAsDownloading(int id, DownloadStateProvider stubDownloadStateProvider,
|
||||
boolean isDownloading) {
|
||||
FeedItem item = createFeedItem(id);
|
||||
FeedMedia media =
|
||||
new FeedMedia(item, "http://download.url.net/" + id
|
||||
, 100000 + id, "audio/mp3");
|
||||
FeedMedia media = new FeedMedia(item, "http://download.url.net/" + id, 100000 + id, "audio/mp3");
|
||||
media.setId(item.getId());
|
||||
item.setMedia(media);
|
||||
return setAsDownloading(item, stubDownloadStateProvider, isDownloading);
|
||||
|
|
Loading…
Reference in New Issue