OSDN Git Service

Add a metadata to control whether an external intent should be opened in
authorarangelov <arangelov@google.com>
Wed, 30 May 2018 17:24:23 +0000 (18:24 +0100)
committerAntoan Angelov <arangelov@google.com>
Mon, 25 Jun 2018 13:07:03 +0000 (13:07 +0000)
commit24eec2f6eb855d887beae84af46872d9e388a966
treeebc5b3285a7d929aab40dcf818110a77527415f1
parent43dcdf898c788bba0877229d16c6ae68a497caf6
Add a metadata to control whether an external intent should be opened in
the personal profile when in a managed profile.

This change introduces the com.android.settings.profile metadata with possible values "primary_profile_only" and "all_profiles" (the default value when not specified). If an application declares this metadata with a value of "primary_profile_only", in a work profile the ProfileSelectDialog is never shown and the application is opened straight in the personal profile. If an application specifies a value of "all_profiles" or does not specify anything, the ProfileSelectDialog is shown to the user.

Test: atest frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileTest.java
Bug: 79868199
Change-Id: I82860307e5745f4c7044980225114efcdcf0c90f
packages/SettingsLib/src/com/android/settingslib/drawer/Tile.java
packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileTest.java [new file with mode: 0644]