[SOURCE CODE][DEV TOOL][SDK 21+]6thGear RomControl v2.+ for Devs

Search This thread

daxgirl

Senior Member
Jun 30, 2012
4,047
9,175
Jerusalem
Hi Guys I recommend the service of appodeal to monetize your app in a atomated and very convenient way. You find the website under appodeal dot com.
They made a fantastic solution especialy friendly for developers.
Hello. Thanks for the info. This is not an app. It's an open source code project. It cannot and will not be monetized. Ever.

Sent from my SM-N920C using Tapatalk
 
  • Like
Reactions: dj.adil

#Henkate

Senior Member
Feb 1, 2012
3,484
3,124
28
フェアリーテイル
Just an idea :D
Im working on an app (made with Tasker) to install ROM/update, kernel, recovery, backup/restore ROM (in future i might add the possibility to choose custom time when to backup). Using OpenRecoveryScript, my app is able to write the OpenRecoveryScript commands based on user choices (e.g. automatically go to recovery with shell command and start to do a backup of the actual ROM, then install ROM and GAPPS and auto reboot once it is finished).

ROM Control can run scripts right? Then you might want to take a look at OpenRecoveryScript . You can make a backup menu in ROM Control to backup the ROM etc. It will be more wonderful :D



You can find these informations about how to use OpenRecoveryScript on xda/google, but i will tell you here too:

1) First you must set the right permission for /cache/recovery directory.

PHP:
chmod 0777 /cache/recovery

2) Then write the commands you want to OpenRecoveryScript like this:

PHP:
echo "%BACKUP_LOCATION\nbackup %BACKUP_OPTIONS %BACKUP_NAME\nwipe system\nwipe data\nwipe cache\nwipe dalvik\ncmd reboot" > /cache/recovery/openrecoveryscript

\n= new line (enter)

This is the code i use in Tasker.

3) Then i use a shell command to reboot to recovery:

PHP:
reboot recovery
 
Last edited:

Wuby986

Senior Member
Oct 18, 2013
2,144
2,440
Just an idea :D
Im working on an app (made with Tasker) to install ROM/update, kernel, recovery, backup/restore ROM (in future i might add the possibility to choose custom time when to backup). Using OpenRecoveryScript, my app is able to write the OpenRecoveryScript commands based on user choices (e.g. automatically go to recovery with shell command and start to do a backup of the actual ROM, then install ROM and GAPPS and auto reboot once it is finished).

ROM Control can run scripts right? Then you might want to take a look at OpenRecoveryScript . You can make a backup menu in ROM Control to backup the ROM etc. It will be more wonderful :D



You can find these informations about how to use OpenRecoveryScript on xda/google, but i will tell you here too:

1) First you must set the right permission for /cache/recovery directory.

PHP:
chmod 0777 /cache/recovery

2) Then write the commands you want to OpenRecoveryScript like this:

PHP:
echo "%BACKUP_LOCATION\nbackup %BACKUP_OPTIONS %BACKUP_NAME\nwipe system\nwipe data\nwipe cache\nwipe dalvik\ncmd reboot" > /cache/recovery/openrecoveryscript

\n= new line (enter)

This is the code i use in Tasker.

3) Then i use a shell command to reboot to recovery:

PHP:
reboot recovery
Thanks.. we already know that. We've been working on something similar on what you have. We actually even passed the idea to peppe and he actually used it. Our original idea was a bit more complex, and since we never released the rom we just left it apart

Sent from my SM-G935F using Tapatalk
 

asc1977

Senior Member
Apr 15, 2012
5,330
6,989
Schwetzingen
Hi,

I have a question. I have a mod for choosing gifs for animation. I use it with RC with thumnailpreference. All is working but if i select a gif after 9 means 10 or 11 it shows me always first gif. All is right in smalis and keys and arrays. I checked 1000 times. Is it possible that that preference can only choose between 9 items?
 

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
Hi,

I have a question. I have a mod for choosing gifs for animation. I use it with RC with thumnailpreference. All is working but if i select a gif after 9 means 10 or 11 it shows me always first gif. All is right in smalis and keys and arrays. I checked 1000 times. Is it possible that that preference can only choose between 9 items?
I don't think so. Show us your smali array/method.

---------- Post added at 12:12 PM ---------- Previous post was at 11:59 AM ----------

I don't think so. Show us your smali array/method.
Not in RC, in systemui.
 
  • Like
Reactions: daxgirl

thereassaad

Inactive Recognized Contributor
Aug 22, 2013
7,618
9,710
Bierut
I don't think so. Show us your smali array/method.

---------- Post added at 12:12 PM ---------- Previous post was at 11:59 AM ----------


Not in RC, in systemui.


Yes td it's in systemui ,








Hi,

I have a question. I have a mod for choosing gifs for animation. I use it with RC with thumnailpreference. All is working but if i select a gif after 9 means 10 or 11 it shows me always first gif. All is right in smalis and keys and arrays. I checked 1000 times. Is it possible that that preference can only choose between 9 items?



Thanks , ?
 

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
In array, the most common problem is hex doesn't go right from 9 to 10.
It goes from 9 to a, b, c, d, e, f --> then after f item it changes again.
So here is example:

Code:
    const/16 v4, [COLOR="Blue"]0x9[/COLOR]

    if-eq v3, v4, :cond_9

    const/16 v4, [COLOR="blue"]0xa
[/COLOR]
    if-eq v3, v4, :cond_10

    const/16 v4, [COLOR="blue"]0xb
[/COLOR]
    if-eq v3, v4, :cond_11

    const/16 v4, [COLOR="blue"]0xc[/COLOR]

    if-eq v3, v4, :cond_12

    const/16 v4, [COLOR="blue"]0xd
[/COLOR]
    if-eq v3, v4, :cond_13

    const/16 v4, [COLOR="blue"]0xe[/COLOR]

    if-eq v3, v4, :cond_14

    const/16 v4, [COLOR="blue"][COLOR="blue"]0xf
[/COLOR][/COLOR]
    if-eq v3, v4, :cond_15

    const/16 v4, [COLOR="blue"]0x10[/COLOR]

    if-eq v3, v4, :cond_16

    const/16 v4, [COLOR="blue"]0x11[/COLOR]

    if-eq v3, v4, :cond_17
 
Last edited:

venkat kamesh

Inactive Recognized Contributor
Jan 11, 2012
2,236
10,881
Tirupati
xdaforums.com
hi bro

hello @daxgirl :)

Its a great source..
i had a small doubt, could you please look at his bro

I had started to make a new app of navigator view
When i try to apply the Theme Dark/Light (Styles) only dialog box text and background are changing

Not with navigator view
Any suggestions please
so that i can expose my code to you bro ;)
Thank you
 

Wuby986

Senior Member
Oct 18, 2013
2,144
2,440
hello @daxgirl :)

Its a great source..
i had a small doubt, could you please look at his bro

I had started to make a new app of navigator view
When i try to apply the Theme Dark/Light (Styles) only dialog box text and background are changing

Not with navigator view
Any suggestions please
so that i can expose my code to you bro ;)
Thank you
You should first show the code then you can expect some suggestion. If we don't know what you did we cannot tell you what's wrong. Upload sources to git and post the link

Sent from my SM-G935F using Tapatalk
 
  • Like
Reactions: daxgirl

venkat kamesh

Inactive Recognized Contributor
Jan 11, 2012
2,236
10,881
Tirupati
xdaforums.com
You should first show the code then you can expect some suggestion. If we don't know what you did we cannot tell you what's wrong. Upload sources to git and post the link

Sent from my SM-G935F using Tapatalk

