美文网首页
Android Framework之默认禁止自动旋屏

Android Framework之默认禁止自动旋屏

作者: h4de5 | 来源:发表于2018-06-15 14:16 被阅读26次
    -    <bool name="config_allowAllRotations">true</bool>
    +    <bool name="config_allowAllRotations">false</bool>
    
         public static boolean isCameraDoubleTapPowerSettingEnabled(Context context, int userId) {
             return isCameraDoubleTapPowerEnabled(context.getResources())
                     && (Settings.Secure.getIntForUser(context.getContentResolver(),
    -                        Settings.Secure.CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED, 0, userId) == 0);
    +                        Settings.Secure.CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED, 1, userId) == 0);
         }
    

    相关文章

      网友评论

          本文标题:Android Framework之默认禁止自动旋屏

          本文链接:https://www.haomeiwen.com/subject/bbqmeftx.html