Skip to content

Commit

Permalink
Optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp0002 committed Feb 2, 2025
1 parent 0ae9407 commit db8a8d1
Show file tree
Hide file tree
Showing 30 changed files with 25 additions and 78 deletions.
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="de.hahnphilipp.watchwithfritzbox">

<uses-feature
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import org.threeten.bp.ZoneId
import org.threeten.bp.ZoneOffset
import org.threeten.bp.format.DateTimeFormatter
import org.threeten.bp.temporal.ChronoUnit
import java.util.*
import java.util.Locale
import java.util.concurrent.TimeUnit

abstract class ProgramGuideFragment<T> : Fragment(), ProgramGuideManager.Listener,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import android.view.View
import android.view.ViewTreeObserver
import androidx.leanback.widget.VerticalGridView
import com.egeniq.androidtvprogramguide.entity.ProgramGuideSchedule
import com.egeniq.androidtvprogramguide.item.ProgramGuideItemView
import com.egeniq.androidtvprogramguide.util.OnRepeatedKeyInterceptListener
import com.egeniq.androidtvprogramguide.util.ProgramGuideUtil
import com.egeniq.androidtvprogramguide.item.ProgramGuideItemView
import de.hahnphilipp.watchwithfritzbox.R
import java.util.concurrent.TimeUnit
import kotlin.math.max
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ import com.egeniq.androidtvprogramguide.ProgramGuideManager
import com.egeniq.androidtvprogramguide.entity.ProgramGuideChannel
import com.egeniq.androidtvprogramguide.entity.ProgramGuideSchedule
import de.hahnphilipp.watchwithfritzbox.R
import de.hahnphilipp.watchwithfritzbox.utils.ChannelUtils
import java.util.*

/**
* Adapts the [ProgramGuideListAdapter] list to the body of the program guide table.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import androidx.recyclerview.widget.LinearLayoutManager
import com.egeniq.androidtvprogramguide.ProgramGuideHolder
import com.egeniq.androidtvprogramguide.ProgramGuideManager
import com.egeniq.androidtvprogramguide.entity.ProgramGuideChannel
import com.egeniq.androidtvprogramguide.item.ProgramGuideItemView
import com.egeniq.androidtvprogramguide.timeline.ProgramGuideTimelineGridView
import com.egeniq.androidtvprogramguide.util.ProgramGuideUtil
import com.egeniq.androidtvprogramguide.item.ProgramGuideItemView
import de.hahnphilipp.watchwithfritzbox.R
import java.util.concurrent.TimeUnit
import kotlin.math.max
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import org.threeten.bp.LocalDateTime
import org.threeten.bp.ZoneId
import org.threeten.bp.ZoneOffset
import org.threeten.bp.ZonedDateTime
import java.util.Date
import java.util.TimeZone

object FixedLocalDateTime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import android.view.ViewGroup
import android.view.ViewParent
import com.egeniq.androidtvprogramguide.entity.ProgramGuideSchedule
import com.egeniq.androidtvprogramguide.item.ProgramGuideItemView
import java.util.*
import java.util.concurrent.TimeUnit

object ProgramGuideUtil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;

/**
* This parser is based on http://ss-iptv.com/en/users/documents/m3u
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@

import android.os.AsyncTask;

import com.w3ma.m3u8parser.data.Playlist;
import com.w3ma.m3u8parser.exception.PlaylistParseException;
import com.w3ma.m3u8parser.parser.M3U8Parser;
import com.w3ma.m3u8parser.scanner.M3U8ItemScanner;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.text.ParseException;


public class AsyncLogcatReader extends AsyncTask<Void, Void, Void> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.os.AsyncTask;


import com.google.gson.JsonArray;
import com.google.gson.JsonParser;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
package de.hahnphilipp.watchwithfritzbox.epg;

import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

import android.text.Spanned;
import android.text.SpannedString;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.egeniq.androidtvprogramguide.ProgramGuideFragment;
import com.egeniq.androidtvprogramguide.entity.ProgramGuideChannel;
Expand All @@ -24,7 +20,6 @@
import java.util.List;
import java.util.stream.Collectors;

import de.hahnphilipp.watchwithfritzbox.R;
import de.hahnphilipp.watchwithfritzbox.utils.ChannelUtils;
import de.hahnphilipp.watchwithfritzbox.utils.EpgUtils;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package de.hahnphilipp.watchwithfritzbox.epg;

import android.content.Context;
import android.util.Log;

import java.util.ArrayList;
import java.util.HashMap;

import de.hahnphilipp.watchwithfritzbox.async.AsyncLogcatReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package de.hahnphilipp.watchwithfritzbox.player;

import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.net.Uri;
import android.view.LayoutInflater;
import android.view.View;
Expand All @@ -13,7 +10,6 @@
import androidx.annotation.NonNull;
import androidx.cardview.widget.CardView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.widget.ImageViewCompat;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;

Expand All @@ -31,9 +27,9 @@
public class TVChannelListOverlayRecyclerAdapter extends RecyclerView.Adapter<TVChannelListOverlayRecyclerAdapter.ChannelInfoViewHolder> {

public ArrayList<ChannelUtils.Channel> objects;
private Fragment context;
private final Fragment context;
public int selectedChannel = -1;
private RecyclerView recyclerView;
private final RecyclerView recyclerView;

int focus = 0;

Expand All @@ -43,7 +39,6 @@ public TVChannelListOverlayRecyclerAdapter(Fragment context, ArrayList<ChannelUt
this.recyclerView = recyclerView;
}


@NonNull
@Override
public ChannelInfoViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,19 @@

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentTransaction;

import java.util.ArrayList;
import java.util.Timer;
import java.util.TimerTask;

import org.videolan.libvlc.IVLCVout;
import org.videolan.libvlc.LibVLC;
import org.videolan.libvlc.Media;
import org.videolan.libvlc.MediaPlayer;

import java.util.ArrayList;
import java.util.Timer;
import java.util.TimerTask;

import de.hahnphilipp.watchwithfritzbox.R;
import de.hahnphilipp.watchwithfritzbox.epg.LogcatEpgReader;
import de.hahnphilipp.watchwithfritzbox.utils.ChannelUtils;
import de.hahnphilipp.watchwithfritzbox.R;
import de.hahnphilipp.watchwithfritzbox.utils.KeyDownReceiver;

public class TVPlayerActivity extends FragmentActivity implements MediaPlayer.EventListener {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package de.hahnphilipp.watchwithfritzbox.rich;

import static android.media.tv.TvTrackInfo.TYPE_AUDIO;
import static android.media.tv.TvTrackInfo.TYPE_SUBTITLE;
import static android.media.tv.TvTrackInfo.TYPE_VIDEO;

import android.content.Context;
import android.content.res.Resources;
import android.media.tv.TvInputManager;
Expand All @@ -8,12 +12,10 @@
import android.net.Uri;
import android.os.Build;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Surface;

import androidx.annotation.Nullable;


import org.videolan.libvlc.IVLCVout;
import org.videolan.libvlc.LibVLC;
import org.videolan.libvlc.Media;
Expand All @@ -23,13 +25,7 @@
import java.util.Locale;
import java.util.Map;

import static android.media.tv.TvTrackInfo.TYPE_AUDIO;
import static android.media.tv.TvTrackInfo.TYPE_SUBTITLE;
import static android.media.tv.TvTrackInfo.TYPE_VIDEO;

import de.hahnphilipp.watchwithfritzbox.utils.ChannelUtils;
import kotlin.Unit;
import kotlinx.coroutines.CompletableDeferred;

public class RichTvInputService extends TvInputService {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import androidx.tvprovider.media.tv.Channel;


import java.util.ArrayList;
import java.util.HashMap;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@
import android.content.SharedPreferences;

import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;

import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Type;
import java.net.URLEncoder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.LinkedList;

import de.hahnphilipp.watchwithfritzbox.R;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

public class FocusRecyclerView extends RecyclerView {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package de.hahnphilipp.watchwithfritzbox.utils;

import java.io.*;
import java.net.*;
import java.util.*;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.util.Collections;
import java.util.List;
//import org.apache.http.conn.util.InetAddressUtils;

public class IPUtils {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
import android.content.Context;
import android.net.nsd.NsdManager;
import android.net.nsd.NsdServiceInfo;
import android.net.wifi.WifiManager;
import android.text.format.Formatter;
import android.util.Log;

import java.util.HashSet;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import de.hahnphilipp.watchwithfritzbox.utils.IPUtils;

Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_rich_tv_input_setup.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_setup_ip.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/setup_ip_activity_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_setup_order.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/setup_search_activity_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_setup_search.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/setup_search_activity_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_showcase_gestures.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/setup_ip_activity_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/overlay_settings_item.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/programguide_item_filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
-->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/programguide_item_time.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
~ limitations under the License.
-->

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<TextView xmlns:tools="http://schemas.android.com/tools"
style="@style/ProgramGuide.Text.Time"
tools:background="@color/programguide_content_background"
tools:text="8:00" />

0 comments on commit db8a8d1

Please sign in to comment.