Skip to content

Commit

Permalink
Fix getting EuiccManager
Browse files Browse the repository at this point in the history
  • Loading branch information
MargusSalk committed Aug 8, 2024
1 parent 620a2c3 commit fddd8f6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ public class EsimModule {

@RequiresApi(api = Build.VERSION_CODES.P)
public EuiccManager getMgr() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P || mgr == null) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
return null;
}

if (mgr != null) {
return mgr;
}

mgr = (EuiccManager) mReactContext.getSystemService(EUICC_SERVICE);
return mgr;
}
Expand Down

0 comments on commit fddd8f6

Please sign in to comment.