Loading packages/SettingsLib/Tile/src/com/android/settingslib/drawer/Tile.java +8 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_KEYH import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_SUMMARY; import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_SUMMARY_URI; import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_TITLE; import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_TITLE_URI; import static com.android.settingslib.drawer.TileUtils.PROFILE_ALL; import static com.android.settingslib.drawer.TileUtils.PROFILE_PRIMARY; Loading Loading @@ -168,6 +169,11 @@ public class Tile implements Parcelable { ensureMetadataNotStale(context); final PackageManager packageManager = context.getPackageManager(); if (mMetaData.containsKey(META_DATA_PREFERENCE_TITLE)) { if (mMetaData.containsKey(META_DATA_PREFERENCE_TITLE_URI)) { // If has as uri to provide dynamic summary, skip loading here. UI will later load // at tile binding time. return null; } if (mMetaData.get(META_DATA_PREFERENCE_TITLE) instanceof Integer) { try { final Resources res = Loading Loading @@ -211,6 +217,8 @@ public class Tile implements Parcelable { final PackageManager packageManager = context.getPackageManager(); if (mMetaData != null) { if (mMetaData.containsKey(META_DATA_PREFERENCE_SUMMARY_URI)) { // If has as uri to provide dynamic summary, skip loading here. UI will later load // at tile binding time. return null; } if (mMetaData.containsKey(META_DATA_PREFERENCE_SUMMARY)) { Loading packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java +10 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,16 @@ public class TileUtils { */ public static final String META_DATA_PREFERENCE_TITLE = "com.android.settings.title"; /** * Name of the meta-data item that should be set in the AndroidManifest.xml * to specify the content provider providing the title text that should be displayed for the * preference. * * Title provided by the content provider overrides any static title. */ public static final String META_DATA_PREFERENCE_TITLE_URI = "com.android.settings.title_uri"; /** * Name of the meta-data item that should be set in the AndroidManifest.xml * to specify the summary text that should be displayed for the preference. Loading Loading
packages/SettingsLib/Tile/src/com/android/settingslib/drawer/Tile.java +8 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_KEYH import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_SUMMARY; import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_SUMMARY_URI; import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_TITLE; import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_TITLE_URI; import static com.android.settingslib.drawer.TileUtils.PROFILE_ALL; import static com.android.settingslib.drawer.TileUtils.PROFILE_PRIMARY; Loading Loading @@ -168,6 +169,11 @@ public class Tile implements Parcelable { ensureMetadataNotStale(context); final PackageManager packageManager = context.getPackageManager(); if (mMetaData.containsKey(META_DATA_PREFERENCE_TITLE)) { if (mMetaData.containsKey(META_DATA_PREFERENCE_TITLE_URI)) { // If has as uri to provide dynamic summary, skip loading here. UI will later load // at tile binding time. return null; } if (mMetaData.get(META_DATA_PREFERENCE_TITLE) instanceof Integer) { try { final Resources res = Loading Loading @@ -211,6 +217,8 @@ public class Tile implements Parcelable { final PackageManager packageManager = context.getPackageManager(); if (mMetaData != null) { if (mMetaData.containsKey(META_DATA_PREFERENCE_SUMMARY_URI)) { // If has as uri to provide dynamic summary, skip loading here. UI will later load // at tile binding time. return null; } if (mMetaData.containsKey(META_DATA_PREFERENCE_SUMMARY)) { Loading
packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java +10 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,16 @@ public class TileUtils { */ public static final String META_DATA_PREFERENCE_TITLE = "com.android.settings.title"; /** * Name of the meta-data item that should be set in the AndroidManifest.xml * to specify the content provider providing the title text that should be displayed for the * preference. * * Title provided by the content provider overrides any static title. */ public static final String META_DATA_PREFERENCE_TITLE_URI = "com.android.settings.title_uri"; /** * Name of the meta-data item that should be set in the AndroidManifest.xml * to specify the summary text that should be displayed for the preference. Loading