Commit Graph

14079 Commits

Author SHA1 Message Date
TreeHugger Robot
93b48d31ed Merge "[JobScheduler] Typo fix" 2018-08-20 20:51:26 +00:00
TreeHugger Robot
c5f23bfc69 Merge "ResourceManager: Disable APK Assets cache for real." 2018-08-20 14:27:20 +00:00
TreeHugger Robot
b2484fa070 Merge "Add TestApi for CtsActivityManagerDeviceTestCases." 2018-08-20 13:30:18 +00:00
Richard Uhler
93090515b9 ResourceManager: Disable APK Assets cache for real.
Test: atest -v google/perf/app-startup/benchmark-app-hermetic/cold-dropcache-test
Bug: 111385832
Change-Id: I5610b42b51d3b12cc8587cae6556557362bf67d0
2018-08-20 14:11:37 +01:00
Laura Davis
ed3bc12e2a Merge "Docs: Inserted links to relevant guide pages." into pi-dev am: 283f55f7de
am: 6497c5bd21

Change-Id: Ida8426c0ca4f0fd755df2783fb16ea5d9e5e72ad
2018-08-17 16:13:46 -07:00
Laura Davis
6497c5bd21 Merge "Docs: Inserted links to relevant guide pages." into pi-dev
am: 283f55f7de

Change-Id: I1a42ff1b3485e35e152b354039aa5c072e0a1e70
2018-08-17 15:14:38 -07:00
TreeHugger Robot
ef734b2978 Merge "Improved AutofillManager and Activity dump() methods:" 2018-08-17 20:58:58 +00:00
TreeHugger Robot
9cbee64d26 Merge "ResourceManager: Disable APK Assets cache." 2018-08-17 13:17:30 +00:00
TreeHugger Robot
64094484fd Merge "Docs: fixed formatting for setLaunchBounds()" 2018-08-17 11:40:25 +00:00
Narayan Kamath
bc95621811 ResourceManager: Disable APK Assets cache.
The WeakReference based cache of Assets in use elsewhere in the
process remains unchanged.

Note that this change is larger than it needs to be because it is
an error to create an LruCache of size zero.

There seems to be no measurable difference as measured by the standard
app startup benchmarks.

Test: atest -v google/perf/app-startup/benchmark-app-hermetic/cold-dropcache-test
Bug: 111385832
Change-Id: I432c069e90124e884bddc5cd5be43a28e1b16d07
2018-08-17 11:50:29 +01:00
Jeff Chang
9744262ffa Merge "Support the toast Window to show on the secondary display." 2018-08-17 01:14:51 +00:00
Laura Davis
43e75d98d8 Docs: Inserted links to relevant guide pages.
This is the proof of concept for adding relevant
links in API pages to narrative content.
The design doc is hosted at:
https://docs.google.com/document/d/1Y6bFua27Gs7ONZ27gz0nHz3Djv0WND_V_rX-XvbeB3U/edit?usp=sharing

Test: make ds-docs

Bug: 112478848
Change-Id: Ic3842629c802fe89582d4d7b4a153e54d4ba1713
2018-08-16 16:57:18 -07:00
Felipe Leme
b546ca7916 Improved AutofillManager and Activity dump() methods:
- Print compatibility mode info and activity token on AutofillManager.dump().
- Add --autofill option on Activity so it just dump autofill state.

Also fixed checkstyle import warnings on ActivityManagerShellCommand.

Bug: 112417431
Bug: 112584717

Test: adb shell dumpsys activity top --autofill

Change-Id: Id56b56a5d7e591d5204663a1da1322a15f8ef3aa
2018-08-15 09:12:22 -07:00
Mathew Inwood
62a722476a Merge "Add @UnsupportedAppUsage annotations"
am: d08509363c

Change-Id: I380a6ba241998dbc694716986521dfcbf66fa7d2
2018-08-15 07:57:40 -07:00
TreeHugger Robot
48f928720f Merge "Docs: fixed a broken link in SystemUpdatePolicy" 2018-08-15 14:54:18 +00:00
TreeHugger Robot
21b2bb982f Merge "Add @UnsupportedAppUsage annotations" 2018-08-15 11:13:27 +00:00
Jeff Chang
48ecef4bfb Support the toast Window to show on the secondary display.
1) Looking for the specific display when add a toast window.

2) Modify the enqueueToast interface to support the toast with
   specific dispaly Id.
   2.1 Toast get the specific display id from context.
   2.1 Toast use the new interface with display id to communicate with
       the Notification manager servcie.

3) Support to add/remove toast window token according to the displayId.

Bug: 80001975
Test: atest WindowManagerSmokeTest ActivityManagerMultiDisplayTests
Test: atest android.widget.cts.ToastTest
Test: manual, use ActivityView & launch a toast testing app in virtual
      display
      1. Make a toast.
      2. Verify the toast if show on the virtual display

Change-Id: I3a95c291af647ed9c6e966b2a90924097df19b6a
2018-08-15 14:20:54 +08:00
TreeHugger Robot
14590e6d0e Merge "Fixed an issue when updating media actions" 2018-08-14 22:35:29 +00:00
Makoto Onuki
e2d8ba1db9 Merge "Print DB file sizes in "dumpsys dbinfo"" 2018-08-14 21:31:22 +00:00
Makoto Onuki
016dc59fef Print DB file sizes in "dumpsys dbinfo"
- This will be included in bugreports, but only for running processes.

Bug: 111939259
Test: dumpsys dbinfo (when device locked and unlocked)
Change-Id: If743b2c3340eac7e6bc873ac655ac352a46fb7dc
2018-08-14 12:30:06 -07:00
Mathew Inwood
4fb17d17ca Add @UnsupportedAppUsage annotations
For packages:
  android.app.usage
  android.app.trust
  android.app.timezonedetector
  android.app.timezone
  android.app.timedetector
  android.app.job
  android.app.backup
  android.app.assist
  android.app.admin
  android.app

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I5d15d50344d7178617418846917f693cfabf006b
Merged-In: I618c5dc4462ae990d9df45c3e9ed3f092cc5138c
2018-08-14 14:25:44 +01:00
Mathew Inwood
61e8ae6144 Add @UnsupportedAppUsage annotations
For packages:
  android.app.usage
  android.app.trust
  android.app.timezonedetector
  android.app.timezone
  android.app.timedetector
  android.app.job
  android.app.backup
  android.app.assist
  android.app.admin
  android.app

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I618c5dc4462ae990d9df45c3e9ed3f092cc5138c
2018-08-14 14:17:44 +01:00
Serik Beketayev
c68cef04fa [JobScheduler] Typo fix
Fixing wrong constaints used to identify state of the job

Test: WIP
Bug: 111413203
Change-Id: I161178a71a7d25d865e40da08bbb61f34450cf23
2018-08-11 02:34:02 +00:00
Julia Reynolds
efcdff4528 The quietening round 2 part 1
Allow the notification assistant to block or silence
incoming notifications, or demote notifications after they
are posted

Also temporarily silence everything by default

Plus: bonus refactoring of the cancel notification runnable so I could
write just one of those tests :)

Bug: 111475013
Test: manual, runtest systemui-notification
Change-Id: Ifa04a21919f60d06080cd63e7d7747180b641308
2018-08-10 15:47:54 -04:00
Neda Topoljanac
6e0404d4cc Merge "Modifing Javadoc for setStatusBarDisabled" 2018-08-09 10:53:41 +00:00
NedaTopoljanac
f132c26a13 Modifing Javadoc for setStatusBarDisabled
To clarify documentation for use in lock screen.

Test: not applicable
Bug: 110247271
Fixes: 110247271
Change-Id: I256a6f4bc01f0f117cb082b541863d7af3ba95cd
2018-08-09 10:38:09 +01:00
lumark
793e056aa1 Add TestApi for CtsActivityManagerDeviceTestCases.
1) Use @TestApis for verify AM related functions to replace using command.
2) Remove "development" protection level for some @TestApis permissions.

Bug: 77988683
Bug: 80415658
Test: atest CtsActivityManagerDeviceTestCases
Change-Id: I4bb10b45a2269c9e871f38f219d3e92cb45eeb9d
2018-08-08 15:14:15 +08:00
Felipe Leme
8d7f7f4f28 Added new API to support multi-activity autofill workflows.
For example, when an app uses one activity to enter username, another for
password.

Bug: 112051762

Test: atest MultiScreenLoginTest # new API
Test: atest CtsAutoFillServiceTestCases # to make sure it doesn't break anything
Test: m -j update-api

Change-Id: Ia95888901ab72f75938efb87103cd76f5ec8ce09
2018-08-07 11:36:20 -07:00
Serik Beketayev
75915d1b9c [JobScheduler] Add hidden API call surface for snapshotting job execution state
Test: WIP
Bug: 111413203
Change-Id: I5356d0821b3d6a657bf50249fdeabf6f0300bf81
2018-08-07 00:51:57 +00:00
Benjamin Miller
625f91aa46 Docs: fixed a broken link in SystemUpdatePolicy
{@docroot} is relative to the root dir, not the host.
Updated the destination and anchor text to reflect the new OTA guide.

Bug: 111521364
Test: make ds-docs and inspect generated HTML
Change-Id: I937f47338e8c18637947944467803c1764938754
2018-08-03 11:01:12 +00:00
Benjamin Miller
52e8f58b5e Merge "Docs: fixed example in SharedPreferencesBackupHelper" 2018-08-03 08:15:33 +00:00
Winson Chung
e4c7d37e03 Merge "Expose method to clear all visible recent tasks" 2018-08-02 21:08:56 +00:00
Winson Chung
e643910a33 Expose method to clear all visible recent tasks
- Atomically remove all the visible tasks so that SysUI doesn't need to
  remove each task individually.

Bug: 80471073
Test: atest FrameworksServicesTests:RecentTasksTest#testRemoveAllVisibleTasks
Change-Id: I23a6e152e94d5462948ab40adc9d7baf593847e1
2018-08-01 12:16:51 -07:00
Bernardo Rufino
f3b8c6fe3a Merge "[KV] State machine to linear task w/ RemoteCall" 2018-08-01 17:56:27 +00:00
Benjamin Miller
0160e156d5 Docs: fixed example in SharedPreferencesBackupHelper
Test: make ds-docs and manual inspection of generated HTML
Bug: 111822295
Change-Id: I415b891ca684684eb88e2ab42ca06460022f0e42
2018-08-01 15:41:22 +00:00
Malcolm Chen
9afe59bf1c Have proper permission check in getConfigForSubId
In CarrierConfigManager, add pass context in constructor, so that
when calling CarrierConfigLoader#getConfigForSubId, it can pass
callingPackage.

Bug: 73136824
Test: regression
Change-Id: I4bbff4ea30e2d5473c14d24d6833bf3ca3c595ec
Merged-In: I4bbff4ea30e2d5473c14d24d6833bf3ca3c595ec
2018-07-31 18:43:01 -07:00
Felipe Leme
849df8f351 Disable warning on blocking one-way call from autofill server.
This behavior existed since autofill was introduced on O and most likely
won't be fixed on Q, so there's no point on warning. In fact, the warning is
often a red herring for other issues, not to mention a big logcat spammer.

Bug: 35708678
Test: manual verification looking at logcat

Change-Id: I40be4ce25abc5b097ea67e5cb34bb9c4237f0826
(cherry picked from commit 385ee5393d)
2018-07-31 13:10:33 -07:00
TreeHugger Robot
11eedb6379 Merge "Fix various crashes from a destroy-timeout activity" 2018-07-31 06:50:33 +00:00
Malcolm Chen
05ab439039 Have proper permission check in getConfigForSubId
In CarrierConfigManager, add pass context in constructor, so that
when calling CarrierConfigLoader#getConfigForSubId, it can pass
callingPackage.

Bug: 73136824
Test: regression
Change-Id: I4bbff4ea30e2d5473c14d24d6833bf3ca3c595ec
Merged-In: I4bbff4ea30e2d5473c14d24d6833bf3ca3c595ec
2018-07-30 17:08:27 -07:00
Bernardo Rufino
2d87f453d9 [KV] State machine to linear task w/ RemoteCall
This is the first CL of key-value backup refactor.

* Method execute() that executed the state machine states is now empty
  and run() is created with the initial version of the linear task. It's
  basically composed of begin + loop + end. Although it still has the notion
  of state, it's more restricted than before (with private methods returning
  the next state). This is intentional to avoid making this CL too heavy to
  review and to avoid too much behavioral changes here. In the next CLs I
  intend to remove BackupState.

* Introduction of RemoteCall, which encapsulates an outbound call that
  leaves the system_server, with time-out and cancellation built-in.
  Agent calls are now triggered using this. As a result there is no more
  operationComplete() method either.

* Cancellation now is cleaner. We don't need a step lock anymore, only a
  (volatile) boolean that is checked in every queue iteration. If asked
  to cancel during an ongoing agent call we rely on RemoteCall.cancel()
  to return control of the task thread to us. We wait for the cancel
  acknowledgement to preserve the contract of no more transport calls.

* PFTBT instantiation moved from the constructor to the run() method,
  which makes more sense.

* No need for mFinished, mBackupData == null bookkeeping since time-outs,
  cancellation and legitimate agent responses won't step into one another
  anymore.

* Ternary (mQueue.isEmpty) ? BackupState.FINAL : BackupState.RUNNING_QUEUE gone
  because we check this in the beginning of invokeNextAgent() and now we
  don't pay the state-machine tick price associated with the handler.

