Commit Graph

20634 Commits

Author SHA1 Message Date
TreeHugger Robot
b2eb6bd683 Merge "Add setDarkAmount method to ClockPlugin interface." 2018-11-12 16:25:32 +00:00
Alison Cichowlas
69f39989c2 Merge changes from topic "sharesheet-refactor"
* changes:
  Add URI shared by screenshot into extras.
  Re-patching in Sharesheet security model changes.
2018-11-12 15:19:11 +00:00
Robert Snoeberger
e32efd76af Add setDarkAmount method to ClockPlugin interface.
setDarmAmount implementations provided by clock plugins
should use the dark amount to transition into and out
of the doze state on AOD. For example, the size of the
clock could shrink in the Y direction when leaving doze
to make room for the notification stack scroller.

Bug: 119035943
Test: KeyguardClockSwitchTest passes locally.
Change-Id: I9968dc2cc5ab8000ff525f3d1d06ffbf73359086
2018-11-12 09:29:59 -05:00
Wang, ArvinX
6e9012aebe Merge "Unable to input PIN with hardware keyboard" am: b8740842e0 am: 7e4d381a48
am: 0740d13e03

Change-Id: Ic4864c9c7f0dca262dc7bdeb225228017797f1e7
2018-11-12 05:19:23 -08:00
Charles Chen
ed50a5ac4b Merge "Introduce DisplayNavigationBarController" 2018-11-12 02:21:48 +00:00
Wang, ArvinX
0740d13e03 Merge "Unable to input PIN with hardware keyboard" am: b8740842e0
am: 7e4d381a48

Change-Id: I4805c68c9d3ad609754631890f076a2ba2d2bb6c
2018-11-09 17:49:27 -08:00
Mady Mellor
6cb20df2a5 Add notion of bubble to NotificationData
- indicate if an entry is a bubble
- indicate if an entry is a bubble that has been dismissed

Test: none
Bug: 111236845
Change-Id: I81a3ed92d438eb849995f80ed2ef2a3995c1cefe
2018-11-09 16:37:19 -08:00
TreeHugger Robot
43c453a165 Merge "Add device type to falsing data for normalization purposes." 2018-11-09 23:45:41 +00:00
TreeHugger Robot
c150021624 Merge "Adds silence toggle to notification settings." 2018-11-09 22:07:45 +00:00
TreeHugger Robot
43d6517c1f Merge "Fixed an issue where the background calculatation was wrong" 2018-11-09 21:59:27 +00:00
Dave Mankoff
ad7c460115 Add device type to falsing data for normalization purposes.
Bug: 117600098
Change-Id: If921d806f09650c4a2366826e23f0159ff0daa09
Test: Manual.
2018-11-09 15:04:42 -05:00
Todd Kennedy
b2f48af230 Revert "resolve merge conflicts of 0cc0d229d0 to pi-dev-plus-aosp"
This reverts commit 6fa357a529.

Reason for revert: breaks git_pi-dev-plus-aosp build

Change-Id: I12697f8c329ab224f83856176ba989c37920774f
2018-11-09 18:38:07 +00:00
Gus Prevas
9abc50646f Adds silence toggle to notification settings.
This change modifies the UI that appears when a notification is
long-pressed to include a third option when the notification could
potentially buzz or make sound, allowing the user to promote or demote
the notification's channel such that it will not alert (or will start
alerting) for future notifications.

Test: atest SystemUITests
Bug: 116622974
Change-Id: Ia070d0ef1b181b4de8b3d49ace9ff2a65fed8deb
2018-11-09 13:19:11 -05:00
Felka Chang
6fa357a529 resolve merge conflicts of 0cc0d229d0 to pi-dev-plus-aosp
To add test testHeaderReadFromOldController into
HeadsUpAppearanceControllerTest.java and conflict with
testOperatorNameViewUpdated.

Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: If7d7961dbc12346484f3d139bdc808a53abc6c46
2018-11-09 17:29:40 +00:00
TreeHugger Robot
9403a36202 Merge "Adds an icon to noisy notifications." 2018-11-09 17:11:30 +00:00
TreeHugger Robot
3b12629bab Merge "Add dozeTimeTick method to ClockPlugin interface." 2018-11-09 16:24:25 +00:00
Alison Cichowlas
09e5ea3118 Add URI shared by screenshot into extras.
This causes it to be consistently picked up for grantPermissions.

