Commit Graph

11129 Commits

Author SHA1 Message Date
Jorim Jaggi
a6aabacbb5 Force app to draw navigation bar background
For gestural navigation, having a small bar drawn by SystemUI
looks really really weird. Since we force the status bar
background to be drawn in the client, we can also force the
navigation bar background without expecting any compat issues.

Bug: 129751541
Test: Open legacy app, ensure black is drawn in the client
Change-Id: I9cd4c5dd799324ff10bf9d28750e8f238ab1e459
(cherry picked from commit 461bb11371)
2019-04-04 07:27:10 +00:00
Susi Kharraz-Post
0c70be6738 Merge "Add logging for direct share target" 2019-04-04 00:03:56 +00:00
TreeHugger Robot
259c73c007 Merge "Move NetworkStatsFactory into service directory" 2019-04-03 23:44:26 +00:00
Susi Kharraz-Post
14cbfcdbd0 Add logging for direct share target
To answer the question if users share mainly with 1 or 2 direct targets
or with a multitude of contacts, we need to log the direct target +
package name. For privacy, this gets hashed with a salt that expires by
default every 7 days. The PH flag will allow us to change the expiration
time if we obtain PWG permission for that.

Bug: 126365511
Test: New test in ChooserActivityTest + manual testing of consistency
and flag rollout using adb shell device_config put systemui
hash_salt_max_days with multiple values

Change-Id: Ib4255b3eb39ca91ccb5803dc036ffe0ea83a27c9
2019-04-03 17:54:25 -04:00
Chenbo Feng
061cec7755 Move NetworkStatsFactory into service directory
In order to notify netd to swap eBPF maps before pulling the
networkStats from eBPF maps, NetworkStatsFactory need to use the
NetdServices to issue binder calls. So it need to be moved from
framework/base/core to framework/base/service since object in
framework/base/core cannot get any system services. This change is also
necessary for setting up a lock inside NetworkStatsFactory to prevent
racing between two netstats caller since the lock need to be hold before
netd trigger the map swap.

Also fix the compile problem caused by moving the NetworkStatsFactory
and the related tests. Rename the packages and the jni functions to a
more proper name.

Bug: 124764595
Bug: 128900919
Test: NetworkStatsFactoryTest
      android.app.usage.cts.NetworkUsageStatsTest
      android.net.cts.TrafficStatsTest

Change-Id: Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8
2019-04-03 14:28:41 -07:00
Chris Wailes
6d482d541e Adds Zygote.initNativeState
This patch replaces three seperate native initialization functions with
a single function, reducing the number of times we need to cross the JNI
boundary.  In addition this loads an empty performance profile for the
zygote to address b/129704892.

Bug: 129704892
Test: make & boot
Test: Treehugger
Change-Id: I0413f554e0963a714e0b4de3196d31ffe6775a3a
2019-04-03 13:42:35 -07:00
Jean-Michel Trivi
c6d7460140 Merge "PlayerBase: conditional muting on OP_PLAY_AUDIO changes" 2019-04-03 19:58:59 +00:00
TreeHugger Robot
03a8c09514 Merge "Remove obscure check that was always true" 2019-04-03 18:19:02 +00:00
Misha Wagner
2d0caa4946 Change KernelCpuThreadReader frequency bucketing to work with >2 core clusters
Change-Id: I470dc055b9b1eb07913280fc269fbdadb259b4db
Test: atest KernelCpuThreadReaderTest
2019-04-03 16:24:22 +01:00
Jorim Jaggi
cd5046c382 Remove obscure check that was always true
This condition never made any sense because we checked the
systemUiVisibility field for a WindowManager flag. Instead of
trying to fix it, let's just remove the check to keep the
behavior.

Test: boots
Bug: 129751541
Change-Id: Ib0ace4d47f5623b32430a8a7e4f25f5a259451ea
2019-04-03 13:58:14 +00:00
Amith Yamasani
282420fe7b Merge "Avoid elevating apps to high proc states on binding" 2019-04-03 05:50:28 +00:00
jianjin
332d1a9e01 Logging atom TOMB_STONE_OCCURRED when a tombstone file added to dropbox.
Bug: 126127632
Change-Id: I09b8649e0b53bce13b7a42c80b06bf354196e9af
Fix: 126127632
Test: manually test by triggering tombstone and check statsd log
2019-04-02 14:27:32 -07:00
TreeHugger Robot
452d42f517 Merge "Pick the primary color as the best color to use." 2019-04-02 20:53:39 +00:00
Robert Snoeberger
a6684f6713 Pick the primary color as the best color to use.
Previously, the best color was picked by checking the colors
against the blacklist. The logic was for picking the best color
was broken When the blacklist was removed for
b/124180048.

Fixes: b129762944
Test: New test points added to TonalTest.java
Change-Id: Ie51806735910bb40e5e66d7baf545ea213e4a01e
2019-04-02 15:15:38 -04:00
jianjin
8f2dee04e2 Create and log atom SystemServerWatchdogOccurred, TombStoneOccurred.
Bug: 126127632
Change-Id: I1e78069589185a4702d65cd026bc44b374a31f0a
Fix: 126127632
Test: none
2019-04-02 11:05:45 -07:00
TreeHugger Robot
d5c80f29cd Merge "Sharesheet - Give shortcut api results priority" 2019-04-02 17:53:24 +00:00
Amith Yamasani
f235d0b53a Avoid elevating apps to high proc states on binding
For service and provider bindings from TOP and
FOREGROUND_SERVICE apps, don't elevate bound apps
to above BOUND_FOREGROUND_SERVICE.

For service bindings, it is possible to explicitly
request the binding to match the foreground app
such that the bound app can get similar privileges
of foreground permissions.

For instance, when a foreground service has a location
type, providers it binds to don't automatically get the
location privilege. On the other hand, sometimes apps
showing UI want to treat their dependencies also as if
they are showing UI.

This change does not affect the oom_adj calculation,
only the proc state calculation for bound processes.

New BIND_INCLUDE_CAPABILITIES flag can be used to restore old
behavior for bound services.

Introduces a new state PROCESS_STATE_BOUND_TOP

Bug: 128337543
Test: atest CtsAppTestCases:ActivityManagerProcessStateTest

Change-Id: I13733e7f43a78903299254bc110cd8f7a8db4c40
2019-04-02 10:27:03 -07:00
TreeHugger Robot
43aae704a4 Merge "Sharesheet - Photos -> Sharesheet in work profile crashes" 2019-04-02 16:20:23 +00:00
Matt Pietal
fbfa049856 Sharesheet - Give shortcut api results priority
Limit the direct share list to MAX_SERVICE_COUNT and discard any
results over that. Do not furthur rank results from App Prediction
Service, and also give other shortcut results priority over older
direct share targets

Bug: 126568576
Test: atest ChooserActivityTest
Change-Id: I2e2d53134273583a504c71ae4daa9f1db951b164
2019-04-02 11:07:18 -04:00
TreeHugger Robot
01f1178bab Merge "Fix sharesheet permissioned icon loading bug" 2019-04-02 14:32:11 +00:00
Matt Pietal
51ea0d68cc Sharesheet - Photos -> Sharesheet in work profile crashes
The issue stems from adding the incorrect userid when first entering
the sharesheet. The flow from Photos sendkit directly to the work
profile sharesheet was setting the incorrect userid on the content
uris. Move this logic to the correct location.

Bug: 129280812
Test: Manually retest Photos->Share->Work Profile->Chat
Change-Id: I3660684336450172852cf86bea1f3c60cf15aa87
2019-04-02 10:10:22 -04:00
Misha Wagner
ab922b13cd Merge "Add diffing to KernelCpuThreadReader" 2019-04-02 13:19:49 +00:00
Steven Moreland
0ec1b0f9de Merge "Revert "Revert "Preload non-bootclasspath Java lib ClassLoaders.""" am: 4b5ca28dfe am: 4e709ea3fd
am: 96724b57ae

Change-Id: I3de2f4b4fb092d0db5001209d68ea217e150b8da
2019-04-01 20:14:55 -07:00
Steven Moreland
96724b57ae Merge "Revert "Revert "Preload non-bootclasspath Java lib ClassLoaders.""" am: 4b5ca28dfe
am: 4e709ea3fd

Change-Id: Ia5b6280f17a67f0fa791f36544a77e2af99e7e0e
2019-04-01 19:50:13 -07:00
Steven Moreland
4e709ea3fd Merge "Revert "Revert "Preload non-bootclasspath Java lib ClassLoaders."""
am: 4b5ca28dfe

Change-Id: I63fa6d4a8671db24bf9fce898414c27068547ed2
2019-04-01 19:38:43 -07:00
Steven Moreland
4b5ca28dfe Merge "Revert "Revert "Preload non-bootclasspath Java lib ClassLoaders.""" 2019-04-02 02:19:44 +00:00
Philip P. Moltmann
129a0b0c5e Remove dual storage permission model
- Also remove typed media permissions
- Leave typed media app-ops

Bug: 129716569
Test: Used apps, looked at permissions in the UI
Change-Id: If7714fb1a6955584157e1a60ab72b09e35287827
2019-04-01 16:30:11 -07:00
Mike Digman
c0ef5542ad Fix sharesheet permissioned icon loading bug
In some cases, returned ResolveInfo may not have a set icon but
it will always have an associated ActivityInfo. Fall back to
that ActivityInfo when no icon is set. Permissioned apps now
properly have their icon fetched.

Fixes: 129460747
Fixes: 125908050
Test: manual
Change-Id: I624b1d455106c987b1e3f6623ef9e69d22882e59
2019-04-01 22:48:24 +00:00
TreeHugger Robot
833207566c Merge "Sharesheet - Make UI more responsive to touches when loading" 2019-04-01 15:26:05 +00:00
Matt Pietal
af044aefd9 Sharesheet - Make UI more responsive to touches when loading
ListView will try to prevent errant touches while data is being
loaded. With Sharesheet, this can happen quite frequently so 1:
eliminate unnecessary notifyDataSetChanged calls and 2: batch up the
remaining calls and release a single call on an interval.

Bug: 126568576
Test: atest ChooserActivityTest && atest ResolverActivityTest
Change-Id: I3207f207910a0c9223a1b562243d9db612f93b0a
2019-04-01 08:52:42 -04:00
Winson Chiu
fbe87233d5 Merge changes from topic "code-paths-and-resources-caching-fix"
* changes:
  Revert ContextImpl LoadedApk packageInfo caching workaround
  Fix AssetManager2 isUpToDate check
  Diff resource dirs when checking LoadedApk packageInfo cache in ActivityThread
  Diff overlays between PackageManagerService and OverlayManagerService
  Propagate base code path and split dir changes to Resources objects
2019-03-29 23:50:02 +00:00
Steven Moreland
bdc2702cdf Revert "Revert "Preload non-bootclasspath Java lib ClassLoaders.""
This reverts commit d3c2bc5a4e.

Reason for revert: reland fix
Bug: 128529256

Change-Id: I0647d4242406e31348a68ebba328e5f8ad750144
2019-03-29 21:52:32 +00:00
TreeHugger Robot
bc9f5a518d Merge "Show updated labels for apps and DS in Sharesheet" 2019-03-29 18:32:33 +00:00
Mike Digman
ba23268fe2 Show updated labels for apps and DS in Sharesheet
Shows activity and app label for all share targets except those
with the right permission. Shows 2 wrapping lines as a label for
all direct share targets. Brings grid item layout closer to spec.
Fixes several associated bugs.

Fixes: 125908050
Test: included label test, manual
Change-Id: I5c2cc0700b59911d79aebf2582176497c30bf85c
2019-03-29 09:06:53 -07:00
Felipe Leme
afbba9fb36 Checks package name belongs to called UID on some content capture methods.
Also refactored how the SecurityException is thrown back to the caller app.

Bug: 122959591
Test: manual verification
Test: atest CtsContentCaptureServiceTestCases # sanity check (minus usual flakiness)

Change-Id: I4d2a68e61dc1c801d80734a30f4bbe6fdae8555d
2019-03-28 19:31:52 -07:00
Felipe Leme
a8d33c24f8 Implemented ContentCaptureConditions APIs.
Test: atest ContentCaptureConditionTest \
       CustomViewActivityTest#testContentCaptureConditions \
       CustomViewActivityTest#testContentCaptureConditions_otherPackage
Test: atest CtsContentCaptureServiceTestCases # sanity check (minus usual flakiness)

Fixes: 129266058

Change-Id: I199c3ae99fa6b407da64562a71d8d7581ebf80e6
2019-03-28 18:48:31 -07:00
Varun Anand
112b8bd6c5 Merge changes from topic "vpn_data_accounting" am: 6c93e5378a
am: 09ef7691f5

Change-Id: If4fff1b4d14e80e024ce7b1aa85ebd3afcb1ecc2
2019-03-28 18:16:37 -07:00
Varun Anand
09ef7691f5 Merge changes from topic "vpn_data_accounting"
am: 6c93e5378a

Change-Id: Iaa4b2dd9be2fc6e9833c6c846b6858aab507ca8b
2019-03-28 18:06:12 -07:00
Varun Anand
6c93e5378a Merge changes from topic "vpn_data_accounting"
* changes:
  Move BatteryStats and StatsCompanionService to use NetworkStatsService.
  NetworkStatsService: Fix getDetailedUidStats to take VPNs into account.
  Take all VPN underlying networks into account when migrating traffic for VPN uid.
2019-03-29 00:40:53 +00:00
TreeHugger Robot
f83f8ee39a Merge "Fixed ContentCapture and AugmentedAutofill methods that should not hold the main lock..." 2019-03-28 17:32:49 +00:00
Varun Anand
346aa87544 Move BatteryStats and StatsCompanionService to use NetworkStatsService.
This CL is a manual merge of http://ag/c/6015966/3.

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests
Test: manual test: verified that BatteryStats are correctly accounting
for VPN traffic.
Change-Id: I5b07ce70ac58bdcbebc3114bfe9fd411469d57af
Merged-In: I230c1edbf64cfeb3dbb560db368b5e420f7b79a4
2019-03-28 10:31:51 -07:00
Varun Anand
29d2ef2fe1 NetworkStatsService: Fix getDetailedUidStats to take VPNs into account.
This API is similar to one provided by NetworkStatsFactory with the
difference that NSS also migrates traffic from VPN UID to other apps.

Since traffic can only be migrated over NetworkStats delta, NSS
therefore maintains NetworkStats snapshot across all UIDs/ifaces/tags.

This snapshot gets updated whenever NSS records a new snapshot
(based on various hooks such as VPN updating its underlying networks,
network getting lost, etc.), or getDetailedUidStats API is invoked by
one of its callers.

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests
Test: manually verified that battery stats are migrating traffic off of
TUN (after patching above CL where we point BatteryStats to use this
API).
Change-Id: Ib0f0c2d4d41ee1d7a027ea9da457baaf198d649e
2019-03-28 10:31:51 -07:00
Varun Anand
95aa6d446f Take all VPN underlying networks into account when migrating traffic for
VPN uid.

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests
Test: Manually verified on device that stats from VPN UID are moved
      appropriately based on its declared underlying network set.
Test: vogar --mode app_process --benchmark NetworkStatsBenchmark.java

Change-Id: I9d8d0cc58d18002c1c96f8ddff780ef8dc452d21
2019-03-28 10:31:49 -07:00
Nicolas Geoffray
b44f61e98f Merge "Revert "Preload non-bootclasspath Java lib ClassLoaders."" am: d08c3b655b am: 7561d4667c
am: f2c49988c3

Change-Id: If2f2b20b1269f9750d3f56c392fa7ae7f29c86ff
2019-03-28 03:09:39 -07:00
Nicolas Geoffray
f2c49988c3 Merge "Revert "Preload non-bootclasspath Java lib ClassLoaders."" am: d08c3b655b
am: 7561d4667c

Change-Id: Id50466763aedf746d796af8575ea922fdd9cad8e
2019-03-28 02:55:41 -07:00
Nicolas Geoffray
7561d4667c Merge "Revert "Preload non-bootclasspath Java lib ClassLoaders.""
am: d08c3b655b

Change-Id: Id04898d99862cc1fff248fc9ba466faf55e30eb7
2019-03-28 02:39:21 -07:00
Nicolas Geoffray
d08c3b655b Merge "Revert "Preload non-bootclasspath Java lib ClassLoaders."" 2019-03-28 09:27:05 +00:00
Nicolas Geoffray
d3c2bc5a4e Revert "Preload non-bootclasspath Java lib ClassLoaders."
This reverts commit 1b11aaaf9b.

Bug: 128529256
Bug: 127406460

Reason for revert: Breaks FSI

Change-Id: Ie9775779cda7b376c36493f3ce3246eafc672c59
2019-03-28 09:25:11 +00:00
TreeHugger Robot
e40005e309 Merge "Create an ro property for headless system user." 2019-03-28 06:06:32 +00:00
Felipe Leme
9bee9440db Fixed ContentCapture and AugmentedAutofill methods that should not hold the main lock...
...otherwise they could ANR the ActivityManagerService and crash the system

Test: manual verification
Test: atest AugmentedLoginActivityTest
Test: atest CtsContentCaptureServiceTestCases # sanity check (minus usual flakiness)

Fixes: 129410913
Bug: 126266412

Change-Id: I4b0b0c389dd2c34928c6fffeec2854518a5e7da1
2019-03-27 17:11:08 -07:00