summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yuri Lin <yurilin@google.com> 2022-09-27 14:03:35 -0400
committer Yuri Lin <yurilin@google.com> 2022-09-27 14:03:35 -0400
commita1ce4b78e5ff9a9b1af084a79b483f19f9d1dbcc (patch)
treefca31a93a9d3f03db454c9c7491b6bac835df2e0
parent4b73f2a5ebb3faaba748aaa5623daa6b7a237d77 (diff)
Change image attachment test to use a public resource ID
The test started failing due to resource ID issues when new resources were added likely because test APK resource IDs became out of sync. Because this test doesn't care about what image it's using (just that it's an image), using a public drawable resource is likely more stable and less susceptible to this issue. Bug: 249302567 Test: atest RemoteInputViewTest Change-Id: Icb68affe4ecabeb363d97e8517d2acd8e8031d65
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputViewTest.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputViewTest.java
index c47ea9cea75e..6ace4044b3f7 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputViewTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputViewTest.java
@@ -275,10 +275,9 @@ public class RemoteInputViewTest extends SysuiTestCase {
EditText editText = view.findViewById(R.id.remote_input_text);
editText.setText(TEST_REPLY);
ClipDescription description = new ClipDescription("", new String[] {"image/png"});
- // We need to use an (arbitrary) real resource here so that an actual image gets attached.
+ // We need to use an (arbitrary) real resource here so that an actual image gets attached
ClipData clip = new ClipData(description, new ClipData.Item(
- Uri.parse("android.resource://com.android.systemui/"
- + R.drawable.default_thumbnail)));
+ Uri.parse("android.resource://android/" + android.R.drawable.btn_default)));
ContentInfo payload =
new ContentInfo.Builder(clip, SOURCE_CLIPBOARD).build();
view.setAttachment(payload);