Commit Graph

24178 Commits

Author SHA1 Message Date
Phil Weaver
83fec00697 Fix a race in settings update.
Need to invalidate caching before notifying of changes.

Bug: 28621277
Change-Id: I2820b15d2364ecaad7666a820c0c7280ac6b7b4c
2016-05-11 10:55:29 -07:00
Svetoslav Ganov
01da140ace Merge "Don't throw runtime exceptions for permission flags" into nyc-dev 2016-05-10 18:52:17 +00:00
TreeHugger Robot
046f2c80ae Merge "Keep RemoteInputView visible when focused" into nyc-dev 2016-05-10 17:41:59 +00:00
Benoit Lamarche
1100edb83f Merge "Set jack.assert.policy value to 'always'" into nyc-dev 2016-05-10 16:28:29 +00:00
Svetoslav Ganov
7e01af4243 Don't throw runtime exceptions for permission flags
We were thrwing undocumented runtime exception when
one gets the permission flags - now we just return
default result of the package is gone.

bug:28657926

Change-Id: I42554a86b9304ff83fe9385f3eea930b8ebf0c63
2016-05-10 15:34:36 +00:00
Jason Monk
c62cf80faa Fix accessibility order in nav bar
Change-Id: I2e90dee8e50b0642f39258fe3d04ded2f0bb8961
Fixes: 28281859
2016-05-10 11:19:48 -04:00
Delphine Martin
2a6b5c63c0 Set jack.assert.policy value to 'always'
The policy value 'enable' does not exist anymore
and was replaced by 'always'

Change-Id: I233a555821a84d917e3b3ec923b5baffc18bd2d2
2016-05-10 14:42:33 +00:00
Guang Zhu
5537ce1f94 Revert "Persist settings on a dedicated background thread"
Bug: 25472484

This reverts commit 82b8c92b97.

Change-Id: I1a8c2e186ad74d78f1c82fe508c6f71c438177dc
2016-05-10 07:02:42 +00:00
Svet Ganov
82b8c92b97 Persist settings on a dedicated background thread
Settings were persisted on the system background thread but during
first boot the device is under heavy load and persisting settings
competes with other system components using the shared background
thread. As a result persisting settings can be delayed much longer
than the expected 200ms. This can cause issues with setup wizard
being skipped/went over and its component disaabled being persisted
but the setting whether the device is provisioned not being
persisted - now if the device boots it will have no SUW but also
the home button would be missing. Generally, we need a tansactional
abstraction in the system process to peform all delayed operations
atomically.

bug:25472484

Change-Id: Icf38e72403b190a8fa9d0554b8dd83ce78da3bc8
2016-05-10 03:39:55 +00:00
Selim Cinek
9688c2edc9 Merge "Fixed a memory leak with notification children" into nyc-dev 2016-05-10 03:03:09 +00:00
Selim Cinek
7103fd44a8 Fixed a memory leak with notification children
Children where not removed from the stackscrollstate as
their removal was blocked when removing a group.

Change-Id: I0a3bbb91d0df2693e1ec7e89276c8714636a34ad
Fixes: 28670320
2016-05-09 22:22:33 -04:00
Selim Cinek
b745a89c1f Merge "Fixed an issue where clearing transient views could ANR" into nyc-dev 2016-05-09 23:33:15 +00:00
Adrian Roos
181385ce33 Keep RemoteInputView visible when focused
Scrolls the NotificationStackScrollLayout in response to movement
to ensure that the focused view stays visible. Also makes sure that
the action list is always aligned at the bottom of the notification
to avoid jank during this scrolling when the height changes.

Fixes: 28193862
Fixes: 26919632
Change-Id: I911a873367fe26eafd9fae4bca4e693d0827eba7
2016-05-09 23:30:26 +00:00
Selim Cinek
3e04c56432 Merge "Fixed a crash with min-priority notifications in a group" into nyc-dev 2016-05-09 23:19:28 +00:00
Selim Cinek
81f26d332c Fixed an issue where clearing transient views could ANR
It could lead to an infinite loop because it was called on
the wrong view.

Change-Id: Ie8008114474eccf2c0a4b930a5299eb6be1247c1
Fixes: 28634521
2016-05-09 18:54:10 -04:00
Selim Cinek
06416b9e57 Fixed a crash with min-priority notifications in a group
Those notifications could get into a group with higher priority
because they were autobundled or if the app said so.
This could lead to invisible views on the lockscreen and a crash
when this happened in an animated fashion.
The bug was triggering old code that wasn't needed anymore that
removed the viewstate.

