Sony to Extend its AOSP Program to Other Devices

Sony will be offering its users the possibility to use AOSP ROMs as an alternative to the … more

Project Ara Smartphone Will Run Modified Android L with Hot Swapping

Project Ara is a very exciting topic–both for hardware and … more

Streamline Android Theme Customization with Graphic Porter

I dont have a custom theme on my Android phone, and the reason for this is because … more

Boost the Brightness of Your Sony Xperia Z1’s LED

I think the last time anyone has ever used a physical torch to find their earphones, … more
Post Reply

[INFO] Palm Pre (Cards-Like) Thumbnails

12th June 2010, 07: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 07:36 AM.
12th June 2010, 07:30 AM   |  #2  
chowlala's Avatar
Senior Member
Thanks Meter: 73
 
818 posts
Join Date:Joined: Jul 2009
Very interesting. Looking forward to seeing/hearing more! =)
12th June 2010, 07:30 AM   |  #3  
Senior Member
Thanks Meter: 1,247
 
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, 07: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, 07:32 AM   |  #5  
eViL D:'s Avatar
Retired Recognized Developer
Thanks Meter: 1,344
 
4,472 posts
Join Date:Joined: Jun 2006
Donate to Me
More
the wonders of Android!
12th June 2010, 07:35 AM   |  #6  
Daneshm90's Avatar
Recognized Developer
Thanks Meter: 636
 
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 07:39 AM.
12th June 2010, 07: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, 07: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, 07:53 AM   |  #9  
Daneshm90's Avatar
Recognized Developer
Thanks Meter: 636
 
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 08:11 AM.
12th June 2010, 08: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