Use proper types

This commit is contained in:
topjohnwu 2024-06-10 17:37:19 -07:00
parent 1ab0711091
commit d3df1a1b5a
2 changed files with 8 additions and 8 deletions

View File

@ -78,8 +78,8 @@ public final class BuilderImpl extends Shell.Builder {
}
}
private Shell start() {
Shell shell = null;
private ShellImpl start() {
ShellImpl shell = null;
// Root mount master
if (!hasFlags(FLAG_NON_ROOT_SHELL) && hasFlags(FLAG_MOUNT_MASTER)) {
@ -111,7 +111,7 @@ public final class BuilderImpl extends Shell.Builder {
return shell;
}
private Shell exec(String... commands) {
private ShellImpl exec(String... commands) {
try {
Utils.log(TAG, "exec " + TextUtils.join(" ", commands));
Process process = Runtime.getRuntime().exec(commands);
@ -124,7 +124,7 @@ public final class BuilderImpl extends Shell.Builder {
@NonNull
@Override
public Shell build(Process process) {
public ShellImpl build(Process process) {
ShellImpl shell;
try {
shell = new ShellImpl(this, process);
@ -147,7 +147,7 @@ public final class BuilderImpl extends Shell.Builder {
@NonNull
@Override
public Shell build() {
public ShellImpl build() {
if (command != null) {
return exec(command);
} else {

View File

@ -41,8 +41,8 @@ public final class MainShell {
private MainShell() {}
public static synchronized Shell get() {
Shell shell = getCached();
public static synchronized ShellImpl get() {
ShellImpl shell = getCached();
if (shell == null) {
isInitMain = true;
if (mainBuilder == null)
@ -76,7 +76,7 @@ public final class MainShell {
}
}
public static Shell getCached() {
public static ShellImpl getCached() {
synchronized (mainShell) {
ShellImpl s = mainShell[0];
if (s != null && s.getStatus() < 0)