Loading core/java/android/accounts/AccountManagerService.java +26 −10 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.os.Binder; import android.os.Bundle; import android.os.Environment; import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; Loading @@ -52,13 +51,11 @@ import android.os.Message; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemClock; import android.os.SystemProperties; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.Log; import android.util.Pair; import java.io.File; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; Loading Loading @@ -453,6 +450,7 @@ public class AccountManagerService mAccount = account; } @Override public void run() throws RemoteException { try { mAuthenticator.hasFeatures(this, mAccount, mFeatures); Loading @@ -461,6 +459,7 @@ public class AccountManagerService } } @Override public void onResult(Bundle result) { IAccountManagerResponse response = getResponseAndClose(); if (response != null) { Loading @@ -486,6 +485,7 @@ public class AccountManagerService } } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", hasFeatures" + ", " + mAccount Loading Loading @@ -531,15 +531,18 @@ public class AccountManagerService mAccount = account; } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", removeAccount" + ", account " + mAccount; } @Override public void run() throws RemoteException { mAuthenticator.getAccountRemovalAllowed(this, mAccount); } @Override public void onResult(Bundle result) { if (result != null && result.containsKey(AccountManager.KEY_BOOLEAN_RESULT) && !result.containsKey(AccountManager.KEY_INTENT)) { Loading Loading @@ -832,16 +835,19 @@ public class AccountManagerService try { new Session(response, account.type, false, false /* stripAuthTokenFromResult */) { @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", getAuthTokenLabel" + ", " + account + ", authTokenType " + authTokenType; } @Override public void run() throws RemoteException { mAuthenticator.getAuthTokenLabel(this, authTokenType); } @Override public void onResult(Bundle result) { if (result != null) { String label = result.getString(AccountManager.KEY_AUTH_TOKEN_LABEL); Loading Loading @@ -912,6 +918,7 @@ public class AccountManagerService new Session(response, account.type, expectActivityLaunch, false /* stripAuthTokenFromResult */) { @Override protected String toDebugString(long now) { if (loginOptions != null) loginOptions.keySet(); return super.toDebugString(now) + ", getAuthToken" Loading @@ -921,6 +928,7 @@ public class AccountManagerService + ", notifyOnAuthFailure " + notifyOnAuthFailure; } @Override public void run() throws RemoteException { // If the caller doesn't have permission then create and return the // "grant permission" intent instead of the "getAuthToken" intent. Loading @@ -931,6 +939,7 @@ public class AccountManagerService } } @Override public void onResult(Bundle result) { if (result != null) { if (result.containsKey(AccountManager.KEY_AUTH_TOKEN_LABEL)) { Loading Loading @@ -1075,11 +1084,13 @@ public class AccountManagerService try { new Session(response, accountType, expectActivityLaunch, true /* stripAuthTokenFromResult */) { @Override public void run() throws RemoteException { mAuthenticator.addAccount(this, mAccountType, authTokenType, requiredFeatures, options); } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", addAccount" + ", accountType " + accountType Loading Loading @@ -1110,9 +1121,11 @@ public class AccountManagerService try { new Session(response, account.type, expectActivityLaunch, true /* stripAuthTokenFromResult */) { @Override public void run() throws RemoteException { mAuthenticator.confirmCredentials(this, account, options); } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", confirmCredentials" + ", " + account; Loading Loading @@ -1142,9 +1155,11 @@ public class AccountManagerService try { new Session(response, account.type, expectActivityLaunch, true /* stripAuthTokenFromResult */) { @Override public void run() throws RemoteException { mAuthenticator.updateCredentials(this, account, authTokenType, loginOptions); } @Override protected String toDebugString(long now) { if (loginOptions != null) loginOptions.keySet(); return super.toDebugString(now) + ", updateCredentials" Loading Loading @@ -1174,9 +1189,11 @@ public class AccountManagerService try { new Session(response, accountType, expectActivityLaunch, true /* stripAuthTokenFromResult */) { @Override public void run() throws RemoteException { mAuthenticator.editProperties(this, mAccountType); } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", editProperties" + ", accountType " + accountType; Loading @@ -1200,6 +1217,7 @@ public class AccountManagerService mFeatures = features; } @Override public void run() throws RemoteException { mAccountsOfType = getAccountsByTypeFromCache(mAccountType); // check whether each account matches the requested features Loading Loading @@ -1234,6 +1252,7 @@ public class AccountManagerService } } @Override public void onResult(Bundle result) { mNumResults++; if (result == null) { Loading Loading @@ -1272,6 +1291,7 @@ public class AccountManagerService } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", getAccountsByTypeAndFeatures" + ", " + (mFeatures != null ? TextUtils.join(",", mFeatures) : null); Loading Loading @@ -1594,6 +1614,7 @@ public class AccountManagerService super(looper); } @Override public void handleMessage(Message msg) { switch (msg.what) { case MESSAGE_TIMED_OUT: Loading @@ -1608,14 +1629,8 @@ public class AccountManagerService } private static String getDatabaseName() { if(Environment.isEncryptedFilesystemEnabled()) { // Hard-coded path in case of encrypted file system return Environment.getSystemSecureDirectory().getPath() + File.separator + DATABASE_NAME; } else { // Regular path in case of non-encrypted file system return DATABASE_NAME; } } private class DatabaseHelper extends SQLiteOpenHelper { Loading Loading @@ -1837,6 +1852,7 @@ public class AccountManagerService return false; } @Override protected void dump(FileDescriptor fd, PrintWriter fout, String[] args) { final boolean isCheckinRequest = scanArgs(args, "--checkin") || scanArgs(args, "-c"); Loading core/java/android/content/SyncStorageEngine.java +7 −7 Original line number Diff line number Diff line Loading @@ -20,10 +20,6 @@ import com.android.internal.os.AtomicFile; import com.android.internal.util.ArrayUtils; import com.android.internal.util.FastXmlSerializer; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlSerializer; import android.accounts.Account; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; Loading @@ -37,9 +33,9 @@ import android.os.Parcel; import android.os.RemoteCallbackList; import android.os.RemoteException; import android.util.Log; import android.util.Pair; import android.util.SparseArray; import android.util.Xml; import android.util.Pair; import java.io.File; import java.io.FileInputStream; Loading @@ -48,8 +44,12 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.HashMap; import java.util.Iterator; import java.util.TimeZone; import java.util.List; import java.util.TimeZone; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlSerializer; /** * Singleton that tracks the sync data and overall sync Loading Loading @@ -319,7 +319,7 @@ public class SyncStorageEngine extends Handler { } // This call will return the correct directory whether Encrypted File Systems is // enabled or not. File dataDir = Environment.getSecureDataDirectory(); File dataDir = Environment.getDataDirectory(); sSyncStorageEngine = new SyncStorageEngine(context, dataDir); } Loading core/java/android/content/pm/ApplicationInfo.java +2 −10 Original line number Diff line number Diff line Loading @@ -269,16 +269,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int FLAG_SUPPORTS_XLARGE_SCREENS = 1<<19; /** * Value for {@link #flags}: this is true if the application has set * its android:neverEncrypt to true, false otherwise. It is used to specify * that this package specifically "opts-out" of a secured file system solution, * and will always store its data in-the-clear. * * {@hide} */ public static final int FLAG_NEVER_ENCRYPT = 1<<30; /** * Value for {@link #flags}: Set to true if the application has been * installed using the forward lock option. Loading Loading @@ -469,6 +459,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { } @Override public String toString() { return "ApplicationInfo{" + Integer.toHexString(System.identityHashCode(this)) Loading @@ -479,6 +470,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { return 0; } @Override public void writeToParcel(Parcel dest, int parcelableFlags) { super.writeToParcel(dest, parcelableFlags); dest.writeString(taskAffinity); Loading core/java/android/content/pm/PackageParser.java +20 −9 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.content.pm; import com.android.internal.util.XmlUtils; import android.content.ComponentName; import android.content.Intent; import android.content.IntentFilter; Loading @@ -32,9 +34,6 @@ import android.util.Config; import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; import com.android.internal.util.XmlUtils; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import java.io.BufferedInputStream; import java.io.File; Loading @@ -49,6 +48,9 @@ import java.util.Iterator; import java.util.jar.JarEntry; import java.util.jar.JarFile; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; /** * Package archive parsing * Loading Loading @@ -1573,12 +1575,6 @@ public class PackageParser { ai.flags |= ApplicationInfo.FLAG_TEST_ONLY; } if (sa.getBoolean( com.android.internal.R.styleable.AndroidManifestApplication_neverEncrypt, false)) { ai.flags |= ApplicationInfo.FLAG_NEVER_ENCRYPT; } String str; str = sa.getNonConfigurationString( com.android.internal.R.styleable.AndroidManifestApplication_permission, 0); Loading Loading @@ -2863,6 +2859,7 @@ public class PackageParser { } } @Override public String toString() { return "Package{" + Integer.toHexString(System.identityHashCode(this)) Loading Loading @@ -3003,11 +3000,13 @@ public class PackageParser { info = _info; } @Override public void setPackageName(String packageName) { super.setPackageName(packageName); info.packageName = packageName; } @Override public String toString() { return "Permission{" + Integer.toHexString(System.identityHashCode(this)) Loading @@ -3028,11 +3027,13 @@ public class PackageParser { info = _info; } @Override public void setPackageName(String packageName) { super.setPackageName(packageName); info.packageName = packageName; } @Override public String toString() { return "PermissionGroup{" + Integer.toHexString(System.identityHashCode(this)) Loading Loading @@ -3119,11 +3120,13 @@ public class PackageParser { info.applicationInfo = args.owner.applicationInfo; } @Override public void setPackageName(String packageName) { super.setPackageName(packageName); info.packageName = packageName; } @Override public String toString() { return "Activity{" + Integer.toHexString(System.identityHashCode(this)) Loading Loading @@ -3153,11 +3156,13 @@ public class PackageParser { info.applicationInfo = args.owner.applicationInfo; } @Override public void setPackageName(String packageName) { super.setPackageName(packageName); info.packageName = packageName; } @Override public String toString() { return "Service{" + Integer.toHexString(System.identityHashCode(this)) Loading Loading @@ -3194,11 +3199,13 @@ public class PackageParser { this.syncable = existingProvider.syncable; } @Override public void setPackageName(String packageName) { super.setPackageName(packageName); info.packageName = packageName; } @Override public String toString() { return "Provider{" + Integer.toHexString(System.identityHashCode(this)) Loading Loading @@ -3232,11 +3239,13 @@ public class PackageParser { info = _info; } @Override public void setPackageName(String packageName) { super.setPackageName(packageName); info.packageName = packageName; } @Override public String toString() { return "Instrumentation{" + Integer.toHexString(System.identityHashCode(this)) Loading Loading @@ -3270,6 +3279,7 @@ public class PackageParser { activity = _activity; } @Override public String toString() { return "ActivityIntentInfo{" + Integer.toHexString(System.identityHashCode(this)) Loading @@ -3284,6 +3294,7 @@ public class PackageParser { service = _service; } @Override public String toString() { return "ServiceIntentInfo{" + Integer.toHexString(System.identityHashCode(this)) Loading core/java/android/os/Environment.java +2 −42 Original line number Diff line number Diff line Loading @@ -16,11 +16,11 @@ package android.os; import java.io.File; import android.content.res.Resources; import android.os.storage.IMountService; import java.io.File; /** * Provides access to environment variables. */ Loading @@ -47,46 +47,6 @@ public class Environment { return ROOT_DIRECTORY; } /** * Gets the system directory available for secure storage. * If Encrypted File system is enabled, it returns an encrypted directory (/data/secure/system). * Otherwise, it returns the unencrypted /data/system directory. * @return File object representing the secure storage system directory. * @hide */ public static File getSystemSecureDirectory() { if (isEncryptedFilesystemEnabled()) { return new File(SECURE_DATA_DIRECTORY, "system"); } else { return new File(DATA_DIRECTORY, "system"); } } /** * Gets the data directory for secure storage. * If Encrypted File system is enabled, it returns an encrypted directory (/data/secure). * Otherwise, it returns the unencrypted /data directory. * @return File object representing the data directory for secure storage. * @hide */ public static File getSecureDataDirectory() { if (isEncryptedFilesystemEnabled()) { return SECURE_DATA_DIRECTORY; } else { return DATA_DIRECTORY; } } /** * Returns whether the Encrypted File System feature is enabled on the device or not. * @return <code>true</code> if Encrypted File System feature is enabled, <code>false</code> * if disabled. * @hide */ public static boolean isEncryptedFilesystemEnabled() { return SystemProperties.getBoolean(SYSTEM_PROPERTY_EFS_ENABLED, false); } private static final File DATA_DIRECTORY = getDirectory("ANDROID_DATA", "/data"); Loading Loading
core/java/android/accounts/AccountManagerService.java +26 −10 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.os.Binder; import android.os.Bundle; import android.os.Environment; import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; Loading @@ -52,13 +51,11 @@ import android.os.Message; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemClock; import android.os.SystemProperties; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.Log; import android.util.Pair; import java.io.File; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; Loading Loading @@ -453,6 +450,7 @@ public class AccountManagerService mAccount = account; } @Override public void run() throws RemoteException { try { mAuthenticator.hasFeatures(this, mAccount, mFeatures); Loading @@ -461,6 +459,7 @@ public class AccountManagerService } } @Override public void onResult(Bundle result) { IAccountManagerResponse response = getResponseAndClose(); if (response != null) { Loading @@ -486,6 +485,7 @@ public class AccountManagerService } } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", hasFeatures" + ", " + mAccount Loading Loading @@ -531,15 +531,18 @@ public class AccountManagerService mAccount = account; } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", removeAccount" + ", account " + mAccount; } @Override public void run() throws RemoteException { mAuthenticator.getAccountRemovalAllowed(this, mAccount); } @Override public void onResult(Bundle result) { if (result != null && result.containsKey(AccountManager.KEY_BOOLEAN_RESULT) && !result.containsKey(AccountManager.KEY_INTENT)) { Loading Loading @@ -832,16 +835,19 @@ public class AccountManagerService try { new Session(response, account.type, false, false /* stripAuthTokenFromResult */) { @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", getAuthTokenLabel" + ", " + account + ", authTokenType " + authTokenType; } @Override public void run() throws RemoteException { mAuthenticator.getAuthTokenLabel(this, authTokenType); } @Override public void onResult(Bundle result) { if (result != null) { String label = result.getString(AccountManager.KEY_AUTH_TOKEN_LABEL); Loading Loading @@ -912,6 +918,7 @@ public class AccountManagerService new Session(response, account.type, expectActivityLaunch, false /* stripAuthTokenFromResult */) { @Override protected String toDebugString(long now) { if (loginOptions != null) loginOptions.keySet(); return super.toDebugString(now) + ", getAuthToken" Loading @@ -921,6 +928,7 @@ public class AccountManagerService + ", notifyOnAuthFailure " + notifyOnAuthFailure; } @Override public void run() throws RemoteException { // If the caller doesn't have permission then create and return the // "grant permission" intent instead of the "getAuthToken" intent. Loading @@ -931,6 +939,7 @@ public class AccountManagerService } } @Override public void onResult(Bundle result) { if (result != null) { if (result.containsKey(AccountManager.KEY_AUTH_TOKEN_LABEL)) { Loading Loading @@ -1075,11 +1084,13 @@ public class AccountManagerService try { new Session(response, accountType, expectActivityLaunch, true /* stripAuthTokenFromResult */) { @Override public void run() throws RemoteException { mAuthenticator.addAccount(this, mAccountType, authTokenType, requiredFeatures, options); } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", addAccount" + ", accountType " + accountType Loading Loading @@ -1110,9 +1121,11 @@ public class AccountManagerService try { new Session(response, account.type, expectActivityLaunch, true /* stripAuthTokenFromResult */) { @Override public void run() throws RemoteException { mAuthenticator.confirmCredentials(this, account, options); } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", confirmCredentials" + ", " + account; Loading Loading @@ -1142,9 +1155,11 @@ public class AccountManagerService try { new Session(response, account.type, expectActivityLaunch, true /* stripAuthTokenFromResult */) { @Override public void run() throws RemoteException { mAuthenticator.updateCredentials(this, account, authTokenType, loginOptions); } @Override protected String toDebugString(long now) { if (loginOptions != null) loginOptions.keySet(); return super.toDebugString(now) + ", updateCredentials" Loading Loading @@ -1174,9 +1189,11 @@ public class AccountManagerService try { new Session(response, accountType, expectActivityLaunch, true /* stripAuthTokenFromResult */) { @Override public void run() throws RemoteException { mAuthenticator.editProperties(this, mAccountType); } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", editProperties" + ", accountType " + accountType; Loading @@ -1200,6 +1217,7 @@ public class AccountManagerService mFeatures = features; } @Override public void run() throws RemoteException { mAccountsOfType = getAccountsByTypeFromCache(mAccountType); // check whether each account matches the requested features Loading Loading @@ -1234,6 +1252,7 @@ public class AccountManagerService } } @Override public void onResult(Bundle result) { mNumResults++; if (result == null) { Loading Loading @@ -1272,6 +1291,7 @@ public class AccountManagerService } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", getAccountsByTypeAndFeatures" + ", " + (mFeatures != null ? TextUtils.join(",", mFeatures) : null); Loading Loading @@ -1594,6 +1614,7 @@ public class AccountManagerService super(looper); } @Override public void handleMessage(Message msg) { switch (msg.what) { case MESSAGE_TIMED_OUT: Loading @@ -1608,14 +1629,8 @@ public class AccountManagerService } private static String getDatabaseName() { if(Environment.isEncryptedFilesystemEnabled()) { // Hard-coded path in case of encrypted file system return Environment.getSystemSecureDirectory().getPath() + File.separator + DATABASE_NAME; } else { // Regular path in case of non-encrypted file system return DATABASE_NAME; } } private class DatabaseHelper extends SQLiteOpenHelper { Loading Loading @@ -1837,6 +1852,7 @@ public class AccountManagerService return false; } @Override protected void dump(FileDescriptor fd, PrintWriter fout, String[] args) { final boolean isCheckinRequest = scanArgs(args, "--checkin") || scanArgs(args, "-c"); Loading
core/java/android/content/SyncStorageEngine.java +7 −7 Original line number Diff line number Diff line Loading @@ -20,10 +20,6 @@ import com.android.internal.os.AtomicFile; import com.android.internal.util.ArrayUtils; import com.android.internal.util.FastXmlSerializer; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlSerializer; import android.accounts.Account; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; Loading @@ -37,9 +33,9 @@ import android.os.Parcel; import android.os.RemoteCallbackList; import android.os.RemoteException; import android.util.Log; import android.util.Pair; import android.util.SparseArray; import android.util.Xml; import android.util.Pair; import java.io.File; import java.io.FileInputStream; Loading @@ -48,8 +44,12 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.HashMap; import java.util.Iterator; import java.util.TimeZone; import java.util.List; import java.util.TimeZone; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlSerializer; /** * Singleton that tracks the sync data and overall sync Loading Loading @@ -319,7 +319,7 @@ public class SyncStorageEngine extends Handler { } // This call will return the correct directory whether Encrypted File Systems is // enabled or not. File dataDir = Environment.getSecureDataDirectory(); File dataDir = Environment.getDataDirectory(); sSyncStorageEngine = new SyncStorageEngine(context, dataDir); } Loading
core/java/android/content/pm/ApplicationInfo.java +2 −10 Original line number Diff line number Diff line Loading @@ -269,16 +269,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int FLAG_SUPPORTS_XLARGE_SCREENS = 1<<19; /** * Value for {@link #flags}: this is true if the application has set * its android:neverEncrypt to true, false otherwise. It is used to specify * that this package specifically "opts-out" of a secured file system solution, * and will always store its data in-the-clear. * * {@hide} */ public static final int FLAG_NEVER_ENCRYPT = 1<<30; /** * Value for {@link #flags}: Set to true if the application has been * installed using the forward lock option. Loading Loading @@ -469,6 +459,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { } @Override public String toString() { return "ApplicationInfo{" + Integer.toHexString(System.identityHashCode(this)) Loading @@ -479,6 +470,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { return 0; } @Override public void writeToParcel(Parcel dest, int parcelableFlags) { super.writeToParcel(dest, parcelableFlags); dest.writeString(taskAffinity); Loading
core/java/android/content/pm/PackageParser.java +20 −9 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.content.pm; import com.android.internal.util.XmlUtils; import android.content.ComponentName; import android.content.Intent; import android.content.IntentFilter; Loading @@ -32,9 +34,6 @@ import android.util.Config; import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; import com.android.internal.util.XmlUtils; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import java.io.BufferedInputStream; import java.io.File; Loading @@ -49,6 +48,9 @@ import java.util.Iterator; import java.util.jar.JarEntry; import java.util.jar.JarFile; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; /** * Package archive parsing * Loading Loading @@ -1573,12 +1575,6 @@ public class PackageParser { ai.flags |= ApplicationInfo.FLAG_TEST_ONLY; } if (sa.getBoolean( com.android.internal.R.styleable.AndroidManifestApplication_neverEncrypt, false)) { ai.flags |= ApplicationInfo.FLAG_NEVER_ENCRYPT; } String str; str = sa.getNonConfigurationString( com.android.internal.R.styleable.AndroidManifestApplication_permission, 0); Loading Loading @@ -2863,6 +2859,7 @@ public class PackageParser { } } @Override public String toString() { return "Package{" + Integer.toHexString(System.identityHashCode(this)) Loading Loading @@ -3003,11 +3000,13 @@ public class PackageParser { info = _info; } @Override public void setPackageName(String packageName) { super.setPackageName(packageName); info.packageName = packageName; } @Override public String toString() { return "Permission{" + Integer.toHexString(System.identityHashCode(this)) Loading @@ -3028,11 +3027,13 @@ public class PackageParser { info = _info; } @Override public void setPackageName(String packageName) { super.setPackageName(packageName); info.packageName = packageName; } @Override public String toString() { return "PermissionGroup{" + Integer.toHexString(System.identityHashCode(this)) Loading Loading @@ -3119,11 +3120,13 @@ public class PackageParser { info.applicationInfo = args.owner.applicationInfo; } @Override public void setPackageName(String packageName) { super.setPackageName(packageName); info.packageName = packageName; } @Override public String toString() { return "Activity{" + Integer.toHexString(System.identityHashCode(this)) Loading Loading @@ -3153,11 +3156,13 @@ public class PackageParser { info.applicationInfo = args.owner.applicationInfo; } @Override public void setPackageName(String packageName) { super.setPackageName(packageName); info.packageName = packageName; } @Override public String toString() { return "Service{" + Integer.toHexString(System.identityHashCode(this)) Loading Loading @@ -3194,11 +3199,13 @@ public class PackageParser { this.syncable = existingProvider.syncable; } @Override public void setPackageName(String packageName) { super.setPackageName(packageName); info.packageName = packageName; } @Override public String toString() { return "Provider{" + Integer.toHexString(System.identityHashCode(this)) Loading Loading @@ -3232,11 +3239,13 @@ public class PackageParser { info = _info; } @Override public void setPackageName(String packageName) { super.setPackageName(packageName); info.packageName = packageName; } @Override public String toString() { return "Instrumentation{" + Integer.toHexString(System.identityHashCode(this)) Loading Loading @@ -3270,6 +3279,7 @@ public class PackageParser { activity = _activity; } @Override public String toString() { return "ActivityIntentInfo{" + Integer.toHexString(System.identityHashCode(this)) Loading @@ -3284,6 +3294,7 @@ public class PackageParser { service = _service; } @Override public String toString() { return "ServiceIntentInfo{" + Integer.toHexString(System.identityHashCode(this)) Loading
core/java/android/os/Environment.java +2 −42 Original line number Diff line number Diff line Loading @@ -16,11 +16,11 @@ package android.os; import java.io.File; import android.content.res.Resources; import android.os.storage.IMountService; import java.io.File; /** * Provides access to environment variables. */ Loading @@ -47,46 +47,6 @@ public class Environment { return ROOT_DIRECTORY; } /** * Gets the system directory available for secure storage. * If Encrypted File system is enabled, it returns an encrypted directory (/data/secure/system). * Otherwise, it returns the unencrypted /data/system directory. * @return File object representing the secure storage system directory. * @hide */ public static File getSystemSecureDirectory() { if (isEncryptedFilesystemEnabled()) { return new File(SECURE_DATA_DIRECTORY, "system"); } else { return new File(DATA_DIRECTORY, "system"); } } /** * Gets the data directory for secure storage. * If Encrypted File system is enabled, it returns an encrypted directory (/data/secure). * Otherwise, it returns the unencrypted /data directory. * @return File object representing the data directory for secure storage. * @hide */ public static File getSecureDataDirectory() { if (isEncryptedFilesystemEnabled()) { return SECURE_DATA_DIRECTORY; } else { return DATA_DIRECTORY; } } /** * Returns whether the Encrypted File System feature is enabled on the device or not. * @return <code>true</code> if Encrypted File System feature is enabled, <code>false</code> * if disabled. * @hide */ public static boolean isEncryptedFilesystemEnabled() { return SystemProperties.getBoolean(SYSTEM_PROPERTY_EFS_ENABLED, false); } private static final File DATA_DIRECTORY = getDirectory("ANDROID_DATA", "/data"); Loading