Commit Graph

6713 Commits

Author SHA1 Message Date
android-build-team Robot
66fca3e43f Merge "Propagate calling UID to AM from CrossProfileApps" into pi-dev am: 7bfb942e2d
am: 3f1c2382c9

Change-Id: If002ec36dfa98c5699b5f6270eb60e22b1dffa87
2018-05-04 12:58:27 -07:00
android-build-team Robot
7bfb942e2d Merge "Propagate calling UID to AM from CrossProfileApps" into pi-dev 2018-05-04 19:35:44 +00:00
android-build-team Robot
4b17b1b399 Merge "Make safe label more safe" into pi-dev am: 06637b97dd
am: 118408f6ca

Change-Id: Icfadc3afecb91f12c77712d0b29e961f4414215e
2018-05-03 09:10:19 -07:00
android-build-team Robot
06637b97dd Merge "Make safe label more safe" into pi-dev 2018-05-03 15:46:10 +00:00
android-build-team Robot
290879a583 Merge "old paths contains all entries when updating" into pi-dev am: f5cb5e5525
am: 9cfb90e85b

Change-Id: I63f21a16b8e5f59c1fd6cefb242b8b22dd564eaa
2018-05-03 06:48:01 -07:00
android-build-team Robot
f5cb5e5525 Merge "old paths contains all entries when updating" into pi-dev 2018-05-03 13:26:50 +00:00
Richard Uhler
cc11c4b79a Merge "Fix leak of WeakReferences on mThemeRefs list." into pi-dev am: 7790f2a4e1
am: 9413533125

Change-Id: Ia626ee1d5975ead16e5fe487d8b35ccbfde39443
2018-05-03 06:21:52 -07:00
Richard Uhler
7790f2a4e1 Merge "Fix leak of WeakReferences on mThemeRefs list." into pi-dev 2018-05-03 13:02:35 +00:00
Todd Kennedy
6e40395882 Make safe label more safe
* 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
2018-05-03 12:12:04 +01:00
Todd Kennedy
b9656a93aa old paths contains all entries when updating
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
2018-05-03 11:02:30 +01:00
Richard Uhler
dd6a0dbf2f Fix leak of WeakReferences on mThemeRefs list.
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
2018-05-03 10:12:24 +01:00
Chia-I Wu
996652c4ae Merge "Update Configuration#isScreenWideColorGamut doc" into pi-dev am: 067749725e
am: 4f6d5393cb

Change-Id: Ieffece2062f99dba6f99c16934393f71f2e486a1
2018-05-02 14:41:42 -07:00
Chia-I Wu
53e86ba235 Update Configuration#isScreenWideColorGamut doc
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
2018-05-02 10:25:48 -07:00
Tony Mak
de32b83499 Propagate calling UID to AM from CrossProfileApps
Test: atest cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/CrossProfileAppsHostSideTest.java
Test: atest FrameworksServicesTests:com.android.server.pm.CrossProfileAppsServiceImplTest
Test: Try the API in TestDPC

Fixes: 78869781

Change-Id: I9b8721f6b5189e566345c2afee7d559a57670e71
2018-05-02 10:54:03 +01:00
Tyler Gunn
b02996cb14 Merge "Require READ_CALL_LOG permission to see phone numbers in phone state." into pi-dev am: 7f556daa41
am: d6aef2176f

Change-Id: Id4b1f204061f6c7f6c12c2faa392015ade4c4b7f
2018-05-01 13:52:35 -07:00
Tyler Gunn
7f556daa41 Merge "Require READ_CALL_LOG permission to see phone numbers in phone state." into pi-dev 2018-05-01 20:27:15 +00:00
Makoto Onuki
633c4d9875 Merge "Propagate calling UID to AM from LauncherApps" into pi-dev am: eac8a05d19
am: f683c14bd4

Change-Id: I3c1d47b97d39bb2e1f1a7e3639375251b69110a6
2018-05-01 09:14:44 -07:00
Makoto Onuki
eac8a05d19 Merge "Propagate calling UID to AM from LauncherApps" into pi-dev 2018-05-01 15:50:37 +00:00
android-build-team Robot
e3efaf80fd Merge "Add documentation for what to use for SS changes" into pi-dev am: 7f1944a365
am: c7e3dbf76e

Change-Id: Ie9469c6399436309f09b6094d63aa96d75598acb
2018-04-30 11:34:49 -07:00
android-build-team Robot
7f1944a365 Merge "Add documentation for what to use for SS changes" into pi-dev 2018-04-30 17:59:04 +00:00
Makoto Onuki
1a34274336 Propagate calling UID to AM from LauncherApps
- 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
2018-04-27 09:31:56 -07:00
Tyler Gunn
f955e56d51 Require READ_CALL_LOG permission to see phone numbers in phone state.
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
2018-04-27 08:44:07 -07:00
Philip P. Moltmann
33115156f9 Expose APIs used by CtsPermissionTestCases
Test: atest CtsPermissionTestCases
Bug: 77604428
Change-Id: Ib5e9b678e98aab86dac90610ed071eb89f14fce9
2018-04-26 09:40:57 -07:00
Jeff Sharkey
3b25e5306c Merge "Protect usage data with OP_GET_USAGE_STATS." into pi-dev am: ddb15c471c
am: 37bbe98e86

Change-Id: If8cfddaf96d28b3815dd6dca6aa52a7b9bd15da6
2018-04-19 20:08:03 -07:00
Jeff Sharkey
ddb15c471c Merge "Protect usage data with OP_GET_USAGE_STATS." into pi-dev 2018-04-20 02:38:01 +00:00
Jeff Sharkey
0ad6283da7 Protect usage data with OP_GET_USAGE_STATS.
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
2018-04-19 15:46:59 -06:00
Makoto Onuki
c5e8e23e57 Merge "SyncManager: Dump per-source last sync time too." into pi-dev am: d329ae8010
am: 5bb2f9b14d

Change-Id: I0a7c222e33cf8ff95ab8834c4ec31c7a69e0e605
2018-04-19 11:09:57 -07:00
Makoto Onuki
c52be80cb7 Merge "Split provider / service dumpsys into platform and non-platform" into pi-dev am: dbdf5df96e
am: c7ed7f0074

Change-Id: I84fd648bf5b47690ab0082516a99c4bbd7be1914
2018-04-19 11:00:05 -07:00
Makoto Onuki
d329ae8010 Merge "SyncManager: Dump per-source last sync time too." into pi-dev 2018-04-19 17:37:45 +00:00
Makoto Onuki
dbdf5df96e Merge "Split provider / service dumpsys into platform and non-platform" into pi-dev 2018-04-19 17:21:48 +00:00
Suprabh Shukla
7f7c493ac0 Merge "Added more documentation for dialogMessage" into pi-dev am: 4d5d3a0254
am: 74ef44e6eb

Change-Id: If381c630587490361af78b6e95d29fc33ad224f8
2018-04-18 17:52:32 -07:00
TreeHugger Robot
4d5d3a0254 Merge "Added more documentation for dialogMessage" into pi-dev 2018-04-19 00:13:13 +00:00
Suprabh Shukla
3e03ab9312 Added more documentation for dialogMessage
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
2018-04-18 16:01:29 -07:00
Jordan Liu
4799045275 Add documentation for what to use for SS changes
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
2018-04-18 19:44:38 +00:00
Dan Cashman
9fa0a7788f Merge "Add AccountManager key rotation awareness." into pi-dev am: 3091d60a70
am: a8992ecf37

Change-Id: I3ba929f0732a34a7f2694c96cec9fcb03b453838
2018-04-18 12:18:06 -07:00
Dan Cashman
303c4bbb40 Add AccountManager key rotation awareness.
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
2018-04-17 14:29:34 -07:00
Patrick Baumann
6111bb3891 Merge "Checks that secondary instrumentation ABI matches" into pi-dev am: 096e0587d2
am: ee2a275142

