From 6ffa12165dc1d14fa0b85ce57c43b8dce4dfcd70 Mon Sep 17 00:00:00 2001 From: SuperMonster003 Date: Sat, 14 Mar 2026 20:55:01 +0800 Subject: [PATCH] =?UTF-8?q?6.7.0=20-=20Alpha23=20-=20=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?floaty.rawWindow=20=E5=9B=A0=E4=BC=A0=E5=85=A5=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84=E4=B8=8A=E4=B8=8B=E6=96=87=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=8E=A7=E4=BB=B6=E6=98=BE=E7=A4=BA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changelog/lang_zh-Hans.json | 1 + .../java/org/autojs/autojs/core/floaty/RawWindow.kt | 12 ++++++++---- .../java/org/autojs/autojs/runtime/api/Floaty.kt | 5 ++--- version.properties | 6 +++--- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.changelog/lang_zh-Hans.json b/.changelog/lang_zh-Hans.json index 5185bd0c..cdc44c55 100644 --- a/.changelog/lang_zh-Hans.json +++ b/.changelog/lang_zh-Hans.json @@ -63,6 +63,7 @@ "isJavaClass/isJavaPackage 等全局方法无效的问题", "timers.keepAlive 方法 timeout 参数功能无效的问题", "floaty.window/rawWindow 方法无法接受字符串参数的问题 _[`issue #467`](http://issues.autojs6.com/467)_", + "floaty.rawWindow 因传入错误的上下文导致部分控件显示异常的问题", "util.isString 方法无效的问题", "util.class[Name]/getClass[Name] 可能返回错误结果的问题", "util.java.array 无法正常使用 Boolean 等类型参数的问题", diff --git a/app/src/main/java/org/autojs/autojs/core/floaty/RawWindow.kt b/app/src/main/java/org/autojs/autojs/core/floaty/RawWindow.kt index f89ef67e..0372e411 100644 --- a/app/src/main/java/org/autojs/autojs/core/floaty/RawWindow.kt +++ b/app/src/main/java/org/autojs/autojs/core/floaty/RawWindow.kt @@ -1,5 +1,6 @@ package org.autojs.autojs.core.floaty +import android.content.Context import android.graphics.PixelFormat import android.view.Gravity import android.view.View @@ -18,7 +19,10 @@ import org.autojs.autojs6.R * Modified by SuperMonster003 as of Mar 27, 2022. * Transformed by SuperMonster003 on Mar 27, 2022. */ -class RawWindow(private val supplier: BaseResizableFloatyWindow.ViewSupplier) : FloatyWindow() { +class RawWindow( + private val context: Context, + private val supplier: BaseResizableFloatyWindow.ViewSupplier, +) : FloatyWindow() { private val mInflateException = VolatileDispose() @@ -35,8 +39,8 @@ class RawWindow(private val supplier: BaseResizableFloatyWindow.ViewSupplier) : } override fun onCreateView(floatyService: FloatyService): View { - val windowView = View.inflate(floatyService, R.layout.raw_window, null) as ViewGroup - contentView = supplier.inflate(floatyService, windowView) + val windowView = View.inflate(context, R.layout.raw_window, null) as ViewGroup + contentView = supplier.inflate(context, windowView) return windowView } @@ -83,4 +87,4 @@ class RawWindow(private val supplier: BaseResizableFloatyWindow.ViewSupplier) : updateWindowLayoutParams(this) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/autojs/autojs/runtime/api/Floaty.kt b/app/src/main/java/org/autojs/autojs/runtime/api/Floaty.kt index 676fb4fc..4092cfe4 100644 --- a/app/src/main/java/org/autojs/autojs/runtime/api/Floaty.kt +++ b/app/src/main/java/org/autojs/autojs/runtime/api/Floaty.kt @@ -177,7 +177,7 @@ class Floaty(private val uiHandler: UiHandler, private val scriptRuntime: Script init { val context = uiHandler.applicationContext - val window = RawWindow(supplier).also { mWindow = it } + val window = RawWindow(mContext, supplier).also { mWindow = it } val r = Runnable { context.startService(Intent(context, FloatyService::class.java)) FloatyService.addWindow(window) @@ -332,5 +332,4 @@ class Floaty(private val uiHandler: UiHandler, private val scriptRuntime: Script } } } - -} \ No newline at end of file +} diff --git a/version.properties b/version.properties index f0d2e882..e9157182 100644 --- a/version.properties +++ b/version.properties @@ -1,5 +1,5 @@ -#Thu Mar 12 21:00:26 CST 2026 -BUILD_TIME=1773320426437 +#Sat Mar 14 20:10:59 CST 2026 +BUILD_TIME=1773490259819 COMPILE_SDK_VERSION=36 IMAGE_QUANT_CMAKE_VERSION=3.22.1 IMAGE_QUANT_NDK_VERSION=26.1.10909125 @@ -27,6 +27,6 @@ RAPID_OCR_OPENCV_MOBILE_LABEL_VERSION=13 RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3 TARGET_SDK_VERSION=36 TARGET_SDK_VERSION_INRT=29 -VERSION_BUILD=3803 +VERSION_BUILD=3804 VERSION_NAME=6.7.0 Alpha23 VSCODE_EXT_REQUIRED_VERSION=1.0.13