OSDN Git Service

android-x86/frameworks-base.git
6 years agoAAPT2: Add supported manifest elements
Ryan Mitchell [Wed, 25 Jul 2018 23:15:17 +0000 (16:15 -0700)]
AAPT2: Add supported manifest elements

Adds some elements present in res/values/attrs_manifest.xml to manifest
parsing.

<additional-certificate> in <manifest><application><uses-static-library>
<meta-data> in <manifest><permission>
<package-verifier> in <manifest>
<restrict-update> in <manifest>

Bug: 79755007
Test: manual
Change-Id: I50520a99ce5ced9908001430b2108d7a5c71f8a7
Merged-In: I50520a99ce5ced9908001430b2108d7a5c71f8a7
(cherry picked from commit 66f6cfb8a561a653db084b97adfa8c4d48979000)

6 years agoMerge "Migrate all offline/online sdk docs generation to use Metalava"
Treehugger Robot [Thu, 13 Sep 2018 22:44:35 +0000 (22:44 +0000)]
Merge "Migrate all offline/online sdk docs generation to use Metalava"

6 years agoMerge "Leave spaces between Operator name and Clock in StatusBar"
Evan Laird [Thu, 13 Sep 2018 17:24:09 +0000 (17:24 +0000)]
Merge "Leave spaces between Operator name and Clock in StatusBar"

6 years agoMerge changes from topic "remove-hidl-boot-jars"
Steven Moreland [Thu, 13 Sep 2018 15:14:35 +0000 (15:14 +0000)]
Merge changes from topic "remove-hidl-boot-jars"

* changes:
  pm: Add hidl libraries to old class paths.
  preloaded-classes: remove core HIDL libs

6 years agoLeave spaces between Operator name and Clock in StatusBar
Shigeki Yokomichi [Wed, 11 Apr 2018 06:46:00 +0000 (15:46 +0900)]
Leave spaces between Operator name and Clock in StatusBar

In StatusBar, there are no spaces between Operator name and Clock,
so leaving spaces to improve design.

Bug: 114133664
Test: Manual, enable operator name in status row
config_showOperatorNameInStatusBar, insert sim card with operator name,
watch status row.

Change-Id: I1a2e33436ed50d429ae4b1769d0a72d501233a22

6 years agoMerge "Initial rename to IpServer"
Erik Kline [Thu, 13 Sep 2018 10:28:27 +0000 (10:28 +0000)]
Merge "Initial rename to IpServer"

6 years agoInitial rename to IpServer
Erik Kline [Mon, 27 Aug 2018 08:26:47 +0000 (17:26 +0900)]
Initial rename to IpServer

Rename TetherInterfaceStateMachine to IpServer. IControlsTethering
is folded into IpServer.Callback and some of the dependencies in
TetheringDependencies are moved into IpServer.Dependencies.

Several things still need fixing, including:
    - convert message passing into method calls
    - the calls that enable forwarding should be moved up out of
      IpServer into the Tethering layer above it

Test: as follows
    - built, flashed, booted
    - runtest frameworks-net passes
Change-Id: I015f800ed23c8aa5c8c81a74d7b508abfcaab659

6 years agoMerge "Remove the last of the ResolvUtil uses"
Treehugger Robot [Thu, 13 Sep 2018 06:39:16 +0000 (06:39 +0000)]
Merge "Remove the last of the ResolvUtil uses"

6 years agoMerge "Add new telecom metrics for emergency dialer"
Shaotang Li [Thu, 13 Sep 2018 05:59:51 +0000 (05:59 +0000)]
Merge "Add new telecom metrics for emergency dialer"

6 years agoMerge "Bandwidth-related commands porting"
Luke Huang [Thu, 13 Sep 2018 03:01:22 +0000 (03:01 +0000)]
Merge "Bandwidth-related commands porting"

6 years agoMerge "Simplify logic for connect in HfpClientProfile"
Treehugger Robot [Thu, 13 Sep 2018 03:00:19 +0000 (03:00 +0000)]
Merge "Simplify logic for connect in HfpClientProfile"

6 years agoMerge "Simplify logic for connect in A2dpSinkProfile"
Treehugger Robot [Thu, 13 Sep 2018 02:58:50 +0000 (02:58 +0000)]
Merge "Simplify logic for connect in A2dpSinkProfile"

6 years agoMerge "Add New TelephonyManager APIs"
Pengquan Meng [Thu, 13 Sep 2018 01:09:47 +0000 (01:09 +0000)]
Merge "Add New TelephonyManager APIs"

6 years agoMigrate all offline/online sdk docs generation to use Metalava
Nan Zhang [Wed, 22 Aug 2018 18:27:31 +0000 (11:27 -0700)]
Migrate all offline/online sdk docs generation to use Metalava

These targets all depend on libcore sources which are blocker for us to
enable java9 feature, so convert them to Metalava.

Also enable API level annotations for api-stubs-docs, offline-sdk-docs,
and online-sdk-docs.

Test: m -j docs
Bug: b/78245848
Change-Id: I354d699a79cc5e6580b50e0613e7602c77b9c0b5

6 years agoMerge "OMS: fix typos in permission check message"
Treehugger Robot [Wed, 12 Sep 2018 22:26:26 +0000 (22:26 +0000)]
Merge "OMS: fix typos in permission check message"

6 years agoMerge "ByteBucketArray.h: fix typo"
Treehugger Robot [Wed, 12 Sep 2018 22:26:22 +0000 (22:26 +0000)]
Merge "ByteBucketArray.h: fix typo"

6 years agoMerge "Update TelephonyManager document"
Pengquan Meng [Wed, 12 Sep 2018 22:12:15 +0000 (22:12 +0000)]
Merge "Update TelephonyManager document"

6 years agoMerge "Restrict IMM.notifyUserAction() with targetSdkVersion <= P"
Treehugger Robot [Wed, 12 Sep 2018 19:04:40 +0000 (19:04 +0000)]
Merge "Restrict IMM.notifyUserAction() with targetSdkVersion <= P"

6 years agoMerge "Use UID as requestID"
Benedict Wong [Wed, 12 Sep 2018 18:51:33 +0000 (18:51 +0000)]
Merge "Use UID as requestID"

6 years agoMerge "For metalava target, use droidstubs instead of droiddoc"
Nan Zhang [Wed, 12 Sep 2018 18:15:11 +0000 (18:15 +0000)]
Merge "For metalava target, use droidstubs instead of droiddoc"

6 years agoMerge "Remove IInputMethodManager.getEnabledInputMethodList() from greylist"
Treehugger Robot [Wed, 12 Sep 2018 17:29:55 +0000 (17:29 +0000)]
Merge "Remove IInputMethodManager.getEnabledInputMethodList() from greylist"

6 years agoUpdate TelephonyManager document
Pengquan Meng [Tue, 28 Aug 2018 01:50:30 +0000 (18:50 -0700)]
Update TelephonyManager document

Bug: 111453847
Test: build
Merged-In: Ief746e771dc9435782dec75cf2259d5b9f040c27
Change-Id: Ief746e771dc9435782dec75cf2259d5b9f040c27

6 years agoMerge "Use multiple patterns and emails in per-file syntax."
Chih-hung Hsieh [Wed, 12 Sep 2018 16:27:02 +0000 (16:27 +0000)]
Merge "Use multiple patterns and emails in per-file syntax."

6 years agopm: Add hidl libraries to old class paths.
Steven Moreland [Tue, 4 Sep 2018 20:20:22 +0000 (13:20 -0700)]
pm: Add hidl libraries to old class paths.

These two libraries:
android.hidl.base-V1.0-java
android.hidl.manager-V1.0-java

are being removed from BOOT_JARS. This change facilitates linking to them
for libraries or prebuilts in or before P.

Test: atest android.content.pm.AndroidHidlUpdaterTest
Bug: 77307025

Change-Id: Ic0db24cc68d66f5dbfab126ce7e304eec0bfc969

6 years agopreloaded-classes: remove core HIDL libs
Steven Moreland [Thu, 16 Aug 2018 19:32:36 +0000 (12:32 -0700)]
preloaded-classes: remove core HIDL libs

These are being removed from boot jars.

Test: (sanity) boot device, no longer see 'Class not found for preloading'
Bug: 77307025
Change-Id: I854d3397ff362495ff392c2c4ea8594d1b2449bd

6 years agoMerge "Fix typo in android.net.Uri documentation."
Treehugger Robot [Wed, 12 Sep 2018 15:33:36 +0000 (15:33 +0000)]
Merge "Fix typo in android.net.Uri documentation."

6 years agoSimplify logic for connect in HfpClientProfile
Chienyuan [Wed, 5 Sep 2018 12:29:23 +0000 (20:29 +0800)]
Simplify logic for connect in HfpClientProfile

* connect: remove connected device check logic.
  HeadsetClientStateMachine will check it.
* Remove member variable V and related checks.
* wrap if/else statement in curly brackets.
* add robotest for HfpClientProfile.

Bug: 111812003
Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=HfpClientProfileTest
Change-Id: Ie36efd6d0a9f8e6501a3690b026ea4bd39744b5c
Merged-In: Ie36efd6d0a9f8e6501a3690b026ea4bd39744b5c

6 years agoSimplify logic for connect in A2dpSinkProfile
Chienyuan [Wed, 5 Sep 2018 13:28:59 +0000 (21:28 +0800)]
Simplify logic for connect in A2dpSinkProfile

* connect: remove connected device check logic. A2dpSinkService
  will check it.
* Remove member variable V and related checks.
* wrap if/else statement in curly brackets.
* add robotest for A2dpSinkProfile.

Bug: 111812003
Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=A2dpSinkProfileTest
Change-Id: Ia0a118d73e5bb35ed3b2b75e67aeb98ae936981f
Merged-In: Ia0a118d73e5bb35ed3b2b75e67aeb98ae936981f

6 years agoRemove the last of the ResolvUtil uses
Erik Kline [Wed, 12 Sep 2018 05:37:11 +0000 (14:37 +0900)]
Remove the last of the ResolvUtil uses

This is the completion of cleanup work started in aosp/674269.
Consequently, also remove ResolvUtil.

Test: as follows
    - built, flashed, booted
    - runtest frameworks-net passes
    - presubmit
Bug: 64133961
Bug: 72345192
Bug: 73872000
Bug: 78548486
Change-Id: I980f8a9b67f3f06f2d97a60f8e58e92c36316d40

6 years agoMerge "Fix ConcurrentModificationException crash due to race in IpClient"
Treehugger Robot [Wed, 12 Sep 2018 04:32:19 +0000 (04:32 +0000)]
Merge "Fix ConcurrentModificationException crash due to race in IpClient"

6 years agoFix ConcurrentModificationException crash due to race in IpClient
Jacob Abrams [Tue, 11 Sep 2018 00:00:46 +0000 (17:00 -0700)]
Fix ConcurrentModificationException crash due to race in IpClient

Bug: https://issuetracker.google.com/issues/114838819

Test: manual
Change-Id: Ifd1522ccaca10c0416fc2d00641c4effee37fc6c

6 years agoMerge "Make SubscriptionManager.isValidSubscriptionId public"
Treehugger Robot [Tue, 11 Sep 2018 23:47:31 +0000 (23:47 +0000)]
Merge "Make SubscriptionManager.isValidSubscriptionId public"

6 years agoMerge "Avoiding potential NPE when dumping to proto."
Mike Ma [Tue, 11 Sep 2018 23:28:39 +0000 (23:28 +0000)]
Merge "Avoiding potential NPE when dumping to proto."

6 years agoFor metalava target, use droidstubs instead of droiddoc
Nan Zhang [Tue, 11 Sep 2018 01:58:39 +0000 (18:58 -0700)]
For metalava target, use droidstubs instead of droiddoc

droidstubs is used to generate stubs files only.

Test: m -j api-stubs-docs
Bug: b/8d0763849
Change-Id: Ia7c3d19ed2ec7b0f5b96008e5780dbcd5a32402b

6 years agoAdd New TelephonyManager APIs
Pengquan Meng [Thu, 6 Sep 2018 17:27:01 +0000 (10:27 -0700)]
Add New TelephonyManager APIs

Bug:111453847
Test: build test
Merged-In: I83a5f4149f92ce495cd066f7158e7ff37a66894f
Change-Id: I83a5f4149f92ce495cd066f7158e7ff37a66894f

6 years agoMerge "DO NOT MERGE base: getDataUsageInfo get cycle validation"
Treehugger Robot [Tue, 11 Sep 2018 22:02:49 +0000 (22:02 +0000)]
Merge "DO NOT MERGE base: getDataUsageInfo get cycle validation"

6 years agoMerge changes from topic "ownerz"
Jeff Sharkey [Tue, 11 Sep 2018 21:35:36 +0000 (21:35 +0000)]
Merge changes from topic "ownerz"

* changes:
  Tweaks to AOSP upload hook logic.
  Upload hook that guides people towards AOSP.

6 years agoRemove IInputMethodManager.getEnabledInputMethodList() from greylist
Yohei Yukawa [Tue, 11 Sep 2018 20:48:02 +0000 (13:48 -0700)]
Remove IInputMethodManager.getEnabledInputMethodList() from greylist

App developers must never need to call this IPC method directly via
reflection.  The same functionality has been exposed as a public API
InputMethodManager#getEnabledInputMethodList() since its beggining.

Just for the record, this is what
InputMethodManager#getEnabledInputMethodList() is doing.

  public List<InputMethodInfo> getEnabledInputMethodList() {
      try {
          return mService.getEnabledInputMethodList();
      } catch (RemoteException e) {
          throw e.rethrowFromSystemServer();
      }
  }

Bug: 112722706
Test: compile
Merged-In: Idf9fa866f73dbd151bb67f60dbd57041d9055a23
Change-Id: Idf9fa866f73dbd151bb67f60dbd57041d9055a23

6 years agoDO NOT MERGE base: getDataUsageInfo get cycle validation
John Zhao [Wed, 5 Sep 2018 16:29:31 +0000 (00:29 +0800)]
DO NOT MERGE base: getDataUsageInfo get cycle validation

When the DataUsageController calculate the DataUsageInfo
based on the cycle from NetworkPolicyManager, that cycle
should be not null. Otherwise, it couldn't be used to do
operation like toInstant() directly.

The error could be got from logcat is as:
E AndroidRuntime: Caused by: java.lang.NullPointerException:
Attempt to invoke virtual method 'java.time.Instant
java.time.ZonedDateTime.toInstant()' on a null object reference

E AndroidRuntime:          at com.android.settingslib.net.
DataUsageController.getDataUsageInfo
(DataUsageController.java:140)

Inside of the core/java/android/net/NetworkPolicyManager.java:
public static Iterator<Pair<ZonedDateTime, ZonedDateTime>>
 cycleIterator(NetworkPolicy policy) {
... ...
return Pair.create(null, null);
... ...
}
That should be avoided.

Considering it could be happened in the NetworkPolicyManager side,
and it is reasonable if it did it, validating operation is better
to be considered by any caller such as the DataUsageController.

Bug: 113952713

Test: specify the hasNext to be false but the DataUsageController
don't crash.

Change-Id: I2469c129a160e30615ea6011adf18688f951eac8
Signed-off-by: John Zhao <yuankuiz@qualcomm.corp-partner.google.com>
6 years agoRestrict IMM.notifyUserAction() with targetSdkVersion <= P
Yohei Yukawa [Tue, 11 Sep 2018 20:34:36 +0000 (13:34 -0700)]
Restrict IMM.notifyUserAction() with targetSdkVersion <= P

With my change [1] in Android N, applications no longer need to
manually call this hidden API even when directly implementing
InputConnection interface without extending BaseInputConnection [2].

So far applications that we have confirmed to be using this hidden API
is Chromium and browsers that are supposed to be built on top of
Chromium source code [3].  Actually my change [1] was per request from
Chromium team and Chromium does not use this hidden API on Android N
and later devices [4].

Moving forward, with this CL applications that target API 29 and later
are no longer allowed to use this hidden API since we see no actual
use case of this hidden API on Android N and later devices so far.

If you have any reason to continue relying on this hidden API, please
leave a comment in Bug 114740982.

 [1]: I571d6cc9c6e461d8994aa7496e7e18be13766411
      159dd47db34151314e2449347251ad32b30e5ea1
 [2]: This scenario had not been suppored until Android N.
      See also other CLs that are tagged with Bug 24688781.
 [3]: https://cs.chromium.org/chromium/src/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapperImpl.java?rcl=525c72b0f4694d6b3f93bcc7797d0411c2fa683c&l=113-128
 [4]: crbug.com/551193

Bug: 114159783
Bug: 114740982
Test: compile
Merged-In: I41d6419438cef92cce81cc33d9db00dd2ee89d33
Change-Id: Iac81f49413605271fccc0b8aec3e6ed95925f061

6 years agoMerge "Convert AudioAttribute to Stream correctly for TTS"
Treehugger Robot [Tue, 11 Sep 2018 19:26:56 +0000 (19:26 +0000)]
Merge "Convert AudioAttribute to Stream correctly for TTS"

6 years agoAvoiding potential NPE when dumping to proto.
Kweku Adams [Tue, 4 Sep 2018 18:54:46 +0000 (11:54 -0700)]
Avoiding potential NPE when dumping to proto.

Inspired by aosp/736453. Cherry-picked from ag/4934453

Bug: 113087610
Test: Android builds
Change-Id: I9f0dae9cd5a839947c7ed150980eb30b928beef7

6 years agoMake SubscriptionManager.isValidSubscriptionId public
sqian [Thu, 30 Aug 2018 18:53:14 +0000 (11:53 -0700)]
Make SubscriptionManager.isValidSubscriptionId public

And rename subId to subscriptionId.

Test: Treehugger
Bug: 113072551
Change-Id: I4bdf705d7f81bad423ed867972fd1ed7fe5717d0

6 years agoMerge "Add API to listen to opportunistic subscriptions change."
Xiangyu/Malcolm Chen [Tue, 11 Sep 2018 18:30:19 +0000 (18:30 +0000)]
Merge "Add API to listen to opportunistic subscriptions change."

6 years agoTweaks to AOSP upload hook logic.
Jeff Sharkey [Tue, 11 Sep 2018 16:36:57 +0000 (10:36 -0600)]
Tweaks to AOSP upload hook logic.

Lists all matching files, and slightly more robust path handling.

Bug: 113136846
Test: manual
Change-Id: Ic1971a3df97b8b137993b5856b47d0d706a996cd

6 years agoUpload hook that guides people towards AOSP.
Jeff Sharkey [Fri, 24 Aug 2018 04:01:53 +0000 (22:01 -0600)]
Upload hook that guides people towards AOSP.

The canonical location of certain parts of the source tree live in
AOSP, and should not be changed internally to avoid merge conflicts.

This initially starts with "OWNERS" files, but the hook can easily
be repeated to match any files based on file path regexes.

Bug: 113136846
Test: manual
Change-Id: I113e63b6133f20389d84ec0d6d8b81cdbdf35d38
Merged-In: I113e63b6133f20389d84ec0d6d8b81cdbdf35d38

6 years agoMerge "Framework: Remove a nonsensical substring(0)"
Treehugger Robot [Tue, 11 Sep 2018 16:30:36 +0000 (16:30 +0000)]
Merge "Framework: Remove a nonsensical substring(0)"

6 years agoMerge "Reset launch start times when removing a process"
Treehugger Robot [Tue, 11 Sep 2018 16:09:59 +0000 (16:09 +0000)]
Merge "Reset launch start times when removing a process"

6 years agoMerge "Revert "Check in P dark greylist, use it for hidden API list generation""
David Brazdil [Tue, 11 Sep 2018 15:27:40 +0000 (15:27 +0000)]
Merge "Revert "Check in P dark greylist, use it for hidden API list generation""

6 years agoOMS: fix typos in permission check message
MÃ¥rten Kongstad [Fri, 8 Jun 2018 06:51:13 +0000 (08:51 +0200)]
OMS: fix typos in permission check message

Calls to enforceChangeOverlayPackagesPermission and handleIncomingUser
include a string parameter to be added to the exception thrown if the
caller doesn't hold the expected permission. Fix a couple of typos in
these strings.

Test: builds, boots
Change-Id: I70256c41d61f8af3735697c6e63644e5ac46fd84

6 years agoByteBucketArray.h: fix typo
MÃ¥rten Kongstad [Wed, 28 Feb 2018 08:52:16 +0000 (09:52 +0100)]
ByteBucketArray.h: fix typo

Bug: 78815803
Test: builds, boots
Change-Id: I93d7ce5255911797d6afdb05caf0cf7dbfdc22b9

6 years agoConvert AudioAttribute to Stream correctly for TTS
Tomoharu Kasahara [Tue, 11 Sep 2018 10:14:39 +0000 (19:14 +0900)]
Convert AudioAttribute to Stream correctly for TTS

Add FLAG_BEACON for STREAM_TTS then use it for
conversion from AudioAttribute to stream type.

Bug: 113303490
Test: Use AudioAttributes.toLegacyStreamType

Change-Id: I7fa2b3f095437f8077545d1fff795bb0d8fe6b89

6 years agoRevert "Check in P dark greylist, use it for hidden API list generation"
David Brazdil [Tue, 11 Sep 2018 10:09:01 +0000 (11:09 +0100)]
Revert "Check in P dark greylist, use it for hidden API list generation"

This reverts commit 3cc74c71ef907a76547424aea6597f7b2907e9fb.
We saw app crashes due stricter classification of non-SDK APIs.

Bug: 115284625
Bug: 113881436
Test: phone boots

Change-Id: I689d0fbf66fabeffa5032e13f2f1f314c50b6cc5

6 years agoFix typo in android.net.Uri documentation.
Tobias Thierer [Tue, 11 Sep 2018 09:35:11 +0000 (10:35 +0100)]
Fix typo in android.net.Uri documentation.

This typo has been present since before the "auto import"
of cupcake sources in 2009.

Bug: 114704047
Test: Treehugger
Test: Checked through source inspection that this really returns
      the encoded form: its implementation is ssp.getEncoded(),
      whose implementation in turn is:
      return hasEncoded ? encoded : (encoded = encode(decoded));
Change-Id: I0e4fed702e6b3012429778ccbd18a495a5d69e9f

6 years agoMerge "Remove services.net JAR dependency"
Treehugger Robot [Tue, 11 Sep 2018 08:31:05 +0000 (08:31 +0000)]
Merge "Remove services.net JAR dependency"

6 years agoRemove services.net JAR dependency
Erik Kline [Tue, 11 Sep 2018 05:59:08 +0000 (14:59 +0900)]
Remove services.net JAR dependency

Test: as follows
    - built, flashed, booted
    - runtest frameworks-net passes
    - captive portal interaction works as expected in Private DNS
      strict mode
Bug: 64133961
Bug: 72345192
Bug: 73872000
Bug: 78548486

Merged-In: Ia2ab2fb15e7898d99d30da20699e0bbd7a5a0964
Change-Id: I290811305fd89a4fb5633b47173aaec28e9ed4b5

6 years agoMerge "Try to set the hop limit to something suitable for 64share"
Treehugger Robot [Tue, 11 Sep 2018 05:55:37 +0000 (05:55 +0000)]
Merge "Try to set the hop limit to something suitable for 64share"

6 years agoMerge "Simplify logic for disconnect and getConnectionStatus in MapProfile"
Treehugger Robot [Tue, 11 Sep 2018 03:49:37 +0000 (03:49 +0000)]
Merge "Simplify logic for disconnect and getConnectionStatus in MapProfile"

6 years agoBandwidth-related commands porting
Luke Huang [Tue, 7 Aug 2018 08:04:26 +0000 (16:04 +0800)]
Bandwidth-related commands porting

remove bandwidth enable command
netd will handle it

Test: runtest frameworks-net passes
Test: manual testing of bandwidth works
Change-Id: I2cccbc8e682e64368640bdea01f03574b3948c2a

6 years agoMerge "Stop invoke initAppOps in Camera default constructor."
Treehugger Robot [Tue, 11 Sep 2018 01:32:53 +0000 (01:32 +0000)]
Merge "Stop invoke initAppOps in Camera default constructor."

6 years agoAdd API to listen to opportunistic subscriptions change.
Malcolm Chen [Wed, 5 Sep 2018 05:12:31 +0000 (22:12 -0700)]
Add API to listen to opportunistic subscriptions change.

Add a new set of APIs so that caller can listen to
opportunistic subscriptions changes.

Bug: 92796390
Test: build
Change-Id: Iaa741141bf1bd04c4b1618d5bfeac733a0690ed8
Merged-In: Iaa741141bf1bd04c4b1618d5bfeac733a0690ed8

6 years agoReset launch start times when removing a process
Vishnu Nair [Thu, 6 Sep 2018 19:49:24 +0000 (12:49 -0700)]
Reset launch start times when removing a process

When removing an exiting process that is running foreground activities, clear the launch times for
the current windowing mode. When an app process is removed, activities from the process may be
relaunched. In the case of forceStopPackageLocked the activities are finished before any window
is drawn, and the launch time is not cleared. This will be incorrectly used to calculate launch time
for the next launched activity launched in the same windowing mode.

Bug: 80084651
Test: adb shell am start -W com.amazon.mShop.android.shopping/com.amazon.mShop.home.HomeActivity  && sleep 1 && adb shell am force-stop com.amazon.mShop.android.shopping
Merged-In: I2c4f0716c922baa1ad209b4ea1fa7ce366e0e108
Change-Id: I2c4f0716c922baa1ad209b4ea1fa7ce366e0e108

6 years agoMerge "Framework: Be more verbose in A/B OTA"
Andreas Gampe [Mon, 10 Sep 2018 21:28:21 +0000 (21:28 +0000)]
Merge "Framework: Be more verbose in A/B OTA"

6 years agoMerge "Framework: Ensure important fdsan function is compiled"
Andreas Gampe [Mon, 10 Sep 2018 21:27:38 +0000 (21:27 +0000)]
Merge "Framework: Ensure important fdsan function is compiled"

6 years agoFramework: Ensure important fdsan function is compiled
Andreas Gampe [Mon, 10 Sep 2018 18:06:42 +0000 (11:06 -0700)]
Framework: Ensure important fdsan function is compiled

Compile ForwardingOs fdsan-using functions. Follow-up to commit
5625660c650a0923d4c7f020f2eb7eef7d5962d4.

The function is relatively hot now, and importantly part of the
'abort' stack for fdsan issues.

Test: m
Change-Id: Iad9883b8fd85fc362bb3252739e3e3acc45373af

6 years agoFramework: Be more verbose in A/B OTA
Andreas Gampe [Wed, 5 Sep 2018 23:11:50 +0000 (16:11 -0700)]
Framework: Be more verbose in A/B OTA

Bug: 114091593
Test: m
Change-Id: Ib0895188455a8340cefb7d0fd609012440b6473b

6 years agoUse multiple patterns and emails in per-file syntax.
Chih-Hung Hsieh [Thu, 23 Aug 2018 21:59:43 +0000 (14:59 -0700)]
Use multiple patterns and emails in per-file syntax.

Test: build/make/tools/checkowners.py -c -v OWNERS
Change-Id: I46a4788c0cda69d0a3aadcf1f3dc539aa3c62fc3

6 years agoMerge "Netd unconditionally enable bandwidth control"
Luke Huang [Mon, 10 Sep 2018 10:33:29 +0000 (10:33 +0000)]
Merge "Netd unconditionally enable bandwidth control"

6 years agoMerge "Include dark greylist entries from annotations."
Mathew Inwood [Mon, 10 Sep 2018 08:25:46 +0000 (08:25 +0000)]
Merge "Include dark greylist entries from annotations."

6 years agoSimplify logic for disconnect and getConnectionStatus in MapProfile
Chienyuan [Wed, 5 Sep 2018 09:03:20 +0000 (17:03 +0800)]
Simplify logic for disconnect and getConnectionStatus in MapProfile

* disconnect: remove connected device check logic. BluetoothMapService
  will check it.
* getConnectionStatus: remove connected device check logic.
  BluetoothMapService will check it.
* Rewrite the annotation about this class.
* Remove member variable V and related checks.
* wrap if/else statement in curly brackets.

Bug: 111812003
Test: manual - disconnect MAP from Settings UI
Change-Id: I2469821f0ae2e3f384844326b30c7d3c4c88ab63

6 years agoMerge "Framework: Ensure important fdsan function is compiled"
Treehugger Robot [Sat, 8 Sep 2018 02:16:11 +0000 (02:16 +0000)]
Merge "Framework: Ensure important fdsan function is compiled"

6 years agoFramework: Ensure important fdsan function is compiled
Andreas Gampe [Fri, 7 Sep 2018 16:58:37 +0000 (09:58 -0700)]
Framework: Ensure important fdsan function is compiled

Compile IoUtils fdsan-using functions.

Test: m
Change-Id: If1f3d7fc57890309c15794cee5cd0f338cbd2bd8

6 years agoInclude dark greylist entries from annotations.
Mathew Inwood [Fri, 7 Sep 2018 13:30:24 +0000 (14:30 +0100)]
Include dark greylist entries from annotations.

@UnsupportedAppUsage annotations support setting a maxTargetSdk property
on the which results in the member being placed on the dark grey list,
or in future on a P or Q blacklist.

Bug: 114361293
Test: m
Change-Id: I33be28f8afb034a030bdf5cf29d43ba72f50bfcd

6 years agoMerge "Fix usage of internal mockito API"
Philip P. Moltmann [Fri, 7 Sep 2018 15:27:24 +0000 (15:27 +0000)]
Merge "Fix usage of internal mockito API"

6 years agoMerge "Move ApplicationInfo.usesNonSdkApi to private flags"
David Brazdil [Fri, 7 Sep 2018 09:32:13 +0000 (09:32 +0000)]
Merge "Move ApplicationInfo.usesNonSdkApi to private flags"

6 years agoMerge changes from topic "hiddenapi-dark-grey"
David Brazdil [Fri, 7 Sep 2018 09:31:56 +0000 (09:31 +0000)]
Merge changes from topic "hiddenapi-dark-grey"

* changes:
  Ignore comment lines in hidden api lists
  Mark hidden API lists .KATI_RESTAT
  Check in P dark greylist, use it for hidden API list generation

6 years agoNetd unconditionally enable bandwidth control
Luke Huang [Fri, 7 Sep 2018 04:02:16 +0000 (12:02 +0800)]
Netd unconditionally enable bandwidth control

Remove code which is used to enable bandwidth controller.
Netd default enable it.

Test: The bindwith control start correctly on new devices.
Change-Id: I9498d2175104b31a6d37ea3ba6937c91c560d0a2

6 years agoMerge "Always enable bandwidth control in Q"
Treehugger Robot [Fri, 7 Sep 2018 02:44:10 +0000 (02:44 +0000)]
Merge "Always enable bandwidth control in Q"

6 years agoMerge "Build android.test.* with java_sdk_library"
Treehugger Robot [Fri, 7 Sep 2018 01:01:59 +0000 (01:01 +0000)]
Merge "Build android.test.* with java_sdk_library"

6 years agoFix usage of internal mockito API
Philip P. Moltmann [Thu, 6 Sep 2018 23:44:58 +0000 (16:44 -0700)]
Fix usage of internal mockito API

The StubberImpl now takes an argument. Set it to default.

Test: m -j TtsTests
Change-Id: Id1175bd40489c7dee2c8c0993a65836d86e38cb3

6 years agoMerge changes from topic "b113052379-cp-from-pi-dev-p2"
Ryan Prichard [Thu, 6 Sep 2018 20:35:24 +0000 (20:35 +0000)]
Merge changes from topic "b113052379-cp-from-pi-dev-p2"

* changes:
  Camera: Documentation update to remove physicalIds
  Camera: Documentation updates for calibration and distortion correction

6 years agoMerge "Make SubscriptionManager.getSubId public"
Treehugger Robot [Thu, 6 Sep 2018 20:06:02 +0000 (20:06 +0000)]
Merge "Make SubscriptionManager.getSubId public"

6 years agoMerge "Fix compilation when targeting OpenJDK 9."
Tobias Thierer [Thu, 6 Sep 2018 18:12:44 +0000 (18:12 +0000)]
Merge "Fix compilation when targeting OpenJDK 9."

6 years agoFix compilation when targeting OpenJDK 9.
Tobias Thierer [Thu, 6 Sep 2018 16:30:28 +0000 (17:30 +0100)]
Fix compilation when targeting OpenJDK 9.

CL [1] added a new compilation target that uses internal API
that is now in the jdk.compiler module and is not exported
(it is subject to removal without notice in future versions of
OpenJDK). The fact that these packages are not exported suggests
that a replacement API is already available, but I don't know the
details.

For now, this CL uses javac command-line flags to export these
packages, which fixes compilation. Since the commit message from
CL [1] implies that the entire tool can be removed once bug 77284273
is fixed, a longer-term solution should not be required.

[1] https://android-review.googlesource.com/c/platform/frameworks/base/+/745655
    commit bad89e5e5b171a71e42d7c738ec97a39747e4318

Test: The following breaks before but not after this CL:
  EXPERIMENTAL_USE_OPENJDK9=true make unsupportedappusage-annotation-processor
Bug: 113853502

Change-Id: I24b77af9262891428a01e2eccc18fa3a5c3b3bc9

6 years agoMove ApplicationInfo.usesNonSdkApi to private flags
David Brazdil [Thu, 6 Sep 2018 08:49:14 +0000 (09:49 +0100)]
Move ApplicationInfo.usesNonSdkApi to private flags

No need to create an extra field for a boolean flag. Move the recently
added ApplicationInfo.usesNonSdkApi to one bit in privateFlags.

This also solves an issue where the field was not propagated during
copying of the data structure.

Bug: 113315999
Test: phone boots
Merged-In: I09f8f39454c013a84893ac304904a4412fc542bf
Change-Id: I09f8f39454c013a84893ac304904a4412fc542bf
(cherry picked from commit a5b4df2a8937fed8cb07fa5b63252d013c808fe7)

6 years agoIgnore comment lines in hidden api lists
David Brazdil [Thu, 6 Sep 2018 13:46:55 +0000 (14:46 +0100)]
Ignore comment lines in hidden api lists

It is sometimes useful to add comments at the top of a source file. This
patch changes hidden API list generation to ignore lines beginning with
a hash.

Note that due to the sorting constraints on hidden API lists, comments
can be only at the top of the files.

Test: m appcompat
Change-Id: I1bc6fd44d1b1f10a5adc45093d7f7ed5a0c5a54f

6 years agoMark hidden API lists .KATI_RESTAT
David Brazdil [Thu, 6 Sep 2018 11:15:11 +0000 (12:15 +0100)]
Mark hidden API lists .KATI_RESTAT

Change hidden API list generation build rule so that it checks if
outputs have changed and only commit them when changes have been made.
.KATI_RESTAT instructs ninja to restat the outputs and remove reverse
dependencies when rebuilding dependencies is not needed.

Bug: 113278235
Test: m appcompat
Change-Id: Ic3ec82534a6d79b6a85f865a6e9eb5f0b3f12424

6 years agoCheck in P dark greylist, use it for hidden API list generation
David Brazdil [Thu, 6 Sep 2018 10:02:06 +0000 (11:02 +0100)]
Check in P dark greylist, use it for hidden API list generation

We want to preserve the same semantics as P wrt dark greylist. This will
eventually become the "blacklist for target SDK >= P".

Bug: 113881436
Test: phone boots
Change-Id: I3bb72102e1d054eb0f2cae089ab633a0bc2bb276

6 years agoMerge "Tighten up neighbor timers if IpReachabilityMonitor is in use"
Treehugger Robot [Thu, 6 Sep 2018 08:42:05 +0000 (08:42 +0000)]
Merge "Tighten up neighbor timers if IpReachabilityMonitor is in use"

6 years agoAdd new telecom metrics for emergency dialer
Shaotang Li [Thu, 19 Jul 2018 09:29:39 +0000 (17:29 +0800)]
Add new telecom metrics for emergency dialer

These includes,
1. The source where user initiated the call.
2. The duration between START_CONNECTION and REQUEST_DISCONNECT.

Bug: 111818008
Test: manual and check the result of
'adb shell dumpsys telecom' for metrics data
Change-Id: Iddc7f256362abe9fe252bd12cead05a7d77d329e

6 years agoTighten up neighbor timers if IpReachabilityMonitor is in use
Erik Kline [Thu, 6 Sep 2018 02:10:03 +0000 (11:10 +0900)]
Tighten up neighbor timers if IpReachabilityMonitor is in use

Currently the kernel sends 3 probes, 1000ms apart when a neighbor is
in NUD_PROBE state (either naturally or artificially moved to that
state when, for example, confirming network configuration following
an AP association/roam).

With this change the device sends 5 probes at 750ms apart.  This
gives the network infrastructure a chance to respond to any of
5 probes instead of any of only 3, at a cost of increasing the total
probe time from 3s to 3.75s.

Future changes may read these values from settings (or from somewhere
else) so that experiments may be conducted or values adjusted based on
other information.

Test: as follows
    - built, flashed, booted
    - runtest frameworks-net passes
    - examinaton of /proc settings on wifi shows updated values
    - connected to a test network, disconnected the backhaul, ran
      "adb shell dumpsys wifi ipclient confirm" while watching
      "adb shell tcpdump -n -i wlan0 -l -vv arp", and observed
      5 ARP who-has ("solicits") ~750ms apart.
Bug: 62476366
Bug: 62845299
Change-Id: Ib805531b08624805bb63703a5b338b9ff48171d4

6 years agoFramework: Remove a nonsensical substring(0)
Andreas Gampe [Wed, 5 Sep 2018 23:58:45 +0000 (16:58 -0700)]
Framework: Remove a nonsensical substring(0)

String.substring(0) will return the same String instance. There is
also no reason to make a copy.

Found by errorprone.

Bug: 114129741
Test: m
Change-Id: Ic089f04efc3c73f70aa15a132d62ac665c8b8f4c

6 years agoMerge "Add process-lifecycle-owner-initializer to tests."
Treehugger Robot [Wed, 5 Sep 2018 23:03:36 +0000 (23:03 +0000)]
Merge "Add process-lifecycle-owner-initializer to tests."

6 years agoMerge "Convert AudioAttribute to Stream correctly"
Treehugger Robot [Wed, 5 Sep 2018 22:43:07 +0000 (22:43 +0000)]
Merge "Convert AudioAttribute to Stream correctly"

6 years agoMerge changes I7f1ef2e8,I498bc261
Treehugger Robot [Wed, 5 Sep 2018 22:42:52 +0000 (22:42 +0000)]
Merge changes I7f1ef2e8,I498bc261

* changes:
  Convert sysui to bp
  Cleanup trying to move to bp

6 years agoAdd process-lifecycle-owner-initializer to tests.
Alison Cichowlas [Tue, 14 Aug 2018 17:19:25 +0000 (13:19 -0400)]
Add process-lifecycle-owner-initializer to tests.

Bug: 112587252
Bug: 114073652
Test: This is to fix the tests.
Change-Id: I083db4e2eb4efd8d4a914f33ac259aa317e568de
Merged-In: I083db4e2eb4efd8d4a914f33ac259aa317e568de
(cherry picked from commit 5f5ad2e6274f28772d70de0a97301fd17ab7f4d3)
(cherry picked from commit 0757deaad67bfa7d09e210566fdc7638fd8b8e3f)

6 years agoConvert sysui to bp
Jason Monk [Mon, 13 Aug 2018 15:10:48 +0000 (11:10 -0400)]
Convert sysui to bp

Test: tests gonna test, builds gonna build
Change-Id: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
Merged-In: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
(cherry picked from commit a2f2d82f2698ca4d9fcfad2a94b5b683646c085d)
(cherry picked from commit 1a8ee9d2f9bda161301469488d9a27baf5398233)
(cherry picked from commit 83ce30d807c3621f47f753e75f41d2b887e3ccba)

6 years agoCleanup trying to move to bp
Jason Monk [Thu, 9 Aug 2018 13:38:21 +0000 (09:38 -0400)]
Cleanup trying to move to bp

 - Remove some resources that don't appear to do anything
 - Don't assume resource ids are final, because they aren't when
   compiled as a library

Test: build
Change-Id: I498bc2612d3f47df5f567c18c29e1666431e971c
Merged-In: I498bc2612d3f47df5f567c18c29e1666431e971c
(cherry picked from commit 05dd5671720985c03f35ec476591fb0d8399a018)
(cherry picked from commit a9b2fcad7a1ba9b5a459f46cc40504c7ea4fe590)
(cherry picked from commit 4c9d66e56cc8c324c2dc87f75e6338b7464d6eaf)

6 years agoMerge "statsd: fix double close."
Treehugger Robot [Wed, 5 Sep 2018 18:16:46 +0000 (18:16 +0000)]
Merge "statsd: fix double close."

6 years agoMerge "Processor for @UnsupportedAppUsage annotations."
Mathew Inwood [Wed, 5 Sep 2018 16:13:32 +0000 (16:13 +0000)]
Merge "Processor for @UnsupportedAppUsage annotations."