Use startActivityAsUser instead of startActivity API to start the AppLocalePickerActivity of different users
Bug: 274378136
Test: 1. Perform AppLocalePickerActivityTest robolectric test
2. Perform the manual test by switching different users
3. Perform the manual test by switching different profiles
Change-Id: I0dfc40b29a7a35f18f6bcffd22fb421c6ad9c230
Merged-In: I4405b3b7e832b71b9ef66fa71d9e42ce12da167c
- App usage page only use package name to launch the page, it can not
identify the different userId between normal app and work profile
app, add extra userId info into launch args
- Remove no battery usage state/string if usage time is empty
Bug: 251471047
Test: make SettingsRoboTests
Change-Id: Id06ebb0f0fcd863e423acd7839f89bc0ae2444c1
Merged-In: Id06ebb0f0fcd863e423acd7839f89bc0ae2444c1
To align SearchView x button with right border.
Bug: 254403811
Test: manual,
Settings > Apps > See all apps > tap the search icon >
input something and observe.
Change-Id: I5146c9ffb3c5177926e75f673497408092f6c065
Fix not seeing apps with the LocaleConfig in the app language selector of Settings.
Bug: 239054437
Test: Manual
Change-Id: I4db78300b63e6fda2890383c097bb46102084d95
Also auto fix some lint issues.
Bug: 243337537
Test: Manual
Change-Id: I55a393517ae01d6a8c17106a3e7750323838cebb
(cherry picked from commit 67599bce4e)
Merged-In: I55a393517ae01d6a8c17106a3e7750323838cebb
Moving the old restricted page to the new optimization page will happen
in a follow-up CL.
Test: Unit, manual
Bug: 238026672
Change-Id: I5fee9ebe03284a013da6bfca9ada8b166c6af91c
(cherry picked from commit 5ecb1a1d69)
Merged-In: I5fee9ebe03284a013da6bfca9ada8b166c6af91c
When DISALLOW_APPS_CONTROL restriction is enabled, users should not be
able to enable/disable apps, clear app caches and clear app data.
The function of reset app preferences will re-enable the disabled apps,
it can let users bypass DISALLOW_APPS_CONTROL to enable an app disabled
by IT admin to see sensitive information.
To fix this vulnerability, we add a check for DISALLOW_APPS_CONTROL
restriction before users reset app preferences. Once the restriction is
enabled, it will show dialog “Blocked by your IT admin” instead.
Bug: 238745070
Test: Verify change by turning on/off DISALLOW_APPS_CONTROL with TestDPC.
Change-Id: Iffee73cf4952b686a78b4c7aaa54747971337d03
(cherry picked from commit 4356c9c653)
Currently Kotlin files cannot build with library app-compat-annotations.
Only one @ChangeId need this library, create separate build target
library Settings-change-ids to solve this issue.
After this cl, Kotlin could be used for Settings App.
Fix: 229037247
Test: make Settings
Change-Id: I4a0d99425c9e6cc2cbc015d2561daa68609ca0fd
This reverts commit d9453bf8c6.
Reason for revert: This introduces a new flicker which doesn't seem good. Will have another solution once all things are ready.
Fixes: 232355879
Change-Id: I0bbc4561ce4fbef36d59de15ae98705a6d81574c
- show a message for app selection of user to avoid any confusion of
searching app.
Bug: b/230689178
Test: see b/230689178
Change-Id: I597e718b81bd7a5019c69dbdfc02f26d7f3af5fd
Some pages that extend ManageApplications always display a loading
spinner when entering them. This is caused by that it takes over
100 ms to load all apps and to sort the apps. In addition, the task of
loading all apps might be invoked twice, which caused loading time
increasing.
This CL is to make sure the task of loading all apps execute only once
in those pages that extend ManageApplications.
Bug: 222985623
Test: manual test
Change-Id: I3b15bf2eee2a4c220f42da39a29f0014cc620898
Save the query string before configuration changed and set the previous
query string upon the re-create.
Fixes: 204158119
Test: robotest
Change-Id: I48b2a4b272873665a653d2ebc4c02bb99d4b0d0d
This is a global setting that is not per-user, so adjusting it accordingly.
Bug: 225373531
Test: manual
Change-Id: I100cd53a5ffef6ce5f9a01e6add9465a00ceaeb5
This notification is an introduction to new notification permission changes in T and is shown to the user upon upgrade; this change records that the user has seen/interacted with the notification already so we don't have to keep showing it.
This change essentially makes a copy of the existing functionality of NotificationAppListActivity, but meant only for access internally (so that neither the activity nor the associated action is exported/publicly accessible).
Bug: 225373531
Test: manual with the change that sends the notification
Change-Id: I20c6084652ea11a8d0a002a21561fe50b9cf5de3
The root cause is that the context corresponding to the specified
profile Id is not correctly used when using LocaleManager to query the
app language.
Bug: 222769707
Test: Verify the issue by using the steps provided in the bug
Change-Id: Ic1f9e4cc9e90f5aecfa5e1094184aa63f3d94ffb
- Create a Activity to contain AppLocaleDetail and
LocalePickerWithRegion
- Update the Entry from apps language page
Bug: 223089715
Test: local test pass
Change-Id: Id01e93f3df32412c7323ca577a149009eb1862ad
Merged-In: Id01e93f3df32412c7323ca577a149009eb1862ad
mApplications may be null and should check if it's null before accessing.
Bug: 217872983
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=ManageApplicationsTest
Change-Id: I97a26e26478eb239370cdef8c44342cd7aeb71ee
- Avoid loading all app icons at once to decrease memory usage.
- Only load visible icons when entering the apps page.
- Reserve icon placeholder to alleviate icon loading flicker.
- Release icon cache when low memory or leaving apps page.
Bug: 187118427
Bug: 209898662
Test: manual check the smoothness and memory usage of apps pages.
Change-Id: Ifc3c2a73cc88d6e42739df4e8208445afa12e0ea
- Settings -> System -> app language -> app languages
Use this filter to only show apps allowed to change the locale.
- Settings -> Apps -> all apps -> any one of app -> language
Use this filter to only show the language preference of app allowed to change the locale.
Bug: 210935436
Test: atest pass.
Test: local test.
Change-Id: I2f8a0815dae68392e11882ad9e1e4945492efdba
- Path 1 : System -> Language & Input -> App Languages -> per app
language
- path 2 : System -> Apps -> App Info -> per app language
Video: https://screencast.googleplex.com/cast/NjUyNTUzMDY0MTc5MzAyNHxjNTg2MzMwYS0yOA
Bug: 206854105
Test: local test pass
Test: atest pass
Change-Id: Ic06fa4f0c6ec68680eb828032b6e3f479b412dc4
The wrong background color of CollapsingToolbarLayout appears in some
pages like "All apps" page or "Password and accounts" page. This symptom
can be observed in these pages when the work profile is enabled and the
line count of title is 1.
This issue is caused by updating the title of the page many times. In
these pages that have the tab view, the structure of the page differs
from a general setting page. The title of the page is coming from
BaseActivity, ProfileSelectFragment, PersonalFragment and WorkFragment,
in which the page that has the issue has an empty string from
ProfileSelectFragment. That is causing the CollapsingTollbarLayout has
the different line count during the process of setting the title.
Since the pages that have the tab view are different from the general
pages in Settings, the title should be set separately for those pages.
Adding a method to get the title resource ID so the page extending from
ProfileSelectFragment can set its title.
Bug: 192914660
Test: visual test and manual test
1) Enable work profile
2) Navigate to All apps page
3) The page should have the correct background color in the
CollapsingToolbarLayout
Change-Id: I52ef9729f3cad56161ea3d87ba25429dfcdb26ef
So that you can change between filters that
have the same sort order.
Test: robotests, manually switch between notifications (off) to
notifications (all)
Fixes: 169943424
Change-Id: I62bbe90f30abada2ec342487a1fa420e451b3caf
Fixes below UI issues
- "No Apps" may not show in fragments of profile tab.
Fix it by using ConstraintLayout to specify alignments
of each view and removing extra padding.
-- "No Apps" may flicker by moving position.
The flicker is from unnecessary visibility changes.
This change integrates empty view visibility
control in LoadingViewController to simplify code
and avoid unnecessary visibility changes.
Bug: 189390795
Bug: 183398721
Test: atest com.android.settings.deviceinfo
make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo
Manual visual, observe UI
Settings -> Storage -> Games
Settings -> Notifications -> App Settings
Settings > Apps > Special app access > Media management apps
Change-Id: I634209c6f8466e2adae703226902190bbdf470b9
This reverts commit 4a97095e36.
Reason for revert: <It has abnormal scroll behavior when there is no profile tab>
Bug: 191945032
Bug: 191944934
Change-Id: Id6c71fbec4f490034bc07f6d8c9efabcb877d110
Fixes below UI issues
- "No Apps" may not show in fragments of profile tab.
Fix it by using ConstraintLayout to specify alignments
of each view and removing extra padding.
-- "No Apps" may flicker by moving position.
The flicker is from unnecessary visibility changes.
This change integrates empty view visibility
control in LoadingViewController to simplify code
and avoid unnecessary visibility changes.
Bug: 189390795
Bug: 183398721
Test: atest com.android.settings.deviceinfo
make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo
Manual visual, observe UI
Settings -> Storage -> Games
Settings -> Notifications -> App Settings
Settings > Apps > Special app access > Media management apps
Change-Id: I9a2500f2fd1dd073ab88f26187541964719523d0
Prior to this cl, user can see a large space on app bar
while user is doing search on app bar.
In this cl, we enforce to collapse the tool bar in
search case, and we don't allow user can scroll app bar as well.
Fix: 187016306
Test: Play around the search behavior in app page.
Change-Id: I25ba3ef24949cc43989fec4a80f75a24a8d92c07
Based on the Android S design, left aligned the dropdown list of
ManageApplications, e.g., All apps, App notifications
Bug: 178774987
Test: visual
Change-Id: I04143798475d20319980396d6bd755193ae2b1f0
- Turn on the collapsing toolbar by default.
- Remove the silky flag from All apps page.
- Ignore tests of ChooseLockGenericTest and trace it on b/179136903.
- Remove silky flag.
Fixes: 183670633
Bug: 179136903
Test: robotests & visual
Change-Id: Iee2a9e7ccaebd1624f995af4fd45446142e5f500
In the original design, we only set title description for
view holder, this is wrong. It causes talkback can't
speak subtext info.
Currently, we set the title content description in the title
view directly, so talkback can say the title and subtext now
when talkback focus on an app view.
Test: Talkback speaks full information for an app entry
Fix: 177873163
Change-Id: I94996d596a85cc2813ed1b10cdd4ed2bee62f4a9
There is AOSP built in file browser for image/video/audio
file category, this change cleanup APP based category
for image/video/audio.
Bug: 183078080
Test: atest com.android.settings.deviceinfo
atest com.android.settings.deviceinfo.storage
make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo
make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo.storage
Change-Id: I925fc9296b8c2df5bd793668f66a12beb7744469
There is AOSP built in file browser for image/video/audio
file category, all APPs except games should be included in
Apps category.
- Shows image/video/audio APPs in APPs category.
- Count Image/Video/Audio APPs storage size to Apps storage size.
- Remove APP size & cache size for Images/Videos/Audios category.
Bug: 170918505
Test: atest StorageAsyncLoaderTest.java
Change-Id: I07e0a3a66a13f36b9e0cbde289d8ba90df4ae295
Also update the title of App info entry on Apps page when there is no
recently opened apps.
Bug: 178774987
Test: robotests & visual
Change-Id: I1cd7ffc1a34c9fa65c93d9507bc45dfedc78f549
Add a settings page to control the permission MANAGE_MEDIA in Special
App Access. Apps can launch it by ACTION_REQUEST_MANAGE_MEDIA.
Test: m -j RunSettingsRoboTests ROBOTEST_FILTER=MediaManagementAppsDetailsTest
Test: m -j RunSettingsRoboTests
Test: manual
Bug: 181112025
Change-Id: Id7587cf179b8c5adbfd6477ca9c2d4a20a9852bb
Adding a settings screen to control the permission SCHEDULE_EXACT_ALARM.
Apps can start this by starting a newly introduced API intent
REQUEST_SCHEDULE_EXACT_ALARM.
Test: make -j RunSettingsRoboTests
Manually by UI inspection:
Settings -> Apps -> Special App access -> Alarms and Reminders
or by running:
adb shell am start -a android.settings.REQUEST_SCHEDULE_EXACT_ALARM
Bug: 171306433
Bug: 171305516
Change-Id: I1293d38fc50a22b2af46f80ab24f676ed632f964
When the collapsing toolbar is applied in the Settings app, some pages
they used manage_applications_apps will have the collapsing toolbar not
work properly. This was caused by using multiple CoordinatorLayout and
AppBarLayout in these pages.
Bug: 177375909
Test: visual verified
Change-Id: Ibfeeab9cf907a23d18ee1ec2c450c523316cfc92
On Android S, the help menu will be removed from the toolbar in all
setting pages. This is using a feature flag to turn on/off the help
menu. Then, it should be entirely removed when the collapsing toolbar
feature rolled out.
Bug: 177274632
Test: visual verified
Change-Id: I5aceb9f0a99ecee948272ee584bbebdcce7b7943
Root cause:
RequestIgnoreBatteryOptimizations adds package in
PowerWhitelistManager#addToWhitelist for intent
Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS.
Settings UI uses PowerAllowlistBackend to check if
an APP is in power allow list. Each UI component should
PowerAllowlistBackend#refreshList() or UI will get
a stale result.
Solution:
This change fixes below display problems by refreshing
allow list from DeviceIdleController service.
1. Battery optimization summary in Battery usage details.
2. Battery optimization list.
BYPASS_INCLUSIVE_LANGUAGE_REASON=I need the object name
to describe the root cause.
Bug: 171064162
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BatteryOptimizationPreferenceControllerTest
manual
Switch battery optimazion of a APP and observer the UI display.
Change-Id: I75b269eec5d1b904dcaa71948798f169d4e4ddfa