Android T allows apps to declare a runtime receiver as not exported
by invoking registerReceiver with a new RECEIVER_NOT_EXPORTED flag;
receivers registered with this flag will only receive broadcasts from
the platform and the app itself. However to ensure developers can
properly protect their receivers, all apps targeting T or later
registering a receiver for non-system broadcasts must specify either
the exported or not exported flag when invoking #registerReceiver;
if one of these flags is not provided, the platform will throw a
SecurityException. This commit updates all the exposed receivers
with a new RECEIVER_EXPORTED_UNAUDITED flag to maintain the existing
behavior of exporting the receiver while also flagging the receiver
for audit before the T release.
Bug: 161145287
Test: Build
Change-Id: Ie97372efebd8258d9a4c503771d55109a85e6ae9
Add getSystemService(Class<T>) to align the capability with framework
part.
This is a back port from aosp/1639943, aosp/1645152 and aosp/1648047
Bug: 179640862
Test: local
Change-Id: I035db55a71f94000ca35f8d71f03c19208423c73
When an admin disallows the user from configuring tethering, the
user should still be able to configure wifi.
When an admin disallows wifi configuration, the behavior is
unchanged: the toggle stays enabled and allows the user to turn
wifi on and off, but clicking on the text results in admin
transparency dialog, so the user won't be able to change wifi
config.
Bug: 149481093
Test: manual with TestDPC as the device owner
Change-Id: I6b33e43901454125c7f3f4dd3c70f050997e4e71
This means that in some cases RestrictedLockUtils has to be used and in
some RestrictedLockUtilsInternal.
This causes a lot of trivial code changes.
I also updated the ordering of the imports in all affected files.
Bug: 110953302
Test: Built
make -j RunSettingsRoboTests
Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
The wifi service already handles turning off tethering if
multi-interface is/isn't supported. We don't need to do tie wifi
and tethering stuff together in the UI.
Test: robotests still pass
Bug: 79213401
Change-Id: I699dfe2d7646f248a54faa5a8429176697614cdf
- Add the wrapper package and move all wrappers to the wrapper package.
- Get rid of some wrapper interface/impl implementation and have a
wrapper class directly.
Bug: 65634579
Test: make RunSettingsRoboTests
Change-Id: Ic757d8f7bacfa7a034c7e692205bc1dc4b0e1de1
- replace it with ConnectivityManager.stopTethering() instead.
Change-Id: I112863b1be37c0fef5d59c16d73f0c6cf71c6dea
Fix: 62191978
Test: make RunSettingsRoboTests
Moved logic for handling wifi state changes into correct listener
method. Changed logic for handling isUiRestricted. This should
streamline toggling flow for WiFi both when Wifi Scanning is on and off,
and in guest mode.
Bug: 36724409
Bug: 36711085
Bug: 36398321
Test: make, test cases in tracking bug
Change-Id: I69fe07369db192c94f81dd678087ac4e8c35197b
The toggle disabling of Wi-Fi in its ENABLING and DISABLING states
are not in sync with the loading of access points, and so removed
the disabling entirely.
Bug:34287227
Test: manual inspection.
Change-Id: Ibcb401eaaa34be79e1e73a947b2ea845cca79996
- Add a preference controller for Network & internet->Wi-Fi to control
the preference toggling and summary update.
- Refactor WifiSettings and WifiEnabler to share code between the new
wifi preference controller and the wifi setting.
- Refactor BluetoothSummaryHelper to have a common base class with the
WifiSummaryHelper.
- Rename the summary helper to summary updater.
Bug: 34280769
Test: make RunSettingsRoboTests
Change-Id: I00ebfc161bcef89331bb41ba405ed8cb8232d248
For ACTION_WIFI_CONNECT, added subtype to specify whether user is
connecting to saved network.
For ACTION_WIFI_OFF, added subtype to specify whether user was connected
to a network at the time.
Bug: 32371451
Change-Id: I1d4445bda2fbeb062831e6f858ccc711bff65105
Fixes: 32371451
Test: Verify logs by running:
adb logcat -b events | egrep '(sysui_|notification_)'
...when there is an active hotspot and user restriction for disallowing
tether config is in effect. This is to avoid getting security exceptions
from WifiManager when engaging with HotspotCondition or Wifi enable switch.
Bug:27936528
Change-Id: Ib3324e853277c177966b55668758d349ffe6ecf5
Move tracking of which networks are available/saved and their state
over to SettingsLib to share it with Quick Settings.
Bug: 19180466
Change-Id: Iaeef06b26da8cb38e1ba09a7d105d04d499dc181
It is happening because there previous view doesn't disconnect
itself from setting change; and then two views alternatively
enable/disable wifi.
Bug: 17157005
Change-Id: I42916a7bbd735960a26efbae670c9b927ec8574d
- remove any reference to the Switch and use the SwitchBar API instead
- set the initial state of the SwitchBar depending on the WifiManager
Change-Id: I556bf8a007892c057edf7c6c144f71b2dcfe4f99
- change the way the SwitchBar is shown and hidden
- save its state
- remove the delay transition code
Change-Id: I07260430e6709b42517ca011f6d3c3446a626731
...start in off position then move to on after pane loads
Another look at this issue.
- start the Switch as View.GONE and make it View.VISIBLE when
the Wi-Fi state is defined.
Change-Id: I2f3077f779fc4030b2ba9ff3b21be8148add33c3
Revert "Fix bug #15170508 When I initially load settings, all on/off toggles start in off position then move to on after pane loads"
This reverts commit 1e52db8063.
Change-Id: I73bdfeba4a4b3e993e37cdae1e3733ffe272b9eb
- refactor all the code that was using the Switch to control it thru the SwitchBar
- start the Switch as View.GONE and make it View.VISIBLE when it is set
as "enabled" or "checked" so that you dont see the Switch transition (it shows
only with it final state)
Change-Id: I382076bf3c819c530b5b2c06ca2429dfb2cdc6bf
- SwitchBar is a LinearLayout that containts a TextView and a Switch and
is intended to replace all Switches that are put in the ActionBar as a
custom view
- use the new SwitchBar for WifiSetting only for now (a later CL will
take care of all the other Setting that are using a Switch in the
ActionBar)
Related to bug #14898161 On/Off switches must move down from Action Bar
Change-Id: I5e98dbe995bba8f440d08459e09ca3ac09d3464b
- add a new boolean parameter to ask for Index rebuilding:
passing "true" will delete first all the data corresponding to the
"className" and then apply the update.
Change-Id: Ifc42fc560a14f5470b466cf6982915d9207fa3c7
- follow the UX spec by no more using a Drawer
- the Dashboard is now a Fragment that contains the list of Headers
- the search results are also put into a Fragment that is replacing
the initial one (Dashboard or other) when expanding the SearchView
- use a SearchView for query input
- when tapping on a Header or a Search Result, re-launch Settings as
an Activity so that we are benefiting from the Activity stack for
UP affordance and BACK button
- manage UP affordance to show it only when needed
- move some Actions to the Menu in the ActionBar for allowing space
to the Search action and removing some clutter
- fix an issue with the Index and WiFiEnabler and their cached Context
that was not updated when there was a Configuration change
- simplify the SettingsActivity code by extracting some inner classes
Change-Id: I50b5f77bb44a7fade1886114dbbc820609a5e63d
- same as for Bluetooth
- now the remembered WiFi networks names can be indexed when
WiFi is turned on
Change-Id: I904ce6a425c21ee07ce3ee8fdc0cd71ab5a18d12
Dont enable Wi-Fi if it's not toggleable in flight mode
by restoring the return which was removed by
e78c187905
Change-Id: I8ca5a3e9b3f36f148f08ce97b8a2b854bf7de21c
When wifi is switched off we no longer want a notification dialog
about scan-always, instead using in-panel text.
bug:8907190
Change-Id: I707f306a056068d92f69070873f1e6330b598b1e
When wifi events come out, settings has to change the switch state.
Changing switch state causes settings to also enable/disable wifi which
gets into a loop when there is a driver hung event.
Fix to only send framework calls when a user has changed the switch
settings
Bug: 5271322
Change-Id: I0a7d03a3fe0f28622de05981e5f72a9a8814b2d2