OSDN Git Service

Add Open button to launch instant app.
authorDoris Ling <dling@google.com>
Tue, 20 Feb 2018 21:36:40 +0000 (13:36 -0800)
committerDoris Ling <dling@google.com>
Tue, 20 Feb 2018 21:43:46 +0000 (21:43 +0000)
commitf9ab8ea7bda40eda8a9d4eba4d3848c14570afd1
tree06d4e91d3088e2fc8d1e400c9bfd52c691159758
parentc85e701b3df242f418cdae2a90cedf5cce837857
Add Open button to launch instant app.

- move logic from InstantAppButtonsController into
InstantAppButtonsPreferenceController, as it is not really necessary to
have separate control to be in different class.
- add logic to check if the instant app provides a default launch uri.
If so, show a Open button to launch the uri, and move the Install
button into option menu. If not, Install button remains as is.
- also update the instant app button layout to match the regular 2
buttons layout.

Change-Id: Ibcae780ad697ca93a48604b03c8f4600dd3c0472
Fixes: 69562807
Test: make RunSettingsRoboTests
res/layout/instant_app_buttons.xml
src/com/android/settings/applications/ApplicationFeatureProvider.java
src/com/android/settings/applications/ApplicationFeatureProviderImpl.java
src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
src/com/android/settings/applications/appinfo/InstantAppButtonsPreferenceController.java
src/com/android/settings/applications/instantapps/InstantAppButtonsController.java [deleted file]
tests/robotests/src/com/android/settings/applications/appinfo/InstantAppButtonsPreferenceControllerTest.java
tests/robotests/src/com/android/settings/applications/instantapps/InstantAppButtonsControllerTest.java [deleted file]