summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/content/Intent.java4
-rw-r--r--core/java/android/provider/ContactsContract.java2
-rw-r--r--core/java/android/view/View.java38
-rw-r--r--core/java/android/view/ViewOverlay.java4
-rw-r--r--core/java/android/view/ViewRootImpl.java2
-rw-r--r--core/java/android/widget/AbsListView.java12
-rw-r--r--core/java/android/widget/TextView.java9
7 files changed, 67 insertions, 4 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 65f904f..001a65c 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -2294,6 +2294,10 @@ public class Intent implements Parcelable, Cloneable {
* <p>Emergency calls cannot be intercepted using this mechanism, and
* other calls cannot be modified to call emergency numbers using this
* mechanism.
+ * <p>Some apps (such as VoIP apps) may want to redirect the outgoing
+ * call to use their own service instead. Those apps should first prevent
+ * the call from being placed by setting resultData to <code>null</code>
+ * and then start their own app to make the call.
* <p>You must hold the
* {@link android.Manifest.permission#PROCESS_OUTGOING_CALLS}
* permission to receive this Intent.</p>
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index c41c35e..220b997 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -2383,7 +2383,7 @@ public final class ContactsContract {
* parameters. The latter approach is preferable, especially when you can reuse the
* URI:
* <pre>
- * Uri rawContactUri = RawContacts.URI.buildUpon()
+ * Uri rawContactUri = RawContacts.CONTENT_URI.buildUpon()
* .appendQueryParameter(RawContacts.ACCOUNT_NAME, accountName)
* .appendQueryParameter(RawContacts.ACCOUNT_TYPE, accountType)
* .build();
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 0cd7c6e..4e8005f 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -4928,6 +4928,17 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @see AccessibilityNodeInfo
*/
public AccessibilityNodeInfo createAccessibilityNodeInfo() {
+ if (mAccessibilityDelegate != null) {
+ return mAccessibilityDelegate.createAccessibilityNodeInfo(this);
+ } else {
+ return createAccessibilityNodeInfoInternal();
+ }
+ }
+
+ /**
+ * @see #createAccessibilityNodeInfo()
+ */
+ AccessibilityNodeInfo createAccessibilityNodeInfoInternal() {
AccessibilityNodeProvider provider = getAccessibilityNodeProvider();
if (provider != null) {
return provider.createAccessibilityNodeInfo(View.NO_ID);
@@ -18690,6 +18701,33 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
public AccessibilityNodeProvider getAccessibilityNodeProvider(View host) {
return null;
}
+
+ /**
+ * Returns an {@link AccessibilityNodeInfo} representing the host view from the
+ * point of view of an {@link android.accessibilityservice.AccessibilityService}.
+ * This method is responsible for obtaining an accessibility node info from a
+ * pool of reusable instances and calling
+ * {@link #onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo)} on the host
+ * view to initialize the former.
+ * <p>
+ * <strong>Note:</strong> The client is responsible for recycling the obtained
+ * instance by calling {@link AccessibilityNodeInfo#recycle()} to minimize object
+ * creation.
+ * </p>
+ * <p>
+ * The default implementation behaves as
+ * {@link View#createAccessibilityNodeInfo() View#createAccessibilityNodeInfo()} for
+ * the case of no accessibility delegate been set.
+ * </p>
+ * @return A populated {@link AccessibilityNodeInfo}.
+ *
+ * @see AccessibilityNodeInfo
+ *
+ * @hide
+ */
+ public AccessibilityNodeInfo createAccessibilityNodeInfo(View host) {
+ return host.createAccessibilityNodeInfoInternal();
+ }
}
private class MatchIdPredicate implements Predicate<View> {
diff --git a/core/java/android/view/ViewOverlay.java b/core/java/android/view/ViewOverlay.java
index fe5b990..5510939 100644
--- a/core/java/android/view/ViewOverlay.java
+++ b/core/java/android/view/ViewOverlay.java
@@ -179,7 +179,9 @@ public class ViewOverlay {
public void clear() {
removeAllViews();
- mDrawables.clear();
+ if (mDrawables != null) {
+ mDrawables.clear();
+ }
}
boolean isEmpty() {
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index b63ccab..bbf5ae9 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -1639,7 +1639,7 @@ public final class ViewRootImpl implements ViewParent,
if (mAttachInfo.mHardwareRenderer != null &&
mAttachInfo.mHardwareRenderer.isEnabled()) {
- if (hwInitialized || windowShouldResize ||
+ if (hwInitialized ||
mWidth != mAttachInfo.mHardwareRenderer.getWidth() ||
mHeight != mAttachInfo.mHardwareRenderer.getHeight()) {
mAttachInfo.mHardwareRenderer.setup(mWidth, mHeight);
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 5a40368..bf66292 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -2213,6 +2213,18 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
class ListItemAccessibilityDelegate extends AccessibilityDelegate {
@Override
+ public AccessibilityNodeInfo createAccessibilityNodeInfo(View host) {
+ // If the data changed the children are invalid since the data model changed.
+ // Hence, we pretend they do not exist. After a layout the children will sync
+ // with the model at which point we notify that the accessibility state changed,
+ // so a service will be able to re-fetch the views.
+ if (mDataChanged) {
+ return null;
+ }
+ return super.createAccessibilityNodeInfo(host);
+ }
+
+ @Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
super.onInitializeAccessibilityNodeInfo(host, info);
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 8e6c739..53cf82d 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -6198,7 +6198,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
BoringLayout.Metrics hintBoring = UNKNOWN_BORING;
if (mTextDir == null) {
- getTextDirectionHeuristic();
+ mTextDir = getTextDirectionHeuristic();
}
int des = -1;
@@ -8541,6 +8541,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
return mEditor.mInBatchEditControllers;
}
+ @Override
+ public void onRtlPropertiesChanged(int layoutDirection) {
+ super.onRtlPropertiesChanged(layoutDirection);
+
+ mTextDir = getTextDirectionHeuristic();
+ }
+
TextDirectionHeuristic getTextDirectionHeuristic() {
if (hasPasswordTransformationMethod()) {
// passwords fields should be LTR