Launcher3: Update the work FAB after attaching it

When single work profile is available, the 'Pause work apps'
fab isn't working after first click.
Because the mWorkModeSwitch will become null after detaching it.
(Paused state).

When it tries to setup click listener for the mWorkModeSwitch on
updateCurrentState(enabled), mWorkModeSwitch will be null at that time.
So nothing will happen when we click the fab after that.
To make the fab work again, have to re-open the 'work' space once.

To avoid this, update work FAB (where it sets click listener)
after attaching. so mWorkModeSwitch won't be null at that time.

Change-Id: Iafb3cd0adb24f0d5f6fa003a42c69a61eccd5450
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Jackeagle <jackeagle102@gmail.com>
1 file changed