From ac54e6697c3a12575305990f559972b4df9185ed Mon Sep 17 00:00:00 2001 From: Pat Tjin Date: Wed, 2 Jun 2021 11:55:10 -0700 Subject: [PATCH] add usb features Prevent crashing of settings when going into Connected Devices. E SystemServiceRegistry: No service published for: usb followed by NPE: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.Settings$ConnectedDeviceDashboardActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List android.hardware.usb.UsbManager.getPorts()' on a null object reference Bug: 189904047 Test: check settings doesn't crash anymore Signed-off-by: Pat Tjin Change-Id: I1dd8df5cf70500b3dbb95009783dc2ba89e5ce13 --- device.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/device.mk b/device.mk index 1b945a49..c62d8e18 100644 --- a/device.mk +++ b/device.mk @@ -565,7 +565,7 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \ frameworks/native/data/etc/android.hardware.wifi.rtt.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.rtt.xml -#PRODUCT_COPY_FILES += \ +PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \ frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml @@ -581,8 +581,6 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \ frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \ frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \ - frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \ - frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \ frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \ frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml \