@@ -63,18 +63,34 @@ public abstract class Context {
6363 */
6464 public static final int MODE_PRIVATE = 0x0000 ;
6565 /**
66+ * @deprecated Creating world-readable files is very dangerous, and likely
67+ * to cause security holes in applications. It is strongly discouraged;
68+ * instead, applications should use more formal mechanism for interactions
69+ * such as {@link ContentProvider}, {@link BroadcastReceiver}, and
70+ * {@link android.app.Service}. There are no guarantees that this
71+ * access mode will remain on a file, such as when it goes through a
72+ * backup and restore.
6673 * File creation mode: allow all other applications to have read access
6774 * to the created file.
6875 * @see #MODE_PRIVATE
6976 * @see #MODE_WORLD_WRITEABLE
7077 */
78+ @ Deprecated
7179 public static final int MODE_WORLD_READABLE = 0x0001 ;
7280 /**
81+ * @deprecated Creating world-writable files is very dangerous, and likely
82+ * to cause security holes in applications. It is strongly discouraged;
83+ * instead, applications should use more formal mechanism for interactions
84+ * such as {@link ContentProvider}, {@link BroadcastReceiver}, and
85+ * {@link android.app.Service}. There are no guarantees that this
86+ * access mode will remain on a file, such as when it goes through a
87+ * backup and restore.
7388 * File creation mode: allow all other applications to have write access
7489 * to the created file.
7590 * @see #MODE_PRIVATE
7691 * @see #MODE_WORLD_READABLE
7792 */
93+ @ Deprecated
7894 public static final int MODE_WORLD_WRITEABLE = 0x0002 ;
7995 /**
8096 * File creation mode: for use with {@link #openFileOutput}, if the file
@@ -645,8 +661,12 @@ public abstract FileOutputStream openFileOutput(String name, int mode)
645661 * are some important differences:
646662 *
647663 * <ul>
648- * <li>The platform does not monitor the space available in external storage,
649- * and thus will not automatically delete these files. Note that you should
664+ * <li>The platform does not always monitor the space available in external
665+ * storage, and thus may not automatically delete these files. Currently
666+ * the only time files here will be deleted by the platform is when running
667+ * on {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} or later and
668+ * {@link android.os.Environment#isExternalStorageEmulated()
669+ * Environment.isExternalStorageEmulated()} returns true. Note that you should
650670 * be managing the maximum space you will use for these anyway, just like
651671 * with {@link #getCacheDir()}.
652672 * <li>External files are not always available: they will disappear if the
0 commit comments