Commit Graph

6755 Commits

Author SHA1 Message Date
Doris Ling
b758e2b473 Use the new loader to show app data usage summary.
- this is for getting the summary text for Apps & notifications ->
(select an app) -> Mobile data & Wi-Fi

Bug: 111751694
Test: make RunSettingsRoboTests
Change-Id: Ib4d8e7308ea8a782b9af3bbb99db2b1235e0aca2
2018-10-02 16:21:14 -07:00
jackqdyulei
8800b9e1ff Use isConnected in CachedBluetoothDevice
This method check whether it has connected profile, not physical
connection between devices.

It make more sense to use it in settings:
1. We only care about whether it has active profile(i.e. A2dp, hfp..)
2. Sometime when profile is disconnected, BluetoothDevice.isConnected()
still return true. This may make UI flaky.

Bug: 79947085
Test: RunSettingsRoboTests
Change-Id: I44039704508a742c7a8aef0a035afcf169b08939
2018-10-02 15:55:21 -07:00
jackqdyulei
184b3a4c68 Add entitlement check for usb tethering
Before this CL, usb tethering in detail page doesn't have entitlement
check. This CL fix it by using the correct API

Also polish it by updating the UI before entitlement check to align
hotspot page. So in UI it will first check "usb tethering". If
entitlement check fail, it will revoke and go back to previous selection.

Bug: 115707279
Test: RunSettingsRoboTests
Change-Id: I3d2ebad2879479a870bcdfe596bb88b83c424389
2018-10-02 15:41:46 -07:00
Fan Zhang
53bdd9961c Check instance before casting
Change-Id: I1917b2d8e045904145ea833abf35fa1d008fa224
Fixes: 116855783
Test: robotests
2018-10-02 15:15:38 -07:00
TreeHugger Robot
54e4100ac0 Merge "Add SettingsContextualCardProvider" 2018-10-02 21:18:46 +00:00
Sooraj Sasindran
3d56d5924b Use updated APIs for CBRS
Use updated APIs for CBRS

Bug: 117156243
Test: verified enable disable using UI
Change-Id: Ib6be6479c9f51b7c2dd80db5f7971a8c7e820954
2018-10-02 11:05:59 -07:00
TreeHugger Robot
b021f3285b Merge "Settings change for device-wide unknown sources block." 2018-10-02 13:07:24 +00:00
Raff Tsai
3936e9f3d6 Add SettingsContextualCardProvider
- provide contextual cards for SettingsIntelligence
- add contextualcards libs

Fixes: 116837093
Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.homepage.contextualcards"

Change-Id: I873e77fa43e9a8f6056be1f583b1910002efbd2e
2018-10-02 15:04:58 +08:00
TreeHugger Robot
ab7dba0d97 Merge "Support phone number in Settings slices" 2018-10-02 02:43:17 +00:00
Doris Ling
6548d21839 Merge "Add version 2 of AppDataUsagePreferenceController." 2018-10-01 21:46:08 +00:00
TreeHugger Robot
1161052e70 Merge "Application accepts null intents causing a crash" 2018-10-01 21:11:56 +00:00
Doris Ling
863c60ffcf Add version 2 of AppDataUsagePreferenceController.
- a simple copy of AppDataUsagePreferenceController to
AppDataUsagePreferenceControllerV2, so that future modification can
be compared more easily.

Bug: 111751694
Test: make RunSettingsRoboTests
Change-Id: Ibeed7775a223794bf50f36b3b933e270a55e3b39
2018-10-01 11:47:21 -07:00
Raff Tsai
af9eb2d7a7 Application accepts null intents causing a crash
Change-Id: Ia7f98f43567f25ae7abc6e5ac7e07323e75d9047
Fixes: 116869239
Test: adb shell am start -n com.android.settings/com.android.settings.Settings\\\$ApnEditorActivity
Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.network"
2018-10-02 02:04:41 +08:00
Fan Zhang
3600c03392 Merge "Support some phone information in Settings slice" 2018-10-01 16:46:19 +00:00
Fan Zhang
f9f6200b28 Merge "Remove FragmentUtilsTest class" 2018-10-01 16:45:19 +00:00
Irina Dumitrescu
e9c8a0f264 Settings change for device-wide unknown sources block.
Update the "Install unknown apps" preferences to display the option is
disabled if the global user restriction for unknown apps is turned on.

