コード例 #1
0
 @Override
 public void execute(IEvent e) {
   if (model.isMute() || model.getVolume() == 0) {
     return;
   }
   service.sendData(new SocketMessage(Protocol.PlayerVolume, (int) (model.getVolume() * 0.2)));
 }
コード例 #2
0
 public void execute(IEvent e) {
   model.setConnectionState(e.getDataString());
   if (model.getIsConnectionActive()) {
     service.sendData(new SocketMessage(Protocol.Player, Protocol.Request, "Android"));
   } else {
     notificationService.cancelNotification(NotificationService.NOW_PLAYING_PLACEHOLDER);
   }
 }