diff --git a/uni_modules/uts-advance/utssdk/app-android/index.uts b/uni_modules/uts-advance/utssdk/app-android/index.uts index ac740bb23ec0fa7b09c17a18a585ccf29157705d..342bb34507e55223730f360d60f924a9ff6aaa73 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 391123ba011917c5d2efc5ec299f775618bfcb83..b3a65d1bab71f50db528f2a24ff68f81775cb63c 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