along with this program. If not, see <http://www.gnu.org/licenses/>.\r
-->\r
<manifest package="com.owncloud.android"\r
- android:versionCode="103019"\r
- android:versionName="1.3.19" xmlns:android="http://schemas.android.com/apk/res/android">\r
+ android:versionCode="103020"\r
+ android:versionName="1.3.20" xmlns:android="http://schemas.android.com/apk/res/android">\r
\r
<uses-permission android:name="android.permission.GET_ACCOUNTS" />\r
<uses-permission android:name="android.permission.USE_CREDENTIALS" />\r
android:name=".ui.activity.AuthenticatorActivity"\r
android:exported="true"\r
android:theme="@style/Theme.ownCloud.noActionBar" >\r
+ <intent-filter>\r
+ <action android:name="com.owncloud.android.workaround.accounts.CREATE" />\r
+ <category android:name="android.intent.category.DEFAULT" />\r
+ </intent-filter>\r
</activity>\r
\r
<service android:name=".files.services.FileDownloader" >\r
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.owncloud.android.workaround.accounts"
- android:versionCode="0100001"
- android:versionName="1.0" >
+ android:versionCode="0100002"
+ android:versionName="1.0.2" >
<uses-sdk
android:minSdkVersion="16"
import android.content.Intent;
import android.os.Bundle;
import android.os.IBinder;
+//import android.util.Log;
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);
}
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();
}
public Bundle getAccountRemovalAllowed(
AccountAuthenticatorResponse response, Account account)
throws NetworkErrorException {
- return getCommonResultBundle();
+ return super.getAccountRemovalAllowed(response, account);
}
private Bundle getCommonResultBundle() {