OSDN Git Service

Add entitlement check for usb tethering
authorjackqdyulei <jackqdyulei@google.com>
Tue, 2 Oct 2018 21:19:27 +0000 (14:19 -0700)
committerjackqdyulei <jackqdyulei@google.com>
Tue, 2 Oct 2018 22:41:46 +0000 (15:41 -0700)
commit184b3a4c68cf276138ef468eae5a7003a35c4893
treec16037067996497bb3bffd9b0ea370d6ddfe0370
parent092f66b2791bef2bed4b58c8e696e85b1875cc3d
Add entitlement check for usb tethering

Before this CL, usb tethering in detail page doesn't have entitlement
check. This CL fix it by using the correct API

Also polish it by updating the UI before entitlement check to align
hotspot page. So in UI it will first check "usb tethering". If
entitlement check fail, it will revoke and go back to previous selection.

Bug: 115707279
Test: RunSettingsRoboTests
Change-Id: I3d2ebad2879479a870bcdfe596bb88b83c424389
src/com/android/settings/connecteddevice/usb/UsbDefaultFragment.java
src/com/android/settings/connecteddevice/usb/UsbDetailsFunctionsController.java
tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDefaultFragmentTest.java
tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsFunctionsControllerTest.java