@Override public void onReceive(Context context, Intent intent) { if (ProfileManager.ACTION_CURRENT_PROFILE_CHANGED.equals(intent.getAction())) { Profile oldProfile = intent.getParcelableExtra(ProfileManager.EXTRA_OLD_PROFILE); Profile newProfile = intent.getParcelableExtra(ProfileManager.EXTRA_NEW_PROFILE); onCurrentProfileChanged(oldProfile, newProfile); } } }