mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 13:47:41 +00:00
FindMyPhone: Calling ring twice now stop the ringing
BUG: 366253
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package org.kde.kdeconnect.Plugins.FindMyPhonePlugin;
|
package org.kde.kdeconnect.Plugins.FindMyPhonePlugin;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.content.Intent;
|
||||||
import android.media.AudioAttributes;
|
import android.media.AudioAttributes;
|
||||||
import android.media.AudioManager;
|
import android.media.AudioManager;
|
||||||
import android.media.Ringtone;
|
import android.media.Ringtone;
|
||||||
@@ -16,6 +17,12 @@ import org.kde.kdeconnect_tp.R;
|
|||||||
public class FindMyPhoneActivity extends Activity {
|
public class FindMyPhoneActivity extends Activity {
|
||||||
Ringtone ringtone;
|
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
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
Reference in New Issue
Block a user