mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
use same String for Intent
This commit is contained in:
parent
07bc07d4d9
commit
b499bce225
2 changed files with 6 additions and 7 deletions
|
@ -48,9 +48,9 @@ import com.owncloud.android.datamodel.ArbitraryDataProvider;
|
|||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.files.services.FileDownloader;
|
||||
import com.owncloud.android.files.services.FileUploader;
|
||||
import com.owncloud.android.jobs.AccountRemovalJob;
|
||||
import com.owncloud.android.lib.common.OwnCloudAccount;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.jobs.AccountRemovalJob;
|
||||
import com.owncloud.android.services.OperationsService;
|
||||
import com.owncloud.android.ui.adapter.AccountListAdapter;
|
||||
import com.owncloud.android.ui.adapter.AccountListItem;
|
||||
|
@ -79,7 +79,6 @@ public class ManageAccountsActivity extends FileActivity
|
|||
|
||||
public static final String PENDING_FOR_REMOVAL = "PENDING_FOR_REMOVAL";
|
||||
|
||||
private static final String KEY_ACCOUNT = "ACCOUNT";
|
||||
private static final String KEY_DISPLAY_NAME = "DISPLAY_NAME";
|
||||
|
||||
private static final int KEY_USER_INFO_REQUEST_CODE = 13;
|
||||
|
@ -134,7 +133,7 @@ public class ManageAccountsActivity extends FileActivity
|
|||
|
||||
if (item != null && item.isEnabled()) {
|
||||
Account account = item.getAccount();
|
||||
intent.putExtra(KEY_ACCOUNT, Parcels.wrap(account));
|
||||
intent.putExtra(UserInfoActivity.KEY_ACCOUNT, Parcels.wrap(account));
|
||||
try {
|
||||
OwnCloudAccount oca = new OwnCloudAccount(account, MainApp.getAppContext());
|
||||
intent.putExtra(KEY_DISPLAY_NAME, oca.getDisplayName());
|
||||
|
@ -163,8 +162,8 @@ public class ManageAccountsActivity extends FileActivity
|
|||
case KEY_DELETE_CODE:
|
||||
if (data != null) {
|
||||
Bundle bundle = data.getExtras();
|
||||
if (bundle.containsKey(KEY_ACCOUNT)) {
|
||||
Account account = Parcels.unwrap(bundle.getParcelable(KEY_ACCOUNT));
|
||||
if (bundle.containsKey(UserInfoActivity.KEY_ACCOUNT)) {
|
||||
Account account = Parcels.unwrap(bundle.getParcelable(UserInfoActivity.KEY_ACCOUNT));
|
||||
mAccountName = account.name;
|
||||
performAccountRemoval(account);
|
||||
}
|
||||
|
|
|
@ -87,10 +87,10 @@ import butterknife.Unbinder;
|
|||
* This Activity presents the user information.
|
||||
*/
|
||||
public class UserInfoActivity extends FileActivity {
|
||||
private static final String TAG = UserInfoActivity.class.getSimpleName();
|
||||
public static final String KEY_ACCOUNT = "ACCOUNT";
|
||||
|
||||
private static final String TAG = UserInfoActivity.class.getSimpleName();
|
||||
private static final String KEY_USER_DATA = "USER_DATA";
|
||||
private static final String KEY_ACCOUNT = "ACCOUNT";
|
||||
private static final String KEY_DIRECT_REMOVE = "DIRECT_REMOVE";
|
||||
|
||||
private static final int KEY_DELETE_CODE = 101;
|
||||
|
|
Loading…
Reference in a new issue