Fix the NPE bug due to the process/activity restart.

The active profile and its state were not stored if the setting process
was killed due to the resource. Here we add the state persistence
mechanism to fix this bug.

bug:3293236

Change-Id: I8b8068972237bde06ca4b3f73ecc48c02c4f0833
1 file changed