appium / io.appium.settings

App for dealing with Android settings
Apache License 2.0
122 stars 56 forks source link

refactor: LocationManager provider #174

Closed Dor-bl closed 3 months ago

Dor-bl commented 4 months ago
Dor-bl commented 4 months ago

@mykola-mokhnach , I see the install dependencies failed. Should I add the below elsewhere? import android.location.provider.ProviderProperties; UPDATE : forgot to commit the sdk version update. But now have another issue I need to resolve

KazuCocoa commented 4 months ago

For the lint error, it can have @SuppressLint("MissingPermission") for now I think

KazuCocoa commented 4 months ago

It looks like Method getAnimationScales = windowManagerClass.getDeclaredMethod("getAnimationScales"); may raise an error for target api level 31 as https://developer.android.com/guide/app-compatibility/restrictions-non-sdk-interfaces

https://developer.android.com/about/versions/12/non-sdk-12

It looks like the animation command usage is only for lower than API level 26 https://github.com/appium/appium-uiautomator2-driver/blob/4cd489aa9a282f412ee45e1366c86bf7e580c798/lib/driver.ts#L594-L597 Espresso actually uses this method but I think espresso server also can follow the --no-window-animation. Then we can completely drop this animation command in settings.

We could add an annotation for @SuppressLint("SoonBlockedPrivateApi" to ignore this error I believe. We disable https://developer.android.com/guide/app-compatibility/restrictions-non-sdk-interfaces with hidden policy settings command call, but some devices may not allow to apply the hidden policy. So... I think it would be nice to drop lower Android OS version first, and remove animation command via settings app, then apply this change to settings.

KazuCocoa commented 4 months ago

lg, but please wait for https://github.com/appium/appium-espresso-driver/pull/1007 so that we can safely apply the animation related change for lower os versions only

github-actions[bot] commented 3 months ago

:tada: This PR is included in version 5.10.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: