Skip to content

Commit

Permalink
Remove currentActivity from TvApp
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanvelzen committed Mar 28, 2022
1 parent 083e7c1 commit b090868
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 42 deletions.
16 changes: 0 additions & 16 deletions app/src/main/java/org/jellyfin/androidtv/TvApp.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.jellyfin.androidtv;

import android.app.Activity;
import android.app.Application;

import androidx.annotation.Nullable;
Expand All @@ -24,8 +23,6 @@ public class TvApp extends Application {
private BaseItemDto lastPlayedItem;
private PlaybackController playbackController;

private Activity currentActivity;

@Override
public void onCreate() {
super.onCreate();
Expand Down Expand Up @@ -55,19 +52,6 @@ public void setCurrentUser(UserDto currentUser) {
TvManager.clearCache();
}

/**
* @deprecated This function is causing a **lot** of issues because not all activities will set their self as "currentactivity". Try to receive a Context instance instead.
*/
@Deprecated
@Nullable
public Activity getCurrentActivity() {
return currentActivity;
}

public void setCurrentActivity(Activity activity) {
currentActivity = activity;
}

@Nullable
public PlaybackController getPlaybackController() {
return playbackController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ package org.jellyfin.androidtv.di
import android.app.Application
import org.jellyfin.androidtv.ui.shared.AppThemeCallbacks
import org.jellyfin.androidtv.ui.shared.AuthenticatedUserCallbacks
import org.jellyfin.androidtv.ui.shared.CurrentActivityCallbacks
import org.koin.dsl.bind
import org.koin.dsl.module

val activityLifecycleCallbacksModule = module {
single { AuthenticatedUserCallbacks(get()) } bind Application.ActivityLifecycleCallbacks::class
single { AppThemeCallbacks(get()) } bind Application.ActivityLifecycleCallbacks::class
single { CurrentActivityCallbacks() } bind Application.ActivityLifecycleCallbacks::class
}

This file was deleted.

0 comments on commit b090868

Please sign in to comment.