Commit Graph

496914 Commits

Author SHA1 Message Date
timhypeng
1747dbbc40 Add dismiss intent and method for MediaOutputDialog
-Add filter in Manifest
-Add dismiss method in MediaOutputDialogFactory

Bug: 155822415
Test: build pass
Merged-In: Ica5b5a22e0fa20ffec5ab9ea291f72c06e39c2fe
Change-Id: Ica5b5a22e0fa20ffec5ab9ea291f72c06e39c2fe
2020-12-02 03:29:15 +00:00
timhypeng
5fc4c2883d Add "Stop" button for remote device
-Add "Stop" to stop remote media session
-Refine UI layout
1. Adjust size of head icon and apply defined dimen value
2. Move list padding inside the list to prevent truncating the list
3. Remove group-related view(I will add it in recycle view when the group feature is ready.)
-Add MediaOutputDialogTest
-Rename PAIR_NEW to CUSTOMIZED_ITEM_PAIR_NEW
-Integrate more UI view in setTwoLineLayout()

Bug: 155822415
Test: atest MediaOutputAdapterTest MediaOutputBaseDialogTest MediaOutputControllerTest MediaOutputDialogTest
Merged-In: Ie6a917c56a0ef97f772a8f43742afd2ee61e407f
Change-Id: Ie6a917c56a0ef97f772a8f43742afd2ee61e407f
2020-12-02 03:29:07 +00:00
timhypeng
e06eba62fb Add constant for dialog dismiss
Bug: 155822415
Test: build pass
Merged-In: Iaea9d73ddef77581098cca63cecec3ab5393d9ae
Change-Id: Iaea9d73ddef77581098cca63cecec3ab5393d9ae
2020-12-02 03:29:00 +00:00
timhypeng
34f4c21fd3 Rename MediaOutDialogReceiver to MediaOutputDialogReceiver
-Typo

Bug: 155822415
Test: build pass
Merged-In: Ib275b97f5ff03dffb8aeb91b658dbb7c035b96f4
Change-Id: Ib275b97f5ff03dffb8aeb91b658dbb7c035b96f4
2020-12-02 03:28:52 +00:00
timhypeng
cd2af9a0e4 Add getFeatures() for get device supporting features
-Provide supported features of the route

Bug: 155822415
Test: build pass
Merged-In: Id3a95f608018ecfae30dc0df9217548f90953403
Change-Id: Id3a95f608018ecfae30dc0df9217548f90953403
2020-12-02 03:28:45 +00:00
timhypeng
80a46198fc Add a receiver to launch Output Switcher dialog
-The receiver launches dialog with TYPE_APPLICATION_OVERLAY window
type
-Add receiver in manifest
-Add bindMediaOutDialogReceiver() for Dagger

Bug: 155822415
Test: build pass

Merged-In: Icb5a1f241e644307491030ed721939c18269ff86
Change-Id: Icb5a1f241e644307491030ed721939c18269ff86
2020-12-02 03:28:37 +00:00
timhypeng
03e5417ec4 Add MediaOutputDialogFactory to create MediaOutputDialog
Bug: 155822415
Test: build pass
Merged-In: Idbfc558bcecc66f6f3b984a0d6f09634db2b2002
Change-Id: Idbfc558bcecc66f6f3b984a0d6f09634db2b2002
2020-12-02 03:28:26 +00:00
timhypeng
3e5de04302 Add Media Output Dialog for Output Switcher
-Add MediaOutputBaseDialog to provide common method for different media operations UI
-Add MediaOutputDialog for showing Bluetooth device
-Add resources for background image, style and layout
-Add MediaOutputBaseDialogTest for unit test

Bug: 155822415
Test: atest MediaOutputBaseDialogTest
Merged-In: I3086a4049f240870ca1ad870946d6848e500b561
Change-Id: I3086a4049f240870ca1ad870946d6848e500b561
2020-12-02 03:23:47 +00:00
timhypeng
c23f9171ce Add controller for Media operation
-Access LocalMediaManger to display avilable output devices information
-Access LocalMediaManger to do media operation, such as volume adjustment,
switching output device, grouping
-Access MediaController to show media content information
-Add MediaOutputControllerTest for unit test

Bug: 155822415
Test: atest MediaOutputControllerTest
Merged-In: I9eb6e3b0a6e584637aecb4132dbc2b138c6d1530
Change-Id: I9eb6e3b0a6e584637aecb4132dbc2b138c6d1530
2020-12-02 03:21:14 +00:00
timhypeng
d04087aff3 Add MediaOutputAdapter for Media device list
-Build device item layout by different cases
-Provide UI component for different operations
-Add MediaOutputBaseAdapter for common method
-Add MediaOutputAdapterTest for unit test

Bug: 155822415
Test: atest MediaOutputAdapterTest
Merged-In: Ida509ed401320b3665d7a5f29f4df5db096ff29c
Change-Id: Ida509ed401320b3665d7a5f29f4df5db096ff29c
2020-12-02 03:20:51 +00:00
timhypeng
2f172d225c Define strings for output switcher dialog in SystemUI
-SystemUI requires to launch Bluetooth pairing setting
-Volume panel requires to launch SystemUI dialog

Bug: 155822415
Test: build pass
Merged-In: Ibb39b29aa383aab1df3e168b4f91ad1a40bf7682
Change-Id: Ibb39b29aa383aab1df3e168b4f91ad1a40bf7682
(cherry picked from commit 7d0e084058)
2020-12-02 03:18:54 +00:00
timhypeng
7e04788dd1 Add image utility methods
-Add convertCornerRadiusBitmap to edit bitmap cornor
-Add createIconWithDrawable to create icon from bitmap

Bug: 155822415
Test: manual test
Merged-In: Idb770ce5f3b9aaa1288538aa1e51ffc0d9f34a6e
Change-Id: Idb770ce5f3b9aaa1288538aa1e51ffc0d9f34a6e
(cherry picked from commit 37017a739c)
2020-12-02 03:17:34 +00:00
tim peng
8a6e53837a Merge "DO NOT MERGE: Add constant for Output Switcher to start Bluetooth paring page" into rvc-qpr-dev 2020-12-02 02:01:05 +00:00
TreeHugger Robot
11bee77de6 Merge changes from topic "r3_flicker_high_brightness" into rvc-qpr-dev
* changes:
  Allow DeviceConfig to change display settings for high zone
  Set fixed fps when ambient or display brightness is high
  Add FakeSettingsProviderRule class
2020-12-02 01:05:39 +00:00
Eino-Ville Talvala
bfa0ffbb9f Fix up some camera API javadocs am: 66a993beeb am: 804134ab87
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13061797

Change-Id: I26aa22702b35761b2ec43e11369514aef80ce663
2020-12-01 22:37:40 +00:00
Eino-Ville Talvala
804134ab87 Fix up some camera API javadocs am: 66a993beeb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13061797

Change-Id: Iaa8732c416f259b2bcf12733bd7afd1f707e0639
2020-12-01 22:24:13 +00:00
TreeHugger Robot
571568a861 Merge "Use current fullscreen opaque window as insets control target" into rvc-qpr-dev 2020-12-01 16:40:30 +00:00
TreeHugger Robot
405ff8efaa Merge "Make the visibility of rotated insets up-to-date" into rvc-qpr-dev 2020-12-01 16:05:31 +00:00
Riddle Hsu
0c713fd090 Use current fullscreen opaque window as insets control target
This fixes stats bar blinking when switching from an app that hides
status bar to another that shows status bar. It is caused by the
TopFullscreenOpaqueWindow in DisplayPolicy will be updated according
to visibility. There may be an intermediate state that the insets
control target is still the previous window, then the transient
showing bar will be hidden a while.

It is tempting to make canAffectSystemUiFlags accept the activity
with mVisibleRequested=true so TopFullscreenOpaqueWindow can be
updated earlier. But that will break status bar hiding animation
when switching from an app that shows the bar to another that hides
the bar.

Also fix:
 - The original insets source is modified when getting insets state
   for client because the default "new InsetsState" will reuse the
   given insets sources.
 - Redundant invocation of updateBarControlTarget when calling
   abortTransient from updateBarControlTarget.

Fixes: 168023253
Bug: 160458371
Test: InsetsPolicyTest#testControlsForDispatch_topAppHidesStatusBar
Change-Id: I60f29dba81b0273a189ddd0a48a2e84155177f5b
Merged-In: I60f29dba81b0273a189ddd0a48a2e84155177f5b
2020-12-01 14:51:27 +00:00
TreeHugger Robot
9518d56356 Merge "Ensure insets state for dispatch is processed by policy" into rvc-qpr-dev 2020-12-01 14:48:59 +00:00
Riddle Hsu
c0246b2441 Make the visibility of rotated insets up-to-date
Otherwise the client app may not perform insets animation because
of a stale state that is no different from the previous one.

Bug: 170416293
Bug: 160458371
Test: DisplayContentTests#testApplyTopFixedRotationTransform
Change-Id: I6f89ba08d4996da0cf30fb18bab331678dc74622
Merged-In: I6f89ba08d4996da0cf30fb18bab331678dc74622
2020-12-01 12:49:31 +00:00
Michael Wright
cf55c21064 Allow DeviceConfig to change display settings for high zone
Allow DeviceConfig to change the high zone behavior including
refresh rate and brightness thresholds.

Bug: 166581675
Test: atest DisplayModeDirectorTest
Test: adb shell device_config put display_manager refresh_rate_in_high_zone "90"
Test: adb shell device_config put display_manager fixed_refresh_rate_high_display_brightness_thresholds "200"
Test: adb shell device_config put display_manager fixed_refresh_rate_high_ambient_brightness_thresholds "8000"
Change-Id: I2ac8d95f976748d03f6dc2e60725e9ef1213ed6f
Merged-In: I2ac8d95f976748d03f6dc2e60725e9ef1213ed6f
2020-12-01 19:31:52 +08:00
raylinhsu
4a0a896acc Set fixed fps when ambient or display brightness is high
Force the display to stay at fixed fps when ambient and
display brightness are high.

Bug: 166581675
Test: atest DisplayModeDirectorTest
Test: no fps transition in the blocking zone
Change-Id: Idf0dfe0b9ef907a4158f36f6dfda19286206fb3f
Merged-In: Idf0dfe0b9ef907a4158f36f6dfda19286206fb3f
2020-12-01 19:31:25 +08:00
Lais Andrade
f9d9f7796b Add FakeSettingsProviderRule class
Bug: 166581675
Change-Id: Idf081e662aa218e93a38cd3262a1357e2e3faf0d
Merged-In: Idf081e662aa218e93a38cd3262a1357e2e3faf0d
2020-12-01 19:30:17 +08:00
timhypeng
4dcbd86303 DO NOT MERGE: Add constant for Output Switcher to start Bluetooth paring page
Bug: 155822415
Test: build pass
Merged-In: Iaaf7aadf8dc371881fc831e91ff6e62be49b0219
Change-Id: Iaaf7aadf8dc371881fc831e91ff6e62be49b0219
(cherry picked from commit 298b575cc6)
2020-12-01 08:48:03 +00:00
TreeHugger Robot
1fd5a22154 Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-12-01 08:40:49 +00:00
Bill Yi
4c601b22af Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4048c69caa090fd5849c63289ab17da2fc09be34
2020-11-30 21:34:21 -08:00
Bill Yi
62fd1c3ab2 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ief96cf9237eb3570542b2f9e80baf4c92e7c13bc
2020-11-30 12:13:12 -08:00
Bill Yi
14f8a22b7b Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ie3c0cdb97982fbb3bc6a8858f3e7ec84b2e7dba1
2020-11-28 11:58:39 -08:00
Ming-Shin Lu
29c2b7e6e3 Merge "Add Null check for mView.findFocus() in ViewRootImpl" into rvc-qpr-dev 2020-11-26 13:50:13 +00:00
Martijn Coenen
50402a42f8 Merge "Make sure we preserve preserveLegacyExternalStorage." into rvc-qpr-dev 2020-11-26 12:34:43 +00:00
Corina Grigoras
97fdd2ab04 Merge "DO NOT MERGE: Enable ENABLE_DYNAMIC_PERMISSIONS depending on MediaProvider." into rvc-qpr-dev 2020-11-26 11:49:23 +00:00
Martijn Coenen
b2842cac58 Make sure we preserve preserveLegacyExternalStorage.
This could be lost after a reboot, due to the following sequence of
events:

1) App targets SDK 29 and has LEGACY_STORAGE
2) App updates to a version with targetSdk30 and preserveLegacyExternalStorage
3) App maintains LEGACY_STORAGE, because we currently have it and preserve
was requested
4) We reboot
5) When evaluating the READ_EXTERNAL_STORAGE permission, we check
whether we should grant the LEGACY_STORAGE extra app-op by calling
mayAllowExtraAppOp(); this call returns false, because there's a
check whether the app *currently* has LEGACY_STORAGE, which isn't true.
6) We then check whether we should deny LEGACY_STORAGE if it was
previously granted; this returns true, because it was implemented as the
inverse of 5)
7) LEGACY_STORAGE is denied

Fix this by more explicitly coding what allows us to get the appop, and
how it can be removed once we already have it.

Bug: 169943139
Test: atest RestrictedStoragePermissionTest
Test: atest PreserveLegacyStorageHostTest
Change-Id: Ic24372348118ad9ed818a28f377e0decc78b9ecc
Merged-In: Ic24372348118ad9ed818a28f377e0decc78b9ecc
(cherry picked from commit c57e3455ff)
2020-11-26 11:17:41 +00:00
Ming-Shin Lu
d1cd540bbe Add Null check for mView.findFocus() in ViewRootImpl
Some apps like Netflix crashed while handleWindowFocusChanged but mView
somehow has became null.

It's fair to check null for mView.findFocus() since other places
in ViewRootImpl that calling this method also add null check.

Fix: 153862451
Test: atest CtsInputMethodTestCases

Change-Id: I86bd5f3193deabe28bb425a8564017f7b32b90f3
(cherry picked from commit bdaa14bf18)
2020-11-26 09:24:46 +00:00
TreeHugger Robot
b72c8a096b Merge "Makes the multi-touch prevention only works for editable TextView." into rvc-qpr-dev 2020-11-26 00:22:20 +00:00
Corina
08b56aa19b DO NOT MERGE: Enable ENABLE_DYNAMIC_PERMISSIONS depending on MediaProvider.
The flag is now enabled only when MediaProvider version is
high enough to have the changes that handle it.

Bug: 115619667
Test: atest UriGrantsManagerServiceTest
Change-Id: I9582bb86ecf150a2f99a911226a40bb3e1273d4d
2020-11-25 12:27:16 +00:00
TreeHugger Robot
2b3c92cf0c Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-11-25 07:42:06 +00:00
Bill Yi
5673f6b3a1 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I61bdb76ab5a439d1f1eeed6121b99b6e81624b21
2020-11-25 04:49:29 +00:00
Bill Yi
016b563350 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I7ffc17fc5f5ed9699f1205d6a41ae60aac43d279
2020-11-24 22:34:21 +00:00
Riddle Hsu
42cdcba55b Ensure insets state for dispatch is processed by policy
Otherwise the visibility of transient state doesn't take effect if
there is a fixed rotation insets state. Then the client side may not
aware visibility change to update alpha of insets leash.

Bug: 160458371
Test: atest DisplayPolicyLayoutTests#testFixedRotationInsetsSourceFrame
  InsetsStateControllerTest#testTransientVisibilityOfFixedRotationState

Change-Id: Icecb25f64e983b163f169c191a9f0b15ac1b3086
Merged-In: Icecb25f64e983b163f169c191a9f0b15ac1b3086
2020-11-24 15:26:43 +00:00
TreeHugger Robot
d9541fb81b Merge "Add READ_DREAM_STATE to the settings list" into rvc-qpr-dev 2020-11-24 06:46:48 +00:00
TreeHugger Robot
7097a98494 Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-11-24 05:26:48 +00:00
TreeHugger Robot
7d23243e20 Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-11-24 05:24:49 +00:00
Bill Yi
db0daed109 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4e0eaf0208d81b78b65d4f9a776114695d25ef76
2020-11-24 02:00:33 +00:00
Bill Yi
f818ac557d Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I9a30e958ae3bc81289072763dda37547a7b303eb
2020-11-24 00:19:16 +00:00
TreeHugger Robot
b47a9cc28f Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-11-23 21:15:59 +00:00
TreeHugger Robot
872b367915 Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-11-23 21:09:06 +00:00
Corina Grigoras
03b8867166 Merge "DO NOT MERGE: Disable ENABLE_DYNAMIC_PERMISSIONS without helper method." into rvc-qpr-dev 2020-11-23 18:19:50 +00:00
TreeHugger Robot
2d75422872 Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-11-23 15:59:09 +00:00
TreeHugger Robot
252341aae6 Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-11-23 15:48:05 +00:00