From ad8f924ed411c175d7c9ed50d4c75375cdbeff67 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Mon, 11 Jun 2012 12:27:05 -0700 Subject: [PATCH] Fix issue #6641368: can't launch gallery This is a revert of 1db36528b12395b9ed9bf8a1005a6d4ace737627, but with comments added so I don't make this mistake again. :) Change-Id: I053216279e3721f08f32f561bb989736ef619f82 --- Command.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Command.cpp b/Command.cpp index d428fef..0a5e590 100644 --- a/Command.cpp +++ b/Command.cpp @@ -1204,7 +1204,9 @@ int doDump(Bundle* bundle) } // If the application has requested WRITE_EXTERNAL_STORAGE, we will - // force them to always take READ_EXTERNAL_STORAGE as well. + // force them to always take READ_EXTERNAL_STORAGE as well. We always + // do this (regardless of target API version) because we can't have + // an app with write permission but not read permission. if (!hasReadExternalStoragePermission && hasWriteExternalStoragePermission) { printf("uses-permission:'android.permission.READ_EXTERNAL_STORAGE'\n"); printf("uses-implied-permission:'android.permission.READ_EXTERNAL_STORAGE'," \ -- 2.45.2