Lollipop Leak for Sprint Galaxy S5, TWRP for Micromax Canvas Magnus – XDA TV

Android 5.0 Lollipop has been leaked for the Sprint … more

Velocity is Like OpenTable on Steroids

We all enjoy a night out with friends or our significant other from time to time. However, there is … more

Android Lollipop Lands for the Sony Xperia Z Ultra

The undisputed king of the beasts–at least in Sony’s current stable,is the … more

Android 5.0 Lollipop in 3D–EVO 3D, That Is!

It is that time of the year once again. Flowers bloom (or snow falls, depending on which … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[INFO] Palm Pre (Cards-Like) Thumbnails

OP Wysie

12th June 2010, 08:25 AM   |  #1  
OP Senior Member
Thanks Meter: 6
 
1,119 posts
Join Date:Joined: Jul 2009
Hi all,

@ruqqq (aka arctu, author of HelixLauncher) tweeted me a whole bunch of stuff this afternoon, and to be honest, this is 99% his credit, I only changed the required line in framework to help him test, so I get 1% :P. Anyway, @ruqqq did some searching online, and the one of most importance was this:

http://www.mail-archive.com/android-.../msg21135.html

After looking at the code, we simply uncommented the following line in ActivityThread.java:

Code:
//info.thumbnail = createThumbnailBitmap(r);
With it commented, it thumbnail will always be null, with it uncommented, well, we may be able to get actual thumbnails. @ruqqq then went on to write a quick (and ugly :P) app to find out if thumbnails of running apps can be retrieved, and the result is, yes, it can be retrieved. The screenshot I posted only shows 2 apps cause of the lack of ScrollView, but I believe he's writing a better proof-of-concept as we speak, while I'm rushing to go out once I end this post (else the girlfriend's fury :P).

Screenshot: http://twitpic.com/1w1p6t
New Screenshot (Still ugly :P): http://twitpic.com/1w1v6k

So what's the point of this post? Nothing, really. It's just that the commented line has apparently been in there as early as 1.5, but it was always commented out. We removed the comment, and it actually does return thumbnails. With this, it means that if future ROMs are compiled with that line uncommented, it will be possible to actually write apps to emulate/simulate the cards system, possibly even on a system level (by overriding the recent applications dialog).

That's all .

@ruqqq's concept app source: http://github.com/ruqqq/ActivityThum...pe-Application
framework source: Come on, it's just a line :P.
Last edited by Wysie; 12th June 2010 at 08:36 AM.
12th June 2010, 08:30 AM   |  #2  
chowlala's Avatar
Senior Member
Thanks Meter: 74
 
819 posts
Join Date:Joined: Jul 2009
Very interesting. Looking forward to seeing/hearing more! =)
12th June 2010, 08:30 AM   |  #3  
Senior Member
Thanks Meter: 1,252
 
526 posts
Join Date:Joined: Oct 2008
More
yay! experimentation succeed. :P

just to add on:

the idea is that third-party developers can implement this in their apps without any breaking codes. the api has always been official. if thumbnail doesn't exist, it returns a null. so, a dev simply has to write a code that checks for this property and carry out 'instructions' based on the availability of the thumbnail.

implications:

what we learn is that the reason they disabled the code is to prevent wasteage of resource (CPU and Mem) as the thumbnail code runs everytime the onPause of an activity is performed. This means that enabling it may or may not cause slowness in the system. Conclusion? Need extensive testing.
12th June 2010, 08:31 AM   |  #4  
Senior Member
Flag Richmond Hill,Ga
Thanks Meter: 0
 
142 posts
Join Date:Joined: Jun 2009
More
wow this is great news looking forward to seeing cards like on web os
12th June 2010, 08:32 AM   |  #5  
eViL D:'s Avatar
Retired Recognized Developer
Thanks Meter: 1,345
 
4,472 posts
Join Date:Joined: Jun 2006
Donate to Me
More
the wonders of Android!
12th June 2010, 08:35 AM   |  #6  
Daneshm90's Avatar
Recognized Developer
Thanks Meter: 637
 
3,309 posts
Join Date:Joined: Jun 2009
Pretty cool stuff. Perhaps you can make it so only if the app is running is that variable on and generating thumbnails ? Regardless cant wait for what developers do with this, im sensing the app taskos with live thumbnails it already has the fling up to end task.

Also to prevent this from being rom specific, maybe you could compare the hexcodes of 2 framework-res.apk's one with uncommented and one without, that way it could be added to any existing rom ?
Last edited by Daneshm90; 12th June 2010 at 08:39 AM.
12th June 2010, 08:40 AM   |  #7  
OP Senior Member
Thanks Meter: 6
 
1,119 posts
Join Date:Joined: Jul 2009
Daneshm90: This has to be baksmali/smali-ed in.. ^^
12th June 2010, 08:52 AM   |  #8  
johnnie93's Avatar
Senior Member
Flag Kuwait
Thanks Meter: 72
 
399 posts
Join Date:Joined: Apr 2009
More
Cyanogen Please Put this in you next ROM! Android is just awesome! thanks for the post!
12th June 2010, 08:53 AM   |  #9  
Daneshm90's Avatar
Recognized Developer
Thanks Meter: 637
 
3,309 posts
Join Date:Joined: Jun 2009
Re: [INFO] Palm Pre (Cards-Like) Thumbnails
Quote:

Daneshm90: This has to be baksmali/smali-ed in.. ^^

Is that even possible ? it doesnt have a classes.dex (Nvm, u have to push the classes.dex of framework.jar into framework-res and decompile)

can u give me a modded and unmodded framework-res ? just wanna do some digging
Last edited by Daneshm90; 12th June 2010 at 09:11 AM.
12th June 2010, 09:01 AM   |  #10  
jasrups's Avatar
Senior Member
Flag Winnipeg
Thanks Meter: 4
 
262 posts
Join Date:Joined: Sep 2009
More
Wow this has great potential!

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes