When user switch between settings of hotspot(Enable hotspot),
Internet(Enable Wifi) and Wifi-Direct(establish, disconnect and
forgot P2P connection).
mChannel becomes null during WiFi P2P user scenarios resulting
in Settings(com.android.settings) crash on enable Wifi.
This commit fixes mChannel IllegalArgumentException: Channel
needs to be initialized.
Test: manual test
Bug: 218608961
Change-Id: I72c67bcd1086afe2aa8d2c5521107e2d38e5b0bb
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
Add new unit test cases in
1. WifiP2pSettingsTest.java
2. WifiConfigController2Test.java
3. WifiP2PPreferenceControllerTest.java
4. WifiP2pPeerTest.java
the coverage rate of
1. com.android.settings.wifi will raise from 44% to 45%
2. com.android.settings.wifi.P2p will raise from 69% to 85%
Bug: 151696220
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2pSettingsTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2pPeerTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2PPreferenceControllerTest
Change-Id: I365494e1654376b23b08f18b1a799ffc59323a4c
Add new unit test cases in WifiP2pSettingsTest.java, the coverage rate will raise from 30% to 71%.
Bug: 151696220
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2pSettingsTest
Change-Id: I214866efae47a99e75178beca48deb398b70f9bd
Add new unit test file WifiP2pSettingsTest.java.
Bug: 151696220
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2pSettingsTest
Change-Id: I686658969a801e385a102022c6854d8bb8972d3c
This reverts commit 08f2a58459.
Reason for revert: design changed, we decide to take the user to
the entry after clicking on a search result.
It's opposite with what we did, so we revert related CL first.
Test: robotest
Change-Id: Iadb9a94a7ef7838be34a54499e2d934d6396c336
- remove duplicate index preference
- default set searchable = false when the preference has fragment
- make some fragments indexable
Bug: 143057584
Test: robotest & manual
Change-Id: I4d64f6106d2f92f0a45e8c7e26388677f593f412
Rename WIFI_P2P_PERSISTENT_GROUPS_CHANGED_ACTION intent
to ACTION_WIFI_P2P_PERSISTENT_GROUPS_CHANGED to conform
to naming conventions.
Bug: 143892817
Test: compiles
Change-Id: I8fce665af122969a63dc6fafed137f349c12eb58
Properties accessed across partitions are now schematized and will
become APIs to make explicit interfaces among partitions.
Bug: 117924132
Bug: 141246285
Test: lunch blueline-userdebug; m checkbuild
Change-Id: Ic4f16a4475eb2870dcaeec41b38de90a0f6473bb
With change ag/7340724, the device's P2P MAC adress will no longer be
included as part of the WIFI_P2P_THIS_DEVICE_CHANGED_ACTION broadcast.
This change makes WifiP2pSettings request the device info after
receiving that broadcast, to make it aware of the device's MAC.
Bug: 132055766
Test: atest
/media/sdb1/android/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/p2p/
Test: Open Wi-Fi Direct settings, clear device name, observe that the
device's MAC is displayed.
Change-Id: I524afb0c8061c90cd775af422b542213cf14640a
Framework change intent design from sticky to non-sticky due to
location sensitive data protect. Use APIs to get information when
activity resume.
Intents from sticy to non-sticy:
WifiP2pManager#WIFI_P2P_CONNECTION_CHANGED_ACTION
WifiP2pManager#WIFI_P2P_THIS_DEVICE_CHANGED_ACTION
Bug: 77228252
Test: Manually test Wi-Fi Direct settings
Change-Id: I115515d6832c5c5f290ef9f757ca94afa4e9f1bd
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
Remove MenuItem.SHOW_AS_ACTION_IF_ROOM flag for menu items
to avoid showing truncated texts on action bar.
Bug: 112671955
Test: Manual
Change-Id: I1c9678321442169bc86d719e820d4af68261dee1
This CL only changed AlertDialog imports.
So, reviewer can review it easily.
Change-Id: I097bc44394195b14287f4f920c570ac8653f356a
Fixes: 111413092
Test: This CL can't pass Robo test.
getPreferenceControllers() -> createPreferenceControllers() for the same
reason as in ag/3647936
Bug: 73668763
Test: robotests
Change-Id: I97670a91a2a38d1c844d1b9d37f4222c5e6f45a0
- Use prefContext to create preference.
- rename "Gestures" to "Gesture shortcuts"
- Add search keyword to individual gesture settings so when search
"gesture" they also show up.
- call super() for all getNonIndexableKeys() in search provider
Fix: 38327387
Fix: 36621897
Fix: 36685646
Test: make RunSettingsRoboTests
Change-Id: Ia5ddfeae08cb27c278dfb8d2376594e21d8f283c
- Change the launching preference from using an intent to directly a
fragemnt
- Partially convert WifiP2pSettings to a DashboardFragment
- Add a controller to control each pref category, when they have no
child, hide.
- Add a controller to control device's own AP name.
Change-Id: I23685c4d4a85f80ceab5a576005e693e6f8b7cc4
Fix: 36859626
Test: make RunSettingsRoboTests
Bug: 30681771
Test: SettingsUnitTests
Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.
Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
- get rid of PreferenceActivity as much as we can and use fragments instead
- add Drawer widget
- add Dashboard high level entry into the Drawer (but this is work in progress and would be done in another CL)
- add bypass of fragment's Header validation when launched from the Drawer but *force* validation if external
call thru an Intent
Be aware that WifiPickerActivity should remain for now a PreferenceActivity. It is used by SetupWizard and should
not trigger running the SettingsActivity's header building code. SetupWizard is a Home during the provisionnig process
and then deactivate itself as a Home but would make the Home header to appear in the Drawer (because momentarily we
would have two Home).
Also, verified that:
- the WiFi settings still work when called from SetupWizard
- when you have multiple Launchers, the Home header will appear in the list of Headers in the Drawer
Change-Id: I407a5e0fdd843ad7615d3d511c416a44e3d97c90
When wifi p2p is connected, entering Wi-Fi Direct UI won't show any peer devices
until a WIFI_P2P_PEERS_CHANGED_ACTION broadcast is received (long after or never).
Users may be confused and think p2p is disconnected. It's more user friendly to
display connected devices right at the beginning.
In addition, this CL removes the useless mWifiP2pManager.requestGroupInfo call.
Bug: 11175553
Change-Id: I0f0834043a2cf6e8fc20319e6861b62484478146
This is not a normal use case as we can't enter Wi-Fi Direct setting when p2p
is disabled. However we can make this happen by entering Wi-Fi Direct setting
screen then disabling wifi via quick settings.
Previous UI implementation didn't handle p2p enable->disable change completely,
leaving the screen out-of-date until we change the screen orientation.
Now we always attach mThisDevicePref/mPeersGroup/mPersistentGroup to the screen,
but just disable them when p2p is disabled. Another advantage of doing this is
to avoid b/11050625, which occurs when a PreferenceGroup is not attached to the
PreferenceScreen.
Bug: 11133069
Change-Id: I9be7b6e396d7677b5a33df8e6294b4a0aa6bd389
After a PreferenceGroup is created, attach it to a PreferenceScreen right away.
Otherwise, if PreferenceGroup.addPreference is accidentally called before being
attached, it will result in an NPE and a UI crash.
Bug: 11050625
Change-Id: I68fa8b67ab807c0729c43c1b5cdabdbcd4f2c230
The NPE happens becase we save a references to the group that is to be
deleted, when the confirmation dialog is being shown to the user. We lose
that reference if orientation is changed (because the UI creates a new
WifiP2pSettings to interact with).
The fix is to save the name of the group that is being deleted in
persistent store, and re-select the group based on that.
Bug: 9004915
Change-Id: I1387a5b17fa2773748f4c8b34adddfc9516cfcf3
# By sunil duttu
# Via Android Git Automerger (1) and others
* commit '5c879e48eddfe617125733f2be46854a0266a23b':
P2PSetting:Avoid p2p_find on group removal event
Immediately after group termination p2p_find is being issued
from settings and this causing issue whenever user sends
connection request immediately after group_removal_event.
Change-Id: I41e5f520f7d9475d0ec890d40eea172d9d66d06e
Enable to delete a stored persistent group from p2p settings.
The multilingualization has NOT been done yet.
Change-Id: I84bd89343c9e3ce5e62b8b96dfce9d286675b145
Signed-off-by: Yoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>