@Test public void testEdit() { final SharedPreferences.Editor editor = cryptoPreferences.edit(); assertThat(editor, is(notNullValue())); assertThat(editor, is(cryptoPreferences.edit())); }
@SuppressLint("CommitPrefEdits") @Override public SharedPreferences.Editor edit() { if (editor == null) { this.editor = new CryptoEditor(helper, delegate.edit()); this.editor.setCache(cache); } return editor; }
CryptoSharedPreferences implements SharedPreferences { @SuppressLint("CommitPrefEdits") @Override public SharedPreferences.Editor edit() { if (editor == null) { this.editor = new CryptoEditor(helper, delegate.edit()); this.editor.setCache(cache); } return editor; } }
CryptoSharedPreferences implements SharedPreferences { @SuppressLint("CommitPrefEdits") @Override public SharedPreferences.Editor edit() { if (editor == null) { this.editor = new CryptoEditor(helper, delegate.edit()); this.editor.setCache(cache); } return editor; } @SuppressWarnings("WeakerAccess")  CryptoSharedPreferences(final Builder builder); }
CryptoSharedPreferences implements SharedPreferences { @SuppressLint("CommitPrefEdits") @Override public SharedPreferences.Editor edit() { if (editor == null) { this.editor = new CryptoEditor(helper, delegate.edit()); this.editor.setCache(cache); } return editor; } @SuppressWarnings("WeakerAccess")  CryptoSharedPreferences(final Builder builder); @Override void registerOnSharedPreferenceChangeListener(@NonNull final OnSharedPreferenceChangeListener listener); @Override void unregisterOnSharedPreferenceChangeListener(@NonNull final OnSharedPreferenceChangeListener listener); @Override Map<String, ?> getAll(); @Override boolean contains(@NonNull final String key); @Override @Nullable String getString(@NonNull final String key, @Nullable final String defValue); @Override @Nullable Set<String> getStringSet(@NonNull final String key, @Nullable final Set<String> defValues); @Override int getInt(@NonNull final String key, final int defValue); @Override long getLong(@NonNull final String key, final long defValue); @Override float getFloat(@NonNull final String key, final float defValue); @Override boolean getBoolean(@NonNull final String key, final boolean defValue); @SuppressLint("CommitPrefEdits") @Override SharedPreferences.Editor edit(); }
CryptoSharedPreferences implements SharedPreferences { @SuppressLint("CommitPrefEdits") @Override public SharedPreferences.Editor edit() { if (editor == null) { this.editor = new CryptoEditor(helper, delegate.edit()); this.editor.setCache(cache); } return editor; } @SuppressWarnings("WeakerAccess")  CryptoSharedPreferences(final Builder builder); @Override void registerOnSharedPreferenceChangeListener(@NonNull final OnSharedPreferenceChangeListener listener); @Override void unregisterOnSharedPreferenceChangeListener(@NonNull final OnSharedPreferenceChangeListener listener); @Override Map<String, ?> getAll(); @Override boolean contains(@NonNull final String key); @Override @Nullable String getString(@NonNull final String key, @Nullable final String defValue); @Override @Nullable Set<String> getStringSet(@NonNull final String key, @Nullable final Set<String> defValues); @Override int getInt(@NonNull final String key, final int defValue); @Override long getLong(@NonNull final String key, final long defValue); @Override float getFloat(@NonNull final String key, final float defValue); @Override boolean getBoolean(@NonNull final String key, final boolean defValue); @SuppressLint("CommitPrefEdits") @Override SharedPreferences.Editor edit();  }