Commit Graph

8642 Commits

Author SHA1 Message Date
Tim Van Patten
e5eaca6001 Merge "GameManagerService: Restrict get/set Game Mode to Games" into sc-dev am: f9c119884a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13832126

Change-Id: I7d5c0202d27887fdd4c11b8e7862a401d03f78ae
2021-03-24 01:05:43 +00:00
TreeHugger Robot
8342e6d823 Merge "Introduce vibrator frequency mapping." into sc-dev am: 14278aecfd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13886485

Change-Id: I81391fec56d7baba714afbe2483da6c42a5b9733
2021-03-24 01:04:07 +00:00
Dmitri Plotnikov
7edd2b92e9 Merge "Change getStatsStartRealtime to getStatsStartTimestamp" into sc-dev am: f2dca81569
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13957373

Change-Id: Iba89366fedfd01a207d56c089f7bfd054d8a3151
2021-03-24 00:59:44 +00:00
Flavio Fiszman
7bbc94b953 Merge "Show messages count in People Tile" into sc-dev am: 5785c5c68f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13948525

Change-Id: Icb73822bc829304117e229811914ce1da779438a
2021-03-24 00:58:08 +00:00
Tim Van Patten
f9c119884a Merge "GameManagerService: Restrict get/set Game Mode to Games" into sc-dev 2021-03-23 19:33:07 +00:00
TreeHugger Robot
14278aecfd Merge "Introduce vibrator frequency mapping." into sc-dev 2021-03-23 19:11:07 +00:00
Siim Sammul
9d02e6101e Change BinderLatencyBuckets to use int[] instead of ArrayList to improve
performance.

Test: unit test
Bug: 179999191
Change-Id: Id996b52b5cb69a85f9c6a932ea8d30336fcaf12a
2021-03-23 17:38:33 +00:00
Dmitri Plotnikov
f2dca81569 Merge "Change getStatsStartRealtime to getStatsStartTimestamp" into sc-dev 2021-03-23 17:29:38 +00:00
Flavio Fiszman
5785c5c68f Merge "Show messages count in People Tile" into sc-dev 2021-03-23 16:42:53 +00:00
Lais Andrade
e574d3bbe8 Introduce vibrator frequency mapping.
Introduce frequency data to VibratorInfo and a transformation for
VibrationEffect that maps relative frequency and amplitude values to the
device absolute values.

The transformation also clips amplitude values to the device bandwidth
map provided.

Pending implementation of chaining composed waveforms and sending PWLE
primitives to the HAL.

Bug: 167947076
Test: DeviceVibrationEffectAdapterTest
Change-Id: Ie7505a1c0f50bb7d907b0752c02987f258316874
2021-03-23 15:28:10 +00:00
TreeHugger Robot
1ab180da79 Merge "Introduce WaveformBuilder to VibrationEffect" into sc-dev am: 9db9a56c7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13828865

Change-Id: I70acc05ee9b610211bd1b13b55454756263eedb2
2021-03-23 14:42:03 +00:00
TreeHugger Robot
9db9a56c7e Merge "Introduce WaveformBuilder to VibrationEffect" into sc-dev 2021-03-23 14:32:56 +00:00
Jeff Sharkey
cbdf88ce58 Merge changes from topic "nearby-bluetooth-permission-group" into sc-dev am: 9f5392e8b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13956893

Change-Id: Idef7bb2a70ff9a5f0c4eff73ccbdc6e2bae02259
2021-03-23 13:10:54 +00:00
Jeff Sharkey
9f5392e8b7 Merge changes from topic "nearby-bluetooth-permission-group" into sc-dev
* changes:
  Request new Bluetooth runtime permissions.
  Default grants for "Nearby devices" permission.
  Add BLUETOOTH_SCAN and BLUETOOTH_CONNECT app ops
  Split new NEARBY_DEVICES permissions
  Define new NEARBY_DEVICES permission group
2021-03-23 12:56:30 +00:00
Flavio Fiszman
87eec50482 Show messages count in People Tile
Change-Id: I85b262dda92227cbea2672d9725bda163a5bb42a
Test: manual
Bug: 183382000
2021-03-23 11:25:29 +00:00
TreeHugger Robot
abb595130e Merge "Introduce VibrationEffectSegment" into sc-dev am: 11d5b29d7c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13776606

Change-Id: I6ec5517437927a6b9e07af92c4e7a8d3942ee0e8
2021-03-23 09:04:46 +00:00
TreeHugger Robot
11d5b29d7c Merge "Introduce VibrationEffectSegment" into sc-dev 2021-03-23 08:52:21 +00:00
Dmitri Plotnikov
a5ceb34339 Change getStatsStartRealtime to getStatsStartTimestamp
The implementation is now based on BatteryStats.getStartClockTime

Bug: 183434301
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryUsageStatsTest

Change-Id: I55184f981b2583b184d859788837443e58eccb6c
2021-03-22 22:56:39 -07:00
Jeff DeCew
b9e0292577 Merge "New MediaStyle template:" into sc-dev am: 2a12cfadb4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13856066

Change-Id: Ia0d6ceb379a8c88f02149d5511ff91fb499865ba
2021-03-23 02:33:09 +00:00
Jeff DeCew
2a12cfadb4 Merge "New MediaStyle template:" into sc-dev 2021-03-23 02:14:06 +00:00
Adam Bookatz
b6d40027d1 Merge "SparseDoubleArray" into sc-dev am: 6b8c61c8fc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13921467

Change-Id: Icbcd25a1e469d7f1af473d1099ad9c266d86d39b
2021-03-22 21:58:28 +00:00
Adam Bookatz
6b8c61c8fc Merge "SparseDoubleArray" into sc-dev 2021-03-22 21:45:29 +00:00
Jeff Sharkey
7b14b87647 Request new Bluetooth runtime permissions.
An upcoming platform change is introducing a new "Nearby devices"
runtime permission which contains the new BLUETOOTH_CONNECT and
BLUETOOTH_SCAN permissions.

We have logic in place to use <split-permission> to translate the
older BLUETOOTH and BLUETOOTH_ADMIN permissions into these new
runtime permissions, but modern apps will need to pivot to
requesting them directly as part of targeting Android S.

This change requests both the old and new permissions to avoid
breakage while the new permission enforcement is being phased in.

Bug: 181813006
Test: atest CtsPermission2TestCases
Test: atest CtsPermission3TestCases
Test: atest CtsStatsdAtomHostTestCases
Change-Id: I39f45e7d22d132d44c84017cd98e6d9e98533c7f
2021-03-22 15:34:05 -06:00
Jeff DeCew
ff165814e1 New MediaStyle template:
* Remove all media-specific color extraction and colorization logic
* Remove all 'large icon' gradienting logic
* Simplify base (headerless) style to use a LinearLayout instead of tweaking margins
* Make compact media layout a tweak of the base (headerless) layout
* Make big_media layout a tweak of the big_base layout
* Fix an unnecessary swooping animation that happened on expand
* Ensure RTL layout also works

Fixes: 172652345
Test: manual testing w/ updated notify2
Change-Id: I11c1494c0ac32aaf3e9d2010560cc8f1d8c50037
2021-03-22 11:13:08 -04:00
Charles Chen
d6b15f9e56 Merge "Enable to listen to WindowContext's config changes" into sc-dev am: b661dcbda6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13816185

Change-Id: I8038b906252900f8273a488d8a9ac219dd7529af
2021-03-22 13:50:19 +00:00
Adrian Roos
ee5c548f03 Merge "IME Insets: Remove obsolete applyImeVisibility call" into sc-dev am: 07f3583061
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13430934

Change-Id: I85476fca06e516a603165c40c90e6923cf26185f
2021-03-22 13:20:24 +00:00
Song Hu
64515ec80b Surface DS targets as per their own score and ranking, remove customized ranking logic (max shortcuts count limit per app, app share adjustment).
This is guarded by the flag  "apply_sharing_app_limits_in_sysui".