Change-Id: I4afd73a30f2f7db2423e4456c4320c4fe9a5913d
2018-04-17 11:52:43 -07:00
Makoto Onuki
0b575a3cdf Split provider / service dumpsys into platform and non-platform
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
2018-04-17 10:41:40 -07:00
Patrick Baumann
eb59580abd Checks that secondary instrumentation ABI matches
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
2018-04-17 09:55:47 -07:00
Makoto Onuki
e94874eed0 Merge "Add 1-day sync stats in syncmanager dumpsys." into pi-dev am: d7732b4c8a
am: 38f0cb4961

Change-Id: If710e543654f26213ff1143ca8e3335160e7371a
2018-04-16 19:16:56 -07:00
Makoto Onuki
f74cf940fe SyncManager: Dump per-source last sync time too.
Example:

Per Adapter History
     :
  mak...@gmail.com/com.google u0 [com.google.android.gms.people]
    Per source last syncs:
         OTHER  Success: 2018-04-16 17:03:38  Failure: 2018-04-16 17:04:27
         LOCAL  Success: N/A  Failure: N/A
          POLL  Success: N/A  Failure: N/A
          USER  Success: N/A  Failure: N/A
      PERIODIC  Success: N/A  Failure: N/A
          FEED  Success: N/A  Failure: N/A
    Last syncs:
      2018-04-16 17:04:27 io-error Source=OTHER Elapsed=0s Reason=AutoSync Extras=[]
      2018-04-16 17:03:38 success Source=OTHER Elapsed=5s Reason=AutoSync Extras=[]
      2018-04-16 17:03:20 success Source=OTHER Elapsed=3s Reason=AutoSync Extras=[]

Bug: 76035392
Change-Id: Id73cb10636897c4fe45caad5df13dca8b75381bd
Fixes: 76035392
Test: Manual test with dumpsys content with triggering various syncs
2018-04-16 17:20:19 -07:00
Makoto Onuki
d7732b4c8a Merge "Add 1-day sync stats in syncmanager dumpsys." into pi-dev 2018-04-17 00:11:25 +00:00
Dan Cashman
d5ad6a4f8d Merge "Replace PackageInfo#signingCertificateHistory field doc reference." into pi-dev am: 82f36b120d
am: cc369093f6

Change-Id: I1c2e82b513035872f831d2fd55063e451a383439
2018-04-16 16:27:19 -07:00
Dan Cashman
e942b914a4 Replace PackageInfo#signingCertificateHistory field doc reference.
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
2018-04-16 14:44:13 -07:00
Makoto Onuki
9498621f41 Add 1-day sync stats in syncmanager dumpsys.
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
2018-04-16 12:23:26 -07:00
Ricky Wai
2604d6ef05 Merge "Update PackageManager.getInstalledPackages() docs" into pi-dev am: ed2a3cadc1
am: 8798ae731c

Change-Id: I0136e13cab068ee93aab0820061adaef28bbc362
2018-04-16 12:07:05 -07:00
Ricky Wai
ed2a3cadc1 Merge "Update PackageManager.getInstalledPackages() docs" into pi-dev 2018-04-16 18:19:00 +00:00
Ricky Wai
9964f70f6a Update PackageManager.getInstalledPackages() docs
Update the docs about getInstalledPackages() returns installed apps
on current user not on the device.

Test: NULL
Bug:77955905
Change-Id: I3d9c48be54f6355dc1701d2c359785a575fbc1db
2018-04-13 13:50:00 +00:00
Benjamin Franz
8a27dc8598 Merge "Silently ignore force stop API for protected packages" into pi-dev am: df88614db2
am: 83612737a1

Change-Id: I3dc4209e0310495a2c6a035094e919a46f75a03f
2018-04-13 01:04:21 -07:00
Benjamin Franz
df88614db2 Merge "Silently ignore force stop API for protected packages" into pi-dev 2018-04-13 07:37:25 +00:00