AdguardTeam / AdguardTeam/AdguardForAndroid

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

Open
#5,483 12 comments 0 reactions 1 assignee Assigned to @olshanski View on GitHub
Bug Middle+ Priority: P2 Status: Code Review Strat TechAudit Version: AdGuard v4.15
Dominant language
No language data
Stars
1.9k
Forks
121
PR merge metrics
No merged PRs in 30d

Description

### 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.