Hey DaGr8, have you had any luck overriding the default phone/tablet logic? I was thinking that it would be possible to enable tablet mode at a higher dpi, or perhaps even trigger phone vs tablet mode via orientation, but every time I override the logic I get a cast error, even if I hardcode the method to return false (tablet mode).
It's almost as if there's another method or bit of code used to determine whether or not to draw the statusbar or the systembar aside from PhoneWindowManager->canStatusBarHide().
I'm looking through SystemUIService.java now to see if I can pick out exactly where the first decision is made because it can't be using canStatusBarHide (because I'm hardcoding it).
Here's the quick hack I was using to lock the canStatusBarHide() to false:
Here's a sample logcat from when I hardcode canStatusBarHide at TabletMode:
Code:
E/AndroidRuntime( 996): FATAL EXCEPTION: main
E/AndroidRuntime( 996): java.lang.RuntimeException: Unable to create service com.android.systemui.SystemUIService: java.lang.ClassCastException: com.android.systemui.statusbar.tablet.TabletStatusBarView cannot be cast to com.android.systemui.statusbar.phone.PhoneStatusBarView
E/AndroidRuntime( 996): at android.app.ActivityThread.handleCreateService(ActivityThread.java)
E/AndroidRuntime( 996): at android.app.ActivityThread.access$1600(ActivityThread.java)
E/AndroidRuntime( 996): at android.app.ActivityThread$H.handleMessage(ActivityThread.java)
E/AndroidRuntime( 996): at android.os.Handler.dispatchMessage(Handler.java)
E/AndroidRuntime( 996): at android.os.Looper.loop(Looper.java)
E/AndroidRuntime( 996): at android.app.ActivityThread.main(ActivityThread.java)
E/AndroidRuntime( 996): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 996): at java.lang.reflect.Method.invoke(Method.java)
E/AndroidRuntime( 996): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
E/AndroidRuntime( 996): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
E/AndroidRuntime( 996): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 996): Caused by: java.lang.ClassCastException: com.android.systemui.statusbar.tablet.TabletStatusBarView cannot be cast to com.android.systemui.statusbar.phone.PhoneStatusBarView
E/AndroidRuntime( 996): at com.android.systemui.statusbar.phone.PhoneStatusBar.makeStatusBarView(PhoneStatusBar.java)
E/AndroidRuntime( 996): at com.android.systemui.statusbar.StatusBar.start(StatusBar.java)
E/AndroidRuntime( 996): at com.android.systemui.statusbar.phone.PhoneStatusBar.start(PhoneStatusBar.java)
E/AndroidRuntime( 996): at com.android.systemui.SystemUIService.onCreate(SystemUIService.java)
E/AndroidRuntime( 996): ... 11 more
Trying to get my eyes and fingers used to the resolution, but this is great. Thanks!
Sent from my SAMSUNG-SGH-I717 using XDA
Current Devices:
Samsung Galaxy Note II (AT&T)
HTC Droid DNA (Verizon)
Previous Devices:
Samsung Galaxy SIII (AT&T), Samsung Galaxy SIII (Sprint), HTC One S (T-Mobile), Toshiba Thrive Tablet, AT&T Galaxy Note, T-Mobile Samsung Galaxy SII, LG G2X, MyTouch 4G Slide, iPhone 4s, MyTouch 4G, iPhone 3GS, Some Blackberries, HTC Diamond Touch, HTC Mogul, HTC PC6700, handful of Nokias... all the way back to the original Motorola MicroTAC in 1994.
What do you do when the Galaxy Note line is simply not big enough? You get theSamsung Galaxy Mega. … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?