Commit Graph

7747 Commits

Author SHA1 Message Date
Jeff Sharkey
8c6eee1124 Merge "Implement dual-permission model for storage." 2019-03-20 23:49:08 +00:00
TreeHugger Robot
84c457fb39 Merge "API cleanup: remove PackageInstaller.SessionParams#setEnableRollback" 2019-03-20 22:39:25 +00:00
Todd Kennedy
29162935f0 Merge "OMS: expose getOverlayInfo API" 2019-03-20 20:15:48 +00:00
TreeHugger Robot
e0bbc2761f Merge "RRO: Flag ApplicationInfo if it's an RRO" 2019-03-20 20:13:44 +00:00
TreeHugger Robot
a1feb4cd63 Merge "Refine broadcast in commitRollback" 2019-03-20 19:12:02 +00:00
Steven Moreland
91fbb6235c Merge "pm: SharedLibraryInfo: toString closing bracket" am: 05a8e0b44c am: 48b058ef41
am: c56862250d

Change-Id: I65675ef168b7c0a17cf0598ad2124e978ad8131c
2019-03-20 11:41:23 -07:00
Steven Moreland
c56862250d Merge "pm: SharedLibraryInfo: toString closing bracket" am: 05a8e0b44c
am: 48b058ef41

Change-Id: Ib7d2078a0f995a8d6a1ba7ea39dd6e1dd5ea0963
2019-03-20 11:22:29 -07:00
Steven Moreland
48b058ef41 Merge "pm: SharedLibraryInfo: toString closing bracket"
am: 05a8e0b44c

Change-Id: I373baed1fdd987bef7dafdbabacb86a0ef6cfbc0
2019-03-20 11:06:08 -07:00
Treehugger Robot
05a8e0b44c Merge "pm: SharedLibraryInfo: toString closing bracket" 2019-03-20 17:51:00 +00:00
shafik
74fec184ac Refine broadcast in commitRollback
Silence qualified user warning by using sendBroadcastAsUser.
The user is UserHandle.SYSTEM.
Limit recievers to those holding MANAGE_ROLLBACKS permission.

Test: warning does not appear in logcat when running atest RollbackTest
Fixes: 128280826
Change-Id: I85b905d2b20f3993859ec87948f309c1934a4a26
2019-03-20 17:05:47 +00:00
TreeHugger Robot
53cc8bf12c Merge "Resources.getSystem docs: not affected by RRO" 2019-03-20 17:05:17 +00:00
shafik
2603027f99 API cleanup: remove PackageInstaller.SessionParams#setEnableRollback
Test: build
Fixes: 127282838
Change-Id: Id17b88cc0f8e73fefc1047cd571298ae75086e96
2019-03-20 16:57:37 +00:00
Zoran Jovanovic
946e32f394 RRO: Flag ApplicationInfo if it's an RRO
This is important when deciding whether or not to create
a hidden app detail activity or within AppInfo in Settings
application.

Bug: 119440359
Bug: 124556507
Test: build and test with Settings app
Change-Id: I02324e5c0a146f4df4cc4a5b1b62059bc9153d23
2019-03-20 06:47:00 -07:00
TreeHugger Robot
544ff6d65b Merge "Revert "Add Foldable feature flag"" 2019-03-20 12:22:17 +00:00
Sam Lin
dbf5312511 Revert "Add Foldable feature flag"
This reverts commit 821f43aa64.

Reason for revert: better fit:
- restrict the Package Manager feature flags to features for which the app developer would need to "target"
- typically hardware types should be mutually exclusive to each other

Bug: 124406307
Test: make checkbuild
Change-Id: Ie247a21eb8bbc83efad833ca8db675fd11e7ea4e
2019-03-20 12:21:45 +00:00
Richard Uhler
ce844797cd Merge "Only allow rollback to be enabled on modules." 2019-03-20 09:40:13 +00:00
Nadav Bar
66a2bdb3a5 Merge "Grant record audio permission to SystemCaptionsService instead of ContentCaptureService" 2019-03-20 08:00:52 +00:00
Mårten Kongstad
371da73d40 Resources.getSystem docs: not affected by RRO
Clarify the docs around Resources.getSystem: the object returned is not
affected by Runtime Resource Overlay.

