Skip to content

Commit

Permalink
Fix PackageInstaller FC when tapping on a downloaded apk notification
Browse files Browse the repository at this point in the history
10-31 16:28:03.756 25193 25207 E DatabaseUtils: Writing exception to parcel
10-31 16:28:03.756 25193 25207 E DatabaseUtils: java.lang.SecurityException: Permission Denial: reading com.android.providers.downloads.DownloadProvider uri content://downloads/my_downloads/831 from pid=25212, uid=10019 requires android.permission.INTERNET, or grantUriPermission()
10-31 16:28:03.756 25193 25207 E DatabaseUtils:         at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:608)
10-31 16:28:03.756 25193 25207 E DatabaseUtils:         at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:483)
10-31 16:28:03.756 25193 25207 E DatabaseUtils:         at android.content.ContentProvider$Transport.enforceFilePermission(ContentProvider.java:474)
10-31 16:28:03.756 25193 25207 E DatabaseUtils:         at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:419)
10-31 16:28:03.756 25193 25207 E DatabaseUtils:         at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:313)
10-31 16:28:03.756 25193 25207 E DatabaseUtils:         at android.os.Binder.execTransact(Binder.java:565)
10-31 16:28:03.763 25212 25227 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
10-31 16:28:03.763 25212 25227 E AndroidRuntime: Process: com.android.packageinstaller, PID: 25212
10-31 16:28:03.763 25212 25227 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at android.os.AsyncTask$3.done(AsyncTask.java:318)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at java.util.concurrent.FutureTask.run(FutureTask.java:242)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at java.lang.Thread.run(Thread.java:761)
10-31 16:28:03.763 25212 25227 E AndroidRuntime: Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.downloads.DownloadProvider uri content://downloads/my_downloads/831 from pid=25212, uid=10019 requires android.permission.INTERNET, or grantUriPermission()
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at android.os.Parcel.readException(Parcel.java:1683)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:146)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:692)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1145)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:982)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at android.content.ContentResolver.openInputStream(ContentResolver.java:702)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at com.android.packageinstaller.PackageInstallerActivity$StagingAsyncTask.doInBackground(PackageInstallerActivity.java:765)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at com.android.packageinstaller.PackageInstallerActivity$StagingAsyncTask.doInBackground(PackageInstallerActivity.java:756)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at android.os.AsyncTask$2.call(AsyncTask.java:304)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
10-31 16:28:03.763 25212 25227 E AndroidRuntime:        ... 4 more

Change-Id: I66e1167d5c819a7f4333b182decce83240ceae4b
  • Loading branch information
ezio84 authored and Joey Rizzoli committed Nov 23, 2016
1 parent 92a86b3 commit fd5c73a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.KILL_UID" />
<uses-permission android:name="android.permission.MANAGE_APP_OPS_RESTRICTIONS" />
<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="com.google.android.permission.INSTALL_WEARABLE_PACKAGES" />

Expand Down

0 comments on commit fd5c73a

Please sign in to comment.