summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoshiaki Naka <yoshiaki.naka@sony.com>2019-03-06 20:11:44 +0900
committerMichael Bestas <mkbestas@lineageos.org>2020-05-23 21:10:31 +0300
commit0ef7cb58adb20c613823b966c98770b6b85a8c6b (patch)
treef078ab327ca9c56599fed225cf0b759145acbb3e
parent3265cb271c317f6f62680ffc619b23229ea0828d (diff)
downloadandroid_packages_apps_Stk-0ef7cb58adb20c613823b966c98770b6b85a8c6b.tar.gz
android_packages_apps_Stk-0ef7cb58adb20c613823b966c98770b6b85a8c6b.tar.bz2
android_packages_apps_Stk-0ef7cb58adb20c613823b966c98770b6b85a8c6b.zip
Consider long system notification sound set by user
User can change the system notification sound from a simple tone to a long music though it is not a major user scenario. It is better not to play the notification sound when SIM Toolkit application launch a dialog or activity for DISPLAY TEXT or GET INKEY/INPUT commands. Bug: 128811547 Test: Confirmed that the sound is started only when the keyguard exists. Change-Id: Icd378bdce15a4cd77a5dc9e496f6dcf0b242664e
-rw-r--r--src/com/android/stk/StkAppService.java17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java
index ea021b6..f7b47a6 100644
--- a/src/com/android/stk/StkAppService.java
+++ b/src/com/android/stk/StkAppService.java
@@ -40,7 +40,6 @@ import android.content.res.Resources;
import android.content.res.Resources.NotFoundException;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
-import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
@@ -1627,22 +1626,6 @@ public class StkAppService extends Service implements Runnable {
// if user cannot see the message from the card right now because of it.
// The notification can be dismissed if user removed the keyguard screen.
launchNotificationOnKeyguard(slotId, message);
- } else if (!(pm.isInteractive() && isTopOfStack())) {
- // User might be doing something but it is not related to the SIM Toolkit.
- // Play the tone and do vibration in order to attract user's attention.
- // User will see the input screen or the dialog soon in this case.
- NotificationChannel channel = mNotificationManager
- .getNotificationChannel(STK_NOTIFICATION_CHANNEL_ID);
- Uri uri = channel.getSound();
- if (uri != null && !Uri.EMPTY.equals(uri)
- && (NotificationManager.IMPORTANCE_LOW) < channel.getImportance()) {
- RingtoneManager.getRingtone(getApplicationContext(), uri).play();
- }
- long[] pattern = channel.getVibrationPattern();
- if (pattern != null && channel.shouldVibrate()) {
- ((Vibrator) this.getSystemService(Context.VIBRATOR_SERVICE))
- .vibrate(pattern, -1);
- }
}
// Turn on the screen.