glpi-plugin
glpi-plugin copied to clipboard
WIP Add SIM card PIN policy
Signed-off-by: Domingo Oropeza [email protected]
Changes description
Add policy to set a PIN code for SIM card
Checklist
Please check if your PR fulfills the following specifications:
- [x] Tests for the changes have been added
- [ ] Docs have been added/updated
References
Closes #402 Depends on https://github.com/flyve-mdm/android-mdm-agent/issues/388
A link to the PR for the agent ?
Is it possible to also create a policy to set the PIN2 ?
Is it possible to also create a policy to set the PIN2 ?
This policy was added on the last commit
PR approved, but we need to wait that the agent is ready to handle them. /cc @rafaelje
This PR will probably need to be rebased to solve a merge conflict introduced by #491 (to merge first to repair the develop branch)
I've been searching on Android's API documentation for the minimum version for this policies but I haven't found any information. @rafaelje, could you give us any reference?
The agent is not ready for this policy, I'm not testing yet but looking the code on the response we can do it sending the PIN information to one intent, so we can do it from API 1 to 27
String ussdCode = "**04*"+oldPin+"*"+newPin+"*"+newPin+"#";
startActivity(new Intent("android.intent.action.CALL", Uri.parse("tel:" + ussdCode)));
https://stackoverflow.com/questions/25784141/android-set-or-reset-sim-card-pin-code-programmatically