Hi Dan,

I have been investigating this, and it looks to me that changing the
occurrences of  mContext.checkCallingPermission to
mContext.checkCallingOrSelfPermission in LocationManagerService.java
will fix the problem.

Mike

On Thu, Jun 25, 2009 at 12:56 PM, dan raaka<[email protected]> wrote:
> anything on this one ?
>
> On Tue, Jun 23, 2009 at 6:53 PM, dan raaka <[email protected]> wrote:
>>
>> 2 lines all that was added ..
>> mLocationManager = (LocationManager)
>> context.getSystemService(Context.LOCATION_SERVICE);
>> mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0,
>> 0, new GpsListener());
>>
>> Here is the trace
>> E/SystemServer( 1861): java.lang.SecurityException: Requires
>> ACCESS_FINE_LOCATION permission
>> E/SystemServer( 1861):  at
>> com.android.server.LocationManagerService.checkPermissionsSafe(LocationManagerService.java:686)
>> E/SystemServer( 1861):  at
>> com.android.server.LocationManagerService._isProviderEnabledLocked(LocationManagerService.java:1510)
>> E/SystemServer( 1861):  at
>> com.android.server.LocationManagerService.isProviderEnabled(LocationManagerService.java:1499)
>> E/SystemServer( 1861):  at
>> android.location.LocationManager.isProviderEnabled(LocationManager.java:928)
>> E/SystemServer( 1861):  at
>> com.android.server.MyGPSManagerService.<init>(MyGPSManagerService.java:277)
>> E/SystemServer( 1861):  at
>> com.android.server.ServerThread.run(SystemServer.java:263)
>>
>> -Dan
>>
>> On Tue, Jun 23, 2009 at 5:38 PM, Dianne Hackborn <[email protected]>
>> wrote:
>>>
>>> The system process gets all permissions (it is, after all, the one that
>>> manages and enforces permissions).  What is the stack crawl of the
>>> exception?
>>>
>>> On Tue, Jun 23, 2009 at 3:53 PM, Dan Raaka <[email protected]> wrote:
>>>>
>>>> System server is starting up other services, however, towards the end,
>>>> if we were add any code to access any of the started services, it
>>>> throws out a error saying PERMISSION not defined.
>>>>
>>>> E/SystemServer( 1861): java.lang.SecurityException: Requires
>>>> ACCESS_FINE_LOCATION permission
>>>>
>>>> The general mode is to create an apk with the service and hence we
>>>> will have a way to describe the required permissions in the manifest.
>>>> However, if we want to do the same in the platform, how can one add
>>>> permissions ? and what sort of permissions does SystemServer have (eg.
>>>> ACCESS_FINE_LOCATION )?
>>>>
>>>
>>>
>>>
>>> --
>>> Dianne Hackborn
>>> Android framework engineer
>>> [email protected]
>>>
>>> Note: please don't send private questions to me, as I don't have time to
>>> provide private support, and so won't reply to such e-mails.  All such
>>> questions should be posted on public forums, where I and others can see and
>>> answer them.
>>>
>>> >>>
>



-- 
Mike Lockwood
Google android team

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" 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-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to