Merge "Add shell command to query if lskf is captured" am: 5b435f9cbc am: d148f09646
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1740613 Change-Id: Ib952412b1990264d123be2ddae4c34c606d9bec3
This commit is contained in:
@@ -44,6 +44,8 @@ public class RecoverySystemShellCommand extends ShellCommand {
|
|||||||
return requestLskf();
|
return requestLskf();
|
||||||
case "clear-lskf":
|
case "clear-lskf":
|
||||||
return clearLskf();
|
return clearLskf();
|
||||||
|
case "is-lskf-captured":
|
||||||
|
return isLskfCaptured();
|
||||||
case "reboot-and-apply":
|
case "reboot-and-apply":
|
||||||
return rebootAndApply();
|
return rebootAndApply();
|
||||||
default:
|
default:
|
||||||
@@ -74,6 +76,14 @@ public class RecoverySystemShellCommand extends ShellCommand {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int isLskfCaptured() throws RemoteException {
|
||||||
|
String packageName = getNextArgRequired();
|
||||||
|
boolean captured = mService.isLskfCaptured(packageName);
|
||||||
|
PrintWriter pw = getOutPrintWriter();
|
||||||
|
pw.printf("%s LSKF capture status: %s\n", packageName, captured ? "true" : "false");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
private int rebootAndApply() throws RemoteException {
|
private int rebootAndApply() throws RemoteException {
|
||||||
String packageName = getNextArgRequired();
|
String packageName = getNextArgRequired();
|
||||||
String rebootReason = getNextArgRequired();
|
String rebootReason = getNextArgRequired();
|
||||||
@@ -90,8 +100,9 @@ public class RecoverySystemShellCommand extends ShellCommand {
|
|||||||
public void onHelp() {
|
public void onHelp() {
|
||||||
PrintWriter pw = getOutPrintWriter();
|
PrintWriter pw = getOutPrintWriter();
|
||||||
pw.println("Recovery system commands:");
|
pw.println("Recovery system commands:");
|
||||||
pw.println(" request-lskf <token>");
|
pw.println(" request-lskf <package_name>");
|
||||||
pw.println(" clear-lskf");
|
pw.println(" clear-lskf");
|
||||||
pw.println(" reboot-and-apply <token> <reason>");
|
pw.println(" is-lskf-captured <package_name>");
|
||||||
|
pw.println(" reboot-and-apply <package_name> <reason>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user