Revert "Revert "Use system-api lib to get badged, shadowed icons(2/n)""
This reverts commit 94b8055f1c
.
Reason for revert: Revert this cl and fix broken test cases.
Change-Id: I61a190b4beba8db2fe2faab45e5dd6921dc681ec
Fix: 149112222
Fix: 149090275
Test: Run all Setting robo tests
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.testutils.shadow;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
import com.android.settingslib.Utils;
|
||||
|
||||
import org.robolectric.annotation.Implementation;
|
||||
import org.robolectric.annotation.Implements;
|
||||
|
||||
@Implements(Utils.class)
|
||||
public class ShadowSettingsLibUtils {
|
||||
|
||||
@Implementation
|
||||
protected static Drawable getBadgedIcon(Context context, ApplicationInfo appInfo) {
|
||||
return new ColorDrawable(0);
|
||||
}
|
||||
}
|
@@ -18,7 +18,10 @@ package com.android.settings.testutils.shadow;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.hardware.fingerprint.FingerprintManager;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
@@ -144,6 +147,11 @@ public class ShadowUtils {
|
||||
return sResultLinks;
|
||||
}
|
||||
|
||||
@Implementation
|
||||
protected static Drawable getBadgedIcon(Context context, ApplicationInfo appInfo) {
|
||||
return new ColorDrawable(0);
|
||||
}
|
||||
|
||||
public static void setHandledDomains(ArraySet<String> links) {
|
||||
sResultLinks = links;
|
||||
}
|
||||
|
Reference in New Issue
Block a user