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

Commit 0060deb6 authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Move the account picker class name to a config resource." into jb-mr2-dev

parents e0e448f1 12b8e134
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -18,9 +18,11 @@ package android.accounts;

import android.app.Activity;
import android.content.Intent;
import android.content.ComponentName;
import android.content.Context;
import android.content.IntentFilter;
import android.content.BroadcastReceiver;
import android.content.res.Resources;
import android.database.SQLException;
import android.os.Bundle;
import android.os.Handler;
@@ -44,6 +46,7 @@ import java.util.concurrent.TimeUnit;
import java.util.HashMap;
import java.util.Map;

import com.android.internal.R;
import com.google.android.collect.Maps;

/**
@@ -1777,8 +1780,11 @@ public class AccountManager {
                                    };
                                    // have many accounts, launch the chooser
                                    Intent intent = new Intent();
                                    intent.setClassName("android",
                                            "android.accounts.ChooseAccountActivity");
                                    ComponentName componentName = ComponentName.unflattenFromString(
                                            Resources.getSystem().getString(
                                                    R.string.config_chooseAccountActivity));
                                    intent.setClassName(componentName.getPackageName(),
                                            componentName.getClassName());
                                    intent.putExtra(KEY_ACCOUNTS, accounts);
                                    intent.putExtra(KEY_ACCOUNT_MANAGER_RESPONSE,
                                            new AccountManagerResponse(chooseResponse));
@@ -1934,7 +1940,10 @@ public class AccountManager {
            String[] addAccountRequiredFeatures,
            Bundle addAccountOptions) {
        Intent intent = new Intent();
        intent.setClassName("android", "android.accounts.ChooseTypeAndAccountActivity");
        ComponentName componentName = ComponentName.unflattenFromString(
                Resources.getSystem().getString(R.string.config_chooseTypeAndAccountActivity));
        intent.setClassName(componentName.getPackageName(),
                componentName.getClassName());
        intent.putExtra(ChooseTypeAndAccountActivity.EXTRA_ALLOWABLE_ACCOUNTS_ARRAYLIST,
                allowableAccounts);
        intent.putExtra(ChooseTypeAndAccountActivity.EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY,
+10 −0
Original line number Diff line number Diff line
@@ -1031,4 +1031,14 @@

    <!-- Flag indicating if the speed up audio on mt call code should be executed -->
    <bool name="config_speed_up_audio_on_mt_calls">false</bool>

    <!-- Class name of the framework account picker activity.
         Can be customized for other product types -->
    <string name="config_chooseAccountActivity"
            >android/android.accounts.ChooseAccountActivity</string>
    <!-- Class name of the account type and account picker activity.
         Can be customized for other product types -->
    <string name="config_chooseTypeAndAccountActivity"
            >android/android.accounts.ChooseTypeAndAccountActivity</string>

</resources>
+3 −0
Original line number Diff line number Diff line
@@ -863,6 +863,9 @@
  <java-symbol type="string" name="media_route_status_available" />
  <java-symbol type="string" name="media_route_status_not_available" />
  <java-symbol type="string" name="owner_name" />
  <java-symbol type="string" name="config_chooseAccountActivity" />
  <java-symbol type="string" name="config_chooseTypeAndAccountActivity" />


  <java-symbol type="plurals" name="abbrev_in_num_days" />
  <java-symbol type="plurals" name="abbrev_in_num_hours" />