适用平台:MTK
    适用版本:M

    1. public boolean haveExternelSD(Context context) {
    2. StorageManager mStorageManager = (StorageManager)context.getSystemService(Context.STORAGE_SERVICE);
    3. String[] mPathList = mStorageManager.getVolumePaths();
    4. int size = 0;
    5. for (int i = 0; i < mPathList.length; i++) {
    6. if ("mounted".equals(mStorageManager.getVolumeState(mPathList[i]))) {
    7. size++;
    8. }
    9. }
    10. return size == 1 ? false : true;
    11. }