Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25f5fc24 authored by Federico Baron's avatar Federico Baron Committed by Android (Google) Code Review
Browse files

Merge "Add WidgetPicker screenshot tests" into udc-qpr-dev

parents c2438752 827001a1
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -891,6 +891,19 @@ public class WidgetsFullSheet extends BaseWidgetSheet
        return false;
    }

    /** Gets the sheet for widget picker, which is used for testing. */
    @VisibleForTesting
    public View getSheet() {
        return mContent;
    }

    /** Opens the first header in widget picker and scrolls to the top of the RecyclerView. */
    @VisibleForTesting
    public void openFirstHeader() {
        mAdapters.get(AdapterHolder.PRIMARY).mWidgetsListAdapter.selectFirstHeaderEntry();
        mAdapters.get(AdapterHolder.PRIMARY).mWidgetsRecyclerView.scrollToTop();
    }

    /** A holder class for holding adapters & their corresponding recycler view. */
    final class AdapterHolder {
        static final int PRIMARY = 0;
+11 −0
Original line number Diff line number Diff line
@@ -40,6 +40,17 @@
                       android:resource="@xml/appwidget_no_config"/>
        </receiver>

        <receiver
            android:name="com.android.launcher3.testcomponent.AppWidgetNoConfigLarge"
            android:exported="true"
            android:label="No Config Large">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
            </intent-filter>
            <meta-data android:name="android.appwidget.provider"
                android:resource="@xml/appwidget_no_config_large"/>
        </receiver>

        <receiver
            android:name="com.android.launcher3.testcomponent.AppWdigetHidden"
            android:exported="true"
+15 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:minWidth="1dp"
    android:minHeight="1dp"
    android:minResizeWidth="1dp"
    android:maxResizeWidth="3000dp"
    android:targetCellHeight="1"
    android:targetCellWidth="5"
    android:updatePeriodMillis="86400000"
    android:initialLayout="@layout/test_layout_appwidget_red"
    android:previewLayout="@layout/test_layout_appwidget_red"
    android:resizeMode="horizontal|vertical"
    android:widgetCategory="home_screen">
</appwidget-provider>
 No newline at end of file