Commit Graph

19146 Commits

Author SHA1 Message Date
TreeHugger Robot
fcbb6528ae Merge "Add test to ensure all future fragments implements logging." 2016-11-29 23:20:35 +00:00
Doris Ling
20d4b041f7 Add handling for account tiles for specific account type.
- List individual account instead of account type under User & account
  screen.

- Add handling to move account tiles with specific account type from
  top level account dashboard to inside the corresponding account
  preference.

- Rename settings.accounts.AccountPreference to
  settings.accounts.AccountTypePreference to make it less confused
  with settings.AccountPreference

Bug: 31801423
Test: make RunSettingsRoboTests
Change-Id: Iebe70a3c4230e8d979344f142a5c2a60945e552e
2016-11-29 14:18:30 -08:00
TreeHugger Robot
737ae83a66 Merge changes from topic 'show-deleted-vpn'
* changes:
  VpnSettings PreferenceList tests
  VpnSettings: slightly more robust callback context
  VpnSettings: show connected VPN even if deleted
2016-11-29 10:22:35 +00:00
Tadashi G. Takaoka
5e8b93bc53 Merge "Add initialize helper method to improve readability" 2016-11-29 04:03:54 +00:00
Fan Zhang
8b8218c01b Add test to ensure all future fragments implements logging.
The idea is: if a class is Fragment, it must also implements
Instrumentable.

To make the test possible, I added a structure to load all classes in
current classloader, and filter to only the ones we care about. Then
insepct each class definition using reflection.

Bug: 32952614
Test: make RunSettingsRoboTests
Change-Id: Ifa5e27c41d5ad0e84b6e9e9df81c96e8be2878c5
2016-11-28 16:34:45 -08:00
Shahriyar Amini
3d7f09d7ad Merge "Use preference key specified in injected settings." 2016-11-29 00:17:29 +00:00
Shahriyar Amini
6259129d69 Use preference key specified in injected settings.
Bug: 31002801
Test: make RunSettingsRoboTests

Reads in optional metadata field for specifying the key used for an
injected preference.

Change-Id: Ief2ff10c508d42f91906b531cf34906c1c42fdd4
2016-11-28 14:49:46 -08:00
TreeHugger Robot
01bffd0751 Merge "Update strings." 2016-11-28 22:26:26 +00:00
Fan Zhang
3d9fd0cd73 Update strings.
Bug: 32841662
Test: RunSettingsRoboTests
Change-Id: I178070bfd5f20188e580f8a3a8dd442bd17f3632
2016-11-28 12:48:07 -08:00
Bartosz Fabianowski
2e0b608495 Populate Enterprise Privacy Settings page - batch 2
This CL adds the second batch of items to the Privacy Settings page.

These are all the remaining items that fall into the "What types of
information can your organization see?" category.

Test: make RunSettingsRoboTests
Bug: 32692748
Change-Id: I08569646ed6bb6f5d9d6d65ed2718be8456f50ae
2016-11-28 21:13:30 +01:00
Robin Lee
9c2758f407 VpnSettings PreferenceList tests
For validating that when VPNs are added / removed, the right set of
changes are made to the PreferenceGroup in which they are supposed to
be shown.

Bug: 30998549
Bug: 29093779
Test: runtest -x packages/apps/Settings/tests/unit/src/com/android/settings/vpn2/PreferenceListTest.java
Change-Id: I9394db0e78cc984ab62e3670aa0a7942ae767a66
2016-11-28 17:42:56 +00:00
Tadashi G. Takaoka
b51f6bf869 Add initialize helper method to improve readability
This CL also reduces SearchIndexableResources class about 1kB.

Test: Added Robolectric test. "make RunSettingsRoboTests" passed.
Change-Id: Id7f7676e175db4aba0be23c0c1a3fc12dd6acc2e
2016-11-25 16:21:22 +09:00
TreeHugger Robot
f0c64a3cdb Merge "Fix DPM.ACTION_SET_NEW_PASSWORD" 2016-11-23 23:07:10 +00:00
Tony Mak
8f41b9b665 Fix DPM.ACTION_SET_NEW_PASSWORD
Problem:
SetNewPasswordActivity is the new entrance for
ACTION_SET_NEW_PASSWORD. And it starts ChooseLockGeneric with the
fingerprint extras. ChooseLockGeneric infers which user is starting it
and determine which user is setting password. However, it now always
think that it is current user as it is always SetNewPasswordActivity
in current user starting it.

Solution: Resolve the user id in SetNewPasswordActivity and forward it
to ChooseLockGeneric. SetNewPasswordActivity needs to know the user id
anyway in order to have the fingerprint checking in the correct user id.

Test: 1. make RunSettingsRoboTests
      2. Manual Test
      	a. Start SET_NEW_PASSWORD intent in user 0, set password.
         	User 0 password is set.
      	b. Start SET_NEW_PASSWORD intent in work profile, set password.
         	work profile password is set.
        c. SET_PROFILE_PARENT_NEW_PASSWORD is always setting parent
           password.
        d. If fingerprint is disabled, both intent should not show
           fingerprint option
        e. DO sync auth flow with google.com account, fingerprint option
           is shown.

Change-Id: I2f73d01ab11e91b337beb90c05bbcb857dfd40dc
Fix: 32959373
2016-11-23 11:36:18 +00:00
TreeHugger Robot
424453e621 Merge "Make RemoveUserFragment public." 2016-11-22 19:05:28 +00:00
Fan Zhang
e97c91ec73 Make RemoveUserFragment public.
Fixes: 33034368
Test: make RunSettingsRoboTests
Change-Id: Icbda53c1a5992774fb8bd638f6ab5ad6d4590cfb
2016-11-22 09:26:13 -08:00
Neil Fuller
6096050bb1 Merge "Change EXTRA_TIME_PREF_24_HOUR_FORMAT from boolean to int" 2016-11-22 11:55:28 +00:00
Fan Zhang
beddff82b0 Move date/time prefs to PreferenceController and add tests.
Bug: 32996243
Test: RunSettingsRoboTests
Change-Id: Ie537bbcc35a96a63251e46f84b57c0a861b9d013
2016-11-21 16:42:14 -08:00
Neil Fuller
c0cea814a1 Change EXTRA_TIME_PREF_24_HOUR_FORMAT from boolean to int
To better represent the possible settings values for the
"use 24 hour format" setting : "12", "24", unset (meaning
"use locale default") the platform is being changed.

The EXTRA_TIME_PREF_24_HOUR_FORMAT for the ACTION_TIME_CHANGED
is now an int, not a boolean. 0 means "12", 1 means "24" and
2 means "use locale default".

Bug: 32761619
Test: Manual test on device and make RunSettingsRoboTests
Change-Id: I9aae6f8d12c4724c829f2812626a6193e510dbf9
2016-11-21 13:56:42 +00:00
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