diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index db6d31c59d..1ea115c8f7 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -17,8 +17,8 @@
along with this program. If not, see .
-->
+ android:versionCode="103020"
+ android:versionName="1.3.20" xmlns:android="http://schemas.android.com/apk/res/android">
@@ -121,6 +121,10 @@
android:name=".ui.activity.AuthenticatorActivity"
android:exported="true"
android:theme="@style/Theme.ownCloud.noActionBar" >
+
+
+
+
diff --git a/oc_jb_workaround/AndroidManifest.xml b/oc_jb_workaround/AndroidManifest.xml
index 87458dd278..acaf6ebc51 100644
--- a/oc_jb_workaround/AndroidManifest.xml
+++ b/oc_jb_workaround/AndroidManifest.xml
@@ -1,8 +1,8 @@
+ android:versionCode="0100002"
+ android:versionName="1.0.2" >
ownCloud Jelly Bean Workaround for lost credentials
-
+ ownCloud
+
\ No newline at end of file
diff --git a/oc_jb_workaround/res/xml/authenticator.xml b/oc_jb_workaround/res/xml/authenticator.xml
index a62aa212f1..0bb57600cc 100644
--- a/oc_jb_workaround/res/xml/authenticator.xml
+++ b/oc_jb_workaround/res/xml/authenticator.xml
@@ -2,6 +2,6 @@
\ No newline at end of file
diff --git a/oc_jb_workaround/src/com/owncloud/android/workaround/accounts/AccountAuthenticatorService.java b/oc_jb_workaround/src/com/owncloud/android/workaround/accounts/AccountAuthenticatorService.java
index 2d81f655e6..32b164b0f7 100644
--- a/oc_jb_workaround/src/com/owncloud/android/workaround/accounts/AccountAuthenticatorService.java
+++ b/oc_jb_workaround/src/com/owncloud/android/workaround/accounts/AccountAuthenticatorService.java
@@ -15,6 +15,7 @@ import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.IBinder;
+//import android.util.Log;
public class AccountAuthenticatorService extends Service {
@@ -35,6 +36,10 @@ public class AccountAuthenticatorService extends Service {
public static class AccountAuthenticator extends AbstractAccountAuthenticator {
+ public static final String KEY_AUTH_TOKEN_TYPE = "authTokenType";
+ public static final String KEY_REQUIRED_FEATURES = "requiredFeatures";
+ public static final String KEY_LOGIN_OPTIONS = "loginOptions";
+
public AccountAuthenticator(Context context) {
super(context);
}
@@ -44,7 +49,24 @@ public class AccountAuthenticatorService extends Service {
String accountType, String authTokenType,
String[] requiredFeatures, Bundle options)
throws NetworkErrorException {
- return getCommonResultBundle();
+ //Log.e("WORKAROUND", "Yes, WORKAROUND takes the control here");
+ final Intent intent = new Intent("com.owncloud.android.workaround.accounts.CREATE");
+ intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE,
+ response);
+ intent.putExtra(KEY_AUTH_TOKEN_TYPE, authTokenType);
+ intent.putExtra(KEY_REQUIRED_FEATURES, requiredFeatures);
+ intent.putExtra(KEY_LOGIN_OPTIONS, options);
+
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
+ intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+ intent.addFlags(Intent.FLAG_FROM_BACKGROUND);
+
+ final Bundle bundle = new Bundle();
+ bundle.putParcelable(AccountManager.KEY_INTENT, intent);
+ return bundle;
+ //return getCommonResultBundle();
}
@@ -89,7 +111,7 @@ public class AccountAuthenticatorService extends Service {
public Bundle getAccountRemovalAllowed(
AccountAuthenticatorResponse response, Account account)
throws NetworkErrorException {
- return getCommonResultBundle();
+ return super.getAccountRemovalAllowed(response, account);
}
private Bundle getCommonResultBundle() {
diff --git a/src/com/owncloud/android/authenticator/AccountAuthenticator.java b/src/com/owncloud/android/authenticator/AccountAuthenticator.java
index 58919ec219..53183c6aa4 100644
--- a/src/com/owncloud/android/authenticator/AccountAuthenticator.java
+++ b/src/com/owncloud/android/authenticator/AccountAuthenticator.java
@@ -174,7 +174,7 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
public Bundle hasFeatures(AccountAuthenticatorResponse response,
Account account, String[] features) throws NetworkErrorException {
final Bundle result = new Bundle();
- result.putBoolean(AccountManager.KEY_BOOLEAN_RESULT, false);
+ result.putBoolean(AccountManager.KEY_BOOLEAN_RESULT, true);
return result;
}