Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

setRequestedOrientation in Activity class

$
0
0
To know the screen rotation implementation by pressing a button,

I wrote an app with two buttons to use setRequestedOrientation for triggering screen rotation.

I am trying to know the implementation of "setRequestedOrientation". Hence, I start tracing the code.

This is my code trace flow:

Activity.java(setRequestedOrientation)--->AcitivtyManagerNative(setRequestedOrientation)----> ActivityManagerService(setRequestedOrientation)

in ActivityManagerService setRequestedOrientation function, this will call WindowManagerService setAppOrientation and updateOrientationfromAppTokens two functions. I assume these two functions are rotation-related functions.

I got stuck here and have no clue to trace into the native layer.

I looked into the setAppOrientation function and it does have anything related to the native layer.

I then went to check updateOrientationfromAppTokens, i still did not find any clue about the native layer.:crying:

Could anyone give me a hint if you have any idea about this procedure.

Any reply is highly appreciated.

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>