Commit Graph

7362 Commits

Author SHA1 Message Date
TreeHugger Robot
3a02bebb34 Merge changes Ic8db00b6,I68a91e07,I860ad443
* changes:
  Remove package name from ROLLBACK_EXECUTED broadcast.
  Use VersionedPackage in PackageRollbackInfo.
  Assign a rollbackId to all rollbacks.
2019-01-23 15:49:41 +00:00
Adrian Roos
38c8934b67 Merge "API: Fix missing @NonNull annotations" 2019-01-23 14:02:15 +00:00
Richard Uhler
f8f1b38fd1 Remove package name from ROLLBACK_EXECUTED broadcast.
The receiver of the broadcast would likely want to query the rolled back
packages via RollbackManager regardless, and it's not clear which
package to put when an atomic set of packages is rolled back.

Bug: 112431924
Test: atest RollbackTest
Change-Id: Ic8db00b62d8993e00a0dd2cb79ae68c430b45bb8
2019-01-23 13:22:44 +00:00
TreeHugger Robot
de3aea6904 Merge "Add an intent extra that contains a number of milliseconds." 2019-01-23 13:13:47 +00:00
Richard Uhler
a7e9b2db4b Use VersionedPackage in PackageRollbackInfo.
Rather than defining a new custom PackageRollbackInfo.PackageVersion
type.

Also clean up PackageRollbackInfo API by replacing public fields with
methods and picking better names.

Bug: 112431924
Test: atest RollbackTest
Change-Id: I68a91e07b8745df9c5ecb22fdccbfcd76385814a
2019-01-23 11:02:56 +00:00
Richard Uhler
b9d54474ad Assign a rollbackId to all rollbacks.
To make it easier to specify what rollback to perform when a rollback is
executed.

Bug: 112431924
Test: atest RollbackTest
Change-Id: I860ad443848341fbb99169a05b084fa797c5e08c
2019-01-23 11:02:42 +00:00
TreeHugger Robot
eea1710cda Merge "Add a feature flag for secure lock screen." 2019-01-23 10:55:33 +00:00
Narayan Kamath
1addc53a77 Merge "RollbackManager: Support userdata snapshot / restore." 2019-01-23 09:03:17 +00:00
TreeHugger Robot
4edd7eacbd Merge "add OverlayManager.setEnabled to system-current.txt" 2019-01-23 00:07:31 +00:00
Joel Galenson
c857f02a5b Add an intent extra that contains a number of milliseconds.
The Permissions Hub will use this to control the default time filter.

Bug: 63532550
Test: Pass argument to intent.
Change-Id: Iac607853f7020acdb50a20d82c7b8b9e1a0bd32e
2019-01-22 15:07:21 -08:00
Tyler Gunn
18ab52512b Merge "Mark NEW_OUTGOING_CALL broadcast as deprecated." am: 1e08a90339 am: 8aa49b57f3
am: 38f42a6f8e

Change-Id: Ie330dd01fb1b82b87267bb0dc4be7c7ba5e10dee
2019-01-22 13:26:46 -08:00
Tyler Gunn
38f42a6f8e Merge "Mark NEW_OUTGOING_CALL broadcast as deprecated." am: 1e08a90339
am: 8aa49b57f3

Change-Id: Ie60bbc11e0bd5ca434be609dd596ea1a33ba8812
2019-01-22 12:52:26 -08:00
Adrian Roos
918c4f1043 API: Fix missing @NonNull annotations
In pi-dev, those annotations were added out of band in
tools/metalava/manual/master.txt. The annotations were also
supposed to be added to master, but for some this did not happen.

Bug: 123221743
Test: m api-stubs-docs-check-last-released-api
Change-Id: Ia7589dfcc7f63923890e609dbf03175d2b035d29
2019-01-22 20:23:02 +00:00
Hyunyoung Song
4b95d69eef add OverlayManager.setEnabled to system-current.txt
Test: builds and tested in local theme picker

Bug: 121328713

Change-Id: I61ca5189b35005ee13dab797ec2187cd4a88b785
2019-01-22 10:52:24 -08:00
Narayan Kamath
869f706d86 RollbackManager: Support userdata snapshot / restore.
The only significant missing piece of functionality is the
handling of credential encrypted data in the case where one
or more users haven't unlocked their device. This will be handled
in a follow-up change.

