438455 Commits

Author SHA1 Message Date
Meng Wang
fe4869eb71 Define permission GRANT_RUNTIME_PERMISSIONS_TO_TELEPHONY_DEFAULTS
Bug: 143580692
Test: make
Change-Id: Ib70c1451ec807165de0647b30cadaa496ac5cbce
Merged-In: I6f36d67145d976d31a4d6acf3b5a42363f11a82a
2019-12-12 10:54:29 -08:00
Jing Ji
26985845dd Support unsolicited message from lmkd
Add ability in AMS to receive notifications from LMKD

Bug: 136036078
Test: memeater 2048
Change-Id: Id87e95f4f989a37586fec02d239bd0e527817f47
Merged-In: If183c177bb32bad18373dfcd8434e48313935a4c
2019-12-12 10:46:06 -08:00
Suren Baghdasaryan
80bf49d556 Implement ActivityManager to LMKD reconnect functionality
In case of LMKD crashing and restarting or for testing purposes when LMKD
is killed and restarted on purpose, ActivityManager needs to reconnect and
reset the oom_adj levels so that LMKD can function. Implement a separate
LmkdConnection class handling LMKD connection and communication. We use
FileDescriptorEventListener to detect LMKD connection loss and retry logic
is implemented to reconnect and reset LMKD parameters.

Bug: 124618999
Test: kill lmkd and verify successful reconnect

Change-Id: I1b63c960aa9580cdc4f8d3697cd02fa9c18a2935
Merged-In: I1b63c960aa9580cdc4f8d3697cd02fa9c18a2935
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-12-12 10:45:50 -08:00
Neil Fuller
d8aa23e1ca Merge "Remove some duplication of validation logic" 2019-12-12 18:32:53 +00:00
Michele
68370a8685 Addition of util library
Bug: 137202333
Test: Compilation
Test: Scripts to verify correct usage of rules
Change-Id: I20e48e66d6c429a67d367efc2a73991c3aad825c
Merged-In: I20e48e66d6c429a67d367efc2a73991c3aad825c
2019-12-12 10:19:51 -08:00
David Su
4314616565 Merge "Expose CloseGuard as a public API" 2019-12-12 18:19:12 +00:00
Neil Fuller
91270ddb55 Merge "Fix TimeDetectorServiceTest permissions" 2019-12-12 14:59:23 +00:00
Neil Fuller
ab4706bc68 Remove some duplication of validation logic
Remove some duplication of validation logic, add a missing annotation
and tidy up argument name.

Bug: 140712361
Test: treehugger
Change-Id: I8b47f9b6732adb8584f91a1ad5dd2418da22b61a
2019-12-12 14:32:46 +00:00
Chalard Jean
e7a644ba7e Merge "Fix a doc" 2019-12-12 14:15:28 +00:00
SongFerngWang
afd025f4ab ServiceState merges voice and data into a single value
The voice and data is the same for operator name at ServiceState.
So ServiceState merges voice and data into a single value.
- merge the voice and data OperatorAlphaLong,OperatorAlphaShort, and
OperatorNumeric.

Bug: 144663018
Test: Build pass.
      atest NetworkControllerDataTest (PASS)
      atest ServiceStateTest (PASS)
      atest TelephonyMetricsTest (PASS)
      atest ServiceStateProviderTest (PASS)

Change-Id: I67e4a822c792bf9a9e174146ef8d65d9927d7612
Merged-In: I67e4a822c792bf9a9e174146ef8d65d9927d7612
2019-12-12 22:10:04 +08:00
Neil Fuller
a140717213 Fix TimeDetectorServiceTest permissions
Fix TimeDetectorServiceTest permissions test. The suggestManualTime()
call was changed from enforceCallingPermission() to
enforceCallingOrSelfPermission() in commit 44fcf29.

Bug: 140712361
Test: atest com.android.server.timedetector
Change-Id: Ice263c7605c2ef7a04031404a25e2696f16b075c
2019-12-12 13:48:21 +00:00
SongFerngWang
94e2f0c49b Supplementary Services(SS) gray out when airplane mode on in Call Settings menu.
add carrier config "KEY_DISABLE_SUPPLEMENTARY_SERVICES_IN_AIRPLANE_MODE_BOOL".

Bug: 141284019
Test: when airplane mode on, all of SS UIs are gray out.
Change-Id: I869a267fa5aaebf3b48f20bc70d21d612cd84586
Merged-In: I869a267fa5aaebf3b48f20bc70d21d612cd84586
2019-12-12 13:43:13 +00:00
daren.liao
8b201e7931 Map Android KEYCODE_MENU to CEC KEYCODE_ROOT_MENU
Bug: 140129106
Test: manual
Change-Id: Iab3ad6167245af28c963174623f8e51edc30ffdb
2019-12-12 13:32:39 +00:00
Neil Fuller
dd69aac761 Merge "Rename SimpleTimeZoneDetectorStrategy" 2019-12-12 12:47:07 +00:00
Anna Trostanetski
f33c3a8c9d Merge "Pipe disabled compat changes to runtime through zygote." 2019-12-12 12:15:21 +00:00
Treehugger Robot
938bc05883 Merge "Add new UnsupportedAppUsage annotation as lib dependency." 2019-12-12 12:10:55 +00:00
Neil Fuller
51c61e8bdb Merge "Handle multiple phoneIds in time detection" 2019-12-12 11:33:13 +00:00
Treehugger Robot
ad60ef88e0 Merge "Make getNetworkSpecifier() public API." 2019-12-12 11:29:24 +00:00
Jeongik Cha
ea1b85a5eb Merge "Declare ParceledListSlice as generic type" 2019-12-12 06:00:34 +00:00
Chalard Jean
67576ac477 Fix a doc
Test: FrameworksNetTests
Change-Id: I5c9aeb627d9f22aa84bc134b6c7d3c15f237a775
2019-12-12 13:56:13 +09:00
Chalard Jean
04ea217324 [NS A27] Remove useless logs and a useless var
These logs haven't found a bug in a long time and we now have
some structural guarantees that the conditions they check for
can't happen (like the checks that everything is happening on
the same thread).
Maybe we'll reinstate similar checks later, but for now they
are in the way and removing them is a small sacrifice for the
intended benefit.

The local was simply not used any more.

Test: FrameworksNetTests
Change-Id: I4b793e86039c204a038c1b0fecbf8a4927eef48d
2019-12-12 13:55:32 +09:00
Chalard Jean
e63d4bb92b [NS A26] Move available callbacks out of the rematch computation
Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I6f86add0ccde221c22436ac1995ef6064b3ca69e
2019-12-12 13:55:32 +09:00
Chalard Jean
336d25f744 [NS A25] Send all listen callbacks after all rematches
Bug: 113554781
Test: ConnectivityServiceTests NetworkStackTests
Change-Id: I2db9535b1d72edd46b968b1bae66b148aa815235
2019-12-12 13:55:31 +09:00
Meng Wang
005a5a2d35 Expose ACTION_EMERGENCY_ASSISTANCE as SystemAPi
It's used by DefaultPermissionGrantPolicy.

Bug: 146091614
Test: make
Change-Id: I907736c7d6745660279a505761e27dfbbd1ddc97
2019-12-12 04:50:41 +00:00
Raff Tsai
2675639ef7 Fix bluetooth icon has wrong color
- ic_settings_bluetooth is used in two different places, one of them
is set background, but they share same drawable state. Need to set
mutate() to make drawables have different state.

Fixes: 145555150
Fixes: 143090956
Test: 1. Open Bluetooth settings
      2. Pair new device
      3. Wait more Available devices are shown
      4. hit the back arrow
      5. Observe the color of Bluetooth icon

Change-Id: I9574e6c22c401c4b88eb7285b15a59a1dd57b8ee
2019-12-12 04:23:57 +00:00
Chalard Jean
5c18198aae [NS A24] Add an object to represent changes in assignment
Test: ConnectivityServiceTest
Change-Id: I703db6d3f039bd67a90fad0eadffc6cfed9a50ee
2019-12-12 13:21:43 +09:00
Chalard Jean
7412d7aa61 Make getNetworkSpecifier() public API.
The builder lets clients set it, and this may be useful for
unit tests of apps. It should be public.
The need arises from uses of this in WiFi and Telephony
network factories.

Test: build
Bug: 135998869
Change-Id: I57279cac139c28e8654d2066ba0c60edd1e6cd98
2019-12-12 13:10:55 +09:00
Treehugger Robot
ceeb04aeaf Merge "Use new api to disconnect all bt profiles" 2019-12-12 03:18:05 +00:00
hughchen
0f0d83e1fb Update Bluetooth api on SettingsLib
This CL is used to update Bluetooth api.

- Use getConnectionPolicy() instead of getPriority()
- Use setConnectionPolicy() instead of setPriority()
- Use BluetoothProfile.CONNECTION_POLICY_ALLOWED instead of
  BluetoothProfile.PRIORITY_ON
- Use BluetoothProfile.CONNECTION_POLICY_FORBIDDEN instead of
  BluetoothProfile.PRIORITY_OFF

Fixes: 141582844
Test: manually
Change-Id: I2d7438d48acde155e2b411fd98cb59961c8d75c1
Merged-In: I2d7438d48acde155e2b411fd98cb59961c8d75c1
2019-12-12 10:36:06 +08:00
Hall Liu
07105b44cf Add ImsReasonInfo constant for retrying without RTT
Add CODE_RETRY_ON_IMS_WITHOUT_RTT for the IMS stack to indicate to
Telephony that a call should be retried without RTT enabled.

Bug: 141963475
Test: manual

Change-Id: Ic3aa8856e98d8c34fd98462d71834e69b857eda4
2019-12-11 18:27:25 -08:00
Brad Ebinger
7de7f018e8 Merge "Add CarrierConfig for roaming PLMNS that will need emer DDS switch" 2019-12-12 02:10:10 +00:00
Meng Wang
3eb1e65300 Remove hidden API usage: TelephonyManager#getSimOperator(int subId)
Replaced with TelephonyManager.createForSubscriptionId(subId).getSimOperator().

Bug: 140908357
Test: make
Change-Id: Ieab38e89bd9c3b8d734cc4544d2905cf88e12dbf
2019-12-11 17:07:22 -08:00
Meng Wang
6fce89f8b6 Merge "Remove ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED" 2019-12-11 21:23:43 +00:00
Artur Satayev
700e08b291 Add new UnsupportedAppUsage annotation as lib dependency.
Bug: 145132366
Test: m
Change-Id: Ibb7f8424186149365354a96249c06c9fccde66bd
Merged-In: Ibb7f8424186149365354a96249c06c9fccde66bd
2019-12-11 19:44:16 +00:00
Rahul Sabnis
d32a94d224 Resolve BluetoothDevice hidden API usages by Settings
Bug: 143245666
Test: Manual
Change-Id: Id34eb275f604e61330aeb91401dc31aeca666b8f
2019-12-11 11:37:05 -08:00
Meng Wang
ce7d2e8fe3 Merge "Remove hidden API usage: CallQuality no-argument constructor." 2019-12-11 19:13:39 +00:00
atrost
e44e134776 Pipe disabled compat changes to runtime through zygote.
Test: Java in process API still work correctly - tested locally with test app + adb overrides.
Test: atest com.android.internal.os
Test: atest com.android.server.am
Bug: 145743810
Change-Id: I6645a7ec767400cd579207f0eed1e6e7136c8a6f
Merged-In: I6645a7ec767400cd579207f0eed1e6e7136c8a6f
2019-12-11 18:44:20 +00:00
Meng Wang
52a4a79b8c Remove ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED
and extra keys only used by the intent.

