Java Code Examples for android.os.Environment#getDataSystemDeDirectory()

The following examples show how to use android.os.Environment#getDataSystemDeDirectory() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BrightnessTracker.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
public AtomicFile getFile(String filename) {
    return new AtomicFile(new File(Environment.getDataSystemDeDirectory(), filename));
}
 
Example 2
Source File: LockSettingsStorage.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
@VisibleForTesting
protected File getSyntheticPasswordDirectoryForUser(int userId) {
    return new File(Environment.getDataSystemDeDirectory(userId) ,SYNTHETIC_PASSWORD_DIRECTORY);
}
 
Example 3
Source File: UserDataPreparer.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
@VisibleForTesting
protected File getDataSystemDeDirectory(int userId) {
    return Environment.getDataSystemDeDirectory(userId);
}
 
Example 4
Source File: SettingsProvider.java    From Study_Android_Demo with Apache License 2.0 4 votes vote down vote up
private File getRingtoneCacheDir(int userId) {
    final File cacheDir = new File(Environment.getDataSystemDeDirectory(userId), "ringtones");
    cacheDir.mkdir();
    SELinux.restorecon(cacheDir);
    return cacheDir;
}