content: package io.alcatraz.audiohq.services;
  
  import android.accessibilityservice.AccessibilityService;
  import android.content.Intent;
  import android.util.Log;
  import android.view.KeyEvent;
  import android.view.accessibility.AccessibilityEvent;
  
  import io.alcatraz.audiohq.LogBuff;
  
  public class Discharger extends AccessibilityService {
      static Discharger mService;
  
      @Override
      protected void onServiceConnected() {
          super.onServiceConnected();
          mService = this;
      }
  
      @Override
      public void onAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
  
      }
  
      @Override
      public void onInterrupt() {
          mService = null;
      }
  
      @Override
      protected boolean onKeyEvent(KeyEvent event) {
          if (event.getKeyCode() == KeyEvent.KEYCODE_VOLUME_UP || event.getKeyCode() == KeyEvent.KEYCODE_VOLUME_DOWN) {
              if (event.getAction() == KeyEvent.ACTION_DOWN) {
                  sendBroadcast(new Intent().setAction(FloatPanelService.AHQ_FLOAT_TRIGGER_ACTION));
              }
          }
          return false;
      }
  }
  