310 Commits

Author SHA1 Message Date
Daniel Sheng
daccaedd7a Added Trust Agent category from SUW suggestions
Bug: 36513986
Test: make RunSettingsRoboTests
Change-Id: Ie3b501349fa6ec8542e75231c039d9071d04285c
2017-04-21 10:17:16 -07:00
Fan Zhang
34106dd9e4 Fix SettingsDrawerActivityTest on fugu.
Change-Id: I98d69e7ab96a1dbb81673dcc67ec36ac05ce9a6a
Fix: 37222268
Test: runtest --path tests/integ/src/com/android/settingslib/drawer/SettingsDrawerActivityTest.java
2017-04-21 10:06:21 -07:00
Andrew Sapperstein
7aeb3f5440 Move settingslib overlays to framework-res.
AAPT2 no longer supports overlays of static libraries. As a result,
these overlays don't work correctly any more.

To fix, move the overlay config resources into framework-res.
They can still be read by any of the apps using settingslib, but now
actually work without having to override for each app.

Bug: 33694217
Test: robotests
Change-Id: I58df748d7646e8caee18614d87af1333fc84985c
2017-04-20 13:14:14 -07:00
Daniel Sheng
1282ba370a Added suggestion category for camera lift gesture
Bug: 37154489
Test: Robolectric tests run during make

Change-Id: I1485535e5ed2c97600688951b0f680c589331bd8
2017-04-20 10:28:28 -07:00
William Luh
47a67516d9 Merge "Prevent settings from crashing when ContentProvider crashes" into oc-dev am: a875bf3ebe
am: 56cb6eb587

Change-Id: I968fa939194cc72ebabf1941514fa853eec85e39
2017-04-20 14:41:21 +00:00
TreeHugger Robot
a875bf3ebe Merge "Prevent settings from crashing when ContentProvider crashes" into oc-dev 2017-04-19 23:53:39 +00:00
William Luh
5a0a0d80c4 Prevent settings from crashing when ContentProvider crashes
Use acquireUnstableProvider, which will prevent Settings from
crashing when the ContentProvider it's bound to crashes.

Bug:36443354
Test: make RunSettingsLibRoboTests
Change-Id: Icf1b1529ebb7d31c4060a01cdc63ba005a4f2bab
2017-04-18 11:34:38 -07:00
Sundeep Ghuman
f509d526b8 Merge "Synchronously update APs in during forceUpdate." into oc-dev am: 6bdbc4abec
am: 17bc64597c

Change-Id: I02b3ff391b10ed1f2ced5b7149c77b68b90fa63e
2017-04-17 16:52:31 +00:00
TreeHugger Robot
6bdbc4abec Merge "Synchronously update APs in during forceUpdate." into oc-dev 2017-04-17 16:35:00 +00:00
Jesse Evans
632e4afb1a Merge "Fix instant app filtering in ApplicationsState" into oc-dev am: 9bdaa9c9fa
am: 783026710d

Change-Id: Id5a474354f69264a6959e8334f014860f6c98c8e
2017-04-14 17:41:47 +00:00
Lei Yu
f69156ff95 Merge "Refine BatteryInfo and battery drawable" into oc-dev am: 57af565fb7
am: 24638307c2

Change-Id: Ifae38f01a454fe9dcea1fbde0ea1a57a15087d8a
2017-04-14 16:18:02 +00:00
Benoit Lamarche
309335e727 resolve merge conflicts of 57fb5872d19c to master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Icc3fa0cd65fd6cd952008bdd068d527e20c81ae8
2017-04-14 15:59:04 +02:00
Jesse Evans
ad2b77565c Fix instant app filtering in ApplicationsState
This fixes instant apps showing up as installed apps in the settings
UI where they should not be (namely the opening links page).

Test: Added tests for the filter
      runtest -x packages/SettingsLib/tests/integ

Bug: 37108030
Change-Id: I0fc6cfd237d470a1f4dde7b2db38d8b3643ee6f7
2017-04-13 19:48:48 -07:00
Sundeep Ghuman
9c0b97ea66 Synchronously update APs in during forceUpdate.
This helps with jank in the Wifi Picker.

Bug: b/36406983
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: Ia667940dd12dc910f7658da445637268132a0058
2017-04-13 18:18:40 -07:00
Lei Yu
57af565fb7 Merge "Refine BatteryInfo and battery drawable" into oc-dev 2017-04-13 21:43:37 +00:00
Daniel Nishi
ff97ea2eef Merge changes from topic 'cp-movies' into oc-dev
* changes:
  Use the real filters when determining Other Apps.
  Add support for movies & tv apps querying.
2017-04-13 18:39:57 +00:00
Sundeep Ghuman
6f00ddf0ad Merge "Listen to RSSI_CHANGED_ACTION broadcasts in WifiTracker." into oc-dev am: 56fcd408e6
am: 2dfbfc3134

Change-Id: I32c1b3f0e3c5ba921a71e233b6dbbab1d9e0d6cd
2017-04-13 17:55:26 +00:00
TreeHugger Robot
56fcd408e6 Merge "Listen to RSSI_CHANGED_ACTION broadcasts in WifiTracker." into oc-dev 2017-04-13 17:08:04 +00:00
Tadashi G. Takaoka
53042fc5b2 Merge "Remove supportsDismissingSelfWindow attribute of IME" into oc-dev am: d280bfea23
am: 6c8c498b5b

Change-Id: I2da5392ab850cdf9053cfd16d216feffe9afada5
2017-04-13 08:03:37 +00:00
Tadashi G. Takaoka
d280bfea23 Merge "Remove supportsDismissingSelfWindow attribute of IME" into oc-dev 2017-04-13 07:41:34 +00:00
Sundeep Ghuman
8c79288093 Listen to RSSI_CHANGED_ACTION broadcasts in WifiTracker.
This solves issues where the phone status bar and connected AP in the
picker are out of date.

Bug: 35971425
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/and
roid/settingslib/wifi/WifiTrackerTest.java

Change-Id: I2a7c50de6c754623fd262aac4e9e21d6bd7fc5cf
2017-04-12 18:10:13 -07:00
jackqdyulei
ff5bd948b0 Refine BatteryInfo and battery drawable
1. Remove "m" prefix for all public field
2. Change logic about field "discharging", now it only controlled
   by whether it is plugged in.
3. Change Paint in drawable to protected
Bug: 36862496
Test: RunSettingsLibTests
Change-Id: I2908ae6868dc877d3ce6a8a63ec17826a6dcca1d
2017-04-12 12:57:55 -07:00
Daniel Nishi
140ceb1dcc Use the real filters when determining Other Apps.
This fixes a bug where an app could be classified twice.

Fixes: 36535527
Test: SettingsLib Unit Test
Change-Id: I830a76fa33680b1dd71b285d9419139f84f1d60d
2017-04-07 14:26:38 -07:00
Daniel Nishi
45c23fa689 Add support for movies & tv apps querying.
Bug: 36223441
Test: Robotest
Change-Id: Icbb9b8947112f45d37858ceb5cfb1d76f06bda32
Merged-In: Icfb34844601f87d11b7309eacf9385d49ed36338
2017-04-07 14:20:36 -07:00
Filip Pavlis
a121bbba10 Merge "Omit using ctor of PreferenceViewHolder in tests." into oc-dev am: 59dd2ebfc1
am: 3b3bf87165

Change-Id: I314d9bfa7d29eb506fa4bb7faedd7f8d506098b4
2017-04-07 10:44:51 +00:00
Filip Pavlis
59dd2ebfc1 Merge "Omit using ctor of PreferenceViewHolder in tests." into oc-dev 2017-04-07 10:31:44 +00:00
Tadashi G. Takaoka
46699675aa Remove supportsDismissingSelfWindow attribute of IME
This partially reverts CL I0f6b130a7df57557e40b52a7b7ac00be965a17c3.

Fixes: 34133139
Test: Confirm that unit test passed.
    adb install out/target/product/.../data/app/FrameworksCoreTests/FrameworksCoreTests.apk
    adb shell am instrument -w \
        -e class android.view.inputmethod.InputMethodInfoTest \
        com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I2b94263b2a0bf330bf9973567fea2d35176754d7
2017-04-07 10:43:43 +09:00
William Luh
80bedc2e17 Merge "Fix injected settings titles not matching a locale change." into oc-dev am: 1b54760eee
am: 5669141382

Change-Id: Ic628750c2332cfdf734bf7798e378ddf93a0cdbd
2017-04-07 00:16:36 +00:00
William Luh
1b54760eee Merge "Fix injected settings titles not matching a locale change." into oc-dev 2017-04-07 00:00:44 +00:00
TreeHugger Robot
5883a40931 Merge "Add showChargingMethod in BatteryInfo" into oc-dev 2017-04-06 22:06:25 +00:00
William Luh
4c978a302a Fix injected settings titles not matching a locale change.
The injected tiles code currently treats the string metadata value
for the title key in the Activity's manifest as the title itself.
When the language on the device is changed the title remains in the
previous language until a reboot.

This CL will make injected tiles attempt to treat the string metadata
value as a resource variable to get the integer res id and then
properly load the localized title using the res id. To be backwards
compatible, if the res id is 0, we treat the string metadata value as
the title itself (current behavior).

Bug:36470694
Test: make RunSettingsLibRoboTests
Change-Id: I3963534a3a3a27d0455c4ed1ad4fa574b03d67fc
2017-04-06 14:35:51 -07:00
jackqdyulei
806f78d988 Add showChargingMethod in BatteryInfo
This toggle is used to decide whether to show charging method.
If it is off, then "Charging over ac" will become "Charging"

Bug: 36558216
Test: RunSettingsLibRoboTests
Change-Id: I98b1f7e7b77d7ce0a7e1aae29e55a33ac79ff0d7
(cherry picked from commit b3c33f63ed120cf4758ec67426bb45291e289fce)
2017-04-06 13:16:58 -07:00
Stephen Chen
ae4c1be420 Merge "Set AccessPoint metered bit using ScoredNetwork, WifiInfo, and WifiConfiguration." into oc-dev am: 154bbb003d
am: 9a4a1d9d8a

Change-Id: I5d0235749d9527e027a4ff1bcad48da6492ac0fe
2017-04-06 04:35:39 +00:00
Stephen Chen
21f6868d80 Set AccessPoint metered bit using ScoredNetwork, WifiInfo, and WifiConfiguration.
Bug: 36888471
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java

Change-Id: I5228512a832665916520658acddc9bf93d78a1a1
2017-04-05 19:17:57 -07:00
TreeHugger Robot
1c22609438 Merge changes from topic 'battery_string_main_screen'
* changes:
  Add lower case charging string.
  Add showChargingMethod in BatteryInfo
2017-04-05 23:42:05 +00:00
Filip Pavlis
81d53516ab Omit using ctor of PreferenceViewHolder in tests.
See the topic for related change in the support lib.

Bug: b/33774880
Test: N/A
Change-Id: I557278175db17b32ff9ce65ceaebc9a7386d2c20
2017-04-05 10:56:38 +01:00
Jesse Evans
13be12e314 Adds appropriate filtering for instant apps
Adds a new filter that includes downloaded and launcher apps, as well
as instant apps, and ensured that instant apps do not appear where
they previously were not expected (downloaded and launcher apps).

Test: Added testing for the existing filter and the new one.

Bug: 36515324
Change-Id: I7ef94442bae14ee18d4b4d70f04f9bf62af9eff8
(cherry picked from commit a4e0356ed48021c353a6964ec8ea4c6b55006282)
2017-04-02 16:10:22 +00:00
Jesse Evans
de7d306df8 Merge "Adds appropriate filtering for instant apps" 2017-04-02 16:09:37 +00:00
Dan Shi
1fee398b88 Change test type from InstrumentationTest to AndroidJUnitTest
Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#

Bug: 35882476
Test: local test

Change-Id: Ic3c4c7a9d29ef9d32a407f31cfc93c5e43650297
2017-03-31 16:02:33 -07:00
Peter Qiu
d385b7b33a Merge "SettingsLib: wifi: encapsulate Passpoint configuration in AccessPoint" into oc-dev am: 70c429d37a
am: 3c53fc41ac

Change-Id: Ifa9523dceddeeeef106bfdf1c88d09f8e7208176
2017-03-31 18:04:10 +00:00
Peter Qiu
ced37dba7b SettingsLib: wifi: encapsulate Passpoint configuration in AccessPoint
The configurations that are managed by "Saved Networks" page are
centered around the abstraction of AccessPoint.  Since we will
need to manage Passpoint configuration in the "Saved Networks"
(for configuration removal), encapsulate necessary information
in an AccessPoint for a Passpoint configuration.

Bug: 34207710
Test: manual test
Test: runtest --path
      frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: Ide556f5ec6c4ef9e1f82016efe17dc9860f298de
2017-03-31 10:50:45 -07:00
Jesse Evans
a4e0356ed4 Adds appropriate filtering for instant apps
Adds a new filter that includes downloaded and launcher apps, as well
as instant apps, and ensured that instant apps do not appear where
they previously were not expected (downloaded and launcher apps).

Test: Added testing for the existing filter and the new one.

Bug: 36515324
Change-Id: I7ef94442bae14ee18d4b4d70f04f9bf62af9eff8
2017-03-30 17:32:09 -07:00
jackqdyulei
b3c33f63ed Add showChargingMethod in BatteryInfo
This toggle is used to decide whether to show charging method.
If it is off, then "Charging over ac" will become "Charging"

Bug: 36558216
Test: RunSettingsLibRoboTests
Change-Id: I98b1f7e7b77d7ce0a7e1aae29e55a33ac79ff0d7
2017-03-30 15:52:45 -07:00
Peter Qiu
333720fbb4 Merge "wifi: add test for tracking Passpoint AP on devices with Passpoint disabled" into oc-dev am: f1cc8b82b3
am: a5b0d84ea7

Change-Id: I8e4a22a715e07f47473465db9acdbf81aaba2b58
2017-03-29 22:59:34 +00:00
Maurice Lam
8c54e87e76 Merge "Add custom view support to Tiles" 2017-03-29 22:56:56 +00:00
Daniel Nishi
011d68b59f Merge "Add support for movies & tv apps querying." 2017-03-29 21:13:09 +00:00
Maurice Lam
1c07761f8e Merge "Add exclusive attribute to suggestion category" 2017-03-29 01:25:27 +00:00
Peter Qiu
f562838125 wifi: add test for tracking Passpoint AP on devices with Passpoint disabled
On a device with Passspoint disabled (config_wifi_hotspot2_enabled build config
set to false), calls to WifiManager#getMatchingWifiConfig will throw
an UnsupportedOperationException.  So add a test to verify that exception
is being caught in WifiTracker#udpateAccessPoints.

Bug: 36649203
Test: runtest --path
      frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: If7d3d4122c36b1b98c24abf703d6492771918125
2017-03-28 13:24:34 -07:00
Daniel Nishi
7baa50c0b8 Add support for movies & tv apps querying.
Bug: 36223441
Test: Robotest
Change-Id: Icfb34844601f87d11b7309eacf9385d49ed36338
2017-03-28 10:51:05 -07:00
Maurice Lam
d8ae77b7f5 Add custom view support to Tiles
Make Tiles parse the metadata "com.android.settings.custom_view",
which are inflated as remote views and be displayed instead of the
regular item-summary item.

Test: cd tests/robotests && mma
Bug: 35668836
Change-Id: Id245efdeb42a07766f16915501151348f01d49d6
2017-03-24 14:33:29 -07:00