I never said it would make testing the app hard. I never said it would be hard to change Android permission model to accomodate for deniable permissions when they are needed.
I'm saying that it would break every application in existence that is expected to have guaranteed access to whatever permissions they've declared in their manifest. Android apps aren't written to handle AT ALL cases where they simply aren't given permission to do whatever, and they would surely crash as a result.
I've never been more disappointed in how comments were voted on than I am on this thread.
---
edit: If you're implying that NEW apps could mark permissions as OPTIONAL and then manually request them and handle being granted them or not in code..., then I'm 100% in support. I think it's a BRILLIANT idea and I have no idea why it's not being worked on.
edit2: Surely I'm not out of line for assuming that "just return an error code and act like it's broken" was supposed to mean that users could deny permissions to existing/legacy apps that had declared the permissions in their manifest. If we've been talking this entire time about a new schema for new optional permissions in NEW applications, while still preserving legacy required permissions... well, I sure wish someone would have had the decency to point that out instead of just downvoting.
edit3: I'm almost positive he editted that comment to add that last paragraph. Or else I'm an idiot and missed it. Either way, I apparently misunderstood what he was talking about, unless that's what we've been discussing this entire time. Either way, I don't know why it didn't occur to me.
Are you telling me you'd wrap a System.out.println() in a try/catch? Even that's not absurd enough to exemplify the problem that all of you are clearly having in comprehending the magnitude of the absurdity you're spouting. The program is GUARANTEED the permission. Why would there be code to check to see if it has the permission? Do you people even understand the current Android permission model? (Such a function literally does not exist in the API.)
It's like a huge joke that I'm the punch line of. And surely, you're not recommending that a tiny fraction of apps not crashing excuses the fact that such a change would break undoubtedly near 100% of applications.
I'm just enraged at the fact that everyone is making caveats to try to make me look wrong while not a single person has actually addressed the claims I'm making. Actual Android developers in #android agree with me - not only that this would be bad for legacy apps, but that it would almost guaranteedly cause them to crash because they WOULDN'T HAVE CODE to check to see, because THAT DOESNT EXIST in the Android API because the manifest ensures they have that permission.
I don't buy the argument that "it would make testing the app too difficult." It just isn't that hard to put feature-placed guards in place. Web apps do that all the time today for JavaScript capabilities and they survive just fine. I have a lot of apps on my iPhone that I don't give location permissions to that continue to work fine as well.
I don't know the details of the underlying OS change, but I would imagine it isn't that large of a change, either (if any change at all). The system has to have the ability to check if an app has permission to perform an operation today so people can't lie about the permissions they are using. It would just do the same thing it does today.
So we are down to adding a flag to the permissions requested (required versus requested), adding a description field to the flag, and altering the presentation of the permissions at install time.