Commit Graph

14201 Commits

Author SHA1 Message Date
Wale Ogunwale
39a6834c6e Merge "Introducing PendingIntentController (17/n)" 2018-09-26 23:15:29 +00: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
Wale Ogunwale
ee6eca1cf2 Introducing PendingIntentController (17/n)
Added PendingIntentController and centralize pending intent handling
in that class. Pending intents are used by activities and other components
like services and broadcasts. Since, activity handling is going to be moving
to the wm package, we need a way to access pending intents from both am and
wm packages. The PendingIntentController allows this to by not holding any
service level locks.

Bug: 80414790
Test: Existing tests pass.
Change-Id: I52f6f233b24e62839a85067556f3560dec27f0c7
2018-09-25 20:04:42 -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
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
TreeHugger Robot
fd74da1573 Merge "Deprecate InputMethodManager#getInstance()" 2018-09-24 22:41:07 +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
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
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
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
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
Nan Zhang
99adf3cb76 Fix the unresolved link/see tag error for framework docs
Synced with alanv@ that doc weren't federated against AndroidX yet, use
this v7 reference until they migrate the docs to AndroidX.

Test: m -j offline-sdk-docs
Bug: b/116163454
Change-Id: Ib5167c4815708d159945ce6db239f8debdf8f865
2018-09-21 14:58:26 -07:00
Yohei Yukawa
6c07572f16 Deprecate InputMethodManager#getInstance()
With this CL, no one in the Framework is using
InputMethodManager#getInstance() directly or indirectly.  It is time
to mark this method deprecated.

For applications that still call InputMethodManager#getInstance()
directly or indirectly via reflection, they will start seeing warnings
with stacktrace in logcat.

Except for that explict warnings in logcat, there is no behavior
change in this CL.  Added a new test to make sure that
InputMethodManager#getInstance() and InputMethodManager#peekInstance()
are still working in a way we expected for such applications.

Fix: 115891476
Test: atest FrameworksCoreTests:android.view.inputmethod.InputMethodManagerTest
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: Ib393086d921f91993395b5f0007b725a5db7bf22
2018-09-21 14:52:12 -07:00
Julia Reynolds
34a80841cb Fix potential NPE
Test: manual
Change-Id: I8f6ed47e5c51ca138f4c0b57eccab41336984548
Fixes: 67716207
2018-09-21 13:01:36 -04:00
kopriva
b7b399ed76 Merge "docs: fixing several minor documentation bugs" into pi-dev am: 82b0d17b39
am: f6b27fbff0

Change-Id: I14f98e023001c75719ab8b891db6abf3f0fd4564
2018-09-20 17:12:29 -07:00
kopriva
f6b27fbff0 Merge "docs: fixing several minor documentation bugs" into pi-dev
am: 82b0d17b39

Change-Id: Ieb1447c0d7cda629338de8d6e03f46670d8ed0b0
2018-09-20 16:55:47 -07:00
Wale Ogunwale
e746fb17a6 Merge "Moved more stuff from ActivityManagerService to ActivityTaskManagerService (15/n)" 2018-09-20 21:23:15 +00:00
kopriva
f07a46058c docs: fixing several minor documentation bugs
Test: make ds-docs

Bug: 36949243
Bug: 116169695
Bug: 37001248
Bug: 37044885
Bug: 37053166

Change-Id: I844a8978518cd7214bf9d068d602902dfa7e8246
Exempt-From-Owner-Approval: Docs-only change
2018-09-20 11:20:27 -07:00
TreeHugger Robot
d2b1a57093 Merge "Suppress suppressing work profile removed notification if reason is null" 2018-09-20 18:06:28 +00:00
Wale Ogunwale
53783740e3 Moved more stuff from ActivityManagerService to ActivityTaskManagerService (15/n)
- Moved CompatModePackages to ActivityTaskManagerService since it is mostly used for activity stuff.
- Moved mHeavyWeightProcess to ActivityTaskManagerService since it is set for activities.
- Set AMS.mBooting and AMS.mBooted as volatile to allow setting from both AM and WM side with hold locks.
- Allow updating of cpu stats, usage stats, and foreground time from WM side.

Bug: 80414790
Test: Existing tests pass.
Change-Id: I48ab55bdd5aacc864cb6a82d19d1a24b7605a5b0
2018-09-20 10:18:18 -07:00
Lucas Dupin
9232b57454 Merge "Clarify that UiModeManager sets global night mode" into pi-dev am: 562f5485d3
am: f255935dc8

Change-Id: Ib94e5ed781ff7b5499fd3380f16ae5e6bfefdaf7
2018-09-20 10:17:38 -07:00
Lucas Dupin
f255935dc8 Merge "Clarify that UiModeManager sets global night mode" into pi-dev
am: 562f5485d3

Change-Id: Ia757aeb7dbe97b1b33ababf50af5c96da8d7e963
2018-09-20 10:01:22 -07:00
Lucas Dupin
562f5485d3 Merge "Clarify that UiModeManager sets global night mode" into pi-dev 2018-09-20 16:39:49 +00:00
Makoto Onuki
04f7af70f3 Merge "AMS.removeContentProviderExternal() should take a user-id" 2018-09-19 23:11:31 +00:00
Makoto Onuki
679760ae66 AMS.removeContentProviderExternal() should take a user-id
Change-Id: Id0868d5dc5d20c0ad63323100acbd13f450a28fc
Fixed: 116114675
Test: boot
2018-09-19 12:49:17 -07:00
Lucas Dupin
b01c390b54 Clarify that UiModeManager sets global night mode
Test: repo upload
Fixes: 116121230
Change-Id: I127c169eb9cb6f951943879bd4bdaca2a00ed222
2018-09-19 11:44:31 -07:00
TreeHugger Robot
5ad8521008 Merge "Deprecates WearableExtender methods not supported by Wear SysUI v3." 2018-09-18 21:40:30 +00:00
Gus Prevas
d73637506d Deprecates WearableExtender methods not supported by Wear SysUI v3.
Test: doc/annotation changes only.
Bug: 116013034
Change-Id: Ida3f05d02c940bac42bbb01aece924524fd33d4b
2018-09-18 15:46:26 -04:00
kopriva
64c4523ed4 Merge "docs: fixed five typos" into pi-dev am: 82b413428e
am: d366837e05

Change-Id: I0cf5630bc936c872ca936f2d3de9e8aaa509f083
2018-09-18 12:10:35 -07:00
kopriva
d366837e05 Merge "docs: fixed five typos" into pi-dev
am: 82b413428e

Change-Id: I4af571d6bcfa151235223b51cb8135fbacb62c82
2018-09-18 12:00:24 -07:00
TreeHugger Robot
82b413428e Merge "docs: fixed five typos" into pi-dev 2018-09-18 18:38:16 +00:00
TreeHugger Robot
6467990e46 Merge "Fixed when the CompatibilityBridge is attached to an activity." 2018-09-18 01:19:27 +00:00
kopriva
d86a16572c Merge "docs: bug 36997358, typo 'than an'" into pi-dev am: 9a32a1dc3e
am: 33d19aac6a

Change-Id: Icd4cd97619e32e69bbd9f03f89c5f18adfde0d4c
2018-09-17 17:49:40 -07:00
kopriva
33d19aac6a Merge "docs: bug 36997358, typo 'than an'" into pi-dev
am: 9a32a1dc3e

Change-Id: I9d989ec02bd2d09f1a6de9ee15567a960caf9de2
2018-09-17 17:31:12 -07:00
kopriva
7ecfe31427 docs: fixed five typos
Test: make ds-docs

Bug: 37095452
Bug: 37001217
Bug: 37004068
Bug: 37015340
Bug: 37044652

Change-Id: Ib305df88b63286810d7722e73321ddb238b45e8e
Exempt-From-Owner-Approval: Docs-only change
2018-09-17 15:17:50 -07:00
kopriva
fc3949e099 docs: bug 36997358, typo 'than an'
Test: make ds-docs

Bug: 36997358

Change-Id: I11a5fcbd76638c7d6b060c0852268efa9e37a7fe
Exempt-From-Owner-Approval: Docs-only change
2018-09-17 11:35:13 -07:00
Alex Chau
16d9490245 Suppress suppressing work profile removed notification if reason is null
Bug: 114711242
Test: cts-tradefed run singleCommand cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.ManagedProfileTest#testWipeDataWithoutReason
Change-Id: Icea2c95272f3d3d693c3289a5c4a55761026a8f9
2018-09-17 19:33:28 +01:00
Felipe Leme
ce40498dc2 Fixed when the CompatibilityBridge is attached to an activity.
The AccessibilityManager is a singleton, so we need to update it everytime
an activity is resumed.

Test: manual verification with Chrome (CTS test is an overkill here)
Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything

Fixes: 112690889
Change-Id: If011db203dee96ec511da80f4e49395c0340f482
2018-09-17 09:58:56 -07:00
Ian Lake
9183f2d97c Merge "Annotate Window.Callback menu methods with nullability" 2018-09-14 15:52:56 +00:00
Mathew Inwood
db0657a4f4 Merge "Move some members to the "Q blacklist"." 2018-09-14 13:54:28 +00:00
Mathew Inwood
8c854f86a4 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
2018-09-14 13:18:34 +01:00
TreeHugger Robot
7b9fc02708 Merge "Annotate Activity.dump with nullability annotations" 2018-09-14 03:13:56 +00:00
kopriva
bc6d1a3657 Merge "docs: fixed button value in reference" into pi-dev am: 26bdd62ce5
am: b5f94691e4

Change-Id: Iafa2a7590647835d8e08d3b31a82cb4ee3d47752
2018-09-13 17:10:22 -07:00
kopriva
b5f94691e4 Merge "docs: fixed button value in reference" into pi-dev
am: 26bdd62ce5

Change-Id: I26f0b05b1bb2d2b1416fd664168c8be9ed3f558c
2018-09-13 16:52:08 -07:00
TreeHugger Robot
26bdd62ce5 Merge "docs: fixed button value in reference" into pi-dev 2018-09-13 23:37:04 +00:00
kopriva
eac0905c11 docs: fixed instances of typo in 'overridden' am: debd4ee72d
am: 9b641cbc71

Change-Id: I071643e73656a2a17a3c0ab89ffacda9c1bfec80
2018-09-13 15:11:27 -07:00