Commit Graph

6755 Commits

Author SHA1 Message Date
Fan Zhang
754f737c2c Move AppPreference to settingslib, and change imports.
Bug: 116364655
Test: robotests
Change-Id: I313272737dc7c068c47abf8ea021de7d2bea0a25
2018-09-25 09:51:19 -07:00
Julia Reynolds
a4e51b5238 Add 'notificaton blocked' filter to notifications
Test: robotests
Change-Id: I5c0cd9a2f73b6a22d66df7669e944bbe1473539c
Fixes: 112576746
2018-09-25 09:05:10 -04:00
Mill Chen
736b77c04a Add Data usage slice in Contextual Settings Homepage
- Add Data usage card that implements CustomSliceable in Contextual Settings
Homepage.
- Add test case for Data usage slice.

Bug: 114796538
Test: robotests, manual, SliceViewer
Change-Id: I66a046e8f589a477007ea73e1b22420d3efdebde
2018-09-25 10:46:49 +08:00
timhypeng
eb230c76d9 Fix the logic error on PBAP permission assignment
-add test case

Bug: 114808220
Test: make -j42 RunSettingsRoboTests
Change-Id: Id77ade12c28e31a21c1c7a5dcb28906112d3465b
2018-09-25 01:51:40 +00:00
TreeHugger Robot
468b00f043 Merge "Settings icon pack refresh" 2018-09-25 00:29:23 +00:00
Fan Zhang
1f0879955c Settings icon pack refresh
* ic_add_24dp
* ic_airplane
* ic_arrow_down_24dp
* ic_cellular_off
* ic_data_saver
* ic_device_others
* ic_info_outline_24dp
* ic_search
* ic_night_display
* ic_lock_open
* ic_wifi
* ic_sync
* ic_wallpaper
* ic_phone

Bug: 116360411
Test: visual
Change-Id: I626cbb88043c36d32ab34b90fc83170bca0be12a
2018-09-24 15:40:14 -07:00
TreeHugger Robot
9f553bc863 Merge "Fix account deletion not updating account display" 2018-09-24 17:16:42 +00:00
TreeHugger Robot
72967b934e Merge "Format regression test files" 2018-09-22 22:50:13 +00:00
TreeHugger Robot
d747cff993 Merge "Disable recently used apps in battery saver mode." 2018-09-22 00:06:00 +00:00
Fan Zhang
2a1e59063d Disable recently used apps in battery saver mode.
UsageStats query is too slow.

Change-Id: I53fa13924514e71221d3a6407139ff00ae5eb378
Fixes: 114788699
Test: robotests
2018-09-21 14:14:16 -07:00
Lei Yu
6ef05a6c23 Merge "Fix incorrect API invoke for BT profiles" am: 625c1eeaa9
am: dbc26b576c

Change-Id: Ic6b7a4b7541310b3a635b94a799e3476cf5cc684
2018-09-21 13:20:16 -07:00
Lei Yu
dbc26b576c Merge "Fix incorrect API invoke for BT profiles"
am: 625c1eeaa9

Change-Id: I1a7f98b25cae2695d8f5895c8f6e03072ef4600f
2018-09-21 13:13:39 -07:00
Antony Sargent
e0202b219b Fix account deletion not updating account display
The visible symptom of this problem is that when deleting an account, if
a screen lock is set, after confirming the removal and entering the
credentials, you end up back on the account details for the page and it
looks like the deletion failed (even though it didn't).

There were two problems here:

-We were expecting the AccountDetailDashboardFragment to be in a resumed
state at the end of the confirmation dialog, but it wasn't if we had
launched the activity to have the user enter their screen lock
credentials. In the past trying to finish an activity that wasn't in
resumed state seemed to have generated a crash (b/6494527), but that
isn't the case anymore from some tests I ran.

-The AccountDetailDashboardFragment doesn't check in onResume that the
 account still exists.

This CL fixes the bug in 2 ways - we'll always try to finish the
AccountDetailDashboardFragment if the account removal succeeded, and
when AccountDetailDashboardFragment's onResume is called we'll always
check for the account existence. Either approach would be sufficient on
its own.

Change-Id: Iaa65e97fca5dfc8b1251968142e47315e3b590c2
Fixes: 112845988
Test: make RunSettingsRoboTests
2018-09-21 13:11:54 -07:00
Cody Northrop
02a98a64b7 Add ANGLE enable to Developer Options
Allows selecting a single app to use ANGLE instead
of native drivers via Developer Options. Only non-system
apps will be listed via this interface.

Bug: 80239516
Test: make ROBOTEST_FILTER=AngleEnabledAppPreferenceControllerTest RunSettingsRoboTests
Change-Id: Iddf800cdc1a2607757ee165c456357e041c47ce5
(cherry picked from commit a3ed8214bf5903e4dea8df5f3516a95d81d8c485)
2018-09-21 08:40:25 -06:00
Lei Yu
ccbf7f3fff Merge "Fix null pointer crash in BT renaming dialog" 2018-09-21 02:25:34 +00:00
Fan Zhang
2a7c554f96 Format regression test files
Test: retest
Change-Id: I7c44bd39bc80768f455b95b5f314fbe65bf94b96
2018-09-20 14:56:55 -07:00
jackqdyulei
c7a83b2552 Fix incorrect API invoke for BT profiles
When hearing aid device has been set active, we shouldn't invoke
1. a2dpProfile.setActiveDevice()
2. hfpProfile.setActiveDevice()

Change-Id: Ie13dea041dd98d0cb9d913e1f28574b300095db9
Merged-In: Ie13dea041dd98d0cb9d913e1f28574b300095db9
Fixes: 113625278
Test: RunSettingsRoboTests
2018-09-20 12:38:26 -07:00
TreeHugger Robot
d13f28433c Merge "Developer option to enable CBRS" 2018-09-20 15:29:06 +00:00
TreeHugger Robot
cf3af28588 Merge "Add a controller and renderer for Slices." 2018-09-20 05:42:56 +00:00
Emily Chuang
0757e49260 Add a controller and renderer for Slices.
Many contextual cards will be built as slices, so we need a controller
and a renderer for them.

Change-Id: I3816db09ba0181399810652fb18fbe11ce273267
Fixes: 115709730
Test: robotests
2018-09-20 09:50:54 +08:00
Leon Liao
6786e32a73 Rename isConnectable()
LocalBluetoothProfile.isConnectable() checks whether the user can initiate a connection
for a specific profile, not really whether the profile is connectable.

Change-Id: If6c6cd1554acf35db2460ea6ddb65148a7e86e45
Bug: 79982487
Test: atest tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsProfilesControllerTest.java
2018-09-20 09:23:30 +08:00
Naina Nalluri
6398841434 Developer option to enable CBRS
Add new developer option to enable
or disable CBRS Data

Bug: 113278158
Test: On device
Change-Id: I667a7c90b0bb7e9e0c70f41b28d376c9170e65d9
2018-09-19 17:58:30 -07:00
Lei Yu
aec9fb243d Merge "Fix incorrect API invoke for BT profiles" 2018-09-20 00:13:55 +00:00
TreeHugger Robot
a918e57e82 Merge "Add Settings Search Regression test" 2018-09-19 23:41:43 +00:00
Julia Reynolds
56966ce8f5 Add checks before casting entry.extraInfo.
Test: make, flash
Change-Id: I1a9d6a51b1f236e711fdb49d9c2f795e7023cfce
Fixes: 113309404
2018-09-19 15:43:08 -04:00
TreeHugger Robot
186213d70f Merge "Add policy transparency to disallow remove user." 2018-09-19 09:44:24 +00:00
Jonathan Scott
ba3b68686d Add policy transparency to disallow remove user.
On the Settings > System -> Multiple users screen, ensures that the"Delete from this device" menu is always available, but is disabled and includes policy information when DISABLE_REMOVE_USER is set.

Change-Id: Ia6c6cfb360f35a6e447bf9d85d2472ac11dde1ac
Fix: 113807450
Test: m ROBOTEST_FILTER=UserSettingsTest -j40 RunSettingsRoboTests; CTS Verifier Device Owner Tests/Policy transparency test/Disallow remove user.
2018-09-19 09:32:35 +01:00
Matthew Fritze
11fa37ebb4 Add Settings Search Regression test
Take a snapshot of the currently available search results, and
verify that search results aren't accidentally removed.

We use 4 items to identify a search result:
- Title
- Data Key
- Slice Uri

We use Title & Key to identify the search result, since they should not change.
The Slice Uri is used to make sure we don't regress on Slice Availability.

Test: runtest --path packages/apps/Settings/tests/unit/src/com/android/settings/search/SettingsSearchResultRegressionTest.java
Change-Id: I22498229bbcd1e90c9e0a026af9df4367a98190a
2018-09-18 16:42:22 -07:00
jackqdyulei
1bf730093c Fix incorrect API invoke for BT profiles
When hearing aid device has been set active, we shouldn't invoke
1. a2dpProfile.setActiveDevice()
2. hfpProfile.setActiveDevice()

Change-Id: Ie13dea041dd98d0cb9d913e1f28574b300095db9
Fixes: 113625278
Test: RunSettingsRoboTests
2018-09-18 15:19:32 -07:00
jackqdyulei
5b7fc8f3a5 Fix null pointer crash in BT renaming dialog
The dialog may become null after onDestroy has been invoked, so
we need to catch this case.

This CL also moves the listener outside to make it easy to test.

Change-Id: I4ce640c5bdaf1f201f9fecb14b3e5e38e10d4b79
Fixes: 115679393
Test: RunSettingsRoboTests
2018-09-18 14:41:37 -07:00
Philip P. Moltmann
b009e89e4f Merge "Make Settings use system-api restricted icon." 2018-09-18 15:27:36 +00:00
Doris Ling
ff33e9bc13 Merge "Use the new network stats loader to get usage data for all apps." 2018-09-17 23:55:03 +00:00
Philip P. Moltmann
a5918a6a68 Make Settings use system-api restricted icon.
Test: Browsed around settings
Bug: 110953302
Change-Id: I1b19be721719ed8946cb558b93119b1b0e173794
2018-09-17 15:48:31 -07:00
Lei Yu
16a0e416fd Merge "Revert "call getName() from CachedBluetoothDevice, not CachedBluetoothDeviceManager"" 2018-09-17 22:16:00 +00:00
Lei Yu
499013b05e Revert "call getName() from CachedBluetoothDevice, not CachedBluetoothDeviceManager"
This reverts commit 3029efc5f7.

Reason for revert:
To fix null pointer crash in Pairing dialog. Dialog maybe triggered by intent, in which LocalBluetoothManager couldn't have instance for BluetoothDevice and will return null. As a result, we need to depend on method in CachedBluetoothManager to handle it.

Bug: 115754654
Bug: 112735753
Change-Id: I1ebf1f1c2829cfb75e6c382df5acf785fe54a185
2018-09-17 22:15:14 +00:00
Doris Ling
27ee2f0865 Use the new network stats loader to get usage data for all apps.
- change to use the new NetworkStats.Bucket instead of
NetworkStats.Entry when iterating through the detail data.

Bug: 111751694
Test: make RunSettingsRoboTests
Change-Id: I305cc384320e4a72531d80dd9a00a3034ab12837
2018-09-17 15:02:06 -07:00
TreeHugger Robot
8dbbb01f19 Merge "Add DataUsageListV2 for showing network stats detail." 2018-09-17 19:20:16 +00:00
Doris Ling
6127d9de4c Add DataUsageListV2 for showing network stats detail.
Initial step: simply duplicate the existing DataUsageList class.

Bug: 111751694
Test: make RunSettingsRoboTests
Change-Id: I4d48405cd127cccb041ba0457638337f6918ce2e
2018-09-17 10:19:39 -07:00
Raff Tsai
8685c8562e Merge "Fix popup dialog show wrong device name" 2018-09-17 01:31:21 +00:00
TreeHugger Robot
6ca83b53a9 Merge "Fix bug in Add network fragment" 2018-09-15 00:45:17 +00:00
TreeHugger Robot
2508560eeb Merge "Fix a bug where custom cards are not refresh when removed" 2018-09-14 21:57:24 +00:00
Fan Zhang
45fc707474 Fix a bug where custom cards are not refresh when removed
When the last custom card for a specific type is removed,
onContextualCardUpdated should receive the cardtype info so we can
remove it from main data set.

- Reverted onContextualCardUpdated method signature back to before
- Force ConditionContextualCardController to send an empty list if
  everything is removed.

* Note: the update logic is pretty complicated to handle
  add/update/remove all together. In the future we should consider
  spliting the removal logic to simplify this area.

Change-Id: Ied688deb693ec33e0017be02cf5c743a754a6e61
Fixes: 115572494
Test: visual
2018-09-14 12:37:01 -07:00
jackqdyulei
0c6f8065c2 Fix bug in Add network fragment
After we switch secutiry from EAP to WPA, add button will become
disabled forever. Main reason is that we use view visibility to decide
which security type it is. In this case target view is visible while its
parent view is gone. So even though UI shows correctly however we still
think it is in EAP mode.

This CL check the mAccessPointSecurity directly instead of depending on
fragile view.

Fixes: 114689178
Test: RunSettingsRoboTests

Change-Id: I4284d25e6bf86ee7c5e7c0e17f0834c719d8d587
2018-09-14 11:10:31 -07:00
Raff Tsai
b20bfc949a Fix popup dialog show wrong device name
- Current EditText value will set to preference text if we click
OK in EditTextPreferenceDialogFragment. We will set preference
text to default when click cancel in DeviceNameWarningDialog.

Change-Id: Iab9561953b58276e98ee68d9196fa18e0dc3d78c
Fixes: 115693838
Test: make RunSettingsRoboTests
2018-09-14 23:53:30 +08:00
TreeHugger Robot
e5791f3c99 Merge "Prevent non-blockable app from being blocked" 2018-09-14 02:34:20 +00:00
Fan Zhang
0f8536b034 Merge "Create custom card controller/render as soon as possible." 2018-09-13 20:05:58 +00:00
Julia Reynolds
7217c4421f Prevent non-blockable app from being blocked
In the recent notifications display.

Test: manual
Change-Id: I0b14dfbcb8c4a971bb028def7751d083d37958de
Fixes: 111863327
2018-09-13 14:02:50 -04:00
Fan Zhang
a93743f9c4 Create custom card controller/render as soon as possible.
Custom cards might need to monitor lifecycle events, waiting for
onFinishLoading is too late.

Also make sure custom cards cannot change card type.

Test: manual
Change-Id: Ib8f8e6e48926a63c9d241ed9e9843c025e3f634a
2018-09-13 09:20:59 -07:00
TreeHugger Robot
a95584eed5 Merge "Revert the mandatory backups feature." 2018-09-13 08:45:34 +00:00
TreeHugger Robot
75e2bdbcc9 Merge "Do not include disabled activity in Default Browser." 2018-09-13 01:57:53 +00:00