am 18ad9f65: Only allow system code to call LocationManager.sendNiResponse()

Merge commit '18ad9f657bda79069233c0b8e1476888ffd894d4' into eclair-plus-aosp

* commit '18ad9f657bda79069233c0b8e1476888ffd894d4':
  Only allow system code to call LocationManager.sendNiResponse()
This commit is contained in:
Mike Lockwood
2009-08-27 14:24:43 -07:00
committed by Android Git Automerger

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);
}