From dc9d323f4c7cc25606375b6d999ac461d412562b Mon Sep 17 00:00:00 2001 From: duqingquan Date: Wed, 19 Apr 2023 12:11:10 +0800 Subject: [PATCH] =?UTF-8?q?nativepage=20=E9=83=A8=E5=88=86=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../utssdk/app-android/DoAppWidget.uts | 6 +++--- .../utssdk/app-android/index.uts | 20 +++++++++---------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts b/uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts index cce5876..446dc71 100644 --- a/uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts +++ b/uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts @@ -19,7 +19,7 @@ export class DoAppWidget extends AppWidgetProvider { appWidgetManager: AppWidgetManager, appWidgetIds: IntArray ):void{ - console.log("dqqdo", "周期更新函数被触发") + console.log("周期更新函数被触发") // There may be multiple widgets active, so update all of them for (appWidgetId in appWidgetIds) { updateAppWidget(context, appWidgetManager, appWidgetId) @@ -28,12 +28,12 @@ export class DoAppWidget extends AppWidgetProvider { override onEnabled(_context: Context):void{ // Enter relevant functionality for when the first widget is created - console.log("dqqdo", "桌面组件被添加") + console.log("桌面组件被添加") } override onDisabled(_context: Context):void{ // Enter relevant functionality for when the last widget is disabled - console.log("dqqdo", "桌面组件被移除") + console.log("桌面组件被移除") } } diff --git a/uni_modules/uts-nativepage/utssdk/app-android/index.uts b/uni_modules/uts-nativepage/utssdk/app-android/index.uts index 43c745b..dfc3ed2 100644 --- a/uni_modules/uts-nativepage/utssdk/app-android/index.uts +++ b/uni_modules/uts-nativepage/utssdk/app-android/index.uts @@ -23,10 +23,7 @@ import { import Service from 'android.app.Service'; import System from 'java.lang.System'; -import Looper from 'android.os.Looper'; -import Class from 'java.lang.Class'; import Exception from 'java.lang.Exception'; -import PackageManager from 'android.content.pm.PackageManager'; import ResolveInfo from 'android.content.pm.ResolveInfo'; import RecyclerView from 'androidx.recyclerview.widget.RecyclerView'; import TextView from 'android.widget.TextView'; @@ -195,9 +192,10 @@ class CustomThread extends Thread{ class FruitAdapter extends RecyclerView.Adapter{ - mFruitList: Array + mFruitList: Array = [] constructor(param:Array){ + super() mFruitList = param } @@ -240,24 +238,24 @@ class DemoActivity extends Activity{ super.onCreate(savedInstanceState) this.setContentView(R.layout.demo_activity); - let btn_start_service_front = findViewById