Clean up: remove unused code

Bug: 64804294
Test: rerun existing robotests
Change-Id: I5a10cbd8475b74843e4d864eb38105003e98d27e
This commit is contained in:
Fan Zhang
2017-10-11 16:22:24 -07:00
parent 61aba47c87
commit 350ccf53f2
2 changed files with 3 additions and 17 deletions

View File

@@ -254,7 +254,6 @@ public class ManageApplications extends InstrumentedPreferenceFragment
private String mCurrentPkgName;
private int mCurrentUid;
private boolean mFinishAfterDialog;
private Menu mOptionsMenu;
@@ -590,11 +589,7 @@ public class ManageApplications extends InstrumentedPreferenceFragment
mApplications.mExtraInfoBridge.forceUpdate(mCurrentPkgName, mCurrentUid);
} else if (mListType == LIST_TYPE_HIGH_POWER || mListType == LIST_TYPE_OVERLAY
|| mListType == LIST_TYPE_WRITE_SETTINGS) {
if (mFinishAfterDialog) {
getActivity().onBackPressed();
} else {
mApplications.mExtraInfoBridge.forceUpdate(mCurrentPkgName, mCurrentUid);
}
mApplications.mExtraInfoBridge.forceUpdate(mCurrentPkgName, mCurrentUid);
} else {
mApplicationsState.requestSize(mCurrentPkgName, UserHandle.getUserId(mCurrentUid));
}
@@ -614,8 +609,7 @@ public class ManageApplications extends InstrumentedPreferenceFragment
startAppInfoFragment(AppStorageSettings.class, R.string.storage_settings);
break;
case LIST_TYPE_HIGH_POWER:
HighPowerDetail.show(this, mCurrentPkgName, INSTALLED_APP_DETAILS,
mFinishAfterDialog);
HighPowerDetail.show(this, mCurrentPkgName, INSTALLED_APP_DETAILS);
break;
case LIST_TYPE_OVERLAY:
startAppInfoFragment(DrawOverlayDetails.class, R.string.overlay_settings);
@@ -862,7 +856,6 @@ public class ManageApplications extends InstrumentedPreferenceFragment
private CharSequence getFilterString(int filter) {
return mManageApplications.getString(FILTER_LABELS[filter]);
}
}
/*
@@ -878,9 +871,6 @@ public class ManageApplications extends InstrumentedPreferenceFragment
ApplicationsState.Callbacks, AppStateBaseBridge.Callback,
AbsListView.RecyclerListener, SectionIndexer {
// how long to wait for app list to populate without showing the loading container
private static final long DELAY_SHOW_LOADING_CONTAINER_THRESHOLD_MS = 100L;
private static final SectionInfo[] EMPTY_SECTIONS = new SectionInfo[0];
private final ApplicationsState mState;
@@ -1090,7 +1080,6 @@ public class ManageApplications extends InstrumentedPreferenceFragment
});
}
static private boolean packageNameEquals(PackageItemInfo info1, PackageItemInfo info2) {
if (info1 == null || info2 == null) {
return false;

View File

@@ -18,7 +18,6 @@ package com.android.settings.fuelgauge;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
@@ -165,12 +164,10 @@ public class HighPowerDetail extends InstrumentedDialogFragment implements OnCli
: R.string.high_power_off);
}
public static void show(Fragment caller, String packageName, int requestCode,
boolean defaultToOn) {
public static void show(Fragment caller, String packageName, int requestCode) {
HighPowerDetail fragment = new HighPowerDetail();
Bundle args = new Bundle();
args.putString(AppInfoBase.ARG_PACKAGE_NAME, packageName);
args.putBoolean(ARG_DEFAULT_ON, defaultToOn);
fragment.setArguments(args);
fragment.setTargetFragment(caller, requestCode);
fragment.show(caller.getFragmentManager(), HighPowerDetail.class.getSimpleName());