Change-Id: Ic86c2f03d55f2e98e352cdbfbb3ca80d8e676765
Fixes: 28611831
2016-05-09 16:43:37 -04:00
Selim Cinek
f9f48ecd4c Merge "Fixed a concurrent modification crash" into nyc-dev 2016-05-09 20:42:53 +00:00
TreeHugger Robot
ed47cf23e8 Merge "Fixed a bug where notifications could become orphaned" into nyc-dev 2016-05-09 20:33:14 +00:00
Selim Cinek
319eecff96 Merge "Fixed a bug where the statusbar could become empty" into nyc-dev 2016-05-09 19:02:56 +00:00
Selim Cinek
fa2dc63505 Merge "Fixed a bug where Notifications could overlap" into nyc-dev 2016-05-09 19:02:31 +00:00
TreeHugger Robot
8a111f5f20 Merge "Change ForcedResizableInfoActivity to handle config. changes" into nyc-dev 2016-05-09 18:22:15 +00:00
TreeHugger Robot
2d8ef7fcd5 Merge "Import translations. DO NOT MERGE" into nyc-dev 2016-05-09 18:18:06 +00:00
TreeHugger Robot
e3e8eeaa7f Merge "Autobundle all notifications; don't leave the most recent one free." into nyc-dev 2016-05-09 18:04:22 +00:00
Selim Cinek
c0b14b0e89 Fixed a concurrent modification crash
Because notifications could become isolated when
the group is suppressed it could lead to concurrent
modifications while looping.

Change-Id: Ifd4fe0cc24110455de0d3edf2da0be0773eb8c67
Fixes: 28652038
2016-05-09 13:13:58 -04:00
Selim Cinek
52941c5618 Fixed a bug where notifications could become orphaned
When a child got set not be a heads up after it was already
removed (When for example it was clicked on shortly after
it got posted) then it got orphaned leading to bad bugs
like the next notification not being visible. This
could happen often with WhatsApp who set the head up flags
on the summary instead of the children.

Change-Id: I52c8f5d9bc50080e4ece530255236d36f998372e
Fixes: 28565942
2016-05-09 13:13:56 -04:00
Jaewan Kim
ccb85eb411 Merge "Fix recents row blinking when PIP is focused" into nyc-dev 2016-05-09 17:05:54 +00:00
Jason Monk
d4bdf9ca7c Merge "QQS: Fix ripple clipping" into nyc-dev 2016-05-09 13:20:20 +00:00
Bill Yi
1d51db6ba8 Import translations. DO NOT MERGE
Change-Id: Ia3e265610e5f562a0acfe849e2c7473f2bd44594
Auto-generated-cl: translation import
2016-05-09 06:14:28 -07:00
Wale Ogunwale
3840c88938 Change ForcedResizableInfoActivity to handle config. changes
This created extra churn in the system during resize due to
the activity relaunching.

Bug: 28614747
Change-Id: I148b6fca3dad7e10c90085a04bccb99587397912
2016-05-07 14:13:52 -07:00
TreeHugger Robot
638a6e8140 Merge "Fixed connectivity state in some restricted network scenarios." into nyc-dev 2016-05-06 23:25:30 +00:00
TreeHugger Robot
522a437786 Merge "Don't persist selection after restore." into nyc-dev 2016-05-06 22:11:14 +00:00
Felipe Leme
d31a97fd83 Fixed connectivity state in some restricted network scenarios.
NetworkPolicyManagerService (NMPS) keeps an internal list of uid
rules (mUidRules) for network restrictions, and when these rules
changes it needs to notify external listeners (such as
ConnectivityService / CS).

Prior to Android N, both Data Saver mode (the feature previously known
as "Restrict Baground Data") and Battery Save mode used the same set of
firewall rules to implement their restrictions: when Battery Saver mode
NPMS would mark all networks as metered and set the proper firewall
rules externally.

Recently, these 2 modes were split in 2 distinct firewall rules and
NMPS.updateRuleForRestrictBackgroundLocked() was changed to update
the mUidRules logic based on the Data Saver firewall (since the Battery
Saver firewall changes are handled externally, on
updateRuleForRestrictPowerLocked()). As such, CS was not notified when
the power-related changes were made, which would cause apps to get a
state of CONNECTED / CONNECTED when querying its active connection.

Another scenario that is not properly handled is when a UID whitelisted
for Data Saver is brought back to foreground: although the proper
firewall rules are set, CS is not notified, and the apps state would be
DISCONNECTED / BLOCKED.

This CL introduces many changes that fix this issue:

- Fixed updateRuleForRestrictBackgroundLocked() to invoke
  onUidRulesChanged() when the Battery Saver status changed.
- Fixed updateRuleForRestrictBackgroundLocked() to invoke
  onUidRulesChanged() when an app whitelisted for Data Saver is brought
  back to the foreground.
- Added a new API (onRestrictPowerChanged() and getRestrictPower())
  to notify external services about Battery Saver mode changes.
- Fixed CS logic to properly handle the Battery Saver changes.

Externally to this change, the CTS tests were also improved to verify
the apps get the proper connection state; they can be verified running:

cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests \
    -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests

BUG: 28521946

Change-Id: I8eaccd39968eb4b8c6b34f462fbc541e5daf55f1
2016-05-06 14:53:50 -07:00
Sid Soundararajan
4fd98d1f09 Merge "Reset Cards as they come into view" into nyc-dev 2016-05-06 21:16:56 +00:00
Winson
27c28f8da2 Fix exception when docking task.
- If a task fails to dock, animate the stack back to original state so 
  that the layout is not stuck in a "docked" state.

