src/api-impl: misc stubbing

This commit is contained in:
Mis012
2022-12-27 17:21:21 +01:00
parent 696fa5a192
commit 2e4590c4d8
15 changed files with 226 additions and 52 deletions

View File

@@ -1797,7 +1797,17 @@ public class PackageManager {
* @see #PERMISSION_DENIED
*/
public int checkPermission(String permName, String pkgName) {
return -1;
switch(permName) {
// TODO: we shouldn't just automatically grant these once we have bubblewrap set up
// for now, the app can access anything it wants, so no point telling it otherwise
case "android.permission.WRITE_EXTERNAL_STORAGE":
return PERMISSION_GRANTED;
case "android.permission.READ_EXTERNAL_STORAGE":
return PERMISSION_GRANTED;
default:
System.out.println("PackageManager.checkPermission: >"+permName+"< not handled\n");
return PERMISSION_DENIED;
}
}
/**