ActiveModeWarden: Ignore location toggle when SAP is enabled on legacy devices

This is a fix for the following scenario:
i) User has AP enabled.
ii-a) Then user toggles location toggle on, OR
ii-b) User enabled battery saver mode which in turn causes location
toggle on every screen off/on.
iii) Causes AP to be disabled.

Note: A cleaner solution for this is problem will be added in S using
the new interface concurrency prioritization based on app context.

Bug: 170076208
Test: atest com.android.server.wifi
Test: Verified scenario above on both new Pixel devices (STA + AP
supported) and legacy Pixel devices (STA + AP not supported).

Change-Id: I053ad541c7d687a0bb7ed8af41ff4b2ad1ce4e16
Merged-In: I053ad541c7d687a0bb7ed8af41ff4b2ad1ce4e16
2 files changed
tree: 8c1d24662485e6dafe51c9d7df470332fe4345e7
  1. apex/
  2. service/
  3. metrics_pdd_hook.py
  4. PREUPLOAD.cfg