Commit Graph

13538 Commits

Author SHA1 Message Date
Neil Fuller
e01a7adf5a resolve merge conflicts of 55c0a66825 to stage-aosp-master
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ie524607cabc6688911eee7e4f61c50fd406c71f4
2018-06-26 11:55:46 +01:00
Neil Fuller
cccc48d0fe Minimum viable TimeZoneDetectorService
This is a do-nothing TimeZoneDetectorService that can be
populated in following commits. A temporary method has been
added so the service has one method.

Unit tests can be run with:

atest FrameworksServicesTests:TimeZoneDetectorServiceTest

Test: build / boot
Test: See above
Merged-In: I565fb5dd2f18b7aac2e5779d346bfe69e9da02af
Change-Id: I565fb5dd2f18b7aac2e5779d346bfe69e9da02af
2018-06-21 09:30:34 +00:00
Evan Laird
3f3aa3518f Merge "Use disableForUser in StatusBarManager"
am: 5392d799ab

Change-Id: I346f8a17d43e65c6e9ed362942345146ad6cac1d
2018-06-13 08:56:41 -07:00
Neil Fuller
10e276a24d Fix a syntax error in SystemServiceRegistry
The syntax error was introduced by a bad conflict resolution
in http://ag/4324946.

Bug: 110097023
Test: Inspection only
Merged-In: I9e4eac70b944441f34491315cd1ce7fa2b9ae150
Change-Id: I546f2d010faa6f75033cf7e3e51ef7ed640854ed
2018-06-12 20:20:27 +01:00
Evan Laird
172708b539 Use disableForUser in StatusBarManager
If a secondary user is added to the device and in the middle of SUW, the
SUW process can be killed via ADB. This will cause the process to get
restarted and call StatusBarManager#disable()/disable2(), which uses the
StatusBarManagerService methods that use the current uid.

The fix is to use Binder.getCallingUserHandle() in StatusBarManager so that the
SUW from another user can't affect the current user unless it is
current.

Test: start SUW from new user, cancel set up and go back to primary
user. Kill the SUW process. Nav bars remain un-hidden

Change-Id: Ie6f648827d8d384ae87f74e2d746b7566a7b9011
Fixes: 78360699
2018-06-12 15:14:25 -04:00
Neil Fuller
415585f2a5 Merge "Simple pass-through TimeDetectorService"
am: cb749e2e50

Change-Id: Ic2e3d3c3f9181ef4054f599baf4ac086ec21d8bd
2018-06-12 11:17:51 -07:00
Neil Fuller
4773b9dadc Simple pass-through TimeDetectorService
This is sufficient to wire up time detection from telephony
to the new service without breaking time detection.

This cherry-pick contains a small change: to use
SystemClock.elapsedRealtime() instead of the newer
SystemClock.elapsedRealtimeClock() with Clock.millis().

Bug: 78217059
Test: atest FrameworksServicesTests:com.android.server.timedetector
Test: atest FrameworksCoreTests:android.util.TimestampedValueTest
Merged-In: Id7175878dc22e5272c31f3e478af4b0e4183b62b
Change-Id: Id7175878dc22e5272c31f3e478af4b0e4183b62b
(cherry picked from commit 24836bfb15)
2018-06-12 15:33:35 +01:00
Neil Fuller
79d42a61e4 resolve merge conflicts of 5e1d95b0cc to stage-aosp-master
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ic5527b29cbe8c84d2053be849cf09df5341e4790
2018-06-12 14:23:51 +01:00
Neil Fuller
b557907f51 Minimum viable TimeDetectorService
This is a do-nothing TimeDetectorService that can be
populated in following commits. A temporary method has been
added so the service has one method.

Unit tests can be run with:

atest FrameworksServicesTests:TimeDetectorServiceTest

Test: build / boot
Test: See above
Merged-In: I9e4eac70b944441f34491315cd1ce7fa2b9ae150
Change-Id: I9e4eac70b944441f34491315cd1ce7fa2b9ae150
(cherry picked from commit feeee682a2)
2018-06-11 15:29:57 +01:00
nharold
b2749539c0 Merge changes from topic "ipsec-sync-with-pi"
* changes:
  Disable the AppOp Restriction for IpSec Tunnels
  Rework Exception Handling for IpSecManager
  Update IpSecManager to use InetAddress and prefixLen
  Add AppOps Checks for MANAGE_IPSEC_TUNNELS
  Add MANAGE_IPSEC_TUNNELS Permission
2018-06-08 17:07:11 +00:00
Adam Powell
f8677d0b41 Merge "Revert "Let sendShowMessage called from hide to show"" into pi-dev
am: eaf3590eda

Change-Id: I569a2caf105c4b6cf60b81026567ef4af7ca31c9
2018-06-07 21:18:10 -07:00
TreeHugger Robot
eaf3590eda Merge "Revert "Let sendShowMessage called from hide to show"" into pi-dev 2018-06-08 03:48:21 +00:00
Nathan Harold
21208eeccc Add AppOps Checks for MANAGE_IPSEC_TUNNELS
Adds support for a new AppOp to permit services to
use IpSec tunnel mode. The IpSecService now needs
a context so change the service mode to a cached
service rather than a static service.

Bug: 66955045
Test: runtest frameworks-net
Merged-In: I17a4a286225b432c3e15ea1587d946189931b4f4
Change-Id: I17a4a286225b432c3e15ea1587d946189931b4f4
(cherry picked from commit 592dadbd43)
2018-06-07 18:42:52 -07:00
Benjamin Miller
84184d72d2 Merge "docs: Backup requestRestore() doesn't kill app during restore." into pi-dev
am: d97f38f69c

Change-Id: Icb22a68fe4402434a4dfae1856fade5219f461fc
2018-06-07 13:25:16 -07:00
Benjamin Miller
d97f38f69c Merge "docs: Backup requestRestore() doesn't kill app during restore." into pi-dev 2018-06-07 20:12:43 +00:00
Winson Chung
d827b1452d Merge "Consider window background opacity when determining snapshot translucency" into pi-dev
am: c6e4acc222

Change-Id: I53f7b22ab35979d7bf0933e59985b35e0127c717
2018-06-07 12:42:09 -07:00
Chalard Jean
042be01f9e Opportunistic typo fix
Test: unneeded
Change-Id: I2f5636f3d7ea4b6e9d3e6feddfd0cb586d658813
2018-06-07 14:55:31 +09:00
Winson Chung
02378b4307 Consider window background opacity when determining snapshot translucency
Bug: 80536978
Test: Open WhatsApp conversation with IME open, hit home, go to Overview
Change-Id: I14cb15a15c2dc43229c927eda4bad3d61e568622
2018-06-06 19:40:27 -07:00
Julia Reynolds
bbaf6a4a6f Merge "Further interruptiveness changes" into pi-dev
am: fe1d9dc1af

Change-Id: Ic258eaf306dc05850015808c9b67b07398575770
2018-06-06 06:58:54 -07:00
TreeHugger Robot
fe1d9dc1af Merge "Further interruptiveness changes" into pi-dev 2018-06-06 13:46:42 +00:00
Benjamin Miller
9c593f27ad docs: Backup requestRestore() doesn't kill app during restore.
Doc-only change to note that requestRestore() doesn't behave as expected
and kill the app as part of the restore operation.
Fixed formatting of first paragraph running into deprecation notice.
Also removed dupe versioning info from deprecation notice--see staged version.
Staged at:
  http://go/dac-stage/reference/android/app/backup/BackupManager#requestrestore

Bug: 29255593
Test: make ds-docs and staged output. Visual inspection and manual link test.
Change-Id: I8baae2216f23bd63510f8b445fcdd8090354b0df
2018-06-06 09:08:11 +00:00
Jiyong Park
0221eaa392 Merge "Fix: vendor public libraries are accessible via System.loadLibrary" into pi-dev
am: c4b6bd34e1

Change-Id: I585a02298349846c2bedc5617cb342edaadcb9bb
2018-06-05 10:51:37 -07:00
Jiyong Park
c4b6bd34e1 Merge "Fix: vendor public libraries are accessible via System.loadLibrary" into pi-dev 2018-06-05 17:37:24 +00:00
Julia Reynolds
a4fb9da879 Further interruptiveness changes
- Compare strings instead of CharSequences in actions
- Ignore changes to remote input choices
- Ignore updates to summaries

Test: runtest systemui-notification
Change-Id: I33a29ee85d93658b2c7217a4ef3b300c9bd2850c
Fixes: 78643290
2018-06-05 09:01:32 -04:00
Makoto Onuki
5c6e5f189a Merge "Allow except-idle whitelisted apps to start BG services in EBS" into pi-dev
am: 205a5581ae

Change-Id: Ie5d327d5efa90946d92fe3a7063fec988fe56fcd
2018-06-04 18:47:48 -07:00
Makoto Onuki
af8ff4f2af Allow except-idle whitelisted apps to start BG services in EBS
Change-Id: I8dd42f48cf13c97b4e428afbf29838f442d8731b
Fixes: 80420676
Test: dumpsys activity processes| grep mDeviceIdle
  mDeviceIdleWhitelist=[1000, 1001, 2000, 10028, 10035, 10036, 10042, 10053, 10137, 10138, 10139, 10142]
  mDeviceIdleExceptIdleWhitelist=[1000, 1001, 2000, 10006, 10008, 10014, 10016, 10028, 10035, 10036, 10042, 10047, 10053, 10058, 10060, 10070, 10111, 10137, 10138, 10139, 10142]
Test: Manual test with "DEBUG_BACKGROUND_CHECK = true" and
am startservice 'com.android.vending/com.google.android.finsky.hygiene.DailyHygiene\$DailyHygieneService'
then check the whitelist log.
2018-06-04 15:31:42 -07:00
Adam Powell
fdaf523f04 Revert "Let sendShowMessage called from hide to show"
This reverts commit 690b36903c.

Original patch created an inconsistency in show/dismiss
dialog callbacks.

Bug: 80268176
2018-06-04 14:28:00 -07:00
Jiyong Park
cfe38cdb1c Fix: vendor public libraries are accessible via System.loadLibrary
This CL fixes the problem that vendor public libraries (libs that are
listed in /vendor/etc/public.libraries.txt) are not loadable via
System.loadLibrary(). (Note that the libs were accessible via dlopen()
though.)

The problem was happening because when System.loadLibary() is called,
the classloader first checks whether the lib is found and accessible in
its own native lib search paths. The native lib search paths basically
come from the java.library.path property, which in turn is from
namespace.default.search.path in /system/etc/ld.config.txt. When VNDK is
enforced starting from P, namespace.default.search.path does not have
paths other than /system/lib because otherwise system process can have
unlimited access to libs in vendor partition. The linker namespace is
dynamically configured by the libnativeloader so that only the public
vendor libs are accessible. However, as a side effect of removing
/vendor/lib from namespace.default.search.path, the classloader always
fails to find any lib under /vendor/lib even if the lib is a public one.

In order to solve the problem, while keeping rest of the non-public
vendor libs from apps, /vendor/lib (and /odm/lib and /product/lib as
well) is added to the classloader AFTER native loader is created for the
classloader.

Bug: 93333337
Test: m -j
Test: System.loadLibrary("adsprpc") is successful in Pixel (because
libadsprpc.so is in Pixel's vendor public lib list)
Test: atest cts/tests/tests/jni
Change-Id: Iac12384548cbdd51234568082d02eeba466c160c
2018-06-04 15:31:47 +00:00
Makoto Onuki
137f9f65a9 Merge "Serialize AM.getContentProvider() calls in client side" into pi-dev
am: 079f6d7fa6

Change-Id: I299267e20b78810002bab56488b9436456936d11
2018-06-01 04:46:08 -07:00
Makoto Onuki
079f6d7fa6 Merge "Serialize AM.getContentProvider() calls in client side" into pi-dev 2018-06-01 05:35:02 +00:00
Makoto Onuki
b6c79ea065 Serialize AM.getContentProvider() calls in client side
Th wait() call in AMS.getContentProviderImpl() can cause a deadlock when it
starts a new process for a target provider and all system server binder threads
are reaching out to the same provider at the same time, because AMS won't be
able to receive a callback from the provider process.

Let's serialize access to AM.getContentProvider() to avoid this scenario.

Longer team, we should stop waiting in the system server and instead do so in
the client side.

Bug: 74523247
Test: Boot, add a google account, and let syncs run and finish.
Test: Watch free video on Coursera

Change-Id: If5be2dc4b6f22f72d1bb3aa1b5b4d49f20c8d94d
2018-05-31 14:52:51 -07:00
Jason Monk
b9e5da09b5 Merge "Don't use stable providers for slices" into pi-dev
am: de8e3c227c

Change-Id: I40b6eef84e5d44b1c185f9818953a6dba8dc9adc
2018-05-31 14:46:38 -07:00
Jason Monk
ce1beadc09 Don't use stable providers for slices
Because they aren't what we want.

Test: manual + existing tests
Bug: 80532760
Change-Id: Ib69799a2ef9440d0d67cea02e6b3c61844535755
2018-05-31 14:12:52 -04:00
Amith Yamasani
2b04227379 Merge "Fix for missing location icon" into pi-dev
am: 8c4c359b25

Change-Id: I1e108f56230915e0950712a0fa2cc363e3ffbc9e
2018-05-29 13:22:35 -07:00
Amith Yamasani
a1ce963743 Fix for missing location icon
OpEntry.duration was being used to indicate that the
operation was still running if -1 is returned. A recent
change caused a regression.

Adding a new mRunning field in OpEntry to explicitly
hold the running state, even when partial duration is
updated.

Change-Id: Ib29f4c903f990aaa202e84f964959aedfc24abdb
Fixes: 80242152
Test: atest FrameworksServicesTests:AppOpsActiveWatcherTest
Test: Launch maps and verify the location icon is visible
      in the status bar
2018-05-28 21:20:56 -07:00
Jason Monk
3f3f1ebc17 Merge "Final cleanups to permission slices" into pi-dev
am: 64a33d695d

Change-Id: I3256c8ca665ede11bab55072cddb8598c1d3b51b
2018-05-25 15:26:03 -07:00
TreeHugger Robot
64a33d695d Merge "Final cleanups to permission slices" into pi-dev 2018-05-25 22:10:20 +00:00
Selim Cinek
7712d46760 Merge "Fixed the behavior of group conversations when targeting P" into pi-dev
am: c4e19963f4

Change-Id: I7e5feadc253816852528e06719e136a7cba51c49
2018-05-25 13:21:38 -07:00
Selim Cinek
c4e19963f4 Merge "Fixed the behavior of group conversations when targeting P" into pi-dev 2018-05-25 20:06:52 +00:00
Jason Monk
b14dde0793 Final cleanups to permission slices
- Add icons to the right and shortcut modes
 - Add color
 - Make sure dialogs are secure

Test: manual
Bug: 79960669
Change-Id: I6d251b0ea5bd3c1b3eed32b184e4aae22c52ffb5
2018-05-25 15:42:16 -04:00
Treehugger Robot
4517eacd5d Merge "Fix: ConnectivityManager is initialized with a wrong context" 2018-05-25 16:42:59 +00:00
Selim Cinek
ce8794fbbc Fixed the behavior of group conversations when targeting P
Fixes an issue where the group conversation heuristic was still
applied even when the app is targeting P. We're now following
the isGroupConversation completely and only do the migration
for apps targeting < P.

Change-Id: I471d58e8a8f5e6270f0dcce8691d08a2bdd1c582
Fixes: 78450835
Test: add messaging notification, observe correct display
2018-05-25 09:16:38 -07:00
Tetsutoki Shiozawa
f9f15fce9d Fix: ConnectivityManager is initialized with a wrong context
ActivityThread#setHttpProxy uses a system context to get
a ConnectivityManager instance. If it's not already cached, the
system service registry will cache this instance initialized
with the system context, and subsequent calls to get this service
will return the bad instance.
This patch uses the application context instead, unless it's
not available for some unlikely reason.

A possible symptom of this issue is to have Bluetooth tethering
failing with a security exception, because it's requested by
the "android" package without system uid.

Merged-In: Ib8815f010883cdb94fcad2cdfb237de39327b20a
Bug: 73572062
Change-Id: Id652c1625194dc73dcbf8dfcad4b4e2e6fbebf4e
2018-05-25 15:04:59 +00:00
Makoto Onuki
d8cf91c5f8 Merge "Tweak exemption for sync requests made by FG apps" into pi-dev
am: 621fd20f55

Change-Id: I31ae3e9e11b9defb7e6352830439484d7ec7ac01
2018-05-24 17:54:37 -07:00
Makoto Onuki
621fd20f55 Merge "Tweak exemption for sync requests made by FG apps" into pi-dev 2018-05-24 23:22:09 +00:00
Michael Wachenschwanz
3ba689851c Merge "Revert "Revert "Write UsageEvents Parcel data as a Blob""" into pi-dev
am: 14c61286c4

Change-Id: If4e6d7fbf0d6799ce88ec33b37fb8cef7e290f1e
2018-05-24 14:26:40 -07:00
Lucas Dupin
30f0867ee0 Merge "Revert "WallpaperColors hint computation"" into pi-dev
am: cf2c35dca6

Change-Id: Ibc3760ce650c8d48f261e6486edb51582391b710
2018-05-24 14:03:24 -07:00
Michael Wachenschwanz
14c61286c4 Merge "Revert "Revert "Write UsageEvents Parcel data as a Blob""" into pi-dev 2018-05-24 20:45:34 +00:00
TreeHugger Robot
cf2c35dca6 Merge "Revert "WallpaperColors hint computation"" into pi-dev 2018-05-24 20:00:27 +00:00
Michael Wachenschwanz
2c2424a091 Merge "Revert "Write UsageEvents Parcel data as a Blob"" into pi-dev
am: d55c618340

Change-Id: I88a269fd3bcb9f6cda5c6f95ac7edb84db1239f1
2018-05-24 12:53:33 -07:00