android一些简单配置修改(3)

android的启动动画旋转180

sd1/NXP/VT-SBC-BIOL/frameworks/base$ git diff .
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index cdd80150f19..53caddca450 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -391,7 +391,7 @@ status_t BootAnimation::readyToRun() {
 
     SurfaceComposerClient::Transaction t;
     Rect displayRect(resolution.getWidth(),resolution.getHeight());
-    t.setDisplayProjection(mDisplayToken, ui::ROTATION_0, displayRect, displayRect);
+    t.setDisplayProjection(mDisplayToken, ui::ROTATION_180, displayRect, displayRect);
 
     // this guest property specifies multi-display IDs to show the boot animation
     // multiple ids can be set with comma (,) as separator, for example:
@@ -1259,7 +1259,7 @@ void BootAnimation::handleViewport(nsecs_t timestep) {
         SurfaceComposerClient::Transaction t;
         t.setPosition(mFlingerSurfaceControl, 0, -mTargetInset)
                 .setCrop(mFlingerSurfaceControl, Rect(0, mTargetInset, mWidth, mHeight));
-        t.setDisplayProjection(mDisplayToken, ui::ROTATION_0, layerStackRect, displayRect);
+        t.setDisplayProjection(mDisplayToken, ui::ROTATION_180, layerStackRect, displayRect);
         t.apply();

android的界面旋转180(有问题,清理后台是反向显示的)

diff --git a/services/core/java/com/android/server/wm/DisplayRotation.java b/services/core/java/com/android/server/wm/DisplayRotation.java
index 1284e009ee3..e8d31fff84d 100644
--- a/services/core/java/com/android/server/wm/DisplayRotation.java
+++ b/services/core/java/com/android/server/wm/DisplayRotation.java
@@ -120,7 +120,7 @@ public class DisplayRotation {
      * @see #updateRotationUnchecked
      */
     @Surface.Rotation
-    private int mRotation;
+    private int mRotation = 2;
 
     @VisibleForTesting
     int mLandscapeRotation;  // default landscape
@@ -351,7 +351,7 @@ public class DisplayRotation {
 
     @Surface.Rotation
     int getRotation() {
-        return mRotation;
+        return 2;
     }

rockchip的会有一个对应的宏在device目录下

./BoardConfig.mk:#0:   ROTATION_NONE      ORIENTATION_0  : 0
./BoardConfig.mk:#90:  ROTATION_RIGHT     ORIENTATION_90 : 90
./BoardConfig.mk:#180: ROTATION_DOWN    ORIENTATION_180: 180
./BoardConfig.mk:#270: ROTATION_LEFT    ORIENTATION_270: 270
./BoardConfig.mk:TARGET_RECOVERY_DEFAULT_ROTATION ?= ROTATION_NONE

这里就说明他可以修改对应的结果进行一个旋转。而nxp的没有这个宏

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

永不秃头的程序员

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值