mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
"Implicit intents with startService are not safe" - use an explicit one.
This commit is contained in:
@@ -69,8 +69,8 @@ public class BriarActivity extends RoboFragmentActivity {
|
||||
}
|
||||
|
||||
private void startAndBindService() {
|
||||
startService(new Intent(BriarService.class.getName()));
|
||||
bound = bindService(new Intent(BriarService.class.getName()),
|
||||
startService(new Intent(this, BriarService.class));
|
||||
bound = bindService(new Intent(this, BriarService.class),
|
||||
serviceConnection, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -124,12 +124,10 @@ public class BriarService extends RoboService implements EventListener {
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
if(LOG.isLoggable(INFO)) LOG.info("Started");
|
||||
return START_NOT_STICKY; // Don't restart automatically if killed
|
||||
}
|
||||
|
||||
public IBinder onBind(Intent intent) {
|
||||
if(LOG.isLoggable(INFO)) LOG.info("Bound");
|
||||
return binder;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user