android: Don't update state fragment if not attached to an Activity
When the bound state service finally connects we might not actually be attached to an Activity.
This commit is contained in:
1 parent
b14507dd90
commit
9c4607b454
1 file changed
+5
+5
@@ -189,6 +189,11 @@ public class VpnStateFragment extends Fragment implements VpnStateListener
|
||||
ImcState imcState = mService.getImcState();
|
||||
String name = "";
|
||||
|
||||
if (getActivity() == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (profile != null)
|
||||
{
|
||||
name = profile.getName();
|
||||
|
||||
Reference in new issue
Block a user