Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toLowerCase fail #66

Closed
naimyag opened this issue Apr 23, 2021 · 1 comment
Closed

toLowerCase fail #66

naimyag opened this issue Apr 23, 2021 · 1 comment

Comments

@naimyag
Copy link

naimyag commented Apr 23, 2021

AutoStartPermissionHelper.kt
->getAutoStartPermission()

Build.BRAND.toLowerCase(Locale.getDefault())

When the phone locale is Turkish, the lowercase letter of "HUAWEI" returns "huaweı" and does not match. So big "I" turns into Turkish little "ı", "i" doesn't.

https://stackoverflow.com/questions/11063102/using-locales-with-javas-tolowercase-and-touppercase

awoisoak added a commit to awoisoak/AutoStarter that referenced this issue Jun 4, 2021
It checks the existence of the activities before attempting to open them. Now if the activity can really not be opened, getAutoStartPermission will return false. Related issues:
judemanutd#29
judemanutd#30

isAutoStartPermissionAvailable is checking the existence of the activity in order to avoid 'false positives' when the library is not able to open a specific settings screen.


Inverted the Huawei intents to process the newer ones first (I didn't invert the rest of the manufacturers as I can't test all of them). This fix known issue with Huawei P 10 Lite 
judemanutd#38 (tested)


Use Build.BRAND.toLowerCase(Locale.ROOT) to avoid issues with certain languages as Turkish as mentioned here:
judemanutd#66 (tested)


Includes FLAG_ACTIVITY_NEW_TASK so that it can be called outside an Activity.
Fixed this:
judemanutd#62


Add a new activity to be opened in Samsung devices as: 
This one open the exact Sleeping Apps setting
com.samsung.android.lool/com.samsung.android.sm.battery.ui.usage.CheckableAppListActivity
While this one opens the main battery settings
com.samsung.android.lool/com.samsung.android.sm.battery.ui.BatteryActivity

That should fixes theses (Tested with Note 8, Note 9 & Note 20):
judemanutd#37
judemanutd#33
@judemanutd
Copy link
Owner

This should be resolved by #69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants