From 01f90c145d40c005d62e79c1a5f08d1c8e71b456 Mon Sep 17 00:00:00 2001 From: Synced Synapse Date: Thu, 28 Sep 2017 19:52:12 +0100 Subject: [PATCH] Fix unnecessary creation of Handlers --- .../xbmc/kore/ui/sections/remote/NowPlayingFragment.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/xbmc/kore/ui/sections/remote/NowPlayingFragment.java b/app/src/main/java/org/xbmc/kore/ui/sections/remote/NowPlayingFragment.java index ab7ae28..f771930 100644 --- a/app/src/main/java/org/xbmc/kore/ui/sections/remote/NowPlayingFragment.java +++ b/app/src/main/java/org/xbmc/kore/ui/sections/remote/NowPlayingFragment.java @@ -189,7 +189,7 @@ public class NowPlayingFragment extends Fragment @Override public void onVolumeChanged(int volume) { new Application.SetVolume(volume) - .execute(hostManager.getConnection(), defaultIntActionCallback, new Handler()); + .execute(hostManager.getConnection(), defaultIntActionCallback, callbackHandler); } }); @@ -212,7 +212,7 @@ public class NowPlayingFragment extends Fragment @Override public void onVolumeChanged(int volume) { new Application.SetVolume(volume).execute(hostManager.getConnection(), - defaultIntActionCallback, new Handler()); + defaultIntActionCallback, callbackHandler); } }); @@ -306,7 +306,7 @@ public class NowPlayingFragment extends Fragment @OnClick(R.id.volume_mute) public void onVolumeMuteClicked(View v) { Application.SetMute action = new Application.SetMute(); - action.execute(hostManager.getConnection(), defaultBooleanActionCallback, new Handler()); + action.execute(hostManager.getConnection(), defaultBooleanActionCallback, callbackHandler); } @OnClick(R.id.shuffle) @@ -626,7 +626,7 @@ public class NowPlayingFragment extends Fragment public void onError(int errorCode, String description) { LogUtils.LOGD("MediaSeekBar", "Got an error calling Player.Seek. Error code: " + errorCode + ", description: " + description); } - }, new Handler()); + }, callbackHandler); }