Commit 29686ee8 authored by Max Lv's avatar Max Lv

fix auto start

parent a3f44403
......@@ -55,7 +55,7 @@
<activity
android:name=".ShadowsocksRunnerActivity"
android:theme="@style/PopupTheme"
android:theme="@android:style/Theme.NoDisplay"
android:launchMode="singleTask">
</activity>
......
......@@ -66,6 +66,7 @@ class ShadowsocksReceiver extends BroadcastReceiver {
if (isAutoConnect && isInstalled) {
val intent = new Intent(context, classOf[ShadowsocksRunnerActivity])
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
context.startActivity(intent)
}
}
......
......@@ -67,6 +67,7 @@ class ShadowsocksRunnerActivity extends Activity {
}
} else {
bgService.start(ConfigUtils.load(settings))
finish()
}
}
override def onServiceDisconnected(name: ComponentName) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment