@@ -72,6 +72,14 @@ class AndroidContentProvider extends ExportableAndroidComponent {
72
72
AndroidContentProvider ( ) {
73
73
this .getASupertype * ( ) .hasQualifiedName ( "android.content" , "ContentProvider" )
74
74
}
75
+
76
+ /**
77
+ * Holds if this content provider requires read and write permissions
78
+ * in an `AndroidManifest.xml` file.
79
+ */
80
+ predicate requiresPermissions ( ) {
81
+ getAndroidComponentXmlElement ( ) .( AndroidProviderXmlElement ) .requiresPermissions ( )
82
+ }
75
83
}
76
84
77
85
/** An Android content resolver. */
@@ -148,3 +156,39 @@ private class UriModel extends SummaryModelCsv {
148
156
]
149
157
}
150
158
}
159
+
160
+ private class ContentProviderSourceModels extends SourceModelCsv {
161
+ override predicate row ( string row ) {
162
+ row =
163
+ [
164
+ // ContentInterface models are here for backwards compatibility (it was removed in API 28)
165
+ "android.content;ContentInterface;true;call;(String,String,String,Bundle);;Parameter[0..3];contentprovider" ,
166
+ "android.content;ContentProvider;true;call;(String,String,String,Bundle);;Parameter[0..3];contentprovider" ,
167
+ "android.content;ContentProvider;true;call;(String,String,Bundle);;Parameter[0..2];contentprovider" ,
168
+ "android.content;ContentProvider;true;delete;(Uri,String,String[]);;Parameter[0..2];contentprovider" ,
169
+ "android.content;ContentInterface;true;delete;(Uri,Bundle);;Parameter[0..1];contentprovider" ,
170
+ "android.content;ContentProvider;true;delete;(Uri,Bundle);;Parameter[0..1];contentprovider" ,
171
+ "android.content;ContentInterface;true;getType;(Uri);;Parameter[0];contentprovider" ,
172
+ "android.content;ContentProvider;true;getType;(Uri);;Parameter[0];contentprovider" ,
173
+ "android.content;ContentInterface;true;insert;(Uri,ContentValues,Bundle);;Parameter[0];contentprovider" ,
174
+ "android.content;ContentProvider;true;insert;(Uri,ContentValues,Bundle);;Parameter[0..2];contentprovider" ,
175
+ "android.content;ContentProvider;true;insert;(Uri,ContentValues);;Parameter[0..1];contentprovider" ,
176
+ "android.content;ContentInterface;true;openAssetFile;(Uri,String,CancellationSignal);;Parameter[0];contentprovider" ,
177
+ "android.content;ContentProvider;true;openAssetFile;(Uri,String,CancellationSignal);;Parameter[0];contentprovider" ,
178
+ "android.content;ContentProvider;true;openAssetFile;(Uri,String);;Parameter[0];contentprovider" ,
179
+ "android.content;ContentInterface;true;openTypedAssetFile;(Uri,String,Bundle,CancellationSignal);;Parameter[0..2];contentprovider" ,
180
+ "android.content;ContentProvider;true;openTypedAssetFile;(Uri,String,Bundle,CancellationSignal);;Parameter[0..2];contentprovider" ,
181
+ "android.content;ContentProvider;true;openTypedAssetFile;(Uri,String,Bundle);;Parameter[0..2];contentprovider" ,
182
+ "android.content;ContentInterface;true;openFile;(Uri,String,CancellationSignal);;Parameter[0];contentprovider" ,
183
+ "android.content;ContentProvider;true;openFile;(Uri,String,CancellationSignal);;Parameter[0];contentprovider" ,
184
+ "android.content;ContentProvider;true;openFile;(Uri,String);;Parameter[0];contentprovider" ,
185
+ "android.content;ContentInterface;true;query;(Uri,String[],Bundle,CancellationSignal);;Parameter[0..2];contentprovider" ,
186
+ "android.content;ContentProvider;true;query;(Uri,String[],Bundle,CancellationSignal);;Parameter[0..2];contentprovider" ,
187
+ "android.content;ContentProvider;true;query;(Uri,String[],String,String[],String);;Parameter[0..4];contentprovider" ,
188
+ "android.content;ContentProvider;true;query;(Uri,String[],String,String[],String,CancellationSignal);;Parameter[0..4];contentprovider" ,
189
+ "android.content;ContentInterface;true;update;(Uri,ContentValues,Bundle);;Parameter[0..2];contentprovider" ,
190
+ "android.content;ContentProvider;true;update;(Uri,ContentValues,Bundle);;Parameter[0..2];contentprovider" ,
191
+ "android.content;ContentProvider;true;update;(Uri,ContentValues,String,String[]);;Parameter[0..3];contentprovider"
192
+ ]
193
+ }
194
+ }
0 commit comments