Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ee010fc authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Some fixes

parent 12951921
Loading
Loading
Loading
Loading
Compare b2e10a10 to d1baf6d6
Original line number Diff line number Diff line
Subproject commit b2e10a10e47f4540fad1e609469dd5fff87002c5
Subproject commit d1baf6d63b95d1a5edb0cf348fdb1fe543c19149
+3 −3
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ buildscript {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.0.1'
        classpath 'com.android.tools.build:gradle:1.1.0'
    }
}

@@ -33,8 +33,8 @@ repositories {
}

dependencies {
    compile 'com.android.support:support-v4:21.0.3'
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.android.support:support-v4:22.0.0'
    compile 'com.android.support:appcompat-v7:22.0.0'

    compile 'de.hdodenhof:circleimageview:1.2.1'
    compile 'com.squareup.wire:wire-runtime:1.6.1'
+9 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@

    <uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="21" />
        android:targetSdkVersion="22" />

    <permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <permission
@@ -246,5 +246,13 @@
                <action android:name="com.google.android.gms.icing.INDEX_SERVICE" />
            </intent-filter>
        </service>

        <service
            android:name=".analytics.service.AnalyticsService"
            android:exported="true">
            <intent-filter>
                <action android:name="com.google.android.gms.analytics.service.START" />
            </intent-filter>
        </service>
    </application>
</manifest>
+1 −0
Original line number Diff line number Diff line
@@ -186,6 +186,7 @@ public class LoginActivity extends AssistantActivity {
                            // TODO: Error message
                            Log.w(TAG, "Account NOT created!");
                            setResult(RESULT_CANCELED);
                            finish();
                        }
                    }

+12 −7
Original line number Diff line number Diff line
@@ -49,13 +49,13 @@ import static android.accounts.AccountManager.KEY_INTENT;

class AccountAuthenticator extends AbstractAccountAuthenticator {
    private static final String TAG = "GmsAuthenticator";
    private Context context;
    private String accountType;
    private final Context context;
    private final String accountType;

    public AccountAuthenticator(Context context) {
        super(context);
        this.context = context;
        accountType = context.getString(R.string.google_account_type);
        this.accountType = context.getString(R.string.google_account_type);
    }

    @Override
@@ -136,10 +136,15 @@ class AccountAuthenticator extends AbstractAccountAuthenticator {
    public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, String[] features) throws NetworkErrorException {
        Log.d(TAG, "hasFeatures: " + account + ", " + Arrays.toString(features));
        AccountManager accountManager = AccountManager.get(context);
        List<String> services = Arrays.asList(accountManager.getUserData(account, "services").split(","));
        String services = accountManager.getUserData(account, "services");
        boolean res = true;
        if (services != null) {
            List<String> servicesList = Arrays.asList(services.split(","));
            for (String feature : features) {
            if (feature.startsWith("service_") && !services.contains(feature.substring(8)))
                if (feature.startsWith("service_") && !servicesList.contains(feature.substring(8)))
                    res = false;
            }
        } else {
            res = false;
        }
        Bundle result = new Bundle();
Loading