Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Comments

Added support for Android 5.1#75

Open
pylerSM wants to merge 2 commits intorovo89:lollipopfrom
pylerSM:patch-3
Open

Added support for Android 5.1#75
pylerSM wants to merge 2 commits intorovo89:lollipopfrom
pylerSM:patch-3

Conversation

@pylerSM
Copy link
Contributor

@pylerSM pylerSM commented Aug 18, 2015

There is no flag "FLAG_NEEDS_MENU_KEY" in Android 5.1 (and newer), so we should not look for it to prevent NoSuchFieldError, just set it to 0. Also hide option to show legacy menu, since it can't work on 5.1+.

I posted fixed version on XDA some time ago and reports say it works. Consider packing all Lollipop base fixes and this fix and release update to repo. (I read you don't have key for it, just resign it and inform users to uninstall and then install this new version)

@ayanamist
Copy link

Can you give a xda link of your post?

@pylerSM
Copy link
Contributor Author

pylerSM commented Aug 26, 2015

@rovo89
Copy link
Owner

rovo89 commented Aug 28, 2015

Sorry, but I currently have other priorities. I don't have the time to look at this in such a detailed way as I see necessary for such a wide-spread module (and I didn't even publish an official 5.1 update yet).

Regarding the repo update: No way that I just upload a file that requires hundreds of thousands of users to uninstall the app and lose their settings. I've never tried the XML export and import, maybe that would be a way to avoid this. If yes, it would need to be clearly documented. Otherwise, we have to look for a better way, e.g. asking @Tungstwenty to sign the new APK, publishing the app under a new package name (maybe also with a new maintainer?), maybe also looking into your XInstaller module, although I would prefer a more targetted module that allows you to disable the signature check for a specific installation (e.g. you might be asked in the installer whether you want to override the check).

So for now, I couldn't do more than build a new APK, which is what you already did.

@pylerSM
Copy link
Contributor Author

pylerSM commented Aug 28, 2015

So maybe I could (as temporary solution) upload fixed version to repo with changed package name, yes/no? I will need your permission to do that.

Well, a nice idea regarding XInstaller! I think I will (try to) do it, should not be so hard.

@rovo89
Copy link
Owner

rovo89 commented Aug 30, 2015

So maybe I could (as temporary solution) upload fixed version to repo with changed package name,

Would be ok for me as a temporary solution. I would prefer a title like "App Settings [LP/Unofficial]" and a link back to the repo page of the original module instead of copying the whole description.

@liudongmiao
Copy link
Contributor

I think the compatible way is just to hook system ui to don't set menu bar. for myself, i use

https://github.com/android/platform_frameworks_base/blob/master/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java#L406

I test it on android 4.4.4 and android 5.1.

And if this should be set according to each app, I think the possible field in android 5.1.1 is:

WindowManager.LayoutParams.needsMenuKey

@liudongmiao
Copy link
Contributor

@pylerSM please find a better way to do such things, not just disable the option. As I post above, you should have found a way for the patch. You can do use different field for different android sdk, or use a single solution. The direct method is getNeedsMenuLw.

https://github.com/android/platform_frameworks_base/blob/master/services/core/java/com/android/server/wm/WindowState.java#L721

This method exists in all sdk that support soft menu.

I don't use XposedAppSettings, so I won't give the patch. For myself, I just hide all the menu for all app, not for a single app.

@pylerSM
Copy link
Contributor Author

pylerSM commented Aug 31, 2015

It is good for users, since they wanted App Settings on 5.1 and one option should not be a deal breaker. Fix could come in the future.. maybe.

@liudongmiao
Copy link
Contributor

@pylerSM as i said, there is solution, and shouln't be very hard. IMO, you can do better to support it, not just disable it. I won't give the patch, as I didn't use it. And as I give the references above, it shoun't be very hard to implement it.

@pylerSM
Copy link
Contributor Author

pylerSM commented Sep 5, 2015

Maybe I have a fix but I can't test yet. I will upload fix on xda.

@pylerSM
Copy link
Contributor Author

pylerSM commented Sep 6, 2015

I uploaded it but looks like nobody uses this feature since nobody have tested it yet.

Three options:

  • Update my tablet to CM12.1 (may happen but don't know when)
  • Somebody would test it
  • Leave it as is, hidden for LP MR1 and newer

@pylerSM
Copy link
Contributor Author

pylerSM commented Sep 7, 2015

Okey, I did #1 today. But not how to test it whether it works or not. I enabled legacy menu, no crash in logs (setNeedsMenuKey) but what should be changed? I still have menu top right menu button even before and after.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants