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

Commit 7bb61176 authored by Hani Kazmi's avatar Hani Kazmi
Browse files

[AAPM] Return null service for unsupported form factors.

The initial launch is targeted towards general purpose devices.
Other form factors may be added later.

Bug: 352420507
Bug: 375055360
Change-Id: I65e81008c4ed35f63d681a4e72f943b229cd06bf
Flag: android.security.aapm_api
Test: Presubmits
parent 208f84cc
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1750,10 +1750,13 @@ public final class SystemServiceRegistry {
                        @Override
                        public AdvancedProtectionManager createService(ContextImpl ctx)
                                throws ServiceNotFoundException {
                            IBinder iBinder = ServiceManager.getServiceOrThrow(
                            IBinder iBinder = ServiceManager.getService(
                                    Context.ADVANCED_PROTECTION_SERVICE);
                            IAdvancedProtectionService service =
                                    IAdvancedProtectionService.Stub.asInterface(iBinder);
                            if (service == null) {
                                return null;
                            }
                            return new AdvancedProtectionManager(service);
                        }
                    });