mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 11:09:49 +08:00
Remove the bell shake animation
Fixes https://github.com/termux/termux-packages/issues/628 Fixes https://github.com/termux/termux-app/issues/222
This commit is contained in:
@@ -141,8 +141,6 @@ public final class TermuxActivity extends Activity implements ServiceConnection
|
|||||||
.setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION).build()).build();
|
.setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION).build()).build();
|
||||||
int mBellSoundId;
|
int mBellSoundId;
|
||||||
|
|
||||||
Animation mOnBellAnimation;
|
|
||||||
|
|
||||||
private final BroadcastReceiver mBroadcastReceiever = new BroadcastReceiver() {
|
private final BroadcastReceiver mBroadcastReceiever = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
@@ -213,8 +211,6 @@ public final class TermuxActivity extends Activity implements ServiceConnection
|
|||||||
public void onCreate(Bundle bundle) {
|
public void onCreate(Bundle bundle) {
|
||||||
super.onCreate(bundle);
|
super.onCreate(bundle);
|
||||||
|
|
||||||
mOnBellAnimation = AnimationUtils.loadAnimation(this, R.anim.on_bell);
|
|
||||||
|
|
||||||
mSettings = new TermuxPreferences(this);
|
mSettings = new TermuxPreferences(this);
|
||||||
|
|
||||||
setContentView(R.layout.drawer_layout);
|
setContentView(R.layout.drawer_layout);
|
||||||
@@ -410,8 +406,6 @@ public final class TermuxActivity extends Activity implements ServiceConnection
|
|||||||
public void onBell(TerminalSession session) {
|
public void onBell(TerminalSession session) {
|
||||||
if (!mIsVisible) return;
|
if (!mIsVisible) return;
|
||||||
|
|
||||||
mTerminalView.startAnimation(mOnBellAnimation);
|
|
||||||
|
|
||||||
switch (mSettings.mBellBehaviour) {
|
switch (mSettings.mBellBehaviour) {
|
||||||
case TermuxPreferences.BELL_BEEP:
|
case TermuxPreferences.BELL_BEEP:
|
||||||
mBellSoundPool.play(mBellSoundId, 1.f, 1.f, 1, 0, 1.f);
|
mBellSoundPool.play(mBellSoundId, 1.f, 1.f, 1, 0, 1.f);
|
||||||
|
Reference in New Issue
Block a user