Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccf4fa05 authored by Arc Wang's avatar Arc Wang
Browse files

Should not show loading animation after size loading complete

SettingsPreferenceFragment#setLoading(boolean loading, boolean animate)
shows loading animation when 'animate' parameter is true.

This change sets 'animate' parameter false to fix this issue.

Bug: 254003456
Test: manual visual
      Settings -> Storage -> Free up space -> back
      then see if loading animation shows.
Change-Id: Ic804bcf950a9c57297ccefd6e942edea0b792a3b
parent 12d4b784
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import android.os.Bundle;
import android.os.UserManager;
import android.os.storage.StorageManager;
import android.util.SparseArray;
import android.view.View;

import androidx.annotation.VisibleForTesting;
import androidx.loader.app.LoaderManager;
@@ -210,9 +209,7 @@ public class StorageCategoryFragment extends DashboardFragment
            return;
        }

        if (getView().findViewById(R.id.loading_container).getVisibility() == View.VISIBLE) {
            setLoading(false /* loading */, true /* animate */);
        }
        setLoading(false /* loading */, false /* animate */);

        final long privateUsedBytes = mStorageInfo.totalBytes - mStorageInfo.freeBytes;
        mPreferenceController.setVolume(mSelectedStorageEntry.getVolumeInfo());
+1 −1
Original line number Diff line number Diff line
@@ -385,7 +385,7 @@ public class StorageDashboardFragment extends DashboardFragment
            return;
        }

        setLoading(false /* loading */, true /* animate */);
        setLoading(false /* loading */, false /* animate */);

        final long privateUsedBytes = mStorageInfo.totalBytes - mStorageInfo.freeBytes;
        mPreferenceController.setVolume(mSelectedStorageEntry.getVolumeInfo());