Modify Uploader activity to be singleton in the activity stack, and assure finish when the upload scheme is file

This commit is contained in:
Juan Carlos González Cabrero 2016-04-13 10:35:01 +02:00
parent 0f65e3a667
commit 9e36ae2238
2 changed files with 6 additions and 1 deletions

View file

@ -71,7 +71,8 @@
</intent-filter>
</activity>
<activity android:name=".ui.activity.UploadFilesActivity" />
<activity android:name=".ui.activity.Uploader" >
<activity android:name=".ui.activity.Uploader"
android:launchMode="singleInstance">
<intent-filter>
<action android:name="android.intent.action.SEND" />

View file

@ -569,6 +569,10 @@ public class Uploader extends FileActivity
.getDefaultSharedPreferences(getApplicationContext()).edit();
appPrefs.putString("last_upload_path", mUploadPath);
appPrefs.apply();
if(contentUris.isEmpty()) {
finish();
}
}
/**