Resolve merge conflicts of a5060ee to nyc-dev
This undoes the automerger skip which occured in
commit e740c84dc32180214a7fd157105d6c18d30408ee and
replays it as a standard (NOT -s ours) merge.
Change-Id: If5a47be26f73d6a0735c425cd66310a3e2a89086
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index fdb1cef..e782689 100755
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1558,15 +1558,17 @@
}
/**
- * An app can use this method to check if it is currently allowed to draw on top of other
- * apps. In order to be allowed to do so, an app must first declare the
- * {@link android.Manifest.permission#SYSTEM_ALERT_WINDOW} permission in its manifest. If it
- * is currently disallowed, it can prompt the user to grant it this capability through a
- * management UI by sending an Intent with action
- * {@link android.provider.Settings#ACTION_MANAGE_OVERLAY_PERMISSION}.
+ * Checks if the specified context can draw on top of other apps. As of API
+ * level 23, an app cannot draw on top of other apps unless it declares the
+ * {@link android.Manifest.permission#SYSTEM_ALERT_WINDOW} permission in its
+ * manifest, <em>and</em> the user specifically grants the app this
+ * capability. To prompt the user to grant this approval, the app must send an
+ * intent with the action
+ * {@link android.provider.Settings#ACTION_MANAGE_OVERLAY_PERMISSION}, which
+ * causes the system to display a permission management screen.
*
- * @param context A context
- * @return true if the calling app can draw on top of other apps, false otherwise.
+ * @param context App context.
+ * @return true if the specified context can draw on top of other apps, false otherwise
*/
public static boolean canDrawOverlays(Context context) {
return Settings.isCallingPackageAllowedToDrawOverlays(context, Process.myUid(),
@@ -3875,14 +3877,16 @@
Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS;
/**
- * An app can use this method to check if it is currently allowed to write or modify system
- * settings. In order to gain write access to the system settings, an app must declare the
- * {@link android.Manifest.permission#WRITE_SETTINGS} permission in its manifest. If it is
- * currently disallowed, it can prompt the user to grant it this capability through a
- * management UI by sending an Intent with action
- * {@link android.provider.Settings#ACTION_MANAGE_WRITE_SETTINGS}.
+ * Checks if the specified app can modify system settings. As of API
+ * level 23, an app cannot modify system settings unless it declares the
+ * {@link android.Manifest.permission#WRITE_SETTINGS}
+ * permission in its manifest, <em>and</em> the user specifically grants
+ * the app this capability. To prompt the user to grant this approval,
+ * the app must send an intent with the action {@link
+ * android.provider.Settings#ACTION_MANAGE_WRITE_SETTINGS}, which causes
+ * the system to display a permission management screen.
*
- * @param context A context
+ * @param context App context.
* @return true if the calling app can write to system settings, false otherwise
*/
public static boolean canWrite(Context context) {