AdguardTeam / AdguardTeam/AdguardForAndroid

After the TV version is installed, the UI layout is still the mobile version. #5475

未关闭
#5,483 12 条评论 0 个 reaction 已指派 1 人 已指派给 @olshanski 在 GitHub 查看
Bug Middle+ Priority: P2 Status: Code Review Strat TechAudit Version: AdGuard v4.15
主要语言
没有语言数据
星标
1.9k
派生
121
PR 合并指标
30 天内没有已合并 PR

描述

### Please answer the following questions for yourself before submitting an issue

- [X] Filters were updated before reproducing an issue
- [X] I checked the [knowledge base](https://adguard.com/kb/) and found no answer
- [X] I checked to make sure that this issue has not already been filed

### AdGuard version

4.6.92

### Environment

OS version:Android 11
Device:Station M2

### HTTPS filtering

- [X] yes, I do

### Root access

- [X] yes, I have it

### Integration with AdGuard VPN

- [ ] yes, I do

### Routing mode

Local VPN

### Ad Blocking

_No response_

### Privacy

_No response_

### Social

_No response_

### Annoyances

_No response_

### Security

_No response_

### Language-specific

_No response_

### Other

_No response_

### Which DNS server do you use?

AdGuard DNS

### DNS protocol

None

### Custom DNS

_No response_

### What Stealth Mode options do you have enabled?

_No response_

### Issue Details

Steps to reproduce:
1.download from agrd.io/tvapk
2.adb install adguard tv apk
3.After opening, the UI layout is still the mobile version.

### Expected Behavior

_No response_

### Actual Behavior

I hope that the TV version can be forced to set the TV layout without relying on the software to detect the model itself, and hope that the resolution can be adapted.

### Screenshots

_No response_

### Additional Information

First of all, I am a lifetime paying user of AdGuard. I am not happy with your perfunctory closing of my question. You closed my question on the grounds that my device is not a TV. This is ridiculous!!! You developed poor code and put the landscape device detection logic at the end. Are you proud of this? My media box is a playback device for an external TV. Doesn't it deserve a TV version?

This is an old issue. If you continue to reject my request with this ridiculous reason, I will open a new issue.
https://github.com/AdguardTeam/AdguardForAndroid/issues/5475

Finally, post the poor detection code you wrote.
public static final boolean b(Activity activity) {
n.g(activity, "");
Object systemService = activity.getSystemService("uimode");
n.e(systemService, "null cannot be cast to non-null type android.app.UiModeManager");
int i = activity.getResources().getConfiguration().orientation;
int currentModeType = ((UiModeManager) systemService).getCurrentModeType();
if (currentModeType != 0) {
if (currentModeType == 4) {
return true;
}
return false;
}
if (activity.getPackageManager().hasSystemFeature("android.hardware.touchscreen")) {
return false;
}
View decorView = activity.getWindow().getDecorView();
n.f(decorView, "getDecorView(...)");
if (i != 0) {
if (i == 2) {
return true;
}
} else if (decorView.getWidth() > decorView.getHeight()) {
return true;
}
return false;
}

If this issue is closed again, I will open a new issue and provide a patch to force the adguard modified version of TV UI to open. I hope that the basic needs of a lifetime paying user can be taken seriously by your team, rather than perfunctorily.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。