mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-25 19:51:10 +01:00
Add VolumeUp+V to show volume control
This commit is contained in:
parent
b2b39abacd
commit
497fc3ecd0
1 changed files with 5 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ import android.graphics.Canvas;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.graphics.drawable.BitmapDrawable;
|
import android.graphics.drawable.BitmapDrawable;
|
||||||
|
import android.media.AudioManager;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
@ -692,6 +693,10 @@ public final class TerminalView extends View {
|
||||||
// As left alt+b, jumping forward in readline:
|
// As left alt+b, jumping forward in readline:
|
||||||
codePoint = 'b';
|
codePoint = 'b';
|
||||||
leftAltDownFromEvent = true;
|
leftAltDownFromEvent = true;
|
||||||
|
} else if (codePoint == 'v' || codePoint == 'V') {
|
||||||
|
codePoint = -1;
|
||||||
|
AudioManager audio = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
|
||||||
|
audio.adjustSuggestedStreamVolume(AudioManager.ADJUST_SAME, AudioManager.USE_DEFAULT_STREAM_TYPE, AudioManager.FLAG_SHOW_UI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue