Browse Source

Alternative solution for fix in 10f99ceb9ca... enforcing dialog dissmiss instead of introducing false specific onConfigurationChange

David A. Velasco 11 years ago
parent
commit
ebcc9b98e3

+ 3 - 3
AndroidManifest.xml

@@ -51,7 +51,7 @@
         <activity
         <activity
             android:name=".ui.activity.FileDisplayActivity"
             android:name=".ui.activity.FileDisplayActivity"
             android:label="@string/app_name"
             android:label="@string/app_name"
-            android:configChanges="orientation" >
+            >
             <intent-filter>
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
                 <category android:name="android.intent.category.LAUNCHER" />
@@ -94,13 +94,13 @@
         
         
         <activity	
         <activity	
             android:name=".ui.preview.PreviewImageActivity" 
             android:name=".ui.preview.PreviewImageActivity" 
-            android:configChanges="orientation" />
+            />
 		        
 		        
         <activity	
         <activity	
             android:name=".ui.preview.PreviewVideoActivity"
             android:name=".ui.preview.PreviewVideoActivity"
 			android:label="@string/app_name"
 			android:label="@string/app_name"
 			android:theme="@style/Theme.ownCloud.Fullscreen" 
 			android:theme="@style/Theme.ownCloud.Fullscreen" 
-			android:configChanges="orientation">
+			>
 		</activity>        
 		</activity>        
 
 
         <service
         <service

+ 0 - 5
src/com/owncloud/android/ui/activity/FileDisplayActivity.java

@@ -224,11 +224,6 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
             unbindService(mUploadConnection);
             unbindService(mUploadConnection);
     }
     }
 
 
-    @Override
-    public void onConfigurationChanged(Configuration newConfig) {
-        super.onConfigurationChanged(newConfig);
-    }
-
     /**
     /**
      *  Called when the ownCloud {@link Account} associated to the Activity was just updated.
      *  Called when the ownCloud {@link Account} associated to the Activity was just updated.
      */ 
      */ 

+ 5 - 2
src/com/owncloud/android/ui/dialog/ShareLinkToDialog.java

@@ -126,9 +126,11 @@ public class ShareLinkToDialog  extends SherlockDialogFragment {
                                    ComponentName name=new ComponentName(actInfo.applicationInfo.packageName, actInfo.name);
                                    ComponentName name=new ComponentName(actInfo.applicationInfo.packageName, actInfo.name);
                                    mIntent.setComponent(name);                               
                                    mIntent.setComponent(name);                               
                                    
                                    
+                                   dialog.dismiss();    // explicitly added for Android 2.x devices
+
                                    // Send the file
                                    // Send the file
                                    ((FileActivity)getSherlockActivity()).startActivity(mIntent);
                                    ((FileActivity)getSherlockActivity()).startActivity(mIntent);
-
+                                   
                                }
                                }
                            })
                            })
                        .create();
                        .create();
@@ -146,7 +148,8 @@ public class ShareLinkToDialog  extends SherlockDialogFragment {
                             
                             
                                    // Create a new share resource
                                    // Create a new share resource
                                    FileOperationsHelper foh = new FileOperationsHelper();
                                    FileOperationsHelper foh = new FileOperationsHelper();
-                                   foh.shareFileWithLinkToApp(mFile, mIntent, (FileActivity)getSherlockActivity()); 
+                                   foh.shareFileWithLinkToApp(mFile, mIntent, (FileActivity)getSherlockActivity());
+                                   
                                }
                                }
                            })
                            })
                        .create();
                        .create();

+ 0 - 5
src/com/owncloud/android/ui/preview/PreviewImageActivity.java

@@ -246,11 +246,6 @@ public class PreviewImageActivity extends FileActivity implements FileFragment.C
         super.onDestroy();
         super.onDestroy();
     }
     }
     
     
-    @Override
-    public void onConfigurationChanged(Configuration newConfig) {
-        super.onConfigurationChanged(newConfig);
-    }
-    
     @Override
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
     public boolean onOptionsItemSelected(MenuItem item) {
         boolean returnValue = false;
         boolean returnValue = false;

+ 0 - 5
src/com/owncloud/android/ui/preview/PreviewVideoActivity.java

@@ -189,11 +189,6 @@ public class PreviewVideoActivity extends FileActivity implements OnCompletionLi
         return true;
         return true;
     }
     }
     
     
-    @Override
-    public void onConfigurationChanged(Configuration newConfig) {
-        super.onConfigurationChanged(newConfig);
-    }
-    
     @Override
     @Override
     protected void onAccountSet(boolean stateWasRecovered) {
     protected void onAccountSet(boolean stateWasRecovered) {
         super.onAccountSet(stateWasRecovered);
         super.onAccountSet(stateWasRecovered);