Test: Manual test, disallowing installs in TestDPC disables installing
unknown sources apps. Also:
atest packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/ExternalSourcesDetailsTest.java
Bug: 111335021
Change-Id: I235e5fd110e296ed43aa89d7a5ec0d48470c4023
2018-10-01 12:15:00 +01:00
tmfang
e402cb2744 Support phone number in Settings slices
- Let controller of phoner number extends BasePreferenceController,
so it can be supported showing slice view by SettingsSliceProvider.

Test: make RunSettingsRoboTests
Bug: 74900516
Change-Id: Id98e6aac981025159a0530c6e0709ba0f2ebcd15
2018-10-01 11:15:02 +08:00
tmfang
4f40a8e287 Support some phone information in Settings slice
- Android version
- Device model

Test: robo test, manual test
Change-Id: Ic047caaf4ab699082f6420ad8fa1d2f455abfcb0
Fixes: 74900516
2018-10-01 10:38:21 +08:00
Lucas Dupin
3b686f77c4 Merge "Wake screen gesture" 2018-09-29 17:32:30 +00:00
TreeHugger Robot
c3d1d33683 Merge "Move search resources to settingslib-search" 2018-09-29 02:46:36 +00:00
Fan Zhang
6acbc9337e Move search resources to settingslib-search
Bug: 113128828
Test: manual
Change-Id: I2c513dd22e84d5f86bd282e10d0b0df19f9ce407
2018-09-28 16:38:23 -07:00
Lucas Dupin
8e57afb2cb Wake screen gesture
Settings page for gesture that allows the display to wake up.
Can be configured via overlays using config_dozeWakeScreenSensorType

Bug: 111414690
Test: manual
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WakeScreenGesturePreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WakeScreenGestureSettingsTest
Change-Id: Ic44f0ee9e781bda3b06cf4896217b324b9e3606c
2018-09-28 16:25:47 -07:00
TreeHugger Robot
dac739de2a Merge changes from topic "angle_integration4"
* changes:
  Add ANGLE enable to Developer Options
  Allow AppPicker to filter only non-system apps
2018-09-28 23:12:30 +00:00
TreeHugger Robot
f53f814be0 Merge "Create the default static cards for Contextual Settings Homepage" 2018-09-28 22:40:38 +00:00
Lucas Dupin
02fe52963a Merge "Renaming gesture" 2018-09-28 22:00:56 +00:00
Mill Chen
623eb5a904 Create the default static cards for Contextual Settings Homepage
Adding three default ContextualCard data to CardContentProvider, in case
of empty database or no SettingsIntelligence, to keep Contextual
Settings Homepage working well.

Bug: 113372471
Test: visual, atest SettingsHomepageActivityTest
Change-Id: Id7b26818e10f7945b2618100901310a005d8cc0d
2018-09-28 14:23:14 -07:00
Lucas Dupin
ade9180e7b Renaming gesture
Bug: 111414690
Test: manual
Test: ReachGesturePreferenceControllerTest, ReachGestureSettingsTest
Change-Id: I34cd4aacabc912122c553bf9c955a8ca4494230b
2018-09-28 12:53:12 -07:00
Doris Ling
5d397194ec Merge "Add version 2 of AppDataUsage." 2018-09-28 17:33:07 +00:00
TreeHugger Robot
cc9ffafb80 Merge "Remove custom Robolectric util class." 2018-09-28 16:18:28 +00:00
TreeHugger Robot
3f9ded6206 Merge "Changed the app_version type" 2018-09-28 03:33:22 +00:00
tmfang
a09325ea18 Remove custom Robolectric util class.
We directly use Robolectric/ActivityController to
setup an FragmentActivity lifecycle.

So, I removed the custom Robolectric in robotests/testutils.

Change-Id: Ib93265f719e1eb9606c9ad6f05c1dd1957302e8b
Fixes: 111195450
Test: robotests
2018-09-28 11:26:17 +08:00
TreeHugger Robot
5f9d178360 Merge "A new attribute which can show the dynamic summary" 2018-09-28 02:38:12 +00:00
Kevin Chyn
a94e1aaf34 Merge "Update FaceSettings to match mocks" 2018-09-28 02:12:55 +00:00
Doris Ling
0d218d0798 Add version 2 of AppDataUsage.
- a simple copy of AppDataUsage to AppDataUsageV2, so that future
modification can be compared more easily.

Bug: 111751694
Test: make RunSettingsRoboTests
Change-Id: I4deb8fcd93ae1ea391fc5fca0ff28c6dc57bfef9
2018-09-27 16:53:31 -07:00
jackqdyulei
e95f07dff6 Still check the visibility of view
Since EAP has many sub type, which controls differnet view. We still need to check the
visibility to determine which type it is.

Bug: 116767176
Test: RunSettingsRoboTests
Change-Id: Iee04a50140ae1afacdf77eedf7743a465bae1f58
2018-09-27 16:37:48 -07:00
tmfang
c28c836dcb Remove FragmentUtilsTest class
We directly use FragmentController to start fragment.

Change-Id: Iff78f321165d666f96d84f001ff054257a1aaede
Fixes: 111195449
Test: robotest
2018-09-27 18:51:20 +08:00
Sunny Shao
672febf859 Changed the app_version type
- Updated type from string to long and saved the PackageInfo.getLongVersionCode
- Modified CardDatabaseHelper, ContextualCard, CardContentProviderTest

Bug: 111820446
Test: robotest
Change-Id: Id2d39f15a1743b9f38044354a0c3b2584329bab9
2018-09-27 17:46:55 +08:00
Fan Zhang
67793945f0 Remove custom robotest utils in favor of framework support.
Bug: 111195450
Fixes: 111195167
Test: robotests
Change-Id: I8bea43fd86f9ae5ce40eb16dabf733b0fbe89aae
2018-09-26 17:28:08 -07:00
Kevin Chyn
a8843f2959 Update FaceSettings to match mocks
Settings page should not show if device credential is not confirmed

Bug: 111548037
Fixes: 116531896

Test: adb shell settings get secure face_unlock_app_enabled
Test: make -j56 RunSettingsRoboTests

Change-Id: I651ee88e9ee4017ee3dc52fa8a5d05cb8f092e1d
2018-09-26 11:50:02 -07:00
jackqdyulei
b152e6dd1b Update "Previous connected device" preference
1. Show up to 3 devices in main page
2. Add "See all" preference to go ot detail page

Bug: 116350449
Test: Screenshot && RunSettingsRoboTests
Change-Id: Iee0de8a2b7f2543e946a117ba2d9ca9dde6c8678
2018-09-26 11:08:58 -07:00
Mill Chen
092f66b279 Merge "Add Data usage slice in Contextual Settings Homepage" 2018-09-26 14:55:31 +00:00
Leon Liao
1f1671ca28 Merge "Rename isConnectable()" am: ec65174f11 am: 09385137e3
am: af7aed6d79

Change-Id: I5b0a11396ccce092778b6cfda444f52cfd469525
2018-09-26 06:25:41 -07:00
Leon Liao
af7aed6d79 Merge "Rename isConnectable()" am: ec65174f11
am: 09385137e3

Change-Id: Iffe650dd574633cacc6197c6f6f69316b528fb0a
2018-09-26 06:14:55 -07:00
Leon Liao
09385137e3 Merge "Rename isConnectable()"
am: ec65174f11

Change-Id: Ibfc536ba78a118bc33890e52efa6650b21bff62e
2018-09-26 05:59:20 -07:00
tmfang
8eb46b717e A new attribute which can show the dynamic summary
For now, slice view shows screen title by default,
but it isn't approprate for some simple cases.
ie, device model, phone number, android version etc.

So, We create a new attribue which let BasePreferenceController
be more flxible. User can choose what they want to show
in summary text.

Fixes: 74900516
Test: make RunSettingsRoboTests

Change-Id: I2788c6edfaf8e656170a507607f22513841a3e0a
2018-09-26 17:48:12 +08:00
Leon Liao
ec65174f11 Merge "Rename isConnectable()" 2018-09-25 23:06:20 +00:00
TreeHugger Robot
25d95e0dec Merge "Add 'notificaton blocked' filter to notifications" 2018-09-25 22:34:37 +00:00
TreeHugger Robot
36f47db6ae Merge "Clean up: remove unused SuggestionFeature api." 2018-09-25 22:01:53 +00:00
Fan Zhang
9c5c64891b Clean up: remove unused SuggestionFeature api.
Test: robotests
Change-Id: I91d06d93834674ca6019a86f8b3891198d424d7a
2018-09-25 13:16:59 -07:00
Fan Zhang
394ea1cde5 Merge "Move AppPreference to settingslib, and change imports." 2018-09-25 19:15:19 +00:00