Commit Graph

6469 Commits

Author SHA1 Message Date
TreeHugger Robot
3382443927 Merge "Update javadoc of PackageInstaller to mention the enterprise bit" 2018-02-22 12:02:38 +00:00
TreeHugger Robot
cc59285997 Merge "Package whitelist for hiddenapi checks." 2018-02-21 19:55:23 +00:00
TreeHugger Robot
00bbbd8a52 Merge "ApplicationInfo: Copy compileSdkVersion* fields" 2018-02-21 18:05:38 +00:00
Makoto Onuki
2ebb021231 Merge "Shortcut permissions for default text classifier" 2018-02-21 17:22:28 +00:00
Mathew Inwood
4693a75eda Package whitelist for hiddenapi checks.
Some packages in the system image are not built against the SDK, so
enforcing hiddenapi checks for these will break them. Add a whitelist
for such packages.

For now, just add the contacts provider to the whitelist. The list will be
further populated later.

Test: Added test app package name to whitelist to verify.

Bug: 73244707
Change-Id: I94746b7f12dd9371d5068bb235eb853f63ee4d97
2018-02-21 12:50:45 +00:00
Adam Lesinski
d3ea009911 ApplicationInfo: Copy compileSdkVersion* fields
Bug: 69798373
Test: atest CtsActivityManagerDeviceTestCases:PrereleaseSdkTest
Change-Id: I4208da1fc52f5567f23eceb87a2787fef60adc5f
2018-02-20 16:51:41 -08:00
Makoto Onuki
700feef8a6 Shortcut permissions for default text classifier
- Add two shortcut related permissions as SystemAPI for the default
text classifier.

- The default text classifier package name still comes from the
system resource.

Bug: 73083596
Bug: 71555985
Test: atest CtsPermission2TestCases
Test: Manual test with a test package, with the following in config.xml
<string name="config_defaultTextClassifierPackage" translatable="false">com.example.android.pm.shortcutlauncherdemo</string>

Change-Id: I19081d9d6ba0b33eb25d19aa55b4fe2f26a75897
2018-02-20 12:14:18 -08:00
Narayan Kamath
28ff9ceeeb Merge "Revert "Log the apk optimization state in the MetricsLogger"" 2018-02-20 18:17:34 +00:00
Narayan Kamath
203a9ab766 Revert "Log the apk optimization state in the MetricsLogger"
This reverts commit 0a8bea818c.


E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: ActivityManager
E AndroidRuntime: java.lang.NullPointerException: Attempt to read from field 'java.lang.String com.android.server.am.ProcessRecord.requiredAbi' on a null object reference
E AndroidRuntime:        at com.android.server.am.ActivityMetricsLogger.logAppTransition(ActivityMetricsLogger.java:504)
E AndroidRuntime:        at com.android.server.am.ActivityMetricsLogger.access$100(ActivityMetricsLogger.java:62)

Bug: 73626352
Change-Id: Idd50e0d2cf34e5393b4ae76ef8bc48b0067532eb
2018-02-20 17:06:21 +00:00
Tony Mak
366ee6269d Update javadoc of PackageInstaller to mention the enterprise bit
FIX: 70377922

Change-Id: I87fb995ff476448511076077ba99b1fe3d79b819
2018-02-20 15:07:01 +00:00
Calin Juravle
6e24ac8948 Merge "Log the apk optimization state in the MetricsLogger" 2018-02-19 19:36:08 +00:00
TreeHugger Robot
0c200baed4 Merge "Minor autofill changes to support compat mode CTS tests." 2018-02-17 11:17:05 +00:00
Svet Ganov
47b37aa034 Minor autofill changes to support compat mode CTS tests.
Bug: 72811561
Test: atest CtsAutoFillServiceTestCases:VirtualContainerActivityCompatModeTest

Change-Id: I6ec2563cea75afc77a1598805988d8e6c433c574
2018-02-16 18:01:17 -08:00
Calin Juravle
0a8bea818c Log the apk optimization state in the MetricsLogger
Log the apk optimization state for app transition events. This will allow
precise measurement of the events based on the level of optimizations
performed.

Test: manual, adb logcat -b events | grep sysui_multi_action
Bug: 73102540
Change-Id: Ia8ccddff4ebe4120e05bb5d1dfb1cd458fa61e8a
2018-02-16 15:46:14 -08:00
Adrian Roos
1d96275756 Merge "OverlayManager: Add categories" 2018-02-16 22:47:11 +00:00
Leon Scroggins
299b0e4b4e Merge "Reland "Call ImageDecoder directly in ResourcesImpl"" 2018-02-16 11:25:23 +00:00
Svet Ganov
59b4babaa0 ContextWrapper should check before calling wrapped instance for autofill compat
Test: manual

bug:73339515

Change-Id: I22cb219d6efb581d63c86de961772d948a7546da
2018-02-15 20:36:34 -08:00
Leon Scroggins III
513031d15b Reland "Call ImageDecoder directly in ResourcesImpl"
This reverts commit 0f05b4895d.

Bug: 73083791
Test: CTS (I08618dcd7707e5857ed8f8f01fd78b4129cd5804)

Change-Id: I8a95725c8453d94f406c2c14d2c3555dc1c2901f
2018-02-15 21:48:55 +00:00
Philip Quinn
b6bd3018c2 Add feature flag for assist gesture hardware.
Bug: 73176604
Test: make -j

Change-Id: I59f1c1638afe74a596c04e379d6d63b7f8c2df25
2018-02-14 03:09:28 +00:00
Adrian Roos
c84df7755c OverlayManager: Add categories
Adds the possibility to declare different categories
for resource overlays (e.g. themes, display cutout emulation, ...)

Bug: 72436677
Test: adb shell cmd overlay enable-exclusive --category com.android.internal.display_cutout_emulation android com.android.internal.display.cutout.emulation.narrow
Test: adb shell cmd overlay enable-exclusive --category com.android.internal.display_cutout_emulation android
Change-Id: I23f22113351b3948beb9e3a1fb969700852539cc
2018-02-13 14:41:38 -08:00
TreeHugger Robot
2566f5a2ff Merge "Add @throws clause to getInstallerPackageName" 2018-02-13 21:08:54 +00:00
Todd Kennedy
9db6563b29 Add @throws clause to getInstallerPackageName
It's confusing that this method would throw the unchecked
IllegalArgumentException.

Test: Manual
Change-Id: I0e7fbf888d6408783fbcf698db0407e773661968
Fixes: 73279116
2018-02-13 11:12:35 -08:00
TreeHugger Robot
08eabcf8d5 Merge "Send SHUTDOWN bc to registered receivers only" 2018-02-13 04:32:02 +00:00
Qingxi Li
ceb94979e3 Merge "Public EuiccManager APIs." 2018-02-12 22:09:53 +00:00
TreeHugger Robot
e848e106b6 Merge "Revert incorrect NonNull assertions in ColorStateList loading" 2018-02-12 19:17:14 +00:00
TreeHugger Robot
d6d5e0cc77 Merge changes from topic "revert-assetmanager2-02-09-2018"
* changes:
  Revert "Replace AssetManager with AssetManager2 implementation"
  Revert "libandroidfw: Make sure to set the 'app as lib' flag"
  Revert "Make idiomatic use of ApkAssets and AssetManager"
  Revert "libandroidfw: Add ApplyStyle and SetConfiguration benchmark"
  Revert "libandroidfw: Improve performance of AssetManager2"
  Revert "AssetManager2: Allow out of order type/type spec"
  Revert "AssetManager2: Fix list function"
  Revert "AssetManager2: Fix issue with native cast"
2018-02-10 03:42:41 +00:00
Chris Craik
2e41d49d00 Revert incorrect NonNull assertions in ColorStateList loading
Fixes: 73157047
Test: atest CtsContentTestCases:ResourcesTest

Partial revert of ceb2693621

Change-Id: I7c1db6f8d2b3451692b018212576960c78250d57
2018-02-09 14:29:11 -08:00
Dianne Hackborn
12ff371627 Add AttributeSet.getAttributeNamespace().
Why not.

Bug: 73101753
Test: Build and booted
Change-Id: I8f712ce9d7ed06eceef04d50a733a9471429b94c
2018-02-09 12:51:58 -08:00
Adam Lesinski
bde1df21ad Revert "Replace AssetManager with AssetManager2 implementation"
This reverts commit 1187590da3.

Bug: 73134570
Change-Id: I59b4d714e447478ea124f086356f127f42251fb7
2018-02-09 12:43:24 -08:00
Adam Lesinski
56c82be0d4 Revert "Make idiomatic use of ApkAssets and AssetManager"
This reverts commit 633085456e.

Bug: 73134570
Change-Id: I7c5171e752dd178dcd64497a780ba0f97d03b7a0
2018-02-09 12:43:15 -08:00
TreeHugger Robot
446772121f Merge "Send broadcast to pkg installers on config change" 2018-02-09 07:22:03 +00:00
TreeHugger Robot
25d7f46aa9 Merge "Revert "Call ImageDecoder directly in ResourcesImpl"" 2018-02-09 03:47:26 +00:00
TreeHugger Robot
88f284a3d3 Merge "Change Resources.getDrawable nullability" 2018-02-09 01:30:23 +00:00
Adam Lesinski
57fccd61a5 Send broadcast to pkg installers on config change
Send a protected system broadcast to apps that hold
the INSTALL_PACKAGES permission whenever a change to
properties like locale or display density happens.

Receivers can be registered in the manifest, and a process
will be woken up to receive the broadcast.

This will happen rarely, since the configuration changes
eligible to trigger this broadcast are rare themselves.

Bug: 63918966
Test: manual

Change-Id: I817a51ea05f762e02561691825d57d643db7dc30
2018-02-08 16:41:37 -08:00
TreeHugger Robot
40279e5407 Merge changes I6993325b,Icb5114fe
* changes:
  Frameworks: Annotate trivial @GuardedBy in services/core
  Frameworks: Annotate trivial @GuardedBy in core/java
2018-02-08 23:32:03 +00:00
Leon Scroggins
0f05b4895d Revert "Call ImageDecoder directly in ResourcesImpl"
This reverts commit 40c59fdef0.

Reason for revert: b/73083791

Change-Id: I044e534be07c5fd18c99dcc65a14b72eaf1fecd5
2018-02-08 21:14:32 +00:00
Chris Craik
ceb2693621 Change Resources.getDrawable nullability
Resources.getDrawable() was annotated @Nullable because there was one
very particular path where Bitmap decoding would fail and trigger a null
return.

As part of the switch to ImageDecoder, that path was changed to now throw
an IOException, which will result as a NotFoundException to the caller of
getDrawable.

This CL annotates that path as @NonNull to reduce pain of dealing with
@Nullable method that was very unlikely to be null in practice.

Also fixes many other missing nullability annotations, and relabel
many @Nullable paths that would never return null in practice as
@NonNull.

Bug: 69543526
Test: ResourcesTest

Change-Id: Ib01eca970c5c9969998ce5b265b120aa7048b41a
2018-02-08 13:11:38 -08:00
Holly Jiuyu Sun
4f73b9c09a Public EuiccManager APIs.
Public EuiccManager and other related necessary files.
Mark EuiccCardManager and other related necessary files as @SystemApi.
Solve lint errors and warnings.

Bug: 35851809
Test: test on phone
Change-Id: I68853e134e1e31fa9b91a83af6c491a2a8cca971
2018-02-08 11:12:30 -08:00
Etan Cohen
af018ce387 Merge "[RTT] Deprecate legacy RTT API" 2018-02-08 19:03:27 +00:00
Jiuyu Sun
b6276fe5a3 Merge "Revert "Public EuiccManager APIs."" 2018-02-08 17:34:30 +00:00
Jiuyu Sun
d3bb4aed78 Revert "Public EuiccManager APIs."
This reverts commit af6a5fffdc.

Reason for revert: <INSERT REASONING HERE>

Change-Id: Id3296a91e5c3ad624a6a03f6532b859524a518bf
2018-02-08 16:38:26 +00:00
TreeHugger Robot
71a24be984 Merge "Fix APCT tests" 2018-02-08 15:06:53 +00:00
Andreas Gampe
3f24e69dbe Frameworks: Annotate trivial @GuardedBy in core/java
Add @GuardedBy for simple functions that require a single lock
and are named XYZLocked.

Bug: 73000847
Test: m
Test: m javac-check-framework RUN_ERROR_PRONE=true
Change-Id: Icb5114fea2ff2385e1cc7511121026099e05c0ee
2018-02-08 02:19:42 -08:00
Jiuyu Sun
7fdd2bf7c1 Merge "Public EuiccManager APIs." 2018-02-07 23:55:28 +00:00
Todd Kennedy
d5aaa44859 Fix APCT tests
* remove testInsertPackageSetting
* add path to c'tor for testUpdatePackageSetting0[12]

Change-Id: Ia690839268470db227538a7b64557da182d97751
Fixes: 72959078
Test: atest -it FrameworksServicesTests:PackageManagerSettingsTests
2018-02-07 15:44:19 -08:00
Etan Cohen
d0acccdf25 [RTT] Deprecate legacy RTT API
Bug: 65108579
Test: unit tests pass
Test: WifiRttManagerTest:test_regular_scan_then_rtt_ranging_stress
Change-Id: Ifa90acf8bb358657785b42222e68c537658c85e2
2018-02-07 12:36:09 -08:00
Holly Jiuyu Sun
af6a5fffdc Public EuiccManager APIs.
Public EuiccManager and other related necessary files.
Mark EuiccCardManager and other related necessary files as @SystemApi.
Solve lint errors and warnings.

Bug: 35851809
Test: test on phone
Change-Id: Id7895f9b35ce9d4fb6fae42ba89ca9b29dbfa74c
2018-02-07 11:09:27 -08:00
Dan Cashman
050b79975b PackageInfo: add Parcel read/write for cert history.
commit: 5cdda3425c added a new flag,
GET_SIGNING_CERTIFICATES to PackageManager for use with getPackageInfo
that returns the signing certificate history, including the current signer,
of the given package.  This is intended to replace the existing
GET_SIGNATURES flag and corresponding field.  The previous commit did not,
however, implement the read/write Parcelable methods so that this
information could be reconstructed client side.  Implement those methods
to actually expose the new API.

Bug: 64686581
Test: Test app pull of PackageInfo with GET_SIGNING_CERTIFICATES succeeds.
Change-Id: I1c023da2a6fd03e11432953080045a79b9f56839
2018-02-06 21:11:23 -08:00
David Brazdil
568f5e573a Fix ApplicationInfo.isAllowedToUseHiddenApi predicate
FLAG_UPDATED_SYSTEM_APP does not imply FLAG_SYSTEM, need to check both.

Bug: 64382372
Test: make
Change-Id: I1ad87c5ef0ad90c090da9264b894ae25e87996ae
2018-02-07 00:20:21 +00:00
TreeHugger Robot
a54e69a116 Merge "Increase instant app privacy with dummy data" 2018-02-06 23:18:13 +00:00