Bug: 182146792
Test: verify on local phone
Test: atest ChooserActivityTest
Change-Id: Ic03395343432015400f37299e5748932d2bd9eaa
Merged-In: Ic03395343432015400f37299e5748932d2bd9eaa
(cherry picked from commit d001e08b92)
2021-03-22 13:09:13 +00:00
Charles Chen
b661dcbda6 Merge "Enable to listen to WindowContext's config changes" into sc-dev 2021-03-22 12:28:02 +00:00
Adrian Roos
07f3583061 Merge "IME Insets: Remove obsolete applyImeVisibility call" into sc-dev 2021-03-22 08:38:04 +00:00
Adam Bookatz
8bcb4c9219 SparseDoubleArray
Introduces a SparseDoubleArray class.
It is based on a SparseLongArray, storing the double values
in the bits of the long in the SparseLongArray.

This is a hidden class.
Not all long-term desired features of SparseDoubleArray
have necessarily been implemented here; only the ones needed
right now have been written.

Bug: 182845832
Test: atest BatteryStatsTests
Test: atest FrameworksCoreTests:android.util.SparseDoubleArrayTest
Change-Id: Id68b22328f2660839e2005990766d99140b00c16
2021-03-19 17:31:56 -07:00
Dmitri Plotnikov
bb08a43a7d Merge "Fix and re-enable BstatsCpuTimesValidationTest" into sc-dev am: 31c3622909
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13930617

Change-Id: I7b38ec25c3f543fce878b021317e93675a853be1
2021-03-19 22:48:17 +00:00
Dmitri Plotnikov
31c3622909 Merge "Fix and re-enable BstatsCpuTimesValidationTest" into sc-dev 2021-03-19 22:40:02 +00:00
Dmitri Plotnikov
9e5cf848fc Fix and re-enable BstatsCpuTimesValidationTest
Thanks to jji@ for identifying the cause and the fix.

Bug: 180015146
Test: atest FrameworksCoreTests:com.android.internal.os.BstatsCpuTimesValidationTest
BYPASS_INCLUSIVE_LANGUAGE_REASON=Using a legacy command, cmd deviceidle whitelist

Change-Id: I1dd2402719d5ae7752300b72a5afe3740ac7498a
2021-03-19 14:11:10 -07:00
TreeHugger Robot
60034b9dad Merge "Add eventMask to DM.registerDisplayListener" into sc-dev am: c3acebab45
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13425145

Change-Id: Iffd3fa18180861c8a55332123ee2e0e60b037604
2021-03-19 17:46:23 +00:00
TreeHugger Robot
c3acebab45 Merge "Add eventMask to DM.registerDisplayListener" into sc-dev 2021-03-19 17:39:54 +00:00
Adrian Roos
142218b1f9 IME Insets: Remove obsolete applyImeVisibility call
Test: atest InsetsControllerTest ImeInsetsSourceConsumerTest
Bug: 167947407
Change-Id: I8abb210eb20a17f5dfd6d071c57838afb9deb263
2021-03-19 17:12:26 +00:00
Marin Shalamanov
204eba6cdc Add eventMask to DM.registerDisplayListener
Add a new parameter to DisplayManager.registDisplayListener
which clients can use to specify in which events
they are interested.

Test: atest DisplayManagerServiceTest
      atest DisplayManagerGlobalTest

Bug: 171240622
Change-Id: Icc71bdd9ddb390bc5406b298a557c84194a53c00
2021-03-19 16:15:11 +01:00
Charles Chen
0783811428 Enable to listen to WindowContext's config changes
This CL overrides registerComponentCallbacks for
WindowContext. Users can use below code snippet
to listen to Configuration changes.
```
Context windowContext = context.createWindowContext(
        display, ...);
windowContext.registerComponentCallbacks(
        new ComponentCallbacks() {
            @Override
            public void onConfigurationChanged(
                    Configuration newConfig) {
                    // Do Something
                }
        });
```

Bug: 181134729
Test: atest WindowContextTests
Test: atest ComponentCallbacksControllerTest

Change-Id: Iff46607bae3c942a96b64dcc97708f3a8c33f23a
2021-03-19 21:56:35 +08:00
TreeHugger Robot
1e24dab1cf Merge "Fix and re-enable BatteryStatsCpuTimesTest" into sc-dev am: 3f6e6e2ef8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13909758

