Commit Graph

6000 Commits

Author SHA1 Message Date
Oren Blasberg
93c195894d Show cascading popup menus if screen is big enough.
...even if in split screen mode.

Bug: 28175404
Change-Id: I63ff60090e299e48f2273477dc3b820d4d95db8d
2016-04-25 15:58:46 -07:00
Joe Onorato
d2bc2ba778 Add the wall clock time to dumpsys cpuinfo so it's easier to correlate with the logs.
Bug: 28113068
Change-Id: Ifa90192b0aa3f57ba6928f38199beb5b56bca7e6
2016-04-19 11:27:11 -07:00
Samuel Tan
e749cd3b15 Merge "StateMachine: reset LogRecords.mOldestIndex in LogRecords.setSize" into nyc-dev 2016-04-19 17:25:33 +00:00
Jeff Sharkey
89fa73fd7a Merge "Unlock should always wait for pending PRE_BOOT." into nyc-dev 2016-04-19 17:11:20 +00:00
Adam Lesinski
0d47f4b646 Merge "BatteryStats: Introduce Async external stats requests" into nyc-dev 2016-04-18 23:27:10 +00:00
Adam Lesinski
6cc31990fc Merge "Use Activity resources in DecorContext" into nyc-dev 2016-04-18 22:23:43 +00:00
Jeff Sharkey
84a4c971c4 Unlock should always wait for pending PRE_BOOT.
While processing an unlock request, we might go async to handle
long-running operations like dispatching PRE_BOOT_COMPLETED.  This
change ensures that all unlock requests for a particular user wait
in line behind any pending async operations.

Without this CL, any subsequent unlock requests would immediately
return successful, even though PRE_BOOT_COMPLETED events were still
being processed.

Bug: 28240584
Change-Id: I307d6aaebfb8f38028f3666a2e19e4399b7cf3a7
2016-04-18 15:38:35 -06:00
Chris Craik
c79c3246c9 Merge "Improve multi-window render clipping logic" into nyc-dev 2016-04-18 19:40:50 +00:00
Adam Lesinski
ff22a56ef8 Use Activity resources in DecorContext
We use the application context in DecorContext to avoid holding a reference
to the Activity. However, the resources don't match the Activity's in a multi-window
world, so we use the resources from the Activity, which  get updated as the Activity
goes between multi-window states. This avoids holding a reference to the Activity.

Bug:28096052
Change-Id: I2804f2420afad6dcecc56e5dece008c390540d72
2016-04-18 12:14:12 -07:00
Chris Craik
9cd1bbe5c9 Improve multi-window render clipping logic
Fixes: 28125010

Restructures 'scene defer', to implement window backdrop overdraw
avoidance in new render pipeline, and disable clipping to content draw
bounds.

Also restructures FrameBuilder's constructors, to separate out into
multiple defer methods.

Change-Id: I53facb904c1a4a4acc493d8a489921a79a50494e
2016-04-18 10:39:02 -07:00
Narayan Kamath
a09b4d2a61 Remove unnecessary allocation+unboxing of objects.
Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
2016-04-18 09:55:59 +01:00
Adam Lesinski
010bf374d8 BatteryStats: Introduce Async external stats requests
Instead of calling out to external processes with a blocking IPC,
pass along a Binder on which the external process can pass back
the response. The calling process can then wait for the reply with
a timeout.

This eliminates watchdog restarts of the system_server when an external
process like telephony or bluetooth hangs.

Bug:26842468
Change-Id: I1b242e4ed22a63f1a4a0be8c78de8ac4d7bf56c5
2016-04-15 15:27:52 -07:00
Samuel Tan
2326e9b21c StateMachine: reset LogRecords.mOldestIndex in LogRecords.setSize
Reset LogRecords.mOldestIndex when we resize LogRecords with
LogRecords.setSize(), so that LogRecords.get() will use the
correct index to fetch log records.

BUG: 28214608
Change-Id: I58d94d9fe61af6a0e9cba224ff98aad36eb3cd1d
2016-04-15 14:17:42 -07:00
Jorim Jaggi
681fc7b267 Fix wrong transition when dock minimized and docked app launched
When having an app docked and then going home, and then launching
the app from the homescreen, we had a wrong transition because
getTopMost task was already set to the launched app, because
getRunningTasks doesn't exclude the docked stack. Instead of adding
flags for getRunningTasks, which sounds risky, we just pass a "force"
value when we launch recents in this state.

Bug: 27154882
Change-Id: Iee4512fed13115dbbe8b74413ff1fa9b87afa0ef
2016-04-15 19:23:05 +00:00
Benjamin Franz
f02420c5e1 Maybe decrypt user when quiet mode is disabled
When quiet mode is disabled for a user and that user is not currently
decrypted, we show a confirm credentials screen to trigger decryption
of that user. Only if that was successful, do we actually disable quiet
mode.

Bug: 27764124
Change-Id: Ib1f649194d89e225dad62c14f3ddba1fa3d79da2
2016-04-15 14:12:41 +01:00
Andrii Kulian
5981b8c2e8 Merge "Remember task which is being locked" into nyc-dev 2016-04-15 04:32:57 +00:00
Andrii Kulian
0f051f5abd Remember task which is being locked
We need to remember task which requested to be locked
because we can accidentally lock another task after
user interacts with pinning request dialog.

Bug: 27876860
Change-Id: Ie8e607df4380dd33ea9b3474afc247b02e31de07
2016-04-14 19:26:18 -07:00
Joe Onorato
9a916e5602 Merge "Add support for null tag names from apps." into nyc-dev 2016-04-14 21:10:16 +00:00
Oren Blasberg
203222ea60 Merge "Don't show icons in overlay popup menus." into nyc-dev 2016-04-14 20:34:54 +00:00
Amith Yamasani
0d723a2a4d Merge "Multi-window assist callback" into nyc-dev 2016-04-14 19:06:40 +00:00
Joe Onorato
388fc336b3 Add support for null tag names from apps.
For Wakelocks and syncs there is no requirement that an app actually
supply a tag/name.  Jobs will always have system-supplied tags.

Bug: 26276001
Change-Id: Ie3b8e48a395de1506a2f15d5b9c9eab726bc6d0a
2016-04-14 11:46:56 -07:00
Oren Blasberg
3610d06239 Don't show icons in overlay popup menus.
This was a "regression" in CascadingMenuPopup specifically.
We now check for the overflow case and don't show icons.
This preserves the behavior from Marshmallow.

Bug: 28026351
Change-Id: Ifbc9a20b0dadd19ef7b727023b1b0cfa45ebf993
2016-04-14 11:14:09 -07:00
Alan Viverette
8bb7ad5985 Merge "Add scroll indicators to resolver list" into nyc-dev 2016-04-14 01:45:35 +00:00
Amith Yamasani
e8222e551f Multi-window assist callback
Introducing a new callback in VoiceInteractionSession to
provide assist data for additional activities in the
foreground in a multiwindow setup.

PIP, docked windows and free-form windows (top-most)
will be queried for assist data and passed through the
new API to the Voice Interaction service.

Bug: 27718385

Change-Id: Ib4427c304611b75c2078dcb54f1f7e47ae7d9cfa
2016-04-13 17:12:29 -07:00
TreeHugger Robot
c142a8c43f Merge "StrongAuthTracker: Don't rely on USER_PRESENT" into nyc-dev 2016-04-14 00:04:54 +00:00
Adrian Roos
4ab7e595a5 StrongAuthTracker: Don't rely on USER_PRESENT
USER_PRESENT is sent via the background queue. A delay
there can cause us not to recognize that the user has
unlocked and prompt for the credential again, when trust
or fingerprint would be sufficient.

Also removes an obsolete reference to USER_PRESENT from
TrustManagerService.

Change-Id: Ie8d1a180170df5f0c8f9e71660504fd71eeacd99
Fixes: 27830458
2016-04-13 15:38:18 -07:00
Adam Powell
651e09fdc1 Merge "Make ResolverActivity respect selector intent when making filters" into nyc-dev 2016-04-13 21:35:33 +00:00
Wale Ogunwale
3fb1c81394 Merge changes Ieefeb843,Ic2a94b09 into nyc-dev
* changes:
  Update surface insets on window elevation changes.
  Fixed bug with cropping out drop shadow for pinned stack.
2016-04-13 16:59:36 +00:00
Henrik Engström
3277cf1ea4 Make ResolverActivity respect selector intent when making filters
When the ResolverActivity makes a filter after an intent is chosen,
either for remembering last used or an "always use" choice for the
user it doesn't consider the selector in the intent if present.