Test: builds, boots
Change-Id: I1011f37c98d81b8b1977f4dbc579bc2a536208cd
2019-03-19 15:43:37 -07:00
Chenbo Feng
89ca736711 Merge "Add uid information in PackageListObserver" am: 62e041a6dd
am: c059f56e0f

Change-Id: I61f46bf443c2027ed70a884f0cbb3ede80a8c1f3
2019-03-19 14:53:10 -07:00
Chenbo Feng
c059f56e0f Merge "Add uid information in PackageListObserver"
am: 62e041a6dd

Change-Id: I4fef26fed802902d6a69563c19704a94916ff834
2019-03-19 14:42:14 -07:00
Treehugger Robot
62e041a6dd Merge "Add uid information in PackageListObserver" 2019-03-19 21:19:16 +00:00
Zoran Jovanovic
d507e2f49f OMS: expose getOverlayInfo API
Expose getOverlayInfo API on OMS in order to
implement additional AppInfo UI for resource
overlay in Settings app.

Bug: 124556507
Bug: 124540315
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AppButtonsPreferenceControllerTest
Change-Id: Ib2cc257fe628e9cc855047cce7ed81a9786b2635
2019-03-19 14:15:09 -07:00
Matt Pape
417059b13e Merge "Remove interface for Rollback and Rollback Boot." 2019-03-19 16:14:05 +00:00
TreeHugger Robot
0a96038c85 Merge changes I7bf9bde4,I8d655d1c,Ibc59aa36
* changes:
  Adds class and method documentation in all app prediction classes
  Link Intent.EXTRA_SHORTCUT_ID to ACTION_SEND Intent
  Change ShortcutInfo.Builder.setLongLived to take a boolean
2019-03-19 14:22:28 +00:00
Xiao Ma
2ce206c82d Merge "Move the IpMemoryStore to the network stack." am: 93bf5ef495 am: 5db1518bfa
am: 3176d57308

Change-Id: I243056012d2f099d96a33657c0eb63a5b66a2cfe
2019-03-19 06:54:43 -07:00
Xiao Ma
3176d57308 Merge "Move the IpMemoryStore to the network stack." am: 93bf5ef495
am: 5db1518bfa

Change-Id: I20e384320309579b19fe44f3841ffbc49c028c6d
2019-03-19 06:44:45 -07:00
Xiao Ma
5db1518bfa Merge "Move the IpMemoryStore to the network stack."
am: 93bf5ef495

Change-Id: I672d07ca2d0a251c246993ab8c7c3075de385570
2019-03-19 06:35:31 -07:00
TreeHugger Robot
1f23a49ba4 Merge "Add AttentionSerivce into dumpsys" 2019-03-19 03:19:32 +00:00
Chenbo Feng
14981f31ed Add uid information in PackageListObserver
The uid information of a removed package cannot be retrieved by the
packageName anymore once it is removed. So it would be useful to provide
the uid of removed package in the onPackageAdded and onPackageRemoved
method of the PackageListObserver. This modification helps simplify the
design in PermissionMonitor.

Bug: 125396053
Test: dumpsys netd trafficcontroller

