gpt4 book ai didi

android - 代号 一个以较低分辨率运行的应用程序 (Android)

转载 作者:行者123 更新时间:2023-12-04 10:02:40 27 4
gpt4 key购买 nike

我正在 Samsung Galaxy Tab A 10.1 (2019) 上测试我的应用(调试版本)。设备分辨率为 1200 x 1920。但是,当我使用 getDisplayWidth() 和 getDisplayHeight() 时,我得到 900 x 1359(= 1440 - 状态栏)。所以应用程序以较低的分辨率运行,而且图形确实看起来有点粗糙。但是当我截屏时它的分辨率为 1200 x 1920。Galaxy Tab A 没有更改屏幕分辨率的选项,我找不到解决这个问题的方法。

这是一个已知问题吗?有解决方案吗?

编辑:临时解决方案是更改(已知应用程序的)包名称。使用 NativeLogsReader.cn1lib 我们得到

1) 加上原来的包名:

--------- beginning of main
05-17 13:09:35.879 24347 24347 D ViewRootImpl@34e19e6[MainStub]: Relayout returned:
old=[0,0][1200,1920] new=[0,0][900,1440] result=0x7 surface={true 3890690048} changed=true

2) 更改包名:

--------- beginning of main
05-17 13:22:46.459 26231 26231 D ViewRootImpl@34e19e6[MainStub]: Relayout returned:
old=[0,0][1200,1920] new=[0,0][1200,1920] result=0x7 surface={true 3890690048} changed=true

因此,对于原始包名称,分辨率减少,而对于更改包名称,分辨率保持原始状态。我用谷歌搜索了这个问题,没有找到其他示例或线索。

编辑 2:原始包名称 (com.xx.yy) 和测试包名称 (com.xx.yy2) 的设备控制台输出。

1) 所有输出,按包名过滤:

a) 原始包名:

2020-05-18 11:12:48.174 3915-4148/? D/StorageManagerService: getExternalStorageMountMode : final mountMode=1, uid : 10163, packageName : com.xx.yy
2020-05-18 11:12:48.175 3915-4148/? I/ApplicationPolicy: isApplicationExternalStorageWhitelisted:com.xx.yy user:0
2020-05-18 11:12:48.175 3915-4148/? D/ActivityManager: package com.xx.yy, user - 0 is SDcard whitelisted
2020-05-18 11:12:48.175 3915-4148/? I/ApplicationPolicy: isApplicationExternalStorageBlacklisted:com.xx.yy user:0
2020-05-18 11:12:48.175 3915-4148/? I/ApplicationPolicy: isApplicationExternalStorageBlacklisted:com.xx.yy user:0
2020-05-18 11:12:48.194 3915-3933/? I/ActivityManager: Start proc 13627:com.xx.yy/u0a163 for activelaunch com.xx.yy/.MainStub
2020-05-18 11:12:48.199 13627-13627/? I/com.xx.yy: Late-enabling -Xcheck:jni
2020-05-18 11:12:48.235 13627-13627/? I/com.xx.yy: report jit thread pid = 13632
2020-05-18 11:12:48.238 4834-4985/? I/SAPrinter: sendEvent :{cd=det3packageNamecom.xx.yy, t=ev, en=1001, pn=201, ts=1589793168238}
2020-05-18 11:12:48.249 3915-4194/? I/ActivityManager: START u0 {act=android.intent.action.MAIN typ=null flg=0x10200000 cmp=ComponentInfo{com.xx.yy/com.xx.yy.MainStub}} from uid 10010
2020-05-18 11:12:48.252 3915-4194/? I/ActivityManager: [IOP] sourceDir : /data/app/com.xx.yy-i4NuDIQRBO8c4W1IO7HhTA== in ActivityStacksupervisor
2020-05-18 11:12:48.266 3572-3572/? I/SurfaceFlinger: id=2615 createSurf (3840x3840),2 flag=4, AppWindowToken{e37293b token=Token{b713ca ActivityRecord{cd6e335 u0 com.xx.yy/.MainStub t69}}}#0
2020-05-18 11:12:48.272 3915-4311/? I/ActivityManager: DSS on for com.xx.yy and scale is 0.75

