Loading core/java/android/content/pm/VerifierDeviceIdentity.java +9 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,15 @@ public class VerifierDeviceIdentity implements Parcelable { value = group - ('2' - 26); } else if (group == SEPARATOR) { continue; } else if ('a' <= group && group <= 'z') { /* Lowercase letters should be the same as uppercase for Base32 */ value = group - 'a'; } else if (group == '0') { /* Be nice to users that mistake O (letter) for 0 (zero) */ value = 'O' - 'A'; } else if (group == '1') { /* Be nice to users that mistake I (letter) for 1 (one) */ value = 'I' - 'A'; } else { throw new IllegalArgumentException("base base-32 character: " + group); } Loading core/java/android/widget/AutoCompleteTextView.java +9 −12 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.widget; import com.android.internal.R; import android.content.Context; import android.content.res.TypedArray; import android.database.DataSetObserver; Loading @@ -38,6 +36,8 @@ import android.view.inputmethod.CompletionInfo; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodManager; import com.android.internal.R; /** * <p>An editable text view that shows completion suggestions automatically Loading Loading @@ -744,7 +744,6 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe if (mFilter != null) { mPopupCanBeUpdated = true; performFiltering(getText(), mLastKeyCode); buildImeCompletions(); } } else { // drop down is automatically dismissed when enough characters Loading Loading @@ -837,10 +836,6 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe @Override public void onCommitCompletion(CompletionInfo completion) { if (isPopupShowing()) { mBlockCompletion = true; replaceText(completion.getText()); mBlockCompletion = false; mPopup.performItemClick(completion.getPosition()); } } Loading Loading @@ -938,7 +933,8 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe */ final boolean dropDownAlwaysVisible = mPopup.isDropDownAlwaysVisible(); if ((count > 0 || dropDownAlwaysVisible) && enoughToFilter()) { final boolean enoughToFilter = enoughToFilter(); if ((count > 0 || dropDownAlwaysVisible) && enoughToFilter) { if (hasFocus() && hasWindowFocus() && mPopupCanBeUpdated) { showDropDown(); } Loading Loading @@ -1049,6 +1045,8 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe * <p>Displays the drop down on screen.</p> */ public void showDropDown() { buildImeCompletions(); if (mPopup.getAnchorView() == null) { if (mDropDownAnchorId != View.NO_ID) { mPopup.setAnchorView(getRootView().findViewById(mDropDownAnchorId)); Loading Loading @@ -1090,8 +1088,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe realCount++; Object item = adapter.getItem(i); long id = adapter.getItemId(i); completions[i] = new CompletionInfo(id, i, convertSelectionToString(item)); completions[i] = new CompletionInfo(id, i, convertSelectionToString(item)); } } Loading core/java/android/widget/CalendarView.java +14 −6 Original line number Diff line number Diff line Loading @@ -339,10 +339,8 @@ public class CalendarView extends FrameLayout { // initialization based on locale setCurrentLocale(Locale.getDefault()); TypedValue calendarViewStyle = new TypedValue(); context.getTheme().resolveAttribute(R.attr.calendarViewStyle, calendarViewStyle, true); TypedArray attributesArray = context.obtainStyledAttributes(calendarViewStyle.resourceId, R.styleable.CalendarView); TypedArray attributesArray = context.obtainStyledAttributes(attrs, R.styleable.CalendarView, R.attr.calendarViewStyle, 0); mShowWeekNumber = attributesArray.getBoolean(R.styleable.CalendarView_showWeekNumber, DEFAULT_SHOW_WEEK_NUMBER); mFirstDayOfWeek = attributesArray.getInt(R.styleable.CalendarView_firstDayOfWeek, Loading @@ -355,6 +353,9 @@ public class CalendarView extends FrameLayout { if (TextUtils.isEmpty(maxDate) || !parseDate(maxDate, mMaxDate)) { parseDate(DEFAULT_MAX_DATE, mMaxDate); } if (mMaxDate.before(mMinDate)) { throw new IllegalArgumentException("Max date cannot be before min date."); } mShownWeekCount = attributesArray.getInt(R.styleable.CalendarView_shownWeekCount, DEFAULT_SHOWN_WEEK_COUNT); mSelectedWeekBackgroundColor = attributesArray.getColor( Loading Loading @@ -407,9 +408,16 @@ public class CalendarView extends FrameLayout { setUpListView(); setUpAdapter(); // go to today now // go to today or whichever is close to today min or max date mTempDate.setTimeInMillis(System.currentTimeMillis()); if (mTempDate.before(mMinDate)) { goTo(mMinDate, false, true, true); } else if (mMaxDate.before(mTempDate)) { goTo(mMaxDate, false, true, true); } else { goTo(mTempDate, false, true, true); } invalidate(); } Loading core/java/android/widget/RelativeLayout.java +5 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,11 @@ public class RelativeLayout extends ViewGroup { * Describes how the child views are positioned. Defaults to * <code>Gravity.LEFT | Gravity.TOP</code>. * * <p>Note that since RelativeLayout considers the positioning of each child * relative to one another to be significant, setting gravity will affect * the positioning of all children as a single unit within the parent. * This happens after children have been relatively positioned.</p> * * @param gravity See {@link android.view.Gravity} * * @see #setHorizontalGravity(int) Loading core/java/android/widget/TextView.java +16 −8 Original line number Diff line number Diff line Loading @@ -8939,14 +8939,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener final boolean isPassword = hasPasswordTransformationMethod(); if (!isPassword) { CharSequence text = getText(); if (TextUtils.isEmpty(text)) { text = getHint(); } CharSequence text = getTextForAccessibility(); if (TextUtils.isEmpty(text)) { text = getContentDescription(); } if (!TextUtils.isEmpty(text)) { event.getText().add(text); } } Loading @@ -8972,7 +8966,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener final boolean isPassword = hasPasswordTransformationMethod(); if (!isPassword) { info.setText(getText()); info.setText(getTextForAccessibility()); } info.setPassword(isPassword); } Loading @@ -8988,6 +8982,20 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener super.sendAccessibilityEvent(eventType); } /** * Gets the text reported for accessibility purposes. It is the * text if not empty or the hint. * * @return The accessibility text. */ private CharSequence getTextForAccessibility() { CharSequence text = getText(); if (TextUtils.isEmpty(text)) { text = getHint(); } return text; } void sendAccessibilityEventTypeViewTextChanged(CharSequence beforeText, int fromIndex, int removedCount, int addedCount) { AccessibilityEvent event = Loading Loading
core/java/android/content/pm/VerifierDeviceIdentity.java +9 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,15 @@ public class VerifierDeviceIdentity implements Parcelable { value = group - ('2' - 26); } else if (group == SEPARATOR) { continue; } else if ('a' <= group && group <= 'z') { /* Lowercase letters should be the same as uppercase for Base32 */ value = group - 'a'; } else if (group == '0') { /* Be nice to users that mistake O (letter) for 0 (zero) */ value = 'O' - 'A'; } else if (group == '1') { /* Be nice to users that mistake I (letter) for 1 (one) */ value = 'I' - 'A'; } else { throw new IllegalArgumentException("base base-32 character: " + group); } Loading
core/java/android/widget/AutoCompleteTextView.java +9 −12 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.widget; import com.android.internal.R; import android.content.Context; import android.content.res.TypedArray; import android.database.DataSetObserver; Loading @@ -38,6 +36,8 @@ import android.view.inputmethod.CompletionInfo; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodManager; import com.android.internal.R; /** * <p>An editable text view that shows completion suggestions automatically Loading Loading @@ -744,7 +744,6 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe if (mFilter != null) { mPopupCanBeUpdated = true; performFiltering(getText(), mLastKeyCode); buildImeCompletions(); } } else { // drop down is automatically dismissed when enough characters Loading Loading @@ -837,10 +836,6 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe @Override public void onCommitCompletion(CompletionInfo completion) { if (isPopupShowing()) { mBlockCompletion = true; replaceText(completion.getText()); mBlockCompletion = false; mPopup.performItemClick(completion.getPosition()); } } Loading Loading @@ -938,7 +933,8 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe */ final boolean dropDownAlwaysVisible = mPopup.isDropDownAlwaysVisible(); if ((count > 0 || dropDownAlwaysVisible) && enoughToFilter()) { final boolean enoughToFilter = enoughToFilter(); if ((count > 0 || dropDownAlwaysVisible) && enoughToFilter) { if (hasFocus() && hasWindowFocus() && mPopupCanBeUpdated) { showDropDown(); } Loading Loading @@ -1049,6 +1045,8 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe * <p>Displays the drop down on screen.</p> */ public void showDropDown() { buildImeCompletions(); if (mPopup.getAnchorView() == null) { if (mDropDownAnchorId != View.NO_ID) { mPopup.setAnchorView(getRootView().findViewById(mDropDownAnchorId)); Loading Loading @@ -1090,8 +1088,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe realCount++; Object item = adapter.getItem(i); long id = adapter.getItemId(i); completions[i] = new CompletionInfo(id, i, convertSelectionToString(item)); completions[i] = new CompletionInfo(id, i, convertSelectionToString(item)); } } Loading
core/java/android/widget/CalendarView.java +14 −6 Original line number Diff line number Diff line Loading @@ -339,10 +339,8 @@ public class CalendarView extends FrameLayout { // initialization based on locale setCurrentLocale(Locale.getDefault()); TypedValue calendarViewStyle = new TypedValue(); context.getTheme().resolveAttribute(R.attr.calendarViewStyle, calendarViewStyle, true); TypedArray attributesArray = context.obtainStyledAttributes(calendarViewStyle.resourceId, R.styleable.CalendarView); TypedArray attributesArray = context.obtainStyledAttributes(attrs, R.styleable.CalendarView, R.attr.calendarViewStyle, 0); mShowWeekNumber = attributesArray.getBoolean(R.styleable.CalendarView_showWeekNumber, DEFAULT_SHOW_WEEK_NUMBER); mFirstDayOfWeek = attributesArray.getInt(R.styleable.CalendarView_firstDayOfWeek, Loading @@ -355,6 +353,9 @@ public class CalendarView extends FrameLayout { if (TextUtils.isEmpty(maxDate) || !parseDate(maxDate, mMaxDate)) { parseDate(DEFAULT_MAX_DATE, mMaxDate); } if (mMaxDate.before(mMinDate)) { throw new IllegalArgumentException("Max date cannot be before min date."); } mShownWeekCount = attributesArray.getInt(R.styleable.CalendarView_shownWeekCount, DEFAULT_SHOWN_WEEK_COUNT); mSelectedWeekBackgroundColor = attributesArray.getColor( Loading Loading @@ -407,9 +408,16 @@ public class CalendarView extends FrameLayout { setUpListView(); setUpAdapter(); // go to today now // go to today or whichever is close to today min or max date mTempDate.setTimeInMillis(System.currentTimeMillis()); if (mTempDate.before(mMinDate)) { goTo(mMinDate, false, true, true); } else if (mMaxDate.before(mTempDate)) { goTo(mMaxDate, false, true, true); } else { goTo(mTempDate, false, true, true); } invalidate(); } Loading
core/java/android/widget/RelativeLayout.java +5 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,11 @@ public class RelativeLayout extends ViewGroup { * Describes how the child views are positioned. Defaults to * <code>Gravity.LEFT | Gravity.TOP</code>. * * <p>Note that since RelativeLayout considers the positioning of each child * relative to one another to be significant, setting gravity will affect * the positioning of all children as a single unit within the parent. * This happens after children have been relatively positioned.</p> * * @param gravity See {@link android.view.Gravity} * * @see #setHorizontalGravity(int) Loading
core/java/android/widget/TextView.java +16 −8 Original line number Diff line number Diff line Loading @@ -8939,14 +8939,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener final boolean isPassword = hasPasswordTransformationMethod(); if (!isPassword) { CharSequence text = getText(); if (TextUtils.isEmpty(text)) { text = getHint(); } CharSequence text = getTextForAccessibility(); if (TextUtils.isEmpty(text)) { text = getContentDescription(); } if (!TextUtils.isEmpty(text)) { event.getText().add(text); } } Loading @@ -8972,7 +8966,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener final boolean isPassword = hasPasswordTransformationMethod(); if (!isPassword) { info.setText(getText()); info.setText(getTextForAccessibility()); } info.setPassword(isPassword); } Loading @@ -8988,6 +8982,20 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener super.sendAccessibilityEvent(eventType); } /** * Gets the text reported for accessibility purposes. It is the * text if not empty or the hint. * * @return The accessibility text. */ private CharSequence getTextForAccessibility() { CharSequence text = getText(); if (TextUtils.isEmpty(text)) { text = getHint(); } return text; } void sendAccessibilityEventTypeViewTextChanged(CharSequence beforeText, int fromIndex, int removedCount, int addedCount) { AccessibilityEvent event = Loading