Exempt-From-Owner-Approval: Already merged in internal master
Merged-In: I2bd4bdf924687960a4fa3a47235bae68d885e445
Change-Id: I2bd4bdf924687960a4fa3a47235bae68d885e445
2019-03-18 19:32:29 -07:00
Steven Moreland
1e35a413ca pm: SharedLibraryInfo: toString closing bracket
before:
SharedLibrary[...

now:
SharedLibrary{...}

Switched from square to curly braces because curly braces appear to be
the standard in this directory.

Bug: N/A
Test: manual
Change-Id: I02c63dd594fde68e645348cb1227f8594e2a7d3e
2019-03-18 18:30:22 -07:00
Ricky Wai
0718f9d0d5 Merge "Remove hidden launchable app vouching code" 2019-03-18 21:37:08 +00:00
Matt Pape
12187ae675 Remove interface for Rollback and Rollback Boot.
Per API council feedback, we are making changes to include only the
namespace in the system API defined in DeviceConfig.java. Strings which
define property names should be defined in code local to the feature
instead.

Bug: 126411407
Test: atest FrameworksCoreTests:DeviceConfigTest
      atest FrameworksServicesTests:PackageManagerServiceTest

Change-Id: Ie3b0539f51a582fb7583ece88e5d3bde0cc1efd7
2019-03-18 13:20:44 -07:00
Yohei Yukawa
59730961aa Introduce Context.BIND_SCHEDULE_LIKE_TOP_APP for visible IMEs
This CL introduces a new @hide bind flag BIND_SCHEDULE_LIKE_TOP_APP so
that visible IMEs can have the same thread scheduling policy as the
actual top app, like SCHED_FIFO for UI and RenderThread when it's
available [1] and TOP_APP_PRIORITY_BOOST otherwise [2].

Hopefully this would provide more consistent UI performance and
responsiveness between the actual top app and IME.

 [1]: I7b8a31830ad80f7efa00236928d5476998ed4e00
      33eb07f575
 [2]: Iced88269f7e2d378d5870ded1a5ccf9f259fda57
      b783e7b44bf174075f6860d295808ee462b38451

Fix: 117274342
Test: Manually verified as follows.
  1. Build aosp_blueline-userdebug and flash it.
  2. make -j EditTextVariations
  3. adb install -r \
       $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
  4. adb shell am start \
       -n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
  5. Tap the first edit text field to bring up the AOSP Keyboard.
  6. Make sure that top app (EditTextVariations) and the IME (AOSP
     Keyboard) have the same thread priority / scheduler policy for
     their main UI threads and RenderThreads.
      adb shell ps -p \
          `adb shell pidof com.android.inputmethod.tools.edittextvariations` \
          -T -o PID,TID,PRI,SCH,CMD
      adb shell ps -p `adb shell pidof com.android.inputmethod.latin` \
          -T -o PID,TID,PRI,SCH,CMD
     For both UI threads and RenderThreads, Thread Priority should be 29 and
     Scheduler Policy should be 0.
  7. Tap the back button to dismiss AOSP Keyboard.
  8. Make sure that Thread Priority of AOSP Keyboard is no longer boosted.
      adb shell ps -p `adb shell pidof com.android.inputmethod.latin` \
          -T -o PID,TID,PRI,SCH,CMD
     For both UI threads and RenderThreads, Thread Priority should be 19 and
     Scheduler Policy should be 0.
Change-Id: I143fb39cec55351b097e835cf8bbf9668e02d86d
2019-03-18 10:47:22 -07:00
Ricky Wai
8286ffda54 Remove hidden launchable app vouching code
Bug: 128279519
Test: Able to compile
Change-Id: Id121bf2a23a78b43f28963b7d76c5e5fa575a97f
2019-03-18 16:07:40 +00:00
Richard Uhler
1fc10c1209 Only allow rollback to be enabled on modules.
Only allow rollback to be enabled on the modules included in a mainline
update. We don't want to support rollbacks for all apks in general yet.

Enforce that only installers granted the MANAGE_ROLLBACKS permission can
enable rollback for a package.

Introduce a new TEST_MANAGE_ROLLBACKS permission that can be used to
enable rollback on packages that are not modules. This allows us to
continue testing rollbacks, given we can't do a mainline update as part
of the rollback tests.

Test: atest RollbackTest, with new tests for permissions added.
Bug: 128277794
Change-Id: I29ab9a750a1283592b8a855322ece516e42260ca
2019-03-18 14:05:28 +00:00
Chalard Jean
952135122d Move the IpMemoryStore to the network stack.
Test: atest FrameworksNetTests
Change-Id: Ic5bd6ff54b09a6fa92b6863f240a5b053011acb6
2019-03-18 11:33:17 +09:00
Jeff Sharkey
9bb54f203e Add exception logging to aid debugging.
Now we log both success and failure of ContentInterface calls.

Bug: 128782519
Test: manual
Change-Id: I5e81cc6a8ba1460331cad5e085aa01633d6741d6
2019-03-17 11:05:32 -06:00
Nadav Bar
1a1f5a2118 Grant record audio permission to SystemCaptionsService instead of ContentCaptureService
Now that we have a definition for a SystemCaptionsService we should move to use it instead
of piggybacking on ContentCaptureService.
This is also required to ensure that T2C will be granted audio recording permission in case it will
be shipped in a different APK for OEMs.

Test: Manual and DefaultPermissionGrantPolicyTest.
Bug: 128622041.
Change-Id: Ic0b5b21b05ff1ad200472bfc1c4eaa3c588324df
2019-03-17 15:11:22 +00:00
Philip P. Moltmann
c94ba820fb Implement dual-permission model for storage.
- Pre-Q apps use the legacy READ/WRITE_EXTERNAL_STORAGE permissions
- Post-Q apps use the READ_MEDIA_* permissions
- Grandfathered Q apps have all storage permission granted fixed. In the
  UI they show only the legacy storage permissions
- The OP_LEGACY_STORAGE controls whether an app is grandfathered

Data providers should check both old and new permission model as
permissions that are not used are set as granted.

Test: atest CtsPermissionTestCases:android.permission.cts.DualStoragePermissionModelTest
Fixes: 126785920
Change-Id: I668530e62125d95f122a94ae39f17007391bcaa5
2019-03-15 16:48:18 -07:00
Benedict Wong
e942aafb0a Merge "Integrate testNetworkService and Manager with Connectivity stack" am: b86c3255fd
am: 016ac0a953

Change-Id: If9efbc3e0b3f0949286a2a5ad8226009ebbcfc07
2019-03-15 10:59:21 -07:00
Benedict Wong
016ac0a953 Merge "Integrate testNetworkService and Manager with Connectivity stack"
am: b86c3255fd

Change-Id: I571e583d896841c814efe58b8c0875fa9cd3873c
2019-03-15 10:50:06 -07:00
Benedict Wong
b86c3255fd Merge "Integrate testNetworkService and Manager with Connectivity stack" 2019-03-15 17:41:02 +00:00
Ricky Wai
ea5c64806d Merge "Change get/setAppDetailsActivityEnabled to get/setSyntheticAppDetailsActivityEnabled" 2019-03-15 12:31:06 +00:00
TreeHugger Robot
526de8ba20 Merge "Add PackageInstaller CTS tests to test mapping." 2019-03-15 10:33:07 +00:00
TreeHugger Robot
92512d5f18 Merge "Adds nullability annotation and java docs to App Prediction APIs" 2019-03-15 01:49:11 +00:00
Dario Freni
842947fc1b Add PackageInstaller CTS tests to test mapping.
Test: atest --test-mapping (with different dirs)
Change-Id: I04ca869b881c825b635ae7e8624fc7e2129e1858
2019-03-14 21:50:43 +00:00
Mehdi Alizadeh
f99986a001 Link Intent.EXTRA_SHORTCUT_ID to ACTION_SEND Intent
Test: None
Bug: 126178968
Change-Id: I8d655d1c9b35d72726dbc74901f3d16ded48afc0
2019-03-13 15:56:06 -07:00
Mehdi Alizadeh
3d2ff4c27b Change ShortcutInfo.Builder.setLongLived to take a boolean
Bug: 126179815
Test: atest com.android.server.pm.ShortcutManagerTest2
Change-Id: Ibc59aa3698275068c17565b66c957d84bb4a8c4b
2019-03-13 15:45:03 -07:00
Mehdi Alizadeh
387c7cb14a Adds nullability annotation and java docs to App Prediction APIs
Also rethrows RemoteExceptions in AppPredictor class.

Test: Builds successfully
Bug: 126701214
Bug: 126699210
Bug: 126701563
Bug: 126180215
Bug: 126701789
Bug: 126701213
Bug: 126178969
Bug: 126179771
Bug: 126700116
Bug: 126180255

Change-Id: I3c76a71abbb8fdc9cadfaa4c6289ded4de379bd8
2019-03-13 14:28:29 -07:00
TreeHugger Robot
b0b07b7d26 Merge "Improved some Context javadocs." 2019-03-13 18:40:12 +00:00