ServiceClientFragment: Connect early if possible
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
5fad89527d
commit
dacd7457d2
@ -21,6 +21,9 @@ abstract class ServiceClientFragment<T> extends Fragment implements ServiceConne
|
||||
@SuppressWarnings("unchecked")
|
||||
final ServiceConnectionProvider<T> localContext = (ServiceConnectionProvider<T>) context;
|
||||
provider = localContext;
|
||||
service = provider.getService();
|
||||
if (service != null)
|
||||
onServiceConnected(service);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user