Previously, relative times were formatted using formatElapsedTime()
(appending translations of "ago" to them), sometimes resulting in
grammatically hard-to-understand or unnatural localizations. Now we
use ICU's RelativeDateTimeFormatter, which uses grammatically correct
and natural localizations from CLDR data.
Bug: 64507689
Bug: 64605781
Bug: 64556849
Bug: 64550172
Test: make -j RunSettingsRoboTests
Change-Id: Ia2d098b190ab99e7748ef6f03b919f5c6174ba7d
Reusing the 'Background activity' switch found in App Info. The switch
now needs to be shown for all apps and will toggle another app op
RUN_ANY_IN_BACKGROUND which controls whether jobs or alarms are run for
background apps.
Also fixed handling of multiple packages with shared uid. The controller
was picking the first package for uid but the order of packages can
change on a reboot which would cause wrong app ops settings across
packages of the same uid.
Test: make -j32 RunSettingsRoboTests
Bug: 65176793
Change-Id: I2a9b96bc02730776172c3ae317cb7f7f890bec30
The bug report was that the cursor is set to the beginning of the
EditText for wifi hotspot password field, instead of at the end (or
having the entire field selected). This fix makes it so that all
ValidatedEditTextPreference's will put the cursor at the end of the
EditText.
Bug: 65413206
Test: make RunSettingsRoboTests
Change-Id: I23f3bb1b3f1b49b2f193c0ae2e103eae5c1a1019
- Create a new activity/fragment and add it to manifest
- Mark old activity/fragment deprecated
- Enable/disable the new activity based on FeatureFlag
- Initial skeleton code for new fragment
Bug: 65522852
Test: make RunSettingsRoboTests -j40 ROBOTEST_FILTER=DevelopmentSettingsDashboardFragmentTest
Change-Id: Ib1395693f8b6f61d4726573a9ea841ea53cf207b
Adds pencil icon to Wifi Detail action bar to modify the network.
Modifies package/public visibility to allow the detail package to
use the WifiDialog. Listens for changes in WifiConfigurations to
propagate changes to the UI in WifiNetworkDetailsFragment.
Changes WifiNetworkDetail preference launch to conform to pattern
of other Settings apps. Removes unused WifiDetailActionBarObserver.
Bug: 36483704, 37082355
Test: make -j40 RunSettingsRoboTests
Change-Id: Ie9dc1892eaefdfad4a6bd7040bfc5dbf6236cfb4
So that EncryptionInterstitial is shown as part of the flow
Test: cd tests/robotests && mma
Bug: 65192141
Change-Id: I13e8b9059aae39cef2a8509f9f0eee1cd0808220
In AssisGestureSettingsTest, FakeFeatureFactory was used but was
missing a setupForTest call.
Test: cd tests/robotests && \
ROBOTEST_FILTER=AssistGestureSettingsTest mma
Change-Id: Ie78232d854aee00c7969a3d2dc148354be7de484
So that EncryptionInterstitial is shown as part of the flow
Test: cd tests/robotests && mma
Bug: 65192141
Change-Id: I13e8b9059aae39cef2a8509f9f0eee1cd0808220
When the automatic storage manager is off (or has never been run), we
display a block of text that explains what it does. In order to make
this testable, I've implemented the feature in a PreferenceController
and upgraded the existing AutomaticStorageManagerSettings class to be
closer to the newer Settings IA.
Change-Id: I3f7d20347a6d5a7bae8bffcd2014c3fdcd315b90
Fixes: 63082545
Test: Settings Robotest
If an admin has set the DISALLOW_FACTORY_RESET user restriction, OEM
unlock is also restricted. If this is the case, it should be explained
to the user that the admin is preventing the OEM unlock.
DISALLOW_OEM_UNLOCK is deprecated and now managed by OemLockManager.
This restriction is also one set by the carrier, not an admin.
Test: RunSettingsRoboTests
Test: CTS verifier test from the bug
Bug: 65124732
Change-Id: I8bde87a522742a7cbda006eee17c2a19797b1835
(cherry picked from commit 0aa45bed65)
If an admin has set the DISALLOW_FACTORY_RESET user restriction, OEM
unlock is also restricted. If this is the case, it should be explained
to the user that the admin is preventing the OEM unlock.
DISALLOW_OEM_UNLOCK is deprecated and now managed by OemLockManager.
This restriction is also one set by the carrier, not an admin.
Test: RunSettingsRoboTests
Test: CTS verifier test from the bug
Bug: 65124732
Change-Id: I8bde87a522742a7cbda006eee17c2a19797b1835
The first step in refactoring the god class,
DatabaseIndexingManager.
The class has one major entry point: indexDatabase
which begins a chain of calls that first collects all the
data from the fragments, and then massages that data into
the SQLite database. Unfortunately, most of the methods
do not return data, and just pass along some mutated
form of the data until it can be insterted.
Reading and testing this class is very difficult.
This first step moves the collection of the indexable data
into a new class which has a few benefits:
- The data can be easily mocked in tests
- Reduces complexity of D.I.M.
- Separates data collection from indexing, which allows the
indexable data to be piped into a new API that unbundled
search can consume.
Bug:33577327
Test: make RunSettingsRoboTests
Test: Grabbed a DB dump before change, compared to DB dump after change
to make sure everything is still indexed.
Change-Id: Ibc91e3d75ff5dcf5274b93b29bf3544f90b2194d
- Title set if defined in the Bundle returned by summaryUri's content
provider.
- summaryUri invoked inline with onBindView call
bug: 62713030
Test: Manually tested, verified that title and summary are retrieved
when settings app is resumed
Change-Id: Id82531eec5ec11ec3492f033fb34ec65a5437a48
- Title set if defined in the Bundle returned by summaryUri's content
provider.
- summaryUri invoked inline with onBindView call
bug: 62713030
Test: Manually tested, verified that title and summary are retrieved
when settings app is resumed
Change-Id: Id82531eec5ec11ec3492f033fb34ec65a5437a48
In battery settings, the system item contains many packages. In old
behaviour it will use the first package(which has legal name and icon)
to represent this item. This behaviour is not consistent.
In this cl, we always use package "android" to extract name and icon
if it is system item.
Bug: 65090883
Test: RunSettingsRoboTests
Change-Id: Ibb7f85c06ab1745867f1eaa666cea32c8d3295a6