am 3275d302: am 13a07054: am 2ade0a5e: am b7c6306b: am feeae4cd: Merge "Hide usage graph on app usage details pages." into mnc-dev

* commit '3275d30212196f8d42afb6d455508e345bf544e5':
  Hide usage graph on app usage details pages.
This commit is contained in:
Julia Reynolds
2015-07-28 22:05:03 +00:00
committed by Android Git Automerger

View File

@@ -485,7 +485,7 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
// a header at the top.
FrameLayout pinnedHeader = (FrameLayout) rootView.findViewById(R.id.pinned_header);
AppHeader.createAppHeader(getActivity(), detail.icon, detail.label, null, pinnedHeader);
AppDetailsFragment.show(DataUsageSummary.this, app, detail.label, false);
AppDetailsFragment.show(DataUsageSummary.this, app, detail.label, true);
} catch (NameNotFoundException e) {
Log.w(TAG, "Could not find " + mShowAppImmediatePkg, e);
Toast.makeText(getActivity(), getString(R.string.unknown_app), Toast.LENGTH_LONG)
@@ -935,9 +935,11 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
if (isAppDetailMode()) {
mAppDetail.setVisibility(View.VISIBLE);
mCycleAdapter.setChangeVisible(false);
mChart.setVisibility(View.GONE);
} else {
mAppDetail.setVisibility(View.GONE);
mCycleAdapter.setChangeVisible(true);
mChart.setVisibility(View.VISIBLE);
// hide detail stats when not in detail mode
mChart.bindDetailNetworkStats(null);
@@ -1933,6 +1935,16 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
target.mCurrentApp = null;
target.updateBody();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
getFragmentManager().popBackStack();
return true;
}
return super.onOptionsItemSelected(item);
}
}
/**