Commit Graph

86113 Commits

Author SHA1 Message Date
Anton Hansson
91b54f17c6 Add per-partition build constants to Build class.
Expose the ro.<x>.build.fingerprint & time.utc constants.

Bug: 112584519
Test: manual test app calling getPartitions().
Test: atest BuildVersionTest
Change-Id: Ibec0012d5893e3eb325f46a04379718a11067fa1
2018-10-01 11:41:33 +01:00
Rafal Slawik
aaf608959c Read RSS high watermark
The value is read from /proc/PID/status or memory.max_usage_in_bytes (for devices with per-app memcg enabled).

Reading the value takes about 2ms per process.
Full snapshot taken by statsd is around 300ms.

Results: https://docs.google.com/spreadsheets/d/1vG9ku8Uu8104CmKbO4cNeEKVeeByvHY--p0_dK1GAdA/edit?usp=sharing

Bug: 115477992
Test: atest FrameworksServicesTests
Change-Id: I87995cbd85085375ade685f29e986ba173f9693e
2018-09-26 09:25:01 +00:00
Jeff Sharkey
960165c0d7 Merge "Recover shady content:// paths." 2018-09-25 23:56:56 +00:00
vnori
ac2c8a93f0 Merge "Add hidden API to return "Uploading" bit value from SDP record's MapSupportedFeatures." am: 51ec0ebbee am: 33c3ab90e0
am: 7eeb25c5fd

Change-Id: I4332451282d17e698e3f652e94f1b2463071e8a8
2018-09-25 16:47:37 -07:00
vnori
7eeb25c5fd Merge "Add hidden API to return "Uploading" bit value from SDP record's MapSupportedFeatures." am: 51ec0ebbee
am: 33c3ab90e0

Change-Id: I05c8550bfece64e52a52f580f73d873a4a9851d8
2018-09-25 16:22:08 -07:00
vnori
33c3ab90e0 Merge "Add hidden API to return "Uploading" bit value from SDP record's MapSupportedFeatures."
am: 51ec0ebbee

Change-Id: I9df4af670df12ac2cd379c3bbee15e63b95bbf49
2018-09-25 16:14:19 -07:00
TreeHugger Robot
e224120377 Merge "Add PermissionManager exposing SPLIT_PERMISSIONS" 2018-09-25 22:53:51 +00:00
Vasu Nori
694752d5b9 Add hidden API to return "Uploading" bit value from SDP record's MapSupportedFeatures.
Bug: 111614861
Test: tested w/ KitchenSink App
Change-Id: I43895183d7b315f57257e1d2045f17dedcb0cfcd
2018-09-25 21:39:31 +00:00
Nicole Borrelli
2bfca321cc Merge "Fix malformed Javadoc." into pi-dev am: 3ae3f252b4
am: 3d54533e52

Change-Id: I8940755ed359d4fcf6683c59c0e501c11faa4559
2018-09-25 14:24:28 -07:00
Nicole Borrelli
3d54533e52 Merge "Fix malformed Javadoc." into pi-dev
am: 3ae3f252b4

Change-Id: Iea60c213e70a8878baeb59b9247ae4bf0eaf5a8d
2018-09-25 14:06:49 -07:00
Philip P. Moltmann
039678e13f Add PermissionManager exposing SPLIT_PERMISSIONS
The Permission Controller app (a mainline module) needs to be able to
read the SPLIT_PERMISSIONS. Hence this array needs to be exposed at
least as system-api. We need to make sure that the PackageParser,
PackageManager and Permission Controller app agree on which permissions
are split, hence it is best to define them at a single location.

I think exposing the split permissions to developers is useless and
potentially confusing. The app should never request a permission that
was split. The app should just behave as if split permissions do not
exist. The Permission Controller / Package Manager deal with the
split permissions and add them when needed. Hence I don't think we
should expose this data to 3rd parties.

Bug: 110953302
Test: requested permissions
Change-Id: I6951c52979c89ee5c13a4a14da125e1a01f2e234
2018-09-25 13:48:11 -07:00
TreeHugger Robot
3ae3f252b4 Merge "Fix malformed Javadoc." into pi-dev 2018-09-25 20:42:50 +00:00
Jeff Sharkey
c4156e0ec4 Recover shady content:// paths.
The path-permission element offers prefix or regex style matching of
paths, but most providers internally use UriMatcher to decide what
to do with an incoming Uri.

This causes trouble because UriMatcher uses Uri.getPathSegments(),
which quietly ignores "empty" paths.  Consider this example:

    <path-permission android:pathPrefix="/private" ... />

    uriMatcher.addURI("com.example", "/private", CODE_PRIVATE);

    content://com.example//private

The Uri above will pass the security check, since it's not
technically a prefix match.  But the UriMatcher will then match it
as CODE_PRIVATE, since it ignores the "//" zero-length path.

Since we can't safely change the behavior of either path-permission
or UriMatcher, we're left with recovering these shady paths by
trimming away zero-length paths.

Bug: 112555574
Test: atest android.appsecurity.cts.AppSecurityTests
Test: atest FrameworksCoreTests:android.content.ContentProviderTest
Change-Id: Ibadbfa4fc904ec54780c8102958735b03293fb9a
2018-09-25 14:10:15 -06:00
TreeHugger Robot
d6fb462d1e Merge "Remove a special optimization for a quite rare scenario" 2018-09-25 20:09:05 +00:00
Seigo Nonaka
47e79a1626 Merge "Move hasEqualAttribute from Paint with adding some accessors" 2018-09-25 18:34:26 +00:00
Mihai Popa
8b3002e769 Merge "[Magnifier-62] Deprecate constructor" 2018-09-25 16:05:17 +00:00
Makoto Onuki
dd5e4bac40 Merge "Truncate(*1) it if WAL file is too big when opening DB" into pi-dev
am: 0f88f865bd

Change-Id: Ie14cea16f9cf89793a499a1b7c491ebc2f8a8829
2018-09-25 08:27:48 -07:00
TreeHugger Robot
48f2fad424 Merge "Recycle PooledLambda in CameraDeviceImpl.CameraDeviceCallbacks" 2018-09-25 15:17:40 +00:00
Makoto Onuki
0f88f865bd Merge "Truncate(*1) it if WAL file is too big when opening DB" into pi-dev 2018-09-25 15:12:15 +00:00
TreeHugger Robot
3bea414ae6 Merge "Cleanup: make ProcessMemoryState fields final, reformat imports of ActivityMetricsLogger" 2018-09-25 11:41:39 +00:00
Mihai Popa
b6ca909ed7 [Magnifier-62] Deprecate constructor
The CL deprecates the old constructor for Magnifier instances in favor
of the usage of builder Magnifier#Builder.

Bug: 116116502
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I3daa9f066c77144e9d5c62bc666ecd37041f4bbb
2018-09-25 11:35:52 +01:00
Adam Vartanian
86b381be69 Merge "Inline two short methods from Conscrypt" am: 9da9b33cc2 am: 91d61ea0ed
am: 8879ee4a78

Change-Id: Iffbb91414c16b055fc3358e83fb5c23ef4998816
2018-09-25 02:33:46 -07:00
Adam Vartanian
8879ee4a78 Merge "Inline two short methods from Conscrypt" am: 9da9b33cc2
am: 91d61ea0ed

Change-Id: I541ff04bd67780e8920d802a7935c97e0adb535b
2018-09-25 02:20:26 -07:00
Rafal Slawik
5c1263e1b3 Cleanup: make ProcessMemoryState fields final, reformat imports of ActivityMetricsLogger
Test: cleanup CL, existing tests pass
Change-Id: I6307ddf6d18530c908a5f92f9bc497f6f8b00e19
2018-09-25 09:09:54 +00:00
Adam Vartanian
91d61ea0ed Merge "Inline two short methods from Conscrypt"
am: 9da9b33cc2

Change-Id: I4c66064ec1a0569f7766282d6dbee5202906ae00
2018-09-25 02:04:57 -07:00
Yuzhou Jia
5d41bd2973 Merge "Add SHOW_SOURCE_NOTIFICATION to indicate that the interaction service was invoked by a notification." 2018-09-25 03:30:04 +00:00
Yohei Yukawa
d4d895e2f8 Remove a special optimization for a quite rare scenario
This CL effectively reverts the following 3 CLs.

 * Reduce window resizing during IME transition
   I5723f627ce323b0d12bd7b93f5b35fc4d342b50c
   792faa2c16

 * Clear the inset of previous IME when necessary
   Ib04967f39b2529251e4835c42e9f99dba2cf43f2
   2977eb7b6c

 * Make IMS#clearInsetOfPreviousIme() reliable
   Ib567daa009c1139858dccadcfc6a04465ebecf36
   833bdcedce

The main idea behind the first CL is that the target application can
skil avoid layout resizing if the following two conditions are met.

 A. WindowManagerService (WMS) can remember the last IME's inset until
    the next IME's window is fully shown.
 B. Both the last IME and the new IME have the same inset.

Basically the first CL implements the above A part with an assumption
that some IMEs would do the B part.  However, in reality it is quite
unlikely that two random IMEs have the same inset size.  At the same
time, maintaining this kind of special optimization is getting harder
and harder as more and more use cases and form factors need to be
supported.

Let's remove this optimization given that no one is benefited by it.

Fix: 116492038
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: do not see any noticeable visual difference
Change-Id: I8ffbf9bf7c3a8be54df0ca8eac1a1f041ef7d3c9
2018-09-24 16:01:20 -07:00
Makoto Onuki
0939c5a2b3 Truncate(*1) it if WAL file is too big when opening DB
*1 -- not truncate(2) but "PRAGMA wal_checkpoint(TRUNCATE)"

Otherwise, depending on how an app operate on a DB, SQLite may not
have a chance to "shrink" the WAL file.

Fixes: 112777941
Bug: 111939259
Test: atest /android/master/frameworks/base/core/tests/coretests/src/android/database/sqlite/SQLiteCompatibilityWalFlagsTest.java
Test: Manual test with google dailer:
1. With normalized_spam.db-wal > 100MB and receive a phone call
-> WAL file gets truncated to 0 bytes.

2. Restart the dialer process and receive a phone call again
-> WAL file is already 0 bytes; won't be truncated.

3. Restart with the WAL file deleted
Same as #2. WAL file will be created before the added logic, but is 0 bytes,
so it won't be truncated.

4. Test with settings put global sqlite_compatibility_wal_flags truncate_size=1024
-> make sure the threshold is overridden

Merged-in: I2b193603e5dfa493ccccb8123db592f0e9c0e7ae
Change-Id: I2b193603e5dfa493ccccb8123db592f0e9c0e7ae
(cherry picked from commit 96e06002ed)
2018-09-24 22:47:02 +00:00
TreeHugger Robot
fd74da1573 Merge "Deprecate InputMethodManager#getInstance()" 2018-09-24 22:41:07 +00:00
Felipe Leme
bc75159db6 Merge "Fixed when the CompatibilityBridge is attached to an activity." into pi-dev
am: 45fda27211

Change-Id: I420b0392602e0889862c7d77e62b614e2c5617bf
2018-09-24 15:22:37 -07:00
TreeHugger Robot
45fda27211 Merge "Fixed when the CompatibilityBridge is attached to an activity." into pi-dev 2018-09-24 22:04:27 +00:00
TreeHugger Robot
ba940c4279 Merge changes from topic "biometric-op"
* changes:
  Check AppOps in BiometricService
  Rename OP_USE_FACE to OP_USE_BIOMETRIC
2018-09-24 20:37:16 +00:00
TreeHugger Robot
e64d55010f Merge "Create plumbing for disabling force-dark" 2018-09-24 19:54:33 +00:00
TreeHugger Robot
cc704723bd Merge "Fixed FillCallback.onFailure() and SaveCallback.onFailure() behavior." 2018-09-24 18:48:13 +00:00
John Reck
1423e1331f Create plumbing for disabling force-dark
Test: sysui's rounded corners are no longer white
Bug: 102591313

Change-Id: Id99ae38c354cef06b94a5fb79b5b1a9a216a514c
2018-09-24 09:34:18 -07:00
Adam Vartanian
54148c0e57 Inline two short methods from Conscrypt
We're trying to reduce unnecessary direct dependencies on Conscrypt.
These two methods are simple and the implementations can't change, so
they're good candidates for inlining directly instead of depending on
the Conscrypt implementation.

Bug: 110404540
Test: atest NetworkSecurityConfigTests (same failures pre/post)
Change-Id: I303d955e3f49885326fe75f451c06a52af745053
2018-09-24 15:34:13 +01:00
Julia Reynolds
34560ec27d Merge "Fix potential NPE" 2018-09-24 13:11:00 +00:00
Nan Zhang
fcc578e118 Merge "Fix the unresolved link/see tag error for framework docs" into pi-dev am: 98d747e7f3
am: d837987639

Change-Id: Ief6003b003582711771a5f239acd4cdc6cab42b9
2018-09-23 03:01:35 -07:00
Nan Zhang
d837987639 Merge "Fix the unresolved link/see tag error for framework docs" into pi-dev
am: 98d747e7f3

Change-Id: Idf0fadc2d62c872c9bc82388f4d8fbcd58694e83
2018-09-23 02:50:22 -07:00
TreeHugger Robot
98d747e7f3 Merge "Fix the unresolved link/see tag error for framework docs" into pi-dev 2018-09-23 09:34:23 +00:00
Yohei Yukawa
bfcf9a8321 Recycle PooledLambda in CameraDeviceImpl.CameraDeviceCallbacks
PooledRunnable has a nice optional method recycleOnUse(), which can be
used if the Runnable is guaranteed to be executed at most once.

By calling this method, PooledRunnable instance will be auto-recycled
into the internal object pool once it's executed.

Test: presubmit
Change-Id: I6ff341be5d0abddba8134489950be0b7c1affcbb
2018-09-22 13:36:47 -07:00
Yohei Yukawa
e2fa39ec3d Use PooledLambda.obtainMessage() when possible
As its JavaDoc says, in most of cases PooledLambda.obtainMessage() is
a better choice than PooledLambda.obtainRunnable().

If PooledLambda.obtainRunnable() is really necessary, let's make sure
to call recycleOnUse() whenever possible.

Test: presubmit
Change-Id: I3dbe500f49c0df187f2ffefd11c71836696dfd4e
2018-09-22 13:13:10 -07:00
TreeHugger Robot
21ba5d4f3f Merge "Let IMM have internal APIs for layoutlib" 2018-09-22 16:31:28 +00:00
Yunfan Chen
75157d7791 Introduce process configuration to WindowProcessController
Introduced the process config and adjusted mergedconfiguration
related calls. Such that we can override configuration for a process
when need to.

The potential use cases include:
1. Maintain process window bounds for the latest activity to override
the display info for legacy apps;
2. Override the display info for IME process to make sure the IME can be
shown with the correct display metrics.

ActivityManagerService:
- Use process configuration instead of the global configuration when
  it's for app.

ActivityStackSupervisor:
- Use process configuration when start activity.

WindowProcessController:
- Make it a ConfigurationContainer.

ActivityTaskManagerService:
- Add interface to get configuration for a process. If the process is a
  system process or non-existing process, return the global
  configuration.
- Return device configuration related to the process.
- Propagate configuration updates from Global to Process.

ActivityTaskManagerInternal:
- API to update configuration for IME process.

WindowManagerService/WindowManagerInternal:
- Propagate the process configuration change to wm.

WindowState:
- Use process configuration instead of global.

Test: go/wm-smoke
Test: servicestests will remain the same result as without this patch.
Bug: 113253755

Change-Id: I3660723352d2e8779d40528ae92d71f59ddbf1f1
2018-09-22 15:35:35 +09:00
Kevin Chyn
de92184b8c Merge changes from topic "biometric-manager"
* changes:
  3/n: Add BiometricManager, hasEnrolledBiometrics()
  2/n: Rename BiometricPromptService to BiometricService
  1/n: Rename BiometricService to BiometricServiceBase
2018-09-22 02:08:40 +00:00
Hui Yu
c35db561b8 Merge "Add RawContacts insert/update/delete notification URIs." 2018-09-22 01:16:49 +00:00
Kevin Chyn
69183e5ac3 Check AppOps in BiometricService
Fixes: 116340012

Test: manual
Change-Id: Id8e3ec341c4d20dfd77bdb4c554d0f99cbf84aa5
2018-09-21 17:19:20 -07:00
Kevin Chyn
b3c05aaa4f Rename OP_USE_FACE to OP_USE_BIOMETRIC
All future biometrics share the same USE_BIOMETRIC permission.

Bug: 116340012
Test: BiometricPromptDemo works

Change-Id: I6e5af4d6dc1b467e67957c0aec90f6c0a67028a7
2018-09-21 17:08:54 -07:00
Kevin Chyn
05c21508fd 3/n: Add BiometricManager, hasEnrolledBiometrics()
Fixes: 112570477

Test: BiometricPromptDemo works
Test: Able to get/use BiometricManager
Test: Tested with enrolled and non-enrolled biometrics

Change-Id: I26231894eccc87c42b5b3007aa0b7c6f09830452
2018-09-21 17:08:49 -07:00
Jeffrey Vander Stoep
60871d841d Merge "Add ConnectivityManager.getConnectionOwnerUid()" am: f8529dc891 am: 6729107f22
am: 904252f7a3

Change-Id: I8b8f6e74abc47f94231f3b9a1ab0db1ad0903a10
2018-09-21 15:36:28 -07:00