Commit Graph

8504 Commits

Author SHA1 Message Date
Paul Chang
37aaf66ede Merge "Replace broadcast with adding a method in BugreportCallback" 2020-11-14 12:21:49 +00:00
Paul Chang
ec91d7700d Replace broadcast with adding a method in BugreportCallback
BUG: 154298410
Test: BetterBug can work normally in bug report shortcut flow
Change-Id: Ibc1a5a8ac308c303399d28eb8c177096b805fdf9
2020-11-14 12:11:34 +00:00
Aurimas Liutikas
1394a019e7 Remove legacy style metalava suppression
@SuppressLint("Doclava125") is a legacy way of suppressing
RequiresPermission check. Updating to the new style of suppression
so metalava no longer has to support the legacy mode.

sed -i "s/@SuppressLint(\"Doclava125/@SuppressLint(\"RequiresPermission/" \
core/java/android/app/admin/DevicePolicyManager.java \
core/java/android/hardware/hdmi/HdmiControlManager.java \
core/java/android/hardware/location/ContextHubManager.java \
core/java/android/hardware/usb/UsbDeviceConnection.java \
core/java/android/net/TrafficStats.java \
core/java/android/os/RecoverySystem.java \
core/java/android/os/storage/StorageManager.java \
core/java/android/service/persistentdata/PersistentDataBlockManager.java \
location/java/android/location/LocationManager.java \
media/java/android/media/AudioManager.java \
telecomm/java/android/telecom/TelecomManager.java \
telephony/java/android/telephony/CarrierConfigManager.java \
telephony/java/android/telephony/TelephonyManager.java \
wifi/java/android/net/wifi/RttManager.java \
wifi/java/android/net/wifi/WifiScanner.java

Test: make
Exempt-From-Owner-Approval: No-op change
Change-Id: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
2020-11-12 18:27:15 -08:00
Dan Shi
4514ae9876 Merge "Revert "Move BasicShellCommandHandler to frameworks/lib/modules-..."" 2020-11-12 22:46:35 +00:00
Dan Shi
f689b18ddc Revert "Move BasicShellCommandHandler to frameworks/lib/modules-..."
Revert "Update import path of BasicShellCommandHandler"

Revert "Update path for BasicShellCommandHandler"

Revert "Update path for BasicShellCommandHandler"

Revert "Update rule for BasicShellCommandHandler"

Revert submission 12975279-move_BSCH

Reason for revert: b/173120275
Reverted Changes:
Ib750f4774:Move BasicShellCommandHandler
I43c0dc327:Update import path of BasicShellCommandHandler
I73d58c07c:Update path for BasicShellCommandHandler
I21f103949:Update path for BasicShellCommandHandler
I8a2873df6:Move BasicShellCommandHandler to frameworks/lib/mo...
I91df774a3:Update rule for BasicShellCommandHandler

Exempt-From-Owner-Approval: to fix b/173120275

Change-Id: Iaa44f9aa4c1621f331275dc76ecb7505100fe9c5
2020-11-12 22:44:12 +00:00
Zimuzo Ezeozue
56e7af065a Merge "Revise seamless transcoding optimization flags" 2020-11-12 17:31:35 +00:00
Zim
d2f9505d19 Revise seamless transcoding optimization flags
These flags determine if we bypass transcoding in several platform
media classes.

We previously, had non-perssitent, default-false flags for each
framework class.

Now, we have one persistent default-true 'optimize' flag:
persist.sys.fuse.transcode_optimize.

Of course, if the global transcode flag, persist.sys.fuse.transcode is
off, the code is a no-op.

Bug: 158465539
Test: Manual
Change-Id: Ie1442213d0744888bac45b43ad8a07f0ebf55066
2020-11-12 14:15:02 +00:00
Chiachang Wang
c91ed0851e Merge "Move BasicShellCommandHandler to frameworks/lib/modules-utils" 2020-11-12 05:08:48 +00:00
Steven Moreland
1f1f2e0679 Merge "IBinder: support FLAG_CLEAR_BUF" am: 9910d9980e am: dcae11d0ef am: 951299fb04 am: b908d8a2ee
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1477120

Change-Id: I78f09ee4eb53da777c3a0962aff82079dc525938
2020-11-11 18:44:05 +00:00
Steven Moreland
b908d8a2ee Merge "IBinder: support FLAG_CLEAR_BUF" am: 9910d9980e am: dcae11d0ef am: 951299fb04
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1477120

Change-Id: Id0c58b52a83187d6e9eeb6be2bc730c8a3c7f016
2020-11-11 18:23:53 +00:00
Steven Moreland
951299fb04 Merge "IBinder: support FLAG_CLEAR_BUF" am: 9910d9980e am: dcae11d0ef
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1477120

Change-Id: Idda2d9bba8fba063e1ee466298318272b6370b6c
2020-11-11 18:13:07 +00:00
Steven Moreland
9910d9980e Merge "IBinder: support FLAG_CLEAR_BUF" 2020-11-11 16:17:20 +00:00
Mathew Inwood
433a15ddfb Merge "Derestrict PROP_NAME_MAX." am: caf6c158bb am: 626e204e7e am: 1e6326f5d6 am: 8d48e22c4e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1492817

Change-Id: Id3d1788d2c5c03ce73e29f7fafd4cbaba9230ee8
2020-11-10 18:07:37 +00:00
Lais Andrade
f0e85b587b Merge "Make CombinedVibrationEffect constructor package-private" 2020-11-10 15:59:24 +00:00
Lais Andrade
c2787b2289 Merge "Extract vibration settings and scaling code from VibratorService" 2020-11-10 15:12:00 +00:00
Mathew Inwood
8d48e22c4e Merge "Derestrict PROP_NAME_MAX." am: caf6c158bb am: 626e204e7e am: 1e6326f5d6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1492817

Change-Id: I55ded3c2e8d15deee0592078670dac174c9d0678
2020-11-10 14:39:58 +00:00
Mathew Inwood
1e6326f5d6 Merge "Derestrict PROP_NAME_MAX." am: caf6c158bb am: 626e204e7e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1492817

Change-Id: Ide2e0c27de5b1100a604a502e887f0fe611d09c4
2020-11-10 14:02:03 +00:00
Lais Andrade
b29f58d8a5 Make CombinedVibrationEffect constructor package-private
Also add @SuppressWarnings to this class to allow it to be abstract,
since it's only extended within the framework codebase.

Fix a missing @NonNull annotation found after building the code without
the @hide annotations.

Bug: 166586119
Test: atest CombinedVibrationEffectTest
Change-Id: I1b283c004efb7fb023099fb7f4db455b9994d600
2020-11-10 13:04:00 +00:00
Chiachang Wang
e8f12d1c01 Move BasicShellCommandHandler to frameworks/lib/modules-utils
BasicShellCommandHandler is used by mainline modules and the
framwork. There is a new repo that was created for putting
this kind of utility class. Move BasicShellCommandHandler for
the incoming ConnectivityService mainline and updating the
related usage.

Bug: 170598012
Test: m ; verify with adb shell cmd
Change-Id: I8a2873df6e7d8342b7a8b466bda155f74c807ee3
2020-11-10 09:54:14 +08:00
Lais Andrade
6b83aec26f Extract vibration settings and scaling code from VibratorService
Move the existing logic around vibration settings and ContentObserver to
a separate class, that will be used by VibratiorManagerService once
migration is complete.

Also extract the vibration scaling logic to a separate controller, which
will also be used by the VibratorManagerService after migration.

Bug: 167946816
Bug: 131311651
Test: atest FrameworksServiceTests:VibratorServiceTest
      atest FrameworksServiceTests:VibrationSettingsTest
      atest FrameworksServiceTests:VibrationScaleTest
Change-Id: Idf081e662aa218e93a38cd3262a1357e2e3faf0d
2020-11-09 20:32:16 +00:00
TreeHugger Robot
af9c36ce10 Merge "Fix hopefully minor bug in WorkSource.add" 2020-11-09 18:33:56 +00:00
Mathew Inwood
fcdba12869 Derestrict PROP_NAME_MAX.
Turns out it is used afterall.

Change-Id: I1ba83a151b0ca6ba708b03b46106dfb29d8b592f
Fixes: 172649311
2020-11-09 16:32:33 +00:00
Mathew Inwood
5a448e27ed Merge "Add maxTargetSdk restriction to unused APIs." am: f8abe13db4 am: eb80316624
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1468245

