Parcourir la source

更新设备重启代码

weizhengliang il y a 2 ans
Parent
commit
c48de9fac8

+ 6 - 2
lcd_board/src/main/java/com/wdkl/lcd_board/helper/AppUpdateHelper.java

@@ -210,8 +210,12 @@ public class AppUpdateHelper {
     }
 
     public static void rebootDevice() {
-        Intent intent = new Intent("android.intent.action.reboot");
-        BaseApplication.appContext.sendBroadcast(intent);
+        if (Build.BOARD.equals("rk30sdk")) {
+            reboot(BaseApplication.appContext);
+        } else {
+            Intent intent = new Intent("android.intent.action.reboot");
+            BaseApplication.appContext.sendBroadcast(intent);
+        }
     }
 
     public static void restartApp(Context context) {