Fix broken test cases

Since we added a new API in ag/11355641,
we need to shadow this new new API.

Fix: 130916962
Test: run robo test
Change-Id: I2176253aae915d1a31043ebbf197d4dd1b1f2072
This commit is contained in:
Tsung-Mao Fang
2020-05-04 17:01:28 +08:00
parent e52353609e
commit 17b882a94d
2 changed files with 20 additions and 12 deletions

View File

@@ -20,6 +20,7 @@ import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.UserHandle;
import com.android.settingslib.Utils;
@@ -29,6 +30,11 @@ import org.robolectric.annotation.Implements;
@Implements(Utils.class)
public class ShadowSettingsLibUtils {
@Implementation
protected static Drawable getBadgedIcon(Context context, Drawable icon, UserHandle user) {
return new ColorDrawable(0);
}
@Implementation
protected static Drawable getBadgedIcon(Context context, ApplicationInfo appInfo) {
return new ColorDrawable(0);