2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-29 13:17:43 +00:00

FindMyPhone: Calling ring twice now stop the ringing

BUG: 366253
This commit is contained in:
Albert Vaca 2016-08-26 11:04:56 +02:00
parent fdd6de5cee
commit b43e0628c2

View File

@ -1,6 +1,7 @@
package org.kde.kdeconnect.Plugins.FindMyPhonePlugin;
import android.app.Activity;
import android.content.Intent;
import android.media.AudioAttributes;
import android.media.AudioManager;
import android.media.Ringtone;
@ -16,6 +17,12 @@ import org.kde.kdeconnect_tp.R;
public class FindMyPhoneActivity extends Activity {
Ringtone ringtone;
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
finish(); //If this activity was already open and we received the ring packet again, just finish it
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);