Android 8.0 默认EMMC显示为16GB

frameworks\base\core\java\android\app\usage\StorageStatsManager.java
限制:调用 StorageStatsManager 获取EMMC才可生效

    public @BytesLong long getTotalBytes(@NonNull UUID storageUuid) throws IOException {
    
    
++  //        try {`在这里插入代码片`
++  //            return mService.getTotalBytes(convert(storageUuid), mContext.getOpPackageName());
++              long total = 17179869184L;
++              return total;
++  //        } catch (ParcelableException e) {
    
    
++  //            e.maybeRethrow(IOException.class);
++  //            throw new RuntimeException(e);
++  //        } catch (RemoteException e) {
    
    
++  //            throw e.rethrowFromSystemServer();
++  //        }
    }

猜你喜欢

转载自blog.csdn.net/qq_27494201/article/details/125272667