1# Copyright (C) 2017 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# Keep
16-keep public class androidx.core.view.accessibility.AccessibilityNodeInfoCompat {
17   public static androidx.core.view.accessibility.AccessibilityNodeInfoCompat obtain();
18}
19
20# This method is marked @hide in DocumentsProvider but we need to implement it for managed mode.
21-keep public class com.android.documentsui.archives.ArchivesProvider {
22   public android.database.Cursor queryChildDocumentsForManage(java.lang.String, java.lang.String[], java.lang.String);
23}
24
25# To prevent class not found exception in org.brotli.dec.Dictionary
26-keep final class org.brotli.dec.DictionaryData
27
28# keep rule generated after running trace references on the test app against DocumentsUIGoogle.jar
29# TODO(b/339312616): Remove after a more permanent fix is available
30# On modifying or adding new test run the following command to generate new keep rules and replace
31# the once listed below with the newly generated keep rules:
32# java -cp prebuilts/r8/r8.jar com.android.tools.r8.tracereferences.TraceReferences \
33# --lib out/soong/.intermediates/frameworks/base/framework/android_common/<some_hash>/combined/framework.jar \
34# --source out/target/product/panther/testcases/DocumentsUIGoogleTests/arm64/DocumentsUIGoogleTests.apk \
35# --target  out/soong/.intermediates/vendor/unbundled_google/packages/DocumentsUIGoogle/DocumentsUIGoogle/android_common/<some_hash>/javac/DocumentsUIGoogle.jar \
36# --keep-rules \
37# --output /tmp/keep.txt
38
39-keep class androidx.appcompat.R$id {
40  int search_src_text;
41}
42-keep class com.android.documentsui.R$bool {
43  int feature_notification_channel;
44  int full_bar_search_view;
45  int is_launcher_enabled;
46  int show_search_bar;
47}
48-keep class com.android.documentsui.R$color {
49  int app_background_color;
50  int primary;
51}
52-keep class com.android.documentsui.R$dimen {
53  int grid_item_radius;
54}
55-keep class com.android.documentsui.R$drawable {
56  int ic_briefcase;
57  int ic_cab_cancel;
58  int ic_eject;
59  int ic_menu_copy;
60  int ic_root_download;
61  int ic_sd_storage;
62  int root_list_selector;
63  int work_off;
64}
65-keep class com.android.documentsui.R$id {
66  int action_menu_compress;
67  int action_menu_copy_to;
68  int action_menu_delete;
69  int action_menu_deselect_all;
70  int action_menu_extract_to;
71  int action_menu_inspect;
72  int action_menu_move_to;
73  int action_menu_open_with;
74  int action_menu_rename;
75  int action_menu_select;
76  int action_menu_select_all;
77  int action_menu_share;
78  int action_menu_sort;
79  int action_menu_view_in_owner;
80  int apps_group;
81  int apps_row;
82  int button;
83  int content;
84  int cross_profile;
85  int cross_profile_content;
86  int cross_profile_progress;
87  int dir_menu_copy_to_clipboard;
88  int dir_menu_create_dir;
89  int dir_menu_cut_to_clipboard;
90  int dir_menu_delete;
91  int dir_menu_deselect_all;
92  int dir_menu_inspect;
93  int dir_menu_open;
94  int dir_menu_open_in_new_window;
95  int dir_menu_open_with;
96  int dir_menu_paste_from_clipboard;
97  int dir_menu_paste_into_folder;
98  int dir_menu_rename;
99  int dir_menu_select_all;
100  int dir_menu_share;
101  int dir_menu_view_in_owner;
102  int drawer_layout;
103  int inspector_details_view;
104  int option_menu_create_dir;
105  int option_menu_debug;
106  int option_menu_inspect;
107  int option_menu_launcher;
108  int option_menu_new_window;
109  int option_menu_search;
110  int option_menu_select_all;
111  int option_menu_settings;
112  int option_menu_show_hidden_files;
113  int option_menu_sort;
114  int root_menu_eject_root;
115  int root_menu_open_in_new_window;
116  int root_menu_paste_into_folder;
117  int root_menu_settings;
118  int sub_menu_grid;
119  int sub_menu_list;
120  int table_header;
121  int tabs;
122  int tabs_container;
123  int toolbar;
124}
125-keep class com.android.documentsui.R$layout {
126  int apps_row;
127  int directory_header;
128  int files_activity;
129  int fixed_layout;
130  int item_doc_list;
131}
132-keep class com.android.documentsui.R$menu {
133  int dir_context_menu;
134  int file_context_menu;
135  int mixed_context_menu;
136}
137-keep class com.android.documentsui.R$plurals {
138  int copy_error_notification_title;
139  int elements_dragged;
140}
141-keep class com.android.documentsui.R$string {
142  int cant_select_work_files_error_message;
143  int cant_select_work_files_error_title;
144  int copy_notification_title;
145  int copy_preparing;
146  int copy_remaining;
147  int debug_content_uri;
148  int default_root_uri;
149  int directory_items;
150  int empty;
151  int menu_copy;
152  int menu_move;
153  int menu_rename;
154  int menu_select;
155  int menu_select_all;
156  int menu_sort;
157  int menu_view_in_owner;
158  int metadata_address;
159  int metadata_album;
160  int metadata_altitude;
161  int metadata_aperture;
162  int metadata_aperture_format;
163  int metadata_artist;
164  int metadata_camera;
165  int metadata_camera_format;
166  int metadata_composer;
167  int metadata_coordinates;
168  int metadata_coordinates_format;
169  int metadata_date_time;
170  int metadata_dimensions;
171  int metadata_dimensions_format;
172  int metadata_duration;
173  int metadata_focal_format;
174  int metadata_focal_length;
175  int metadata_iso_format;
176  int metadata_iso_speed_ratings;
177  int metadata_shutter_speed;
178  int name_conflict;
179  int no_results;
180  int personal_tab;
181  int preferred_root_package;
182  int quiet_mode_button;
183  int quiet_mode_error_title;
184  int rename_error;
185  int search_bar_hint;
186  int share_via;
187  int sort_dimension_date;
188  int sort_dimension_file_type;
189  int sort_dimension_name;
190  int sort_dimension_size;
191  int sort_direction_ascending;
192  int sort_direction_descending;
193  int trusted_quick_viewer_package;
194  int work_tab;
195}
196-keep class com.android.documentsui.R$style {
197  int DocumentsDefaultTheme;
198  int DocumentsTheme;
199}
200
201# Keep Apache Commons Compress classes
202-keep class org.apache.commons.compress.** { *; }
203