Commit Graph

6 Commits

Author SHA1 Message Date
Po-Chien Hsueh
91508ea20d Use setEnable() when there is an installed image
We can now use setEnable() to tell GsiService that we would like
run in DynamicSystem on the next restart, if there is a system
image installed.

Bug: 124613126
Test: Tap the button and setEnabe() is invoked.
Change-Id: I74312af0c87548981ecb4e1ac9a1f3814304a4d5
2019-04-03 07:54:54 +00:00
Po-Chien Hsueh
4167b42f89 Use FeatureFlagPersistent to guard DynamicSystem
Check persistent feature flag 'settings_dynamic_system' before
invoking the installation service. User can still use gsi_tool if
the device is unlocked.

Bug: 119647479
Test: Verified with 'adb shell am' and test app.
Change-Id: If2265d877bc7eedf9b7a107bba04d2e95cf1b89a
2019-04-03 10:29:31 +08:00
Po-Chien Hsueh
6762e2b661 Add a permission, INSTALL_DYNAMIC_SYSTEM
We already have a permission, MANAGE_DYNAMIC_SYSTEM, whose protection
level is signature. Only platform applications holding it can interact
directly with DynamicSystemService, a wrapper of native GsiService. In
our design, DynamicSystemInstallationService is the sole platform app
holding it.

Then we need another permission for non-platform but privileged apps.
This new permission doesn't give apps access to DynamicSystemService,
but only to system API DynamicSystemClient. DynamicSystemClient works
with underneath DynamicSystemInstallationService and allows privileged
apps to install DynamicSystem images and get status updates in our
designed manner.


Bug: 128982216
Test: verified using DynamicSystemClient.
Change-Id: I3e67322511e3ab08db87bfad40d8c3d3cf6fdfe5
2019-03-25 15:55:39 +00:00
Po-Chien Hsueh
c51cf0f76a Send URL using Uri instead of String
Per API review, send the system image file path to the installation
service using Uri.

Bug: 126613281
Test: adb shell am start-activity -d URL
Change-Id: Ib46d3604c16a981b4ae1a571afa96ffdda7a7262
2019-03-21 17:26:20 +08:00
Po-Chien Hsueh
a5bd084a44 Pass exception detail to API user
Per API review, DynamicSystem installation service will also pass
exceptions to users of DynamicSystemClient.

Bug: 126613281
Test: build and run, verified with test app.
Change-Id: I413d6137837eaa968f59550f110da34cea66d4d4
2019-03-21 17:26:09 +08:00
Po-Chien Hsueh
4e908c24ca API review followup: DynamicAndroidClient
Some API changes per API reivew:
- Move DynamicAndroidClient and ~Manager to android.os.image.
- Rename them to DynamicSystemClient and ~Manager.
- Rename permission MANAGE_DYNAMIC_ANDROID to MANAGE_DYNAMIC_SYSTEM
- Corresponding changes in the installation service.
- Corresponding changes in privapp-permissions-platform.xml.
- Add missing annotations.
- Change setOnStatusChangedListener's parameters order.
- Improve documentations.
- Re-generate api/system-current.txt.

Bug: 126613281
Test: adb shell am
Change-Id: Ia920e9ccf6de1dbbd38c52910cb72cb81b9b5b32
2019-03-21 17:25:59 +08:00