here is the app source bro

https://github.com/venkatkamesh/BarolaAeroSports

i had implemented the theme dialog and style from Rom control v1 sources

dont know what i missed

what is did is
1. added styles and drawable
added themeselection java which was woke by mainActivity

hope you brothers can help me out of this :D
navigationview background was same not affected by theme.. dont know why :p

Thank you again and waiting bro ;)
 

daxgirl

Senior Member
Jun 30, 2012
4,047
9,175
Jerusalem
here is the app source bro

https://github.com/venkatkamesh/BarolaAeroSports

i had implemented the theme dialog and style from Rom control v1 sources

dont know what i missed

what is did is
1. added styles and drawable
added themeselection java which was woke by mainActivity

hope you brothers can help me out of this :D
navigationview background was same not affected by theme.. dont know why [emoji14]

Thank you again and waiting bro ;)
Hey,
You're asking a question in general android development. The address for questions like that is Stackoverflow.
The code you linked has nothing to do with Rom control. It's your own android project. And I understand you come here looking for android developers to help you with your own code.
I am sure you will find a better suited answer on SO or if you open a question thread on xda. Here is not a proper place.
Sorry, mate.

Sent from my SM-N920C using Tapatalk
 

venkat kamesh

Inactive Recognized Contributor
Jan 11, 2012
2,236
10,881
Tirupati
xdaforums.com
Hey,
You're asking a question in general android development. The address for questions like that is Stackoverflow.
The code you linked has nothing to do with Rom control. It's your own android project. And I understand you come here looking for android developers to help you with your own code.
I am sure you will find a better suited answer on SO or if you open a question thread on xda. Here is not a proper place.
Sorry, mate.

Sent from my SM-N920C using Tapatalk

oh got you bro

but i am asking for you cause
i used the code from rom control (Apply Theme dialog code)
Hope only you can suggest me about what i missed bro
even a small clue can help me out bro

Thank you

Edit: thank you brother
Found other solution solved it ?
 
Last edited:

amtra

Senior Member
Jun 28, 2012
1,508
1,005
32
Chennai
@daxgirl

i have added this on notification_panel_prefs.xml

PHP:
<PreferenceScreen android:title="Device info settings">
		<PreferenceCategory android:title="Device info customization">
			<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:defaultValue="true" android:key="device_info_visibility" android:summaryOff="Disabled" android:summaryOn="Enabled" android:title="Enable device info view"/>
		</PreferenceCategory>
		<PreferenceCategory android:title="Text colors" android:dependency="device_info_visibility">
			<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:defaultValue="#ffffffff" android:key="gear_info_names_color" android:title="Info names text color"/>
			<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:defaultValue="#ffffffff" android:key="gear_info_values_color" android:title="Info values text color"/>
		</PreferenceCategory>
		<PreferenceCategory android:title="Device Info Items" android:dependency="device_info_visibility">
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_model" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Device model"/>
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_android_version" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Android version"/>
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_build_version" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Build version"/>
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_battery_level" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Battery level"/>
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_network_name" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Network name"/>
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_wifi_info" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="WIFI info"/>
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_next_alarm" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Next alarm"/>
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_up_time" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Device up time"/>
		</PreferenceCategory>
	</PreferenceScreen>

i got RC fc with these errors

PHP:
11-13 13:03:54.182  4922  4922 W System.err: 	at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.a(Unknown Source)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.onSetInitialValue(Unknown Source)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.Preference.dispatchSetInitialValue(Preference.java:1622)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.Preference.onAttachedToHierarchy(Preference.java:1416)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:175)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:116)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:42)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.rInflate(GenericInflater.java:490)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.rInflate(GenericInflater.java:495)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.inflate(GenericInflater.java:327)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.inflate(GenericInflater.java:264)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:274)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:302)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.wubydax.romcontrol.v2.a.onCreate(Unknown Source)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.Fragment.performCreate(Fragment.java:2242)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:947)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1163)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.BackStackRecord.run(BackStackRecord.java:793)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1552)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentController.execPendingActions(FragmentController.java:325)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.Activity.performStart(Activity.java:6914)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.access$1100(ActivityThread.java:221)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:102)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.os.Looper.loop(Looper.java:158)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:7224)

11-13 13:03:54.182  4922  4922 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

11-13 13:03:54.182  4922  4922 W System.err: 	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)

11-13 13:03:54.182   695  2330 D SecContentProvider: query(), uri = 17 selection = isSettingsChangesAllowed

11-13 13:03:54.182  4922  4922 W System.err: java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.preference.Preference$OnPreferenceChangeListener.onPreferenceChange(android.preference.Preference, java.lang.Object)' on a null object reference

11-13 13:03:54.182  4922  4922 W System.err: 	at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.a(Unknown Source)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.onSetInitialValue(Unknown Source)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.Preference.dispatchSetInitialValue(Preference.java:1622)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.Preference.onAttachedToHierarchy(Preference.java:1416)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:175)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:116)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:42)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.rInflate(GenericInflater.java:490)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.rInflate(GenericInflater.java:495)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.inflate(GenericInflater.java:327)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.inflate(GenericInflater.java:264)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:274)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:302)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.wubydax.romcontrol.v2.a.onCreate(Unknown Source)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.Fragment.performCreate(Fragment.java:2242)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:947)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1163)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.BackStackRecord.run(BackStackRecord.java:793)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1552)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentController.execPendingActions(FragmentController.java:325)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.Activity.performStart(Activity.java:6914)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.access$1100(ActivityThread.java:221)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:102)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.os.Looper.loop(Looper.java:158)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:7224)

11-13 13:03:54.182  4922  4922 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
11-13 13:03:57.317  4976  4976 D AndroidRuntime: Shutting down VM

11-13 13:03:57.322  4976  4976 E AndroidRuntime: FATAL EXCEPTION: main

11-13 13:03:57.322  4976  4976 E AndroidRuntime: Process: com.wubydax.romcontrol.v2, PID: 4976

11-13 13:03:57.322  4976  4976 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wubydax.romcontrol.v2/com.wubydax.romcontrol.v2.MainActivity}: android.view.InflateException: Binary XML file line #33: Error inflating class com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3253)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.ActivityThread.access$1100(ActivityThread.java:221)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:158)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7224)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #33: Error inflating class com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:443)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.rInflate(GenericInflater.java:483)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.rInflate(GenericInflater.java:495)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.rInflate(GenericInflater.java:495)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.inflate(GenericInflater.java:327)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.inflate(GenericInflater.java:264)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:274)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:302)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at com.wubydax.romcontrol.v2.a.onCreate(Unknown Source)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.Fragment.performCreate(Fragment.java:2242)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:947)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1163)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.BackStackRecord.run(BackStackRecord.java:793)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1552)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.FragmentController.execPendingActions(FragmentController.java:325)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.Activity.performStart(Activity.java:6914)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	... 10 more

11-13 13:03:57.322  4976  4976 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference" on path: DexPathList[[zip file "/system/priv-app/RomControl.apk"],nativeLibraryDirectories=[/system/lib/RomControl, /vendor/lib, /system/lib]]

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:511)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:469)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.createItem(GenericInflater.java:376)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:432)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	... 26 more

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	Suppressed: java.lang.ClassNotFoundException: Didn't find class "com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference" on path: DexPathList[[dex file "/data/dalvik-cache/xposed_XResourcesSuperClass.dex"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 		at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 		at java.lang.ClassLoader.loadClass(ClassLoader.java:511)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 		at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 		... 29 more

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 		Suppressed: java.lang.ClassNotFoundException: com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 			at java.lang.Class.classForName(Native Method)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 			at java.lang.BootClassLoader.findClass(ClassLoader.java:781)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 			at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 			at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 			... 30 more

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 		Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
 

