Tablet mode Ics Sgs2 Updated

Search This thread

Tyrany

Senior Member
Sep 19, 2011
815
402
Faro
Android Wear
Google Pixel 4 XL
* Now we have a .zip file compiled from source for aokp b32 based roms made by Xylograph

AOKP ROMS​
Tested on Bezke Aokp32 and hydrogenics b32


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

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

  • TabletUI_AOKP_b32.zip
    2.1 MB · Views: 486
  • TabletUI_MOD_CM9.zip
    2 MB · Views: 245
Last edited:

Paradoxxx

Senior Member
Aug 14, 2008
5,584
5,959
Krakow
I'll submit patch tomorrow.

Sent from my i9100. No HyDrOG3NICS? No SWAGG..
paradoxxx_1337
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    * Now we have a .zip file compiled from source for aokp b32 based roms made by Xylograph

    AOKP ROMS​
    Tested on Bezke Aokp32 and hydrogenics b32


    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

    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
    6
    I'll submit patch tomorrow.

    Sent from my i9100. No HyDrOG3NICS? No SWAGG..
    paradoxxx_1337
    3
    http://xdaforums.com/showthread.php?p=21874098

    The sources came from this thread



    Sent from my GT-I9100 using Tapatalk 2 Beta-5
    2
    Looks kinda stupid what is the point of this?

    new notifications center, new email client a million times better than the old one, new settings sporting two columns, 3d youtube, a way cooler camera and much more. take a look here. s2's dpi limit to kick it off is 128, thats small alright, doesn't mean though that a good dev cannot lower the treshold. and with this ALL devices out there will profit from. dont understand why people are always *****ing, hes trying to make your device better so what the heck is your problem. i'd LOVE to have it on mine...
    1
    Nobody with skills to make a compilation??? On nexus forum theres a big hype about this and here nobody gives a sh#t makes me want a nexus phone

    Sent from my GT-I9100 using Tapatalk 2 Beta-5