@Jake,

Now why didn't I think of that? Using a support annotation is also good 
because custom permissions can also be detected that way.

BTW are the support annotations used by Lint? The documentation for support 
annotations on tools.android.com mentions that the "IDE" flags these errors 
but I couldn't find a reference as to whether it is Lint or javac that 
issues the errors/warnings.

On Wednesday, 11 March 2015 05:31:27 UTC+5:30, Jake Wharton wrote:
>
> This would make for a good support library annotation!
>
> public @interface RequiresPermission {
>   String[] value();
> }
>
> Then libraries would be able to get this functionality on 
> conditionally-used APIs.
> On Mar 5, 2015 3:59 AM, "Kiran Rao" <techie....@gmail.com <javascript:>> 
> wrote:
>
>> I often find myself finding out that an API that I used requires the app 
>> to hold a particular permission only after the app crashes at runtime.
>>
>> Would it be feasible to include a Lint check for this (at least to alert 
>> me about standard permissions)?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "adt-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to adt-dev+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adt-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to