History log of /frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2fd9436184ea37a297f2abd5e884d30d0014b620 29-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add LOHS permission checks

The new calls to start/stopLocalOnlyHotspot and
getLocalOnlyHotspotConfig need to have permission checks to make sure
only valid callers can turn the hotspot on since that disables wifi.
Enabling LocalOnlyHotspot also requires the location permission and that
Location services are enabled. A utility was added to ease testing.

This CL also adds tests verifying the permission checks.

Bug: 36760523
Bug: 37082656
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I91b28ccb44113bb6233a50f643db785e0a509d53
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
3871ff67f4a6970f1831fc8951392746c9e2bfa2 13-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: setWifiApEnabled unit tests

Add unit tests to cover setWifiApEnabled. This did require a small
change to check a tethering permission and add the user manager.

Bug: 37294233
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I7bdfdcbdfa60605bc2e61f18aa8abeb4bcaf5c56
Merged-In: I77413789b1b2a19c9330f4c9b9978c4a0f5b5bf8
Merged-In: I33ae84d7282dea967a53a644018e20eb2902eca3
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
835e781643b79c30fabbab5595770cf01b5861fb 01-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiPermissionsUtil: add checkConfigOverride

Add a helper method to allow callers to check the calling UID for the
override config permission. This CL moves the call from
WifiConfigManager to the util/WifiPermissionsUtil class and adds tests.

Bug: 35870086
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I5aa1bbc82eb86408272564365d45b7ddbf7cc661
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
f2d2a31c8c98f17545f72033abe0d281c829c055 27-Jan-2017 Rebecca Silberstein <silberst@google.com> WifiPermissionsUtil: add WifiInjector

Instead of calling the WifiInjector.getInstance method that is used for
the makeLog command, pass the instance of WifiInjector so the unit tests
can pass stand alone (or when run out of order by the automated test
process).

Bug: 34764965
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh -e class
com.android.server.wifi.util.WifiPermissionsUtilTest

Change-Id: I782135fa55d1bbf760c271344a7502687a2ba591
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
25f5cad21b4cd0ad8aa302623463c5c861a885b0 19-Jan-2017 Jeremy Joslin <jjoslin@google.com> Use NetworkScoreManager.isCallerActiveScorer().

The previous method from NetworkScorerAppManager has been deprecated,
the new call is cheaper but otherwise the same as the old call.

Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: ./frameworks/base/wifi/tests/runtests.sh
Bug: 33781558
Change-Id: Ic8419a7f9b60661fb030973fde2653ea4cdfbc88
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
cb46b737eaf8f59f07270e57b37bfddcfc121fdb 22-Nov-2016 Amin Shaikh <ashaikh@google.com> Refactor NetworkScoreAppManager for testing.

Bug: 32913019
Test: runtest frameworks-wifi
Change-Id: If4bef94b6a275215ce47c8e77edb1af8cf4df3c0
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
862b2876315938851baf9b8f4e69a2b64261f9c8 03-Nov-2016 Sohani Rao <sohanirao@google.com> Trace permissions check to access scan results

To help debug denial of permission to access scan results, add logging
to WifiPermissionsUtil.

Bug: 32616662
Test: Unit tests and verified logging in verbose mode
Change-Id: I4e7c16ee46b8c6e01c250308c4ada994ffb53156
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
63a4c8e9abc4f75f7885331360e67e8ac8c4f7dd 25-Oct-2016 Sohani Rao <sohanirao@google.com> WifiPermissionsUtil: Resolve refactoring bug

The function canAccessScanResults() changes the semantics of the
permissions check. Specifically, it enforces INTERACT_ACROSS_USERS_FULL
permission on all callers. The original code only enforces this when
the user or profile is not current. Update WifiPermissionsUtil and
WifiPermissionsUtilTest to ensure this functionality. Also, ensure
there's no logical change in the permissions check needed.

Bug: 32400436
Test: Unit test, cherry-pick to master and verify SetupWizard
can access scan results even though it may not have the
INTERACT_ACROSS_USERS_FULL permission

Change-Id: I84565946f1a62258b84af0a7b817bcff248d2eda
Merged-In: I84565946f1a62258b84af0a7b817bcff248d2eda
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
92f4d52b14d8847f6f81712bf3bbfa0f1203eef5 01-Sep-2016 Sohani Rao <sohanirao@google.com> Wifi Permissions Utility to check scan permissions

Abstracted permissions check for returning scan results into a
central module - WifiPermissionsUtil
- provides a method that validates the calling uid's permissions
to access scan results
- fix permission bug by ensuring the calling uid is used instead
of uid of the system server
- ensures backward compatilibity for legacy apps and enforces
location permissions on apps of a certian version or later
Added a class WifiPermissionsWrapper to wrap static methods and
dependencies to enable testing

Bug: 30761439
Test: Unit tests, Added unit tests, Tested manually
Merged-In: Ic212821830a67a3799bd99ae9cd09fcaeae1d0e1

Change-Id: Ic212821830a67a3799bd99ae9cd09fcaeae1d0e1
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java