{"id":824,"date":"2025-01-25T10:48:49","date_gmt":"2025-01-25T02:48:49","guid":{"rendered":"https:\/\/iichen.cn\/?p=824"},"modified":"2025-01-25T10:48:49","modified_gmt":"2025-01-25T02:48:49","slug":"android-%e6%b8%b8%e6%88%8f%e5%b0%8f%e7%aa%97%e6%a8%a1%e5%bc%8f","status":"publish","type":"post","link":"https:\/\/iichen.cn\/?p=824","title":{"rendered":"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u901a\u8fc7\u83b7\u53d6\u5f53\u524d\u9876\u5c42Activity\u7684DecorView\u53bb\u6839\u636e\u89c4\u5219\u67e5\u627e\u76ee\u6807View\uff0c\u5982\uff1aSurfaceView\/GlSurfaceView\/WebView\/\u6307\u5b9a\u7c7b\u540dView\u7b49\uff0c\u6700\u7ec8\u5c06\u5176\u4ece\u7236\u5bb9\u5668remove\u6dfb\u52a0\u5230\u60ac\u6d6e\u7a97\u5185<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">1. \u60ac\u6d6e\u7a97View<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">WindowManager\u8bbe\u7f6e\u5168\u5c40\u60ac\u6d6e\u7a97<\/h3>\n\n\n\n<pre class=\"wp-block-code language-dart lines-number has-small-font-size\"><code>open var params: WindowManager.LayoutParams = WindowManager.LayoutParams().apply {\n        type = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) TYPE_APPLICATION_OVERLAY\n        else TYPE_PHONE\n        format = PixelFormat.RGBA_8888\n        gravity = Gravity.START or Gravity.TOP\n        \/\/ \u8bbe\u7f6e\u6d6e\u7a97\u4ee5\u5916\u7684\u89e6\u6478\u4e8b\u4ef6\u53ef\u4ee5\u4f20\u9012\u7ed9\u540e\u9762\u7684\u7a97\u53e3\u3001\u4e0d\u81ea\u52a8\u83b7\u53d6\u7126\u70b9\n        flags =\n            FLAG_NOT_TOUCH_MODAL or FLAG_NOT_FOCUSABLE or FLAG_LAYOUT_NO_LIMITS or FLAG_NOT_FOCUSABLE or\n                    WindowManager.LayoutParams.FLAG_FULLSCREEN or\n                    WindowManager.LayoutParams.FLAG_IGNORE_CHEEK_PRESSES or\n                    WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN\n        width = WRAP_CONTENT\n        height = WRAP_CONTENT\n        softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;\n        systemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION or\n                View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY or View.SYSTEM_UI_FLAG_FULLSCREEN\n    }\n    open var windowManager: WindowManager =\n        GmLifecycleUtils.application.getSystemService(Service.WINDOW_SERVICE) as WindowManager<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u521d\u59cb\u5316\u5904\u7406<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u83b7\u53d6\u5c4f\u5e55\u5c3a\u5bf8\u4fe1\u606f\u4ee5\u53ca\u6e38\u620f\u7684\u6a2a\u7ad6\u5c4f\u6765\u521d\u59cb\u5316\u5c0f\u7a97\u7684\u6700\u5c0f\u548c\u6700\u5927\u5c3a\u5bf8<\/p>\n\n\n\n<pre class=\"wp-block-code language-dart lines-number has-small-font-size\"><code>minW = if (orientation == 1) {\n\t\tDisplayUtils.getScreenWidth(context) \/ 4F + sideGameIconWidth\n\t} else {\n\t\tDisplayUtils.getScreenHeight(context) \/ 1.8F + sideGameIconWidth\n\t}\n\tminH = if (orientation == 1) {\n\t\t(minW - sideGameIconWidth) * 2f\n\t} else {\n\t\t(minW - sideGameIconWidth) \/ 2.3F\n\t}\n\t\nprivate fun initMaxWH() {\n\tmaxW = if (orientation == 1) {\n\t\tDisplayUtils.getScreenWidth(context) \/ 2f + sideGameIconWidth\n\t} else {\n\t\tDisplayUtils.getScreenHeight(context) * 1.0F + sideGameIconWidth\n\t}\n\tmaxH = if (orientation == 1) {\n\t\t(maxW - sideGameIconWidth) * 2f\n\t} else {\n\t\t(maxW - sideGameIconWidth) \/ 2.3F\n\t}\n}<\/code><\/pre>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">Touch\u4e8b\u4ef6\u5904\u7406<\/h3>\n\n\n\n<pre class=\"wp-block-code language-dart lines-number has-small-font-size\"><code>mContentView.touchListener = object : GmOnFloatTouchListener {\n\toverride fun onTouch(event: MotionEvent): Boolean {\n\t\tif (event.pointerCount == 2) {\n\t\t\tif (handlerType == 0 || handlerType == 2) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif (scaleGestureDetector == null) {\n\t\t\t\tscaleGestureDetector = ScaleGestureDetector(context, ScaleListener())\n\t\t\t}\n\t\t\tisScaling = true\n\t\t\treturn scaleGestureDetector?.onTouchEvent(event) ?: false\n\t\t} else if (event.pointerCount > 2) {\n\t\t} else {\n\t\t\tif (isScaling) {\n\t\t\t\tif (event.action == 1) {\n\t\t\t\t\tisScaling = false\n\t\t\t\t\thandlerUpEvent()\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhen (event.action and MotionEvent.ACTION_MASK) {\n\t\t\t\t\tMotionEvent.ACTION_DOWN -> {\n\t\t\t\t\t\tisNeedHandleUnMoveEventAndDone = false\n\t\t\t\t\t\tlastX = event.rawX\n\t\t\t\t\t\tlastY = event.rawY\n\t\t\t\t\t}\n\n\t\t\t\t\tMotionEvent.ACTION_MOVE -> {\n\t\t\t\t\t\tval rawX: Float = event.rawX\n\t\t\t\t\t\tval rawY: Float = event.rawY\n\t\t\t\t\t\tval dx: Float = rawX - lastX\n\t\t\t\t\t\tval dy: Float = rawY - lastY\n\n\t\t\t\t\t\tval (w, h) = getRealWH()\n\n\t\t\t\t\t\tif (dx * dx + dy * dy &lt; 81) return false\n\t\t\t\t\t\tisNeedHandleUnMoveEventAndDone = true\n\n\t\t\t\t\t\tvar x = params.x + dx.toInt()\n\t\t\t\t\t\tvar y = params.y + dy.toInt()\n\t\t\t\t\t\t\/\/ \u8fb9\u754c\u4fee\u6b63\n\t\t\t\t\t\tval mViewW = mContentView.measuredWidth\n\t\t\t\t\t\tval mViewH = mContentView.measuredHeight\n\t\t\t\t\t\tif (x &lt; -mViewW) {\n\t\t\t\t\t\t\tx = -mViewW\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (x > w + mViewW) {\n\t\t\t\t\t\t\tx = w + mViewW\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (y &lt;= 0) {\n\t\t\t\t\t\t\ty = 0\n\t\t\t\t\t\t}\n\t\t\t\t\t\tval bottomBorder = h - mViewH\n\t\t\t\t\t\tif (y >= bottomBorder) {\n\t\t\t\t\t\t\ty = bottomBorder\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tparams.x = x\n\t\t\t\t\t\tparams.y = y\n\t\t\t\t\t\twindowManager.updateViewLayout(mContentView, params)\n\t\t\t\t\t\t\/\/ \u66f4\u65b0\u4e0a\u6b21\u89e6\u6478\u70b9\u7684\u6570\u636e\n\t\t\t\t\t\tlastX = event.rawX\n\t\t\t\t\t\tlastY = event.rawY\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\n\t\t\t\t\tMotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {\n\t\t\t\t\t\thandlerUpEvent()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false\n\t}\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u7f29\u653e\u4e8b\u4ef6\u5904\u7406<\/h3>\n\n\n\n<pre class=\"wp-block-code language-dart lines-number has-small-font-size\"><code>private inner class ScaleListener : ScaleGestureDetector.SimpleOnScaleGestureListener() {\n\toverride fun onScale(detector: ScaleGestureDetector): Boolean {\n\t\tscaleFactor *= detector.scaleFactor\n\t\tscaleFactor = scaleFactor.coerceIn(0.8f, 1.2f)\n\n\t\tval currentWidth = mContentView.width\n\t\tval currentHeight = mContentView.height\n\n\t\t\/\/ \u8ba1\u7b97\u65b0\u7684\u5bbd\u9ad8\uff0c\u5e76\u786e\u4fdd\u5b83\u4eec\u5728\u6700\u5c0f\u548c\u6700\u5927\u503c\u4e4b\u95f4\n\t\tval newWidth = (currentWidth * scaleFactor).coerceIn(minW, maxW).toInt()\n\t\tval newHeight = if (orientation == 1) {\n\t\t\t((newWidth - sideGameIconWidth) * 2f).coerceIn(minH, maxH).toInt()\n\t\t} else {\n\t\t\t((newWidth - sideGameIconWidth) \/ 2.3F).coerceIn(minH, maxH).toInt()\n\t\t}\n\n\t\t\/\/ \u8ba1\u7b97\u5bbd\u9ad8\u53d8\u5316\u91cf\n\t\tval dx = (newWidth - currentWidth) \/ 2\n\t\tval dy = (newHeight - currentHeight) \/ 2\n\n\t\t\/\/ \u66f4\u65b0 LayoutParams \u7684\u5bbd\u9ad8\n\t\tparams.width = newWidth\n\t\tparams.height = newHeight\n\n\/\/            \/\/ \u8c03\u6574 x \u548c y \u4ee5\u4fdd\u6301\u4e2d\u5fc3\u4f4d\u7f6e\n\t\tparams.x -= dx\n\t\tparams.y -= dy\n\n\t\t\/\/ \u66f4\u65b0\u89c6\u56fe\u5e03\u5c40\n\t\twindowManager.updateViewLayout(mContentView, params)\n\t\treturn true\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">ConfigurationChanged\u5904\u7406<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u5f53\u624b\u673a\u6a2a\u7ad6\u5c4f\u5207\u6362\u6216\u4e0d\u540c\u7684\u6a2a\u7ad6\u5c4f\u6e38\u620f \u5c0f\u7a97\u9700\u8981\u81ea\u9002\u5e94\u8df3\u8f6c\u6a2a\u5c4f\u548c\u7ad6\u5c4f\u7684\u72b6\u6001<\/p>\n\n\n\n<pre class=\"wp-block-code language-dart lines-number has-small-font-size\"><code>override fun onConfigurationChanged(newConfiguration: Configuration) {\n\tvar w = DisplayUtils.getScreenWidth(context)\n\tvar h = DisplayUtils.getScreenHeight(context)\n\t\/\/ \u5782\u76f41 \u6c34\u5e732\n\n\tGameHelperInnerLog.d(\"iichen\", \">>>>>>>>>>>>>>>>>onConfigurationChanged \u56de\u8c03\uff1a$w $h  getOrientation: ${getOrientation()} orientation: $orientation lastOrientation:$lastOrientation\")\n\tif (getOrientation() != lastOrientation) {\n\t\tgetRealWH().apply {\n\t\t\tw = first\n\t\t\th = second\n\t\t}\n\n\t\tlastOrientation = getOrientation()\n\t\tval viewW = mContentView.measuredWidth\n\t\tval viewH = mContentView.measuredHeight\n\t\t\/\/ \u8ba1\u7b97mContent \u5bbd\u5ea6\u548c\u9ad8\u5ea6\u76f8\u5bf9\u4e8e\u4e4b\u524d\u7684\u6bd4\u4f8b\n\n\t\t\/\/ \u6a2a\u5c4f\u53d8\u7ad6\u5c4f\n\t\t\/\/ \u5982\u679c\u662f\u6298\u53e0\u7684\n\t\tif (handlerType == 0) {\n\t\t\tparams.x = 0\n\t\t\thandlerType = -1\n\t\t\thideAdhesion()\n\t\t} else if (handlerType == 2) {\n\t\t\thandlerType = -1\n\t\t\thandlerUpEvent()\n\t\t}\n\n\t\t\/\/ \u5bbd\u9ad8\u4e0d\u662f\u4e4b\u524d\u7684\u4e86 \u9700\u8981\u53d6\u53cd \u53bb\u8ba1\u7b97\u4e4b\u524d\u7684\u76f8\u5bf9\u6bd4\u4f8b\n\t\tval rationX = params.x * 1.0 \/ h\n\t\tval rationY = params.y * 1.0 \/ w\n\n\t\t\/\/ \u65b0\u7684x\n\t\tparams.x = ceil((w - viewW) * rationX).toInt()\n\n\t\t\/\/ \u5904\u7406\u4e0a\u7aef\u8ddd\u79bb params.y\n\t\t\/\/ \u65b0\u7684x\n\t\tparams.y = ceil((h - viewH) * rationY).toInt()\n\n\t\tGameHelperInnerLog.d(\"iichen\", \">>>>>>>>>>>>>>>>>onConfigurationChanged handler\uff1a$w $h rationX:$rationX rationY:$rationY params.x: ${params.x} params.y: ${params.x}\")\n\t\twindowManager.updateViewLayout(mContentView, params)\n\t}\n}\n\nprivate fun getOrientation() : Int {\n\treturn when (windowManager.defaultDisplay.rotation) {\n\t\tSurface.ROTATION_0 -> 1 \/\/ \u81ea\u7136\u65b9\u5411\n\t\tSurface.ROTATION_90 -> 2 \/\/ \u987a\u65f6\u9488 90 \u5ea6\n\t\tSurface.ROTATION_180 -> 1 \/\/ \u987a\u65f6\u9488 180 \u5ea6\n\t\tSurface.ROTATION_270 -> 2 \/\/ \u987a\u65f6\u9488 270 \u5ea6\n\t\telse -> lastOrientation\n\t}\n}\n\n<\/code><\/pre>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u9664\u6b64\u4e4b\u5916\uff0c\u989d\u5916\u5de6\u53f3\u4fa7\u8fb9\u754c\u8d34\u8fb9\u5904\u7406\u7b49\uff0c\u8be6\u89c1github<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">2. \u76ee\u6807View\u62bd\u53d6\u4e0e\u8bbe\u7f6e<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u83b7\u53d6\u76ee\u6807View<\/h3>\n\n\n\n<pre class=\"wp-block-code language-dart lines-number has-small-font-size\"><code>private fun findMatchingView(root: View): View? {\n\tval queue: Queue&lt;View> = LinkedList()\n\tqueue.add(root)\n\tvar surfaceViewTag: SurfaceView? = null\n\n\tval exactlyViewName = GmSpacePipManager.getInstance().exactlyViewName\n\tval excludeViewParentList = GmSpacePipManager.getInstance().excludeViewParentList.apply {\n\t\taddAll(GmApiManager.initConfigExcludeViewParentList)\n\t}\n\n\twhile (queue.isNotEmpty()) {\n\t\tval current = queue.poll()\n\t\tif (exactlyViewName.isNotBlank()) {\n\t\t\tif (current.javaClass.name == exactlyViewName) {\n\t\t\t\treturn current\n\t\t\t}\n\t\t} else {\n\t\t\tif (current is GLSurfaceView || (current != null &amp;&amp; (current is WebView || isTxWebView(current)))) {\n\t\t\t\tif (current.parent is ViewGroup) {\n\t\t\t\t\tval className = (current.parent as ViewGroup).javaClass.name\n\t\t\t\t\t\/\/ \u5355\u6b21\u53ea\u4f5c\u7528\u4e00\u6b21\n\t\t\t\t\tif (excludeViewParentList.contains(className)) {\n\t\t\t\t\t\texcludeViewParentList.remove(className)\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn current\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn current\n\t\t\t\t}\n\t\t\t} else if (current is SurfaceView) {\n\t\t\t\tsurfaceViewTag = current\n\t\t\t}\n\t\t}\n\t\tif (current is ViewGroup) {\n\t\t\tfor (i in 0 until current.childCount) {\n\t\t\t\tqueue.add(current.getChildAt(i))\n\t\t\t}\n\t\t}\n\t}\n\treturn surfaceViewTag\n}\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Hook\u903b\u8f91<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u5bf9\u4e8eGlSurfaceView\u9700\u8981\u4f7f\u7528Pine\u7b49hook\u6846\u67b6\u5904\u7406\u76f8\u5173\u65b9\u6cd5\uff0c\u914d\u5408\u4f7f\u7528\uff1a<a href=\"https:\/\/iichen.cn\/?p=781\">Android-\u66ff\u6362Instrumentation\u62e6\u622aActivity\u751f\u547d\u5468\u671f<\/a>\u8fdb\u884c\u5904\u7406\uff0c\u9488\u5bf9\u7279\u6b8a\u6e38\u620f\u9700\u8981\u4f7f\u7528jadx\u7b49\u5de5\u5177\u5206\u6790\u540e\u4e0b\u53d1\u62e6\u622a\u903b\u8f91\u5b9e\u73b0\u3002<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code language-dart lines-number has-small-font-size\"><code>public static void hookGlSurfaceView() {\n\ttry {\n\t\tPine.hook(Class.forName(\"android.opengl.GLSurfaceView\").getDeclaredMethod(\"onAttachedToWindow\", new Class&#91;0]), new GLSurfaceViewInvokeOnAttachedToWindow());\n\t\tPine.hook(Class.forName(\"android.opengl.GLSurfaceView\").getDeclaredMethod(\"onDetachedFromWindow\", new Class&#91;0]), new GLSurfaceViewInvokeOnDetachedFromWindow());\n\t} catch (Exception e) {\n\t\tLog.d(TAG, \"hookGlSurfaceView: \", e);\n\t}\n}\n\t\nclass GLSurfaceViewInvokeOnDetachedFromWindow extends MethodHook {\n    Object asm = null;\n\n    GLSurfaceViewInvokeOnDetachedFromWindow() {\n    }\n\n    @SuppressLint(\"SoonBlockedPrivateApi\")\n    @Override\n    public void afterCall(Pine.CallFrame callFrame) throws Throwable {\n        super.afterCall(callFrame);\n        if (this.asm != null) {\n            Field field = GLSurfaceView.class.getDeclaredField(\"mGLThread\");\n            field.setAccessible(true);\n            field.set(callFrame.thisObject, this.asm);\n            Field detachedFiled = GLSurfaceView.class.getDeclaredField(\"mDetached\");\n            detachedFiled.setAccessible(true);\n            detachedFiled.set(callFrame.thisObject, false);\n        }\n    }\n\n    @SuppressLint(\"SoonBlockedPrivateApi\")\n    @Override\n    public void beforeCall(Pine.CallFrame callFrame) throws Throwable {\n        super.beforeCall(callFrame);\n        try {\n            Field field = GLSurfaceView.class.getDeclaredField(\"mGLThread\");\n            field.setAccessible(true);\n            this.asm = field.get(callFrame.thisObject);\n            field.set(callFrame.thisObject, null);\n        } catch (Exception e) {\n            Log.d(\"iichen\", \"onDetachedFromWindow: \" + e.getMessage());\n        }\n    }\n\n}\n\nclass GLSurfaceViewInvokeOnAttachedToWindow extends MethodHook {\n    GLSurfaceViewInvokeOnAttachedToWindow() {\n    }\n\n    @Override\n    public void afterCall(Pine.CallFrame callFrame) throws Throwable {\n        super.afterCall(callFrame);\n    }\n\n    @SuppressLint(\"SoonBlockedPrivateApi\")\n    @Override\n    public void beforeCall(Pine.CallFrame callFrame) throws Throwable {\n        super.beforeCall(callFrame);\n        try {\n            Field detachedFiled = GLSurfaceView.class.getDeclaredField(\"mDetached\");\n            detachedFiled.setAccessible(true);\n            detachedFiled.set(callFrame.thisObject, false);\n        } catch (Exception e) {\n            Log.d(\"iichen\", \"onAttachedToWindow: \", e);\n        }\n    }\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u8fc7\u83b7\u53d6\u5f53\u524d\u9876\u5c42Activity\u7684DecorView\u53bb\u6839\u636e\u89c4\u5219\u67e5\u627e\u76ee\u6807View\uff0c\u5982\uff1aSurfaceView\/G [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,8],"tags":[],"class_list":["post-824","post","type-post","status-publish","format-standard","hentry","category-android","category-8"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f - IIchen<\/title>\n<meta name=\"description\" content=\"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/iichen.cn\/?p=824\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f - IIchen\" \/>\n<meta property=\"og:description\" content=\"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f\" \/>\n<meta property=\"og:url\" content=\"https:\/\/iichen.cn\/?p=824\" \/>\n<meta property=\"og:site_name\" content=\"IIchen\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-25T02:48:49+00:00\" \/>\n<meta name=\"author\" content=\"iichen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"iichen\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/iichen.cn\/?p=824#article\",\"isPartOf\":{\"@id\":\"https:\/\/iichen.cn\/?p=824\"},\"author\":{\"name\":\"iichen\",\"@id\":\"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c\"},\"headline\":\"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f\",\"datePublished\":\"2025-01-25T02:48:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/iichen.cn\/?p=824\"},\"wordCount\":24,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c\"},\"articleSection\":[\"Android\",\"\u7b14\u8bb0\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/iichen.cn\/?p=824#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/iichen.cn\/?p=824\",\"url\":\"https:\/\/iichen.cn\/?p=824\",\"name\":\"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f - IIchen\",\"isPartOf\":{\"@id\":\"https:\/\/iichen.cn\/#website\"},\"datePublished\":\"2025-01-25T02:48:49+00:00\",\"description\":\"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f\",\"breadcrumb\":{\"@id\":\"https:\/\/iichen.cn\/?p=824#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/iichen.cn\/?p=824\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/iichen.cn\/?p=824#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/iichen.cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/iichen.cn\/#website\",\"url\":\"https:\/\/iichen.cn\/\",\"name\":\"IIchen\",\"description\":\"Just do it!\",\"publisher\":{\"@id\":\"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/iichen.cn\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c\",\"name\":\"iichen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/iichen.cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/iichen.cn\/wp-content\/uploads\/2025\/01\/avatar.jpg\",\"contentUrl\":\"https:\/\/iichen.cn\/wp-content\/uploads\/2025\/01\/avatar.jpg\",\"width\":940,\"height\":940,\"caption\":\"iichen\"},\"logo\":{\"@id\":\"https:\/\/iichen.cn\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/www.iichen.cn\"],\"url\":\"https:\/\/iichen.cn\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f - IIchen","description":"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/iichen.cn\/?p=824","og_locale":"zh_CN","og_type":"article","og_title":"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f - IIchen","og_description":"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f","og_url":"https:\/\/iichen.cn\/?p=824","og_site_name":"IIchen","article_published_time":"2025-01-25T02:48:49+00:00","author":"iichen","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"iichen","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/iichen.cn\/?p=824#article","isPartOf":{"@id":"https:\/\/iichen.cn\/?p=824"},"author":{"name":"iichen","@id":"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c"},"headline":"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f","datePublished":"2025-01-25T02:48:49+00:00","mainEntityOfPage":{"@id":"https:\/\/iichen.cn\/?p=824"},"wordCount":24,"commentCount":0,"publisher":{"@id":"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c"},"articleSection":["Android","\u7b14\u8bb0"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/iichen.cn\/?p=824#respond"]}]},{"@type":"WebPage","@id":"https:\/\/iichen.cn\/?p=824","url":"https:\/\/iichen.cn\/?p=824","name":"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f - IIchen","isPartOf":{"@id":"https:\/\/iichen.cn\/#website"},"datePublished":"2025-01-25T02:48:49+00:00","description":"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f","breadcrumb":{"@id":"https:\/\/iichen.cn\/?p=824#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/iichen.cn\/?p=824"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/iichen.cn\/?p=824#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/iichen.cn\/"},{"@type":"ListItem","position":2,"name":"Android-\u6e38\u620f\u5c0f\u7a97\u6a21\u5f0f"}]},{"@type":"WebSite","@id":"https:\/\/iichen.cn\/#website","url":"https:\/\/iichen.cn\/","name":"IIchen","description":"Just do it!","publisher":{"@id":"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/iichen.cn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/iichen.cn\/#\/schema\/person\/4a47edf85ab49841df9e8f6aee40b77c","name":"iichen","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/iichen.cn\/#\/schema\/person\/image\/","url":"https:\/\/iichen.cn\/wp-content\/uploads\/2025\/01\/avatar.jpg","contentUrl":"https:\/\/iichen.cn\/wp-content\/uploads\/2025\/01\/avatar.jpg","width":940,"height":940,"caption":"iichen"},"logo":{"@id":"https:\/\/iichen.cn\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/www.iichen.cn"],"url":"https:\/\/iichen.cn\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/iichen.cn\/index.php?rest_route=\/wp\/v2\/posts\/824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iichen.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iichen.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iichen.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iichen.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=824"}],"version-history":[{"count":2,"href":"https:\/\/iichen.cn\/index.php?rest_route=\/wp\/v2\/posts\/824\/revisions"}],"predecessor-version":[{"id":833,"href":"https:\/\/iichen.cn\/index.php?rest_route=\/wp\/v2\/posts\/824\/revisions\/833"}],"wp:attachment":[{"href":"https:\/\/iichen.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iichen.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iichen.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}