Bug: 112431924
Test: atest RollbackTest
Change-Id: I4582018337ce0344379f6f73d6fd6c9ce31c58a0
2019-01-22 17:00:13 +00:00
Lenka Trochtova
66c492a87e Add a feature flag for secure lock screen.
Disable certain APIs which require secure lock screen if the device
doesn't have the feature.
Make sure one cannot set the password/PIN if there is no secure lock
screen, because the password/PIN wouldn't be really used afterwards
while the password strength checks would succeed, creating a false
sense of security.
Allow setting password strength requirements in DPM - test if the
current password is sufficient will fail automatically if there is
no secure lock screen.

Bug: 111072170
Bug: 111071972
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases
Test: cts-tradefed run cts -m CtsAdminTestCases
Test: frameworks/base/core/tests/utiltests/runtests.sh
Test: adb shell am instrument -w -e class com.android.internal.widget.LockPatternUtilsTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: atest SyntheticPasswordTests
Test: atest LockSettingsServiceTests
Test: atest LockSettingsShellCommandTest
Test: atest DevicePolicyManagerTest (for servicestests)

Change-Id: Ie46b0de6cb03c26dd05c05711c5c3b5e36a872df
2019-01-22 17:51:56 +01:00
Tyler Gunn
d8f76c857b Mark NEW_OUTGOING_CALL broadcast as deprecated.
Mark NEW_OUTGOING_CALL broadcast as deprecated and document that callers
should use the CallRedirectionService API.

Test: Build APIs.
Bug: 64959558
Change-Id: I9192b50b16be2ff0cdc0f864ee99b42b83e261e9
2019-01-22 08:09:24 -08:00
Adrian Roos
fe6aeaf2a3 API Compatibility: Fix incompatible abstract methods on Context
Bug: 123221743
Test: m api-stubs-docs-check-last-released-api
Change-Id: I6d34c86582633d696464c8207a7d631be6d31693
2019-01-22 16:58:56 +01:00
Ricky Wai
7106cc314e Merge "Suppress injected launcher activity for apps that are vouched" 2019-01-22 10:37:03 +00:00
Narayan Kamath
24c15d2331 Merge "Fake out ApplicationInfo for APEXs." 2019-01-22 08:57:20 +00:00
Remi NGUYEN VAN
42079df1cc Merge "Add startActivityAsUser to SystemApi" am: 3f4873baef
am: 54ec5162de

Change-Id: I665295721ff7b2eb41f29c96ce2a64844a08705e
2019-01-21 18:25:57 -08:00
Remi NGUYEN VAN
bf1ecd1957 Add startActivityAsUser to SystemApi
Normal applications do not have permissions to use this method.

Test: m
Bug: 112869080
Merged-In: I693b3bf56f3be71f0790776e3aad5694717786ef
Change-Id: Ibe91c1bc4c94883a313e799cb0a37db7696fc62e
2019-01-22 08:27:21 +09:00
Ricky Wai
e346a49a28 Suppress injected launcher activity for apps that are vouched
Test: atest com.android.server.pm.LauncherAppsServiceTest
Test: Able to boot in marlin, sailfish, walleye
Bug: 120904599
Change-Id: Ibfa58d1d8de3b182451da3edebf3e8e4e552899d
2019-01-21 17:54:23 +00:00
Dario Freni
4d3deb815c Merge "Fix: PackageInfo for apex has wrong info" 2019-01-19 21:42:49 +00:00
Jeff Hamilton
acd7db8c7b Fake out ApplicationInfo for APEXs.
This should be generated properly from the AndroidManifest,
but for now this is helpful to proceed with APEX testing.

Test: build
Bug: 123086053
Change-Id: I0e7182e4924c0bc26cee9c9bed520acaffccf905
2019-01-19 10:43:50 -05:00
TreeHugger Robot
84686f1140 Merge "Resolve all browsers even if there is a default browser." 2019-01-19 06:55:12 +00:00
Eric Holk
a1485f61e9 [view compilation] Add --compile-layouts flag to pm compile
This allows us to generate precompiled layouts for installed applications.

If the system property view.precompiled_layout_enabled is set, then
PackageMannager will also automatically generate precompiled layouts for apps at
install or upgrade time.

Bug: 111895153
Test: manual
Change-Id: If6455e1b9b0542a36882af9f3e29d0185a53393c
2019-01-18 18:14:54 -08:00
Ryan Mitchell
d906d809fb Merge "Add enforcement of overlayable targetName" 2019-01-19 02:01:23 +00:00
Hai Zhang
e029713362 Resolve all browsers even if there is a default browser.
PackageManager.queryIntentActivities() handles browser intent
differently when there is a default browser, and only returns the
default browser. Previous code for querying all the browsers all
passed in the PackageManager.MATCH_ALL flag and filtered the result
manually, so we move that logic into RoleBehavior.

Bug: 110557011
Test: build
Change-Id: I928f13d27aca64d49f625dd1ffbd3262b42a06cd
2019-01-18 16:58:56 -08:00
Winson Chiu
235ab33363 Merge "Fallback to regular XML Drawable if ColorStateList loading fails" 2019-01-19 00:00:25 +00:00
Varun Shah
de77b6fee7 Merge "Clarified CrossProfileApps API and documentation." 2019-01-18 23:25:07 +00:00
TreeHugger Robot
20581a3578 Merge "Revert "Suppress injected launcher activity for apps that are vouched"" 2019-01-18 23:12:57 +00:00
Nick Kralevich
1bf9eb3c3e Revert "Suppress injected launcher activity for apps that are vouched"
This reverts commit 8b45da9025.

Reason for revert: Local TOT is crashing with framework restarts, with the following stacktrace:

01-18 12:22:51.536  9326  9352 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: android.bg
01-18 12:22:51.536  9326  9352 E AndroidRuntime: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.intent.action.PACKAGE_CHANGED dat=package:com.verizon.mips.services flg=0x5000010 (has extras) } in com.android.server.pm.LauncherAppsService$LauncherAppsImpl$VouchesChangedMonitor@c231445
01-18 12:22:51.536  9326  9352 E AndroidRuntime: at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0(LoadedApk.java:1554)
01-18 12:22:51.536  9326  9352 E AndroidRuntime: at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
01-18 12:22:51.536  9326  9352 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:873)
01-18 12:22:51.536  9326  9352 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
01-18 12:22:51.536  9326  9352 E AndroidRuntime: at android.os.Looper.loop(Looper.java:209)
01-18 12:22:51.536  9326  9352 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:65)
01-18 12:22:51.536  9326  9352 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to read from field 'android.os.Bundle android.content.pm.PackageItemInfo.metaData' on a null object reference
01-18 12:22:51.536  9326  9352 E AndroidRuntime: at com.android.server.pm.LauncherAppsService$LauncherAppsImpl.updateVouches(LauncherAppsService.java:485)
01-18 12:22:51.536  9326  9352 E AndroidRuntime: at com.android.server.pm.LauncherAppsService$LauncherAppsImpl.updateVouches(LauncherAppsService.java:481)
01-18 12:22:51.536  9326  9352 E AndroidRuntime: at com.android.server.pm.LauncherAppsService$LauncherAppsImpl.access$200(LauncherAppsService.java:121)
01-18 12:22:51.536  9326  9352 E AndroidRuntime: at com.android.server.pm.LauncherAppsService$LauncherAppsImpl$VouchesChangedMonitor.onPackageModified(LauncherAppsService.java:916)

Change-Id: If22d2355e17101bbf3e958b42ee101828f3ec532
2019-01-18 20:32:14 +00:00
Winson
9653d66a75 Fallback to regular XML Drawable if ColorStateList loading fails
Before ag/4829987, if a drawable.xml was misplaced in res/color, but was loaded as a drawable, ResourcesImpl would correctly load it as drawable instead of a color.

Post those changes, the file name is checked, and all res/color files are forcibly loaded as colors. This adds a fallback such that if loading as color fails, an attempt is made to load as a normal drawable.

Bug: 122025886

Test: validated using test application loading layer-list inside res/colors

Change-Id: Ieed9b4d22bc85fdc7390de700fad7b03c9aad511
2019-01-18 12:11:55 -08:00
Jiyong Park
5b1b7344ad Fix: PackageInfo for apex has wrong info
Currently, ApexInfo.packageName is directly fed into PackageInfo. However,
this is wrong because ApexInfo.packageName is from apex_manifest.json,
not AndroidManifest.xml. Name in apex_manifest.json is the internal ID
of an APEX while the name in AndroidManifest.xml is the public
externally-visible name.

Fixing the issue by parsing the AndroidManifest.xml in the apex file
via PackageParser.

This change also fixes the problem that signature is not included in the
PackageInfo for APEX. It is included when GET_SIGNATURES is specified.

