Merge "Test Fix: Move UnarchiveBroadcastReceiver to AndroidManifest-common to also support NexusLauncher tests." into main

This commit is contained in:
Jakob Schneider
2024-01-26 10:48:09 +00:00
committed by Android (Google) Code Review
4 changed files with 40 additions and 18 deletions

View File

@@ -88,6 +88,14 @@
android:resource="@xml/appwidget_dynamic_colors"/>
</receiver>
<receiver android:name="com.android.launcher3.testcomponent.UnarchiveBroadcastReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.UNARCHIVE_PACKAGE"/>
</intent-filter>
</receiver>
<activity
android:name="com.android.launcher3.testcomponent.WidgetConfigActivity"
android:exported="true">

View File

@@ -23,14 +23,6 @@
<application android:debuggable="true">
<uses-library android:name="android.test.runner" />
<receiver android:name="com.android.launcher3.compat.TaplPromiseIconUiTest$UnarchiveBroadcastReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.UNARCHIVE_PACKAGE"/>
</intent-filter>
</receiver>
</application>
<instrumentation

View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2024 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.launcher3.testcomponent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
/**
* Broadcast Receiver to receive app unarchival broadcast. It is used to fulfill archiving
* platform requirements.
*/
public class UnarchiveBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
}
}

View File

@@ -19,9 +19,6 @@ import static com.android.launcher3.Flags.FLAG_ENABLE_SUPPORT_FOR_ARCHIVING;
import static com.google.common.truth.Truth.assertThat;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInstaller.SessionParams;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
@@ -170,13 +167,6 @@ public class TaplPromiseIconUiTest extends AbstractLauncherUiTest {
mSessionId = -1;
}
// Dummy receiver to fulfill archiving platform requirements, unused in reality.
public static class UnarchiveBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
}
}
private void installDummyAppAndWaitForUIUpdate() throws IOException {
TestUtil.installDummyApp();
mLauncher.waitForModelQueueCleared();