View Single Post
Old 01-30-2012, 03:35 PM   #19
hberntsen
Member
hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.
 
Posts: 10
Karma: 1358
Join Date: Jan 2012
Device: PRS-T1
Thank you m3l7d0wN and robyshot.

I've also dug in the framework, webbrowser and pictureviewer and I found something relevant to this topic.

In the webbrowser(WebView):
Code:
    private static final int UPDATE_MODE_A2 = 5;
    private static final int UPDATE_MODE_AUTO = 4;
    private static final int UPDATE_MODE_GC16 = 34;
In the picture viewer(PictureCommonView):
Code:
    public static final int UPDATE_MODE_NOWAIT_A2 = 1061;
    public static final int UPDATE_MODE_NOWAIT_DU = 1;
    public static final int UPDATE_MODE_NOWAIT_GC16 = 34;
    public static final int UPDATE_MODE_WAIT_A2 = 1125;
    public static final int UPDATE_MODE_WAIT_DU = 65;
    public static final int UPDATE_MODE_WAIT_GC16 = 98;
In the framework, view/View
Code:
    public static final int EINK_AUTO_MODE_AUTOMATIC = 16;
    public static final int EINK_AUTO_MODE_MASK = 16;
    public static final int EINK_AUTO_MODE_REGIONAL = 0;
    public static final int EINK_COMBINE_MODE_COMBINE = 128;
    public static final int EINK_COMBINE_MODE_MASK = 128;
    public static final int EINK_COMBINE_MODE_NOCOMBINE = 0;
    public static final int EINK_CONVERT_MODE_CONVERT = 1024;
    public static final int EINK_CONVERT_MODE_MASK = 1024;
    public static final int EINK_CONVERT_MODE_NOCONVERT = 0;
    public static final int EINK_DITHER_MODE_DITHER = 256;
    public static final int EINK_DITHER_MODE_MASK = 256;
    public static final int EINK_DITHER_MODE_NODITHER = 0;
    public static final int EINK_INVERT_MODE_INVERT = 512;
    public static final int EINK_INVERT_MODE_MASK = 512;
    public static final int EINK_INVERT_MODE_NOINVERT = 0;
    public static final int EINK_UPDATE_MODE_FULL = 32;
    public static final int EINK_UPDATE_MODE_MASK = 32;
    public static final int EINK_UPDATE_MODE_PARTIAL = 0;
    public static final int EINK_WAIT_MODE_MASK = 64;
    public static final int EINK_WAIT_MODE_NOWAIT = 0;
    public static final int EINK_WAIT_MODE_WAIT = 64;
    public static final int EINK_WAVEFORM_MODE_ANIM = 5;
    public static final int EINK_WAVEFORM_MODE_AUTO = 4;
    public static final int EINK_WAVEFORM_MODE_DU = 1;
    public static final int EINK_WAVEFORM_MODE_GC16 = 2;
    public static final int EINK_WAVEFORM_MODE_GC4 = 3;
    public static final int EINK_WAVEFORM_MODE_INIT = 0;
    public static final int EINK_WAVEFORM_MODE_MASK = 15;
All these constants seem to relate to the updatemode of the screen. I think it is some kind of bitfield, the UPDATE_MODE_WAIT_GC16 is a combination of EINK_WAVEFORM_MODE_GC16 + EINK_WAIT_MODE_WAIT + EINK_UPDATE_MODE_FULL

To try the different modes, I used this tutorial to create an app where i could scroll some images. I edited the EinkListView into it and included the source as an attachment to this post(IconizedListView.zip).

I've tried differend modes, but could not find a mode where the scrolling is as smooth as the 'no-refresh mode' and the screen is greyscale instead of black and white(maybe someone else can?).

I looked around in the framework and I saw that once you call methods like invalidate() without the updatemode argument, the updatemode automatically got set to 4, which makes the screen keep flashing when you scroll. I changed that value to 3 at various placed and that helped! It looks like my changes only affect scrolling things, like adwlauncher or a web page in readitlater. Things like launching an app, pulling down the status bar, a popup still refresh the screen. Maybe the updatemode needs to be changed from 4 to 3 at more places in the code.

I edited the framework.jar/framework.dex with this tutorial. I included my changes/updated framework in framework.rar.

This is a video showing my hack and app from my previous post:


About the framework.rar file: The root contains the original files from my device at version 1.0.00.09010. The folder "framework files currently on my device" contains the edited files you can put on your device.
Attached Files
File Type: zip IconizedListView.zip (87.4 KB, 630 views)
File Type: rar framework.rar (17.61 MB, 632 views)

Last edited by hberntsen; 02-09-2012 at 06:35 AM.
hberntsen is offline   Reply With Quote