this part of logical is not Intuitive, why not simply
```
permission_needed = []
for permission in options.permissions:
  android_permission = __all__.get(permission, None)
  if android_permission:
    permission_needed.append(android_permission)
for permission in list(set(permission_needed) - set(existing_permission_list)):
  AddElementAttribute(xmldoc, 'uses-permission', 'android:name', permission)