[XDA-University] ShaDisNX255:
Thanks! Can you help me on a new logcat? Just this last one, I promise :crying:

I've moved stock ROM quite a bit and implemented countless things, so I really don't know where I messed up that I broke the manual time/clock changer

This is the original log I got:

07-09 15:02:30.590 6516 6516 D AndroidRuntime: Shutting down VM
07-09 15:02:30.600 6516 6516 E AndroidRuntime: FATAL EXCEPTION: main
07-09 15:02:30.600 6516 6516 E AndroidRuntime: Process: com.android.settings, PID: 6516
07-09 15:02:30.600 6516 6516 E AndroidRuntime: android.view.InflateException: Binary XML file line #28: Binary XML file line #28: Error inflating class com.sec.android.touchwiz.widget.TwTimePicker
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.view.LayoutInflater.inflate(LayoutInflater.java:551)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.view.LayoutInflater.inflate(LayoutInflater.java:380)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at com.sec.android.touchwiz.app.TwTimePickerDialog.<init>(TwTimePickerDialog.java:172)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at com.android.settings.DateTimeSettings.onCreateDialog(DateTimeSettings.java:466)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at com.android.settings.SettingsPreferenceFragment$SettingsDialogFragment.onCreateDialog(SettingsPreferenceFragment.java:829)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.app.DialogFragment.getLayoutInflater(DialogFragment.java:407)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:984)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1164)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.app.BackStackRecord.run(BackStackRecord.java:793)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1557)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.app.FragmentManagerImpl$1.run(FragmentManager.java:488)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.os.Handler.handleCallback(Handler.java:739)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.os.Handler.dispatchMessage(Handler.java:95)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.os.Looper.loop(Looper.java:148)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.app.ActivityThread.main(ActivityThread.java:7406)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at java.lang.reflect.Method.invoke(Native Method)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
07-09 15:02:30.600 6516 6516 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #28: Error inflating class com.sec.android.touchwiz.widget.TwTimePicker
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.view.LayoutInflater.createView(LayoutInflater.java:657)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.view.LayoutInflater.rInflate(LayoutInflater.java:847)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.view.LayoutInflater.inflate(LayoutInflater.java:527)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	... 18 more
07-09 15:02:30.600 6516 6516 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at java.lang.reflect.Constructor.newInstance(Native Method)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.view.LayoutInflater.createView(LayoutInflater.java:631)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	... 23 more
07-09 15:02:30.600 6516 6516 E AndroidRuntime: Caused by: java.lang.NumberFormatException: Invalid int: "This app can read when apps are pinned or unpinned."
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at java.lang.Integer.invalidInt(Integer.java)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at java.lang.Integer.parse(Integer.java)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at java.lang.Integer.parseInt(Integer.java)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:133)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at android.content.res.TypedArray.getInt(TypedArray.java:357)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at com.sec.android.touchwiz.widget.TwTimePicker.<init>(TwTimePicker.java:99)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at com.sec.android.touchwiz.widget.TwTimePicker.<init>(TwTimePicker.java:91)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	at com.sec.android.touchwiz.widget.TwTimePicker.<init>(TwTimePicker.java:87)
07-09 15:02:30.600 6516 6516 E AndroidRuntime:	... 25 more

The thing is, from what I am gathering here is that there is an error in TwTimePicker, but I never messed with this smali at all which is weird.

I am an unexperienced person, so just at a quick glance at:

07-09 15:02:30.600 6516 6516 E AndroidRuntime: Caused by: java.lang.NumberFormatException: Invalid int: "This app can read when apps are pinned or unpinned."

I can kind of understand that it's getting an invalid number format. Looking at framework-res, the "This app can read when apps are pinned or unpinned." text is a string and comes as such:

<string name="tw_lock_to_app_status_intent_permission_description">This app can read when apps are pinned or unpinned.</string>

So what I did was look for a string that was meant for time picker and sure enough, there is one with it's specific number format:

<string name="time_of_day" formatted="false">%-l:%M:%S %p</string>

So as a quick patch (just to see if it fixes it), I changed the string to this:

<string name="tw_lock_to_app_status_intent_permission_description" formatted="false">%-l:%M:%S %p</string>

I compiled and pushed the new framework-res, tried again and now I got this crash log:

07-09 16:55:56.350 4294 4294 E AndroidRuntime: FATAL EXCEPTION: main
07-09 16:55:56.350 4294 4294 E AndroidRuntime: Process: com.android.settings, PID: 4294
07-09 16:55:56.350 4294 4294 E AndroidRuntime: android.view.InflateException: Binary XML file line #28: Binary XML file line #28: Error inflating class com.sec.android.touchwiz.widget.TwTimePicker
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.view.LayoutInflater.inflate(LayoutInflater.java:551)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.view.LayoutInflater.inflate(LayoutInflater.java:380)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at com.sec.android.touchwiz.app.TwTimePickerDialog.<init>(TwTimePickerDialog.java:172)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at com.android.settings.DateTimeSettings.onCreateDialog(DateTimeSettings.java:466)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at com.android.settings.SettingsPreferenceFragment$SettingsDialogFragment.onCreateDialog(SettingsPreferenceFragment.java:829)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.app.DialogFragment.getLayoutInflater(DialogFragment.java:407)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:984)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1164)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.app.BackStackRecord.run(BackStackRecord.java:793)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1557)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.app.FragmentManagerImpl$1.run(FragmentManager.java:488)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.os.Handler.handleCallback(Handler.java:739)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.os.Handler.dispatchMessage(Handler.java:95)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.os.Looper.loop(Looper.java:148)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.app.ActivityThread.main(ActivityThread.java:7406)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at java.lang.reflect.Method.invoke(Native Method)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
07-09 16:55:56.350 4294 4294 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #28: Error inflating class com.sec.android.touchwiz.widget.TwTimePicker
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.view.LayoutInflater.createView(LayoutInflater.java:657)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.view.LayoutInflater.rInflate(LayoutInflater.java:847)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.view.LayoutInflater.inflate(LayoutInflater.java:527)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	... 18 more
07-09 16:55:56.350 4294 4294 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at java.lang.reflect.Constructor.newInstance(Native Method)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.view.LayoutInflater.createView(LayoutInflater.java:631)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	... 23 more
07-09 16:55:56.350 4294 4294 E AndroidRuntime: Caused by: java.lang.NumberFormatException: Invalid int: "Set Smartcard permissions"
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at java.lang.Integer.invalidInt(Integer.java)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at java.lang.Integer.parse(Integer.java)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at java.lang.Integer.parseInt(Integer.java)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:133)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at android.content.res.TypedArray.getInt(TypedArray.java:357)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at com.sec.android.touchwiz.widget.TwTimePicker.<init>(TwTimePicker.java:99)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at com.sec.android.touchwiz.widget.TwTimePicker.<init>(TwTimePicker.java:91)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	at com.sec.android.touchwiz.widget.TwTimePicker.<init>(TwTimePicker.java:87)
07-09 16:55:56.350 4294 4294 E AndroidRuntime:	... 25 more

Looked for this string and repeated my previous "fix":

<string name="permlab_mdmSmartCardPolicy">Set Smartcard permissions</string>

So at this point I'm starting to see a pattern that it doesn't matter if I change it, it will just get another string?

I'm confused here

I also looked at all the smalis for it's public id number but it is nowhere to be found in either SecSettings, framework-res or twframework (here the TwTimePicker is located at)

I'm very interested on learning how to fix this problem, not because of its importance (still works fine in automatic date and time) but because I want to get better at reading and understanding this logcat. I know that all this information is supposed to tell me what's wrong, but I'm still not that capable of understanding it

Any help would be greatly appreciated! :)

Thanks!