This means that when a resolver activity is launched for an intent
with a selector, the selector is used for resolving preferred
activities, and for populating the list, but when the same intent
is sent again it doesn't match the filter created by the previous
ResolverActivity.

This in turn means that the user will get another ResolverActivity
even if "Always Use" was chosen the last time.

Bug: 28129216

Change-Id: I29be7010e7c890caf9789673b3c3f821ba362761
2016-04-13 08:45:29 -07:00
Alan Viverette
b0e22ecf7d Add scroll indicators to resolver list
Also reformats resolver list XML.

Bug: 27431395
Change-Id: I582448a01747b29fc6ac61dd80e27e6679507a81
2016-04-13 10:23:35 -04:00
TreeHugger Robot
d1b8d6d342 Merge "Set label for links to resolver activities." into nyc-dev 2016-04-13 00:12:39 +00:00
Philip P. Moltmann
f8173ca8ac Set label for links to resolver activities.
Also: Add specific labels for capture-image-intent.

Fixes: 20134921
Change-Id: I3678def1089512a8340f19110645a03379c26cee
2016-04-12 15:44:00 -07:00
TreeHugger Robot
5dc3c674a2 Merge "Add some tests for procstats, and fix some bugs that the tests uncovered." into nyc-dev 2016-04-12 21:38:10 +00:00
Andreas Gampe
1ef8aef260 Frameworks/base: Add no-thread marking to zygote
Use ZygoteHooks code to mark zygote initialization to not be
allowed to create threads. This is helpful when new classes are
found to be used by apps but cannot be preloaded as they spawn
threads.

Bug: 27248115
Change-Id: I1dc3620d9e7d0054c672b993d89459fc4b353dfc
2016-04-12 21:04:35 +00:00
Joe Onorato
65adfeecd2 Add some tests for procstats, and fix some bugs that the tests uncovered.
Bug: 27045736
Change-Id: Ia910730c5a3a899c89aa63dd7ab48be62cf9cfef
2016-04-12 13:13:41 -07:00
Adrian Roos
c1a80b08f0 Notification MessagingStyle: Add handset views
Bug: 27250207
Change-Id: I499cf2beaeeb34f0f189815fc0911f3b8954bd50
2016-04-12 11:52:49 -07:00
Jorim Jaggi
971d8e6399 Don't remove background when resizing
This leads to flickers, as we should not draw in a translucent way
if we didn't specify that our window is translucent, because the
renderer has some about translucency.

Instead, we should clip the backdrop content by the inverse of the
content clip rect, which is not yet implemented.

Bug: 28009524
Change-Id: Ia3f54fb83997ace863e78ff1cbe45cfb64f92f26
2016-04-12 18:14:14 +00:00
Yuichi Biwa
66e495e647 Fix: ResolverActivity sometimes cannot update the last chosen activity
Symptom:
Calling startActivity() with an implicit intent,
ResolverActivity displays preferred activity candidates.
At first user selects one of them as "JUST ONCE".
And next, the last one is shown again on the top with "JUST ONCE" and
"ALWAYS".

But even if user selects another ones except top with "JUST ONCE".
Next time, the last one is not shown on the top.
Instead of that, first one still remain on the top.

It means that user can't select activities as "ALWAYS"
except first one.

Root cause:
The implicit intent has a URI but not MIME type.
In this case, Intent#resolveTypeIfNeeded returns "null".
So MIME type is not passed to PackageManagerService.
That's why this issue happens.

Change-Id: I87b6da9c5d8b47e071bbedf9f7d5f3ecea730875
2016-04-12 09:18:20 -07:00
Mihai Niță
e544d408c0 Merge "Use DisplayNameWithDialect only for some locales" into nyc-dev 2016-04-12 04:56:05 +00:00
Mihai Nita
1b2e7adc88 Use DisplayNameWithDialect only for some locales
Although DisplayNameWithDialect seems to return friendlier, more
"casual" names (e.g. "American English"), the result was inconsistent,
and (at times) debatable. And since this setting affects not only
the language of the translation, but a locale, names like "Flemish"
kind of lost the whole "locale / location" idea.

