Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,781,459 Members 37,956 Now Online
XDA Developers Android and Mobile Development Forum

Screensave while in landscape mode

Tip us?
 
Renate NST
Old
#1  
Renate NST's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 794
Posts: 1,971
Join Date: Feb 2012
Location: Boston
Smile Screensave while in landscape mode

If you use applications in landscape mode, you may have noticed this already.
When your Nook sleeps or is sent to sleep your normal portrait screensaver appears rotated, squished and with black borders.
Clearly, the Nook developers never anticipated that people would be using landscape mode.

I have a mod to /system/framework/services.jar to fix this.
If the graphic is either 600 x 800 or 800 x 600 it will put it in the orientation that fits.
If the graphic is 800 x 800 it will put it in the current orientation, centered at a scale of 1:1.

Since a lot of people seem to use a moded system.jar already it would have to be integrated in.

Is there interest in this?
The Following 2 Users Say Thank You to Renate NST For This Useful Post: [ Click to Expand ]
 
wheilitjohnny
Old
#2  
Member
Thanks Meter 31
Posts: 51
Join Date: Mar 2011
I am very interested!!
Can u share your mod?
 
Renate NST
Old
#3  
Renate NST's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 794
Posts: 1,971
Join Date: Feb 2012
Location: Boston
Well, with all the modded services.jar and various updates maybe posting the injected smali code?

Or is that too difficult/annoying?
 
mrWax
Old
#4  
Senior Member
Thanks Meter 19
Posts: 147
Join Date: Jan 2012
sounds great! but still I would prefer no-screen-saver mod. i.e. you can see you launcher widgets (calendar, task, time, battery) all the time. These s.s. pictures are quite antiproductive.
 
hshsh
Old
#5  
Member
Thanks Meter 5
Posts: 37
Join Date: Dec 2011
Location: Anzali
Renate NST . we are waiting !
 
Renate NST
Old
(Last edited by Renate NST; 23rd April 2012 at 12:55 PM.)
#6  
Renate NST's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 794
Posts: 1,971
Join Date: Feb 2012
Location: Boston
Ok, here goes. My apologies if this is complicated.
I didn't want to distribute B&N code or presume what mods where already in your services.jar

Code:
adb pull /system/framework/services.jar
apktool d services.jar \Services
Edit \Services\smali\com\android\server\PowerManagerSer vice.smali

parta.txt replaces 3 lines in the original that have to do with parse / move / setImageURI

Delete those lines and insert the file where the .line statements match.

You can leave both the comments in parta.txt and the .line statements there.

partb.txt gets inserted at the end of the file.

Code:
apktool b \Services services.jar
adb push services.jar /system/framework/
You probably want to clear the cache and reboot at that point.
Note: If you are using the standard slide unlock, the image placement code for that is in android.policy.jar
That defaults to portrait orientation. It is not affected by this mod.

Please tell me if this works for you.
The Following 2 Users Say Thank You to Renate NST For This Useful Post: [ Click to Expand ]
 
marspeople
Old
#7  
Member
Thanks Meter 97
Posts: 69
Join Date: Jul 2011
This is a nice idea. However, when you use book cover as screensaver via Cool Reader most of them aren't 800x600 images. The B&N default behavior is to resize to fit the screen (keep aspect ratio), but with your mod the picture appears at 1:1 scale (normally cropped). Would this be an easy fix?
 
Renate NST
Old
#8  
Renate NST's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 794
Posts: 1,971
Join Date: Feb 2012
Location: Boston
Quote:
Originally Posted by marspeople View Post
Would this be an easy fix?
Tomorrow.
 
Renate NST
Old
(Last edited by Renate NST; 23rd April 2012 at 05:57 PM.)
#9  
Renate NST's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 794
Posts: 1,971
Join Date: Feb 2012
Location: Boston
It's tomorrow.

I hope that I covered all the cases because more variants will require user configuration somewhere.
  • If the image is 600 x 800, 800 x 600 or an aspect ratio of 3:4 or 4:3 it will fit exactly.
  • If the image has another aspect ratio it will fit inside with side strips in white.
  • If the image is exactly square it will use the current orientation and overfill the screen.
In all cases the aspect ratio will be preserved and at least one axis will fit exactly.

When the lock screen with the slider pops up the image will not be consistent.
This is because B&N handled the screensaver image there separately.
I will be releasing a mod for android.policy.jar to fix that soon.
(Or you could switch to another screen locker.)

Install procedure same as above.
The Following 2 Users Say Thank You to Renate NST For This Useful Post: [ Click to Expand ]
 
Renate NST
Old
(Last edited by Renate NST; 23rd January 2013 at 12:58 AM.)
#10  
Renate NST's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 794
Posts: 1,971
Join Date: Feb 2012
Location: Boston
Ok, here's the one that fixes the lock screen too.

parta.txt and partb.txt are the same as they were.

partc.txt and partd.txt are for LockScreen inside android.policy.jar

Code:
adb pull /system/framework/android.policy.jar
apktool d android.policy.jar \Policy
Edit \Policy\smali\com\android\internal\policy\impl\Loc kScreen.smali

partc.txt replaces the entire updateBackgroundImage method.

partd.txt gets inserted at the end of the file.

Code:
apktool b \Policy android.policy.jar
adb push android.policy.jar /system/framework/
As always, be careful and backup.

(This is also in the readme file.)

Warning: This is only for Nook 1.12 and older, not for Nook 1.2 and newer.
Attached Files
File Type: zip LandMod.zip - [Click for QR Code] (4.2 KB, 31 views)

The Following 3 Users Say Thank You to Renate NST For This Useful Post: [ Click to Expand ]
Tags
landscape, screensaver
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes