Update the way to kill the log catcher.

This commit is contained in:
lrh2000 2020-06-23 16:00:00 +08:00 committed by NekoInverter
parent ad40663a75
commit 48a35b0eac
No known key found for this signature in database
GPG Key ID: 280D6CCCF95715F9
1 changed files with 2 additions and 2 deletions

View File

@ -148,14 +148,14 @@ public class SettingsActivity extends BaseActivity {
Preference stopVerboseLog = findPreference("stop_verbose_log");
if (stopVerboseLog != null) {
stopVerboseLog.setOnPreferenceClickListener(preference -> {
areYouSure(R.string.stop_verbose_log_summary, (dialog, which) -> Shell.su("kill $(cat " + verboseLogProcessID.getAbsolutePath() + ")").exec());
areYouSure(R.string.stop_verbose_log_summary, (dialog, which) -> Shell.su("pkill -P $(cat " + verboseLogProcessID.getAbsolutePath() + ")").exec());
return true;
});
}
Preference stopLog = findPreference("stop_log");
if (stopLog != null) {
stopLog.setOnPreferenceClickListener(preference -> {
areYouSure(R.string.stop_log_summary, (dialog, which) -> Shell.su("kill $(cat " + modulesLogProcessID.getAbsolutePath() + ")").exec());
areYouSure(R.string.stop_log_summary, (dialog, which) -> Shell.su("pkill -P $(cat " + modulesLogProcessID.getAbsolutePath() + ")").exec());
return true;
});
}