FORUMS
Remove All Ads from XDA

[Xposed] NeoPowerMenu - Create your own Power Menu

379 posts
Thanks Meter: 388
 
Post Reply Email Thread
20th November 2017, 11:29 AM |#971  
Senior Member
Thanks Meter: 197
 
More
Quote:
Originally Posted by Artieza

Tasker doesn't have it. Use AutoShortcut plugin from Joao Dias.

Quote:
Originally Posted by DrAcHe981

Worked all night for this... But stay tuned, I'm gonna fix some bugs and test a bit (maybe also try to get my translators up X.x)

Or simply use Automagic wich supports shortcuts and other features that are provided by plugins on tasker...
I agree on shortcuts being the easiest way to support custom actions/triggers from apps and automation apps in NeoPowerMenu.

Really nice to see developement is still on and strong!
Not sure if it's been already reported but i see a kind of "flickering"/ menu misalignement in the latest version, probably due to the new position feature.
Here's the video:
https://ufile.io/j9hdy

The Confirmation dialog immediately changes position after appearing so giving a flikering effect.
I don't know any other english word to describe this phenomenon, sorry.
22nd November 2017, 10:09 PM |#972  
Alexey71's Avatar
Senior Member
Thanks Meter: 841
 
Donate to Me
More
Hi. Can your add support miui please?
Attached Files
File Type: txt xposed_error_20171123_000615.txt - [Click for QR Code] (8.3 KB, 8 views)
22nd November 2017, 10:56 PM |#973  
DrAcHe981's Avatar
OP Senior Member
Flag Brilon
Thanks Meter: 388
 
Donate to Me
More
Quote:
Originally Posted by ninestarkoko

Not sure if it's been already reported but i see a kind of "flickering"/ menu misalignement in the latest version, probably due to the new position feature.
Here's the video:
https://ufile.io/j9hdy

The Confirmation dialog immediately changes position after appearing so giving a flikering effect.
I don't know any other english word to describe this phenomenon, sorry.

Yeah, that's most probably caused by the new position system, it uses a different approach compared to previous releases, using a padding value that updates whenever the size of the container changes, since I added the new positioning I'm working on fixing that, but so far it's just a little cosmetics problem, not as big as some other bugs on my list...

Quote:
Originally Posted by Alexey71

Hi. Can your add support miui please?

Try enabling the experimental hook found in the advanced settings, it might work, if not then it's like with the OnePlus devices that they changed how the power menu is activated, but still have the android original functions without ever calling them. (And that's why my module isn't throwing errors)

Still trying to find a solution for this which isn't causing even more problems
The Following User Says Thank You to DrAcHe981 For This Useful Post: [ View ] Gift DrAcHe981 Ad-Free
23rd November 2017, 10:08 AM |#974  
Artieza's Avatar
Senior Member
Thanks Meter: 171
 
More
java.lang.RuntimeException: Unable to start activity ComponentInfo{de.NeonSoft.neopowermenu/de.NeonSoft.neopowermenu.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java. lang.String, int)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2331)
at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:2393)
at android.app.ActivityThread.access$800(ActivityThre ad.java:151)
at android.app.ActivityThread$H.handleMessage(Activit yThread.java:1309)
at android.os.Handler.dispatchMessage(Handler.java:10 2)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.jav a:5356)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:908)
at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:703)
at de.robv.android.xposed.XposedBridge.main(XposedBri dge.java:107)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java. lang.String, int)' on a null object reference
at de.NeonSoft.neopowermenu.helpers.WorldReadablePref s.<init>(WorldReadablePrefs.java:52)
at de.NeonSoft.neopowermenu.helpers.SettingsManager.< init>(SettingsManager.java:76)
at de.NeonSoft.neopowermenu.helpers.SettingsManager.g etInstance(SettingsManager.java:88)
at de.NeonSoft.neopowermenu.MainActivity.onCreate(Mai nActivity.java:109)
at android.app.Activity.performCreate(Activity.java:6 021)
at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2284)
... 11 more
23rd November 2017, 10:26 AM |#975  
DrAcHe981's Avatar
OP Senior Member
Flag Brilon
Thanks Meter: 388
 
Donate to Me
More
Quote:
Originally Posted by Artieza

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java. lang.String, int)' on a null object reference
at de.NeonSoft.neopowermenu.helpers.WorldReadablePref s.<init>(WorldReadablePrefs.java:52)
at de.NeonSoft.neopowermenu.helpers.SettingsManager.< init>(SettingsManager.java:76)
at de.NeonSoft.neopowermenu.helpers.SettingsManager.g etInstance(SettingsManager.java:88)

Punch me please... I did one of my typical dumb mistakes again, the "WorldReadablePrefs" is a new class I took to fix the settings not being readable on nougat and above, but I forgot while writing to make cases for pre nougat devices, and since both my testing devices are nougat, I didn't noticed it...

Now it's crashing because the "Device Protected Context" is never created (at least that's my guess now)

