Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

Merge PR #291: launcher: Inputs menu shows the names from Settings > Inputs and leaves out hidden inputs

Gathin236024f36646fe
diff --cc launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
index d6eba1bac,c41635f88..139cfe520
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@@ -1096,7 -1066,7 +1096,8 @@@ public class MainActivity extends Activ
TvInputManager tim = (TvInputManager) getSystemService(TV_INPUT_SERVICE);
if (!any && tim != null) {
for (TvInputInfo info : tim.getTvInputList()) {
-- if (info.isPassthroughInput()) {
++ // Inputs hidden in Settings > Inputs are left out of the menu, so they don't count here either.
++ if (info.isPassthroughInput() && !info.isHidden(this)) {
any = true;
break;
}
@@@ -1231,7 -1207,7 +1238,7 @@@
// Fit the widest row: TVs that report a status on every port (Sony) would otherwise squeeze the names out.
panel.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
-- popup.setWidth(Math.max(width, panel.getMeasuredWidth()));
++ popup.setWidth(Math.max(width, Math.min(panel.getMeasuredWidth(), (int) (360 * density))));
int alignment = getResources().getBoolean(R.bool.rtl_menu_bar) ? Gravity.END : Gravity.START;
dropIn(popup, panel, anchor, alignment);