Bug: 123029986
Bug: 123028426
Test: adb shell cmd package list packages --apex-only --show-versioncode
Shows com.google.* names

Change-Id: I0021b302f3f4e843f79dd6d40716cefd531c5628
2019-01-18 14:49:16 -05:00
Ryan Mitchell
a362846d4d Add enforcement of overlayable targetName
Adds android:targetName to the overlay manifest attributes and
PackageParser reads the name into PackageInfo. Specifying
android:targetName on an overlay allows the overlay to be associated
with a particular set of overlayable resources. The overlay can only
override the values of the resources defined within the target
overlayable element.

Test: idmap2_tests
Bug: 119390855
Bug: 110869880

Change-Id: I1128274af4cae983f61ae15cdfcbface63233ff2
2019-01-18 11:47:20 -08:00
Aurimas Liutikas
feccee99fa Merge "Remove old private constant from ResourceId." 2019-01-18 16:53:46 +00:00
Ricky Wai
8b45da9025 Suppress injected launcher activity for apps that are vouched
Test: atest com.android.server.pm.LauncherAppsServiceTest
Bug: 120904599
Change-Id: Iad66a69113d077604f108786d57c9252d2beb8a2
2019-01-18 14:16:37 +00:00
Varun Shah
bdb849f8b1 Clarified CrossProfileApps API and documentation.
Changed CrossProfileApps#startAnyActivity to #startAcitivty.

Updated documentation for the usage of startActivity vs startMainActivity.
Also clarified that the INTERACT_ACROSS_PROFILES permission is a two-way
channel between personal and managed profiles.

Bug: 122886462
Test: n/a (documentation changes only)
Change-Id: I67772aef0cf24110432a2dbde0f87c91354fd4a0
2019-01-17 22:56:03 -08:00
Mehdi Alizadeh
b4367b7bab Merge changes from topic "shortcuts-for-sharing"
* changes:
  Disable the use of new share target API in ShareSheet
  Loads direct share targets from ShortcutManager in ShareSheet
2019-01-18 02:42:32 +00:00
Mehdi Alizadeh
fd4055bb0c Merge "Adds API to set persons and isLongLived in ShortcutInfo" 2019-01-18 01:12:01 +00:00
Aurimas Liutikas
d8ebfefcee Remove old private constant from ResourceId.
Bug: 122967079
Test: make -j builds
Change-Id: I3e999044df02549e84208d38bb77d2ce1d1bd73b
2019-01-17 12:51:58 -08:00
Aurimas Liutikas
01c7237439 Merge "Add ID_NULL constant to Resources." 2019-01-17 20:47:59 +00:00
Mehdi Alizadeh
406e8b36a1 Loads direct share targets from ShortcutManager in ShareSheet
Bug: 111698461
Test: Manual test using test app
Change-Id: I4f315d186363cc76578ee551cc55349e3e266593
2019-01-17 11:52:39 -08:00
Aurimas Liutikas
8338623a70 Add ID_NULL constant to Resources.
Bug: 122967079
Test: cts in same topic
Change-Id: Ic6e2da137554a967b379b30c0d2d37341941a117
2019-01-17 18:20:27 +00:00
Stanislav Zholnin
2452709418 Merge "Added a new set of permissions for DeviceConfig API." 2019-01-17 10:16:25 +00:00
TreeHugger Robot
9ab55d9a14 Merge "Fix default of extractNativeLibs in parseBaseApplication" 2019-01-16 23:26:46 +00:00
Aurimas Liutikas
428ddacfa4 Merge "Add source style for each TypedValue." 2019-01-16 21:48:46 +00:00
TreeHugger Robot
8e0e5722f8 Merge "Pre-grant location permisson to location extra packages." 2019-01-16 21:17:40 +00:00
Stanislav Zholnin
596437fd4e Added a new set of permissions for DeviceConfig API.
Permissions READ_DEVICE_CONFIG and WRITE_DEVICE_CONFIG are required to
use DeviceConfig API. Actual checks for new permissions are not added
as we are waiting for gmscore to include them into manifest.

Also added "configurator" protection flag.

Test: atest FrameworksCoreTests:DeviceConfigTest
      atest FrameworksCoreTests:SettingsProviderTest
      atest SettingsProviderTest:DeviceConfigServiceTest
Bug:109919982
Bug:113100523
Bug:113101834
Bug:117663715
Change-Id: I66c256b57c5491201c6c7834620a287b6c81c23c
2019-01-16 10:50:51 +00:00