Only register debug hooks when requested

Always registering them was causing ANRs because of blocking binder calls,
registering on a background thread also isn't ideal beacuse wake locks might
be released and let the device sleep.
Let's only register them when explicitly required.

Change-Id: I52c45fcb38c277903ece662afdd5e6c35cf2aac4
Fixes: 119436283
Test: adb shell setprop debug.aod_brightness 1
(cherry picked from commit bf2fbd5b68b82838e36eae085c82fa9165038ecd)
1 file changed