Wuby986

Senior Member
Oct 18, 2013
2,144
2,440
@daxgirl

i have added this on notification_panel_prefs.xml

PHP:
<PreferenceScreen android:title="Device info settings">
		<PreferenceCategory android:title="Device info customization">
			<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:defaultValue="true" android:key="device_info_visibility" android:summaryOff="Disabled" android:summaryOn="Enabled" android:title="Enable device info view"/>
		</PreferenceCategory>
		<PreferenceCategory android:title="Text colors" android:dependency="device_info_visibility">
			<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:defaultValue="#ffffffff" android:key="gear_info_names_color" android:title="Info names text color"/>
			<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:defaultValue="#ffffffff" android:key="gear_info_values_color" android:title="Info values text color"/>
		</PreferenceCategory>
		<PreferenceCategory android:title="Device Info Items" android:dependency="device_info_visibility">
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_model" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Device model"/>
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_android_version" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Android version"/>
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_build_version" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Build version"/>
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_battery_level" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Battery level"/>
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_network_name" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Network name"/>
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_wifi_info" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="WIFI info"/>
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_next_alarm" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Next alarm"/>
			<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_up_time" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Device up time"/>
		</PreferenceCategory>
	</PreferenceScreen>

i got RC fc with these errors

PHP:
11-13 13:03:54.182  4922  4922 W System.err: 	at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.a(Unknown Source)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.onSetInitialValue(Unknown Source)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.Preference.dispatchSetInitialValue(Preference.java:1622)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.Preference.onAttachedToHierarchy(Preference.java:1416)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:175)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:116)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:42)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.rInflate(GenericInflater.java:490)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.rInflate(GenericInflater.java:495)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.inflate(GenericInflater.java:327)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.inflate(GenericInflater.java:264)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:274)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:302)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.wubydax.romcontrol.v2.a.onCreate(Unknown Source)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.Fragment.performCreate(Fragment.java:2242)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:947)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1163)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.BackStackRecord.run(BackStackRecord.java:793)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1552)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentController.execPendingActions(FragmentController.java:325)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.Activity.performStart(Activity.java:6914)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.access$1100(ActivityThread.java:221)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:102)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.os.Looper.loop(Looper.java:158)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:7224)

11-13 13:03:54.182  4922  4922 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

11-13 13:03:54.182  4922  4922 W System.err: 	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)

11-13 13:03:54.182   695  2330 D SecContentProvider: query(), uri = 17 selection = isSettingsChangesAllowed

11-13 13:03:54.182  4922  4922 W System.err: java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.preference.Preference$OnPreferenceChangeListener.onPreferenceChange(android.preference.Preference, java.lang.Object)' on a null object reference

11-13 13:03:54.182  4922  4922 W System.err: 	at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.a(Unknown Source)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.onSetInitialValue(Unknown Source)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.Preference.dispatchSetInitialValue(Preference.java:1622)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.Preference.onAttachedToHierarchy(Preference.java:1416)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:175)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:116)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:42)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.rInflate(GenericInflater.java:490)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.rInflate(GenericInflater.java:495)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.inflate(GenericInflater.java:327)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.GenericInflater.inflate(GenericInflater.java:264)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:274)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:302)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.wubydax.romcontrol.v2.a.onCreate(Unknown Source)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.Fragment.performCreate(Fragment.java:2242)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:947)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1163)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.BackStackRecord.run(BackStackRecord.java:793)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1552)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.FragmentController.execPendingActions(FragmentController.java:325)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.Activity.performStart(Activity.java:6914)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.access$1100(ActivityThread.java:221)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:102)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.os.Looper.loop(Looper.java:158)

11-13 13:03:54.182  4922  4922 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:7224)

11-13 13:03:54.182  4922  4922 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

11-13 13:03:54.182  4922  4922 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
11-13 13:03:57.317  4976  4976 D AndroidRuntime: Shutting down VM

11-13 13:03:57.322  4976  4976 E AndroidRuntime: FATAL EXCEPTION: main

11-13 13:03:57.322  4976  4976 E AndroidRuntime: Process: com.wubydax.romcontrol.v2, PID: 4976

11-13 13:03:57.322  4976  4976 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wubydax.romcontrol.v2/com.wubydax.romcontrol.v2.MainActivity}: android.view.InflateException: Binary XML file line #33: Error inflating class com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3253)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.ActivityThread.access$1100(ActivityThread.java:221)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:158)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7224)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #33: Error inflating class com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:443)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.rInflate(GenericInflater.java:483)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.rInflate(GenericInflater.java:495)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.rInflate(GenericInflater.java:495)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.inflate(GenericInflater.java:327)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.inflate(GenericInflater.java:264)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:274)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:302)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at com.wubydax.romcontrol.v2.a.onCreate(Unknown Source)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.Fragment.performCreate(Fragment.java:2242)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:947)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1163)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.BackStackRecord.run(BackStackRecord.java:793)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1552)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.FragmentController.execPendingActions(FragmentController.java:325)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.Activity.performStart(Activity.java:6914)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	... 10 more

11-13 13:03:57.322  4976  4976 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference" on path: DexPathList[[zip file "/system/priv-app/RomControl.apk"],nativeLibraryDirectories=[/system/lib/RomControl, /vendor/lib, /system/lib]]

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:511)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:469)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.createItem(GenericInflater.java:376)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:432)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	... 26 more

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 	Suppressed: java.lang.ClassNotFoundException: Didn't find class "com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference" on path: DexPathList[[dex file "/data/dalvik-cache/xposed_XResourcesSuperClass.dex"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 		at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 		at java.lang.ClassLoader.loadClass(ClassLoader.java:511)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 		at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 		... 29 more

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 		Suppressed: java.lang.ClassNotFoundException: com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 			at java.lang.Class.classForName(Native Method)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 			at java.lang.BootClassLoader.findClass(ClassLoader.java:781)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 			at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 			at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 			... 30 more

11-13 13:03:57.322  4976  4976 E AndroidRuntime: 		Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

can you please upload your sources to git so i can look at it?
i have a doubt about the error in the log and i cannot solve it if i don't see the full sources
 

asc1977

Senior Member
Apr 15, 2012
5,330
6,989
Schwetzingen
hi
i am sucessfull now on nougat a have a big problem with romcontrol app. i builded last times 6 RC without any problem but nougat killing me.
I take old RC and also build new one but every time i use PreferendeScreen layout app fc if i click on it. same lines on UX or MM work
Here my logcat
Code:
11-23 03:33:33.053 13246-13246/com.wubydax.romcontrol.v2 E/AndroidRuntime: FATAL EXCEPTION: main
                                                                           Process: com.wubydax.romcontrol.v2, PID: 13246
                                                                           java.lang.ClassCastException: android.widget.FrameLayout cannot be cast to android.widget.LinearLayout
                                                                               at com.wubydax.romcontrol.v2.PrefsFragment.setUpNestedPreferenceLayout(PrefsFragment.java:128)
                                                                               at com.wubydax.romcontrol.v2.PrefsFragment.onPreferenceClick(PrefsFragment.java:116)
                                                                               at android.preference.Preference.performClick(Preference.java:1177)
                                                                               at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:289)
                                                                               at android.widget.AdapterView.performItemClick(AdapterView.java:324)
                                                                               at android.widget.AbsListView.performItemClick(AbsListView.java:1658)
                                                                               at android.widget.AbsListView$PerformClick.run(AbsListView.java:4135)
                                                                               at android.widget.AbsListView$13.run(AbsListView.java:6326)
                                                                               at android.os.Handler.handleCallback(Handler.java:751)
                                                                               at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                               at android.os.Looper.loop(Looper.java:154)
                                                                               at android.app.ActivityThread.main(ActivityThread.java:6640)
                                                                               at java.lang.reflect.Method.invoke(Native Method)
                                                                               at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
                                                                               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)

