Unable to set system setting

Post Reply
CraigD
Posts: 1
Joined: Mon Jul 27, 2026 3:15 pm

Unable to set system setting

Post by CraigD »

I'm trying to create a rule to enter battery saving mode - this can be achieved by setting low_power to 1, which I confined via adb. I've also enabled WRITE_SECURE_SETTINGS via adb.

But, when I try to add this action, and set Type to Int, a toast is shown stating "Enter a number" when pressing "Save".

[Edit] I think the following check in ActivityManageActionSetSystemSetting.java is incorrect

Code: Select all

                        if(Miscellaneous.isNumericDecimal(etSettingValue.getText().toString()) || !Miscellaneous.isNumeric(etSettingValue.getText().toString()))
                        {
                            Toast.makeText(ActivityManageActionSetSystemSetting.this, getResources().getString(R.string.enter_a_number), Toast.LENGTH_LONG).show();
                            return;
                        }
Miscellaneous.isNumericDecimal() just checks if a number can be parsed as a Double - and "1" can, so the above test fails.
Markus
Posts: 1
Joined: Sun Aug 02, 2026 10:14 am

Re: Unable to set system setting

Post by Markus »

Hello CraigD,
Thanks for your post it was a hint to solve my problem:

I could activate battery saving my by using system setting - "low_power" with a "String" and Value 1
jens
Posts: 18
Joined: Sat Oct 18, 2025 10:15 pm

Re: Unable to set system setting

Post by jens »

Thanks for pointing out the issue with the number check. Should be fixed in upcoming v1.8.8.
Post Reply