Refactor nfc preference controller
- Remove BaseNfcPreferenceController. - NfcPreferenceController inherit from TogglePreferenceController. - AndroidBeamPreferenceController inherit from BasePreferenceController. - Override getIntentFilter in NfcPreferenceController to listen changes. - Add an API (hasAsyncUpdate) into BasePreferenceController to distinguish the setting which is updated asynchronously. Change-Id: I1abe4410169e305a0d6106e24c54e7f2e763fc91 Merged-In: I7c9c48ea7f1ad01a02524beabf9d30baa3db891f Fixes: 67997761 Fixes: 74887543 Test: RunSettingsRoboTests
This commit is contained in:
@@ -246,6 +246,16 @@ public abstract class BasePreferenceController extends AbstractPreferenceControl
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code true} if the setting update asynchronously.
|
||||
* <p>
|
||||
* For example, a Wifi controller would return true, because it needs to update the radio
|
||||
* and wait for it to turn on.
|
||||
*/
|
||||
public boolean hasAsyncUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates non-indexable keys for search provider.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user