Skip to content

Commit

Permalink
Fix unnecessary creation of Handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
SyncedSynapse committed Sep 28, 2017
1 parent 324d1e6 commit 01f90c1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
@Override
public void onVolumeChanged(int volume) {
new Application.SetVolume(volume)
.execute(hostManager.getConnection(), defaultIntActionCallback, new Handler());
.execute(hostManager.getConnection(), defaultIntActionCallback, callbackHandler);
}
});

Expand All @@ -212,7 +212,7 @@ public void onScrollChanged() {
@Override
public void onVolumeChanged(int volume) {
new Application.SetVolume(volume).execute(hostManager.getConnection(),
defaultIntActionCallback, new Handler());
defaultIntActionCallback, callbackHandler);
}
});

Expand Down Expand Up @@ -306,7 +306,7 @@ public void onNextClicked(View v) {
@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)
Expand Down Expand Up @@ -626,7 +626,7 @@ public void onSuccess(PlayerType.SeekReturnType result) {
public void onError(int errorCode, String description) {
LogUtils.LOGD("MediaSeekBar", "Got an error calling Player.Seek. Error code: " + errorCode + ", description: " + description);
}
}, new Handler());
}, callbackHandler);


}
Expand Down

0 comments on commit 01f90c1

Please sign in to comment.