Skip to content

Commit

Permalink
Casting volume fix: disable normalize
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliskov committed Jan 5, 2025
1 parent 999af7a commit 6703fdf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

public class RemoteController extends BasePlayerController implements OnDataChange {
private static final String TAG = RemoteController.class.getSimpleName();
private static final boolean NORMALIZE = false;
private final RemoteControlService mRemoteControlService;
private final RemoteControlData mRemoteControlData;
private Disposable mListeningAction;
Expand Down Expand Up @@ -323,10 +324,10 @@ private void processCommand(Command command) {
break;
case Command.TYPE_VOLUME:
//Utils.setGlobalVolume(getActivity(), command.getVolume());
Utils.setVolume(getContext(), getPlayer(), command.getVolume(), true);
Utils.setVolume(getContext(), getPlayer(), command.getVolume(), NORMALIZE);

//postVolumeChange(Utils.getGlobalVolume(getActivity()));
postVolumeChange(Utils.getVolume(getContext(), getPlayer(), true)); // Just in case volume cannot be changed (e.g. Fire TV stick)
postVolumeChange(Utils.getVolume(getContext(), getPlayer(), NORMALIZE)); // Just in case volume cannot be changed (e.g. Fire TV stick)
break;
case Command.TYPE_STOP:
// Close player
Expand Down Expand Up @@ -414,7 +415,7 @@ private void processCommand(Command command) {
@Override
public boolean onKeyDown(int keyCode) {
//postVolumeChange(Utils.getGlobalVolume(getActivity()));
postVolumeChange(Utils.getVolume(getContext(), getPlayer(), true));
postVolumeChange(Utils.getVolume(getContext(), getPlayer(), NORMALIZE));

return false;
}
Expand Down
4 changes: 2 additions & 2 deletions smarttubetv/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ android {
applicationId "com.liskovsoft.smarttubetv"
minSdkVersion project.properties.minSdkVersion
targetSdkVersion project.properties.targetSdkVersion
versionCode 1720
versionName "25.30"
versionCode 1723
versionName "25.33"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L"

Expand Down

0 comments on commit 6703fdf

Please sign in to comment.