Modify DetectAuthenticationMethodOperation so that , when returning its result throug...
authormasensio <masensio@solidgear.es>
Fri, 28 Mar 2014 14:04:10 +0000 (15:04 +0100)
committermasensio <masensio@solidgear.es>
Fri, 28 Mar 2014 14:04:10 +0000 (15:04 +0100)
src/com/owncloud/android/authentication/AuthenticatorActivity.java
src/com/owncloud/android/ui/activity/FileActivity.java

index cf76883..074751e 100644 (file)
@@ -537,6 +537,27 @@ SsoWebViewClientListener, OnSslUntrustedCertListener {
         }\r
     }\r
 \r
         }\r
     }\r
 \r
+\r
+    @Override \r
+    protected void onStart() {\r
+        if (mOperationsServiceBinder != null) {\r
+            mOperationsServiceBinder.addOperationListener(AuthenticatorActivity.this, mHandler);\r
+        }\r
+        \r
+        super.onStart();\r
+    }\r
+    \r
+    \r
+    @Override \r
+    protected void onStop() {\r
+        if (mOperationsServiceBinder != null) {\r
+            mOperationsServiceBinder.removeOperationListener(this);\r
+        }\r
+        super.onStop();\r
+    }\r
+    \r
+\r
+\r
     /**\r
      * The redirection triggered by the OAuth authentication server as response to the GET AUTHORIZATION, and \r
      * deferred in {@link #onNewIntent(Intent)}, is processed here.\r
     /**\r
      * The redirection triggered by the OAuth authentication server as response to the GET AUTHORIZATION, and \r
      * deferred in {@link #onNewIntent(Intent)}, is processed here.\r
index 42b90ae..c4dd28a 100644 (file)
@@ -150,22 +150,26 @@ public class FileActivity extends SherlockFragmentActivity implements OnRemoteOp
     
     @Override 
     protected void onStart() {
     
     @Override 
     protected void onStart() {
-        super.onStart();
+
         if (mAccountWasSet) {
             onAccountSet(mAccountWasRestored);
         }
         if (mOperationsServiceBinder != null) {
             mOperationsServiceBinder.addOperationListener(FileActivity.this, mHandler);
         }
         if (mAccountWasSet) {
             onAccountSet(mAccountWasRestored);
         }
         if (mOperationsServiceBinder != null) {
             mOperationsServiceBinder.addOperationListener(FileActivity.this, mHandler);
         }
+        
+        super.onStart();
     }
     
     
     @Override 
     protected void onStop() {
     }
     
     
     @Override 
     protected void onStop() {
-        super.onStop();
+
         if (mOperationsServiceBinder != null) {
             mOperationsServiceBinder.removeOperationListener(this);
         }
         if (mOperationsServiceBinder != null) {
             mOperationsServiceBinder.removeOperationListener(this);
         }
+        
+        super.onStop();
     }
     
     
     }