Listen on new broadcasts for profile changes.

The change is due to API review comments on the platform side.

Bug: 27532254
Change-Id: Iacb87f97148ceead6bf1f1cc7a0671711698b061
This commit is contained in:
Rubin Xu
2016-04-04 17:23:46 +01:00
parent 9069181c84
commit 819f78e91b
2 changed files with 12 additions and 7 deletions

View File

@@ -185,7 +185,8 @@ public class TrustedCredentialsSettings extends OptionsMenuFragment {
@Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
if (Intent.ACTION_MANAGED_PROFILE_AVAILABILITY_CHANGED.equals(action) ||
if (Intent.ACTION_MANAGED_PROFILE_AVAILABLE.equals(action) ||
Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE.equals(action) ||
Intent.ACTION_MANAGED_PROFILE_UNLOCKED.equals(action)) {
// Reload all alias
final ExpandableListView systemView = (ExpandableListView) mTabHost
@@ -212,7 +213,8 @@ public class TrustedCredentialsSettings extends OptionsMenuFragment {
mKeyguardManager = (KeyguardManager) getActivity()
.getSystemService(Context.KEYGUARD_SERVICE);
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_MANAGED_PROFILE_AVAILABILITY_CHANGED);
filter.addAction(Intent.ACTION_MANAGED_PROFILE_AVAILABLE);
filter.addAction(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE);
filter.addAction(Intent.ACTION_MANAGED_PROFILE_UNLOCKED);
getActivity().registerReceiver(mWorkProfileChangedReceiver, filter);
}