Navigation voice changer app for Android
リビジョン | ce9e57cfbafa190df6c5015df9a1b9b5c607d107 (tree) |
---|---|
日時 | 2013-07-31 06:15:29 |
作者 | HMML <hmml3939@gmai...> |
コミッター | HMML |
Fix to kill Mpas.
@@ -20,10 +20,14 @@ import java.util.zip.ZipException; | ||
20 | 20 | import android.media.MediaPlayer; |
21 | 21 | import android.net.Uri; |
22 | 22 | import android.util.Log; |
23 | +import android.app.Activity; | |
24 | +import android.app.ActivityManager; | |
25 | +import android.app.ActivityManager.RunningAppProcessInfo; | |
23 | 26 | import android.app.AlertDialog; |
24 | 27 | import android.content.Context; |
25 | 28 | import android.content.DialogInterface; |
26 | 29 | import android.content.res.AssetManager; |
30 | +import android.graphics.Paint.Join; | |
27 | 31 | |
28 | 32 | class VoiceDataInstallError extends Exception {}; |
29 | 33 | class DataDirNotFound extends VoiceDataInstallError {}; |
@@ -441,8 +445,14 @@ public class VoiceData { | ||
441 | 445 | // ignore |
442 | 446 | } |
443 | 447 | |
444 | - ((android.app.ActivityManager) this.getContext().getSystemService(android.app.Activity.ACTIVITY_SERVICE)) | |
445 | - .killBackgroundProcesses("com.google.android.apps.maps"); | |
448 | + ActivityManager am = ((ActivityManager) this.getContext().getSystemService(Activity.ACTIVITY_SERVICE)); | |
449 | + am.killBackgroundProcesses("com.google.android.apps.maps"); | |
450 | + for (RunningAppProcessInfo pi: am.getRunningAppProcesses()) { | |
451 | + if (pi.processName != "com.google.android.apps.maps") | |
452 | + continue; | |
453 | + android.os.Process.killProcess(pi.pid); | |
454 | + } | |
455 | + | |
446 | 456 | |
447 | 457 | Log.i("VoiceData", "Install finished!"); |
448 | 458 | } |