Get entitlement configuration from intent extra

Note: This change is copied from ag/11524847.
Car's developeroptions test copied the Settings source code.

Tethering resource configuration is move from framwork to tethering
module. The resource would not be accessible from outside of tethering
module.
List the replacements of framework resources usage and intent extra:
1. R.string.config_mobile_hotspot_provision_response
    --> android.net.extra.TETHER_PROVISIONING_RESPONSE.
2. R.string.config_mobile_hotspot_provision_app_no_ui
    --> android.net.extra.TETHER_UI_PROVISIONING_APP_NAME
3. R.array.config_mobile_hotspot_provision_app
    --> android.net.extra.TETHER_SILENT_PROVISIONING_ACTION

Note: They are not APIs because of API freeze. Now both tethering module
and Settings define these strings independently. Will replace hard code
string as tethering module-lib APIs in b/159085857.

Also move the entitlement response intent registeration from onCreated
to onStartCommand, this can avoid wrong intent registeration if subId
changed between onCreate and when the intent arrived.

Bug: 146918263
Test: m
Change-Id: Ifac727eff37260bbb391d2e5fe0a510ef8276f2d
Merged-In: Ifac727eff37260bbb391d2e5fe0a510ef8276f2d
2 files changed
tree: 637e32acfd0a633acdecdc96148aa629b52a9201
  1. .clang-format
  2. .gitignore
  3. Android.mk
  4. CleanSpec.mk
  5. EncryptionRunner/
  6. FrameworkPackageStubs/
  7. OWNERS
  8. PREUPLOAD.cfg
  9. README.md
  10. car-bugreportd/
  11. car-default-input-service/
  12. car-lib/
  13. car-maps-placeholder/
  14. car-systemtest-lib/
  15. car-test-lib/
  16. car-usb-handler/
  17. car_product/
  18. evs/
  19. obd2-lib/
  20. procfs-inspector/
  21. service/
  22. tests/
  23. tools/
  24. user/
  25. vehicle-hal-support-lib/
README.md

Native (C++) code format is required to be compatible with .clang-format file. Run

git clang-format --style=file --extension='h,cpp,cc' HEAD~

Note that clang-format is not desirable for Android java files. Therefore the command line above is limited to specific extensions.