Commit Graph

170 Commits

Author SHA1 Message Date
Daniel Nishi
31027dae93 Add a music apps view to the Storage Settings.
When you tap the Music & Audio preference, it takes you a
hybridized applications view. In this view, there also is
a line item which defines the amount of storage used by
audio files on the device. Using the new storage query, we
can add this information very quickly to the view.

Bug: 33199077
Test: Settings robo tests
Change-Id: If51cba0b3de20805543a39049367eb13613081e7
2017-01-25 11:56:02 -08:00
Daniel Nishi
c208eff2f8 Hook up the Games storage category preference to a games view.
This patch adds functionality for the soon-to-be-deprecated games
and the new app categorization.

Bug: 33199077
Test: settings robo
Change-Id: Iae055c6f1b4d1af3f51aba9897c140ae7aac41c9
2017-01-24 09:43:58 -08:00
Suprabh Shukla
57d92315a4 Adding Manage External Sources Settings
Added a settings fragment to manage external sources. It lists all
applications that have either requested REQUEST_INSTALL_PACKAGES or have
their app op changed from default.

Test: Will include in follow-up CL. Tracked in b/33792674

Bug: 31002700
Change-Id: Ibd2a1922be214b62aec4eefa45f7b9691256b205
2017-01-18 21:00:30 -08:00
Bartosz Fabianowski
13f569ebd6 Add number of enterprise-installed apps to Privacy Settings page
This CL adds information about the number of apps that were installed
by the admin to the Enterprise Privacy Settings page.

Test: make RunSettingsRoboTests
Bug: 32692748

Change-Id: Ib710a1249db6d285da962122fd3dfb35a43752a1
2017-01-13 22:20:51 +01:00
Daniel Nishi
b3d4de2ab7 Remove the app header from ManageApplications when used for storage.
This UI element is no longer in the mocks. It complicated the
implementation of the fragment because it was causing the wrong
apps to be selected on-tap.

This specific StorageUseActivity usage only happens when coming
from the Storage Settings UI, so we can freely remove it without
harming other uses of ManageApplications.

Bug: 34195303
Test: Manual -- it seemed a bit silly to add a test to ensure that
      a broken UI element was indeed missing.

Change-Id: I5396364c297026a33b54d1794d9ad2c5102f0d7f
2017-01-10 13:54:32 -08:00
Julia Reynolds
d6835a20fc Support showing notifications as badges.
And remove unneeded app level settings.

Change-Id: I88f506b0704195181d1748a3135f8ee0f39b774f
Test: manual for now. will add tests when have real mocks for the pages
2016-12-20 13:07:04 -05:00
Jaewoong Jung
b680966748 Merge "Makes app settings keep scroll position after unistalling apps." 2016-12-08 04:31:14 +00:00
Fan Zhang
2d0b344736 Add InstrumentFragment for non-PreferenceFragment types.
This allows app fragment use a less heavyweight fragment as super class
if they don't need PreferenceFragment. Using this class as base is
generally easier to set up robolectric tests too.

Bug: 33354536
Test: RunSettingsRoboTests
Change-Id: I91c4d242ea0333c76c8767c03c3f18dee6b6e104
2016-12-05 17:13:33 -08:00
Jaewoong Jung
a2674f7308 Makes app settings keep scroll position after unistalling apps.
Bug: 32195844
Test: Manual inspection after numerous tries to write one. Espresso
didn't work because the test scenario involves installing an app.
Robolectric didn't either because it doesn't fully emulate
ListView's scroll behavior.

Change-Id: Ia811198ddee6edf6d207a4e936d2e686b64bf02f
2016-11-30 13:59:00 -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
Lei Yu
59f36994ba Merge "Remove hardcode for textcolor in spinner item." 2016-11-14 19:07:49 +00:00
jackqdyulei
0a209093d1 Remove hardcode for textcolor in spinner item.
Remove the "android:textcolor" because "Android:textAppearance"
will set the textcolor to "?attr/textColorPrimary".
Set adapter has same theme as spinner, so view inside adapter
can be inflatered correctly.

Bug: 32592245
Test: screenshot
Change-Id: If7a78ede0a029aa9fcd8f9b324a423d477c65ad7
2016-11-09 17:57:00 -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
fdb833873a Use new app header in more screens.
- This covers app data usage settings, power usage details
- Addded helper method on AppHeaderController to build the header as
  Preference because every fragment needs to do this anyway.

Bug: 32442716
Test: RunSettingsRoboTests

Change-Id: I6d38321b867154f8fb5194b993d118bcdbbfedc9
2016-10-28 17:16:39 -07:00
Fan Zhang
606c74404b Hide gear icon in actionbar if new IA is enabled.
- The page that gear icon opens is moved to other places in new IA.

Bug: 31799948
Test: manual
Change-Id: I637d725425109d364951ac1c7515cc8bcd061cc5
2016-10-26 15:55:53 -07:00
Fan Zhang
4136d902bf Add app default UI to App & Notifications.
Bug: 31799948
Test: RunSettingsRoboTests
Change-Id: Icca4954f82af38316cc232b8879c0f7e7869ecb3
2016-10-21 19:59:24 -07:00
jackqdyulei
32b01bffdd Add "FILTER_NOT_HIDE" for all app filters. am: d785a8db78 am: 00ed827516
am: 15c14f0cc2

Change-Id: I2322d0d3e496013cfb02444b2224fab1eecb47b9
2016-10-07 15:02:47 +00:00
jackqdyulei
d785a8db78 Add "FILTER_NOT_HIDE" for all app filters.
The "FILTER_NOT_HIDE" is used to filter out apps that "blacklisted"
by the carrier. So when user insert a specific sim card, these apps
are hiden in settings > apps unless user enable them.

Bug: 31823872
Test: Manual
Change-Id: I28a38b5780cb63fe22af12d80cc24e965b2b83cf
2016-10-03 15:14:12 -07:00
Andreas Gampe
ada98fb5b3 resolve merge conflicts of d30af7c to master
Change-Id: I3484e0e6c2a092f05539af569a9d9131f006ecf1
2016-08-30 20:36:50 -07:00
Todd Kennedy
d5824967ee Implement Web Action settings
Users can enable / disable Web Action from "Opening links" under
the apps setting.

Bug: 28140107
Change-Id: I4ed4b77953952a56316b780a54a482d0c564cbe4
Test: manual testing of the settings app
2016-08-25 12:56:37 -07:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Jason Monk
8a5d4bfbb8 Fix apps spinner jank.
Change-Id: I7fbe580627538037fd0f1823787f7dcebbb43252
Fixes: 29056706
2016-06-01 12:57:05 -04:00
Jason Monk
290ca6ec5c Don't use ApplicationsState for summaries
Since it grabs a lock that can be slow on the main thread, don't use
ApplicationsState in any of the summaries, instead load the information
directly from the PM.

Change-Id: Ibefe867810d2a9926177a8de4e23a7faea4b1c3b
Fixes: 28435146
2016-05-20 09:37:53 -04:00
Yohei Yukawa
1ef9c4afd5 Follow class package change: LocaleList
In order to avoid layering violation, LocaleList needs to be moved from
android.util package to android.os package [1].  This CL follows up that
package change.

No behavior change is intended.

 [1]: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18

Bug: 28819696
Change-Id: Ibd7934b30062046830d63f33d1c6febef32da976
2016-05-17 16:25:39 -07:00
Fan Zhang
016f875ae7 Fix crash when rotating screen in a few screens.
Bug: 26946312

Fixed in the following screens:
Apps > Gear > Special Access > Modify system settings
Apps > Gear > Special Access > Draw over other apps
Apps > Gear > Special Access > Apps with usage access
Language & input > Personal dictionary
Wireless & networks (More) > Android Beam

Change-Id: I0b9bd6c19f710302625dd87989e9d4ce3c96a9a2
2016-05-09 17:56:06 +00:00
Jason Monk
4e8d3013a2 Fix leaks
Change-Id: Iba29be756934d9564cfdee1f6281c56345772dc7
Fixes: 28074995
2016-05-03 15:24:05 -04:00
Keith Cheung
2db5eccee4 Include work app in battery optimization settings
Fix: 23684151

Change-Id: If2d1a18838414122d8af57fda7138f87fd3f1e62
2016-04-21 14:45:37 +01:00
Jason Monk
f8b2180b96 Settings dashboard performance work
- Don't block main thread with rebuild work
 - Don't run rebuild as foreground priority
 - Don't use comparator on apps/notifications summaries, we don't
   care about order
 - Simplify dashboard item layout

Change-Id: I33bdd06a234ea308b44b45cac5ed1e9eac1c7d43
Fixes: 26541310
2016-04-12 10:32:20 -04:00
Suprabh Shukla
1d464b9677 Merge "Moving HelpUtils to SettingsLib" into nyc-dev 2016-04-08 19:31:37 +00:00
Suprabh Shukla
b84720c075 Moving HelpUtils to SettingsLib
Moved HelpUtils to SettingsLib in frameworks/base so it can be shared by
packageinstaller as well.

