private void makeAppNotRespondingLocked(
     ProcessRecord app, String activity, String shortMsg, String longMsg) {
   app.notResponding = true;
   app.notRespondingReport =
       generateProcessError(
           app,
           ActivityManager.ProcessErrorStateInfo.NOT_RESPONDING,
           activity,
           shortMsg,
           longMsg,
           null);
   startAppProblemLocked(app);
   app.stopFreezingAllLocked();
 }
 void killAppAtUserRequestLocked(ProcessRecord app, Dialog fromDialog) {
   app.crashing = false;
   app.crashingReport = null;
   app.notResponding = false;
   app.notRespondingReport = null;
   if (app.anrDialog == fromDialog) {
     app.anrDialog = null;
   }
   if (app.waitDialog == fromDialog) {
     app.waitDialog = null;
   }
   if (app.pid > 0 && app.pid != MY_PID) {
     handleAppCrashLocked(
         app,
         "user-terminated" /*reason*/,
         null /*shortMsg*/,
         null /*longMsg*/,
         null /*stackTrace*/,
         null /*data*/);
     app.kill("user request after error", true);
   }
 }