Loading src/com/android/settings/deviceinfo/StorageWizardFormatProgress.java +17 −1 Original line number Diff line number Diff line Loading @@ -55,12 +55,23 @@ public class StorageWizardFormatProgress extends StorageWizardBase { new PartitionTask().execute(); } public class PartitionTask extends AsyncTask<Void, Void, Exception> { public class PartitionTask extends AsyncTask<Void, Integer, Exception> { @Override protected Exception doInBackground(Void... params) { try { if (mFormatPrivate) { mStorage.partitionPrivate(mDisk.getId()); publishProgress(40); final long internalBench = mStorage.benchmark(null); publishProgress(60); final VolumeInfo privateVol = findFirstVolume(VolumeInfo.TYPE_PRIVATE); final long privateBench = mStorage.benchmark(privateVol.id); // TODO: plumb through to user when below threshold final float pct = (float) internalBench / (float) privateBench; Log.d(TAG, "New volume is " + pct + "x the speed of internal"); } else { mStorage.partitionPublic(mDisk.getId()); } Loading @@ -70,6 +81,11 @@ public class StorageWizardFormatProgress extends StorageWizardBase { } } @Override protected void onProgressUpdate(Integer... progress) { setCurrentProgress(progress[0]); } @Override protected void onPostExecute(Exception e) { final Context context = StorageWizardFormatProgress.this; Loading Loading
src/com/android/settings/deviceinfo/StorageWizardFormatProgress.java +17 −1 Original line number Diff line number Diff line Loading @@ -55,12 +55,23 @@ public class StorageWizardFormatProgress extends StorageWizardBase { new PartitionTask().execute(); } public class PartitionTask extends AsyncTask<Void, Void, Exception> { public class PartitionTask extends AsyncTask<Void, Integer, Exception> { @Override protected Exception doInBackground(Void... params) { try { if (mFormatPrivate) { mStorage.partitionPrivate(mDisk.getId()); publishProgress(40); final long internalBench = mStorage.benchmark(null); publishProgress(60); final VolumeInfo privateVol = findFirstVolume(VolumeInfo.TYPE_PRIVATE); final long privateBench = mStorage.benchmark(privateVol.id); // TODO: plumb through to user when below threshold final float pct = (float) internalBench / (float) privateBench; Log.d(TAG, "New volume is " + pct + "x the speed of internal"); } else { mStorage.partitionPublic(mDisk.getId()); } Loading @@ -70,6 +81,11 @@ public class StorageWizardFormatProgress extends StorageWizardBase { } } @Override protected void onProgressUpdate(Integer... progress) { setCurrentProgress(progress[0]); } @Override protected void onPostExecute(Exception e) { final Context context = StorageWizardFormatProgress.this; Loading