[CDM][NLS] Check if the NLS service has an intent-filter
Bug: 363248394
Test: CTS
Flag: EXEMPT bugfix
Change-Id: Ib79c219cde8d73a218ceb7911f4552d43e384d8e
Merged-In: Ib79c219cde8d73a218ceb7911f4552d43e384d8e
(cherry picked from commit 7ae59a42eb
)
This commit is contained in:
@@ -30,8 +30,6 @@ import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.settings.R;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import org.junit.Test;
|
||||
@@ -44,15 +42,14 @@ import org.robolectric.RuntimeEnvironment;
|
||||
public class NotificationAccessConfirmationActivityTest {
|
||||
|
||||
@Test
|
||||
public void start_showsDialog() {
|
||||
public void start_withMissingIntentFilter_finishes() {
|
||||
ComponentName cn = new ComponentName("com.example", "com.example.SomeService");
|
||||
installPackage(cn.getPackageName(), "X");
|
||||
|
||||
NotificationAccessConfirmationActivity activity = startActivityWithIntent(cn);
|
||||
|
||||
assertThat(activity.isFinishing()).isFalse();
|
||||
assertThat(getDialogText(activity)).isEqualTo(
|
||||
activity.getString(R.string.notification_listener_security_warning_summary, "X"));
|
||||
assertThat(getDialogText(activity)).isNull();
|
||||
assertThat(activity.isFinishing()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user