Would you be so kind to test the attached version?
Attached Files
File Type: apk app-release-2.apk - [Click for QR Code] (3.16 MB, 14 views)
23rd November 2017, 10:45 AM |#976  
Artieza's Avatar
Senior Member
Thanks Meter: 171
 
More
Quote:
Originally Posted by DrAcHe981

Would you be so kind to test the attached version?

java.lang.NoSuchMethodError: No virtual method getDataDir()Ljava/io/File; in class Landroid/content/Context; or its super classes (declaration of 'android.content.Context' appears in /system/framework/framework.jar)
at de.NeonSoft.neopowermenu.helpers.SettingsManager.r egisterFileObserver(SettingsManager.java:185)
at de.NeonSoft.neopowermenu.helpers.SettingsManager.< init>(SettingsManager.java:80)
at de.NeonSoft.neopowermenu.helpers.SettingsManager.g etInstance(SettingsManager.java:88)
at de.NeonSoft.neopowermenu.MainActivity.onCreate(Mai nActivity.java:109)
at android.app.Activity.performCreate(Activity.java:6 021)
at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2284)
at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:2393)
at android.app.ActivityThread.access$800(ActivityThre ad.java:151)
at android.app.ActivityThread$H.handleMessage(Activit yThread.java:1309)
at android.os.Handler.dispatchMessage(Handler.java:10 2)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.jav a:5356)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:908)
at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:703)
at de.robv.android.xposed.XposedBridge.main(XposedBri dge.java:107)
23rd November 2017, 11:10 AM |#977  
DrAcHe981's Avatar
OP Senior Member
Flag Brilon
Thanks Meter: 388
 
Donate to Me
More
Quote:
Originally Posted by Artieza

java.lang.NoSuchMethodError: No virtual method getDataDir()Ljava/io/File; in class Landroid/content/Context; or its super classes (declaration of 'android.content.Context' appears in /system/framework/framework.jar)
at de.NeonSoft.neopowermenu.helpers.SettingsManager.r egisterFileObserver(SettingsManager.java:185)
at de.NeonSoft.neopowermenu.helpers.SettingsManager.< init>(SettingsManager.java:80)
at de.NeonSoft.neopowermenu.helpers.SettingsManager.g etInstance(SettingsManager.java:88)

I wish my previous device with android L would still work, it'll make this much easier -.-"

Anyways, another shot here I come, let's see if it hates me once again (android studio didn't said anything this time about the function being sdk 24+, so I blame android studio for it)
Attached Files
File Type: apk app-release-2.apk - [Click for QR Code] (3.16 MB, 12 views)
23rd November 2017, 11:34 AM |#978  
Artieza's Avatar
Senior Member
Thanks Meter: 171
 
More
Quote:
Originally Posted by DrAcHe981

I wish my previous device with android L would still work, it'll make this much easier -.-"

Anyways, another shot here I come, let's see if it hates me once again (android studio didn't said anything this time about the function being sdk 24+, so I blame android studio for it)

🎉
23rd November 2017, 11:36 AM |#979  
DrAcHe981's Avatar
OP Senior Member
Flag Brilon
Thanks Meter: 388
 
Donate to Me
More
Quote:
Originally Posted by Artieza

🎉

I take this as a "It's working"? xD

Then I'm gonna upload a new new version to the repo now...
The Following User Says Thank You to DrAcHe981 For This Useful Post: [ View ] Gift DrAcHe981 Ad-Free
24th November 2017, 03:56 PM |#980  
Artieza's Avatar
Senior Member
Thanks Meter: 171
 
More
Problem: you forbid shutting down to the system. I have LG device so I can call original power menu. Nothing happens when I press shut down.

It leads to more deep and dangerous problem when energy is low and system tries to shut down itself, it goes to the loop with shut down calls.
24th November 2017, 05:36 PM |#981  
DrAcHe981's Avatar
OP Senior Member
Flag Brilon
Thanks Meter: 388
 
Donate to Me
More
Quote:
Originally Posted by Artieza

Problem: you forbid shutting down to the system. I have LG device so I can call original power menu. Nothing happens when I press shut down.

It leads to more deep and dangerous problem when energy is low and system tries to shut down itself, it goes to the loop with shut down calls.

Before we start this reply, sorry if the reply is a bit too long, I kinda have the habit to always explain what exactly my stuff is doing xD
- - - - -
That's weird, especially since I'm not touching the android default shutdown at all, and that's what's triggered when battery is low, or when you press stuff in the original menu (and also I still don't get why lg seems to not use the normal function to show the power menu)

My module is hooking into the "showDialog" of the GlobalActionsDialog class, which is the stock power menu, the actual stock reboot process tho is in the ShutdownThread class, I was trying stuff with that class, but absolutely none of my test stuff is in the public releases, so I don't think my module is really the cause of this...

And since you're able to bring up the stock menu, my other hooks into the GlobalActionsDialog class are also ignored, and I also didn't changed them in that update (LG seems to somehow have it's complete own class for the dialog )

But anyways, I would need a logcat to look into it if it's containing something about what's happening :T

Also I can't reproduce it on my phone as my phones never doing the low battery shutdown because of broken battery, and I also can't show the stock menu on it
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes