mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-05-02 06:26:20 -04:00
Initial implementation of allowing the user to reduce screen resolution to save power
This commit is contained in:
parent
cfaed310f1
commit
b3108b9e7f
5 changed files with 206 additions and 2 deletions
16
Misc/Scaling.txt
Normal file
16
Misc/Scaling.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
//frameworks/base/cmds/wm/src/com/android/commands/wm/Wm.java
|
||||
|
||||
IWindowManager mWm = IWindowManager.Stub.asInterface(ServiceManager.checkService(
|
||||
Context.WINDOW_SERVICE));
|
||||
|
||||
Point initialSize = new Point();
|
||||
Point baseSize = new Point();
|
||||
mWm.getInitialDisplaySize(Display.DEFAULT_DISPLAY, initialSize); //Get true size
|
||||
mWm.getBaseDisplaySize(Display.DEFAULT_DISPLAY, baseSize); //Get current size
|
||||
|
||||
mWm.setForcedDisplaySize(Display.DEFAULT_DISPLAY, w, h); //Set to custom size
|
||||
mWm.clearForcedDisplaySize(Display.DEFAULT_DISPLAY); //Reset to true size
|
||||
|
||||
1440*2560
|
||||
1080*1920
|
||||
720*1280
|
Loading…
Add table
Add a link
Reference in a new issue