Merge "Avoid runtime restart when storage is missing." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
18553f5f73
@@ -12526,13 +12526,12 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
}
|
||||
|
||||
if (mSuccess) {
|
||||
final boolean mounted;
|
||||
if (Environment.isExternalStorageEmulated()) {
|
||||
mounted = true;
|
||||
} else {
|
||||
boolean mounted = false;
|
||||
try {
|
||||
final String status = Environment.getExternalStorageState();
|
||||
mounted = (Environment.MEDIA_MOUNTED.equals(status)
|
||||
|| Environment.MEDIA_MOUNTED_READ_ONLY.equals(status));
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
if (mounted) {
|
||||
|
||||
Reference in New Issue
Block a user