Loading services/core/java/com/android/server/security/advancedprotection/AdvancedProtectionService.java +19 −2 Original line number Diff line number Diff line Loading @@ -80,13 +80,25 @@ public class AdvancedProtectionService extends IAdvancedProtectionService.Stub private void initFeatures(boolean enabled) { if (android.security.Flags.aapmFeatureDisableInstallUnknownSources()) { try { mHooks.add(new DisallowInstallUnknownSourcesAdvancedProtectionHook(mContext, enabled)); } catch (Exception e) { Slog.e(TAG, "Failed to initialize DisallowInstallUnknownSources", e); } } if (android.security.Flags.aapmFeatureMemoryTaggingExtension()) { try { mHooks.add(new MemoryTaggingExtensionHook(mContext, enabled)); } catch (Exception e) { Slog.e(TAG, "Failed to initialize MemoryTaggingExtension", e); } } if (android.security.Flags.aapmFeatureDisableCellular2g()) { try { mHooks.add(new DisallowCellular2GAdvancedProtectionHook(mContext, enabled)); } catch (Exception e) { Slog.e(TAG, "Failed to initialize DisallowCellular2g", e); } } } Loading Loading @@ -278,9 +290,14 @@ public class AdvancedProtectionService extends IAdvancedProtectionService.Stub for (int i = 0; i < mHooks.size(); i++) { AdvancedProtectionHook feature = mHooks.get(i); try { if (feature.isAvailable()) { feature.onAdvancedProtectionChanged(enabled); } } catch (Exception e) { Slog.e(TAG, "Failed to call hook for feature " + feature.getFeature().getId(), e); } } synchronized (mCallbacks) { for (int i = 0; i < mCallbacks.size(); i++) { Loading Loading
services/core/java/com/android/server/security/advancedprotection/AdvancedProtectionService.java +19 −2 Original line number Diff line number Diff line Loading @@ -80,13 +80,25 @@ public class AdvancedProtectionService extends IAdvancedProtectionService.Stub private void initFeatures(boolean enabled) { if (android.security.Flags.aapmFeatureDisableInstallUnknownSources()) { try { mHooks.add(new DisallowInstallUnknownSourcesAdvancedProtectionHook(mContext, enabled)); } catch (Exception e) { Slog.e(TAG, "Failed to initialize DisallowInstallUnknownSources", e); } } if (android.security.Flags.aapmFeatureMemoryTaggingExtension()) { try { mHooks.add(new MemoryTaggingExtensionHook(mContext, enabled)); } catch (Exception e) { Slog.e(TAG, "Failed to initialize MemoryTaggingExtension", e); } } if (android.security.Flags.aapmFeatureDisableCellular2g()) { try { mHooks.add(new DisallowCellular2GAdvancedProtectionHook(mContext, enabled)); } catch (Exception e) { Slog.e(TAG, "Failed to initialize DisallowCellular2g", e); } } } Loading Loading @@ -278,9 +290,14 @@ public class AdvancedProtectionService extends IAdvancedProtectionService.Stub for (int i = 0; i < mHooks.size(); i++) { AdvancedProtectionHook feature = mHooks.get(i); try { if (feature.isAvailable()) { feature.onAdvancedProtectionChanged(enabled); } } catch (Exception e) { Slog.e(TAG, "Failed to call hook for feature " + feature.getFeature().getId(), e); } } synchronized (mCallbacks) { for (int i = 0; i < mCallbacks.size(); i++) { Loading