* limit the absolute maximum size of the label to 50000 characters
[which is probably far more than necessary, but, can be dialed down]
* use a string buffer while processing the string [instead of creating
multiple string objects]
Bug: 62537081
Test: Manual. Install APK in bug and see that it can be uninstalled
Change-Id: Ibf63c2691ad7438a123e92110d95b1f50050f8b1
In certains circumstances, only the base and split APKs were included in
the "old paths" list when updating the application info. Instead, this
list should contain _all_ elements, including any additional libraries
that may be added to the overall classpath.
Bug: 77342775
Test: Manual. Install a package. Install a split with --dont_kill. See that the path doesn't contain duplicate entries
Change-Id: Id9739cce215ab07bff1b17966583c0cf51a0b34a
Periodically remove references from the list whose referents have been
garbage collected.
Bug: 73961798
Test: Device boots.
Test: Take a heap dump of systemui and manually check that the state of
ThemeRefs looks reasonable.
Change-Id: I691027feb5dd217bcb60406b28897b9614e2a845
Clarify that the method does not imply the screen is color-managed.
A global color transform may still be applied depending on the user
settings, such as night light, accessibility, Boosted, or Stretched.
Bug: 78012876
Test: builds
Change-Id: Ie9cdf455cf4ca93be2357a5313cd63555ab91ff9
- So that AM can perform all the necessary caller checks, except for the cross-profile/user check.
- Note PixelLauncher is the recent app which gets extra privileges. So I used ShortcutLauncherDemo
and a 3p launcher for manual tests.
Fixes: 78635323
Test: manual test, with a 3p launcher. (nova)
- Launch primary profile app -> launches fine
- Launch work profile app-> launches fine
- Launch suspended work profile app -> "can't open this app" dialog is shown.
- Launch the primary counterpart of the suspended work profile app -> launches fine.
- Launch work profile app in quiet mode, with separate work challenge
-> "turn on work profile"? dialog is shown
-> then "cancel" -> nothing happens.
-> then "turn on" -> "re-enter your pin" is shown -> type pin -> work profile app starts fine.
- Launch work profile app without separate work challenge
-> "turn on work profile"? dialog is shown
-> then "cancel" -> nothing happens.
-> then "turn on" -> work profile starts and the app starts fine.
- "App info" on work profile app -> Setting page opens fine.
- "App info" on primary profile app -> Setting page opens fine.
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest*.java
Test: atest cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/LauncherApps*.java
Change-Id: Ie665a8890407d05c1d877f04d9c5c3a1caad18e1
Incoming and outgoing call phone numbers are visible in the phone state
broadcast and via the PhoneStateListener. To enhance user privacy, change
to require the READ_CALL_LOG permission in order to receive the call
phone numbers.
This means to see phone numbers:
1. android.intent.action.PHONE_STATE - requires READ_PHONE_STATE and
READ_CALL_LOG permission.
2. PhoneStateListener#onCallStateChanged - now required READ_CALL_LOG
permission.
To support this new behavior, added sendBroadcastAsUserMultiplePermissions
method to context to allow sending the broadcast to all users while
requiring the two permissions.
Bug: 78650469
Test: Created PHONE_STATE broadcast receiver in test app and verified that
when no permissions are granted, the phone number is empty for incoming
and outgoing calls.
Test: Granted Phone state permission to test app and verified that phone
number is not populated.
Test: Granted test app read call log permission and verified that phone
number is populated.
Test: Created PhoneStateListener in test app and verified that when no
permissions are granted, phone number is empty for incoming and outgoing.
calls.
Test: Granted read call log permission to test app and verified that both
the incoming and outgoing numbers are populated.
Change-Id: I857ea00cc58a0abbb77960643f361dd6dd9c8b56
APIs that return package usage data (such as the new ArtManager)
must ensure that callers hold both the PACKAGE_USAGE_STATS permission
and the OP_GET_USAGE_STATS app-op.
Bug: 77662908
Test: atest vendor/xts/gts-tests/hostsidetests/dexapis/host/
Change-Id: I7a85d959f1682d2bd5cf3684415e368fece88101
Added explanation that callers can use a format string which takes a
single argument which is the name of the suspended app that the user
tried to launch.
Test: make docs
Bug: 77507744
Change-Id: I0a5259048332030385265ceab9c7d76766abac7d
Since the broadcast is deprecated in favor of the ServiceStateProvider,
the documentation should reflect this.
Note that the LteEarfcnRsrpBoost has not been migrated into the provider
so this also needs to happen.
Bug: 33756364
Fixes: 78188866
Test: no behavior change, ran make
Change-Id: Ia15a7408bdc79927438fa243cce77b262bbb66c4
Replace checkSignatures() calls in AccountManager with a new,
rotation-aware call to PackageManagerInternal. Also add a new
AUTH cert capability to reflect the distinction between these
permissions and others.
Bug: 77651077
Test: Builds. CtsAccountManagerTestCases
Change-Id: Idd412cd984acf7d37555deb5879f2d6a0a10c2b6
Also extend the timeout to 60 seconds.
- Because each provider / service dump may time out, the total time should relatively be large.
Bug: 78017892
Fix: 78017892
Test: Manual test with the following dumpsys commands:
dumpsys activity provider all
dumpsys activity provider all-platform
dumpsys activity provider all-non-platform
dumpsys activity provider com.android.providers.contacts/com.android.providers.contacts.VoicemailContentProvider
dumpsys activity provider com.android.providers.contacts/.VoicemailContentProvider
dumpsys activity provider contacts
dumpsys activity provider voicemail
dumpsys activity provider 4d45a78
dumpsys activity service all
dumpsys activity service all-platform
dumpsys activity service all-non-platform
dumpsys activity service bluetooth
Test: atest /android/pi-dev/frameworks/base/core/tests/coretests/src/com/android/internal/util/DumpTest.java
Test: atest /android/pi-dev/frameworks/base/core/tests/coretests/src/com/android/internal/util/ParseUtilsTest.java
Test: Manual test with "adb bugreport" with adding sleep(10s) to ProviderMap.dumpProvider()
Change-Id: I00bce0090b8dbb947d7f8b1e5d01bb8a70d84bd8
This adds checks that the secondary ABI for an instrumentation package
matchs that of its target before using it when forced and warns of
mismatches.
Change-Id: I394427721c83cbd1c3c6af6cee24a93b18d8c65f
Fixes: 77152863
Test: gts-tradefed > run gts -m GtsBackupHostTestCases -a armeabi-v7a do not all fail with NPE
During API review, PackageInfo#signingCertificateHistory was changed
to PackageInfo#signingInfo. This was not reflected everywhere in
the documentation. Update it.
Bug: 74831530
Test: Doc change only, builds.
Change-Id: I497cdd732dffacf376ac05f7ccd181004c947210
The stats currently shown in sync manager dumpsys is the total *since wipe* so
they're usually pretty much useless.
So let's add "today" and "yesterday" stats too.
- Also add "# failures" and "# cancels".
- Also split up SERVER to OTHER and FEED (i.e. subscribedfeeds).
Bug: 76035392
Test: Boot, run some sync, then do "cmd content reset-today-stats"
- Also tested with actually setting the clock to 23:59 and wait
- Check the result with "dumpsys content".
Sample output:
=======================================================================
Authority Syncable Enabled Stats Loc Poll Per Feed User Othr Tot Fail Can Time Last Sync Backoff
------------------------------------------------------------------------------------------------------------------------------------------------------------------
com.android.calendar 1 true Total 0 0 0 1 0 7 8 0 2 8s FEED SUCCESS
Today 1 5 6 7s 2018-04-12 15:21:24
Yestr 0s
com.android.chrome 0 false Total 0 0 0 0 0 0 0 0 0 0s
Today 0s
Change-Id: Id0ea42435a9f759e47d4b9490292759270f8e9a5
Update the docs about getInstalledPackages() returns installed apps
on current user not on the device.
Test: NULL
Bug:77955905
Change-Id: I3d9c48be54f6355dc1701d2c359785a575fbc1db