code: public static void triggerRebirth(Context context, Intent... nextIntents) {
      Intent intent = new Intent(context, ProcessPhoenix.class);
      intent.addFlags(FLAG_ACTIVITY_NEW_TASK); // In case we are called with non-Activity context.
      intent.putParcelableArrayListExtra(KEY_RESTART_INTENTS, new ArrayList<>(Arrays.asList(nextIntents)));
      context.startActivity(intent);
      if (context instanceof Activity) {
        ((Activity) context).finish();
      }
      Runtime.getRuntime().exit(0); // Kill kill kill!
    }
docs: Call to restart the application process using the specified intents.
  <p>
  Behavior of the current process after invoking this method is undefined.