mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
Merge pull request #1650 from nextcloud/bugfix/noid/housekeepingVibrateAway
Cleanup code after custom vibrate code removal
This commit is contained in:
commit
888a7f2b78
@ -31,7 +31,6 @@ import android.media.MediaPlayer;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Vibrator;
|
|
||||||
import android.renderscript.RenderScript;
|
import android.renderscript.RenderScript;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@ -149,7 +148,6 @@ public class CallNotificationController extends BaseController {
|
|||||||
private MediaPlayer mediaPlayer;
|
private MediaPlayer mediaPlayer;
|
||||||
private boolean leavingScreen = false;
|
private boolean leavingScreen = false;
|
||||||
private RenderScript renderScript;
|
private RenderScript renderScript;
|
||||||
private Vibrator vibrator;
|
|
||||||
private Handler handler;
|
private Handler handler;
|
||||||
|
|
||||||
public CallNotificationController(Bundle args) {
|
public CallNotificationController(Bundle args) {
|
||||||
@ -443,7 +441,7 @@ public class CallNotificationController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void endMediaAndVibratorNotifications() {
|
private void endMediaNotifications() {
|
||||||
if (mediaPlayer != null) {
|
if (mediaPlayer != null) {
|
||||||
if (mediaPlayer.isPlaying()) {
|
if (mediaPlayer.isPlaying()) {
|
||||||
mediaPlayer.stop();
|
mediaPlayer.stop();
|
||||||
@ -452,10 +450,6 @@ public class CallNotificationController extends BaseController {
|
|||||||
mediaPlayer.release();
|
mediaPlayer.release();
|
||||||
mediaPlayer = null;
|
mediaPlayer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vibrator != null) {
|
|
||||||
vibrator.cancel();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -467,7 +461,7 @@ public class CallNotificationController extends BaseController {
|
|||||||
handler = null;
|
handler = null;
|
||||||
}
|
}
|
||||||
dispose();
|
dispose();
|
||||||
endMediaAndVibratorNotifications();
|
endMediaNotifications();
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user