Reverse engineering android:key

by Danish Shakeel   Last Updated October 10, 2019 07:11 AM

I am somewhat new to android development/porting and I am trying to port some features to a custom ROM. I am currently working on Settings.apk file.
The XML of base Settings.apk\res\xml\ambient_display\settings looks like this:

   <SwitchPreference android:title="@string/doze_always_on_title" android:key="ambient_display_always_on" android:summary="@string/doze_always_on_summary" settings:controller="" />

I want to add this settings feature to my custom ROM's Settings.apk. **

Where do I find the android:key (like we find android:title in xml/values/string.xml)? And is there any effective way to port this feature to my ROM?

I tried editing the Settings.apk of the custom ROM, hoping that the backend exists, but the SystemUI.apk and Settings.apk kept on crashing after I made the changes.

Related Questions

Updated July 24, 2015 13:04 PM

Updated February 12, 2017 14:04 PM

Updated March 04, 2016 01:05 AM

Updated July 18, 2017 02:11 AM