Unrestrict SMS/PHONE app if it been set active

If an app been set default SMS/PHONE app, we need to unrestrict this
app. This CL extract a common function and invoke it when necessary.

Change-Id: Id29c5138438aa6f6f22cdd9c4ecf336de8481782
Fixes: 80305978
Test: robotests
This commit is contained in:
jackqdyulei
2018-07-13 14:50:04 -07:00
parent d3e18dcf0a
commit f1213365fc
9 changed files with 79 additions and 5 deletions

View File

@@ -80,6 +80,7 @@ public class DefaultPhonePicker extends DefaultAppPickerFragment {
@Override
protected boolean setDefaultKey(String key) {
if (!TextUtils.isEmpty(key) && !TextUtils.equals(key, getDefaultKey())) {
mBatteryUtils.clearForceAppStandby(key);
return mDefaultKeyUpdater.setDefaultDialerApplication(getContext(), key, mUserId);
}
return false;