mardi 28 juin 2016

S5 SystemUI problem

When trying to modify my S5 SystemUI i encountered this errors that makes it force close
Code:

E/AndroidRuntime( 4397): FATAL EXCEPTION: main
E/AndroidRuntime( 4397): Process: com.android.systemui, PID: 4397
E/AndroidRuntime( 4397): java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.setVisibility(int)' on a null object reference
E/AndroidRuntime( 4397):        at com.android.systemui.statusbar.phone.PhoneStatusBar.BatteryToggles(PhoneStatusBar.java)
E/AndroidRuntime( 4397):        at com.android.systemui.statusbar.phone.PhoneStatusBar.makeStatusBarView(PhoneStatusBar.java:1520)
E/AndroidRuntime( 4397):        at com.android.systemui.statusbar.phone.PhoneStatusBar.addStatusBarWindow(PhoneStatusBar.java:3967)
E/AndroidRuntime( 4397):        at com.android.systemui.statusbar.phone.PhoneStatusBar.createAndAddWindows(PhoneStatusBar.java:3963)
E/AndroidRuntime( 4397):        at com.android.systemui.statusbar.BaseStatusBar.start(BaseStatusBar.java:1362)
E/AndroidRuntime( 4397):        at com.android.systemui.statusbar.phone.PhoneStatusBar.start(PhoneStatusBar.java:924)
E/AndroidRuntime( 4397):        at com.android.systemui.statusbar.SystemBars.createStatusBarFromConfig(SystemBars.java:123)
E/AndroidRuntime( 4397):        at com.android.systemui.statusbar.SystemBars.onNoService(SystemBars.java:72)
E/AndroidRuntime( 4397):        at com.android.systemui.statusbar.ServiceMonitor.startService(ServiceMonitor.java:230)
E/AndroidRuntime( 4397):        at com.android.systemui.statusbar.ServiceMonitor.access$000(ServiceMonitor.java:49)
E/AndroidRuntime( 4397):        at com.android.systemui.statusbar.ServiceMonitor$1.handleMessage(ServiceMonitor.java:73)
E/AndroidRuntime( 4397):        at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 4397):        at android.os.Looper.loop(Looper.java:158)
E/AndroidRuntime( 4397):        at android.app.ActivityThread.main(ActivityThread.java:7224)
E/AndroidRuntime( 4397):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 4397):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
E/AndroidRuntime( 4397):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
I/am_crash( 1957): [4397,0,com.android.systemui,953695757,java.lang.NullPointerException,Attempt to invoke virtual method 'void android.widget.LinearLayout.setVisibility(int)' on a null object reference,PhoneStatusBar.java,-1]



How can i resolve these java.lang.NullPointerException?
At line 1520 of PhoneStatusBar for example there is:

Code:

    .line 1520
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryTextObserver:Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;

    const/4 v5, 0x0

    invoke-virtual {v4, v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatteryTextObserver;->onChange(Z)V

    move-object/from16 v0, p0

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->HideStockBattery()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->HideKeyguardStockBattery()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->BatteryToggles()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setBatteryTextViewColor()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setBatteryTextViewColorKG()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setSysbarLockButton()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setAllBgColor()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->header_clock_on_off_toggles()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setHeaderModClockDateColor()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setHeaderStockClockDateColor()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setPullDownIconColor()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setThirdButton()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setThirdButtonColor()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setClearNotiIconColor()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateNextAlarmView()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateDeviceInfoView()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateSignalPosition()V

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setQuickConnectTxtColor()V


What should i do (add/remove) in this case to solve the problem for example?:)


from xda-developers http://ift.tt/290ZTic
via IFTTT

Aucun commentaire:

Enregistrer un commentaire