Skip to content

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

Launcher: show an Ethernet icon on the network pill when wired

Darlene Sonalderc8cf7d62ef34
diff --git a/README.md b/README.md
index 35537351f..fb8ea5af6 100644
--- a/README.md
+++ b/README.md
@@ -86,7 +86,7 @@ A home screen that is yours again:
- **One floating glass highlight** that springs from tile to tile instead of each tile drawing its
own border. The focused tile lifts slightly and shows its name.
- **Three frosted buttons**: Inputs (a dropdown of HDMI ports, AV and Live TV), Wi-Fi (showing the
- network you're on) and Settings.
+ network you're on, or Ethernet with its own icon when wired) and Settings.
- **A greeting, a large thin clock and the date**, set in
[Outfit](https://fonts.google.com/specimen/Outfit).
- **A matching Clock screensaver**, optional, that drifts around the screen so nothing burns in.
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
index b03823724..45c21ac22 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@ -522,6 +522,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
private void updateWifiLabel() {
String text = getString(R.string.wifi);
boolean vpn = false;
+ int icon = R.drawable.ic_wifi;
try {
ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
boolean online = false, wifi = false, ethernet = false;
@@ -543,6 +544,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
vpn = false;
} else if (ethernet) {
text = getString(R.string.ethernet);
+ icon = R.drawable.ic_ethernet;
} else if (wifi) {
WifiManager wm = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
WifiInfo info = wm != null ? wm.getConnectionInfo() : null;
@@ -564,6 +566,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
} else {
btnWifi.setText(text);
}
+ btnWifi.setCompoundDrawablesRelativeWithIntrinsicBounds(icon, 0, 0, 0);
}
/** The network pill opens the VPN app when one is configured and installed, otherwise Wi-Fi settings. */
diff --git a/launcher/app/src/main/res/drawable/ic_ethernet.xml b/launcher/app/src/main/res/drawable/ic_ethernet.xml
new file mode 100644
index 000000000..90a772218
--- /dev/null
+++ b/launcher/app/src/main/res/drawable/ic_ethernet.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="22dp" android:height="22dp"
+ android:viewportWidth="24" android:viewportHeight="24">
+ <path android:fillColor="#FFFFFFFF"
+ android:pathData="M7.77,6.76L6.23,5.48 0.82,12l5.41,6.52 1.54,-1.28L3.42,12l4.35,-5.24zM7,13h2v-2L7,11v2zM17,11h-2v2h2v-2zM11,13h2v-2h-2v2zM17.77,5.48l-1.54,1.28L20.58,12l-4.35,5.24 1.54,1.28L23.18,12l-5.41,-6.52z" />
+</vector>