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

Commit 6334cfa8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove the 2 seconds wait time to sync app data usage list."

parents 886cf1fa d13b50b3
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -193,17 +193,13 @@ public class DataUsageList extends DataUsageBaseFragment {
    public void onResume() {
        super.onResume();
        mDataStateListener.setListener(true, mSubId, getContext());
        updateBody();

        // kick off background task to update stats
        new AsyncTask<Void, Void, Void>() {
            @Override
            protected Void doInBackground(Void... params) {
                try {
                    // wait a few seconds before kicking off
                    Thread.sleep(2 * DateUtils.SECOND_IN_MILLIS);
                    services.mStatsService.forceUpdate();
                } catch (InterruptedException e) {
                } catch (RemoteException e) {
                }
                return null;
@@ -211,10 +207,8 @@ public class DataUsageList extends DataUsageBaseFragment {

            @Override
            protected void onPostExecute(Void result) {
                if (isAdded()) {
                updateBody();
            }
            }
        }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
    }

+0 −22
Original line number Diff line number Diff line
@@ -187,28 +187,6 @@ public class DataUsageListV2 extends DataUsageBaseFragment {
        super.onResume();
        mDataStateListener.setListener(true, mSubId, getContext());
        updateBody();

        // kick off background task to update stats
        new AsyncTask<Void, Void, Void>() {
            @Override
            protected Void doInBackground(Void... params) {
                try {
                    // wait a few seconds before kicking off
                    Thread.sleep(2 * DateUtils.SECOND_IN_MILLIS);
                    services.mStatsService.forceUpdate();
                } catch (InterruptedException e) {
                } catch (RemoteException e) {
                }
                return null;
            }

            @Override
            protected void onPostExecute(Void result) {
                if (isAdded()) {
                    updateBody();
                }
            }
        }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
    }

    @Override