* Now we have a .zip file compiled from source for aokp b32 based roms made by Xylograph
http://rootzwiki.com/topic/23418-mod-tabletui-for-240-dpi-legacy-devices-aokp-b32b33b34/ Give xylograph some credit hes been working on this for aokp
*Need some cm9 testers*
those brave enough who want to try and do from scratch the instructions are below*
I've been searching all over the net for an answer to this and found what we need to do, but i have a low end device and some lack of skills =/ to perform this, to get tablet mode first we need an aosp or aokp rom and a linux building enviroment with cm9 repo or aokp...
Then we must folow this paths and see if it is like below
config_statusBarComponent choose which resource we want, statusBar or systemBar.if phone, use com.android.systemui.statusbar.phone.PhoneStatusBar?; while tablet, use com.android.systemui.statusbar.tablet.TabletStatusBar?.
frameworks/base/packages/SystemUI/src/com/android/systemui/SystemUIService.java
public void onCreate() {
// Pick status bar or system bar.
IWindowManager wm = IWindowManager.Stub.asInterface(
ServiceManager.getService(Context.WINDOW_SERVICE));
try {
SERVICES[0] = wm.canStatusBarHide()
? R.string.config_statusBarComponent
: R.string.config_systemBarComponent;
} catch (RemoteException e) {
Slog.w(TAG, "Failing checking whether status bar can hide", e);
}
res/values/config.xml
<string name="config_statusBarComponent" translatable="false">
com.android.systemui.statusbar.phone.PhoneStatusBar</string>
<string name="config_systemBarComponent" translatable="false">
com.android.systemui.statusbar.tablet.TabletStatusBar<string>
canStatusBarHide defined
inframeworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
public boolean canStatusBarHide() {
return mStatusBarCanHide;
}
mStatusBarCanHide true or false determine status bar or system bar.
int shortSizeDp = shortSize
* DisplayMetrics.DENSITY_DEFAULT
/ DisplayMetrics.DENSITY_DEVICE;
mStatusBarCanHide = shortSizeDp < 600;
mStatusBarHeight = mContext.getResources().getDimensionPixelSize(
mStatusBarCanHide
? com.android.internal.R.dimen.status_bar_height
: com.android.internal.R.dimen.system_bar_height);
---------------------------------------------------------------------------
Here if shortSizeDp smaller than 600, then system use as tablet mode, otherwise phone mode. DENSITY_DEFAULT is fixed, so 120 should be suitable value to make both needs the tablet condition.
then we must make the changes below and voila tablet mode
--- A / Services / Java / COM / Android / Server / wm / WindowManagerService.Java
+ + + b / Services / Java / COM / Android / Server / wm / WindowManagerService.Java
@ @ -5962,7 Tasu5962,7 @ @ public class extends WindowManagerService IWindowManager.S
UnrotDw = DW;
UnrotDh = dh;
}
- int sw = ReduceConfigWidthSize (UnrotDw, Surface.ROTATION_0, density, un
+ int sw = ReduceConfigWidthSize ((int) (UnrotDw / density), Surface. ROTATI
ReduceConfigWidthSize sw = (sw, Surface.ROTATION_90, density, UnrotDh, u
sw = ReduceConfigWidthSize (sw, Surface.ROTATION_180, density, UnrotDw,
sw = ReduceConfigWidthSize (sw, Surface.ROTATION_270, density, UnrotDh,
setprop ro.sf.lcd_density 120 and
setprop ro.build.characteristics=tablet
AOKP ROMS
Tested on Bezke Aokp32 and hydrogenics b32http://rootzwiki.com/topic/23418-mod-tabletui-for-240-dpi-legacy-devices-aokp-b32b33b34/ Give xylograph some credit hes been working on this for aokp
AOSP ROMS
The cm9 zip uploaded is currently working on d4 Rom v7 (not working on v8 and V9)*Need some cm9 testers*
those brave enough who want to try and do from scratch the instructions are below*
I've been searching all over the net for an answer to this and found what we need to do, but i have a low end device and some lack of skills =/ to perform this, to get tablet mode first we need an aosp or aokp rom and a linux building enviroment with cm9 repo or aokp...
Then we must folow this paths and see if it is like below
config_statusBarComponent choose which resource we want, statusBar or systemBar.if phone, use com.android.systemui.statusbar.phone.PhoneStatusBar?; while tablet, use com.android.systemui.statusbar.tablet.TabletStatusBar?.
frameworks/base/packages/SystemUI/src/com/android/systemui/SystemUIService.java
public void onCreate() {
// Pick status bar or system bar.
IWindowManager wm = IWindowManager.Stub.asInterface(
ServiceManager.getService(Context.WINDOW_SERVICE));
try {
SERVICES[0] = wm.canStatusBarHide()
? R.string.config_statusBarComponent
: R.string.config_systemBarComponent;
} catch (RemoteException e) {
Slog.w(TAG, "Failing checking whether status bar can hide", e);
}
res/values/config.xml
<string name="config_statusBarComponent" translatable="false">
com.android.systemui.statusbar.phone.PhoneStatusBar</string>
<string name="config_systemBarComponent" translatable="false">
com.android.systemui.statusbar.tablet.TabletStatusBar<string>
canStatusBarHide defined
inframeworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
public boolean canStatusBarHide() {
return mStatusBarCanHide;
}
mStatusBarCanHide true or false determine status bar or system bar.
int shortSizeDp = shortSize
* DisplayMetrics.DENSITY_DEFAULT
/ DisplayMetrics.DENSITY_DEVICE;
mStatusBarCanHide = shortSizeDp < 600;
mStatusBarHeight = mContext.getResources().getDimensionPixelSize(
mStatusBarCanHide
? com.android.internal.R.dimen.status_bar_height
: com.android.internal.R.dimen.system_bar_height);
---------------------------------------------------------------------------
Here if shortSizeDp smaller than 600, then system use as tablet mode, otherwise phone mode. DENSITY_DEFAULT is fixed, so 120 should be suitable value to make both needs the tablet condition.
then we must make the changes below and voila tablet mode
--- A / Services / Java / COM / Android / Server / wm / WindowManagerService.Java
+ + + b / Services / Java / COM / Android / Server / wm / WindowManagerService.Java
@ @ -5962,7 Tasu5962,7 @ @ public class extends WindowManagerService IWindowManager.S
UnrotDw = DW;
UnrotDh = dh;
}
- int sw = ReduceConfigWidthSize (UnrotDw, Surface.ROTATION_0, density, un
+ int sw = ReduceConfigWidthSize ((int) (UnrotDw / density), Surface. ROTATI
ReduceConfigWidthSize sw = (sw, Surface.ROTATION_90, density, UnrotDh, u
sw = ReduceConfigWidthSize (sw, Surface.ROTATION_180, density, UnrotDw,
sw = ReduceConfigWidthSize (sw, Surface.ROTATION_270, density, UnrotDh,
setprop ro.sf.lcd_density 120 and
setprop ro.build.characteristics=tablet
Attachments
Last edited: