8015 Commits

Author SHA1 Message Date
John Spurlock
b2278d6571 An update on Downtime.
The update is that Downtime is obsolete.  Replaced by the
ability to define multiple named schedule calendars.

 - Make changes to ZenModeConfig to properly model manual
   and automatic rules.
 - Refactor the zen mode helper (and supporting classes) to
   properly handle / report multiple claims on zen mode.
   The "manual" rule (specified by the user in the UI) vs
   one or more automatic rules.
 - Automatic rules are still backed by condition providers,
   but the layering is now cleaner.  ConditionProviders is now
   completely generic, has no ties to zen mode.
 - Specifically, the new layering for zen mode (below noman) is:
   ZenModeHelper: Source of truth for zen state
     ZenModeFiltering: Subhelper dedicated to filtering rules.
     ZenModeConditions: Subhelper dedicated to managing automatic rules.
       ConditionProviders:  Underlying engine for reporting named boolean state.
 - Migration story for users with existing downtime config, migrated
   to a single new calendar named downtime.
 - For users with no existing downtime, two default calendars are created
   for weeknights + weekends (icu4j for all locales will be done in a followup).
 - Remove obsolete DowntimeConditionProvider/NextAlarmConditionProvider and tracking.
 - Clean up obsolete resources.
 - Add common zen summary description string computation.
 - Add proper noman wrappers for the new model.
 - Change the semantics of the global zen setting.  It is now read-only.  Setters
   must call noman, added a "reason" to all calls for better attribution.
 - Update zenmodepanel + volumedialog to the new model.
 - Display the one or more automatic rules in the new zen footer summary.
 - "Snooze" the automatic rules when the user explicitly turns zen off.

Bug: 20064962
Change-Id: Idd9deb865a6035ad0cfae660198dccb517e6d7cc
2015-04-09 21:45:08 -04:00
Fabrice Di Meglio
7c6a34e64a Merge "Fix bug #20128771 All apps disappeared from app drawer after AAZ08 OTA" 2015-04-09 20:13:57 +00:00
Fabrice Di Meglio
53f35f4a20 Fix bug #20128771 All apps disappeared from app drawer after AAZ08 OTA
- relax a bit Intent resolution. We should still include Apps that
do not support Web domains :-) so in that context add in the result
list the Apps that are with a status INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED

Change-Id: Ibad7b7f577552ac75bba256bb387a75b83524958
2015-04-09 13:10:35 -07:00
Fabrice Di Meglio
c9d83fc2e0 Merge "Add IntentFilter auto verification - part 4" 2015-04-09 17:29:22 +00:00
Richard Uhler
a1b19b7b66 am 00ff42a0: am 7f757130: am f324d245: Merge "Reuse dexopt method for both dex2oat and patchoat."
* commit '00ff42a0ca9d17c4b7ee89d900cf86c9a25c00eb':
  Reuse dexopt method for both dex2oat and patchoat.
2015-04-09 14:51:13 +00:00
Richard Uhler
7f7571308d am f324d245: Merge "Reuse dexopt method for both dex2oat and patchoat."
* commit 'f324d245fdd07ac14ab312d1a5fa04a4e8dfcceb':
  Reuse dexopt method for both dex2oat and patchoat.
2015-04-09 14:31:10 +00:00
Richard Uhler
f324d245fd Merge "Reuse dexopt method for both dex2oat and patchoat." 2015-04-09 14:13:29 +00:00
Dongwon Kang
7a11a0e8c1 Merge "TIF: Update the input list even when a single component in a package is updated." 2015-04-09 03:35:04 +00:00
Dongwon Kang
31a8f8400b TIF: Update the input list even when a single component in a package is updated.
Bug: 20127116
Change-Id: I1aefaaba9076877cefc5cfdf36d3c6169c437b6d
2015-04-08 20:33:19 -07:00
Fabrice Di Meglio
7d014cec63 Add IntentFilter auto verification - part 4
- add domain verification priming at boot when the PackageManagerService
singleton is created. This will mainly set the domain verification status
to INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS for all Apps that
have an IntentFilter with action VIEW and data scheme HTTP or HTTPS.

- also optimize Intent resolution by taking into account Browser Apps

Change-Id: Id8e66c9759a99e79b07051595ca89a168dc5ae0e
2015-04-08 19:24:15 -07:00
Olawale Ogunwale
792ae33775 am 33a68a52: am 343e291b: am e8a3c320: Merge "Prevent windows from freezing screen while timeout"
* commit '33a68a521f77a2070832ece271d1047ecf56de7e':
  Prevent windows from freezing screen while timeout
2015-04-09 01:18:01 +00:00
David Christie
295a93b99f Add smallest displacement field to FLP HAL
Change-Id: I4d857256c035c65185be3be8401bec8d45091aaf
2015-04-08 17:33:38 -07:00
Olawale Ogunwale
343e291b67 am e8a3c320: Merge "Prevent windows from freezing screen while timeout"
* commit 'e8a3c320e658f6c7f8d1db3d8ad3c3f189c0f54e':
  Prevent windows from freezing screen while timeout
2015-04-09 00:32:45 +00:00
Wale Ogunwale
1c146c78af Merge "Throw caught DeadObjectException when trying to create a service." 2015-04-08 23:02:49 +00:00
Wale Ogunwale
bfac468ce9 Throw caught DeadObjectException when trying to create a service.
We don't want to continue trying to start the service if the service
appliction is dead. This will lead to an NPE later on since we have
set ServiceRecord.app to null in the finally block.

Bug: 5227987
Change-Id: I3ee5111f4a20d9455fedbf41ac54d41c43aa8d76
2015-04-08 16:01:24 -07:00
Fyodor Kupolov
49208d0b91 Merge "Replaced zeros with UserHandle.USER_OWNER" 2015-04-08 22:03:53 +00:00
tiger_huang
951e27f344 Prevent windows from freezing screen while timeout
The original logic lets windows be able to freeze screen again (by
setting win.mOrientationChanging=true) after WINDOW_FREEZE_TIMEOUT is
triggered before mInnerFields.mOrientationChangeComplete is set to
true. In this case, we would lose the protection of
WINDOW_FREEZE_TIMEOUT. If the app never finishes drawing the window,
the screen would keep freezing that the user cannot operate the
device.

Change-Id: I45a0a9e4b3f8d5b0b0043229bfa4890236ae8ab2
2015-04-08 16:10:04 +00:00
Olawale Ogunwale
219af75bce am ce5bdfea: am 380415b6: am 1bdbce29: Merge "[ActivityManager] Finish the failed-to-pause activity"
* commit 'ce5bdfea12657c1705d910a47cc48b65abc81723':
  [ActivityManager] Finish the failed-to-pause activity
2015-04-08 13:30:03 +00:00
Olawale Ogunwale
380415b643 am 1bdbce29: Merge "[ActivityManager] Finish the failed-to-pause activity"
* commit '1bdbce295cd7978e50b5444420ed222ec6c6281c':
  [ActivityManager] Finish the failed-to-pause activity
2015-04-08 13:09:42 +00:00
Olawale Ogunwale
1bdbce295c Merge "[ActivityManager] Finish the failed-to-pause activity" 2015-04-08 12:51:12 +00:00
louis_chang
047dfd40fd [ActivityManager] Finish the failed-to-pause activity
Symptom:
In some scenario, the mPausingActivity may be replaced by other
activity. When previous activity paused, the completePausedLocked()
won't be invoked because it is no longer the mPausingActivity. If
the activity is also pending to finish, it would never be done
because the activity kept in PAUSING state. Since the activity's
window also remain visible and is above on Wallpaper, user would
see it when back to home.

Solution:
Finish the failed-to-pause activity if the activity is pending to
finish.

A Real Case:
(1) Screen turn off
(2) The top activity T1 crashed
(3) When finish activity T1, the next top activity T2 will be
    scheduled to resume and pause (due to screen off).
(4) The activity T2 is also set to finishing due to T1 crashed.
(5) Before T2 paused and before paused timeout occurs, there has
    a new process started which brings up the next top activity T3
    to resume and pause. So the pausing activity is now replaced.
(6) When activity T2 paused, it cannot completed the pause operation
    T2 will remain in PAUSING and finishing state with its window
    visible. The process won't be killed because the oomadj stays
    at 1 (Visible).

Change-Id: Ib10fded891b21c774b26a93071c717fa50516e22
2015-04-08 16:35:55 +08:00
Jae Seo
9054431af3 Merge "TIF: Redefine time shift status and change callback and position APIs" 2015-04-08 04:42:36 +00:00
Jae Seo
465f0d6aa3 TIF: Redefine time shift status and change callback and position APIs
Also added/modified the documentation and addressed feedback from the
previous CL.

Change-Id: I046970cd0d2688886039d37a332bbe11bc5a4b0f
2015-04-07 17:34:39 -07:00
Fabrice Di Meglio
9f3f6000ed Merge "Add IntentFilter auto verification - part 3" 2015-04-08 00:30:37 +00:00
Fabrice Di Meglio
0788595e0c Add IntentFilter auto verification - part 3
- add private API PackageManager.getAllIntentFilters(String)
for getting all IntentFilters from a given package
- update IntentFilterVerificationInfo to use an ArrayList<String>
for domains instead of a String[]
- if you make an App a default domain handler then make the
others as non default
- create an IntentVerificationInfo even if the App IntentFilters
do not need to be verified. This would be done only if the App
has some domain URLs defined and would allow to make it the
default handler for a domain
- a few code optimizations here and there

Change-Id: I4535372a0bb1a2c8e662e1485be8ca700003e9b3
2015-04-07 17:13:32 -07:00
Adam Lesinski
0dfd7fba38 Merge "Adding per UID WiFi power distribution." 2015-04-07 23:51:17 +00:00
Vladislav Kaznacheev
17494017a6 Merge "Constrain 'touch modal' behavior to the activity stack." 2015-04-07 23:32:10 +00:00
Vladislav Kaznacheev
c7ad0a0cb0 Constrain 'touch modal' behavior to the activity stack.
Currently a 'touch modal' window grabs drag events
from the entire screen. Since 'touch modal' is the
default, this makes dragging between apps impossible.

This change allows such grabbing behavior only for
events that are still over the same activity stack.

Bug:19548858
Change-Id: I7d48b58e7fcb620521361e17cb70914913afae03
2015-04-07 16:30:06 -07:00
Nick Kralevich
550a901ce1 Merge "heapdump: use appendable file descriptor" 2015-04-07 23:28:32 +00:00
Nick Kralevich
8b0c61d378 heapdump: use appendable file descriptor
For heapdump functionality, there's no need to give apps
readable/writable file descriptors. An append-only file descriptor
is sufficient.

Bug: 20073185
Change-Id: Ib2c42a72b2704db5f1b919c24e33609f7a45e57a
2015-04-07 16:22:46 -07:00
Wale Ogunwale
07e1967cfc Merge "Fixed issue with prematurely removing display for child activities." 2015-04-07 23:03:02 +00:00
Wale Ogunwale
73eba74d11 Fixed issue with prematurely removing display for child activities.
When relaunching a parent activity we finish all its children and set
a 2sec timeout to clean up their tasks/stacks/displays if we don't
hear anything back. This time might not be sufficient for the client
activity to respond back in time depending on what else is happening
on the system and we might end-up prematurely removing its display
which will cause it to crash. In this specfic case, the client
activity which wasn't the focus activity was been relaunched with a
bunch of other activities due to a configuration change.

Instead of having a timeout for the clean-up we now let the activity
go through the normal clean-up process that occurs as it changes
states which will eventually clean-up the right states in a max.
time of 10secs (on destroy timeout) or sooner. This is in line with
activity cycle expections.

Bug: 17702043
Change-Id: I484124e07ad32b9056f75ec41af1dd7718488335
2015-04-07 14:41:53 -07:00
Wale Ogunwale
37c905e646 Merge "Fixed glitch in NuPlayer when surface size changes" 2015-04-07 20:50:25 +00:00
Wale Ogunwale
20fee4f657 Fixed glitch in NuPlayer when surface size changes
When VideoView calls setFixedSize(), the SurfaceControl.setSize()
gets called from WindowStateAnimator.setSurfaceBoundariesLocked,
but setSurfaceBoundariesLocked only updates the size, not the
transform matrix/scaling factor.

The after some time, SurfaceControl.setMatrix gets called by
WindowStateAnimator.prepareSurfaceLocked. It updates both size and
matrix (size update is skipped since it's already updated by
setSurfaceBoundariesLocked earlier). This corrects the transform
matrix, and restores video rendering.

We now call setMatrix() in setSurfaceBoundariesLocked() to avoid
the glitch.

Bug: 18773834
Change-Id: I5e8de38495fabe54eefa8bd3003627d11392c0f1
2015-04-07 13:35:25 -07:00
Fyodor Kupolov
75bff7cca0 Unnecessary dexopt in installPackageLI
When a new package is created, installNewPackageLI does not need to call
dexopt, since it has already been made.

