Add the initial version for the User & accounts category and set the
tile's intent if it contains metadata but fragment is null.
Test: RunSettingsRoboTests
Bug: 31801423
Change-Id: Ic63bf8aeaf47f68a184af73c9a8a72b89b597a17
In the previous version, when there is a minor change in data, we
will refresh the whole screen(and data) by invoking "recountItems"
and "notifyDataSetChanged", which did lots of unnecessary works.
In this new cl, I elicit ItemsData class, which encapsulates the list
data used in adapter. When data changed, I build another ItemsData and
use the DiffUtil.Callback to calculate diffs between ItemsDatas. In
this way we can only refresh the items that changed in adapter.
Since I cannot find usage of see_all.xml anymore, I delete the relevant
code as well as the resource files.
Bug: 30319913
Test: make RunSettingsRoboTests
Change-Id: I4f753a26f624affea6c6c35d49cfb9c43fb74fe6
Make the fingerprint enroll progress bar scalable by moving it to a
single FingerprintProgressBar view and make it fill the remaining
space.
- The background fingerprint icon was changed to include the padding
internally so it can be added as the background directly onto the
progress bar view.
- The icon in landscape mode is also fixed to use the fingerprint
icon rather than the lock icon.
Test: cd tests/robotests && mm
Bug: 32123370
Change-Id: Ia5cf37d92f0af7c1cf39287f5070c44f51d44878
Instead of removing and re-adding all dashboard tiles, figure out a diff
and rebind/add/remove as necessary.
Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I9d87ba30ab746257d0ea71282951348ebc4e8965
This makes ProgressiveDisclosureMixin the authority for adding/removing
preferences so caller doesn't need to figure out if a preference is on
screen or collapsed.
Bug: 32255863
Test: make RunSettingsRoboTests -j40
Change-Id: I9bd69661b78efd4bb4913665f6ea09f6bdc231f5
The old logic could read the current IP address only when the network has the
Internet access.
Bug: 31934577
Test: Manual inspection
Test: make RunSettingsRoboTests -j40
Change-Id: I46fe6f6fb4322e8245d3ac66ac6530228c226d16
- Add a ProgressiveDisclosureMixin that contains all logic for collapse
preference list when it's too long
- Refactored PreferenceController's updateState to take a preference
instead of PreferenceScreen, because with progressive disclosure the
preference can either be in screen or the mixin. DashboardFragment is
responsible finding the preference before passing it to controller.
Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I6713abd61c954ce12732902e5b3ca4d4c0b1563e
Now if you select "stay awake" in Developer options, the screen
will keep on when wireless charging.
Bug:31696030
Test: make SettingsTests
Change-Id: If88bf559519c19654822c70d7684be583d907e00
Refactored getLocaleNames() into a FeatureProvider interface so it's
reusable and testable.
Bug: 31801428
Test: RunSettingsRoboTests
Change-Id: I2d31a66a4b32cfa7a364a4cfef1f6eea87084577
- To support Mobile plan preference controller, extended
LifecycleObserver pattern to also observe onCreate and onSaveInstance.
Bug: 31799836
Test: RunSettingsRoboTests
Change-Id: Ie98db7efa91f0a8b4c8a06a784d3351237e59fe0
Add the initial version for the connected devices category.
Test: RunSettingsRoboTests
Bug: 31800290
Change-Id: Ibacef7d5ceaae5e71ff5e5b1c35dafa7738e4f75
- Added a activity-alias pointing to displaySettings as top level
setting item.
- Refactored all preference logic in DisplaySettings into
PreferenceControllers. During fragment onAttach it installs all
controllers, and during onResume it updates preference state. Each
controller listens to its own preference change event.
Bug: 31800242
Test: RunSettingsRoboTests
Change-Id: Ibc9bf200c5acce7c4ae9292340822afee27a3a28
- Make a SummaryConsumer interface. Things that needs latest summary
should implement this interface (DashboardAdapter for homepage,
DashboardFragment for subsettings). This also decouples SummaryLoader
from relying on SettingsDrawerActivity.
- Make DashboardFeatureProvider more generic to load DashboardCategory
by key.
Bug: 31781480
Test: RunSettingsRoboTests
Change-Id: I9c65456fb433a74c352498251e0ccf65da0be1f0
Merged refreshAllPreferences into DashboardFragment. This hopefully
makes it more modular to manage preference display logic in each
dashboardFragment, and makes it more efficient to monitor category
changes.
Now subclasses needs to implement 2 methods:
- displayResourceTiles(): for 'static' preferences from xml
- getDashboardTiles(): returns a list of dashboard tiles and superclass
will wire it up to preference screen.
If getDashboardTiles() return null (aka no dashboardCategory available),
the fragment will not attempt to monitor category change. The edge case
is that if a package starts to provide a tile for this category, we will
not be notified. I have not seen this case coming up. If we indeed need
to handle this case, the category listener needs to have a way to
monitor specific category rather than globally.
Bug: 31781480
Test: make RunSettingsRoboTests -j40
Change-Id: Ia9f9541b95816214df0d0bb27e3e41078c36c5ca
Also added a FakeFeatureFactory to make it easier to mock different
FeatureProviders.
Bug: 31781480
Test: make RunSettingsRoboTests
Change-Id: Ie45db601e0bec951d7ef983ec2e3ca747ec1c3af
In order to move the preference and its logic cleanly, created a
controller object that encapsulates the preference/click handler.
Bug: 31801428
Test: RunSettingsRoboTests
Change-Id: I332384e20fbf0e21d2f3becb531d97b20f7f7ef1
- Use activity-alias to define which activity shows up in what category.
We choose activity-alias because it creates a reference to UI we need
without having to define a new set of intent-filter and/or category
keys. This reduces maintainence in the long run. We should merge
metadata from activity-alias into targetActivity when cleaning up.
- Created new System dashboard activity that hosts all system category
tiles dynamically, and a static tile for checking system update.
Bug: 31781480
Test: manual
Test: make RunSettingsRoboTests -j40
Change-Id: Ia2d762e3e1aebd17423a395c5e6c286dc3326492
To avoid BadParcelableException when reload the activity after it
is killed by OS.
Bug: 31707097
Test: make SettingsTests && adb install -r \
${OUT}/data/app/SettingsTests/SettingsTests.apk && \
adb shell am instrument -w \
'com.android.settings.tests/android.support.test.runner.AndroidJUnitRunner'
Change-Id: Ic8f20d9e2d236f0bea96071a88fbc6e7ba856f54
1) Added a trampoline activity to display SET_NEW_PASSWORD intent.
2) On devices that have fingerprint sensor and have no enrolled fingerprint,
ChooseLockGeneric handles the SET_NEW_PASSWORD intent by providing
fingerprint + {PIN/PATTERN/PASSWORD} and skip fingerprint options.
Test: See below
1) Auto
make RunSettingsRoboTests
2) Manual
a) Fingerprint + pattern
i) $ adb shell am start -a android.app.action.SET_NEW_PASSWORD
ii) Click Pixel Imprint + Pattern.
iii) Set a pattern lock.
iv) Can enroll a fingerprint.
b) Pattern
i) $ adb shell am start -a android.app.action.SET_NEW_PASSWORD
ii) Click Continue without Pixel Imprint
iii) A list of unlock options, without fingerprint option, is shown.
vi) Select and enroll a pattern lock
c) Has an existing password
i) $ adb shell am start -a android.app.action.SET_NEW_PASSWORD
ii) Setting app asks for password input.
iii) Enter password and click "Continue without Pixel imprint".
vi) No password is asked. A list of unlock options, without fingerprint option, is shown.
v) Select and enroll a pattern lock
d) Work profile
i) Create a work profile
ii) adb shell am start --user x -a android.app.action.SET_NEW_PASSWORD. X is the work profile user id.
iii) Click Pixel Imprint + Pattern.
iv) Set a pattern lock.
v) Can enroll a fingerprint.
Bug: 23017051
Change-Id: I6384bbffb72a5d3a83972da7474532746e4d06b9
When preference screen is created all prefence goes through
SharedPreferenceLogger once. We don't want to log it as preference
change because it's just initial display. Subsequent preference logger
calls should result in logging.
Bug: 30914916
Test: make RunSettingsRoboTests
Change-Id: Icaee9137c55555f4db7839ff0381a13ccd420190
1. Reverting the changes for Display->Ambient Display; this setting
will control incoming notification pulse.
2. Added 2 separate entries in gestures settings to control pick up
and double tap gestures-triggered pulsing for Ambient Display.
3. Added automated tests to verify the preference initializes to the
correct default value, and also verify that toggling the preference
updates the corresponding settings correctly.
Test: make SettingsTests
Bug: 30595437
Change-Id: I125bf75fc4ccfea126a00ffae4207fcb789f487a
Bug: 31664539
Test: make RunSettingsRoboTests
This allows different metric clients to listen to these events.
Change-Id: Ib19c8099b16ff78d9aa4901278e0ff33eeefd4a8