summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/java/android/accounts/AccountManager.java33
-rw-r--r--core/java/android/accounts/ChooseAccountTypeActivity.java18
-rw-r--r--core/java/android/accounts/ChooseTypeAndAccountActivity.java89
-rw-r--r--core/java/android/provider/CalendarContract.java9
-rw-r--r--core/java/android/widget/TextView.java5
-rw-r--r--core/java/com/android/internal/widget/TransportControlView.java30
-rw-r--r--core/res/AndroidManifest.xml9
-rw-r--r--core/res/res/drawable-hdpi/ic_checkmark_holo_light.pngbin0 -> 924 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_checkmark_holo_light.pngbin0 -> 658 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_checkmark_holo_light.pngbin0 -> 1159 bytes
-rw-r--r--core/res/res/layout/choose_account_type.xml49
-rw-r--r--core/res/res/layout/choose_selected_account_row.xml46
-rw-r--r--core/res/res/layout/choose_type_and_account.xml37
-rwxr-xr-xcore/res/res/values/strings.xml11
14 files changed, 284 insertions, 52 deletions
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index 530ecf1..150880c 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -1782,7 +1782,8 @@ public class AccountManager {
* <p>
* The most common case is to call this with one account type, e.g.:
* <p>
- * <pre> newChooseAccountsIntent(null, null, new String[]{"com.google"}, null);</pre>
+ * <pre> newChooseAccountsIntent(null, null, new String[]{"com.google"}, false, null,
+ * null, null, null);</pre>
* @param selectedAccount if specified, indicates that the {@link Account} is the currently
* selected one, according to the caller's definition of selected.
* @param allowableAccounts an optional {@link ArrayList} of accounts that are allowed to be
@@ -1790,22 +1791,44 @@ public class AccountManager {
* @param allowableAccountTypes an optional string array of account types. These are used
* both to filter the shown accounts and to filter the list of account types that are shown
* when adding an account.
- * @param addAccountOptions This {@link Bundle} is passed as the addAccount options
- * @return an {@link Intent} that can be used to launch the ChooseAccount activity flow.
+ * @param alwaysPromptForAccount if set the account chooser screen is always shown, otherwise
+ * it is only shown when there is more than one account from which to choose
+ * @param descriptionOverrideText if non-null this string is used as the description in the
+ * accounts chooser screen rather than the default
+ * @param addAccountAuthTokenType this string is passed as the {@link #addAccount}
+ * authTokenType parameter
+ * @param addAccountRequiredFeatures this string array is passed as the {@link #addAccount}
+ * requiredFeatures parameter
+ * @param addAccountOptions This {@link Bundle} is passed as the {@link #addAccount} options
+ * parameter
+ * @return an {@link Intent} that can be used to launch the ChooseAccount activity flow.
*/
static public Intent newChooseAccountIntent(Account selectedAccount,
ArrayList<Account> allowableAccounts,
String[] allowableAccountTypes,
+ boolean alwaysPromptForAccount,
+ String descriptionOverrideText,
+ String addAccountAuthTokenType,
+ String[] addAccountRequiredFeatures,
Bundle addAccountOptions) {
Intent intent = new Intent();
intent.setClassName("android", "android.accounts.ChooseTypeAndAccountActivity");
intent.putExtra(ChooseTypeAndAccountActivity.EXTRA_ALLOWABLE_ACCOUNTS_ARRAYLIST,
allowableAccounts);
- intent.putExtra(ChooseTypeAndAccountActivity.EXTRA_ALLOWABLE_ACCOUNT_TYPES_ARRAYLIST,
- allowableAccountTypes != null ? Lists.newArrayList(allowableAccountTypes) : 0);
+ intent.putExtra(ChooseTypeAndAccountActivity.EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY,
+ allowableAccountTypes);
intent.putExtra(ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_OPTIONS_BUNDLE,
addAccountOptions);
intent.putExtra(ChooseTypeAndAccountActivity.EXTRA_SELECTED_ACCOUNT, selectedAccount);
+ intent.putExtra(ChooseTypeAndAccountActivity.EXTRA_ALWAYS_PROMPT_FOR_ACCOUNT,
+ alwaysPromptForAccount);
+ intent.putExtra(ChooseTypeAndAccountActivity.EXTRA_DESCRIPTION_TEXT_OVERRIDE,
+ descriptionOverrideText);
+ intent.putExtra(ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_AUTH_TOKEN_TYPE_STRING,
+ addAccountAuthTokenType);
+ intent.putExtra(
+ ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_REQUIRED_FEATURES_STRING_ARRAY,
+ addAccountRequiredFeatures);
return intent;
}
diff --git a/core/java/android/accounts/ChooseAccountTypeActivity.java b/core/java/android/accounts/ChooseAccountTypeActivity.java
index 836164c..5239e8c 100644
--- a/core/java/android/accounts/ChooseAccountTypeActivity.java
+++ b/core/java/android/accounts/ChooseAccountTypeActivity.java
@@ -52,14 +52,14 @@ public class ChooseAccountTypeActivity extends Activity implements AccountManage
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- setContentView(R.layout.choose_account);
+ setContentView(R.layout.choose_account_type);
// Read the validAccountTypes, if present, and add them to the setOfAllowableAccountTypes
Set<String> setOfAllowableAccountTypes = null;
- ArrayList<String> validAccountTypes = getIntent().getStringArrayListExtra(
- ChooseTypeAndAccountActivity.EXTRA_ALLOWABLE_ACCOUNT_TYPES_ARRAYLIST);
+ String[] validAccountTypes = getIntent().getStringArrayExtra(
+ ChooseTypeAndAccountActivity.EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY);
if (validAccountTypes != null) {
- setOfAllowableAccountTypes = new HashSet<String>(validAccountTypes.size());
+ setOfAllowableAccountTypes = new HashSet<String>(validAccountTypes.length);
for (String type : validAccountTypes) {
setOfAllowableAccountTypes.add(type);
}
@@ -138,10 +138,14 @@ public class ChooseAccountTypeActivity extends Activity implements AccountManage
protected void runAddAccountForAuthenticator(AuthInfo authInfo) {
Log.d(TAG, "selected account type " + authInfo.name);
- Bundle options = getIntent().getBundleExtra(
+ final Bundle options = getIntent().getBundleExtra(
ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_OPTIONS_BUNDLE);
- AccountManager.get(this).addAccount(authInfo.desc.type, null, null, options,
- this, this, null);
+ final String[] requiredFeatures = getIntent().getStringArrayExtra(
+ ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_REQUIRED_FEATURES_STRING_ARRAY);
+ final String authTokenType = getIntent().getStringExtra(
+ ChooseTypeAndAccountActivity.EXTRA_ADD_ACCOUNT_AUTH_TOKEN_TYPE_STRING);
+ AccountManager.get(this).addAccount(authInfo.desc.type, authTokenType, requiredFeatures,
+ options, this, this, null /* Handler */);
}
public void run(final AccountManagerFuture<Bundle> accountManagerFuture) {
diff --git a/core/java/android/accounts/ChooseTypeAndAccountActivity.java b/core/java/android/accounts/ChooseTypeAndAccountActivity.java
index a903399..852c4dd 100644
--- a/core/java/android/accounts/ChooseTypeAndAccountActivity.java
+++ b/core/java/android/accounts/ChooseTypeAndAccountActivity.java
@@ -23,6 +23,7 @@ import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Parcelable;
+import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@@ -57,25 +58,68 @@ public class ChooseTypeAndAccountActivity extends Activity {
* that match the types in this list, if this parameter is supplied. This list is also
* used to filter the allowable account types if add account is selected.
*/
- public static final String EXTRA_ALLOWABLE_ACCOUNT_TYPES_ARRAYLIST = "allowableAccountTypes";
+ public static final String EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY = "allowableAccountTypes";
/**
- * This is passed as the options bundle in AccountManager.addAccount() if it is called.
+ * This is passed as the addAccountOptions parameter in AccountManager.addAccount()
+ * if it is called.
*/
public static final String EXTRA_ADD_ACCOUNT_OPTIONS_BUNDLE = "addAccountOptions";
/**
+ * This is passed as the requiredFeatures parameter in AccountManager.addAccount()
+ * if it is called.
+ */
+ public static final String EXTRA_ADD_ACCOUNT_REQUIRED_FEATURES_STRING_ARRAY =
+ "addAccountRequiredFeatures";
+
+ /**
+ * This is passed as the authTokenType string in AccountManager.addAccount()
+ * if it is called.
+ */
+ public static final String EXTRA_ADD_ACCOUNT_AUTH_TOKEN_TYPE_STRING = "authTokenType";
+
+ /**
* If set then the specified account is already "selected".
*/
public static final String EXTRA_SELECTED_ACCOUNT = "selectedAccount";
+ /**
+ * If true then display the account selection list even if there is just
+ * one account to choose from. boolean.
+ */
+ public static final String EXTRA_ALWAYS_PROMPT_FOR_ACCOUNT =
+ "alwaysPromptForAccount";
+
+ /**
+ * If set then this string willb e used as the description rather than
+ * the default.
+ */
+ public static final String EXTRA_DESCRIPTION_TEXT_OVERRIDE =
+ "descriptionTextOverride";
+
private ArrayList<AccountInfo> mAccountInfos;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.choose_type_and_account);
+
+ // save some items we use frequently
final AccountManager accountManager = AccountManager.get(this);
+ final Intent intent = getIntent();
+
+ // override the description text if supplied
+ final String descriptionOverride =
+ intent.getStringExtra(EXTRA_DESCRIPTION_TEXT_OVERRIDE);
+ if (!TextUtils.isEmpty(descriptionOverride)) {
+ ((TextView)findViewById(R.id.description)).setText(descriptionOverride);
+ }
+
+ // If the selected account matches one in the list we will place a
+ // checkmark next to it.
+ final Account selectedAccount =
+ (Account)intent.getParcelableExtra(EXTRA_SELECTED_ACCOUNT);
// build an efficiently queryable map of account types to authenticator descriptions
final HashMap<String, AuthenticatorDescription> typeToAuthDescription =
@@ -87,7 +131,7 @@ public class ChooseTypeAndAccountActivity extends Activity {
// Read the validAccounts, if present, and add them to the setOfAllowableAccounts
Set<Account> setOfAllowableAccounts = null;
final ArrayList<Parcelable> validAccounts =
- getIntent().getParcelableArrayListExtra(EXTRA_ALLOWABLE_ACCOUNTS_ARRAYLIST);
+ intent.getParcelableArrayListExtra(EXTRA_ALLOWABLE_ACCOUNTS_ARRAYLIST);
if (validAccounts != null) {
setOfAllowableAccounts = new HashSet<Account>(validAccounts.size());
for (Parcelable parcelable : validAccounts) {
@@ -97,10 +141,10 @@ public class ChooseTypeAndAccountActivity extends Activity {
// Read the validAccountTypes, if present, and add them to the setOfAllowableAccountTypes
Set<String> setOfAllowableAccountTypes = null;
- final ArrayList<String> validAccountTypes =
- getIntent().getStringArrayListExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_ARRAYLIST);
+ final String[] validAccountTypes =
+ intent.getStringArrayExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY);
if (validAccountTypes != null) {
- setOfAllowableAccountTypes = new HashSet<String>(validAccountTypes.size());
+ setOfAllowableAccountTypes = new HashSet<String>(validAccountTypes.length);
for (String type : validAccountTypes) {
setOfAllowableAccountTypes.add(type);
}
@@ -121,7 +165,8 @@ public class ChooseTypeAndAccountActivity extends Activity {
continue;
}
mAccountInfos.add(new AccountInfo(account,
- getDrawableForType(typeToAuthDescription, account.type)));
+ getDrawableForType(typeToAuthDescription, account.type),
+ account.equals(selectedAccount)));
}
// If there are no allowable accounts go directly to add account
@@ -131,7 +176,8 @@ public class ChooseTypeAndAccountActivity extends Activity {
}
// if there is only one allowable account return it
- if (mAccountInfos.size() == 1) {
+ if (!intent.getBooleanExtra(EXTRA_ALWAYS_PROMPT_FOR_ACCOUNT, false)
+ && mAccountInfos.size() == 1) {
Account account = mAccountInfos.get(0).account;
setResultAndFinish(account.name, account.type);
return;
@@ -143,7 +189,6 @@ public class ChooseTypeAndAccountActivity extends Activity {
list.setAdapter(new AccountArrayAdapter(this,
android.R.layout.simple_list_item_1, mAccountInfos));
list.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
- list.setTextFilterEnabled(false);
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
onListItemClick((ListView)parent, v, position, id);
@@ -173,10 +218,12 @@ public class ChooseTypeAndAccountActivity extends Activity {
return;
}
}
+ Log.d(TAG, "ChooseTypeAndAccountActivity.onActivityResult: canceled");
setResult(Activity.RESULT_CANCELED);
finish();
}
+
private Drawable getDrawableForType(
final HashMap<String, AuthenticatorDescription> typeToAuthDescription,
String accountType) {
@@ -212,31 +259,40 @@ public class ChooseTypeAndAccountActivity extends Activity {
bundle.putString(AccountManager.KEY_ACCOUNT_NAME, accountName);
bundle.putString(AccountManager.KEY_ACCOUNT_TYPE, accountType);
setResult(Activity.RESULT_OK, new Intent().putExtras(bundle));
+ Log.d(TAG, "ChooseTypeAndAccountActivity.setResultAndFinish: "
+ + "selected account " + accountName + ", " + accountType);
finish();
}
private void startChooseAccountTypeActivity() {
final Intent intent = new Intent(this, ChooseAccountTypeActivity.class);
- intent.putStringArrayListExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_ARRAYLIST,
- getIntent().getStringArrayListExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_ARRAYLIST));
+ intent.putExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY,
+ getIntent().getStringArrayExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_STRING_ARRAY));
intent.putExtra(EXTRA_ADD_ACCOUNT_OPTIONS_BUNDLE,
- getIntent().getBundleExtra(EXTRA_ALLOWABLE_ACCOUNT_TYPES_ARRAYLIST));
+ getIntent().getBundleExtra(EXTRA_ADD_ACCOUNT_OPTIONS_BUNDLE));
+ intent.putExtra(EXTRA_ADD_ACCOUNT_REQUIRED_FEATURES_STRING_ARRAY,
+ getIntent().getStringArrayExtra(EXTRA_ADD_ACCOUNT_REQUIRED_FEATURES_STRING_ARRAY));
+ intent.putExtra(EXTRA_ADD_ACCOUNT_AUTH_TOKEN_TYPE_STRING,
+ getIntent().getStringExtra(EXTRA_ADD_ACCOUNT_AUTH_TOKEN_TYPE_STRING));
startActivityForResult(intent, 0);
}
private static class AccountInfo {
final Account account;
final Drawable drawable;
+ private final boolean checked;
- AccountInfo(Account account, Drawable drawable) {
+ AccountInfo(Account account, Drawable drawable, boolean checked) {
this.account = account;
this.drawable = drawable;
+ this.checked = checked;
}
}
private static class ViewHolder {
ImageView icon;
TextView text;
+ ImageView checkmark;
}
private static class AccountArrayAdapter extends ArrayAdapter<AccountInfo> {
@@ -256,10 +312,11 @@ public class ChooseTypeAndAccountActivity extends Activity {
ViewHolder holder;
if (convertView == null) {
- convertView = mLayoutInflater.inflate(R.layout.choose_account_row, null);
+ convertView = mLayoutInflater.inflate(R.layout.choose_selected_account_row, null);
holder = new ViewHolder();
holder.text = (TextView) convertView.findViewById(R.id.account_row_text);
holder.icon = (ImageView) convertView.findViewById(R.id.account_row_icon);
+ holder.checkmark = (ImageView) convertView.findViewById(R.id.account_row_checkmark);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
@@ -267,7 +324,9 @@ public class ChooseTypeAndAccountActivity extends Activity {
holder.text.setText(mInfos.get(position).account.name);
holder.icon.setImageDrawable(mInfos.get(position).drawable);
-
+ final int displayCheckmark =
+ mInfos.get(position).checked ? View.VISIBLE : View.INVISIBLE;
+ holder.checkmark.setVisibility(displayCheckmark);
return convertView;
}
}
diff --git a/core/java/android/provider/CalendarContract.java b/core/java/android/provider/CalendarContract.java
index 9ba1fdb..4b4d308 100644
--- a/core/java/android/provider/CalendarContract.java
+++ b/core/java/android/provider/CalendarContract.java
@@ -292,7 +292,9 @@ public final class CalendarContract {
*/
protected interface CalendarColumns {
/**
- * The color of the calendar
+ * The color of the calendar. This should only be updated by the sync
+ * adapter, not other apps, as changing a calendar's color can adversely
+ * affect its display.
* <P>Type: INTEGER (color value)</P>
*/
public static final String CALENDAR_COLOR = "calendar_color";
@@ -551,7 +553,6 @@ public final class CalendarContract {
* <ul>
* <li>{@link #NAME}</li>
* <li>{@link #CALENDAR_DISPLAY_NAME}</li>
- * <li>{@link #CALENDAR_COLOR}</li>
* <li>{@link #VISIBLE}</li>
* <li>{@link #SYNC_EVENTS}</li>
* </ul>
@@ -559,6 +560,7 @@ public final class CalendarContract {
* <ul>
* <li>{@link #ACCOUNT_NAME}</li>
* <li>{@link #ACCOUNT_TYPE}</li>
+ * <li>{@link #CALENDAR_COLOR}</li>
* <li>{@link #_SYNC_ID}</li>
* <li>{@link #DIRTY}</li>
* <li>{@link #OWNER_ACCOUNT}</li>
@@ -785,7 +787,8 @@ public final class CalendarContract {
public static final String EVENT_LOCATION = "eventLocation";
/**
- * A secondary color for the individual event. Column name.
+ * A secondary color for the individual event. Reserved for future use.
+ * Column name.
* <P>Type: INTEGER</P>
*/
public static final String EVENT_COLOR = "eventColor";
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index d78a7a3..d680f36 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -1193,6 +1193,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
super.setEnabled(enabled);
prepareCursorControllers();
+ if (enabled) {
+ // Make sure IME is updated with current editor info.
+ InputMethodManager imm = InputMethodManager.peekInstance();
+ if (imm != null) imm.restartInput(this);
+ }
}
/**
diff --git a/core/java/com/android/internal/widget/TransportControlView.java b/core/java/com/android/internal/widget/TransportControlView.java
index 29ad15b..1c7ad61 100644
--- a/core/java/com/android/internal/widget/TransportControlView.java
+++ b/core/java/com/android/internal/widget/TransportControlView.java
@@ -21,6 +21,8 @@ import java.lang.ref.WeakReference;
import com.android.internal.widget.LockScreenWidgetCallback;
import com.android.internal.widget.LockScreenWidgetInterface;
+import android.app.PendingIntent;
+import android.app.PendingIntent.CanceledException;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -68,7 +70,7 @@ public class TransportControlView extends FrameLayout implements OnClickListener
private int mClientGeneration;
private Metadata mMetadata = new Metadata();
private boolean mAttached;
- private ComponentName mClientName;
+ private PendingIntent mClientIntent;
private int mTransportControlFlags;
private int mPlayState;
private AudioManager mAudioManager;
@@ -100,6 +102,9 @@ public class TransportControlView extends FrameLayout implements OnClickListener
case MSG_SET_ARTWORK:
if (mClientGeneration == msg.arg1) {
+ if (mMetadata.bitmap != null) {
+ mMetadata.bitmap.recycle();
+ }
mMetadata.bitmap = (Bitmap) msg.obj;
mAlbumArt.setImageBitmap(mMetadata.bitmap);
}
@@ -116,7 +121,7 @@ public class TransportControlView extends FrameLayout implements OnClickListener
}
}
mClientGeneration = msg.arg1;
- mClientName = (ComponentName) msg.obj;
+ mClientIntent = (PendingIntent) msg.obj;
break;
}
@@ -174,12 +179,12 @@ public class TransportControlView extends FrameLayout implements OnClickListener
}
}
- public void setCurrentClientId(int clientGeneration, ComponentName clientEventReceiver,
+ public void setCurrentClientId(int clientGeneration, PendingIntent mediaIntent,
boolean clearing) throws RemoteException {
Handler handler = mLocalHandler.get();
if (handler != null) {
handler.obtainMessage(MSG_SET_GENERATION_ID,
- clientGeneration, (clearing ? 1 : 0), clientEventReceiver).sendToTarget();
+ clientGeneration, (clearing ? 1 : 0), mediaIntent).sendToTarget();
}
}
};
@@ -365,16 +370,27 @@ public class TransportControlView extends FrameLayout implements OnClickListener
}
private void sendMediaButtonClick(int keyCode) {
- // TODO: target to specific player based on mClientName
+ // use the registered PendingIntent that will be processed by the registered
+ // media button event receiver, which is the component of mClientIntent
KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode);
Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON);
intent.putExtra(Intent.EXTRA_KEY_EVENT, keyEvent);
- getContext().sendOrderedBroadcast(intent, null);
+ try {
+ mClientIntent.send(getContext(), 0, intent);
+ } catch (CanceledException e) {
+ Log.e(TAG, "Error sending intent for media button down: "+e);
+ e.printStackTrace();
+ }
keyEvent = new KeyEvent(KeyEvent.ACTION_UP, keyCode);
intent = new Intent(Intent.ACTION_MEDIA_BUTTON);
intent.putExtra(Intent.EXTRA_KEY_EVENT, keyEvent);
- getContext().sendOrderedBroadcast(intent, null);
+ try {
+ mClientIntent.send(getContext(), 0, intent);
+ } catch (CanceledException e) {
+ Log.e(TAG, "Error sending intent for media button up: "+e);
+ e.printStackTrace();
+ }
}
public void setCallback(LockScreenWidgetCallback callback) {
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 80741eb..9755f22 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1533,19 +1533,14 @@
<activity android:name="android.accounts.ChooseTypeAndAccountActivity"
android:excludeFromRecents="true"
android:exported="true"
- android:theme="@android:style/Theme.Holo.Dialog"
+ android:theme="@android:style/Theme.Holo.DialogWhenLarge.NoActionBar"
android:label="@string/choose_account_label"
android:process=":ui">
- <intent-filter>
- <action android:name="android.intent.action.PICK" />
- <category android:name="android.intent.category.ACCOUNT" />
- </intent-filter>
</activity>
<activity android:name="android.accounts.ChooseAccountTypeActivity"
android:excludeFromRecents="true"
- android:exported="true"
- android:theme="@android:style/Theme.Holo.Dialog"
+ android:theme="@android:style/Theme.Holo.DialogWhenLarge.NoActionBar"
android:label="@string/choose_account_label"
android:process=":ui">
</activity>
diff --git a/core/res/res/drawable-hdpi/ic_checkmark_holo_light.png b/core/res/res/drawable-hdpi/ic_checkmark_holo_light.png
new file mode 100644
index 0000000..2c6719b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_checkmark_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_checkmark_holo_light.png b/core/res/res/drawable-mdpi/ic_checkmark_holo_light.png
new file mode 100644
index 0000000..744e964
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_checkmark_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_checkmark_holo_light.png b/core/res/res/drawable-xhdpi/ic_checkmark_holo_light.png
new file mode 100644
index 0000000..1607f35
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_checkmark_holo_light.png
Binary files differ
diff --git a/core/res/res/layout/choose_account_type.xml b/core/res/res/layout/choose_account_type.xml
new file mode 100644
index 0000000..db96dc1
--- /dev/null
+++ b/core/res/res/layout/choose_account_type.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/layout/list_content.xml
+**
+** Copyright 2011, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip">
+
+ <TextView android:id="@+id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_gravity="left"
+ android:text="@string/add_account_label"
+ android:paddingTop="16dip"
+ android:paddingBottom="16dip"
+ android:textColor="@android:color/holo_blue_light"
+ />
+
+ <View android:layout_height="3dip"
+ android:layout_width="match_parent"
+ android:background="#323232"/>
+
+ <ListView android:id="@android:id/list"
+ android:layout_width="match_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1"
+ android:drawSelectorOnTop="false"
+ android:scrollbarAlwaysDrawVerticalTrack="true" />
+
+</LinearLayout>
diff --git a/core/res/res/layout/choose_selected_account_row.xml b/core/res/res/layout/choose_selected_account_row.xml
new file mode 100644
index 0000000..d88750d
--- /dev/null
+++ b/core/res/res/layout/choose_selected_account_row.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:paddingLeft="0dip"
+ android:paddingRight="0dip"
+ android:orientation="horizontal" >
+
+ <ImageView android:id="@+id/account_row_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:paddingRight="8dip" />
+
+ <TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/account_row_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:gravity="center_vertical"
+ android:minHeight="?android:attr/listPreferredItemHeight" />
+
+ <ImageView android:id="@+id/account_row_checkmark"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="right"
+ android:layout_weight="2"
+ android:paddingRight="8dip"
+ android:src="@drawable/ic_checkmark_holo_light" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/core/res/res/layout/choose_type_and_account.xml b/core/res/res/layout/choose_type_and_account.xml
index 8be01b4..5a05126 100644
--- a/core/res/res/layout/choose_type_and_account.xml
+++ b/core/res/res/layout/choose_type_and_account.xml
@@ -24,21 +24,44 @@
android:paddingLeft="16dip"
android:paddingRight="16dip">
- <ListView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@android:id/list"
+ <TextView android:id="@+id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_gravity="left"
+ android:text="@string/choose_account_label"
+ android:paddingTop="16dip"
+ android:paddingBottom="16dip"
+ android:textColor="@android:color/holo_blue_light"
+ />
+
+ <View android:layout_height="3dip"
+ android:layout_width="match_parent"
+ android:background="#323232"/>
+
+ <TextView android:id="@+id/description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_gravity="left|center_vertical"
+ android:text="@string/choose_account_text"
+ android:paddingTop="16dip"
+ android:paddingBottom="16dip"
+ />
+
+ <ListView android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
android:drawSelectorOnTop="false"
+ android:layout_weight="1"
android:scrollbarAlwaysDrawVerticalTrack="true" />
<Button android:id="@+id/addAccount"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="2"
android:layout_marginLeft="2dip"
android:layout_marginRight="2dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textStyle="bold"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:text="@string/add_account_button_label"
/>
</LinearLayout>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index f75c7d5..e093fa9 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3094,6 +3094,12 @@
<!-- Choose Account Activity label -->
<string name="choose_account_label">Select an account</string>
+ <string name="add_account_label">"Add an account"</string>
+ <string name="choose_account_text">"Which account would you like to use?"</string>
+
+ <!-- Button label to add an account [CHAR LIMIT=20] -->
+ <string name="add_account_button_label">Add account</string>
+
<!-- NumberPicker - accessibility support -->
<!-- Description of the button to increment the NumberPicker value. [CHAR LIMIT=NONE] -->
<string name="number_picker_increment_button">Increment</string>
@@ -3174,6 +3180,9 @@
<!-- Slide lock screen -->
+ <!-- Description of the sliding handle in the Slide unlock screen. [CHAR LIMIT=NONE] -->
+ <string name="content_description_sliding_handle">"Sliding handle. Tap and hold."</string>
+
<!-- Description of the up direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] -->
<string name="description_direction_up">Up for <xliff:g id="target_description" example="Unlock">%s</xliff:g>.</string>
<!-- Description of the down direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] -->
@@ -3293,4 +3302,4 @@
<!-- Delimeter used between each item in a textual list; for example "Alpha, Beta". [CHAR LIMIT=3] -->
<string name="list_delimeter">", "</string>
-</resources>
+</resources> \ No newline at end of file