Use preference key specified in injected settings.

Bug: 31002801
Test: make RunSettingsRoboTests

Reads in optional metadata field for specifying the key used for an
injected preference.

Change-Id: Ief2ff10c508d42f91906b531cf34906c1c42fdd4
This commit is contained in:
Shahriyar Amini
2016-11-22 15:02:07 -08:00
parent 2e0b608495
commit 6259129d69
2 changed files with 17 additions and 0 deletions

View File

@@ -109,6 +109,9 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
if (tile == null || tile.intent == null) {
return null;
}
if (!TextUtils.isEmpty(tile.key)) {
return tile.key;
}
final StringBuilder sb = new StringBuilder(DASHBOARD_TILE_PREF_KEY_PREFIX);
final ComponentName component = tile.intent.getComponent();
sb.append(component.getClassName());