Introduce OemUnlockPreferenceController

- Create new OemUnlockPreferenceController
 - Add new onActivityResult method in DeveloperOptionsController
 - Create controller inside the DashboardFragment
 - Port logic from DevelopmentSettings into the controller

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I0b1387b9547e7c9f2a1a0963421d0ebea55d9ff4
This commit is contained in:
jeffreyhuang
2017-09-15 16:01:34 -07:00
parent 211ea46815
commit 223484ea3c
8 changed files with 642 additions and 6 deletions

View File

@@ -17,6 +17,7 @@
package com.android.settings.development;
import android.content.Context;
import android.content.Intent;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settingslib.core.AbstractPreferenceController;
@@ -34,13 +35,29 @@ public abstract class DeveloperOptionsPreferenceController extends
super(context);
}
/**
* Called when an activity returns to the DeveloperSettingsDashboardFragment.
*
* @param requestCode The integer request code originally supplied to
* startActivityForResult(), allowing you to identify who this
* result came from.
* @param resultCode The integer result code returned by the child activity
* through its setResult().
* @param data An Intent, which can return result data to the caller
* (various data can be attached to Intent "extras").
* @return true if the controller handled the activity result
*/
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
return false;
}
/**
* Called when developer options is enabled
*/
public abstract void onDeveloperOptionsEnabled();
/**
*Called when developer options is disabled
* Called when developer options is disabled
*/
public abstract void onDeveloperOptionsDisabled();
}