So we revert to use DisplayName for all but a few selected locales
(that we verified are better with the "dialect" form).

Bug: 27704583
Change-Id: I587081da1293cccac3cdabcd188a9b8160c233ea
2016-04-11 16:13:54 -07:00
Yohei Yukawa
b1e2f4fc3a Shift+Meta+Space should reverse-rotate subtypes part 2.
This CL adds JavaDoc to clarify what previous CL [1] wanted to do.
No behavior change is intended in this CL.

 [1]: I3694edd80be6dfe18b90360e24ae4d451b331928
      d39ae85482

Bug: 25753404
Bug: 28103839
Change-Id: I246223c0856382d68323f22987b998cd1613e98c
2016-04-11 13:38:36 -07:00
Alan Viverette
76961ccc52 Merge "Revert "Add scroll indicators to resolver list layouts"" into nyc-dev 2016-04-11 17:57:59 +00:00
Lorenzo Colitti
b89d33ee44 Merge changes Ic2c84de7,I379aef92 into nyc-dev
* changes:
  Remove duplicated code in NetworkStateTrackerHandler.
  Improve Tethering and NativeDaemonConnector logging.
2016-04-11 14:27:31 +00:00
Alan Viverette
cc329e0cfe Revert "Add scroll indicators to resolver list layouts"
This reverts commit 81181dc356.

Change-Id: Ib5003bb131402bef007ce8025afcdb4a8f620541
2016-04-11 13:42:18 +00:00
Lorenzo Colitti
cd63d247f0 Improve Tethering and NativeDaemonConnector logging.
1. Deduplicate the Tethering message numbers, and use MessageUtils
   to convert them to strings.
2. Add a warning to NativeDaemonConnector when an unsolicited
   event is more than 500ms late or takes more than 500ms to
   process.

Bug: 27857665
Change-Id: I379aef9257027d1ccf30906e79c6389ef1f95420
2016-04-11 17:40:21 +09:00
Jeff Sharkey
2e3ce4ca46 Merge "Use inode numbers for CE storage." into nyc-dev 2016-04-11 06:12:37 +00:00
Jeff Sharkey
f06de20835 Merge "Relax SparseMappingTable Slog.wtf()." into nyc-dev 2016-04-11 05:50:41 +00:00
Jeff Sharkey
04b70fc63a Relax SparseMappingTable Slog.wtf().
When it's triggered, it happens with such frequency that it can DoS
the system server.

Bug: 28104329

Change-Id: I5c58e5f5bf4d88af2cb6215bcfddf35704e22eaa
2016-04-10 23:46:12 -06:00
Jeff Sharkey
4288419787 Use inode numbers for CE storage.
Certain operations, such as clearing/destroying app data, or just
counting on-disk size, require us to know the CE storage directory
of a particular app.  To facilitate these operations, offer a method
to get the inode of a CE directory, and accept that inode number
for later operations.  Collect and store the inode number in
PackageUserState for future use when that user's CE storage is
still locked.  This design means it's safe to clear/destroy app
data in both CE/DE storage at the same time.

Move most installd-related methods to a uniform calling convention
that accepts a single parent PackageParser.Package, and internally
fans out to handle all "leaf" packages under that parent.

In previous releases, we started installing apps using a new
directory-based layout, where all app code, unpacked native libraries,
and optimized code is bundled together.  So now we only have a single
path to measure for code size.  This fixes several outstanding bugs
that were causing sizes to be miscounted for apps supporting multiple
architectures.

Fix a subtle bug in PackageSettings that would cause "notLaunched"
to be parsed incorrectly.

Bug: 27828915, 27197819
Change-Id: Ia582cf3550553292bde4bb4313367111332913ec
2016-04-10 23:26:09 -06:00
Yohei Yukawa
d39ae85482 Shift+Meta+Space should reverse-rotate subtypes.
This is a follow up CL to my previous CL [1], which added a new key
binding Meta+Space to rotate enabled IME subtypes.  With this CL,
Shift+Meta+Space starts reverse-rotating enabled IME subtypes as
originally planed.

 [1]: I4005692215edfcf8bed3e86b1e07000148f986f5
      ae61f7118a

Bug: 25753404
Bug: 28103839
Change-Id: I3694edd80be6dfe18b90360e24ae4d451b331928
2016-04-10 20:28:40 -07:00