Those hidden constants are only used by TelephonyRegistry, blocking
telephony mainline. Remove them since no one uses the broadcast.

Bug: 140908357
Test: make
Change-Id: I8fffe2996f233f2422173e9823810523ce80f2e5
2019-12-11 10:10:55 -08:00
Meng Wang
79c83587c3 Merge "Remove ACTION_PRECISE_CALL_STATE_CHANGED and its extras." 2019-12-11 17:49:32 +00:00
Anton Hansson
c410209ec3 Merge "Use ro.build.version.extensions.r" 2019-12-11 16:49:02 +00:00
Anton Hansson
d8ac5fa1b2 Use ro.build.version.extensions.r
The sdk_info prop is mostly there as a communication channel
if we need to channel more information in the future. For now,
using ro.build.version.extensions.r (which is "stable") is sufficient.

Bug: 137191822
Test: boot and getprop ro.build.version.extensions.r
Change-Id: I630c235fd98eaeda9086fa490914e56556b18706
2019-12-11 13:26:15 +00:00
Jiyong Park
8d011ad625 Add android.annotation.Hide
This change adds android.annotation.Hide class which can be used
to hide an API without using the @hide javadoc tag. This opens up the
possibility of running metalava over the compiled jar, which is expected
to be much faster than when ran with source files.

In the short-term, this will be only used inside services.jar and not for
framework.jar.

Bug: 139391334
Test: m

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: I589f1deb63e621a96a76d2f613d283c2d3cdfd17
(cherry picked from commit 404b9b2cf2dfe15ee1b9e4bd16ade7362d7cd648)
Change-Id: I589f1deb63e621a96a76d2f613d283c2d3cdfd17
2019-12-11 15:55:37 +09:00
Jiyong Park
e86e89acff Add filegroups for services.* libraries
... in preparation for creating a stub library from services.jar

Bug: 139391334
Test: m

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: Ifd6cfc77acf2284804a2f64011c2733b5c222369
(cherry picked from commit bae2e907966dce0cb3eaf3e3a81cca4364b7d941)
Change-Id: Ifd6cfc77acf2284804a2f64011c2733b5c222369
2019-12-11 15:55:33 +09:00
Chiachang Wang
67dfdbc94f Merge "Add TetherConfigParcel to improve startTetheringWithConfiguration" 2019-12-11 06:28:25 +00:00
Chalard Jean
b24e34c19b Merge changes Ibebdae14,I0c097e77,I6c889b15,I4771f2e9,I2a52f7f4
* changes:
  [NS A23.1] Minor cleanup
  [NS A23] Move a synchronized block in a central place
  [NS A22] Small refactoring
  [NS A21] More cleanup
  [NS A20] Cleanup
2019-12-11 04:08:46 +00:00
Zoey Chen
a9ef0e9bb4 Merge "[TelephonyMainline] Cannot use UnsupportedAppUsage API, use appropriate method to replace it." 2019-12-11 03:10:33 +00:00
Meng Wang
b857ba95e8 Remove ACTION_PRECISE_CALL_STATE_CHANGED and its extras.
Those hidden constants are only used in TelephonyRegistry, blocking
telephony mainline. Remove them since no one uses the broadcast.

Bug: 140908357
Test: make
Change-Id: I2425c157d9d24a8ec18cb66a2ce12c12e0fe49e1
2019-12-10 18:22:10 -08:00
hughchen
bb410144c2 Update owners of settingslib/bluetooth
Fixes: 141582844
Test: NA
Change-Id: I1749cb27d29cfd38b996613088680fe8832c470c
2019-12-11 09:59:58 +08:00
Meng Wang
be15dbaee5 Remove hidden API usage: CallQuality no-argument constructor.
Bug: 140908357
Test: make
Change-Id: I4ad0aec7db8d588e8260479bdf4039a025903320
2019-12-10 15:17:22 -08:00
Anton Hansson
be64b53449 Merge "Whitelist new lint errors" 2019-12-10 22:51:55 +00:00