mirror of
https://github.com/topjohnwu/libsu.git
synced 2024-11-26 21:40:42 +00:00
Use proper types
This commit is contained in:
parent
1ab0711091
commit
d3df1a1b5a
@ -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 {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user