android: Catch NullPointerException when calling VpnService.prepare()
According to the Play Console this occurs occasionally.
This commit is contained in:
@@ -218,6 +218,12 @@ public class MainActivity extends AppCompatActivity implements OnVpnProfileSelec
|
|||||||
VpnNotSupportedError.showWithMessage(this, R.string.vpn_not_supported_during_lockdown);
|
VpnNotSupportedError.showWithMessage(this, R.string.vpn_not_supported_during_lockdown);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
catch (NullPointerException ex)
|
||||||
|
{
|
||||||
|
/* not sure when this happens exactly, but apparently it does */
|
||||||
|
VpnNotSupportedError.showWithMessage(this, R.string.vpn_not_supported);
|
||||||
|
return;
|
||||||
|
}
|
||||||
/* store profile info until the user grants us permission */
|
/* store profile info until the user grants us permission */
|
||||||
mProfileInfo = profileInfo;
|
mProfileInfo = profileInfo;
|
||||||
if (intent != null)
|
if (intent != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user