Display Settings Orientation when the device has no Accelero/Gyro ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Display Settings Orientation when the device has no Accelero/Gyro ?

ソリューションへジャンプ
2,595件の閲覧回数
matthiasbloch
Contributor I

Dear All,

I have a question.

I customized Android 4.0 (based Freescale 13.4.1) on a device that has no Accelero/Gyro. This device is used by customer as a Digital Signage Player and thus can be used as Landscape, Portrait, Reverse Landscape, Reverse Portrait, that can be configured. The thing is no to compile again Android to change the orientation.

In the Android Display Settings, there is the Auto-Rotate Screen that lock or release the rotation. What happened if I want to setup the orientation/rotation by another menu ?

To be honest I tried without any success. I tried to copy of Font Size settings.

For the moment, I did:

In ~/myandroid/packages/apps/Settings

     - res/values/arrays.xml & res/values/strings.xml Add string names and values for the 4 orientations I want.

     - res/xml/display_settings.xml The menu itself

     - src/com/android/settings/DisplaySettings.java copy on Font Size Settings

Based on that, the configuration is changing but no orientation occured. There is something missing between the menu and the action itself.

I tried also try to make a rotation by using Auto-Rotate parameter hack. No luck.

     - The Auto-Rotate used freezeRotation and ThawRotation (

./frameworks/base/services/java/com/android/server/wm/WindowManagerService.java)

     and there is also rotationForOrientationLw

(frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

)

Do you have any idea how to do this ?

Thanks.

BR

Matthias

ラベル(2)
0 件の賞賛
返信
1 解決策
1,067件の閲覧回数
matthiasbloch
Contributor I

After searching for one month.

I have the idea that work with me: use USER_ROTATION parameter.

- Change it in the Display Settings

     In ~/myandroid/packages/apps/Settings

          - res/values/arrays.xml & res/values/strings.xml Add string names and values for the 4 orientations I want.

          - res/xml/display_settings.xml The menu itself

          - src/com/android/settings/DisplaySettings.java

- Use USER_ROTATION in the frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java at the end of rotationForOrientationLw

BR.

Matthias

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,068件の閲覧回数
matthiasbloch
Contributor I

After searching for one month.

I have the idea that work with me: use USER_ROTATION parameter.

- Change it in the Display Settings

     In ~/myandroid/packages/apps/Settings

          - res/values/arrays.xml & res/values/strings.xml Add string names and values for the 4 orientations I want.

          - res/xml/display_settings.xml The menu itself

          - src/com/android/settings/DisplaySettings.java

- Use USER_ROTATION in the frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java at the end of rotationForOrientationLw

BR.

Matthias

0 件の賞賛
返信