Commit Graph

5999 Commits

Author SHA1 Message Date
Holly Jiuyu Sun
3d6b53c075 Add EuiccCardManager and EuiccCardController.
EuiccCardManager is in the same path with EuiccManager.
EuiccCardController is in the same path with EuiccController.
Use getAllProfiles() as an example interface.
The implementation of EuiccCard and its content will be added in a
follow up CL.
The new API is marked as @hide and TODO for @SystemApi.

Bug: 38206971
Test: test on phone
Change-Id: I153937c0f79bdd1a00b06b234a6e254a3f43072c
Merged-In: I153937c0f79bdd1a00b06b234a6e254a3f43072c
2018-01-11 10:30:43 -08:00
Hall Liu
c6703d9af7 Add feature flag and EMBMS bug fixes
Add a feature flag for EMBMS
Modify validation in ServiceInfo constructor
Change return signature of some download methods to better reflect
synchronous errors

Test: run cts tests
Change-Id: I42ee748ba29ba62becf23c5487310cd1e7a397da
2017-12-11 14:10:36 -08:00
Jeff Sharkey
76c275e7d3 Merge changes from topic "predicates_aosp"
* changes:
  Deeper sanity checking of emitted types.
  Emit all APIs using Predicates.
  Massage APIs for upcoming doclava change.
2017-12-07 16:39:39 +00:00
Neil Fuller
e08f918a6e Merge "Fix doc typo. Improve class javadoc..." 2017-12-07 11:02:52 +00:00
Jeff Sharkey
2337aec921 Deeper sanity checking of emitted types.
When emitting a method or field, verify that we're able to reference
all mentioned types.  This ensures that we don't accidentally
reference undefined classes/interfaces.

Test: manual inspection of API files
Bug: 69791141
Change-Id: I84e0c87fe83daa118661f61dbdf17b58ea5282d4
Merged-In: I84e0c87fe83daa118661f61dbdf17b58ea5282d4
2017-12-07 00:22:25 -07:00
Neil Fuller
3ee89770bf Fix doc typo. Improve class javadoc...
Fix doc typo (value -> valid). Improve class javadoc,
fix lint error in import ordering.

Test: Build
Change-Id: I8899b1f568e052a3d152e6c36fca4d6bbf9584f2
2017-12-04 15:19:28 +00:00
Bryce Lee
a4ceea026d DO NOT MERGE Remove orientation restriction to only fullscreen activities.
This changelist removes checks that enforce that only fullscreen,
opaque activities may request orientation changes. An application
may itself be compatible with the change and update their SDK level.
However, it is possible they use a library that has not itself been
updated and still leverages this feature for non-fullscreen
activities.

Fixes: 68684796
Test: bit FrameworksServicesTests:com.android.server.wm.AppWindowTokenTests

Change-Id: I75bbda96b132694c722b0b535e33ea5e1b9a55db
2017-11-13 21:00:17 +00:00
Calin Juravle
9aab3b513d Handle configuration splits when creating the class loader context
Configuration splits have no dependencies which can lead to exceptions
when computing their class loader context.

In general, we do not need to compute the class loader context for apks
without code.

This CL addresses the issue by ignoring "code" paths with no actual code.

(cherry picked from commit da09815e2c)

Bug: 65159159
Test: adb install-multiple config_splits
      runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/DexoptUtilsTest.java

Merged-In: Ida1eb901eecba4a4266de73022f6ee4659367873
Change-Id: Ida1eb901eecba4a4266de73022f6ee4659367873
2017-11-02 09:27:59 -07:00
Calin Juravle
a18e992770 Use the class loader context when optimizing secondary dex files
Record the class loader context for secondary dex loads and pass it to
dexopt during compilation.

The class loader context is passed from libcore every time a
BaseDexClassLoader is created and its recorded in the package dex usage
file.

Note that the context may be:
- unknown: if the dex file was not use after the the upgrade and its
context was not yet updated
- unsupported: if any of the class loaders from the loading context is
unsupported (only PathClassLoader and DelegateLastClassLoader are
supported).
- variable: if it changes over time, form one run to another.

In all the above cases the old compilation behavior is preserved for
now.(i.e. the dex file with be compiled with SKIP_SHARED_LIBRARY_CHECK)

(cherry picked from commit f1ff36f0f9)

Bug: 38138251
Test: runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/
      adb shell cmd package compile -f -m quicken ^Csecondary-dex
com.google.android.gms

(cherry picked from commit 3bec94d78b)

Merged-In: Ie8b78c7c0d5de43733b3d116f8dcb3a65324cca8
Change-Id: Ie8b78c7c0d5de43733b3d116f8dcb3a65324cca8
2017-11-01 13:07:34 -07:00
Calin Juravle
caed6000be Add a command line option to optimize individual splits
The new option is "--split SplitName" and applies to "adb shell cmd
package compile" command.

Usage example:
adb shell cmd package compile -m speed --split split_feature_a.apk
com.android.cts.classloadersplitapp

(cherry picked from commit b6f844d28c)

Bug: 38138251

Test: adb install-multiple CtsClassloaderSplitApp.apk
CtsClassloaderSplitAppFeatureA.apk CtsClassloaderSplitAppFeatureB.apk
      adb shell cmd package compile -m speed --split split_feature_a.apk
com.android.cts.classloadersplitapp
      check the status of split_feature_a
      runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/DexoptOptionsTests.java

Merged-In: I579bb12fa6699f99cd3824f185bd9352fb8007c5
Change-Id: I579bb12fa6699f99cd3824f185bd9352fb8007c5
2017-10-31 14:51:57 -07:00
Calin Juravle
dea3fd8cf1 Refactor the arguments passed to dexopt invocations
Wrap the arguments passed to the various performDexopt calls into the
DexoptOptions object.

This will make adding extra arguments (like compile only a split) much
easier and avoid extending quite a few internal methods.

(cherry picked from commit 1d0e83d2ce)

Bug: 38138251
Test: adb shell cmd package compile ....
      adb shell cmd package bg-dexopt-job ...
      install new apps and check that they compiled
      runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/DexoptOptionsTests.java

Merged-In: Ia9930edd2dceb7535d6168eceb8e3199c82b6306
Change-Id: Ia9930edd2dceb7535d6168eceb8e3199c82b6306
2017-10-31 14:51:57 -07:00
Shubham Ajmera
3aeca17aa9 Reduce app size by downgrading inactive apps
This will trigger when the device will have low space.
Active apps here refer to the apps which were either active
in foregrond or in background and also used by other packages.
Apps which are inactive for X days downgraded to verify. X is
determined by sysprop pm.dexopt.unopt_after_inactive_days

If the system properties are not set, no effect will take place.

The above operations will take place in background dexopt service.
If user uses the app again, it will again be speed-compiled when
background dexopt service starts next time.

(cherry picked from commit 246dccf932)

Bug: 36598475
Test: manual
* Remove the check in the code that allows downgrade only when
  the space is low on the device.
* adb root
* Set pm.dexopt_unopt_after_inactive_days to 600
* Make sure the current time of the device is correctly set
* Install 2 non system apps - B, C
* Downgrade B to extract
* Upgrade a system apps to speed-profile - E
* Downgrade a system app to quicken - G
* adb shell cmd package bg-dexopt-job

Expected Results:
* Extract - B
* Verify - C
* There should not be any entries for apps E an G
  in dalvik_cache

Merged-In: I68f9f617d6722a7ba8b00aa2181cb38a165cfc51
Change-Id: I68f9f617d6722a7ba8b00aa2181cb38a165cfc51
2017-10-31 14:51:57 -07:00
Hyunyoung Song
3702ce391d Merge "Wrap StackOverflowError in NotFoundException. Bug: 67462465 Test: builds and tested using faulty apk with recursive drawable. Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e" into oc-mr1-dev
am: 384689934d

Change-Id: Id4885fe270e24d54830d6858e37487de551a3f52
2017-10-10 22:30:23 +00:00
Hyunyoung Song
dc92d925d8 Wrap StackOverflowError in NotFoundException.
Bug: 67462465
Test: builds and tested using faulty apk with recursive drawable.
Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e
2017-10-10 12:41:05 -07:00
Felipe Leme
63b45a87d5 Merge "Sets AutofillClient on attachBaseContext()" into oc-mr1-dev
am: 6d17d9d0cf

Change-Id: I4b1d2a4e308a91d15282ae99ee158b7004b91211
2017-10-04 22:25:18 +00:00
Felipe Leme
bb567ae6c0 Sets AutofillClient on attachBaseContext()
When an activity overrides attachBaseContext(), the attached context must share
the same AutofillCient, otherwise it will break autofill in the activity.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.AttachedContextActivityTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 67350639

Change-Id: I6b0c4c2fab5fa68eb6ee0714e107ca0816efb2cb
2017-10-04 12:23:23 -07:00
nharold
80b90ed99a Merge changes from topic "re-enable-ipsec" am: 680525c742 am: 8d306cd78a
am: 80107540bb

Change-Id: I13a7134864a648aff9338fda044b3bffd653119e
2017-09-26 22:39:01 +00:00
nharold
8d306cd78a Merge changes from topic "re-enable-ipsec"
am: 680525c742

Change-Id: Ia1d1f3981a9dd1eb8f60631d318211daf135d575
2017-09-26 22:13:20 +00:00
nharold
680525c742 Merge changes from topic "re-enable-ipsec"
* changes:
  Re-Expose IpSecService API Surface
  Re-Enable Starting of the IpSecService
2017-09-26 21:46:39 +00:00
Christopher Schuster
ef34f7b35d Merge "fixed handling of data URI schemes in Intent.toUri" am: c3d3cf5666 am: 928b7cba47
am: 067cfb369d

Change-Id: I811b1b7e0b62d4143292a94fd4b5478f74cdec24
2017-09-22 20:00:45 +00:00
Christopher Schuster
928b7cba47 Merge "fixed handling of data URI schemes in Intent.toUri"
am: c3d3cf5666

Change-Id: Id4b8ef16f7a428e6c3d8b382387cf575d05926ad
2017-09-22 15:02:03 +00:00
Christopher Schuster
42c3a6e6af fixed handling of data URI schemes in Intent.toUri
Data URIs in intents can use schemes with digits and some special
characters (see RFC 2396 and 3986). This patch fixes how these
data URIs are handled by Intent.toUri to support these schemes.

Bug: 63930680
Test: run cts android.content.cts.IntentTest#testUris
Change-Id: I0dbb72325f59f372abba83be9e14c59d5665a053
Signed-off-by: Christopher Schuster <levjj@google.com>
2017-09-21 15:20:16 +00:00
Nathan Harold
d999d225a8 Re-Expose IpSecService API Surface
Note, This reverts commit bd62d6aff2.

Bug: 64800246
Test: compilation
Change-Id: I709d4c476647cfe9f6b982fc373f8d76018b3922
2017-09-12 19:25:13 -07:00
Calin Juravle
ed54b41e3c Merge "Handle configuration splits when creating the class loader context" into oc-mr1-dev 2017-09-08 21:55:28 +00:00
Calin Juravle
da09815e2c Handle configuration splits when creating the class loader context
Configuration splits have no dependencies which can lead to exceptions
when computing their class loader context.

In general, we do not need to compute the class loader context for apks
without code.

This CL addresses the issue by ignoring "code" paths with no actual code.

Bug: 65159159
Test: adb install-multiple config_splits
      runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/DexoptUtilsTest.java

Change-Id: Ida1eb901eecba4a4266de73022f6ee4659367873
2017-09-06 23:31:53 -07:00
TreeHugger Robot
8bb58a145c Merge "Add internal implementation for notifyPackageUse" into oc-mr1-dev 2017-09-05 16:28:13 +00:00
Todd Kennedy
df113c36a7 Add internal implementation for notifyPackageUse
We have checks that prevent applications from modifying the usage
times of instant apps [and vice versa]. However, it's critical for
internal components such as the ActivityManager to be able to upate
this for all packages. Add an internal implementation of this
method that skips the checks.

Change-Id: Ib890296065024104cdaf7c8d64a5a7583d9062c1
Fixes: 65228752
Test: Manual. Run an application installed as an "instant app" and notice the usage time goes up
2017-08-31 16:10:29 -07:00
Yohei Yukawa
8f272178a0 Fix wrong dump output of *Info#flags
This CL follows up to a previous CL [1] that introduced an ability to
control filtering level of
 - ActivityInfo#dump()
 - ApplicationInfo#dump()
 - ComponentInfo#dump()
 - ProviderInfo#dump()
 - ResolveInfo#dump()
 - ServiceInfo#dump()
but also masked following outputs as an unexpected side effect.
 - ActivityInfo#flags
 - ApplicationInfo#flags
 - ProviderInfo#flags
 - ServiceInfo#flags

With this CL, above *Info#flags are correctly dumped again.

 [1]: I0d01565babb87e68b840c9756a2ea730d699efc7
      6ac42aeed9

Test: Manually tested as follows.
 1. make -j SoftKeyboard
 2. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
 3. adb shell dumpsys input_method
    -> Check 'com.example.android.softkeyboard' section
      -> make sure ServiceInfo#flags=0x0
      -> make sure ApplicationInfo#flags=0x38a8be44
           FLAG_HAS_CODE (1<<2)
           FLAG_ALLOW_CLEAR_USER_DATA (1<<6)
           FLAG_SUPPORTS_SMALL_SCREENS (1<<9)
           FLAG_SUPPORTS_NORMAL_SCREENS (1<<10)
           FLAG_SUPPORTS_LARGE_SCREENS (1<<11)
           FLAG_RESIZEABLE_FOR_SCREENS (1<<12)
           FLAG_SUPPORTS_SCREEN_DENSITIES (1<<13)
           FLAG_ALLOW_BACKUP (1<<15)
           FLAG_SUPPORTS_XLARGE_SCREENS (1<<19)
           FLAG_STOPPED (1<<21)
           FLAG_SUPPORTS_RTL (1<<22)
           FLAG_INSTALLED (1<<23)
           FLAG_FULL_BACKUP_ONLY (1<<26)
           FLAG_EXTRACT_NATIVE_LIBS (1<<28)
           FLAG_HARDWARE_ACCELERATED (1<<29)
Fixes: 65057767
Change-Id: Icd1e18237e873844791ccdea7f424b6fe76137c0
2017-08-31 15:24:48 +00:00
Svetoslav Ganov
25e5a3446e Merge "Grant location to default launcher" into oc-mr1-dev 2017-08-29 00:47:25 +00:00
Svet Ganov
5bb6bc6e52 Grant location to default launcher
Test: updated DefaultPermissionGrantPolicy test which passes

bug:62959599

Change-Id: Ifaac04758348049dd170a7e7b7ac234dced5f759
2017-08-28 15:12:05 -07:00
TreeHugger Robot
d1736cb2a7 Merge "Update FEATURE_VULKAN_HARDWARE_COMPUTE documentation" into oc-mr1-dev 2017-08-25 01:50:38 +00:00
Jesse Hall
54fc609183 Update FEATURE_VULKAN_HARDWARE_COMPUTE documentation
Now that VK_KHR_variable_pointers is public, the documentation can be more
precise about the definition of FEATURE_VULKAN_HARDWARE_COMPUTE level 0.
Also document the maxPerStageDescriptorStorageBuffers requirement.

Bug: 34745152
Test: make docs
Change-Id: I0f6c088488243e4daea589d4771d10a8714f7441
2017-08-24 10:23:27 -07:00
TreeHugger Robot
afe28cdf7e Merge "StringParceledListSlice throws exception when the IPC memory threshold is exceeded" into oc-mr1-dev 2017-08-24 10:08:15 +00:00
TreeHugger Robot
ee580764ad Merge "Use all certs for computing package signing sha256" into oc-mr1-dev 2017-08-23 22:51:41 +00:00
Svetoslav Ganov
cdd685c075 Use all certs for computing package signing sha256
In several places we compute the sha256 of the app's signing certificate
(instant cookie storage, backup account permission grants, static shared
lib matching). It is possible that an app is singed with multiple certs
which unfortunately can appear in a random order. We were using only the
first certificate to compute the hash which may be problematic for apps
signed with multiple certs which are later reordered. If an app update's
certs are reordered for cookie storage the app would not be able to
access the cookie, for account grants the app would not get the grant,
and for shared libs the app would fail to install due to a missing lib.

Test: all cookie CTS tests pass
      all static shared lib CTS tests pass
      added test that cookie data not lost on sha256 computation change
      added test that lib install works when specifying
      multiple certs

bug:64270295

Change-Id: Ib6b55f25da735ff5c2762faf6e9b5888e749041d
2017-08-23 11:47:27 -07:00
Alexandru-Andrei Rotaru
b7a79b47cb StringParceledListSlice throws exception when the IPC memory threshold is exceeded
Fixed the code such that list of strings that exceed the 256KB limit can
be transfered.
Bug: 64833731
Test: Added unit test in ParceledListSliceTest

Change-Id: I4e16708010125a444baa8fcb0af6101dc643cd38
(cherry picked from commit 2682fa7067)
2017-08-23 10:07:28 +00:00
Todd Kennedy
e4de49140d Merge "Only log resolution when starting activities" into oc-mr1-dev 2017-08-22 23:00:58 +00:00
TreeHugger Robot
e391175330 Merge "Allow clearing instant app meta-data" into oc-mr1-dev 2017-08-22 22:49:03 +00:00
Svet Ganov
f935a70398 Allow clearing instant app meta-data
The package manager has an API to clear the data of an app
which does not work for uninstalled instant apps for which
we store some meta-data (icon, title, cookie). This change
allows clearing the data of an uninstalled instant app.

Test: Instant cookie CTS tests use this API

bug:64517837

Change-Id: Ia929fead71b5ae786e88ddd0fa8e8a490d970dd0
2017-08-22 12:22:38 -07:00
Todd Kennedy
6ebabca547 Only log resolution when starting activities
Change-Id: I406af40953f3d6ade39e1bab18a35c534e308f3e
Fixes: 63804529
Test: Manual. Query web intent, notice no logs are emitted
Test: Manual. Start activity via web intent, notice logs are emitted
2017-08-22 10:02:12 -07:00
Bryce Lee
1327cdc53d Merge "Don't resume activity if user is locked and encryption is unsupported" into oc-mr1-dev 2017-08-18 21:33:46 +00:00
Makoto Onuki
48e931659f Avoid potential reboot loop due to package cache
Bug: 64295061

Test: Boot (write package cache) and reboot (read package cache)
Change-Id: I5de712c9666bac71ff6121001163ebc90c4b62d0
2017-08-18 11:00:19 -07:00
Bryce Lee
8558ec7dbe Don't resume activity if user is locked and encryption is unsupported
Previously we were not checking if to see if this condition was met
when determining the top running activity. As a result we could get
in a loop where we force stop the process since the app doesn't
support encryption yet try to start it again due to the
ActivityRecord being on top.

This changelist addresses the issue by checking this condition when
determining whether it is okay to show.

Change-Id: I868f97ce8b3ea4220019b8570407e33f27ea88bc
Fixes: 64259425
Test: go/wm-smoke
2017-08-17 15:37:26 -07:00
Julia Reynolds
222941267d Merge "Optionally append managed service approvals" into oc-dr1-dev
am: 445a6d42ef

Change-Id: I7a39822f2bef0838cfe63d44646f513539d90c5c
2017-08-17 00:54:37 +00:00
TreeHugger Robot
445a6d42ef Merge "Optionally append managed service approvals" into oc-dr1-dev 2017-08-17 00:31:42 +00:00
Julia Reynolds
00004c44d7 Optionally append managed service approvals
If the backup comes from a pre O device, don't wipe
preexisting managed service grants (which were introduced in O).


Merged-In: I142df7acb11309bc4f5f185e45a1f91f86d0334a
Merged-In: Ie569972dc0d076718a3a9c59e1ebd942c5bfa987
Test: manual, restore from N to O DR
Bug: 64232609
Change-Id: Ieec2c821d9a088c69a5bc143acf8537ba300202d
2017-08-16 20:58:49 +00:00
Kevin Hufnagle
0df906d279 Merge "docs: Updated ShortcutManager API reference guide." into oc-dev am: 80376a98a5
am: b9db19de6a

Change-Id: Ie9c9c24f0e7dc8423633e61f72473824d8ed83d1
2017-08-16 19:16:12 +00:00
Kevin Hufnagle
9c43a77971 Merge "docs: Updated ShortcutManager API reference guide." into oc-dev am: 80376a98a5
am: d6d6d2cf79

Change-Id: I63af60b006618bdd8bb74d351f9c17432f411b63
2017-08-16 19:16:10 +00:00
Kevin Hufnagle
d6d6d2cf79 Merge "docs: Updated ShortcutManager API reference guide." into oc-dev
am: 80376a98a5

Change-Id: Iae8814e722f7861ecd96980d16c06a676c6ad1dc
2017-08-16 19:01:36 +00:00
Kevin Hufnagle
b9db19de6a Merge "docs: Updated ShortcutManager API reference guide." into oc-dev
am: 80376a98a5

Change-Id: I651865861984671961a44a21f72246f8e0ae12b8
2017-08-16 19:01:35 +00:00