Bug: b/22096093
Change-Id: I8d620abcde8279a3b4d11bbcff8ae9b6f46a1895
2016-04-05 14:37:33 -07:00
Julia Reynolds
1e91f9f30e Show fewer filters on notifications page.
Bug: 27834480
Change-Id: Ibdc9924a7ea1b1db7be089507485de5c4fd41b58
2016-04-04 15:20:11 -04:00
Jason Monk
4a25f35680 Only show enabled/disabled filters in main app list
Change-Id: I8d7c94098b71f5893b08786a4caa90d9c191da99
Fixes: 27921850
2016-03-30 14:51:52 -04:00
Jason Monk
228638019d Fix bridged app list saved scroll state
(don't clear the list when we have the info)

Fixes: 27185911
Change-Id: Ieda4fd0fc6dd662741da9a1805c1435d4473490d
2016-03-30 13:26:30 -04:00
Julia Reynolds
3e912e7ea5 Notification summary updates.
Change-Id: I6b824acf27743637ca661b38b51c639ecf099208
2016-03-08 16:08:12 -05:00
Julia Reynolds
beb5e5210b Notification filter changes.
Bug: 27403688
Change-Id: I560ab6fc4a46673c0be4244b24f90e7c937b0006
2016-03-03 11:06:36 -05:00
Sunny Goyal
7d725461c6 Fixing the sections not getting created the first time
Change-Id: I9b8888d1633eba29e9ec79924d26cff0fce33ead
2016-02-16 17:54:24 +00:00
Roozbeh Pournader
2b7d4cd49f Replace LocaleList#getPrimary() with get(0)
getPrimary() is removed from the API due to potential confusion about
what it means.

Bug: 26984092
Change-Id: If218de84251461016f4ac06aa9a1cb8610b90d39
2016-02-04 15:55:41 -08:00
Sunny Goyal
0da3254124 Adding fast scroller in app list
Change-Id: I9b5c2225a7acf6d7d83d7d7a7bb08a023a66183d
2016-02-02 10:46:54 -08:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Jeff Sharkey
df828405b1 Follow PackageManager refactoring.
Change-Id: Iae8b40acf6317366f0de780e367e0c21a9966477
2016-01-06 14:51:32 -07:00
Julia Reynolds
8c0a423865 Split Sound & notification settings.
Bug: 25860852
Change-Id: If88daf6fd50b5abf86fb86f3590361f0118172a1
2015-11-30 11:21:41 -05:00
Julia Reynolds
4cc3819857 Fix filter indicies.
Bug: 25837105
Change-Id: Ic857f4efdb3d25e38be7b8113cc2256127954e48
2015-11-25 08:58:44 -05:00
Julia Reynolds
6f526fcaf3 Migrate package level notification settings to topic level.
Bug: 22854014
Change-Id: If0c20bec3b3f8b01b86d195d2e7ff7aa1e15882e
2015-11-20 15:09:29 -05:00
Julia Reynolds
69d0b67ee0 Remove 'peekable' notification preference.
Bug: 22854014
Change-Id: I920185cd8c766436338d38a51663bd5480699f5d
2015-11-18 17:05:18 -05:00
Jason Monk
3069581512 Summary support for Settings Home
Also add summaries to a few of the major items.

Change-Id: I17924f14941fe095d819e142cdd21cf4b4e9ffd1
2015-11-17 13:51:45 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Jason Monk
5711e73146 Possibly fix apps loading forever
- Consistently handle results from filters whether async or not
 - Make sure we trigger a rebuild after loading entries is complete

Bug: 22838302
Change-Id: I4595c61d4ea7069e59440c9dc673a1f0b73bc864
2015-08-20 18:13:52 +00:00
Julia Reynolds
e492ee06ad Make the app header bar more consistent.
- Don't include info link if just came from app info page
- include back button on app info page when launched from header
Bug: 22203029

Change-Id: I737332a487c41e0a93d161b55659700a1f936844
2015-08-19 15:18:55 -04:00
Dianne Hackborn
be4df036e1 Fix issue #23037899: Support for Battery Optimization permission + Dialog
New pretty dialog.

Change-Id: I6094b83139beffc407b01049a0d9d1f85a95df07
2015-08-10 17:07:14 -07:00
Jason Monk
888673bd51 Hide show/hide system from battery optimizations list
Bug: 22977820
Change-Id: I1741bfe3e8703bae8ce10503879adfd12e9eb4fc
2015-08-05 16:08:00 -04:00