Cleaning Utilities.java
> Removing some unused methods > Moving some specialized methods to corresponding classes > Removing GridProvider check as it is released Bug: 257555083 Test: Presubmit Change-Id: Ib0f8c673d018071d3f4b7d9247e0a35718ab009c Merged-In: Ib0f8c673d018071d3f4b7d9247e0a35718ab009c
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package com.android.launcher3.model;
|
||||
|
||||
import static com.android.launcher3.Utilities.isValidExtraType;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
@@ -149,4 +147,12 @@ public class ModelUtils {
|
||||
info.intent = launchIntent;
|
||||
return info;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the extra is either null or is of type {@param type}
|
||||
*/
|
||||
private static boolean isValidExtraType(Intent intent, String key, Class type) {
|
||||
Object extra = intent.getParcelableExtra(key);
|
||||
return extra == null || type.isInstance(extra);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user