RC lines as example
Code:
<PreferenceScreen android:title="Clock settings" android:key="normal_clock">
        <com.wubydax.romcontrol.v2.prefs.MyListPreference android:entries="@array/clock_ampm_style" android:title="AM/PM style" android:key="ampm" android:entryValues="@array/lclock_ampm_style" />
        <com.wubydax.romcontrol.v2.prefs.MyListPreference android:entries="@array/clock_day_style" android:title="Date style" android:key="day" android:entryValues="@array/lclock_day_style" />
        <com.wubydax.romcontrol.v2.prefs.MyListPreference android:entries="@array/date_format" android:title="Date format" android:key="date_format" android:entryValues="@array/ldate_format" />
    </PreferenceScreen>

Hope someone can help me

Also what not working is reboot in RC. No Reboot of all 3 work. i put app in Priv-app and also in data but same results
 

Top Liked Posts

  • There are no posts matching your filters.
  • 55

    6htGear Rom control V2.1
    By @Wuby986 & Daxgirl


    Hello everyone!

    So here we go again... V2.0

    Big thanks:
    We would like to begin from crediting people, who gave us ideas, inspiration and, most importantly, their free time, in order to make v2.0 a reality.
    To our dearest friends and talented developers, @tdunham and @DaOldMan:
    Guys, you OWN this. You made this happen. You pushed us and we pushed you, and together, you, us and rom control, have grown to be what we are today.
    No thanks can ever be enough for long nights of applying patches, merging sources, connecting through teamviewer and working out kinks together. @Wuby986 and I are forever in your debt.


    Why different thread?
    1. The entire application is different. It barely qualifies as an update anymore.
    2. All the preferences are different. The way they work is different. It requires new way of doing things. Radically new.
    3. new support library and new basic structure.
    4. To sum it up... it's too different to maintain same thread for both versions

    Project characteristics:
    1. Rom control is an open source project, designed to provide rom builders with a core code for compiling android application for controlling core functions of their roms and mods through Content Provider of Settings.System sqlite table
    2. Rom control is designed with consideration of the fact that most rom builders do not have sufficient skills in original android development to build application with this functionality on their own
    3. The emphasis is given in this version (even more than previous one) to outsource most conditions and attributes to xml, and so to minimize the need of the user (rom builder) to be subjected to java programming
    4. In addition to familiar utilization of ContentResolver to pass data between RomControl and system, the project offers additional properties, such as file based preference, URI selection preference, Direct intent to shortcut app preference, preference listing image thumbnails for previews, script running preference, automated template for "About Us" section, automated dialog for changelog, backup and restore finctionality and more.
    5. The project is designed to be compiled in Android Studio using the latest sdk tools and gradle tools.
    6. The project essentially is designed to be a system application with privileged access, and therefore needs to be installed in /system/priv-app to be granted some of its permissions
    7. The project requires root access for some of its functionality. Mainly running shell scripts with su and killing some app processes.

    License and sharing policy:
    1. This project is distributed under GNU General Public License as open source code. The copy of said license can be obtained and reviewed here
    2. As such, this project is protected from claiming exclusivity by anyone.
    3. Any developer wishing to use this code, with accordance to the license, must provide full source code for each updated version. That means, for any new version of the rom including updated RomControl application, a link to full source code of the latest version must be provided.
    4. By modifying and using this code, you automatically accept the License conditions and must be compliant with GPL, as stated below:
    You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
    5. You're under no obligation to thank us, credit us or tag us in your official postings while distributing your copy.
    6. You ARE, however, prohibited from removing our copyright information from our source code.
    7. You are obligated to keep the code open under GPL. Failure to provide sources for updated copies of your work will result in complaint first to XDA officials for license infringement and further to GPL legal department.
    8. Using the source code on any other forum outside of xda is of course allowed with accordance to the license and sharing policy, provided the sources are kept open and obtainable by anyone.
    9. Using apktool to compile a copy of this code after making changes in the decompiled form of someone else's application is strictly prohibited, as the developer will not be able to provide full open source of their version. Any illegal use of any copy of this project can be and should be legally stopped by the owner of the code copy.
    10. This voids rule number 12 of xda promising a developer exclusivity over their product. This product is yours, but the code belongs to the public. You are NOT TO HOLD COPY OF ROM CONTROL EXCLUSIVE.
    To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.

    For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

    Open source libraries included in this project:
    1. RootTools by Stericson
    2. Sergey Margaritov's ColorPickerPreference modified to adopt to our needs
    3. CircleImageView by hdodenhof

    Project requirements:
    1. Installed and updated android sdk, including but not limited to:
    Android SDK Build-Tools 24
    Android SDK Platform-Tools 24
    Android support repository 33
    Google repository, rev 29
    Latest android support library

    2. Android studio version AT LEAST the latest stable version (currently 2.1.2), you can use the canary channel as well, currently on 2.2.0 preview 5.
    3. Updated gradle tools
    4. Working knowledge of importing project into Android Studio and troubleshooting gradle sync. If you don't know how to, Google it.
    5. EXTENSIVE knowledge in android modding:
    This project is for rom developers and modders. It helps coordinate between your users and your mods. If you don't build roms or don't have mods, this project means nothing to you.

    What support you can expect to get:
    1. Code explanation regarding major functionality
    2. Adding new preferences and navigation items

    What support you CANNOT expect:
    1. Setting up android studio
    2. Debugging gradle issues and compiling
    3. Changing colors, strings, adding themes, design, changing setup... - Android documentation is vast and Stackoverflow is even vaster.
    4. Smali modding
    5. Private messaging support - DO NOT EVEN TRY
    6. Asking for compiled apk file.

    This is NOT an application thread. This is NOT an application. This is a SOURCE CODE for MAKING application.
    The answer to a question "Can someone give me a compiled version" is "And what are you going to do with it?"

    Project main Git repository:
    Here

    Thread list of contents:
    1. Starting the project
    2. Adding navigation drawer items
    3. Running android app: where, how, builds, gradle tasks and you-name-it
    4. Preferences - Part 1: Introduction
    5. Preferences - Part 2: Types of preferences
    6. Themes, About Us activity and Changelog dialog
    7. Backup and Restore

    XDA:DevDB Information
    6thGear RomControl v2.0, Tool/Utility for all devices (see above for details)

    Contributors
    daxgirl, wuby986, tdunham, DaOldMan

    Version Information
    Status: Testing
    Current Stable Version: 2.1
    Stable Release Date: 2016-08-26

    Created 2016-07-06
    Last Updated 2016-08-26


    Latest Update details:
    Post number 195
    24

    Step 1 - Importing the project:

    1. Perform full installation of the latest stable version of Android Studio in your environment. You can find info about stable and canary releases here

    2. You can have more than one version of android studio installed on single platform. For more information please read further on the same page in section Using Multiple Android Studio Versions. I personally do recommend the latest canary build, which is currently AndroidStudio 2.2.0 preview 5. But you can always go with the stable release. Or beta channel.

    3. Make sure your sdk is updated, including sdk for platform 24 (nougat). The compile sdk for this project is 24.

    4. Make sure your support repositories are configured and updated.

    5. Click on our github repository link on the OP first post and make sure you're connected with your github account. If you don't have one - create it! Why? because you will need to share your sources for this project. And because you all use as mantra that you can mod android apps because it's open source. So BE OPEN SOURCE. Have your name on github.

    6. Once you're logged in into github, fork our repository. In the right upper corner of our main git repository you have those buttons:
    git-fork.PNG

    Click "fork" to make a copy of this repository in your own repositories. Now you have your own repository.

    7. On YOUR repository find this green button on the top right above the code, which says "Clone and Download". DO NOT DOWNLOAD ZIP. Instead, click the little "clipboard" icon to copy the .git uri and return to studio.

    8. In studio: File > New >Project from Version Control > Git

    9. Paste the git uri and choose destination. Click ok. Android studio will import the project from git and open it for you.

    10. At this point if you're asked to update gradle build tools or anything else, do it. Wait for gradle to sync with project files. If you get errors, resolve them as referenced. If you cannot, google is your friend.
    We WILL provide some support for initial importing of the project and setting it up for a very limited period of time. Gradle can be a tricky business. Please be sure to provide us with specific error from gradle log and a line in the gradle script on which the error is made.

    11. We WILL know if your errors are because you didn't update sdk and build tools. And we will kick your butts for posting without following instructions. Remember, our time is valuable and given to you for free. Our instructions are clear and we made a huge effort to write them. If you can't be bothered with following them, beware.

    12. Once the gradle is done syncing without errors, just in case, click Build > Rebuild Project. Once that is done without errors and it says BUILD SUCCESSFUL, you can start building your project following the instructions on the next post.

    23

    Adding items to the Navigation Drawer:

    1. Switch to project view.

    It will be easier for you to navigate through project files. For that:
    On the left panel on top, below the android studio menu, find this:
    app_view.PNG

    This is what your project will look right after you import it. This is module view. By default it is categorized and to work with it you need some understanding of this view.

    Click the 2 arrow icon which is circled in blue and select "project"
    Your structure will now change.
    Navigate into the project by the following path: Project name > app > src > main
    Now you will see directories, like: java, res, assets... and so on.
    project-view.PNG

    This is your working directory. You will be making your code changes here.​

    2. Find a file called nav_drawer_arrays.xml. It is located in res/values folder. Double click on it to open.
    You will see the following 3 arrays inside. The first one is a reference array (simple typed array) and the other 2 are strings arrays.
    Those are WORKING ARRAYS. When you run the app as it is now, you will see all the items created in the navigation drawer based on this info.
    Please read the comments we wrote in the xml file for you:​
    Code:
    <resources>
        [COLOR="Green"][B][I]<!--The following array is for icons you want to use for your items
        You can create new icons bu right clicking the drawable folder and choosing
        New vector drawable
        You have a great selection of items in xml vector format.
        Those are supported starting lollipop.
        YOU SHOULD NOT USE PNG. not even material one. Vectors will work best with any device density.
        
        Once you have created the vector, reference it as regular drawable in the array below.
        
        MAKE SURE THE ITEMS IN ALL 3 ARRAYS CORRESPOND IN ORDER AND ALL 3 ARRAYS ARE SAME LENGTH-->[/I][/B][/COLOR]
        <array name="nav_menu_prefs_drawables">
            <item>@drawable/ic_system_ui</item>
            <item>@drawable/ic_phone</item>
            <item>@drawable/ic_framework</item>
            <item>@drawable/ic_notification_panel</item>
        </array>
    
        
        [COLOR="green"][B][I]<!--This array is for your items titles.
        Use @string reference, so later on your app can be translated with ease
        KEEP THE ORDER BETWEEN ALL YOUR ARRAYS-->[/I][/B][/COLOR]
        <string-array name="nav_menu_prefs_titles">
            <item>@string/systemui_prefs</item>
            <item>@string/phone_prefs</item>
            <item>@string/framework_prefs</item>
            <item>@string/notification_panel_prefs</item>
        </string-array>
    
        
       [COLOR="green"][B][I] <!--This array is the most valuable one
        
        Here you put the file names of the preference files you create in your xml directory
        THEY MUST BE PRECISE AND CASE SENSITIVE!!! DO NOT ADD .xml SUFFIX-->[/I][/B][/COLOR]
        <string-array name="nav_menu_xml_file_names" translatable="false">
            <item>ui_prefs</item>
            <item>phone_prefs</item>
            <item>framework_prefs</item>
            <item>notification_panel_prefs</item>
        </string-array>
    </resources>

    3. Let's say you have 10 preference files in directory called xml. That means you will want to have 10 items referring to your preference files in the navigation drawer. That means you will need to have 10 items in EACH array. Create 10 empty preference files. DO NOT COPY THE ONES FROM RC v1.0. Just right click the xml folder, choose "New" and choose "New XML resource file". Give it a name and click ok. Leave them empty for now. create all the icons you need for them in the navigation drawer.

    4. Populate the arrays with titles, icons and xml names. You're done. You now have a working items in the navigation drawer. You do not need any changes in java files. the items are being generated on run time and their onClicks redirected accordingly. If you run the app right now you should have 10 empty preference files.

    We strongly encourage you to keep the ui_prefs.xml file and references to it in your project while you're working on it. It contains most valuable information about the kinds of preferences we have included and their various usages. You can remove it from arrays before making the release version. You can have it as last item in your arrays and use it as test dummy to see how things should work properly
    23

    Preferences - Part 2: Types of Preferences

    1. Two state preferences (meaning - can be true or false)

    MySwitchPreference & MyCheckboxPreference

    SmartSelectImage_2016-07-14-03-27-41.png

    SmartSelectImage_2016-07-14-03-37-44.png

    Code:
       [COLOR="Teal"][B] <!--Following category shows variety of two state preferences-->[/B][/COLOR]
        <PreferenceCategory
            android:title="Two stated preferences test category">
    
           [COLOR="DarkGreen"][B] <!--Normal Switch preference-->[/B][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.MySwitchPreference
                android:defaultValue="true"
                android:key="normal_test_switch"
                android:summaryOff="Disabled"
                android:summaryOn="Enabled"
                android:title="Normal test switch"/>
    
            <!--Switch preference which will throw a dialog that app reboot is required-->
            <com.wubydax.romcontrol.v2.prefs.MySwitchPreference
                android:defaultValue="true"
                android:key="kill_app_with_dialog_test_switch"
                android:summaryOff="Disabled"
                android:summaryOn="Enabled"
                android:title="Kill app with dialog switch"
                app:isSilent="false"
                app:packageNameToKill="com.android.systemui"/>
    
           [COLOR="darkgreen"][B] <!--Switch preference which will in ADDITION to actual work, also silently restart app with given package-->
            <!--Note, that isSilent attribute is by default TRUE. So you don't need to specify it if you want silent app restart-->[/B][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.MySwitchPreference
                android:defaultValue="true"
                android:key="kill_app_silently_test_switch"
                android:summaryOff="Disabled"
                android:summaryOn="Enabled"
                android:title="Kill app silently test switch"
                app:packageNameToKill="com.android.contacts"/>
    
           [COLOR="darkgreen"][B] <!--Switch preference which will throw a dialog that following it's action device reboot is required-->
            <!--Please note, even if you specify the need to kill app, once the rebootDevice attribute is TRUE, kill app attributes are ignored-->[/B][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.MySwitchPreference
                android:defaultValue="true"
                android:key="reboot_required_test_switch"
                android:summaryOff="Disabled"
                android:summaryOn="Enabled"
                android:title="Switch reminding of need to reboot"
                app:rebootDevice="true"/>
    
            [COLOR="darkgreen"][B]<!--We can use kill app on checkboxes as well. Same goes for rebootDevice-->[/B][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference
                android:defaultValue="true"
                android:key="test_checkbox_with_kill_app"
                android:summaryOff="Disabled"
                android:summaryOn="Enabled"
                android:title="Kill app checkbox"
                app:isSilent="false"
                app:packageNameToKill="com.android.systemui"/>
        </PreferenceCategory>

    FilePreference
    SmartSelectImage_2016-07-14-03-40-03.png

    Code:
    <PreferenceCategory
            android:title="File preferences">
            [COLOR="darkgreen"][B]<!--File preference is a very special kind of preference, which works like switch but has different output.
            Normal switch preference, like any two state preference, write boolean true/false into preferences.
            In our app it also writes 1/0 into database.
    
            File preference doesn't write into database. If it is switched on, it creates a file in our app directory in data.
            That name of that file is what you set as key.
    
            This is widely used by [user=1042140]@tdunham[/user] for global boolean needs in systemui.
            Please refer to his guide about setting global boolean to see appropriate smali application for this preference.
    
            This is most useful for mods in smali files where you do not have context access to get content resolver.
            Because File class is native java class and checking for it's existence does not require android context.
    
            File preferences can have attribute to kill app or reboot device.-->[/B][/COLOR]
    
    
           [COLOR="darkgreen"][B] <!--This is a simple file preference. Note that once it's switched on, a file with the name identical to key is created in
            /data/data/com.wubydax.romcontro.v2l/files
            When it's switched off the file is deleted.-->[/B][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.FilePreference
                android:key="new_file"
                android:summaryOff="Disabled"
                android:summaryOn="Enabled"
                android:title="New file preference"/>
    
    
           [COLOR="darkgreen"][B] <!--This file preferences upon change will prompt to kill app-->[/B][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.FilePreference
                android:key="another_file"
                android:summaryOff="Disabled"
                android:summaryOn="Enabled"
                android:title="Kill app file preference"
                app:isSilent="false"
                app:packageNameToKill="com.android.systemui"/>
        </PreferenceCategory>

    2. Dialog preferences
    ColorPickerPreferece

    Custom attributes:
    alphaSlider, hexValue - both booleans, TRUE by default
    SmartSelectImage_2016-07-14-03-38-05.png

    Code:
    [COLOR="Teal"]<!--The following category demonstrates various ways of using ColorPickerPreference-->[/COLOR]
        <PreferenceCategory
            android:title="Color pickers test category">
    
            [COLOR="DarkGreen"][B]<!--Normal color picker preference-->
            <!--Please note, the [COLOR="Red"][U]hexValue and the alpha are there by default now[/U][/COLOR]. If you want to cancel them, you need to specify false-->[/B][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.ColorPickerPreference
                android:defaultValue="#ffccdd"
                android:key="test_color_preference"
                android:title="Normal test color picker"/>
    
            [COLOR="DarkGreen"][B]<!--Color picker preference without the alpha slider and without the hex value
            You can set false to both or one of them-->[/B][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.ColorPickerPreference
                alphaSlider="false"
                hexValue="false"
                android:defaultValue="#ffffff"
                android:key="no_alpha_color_key"
                android:title="Color picker with no alpha or hex"/>
    
            [COLOR="darkgreen"][B]<!--Color picker preference with kill app option
            Note, [U]you can also use rebootDevice attribute[/U], like with two stated preferences-->[/B][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.ColorPickerPreference
                android:key="app_kill_color_key"
                android:title="Color picker with app kill"
                app:isSilent="false"
                app:packageNameToKill="com.android.systemui"/>
        </PreferenceCategory>

    MyListPreference
    Custom attributes:
    app:dependentValue - will enable you to set dependencies upon choosing selected value. If a dependent value is selected by user, the dependent preference will become disabled.
    Screenshot_20160714-033854.png

    Code:
    [COLOR="DarkGreen"][I]<!--Example of simple list preference with radio button items
            You absolutely HAVE to set dafaultValue and it has to be one of your entryValues string arrays
            You can use any of the following with kill app attributes or rebootDevice attribute
            
            Note, that you can now use dependency on list preference. 
            Custom attribute app:dependentValue will allow you to decide which list item, if selected, 
            will set dependent preferences disabled.-->[/I][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.MyListPreference
                android:defaultValue="20"
                android:entries="@array/test_list_entries"
                android:entryValues="@array/test_list_values"
                android:key="test_list_key"
                app:dependentValue="1"
                android:title="Choose items from the list preference"/>

    ThumbnailListPreference
    Custom attributes:
    app:dependentValue - will enable you to set dependencies upon choosing selected value. If a dependent value is selected by user, the dependent preference will become disabled.
    app:drawableArray - references array which provides resources for the thumbnail images for each list item
    app:entryList - references array of strings to provide names for actual list items
    app:entryValuesList - references array of strings for the entry values to be written to preferences and database for selected list item
    Screenshot_20160714-033901.png

    Code:
    [COLOR="darkgreen"][I] <!--Thumbnail list preference is a special kind of preference which allows you to show preview of the selected image
            This can be useful f.e. for setting custom bg to toggles in systemui
            Needless to say you need to put the same images you put in systemui in Rom Control in drawables
            And you need to create 3 kinds of arrays in arrays.xml file. 2 string arrays for entryList and entryValuesList and one simple array
            for drawable references. You can see the arrays for the following preferences inside arrays.xml
            You have to set default and the default has to be one of entryValuesList strings-->
    
            <!--Example of simple Thumbnail preference with no additional attributes-->[/I][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.ThumbnailListPreference
                android:defaultValue="1"
                android:key="test_thumbnail_key"
                android:title="Simple thumbnail preference"
                app:drawableArray="@array/thumbnail_drawables"
                app:entryList="@array/thumbnail_items"
                app:entryValuesList="@array/thumbnail_values"
                app:dependentValue="2"/>
    
            [COLOR="darkgreen"][I]<!--Example of Thumbnail preference which calls to kill app upon selected item-->[/I][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.ThumbnailListPreference
                android:defaultValue="2"
                android:key="test_thumbnail_kill_app"
                android:title="Kill app thumbnail preference"
                android:dependency="test_thumbnail_key"
                app:drawableArray="@array/thumbnail_drawables"
                app:entryList="@array/thumbnail_items"
                app:entryValuesList="@array/thumbnail_values"
                app:isSilent="false"
                app:packageNameToKill="com.android.systemui"/>

    IntentDialogPreference
    Custom attributes:
    app:intentSeparator - to allow you to set the char which will separate the package name from activity name in the intent component name
    app:showSearch - boolean attribute which determines whether search field will be available in the dialog window. By default it's TRUE. If you want no search, set to FALSE
    Screenshot_20160714-033913.png

    Code:
    [COLOR="DarkGreen"][I]<!--The following preference is a special preference that's called IntentDialogPreference
            This preference allows you to choose an app from the list. it also conveniently includes search field
            This preference writes into database what's called component name for specific system needs.
            When we want to call an app in android, we need to provide some information as to which app we want to launch
            and which activity inside that app we want to lunch.
            Launching app by combination of those is called explicit intent. Explicit intent needs 2 things to run an app:
            1. Package name
            2. Activity or service name
    
            This preference is most useful for launching an specific app based on info you can fetch from database
            For example on double click on home key
    
            Intent dialog preference puts the info for explicit intent in a string. First package name, then separator, then activity name
    
            You can use any separator you want. The default separator is "##"
            But as you can see in following example we set the separator to be forward slash "/"
            The separator depends on how you build the mod in smali for your needs.
    
            Any kill app or reboot device attributes are applicable here as well-->
    [/I][/COLOR]
    
            [COLOR="darkgreen"][I]<!--This specific IntentDialogPreference has defaultValue set to Settings app.
            You DO NOT need to set default. Only if you want to. But it is in most cases not necessary and even not that good.
            This is just an example. When you run this, you will see that the preference has an icon of the chosen app on the right
            and a name of the app set as summary. When you choose a new app, those things change-->[/I][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.IntentDialogPreference
                android:defaultValue="com.android.settings/com.android.settings.Settings"
                android:key="test_intent_with default"
                android:title="Select Test App with default"
                app:intentSeparator="/"/>
    
            [COLOR="darkgreen"][I]<!--This IntentDialogPreference comes with no default and no separator. So default separator will be applied "##"
            and it also has no search showing-->[/I][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.IntentDialogPreference
                android:key="test_intent_without default"
                android:title="Select app, no default, no search, ## separator"
                app:showSearch="false"/>
    
            [COLOR="darkgreen"][I]<!--This preference will prompt to reboot device upon selection
            This is useful if f.e. you use it to set default app to open when home button is double clicked
            Reboot is advised but not necessary immediately. So user will be shown a dialog to let them know they need to reboot
            And they can reboot immediately or later-->[/I][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.IntentDialogPreference
                android:key="test_intent_without_default"
                android:title="Select app and reboot device"
                app:intentSeparator="/"
                app:rebootDevice="true"
                app:showSearch="true"/>

    MyEditTextPreference

    Screenshot_20160715-091142.png

    Code:
    [COLOR="DarkGreen"][I][B] <!--Edit text preference is a dialog preference that allows you to enter custom text-->[/B][/I][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.MyEditTextPreference
                android:defaultValue="test"
                android:key="test_edit_text_key"
                android:title="Input custom text"/>


    3. Special Preferences
    OpenAppPreference

    Custom attributes:
    app:componentName - string type attribute to provide package name and desired activity name to open installed app. Please pay attention to instructions in code.
    SmartSelectImage_2016-07-14-03-40-33.png

    Code:
     [COLOR="darkgreen"][B][I]<!--The following category shows usage of  special preference we use to open an app based on component info
        All you need to provide for this preference is package name and activity name separated by forward slash "/" like shown below
        We will split the component info into components and check if the app is installed
        if it's installed, we will show the app icon as preference icon and app name as title
    
        If the app is not installed the preference is automatically removed from the list.
    
        You can set your own summary to explain about the app.
    
        If you wish to show a custom icon for that app shortcut or have custom title,
        if you wish to use custom icon or custom title, like you would do normally with preference,
        You are free to use android:title and android:icon attributes.
        Our class will then use the items you chose instead of the application title and icon.
    
        This WILL NOT affect the intent for opening application. It's a cosmetic measure for your convenience.-->[/I][/B][/COLOR]
        <PreferenceCategory
            android:title="Shortcut to apps preferences">
    
    [COLOR="darkgreen"][B][I]        <!--Example of simple app shortcuts. If those apps are not installed, the preferences will not show-->
    [/I][/B][/COLOR]        <com.wubydax.romcontrol.v2.prefs.OpenAppPreference
                android:summary="Application to browse your files, including root files"
                app:componentName="com.speedsoftware.rootexplorer/com.speedsoftware.rootexplorer.RootExplorer"/>
    
            <com.wubydax.romcontrol.v2.prefs.OpenAppPreference
                android:summary="Control samsung's toolbox, turn it on or off, choose available apps and rearrange them"
                app:componentName="com.wubydax.toolboxsettings/com.wubydax.toolboxsettings.ToolboxSettings"/>
    
    [COLOR="darkgreen"][B][I]        <!--Example of OpenAppPreference with custom title and icon-->
    [/I][/B][/COLOR]        <com.wubydax.romcontrol.v2.prefs.OpenAppPreference
                android:summary="Choose what app or shortcut to open when TW launcher is being swiped to the magazine page"
                android:title="Shortcut to GearTWSwipe"
                android:icon="@mipmap/ic_launcher"
                app:componentName="com.wubydax.geartwswipe/com.wubydax.geartwswipe.ResetDialogActivity"/>
    
    [COLOR="darkgreen"][B][I]        <!--Open app preference with only cuctom title and the icon which is loaded from the app-->
    [/I][/B][/COLOR]        <com.wubydax.romcontrol.v2.prefs.OpenAppPreference
                app:componentName="eu.chainfire.supersu/eu.chainfire.supersu.MainActivity-Material"
                android:title="Chainfire's SuperSu App"
                android:summary="Manage root permissions for apps and services"/>
        </PreferenceCategory>


    UriSelectionPreference

    SmartSelectImage_2016-07-14-03-39-41.png

    Code:
    <PreferenceCategory
            android:title="Select image preferences">
            [COLOR="darkgreen"][B][I]<!--Select image preferences allow the user to select any image from the gallery.
            The uri for that image will be written into the database
            Android can fetch images based on their uri (universal resource identifier).
            A type of uri that you all know is called URL, which is a web address.
            Uri for database is the "address" of an item inside the database.
            In android we have Media database, which hosts info about media items. In our case we are interested in images.
    
            Upon clicking this preference a Gallery will launch, upon selecting image, it's uri will be written into database.
            In your mods you can fetch the string, convert it to Uri and set that image as background to anything you want.
            We use this method for setting custom image in our mod for background to notification panel-->[/I][/B][/COLOR]
    
    
            <!--Those are examples of simple uri selection preference. The icon for them will be the selected image preview
            You need to set title and key. That's it.-->
            <com.wubydax.romcontrol.v2.prefs.UriSelectionPreference
                android:key="test_image_selection_key_2"
                android:title="Select Image 2"/>       
        </PreferenceCategory>


    RunScriptPreference

    Custom attributes:
    app:scriptFileName - string type attribute to provide script name to run, including the .sh extension.
    app:showConfirmDialog - a boolean type preference, dtetermining whether a warning dialog will be shown before executing the script. we have had this request for previous version, since users sometimes hit script preference by mistake and it executes immidiately. By default this boolean is TRUE. So for any script a warning dialog will show. Youc an set it to FALSE to execute without warning.
    app:rebootOptions - enum type attribute:
    Sometimes you will perform actions in script which will require a device reboot to take effect
    For this purpose we created this attribute, which can take 3 values:

    1. None - this is default. You do not need to specify "none". if you don't specify rebootOptions it will always be "none"
    This means reboot is not required upon running script

    2. Optional - this means that the execution of this script is ok without immediate reboot,
    but for the action to take effect, reboot is required. if you set rebootOption to "optional",
    upon successful script execution a user will be presented with a dialog.
    A dialog has 2 buttons: reboot now or reboot later.
    Use this option ONLY if reboot is required for action to take effect and reboot is not VITAL. Meaning no app will FC without reboot.

    3. Imminent- sometimes you will want to run scripts which replace key system components, such as entire apk
    or even jar files. When a script like that is executed, you want immediate reboot. Because other wise the app in question
    can throw FC. Most of you from what we have seen, use reboot option for scripts like these at the end of the script.
    You NO LONGER HAVE TO. We will handle the reboot for you ONLY if the script is executed successfully and "imminent" option was chosen.
    It is nice to WARN the user that their phone will reboot after running the script.
    That is why if you choose app:rebootOptions="imminent" a dialog will be shown to the user once they click on preference.
    This dialog will warn them that upon script execution their device will reboot

    If you use this option, once the script is done we will execute the reboot. Make sure you have your app in priv-app before testing this. It will need reboot permissions. Please read the gradle explanation 2 posts above, regarding those permissions.

    DO NOT use "reboot" or "kill zygote" commands at the end your scripts. Do yourselves and your users a favour and stop using those all together.
    SmartSelectImage_2016-07-14-03-41-18.png

    Code:
    [COLOR="darkgreen"][I][B]<!--Running scripts in rom modding is no silly business.
        We need shell scripts for purposes that can vary from writing a line into a file on sd,
        through replacing sound files and host files,
        to as far as replacing entire apk and jar files.
    
        Because shell scripts can vary in their complexity, we created a special preference that runs shell scripts.
    
        The major component in this preference is the scriptName attribute. The script name should be given in full,
        as string, including extension (.sh).
    
        The code for the preference knows where your scripts are found. It will locate the script if it's found there
        and execute it.
    
        if script execution fails, a number is being shown. That means the exit code of a script is not 0.
        That means something is wrong in the script.
    
        If the script is executed properly, a toast will be shown saying "Executed successfully"-->[/B][/I][/COLOR]
        <PreferenceCategory
            android:title="Run script preferences">
    
            [COLOR="darkgreen"][B][I]<!--This is the basic script preference. It will jujst run a script.-->[/I][/B][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.RunScriptPreference
                android:title="Execute script with prompt"
                app:scriptFileName="simple_test.sh"
                android:summary="This action will throw warning dialog before executing script"/>
    
    
            [COLOR="darkgreen"][I][B]<!--Because of the radical nature of running shall scripts with su,
            We included a dialog which is shown when a user clicks on script preference
    
            By default confirm dialog will be shown before executing eny script. If you wish to run a script without the warning dialog,
            You need to specify the custom attribute that a dialog should not be shown.
            We strongly encourage you to keep the dialog. It's better for your users to be sure they clicked on the right option-->[/B][/I][/COLOR]
    
            <com.wubydax.romcontrol.v2.prefs.RunScriptPreference
                android:title="Execute without prompt"
                app:scriptFileName="simple_test.sh"
                app:showConfirmDialog="false"
                android:summary="This action will execute script without warning"/>
    
    
            [COLOR="darkgreen"][I][B]<!--Script preference with optional reboot-->[/B][/I][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.RunScriptPreference
                android:title="Script with optional reboot"
                app:rebootOptions="optional"
                app:scriptFileName="simple_test.sh"
                android:summary="This action will write into a file on sd card and show dialog that reminds the user to reboot their phone at this time or later for the action to take effect"/>
    
            [COLOR="darkgreen"][I]<!--Script preference with imminent reboot-->[/I][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.RunScriptPreference
                android:title="Script with imminent reboot"
                android:summary="This action will run script which has reboot command at the end and warn user that reboot of device will follow the script execution immediately"
                app:rebootOptions="imminent"
                app:scriptFileName="simple_test.sh"/>
    
    
           [COLOR="DarkGreen"][B][I] <!--We were asked by some developers to make a kill app option available for script preference
            Therefore, you can also use the kill package attributes now, silent or with dialog,
            for your script preferences.
    
            The following RunScriptPreference will prompt killing contacts app f.e
            P.s. you can set icons to your run script preferences like any other preference-->[/I][/B][/COLOR]
            <com.wubydax.romcontrol.v2.prefs.RunScriptPreference
                android:title="Execute and kill app + icon"
                android:icon="@mipmap/ic_launcher"
                android:summary="Upon finishing, this script preference will prompt a user to kill app, since we set the isSilent attribute to false"
                app:packageNameToKill="com.android.contacts"
                app:isSilent="false"
                app:scriptFileName="simple_test.sh"/>
        </PreferenceCategory>


    ImageHeaderPreference

    Custom attributes:
    app:imageSource - reference type of attribute to set the image to show as header preference. The default size for image is width match_parent and height 200dp.

    This is just one of those little things we made for fun, but it ended up being @tdunham 's favourite toy :D
    Screenshot_20160714-034152.png

    Code:
     [COLOR="DarkGreen"][I]<!--This is one of those little bonus thingies what we made for our beta-testers
                and you all get to inherit it. It's a little preference class called ImageHeaderPreference
                It allows you to choose and image as header for your preference screen.
                Just to bring a little color and life into all those switches and checkboxes...-->[/I][/COLOR]
                <com.wubydax.romcontrol.v2.prefs.ImageHeaderPreference
                    app:imageSource="@drawable/android"/>
    21

    Preferences - Part 1: Introduction

    1. Major change in implementation:

    1. For this release we made a major change in how preferences are handled. They are not handled anymore. They handle themselves.
    2. For that to happen we needed to subclass ALL native android preferences except PreferenceScreen and PreferenceCategory.
    3. What does it mean to subclass? That means we created java classses which extend (resemble) native android preferences and we wrote our own implementation of how they should behave, how they should load their values and write their values.
    4. That being said - there is no more standard android preferences in this project. No more SwitchPreference, no more CheckboxPreference, no ListPreference... None of those.

    5. Two reasons for that:
    1. We didn't want you to get lost in special conditions anymore. We wanted you to be able to set if the preference should restart systemui from xml file when you declare preference. For that we needed to add custom xml attributes. For that we needed a preference class to be able to acknowledge that. So we needed a custom preference class.
    2. We wanted the preference to manage itself in by reading and writing from and to database. Instead of fragment running endless iterations and conditions. When our new preferences are born (attached to the screen), they get their value from the database directly. No one needs to set values to them. When they are changed, they know to write into database directly. From their own class. Not containing fragment doing that for them.​

    2. Types of preferences

    1. Two state preferences:
    MySwitchPreference
    MyCheckboxPreference
    FilePreference​

    2. Dialog preferences:
    MyListPreference
    MyEditTextPreference
    IntentDialogPreference
    ThumbnailListPreference
    ColorPickerPreference​

    3. Native preferences(PreferenceGroup subclasses):
    PreferenceScreen
    PreferenceCategory​

    4. Slider Preference:
    MySeekBarPreference​

    5. Special preferences:
    OpenAppPreference
    UriSelectionPreference
    RunScriptPreference
    ImageHeaderPreference​

    3. Setting defaults:
    It is ABSOLUTELY VITALLY IMPORTANT that you set android:defaultValue to all the preferences that change and read values. That means:

    MySwitchPreference
    MyCheckboxPreference
    FilePreference
    MyListPreference
    MyEditTextPreference
    ThumbnailListPreference
    ColorPickerPreference
    MySeekBarPreference


    4. What happens if we use regular android preferences? Like SwitchPreference or ListPreference?

    Nothing! Absolutely nothing will happen nor to this project, nor to your database and, MOST IMPORTANTLY, nor to your mods.
    It will act like normal preference. It will not write to database. Your mods will not be affected and WILL NOT WORK.


    5. Custom attributes for value changing preferences and RunScriptPreference

    1. app: packageNameToKill
    This attribute is of type string and you will need to provide which app you want to restart when this preference changes value.​
    2. app:isSilent
    This is a boolean type attribute, which is by default set to true. That means that if you don't set this attribute and you DO set the package name to kill, it will restart the app you want without warning as soon as the value has been changed. If it is set to "false", upon value change a dialog will appear with app icon and test informing user that for this action to take effect an app restart is required. They can then choose to kill app now or cancel the dialog and kill it later.​
    3. app:rebootRequired
    This is also a boolean type of preference which by default is set to false. If you set it to "true", upon preference value change a dialog will appear, informing the user that reboot is required for this action to take effect. good example for that is changing the default app intent to open on home button double click. That needs framework reload.
    If rebootRequired is set to true and you ALSO set package name to kill, reboot takes preference. Package to kill will be ignored.​