Friday, November 30, 2012

ICS, JB Phone window manager difference:

while playing video on fullscreen, status bar will be hided during playback in JB. This will not happen with ICS.
In ICS, Window manager will check for the mStatusBarCanHide flag to identify whether the system is having Phone UI or Tablet UI.
If it is having Phone UI, mStatusBarCanHide flag will be set to true. Whereas in case of tablet, this flag will be set to false.
Based on this flag, window manager differentiate the Phone UI or tablet UI.
   Display 600 dp is Phone UI.
   Display 720 dp
   Display > 720dp, tablet UI or larger screen UI

In ICS, status bar hiding support is available only phone models. It is not available for tablet UIs.[Refered from android ICS release notes]
In JB, it will checks for the mHasSystemNavBar. This value indicates whether device is having tablet UI/larger screens or smaller UI/phone UI.
This flag will be set to true for tablet UI.

      One more major difference between ICS  and JB is that while playing video on fullscreen, ICS will hide the status bar by calling status bar service's collapse() method whereas in JB, it will change the window manager layout.window manager layout's display frame/navigation frame/content frame will be set the video screen. Ideally status bar will be there in screen but it wont be shown to user due to display viewport.

No comments: