- Refactor the entity header layout to use LinearLayout and add id to
content area
- Remove now unused AppHeader class
- Make entire icon+text area clickable and link to app info page
Refactor the binding logic from bindButton to its own method.
- Remove unused MultiLinePreference
Fix: 62705377
Test: make RunSettingsRoboTests
Change-Id: I6db554695410e71b669f6fdba29d98fedc3364b9
This cl adds a new parameter, mAnomalies, for
AdvancedPowerUsageDetail.
If it is null, fragment will start AnomalyLoader to detect anomaly.
If not null, just display the anomaly.
Bug: 36925180
Test: RunSettingsRoboTests
Change-Id: I572bc5954c1cdb210d18b6dbe1ab9dba25c0a61f
We need to refresh batterystatsHelper in onResume, so we need to
call restartLoader instead of initLoader
Bug: 62237848
Test: RunSettingsRoboTests
Change-Id: I6f7e1b57b945c92d34587ca24db192600e7f797f
OEMs can now force grey out the "disable" button for important apps on
device.
Change-Id: Ic075a07ad12592bd60238c7b1c9ab84932c8db3c
Fix: 38250742
Test: make RunSettingsRoboTests
Before this cl, user could go to "Battery usage" page only if
related app has battery usage. This cl breaks this rule so we
could open "Battery usage" without battery data.
Bug: 38497822
Test: RunSettingsRoboTests
Change-Id: Ic53c33b7dcbac82de58f31cf96e0bd8fa54e53ea
InstalledAppDetails uses AsyncTask to update foreground mBatteryStatsHelper
in background thread, which is dangerous. This cl make
InstalledAppDetails use BatteryStatsLoader to update batteryStatsHelper
and only assign it once in UI thread.
Bug: 38497555
Test: RunSettingsRoboTests
Change-Id: I3078b60a2dae36995ae5f925b4d49e36e79bddfd
- Add a controller to manage add/remove onScrollChangedListener to
recyclerviews.
- When recyclerview on each screen is scrolled to top, set actionbar
elevation to 0, otherwise set it to non-zero.
- When screen is moved to background, detach the listener.
- Use the controller in entity header.
Change-Id: Iecf194d885098c98c392810f62893ae9189f3936
Fix: 37670670
Test: make RunSettingsRoboTests
update layout view IDs, and controller variable names to be more
generic.
Fix: 36734470
Bug: 37669238
Test: make RunSettingsRoboTests
Change-Id: Ib80827ae3eae6d01a600068b4a8a44b239c32511
When we are done uninstalling app updates, invalidate the options menu
so that it will be rebuilt and the correct available menu items will be
shown.
Change-Id: I485fe9ff129ac0b2d75094c3b899bf6553e54c74
Fix: 36407258
Test: make RunSettingsRoboTests
InstalledAppDetails tries to refreshUi whenever something about a
package changes. It does not need to refresh when the changing package
is different from what's being displayed.
Change-Id: Ib45289c39ee402cf8974bf52c881f44d225b8be5
Fix: 37424866
Test: make RunSettingsRoboTests
The link doesn't actually work and uses wrong icon. There is a working
version at the app info screen already.
Change-Id: I16890bd66e095c3185e12d604d8daba5036ab24c
Fix: 37544209
Test: robotests
- Update background color of actionbar
- Remove elevation of actionbar so it appears to be the same entity as
app header.
- Add a shadow below app header view. We can't set elevation on app
header unfortunately because that will add shadow all round the view,
but we only want shadow below it.
- Updated app icon size/text size per to match UI spec.
Change-Id: I63d7fa42b859a008fa662aaf19848cd40529c2ff
Fix: 37207527
Fix: 37079248
Test: visual && make RunSettingsRoboTests
On the app info page, instant apps show only the supported links
dialog rather than Open by default which opens in a secondary page
where the user can control things that aren't relevant to instant
apps.
Test: make RunSettingsRoboTests
Bug: 36497697
Change-Id: If4eba7c11c5490cbda1ef617002121fe108c4085
This cl moves following methods to BatteryUtils:
1. shouldHideSipper
2. removeHiddenBatterySippers
3. calculateBatteryPercent
As a result, we could use these methods in battery page as well
as app info page.
This cl also move bunch of tests to new file and add test for
method calculateBatteryPercent
Bug: 36816681
Test: RunSettingsRoboTests
Change-Id: Ic32700fe9741fbb96363db4af2d4fccb3ee8e317
Changes the text on the app installer details to say
"More info on {App Store Name}".
Test: make RunSettingsRoboTests
Bug: 36512295
Change-Id: I8629f840e9f4e5ce12ba91e9cb9def0db0471162
Now we use AdvancedPowerUsageDetail instead.
This cl also:
1. Remove PowerUsageDetail in SearchIndexableResources since we
don't want to index PowerUsageDetail
2. Add AdvancedPowerUsageDetail in SettingsGateway
Bug: 36992358
Test: Build
Change-Id: I598bb159aa2b5a4889071ae9a17d29554e6afe11
The settings crashes when opening battery usage detail page from
installed app page. Main reason is that it trying to open obsolete
page. This cl directs it to open AdvancedPowerUsageDetail instead.
Following cl will make InstalledAppDetail show calibrated percentage,
which is trakced in b/36816681
Bug: 36792973
Test: RunSettingsRoboTests
Change-Id: Ie63e64e543ed3b28974ffdda8b42c97e7749a0f7
(cherry picked from commit fac713318c)
Adds a confirmation dialog for the user when tapping clear app.
From this dialog the user can either cancel, or confirm they
want to clear the app.
Test: make RunSettingsRoboTests
Bug: 36536695
Change-Id: Idffcf5ef318578ae2e075ea2cbb35323d41acade
Test: Robolectric test to ensure header item is GONE.
Bug: 36512295
Change-Id: I020e90d6521c853e67ae600e5786445a8469a934
(cherry picked from commit 14a258443f)
In the app details, the first letter of the storage type was
capitalized, causing an odd string of "X used in Internal storage."
Change-Id: Ibcac54259403f6d0f39df8fa2d3af10304a46057
Merged-In: I2b4f23ea1799dc1730fdab596e4a87a0cb673c68
Fixes: 36001265
Test: Settings robotest
Bug: 35098444
Test: make RunSettingsRoboTests
This implements the following changes to the app details screen:
-Suppresses the "Uninstall" and "Force Stop" buttons
-Adds "Install app" and "Clear app" buttons
-Adds a mechanism for showing a link to the store's app details
page that can be different from the default for installed apps.
Change-Id: Icea83f7d1fde62d4101cb0c8a6d03849f6c56bca
This cl adds AdvancedPowerUsageDetail to show the usage details page.
The AdvancedPowerUsageDetail contains all the needed ui components:
1. App Header
2. Two buttons
3. Usage breakdown preference category
4. Power management preference category
This cl also adds preference controller for two buttons but the
detail implementation will be added in the following cl.
Following cl will also remove previous detail page.
Bug: 35810915
Test: RunSettingsRoboTests
Change-Id: I17f95d1288762094671c0f148fa73367e51f175e
- Removing switches in top-level picture-in-picture settings, adding
details screen for each app which contains the switch and some
additional information.
Bug: 35957404
Test: make -j40 RunSettingsRoboTests
Change-Id: Ib22df8a52ab857e071ec43dd3e5d1f5282db35cb
- Button clicks in app detail page:
uninstall/disable/clear data/clear cache
- More logging in search:
log inline search result click, and its metadata such as
name/value/rank.
Fix: 32652772
Fix: 32798201
Test: make RunSettingsRoboTests
Change-Id: I90cef7c9ea9ea69ea9cf083013a38417097f8594
- instead of dynamically creating the preferences for the action
buttons, add the actions items to the installed app details xml.
- rename the reference as it is no longer a footer.
Change-Id: I41b99f50bcc4916384555b5d9470ac937ff1d2ac
Fix: 36001501
Test: make RunSettingsRoboTests
- remove DashboardFeatureProvider.isEnabled() and all relating code
and tests.
Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: If7796677abc8904b7436525836d50cdef38e37a4
Added a preference link to manage external sources in the app info
screen just like other special access permissions.
Test: Manually checked that the link appears on apps once their app op
is set to allow or deny.
Also, added some basic robolectric unit tests:
make -j32 RunSettingsRoboTests
Bug: 35481942
Change-Id: If687778b7a64fb7d278508b78d06272253a98e3e
- when there is only 1 user installed the app, also check if it is
installed by the current user or by other user to determine whether or
not to show the uninstall for all button.
Change-Id: I1eecb13a7748c92159cb0626e2b6fe1ed6987d15
Fix: 34760157
Test: make RunSettingsRoboTests
Bug: 35098444
Test: make RunSettingsRoboTests
In the previous design for instant apps, some metadata about the app
such as developer title, maturity rating, etc. was going to be shown
in the app header. In the latest design, we instead are just showing
a little label that says "Instant app".
The two CL's for this topic work together to change this:
frameworks/base : adds code to work around the problem that
robolectric doesn't know about the new isInstantApp method of the
ApplicationInfo class, so we need to avoid calling it during tests.
pacakges/apps/Settings: removes the code that previously displayed
the instant app metadata, and instead just insert the "Instant app"
label.
Change-Id: I2cbc70bf4827c401e862c58ea4ca7f8f9ba1cf58