Change-Id: I60222cb1879651cf283e385519b5c4d156ab68a1
2020-11-09 15:24:20 +00:00
Mathew Inwood
f8abe13db4 Merge "Add maxTargetSdk restriction to unused APIs." 2020-11-09 14:41:20 +00:00
Soonil Nagarkar
f64edf3732 Fix hopefully minor bug in WorkSource.add
Test: n/a
Change-Id: I717cb3654fb66804d748a0e2782fb3c5507745cb
2020-11-05 14:53:45 -08:00
Bill Yi
f2d4156f5b Merge rvc-release RP1A.201105.002 to aosp-master - DO NOT MERGE
Merged-In: Ic1e07d28a41eea2ce59cc21702dae95d61adc24e
Change-Id: Ibc69b3e372167485bb70ae3277222bbe8ef7ff27
2020-11-04 13:57:54 -08:00
Mathew Inwood
5d123b6775 Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
2020-11-04 09:45:53 +00:00
TreeHugger Robot
8e5bcf841b Merge "Introduce public api for CombinedVibrationEffect" 2020-11-03 22:11:25 +00:00
Jordan Jozwiak
abf29724e0 Merge "Allow CREATE_USERS for removeUserOrSetEphemeral" 2020-11-03 21:03:02 +00:00
Lais Andrade
d399015578 Introduce public api for CombinedVibrationEffect
Introducing stereo effects and synced waveform effects.

More at go/android-s-vibratormanager

Fix: 166586119
Test: atest FrameworksCoreTest:CombinedVibrationEffectTest
Change-Id: Ic567b6470b967474066e6d087c619148af9cc72d
2020-11-03 19:19:16 +00:00
Jordan Jozwiak
fe5e0cab26 Allow CREATE_USERS for removeUserOrSetEphemeral
The removeUserOrSetEphemeral() API currently requires the
MANAGE_USERS permission, whereas removeUser() requires either
MANAGE_USERS OR CREATE_USERS.

As documented in the CREATE_USERS permission declaration, it allows an
application to create or remove users and endow them with the ephemeral
property. The empeheral flag is explicitly supported in
UserManagerService#ALLOWED_FLAGS_FOR_CREATE_USERS_PERMISSION.

Bug: 155913815
Bug: 172247872
Test: atest EphemeralTest # on a user build
Change-Id: I6cec670bd9b43c9fe8a16dbf28e394ac22118d37
2020-11-03 09:50:49 -08:00
Yogisha Dixit
83eeb7b9fb RESTRICT AUTOMERGE am: 4b1a1f1309
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12684766

Change-Id: I115c89330dda834bdaad9b361274e88b57439bb8
2020-11-03 13:33:29 +00:00
Yogisha Dixit
4b1a1f1309 RESTRICT AUTOMERGE
Add a hidden API to check if ambient display is suppressed for a token.

Added 1 method:
boolean isAmbientDisplaySuppressedForTokenByApp(String token, int appUid)

Context:
The Settings team is working on adding a string to the AOD settings page when ambient display is suppressed by Bedtime mode: b/168790245.

The current PowerManager#isAmbientDisplaySuppressedForToken(String token) method will only work if the calling app is also the app that suppressed the ambient display. That is, if Digital Wellbeing called suppressAmbientDisplay("winddown"), then isAmbientDisplaySuppressedForToken("winddown") will only return true for Digital Wellbeing. It will return false for Settings app

This CL adds a hidden API PowerManager#isAmbientDisplaySuppressedForTokenByApp(String token, int appUid) that will return true if the given app is suppressing ambient display with the given token. Settings can then call isAmbientDisplaySuppressedForTokenByApp("winddown", digitalWellbeingUid) to get whether ambient display is suppressed by Bedtime mode.

Test: atest FrameworksServicesTests:PowerManagerServiceTest
Bug: 169241595
Change-Id: I41aecc4ff0ab159d67e62193af27362a96c3174c
(cherry picked from commit 784b62a517)
2020-11-03 11:21:43 +00:00
Mathew Inwood
5f0edaaaf5 Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Merged-In: I8285daa8530260251ecad6f3f38f98e263629ca7
Change-Id: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
2020-11-02 10:30:09 +00:00
Treehugger Robot
162ac93355 Merge "Add trackingBug to SharedMemory.getFd()" am: 7b9e2bd143 am: 3e65b3750b am: d08754f4ac am: 8f96e74b58
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1479878

Change-Id: I9fb5292a98cf89203c67106a1319a54569b4a92f
2020-10-29 19:49:07 +00:00
Treehugger Robot
8f96e74b58 Merge "Add trackingBug to SharedMemory.getFd()" am: 7b9e2bd143 am: 3e65b3750b am: d08754f4ac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1479878