Bug: 28577229
Change-Id: If927b898a48cd5949764cb3b0c0798d22efd850a
2016-05-06 20:51:55 +00:00
Winson Chung
7e2d589ce0 Merge "Disabling movement of entire affiliated task set." into nyc-dev 2016-05-06 20:50:13 +00:00
Keisuke Kuroyanagi
a423e2535b Merge "Fix: Cannot control ime_switcher and menu after resetting." into nyc-dev 2016-05-06 19:52:48 +00:00
Steve McKay
99544dd0f4 Don't persist selection after restore.
Bug: 28469988
Change-Id: I1fec774d8ebdec13b33262d7fe8e17fccd84b657
2016-05-06 12:27:49 -07:00
Sid Soundararajan
061f81e7b0 Reset Cards as they come into view
This will ensure that they are in the correct configuration. Needed since
recycler view will be re-using views.

BUG:28632740
Change-Id: Icdaa48696e198cfeb8c37718fec05f7f9b195842
2016-05-06 11:55:25 -07:00
Winson
6976f7bae9 Disabling movement of entire affiliated task set.
- This CL removes the dependency on the last-active-time of the task
  record, since that is dependent on the current system time (which can
  be changed by the user).  Instead of working around the previous
  behavior in ActivityManager which moves all affiliated tasks to the
  top when one task is launched, we change the behavior in the AM
  directly, and prevent re-sorting the list of recent tasks improperly
  (aside from the stable sort which puts the freeform tasks first).

Bug: 27398177

Change-Id: I9fa9b3497d08082fe00aa724538255de87e746d6
2016-05-06 18:53:05 +00:00
Jason Monk
4987524b27 QQS: Fix ripple clipping
Change-Id: Ib29265ca582e8563277466edefb32b0a5c852b2f
Fixes: 28175282
2016-05-06 14:44:25 -04:00
Jason Monk
5df0ee53ac Merge "QS Header: remove collapsed alarm ripple" into nyc-dev 2016-05-06 18:36:00 +00:00
TreeHugger Robot
5d6a218d9e Merge "Dismiss docked stack if an activity is shown on top of the lock screen" into nyc-dev 2016-05-06 18:30:23 +00:00
Keisuke Kuroyanagi
47bd7333e1 Fix: Cannot control ime_switcher and menu after resetting.
mButtonDispatchers contains ButtonDispatcher for ime_switcher and menu;
however, in #inflateButton, we tried to find ButtonDispatcher for
menu_ime, which is a FrameLayout containing ime_switcher and menu.
Therefore, after #clearViews and #inflateLayout, ime_switcher and menu
KeyButtonView are not in the corresponding ButtonDispatchers.
It means NavigationBarView#getImeSwitchButton and
NavigationBarView#getMenuButton returns empty ButtonDispatcher.
As a result, we can't control ime switch button and menu button via
NavigationBarView after then.  e.g. We can't control ime switch button
visibility.

This CL fixes that issue by calling #addToDispatchers recursively for
ViewGroup children if corresponding ButtonDispatcher is not found.  This
behavior is aligned with #addAll.

Bug: 28580774

Change-Id: Ibe724753390b7bbb395a6d53d00bc6d06d00aa9a
2016-05-06 10:49:54 -07:00
Jorim Jaggi
3273f31c40 Also notify divider when getting DockedTopTaskEvent
Under some circumstances we never go through the activity lifecycle
if we call startActivity before it gets stopped, so we never notified
the divider about that we have drawn.

Bug: 28531536
Change-Id: I6a13527d52bf40a87f89de4b2799bd0833c6612a
2016-05-06 17:20:59 +00:00
Wale Ogunwale
9973294080 Dismiss docked stack if an activity is shown on top of the lock screen
It is risky/complicated to try to put the activity showing on-top of
the lock screen in the right fullscreen configuration with the current
architecture. So, we just dismiss for now.

Bug: 28195260
Change-Id: I29a0350993ce8fe548d4a465b06d877cde151c78
2016-05-06 10:13:14 -07:00
TreeHugger Robot
450f91b529 Merge "Quicksettings accessibility." into nyc-dev 2016-05-06 15:40:01 +00:00
Steve McKay
9a76143ef5 Merge "Fix regression, show internal storage option..." into nyc-dev 2016-05-06 15:07:50 +00:00
Julia Reynolds
892a253432 Autobundle all notifications; don't leave the most recent one free.
Change-Id: I0c30e34d09852673a475392411d0bb8fdc2f7aa3
Fixes: 28615503
2016-05-06 10:24:39 -04:00
Julia Reynolds
20aef8a291 Quicksettings accessibility.
Bug: 15696340
Change-Id: I6887e2dad4822911d3a1642aaec5703174b57330
2016-05-06 10:24:38 -04:00
TreeHugger Robot
b8dd0c3786 Merge "Import translations. DO NOT MERGE" into nyc-dev 2016-05-06 14:15:15 +00:00