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

Commit 5c50e8d1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Adds a valid Activity target for Bubble metadata"

parents 8cfc6d83 a9fbb6ed
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -68,6 +68,13 @@
            </intent-filter>
        </receiver>

        <activity android:name="com.android.systemui.bubbles.BubblesTestActivity"
            android:allowEmbedded="true"
            android:documentLaunchMode="always"
            android:excludeFromRecents="true"
            android:exported="false"
            android:resizeableActivity="true" />

        <provider
            android:name="androidx.lifecycle.ProcessLifecycleOwnerInitializer"
            tools:replace="android:authorities"
+34 −0
Original line number Diff line number Diff line
/*
 * 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.systemui.bubbles;

import android.app.Activity;
import android.os.Bundle;

import com.android.systemui.R;

/**
 * Referenced by NotificationTestHelper#makeBubbleMetadata
 */
public class BubblesTestActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}
+3 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.view.LayoutInflater;
import android.widget.RemoteViews;

import com.android.systemui.R;
import com.android.systemui.bubbles.BubblesTestActivity;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.NotificationInflater.InflationFlag;
@@ -290,7 +291,8 @@ public class NotificationTestHelper {
    }

    private Notification.BubbleMetadata makeBubbleMetadata() {
        PendingIntent bubbleIntent = PendingIntent.getActivity(mContext, 0, new Intent(), 0);
        Intent target = new Intent(mContext, BubblesTestActivity.class);
        PendingIntent bubbleIntent = PendingIntent.getActivity(mContext, 0, target, 0);
        return new Notification.BubbleMetadata.Builder()
                .setIntent(bubbleIntent)
                .setTitle("bubble title")