Code example for AccessibilityEvent

Methods: getParcelableData

0
     */ 
    private void assertEqualsNotificationAsParcelableData(AccessibilityEvent expectedEvent,
            AccessibilityEvent receivedEvent) {
        String message = "parcelableData has incorrect value";
        Message expectedMessage = (Message) expectedEvent.getParcelableData();
        Message receivedMessage = (Message) receivedEvent.getParcelableData();
 
        if (expectedMessage == null) {
            if (receivedMessage == null) {
                return; 
            } 
        } 
 
        TestCase.assertNotNull(message, receivedMessage);
 
        // we do a very simple sanity check since we do not test Message 
        TestCase.assertEquals(message, expectedMessage.what, receivedMessage.what);
    } 
 
    /** 
     * Compares the text of the <code>expectedEvent</code> and