Rename app setting classes for consistency

This commit is contained in:
Dominik Schürmann 2015-01-30 10:59:57 +01:00
parent 464f7c6718
commit e651a39279
7 changed files with 14 additions and 15 deletions

View File

@ -33,7 +33,6 @@ import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.operations.results.ImportKeyResult;
import org.sufficientlysecure.keychain.pgp.WrappedUserAttribute;
import org.sufficientlysecure.keychain.provider.KeychainContract.UserPackets;
import org.sufficientlysecure.keychain.remote.ui.AppSettingsAllowedKeys;
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
import org.sufficientlysecure.keychain.util.ParcelableFileCache.IteratorWithSize;
import org.sufficientlysecure.keychain.util.Preferences;

View File

@ -38,9 +38,9 @@ import org.sufficientlysecure.keychain.util.Log;
public class AppSettingsActivity extends BaseActivity {
private Uri mAppUri;
private AppSettingsFragment mSettingsFragment;
private AppSettingsHeaderFragment mSettingsFragment;
private AccountsListFragment mAccountsListFragment;
private AppSettingsAllowedKeys mAllowedKeysFragment;
private AppSettingsAllowedKeysListFragment mAllowedKeysFragment;
// model
AppSettings mAppSettings;
@ -63,7 +63,7 @@ public class AppSettingsActivity extends BaseActivity {
}
});
mSettingsFragment = (AppSettingsFragment) getSupportFragmentManager().findFragmentById(
mSettingsFragment = (AppSettingsHeaderFragment) getSupportFragmentManager().findFragmentById(
R.id.api_app_settings_fragment);
Intent intent = getIntent();
@ -155,7 +155,7 @@ public class AppSettingsActivity extends BaseActivity {
// Create an instance of the fragment
mAccountsListFragment = AccountsListFragment.newInstance(accountsUri);
mAllowedKeysFragment = AppSettingsAllowedKeys.newInstance(allowedKeysUri);
mAllowedKeysFragment = AppSettingsAllowedKeysListFragment.newInstance(allowedKeysUri);
// Add the fragment to the 'fragment_container' FrameLayout
// NOTE: We use commitAllowingStateLoss() to prevent weird crashes!

View File

@ -47,7 +47,7 @@ import java.util.Iterator;
import java.util.Set;
import java.util.Vector;
public class AppSettingsAllowedKeys extends ListFragmentWorkaround implements LoaderManager.LoaderCallbacks<Cursor> {
public class AppSettingsAllowedKeysListFragment extends ListFragmentWorkaround implements LoaderManager.LoaderCallbacks<Cursor> {
private static final String ARG_DATA_URI = "uri";
private SelectKeyCursorAdapter mAdapter;
@ -59,8 +59,8 @@ public class AppSettingsAllowedKeys extends ListFragmentWorkaround implements Lo
/**
* Creates new instance of this fragment
*/
public static AppSettingsAllowedKeys newInstance(Uri dataUri) {
AppSettingsAllowedKeys frag = new AppSettingsAllowedKeys();
public static AppSettingsAllowedKeysListFragment newInstance(Uri dataUri) {
AppSettingsAllowedKeysListFragment frag = new AppSettingsAllowedKeysListFragment();
Bundle args = new Bundle();
args.putParcelable(ARG_DATA_URI, dataUri);

View File

@ -38,7 +38,7 @@ import org.sufficientlysecure.keychain.util.Log;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class AppSettingsFragment extends Fragment {
public class AppSettingsHeaderFragment extends Fragment {
// model
private AppSettings mAppSettings;

View File

@ -75,7 +75,7 @@ public class RemoteServiceActivity extends BaseActivity {
public static final String EXTRA_ERROR_MESSAGE = "error_message";
// register view
private AppSettingsFragment mAppSettingsFragment;
private AppSettingsHeaderFragment mAppSettingsHeaderFragment;
// create acc view
private AccountSettingsFragment mAccSettingsFragment;
// select pub keys view
@ -115,11 +115,11 @@ public class RemoteServiceActivity extends BaseActivity {
setContentView(R.layout.api_remote_register_app);
initToolbar();
mAppSettingsFragment = (AppSettingsFragment) getSupportFragmentManager().findFragmentById(
mAppSettingsHeaderFragment = (AppSettingsHeaderFragment) getSupportFragmentManager().findFragmentById(
R.id.api_app_settings_fragment);
AppSettings settings = new AppSettings(packageName, packageSignature);
mAppSettingsFragment.setAppSettings(settings);
mAppSettingsHeaderFragment.setAppSettings(settings);
// Inflate a "Done"/"Cancel" custom action bar view
setFullScreenDialogTwoButtons(
@ -129,7 +129,7 @@ public class RemoteServiceActivity extends BaseActivity {
public void onClick(View v) {
// Allow
mProviderHelper.insertApiApp(mAppSettingsFragment.getAppSettings());
mProviderHelper.insertApiApp(mAppSettingsHeaderFragment.getAppSettings());
// give data through for new service call
Intent resultData = extras.getParcelable(EXTRA_DATA);

View File

@ -28,7 +28,7 @@
<fragment
android:id="@+id/api_app_settings_fragment"
android:name="org.sufficientlysecure.keychain.remote.ui.AppSettingsFragment"
android:name="org.sufficientlysecure.keychain.remote.ui.AppSettingsHeaderFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout="@layout/api_app_settings_fragment" />

View File

@ -30,7 +30,7 @@
<fragment
android:id="@+id/api_app_settings_fragment"
android:name="org.sufficientlysecure.keychain.remote.ui.AppSettingsFragment"
android:name="org.sufficientlysecure.keychain.remote.ui.AppSettingsHeaderFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout="@layout/api_app_settings_fragment" />