Only allow system code to call LocationManager.sendNiResponse()

Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2009-08-27 14:01:23 -07:00
parent 22d1f9fb23
commit 18ad9f657b

View File

@@ -1137,6 +1137,10 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
public boolean sendNiResponse(int notifId, int userResponse)
{
if (Binder.getCallingUid() != Process.myUid()) {
throw new SecurityException(
"calling sendNiResponse from outside of the system is not allowed");
}
try {
return mNetInitiatedListener.sendNiResponse(notifId, userResponse);
}