Loading src/com/android/settings/TrustedCredentialsSettings.java +4 −2 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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); } Loading src/com/android/settings/accounts/AccountSettings.java +8 −5 Original line number Diff line number Diff line Loading @@ -575,9 +575,10 @@ public class AccountSettings extends SettingsPreferenceFragment @Override public void onReceive(Context context, Intent intent) { Log.v(TAG, "Received broadcast: " + intent.getAction()); if (intent.getAction().equals(Intent.ACTION_MANAGED_PROFILE_REMOVED) || intent.getAction().equals(Intent.ACTION_MANAGED_PROFILE_ADDED)) { final String action = intent.getAction(); Log.v(TAG, "Received broadcast: " + action); if (action.equals(Intent.ACTION_MANAGED_PROFILE_REMOVED) || action.equals(Intent.ACTION_MANAGED_PROFILE_ADDED)) { // Clean old state stopListeningToAccountUpdates(); cleanUpPreferences(); Loading @@ -590,7 +591,8 @@ public class AccountSettings extends SettingsPreferenceFragment return; } if (intent.getAction().equals(Intent.ACTION_MANAGED_PROFILE_AVAILABILITY_CHANGED)) { if (action.equals(Intent.ACTION_MANAGED_PROFILE_AVAILABLE) || action.equals(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE)) { // We assume there's only one managed profile, otherwise this needs to change. ProfileData profileData = mProfiles.valueAt(1); if (intent.getIntExtra(Intent.EXTRA_USER_HANDLE, Loading @@ -608,7 +610,8 @@ public class AccountSettings extends SettingsPreferenceFragment IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(Intent.ACTION_MANAGED_PROFILE_REMOVED); intentFilter.addAction(Intent.ACTION_MANAGED_PROFILE_ADDED); intentFilter.addAction(Intent.ACTION_MANAGED_PROFILE_AVAILABILITY_CHANGED); intentFilter.addAction(Intent.ACTION_MANAGED_PROFILE_AVAILABLE); intentFilter.addAction(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE); context.registerReceiver(this, intentFilter); listeningToManagedProfileEvents = true; } Loading Loading
src/com/android/settings/TrustedCredentialsSettings.java +4 −2 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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); } Loading
src/com/android/settings/accounts/AccountSettings.java +8 −5 Original line number Diff line number Diff line Loading @@ -575,9 +575,10 @@ public class AccountSettings extends SettingsPreferenceFragment @Override public void onReceive(Context context, Intent intent) { Log.v(TAG, "Received broadcast: " + intent.getAction()); if (intent.getAction().equals(Intent.ACTION_MANAGED_PROFILE_REMOVED) || intent.getAction().equals(Intent.ACTION_MANAGED_PROFILE_ADDED)) { final String action = intent.getAction(); Log.v(TAG, "Received broadcast: " + action); if (action.equals(Intent.ACTION_MANAGED_PROFILE_REMOVED) || action.equals(Intent.ACTION_MANAGED_PROFILE_ADDED)) { // Clean old state stopListeningToAccountUpdates(); cleanUpPreferences(); Loading @@ -590,7 +591,8 @@ public class AccountSettings extends SettingsPreferenceFragment return; } if (intent.getAction().equals(Intent.ACTION_MANAGED_PROFILE_AVAILABILITY_CHANGED)) { if (action.equals(Intent.ACTION_MANAGED_PROFILE_AVAILABLE) || action.equals(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE)) { // We assume there's only one managed profile, otherwise this needs to change. ProfileData profileData = mProfiles.valueAt(1); if (intent.getIntExtra(Intent.EXTRA_USER_HANDLE, Loading @@ -608,7 +610,8 @@ public class AccountSettings extends SettingsPreferenceFragment IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(Intent.ACTION_MANAGED_PROFILE_REMOVED); intentFilter.addAction(Intent.ACTION_MANAGED_PROFILE_ADDED); intentFilter.addAction(Intent.ACTION_MANAGED_PROFILE_AVAILABILITY_CHANGED); intentFilter.addAction(Intent.ACTION_MANAGED_PROFILE_AVAILABLE); intentFilter.addAction(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE); context.registerReceiver(this, intentFilter); listeningToManagedProfileEvents = true; } Loading