Change-Id: I210df175674f18530acc100959eb88490b34acc3
2020-10-29 19:19:46 +00:00
Treehugger Robot
d08754f4ac Merge "Add trackingBug to SharedMemory.getFd()" am: 7b9e2bd143 am: 3e65b3750b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1479878

Change-Id: I43e991a35c14cf7149ed20408c08573e00f14b4c
2020-10-29 19:08:48 +00:00
Steven Moreland
fbe1254709 IBinder: support FLAG_CLEAR_BUF
This is @hide and it isn't expected to be very useful in Java, since,
for instance, we would need a corresponding way to clear the data
associated with a Java String object. However, it's here for symmetry.

Bug: 171501998
Test: aidl_integration_test
Change-Id: I9d81f6138c74561b934630a95e86e7e670da5f06
2020-10-29 18:10:55 +00:00
Treehugger Robot
6c27344abf Merge "Add trackingBug to Process.myPpid." am: 081f27d84e am: bd6e1033fb am: 3c8ef9d1d4 am: eb33a02f6a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1478641

Change-Id: Idcecc766ac5fce8278c83d4ba9c4d969ee480faf
2020-10-29 17:38:50 +00:00
Treehugger Robot
eb33a02f6a Merge "Add trackingBug to Process.myPpid." am: 081f27d84e am: bd6e1033fb am: 3c8ef9d1d4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1478641

Change-Id: I1bf8dc971b9484453447aae44e508b6ccbfe526b
2020-10-29 17:06:09 +00:00
Treehugger Robot
3c8ef9d1d4 Merge "Add trackingBug to Process.myPpid." am: 081f27d84e am: bd6e1033fb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1478641

Change-Id: If394833b11720aeaf9a5c75ca95efb60ff390249
2020-10-29 16:44:03 +00:00
Mathew Inwood
0f9429be41 Add trackingBug to SharedMemory.getFd()
Bug: 171971817
Change-Id: Ib8367f9b310903d63eb000e4cce238693c1544b2
2020-10-29 15:52:51 +00:00
Mathew Inwood
4c2bef7b71 Add trackingBug to Process.myPpid.
Bug: 171962076
Change-Id: Id2e731f471199a368b5a22046e0899d7b37f7337
2020-10-29 13:43:18 +00:00
Mathew Inwood
8e742f928e Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

This is a resubmit of ag/12929664 with some APIs excluded that caused
test failures; see bugs 171886397, 171888296, 171864568.

APIs excluded:
Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord;
Landroid/os/Process;->myPpid()I
Landroid/os/SharedMemory;->getFd()I
Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I

Bug: 170729553
Test: Treehugger
Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
2020-10-29 11:51:12 +00:00
Treehugger Robot
1d6e5826d9 Merge "Replace hidden NMS permission control API" am: d8288fe344 am: 38be0ff345 am: 2308172769 am: cad97e11d5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473957

Change-Id: Ib53b5efe2af87f21563de0d883fce86afbdb89d7
2020-10-29 08:47:51 +00:00
Treehugger Robot
cad97e11d5 Merge "Replace hidden NMS permission control API" am: d8288fe344 am: 38be0ff345 am: 2308172769
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473957

Change-Id: Ie55d43f42235fbfc570f8088a9459dba99008799
2020-10-29 08:06:04 +00:00
Treehugger Robot
2308172769 Merge "Replace hidden NMS permission control API" am: d8288fe344 am: 38be0ff345
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473957

Change-Id: I45135311ec026b75d1110614f609b851b72f543b
2020-10-29 07:47:31 +00:00
Treehugger Robot
d8288fe344 Merge "Replace hidden NMS permission control API" 2020-10-29 07:03:37 +00:00
Chiachang Wang
331d83cd8c Merge changes I6a51d803,I162fae5c am: b524e17519 am: 18013cefe3 am: 84aa44d22b am: 676c21cf05
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473228

Change-Id: I40ff3cfcb4dbe7dc036eaa87df2fa192aee3f016
2020-10-29 06:19:52 +00:00
Chiachang Wang
37d46a01ea Merge "Replace hidden NMS interface to network API" am: 2a40529747 am: 667b09128d am: a6b1b5722a am: 30b5ebb272
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473224

Change-Id: Id97da9dda9bed8c182ea2fcd92c79d94bc619d52
2020-10-29 06:19:30 +00:00