Android M 权限中的奇怪行为

Strange behaviour in Android M Permissions

所以我有这个应用程序是我在 Android M 出来之前制作的,该应用程序有 permissions 例如 Camera(在应用程序中使用自定义相机)Write & Read 来自外部存储和 System Alert permission 我将应用程序安装到我的 phone 上,它有 android 6.0 并且应用程序能够 运行 正常并且没有任何限制。我能够使用相机,将文件保存到 SD 卡中并使用 WindowManager API.
显示自定义视图 请注意,该应用程序的目标 SDK 是 android lollipop。

我的问题:这可能吗? OS 让目标 SDK 小于 M 的应用程序完美 运行 而无需请求权限?如果这实际上是 android 开发人员实施的默认行为?

P.S: 确定的问题不适用于我的问题。而且我完全看不出它们之间有任何相似之处。

是的,如果您的应用 targetSdkVersion 低于 23,它将在 M 及更高版本上运行而无需询问任何权限(安装期间会询问)。

但是如果用户自己撤销任何权限,应用程序将崩溃。它由 Google 制作,以向后兼容不支持新权限的旧应用程序 API。

您可以阅读更多相关信息 here。 这是该页面的引述:

If the device is running Android 5.1 or lower, or your app's target SDK is 22 or lower: If you list a dangerous permission in your manifest, the user has to grant the permission when they install the app; if they do not grant the permission, the system does not install the app at all.

是的,这是可能的。但这会给你带来一个大问题。如果用户停用某些权限,您的应用程序会因为权限不再可用而简单地粉碎。 OS 询问用户 "This app was developed for a previous android version. disabling this permission can cause unexpected closing of the app"(或类似的东西)。总之,这是正常行为,因为您用来编译应用程序的 android 版本早于用户需要确认的权限。

https://inthecheesefactory.com/blog/things-you-need-to-know-about-android-m-permission-developer-edition/en

此 link 解释了您现在需要了解的关于您的问题的所有信息。