Commit a5fe0d8
shubhisaxena
Make CtsPhotoPickerTests backward compatible
In PhotoPicker, a change was made to require certain security
permissions for the GET_CLOUD_PROVIDER_CALL and SET_CLOUD_PROVIDER_CALL
ag/23298042
The SET_CLOUD_PROVIDER_CALL was restricted to only the following calling
user IDS:
+ Media Provider itself
+ Shell
- Rest all callers will be blocked from setting the cloud provider
Shell's calling UID was allowlisted for the GET_CLOUD_PROVIDER_CALL.
This change makes sure that if run against the older MediaProvider
versions, it handles the case where shell is not allowlisted for the
GET_CLOUD_PROVIDER_CALL.
Bug: 308194648
Test: atest ActionUserSelectImagesForAppTest
Test: atest PhotoPickerBannersTest
Test: atest RemoteVideoPreviewTest
Test: atest CloudPhotoPickerTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3e8a05de157c33f75b56d0e6de4a08117cc87e58)
Merged-In: Ia41f9aed2036f1444810eebf5c6ef0f1ae542701
Change-Id: Ia41f9aed2036f1444810eebf5c6ef0f1ae542701
NOTE FOR REVIEWERS - errors occurred while applying the patch.
PLEASE REVIEW CAREFULLY.
Errors:
Error applying patch in tests/PhotoPicker/src/android/photopicker/cts/ActionUserSelectImagesForAppTest.java, hunk HunkHeader[83,7->84,13]: Hunk cannot be applied
Error applying patch in tests/PhotoPicker/src/android/photopicker/cts/CloudPhotoPickerTest.java, hunk HunkHeader[46,6->46,7]: Hunk cannot be applied
Error applying patch in tests/PhotoPicker/src/android/photopicker/cts/PhotoPickerBannersTest.java, hunk HunkHeader[42,6->42,7]: Hunk cannot be applied
Error applying patch in tests/PhotoPicker/src/android/photopicker/cts/PhotoPickerBaseTest.java, hunk HunkHeader[23,6->23,7]: Hunk cannot be applied
Error applying patch in tests/PhotoPicker/src/android/photopicker/cts/RemoteVideoPreviewTest.java, hunk HunkHeader[47,6->47,7]: Hunk cannot be applied
Original patch:
From 3e8a05de157c33f75b56d0e6de4a08117cc87e58 Mon Sep 17 00:00:00 2001
From: shubhisaxena <shubhisaxena@google.com>
Date: Thu, 02 Nov 2023 12:10:16 +0000
Subject: [PATCH] Make CtsPhotoPickerTests backward compatible
In PhotoPicker, a change was made to require certain security
permissions for the GET_CLOUD_PROVIDER_CALL and SET_CLOUD_PROVIDER_CALL
ag/23298042
The SET_CLOUD_PROVIDER_CALL was restricted to only the following calling
user IDS:
+ Media Provider itself
+ Shell
- Rest all callers will be blocked from setting the cloud provider
Shell's calling UID was allowlisted for the GET_CLOUD_PROVIDER_CALL.
This change makes sure that if run against the older MediaProvider
versions, it handles the case where shell is not allowlisted for the
GET_CLOUD_PROVIDER_CALL.
Bug: 308194648
Test: atest ActionUserSelectImagesForAppTest
Test: atest PhotoPickerBannersTest
Test: atest RemoteVideoPreviewTest
Test: atest CloudPhotoPickerTest
Change-Id: Ia41f9aed2036f1444810eebf5c6ef0f1ae542701
---1 parent 60c9fcc commit a5fe0d8
5 files changed
Lines changed: 47 additions & 10 deletions
File tree
- tests/PhotoPicker/src/android/photopicker/cts
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
98 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
99 | 107 | | |
100 | 108 | | |
101 | 109 | | |
| |||
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
82 | 89 | | |
83 | 90 | | |
84 | 91 | | |
| |||
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
88 | 95 | | |
89 | 96 | | |
90 | 97 | | |
| |||
111 | 118 | | |
112 | 119 | | |
113 | 120 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
117 | 124 | | |
118 | | - | |
| 125 | + | |
119 | 126 | | |
120 | 127 | | |
121 | 128 | | |
| |||
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
108 | 115 | | |
109 | 116 | | |
110 | 117 | | |
| |||
0 commit comments