fix out of memory with continuous entry and exit InstalledAppDetail.

A session keeps in ApplicationsState list. The fragment don't release
the session when it is destroyed. The cause of out of memory is that the
session list is increased, but it can't be released.

Change-Id: I23635610c9fdfb8a3423299a91cf9b11cb5cdb65
Signed-off-by: daqiangx <daqiangx.li@intel.com>
This commit is contained in:
daqiangx
2015-12-21 16:02:25 +08:00
committed by Yang YangX A
parent f3cc23524f
commit 2396a40c90

View File

@@ -105,6 +105,12 @@ public abstract class AppInfoBase extends SettingsPreferenceFragment
super.onPause();
}
@Override
public void onDestroy() {
mSession.release();
super.onDestroy();
}
protected String retrieveAppEntry() {
final Bundle args = getArguments();
mPackageName = (args != null) ? args.getString(ARG_PACKAGE_NAME) : null;