Revert "[DataUsage] Adjusting the control of display sequence"
This reverts commit b8491032d7
.
Bug: 277162513
Test: Manual
Test: Unit test
Change-Id: I5a84a9b1a99b1da4c18d786a6dff062b53cd46c6
This commit is contained in:
@@ -172,20 +172,7 @@ public class DataUsageList extends DataUsageBaseFragment
|
||||
public void onViewCreated(View v, Bundle savedInstanceState) {
|
||||
super.onViewCreated(v, savedInstanceState);
|
||||
|
||||
// Show loading
|
||||
mLoadingViewController = new LoadingViewController(
|
||||
v.findViewById(R.id.loading_container), getListView());
|
||||
mLoadingViewController.showLoadingViewDelayed();
|
||||
}
|
||||
|
||||
private void onEndOfLoading() {
|
||||
if (mHeader != null) {
|
||||
return;
|
||||
}
|
||||
mHeader = setPinnedHeaderView(R.layout.apps_filter_spinner);
|
||||
|
||||
mCycleSpinner = mHeader.findViewById(R.id.filter_spinner);
|
||||
|
||||
mHeader.findViewById(R.id.filter_settings).setOnClickListener(btn -> {
|
||||
final Bundle args = new Bundle();
|
||||
args.putParcelable(DataUsageList.EXTRA_NETWORK_TEMPLATE, mTemplate);
|
||||
@@ -196,6 +183,8 @@ public class DataUsageList extends DataUsageBaseFragment
|
||||
.setArguments(args)
|
||||
.launch();
|
||||
});
|
||||
mCycleSpinner = mHeader.findViewById(R.id.filter_spinner);
|
||||
mCycleSpinner.setVisibility(View.GONE);
|
||||
mCycleAdapter = new CycleAdapter(mCycleSpinner.getContext(), new SpinnerInterface() {
|
||||
@Override
|
||||
public void setAdapter(CycleAdapter cycleAdapter) {
|
||||
@@ -227,6 +216,10 @@ public class DataUsageList extends DataUsageBaseFragment
|
||||
super.sendAccessibilityEvent(host, eventType);
|
||||
}
|
||||
});
|
||||
|
||||
mLoadingViewController = new LoadingViewController(
|
||||
getView().findViewById(R.id.loading_container), getListView());
|
||||
mLoadingViewController.showLoadingViewDelayed();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -234,10 +227,6 @@ public class DataUsageList extends DataUsageBaseFragment
|
||||
super.onResume();
|
||||
mDataStateListener.start(mSubId);
|
||||
|
||||
if (mChart != null) {
|
||||
mChart.onPreparingChartData();
|
||||
}
|
||||
|
||||
// kick off loader for network history
|
||||
// TODO: consider chaining two loaders together instead of reloading
|
||||
// network history when showing app detail.
|
||||
@@ -599,13 +588,11 @@ public class DataUsageList extends DataUsageBaseFragment
|
||||
@Override
|
||||
public void onLoadFinished(Loader<List<NetworkCycleChartData>> loader,
|
||||
List<NetworkCycleChartData> data) {
|
||||
onEndOfLoading();
|
||||
if (mLoadingViewController != null) {
|
||||
mLoadingViewController.showContent(false /* animate */);
|
||||
}
|
||||
mLoadingViewController.showContent(false /* animate */);
|
||||
mCycleData = data;
|
||||
// calculate policy cycles based on available data
|
||||
updatePolicy();
|
||||
mCycleSpinner.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user