Commit Graph

8 Commits

Author SHA1 Message Date
Mehdi Alizadeh
23e044d09d Rebind to the remote service if AppPrediction is restarted or updated
Rebind to the remote AppPredictionService when the service package is
updated. Also adds new restart policy flags in
AbstractMasterSystemService to be able to keep per-user instances in the
cache when service restarts as a result of package data getting cleared,
so that we can revive the existing sessions. This would potentially fix
the issue for other services that try to keep the sessions over data
resets.

Bug: 139445447
Test: Reinstall the AiAi package and verify that suggested apps in launcher are getting updated
Test: Clear data for Device Personalization Services and verify that suggested apps in launcher are getting updated
Test: atest CtsAppPredictionServiceTestCases CtsContentCaptureServiceTestCases

Change-Id: Ie835cb159faa9c0718cd63a3045251444b89e505
2019-08-28 20:21:49 +00:00
Mehdi Alizadeh
8b6d5a36ee Use RemoteCallbackList to store registered callbacks
Bug: 134680085
Test: Verified no errors in logcat while closing the ShareSheet
Test: Enable debug flag and verify the logs by killing the client and the servicer
Kill launcher: adb shell killall com.google.android.apps.nexuslauncher
Kill service: adb shell killall com.google.android.as

Change-Id: I706bd0f7224f24bd774ed009babc5f73e12629ca
2019-06-19 15:35:25 -07:00
Mehdi Alizadeh
056ac838fe Restores state of AppPredictionService after remote service crash
Bug: 130183389
Test: Manual test by killing the remote service (following steps)
  1) adb shell killall com.google.android.as
  2) Launch a few apps on the test device
  3) Verify that the suggested apps in All Apps has been updated

Change-Id: Ia96ece071b3c9fb22564e7367e9bad66828385c0
2019-05-30 12:28:37 -07:00
Sunny Goyal
a58d916a69 Protecting AppPrediciton API behind usage stats permission
Bug: 130556904
Test: atest CtsAppPredictionServiceTestCases:AppPredictionServiceTest
Change-Id: I1033e12f5c75ab085d1a0ebff81437ee141528ea
2019-04-24 13:32:52 -07:00
Michal Karpinski
322df0bb74 Modify AbstractRemoteService#mBindInstantServiceAllowed to #mBindingFlags
in order to support multiple binding flags

And supply BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS for RemoteFillService.

Test: atest CtsAutoFillServiceTestCases
Test: atest AutofillManagerServiceTest
Bug: 126267782
Change-Id: Id5262d6a4e0fde0ad874020f783cfbf72fe201f4
2019-03-26 11:07:33 +00:00
Sunny Goyal
c2baa4d724 Updating onLocation related APIs to onLaunchLocation as per API review
Bug: 126179809
Bug: 126180256
Test: everything compiles

Change-Id: I583f96bd5f5b5042131488a9ad5950cbad298071
2019-03-21 18:03:48 +00:00
Hai Zhang
a4959e569d Add RoleControllerManager for role controller service.
This allows us to expose both system-only and app available APIs for
role in RoleControllerService.

Bug: 127691087
Test: manual
Change-Id: I86fe3736fc28516aae25d48efe3ba599ffdf45d5
2019-03-07 21:33:12 -08:00
Sunny Goyal
54e91344e2 Adding initial implementation of Prediction client/service API
Test: Build sample app, ensure that app prediction service gets client
      requests
Bug: 111701043
Change-Id: I33aceb2de31552b2d740dc333559d68728753e40
Signed-off-by: Winson Chung <winsonc@google.com>
2019-01-10 15:53:25 -08:00