google / mobly-bundled-snippets

Snippets to allow Mobly tests to control Android devices by exposing a simplified Android API.
Apache License 2.0
48 stars 52 forks source link

Add RECEIVER_EXPORTED flag to portrait sys ui register receiver calls; #176

Closed VitaliDim closed 1 year ago

VitaliDim commented 1 year ago

Tested locally


This change is Reviewable

VitaliDim commented 1 year ago

@xpconanfan , @ko1in1u , @xianyuanjia please review this PR. Not able to add reviews via reviewers input

xpconanfan commented 1 year ago

https://developer.android.com/reference/android/content/Context#RECEIVER_EXPORTED

This is added in API level 33.

What happens when users try to use this on older Android versions?

VitaliDim commented 1 year ago

Done, @xpconanfan please take a look. Thank you

VitaliDim commented 1 year ago

RPC verified, works as expected. Tested on build: 10651996, target: seahawk-userdebug, SDK: 34 cc: @xpconanfan @ko1in1u

xpconanfan commented 1 year ago

fied, works as expected. Tested on build: 10651996, target: seahaw

Thanks for this. But the main concern is this breaking for lower level APIs. Did you test on lower level APIs and phones without changing the build config?

VitaliDim commented 1 year ago

@xpconanfan I did not tested on lover APIs level. For now we need move forward with BT Messenger automation. This changes its a workaround for unblocking our efforts for SDK 34 and above.

VitaliDim commented 1 year ago

@xpconanfan code for lower version SDK has not been changed at all. The changes related only for version 33 and above.

xpconanfan commented 1 year ago

You introduced new API in the code which requires higher level of sdk to build right? So just bc you didn't change the other code doesn't mean this change has no effect them.

We are asking you to simply try this in a lower SDK version env. Shouldn't be too difficult?

VitaliDim commented 1 year ago

@xpconanfan verified on SDK 31, works as expected