{"action":"opened","issue":{"url":"https://api.github.com/repos/amplitude/Amplitude-Android/issues/104","repository_url":"https://api.github.com/repos/amplitude/Amplitude-Android","labels_url":"https://api.github.com/repos/amplitude/Amplitude-Android/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/amplitude/Amplitude-Android/issues/104/comments","events_url":"https://api.github.com/repos/amplitude/Amplitude-Android/issues/104/events","html_url":"https://github.com/amplitude/Amplitude-Android/issues/104","id":155503824,"number":104,"title":"DeviceInfo.getMostRecentLocation crashes the app","user":{"login":"ipereziriarte","id":1949825,"avatar_url":"https://avatars.githubusercontent.com/u/1949825?v=3","gravatar_id":"","url":"https://api.github.com/users/ipereziriarte","html_url":"https://github.com/ipereziriarte","followers_url":"https://api.github.com/users/ipereziriarte/followers","following_url":"https://api.github.com/users/ipereziriarte/following{/other_user}","gists_url":"https://api.github.com/users/ipereziriarte/gists{/gist_id}","starred_url":"https://api.github.com/users/ipereziriarte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipereziriarte/subscriptions","organizations_url":"https://api.github.com/users/ipereziriarte/orgs","repos_url":"https://api.github.com/users/ipereziriarte/repos","events_url":"https://api.github.com/users/ipereziriarte/events{/privacy}","received_events_url":"https://api.github.com/users/ipereziriarte/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-18T13:39:59Z","updated_at":"2016-05-18T13:39:59Z","closed_at":null,"body":"Hi,\r\n\r\nI'm seeing inside the production logs a small amount of crashes.\r\nLooks like **FORCE_STOP_PACKAGES permission is missing**\r\n\r\n### StackTrace\r\n\r\n```\r\nFatal Exception: java.lang.SecurityException: Permission Denial: forceStopPackage() from pid=21114, uid=10091 requires android.permission.FORCE_STOP_PACKAGES\r\n       at android.os.Parcel.readException(Parcel.java:1425)\r\n       at android.os.Parcel.readException(Parcel.java:1379)\r\n       at android.location.ILocationManager$Stub$Proxy.getProviders(ILocationManager.java:851)\r\n       at android.location.LocationManager.getProviders(LocationManager.java:321)\r\n       at com.amplitude.api.DeviceInfo.getMostRecentLocation(DeviceInfo.java:309)\r\n       at com.amplitude.api.DeviceInfo$CachedInfo.getCountryFromLocation(DeviceInfo.java:127)\r\n       at com.amplitude.api.DeviceInfo$CachedInfo.getCountry(DeviceInfo.java:110)\r\n       at com.amplitude.api.DeviceInfo$CachedInfo.(DeviceInfo.java)\r\n       at com.amplitude.api.DeviceInfo$CachedInfo.(DeviceInfo.java)\r\n       at com.amplitude.api.DeviceInfo.getCachedInfo(DeviceInfo.java:237)\r\n       at com.amplitude.api.DeviceInfo.prefetch(DeviceInfo.java:243)\r\n       at com.amplitude.api.AmplitudeClient$1.run(AmplitudeClient.java:163)\r\n       at android.os.Handler.handleCallback(Handler.java:725)\r\n       at android.os.Handler.dispatchMessage(Handler.java:92)\r\n       at android.os.Looper.loop(Looper.java:153)\r\n       at android.os.HandlerThread.run(HandlerThread.java:60)\r\n```\r\n\r\n### Environment\r\n\r\n\r\nAmplitude version 2.7.1\r\nAffected environment: production\r\nAndroid version: Android 4.x and Android 5.x\r\nDevices: \r\n+ huawei g510_0200\r\n+ samsung_sgh_i527\r\n+ samsung gt_i9060i\r\n+ samsung sm_g530t1\r\n+ vivo 4_8 hd\r\n\r\nThanks for your support.\r\n"}}