Exemple #1
0
  private void regWatchers(int parentPid) {
    if (mProcessWatcher == null) {
      mProcessWatcher = new ProcessWatcher(parentPid, this);
    } else {
      mProcessWatcher.stop();
    }
    mProcessWatcher.start();

    if (mUninstallWatcher == null) {
      mUninstallWatcher = new UninstallWatcher(getContext().getPackageName(), this);
    } else {
      mUninstallWatcher.stop();
    }
    mUninstallWatcher.start();
  }