Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69f1f902 authored by mrulhania's avatar mrulhania
Browse files

Fix device config listener setup in HistoricalRegistry

Fix: 423265985
Test: presubmit
Test: manual
Flag: EXEMPT bug fix
Change-Id: I81e9f6ef37d3da94c7ee6a17ec50779976a33437
parent c66c40a8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -246,6 +246,10 @@ public class HistoricalRegistry implements HistoricalRegistryInterface {
        }

        mChainIdOffset = mShortIntervalHistoryHelper.getLargestAttributionChainId();

        // Set up listener for quantization, op flags or app ops list config for testing
        DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_PRIVACY,
                AsyncTask.THREAD_POOL_EXECUTOR, this::setHistoryParameters);
        // Set up a listener to refresh history mode for testing.
        final Uri uri = Settings.Global.getUriFor(Settings.Global.APPOP_HISTORY_PARAMETERS);
        resolver.registerContentObserver(uri, false, new ContentObserver(
@@ -331,9 +335,6 @@ public class HistoricalRegistry implements HistoricalRegistryInterface {
            mShortIntervalAppOpsArray = getShortIntervalAppOpsList();
        }
        Arrays.sort(mShortIntervalAppOpsArray);

        DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_PRIVACY,
                AsyncTask.THREAD_POOL_EXECUTOR, this::setHistoryParameters);
    }

    /**