• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#windowsobjective-ccocoaqt誰得pythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Navigation voice changer app for Android


Commit MetaInfo

Revisionce9e57cfbafa190df6c5015df9a1b9b5c607d107 (tree)
Time2013-07-31 06:15:29
AuthorHMML <hmml3939@gmai...>
CommiterHMML

Log Message

Fix to kill Mpas.

Change Summary

Incremental Difference

--- a/src/jp/nekoteki/android/navivoicechanger/VoiceData.java
+++ b/src/jp/nekoteki/android/navivoicechanger/VoiceData.java
@@ -20,10 +20,14 @@ import java.util.zip.ZipException;
2020 import android.media.MediaPlayer;
2121 import android.net.Uri;
2222 import android.util.Log;
23+import android.app.Activity;
24+import android.app.ActivityManager;
25+import android.app.ActivityManager.RunningAppProcessInfo;
2326 import android.app.AlertDialog;
2427 import android.content.Context;
2528 import android.content.DialogInterface;
2629 import android.content.res.AssetManager;
30+import android.graphics.Paint.Join;
2731
2832 class VoiceDataInstallError extends Exception {};
2933 class DataDirNotFound extends VoiceDataInstallError {};
@@ -441,8 +445,14 @@ public class VoiceData {
441445 // ignore
442446 }
443447
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+
446456
447457 Log.i("VoiceData", "Install finished!");
448458 }