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

Commit 228d084b authored by Hemal Patel's avatar Hemal Patel Committed by android-build-merger
Browse files

Merge \\\\\"Docs: Fixed wrong return type of a method\\\\\" into mnc-io-docs...

Merge \\\\\"Docs: Fixed wrong return type of a method\\\\\" into mnc-io-docs am: 13ce5dca am: e02e644b am: 518f5a4e am: bbc07950
am: 9ef1e926

Change-Id: I723c21b76e791336d25af5ce46ad1c13c097572b
parents e7f27fbf 9ef1e926
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -454,10 +454,10 @@ following example code demonstrates a basic implementation of this method.</p>

<pre>
&#64;Override
public void dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
    super.dispatchPopulateAccessibilityEvent(event);
public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
    // Call the super implementation to populate its text to the event, which
    // calls onPopulateAccessibilityEvent() on API Level 14 and up.
    boolean completed = super.dispatchPopulateAccessibilityEvent(event);
    
    // In case this is running on a API revision earlier that 14, check
    // the text content of the event and add an appropriate text
@@ -465,7 +465,9 @@ public void dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
    CharSequence text = getText();
    if (!TextUtils.isEmpty(text)) {
        event.getText().add(text);
        return true;
    }
    return completed;
}
</pre>