Skip to content

Commit

Permalink
Changed 判断手势导航是否开启逻辑调整
Browse files Browse the repository at this point in the history
  • Loading branch information
李福海 committed May 17, 2024
1 parent 38cf532 commit 006a761
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion module/src/main/java/com/lfh/custom/common/util/ScreenUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,16 @@ private static String getNavigationBarOverride() {
* @return true 表示使用的是手势,false 表示使用的是虚拟导航键(NavigationBar), 默认是false
*/
private static boolean navigationGestureEnabled(Context context) {
return 0 != Settings.Secure.getInt(context.getContentResolver(), getNavigationGlobalInfo(), 0);
String globalInfo = getNavigationGlobalInfo();
if (RomUtil.isHuawei() || RomUtil.isHonor() || RomUtil.isXiaomi()) {
return 0 != Settings.Global.getInt(context.getContentResolver(), globalInfo, 0);
}

if (RomUtil.isOppo() || RomUtil.isVivo()) {
return 0 != Settings.Secure.getInt(context.getContentResolver(), globalInfo, 0);
}

return 0 != Settings.Global.getInt(context.getContentResolver(), globalInfo, 0);
}

/**
Expand Down

0 comments on commit 006a761

Please sign in to comment.