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

Launcher default apps intent opens wrong screen on HUAWEI Mate 10 Lite #3

Open
d4rken opened this issue Aug 21, 2023 · 6 comments
Open
Milestone

Comments

@d4rken
Copy link

d4rken commented Aug 21, 2023

Android 8

This is the screen we get to:
Screenshot_20230821_191514

and this is the one where it can be changed:
https://www.youtube.com/watch?v=4dIsi0q2Nes

The screen we need to get to is:

mResumedActivity: ActivityRecord{78697f6 u0 com.android.settings/.Settings$AppAndNotificationDashboardActivity t70}

Can debug this further if you give me source-code access. Really love your apps, would love to tweak little things for my workflow 🍻

@blipinsk
Copy link
Member

Can debug this further if you give me source-code access. Really love your apps, would love to tweak little things for my workflow 🍻

I love your enthusiasm, but unfortunately, I'm not planning to open-source it (or introduce new developers to the project, even ones as awesome as you 😢).

I would love to tweak those things for you though! Those could be beneficial for the entire Android Dev Launcher community.

--

So you're saying that you're seeing the incorrect screen after tapping Launcher button?
Can you help me check if there's a Settings.ACTION_<XYZ> value which represents the screen you're referring to?

@d4rken
Copy link
Author

d4rken commented Aug 21, 2023

Can you help me check if there's a Settings.ACTION_ value which represents the screen you're referring to?

Which settings value are you currently using?

@blipinsk
Copy link
Member

If it's Android 8, it should be Settings.ACTION_MANAGE_DEFAULT_APPS_SETTINGS.
We might be getting into some Huawei-specific behavior. I have tested this on multiple systems (I believe Android 8 as well) and it was working correctly.

@d4rken
Copy link
Author

d4rken commented Aug 21, 2023

The intent suggested here works for me:

https://stackoverflow.com/a/54191831/1251958

Directly opens the default apps screen:
Screenshot_20230821_202822

What about:

  • Check whether it's a Huawei device
  • If so check if any apps can handle com.android.settings.PREFERRED_SETTINGS
  • If yes send it (but catch Exceptions, there might be ActivityNotFound or SecurityException)
  • If there is no such activity or an error happens, then fall back to the current intent.

@blipinsk
Copy link
Member

blipinsk commented Aug 21, 2023

Yes, I can totally do that. It actually fits with all my "fallback"-mechanisms quite well, I just need to add an isHuawei check.

Random question, is this your only Huawei device? Maybe you've got something with another OS version as well? I'd be mostly interested in:

  • 7 or 9,
  • 10+ (which is much more complex than just sending the ACTION_MANAGE_DEFAULT_APPS_SETTINGS)

@d4rken
Copy link
Author

d4rken commented Aug 21, 2023

Random question, is this your only Huawei device? Maybe you've got something with another OS version as well? I'd be mostly interested in:

Unfortunately not, sorry. The only other Huawei device I currently have here runs Android 2.3 😁.

I've set your launcher already up on a few different ROM types (MIUI, OxygenOS etc.). So far this one was the only one that was problematic. If I find other I'll probably raise another issue ticket 🍻.

Offtopic too, FYI: There was one device, either a OnePlus Nord2 5G or Redmi A2, where ADB didn't have enough permissions to grant the WRITE_SECURE_SETTINGS. The device was rooted though, and that worked then. Not much you can do about that though 🤷

@blipinsk blipinsk added this to the v.1.6.0 milestone Sep 3, 2023
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