minor refactoring: RunCommand => RunCommandService

This commit is contained in:
Leonid Pliushch
2020-06-09 15:48:56 +03:00
parent db3ff7b24a
commit 5b32540635
2 changed files with 4 additions and 4 deletions

View File

@@ -121,7 +121,7 @@
android:exported="false" /> android:exported="false" />
<service <service
android:name=".app.RunCommand" android:name=".app.RunCommandService"
android:exported="true" android:exported="true"
android:permission="com.termux.permission.RUN_COMMAND" > android:permission="com.termux.permission.RUN_COMMAND" >
<intent-filter> <intent-filter>

View File

@@ -30,7 +30,7 @@ import java.util.Properties;
* Sample intent for launching program "top" in equivalent of ADB command: * Sample intent for launching program "top" in equivalent of ADB command:
* am startservice -a com.termux.RUN_COMMAND --es com.termux.RUN_COMMAND_PATH /data/data/com.termux/files/usr/bin/top * am startservice -a com.termux.RUN_COMMAND --es com.termux.RUN_COMMAND_PATH /data/data/com.termux/files/usr/bin/top
*/ */
public class RunCommand extends Service { public class RunCommandService extends Service {
public static final String RUN_COMMAND_ACTION = "com.termux.RUN_COMMAND"; public static final String RUN_COMMAND_ACTION = "com.termux.RUN_COMMAND";
public static final String RUN_COMMAND_PATH = "com.termux.RUN_COMMAND_PATH"; public static final String RUN_COMMAND_PATH = "com.termux.RUN_COMMAND_PATH";
@@ -38,10 +38,10 @@ public class RunCommand extends Service {
public static final String RUN_COMMAND_WORKDIR = "com.termux.RUN_COMMAND_WORKDIR"; public static final String RUN_COMMAND_WORKDIR = "com.termux.RUN_COMMAND_WORKDIR";
class LocalBinder extends Binder { class LocalBinder extends Binder {
public final RunCommand service = RunCommand.this; public final RunCommandService service = RunCommandService.this;
} }
private final IBinder mBinder = new RunCommand.LocalBinder(); private final IBinder mBinder = new RunCommandService.LocalBinder();
@Override @Override
public IBinder onBind(Intent intent) { public IBinder onBind(Intent intent) {