I am wondering if I can change the device's orienation (respecting respective app policies) using IWindowManager service's setRotation. I am not going to issue this from application layer, instead there is a requirement to change the device orientation (to either lands开发者_如何学JAVAcape / portrait) from frameworks layer itself.
Therefore in order to achieve this, I have written a C utility daemon which calls my java code using Binder IPC mechanism to invoke my service's exposed method (lets call it myfunc() )
In myfunc, I have something as follows:-
IWindowManager.Stub.asInterface(ServiceManager.getService
("window")).setRotation(0,true,0)
But it looks like the device orientation is not changed. Any suggestions please / inputs?
Thanks,
精彩评论