Test: Manual - share to Gmail from screenshot notification.

Change-Id: I194526db97eed4af78d35ef3070eb89c4d5d57d7
2018-11-09 11:01:54 -05:00
Alison Cichowlas
3e34050a42 Re-patching in Sharesheet security model changes.
Previously reverted due to b/72554856, fix for that in topic.

Original commit message:

Security model for moving sharesheet to systemui

ResolverActivity (still in frameworks) now requests a "permission token"
that it hands to a stubbed system ui activity ChooserActivity.

This permission token allows an app (SysUI) with the signed permission
"START_ACTIVITY_AS_CALLER" to call
ActivityManagerService#startActivityAsCaller. Permission tokens are a
one-time use, limited-time offer.

Test: runtest systemui && manual testing
Bug: 69850752
Change-Id: Ia50e21e2f8c6b6d0ed7207625e3b5aef214396bb
2018-11-09 11:01:54 -05:00
Gus Prevas
a32264906d Adds an icon to noisy notifications.
Test: manually
Bug: 116622974
Change-Id: I657e81eed9c650f1613caffaea96e6445c2105ef
2018-11-09 10:35:27 -05:00
Robert Snoeberger
ffbe315d43 Add dozeTimeTick method to ClockPlugin interface.
dozeTimeTick implementations provided by clock plugins
should update the time of the clock while the device
is dozing and deal with burn-in related issues.

Bug: 119035943
Test: KeyguardClockSwitchTest passes locally.
Test: Custom clock updates with time on AOD screen.
Change-Id: I5c31e6d856c5a80dc3e501831dda5a62c0be5ba0
2018-11-09 14:21:11 +00:00
Wang, ArvinX
3b9dae8c20 Unable to input PIN with hardware keyboard
After typing a wrong PIN, the EditText view will be disabled and lose the focus,
as a result, inputs from hardware keyboard won't be sent to PIN EditText.

Test: 1. Enable PIN lock
Test: 2. Lock the device with Power key
Test: 3. Enter wrong PIN from a physical keyboard
Test: 4. Try to enter PIN again with physical keyboard

Bug: 119287260

Change-Id: I04df523c19c99bef75ea481b44154f7ba2270689
Signed-off-by: Wang, ArvinX <arvinx.wang@intel.com>
Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
2018-11-09 08:01:58 +00:00
Charles Chen
61325fb32f Introduce DisplayNavigationBarController
DisplayNavigationBarController is a class to control everything related
to external navigation bars. Belows are its tasks:
1. create external nav bars when:
   a. StatusBar.createNavigationBar()
   b. A system decoration supported display added
2. remove external nav bars when display is removed.
3. remove all external nav bars when StatusBar.destroy()

