projects
/
pub
/
Android
/
ownCloud.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ea14d62
)
Fixed now - FileDisplayActivity is not recreated anymore when the user selects anothe...
author
David A. Velasco
<dvelasco@solidgear.es>
Fri, 17 Apr 2015 12:32:35 +0000
(14:32 +0200)
committer
David A. Velasco
<dvelasco@solidgear.es>
Fri, 17 Apr 2015 12:32:35 +0000
(14:32 +0200)
src/com/owncloud/android/ui/activity/FileActivity.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/activity/Preferences.java
patch
|
blob
|
blame
|
history
diff --git
a/src/com/owncloud/android/ui/activity/FileActivity.java
b/src/com/owncloud/android/ui/activity/FileActivity.java
index
43e11b1
..
8a5449e
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/FileActivity.java
+++ b/
src/com/owncloud/android/ui/activity/FileActivity.java
@@
-167,7
+167,17
@@
public class FileActivity extends SherlockFragmentActivity
}
}
-
+
+ @Override
+ protected void onNewIntent (Intent intent) {
+ Log_OC.v(TAG, "onNewIntent() start");
+ Account current = AccountUtils.getCurrentOwnCloudAccount(this);
+ if (current != null && mAccount != null && !mAccount.name.equals(current.name)) {
+ mAccount = current;
+ }
+ Log_OC.v(TAG, "onNewIntent() stop");
+ }
+
/**
* Since ownCloud {@link Account}s can be managed from the system setting menu,
* the existence of the {@link Account} associated to the instance must be checked
/**
* Since ownCloud {@link Account}s can be managed from the system setting menu,
* the existence of the {@link Account} associated to the instance must be checked
@@
-177,8
+187,7
@@
public class FileActivity extends SherlockFragmentActivity
protected void onRestart() {
Log_OC.v(TAG, "onRestart() start");
super.onRestart();
protected void onRestart() {
Log_OC.v(TAG, "onRestart() start");
super.onRestart();
- boolean validAccount =
- (mAccount != null && AccountUtils.setCurrentOwnCloudAccount(getApplicationContext(), mAccount.name));
+ boolean validAccount = (mAccount != null && AccountUtils.exists(mAccount, this));
if (!validAccount) {
swapToDefaultAccount();
}
if (!validAccount) {
swapToDefaultAccount();
}
@@
-223,6
+232,7
@@
public class FileActivity extends SherlockFragmentActivity
@Override
protected void onDestroy() {
@Override
protected void onDestroy() {
+ Log_OC.v(TAG, "onDestroy() start");
if (mOperationsServiceConnection != null) {
unbindService(mOperationsServiceConnection);
mOperationsServiceBinder = null;
if (mOperationsServiceConnection != null) {
unbindService(mOperationsServiceConnection);
mOperationsServiceBinder = null;
@@
-237,6
+247,7
@@
public class FileActivity extends SherlockFragmentActivity
}
super.onDestroy();
}
super.onDestroy();
+ Log_OC.v(TAG, "onDestroy() end");
}
}
diff --git
a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java
b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java
index
e633cee
..
83a4902
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
+++ b/
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
@@
-29,8
+29,6
@@
import android.accounts.AccountManager;
import android.accounts.AuthenticatorException;
import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.accounts.AuthenticatorException;
import android.annotation.TargetApi;
import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
@@
-219,7
+217,9
@@
OnSslUntrustedCertListener, OnEnforceableRefreshListener {
@Override
protected void onDestroy() {
@Override
protected void onDestroy() {
+ Log_OC.d(TAG, "onDestroy() start");
super.onDestroy();
super.onDestroy();
+ Log_OC.d(TAG, "onDestroy() end");
}
/**
}
/**
diff --git
a/src/com/owncloud/android/ui/activity/Preferences.java
b/src/com/owncloud/android/ui/activity/Preferences.java
index
5585024
..
70ca9de
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/Preferences.java
+++ b/
src/com/owncloud/android/ui/activity/Preferences.java
@@
-616,6
+616,7
@@
public class Preferences extends SherlockPreferenceActivity
FileDisplayActivity.class
);
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
FileDisplayActivity.class
);
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ i.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivity(i);
} else {
finish();
startActivity(i);
} else {
finish();