Change-Id: Idf8ccf955f252dc47a91b04d3b84c961ea369fd9
2021-03-19 00:09:21 +00:00
TreeHugger Robot
3f6e6e2ef8 Merge "Fix and re-enable BatteryStatsCpuTimesTest" into sc-dev 2021-03-18 23:56:00 +00:00
Jeff Sharkey
0a3f194ecc Merge "Implement per-field matching of ScanRecord." into sc-dev am: 36e23d3471
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13921055

Change-Id: Ic21d89f405561541e09f84d6db2a7ff206c7d208
2021-03-18 23:24:18 +00:00
Jeff Sharkey
36e23d3471 Merge "Implement per-field matching of ScanRecord." into sc-dev 2021-03-18 23:16:45 +00:00
Jeff Sharkey
e6e4c05291 Implement per-field matching of ScanRecord.
As part of building out support for robustly matching Bluetooth LE
devices in the wild, this change checks all "fields" contained in a
ScanRecord against a given BytesMatcher.

To support matching variable-length Eddystone beacons, this change
also expands BytesMatcher to support both exact length and prefix
based rules, which are then used with rules that verify that example
Eddystone and iBeacon values can be detected with these rules:

    Eddystone: ⊆0016AAFE/00FFFFFF
    iBeacon: ⊆00FF4C0002/00FFFFFFFF

Expands testing to confirm all newly added capabilities are working.

Bug: 181812624
Test: atest BluetoothTests:android.bluetooth.le
Test: atest FrameworksCoreTests:android.os.BytesMatcherTest
Change-Id: I1cff8e08604436f4bba6f55aad64c3ce5969bf56
2021-03-18 14:17:28 -06:00
Lais Andrade
601a944e45 Introduce WaveformBuilder to VibrationEffect
Create a new parcelable RampSegment and introduce
VibrationEffect.startWaveform() method that returns a
WaveformBuilder that allows creating step/ramp waveforms that
changes amplitude and frequency of the effect.

Implementations of VibrationThread and InputManagerService for now just
ignore the new segments and keep existing behavior.

Bug: 167947076
Test: VibrationEffectTest
Change-Id: Ibac895b63196e779457efc297f1f5497a7814ae9
2021-03-18 18:06:45 +00:00
Tiger Huang
da96e37215 Merge "Let insets can still be controlled if its window bounds is moved" into sc-dev am: 1c7a274367
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13784130

Change-Id: I96bb6eb9a8d441f340e4d72fad92a7d0a8bdb3b4
2021-03-18 16:08:38 +00:00
Tiger Huang
1c7a274367 Merge "Let insets can still be controlled if its window bounds is moved" into sc-dev 2021-03-18 15:27:57 +00:00
Lais Andrade
bd992109e0 Introduce VibrationEffectSegment
Create a new parcelable VibrationEffectSegment in the new package
android.os.vibrator, together with three concrete implementations for
the segment types: step, prebaked and primitive.

Remove all implementations of VibrationEffect to allow composition of
any effects, represented now by the concrete type VibrationEffect that
holds a list of segments.

Bug: 167947076
Test: VibrationEffectTest
Change-Id: I79c99e29f436ed77558af764f55633bb4636e034
2021-03-18 11:03:45 +00:00
Almaz Mingaleev
c6f320d84c Merge "Add time related API to TimeManager." into sc-dev am: d355fee300
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13828870

Change-Id: Iaf5dec8270f7d59bc2a92f3fe14c1b10b235d255
2021-03-18 09:35:33 +00:00
Almaz Mingaleev
d355fee300 Merge "Add time related API to TimeManager." into sc-dev 2021-03-18 09:23:30 +00:00
Tim Van Patten
07b7955100 GameManagerService: Restrict get/set Game Mode to Games
Restrict the GameManagerService's getGameMode() and setGameMode()
functionality to only work with applications that are categorized as
games.

Bug: b/178860939
Test: atest GameManagerTests
Test: atest GameManagerServiceTests
Test: atest GameManagerServiceSettingsTests
Test: atest CtsGameManagerTestCases
Change-Id: Iaf42b995db3ef2a4040a5bf46dc327a952d4aa88
2021-03-17 20:53:28 -06:00