History log of /frameworks/base/core/java/android/os/Environment.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d450a3a9959eaca56ee7fcb03919819c2481437b 05-Jun-2014 Robin Lee <rgl@google.com> am 7f993419: am 3c189e02: am 271251d7: Merge "Add Environment call: get config dir for some user"

* commit '7f99341950273f5284186ea2e59a22ac71241c30':
Add Environment call: get config dir for some user
6959133d84b52ad177b22efc80b10dc1ad3fb62f 28-Apr-2014 Robin Lee <rgl@google.com> Add Environment call: get config dir for some user

This returns a read-only directory accessible to any app running as the
same user, containing various configuration files written by the system.

Change-Id: I635de184fc285b8fef166b782bbc1ac79f8f0687
/frameworks/base/core/java/android/os/Environment.java
2ee3c1e189819cc6efb4d7de24f1438bdb824087 31-May-2014 Jeff Sharkey <jsharkey@android.com> Per-app media directories on external storage.

This change defines per-app directories on external storage that
will be scanned and included in MediaStore. This gives apps a way
to write content to secondary shared storage in a way that can
easily be surfaced to other apps.

Bug: 14382377
Change-Id: I4cb367c870509e76f0c2c598f01e2f699780030a
/frameworks/base/core/java/android/os/Environment.java
c84471c2e07c325e81568c4d764716f14fcb19fe 18-Apr-2014 Christopher Tate <ctate@google.com> Handle /oem and /vendor as well

Bug 13170859

(cherry-picked from commit 740888f62eae158d5775be716620f0d56d87f587)

Change-Id: I7b5e206697fcbec146cac6cd83fca5c583a8cbd7
/frameworks/base/core/java/android/os/Environment.java
740888f62eae158d5775be716620f0d56d87f587 18-Apr-2014 Christopher Tate <ctate@google.com> Handle /oem and /vendor as well

Bug 13170859

Change-Id: I95dec4cd68e3d64517d08b3f08eefb849ce37b86
/frameworks/base/core/java/android/os/Environment.java
1be762c1ba0f4ab57c9d2038620e03d45eeb1f0a 06-Mar-2014 Jeff Sharkey <jsharkey@android.com> Define an OEM directory, scan features and APKs.

To support OEM customizations, define a new top-level directory
that roughly mirrors the layout of the system partition. Scan this
location for (non-privileged) apps, and for additional features.

Bug: 13340779
Change-Id: Idb6d6626655061ee31ad952cab734d30ea6130b9
/frameworks/base/core/java/android/os/Environment.java
4ca728c064aeab644f6d044e0285eaa056818b8a 11-Jan-2014 Jeff Sharkey <jsharkey@android.com> Detect removable and emulated secondary storage.

Also rename existing secondary storage API to match naming
convention in rest of class.

Bug: 11536709
Change-Id: I2684c817de4982b414893d2d9927a21e3f171d53
/frameworks/base/core/java/android/os/Environment.java
a6d19995292a82e6d480779acfbd8e140bebecb9 15-Oct-2013 Jeff Sharkey <jsharkey@android.com> Relax user constraint on storage state.

Otherwise we wtf() when called various places in the system.

Bug: 11223886
Change-Id: I514d28603db02e3debd4af1cf20049af0c7399f4
/frameworks/base/core/java/android/os/Environment.java
44cbdec292c6b234d94aae59257721cf499989ba 08-Oct-2013 Jeff Sharkey <jsharkey@android.com> Add secondary external storage support.

When SECONDARY_STORAGE is defined by the hardware configuration,
include those paths in the new getExternalCacheDirs() and
getExternalFilesDirs() APIs. Give secondary volumes valid state
until vold reports back.

Bug: 10330128, 10330229
Change-Id: Ifa55bfda47fd7c750f462dd26c98792ad462ab91
/frameworks/base/core/java/android/os/Environment.java
2d8b4e801332e02d6aad615b85cc9dd056ef805c 18-Sep-2013 Jeff Sharkey <jsharkey@android.com> Delegate mkdirs() to vold when lacking perms.

Apps without sdcard_r or sdcard_rw are still able to write to
their package-specific directory, but someone needs to first make
that directory on their behalf. This change will delegate the
mkdirs() call through to vold when an app fails to create directly.

MountService validates that the path belongs to the calling user, and
that it's actually on external storage, before passing to vold.

Update Environment to make app-vs-vold paths clearer.

Bug: 10577808
Change-Id: I43b4a77fd6d2b9af2a0d899790da8d9d89386776
/frameworks/base/core/java/android/os/Environment.java
3e1189b3590aefb65a2af720ae2ba959bbd4188d 13-Sep-2013 Jeff Sharkey <jsharkey@android.com> Move search to roots; Documents root; hide empty.

Documents searches now happen root-wide, instead of only under a
subdirectory. Updates abstract class and flags to match. Add flag
for a root to indicate it's empty, and hide empty roots in UI unless
creating.

Define "Documents" public directory and storage backend to contain
files.

Bug: 10712057, 10710865, 10710758
Change-Id: I8716367568969f9cb1d83927b2bf5a7013809350
/frameworks/base/core/java/android/os/Environment.java
e8222dddaf2e3da14380101e818d4254899e0c0d 05-Sep-2013 Chet Haase <chet@google.com> Change build version from KEY_LIME_PIE to KITKAT

Issue #10631619 Change build version to KitKat

Change-Id: I6ad13f6169ad74204078d36929479998b498ad8b
/frameworks/base/core/java/android/os/Environment.java
1abdb7123025e52512b2ed7a518f8c754c35f50a 12-Aug-2013 Jeff Sharkey <jsharkey@android.com> APIs for multiple external storage devices.

Provide developer APIs to discover application-specific paths on
secondary external storage devices. Covers files, cache, and OBB
directories. Apps will not have write access outside their package-
specific directories on secondary devices, so only primary storage is
exposed through Environment.

Creation of .nomedia files will be handled by FUSE daemon in future
change.

Change-Id: Ifcce6201a686d80269d7285adb597c008cf8fa7c
/frameworks/base/core/java/android/os/Environment.java
94e602d7b5f8c6fb6dbfa71d646a96aad0354640 19-Apr-2013 Jeff Sharkey <jsharkey@android.com> am 1b50e4ea: am ca2a6374: Merge "Environment should only warn when asked." into jb-mr2-dev

* commit '1b50e4ead5463f4dcc03f9c5ed64963af0d4d9eb':
Environment should only warn when asked.
48749fc78afc982ac32cf98790a85ab2b8bed515 19-Apr-2013 Jeff Sharkey <jsharkey@android.com> Environment should only warn when asked.

Instead of warning on Process.SYSTEM_UID, which is also used by the
Settings app, change to have the parent process explicitly ask for
warnings.

Bug: 8667286
Change-Id: Ib26676694a4041ff4e6d3ffdcc14055b7eba13c7
/frameworks/base/core/java/android/os/Environment.java
e4d9a01bfc7451afff1ed399a5801c7aa2af2831 29-Mar-2013 Dan Morrill <morrildl@google.com> Phase 1 of refactoring SystemServer.

SystemServer is currently a monolithic class that brings up key system
services. This change is the first phase of refactoring it to be more
configurable. Specifically, it adds a set of on/off switches used to control
startup of individual services. Future plans include finer grained controls
and a more explicit and consistent startup sequence for these services.

Change-Id: I7299f5ce7d7b74a34eb56dffb788366fbc058532
/frameworks/base/core/java/android/os/Environment.java
63d0a067997cecf9c6e97a17852f9b657bbba48e 02-Mar-2013 Jeff Sharkey <jsharkey@android.com> Improve performance of storage measurement.

When calculating directory sizes of data living on emulated external
storage, translate the path to use the internal backing data, which
avoids going through the emulation layer. It carefully retreats to
the original path when it runs into trouble.

Testing with a hierarchy of 10 directories deep and 2 directories
and 10 files wide at each level, this change improves performance
from 5900ms before to 250ms after; over 20 times faster (!).

Bug: 8172425
Change-Id: Ia7365416f091e102bf7345a49f7d7209a22580a9
/frameworks/base/core/java/android/os/Environment.java
8b2c3a14603d163d7564e6f60286995079687690 12-Nov-2012 Jeff Sharkey <jsharkey@android.com> Useful annotations for code documentation.

Bug: 6537978
Change-Id: I806c3c09e3255f8789455f13bf37c1dde2a93f1f
/frameworks/base/core/java/android/os/Environment.java
b76a0c40d4b638064aab358a1370b47d010442d7 23-Oct-2012 Jeff Sharkey <jsharkey@android.com> Avoid mentioning hidden API in docs.

Change-Id: If83c179ec0d1b038e94a7fdca386c8ddf324e391
/frameworks/base/core/java/android/os/Environment.java
8c16579994a58c5763788b4f6be864e8a8219575 22-Oct-2012 Jeff Sharkey <jsharkey@android.com> Update docs for multi-user storage behavior.

Define external storage as being isolated for each user, with the
caveat for shared OBB files. Also mention external storage
permissions.

Bug: 7384941
Change-Id: Ib156b5874c5587749d7bc066791e9e88d931b174
/frameworks/base/core/java/android/os/Environment.java
4fbbda4cecb078bd3867f416b02cc75f5455284f 25-Sep-2012 Jeff Sharkey <jsharkey@android.com> Handle multi-user mountObb() requests.

Since emulated external storage paths differ based on execution
context, carefully fix up paths for various use-cases:

1. When sending paths to DefaultContainerService, always scope
OBB paths as belonging to USER_OWNER.
2. When sending paths to vold, always build emulated storage paths
visible to root.
3. Always use the original untouched path when talking with apps.

Mount OBB containers using shared app GID, so that an app can read
the mount point across users.

Handle legacy paths like "/sdcard" by resolving the canonical path
before sending to MountService. Move tests to servicestests, and
add tests for new path generation logic.

Bug: 7212801
Change-Id: I078c52879cd08d9c8a52cc8c83ac7ced1e8035e7
/frameworks/base/core/java/android/os/Environment.java
7d8bcb498d4cfb90202335781df1ffa92e96c18b 24-Sep-2012 Jeff Sharkey <jsharkey@android.com> Move multi-user OBB under user-specific path.

Bug: 7212801
Change-Id: I0ab83c1d9cb21914d61a7da45a32e89956e22ec8
/frameworks/base/core/java/android/os/Environment.java
3fe5bf6d69f146077ce9b5e588be8651462b0cd2 19-Sep-2012 Jeff Sharkey <jsharkey@android.com> Make getMediaStorageDirectory() user-aware.

Bug: 7173591
Change-Id: I4513afbd8c3d6a31cd66d8a149be4071d5a4d24c
/frameworks/base/core/java/android/os/Environment.java
dfa45309e09bcdbad877e4e6a6005f348962d64d 13-Sep-2012 Jeff Sharkey <jsharkey@android.com> Give DefaultContainerService all external storage.

Now we can bind to just one instance of DCS, instead of requiring
one-per-user. This also means we can operate on otherwise-stopped
users.

Bug: 7003520
Change-Id: I4881e064ae8942907f6a02c6b868926223455cdc
/frameworks/base/core/java/android/os/Environment.java
b049e212ab7fe8967893c202efcb30fecfdb82fb 08-Sep-2012 Jeff Sharkey <jsharkey@android.com> Include user identifier in external storage paths.

When building external storage paths, always include user in path
to enable cross-user paths and aid debugging.

Each Zygote process continues to only have access to the appropriate
user-specific emulated storage through bind mounts. A second set of
mounts continue supporting legacy /sdcard-style paths. For example,
a process running as owner has these mount points:

/storage/emulated_legacy
/storage/emulated_legacy/Android/obb
/storage/emulated/0
/storage/emulated/obb

Since Environment is created before Zygote forks, we need to update
its internal paths after each process launches.

Bug: 7131382
Change-Id: I6f8c6971f2a8edfb415c14cb4ed05ff97e587a21
/frameworks/base/core/java/android/os/Environment.java
61f57379ca2c5b6290c8da7548fa17128f7ab24f 31-Aug-2012 Amith Yamasani <yamasani@google.com> Centralize the creation of the user system directory

Environment.getUserSystemDirectory(int userId)

Use it all relevant places that was hardcoding it.
Also, wipe out the user's system directory when user is removed, otherwise old state
might be transferred to a new user.

Change-Id: I788ce9c4cf9624229e65efa7047bc0c019ccef0a
/frameworks/base/core/java/android/os/Environment.java
d525baa3a84928e16973fcf7f3d464adac513c1d 23-May-2012 Jeff Sharkey <jsharkey@android.com> Add media directory, hidden for now.

Bug: 6539384
Change-Id: I8f3f7b92d27f15e82a43bb2fec02f2d9ed0280e1
/frameworks/base/core/java/android/os/Environment.java
e704a15bbf0d8f2595215e13175c1f6cdcc8f5e5 18-Apr-2012 Jeff Sharkey <jsharkey@android.com> Update Environment fallback defaults.

Change-Id: Ia385b03023e38c01546e57635ccf9b29d017220a
/frameworks/base/core/java/android/os/Environment.java
d4bdc7b4da5811fccae578a1f3d4b5718762d40f 26-May-2011 Mike Lockwood <lockwood@android.com> Environment: Fix default mount point for external storage

/mnt/sdcard is the real mount point. /sdcard is just a symlink.

Change-Id: If584e5cd31238d5b263de5bd72e179d53875d8c3
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/java/android/os/Environment.java
8fa5b03c1ba4253003c807ad753f58af17086b4e 16-May-2011 Mike Lockwood <lockwood@android.com> resolved conflicts for merge of fc4a3d37 to master

Change-Id: I40f603ba9330c3e882f4d58398095f4094725b21
2f6a3885533a52758c2cd4f81f6123a712be8ae6 10-May-2011 Mike Lockwood <lockwood@android.com> StorageManager: Clean up and generalize storage configuration resources

Replace config_emulateExternalStorage, config_externalStorageRemovable,
config_externalStoragePaths, config_externalStorageDescriptions and
config_mtpReserveSpaceMegabytes resources with an XML resource file
to describe the external storages that are available.

Add android.os.storage.StorageVolume class

StorageManager.getVolumeList() now returns an array of StorageVolume

Change-Id: I06ce1451ebf08b82f0ee825d56d59ebf72eacd3d
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/java/android/os/Environment.java
ee1d6302912c85429aaeaa70a007248fda5c19e2 13-May-2011 Gilles Debunne <debunne@google.com> Links in Environment javadoc

Change-Id: Ib3383152ff6114fdaba5245bc8357f78bc9d5fcf
/frameworks/base/core/java/android/os/Environment.java
50c294f21b3348010c3f91c5a998d54e1e45d2e4 08-Mar-2011 Andy Stadler <stadler@google.com> Clarify rules about encryption of emulated storage.

Bug: 3351426
Change-Id: I3a8fcd369862f3eab1781699108e29fe7ab474a0
/frameworks/base/core/java/android/os/Environment.java
70ee3ca616a296650a1de7864c9f5c0f41fa8fa1 19-Jan-2011 Mike Lockwood <lockwood@android.com> Environment.isExternalStorageRemovable() is false if external storage is emulated

Change-Id: Ib1afe83e4295d8304b65e822edd0dfa1591a5be7
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/java/android/os/Environment.java
b2278dc1853241b4868c89ba3dab6b86b1c7ec53 18-Jan-2011 Kenny Root <kroot@google.com> Don't cache return of getService in Environment

There is already a cache of all non-null return values for calls to
getService(), so don't bother caching it in Environment. This caused
some problems when Environment was called too early in the boot process
and getService() returned null.

Change-Id: I66739d01dab7e422f660d26b370ecce110dcc808
/frameworks/base/core/java/android/os/Environment.java
805fd7ee0e5dc2939e85c84f78d9890a51982bc0 17-Jan-2011 Dianne Hackborn <hackbod@google.com> Add API to get path to OBBs.

Also hide the bitmap thumbnail stuff, we can't support it in its
current form.

And fix some bugs with propagating paths to native code. Yikes!

Change-Id: I13ab37ddbdba5c073489cba5eab035117d3c1574
/frameworks/base/core/java/android/os/Environment.java
a3cdaa5337fa573c4c61770195d6232c2e587090 13-Jan-2011 Jason parks <jparks@google.com> Revert "Remove the APIs for the old encryption scheme."

This reverts commit 1125d780a8b61703b8eb28c5c77dac5f3f0022dd.
/frameworks/base/core/java/android/os/Environment.java
1125d780a8b61703b8eb28c5c77dac5f3f0022dd 12-Jan-2011 Jason parks <jparks@google.com> Remove the APIs for the old encryption scheme.

Change-Id: I55116a5b29b10dfd50015805ec019b485257f68b
/frameworks/base/core/java/android/os/Environment.java
3459e27e5d2f92d2d5487c189c9386c031e79fc1 11-Jan-2011 Mike Lockwood <lockwood@android.com> un@hide android.os.Environment.isExternalStorageEmulated()

Change-Id: I35e7dc59763595523cb5af569e237bcff5cf1b49
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/java/android/os/Environment.java
e1ff214e32ed5c546a7603b07b054908c4d93312 12-Oct-2010 Kenny Root <kroot@google.com> Add API to check for emulated external storage

When the storage is emulated, we don't want to install ASEC containers
to it. This adds the API to check when the external storage is emulated
and uses it to check whether or not to install packages to the external
storage in an ASEC container.

Bug: 3024387
Change-Id: Ia0318aca9e4938a4897deaada5603a4c7c1d0f48
/frameworks/base/core/java/android/os/Environment.java
407f625a9b8e356e765a5ec587c443af1f3aadb5 04-Oct-2010 Dianne Hackborn <hackbod@google.com> Add new API to find out whether external storage is removable.

This is implemented based on whether we are using the "nosdcard"
product. Needed to tweak aapt to allow use of the product attribute
with other resource definition tags besides strings.

Change-Id: I49922d23b52a34183a8e2f4d2515adaf1fc9149a
/frameworks/base/core/java/android/os/Environment.java
d49c455cc97d5fcdd8af497dc2ba85efdc719959 08-Apr-2010 Dianne Hackborn <hackbod@google.com> am 822a7e2d: am ce59fb8b: Fix issue #2578244: playing audio file downloaded by the browser...

Merge commit '822a7e2defcfbd006a7840e1da19cf0827d46736' into kraken

* commit '822a7e2defcfbd006a7840e1da19cf0827d46736':
Fix issue #2578244: playing audio file downloaded by the browser...
ce59fb8b684357f2a10ab62368beeece34bc0e5d 08-Apr-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2578244: playing audio file downloaded by the browser...

...shows an image downloaded by the browser

The downloads directory needs to be non-plural for backwards compatibility.

Change-Id: Ifb6ddf8ee980a57ad113a5fc8b51f5acd8df5955
/frameworks/base/core/java/android/os/Environment.java
591ad27d748c5c605d4fd44b89b2a8ea8f0057ff 31-Mar-2010 Dianne Hackborn <hackbod@google.com> am 6d630607: am 5cdd7858: Merge "Fix issue #2553553: API REVIEW: android.context.Context" into froyo

Merge commit '6d63060768f9d73c6062a2b603d3c51c7d5f0043' into kraken

* commit '6d63060768f9d73c6062a2b603d3c51c7d5f0043':
Fix issue #2553553: API REVIEW: android.context.Context
acaf028fc9efd9754f57ed65476e79a816811b35 30-Mar-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2553553: API REVIEW: android.context.Context

Change-Id: I3e3ab7a909329d498544dc9ed4d500cbcc4ed281
/frameworks/base/core/java/android/os/Environment.java
1f4df90bfab8ca42eabe95f19eadff3432eee7fd 27-Mar-2010 Oscar Montemayor <oam@google.com> DO NOT MERGE
Removing unused features from source tree.
Please refer to Bug#2502219.

Change-Id: I879c29bfd5ffe933f64bb1082aaae7c956450a5a
/frameworks/base/core/java/android/os/Environment.java
e83cefcef07f9ac025642c1ffec76b4c7ab39cf2 05-Feb-2010 Dianne Hackborn <hackbod@google.com> New external storage APIs.

This implements the spec for external storage organization, and
properly reflects how the media scanner organizes the files it finds.

Also includes package manager support for removing app private
files from external storage when the application is uninstalled.

For the new APIs and paths, the main place to look is Environment
and Context.
/frameworks/base/core/java/android/os/Environment.java
b104340496e3a531e26c8f428c808eca0e039f50 05-Feb-2010 San Mehat <san@google.com> Framework: Clean up / Refactor Mount APIs

- Move android.storage.* -> android.os.storage.* and refactor users
- Refactor generic shares back to explicit ums enable/disable/isEnabled
- Remove media insert/removed event callbacks (not ready for Froyo)
- Remove 'label' from volume state change callbacks
- Add public API functions for enabling/disabling USB mass storage (permissions enforced
in MountSevice)
- Remove some stray un-needed import lines
- Move android.os.IMountService / android.os.IMountServiceListener -> android.os.storage
- Improve code comments

Updated:
MountService: Add dup state check and move debugging behind a conditional
UsbStorageActivity: Fix review comments + a TODO
StorageNotification: Add @Override tags
StorageManager: Don't use a static Listener list
MountService: Reduce bloat and fix == where I meant .equals()
PackageManagerTests: Update for new API

Signed-off-by: San Mehat <san@google.com>
/frameworks/base/core/java/android/os/Environment.java
a6a72814e0852abf0db3c58d6e62d8db59ac6033 08-Jan-2010 San Mehat <san@google.com> Environment: Catch *all* exceptions from MountService

Signed-off-by: San Mehat <san@google.com>
/frameworks/base/core/java/android/os/Environment.java
7fd0fee968f4a3e474e1ea9933fc03552fe5f50a 17-Dec-2009 San Mehat <san@google.com> services: MountService: Refactor MountService for vold2

Squash of the following:
services: MountService: Rework the way volume states are handled
MountService: Add new API for directly getting volume state via a mount point
Environment: Switch from using system property for external storage state.
MountService: Add support for UMS
MountService: Fix a few bugs
services: MountService: Add support for mount-on-insertion
services: MountService: Add some debugging around UMS
services: MountService: Fix some UMS bugs and clean-up startup mount code

Signed-off-by: San Mehat <san@google.com>
/frameworks/base/core/java/android/os/Environment.java
a8529f68671a8a118751cb6ad577f44eaf076b96 18-Nov-2009 Oscar Montemayor <oam@google.com> Encrypted File Systems Project. Installer modifications.
Started to modify isntaller for data redirection to a secure location.
/frameworks/base/core/java/android/os/Environment.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/os/Environment.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/os/Environment.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/core/java/android/os/Environment.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/os/Environment.java