Skip to content

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

Launcher: suppress deprecation warnings on compatibility APIs

Tom Meierc4ad097eacd6
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java b/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java
index e753dc3d5..555fd4c69 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/AppAdapter.java
@@ -456,6 +456,7 @@ public class AppAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
}
@Override
+ @SuppressWarnings("deprecation")
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
if (isLibraryAt(position)) return;
Holder h = (Holder) holder;
@@ -525,6 +526,7 @@ public class AppAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
}
/** Opens the tile's activity by explicit component, with no extras: a card can name nothing else. */
+ @SuppressWarnings("deprecation")
private void launch(Entry e) {
if (e.kind == Entry.HOME_SETTINGS) {
ctx.startActivity(new Intent(ctx, HomeSettingsActivity.class)
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/BellDrawable.java b/launcher/app/src/main/java/com/gathin/tvhome/BellDrawable.java
index a1c441368..e8a4e97b2 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/BellDrawable.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/BellDrawable.java
@@ -251,6 +251,7 @@ public final class BellDrawable extends Drawable {
}
@Override
+ @SuppressWarnings("deprecation")
public int getOpacity() {
return PixelFormat.TRANSLUCENT;
}
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/ClockActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/ClockActivity.java
index 25f8ce773..c4c47d1ba 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/ClockActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/ClockActivity.java
@@ -21,6 +21,7 @@ public class ClockActivity extends Activity {
private ClockScene scene;
@Override
+ @SuppressWarnings("deprecation")
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.dream_clock);
@@ -58,6 +59,7 @@ public class ClockActivity extends Activity {
}
@Override
+ @SuppressWarnings("deprecation")
public void finish() {
super.finish();
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/DiyaDrawable.java b/launcher/app/src/main/java/com/gathin/tvhome/DiyaDrawable.java
index 6ebfe75c1..b1465cb9c 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/DiyaDrawable.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/DiyaDrawable.java
@@ -536,6 +536,7 @@ public final class DiyaDrawable extends Drawable implements FestiveLamp {
}
@Override
+ @SuppressWarnings("deprecation")
public int getOpacity() {
return PixelFormat.TRANSLUCENT;
}
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/JackOLanternDrawable.java b/launcher/app/src/main/java/com/gathin/tvhome/JackOLanternDrawable.java
index 520a7fbb6..786c661e3 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/JackOLanternDrawable.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/JackOLanternDrawable.java
@@ -192,6 +192,7 @@ public final class JackOLanternDrawable extends Drawable implements FestiveLamp
}
@Override
+ @SuppressWarnings("deprecation")
public int getOpacity() {
return PixelFormat.TRANSLUCENT;
}
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 c4993b9be..a986421f2 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@ -1684,6 +1684,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
}
@Override
+ @SuppressWarnings("deprecation")
public void onBackPressed() {
// Home screen: Back goes nowhere, unless back_opens_clock is on.
if (backOpensClock) startActivity(new Intent(this, ClockActivity.class));
@@ -2797,6 +2798,7 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
}
/** Shows the Wi-Fi network name on the button when we can read it, otherwise the connection type. */
+ @SuppressWarnings("deprecation")
private void updateWifiLabel() {
String text = getString(R.string.wifi);
boolean vpn = false, online = false, validated = false;
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/MarigoldDrawable.java b/launcher/app/src/main/java/com/gathin/tvhome/MarigoldDrawable.java
index 80e064d60..2735dfd98 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/MarigoldDrawable.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MarigoldDrawable.java
@@ -280,6 +280,7 @@ public final class MarigoldDrawable extends Drawable {
}
@Override
+ @SuppressWarnings("deprecation")
public int getOpacity() {
return PixelFormat.TRANSLUCENT;
}
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/ProbeActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/ProbeActivity.java
index af79bd4cb..be7790909 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/ProbeActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/ProbeActivity.java
@@ -15,6 +15,7 @@ public class ProbeActivity extends Activity {
getWindow().getDecorView().post(this::close);
}
+ @SuppressWarnings("deprecation")
private void close() {
finish();
overridePendingTransition(0, 0);
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/QuickSettingsActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/QuickSettingsActivity.java
index 53783e6fa..418da02fb 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/QuickSettingsActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/QuickSettingsActivity.java
@@ -60,6 +60,7 @@ public final class QuickSettingsActivity extends Activity {
/** Anything else taking the screen (Home, an app, a screensaver) closes the panel. */
@Override
+ @SuppressWarnings("deprecation")
protected void onPause() {
super.onPause();
finish();
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/SpookyIconDrawable.java b/launcher/app/src/main/java/com/gathin/tvhome/SpookyIconDrawable.java
index 3e01a35a7..1ff175ae8 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/SpookyIconDrawable.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/SpookyIconDrawable.java
@@ -131,6 +131,7 @@ public final class SpookyIconDrawable extends Drawable {
}
@Override
+ @SuppressWarnings("deprecation")
public int getOpacity() {
return PixelFormat.TRANSLUCENT;
}