* PerformBackupTask call sites now call static method start(), that
  spins up a new dedicated thread for the task. This new thread is
  assigned the same (process) priority as the backup thread
  (THREAD_PRIORITY_BACKGROUND).

Work left for future CLs:

* RemoteCall spins up a new thread for kicking off the call, this is for
  system agents that are executed inline. Old PBT also executed in the same
  thread (backup handler thread), so maintaining this to keep this CL at
  a reasonable size.

Test: atest PerformBackupTaskTest
Test: atest RunFrameworksServicesRoboTests
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/backup
Test: atest CtsBackupTestCases
Test: atest CtsBackupHostTestCases
Test: atest GtsBackupTestCases
Test: atest GtsBackupHostTestCases
Test: adb shell bmgr backupnow <kv_packages>
Test: 1. adb shell bmgr backup <p1> <p2>
      2. adb shell bmgr run
      A) 3. Cancel while sending <p1> data to transport
         4. Verify <p1> is backed-up and not pending
	    Verify <p2> is not backed-up and is pending
      B) 3. Cancel while waiting for <p1> agent
         4. Verify <p1> is not backed-up and is pending
	    Verify <p2> is not backed-up and is pending

Change-Id: Ia456c4e807de95d662c9e923245be07e8996f58a
2018-07-30 17:04:02 +01:00
Riddle Hsu
66b74a82e5 Fix various crashes from a destroy-timeout activity
This prevents below 3 cases that caused by using the
removed token to server side:

Block at | From method              | Exception
-----------------------------------------------------
onCreate | reportSizeConfigurations | IllegalArgument
onStart  | isTopOfTask              | IllegalArgument
onResume | addView                  | BadToken

Bug: 109718716
Test: atest CtsActivityManagerDeviceTestCases:ActivityLifecycleTests
Test: Sample app in bug link.
Change-Id: I123a048c36f7ddbca0d5b1bf8060c3a4dd13a903
2018-07-30 17:04:43 +08:00
Lucas Dupin
8f09a5057e Expose Ambient Wallpaper API
In P we introduced a private concept of AOD wallpapers, in Q
we're making it a public surface.

Bug: 111395593
Test: make
Change-Id: I4c406386f0ee15dc8734a24b040482b6cb807126
2018-07-30 10:42:06 +08:00
Wale Ogunwale
906f9c629c Moved input time out handling to ActivityTaskManagerService (14/n)
Also:
- Post handling of scheduling GC from WM to AM side.
- Removed access on package manager through mAm reference.

Bug: 80414790
Test: Existing tests pass
Change-Id: Ia76c57411fc332ea099adb6ef7975e012b4d744c
2018-07-29 00:37:56 -07:00
TreeHugger Robot
cf8c852331 Merge "Add some compatibility support for resizing." 2018-07-27 17:03:18 +00:00
Winson Chung
b413299347 Dump the visible list for easier debugging
- For each task info returned for the visible task list, also dump some
  vars to make it easier to debug

Bug: 111272828
Test: adb shell dumpsys activity recents

Change-Id: Ie754cebd00ba07917054b9e5e3a69e0f72a072aa
2018-07-26 13:52:42 -07:00
Winson Chung
6b6a71a591 Merge "Consolidate RecentTaskInfo and RunningTaskInfo into TaskInfo class" 2018-07-26 18:58:02 +00:00
Garfield Tan
2746ab5bbb Add some compatibility support for resizing.
This includes changes to:
1) Allow app crash at most twice during resizing w/o interrupting
resizing process -- this is also necessary to support relaunching pre-N
app when user force maximizing/restoring pre-N apps.
2) Add crash tag to indicate that a crash happens during resizing.

This is one of starter tasks to improve large display UX, and a
spiritual cherry pick of a6364ef4af9e7e78934859f0ae2ea48e678a09c2 and
19bda6841f321ba780577265c90b0d4b7a066b1f.

Bug: 111840655
Test: go/wm-smoke
Change-Id: Ief9e1ee9cefbfd5cfd5047158f2bb1a12b19ed6f
2018-07-26 10:07:17 -07:00
Wale Ogunwale
590c716f8c Merge "Moved URI grants code out of ActivityManagerService to its own service (13/n)" 2018-07-26 03:56:08 +00:00
TreeHugger Robot
c3e9c8ba74 Merge "Added new test for AssistStructure." 2018-07-25 23:26:28 +00:00
Felipe Leme
c28cba10f8 Added new test for AssistStructure.
Test: atest app.assist.AssistStructureTest#testParcelizationForAutofill_oneSmallView
Bug: 37567426

Change-Id: I169a1605107b1da62f7d7363cd7ffb93554ba4ee
2018-07-25 13:57:34 -07:00