Commit Graph

2577 Commits

Author SHA1 Message Date
Bartosz Fabianowski
62b96811c1 Populate Enterprise Privacy Settings page - batch 1
This CL adds the first batch of items to the Privacy Settings page.
These are all the items that fall into the "What types of
information can your organization see?" category and do not require
deeper Framework changes. Further batches are to come in separate
CLs.

Test: make RunSettingsRoboTests
Bug: 32692748
Change-Id: I460093bc45ed0e5baab2a5cdf9833e654d436cc9
2016-11-18 14:17:47 +01:00
Maurice Lam
d12b97f9e3 Merge "Fix TTS for GMT offset" 2016-11-18 03:36:54 +00:00
TreeHugger Robot
6e32ed6ee9 Merge "Add account preference controller." 2016-11-18 02:13:44 +00:00
TreeHugger Robot
172f4c51ad Merge "Extract counting of installed apps into helper class" 2016-11-18 01:14:35 +00:00
Doris Ling
bfac31b517 Add account preference controller.
- Add account preference controller and move the handling for
displaying user's accounts from AccountSettings to the
controller.

- Move AccountPreference and RemoveUserFragment from inner class to
standalone class.

- Add AccountRestrictionHelper to handle API that needs to be mocked for
testing.

Bug: 31801423
Test: make RunSettingsRoboTests
Change-Id: I3d16d0b6a8922a8abec7037c52b7a4de2d76eb0d
2016-11-17 16:33:36 -08:00
Maurice Lam
84b1ceda7c Fix TTS for GMT offset
Add TtsSpans to the GMT offset string so that TalkBack knows to
read it out in a more natural way.

Test: cd tests/robotests && mma
Bug: 30042703
Change-Id: Ifa3c540f086472bc3a315b35ba40c9497f17d2d8
2016-11-17 16:30:05 -08:00
TreeHugger Robot
3b64ad983f Merge "Fork Search code to independantly develop and test search." 2016-11-18 00:11:51 +00:00
TreeHugger Robot
8a2e2fa2a7 Merge "Refactor time format preference to be more modular/testable" 2016-11-17 23:14:18 +00:00
Matthew Fritze
0ed37c3513 Fork Search code to independantly develop and test search.
This is the start of the new search in Settings. It is a nearly complete
replacement of the old search code in a more modular and flexible
architecture. It is expanding the datasources that it queries, including
the same Settings database, which will now include more first party apps
and be extended to support inline results where the user can change
settings directly from the search view. Search will also fan out to
query new sources (local or remote), and is built in a way
such that adding additional sources is roughly the same amount of work
had they been added in the initial writing of this code.

Query interpretation will now be source-dependant, allowing for future
upgrades to fuzzy search where it is applicable.

Change-Id: Ib0bac1fe92bf8a662d33abf9a99bb6ee2090ec8f
Fixes: 32115225, 32378927
Test: make RunSettingsRoboTests
2016-11-17 14:34:29 -08:00
Fan Zhang
2f5bd3c7b7 Merge "Add dynamic tiles to development settings." 2016-11-17 22:15:45 +00:00
Fan Zhang
3d2efae43b Refactor time format preference to be more modular/testable
Change-Id: Ib6c06de9f942c3bb06384947f6b1923b33e511bc
Fixes: 32972964
Test: make RunSettingsRoboTests
2016-11-17 13:22:53 -08:00
Bartosz Fabianowski
3d83300deb Extract counting of installed apps into helper class
This CL extracts the code that counts the number of installed apps
for a set of users from ManageApplications to a helper class,
InstalledAppCounter. The new helper is designed to be unit-testable
(PackageManager dependencies are injected via a new PackageManagerWrapper
abstraction) and customizable (the set of users for which to count is
specified by subclasses).

The CL adds a unit test for the InstalledAppCounter as well.

Test: make RunSettingsRoboTests
Bug: 32692748
Change-Id: Ie7fbd40d9dd998b27f1f9de227b6a187b5c9d315
2016-11-17 21:04:34 +01:00
Fan Zhang
ee904e89f2 Add dynamic tiles to development settings.
Remove static preference for MemorySettings and change it to dynamic
using manifest metadata.

Bug: 32623105
Test: RunSettingsRoboTests

Change-Id: Id224eb8a25fea03c75b8fb0b16842bc5b427897a
2016-11-17 11:46:38 -08:00
Fan Zhang
d3b0f92494 Merge "Move ad-hoc dynamic tile injection into FeatureProvider." 2016-11-17 18:00:49 +00:00
Lei Yu
2bc946bb89 Merge "Invoke notifySummaryChanged callback only when text changed." 2016-11-17 17:59:49 +00:00
jackqdyulei
882d48fd46 Invoke notifySummaryChanged callback only when text changed.
Bug: 32905374
Test: make -j40 RunSettingsRoboTests
Change-Id: I709329d3024656080723383231a884f3cf8a9a43
2016-11-16 17:34:09 -08:00
Fan Zhang
16f5af6e84 Move ad-hoc dynamic tile injection into FeatureProvider.
Ideally a page should use DashboardFragment and it doesn't need to
handle adding dynamic tiles manually. This method is only designed for
page that are not fully migrated to DashboardFragment yet.

Bug: 32623105
Test: RunSettingsRoboTests
Change-Id: I0cafcddf9a43b164daea500bade869fada5b3f4e
2016-11-16 16:26:38 -08:00
Fan Zhang
2385aa819b Use new API Build.getSerial() to get serial number.
Bug: 32935486
Test: RunSettingsRoboTests
Change-Id: I28b8d27d034b4a6c4ae5f29e8311e84e5c423967
2016-11-16 14:50:19 -08:00
Fan Zhang
9dc9c6174c Insert dynamic dashboard tiles into optional placeholders
Insteads of inserting tile onto screen using absolute priority values,
now each page can have a placeholder preference, and at run time we will
add dynamic dashboard tiles to placeholder's place.

Bug: 32827787
Test: RunSettingsRoboTests
Change-Id: I1fe9e11dce4eb6fb4a9b56af05a2b8e5cdae00d2
2016-11-14 17:09:18 -08:00
Sudheer Shanka
acb1a61f3f Update usage of ActivityManagerNative.
Bug: 30977067
Test: N/A
Change-Id: I46e37a09cff059d2784a819bc2651d6973fbd268
2016-11-14 12:59:11 -08:00
Bartosz Fabianowski
05061fced3 Add Enterprise Privacy page to Settings
This adds a new page to Settings which tells the user about his/her
privacy in light of enterprise management. The new page is only shown
on devices that have a Device Owner app set.

This CL adds a mostly blank page. Follow-up CLs will populate the page
with information about specific admin actions/policies.

The page's title ("Privacy"), icon and location in the Settings app are
tentative. The page will move to its final location once the new IA
redesign is finished.

Test: make RunSettingsRoboTests
BUG: 32692748

Change-Id: I5b5c08c0025207516b0779f54cf68234a4ba3fe4
2016-11-14 12:04:49 +01:00
Fan Zhang
33b0d91d74 Add video to each gesture preference screen.
- Refactor GesturePreference to a generic VideoPreference.
- The old video_preference.xml is only for magnification video, so
  renamed.
- And use VideoPreference in gesture setting pages.
- Refactor common logic into GesturePreferenceController.

Bug: 32637613
Test: RunSettingsRoboTests

Change-Id: I58580b01a32873cb32c5dc5bf2ec021d5b1400cc
2016-11-10 15:24:45 -08:00
TreeHugger Robot
2c61018618 Merge "Add more gesture setting pages." 2016-11-09 21:13:02 +00:00
Fan Zhang
b99ea90046 Add more gesture setting pages.
Bug: 32637613
Test: make -j40 RunSettingsRoboTests
Change-Id: I77f90b8b7e3348ed717ee78693860f48e13070f2
2016-11-09 11:31:10 -08:00
Tamas Berghammer
29147e5fbc Merge "Update package names to work with the proto3 compiler" 2016-11-09 13:38:53 +00:00
Fan Zhang
b52c50d01d Add setting page for swipe to notification.
In this change input & gesture page added 5 separate gesture
preferences, each should lead to a new page to set gesture setting. For
now only swipe to notification preference is wired up. Will implement
the rest in later changes.

Bug: 32637613
Test: make RunSettingsRoboTests -j40
Change-Id: I57ceea8fcd85f3a0ab59cbd12da50b7138f5ca0c
2016-11-08 13:29:35 -08:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
a1d1d67ce3 Add Input & Gesture/Language & Region pages under System.
- Removed LanguageAndInputDashboardAlias because now the contents are
  moved to new pages.

Bug: 32637613
Bug: 32643833
Test: RunSettingsRoboTests
Change-Id: Ia66a942a449a07b9cbba53bdc97738148aafadb4
2016-11-07 17:05:22 -08:00
Fan Zhang
22d42d52cf Refactor IMEAndLanguageSettings to use PreferenceController
Bug: 32642706
Bug: 32637613
Bug: 32643833
Test: RunSettingsRoboTests

This change is necessary to test preference controlling logic, as well
as making preferences reusable in other Preference pages in the new
information architecture.

Change-Id: I9e2fd2f6800579f005a5c303ed03ae06477006a6
2016-11-07 15:29:04 -08:00
TreeHugger Robot
ca8f23a5f7 Merge "Add Usb preference to connected devices dashboard." 2016-11-05 01:11:09 +00:00
Doris Ling
eb51bde8c9 Add Usb preference to connected devices dashboard.
Add Usb preference and the corresponding controller.

Change-Id: I79e3f20b5c024ece0515f9a6cba1185ba8b8c7be
Fixes: 31800290
Test: make RunSettingsRoboTests
2016-11-04 15:39:18 -07:00
TreeHugger Robot
9f69876d54 Merge "Add memory settings to developer setting." 2016-11-03 19:26:47 +00:00
Udam Saini
e2bd1d9fa6 Merge "Can launch into the lock screen with setup wizard style" 2016-11-03 17:28:20 +00:00
Fan Zhang
9f74ef8d4b Add memory settings to developer setting.
Bug: 32623105
Test: make RunSettingsRoboTests
Change-Id: I81e38b1ea4e59c330d0eef078af2751b3de739fe
2016-11-03 10:21:38 -07:00
Lei Yu
8109a0fb6b Merge "Show "uninstall for all users" when >1 users installed it." 2016-11-02 23:21:35 +00:00
Fan Zhang
5944768fbe Merge "Refactor bindPreferenceToTile to properly handle multi-user" 2016-11-02 21:05:31 +00:00
Udam Saini
d6b1c666c5 Can launch into the lock screen with setup wizard style
The trampoline currently always uses the settings style for set action
new password. When called during setup wizard, it should launch the
setup wizard style.

Test: Added robotests for launching activity and copying setup wizard
extras. Also manually tested with an application when device is
provisioned and not provisioned.

bug:32575389
Change-Id: I5763eb87b63a46b05cd200bb73b15bdc24c8bd3b
2016-11-02 11:49:09 -07:00
Doris Ling
0d148c4b62 Merge "Add Auto sync account data to account dashboard." 2016-11-01 20:09:51 +00:00
Fan Zhang
5482637f8b Refactor bindPreferenceToTile to properly handle multi-user
Change-Id: I751eb645663b3546c212925e2ba4a0a94714013b
Fixes: 32470791
Test: RunSettingsRoboTests
2016-11-01 12:06:38 -07:00
Doris Ling
86e1df9bd9 Add Auto sync account data to account dashboard.
Add auto sync to User & accounts dashboard, and update
UserSettings to use the emergency info and add user when locked
controllers.

Test: RunSettingsRoboTests
Bug: 31801423
Change-Id: Ibf5a886276a9aa8f53c548036aecfd6c4d759ae3
2016-11-01 11:28:36 -07:00
TreeHugger Robot
c561603a7a Merge "Show select user dialog if setting tile supports multi-user" 2016-11-01 01:39:17 +00:00
Fan Zhang
601fbec8e8 Show select user dialog if setting tile supports multi-user
Bug: 32470791
Test: RunSettingsRoboTests
Change-Id: I07a14c32a1b898467b03df09430038ac4a1a2aed
2016-10-31 16:55:12 -07:00
TreeHugger Robot
bbae3e89aa Merge "Remove DashboardTilePreference." 2016-10-31 23:25:17 +00:00
TreeHugger Robot
ec8daec2cb Merge changes from topic '3p_app_account_sync_detail_crash'
* changes:
  Add test for LocalClassLoaderContextThemeWrapper.
  Fix crash when opening account sync detail for external app
2016-10-31 21:49:45 +00:00
Fan Zhang
8b30f5310e Remove DashboardTilePreference.
It's not needed for now.

Bug: 32554506
Test: RunSettingsRoboTests
Change-Id: I325a07896e88db97c9d3a461c8cb4c42a6c44737
2016-10-31 14:40:15 -07:00
Fan Zhang
c71f6eec3f Add test for LocalClassLoaderContextThemeWrapper.
Bug: 32426306
Test: make RunSettingsRoboTests
Change-Id: I0b46f8ca69c50c86626bae717bac334b1bb7addf
2016-10-31 13:03:49 -07:00
Nick Desaulniers
a393a4f614 DeviceInfoSettingsTest: test parsing llvm kernel
Adds unit test for DeviceInfoUtils.formatKernelVersion to see if it can
parse a /proc/version string from a kernel compiled with Clang/LLVM.

Bug: 32455817
Change-Id: I25123bf44f67e038e01d8c76d6eab18d5616c7c2
2016-10-31 11:13:10 -07:00
TreeHugger Robot
5f6bb20e7c Merge "Use new app header in more screens." 2016-10-29 02:00:40 +00:00
Fan Zhang
fdb833873a Use new app header in more screens.
- This covers app data usage settings, power usage details
- Addded helper method on AppHeaderController to build the header as
  Preference because every fragment needs to do this anyway.

Bug: 32442716
Test: RunSettingsRoboTests

Change-Id: I6d38321b867154f8fb5194b993d118bcdbbfedc9
2016-10-28 17:16:39 -07:00
Doris Ling
c62f8809c7 Fix test failure for EmergencyInfoTestController.
Make sure that the test preference has the correct key.

Change-Id: Icbf18d3f8854bc43ef486ae56f0b5fc8f035bf41
Fix: 32508237
Test: RunSettingsRoboTests
2016-10-28 16:37:01 -07:00