请注意“比例为 0.75”。

b) 测试包名称:

...(similar)...
2020-05-18 11:08:43.650 3915-5720/? I/ActivityManager: DSS on for com.xx.yy2 and scale is 1.0

注意“比例为 1.0”。

2) 特定的调试应用程序输出:

a) 原始包名:

2020-05-18 13:31:07.695 21604-21604/? E/Zygote: isWhitelistProcess - Process is Whitelisted
2020-05-18 13:31:07.696 21604-21604/? E/Zygote: accessInfo : 1
2020-05-18 13:31:07.701 21604-21604/? I/com.xx.yy: Late-enabling -Xcheck:jni
2020-05-18 13:31:07.741 21604-21604/? I/com.xx.yy: report jit thread pid = 21609
2020-05-18 13:31:07.835 21604-21604/com.xx.yy W/ActivityThread: Application com.xx.yy can be debugged on port 8100...
2020-05-18 13:31:07.842 21604-21604/com.xx.yy I/com.xx.yy: The ClassLoaderContext is a special shared library.
2020-05-18 13:31:08.252 21604-21604/com.xx.yy W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@b9352ba
2020-05-18 13:31:08.378 21604-21604/com.xx.yy I/DecorView: createDecorCaptionView >> DecorView@4039d47[], isFloating: false, isApplication: true, hasWindowDecorCaption: false, hasWindowControllerCallback: true
2020-05-18 13:31:08.418 21604-21604/com.xx.yy D/OpenGLRenderer: Skia GL Pipeline
2020-05-18 13:31:08.632 21604-21604/com.xx.yy D/EmergencyMode: [EmergencyManager] android createPackageContext successful
2020-05-18 13:31:08.655 21604-21604/com.xx.yy D/InputTransport: Input channel constructed: fd=60
2020-05-18 13:31:08.656 21604-21604/com.xx.yy D/ViewRootImpl@34e19e6[MainStub]: setView = DecorView@4039d47[MainStub] TM=true MM=false
2020-05-18 13:31:08.669 21604-21604/com.xx.yy V/InputMethodManager: Not IME target window, ignoring
2020-05-18 13:31:08.672 21604-21637/com.xx.yy D/App: [EDT] 0:0:0,2 - Codename One revisions: 7dd4e7d08b3442d90959477ee52a5ae8c4361b29
2020-05-18 13:31:08.678 21604-21637/com.xx.yy D/App: [EDT] 0:0:0,9 - package com.xx.yy
2020-05-18 13:31:08.693 21604-21637/com.xx.yy D/App: [EDT] 0:0:0,20 - Native Logs Reader initialized correctly
2020-05-18 13:31:08.703 21604-21604/com.xx.yy D/ViewRootImpl@34e19e6[MainStub]: Relayout returned: old=[0,0][1200,1920] new=[0,0][900,1440] result=0x7 surface={true 3890690048} changed=true

注意“new=[0,0][900,1440]”。

b) 测试包名称:

...(similar)...
2020-05-18 16:26:40.564 24283-24283/com.xx.yy2 D/ViewRootImpl@34e19e6[MainStub]: Relayout returned: old=[0,0][1200,1920] new=[0,0][1200,1920] result=0x7 surface={true 3890690048} changed=true

注意“new=[0,0][1200,1920]”。

编辑 3:使用原始包名称的新测试。初始情况:应用以降低的分辨率 900x1440 运行。

Steps:
1. deinstall app
2. switch off wifi/internet
3. install app (from downloads)
4. optional: switch on wifi/internet
5. run app

结果:应用的原始分辨率 1200x1920。结论:通过在线检查软件包名称在安装过程中设置了降低的分辨率。

编辑 4:CN1 Device Tester 应用的输出:

Density: DENSITY_HIGH
Platform Name: and
User Agent: Dalvik/2.1.0 (Linux; U; Android 9; SM-T510 Build/PPR1.180610.011)
OS: Android
OS Version: 9
UDID: 01234567890abcde
MSISDN: null
Display Width X Height: 1200X1812
1mm In Pixels: 9.449
Language: en
Locale: US
Currency Symbol: $
Are Mutable Images Fast: false
Can Dial: false
Can Force Orientation: true
Has Camera: true
Badging: false
Desktop: false
Tablet: true
Gaussian Blur Support: true
Get All Contacts Fast: true
Multi Touch: true
PICKER_TYPE_DATE: true
PICKER_TYPE_DATE_AND_TIME: false
PICKER_TYPE_STRINGS: true
PICKER_TYPE_TIME: true
Native Share: true
Native Video Player Controls: true
Notification: true
Open Native Navigation: true
Screen Saver Disable: true
Simulator: false

编辑 5:我还查看了在有和没有互联网连接的情况下安装的控制台输出。

1) 没有互联网连接:

...
2020-05-20 13:51:36.746 28438-28455/? D/GOS:NetworkConnector: getPkgData(), packageName : com.xx.yy
2020-05-20 13:51:36.808 28438-28455/? D/GOS:NetworkConnector: getPkgData(), request: https://service.game-mode.net/gamemode/v3/packages/?type=install&device_name=gta3xlwifi&package_names=com.xx.yy, response: null
2020-05-20 13:51:36.830 28438-28455/? D/GOS:PackageDAO: updateTimeStamp(): com.xx.yy
2020-05-20 13:51:36.874 28438-28455/? D/GOS:SystemEventReactor: addPkgDataFromServer(), A package was added : com.xx.yy as undefined
...

注意 'com.xx.yy 未定义'。

2) 有互联网连接:

...
2020-05-20 13:36:31.944 23382-23415/? D/GOS:NetworkConnector: getPkgData(), packageName : com.xx.yy
2020-05-20 13:36:32.254 23382-23415/? D/GOS:NetworkConnector: doDirectly(), Response, responseCode: 200, URL: https://service.game-mode.net/gamemode/v3/packages/?type=install&device_name=gta3xlwifi&package_names=com.xx.yy, response: {"code":"201001","message":"Success","packages":[{"package_name":"com.xx.yy","category_code":"game","game_genre":"BOARD","device_group":"gta3xl","game_oracle_cache":true,"cache":true}]}
2020-05-20 13:36:32.254 23382-23415/? D/GOS:NetworkConnector: getPkgData(), request: https://service.game-mode.net/gamemode/v3/packages/?type=install&device_name=gta3xlwifi&package_names=com.xx.yy, response: {"code":"201001","message":"Success","packages":[{"package_name":"com.xx.yy","category_code":"game","game_genre":"BOARD","device_group":"gta3xl","game_oracle_cache":true,"cache":true}]}
...
2020-05-20 13:36:32.379 23382-23415/? D/GOS:SystemEventReactor: addPkgDataFromServer(), A package was added : com.xx.yy as game
...

注意'com.xx.yy as game'。

于是就有了以包名为参数的请求https://service.game-mode.net。这使我找到了以下链接:

Display density and size reduced by Samsung Game Optimization

Galaxy Note 5: Density Reduced Automatically

https://www.xda-developers.com/samsung-shuts-down-the-game-tuner-service/

综上所述,有一个应用程序(包名称)的在线注册,在安装过程中会被查询。这可能会导致应用程序的分辨率降低。唯一已知的解决方案,即 Samsung Game Tuner 应用程序,已不复存在。

由于注册归三星所有,我问他们是否可以更改我的应用程序的状态。 (这是一个 CPU 使用率高但图形很少的游戏 AI - 当然我仍然想要高分辨率图形。)

最佳答案

导致此问题的原因是在线检查 https://service.game-mode.net (参数:包名称)在三星设备上安装期间。这可能会导致默认分辨率发生变化,例如如果该应用程序被称为“游戏”(我的应用程序是棋盘游戏)。这可以由用户使用游戏启动器等游戏性能调整服务进行更改。这适用于所有三星手机和大多数三星平板电脑。但碰巧不是我的平板电脑,三星 Galaxy Tab A 10.1 2019 (SM-T510)。联系三星开发人员支持后,他们更改了此设备类型的设置,现在我的应用程序以原始分辨率运行。

关于android - 代号 一个以较低分辨率运行的应用程序 (Android),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61752978/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com