RobotiumTech / robotium

Android UI Testing
http://www.robotium.org
Apache License 2.0
2.86k stars 786 forks source link

Identify DecorViews on Android 6.0 Fixes #786 #787

Closed hypest closed 9 years ago

hypest commented 9 years ago

The DecorView class package has been changed into com.android.internal.policy.PhoneWindow$DecorView so check for that as well.

Without this updated check ViewFetcher::getNonDecorViews() returns the DecorViews and that ends up making having the scroller to basically scroll the views twice.

A good opportunity for a minimal refactor and have the DecorView check be done in a dedicated ViewFetcher::isDecorView().

Let me know in the comments if the PR or the fix itself needs more work.

I refrained from adding com.android.internal.policy.MultiPhoneWindow$MultiPhoneDecorView to the check as well as I cannot test that.

Cheers!

renas commented 9 years ago

Looks good! Thanks for contributing.