Ah OK, our protection level is signature.  I'm wondering though if this
would explain it.



On Fri, Jun 7, 2013 at 10:33 PM, marten <[email protected]> wrote:

> Well, in my case the app stores personal data (tasks) that can be accessed
> by other apps (task apps, calendar apps, widgets, sync apps). The
> protection level should be the same as for the calendar provider app. So I
> expect that the user is asked if he installs an app that can access the
> task content provider (just like you have to confirm the permissions to
> read/write events in your calendar).
>
> Am Sonntag, 2. Juni 2013 12:11:33 UTC+2 schrieb latimerius:
>>
>> That's strange.  We have a setup where we have a bunch of Bs that are
>> paid (and not necessarily cheap) so the assumption is we'd hear from people
>> who buy a B and cannot access its contents due to a SecurityException.
>>  Probably a majority of our users are on Android 4.x.  Also, I have a Nexus
>> 7 currently with 4.2.2 that has never given me either the error message, or
>> the problem itself.
>>
>> I'm wondering now why it sometimes happens and sometimes not.
>>
>> The explanation Dianne Hackborn gave in the thread you linked to doesn't
>> make much sense to me as these are custom permissions we're talking about.
>>  I've never been asked to confirm a custom permission (on Android 2 or 4),
>> nor does it seem to make any sense as the permission is just an
>> implementation detail of how our packages transfer their data among
>> themselves - nothing for the user to allow or deny.
>>
>>
>> On Sun, Jun 2, 2013 at 11:29 AM, marten <[email protected]> wrote:
>>
>>>
>>>
>>> Am Samstag, 1. Juni 2013 17:28:31 UTC+2 schrieb latimerius:
>>>
>>>> On Sat, Jun 1, 2013 at 3:39 PM, Marten Gajda <[email protected]> wrote:
>>>>
>>>>>
>>>>> I have an existing app A that's already installed by a couple of users
>>>>> and I have developed a new app B that has a content provider and custom
>>>>> permissions for access control. Now I want to add optional support for 
>>>>> that
>>>>> new content provider in app A.
>>>>>
>>>>> Just adding a <uses-permission> tag to app A won't work because all
>>>>> users would have to install app B before they upgrade to the new app A.
>>>>> Otherwise the new permission is not granted with the following message:
>>>>>
>>>>> W/PackageManager(  201): Not granting permission my.package.permission.
>>>>> **PERMISSI****ON_X to package my.other.package because it was
>>>>> previously installed without
>>>>>
>>>>
>>>> Hello Marten, I'm slightly confused at this point.  The above log
>>>> message sounds to me as if you defined your permission in app A and
>>>> requested it in app B - the other way around compared to what you
>>>> explanation above seems to suggest.
>>>>
>>>
>>> I should have changed the log message to
>>>
>>> W/PackageManager(  201): Not granting permission B.PERMISSION_X to
>>> package A because it was previously installed without
>>>
>>> that's what I get actually. The problem seems to be, that since
>>> B.PERMISSION_X was not known at the time A was installed (but B wasn't) the
>>> permission had been ignored.
>>>
>>> I'm not the only one experiencing this issue: https://groups.google.com/
>>> **forum/?fromgroups#!topic/**android-platform/jQBhijWPcTQ<https://groups.google.com/forum/?fromgroups#!topic/android-platform/jQBhijWPcTQ>
>>>
>>>
>>>>
>>>> At any rate, if you define your permission in app B (using the
>>>> <permission> element) and request it in app A (using the <uses-permission>
>>>> element) it should work.  If app A is installed before app B you should
>>>> just see a log message stating that the custom permission is unknown.
>>>>
>>>
>>> I see that message, but when I install B I get the message above.
>>>
>>>
>>>
>>>>  This is fine as app B who defines it is not installed yet.  As soon as
>>>> you install it the permission is defined by B and granted to A.
>>>>
>>>
>>> That doesn't seem to work on all devices.
>>>
>>>
>>>> Which Android version are you testing on?
>>>>
>>>
>>> The issue has been reported on SDK levels 15, 16 and 17. I didn't test
>>> earlier versions yet.
>>>
>>>
>>>>
>>>> My question is: Is that guaranteed to work in future Android releases?
>>>>> Is there a chance any future Android version will complain about the
>>>>> duplicate definition of the permission?
>>>>
>>>>
>>>> This is something I'd like to know too.  I"m not hopeful though Google
>>>> tells us before stuff breaks...
>>>>
>>>>  --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-d...@**googlegroups.com
>>>
>>> To unsubscribe from this group, send email to
>>> android-developers+**[email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to android-developers+**[email protected].
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>>
>>
>>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to