Commit Graph

13558 Commits

Author SHA1 Message Date
David Brazdil
c2a8de549b Remove non-SDK API toast
It served its purpose but it's time to remove it.

Test: m
Change-Id: Idc36cacae89e74f5ce01bcf51dce24cdedfda40f
2018-11-01 10:05:28 +00:00
Nathan Harold
f5cf9f24ed Merge "Move some members to the "Q blacklist"." 2018-10-23 21:53:51 +00:00
Mathew Inwood
45d2c252b1 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
Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
(cherry picked from commit 8c854f86a4)
2018-10-22 17:28:24 -07:00
Mike Ma
8964390dd3 Merge "Avoiding potential NPE when dumping to proto."
am: a52b601ef3

Change-Id: I9d5e520654877e6a46ea19ad3eddd3a901e58699
2018-09-11 18:26:45 -07:00
Kweku Adams
ce8e43f8d2 Avoiding potential NPE when dumping to proto.
Inspired by aosp/736453. Cherry-picked from ag/4934453

Bug: 113087610
Test: Android builds
Change-Id: I9f0dae9cd5a839947c7ed150980eb30b928beef7
2018-09-11 19:21:52 +00:00
Mathew Inwood
2e5fdd0051 Merge "Add @UnsupportedAppUsage annotations"
am: 9137ecafbd

Change-Id: I467341cc8f70554f58266ddc28ff3a648ec5cc18
2018-08-30 08:57:54 -07:00
Mathew Inwood
71da3a1fe4 Add @UnsupportedAppUsage annotations
For all remaining unannotated code.

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I32861fa341a08f11a9c50c07a1ef7404dadf6bb6
Merged-In: I67c8b71ea535ebffb10bf577948bd4ccb8ca069d
2018-08-30 13:38:01 +01:00
Mathew Inwood
62a722476a Merge "Add @UnsupportedAppUsage annotations"
am: d08509363c

Change-Id: I380a6ba241998dbc694716986521dfcbf66fa7d2
2018-08-15 07:57:40 -07:00
Mathew Inwood
4fb17d17ca Add @UnsupportedAppUsage annotations
For packages:
  android.app.usage
  android.app.trust
  android.app.timezonedetector
  android.app.timezone
  android.app.timedetector
  android.app.job
  android.app.backup
  android.app.assist
  android.app.admin
  android.app

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I5d15d50344d7178617418846917f693cfabf006b
Merged-In: I618c5dc4462ae990d9df45c3e9ed3f092cc5138c
2018-08-14 14:25:44 +01:00
Malcolm Chen
9afe59bf1c Have proper permission check in getConfigForSubId
In CarrierConfigManager, add pass context in constructor, so that
when calling CarrierConfigLoader#getConfigForSubId, it can pass
callingPackage.

Bug: 73136824
Test: regression
Change-Id: I4bbff4ea30e2d5473c14d24d6833bf3ca3c595ec
Merged-In: I4bbff4ea30e2d5473c14d24d6833bf3ca3c595ec
2018-07-31 18:43:01 -07:00
Malcolm Chen
05ab439039 Have proper permission check in getConfigForSubId
In CarrierConfigManager, add pass context in constructor, so that
when calling CarrierConfigLoader#getConfigForSubId, it can pass
callingPackage.

Bug: 73136824
Test: regression
Change-Id: I4bbff4ea30e2d5473c14d24d6833bf3ca3c595ec
Merged-In: I4bbff4ea30e2d5473c14d24d6833bf3ca3c595ec
2018-07-30 17:08:27 -07:00
Jorim Jaggi
5439a6ea84 Merge "Pin compiled code of HOME app" into pi-dev
am: 0e5e46f874

Change-Id: I205971bc6c8309fc4ad40b4a4677703adecf4a75
2018-07-13 17:13:14 -07:00
Jorim Jaggi
7119800f4b Pin compiled code of HOME app
Keeping the code in memory of the currently set home app is
important for latency as we don't have any kind of starting
window/splash screen when pressing the home app to hide any latency.

Memory impact:

Pinning dex/vdex:

In practical scenarios, this should be < 500kb.
The home app is usually profile-speed compiled, for which the
resulting dex/vdex files are about 2 mb. However, during regular
use, at least 1.5 MB of it is referenced in memory. This makes
sense: By definition profile-speed only compiles the things that
is usually frequently executed during regular execution.

Pinning apk:
With Launcher 3 in practical scenarios this should be about 3.7 MB,
as the APK is about 5.7 MB but 2 MB are usually referenced in any
case.

Bug: 111132016
Bug: 78585335
Test: Inspect "adb shell dumpsys pinner" after boot.
Test: Check for pinned files after updating camera/home.
Test: Check for pinned files after user switch with different
default apps.
Test: Check for pinned files after bg-dexopt.
Test: Check for pinned files after bg-dexopt + kill pid.

Change-Id: I6cdbc06d089efeb1c72a51216879ba0573502009
Merged-In: I6cdbc06d089efeb1c72a51216879ba0573502009
2018-07-13 13:20:48 +00:00
Neil Fuller
f18981698d resolve merge conflicts of 55c0a66825 to stage-aosp-master
am: e01a7adf5a

Change-Id: I993dc856b8fe0f42d7ad5f766727be32d3d611fe
2018-06-26 04:05:36 -07:00
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
Robin Lee
255c3b664d Merge "Do not treat EXTRA_SMALL_ICON <int> as Parcelable" into pi-dev
am: 82614bed0b

Change-Id: Iae08aea13f79273e6f47d3c32832cd4eddd51010
2018-06-13 14:40:21 -07:00
Evan Laird
f63718533f Merge "Use disableForUser in StatusBarManager" am: 5392d799ab
am: 3f3aa3518f

Change-Id: Ieb7bf7cc8d9fc54b56ec5f8d5caa723357c8ec6e
2018-06-13 09:09:03 -07:00
Evan Laird
3f3aa3518f Merge "Use disableForUser in StatusBarManager"
am: 5392d799ab

Change-Id: I346f8a17d43e65c6e9ed362942345146ad6cac1d
2018-06-13 08:56:41 -07:00
Neil Fuller
1ecf4ac212 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
(cherry picked from commit 10e276a24d)
2018-06-13 14:50:34 +00:00
Robin Lee
a6b5344bd3 Do not treat EXTRA_SMALL_ICON <int> as Parcelable
It isn't one, and I should have read the documentation on it properly
before treating it the same as EXTRA_LARGE_ICON (which is indeed a
Parcelable).

This fixes a chronic outpouring of technically-probably-harmless warning
stack traces of the following nature which can be verified by running
the framework tests and grepping logcat for this scary-looking string:

  java.lang.ClassCastException: java.lang.Integer cannot be cast to
  android.os.Parcelable
    at android.os.Bundle.getParcelable(Bundle.java:***)
    at android.app.Notification.fixDuplicateExtra
    at android.app.Notification.fixDuplicateExtras
    at android.app.Notification.readFromParcelImpl

Duplicate Integer objects are harmless compared to the Bitmap so there
is zero sense in recombining the objects after an RPC. We just drop the
line which tries to do that.

Test: make FrameworksCoreTests -j30 && \
Test: adb install -r ${ANDROID_PRODUCT_OUT}/data/app/*/FrameworksCoreTests.apk && \
Test: adb shell am instrument \
Test:   -e class android.app.NotificationTest \
Test:   -w com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I2c88ab4e9d5322c05e2e7f68df85ed5b2f296f84
Fix: 79404137
(cherry picked from commit 62eea67846)
2018-06-13 06:11:37 +00:00
Pengquan Meng
1969c54ae2 Merge "Remove internal ApnSetting." into pi-dev-plus-aosp 2018-06-12 21:38:22 +00: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
yuemingw
9bf808cce1 Remove internal ApnSetting.
Bug: 77511388
Test: atest FrameworksTelephonyTests
Change-Id: I9757ef4aae269d828c98a7363c98629c9be74846
2018-06-12 13:56:28 +00: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