From 5345fed890b5a70bfc09df12e119ba61cc0e7e18 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Thu, 1 Jan 2015 13:55:06 +0100 Subject: [PATCH] - fix #667 --- .../android/ui/activity/PinCodeActivity.java | 2 +- .../android/ui/activity/Uploader.java | 25 ++++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/com/owncloud/android/ui/activity/PinCodeActivity.java b/src/com/owncloud/android/ui/activity/PinCodeActivity.java index 0bb48a3046..1e085896ec 100644 --- a/src/com/owncloud/android/ui/activity/PinCodeActivity.java +++ b/src/com/owncloud/android/ui/activity/PinCodeActivity.java @@ -366,7 +366,7 @@ public class PinCodeActivity extends SherlockFragmentActivity { } if (mPinCodeChecked && - (mActivity.equals("FileDisplayActivity") || mActivity.equals("PreviewImageActivity"))){ + (mActivity.equals("FileDisplayActivity") || mActivity.equals("PreviewImageActivity") || mActivity.equals("ownCloudUploader"))){ PinCheck.setUnlockTimestamp(); finish(); } else if (mPinCodeChecked){ diff --git a/src/com/owncloud/android/ui/activity/Uploader.java b/src/com/owncloud/android/ui/activity/Uploader.java index 6c8a1320be..77bf024274 100644 --- a/src/com/owncloud/android/ui/activity/Uploader.java +++ b/src/com/owncloud/android/ui/activity/Uploader.java @@ -26,14 +26,6 @@ import java.util.List; import java.util.Stack; import java.util.Vector; -import com.owncloud.android.MainApp; -import com.owncloud.android.R; -import com.owncloud.android.authentication.AccountAuthenticator; -import com.owncloud.android.datamodel.FileDataStorageManager; -import com.owncloud.android.datamodel.OCFile; -import com.owncloud.android.files.services.FileUploader; -import com.owncloud.android.lib.common.utils.Log_OC; - import android.accounts.Account; import android.accounts.AccountManager; import android.app.AlertDialog; @@ -65,6 +57,14 @@ import android.widget.Toast; import com.actionbarsherlock.app.ActionBar; import com.actionbarsherlock.app.SherlockListActivity; import com.actionbarsherlock.view.MenuItem; +import com.owncloud.android.MainApp; +import com.owncloud.android.R; +import com.owncloud.android.authentication.AccountAuthenticator; +import com.owncloud.android.authentication.PinCheck; +import com.owncloud.android.datamodel.FileDataStorageManager; +import com.owncloud.android.datamodel.OCFile; +import com.owncloud.android.files.services.FileUploader; +import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.utils.DisplayUtils; /** @@ -96,7 +96,14 @@ public class Uploader extends SherlockListActivity implements OnItemClickListene protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mParents = new Stack(); - + + // Check Pin entry + if (PinCheck.checkIfPinEntry()){ + Intent i = new Intent(MainApp.getAppContext(), PinCodeActivity.class); + i.putExtra(PinCodeActivity.EXTRA_ACTIVITY, "ownCloudUploader"); + startActivity(i); + } + ActionBar actionBar = getSupportActionBar(); actionBar.setIcon(DisplayUtils.getSeasonalIconId());