Commit Graph

5164 Commits

Author SHA1 Message Date
Jeff Sharkey
b270eabe36 Merge "Aggresive performance optimizations." into qt-dev
am: 433b7fc88b

Change-Id: Iae7e2135360590f7246aea640fadd95ff0cad4c4
2019-05-17 23:12:40 -07:00
Jeff Sharkey
b66f4f4bad Aggresive performance optimizations.
Now that we have LocalCallingIdentity, we can start caching it in
very narrow cases.  We must be careful to not cache too long, since
any changes to granted permissions for the UID mean we need to
re-evaluate any cached answers.

The best middle-ground for this in the Q release is to use an active
camera session as a proxy for when we should create a cache object
and then later invalidate it.  (It's very unlikely that a user
changes permissions while actively using the camera, and this is
a strong signal that the caller is sensitive to performance.)

Many other sprinkled optimizations to avoid extra binder calls into
the OS, such as aggressively caching VolumeInfo related details.

Track IDs that are owned by each LocalCallingIdentity, to speed up
all future security checks.

Dispatch all change notifications asynchronously, and delay them by
several seconds while the camera is being actively used, to give
more important foreground work a fighting chance.  Invalidate
thumbnails asynchronously.

Optimizations to ModernMediaScanner where it's safe to skip the
"reconcile" and "clean" steps when we're focused on a single file
that we successfully scanned.

Local tests show this CL improves performance of a test app that
takes 100 rapid shots by 45%.  (All the collective optimizations
done so far this week add up to a 70% improvement.)

Bug: 130758409
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: trivial manifest change
Change-Id: I38cc826af47d41219ef44eae6fbd293caa0c01d5
2019-05-18 05:48:21 +00:00
Sudheer Shanka
d90bb5b00f Merge "Revoke prior uri grants when MediaProvider db gets recreated." into qt-dev
am: 75fb684e00

Change-Id: I9ccd145410af8db409fb87e931772b5bae3ad660
2019-05-15 23:30:37 -07:00
Sudheer Shanka
75fb684e00 Merge "Revoke prior uri grants when MediaProvider db gets recreated." into qt-dev 2019-05-16 01:27:38 +00:00
Sudheer Shanka
7a66be2a13 Revoke prior uri grants when MediaProvider db gets recreated.
Bug: 132084545
Test: manual
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Ibf2f2357d712a212f25b3bd005572ac74fe524fd
2019-05-15 16:37:06 -07:00
Jeff Sharkey
61aa9eceb8 Merge "Legacy insertImage() should use IS_PENDING." into qt-dev
am: 505c7de397

Change-Id: Iefdd21f43c2b9094d8242d3725b44229c5595c8c
2019-05-12 07:38:04 -07:00
Jeff Sharkey
a356f1989c Legacy insertImage() should use IS_PENDING.
Also stream known file directly into place instead of doing a lossy
and expensive transcode.

Bug: 131710636
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Icbfe4f79725c705a1197296f1fd4518c0179a9c1
2019-05-11 21:07:50 -06:00
Aran Ink
4abf4bd58e Merge "Add secure setting for Global Actions Panel debug mode." into qt-dev
am: 0cde819fc6

Change-Id: Ic80b8a02f74e5be80f99e15e252ef1e7b9d65464
2019-05-10 08:52:47 -07:00
Aran Ink
0cde819fc6 Merge "Add secure setting for Global Actions Panel debug mode." into qt-dev 2019-05-10 15:30:10 +00:00
Adam He
9c98aac31e Merge "Apply content capture settings to all users." into qt-dev
am: f992bb99b2

Change-Id: I371087f9e0bdd6a5e455bee9a8b25ced44365ee2
2019-05-09 12:24:49 -07:00
Aran Ink
93dd25cfe7 Add secure setting for Global Actions Panel debug mode.
Changes grid-based power menu logic to use new debug setting.

Bug: 123397865
Bug: 127644235

Test: Automated tests pass. Manual testing turning off/on debug setting.
Change-Id: Ic95188bd10a433f5c58f0f37a098a872e65d8150
2019-05-09 14:42:14 -04:00
TreeHugger Robot
f992bb99b2 Merge "Apply content capture settings to all users." into qt-dev 2019-05-09 18:27:37 +00:00
Kevin Chyn
a3884bd30f Merge "Added face education setting" into qt-dev
am: c03c8909e5

Change-Id: I809f8d309e3a920eb82b0295d996a07196a95e80
2019-05-08 17:25:27 -07:00
Kevin Chyn
c03c8909e5 Merge "Added face education setting" into qt-dev 2019-05-08 23:55:22 +00:00
joshmccloskey
421e2691f3 Added face education setting
Test: It builds
Bug: 131774352
Change-Id: I23cc05838052da7d40223a519bbf99895d165f86
2019-05-08 14:26:31 -07:00
Aran Ink
2d4fdc05e7 Merge "Add secure settings for Global Actions Panel." into qt-dev
am: c8cb13a537

Change-Id: I9afd4501b7f28e358394ee49b8537d26f9ab72db
2019-05-08 12:14:42 -07:00
Aran Ink
c8cb13a537 Merge "Add secure settings for Global Actions Panel." into qt-dev 2019-05-08 18:56:26 +00:00
Christine Franks
29e86faf4e Merge "Validate vendor display color modes" into qt-dev
am: 1da3d01b5e

Change-Id: Iad3419fbbb43177bb137c17c45b34f494d34ff8b
2019-05-08 11:12:24 -07:00
Christine Franks
1da3d01b5e Merge "Validate vendor display color modes" into qt-dev 2019-05-08 17:38:21 +00:00
Aaron Heuckroth
00ff1180b2 Add secure settings for Global Actions Panel.
Test: Automated tests pass.
Fixes: 131751030

Change-Id: I969a56ecc0b9310ed32cd5bd5d8ad0c2499ae63b
2019-05-07 14:59:28 -04:00
Yasmin Molazadeh
b1a497c4a3 Merge "Update the contract docummentation regarding UnsupportedOperationException." into qt-dev
am: 04e3a27c12

Change-Id: I7bfaa0153d967a9faca5834d593f886b0e989a63
2019-05-07 06:27:18 -07:00
Yasmin Molazadeh
04e3a27c12 Merge "Update the contract docummentation regarding UnsupportedOperationException." into qt-dev 2019-05-07 13:07:37 +00:00
Tim Murray
9f0fd8c1ce Revert "Add optional reasons why permissions were denied"
am: d06c6d2932

Change-Id: I5f0d60ebdea3170f0c0769c8909e91b56b2848d9
2019-05-07 02:36:00 -07:00
Tim Murray
d06c6d2932 Revert "Add optional reasons why permissions were denied"
This reverts commit 3623f3219e.

Reason for revert: 40% startup perf regression

Test: revert
Bug 132129453
Exempt-From-Owner-Approval: critical revert

Change-Id: I19dc33e6a71c9254b4096154f4089c059fe408dd
2019-05-07 07:10:30 +00:00
Christine Franks
c5f0d146db Validate vendor display color modes
Bug: 128607042
Test: atest FrameworksServicesTests:ColorDisplayServiceTest

Change-Id: I78dca7eeb9d4855007b5616b444b2b715860bed1
2019-05-06 12:26:08 -07:00
Philip P. Moltmann
104cf9c862 Merge "Add optional reasons why permissions were denied" into qt-dev
am: dd82c4513b

Change-Id: Iba294f338743c86d126eb4c4d92eb4c3d1c31cf0
2019-05-05 23:40:52 -07:00
TreeHugger Robot
dd82c4513b Merge "Add optional reasons why permissions were denied" into qt-dev 2019-05-06 06:21:23 +00:00
Philip P. Moltmann
3623f3219e Add optional reasons why permissions were denied
Currently only for the ContextImpl.enforcePermission code paths and only
when 'secure debug_package_permission_check' is set.

This feature is disabled on user-builds.

Test: Enabled permission checking for my app and
      - checked runtime permision denial
      - permission denial because app is instant
Bug: 111075456
Change-Id: Ib85777db69ee490608e9dac32a3b97971c0ba215
2019-05-05 21:05:13 -07:00
Adam He
27ea41d2fc Apply content capture settings to all users.
Bug: 131748579
Test: manual verification
Change-Id: I35c39120e2a16587ff9b8137149decc94b044577
2019-05-03 16:54:49 -07:00
Salvador Martinez
3139592fcd Merge "Prevent dark mode backup from applying in before setup" into qt-dev
am: 49d35968e6

Change-Id: I48b790afe44918528e208262f80503a906cbb002
2019-05-03 16:44:56 -07:00
Salvador Martinez
49d35968e6 Merge "Prevent dark mode backup from applying in before setup" into qt-dev 2019-05-03 18:31:08 +00:00
Yasmin
f50730e3b2 Update the contract docummentation regarding UnsupportedOperationException.
Test: atest ManagedProfileTest#testCrossProfileCalendar
      atest CalendarProvider2Test
Bug: 130284827
Change-Id: I9e98efae6bc7229b995506a542940663c3fbae8f
2019-05-03 16:09:40 +00:00
Abodunrinwa Toki
772447f0bd Merge "Lazy-load textclassifier settings." into qt-dev
am: 9829cf5451

Change-Id: Ia96d8725c1375078161fe0d4cefc8104b17e3abd
2019-05-03 05:15:09 -07:00
Salvador Martinez
c500b2741e Prevent dark mode backup from applying in before setup
This CL makes it so that UIModeManager will not allow dark mode
to be changed prior to initial setup wizard being completed.
Additionally, it makes it so that when UIModeManager starts it
will try to start in light mode prior to setup wizard completing
regardless of what the backed up value is. We also register for
an observer if when we start UIModeManager we notice that setup
wizard has not run and defer updating dark mode to the true value
until we see that setup wizard completes.

Test: Manual
Bug: 119666724
Change-Id: Ie9cf36c8483d9cdd9e7aadd3aae4cc0ef15e8d45
2019-05-02 17:59:17 -07:00
Ivan Chiang
2f18936449 Merge "Fix can't create thumbnail and wrong orientation issue" into qt-dev
am: b037feb130

Change-Id: Ie794dc44746df5a023a0af1832a0dfc6a904ec07
2019-05-02 16:14:14 -07:00
Michael Wachenschwanz
9ddd631f9a Merge "Elevate standby bucket on first foreground service start" into qt-dev
am: 8189440785

Change-Id: I9452b66c6cf53dbae78f7a0ed2a41aff1f9a2a0e
2019-05-02 15:54:44 -07:00
Abodunrinwa Toki
0634af3875 Lazy-load textclassifier settings.
Re-enables reading settings from device_config.
See: I6b7ab56e4015448ee068deb49e7f6fa133fea53c
Updates tests.
Updates documentation.

Bug: 129934185
Test: atest android.view.textclassifier
Test: (Performance) Test: frameworks/base/apct-tests/perftests/textclassifier/run.sh
      Compare performance results with ConfigParser.ENABLE_DEVICE_CONFIG
      set to true vs false. Trivial regression recorded i.e. 1.03x.
Test: (Manual) Change flags and see them reflected. e.g.
      adb shell cmd device_config put textclassifier system_textclassifier_enabled false
      Verify that app no longer uses the OEM TCS but the AOSP TC.
Change-Id: I4c6ff781c97fc2e3d3da55dc49123fa1d759670a
2019-05-02 12:55:58 +01:00
TreeHugger Robot
b037feb130 Merge "Fix can't create thumbnail and wrong orientation issue" into qt-dev 2019-05-02 05:01:15 +00:00
TreeHugger Robot
8189440785 Merge "Elevate standby bucket on first foreground service start" into qt-dev 2019-05-02 01:55:12 +00:00
Kweku Adams
039b72df1f Merge "Creating separate flags for Time/QuotaControllers." into qt-dev
am: 956b55a733

Change-Id: I856fbbdbc4b744d437a4cb6efb794d2f0d2f1978
2019-05-01 09:30:04 -07:00
Xiangyu/Malcolm Chen
3a00c2cc42 Merge "Defining intent actions for enabling MMS setting." into qt-dev
am: 1342fcd9f8

Change-Id: I3f3ad1daafd3166341f3cab81aea3c91ee9086ec
2019-05-01 07:05:58 -07:00
Anna Wasewicz
4072075f9d Merge "Add DeviceConfig flag for ContentSuggestionsService. Test: presubmit Bug: 123289833" into qt-dev
am: 3eb46249bd

Change-Id: Ic35f82ad4f95251eb0f749921431ac468b063667
2019-04-30 20:05:11 -07:00
Kweku Adams
4e774a37db Creating separate flags for Time/QuotaControllers.
TimeController and QuotaController flags don't have to be changed
atomically with other JobScheduler constants, so it's best to have them
be separate. I think it's best to have the QuotaController constant
change be atomic, which is why the flag is set up as a key/value pair.

Bug: 120793892
Test: atest android.provider.SettingsBackupTest
Test: atest com.android.server.job.controllers.ConnectivityControllerTest
Test: atest com.android.server.job.controllers.QuotaControllerTest
Test: atest com.android.server.job.controllers.StateControllerTest
Test: atest com.android.server.job.controllers.TimeControllerTest
Test: atest CtsJobSchedulerTestCases
Change-Id: I5bf20c37ea87a58bbcf4326f8e81cd6bea0a7c08
2019-04-30 19:14:03 -07:00
Soonil Nagarkar
b60d7f4fef Merge "Correct visibility for LOCATION_MODE_ON" into qt-dev
am: ec554bddec

Change-Id: I24a5830e2d3fc38f52b394bfec9a8ddaa7b8a07a
2019-04-30 18:44:30 -07:00
Xiangyu/Malcolm Chen
1342fcd9f8 Merge "Defining intent actions for enabling MMS setting." into qt-dev 2019-04-30 23:05:25 +00:00
Anna Wasewicz
3eb46249bd Merge "Add DeviceConfig flag for ContentSuggestionsService. Test: presubmit Bug: 123289833" into qt-dev 2019-04-30 18:15:09 +00:00
Soonil Nagarkar
c67cc12148 Correct visibility for LOCATION_MODE_ON
As per API feedback in b/126727563, move LOCATION_MODE_ON to SystemApi
instead of deprecated. This is safe as this constant is not used
anywhere yet.

Test: manual
Bug: 126727563
Change-Id: Iddbea546d1585cb8677c4adb97e465d5ac7a76a4
Merged-In: Iddbea546d1585cb8677c4adb97e465d5ac7a76a4
(cherry picked from commit 7449108978)
2019-04-30 01:06:46 +00:00
Anna Wasewicz
3ecea55725 Add DeviceConfig flag for ContentSuggestionsService.
Test: presubmit
Bug: 123289833

Change-Id: I016a7585bc03e25bd494b9e3bd3080416d67ee50
2019-04-29 16:16:22 -07:00
Julia Reynolds
dccba21aac Merge "Add setting for silent notifs on lockscreen" into qt-dev
am: 1f8b77d213

Change-Id: Iecc6094fbfaf28d3a8a95e9ad36b18f09a09a089
2019-04-29 13:35:44 -07:00
Ivan Chiang
6da7b0adcc Fix can't create thumbnail and wrong orientation issue
- When MediaMetadataRetriever can't create the thumbnail of some
  HEIF files, attempt decoding it from ExifInterface.

- ImageDecoder can't create the thumbnail with getThumbnailBytes
  from ExifInterface in some cases. It will occur DecodeException:
  Failed to create image decoder with message 'unimplemented'Input
  contained an error. Attempt to decoding the full image in these
  cases.

- Use orientation from ExifInterface to transform the thumbnail to
  right orientation.

Test: manual
Test: atest ThumbnailUtilsTest
Bug: 130775874
Fix: 130446058
Change-Id: Icd0726ec49fe85651150736199c3caa184fa1a3f
2019-04-29 21:18:57 +08:00