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

Commit 1ee83da7 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5335558 from 987ec033 to pi-qpr3-b-release

Change-Id: I6540d346744c791e8a514089f64407f664574fe4
parents 98684aa8 987ec033
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -418,28 +418,20 @@ public class AccessibilityCache {
     *
     * @param nodes The nodes in the hosting window.
     * @param rootNodeId The id of the root to evict.
     *
     * @return {@code true} if the cache was cleared
     */
    private boolean clearSubTreeRecursiveLocked(LongSparseArray<AccessibilityNodeInfo> nodes,
    private void clearSubTreeRecursiveLocked(LongSparseArray<AccessibilityNodeInfo> nodes,
            long rootNodeId) {
        AccessibilityNodeInfo current = nodes.get(rootNodeId);
        if (current == null) {
            // The node isn't in the cache, but its descendents might be.
            clear();
            return true;
            return;
        }
        nodes.remove(rootNodeId);
        final int childCount = current.getChildCount();
        for (int i = 0; i < childCount; i++) {
            final long childNodeId = current.getChildId(i);
            if (clearSubTreeRecursiveLocked(nodes, childNodeId)) {
                current.recycle();
                return true;
            }
            clearSubTreeRecursiveLocked(nodes, childNodeId);
        }
        current.recycle();
        return false;
    }

    /**
+9 −7
Original line number Diff line number Diff line
@@ -39,9 +39,9 @@ public class WebResourceResponse {

    /**
     * Constructs a resource response with the given MIME type, character encoding,
     * and input stream. Callers must implement
     * {@link InputStream#read(byte[]) InputStream.read(byte[])} for the input
     * stream.
     * and input stream. Callers must implement {@link InputStream#read(byte[])} for
     * the input stream. {@link InputStream#close()} will be called after the WebView
     * has finished with the response.
     *
     * <p class="note"><b>Note:</b> The MIME type and character encoding must
     * be specified as separate parameters (for example {@code "text/html"} and
@@ -64,9 +64,10 @@ public class WebResourceResponse {
    }

    /**
     * Constructs a resource response with the given parameters. Callers must
     * implement {@link InputStream#read(byte[]) InputStream.read(byte[])} for
     * the input stream.
     * Constructs a resource response with the given parameters. Callers must implement
     * {@link InputStream#read(byte[])} for the input stream. {@link InputStream#close()} will be
     * called after the WebView has finished with the response.
     *
     *
     * <p class="note"><b>Note:</b> See {@link #WebResourceResponse(String,String,InputStream)}
     * for details on what should be specified for {@code mimeType} and {@code encoding}.
@@ -198,7 +199,8 @@ public class WebResourceResponse {

    /**
     * Sets the input stream that provides the resource response's data. Callers
     * must implement {@link InputStream#read(byte[]) InputStream.read(byte[])}.
     * must implement {@link InputStream#read(byte[])}. {@link InputStream#close()}
     * will be called after the WebView has finished with the response.
     *
     * @param data the input stream that provides the resource response's data. Must not be a
     *             StringBufferInputStream.
+8 −2
Original line number Diff line number Diff line
@@ -3304,8 +3304,14 @@
    -->
    <string-array translatable="false" name="config_convert_to_emergency_number_map" />

    <!-- An array of packages for which notifications cannot be blocked. -->
    <string-array translatable="false" name="config_nonBlockableNotificationPackages" />
    <!-- An array of packages for which notifications cannot be blocked.
         Should only be used for core device functionality that must not be
         rendered inoperative for safety reasons, like the phone dialer and
         SMS handler. -->
    <string-array translatable="false" name="config_nonBlockableNotificationPackages">
        <item>com.android.dialer</item>
        <item>com.android.messaging</item>
    </string-array>

    <!-- An array of packages which can listen for notifications on low ram devices. -->
    <string-array translatable="false" name="config_allowedManagedServicesOnLowRamDevices" />
+0 −20
Original line number Diff line number Diff line
@@ -299,26 +299,6 @@ public class AccessibilityCacheTest {
        }
    }

    @Test
    public void subTreeChangeEventFromUncachedNode_clearsNodeInCache() {
        AccessibilityNodeInfo nodeInfo = getNodeWithA11yAndWindowId(CHILD_VIEW_ID, WINDOW_ID_1);
        long id = nodeInfo.getSourceNodeId();
        mAccessibilityCache.add(nodeInfo);
        nodeInfo.recycle();

        AccessibilityEvent event = AccessibilityEvent
                .obtain(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
        event.setContentChangeTypes(AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
        event.setSource(getMockViewWithA11yAndWindowIds(PARENT_VIEW_ID, WINDOW_ID_1));

        mAccessibilityCache.onAccessibilityEvent(event);
        AccessibilityNodeInfo shouldBeNull = mAccessibilityCache.getNode(WINDOW_ID_1, id);
        if (shouldBeNull != null) {
            shouldBeNull.recycle();
        }
        assertNull(shouldBeNull);
    }

    @Test
    public void scrollEvent_clearsNodeAndChild() {
        AccessibilityEvent event = AccessibilityEvent
+1 −0
Original line number Diff line number Diff line
@@ -440,6 +440,7 @@ static void android_media_visualizer_native_release(JNIEnv *env, jobject thiz)
        if (lpVisualizer == 0) {
            return;
        }
        lpVisualizer->release();
    }
    // delete the JNI data
    VisualizerJniStorage* lpJniStorage =
Loading