Commit Graph

5973 Commits

Author SHA1 Message Date
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
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
Jorim Jaggi
19cf297258 Disable snap targets that make apps <220dp
- Make minimal task size 220dp.
- Disable upper and lower targets if they result in less
than 220dp task size.
- If even the middle target doesn't allow 220dp task size,
disable entering split screen altogether.

Bug: 26451260
Change-Id: I06e358c9b3da0172c5def75cdadf975f87f9fa57
2016-04-09 00:02:49 -07:00
Jorim Jaggi
8f5701bd9f Only force drawing status bar background if target >= N
Since forcing it all the time has the potential of breaking
compatibility with apps, we don't want to do this.

Instead, we only force it if the app targets >= N.

We communicate this to window manager with
PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND.

We introduced this for 2-up split-screen. If we have an app
that doesn't draw the status bar background by itself, we
just force the whole bar to be black.

The same applies for windows that used translucent status
bar - we also force the whole bar to be black

Bug: 27285627
Change-Id: I7f1ceaa364f8a4e851935f77aa5e8d913bf11791
2016-04-08 20:49:20 -07:00
Jorim Jaggi
b2005a0217 Fix BackdropFrameRenderer leak
Make sure to stop the thread when the window gets detached. When dismissing
the docked/fullscreen stack with the divider, we stop the activity while
we are still in resizing mode.

Bug: 28054032
Change-Id: I2d5d0ffaa9bc47e4d5252414b9a045beaebb7a69
2016-04-09 01:07:34 +00:00
Joe Onorato
e93fecf9a3 Merge "This assert is triggering when it shouldn't be. Disable it for now." into nyc-dev 2016-04-08 21:12:06 +00:00
Adam Powell
fe5e1a75c1 Merge "Chooser filtering and caller direct share targets" into nyc-dev 2016-04-08 19:20:25 +00:00
Phil Weaver
ab4d5ffd12 Merge "Eliminate side effects of a11y window title." into nyc-dev 2016-04-08 18:22:02 +00:00
Adam Powell
52c39215db Chooser filtering and caller direct share targets
Let apps invoking the system chooser specify components to filter out
such as themselves; this will prevent duplicate nonsensical UX where
it doesn't make sense for an app to share to itself.

Similarly, let apps provide their own Direct Share targets for when
they do want to let users share via their own internal services in the
same UI. These options can be used together.

Also fix a bug where a lingering binder reference from a remote
ChooserTargetService that hasn't been GC'd in the remote process could
keep an active reference to a ChooserActivity instance.

Bug 28073484

Change-Id: Ib613b1153b49dfedf79574b1af7c45379eceec24
2016-04-08 08:40:38 -07:00
Rubin Xu
1b2300b065 Merge "Relaunch previous activity after turning work profile on" into nyc-dev 2016-04-08 09:20:46 +00:00
Oren Blasberg
7ce082a462 Merge "Fix top level menu lingering when submenu opens." into nyc-dev 2016-04-07 22:43:18 +00:00
Wale Ogunwale
246c209e4f Update surface insets on window elevation changes.
Window manager factors in the surface insets when calculating the
right crop for a window surface. Without the surface insets been
updated and new param forwarded to window manager, the window crop
will not be the right size and the window drop shadow might not show.

Bug: 27364161
Change-Id: Ieefeb8435543f3137672a065269cdeefca371111
2016-04-07 15:22:49 -07:00
Phil Weaver
9be3c7bdc7 Eliminate side effects of a11y window title.
ag/898112 added passing the window title to accessibility. To do that,
it also updated copy of the title in WindowManager.LayoutParams. That
was a behavior change, and the change broke cts tests that enforce that
the title in LayoutParams matches its expected format.

This change restores the previous behavior and adds a separate field to
LayoutParams to old an up-to-date title to pass to accessibility.

Bug: 28002185
Change-Id: Ia5b549113600b7c4fcc80b76c3f3a944dddaf483
2016-04-07 15:15:41 -07:00
Joe Onorato
08274740cd This assert is triggering when it shouldn't be. Disable it for now.
The check for sequence numbers is triggering when ProcessStats
is accessed after being read from a parcel.  Turn off the check
for now.

Bug: 27045736
Bug: 27960286
Bug: 28039193
Bug: 28021719
Bug: 27960286
Change-Id: I7438441135fd1e9ce01350034262451309165525
2016-04-07 14:24:59 -07:00
Rubin Xu
e420c550ee Relaunch previous activity after turning work profile on
When work profile is turned off, attempts to start work app activity is
intercepted and redirected to an information dialog, which gives the
option to turn work profile back on. When the user does turn it back on,
the original activity should be relaunched.

