Merge "Fix the NPE in the Settings Tile lib" into udc-d1-dev am: 2be625e241 am: c9564dfc74
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24104812 Change-Id: I16b584b3b20c2647a3913709ecb56f9ce44c8260 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -284,10 +284,10 @@ public abstract class Tile implements Parcelable {
|
||||
* Optional key to use for this tile.
|
||||
*/
|
||||
public String getKey(Context context) {
|
||||
ensureMetadataNotStale(context);
|
||||
if (!hasKey()) {
|
||||
return null;
|
||||
}
|
||||
ensureMetadataNotStale(context);
|
||||
if (mMetaData.get(META_DATA_PREFERENCE_KEYHINT) instanceof Integer) {
|
||||
return context.getResources().getString(mMetaData.getInt(META_DATA_PREFERENCE_KEYHINT));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user