(Following Tasks)
1. Support SystemUiVisualibility for external nav bars
   (corresponding to b/117478341#3)
2. A design doc for refactor

Bug: 115978725
Bug: 117478341
Test: atest SystemUITests
Test: Manual - external nav bars still works

Change-Id: I17084c1be287ae7ccfb94b2d1302072a5d620e29
2018-11-09 16:01:41 +08:00
Gus Prevas
874292e1f0 Reads new interruption model setting from correct settings.
Test: n/a
Change-Id: Ia04d5152dc61f7c5ea672ab0c541d1ab81bc739d
2018-11-08 15:09:12 -05:00
John Choi
7c31e49467 Merge "Fix Car volume dialog that does not show when volume reaches min/max" 2018-11-08 19:57:54 +00:00
Kevin Chyn
7d54535d62 Merge "Update margin / corners on BiometricDialog" 2018-11-08 18:51:48 +00:00
Dave Mankoff
b7b36c7984 Merge "New "FalsingPlugin" to allow for easier data collection." 2018-11-08 18:10:52 +00:00
TreeHugger Robot
3492b7c477 Merge "Allows different menu icons on each side of a notification." 2018-11-08 17:47:35 +00:00
Priyank
e5c1db9fae Fix Car volume dialog that does not show when volume reaches min/max
Test: Manual
Bug: 113906049
Change-Id: I8811562827e9983b453c73869967b88ad7b2f02c
2018-11-08 17:44:53 +00:00
TreeHugger Robot
9ba5646aaf Merge "Replaces binary flag for new interruption model with secure setting." 2018-11-08 17:34:45 +00:00
Gus Prevas
eb61ce118e Allows different menu icons on each side of a notification.
This change modifies NotificationMenuRow such that it is now able to
display a different set of icons depending on whether the user swipes
left or right.

No change is made to the current set of icons - all current icons are
still displayed on both sides - but this will enable a followup CL to
replace the buttons to the right of the notification with block and
silence buttons per the designs for the new interruption model.

Bug: 116622974
Test: atest NotificationMenuRowTest
Change-Id: I459441353099d45f348b8299a1fb140790b0697e
2018-11-08 11:31:57 -05:00
Gus Prevas
415376b97d Replaces binary flag for new interruption model with secure setting.
Bug: 116622974
Test: n/a
Change-Id: I8445e5db49ba3f87046332624c0a705cc082ab59
2018-11-08 11:07:15 -05:00
TreeHugger Robot
fd5f1a3166 Merge "Prevents large clock on AOD from overflowing top of screen." 2018-11-08 13:49:16 +00:00
Charles Chen
4353cd6193 Merge "Show navigation bar on external displays" 2018-11-08 06:43:07 +00:00
felkachang
252efd708a Fix the icon overlay after density change
After showing the heads up for the fullscreen notification, to
change the density by user will have the status bar icons
not show normally. It will the only one icon overlay on the
clock but actually there are more than one icons. And, it can't
back to normal after expandable notification and collapse the
notification panel.

The root cause is that all of instances of PhoneStatusBarView,
Clock, HeadsUpStatusBarView, and HeadsUpAppearanceController are
recreated by FragmentManager after configuration density and
font changing. The new HeadsUpAppearanceController status is
neither consistent with HeadsUpManager's status nor the state of
the previous instances.

The solution is that to apply the onSaveInstanceState and
onRestoreInstanceState in PhoneStatusBarView, Clock, PanelBar, and
HeadsUpStatusBarView. To make sure that the values of the fields
in the new instance, which are set by other source, have the
consistence with the state of the old instances.

HeadsUpAppearanceController's Constructor.
To hook onLayoutChangedListener to sync the status with
HeadsUpManager's status to HeadsUpStatusBarView if there is a
pinnded heads up notification.

In original, PanelBar.mState is the only one state to save. Instead
of only saving one, to save the view tree state in
CollapsedStatusBarFragment.onSaveInstanceState and restore the view
state in CollapsedStatusBarFragment.onViewCreated.
CollapsedStatusBarFragment.mDisabled1 doesn't need to save and
restore because CommandQueue.recomputeDisableFlags will give it
the correct value.

After density changed, RemoteViews will reinflate the instances of
NotificationHeaderView and the wrapper instances of
NoticationContentView will also recreated in
NotificationContentView.setAmbientChild. The recreated instance
should synchronized with the ExpandableNotificationRow intance.

Bug: 80224819
Fixes: 111996469
Fixes: 117818441
Test: atest SystemUITests
Change-Id: Ia3f8a0f138f403c8e0c74c00d56bd93baf604d3a
Merged-In: Ia3f8a0f138f403c8e0c74c00d56bd93baf604d3a
2018-11-08 04:19:36 +00:00
Kevin Chyn
bb26914777 Update margin / corners on BiometricDialog
Bug: 111461540

Test: BiometricPromptDemo with multiple orientations

Change-Id: Iaa6c58118662091045229491cee79fbb5a9093d2
2018-11-07 19:34:27 -08:00
TreeHugger Robot
d0f153d270 Merge "Add thermal service into system_server" 2018-11-08 01:43:14 +00:00
Dave Mankoff
21beba8bcd New "FalsingPlugin" to allow for easier data collection.
Bug: 117600098
Change-Id: I67b634f84a0e168eec269f7804c5169b130db586
Test: manual testing
2018-11-07 17:07:22 -05:00
Wei Wang
bad7c20606 Add thermal service into system_server
This system service will listen to ThermalHAL for throttling events and
take actions accordingly, e.g. shutdown device and/or sending
notification to registered listeners to IThermalSerivce.

Bug: 79443945
Bug: 118510237
Bug: 111086696
Bug: 116541003
Test: Boot and test callback on ThermalHAL 1.1
Test: Boot and test callback on ThermalHAL 2.0
Test: Kill ThermalHAL process
Test: Change device threshold to trigger shutdown
Change-Id: I1f4066c9f1cf9ab46c1738a0a4435802512e4339
2018-11-07 13:38:57 -08:00
Robert Snoeberger
10b6353f35 Prevents large clock on AOD from overflowing top of screen.
This works on AOD since notification icons were moved to
the status bar. For the lock screen, the clock is made
transparent due to the height of the clock. This prevents
the clock from interfering with the notifs in stack scroller.

Bug: b119103421
Test: KeyguardClockPositionAlgorithmTest updated.
Change-Id: Ife2de31ae6d55effced99c6d419c794ac57c8522
2018-11-07 21:21:38 +00:00
Dave Mankoff
9c9c28bb5a Merge "Create a way to turn off unlocking on a phone." 2018-11-07 18:53:51 +00:00
TreeHugger Robot
538d808c46 Merge "Add dozing state listening to classes that care" 2018-11-07 18:13:54 +00:00
Andrii Kulian
3ddd7def01 Show navigation bar on external displays
Add phone navigation bar in 2 situations:
1. When status bar is created and external
   displays,which supports system decorations exist.
2. When new displays are added and the displays supports system
   decorations

TODO: 1. Support nav bar logic in WM code.
      2. Add lightController and more for external nav bars
      3. Move the logic to DisplayNavigationController

Bug: 115978725
Test: Manual
Test: atest SystemUITests
Test: atest ActivityManagerMultiDisplayTests
Test: atest ActivityManagerMultiDisplayTests#testNavBarShowingOnDisplayWithDecor
Test: atest ActivityManagerMultiDisplayTests#testNavBarNotShowingOnDisplayWithoutDecor
Test: atest ActivityManagerMultiDisplayTests#testNavBarNotShowingOnPrivateDisplay
Change-Id: Ibf7c548d911ec2aca213b5ac0ecbd67f5f9fbeb5
2018-11-08 02:00:50 +08:00
Gus Prevas
37d67e207f Disables dismissing notification on leftward swipe.
This change modifies SwipeHelper to pass the direction of a swipe to the
provided callback when determining whether the swipe represents a valid
dismiss gesture, and modifies the callback defined by
NotificationStackScrollLayout to allow dismiss gestures only to the
right.

Test: manually
Change-Id: I7ff1e8f92e7da9ed36520195d823f9a62f9a64ba
2018-11-07 14:29:04 +00:00
felkachang
904c4d1c4f Merge "fix overlay on status bar because of two clock" into pi-dev
am: 0317b241d8

Change-Id: I31578280f1043338eae61c529a5b7a2a7a2cd024
2018-11-07 00:33:31 -08:00
TreeHugger Robot
0317b241d8 Merge "fix overlay on status bar because of two clock" into pi-dev 2018-11-07 08:18:12 +00:00
TreeHugger Robot
661d7b8dba Merge "Support show KeyguardPresentation on all public displays." 2018-11-07 06:26:51 +00:00
felkachang
93e9b45644 Merge "Fix the wrong number of icons in shelf for RTL" into pi-dev
am: 8861d33dec

Change-Id: I42aba38e24a3a9bb5c7084a07cf68ef191d07a75
2018-11-06 20:56:52 -08:00
felkachang
d2d52d2c3e Fix EditText show wrong position when ime show
am: 6d1eca3c85

Change-Id: I7cfa1b33d24bbcb8d4bd23728ea0b9c1cc198dbc
2018-11-06 20:51:03 -08:00
TreeHugger Robot
8861d33dec Merge "Fix the wrong number of icons in shelf for RTL" into pi-dev 2018-11-07 04:35:40 +00:00
felkachang
6d1eca3c85 Fix EditText show wrong position when ime show
In landscape and largest density, the area that could show the heads
up notification is smaller than normal density. To handle the heads
up notification should be different with the normal notification in
both of targetScrollForView and getScrollRange because
StackScrollAlgorithm translation heads up notification as
mHeadsUpInset but neither targetScrollForView nor getScrollRange has
have the same consideration.

The solution make the StackScrollAlgorithm to considerate scroll
value to move up the heads up notification.

The getScrollRange need to consider more about the difference
between heads up showing and non-heads up showing. The top padding
and the total content height are the major considerations.

Test: manual test
Test: atest SystemUITests
Change-Id: I46bb960a81f6ab5be4d8e39738e8fb64245dd4eb
Merged-In: I46bb960a81f6ab5be4d8e39738e8fb64245dd4eb
Fixes: 110388615
(cherry picked from commit 529bfe6f0a)
2018-11-07 03:40:25 +00:00