Bug: 27740167
Change-Id: I4c9d5bc949499bdb5d9f2394e13e670a48d43629
2016-04-07 18:18:07 +01:00
Oren Blasberg
1b65b01f93 Merge "Fix icon spacing on both MenuPopup implementations." into nyc-dev 2016-04-07 16:37:47 +00:00
Ricky Wai
53940d4c7f Fingerprint should confirm device lock when unified
When unified and adding a fingerprint, the user is prompted to set up
a backup

Bug:27419438
Change-Id: I3e857fa07c50ee0904f685b721595ef6cfe729f9
2016-04-07 15:11:34 +00:00
Ricky Wai
dc283a8976 Keymaster init for work profile
Changes:
(1) When unified work challenge is enabled and screen lock is secure
  - Store work profile secure key in primary profile
  - When primary user keystore unlocked, unlock work profile keystore
  - When primary user change lock to none, remove work secure key
(2) When unified work challenge is enabled but screen lock is not secure
  - When screen lock changes to secure, store work secure key in primary
(3) When user changes work challenge from unified to separated
  - Remove work secure key in primary
(4) When user changes work challenge from separate to unified
  - Do (1) and (2)

Bug: 27460698

Change-Id: I8f77bde5dc6b8e59c90256e75c5990100e93366b
2016-04-07 14:23:37 +00:00
Jeff Sharkey
94cac0730a Merge "Automatically trace messages on shared loopers." into nyc-dev 2016-04-07 07:19:03 +00:00
Jeff Sharkey
74cd3de6f4 Automatically trace messages on shared loopers.
There are a handful of looper threads in the system_process that
are shared by dozens of different internal services.  To help track
down what these operations are, tag the processing of each message
with a string that tries describing where it originated from: the
class name of the Handler, and the message number or class name of the
Runnable.

Bug: 28046299
Change-Id: I409ec43fea8daaae4fd70df05d4fed929a7249ae
2016-04-07 00:14:53 -06:00
Jorim Jaggi
f1cdf9558d Don't lock device when double tapping
Bug: 24265204
Change-Id: Ia19e956def454604ed3f3e3e9815fc1872ef649a
2016-04-06 14:53:32 -07:00
Alan Viverette
a27c1df9c2 Merge "Add scroll indicators to resolver list layouts" into nyc-dev 2016-04-06 19:03:33 +00:00
Alan Viverette
81181dc356 Add scroll indicators to resolver list layouts
Also reformats XML for consistency.

Bug: 27431395
Change-Id: I468dd1582ddcabe360b8665b6f42b3248caa16a5
2016-04-06 13:47:01 -04:00
Abodunrinwa Toki
8949faf066 FloatingToolbar: Include scroll indicators in overflow.
Bug: 27427333
Change-Id: I7480cfe5f75d04e04792d9443435a76ab6773c64
2016-04-06 14:22:42 +01:00
Makoto Onuki
ca94f29366 Merge "Make FastXmlSerializer more suitable to persist arbitrary strings" into nyc-dev 2016-04-06 00:36:52 +00:00
Oren Blasberg
ddf6b8130f Fix icon spacing on both MenuPopup implementations.
Ensure we calculate based on the actual menu items in a particular menu
or submenu, not based on whether the parent menu had icon spacing
enabled.

Bug: 28026351
Change-Id: Ie6e56eb142f0b82de38bf39ee848ddd26df2bf1c
2016-04-05 17:24:45 -07:00
Joe Onorato
9b87cc2b8b Merge "Add stack traces to logs about mismatched sequenece numbers in procstats." into nyc-dev 2016-04-06 00:21:56 +00:00
Makoto Onuki
3ae3557ea3 Make FastXmlSerializer more suitable to persist arbitrary strings
- Encode '\u000' - '\u001F', so KXmlParser can read them properly.
Otherwise KXmlParser will ignore CRs/LFs in attributes, and CRs
in text.

- Originally FastXmlSerializer would throw if a string contains
dangling surrogate pairs.  Now we REPLACE them with.

Bug 27792649

Change-Id: I10c547dad2475b68f60e9e8208d9a3eae8e20063
2016-04-05 16:12:07 -07:00
Oren Blasberg
9022c7129e Fix top level menu lingering when submenu opens.
We should be calling close(false), not dismiss(), when the submenu is
opened.

This change brings the code closer to what it was before the prior
change to StandardMenuPopup, but preserves the ondismiss behavior we
want for popup menus. The net change so far is that StandardMenuPopup,
not MenuBuilder#performItemAction, handles closing the top level menu
when a submenu is opened. But nonetheless, the onDismiss is not called
when a submenu is opened; only when an actual real "dismiss" occurs.

Bug: 28001958
Change-Id: Ia0f89f8fd4bc5494f6a048c993792adfe42d88ec
2016-04-05 15:12:13 -07:00