From b43e0628c2152d7ce3cc0a1cf230ddf9a09d580b Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Fri, 26 Aug 2016 11:04:56 +0200 Subject: [PATCH] FindMyPhone: Calling ring twice now stop the ringing BUG: 366253 --- .../Plugins/FindMyPhonePlugin/FindMyPhoneActivity.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/org/kde/kdeconnect/Plugins/FindMyPhonePlugin/FindMyPhoneActivity.java b/src/org/kde/kdeconnect/Plugins/FindMyPhonePlugin/FindMyPhoneActivity.java index 57b9648f..2c565bff 100644 --- a/src/org/kde/kdeconnect/Plugins/FindMyPhonePlugin/FindMyPhoneActivity.java +++ b/src/org/kde/kdeconnect/Plugins/FindMyPhonePlugin/FindMyPhoneActivity.java @@ -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);