mirror of
https://github.com/fankes/termux-app.git
synced 2025-10-23 04:09:20 +08:00
Remove WakefulBroadcastReceiver usage
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 26
|
compileSdkVersion 27
|
||||||
buildToolsVersion "27.0.0"
|
buildToolsVersion "27.0.0"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.android.support:support-annotations:27.0.0'
|
compile 'com.android.support:support-annotations:27.0.0'
|
||||||
compile "com.android.support:support-core-utils:27.0.0"
|
|
||||||
compile "com.android.support:support-core-ui:27.0.0"
|
compile "com.android.support:support-core-ui:27.0.0"
|
||||||
compile project(":terminal-view")
|
compile project(":terminal-view")
|
||||||
}
|
}
|
||||||
@@ -14,7 +13,7 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.termux"
|
applicationId "com.termux"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 26
|
targetSdkVersion 27
|
||||||
versionCode 54
|
versionCode 54
|
||||||
versionName "0.54"
|
versionName "0.54"
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,6 @@ import android.os.Build;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
import android.support.v4.content.WakefulBroadcastReceiver;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
|
|
||||||
@@ -157,11 +156,6 @@ public final class TermuxService extends Service implements SessionChangedCallba
|
|||||||
Log.e(EmulatorDebug.LOG_TAG, "Unknown TermuxService action: '" + action + "'");
|
Log.e(EmulatorDebug.LOG_TAG, "Unknown TermuxService action: '" + action + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((flags & START_FLAG_REDELIVERY) == 0) {
|
|
||||||
// Service is started by WBR, not restarted by system, so release the WakeLock from WBR.
|
|
||||||
WakefulBroadcastReceiver.completeWakefulIntent(intent);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If this service really do get killed, there is no point restarting it automatically - let the user do on next
|
// If this service really do get killed, there is no point restarting it automatically - let the user do on next
|
||||||
// start of {@link Term):
|
// start of {@link Term):
|
||||||
return Service.START_NOT_STICKY;
|
return Service.START_NOT_STICKY;
|
||||||
|
Reference in New Issue
Block a user