Bug: 19550105
Bug: 20087446
Change-Id: If6b05bea590eea5f95efebb22a67ccd8cdf632c2
2015-04-07 13:34:40 -07:00
Xiaohui Chen
5ac3e1f48a Merge "fix a potential race condition" 2015-04-07 20:00:29 +00:00
Svetoslav
8aa6100002 Merge "Enable runtime permissions" 2015-04-07 18:59:07 +00:00
Adam Lesinski
e08af19fcc Adding per UID WiFi power distribution.
Change-Id: I88c539074607d7261f6c5cf1dbae47c3cf53f253
2015-04-07 11:37:10 -07:00
Fyodor Kupolov
77e46d214d am 6a17f601: Merge "Unnecessary dexopt in installPackageLI"
* commit '6a17f60166082227a5a644f9114db46a0ade73f0':
  Unnecessary dexopt in installPackageLI
2015-04-07 18:24:55 +00:00
Fyodor Kupolov
6a17f60166 Merge "Unnecessary dexopt in installPackageLI" 2015-04-07 18:03:35 +00:00
Wale Ogunwale
9581c4bc2c Merge "Revert "fix the flash caused by missing setMatrix() when surface size changes"" 2015-04-07 17:59:31 +00:00
Wale Ogunwale
4c8b7953f9 Revert "fix the flash caused by missing setMatrix() when surface size changes"
This reverts commit 7f97af11fba6a18ee6bc022f7197319ce54fa46f.
Change broke screen_on functionality when an alarm goes off.

Bug: 20096335
Bug: 18773834
2015-04-07 10:49:40 -07:00
Olawale Ogunwale
bde7e467ac am d229f442: Merge "Add a timeout state to frozen windows"
* commit 'd229f442d5b8c2e600eaa4daeec0e771631ed83d':
  Add a timeout state to frozen windows
2015-04-07 17:35:53 +00:00
Xiaohui Chen
ab7f01d51b fix a potential race condition
Currently worker threads in computeBestConfiguration may NOT completely
finish before timeout.  But the code will start using the result while
the worker threads are still working on the same object.  This may
cause exceptions.

b/19966623

Change-Id: I62ffcb796d648891ee339b6a978f575ebad8352b
2015-04-07 10:34:36 -07:00
Jean-Michel Trivi
7f7e1d13c0 Merge "Log dump time of MediaFocusControl" 2015-04-07 17:00:47 +00:00
Jean-Michel Trivi
545fcf8d11 Log dump time of MediaFocusControl
Add time at which the audio focus stack was dumped to help read
  bugreports.

Change-Id: I31a8220308770e597a328b1a546d4bcc0f7ae226
2015-04-07 09:45:35 -07:00
Craig Mautner
30b8984903 Merge "No longer unlock activity manager to test whitelist" 2015-04-07 16:17:57 +00:00
Craig Mautner
e56007786a No longer unlock activity manager to test whitelist
In order to check the DevicePolicyManagerService locktask whitelist
the activity manager had to release its lock preserving internal
state. That is undesirable and not scalable now that we need to check
the whitelist at startup for bug 19995702.

This change causes DPMS to update activity manager with the whitelist
whenever it changes so that activity manager can check the whitelist
without releasing the acitivty manager lock.

Change-Id: I3ed6eb5ceae2cd7e7ae3280abd708d5ce43a2851
2015-04-07 09:15:41 -07:00
Craig Mautner
3aacbbc025 Add a timeout state to frozen windows
When an activity stops drawing following a rotation the rotation
screenshot would become stuck on top of all the other windows. The
timeout was being acknowledged but mWindowsFreezingScreen was set to
true which kept stopFreezingDisplayLocked() from dismissing the
screen rotation animation.

By changing mWindowsFreezingScreen from a two state variable to a
three state variable, including a timeout state we allow
stopFreezingDisplayLocked() to continue and dismiss the screen
rotation animtion.

This change also reduces the APP_FREEZING_TIMOEOUT from 5 seconds to
2 seconds.

Bug: 15664090

Change-Id: Ida5aca002a82ec8fe1ea99f0ced814c5c8f01a95
2015-04-07 09:14:36 -07:00
Olawale Ogunwale
8d1db149b6 am 5b652282: am a9418c24: am 8928c727: Merge "[ActivityManager] Improve task order of getRunningTasks."
* commit '5b65228224e941b5c26f985d6d0e0ce61068b6d6':
  [ActivityManager] Improve task order of getRunningTasks.
2015-04-07 13:22:56 +00:00