From 659791442f891d85bdedf30b069a66106482dd91 Mon Sep 17 00:00:00 2001 From: duqingquan Date: Fri, 25 Nov 2022 15:23:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E6=9C=80=E6=96=B0=E7=9A=84?= =?UTF-8?q?=20android=20=E5=86=85=E7=BD=AE=E5=BA=93=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uts-advance/utssdk/app-android/index.uts | 2 +- uni_modules/uts-getbatteryinfo/utssdk/app-android/index.uts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/uni_modules/uts-advance/utssdk/app-android/index.uts b/uni_modules/uts-advance/utssdk/app-android/index.uts index ac740bb..342bb34 100644 --- a/uni_modules/uts-advance/utssdk/app-android/index.uts +++ b/uni_modules/uts-advance/utssdk/app-android/index.uts @@ -84,7 +84,7 @@ export function clearIntervalTask(taskId:number) { * 实现一个添加view的 Runnable类 * 用法说明:https://uniapp.dcloud.net.cn/plugin/uts-plugin.html#%E5%8C%BF%E5%90%8D%E5%86%85%E9%83%A8%E7%B1%BB */ -class AddUIRunnable extends Runnable { +class AddUIRunnable implements Runnable { override run():void { diff --git a/uni_modules/uts-getbatteryinfo/utssdk/app-android/index.uts b/uni_modules/uts-getbatteryinfo/utssdk/app-android/index.uts index 391123b..b3a65d1 100644 --- a/uni_modules/uts-getbatteryinfo/utssdk/app-android/index.uts +++ b/uni_modules/uts-getbatteryinfo/utssdk/app-android/index.uts @@ -1,6 +1,6 @@ import Context from "android.content.Context"; import BatteryManager from "android.os.BatteryManager"; -import { getAppContext } from "io.dcloud.uts.android"; +import { UTSAndroid } from "io.dcloud.uts"; type GetBatteryInfoOptions = { @@ -10,7 +10,7 @@ type GetBatteryInfoOptions = { } export default function getBatteryInfo(options: GetBatteryInfoOptions) { - const context = getAppContext(); + const context = UTSAndroid.getAppContext(); if (context != null) { const manager = context.getSystemService( Context.BATTERY_SERVICE -- GitLab