android.support.v4.os
Class EnvironmentCompat

java.lang.Object
  extended by android.support.v4.os.EnvironmentCompat

public class EnvironmentCompat
extends java.lang.Object

Helper for accessing features in Environment introduced after API level 4 in a backwards compatible fashion.


Field Summary
static java.lang.String MEDIA_UNKNOWN
          Unknown storage state, such as when a path isn't backed by known storage media.
 
Constructor Summary
EnvironmentCompat()
           
 
Method Summary
static java.lang.String getStorageState(java.io.File path)
          Returns the current state of the storage device that provides the given path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MEDIA_UNKNOWN

public static final java.lang.String MEDIA_UNKNOWN
Unknown storage state, such as when a path isn't backed by known storage media.

See Also:
getStorageState(File), Constant Field Values
Constructor Detail

EnvironmentCompat

public EnvironmentCompat()
Method Detail

getStorageState

public static java.lang.String getStorageState(java.io.File path)
Returns the current state of the storage device that provides the given path.

Returns:
one of MEDIA_UNKNOWN, Environment.MEDIA_REMOVED, Environment.MEDIA_UNMOUNTED, Environment.MEDIA_CHECKING, Environment.MEDIA_NOFS, Environment.MEDIA_MOUNTED, Environment.MEDIA_MOUNTED_READ_ONLY, Environment.MEDIA_SHARED, Environment.MEDIA_BAD_REMOVAL, or Environment.MEDIA_UNMOUNTABLE.