XposedAppSettings icon indicating copy to clipboard operation
XposedAppSettings copied to clipboard

Added support for Android 5.1

Open pylerSM opened this issue 8 years ago • 12 comments

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)

pylerSM avatar Aug 18 '15 09:08 pylerSM

Can you give a xda link of your post?

ayanamist avatar Aug 26 '15 14:08 ayanamist

http://forum.xda-developers.com/showpost.php?p=61696098&postcount=1847

pylerSM avatar Aug 26 '15 15:08 pylerSM

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.

rovo89 avatar Aug 28 '15 10:08 rovo89

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.

pylerSM avatar Aug 28 '15 10:08 pylerSM

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.

rovo89 avatar Aug 30 '15 18:08 rovo89

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 avatar Aug 31 '15 01:08 liudongmiao

@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.

liudongmiao avatar Aug 31 '15 01:08 liudongmiao

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.

pylerSM avatar Aug 31 '15 14:08 pylerSM

@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.

liudongmiao avatar Sep 01 '15 13:09 liudongmiao

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

pylerSM avatar Sep 05 '15 10:09 pylerSM

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 avatar Sep 06 '15 06:09 pylerSM

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.

pylerSM avatar Sep 07 '15 12:09 pylerSM