Clear up unused code
Test: make Bug: 194833441 Change-Id: Icff8fe689626a6e92a119f9ed1a58656d15fbb47
This commit is contained in:
@@ -413,15 +413,6 @@ public class NotificationBackend {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getBlockedAppCount() {
|
|
||||||
try {
|
|
||||||
return sINM.getBlockedAppCount(UserHandle.myUserId());
|
|
||||||
} catch (Exception e) {
|
|
||||||
Log.w(TAG, "Error calling NoMan", e);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean shouldHideSilentStatusBarIcons(Context context) {
|
public boolean shouldHideSilentStatusBarIcons(Context context) {
|
||||||
try {
|
try {
|
||||||
return sINM.shouldHideSilentStatusIcons(context.getPackageName());
|
return sINM.shouldHideSilentStatusIcons(context.getPackageName());
|
||||||
|
@@ -18,8 +18,6 @@ package com.android.settings.notification;
|
|||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
|
|
||||||
import static org.mockito.ArgumentMatchers.anyInt;
|
|
||||||
import static org.mockito.ArgumentMatchers.anyString;
|
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
@@ -27,8 +25,6 @@ import android.content.Context;
|
|||||||
import android.content.pm.ParceledListSlice;
|
import android.content.pm.ParceledListSlice;
|
||||||
import android.service.notification.ConversationChannelWrapper;
|
import android.service.notification.ConversationChannelWrapper;
|
||||||
|
|
||||||
import com.android.settings.testutils.shadow.ShadowNotificationBackend;
|
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
@@ -42,7 +38,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@RunWith(RobolectricTestRunner.class)
|
@RunWith(RobolectricTestRunner.class)
|
||||||
@Config(shadows = ShadowNotificationBackend.class)
|
|
||||||
public class ConversationListSummaryPreferenceControllerTest {
|
public class ConversationListSummaryPreferenceControllerTest {
|
||||||
|
|
||||||
private ConversationListSummaryPreferenceController mController;
|
private ConversationListSummaryPreferenceController mController;
|
||||||
|
@@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2019 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 com.android.settings.notification.NotificationBackend;
|
|
||||||
|
|
||||||
import org.robolectric.annotation.Implementation;
|
|
||||||
import org.robolectric.annotation.Implements;
|
|
||||||
|
|
||||||
@Implements(NotificationBackend.class)
|
|
||||||
public class ShadowNotificationBackend {
|
|
||||||
|
|
||||||
private static int sBlockAppCount;
|
|
||||||
|
|
||||||
@Implementation
|
|
||||||
protected int getBlockedAppCount() {
|
|
||||||
return sBlockAppCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setBlockedAppCount(int blockAppCount) {
|
|
||||||
sBlockAppCount = blockAppCount;
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user