4 ms·
I really like that Google have added this feature, but unfortunately I don't see it helping things much. I'm willing to be that many of the applications request
by bowmessage 13y ago
I really like that Google have added this feature, but unfortunately I don't see it helping things much. I'm willing to be that many of the applications requesting odd and unnecessary permissions will be rewritten to simply not work when any one of those permissions aren't granted to them.
- sp332 13y agoMany programs already won't work since they assume that they have the permissions they asked for.
- toomuchtodo 13y agoHeaven forbid your app does error checking!
- sp332 13y agoIt does error checking. Would you write a program that constantly checks the config file to see if something changed, or to see if the euid it is running as suddenly changes? Of course not, why would you? And why would an Android app constantly check to see if the permissions it has been granted are suddenly un-granted? More to the point: why would an app ask for permissions it didn't need in the first place? The most likely thing to happen is that the app would be useless.
- king_jester 13y agoAndroid as a framework is designed in such a way that most of the times you wish to access a feature of the device requires a permission you should be using components that can enforce a security check with the PackageManager or can handle the SecurityExceptions generated from not having a permission. Poorly architect-ed apps will have an issue with this, but those apps already have problems.
- sp332 13y agoHandling an exception is one thing. Designing your app to work gracefully with random permissions denied sounds like a combinatorial explosion of testing and UI design.
- king_jester 13y agoIt's not very bad on Android. The framework really pushes for a kind of plug-in like architecture where you abstract your core components into things like Services, so thinking about those core features up front goes a long way to creating a common point to handle permission checks. If all else fails, an app could simply extend Application and check permissions at runtime.
- veeti 13y agoNo. The Android API has always given the guarantee (and it still does) that your application's permissions will always be there. They can't be revoked during runtime. If it's in the manifest, it's perfectly fine to assume that you have it. No piece of documentation or sample code has ever encouraged a pattern of "checking if your app has permission X or Y" because it's a total waste of time. Likewise, none of the built-in Android apps or any of the open-source apps from Google developers I've seen do that. There is no point to doing so. In fact, it's actually bad practice because you're adding a bunch of error checking code for an error condition that's never going to happen. If you're getting a SecurityException for an action that you've explicitly requested the permission for, you're running on a broken API and it's not your responsibility to handle that. The framework does include methods for checking permissions, but they are generally meant for things like inter-process communication and library code. There's no need to use them for ordinary applications you are building yourself. And nobody does that, rightfully so.
- king_jester 13y agoI'm not suggesting that apps do this or even if it is a good idea to have this level of security checks in code. Rather, the Android framework encourages decentralized pieces of code that revolve accessing various capabilities of the API. The kind of paradigms in Android could be considered to be already a bit helpful in that they promote certain kinds of application architecture that may be more easily adapted to doing such security checks. Ultimately it is a matter of time before something like this does make its way into the core features of Android. It is worth thinking about how Android is both deficient and helpful with its design philosophy regarding that eventuality.
- Zigurd 13y ago"More to the point: why would an app ask for permissions it didn't need..." Ad networks. So wrap the calls to the ad network library in try/catch, and, in most cases, that takes care of the mostly gratuitous permissions.
- andybak 13y agoOr the Ad network code should handle this gracefully?
- Zigurd 13y agoNot that I'm sympathetic to ad networks that data rape you to support some half-baked behavioral targeting, but one reason they don't now handle it gracefully is that SecuirtyException should in most cases be unhandled, because it would indicate some kind of defective installation. That's why this change has to be phased-in.
- MichaelGG 13y agoYeah, Google needs to return random or plausibly zero/empty data when a user has disabled the permission. Some Android distros already offer this.
- tjbiddle 13y agoI'm sure this was a 'hidden' feature as it wasn't ready for it's prime time. I would expect developers to receive a notification that they need to update applications to support this - or things will be made to simply fail softly to begin with.
- DuskStar 13y agoIt could be using the same strategy as cyaogenmod's Privacy Guard - when enabled, return junk data to that application. (gps at 0N,0W, contacts list empty, etc)
- npsimons 13y agoI'm willing to be that many of the applications requesting odd and unnecessary permissions will be rewritten to simply not work when any one of those permissions aren't granted to them. Good. Let them die. If there's really demand for them, better alternatives will pop up.