chiehmin / Xposed-NetworkSpeedIndicator

Network Speed Indicator
66 stars 29 forks source link

Galaxy Note 3, TouchWiz-based VN ROM V14.1 (LinearLayout cannot be cast to TextView) #52

Open digesh9870 opened 9 years ago

digesh9870 commented 9 years ago

I have a Galaxy Note 3 running touchwiz based VN ROM V14.1. Below is the log output. Hope it helps.

I/2014-09-01 13:02:06/onSharedPreferenceChanged enable_logging
E/2014-09-01 13:04:02/handleLayoutInflated failed: java.lang.ClassCastException: android.widget.LinearLayout cannot be cast to android.widget.TextView
java.lang.ClassCastException: android.widget.LinearLayout cannot be cast to android.widget.TextView
    at tw.fatminmin.xposed.networkspeedindicator.Module$3.handleLayoutInflated(Module.java:156)
    at de.robv.android.xposed.callbacks.XC_LayoutInflated.call(XC_LayoutInflated.java:33)
    at de.robv.android.xposed.callbacks.XCallback.callAll(XCallback.java:70)
    at android.content.res.XResources$3.afterHookedMethod(XResources.java:226)
    at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:645)
    at android.view.LayoutInflater.parseInclude(Native Method)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:751)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
    at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
    at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631)
    at android.view.LayoutInflater.inflate(Native Method)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
    at android.view.View.inflate(View.java:18367)
    at com.android.systemui.statusbar.phone.PhoneStatusBar.makeStatusBarView(PhoneStatusBar.java:501)
    at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
    at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631)
    at com.android.systemui.statusbar.phone.PhoneStatusBar.makeStatusBarView(Native Method)
    at com.android.systemui.statusbar.phone.PhoneStatusBar.addStatusBarWindow(PhoneStatusBar.java:3380)
    at com.android.systemui.statusbar.phone.PhoneStatusBar.createAndAddWindows(PhoneStatusBar.java:3351)
    at com.android.systemui.statusbar.BaseStatusBar.start(BaseStatusBar.java:423)
    at com.android.systemui.statusbar.phone.PhoneStatusBar.start(PhoneStatusBar.java:456)
    at com.android.systemui.statusbar.SystemBars.createStatusBarFromConfig(SystemBars.java:106)
    at com.android.systemui.statusbar.SystemBars.onNoService(SystemBars.java:58)
    at com.android.systemui.statusbar.ServiceMonitor.startService(ServiceMonitor.java:228)
    at com.android.systemui.statusbar.ServiceMonitor.access$000(ServiceMonitor.java:49)
    at com.android.systemui.statusbar.ServiceMonitor$1.handleMessage(ServiceMonitor.java:73)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:157)
    at android.app.ActivityThread.main(ActivityThread.java:5335)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
    at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
    at dalvik.system.NativeStart.main(Native Method)
ADTC commented 9 years ago

This appears to be due to your VN ROM's own customization. The regular Android source (even KitKat MR 2.2) will have the clock resolve to a TextView without any problem.

I will need the source of VN ROM to further investigate. Where can I obtain it? In the meanwhile I will add a fallback safety mechanism to take care of this edge case.

digesh9870 commented 9 years ago

Here is the link to the thread of VN Rom xda - http://forum.xda-developers.com/showthread.php?t=2503206. Thank you.

ADTC commented 9 years ago

@digesh9870 You can edit your comments. No need to post new comment to correct "typo error".

Anyway I looked at the link provided. I just took a quick look, but I can't seem to be able to find the sources of the ROM (the downloadable ROM image is not helpful).

Until sources can be furnished, I have to keep the current quick-fix.

digesh9870 commented 9 years ago

Hey, sorry for posting a new comment for correction. I am using web browser from mobile phone and I could not find any option to edit comment. Regarding source of the rom, do you want the download link of the rom? I couldn't get you what do you mean by the "source" of the rom. Sorry for that.

ADTC commented 9 years ago

Source = Development source code (java files, xml files, build files, etc, etc).

Anyway I have sent a PM to the ROM author in XDA.

digesh9870 commented 9 years ago

Okay, thanks for your time. I could give you the source if there is any way to extract it from the rom. Like if these files are present in root folders, I may help you.