344375 Commits

Author SHA1 Message Date
Brad Ebinger
a33eddcdd3 Support Dynamic ImsService Querying
1) Provide a "default" impl for MmTelFeature
instead of returning null.

2) Introduce a FeatureSlotPair, which maps a SIM
slot ID to a ImsFeature. This allows the ImsService
to provide which features it supports for multi-SIM
phones.

3) Pipe through ImsResolver state to help prevent IMS
operation when the ImsResolver is in the process of
figuring out feature capabilities.

Test: Telephony ImsService test app, telephony unit tests
Bug: 72642524

Change-Id: Idb95f7651af200026d62e8b29eaed30bc0ebc9d3
2018-03-08 10:14:03 -08:00
Pengquan Meng
27c64aaf3c Merge "Telephony(MSIM): Default NW mode property for each slot" 2018-03-08 17:56:28 +00:00
Shibin George
9696bd32be Check if mSurface is valid before create SurfaceSession
If mSurface has already been released in another thread,
this would result in a null-pointer dereference in
SurfaceSession contructor i.e. in nativeCreateScoped().

7757  7757 F DEBUG   : pid: 1402, tid: 1583, name: android.anim  >>> system_server <<<
7757  7757 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xd0
7757  7757 F DEBUG   : Cause: null pointer dereference
... <trimmed>
7757  7757 F DEBUG   : backtrace:
7757  7757 F DEBUG   :     #00 pc 000000000007fe58  /system/lib64/libgui.so (android::Surface::getIGraphicBufferProducer() const)
7757  7757 F DEBUG   :     #01 pc 00000000000ff000  /system/lib64/libandroid_runtime.so (android::nativeCreateScoped(_JNIEnv*, _jclass*, long)+52)
7757  7757 F DEBUG   :     #02 pc 0000000000ac8968  /system/framework/arm64/boot-framework.oat (offset 0x614000) (android.content.res.XmlBlock.nativeCreateParseState [DEDUPED]+152)
7757  7757 F DEBUG   :     #03 pc 0000000001327d24  /system/framework/arm64/boot-framework.oat (offset 0x614000) (android.view.SurfaceSession.<init>+52)
7757  7757 F DEBUG   :     #04 pc 00000000014b7320  /system/framework/oat/arm64/services.odex (offset 0x5be000) (com.android.server.wm.TaskSnapshotSurface.drawSizeMismatchSnapshot+128)
7757  7757 F DEBUG   :     #05 pc 00000000014b784c  /system/framework/oat/arm64/services.odex (offset 0x5be000) (com.android.server.wm.TaskSnapshotSurface.drawSnapshot+188)
7757  7757 F DEBUG   :     #06 pc 00000000014b6f2c  /system/framework/oat/arm64/services.odex (offset 0x5be000) (com.android.server.wm.TaskSnapshotSurface.create+2684)
7757  7757 F DEBUG   :     #07 pc 00000000014b0158  /system/framework/oat/arm64/services.odex (offset 0x5be000) (com.android.server.wm.TaskSnapshotController.createStartingSurface+72)
7757  7757 F DEBUG   :     #08 pc 00000000014a5ca0  /system/framework/oat/arm64/services.odex (offset 0x5be000) (com.android.server.wm.SnapshotStartingData.createStartingSurface+96)
7757  7757 F DEBUG   :     #09 pc 000000000144b030  /system/framework/oat/arm64/services.odex (offset 0x5be000) (com.android.server.wm.AppWindowContainerController.lambda$-com_android_server_wm_AppWindowContainerController_4735+496)
... <trimmed>

Bug: 74129970

Change-Id: I41268c7680d3885c85fc3b682d0eba7415674062
2018-03-08 22:59:40 +05:30
Mathieu Chartier
de1a963e52 Merge "Bump version for OtaDexoptService" 2018-03-08 17:07:15 +00:00
Eric Schwarzenbach
a483ce3bfd Add Duplex mode to ServiceState.
Adds getChannelNumber() to CellIdentity.
Creates a static utility class to calculate the duplex mode from an
EARFCN.

Bug: 73728783
Test: runtest frameworks-telephony
Change-Id: I5b5c4efa7e17594ce9397cf65e129147affe96bd
2018-03-08 07:39:32 -08:00
Ruijie Bai
99ca124212 Support enhanced call blocking function
- Add new carrier config to determine whether to enable
enhanced call blocking feature.
- Add new I/F to get/set the call blocking enabled status.
- Add new API to support checking whether a number is
block number with specific extras.

Bug: 28189985
Test: Manual
Change-Id: I7e2fdaecf4c93f3513d756e65bab8e2c2c0b7440
2018-03-08 07:29:20 -08:00
Pete Gillin
121eb58ab4 Merge "Add new 'explicit GC' policy to StrictMode." 2018-03-08 10:55:00 +00:00
Jack He
0dbe66460f Bluetooth: Separate enable and disable Reasons from package name
* Reasons to enable or disable Bluetooth should be in a separate
  namespace away from package names that initiated the enable or disable
* Delcare reason code in android/bluetooth/enums.proto as
  EnableDisableReasonEnum and use these reason code together with
  package names to log Bluetooth enable and disable events
* When reason is ENABLE_DISABLE_REASON_APPLICATION_REQUEST, the external
  package name is the real reason why Bluetooth is enabled or disabled
* Change START_CRASH to START_ERROR since it represents a disable event
  when Bluetooth failed to start
* Change UNEXPECTED_CRASH to CRASH since no crash is expected
* Add getEnableDisableReasonString() method to covert reason code to
  human readable strings in dumpsys output

Bug: 74090881
Test: Toggle Bluetooth, airplane mode, BLE scanning
Change-Id: I06aa413e2a0a5f016c87759a1b694ef643c9cdee
2018-03-08 01:38:48 +00:00
Jordan Liu
36886b6f15 Merge "Initialize mWcdmaRscpAsu and fix invalid value for asu" 2018-03-07 23:41:41 +00:00
yinxu
5e366e31ae Do not throw RuntimeException from stopScan().
Bug:73750871
Test: Unit Test
Change-Id: I640093627c103fe1d2fe5707e6854ba748789919
2018-03-07 13:49:51 -08:00
Treehugger Robot
539f85a18d Merge "Minor clean-up in NetworkCapabilities" 2018-03-07 21:06:59 +00:00
Mathieu Chartier
b5fb7e91d8 Merge "Add logic for passing down CompactDex generation flag" 2018-03-07 19:53:18 +00:00
Treehugger Robot
8882c55b21 Merge "API Documentation and Constant cleanup." 2018-03-07 19:33:52 +00:00
Treehugger Robot
888c45b484 Merge "Store package restriction settings at shutdown" 2018-03-07 18:46:18 +00:00
Treehugger Robot
322ff16301 Merge "Address the API review comments." 2018-03-07 17:40:20 +00:00
Mathieu Chartier
cbe92f735f Bump version for OtaDexoptService
Bug: 63756964
Bug: 74245837
Test: manual
Change-Id: I750e38a02710347a03783b820816eda6958ba0c6
2018-03-07 09:29:21 -08:00
Mathieu Chartier
f890c3ea5c Add logic for passing down CompactDex generation flag
In the cases where we are not install, boot, or first boot, pass down
the flag to generate CompactDex.

Bug: 63756964
Bug: 74245837
Test: manual
Change-Id: I4a2ff9383251e67b260cff5ec8a326c7a4f7faca
2018-03-07 09:25:17 -08:00
Anton Hansson
13310fef6e Merge "frameworks/base: Set LOCAL_SDK_VERSION where possible." 2018-03-07 16:46:58 +00:00
Tyler Gunn
ecb46b610c Merge "Ensure start of call properties are propagated to RemoteConnection." 2018-03-07 15:22:58 +00:00
Anton Hansson
be72e62c63 frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Exempt-From-Owner-Approval: Global cleanup
Change-Id: I66b515d98d03264dbb893b7c55ba7bdddfb447a1
Merged-In: I26458e41ecb84de91ac9a356a5d4bafb44f463c1
Merged-In: I938efe7a2359302cbf4d5d6f786f963044e1bbbd
Merged-In: I72ce7f1c6242ddf9a5b36075761f3f1f1138cea1
2018-03-07 15:10:39 +00:00
Treehugger Robot
29da54462d Merge "Remove com.android.internal{.util} from generated documentation." 2018-03-07 11:43:35 +00:00
Tetsutoki Shiozawa
a83500e548 Store package restriction settings at shutdown
Symptom:
Disabled package was re-enabled by restarting a device.

Root cause:
PMS postpones storing the package restriction settings in 10
seconds by design. When a package gets disabled right before
shutdown, PMS fails to store the last changes.

Solution:
Store package restriction settings at shutdown.

BUG: 73447744
Change-Id: I4fe76c1f003e51653304cfaeaa5129d84803ce1e
2018-03-07 17:26:37 +09:00
takeshi tanigawa
3803a24547 Initialize mWcdmaRscpAsu and fix invalid value for asu
Initialize mWcdmaRscpAsu in the constructor.
Update an invalid value of asu from -1 to 255.

Test: auto - Passed SignalStrengthTest
Bug: 71329173
Change-Id: Ic6c03fa3c405377b23159038a1e23a45ba87239c
2018-03-07 16:54:12 +09:00
nharold
4068e8e6ae Merge "Update SignalStrength to use ASU for TD-SDCMA" 2018-03-07 02:05:34 +00:00
Treehugger Robot
5b2fe53ab7 Merge "Update the Bluetooth Active Device state in the Device Manager" 2018-03-07 01:02:50 +00:00
Hall Liu
c364ff38cb Merge "Fix Telecom dumpsys timestamps" 2018-03-07 00:46:19 +00:00
Pavlin Radoslavov
04bd18d644 Update the Bluetooth Active Device state in the Device Manager
The Bluetooth Active Device state should be updated for all
CachedBluetoothDevice entries.
This should be done inside CachedBluetoothDeviceManager in SettingsLib
instead of BluetoothDeviceUpdater in the Settings app.

Also:
 * Added a new CachedBluetoothDeviceManagerTest.java unit test
 * Added a new method CachedBluetoothDevice.isActiveDevice()
   for testing.

Bug: 72316092
Test: Manual - two headsets and switching the active device
      Unit tests - "make RunSettingsLibRoboTests -j 40"
Change-Id: Ic3fbf667c66ed2de8e5c3352bc1ffd829a9052cf
Merged-In: Ic3fbf667c66ed2de8e5c3352bc1ffd829a9052cf
(cherry picked from commit c285d559fa8f0d597e8d5f1c8176dbb187e2d6ac)
2018-03-06 23:24:13 +00:00
Holly Jiuyu Sun
e33b9f6234 Merge "Remove toString() for CarrierIdentifier." 2018-03-06 23:16:54 +00:00
Hall Liu
8c8d7babf1 Fix Telecom dumpsys timestamps
Change the dumpsys timestamps to use java.time for processing and always
log events with local timezone that was in effect at the time the event
happened.

Bug: 74250969
Test: manual, run dumpsys
Change-Id: Ie53cff4400be1528b3224bd556536a689ef22c8c
2018-03-06 14:20:37 -08:00
Nathan Harold
31135514ec Update SignalStrength to use ASU for TD-SDCMA
The HAL for Radio 1.2 uses -TD-SDCMA rather than
ASU RSCP for the signal strength for TD-SCDMA. This
change updates the HAL to use the new ASU-range
input.

Bug: 74202653
Test: runtest frameworks-telephony
Change-Id: Iab37ca19daf12179933cef580f248c3ef8258b98
2018-03-06 11:08:39 -08:00
Jordan Liu
c2925aff38 Merge "Customize the WCDMA signal strength based on RSCP" 2018-03-06 18:54:56 +00:00
Treehugger Robot
4b0172bcb6 Merge "Obtain cellular related battery statistics" 2018-03-06 18:19:20 +00:00
Treehugger Robot
b06de7892a Merge "Accounts: Fix TokenCache maps access" 2018-03-06 17:45:25 +00:00
Treehugger Robot
c18b175d87 Merge "Update the RTT features constant." 2018-03-06 16:07:16 +00:00
Treehugger Robot
8796d95475 Merge "Camera: Fix map access" 2018-03-06 16:04:24 +00:00
Tobias Thierer
97bb6cf371 Remove com.android.internal{.util} from generated documentation.
com.android.internal.* is meant to be hidden from documentation,
but most of it is erroneously not hidden via @hide or -hidePackage
directives; why documentation is currently generated for Predicate
but not other classes from com.android.internal.util, and why some
but not all classes from that package show up in package-level
documentation (package-summary.html), is not currently understood.

There appears to be a behavior difference between OpenJDK 8 and
OpenJDK 9's javadoc that results in additional classes showing up
in package-summary.html. This CL fixes this by adding -hidePackage
directives for com.android.internal{.util}; other sub-packages of
com.android.internal do not currently show up in documentation and
are not touched by this CL.

Test: Patched this CL into the internal-master branch and ran:
      USE_R8=true EXPERIMENTAL_USE_OPENJDK9=true make offline-sdk-docs
      Checked that this removes all documentation for com.*
      (com.android.internal.util was the only com.* package for which
      documentation was previously generated).
      In other words: Before this CL, [1] existed, but after
      this CL, the entire directory subtree [2] does not exist.
Test: Checked that Predicate was already missing from stubs before this
      CL. In other words, [3] already did not exist before this CL.

[1] out/target/common/docs/offline-sdk/reference/com/android/internal/util/Predicate.html
[2] out/target/common/docs/offline-sdk/reference/com
[3] out/target/common/obj/JAVA_LIBRARIES/android_system_stubs_current_intermediates/classes/com

Bug: 69736344
Bug: 69736236

Change-Id: I3243e2820348c338a54e42c72d29bed71389a6c4
2018-03-06 12:05:28 +00:00
Pete Gillin
cc5885f92b Add new 'explicit GC' policy to StrictMode.
This change adds the policy but offers no public way to enable it. A
follow-up change will expose the detect/permit methods in the API and
change detectAll to enable it.

This new policy can only be triggered through the libcore BlockGuard API.

Bug: 3400644
Test: cts-tradefed run cts-dev -m CtsLibcoreTestCases
Test: cts-tradefed run cts-dev -m CtsOsTestCases
Change-Id: I2e7f34ce010c78d6a5a7ac85512c045bfb13d204
Merged-In: Ieebe4db747902246968d6382bbc9cee0e539af85
2018-03-06 11:17:07 +00:00
Remi NGUYEN VAN
6bd13af46a Merge "Allow null subscriberId in NetworkStatsManager." 2018-03-06 06:52:35 +00:00
Andreas Gampe
b59365c3db Camera: Fix map access
Found by Errorprone.

Bug: 73288226
Test: m javac-check-SmartCamera RUN_ERROR_PRONE
Change-Id: I6f6105f5d4a6ed5d28262bcdcd83764e6e8d5544
2018-03-05 21:52:27 -08:00
Treehugger Robot
be04ebd707 Merge "Connectivity: Fix map access" 2018-03-06 05:39:39 +00:00
Remi NGUYEN VAN
489e8b02f8 Allow null subscriberId in NetworkStatsManager.
Use a MATCH_MOBILE_WILDCARD template to avoid filtering by
subscriberId when querying statistics from NetworkStatsService.

Bug: 74038898
Change-Id: I4b39e7031416cb33b23d89aa36ff0f774eaa942f
Fixes: 74038898
Test: runtest frameworks-net, CTS tests pass
2018-03-06 13:28:19 +09:00
Andreas Gampe
cbac1e489a Accounts: Fix TokenCache maps access
Found by Errorprone.

Bug: 73288226
Test: mmma frameworks/base/services
Change-Id: I203745415cbad6fad6f72008fc5632086d2a4505
2018-03-05 18:25:18 -08:00
Treehugger Robot
6455e31b76 Merge "Minor cleanups to NetworkStats interface tracking." 2018-03-06 02:18:39 +00:00
Hall Liu
b376f02260 Merge "Add an app-ops check when registering for location" 2018-03-06 02:14:45 +00:00
Andreas Gampe
3ba8106c23 Connectivity: Fix map access
Found by Errorprone.

Bug: 73288226
Test: mmma frameworks/base/services
Change-Id: I63edad58dbc909c1e772bde85a1b9dd98c551fb1
2018-03-05 17:23:07 -08:00
Nan Zhang
172875bdd2 Convert api-stubs, system-api-stubs, and test-api-stubs target
The output generate a .srcsjar instead of a directory of java files.

Bug: b/70351683
Test: compare source-file-list, and ninja rule.

Change-Id: I987601c4baa6f94b5208d3d4106cf60323329af8
2018-03-05 16:23:50 -08:00
Holly Jiuyu Sun
af50f16944 Remove toString() for CarrierIdentifier.
We may get NPE if mCarrierIdentifier is null. + should convert it to
string by itself.

Test: test on phone
Change-Id: Ibd352d6d2a9b0cb33a494d108eb0d3a7c1dbc61b
2018-03-05 16:07:37 -08:00
Treehugger Robot
95372e873e Merge "Bluetooth: Use enums for adapter connection states" 2018-03-05 23:16:21 +00:00
Treehugger Robot
84bda3a709 Merge "DO NOT MERGE Dummy StatsLog class" 2018-03-05 23:14:48 +00:00
Chen Xu
f01600d5f9 Merge "API review: rename CarrierIdentification to Carrier id" 2018-03-05 22:59:21 +00:00