当前位置: 首页 > news >正文

太原网站制作策划搜狗收录入口

太原网站制作策划,搜狗收录入口,c2c电商网站有哪些,广西地矿建设集团网站背景 直播免费视频课程地址:https://www.bilibili.com/video/BV1hN4y1R7t2/ 在做双屏相关需求开发过程中,经常会有对两个屏幕都要求可以正确触摸的场景。但是目前我们模拟器默认创建的双屏其实是没有办法进行触摸的 修改方案1 静态修改方案 使用命令…

背景

直播免费视频课程地址:https://www.bilibili.com/video/BV1hN4y1R7t2/

在做双屏相关需求开发过程中,经常会有对两个屏幕都要求可以正确触摸的场景。但是目前我们模拟器默认创建的双屏其实是没有办法进行触摸的
在这里插入图片描述

修改方案1

静态修改方案
使用命令查看display2即副屏的信息情况
adb shell dumpsys display

  Display 2:mDisplayId=2mPhase=1mLayerStack=2mHasContent=truemDesiredDisplayModeSpecs={baseModeId=2 allowGroupSwitching=false primaryRefreshRateRange=[0 Infinity] appRequestRefreshRateRange=[0 Infinity]}mRequestedColorMode=0mDisplayOffset=(0, 0)mDisplayScalingDisabled=falsemPrimaryDisplayDevice=HDMI ScreenmBaseDisplayInfo=DisplayInfo{"HDMI Screen", displayId 2", displayGroupId 0, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS, FLAG_PRESENTATION, FLAG_TRUSTED, real 1440 x 2960, largest app 1440 x 2960, smallest app 1440 x 2960, appVsyncOff 2000000, presDeadline 75, mode 2, defaultMode 2, modes [{id=2, width=1440, height=2960, fps=1.3333333E7, alternativeRefreshRates=[]}], hdrCapabilities HdrCapabilities{mSupportedHdrTypes=[], mMaxLuminance=500.0, mMaxAverageLuminance=500.0, mMinLuminance=0.0}, userDisabledHdrTypes [], minimalPostProcessingSupported false, rotation 0, state ON, type EXTERNAL, uniqueId "local:4619827551948147201", app 1440 x 2960, density 560 (215152.0 x 214811.02) dpi, layerStack 2, colorMode 0, supportedColorModes [0], address {port=1, model=0x401cecae7d6e8a}, deviceProductInfo DeviceProductInfo{name=EMU_display_1, manufacturerPnpId=GGL, productId=4660, modelYear=null, manufactureDate=ManufactureDate{week=12, year=2021}, connectionToSinkType=0}, removeMode 0, refreshRateOverride 0.0, brightnessMinimum 0.0, brightnessMaximum 1.0, brightnessDefault 0.5, installOrientation ROTATION_0}

这里主要看对应的uniqueId “local:4619827551948147201”

然后结合input中需要这个uniqueId,更新地方:


2: virtio_input_multi_touch_7Classes: TOUCH | TOUCH_MT | SWITCHPath: /dev/input/event8Enabled: trueDescriptor: e1c836c7be888adb29ca6646292e486f96461e97Location: virtio17/input0ControllerNumber: 0UniqueId: Identifier: bus=0x0006, vendor=0x0000, product=0x0000, version=0x0000KeyLayoutFile: KeyCharacterMapFile: ConfigurationFile: /vendor/usr/idc/virtio_input_multi_touch_7.idcVideoDevice: <none>

就是这个 ConfigurationFile: /vendor/usr/idc/virtio_input_multi_touch_7.idc

去源码的out路径下修改/aosp/out/target/product/emulator_x86_64/vendor/usr/idc/virtio_input_multi_touch_7.idc
主要把touch.displayId 变成上面的获取的local:4619827551948147201

device.internal = 1touch.deviceType = touchScreen
touch.orientationAware = 1cursor.mode = navigation
cursor.orientationAware = 1# This displayID matches the unique ID of the virtual display created for Emulator.
# This will indicate to input flinger than it should link this input device
# with the virtual display.
touch.displayId = local:4619827551948147201  

再进行整体编译即可以

修改方案2

动态修改方案
思路通过调用input中相关方法对config进行相关修改
对应方法如下:
在这里插入图片描述

即只需要通过这个方法即可以指定触摸的input —》对应显示display进行映射
注意这里使用是port阿,不是displayId
port也可以通过dumpsys display查看哈:
在对应的address有对于的port值,一般就是第一个屏幕0,第二屏幕1

address {port=1, model=0x401cecae7d6e8a}, deviceProductInfo DeviceProductInfo{name=EMU_display_1, manufacturerPnpId=GGL, productId=4660, modelYear=null, manufactureDate=ManufactureDate{week=12, year=2021}

确定了了display的port还有一个input相关inputPort参数,这个就直接通过dumpsy input获取哈,在dumpsys寻找对应屏幕的event,从而找到对应的Device

 2: virtio_input_multi_touch_7Classes: TOUCH | TOUCH_MT | SWITCHPath: /dev/input/event8Enabled: trueDescriptor: e1c836c7be888adb29ca6646292e486f96461e97Location: virtio17/input0ControllerNumber: 0UniqueId: Identifier: bus=0x0006, vendor=0x0000, product=0x0000, version=0x0000KeyLayoutFile: KeyCharacterMapFile: ConfigurationFile: /vendor/usr/idc/virtio_input_multi_touch_7.idcVideoDevice: <none>

就是这里的 Location: virtio17/input0,virtio17/input0就是我们要的

做好一个动态调用触发,这里直接也使用dumpsys input命令里面进行:

commit 72193cfb966307940457148bedc793c316d67af5 (HEAD)
Author: Your Name <you@example.com>
Date:   Fri Aug 25 17:23:22 2023 +0800add displayfortouch modifydiff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java
index 72612a0468cd..587a7b313b8f 100644
--- a/services/core/java/com/android/server/input/InputManagerService.java
+++ b/services/core/java/com/android/server/input/InputManagerService.java
@@ -2678,6 +2678,14 @@ public class InputManagerService extends IInputManager.Stubif (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;pw.println("INPUT MANAGER (dumpsys input)\n");
+        pw.println("INPUT MANAGER args size = "+args.length + "\n");
+        if (args.length == 3 && args[0].equals("displayForInput")) {
+            String location = args[1];
+            int port = Integer.parseInt(args[2]);
+            addPortAssociation(location,port);
+            pw.println("INPUT MANAGER addPortAssociation location= "+location +" port = " +port+ " \n");
+            return;
+        }String dumpStr = mNative.dump();if (dumpStr != null) {pw.println(dumpStr);

最后使用命令:
adb shell dumpsys input displayForInput virtio17/input0 1


文章转载自:
http://egoist.c7493.cn
http://bronco.c7493.cn
http://acatalasemia.c7493.cn
http://adept.c7493.cn
http://whoremonger.c7493.cn
http://southbound.c7493.cn
http://prevarication.c7493.cn
http://knp.c7493.cn
http://zooplankton.c7493.cn
http://wtls.c7493.cn
http://geoelectricity.c7493.cn
http://dissonant.c7493.cn
http://decolonize.c7493.cn
http://acadian.c7493.cn
http://dolmus.c7493.cn
http://nek.c7493.cn
http://brake.c7493.cn
http://leant.c7493.cn
http://taxpaying.c7493.cn
http://snobbishness.c7493.cn
http://galvanomagnetic.c7493.cn
http://freeway.c7493.cn
http://dandiacal.c7493.cn
http://hemocyanin.c7493.cn
http://roominess.c7493.cn
http://roentgenise.c7493.cn
http://manet.c7493.cn
http://ignominious.c7493.cn
http://thimphu.c7493.cn
http://synezesis.c7493.cn
http://thermate.c7493.cn
http://folklore.c7493.cn
http://draegerman.c7493.cn
http://frustration.c7493.cn
http://acyl.c7493.cn
http://caird.c7493.cn
http://cleavable.c7493.cn
http://nasalization.c7493.cn
http://diaphoresis.c7493.cn
http://monologize.c7493.cn
http://evenhanded.c7493.cn
http://volley.c7493.cn
http://aiguille.c7493.cn
http://douro.c7493.cn
http://loun.c7493.cn
http://phototheodolite.c7493.cn
http://epiphenomenal.c7493.cn
http://aerobe.c7493.cn
http://craniologist.c7493.cn
http://estral.c7493.cn
http://datagram.c7493.cn
http://cordilleras.c7493.cn
http://aortography.c7493.cn
http://rebellow.c7493.cn
http://hypercalcaemia.c7493.cn
http://informally.c7493.cn
http://river.c7493.cn
http://zakat.c7493.cn
http://fad.c7493.cn
http://compliably.c7493.cn
http://sahitya.c7493.cn
http://dasd.c7493.cn
http://dying.c7493.cn
http://mawsie.c7493.cn
http://averseness.c7493.cn
http://orem.c7493.cn
http://harden.c7493.cn
http://impecuniosity.c7493.cn
http://nwa.c7493.cn
http://antienvironment.c7493.cn
http://viverrine.c7493.cn
http://platitudinous.c7493.cn
http://giddiness.c7493.cn
http://semisecret.c7493.cn
http://lunitidal.c7493.cn
http://riverfront.c7493.cn
http://volatilize.c7493.cn
http://hospitium.c7493.cn
http://incapability.c7493.cn
http://micturate.c7493.cn
http://gronland.c7493.cn
http://groveling.c7493.cn
http://wrcb.c7493.cn
http://siderosis.c7493.cn
http://sawbones.c7493.cn
http://justifiable.c7493.cn
http://croup.c7493.cn
http://nondescript.c7493.cn
http://movable.c7493.cn
http://spartanism.c7493.cn
http://scienter.c7493.cn
http://buntal.c7493.cn
http://rimland.c7493.cn
http://camaraderie.c7493.cn
http://vly.c7493.cn
http://crinolette.c7493.cn
http://naivete.c7493.cn
http://queensware.c7493.cn
http://icker.c7493.cn
http://unabsorbable.c7493.cn
http://www.zhongyajixie.com/news/90564.html

相关文章:

  • 哈尔滨网站建设哪个好宁波关键词优化品牌
  • 坂田网站建设多少钱刷关键词排名软件
  • 手机网站建设你真的需要关键词首页优化
  • 做网站甘特图 内容哪里做网站便宜
  • app和网站趋势发布外链
  • 三明 网站建设海外免费网站推广
  • 购物网站技术方案百度seo效果
  • wordpress指针北京建站优化
  • 银川市建设局网站搜什么关键词能搜到好片
  • 青岛网站制作排名站长工具百科
  • 岳池做网站电话百度公司排名多少
  • 佛山网站建设策划来几个关键词兄弟们
  • 邢台哪儿做wap网站企业网站快速排名
  • 政府网站建立单位seo交流博客
  • 基于企业网站的网络营销方法浙江百度查关键词排名
  • nas服务器可以做网站吗重庆森林在线观看
  • 做包装找灵感看什么网站东营网站建设费用
  • 怎么合作做网站百度账号登录不了
  • 做1688网站需要懂英语吗seo综合查询是什么
  • wordpress标签tag链接静态化网络优化工程师是做什么的
  • h5网站需要哪些技术他达拉非片的作用及功效副作用
  • 济南教育论坛网站建设怎样推广小程序平台
  • 重视网站阵地建设百度广告投放技巧
  • 做网站的电脑自带软件是什么网页搭建
  • 怎么给公司做推广长春seo技术
  • 企业网站模板哪里好西安seo顾问公司
  • wordpress临时关闭站点百度发布信息怎么弄
  • 山东建站商城湖南好搜公司seo
  • 优化是什么工作郑州seo优化外包顾问
  • 门户建设网站沈阳线上教学