Fix crash when rotating the device on magnification mode dialog

Root Cause:
1. onActivityCreated() has been deprecated
2. mCapabilities will be 0 when updateAlertDialogEnableState(),
   because onCreateDialog() will get mCapabilities
   but it will be called after onCreate() and before onCreateView();
   onActivityCreated() will set mCapabilities but it will be called after onCreateView()

Solution:
Move deprecated flow onActivityCreated() into onCreate() to set mCapabilities first

Bug: 172171402
Bug: 168567356
Test: atest MagnificationSettingsFragmentTest
Change-Id: Id9f861d59fa23f5cb77aac55b87152e921246135
2 files changed