Loading packages/SystemUI/tests/AndroidManifest.xml +7 −0 Original line number Diff line number Diff line Loading @@ -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" Loading packages/SystemUI/tests/src/com/android/systemui/bubbles/BubblesTestActivity.java 0 → 100644 +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); } } packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationTestHelper.java +3 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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") Loading Loading
packages/SystemUI/tests/AndroidManifest.xml +7 −0 Original line number Diff line number Diff line Loading @@ -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" Loading
packages/SystemUI/tests/src/com/android/systemui/bubbles/BubblesTestActivity.java 0 → 100644 +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); } }
packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationTestHelper.java +3 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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") Loading