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:
+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