diff options
author | Roman Birg <roman@cyngn.com> | 2016-04-25 12:00:02 -0700 |
---|---|---|
committer | Roman Birg <roman@cyngn.com> | 2016-04-29 16:01:26 -0700 |
commit | 6f12b368dca8fa42cc22a5fbda254f577499c1a7 (patch) | |
tree | 0167ac34541877ff26180761f20b6e58fbb00cee /src | |
parent | 72a512203dce93cc3a610f88fd71535fbaafea31 (diff) | |
download | packages_apps_Settings-6f12b368dca8fa42cc22a5fbda254f577499c1a7.zip packages_apps_Settings-6f12b368dca8fa42cc22a5fbda254f577499c1a7.tar.gz packages_apps_Settings-6f12b368dca8fa42cc22a5fbda254f577499c1a7.tar.bz2 |
Settings: refresh ui on foce stop/diable
Fixes the storage summary not updating after force closing, enabling,
or disabling the app.
Ticket: CYNGNOS-2527
Change-Id: I000459d27d06071a36ab0ac6761c1af56c132dde
Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'src')
-rwxr-xr-x | src/com/android/settings/applications/InstalledAppDetails.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java index 4d29c73..f2e6392 100755 --- a/src/com/android/settings/applications/InstalledAppDetails.java +++ b/src/com/android/settings/applications/InstalledAppDetails.java @@ -709,6 +709,10 @@ public class InstalledAppDetails extends AppInfoBase } private void checkForceStop() { + if (getActivity() == null || getActivity().isFinishing()) { + return; + } + if (mDpm.packageHasActiveAdmins(mPackageInfo.packageName)) { // User can't force stop device admin. updateForceStopButton(false); @@ -984,6 +988,13 @@ public class InstalledAppDetails extends AppInfoBase mPm.setApplicationEnabledSetting(mInfo.packageName, mState, 0); return null; } + + @Override + protected void onPostExecute(Object o) { + if (mActivity.get() != null) { + mActivity.get().refreshUi(); + } + } } private final LoaderCallbacks<ChartData> mDataCallbacks = new LoaderCallbacks<ChartData>() { @@ -1009,6 +1020,7 @@ public class InstalledAppDetails extends AppInfoBase @Override public void onReceive(Context context, Intent intent) { updateForceStopButton(getResultCode() != Activity.RESULT_CANCELED); + refreshUi(); } }; |