summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorDave Mankoff <mankoff@google.com>2020-07-21 15:05:40 -0400
committerDave Mankoff <mankoff@google.com>2020-07-22 11:19:45 -0400
commit44cd068bc953a235512ef26ca9ba24f8a70c76f0 (patch)
tree03317aa24be6051ed5973fd55c2846e4307e653c /tools/aapt2/java/JavaClassGenerator.cpp
parent0a7fd66f109a15664cb61bcf9682cbdfae8957ee (diff)
Introduce SettingsProx in place of Settings.
This introduces SecureSettings, GlobalSettings, and SystemSettings that are instantiable classes that proxy calls through to the static methods of Settings.Secure, Settings.Global, and Settings.System. This allows instances to be mocked and faked in tests. This also removes any concern of changing shared settings between tests. This also addes registerContentObserver and unregisterContentObserver to these classes as a convenient way of unifying access to settings. Previously, settings were read and written via static methods, but changes to settings were observeed through ContentResolver, an entirely separate class. An example refactor using these new utilities is shown in DozeTriggers. Fixes: 159904757 Test: atest SystemUITests && manual Change-Id: I3a907c2066de427676472769e212fe58cd38cf69
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions