3587 Commits

Author SHA1 Message Date
Yorke Lee
135b59e597 Merge "Use TelecommManager APIs to detect if we are in a call" into lmp-dev 2014-09-04 17:27:25 +00:00
Adam Powell
4ef16eaa8d Merge "Change the CAB to use the up-glyph for closing action modes" into lmp-dev 2014-09-04 01:18:14 +00:00
Adam Powell
b2536cf473 Change the CAB to use the up-glyph for closing action modes
In an effort to reduce glyph proliferation, change the "done"
checkmark from the CAB to the up-navigation arrow, placing the CAB
firmly in the current navigation hierarchy. This matches behavior for
expandable action views such as SearchView.

Allow the use of different CAB "done" layouts by theme; the material
layout should not include the "done" text and should use the standard
borderless selectable item background.

Bug 17372188

Change-Id: Icfb3e0bbc6a718e22ab27f9d520da5fe4eb833e7
2014-09-03 17:17:45 -07:00
Yorke Lee
cc5179f0e3 Use TelecommManager APIs to detect if we are in a call
Bug: 17335666
Change-Id: I5f443c76041e51a2eca903db924fb26031dde055
2014-09-03 17:04:54 -07:00
Alan Viverette
98a31b2ef0 Merge "Only use default backgrounds when not extending AlertDialog style" into lmp-dev 2014-09-03 23:42:42 +00:00
Alan Viverette
b17c6c178f Only use default backgrounds when not extending AlertDialog style
BUG: 17368867
Change-Id: I440dad33cfb093c13b450a5f2369481fb30665ad
2014-09-03 16:27:51 -07:00
Dan Sandler
d1dc910eff Merge "Reduce RAM requirements of grayscale icon testing" into lmp-dev 2014-09-03 22:15:38 +00:00
Dan Sandler
05c362d564 Reduce RAM requirements of grayscale icon testing
The isGrayscale family of methods is designed to identify
drawables and bitmaps that apps are using in the largeIcon
position to pose as small icons in order to get the
appropriate background treatment (a solid blue or gray block
in KK/JB, or geniune selvedge denim in ICS/HC).

We can optimize this search two ways:

(1) Reject immediately any largeIcon that is larger than
    largeIcons should be (64x64dp). We could one day simply
    reject, or resize, these in the notification manager,
    but regardless these are not plausible smallIcon
    subsitutes. This new constraint is commemorated in the
    new name, isGrayscaleIcon().

(2) Shrink the bitmap even smaller before scanning it slowly
    in Java.  This lets native_drawBitmap do the heavy
    lifting across the entire bitmap; we need only scan a
    few pixels.

Bug: 16513124
Change-Id: I3a2b79130ed2465a4aedfbb5a556db7f8a7aa132
2014-09-03 23:52:47 +02:00
Yohei Yukawa
d8636ea7ca API Review: InputConnection
This CL does nothing but rename some L API candidates
in InputConnection class, as per requested.

- requestUpdateCursorAnchorInfo()
  -> requestCursorUpdates()
- REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE
  -> CURSOR_UPDATE_IMMEDIATE
- REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR
  -> CURSOR_UPDATE_MONITOR

BUG: 17320996
Change-Id: I772c48ff18918e48a81e807b48ff907614485c09
2014-09-02 22:39:08 -07:00
Adam Powell
12b0321c0b Automatically supply a content description for ToolbarActionBar nav
If the developer hasn't set a navigation content description on the
Toolbar assigned to be an action bar or a home-action content
description via the ActionBar interface, use the framework default
"navigate up" string.

Also make sure that the default Up description is supplied in the
screen_toolbar window decor layout and that it is parsed properly in
all toolbars, even if we don't have an icon set during construction.

Bug 17298370

Change-Id: Ie2f9e34f92046d4d4ffb9a07e38fa89581891f7b
2014-09-02 16:20:08 -07:00
Adrian Roos
1572ee379e Trust: Look at the security unlock method of the right user
Follow up to Ic9e93862c722ebc529f5b2010b9cea941f569ce7.

Bug: 17107213
Change-Id: I8f3c19aedeaca3f265c98a4fb60ab74b115fca47
2014-09-01 23:03:28 +02:00
Adam Lesinski
cc562a811d Make UsageStats API comply with API Council
- Fix documentation to mention units of time in APIs.
- Return a Map instead of an ArrayMap

Bug:17289531
Change-Id: I0a2cfdc0bc003eeeb65a16e37bb7b991624b2853
2014-08-29 12:52:41 -07:00
Yohei Yukawa
72d35fa829 Reject request when any unknown flag is speficied
Currently EditableInputConnection#requestUpdateCursorAnchorInfo
never returns false unless InputMethodManager is somehow
unavailable.

This is problematic, especifially when we add a new flag to
EditableInputConnection#requestUpdateCursorAnchorInfo in a
future release.

With this CL, #requestUpdateCursorAnchorInfo does nothing and
immediately returns false when one ore more unknown bits are
specified.

BUG: 17324806
Change-Id: I5601714b481e8efa0ad3337c0d093cfcf55eade3
2014-08-29 00:57:19 -07:00
Dianne Hackborn
2db754ac6e Merge "Fix issue #17289876: startActivityFromRecents appears to launch the wrong task" into lmp-dev 2014-08-28 19:33:08 +00:00
Dianne Hackborn
d7c9289f93 Fix issue #17289876: startActivityFromRecents appears to launch the wrong task
It would be good to actually bring the task to the front.

Also, make the flow when inTask is provided better match what happens when
we go looking for a task on our own.

And this includes another fix that was supposed to be part of a different
change but I forgot this class is part of the framework project now.

Change-Id: I3cf05f2e585c0fd7a0dbb7c7cf9fb1655764dd93
2014-08-28 11:38:13 -07:00
Dianne Hackborn
7d9eefd871 Fix issue #16953886: History and batterystats checkin summary...
...start timestamps are in 1970s

Look for the wall clock time being very small, and try to update
it to a better value if we see one.

Also handle time change events to update the current time we a re
tracking.

Change-Id: Ifbae2b8c43ab5baa75ee4f672a752a542e23b52d
2014-08-27 18:30:31 -07:00
Dianne Hackborn
5232271a41 Fix issue #17146552: system anr
Add a safe path for Slog.wtf that doesn't acquire an activity manager
lock or block in any way.

Change-Id: I8fef8251a0cb85081442cae55d85063944248d15
2014-08-26 22:55:47 -07:00
Adam Powell
4902a89103 Merge "Adjust toolbar/action bar title handling" into lmp-dev 2014-08-27 01:31:18 +00:00
Adam Powell
af2d85973e Adjust toolbar/action bar title handling
Treat activity title changes as window title changes when propagating
to action bars. This gives it lower priority if a "hard" title has
been set. Fix some lifecycle handling around this that previously
resulted in multiple calls.

Automatically detect the starting display options for a
ToolbarWidgetWrapper if we're not grabbing them from styles. This
prevents setTitle and friends from going totally out to lunch if
constructed around a Toolbar with no starting title.

Bug 17138048

Change-Id: I9f58a3d222546745c8aa873e996b8f0d52a0ad21
2014-08-26 18:28:17 -07:00
Paul Jensen
5b62d263a7 Merge "Implement VpnConfig.addAllowedApplication()." into lmp-dev 2014-08-26 20:09:00 +00:00
Dianne Hackborn
4610545dd2 Merge "Fix issue #16311398: Limit number of documents a process can open" into lmp-dev 2014-08-26 19:56:26 +00:00
Calin Juravle
d68f83cc47 Merge "Pass vmSafeMode (manifest attribute) to installd." into lmp-dev 2014-08-26 19:10:25 +00:00
Dianne Hackborn
89ad456ea4 Fix issue #16311398: Limit number of documents a process can open
In application processes, monitor for when we start getting close
to the Dalvik heap limit, and ask the activity manager to try to
prune old activity instances in that case.

Add an explicit API for apps to ask that they have their own
activity instances cleaned up, if they want.

Fix some bugs in launching activities that were not correctly
applying the "multi task" behavior in the appropriate situations
of document-centric recents.

Clean up the activity manager's process removal code to all share
a common path.

Add a new "Spam" option to ActivityTests, which continually creates
new tasks, checking that the activity manager will now prune old
tasks rather than letting the app run out of RAM.

And while I was was doing this, I found problems with the path
for bringing an empty task to the foreground -- it could make
a new task instead of re-starting the root activity in the
existing task.  This is fixed, and some code in the recents
UI for working around the bug is removed.

And as long as I am doing that, we now have nice hooks in to
the activity manager for AppTask to give some APIs for better
managing the task, so add those along with more tests for these
APIs in ActivityTests.

We should look at also having the activity manager try to prune
old tasks when it sees app processes being killed, to better balance
memory use across multiple processes when some processes may host
many documents.  That however is for another CL...

Change-Id: I2bb81c3f92819350c868c7a7470b35817eb9bea9
2014-08-26 11:16:59 -07:00
Nancy Chen
e4b1d57dfd Merge "API review PhoneManager -> TelecommManager. Rename methods (6/6)" into lmp-dev 2014-08-25 22:24:09 +00:00
Paul Jensen
0784eeab28 Implement VpnConfig.addAllowedApplication().
bug:17109588
bug:13651397
Change-Id: Ibb944794627117728373f0105e24f196f3eeb9e9
2014-08-25 15:09:25 -04:00
Paul Lawrence
396ac76fd3 Show PIN screen with all PINs, not just simple ones
Bug: 17194645
Change-Id: I8b8ccd2b7cf6dbfac567492387d4f4fd61258a34
2014-08-25 11:13:46 -07:00
Nancy Chen
0eb1e402c7 API review PhoneManager -> TelecommManager. Rename methods (6/6)
PhoneManager
- handlePinMMI docs should explain what a Pin is and what MMI is
- rename isInAPhoneCall to isInCall
- rename showCallScreen to showInCallScreen
- merge this class into TelecommManager, we don't need both

Bug: 16960458

Change-Id: I7d573e27ed093f2ddb7849703cc62f9916835393
2014-08-25 10:50:44 -07:00
Jeff Sharkey
37cf9907d2 Merge "Installing splits into ASECs!" into lmp-dev 2014-08-24 18:45:55 +00:00
Jeff Davidson
90b1b9f985 Restore legacy VPN stats dialog.
Was originally removed in ag/522961, but restoring to keep legacy VPN
behavior the same from within VpnSettings. This dialog is only
accesible from VpnSettings and so should only ever be shown for legacy
VPNs.

Bug: 17164793
Change-Id: I06c4e136e1023b8f84edfd15a15264d2e41d325b
2014-08-22 17:06:37 -07:00
Jeff Sharkey
941a8ba1a6 Installing splits into ASECs!
Sessions can now zero-copy data directly into pre-allocated ASEC
containers.  Then at commit time, we compute the total size of the
final app, including any inherited APKs and unpacked libraries, and
resize the container in one step.

This supports both brand new ASEC installs and inheriting from
existing ASEC installs.  To keep things simple, it currently requires
copying any inherited ASEC contents, but this could be optimized in
the future.

Expose new vold resize command, and allow read-write mounting of ASEC
containers.  Move native library extraction into the installer flow,
since it needs to happen before ASEC is sealed.  Move multiArch flag
into NativeLibraryHelper, instead of making everyone pass it
around.  Migrate size calculation to shared location.

Separate "other" package name in public API, provide a path to a
storage device when relevant, and add more docs.

Bug: 16514385
Change-Id: I06c6ce588d312ee7e64cce02733895d640b88456
2014-08-22 16:25:04 -07:00
Adam Powell
c9991c7149 Merge "Fix (another) measurement issue in ActionBarContainer" into lmp-dev 2014-08-22 21:20:24 +00:00
Adam Powell
2b7ff72683 Fix (another) measurement issue in ActionBarContainer
Or, the patch in which we discover how many silly bugs adamp caused in
e77b6590.

Change-Id: Iaacd3792d161e068dee74b897872e9ab2f155aca
2014-08-22 13:57:43 -07:00
Elliott Hughes
5d04fee900 Merge "Don't show the pseudolocales unless we're in developer mode." into lmp-dev 2014-08-22 20:42:19 +00:00
Yigit Boyar
1960b32434 Merge "Fix RTL bug for actionbar tooltips" into lmp-dev 2014-08-22 19:15:40 +00:00
Elliott Hughes
dee5cde1ec Don't show the pseudolocales unless we're in developer mode.
The old zz_ZY and zz_ZZ pseudolocales are gone, replaced by ar_XB and en_XA.
The existing check for "developer mode" wasn't working, and now the
pseudolocales are there by default, we want to _remove_ them if we're not
in developer mode rather than add them if we are in developer mode.

Bug: 17190407
Change-Id: I6ee6eba53f5b816ef8e0d1768c94cd3484a196b5
2014-08-22 11:57:15 -07:00
Adam Powell
c793c9eb24 Merge "Add a missing condition when checking measurement for ActionBarContainer" into lmp-dev 2014-08-22 18:03:20 +00:00
Adam Powell
a12aaa75df Add a missing condition when checking measurement for ActionBarContainer
It even said "non-tab" right there.

Bug 17202141

Change-Id: Iacc7ec9610d2639aab59dd57ba7194178fb6391f
2014-08-22 10:46:55 -07:00
Brian Carlstrom
9a434ae00f Merge "Move SystemBackupAgent from services.jar to frameworks.jar" into lmp-dev 2014-08-22 17:03:49 +00:00
Calin Juravle
feb193085a Pass vmSafeMode (manifest attribute) to installd.
The flag is used to enforce --interpret-only flag when running dex2oat.

Bug: 12457423
Change-Id: Ifdafcc1afa32996577fa44c5682eeb58c79772ac
2014-08-22 15:33:05 +01:00
Adrian Roos
076e72554d Merge "Only run TrustAgentServices for users with secure keyguards" into lmp-dev 2014-08-22 14:17:32 +00:00
Yohei Yukawa
a277db28e9 Remove CursorAnchorInfoRequest and related stuff
This CL removes CursorAnchorInfoRequest and related stuff
in favor of InputConnection.requestUpdateCursorAnchorInfo,
which is more easy to understand. This CL also deprecates
InputMethodManager#updateCursor and related stuff.

Rationale:
1. The spec of #updateCursor says that it provides the cursor
   position in local coordinates, while the input method
   requires it in the screen coordinates.
2. #updateCursor has never been enabled in AOSP, because
   InputMethodManager#isWatchingCursor always returned false.
3. There has been no way to let
   InputMethodManager#isWatchingCursor return true.
4. In L, InputMethodManager#updateCursorAnchorInfo is
   introduced to address all the issues above.

Given that we no longer need to support #updateCursor,
CursorAnchorInfoRequest is overkill when we need to convey
just a couple of parameters.

BUG: 17185263
BUG: 17182367

Change-Id: I4a577bfd02b37b9e56c80b8b41bb25afa95dd8ef
2014-08-22 00:55:06 -07:00
Brian Carlstrom
8def5cbb3a Move SystemBackupAgent from services.jar to frameworks.jar
Bug: 17168017
Change-Id: I89b98ca839a78eeb7fb43930e0699ee235deafad
2014-08-21 23:15:13 -07:00
Yigit Boyar
d719539f91 Fix RTL bug for actionbar tooltips
Bug: 12570378
Change-Id: I13ba94c8b736a3a80a8d79e95bd18b93a1157303
2014-08-21 17:48:58 -07:00
Paul Lawrence
7bf41929f2 Merge "Save PatternVisible setting to crypto header" into lmp-dev 2014-08-21 16:25:56 +00:00
Adrian Roos
4b9e324b6f Only run TrustAgentServices for users with secure keyguards
Bug: 17107213
Change-Id: Ic9e93862c722ebc529f5b2010b9cea941f569ce7
2014-08-20 23:36:25 +02:00
Paul Lawrence
878ba0a266 Save PatternVisible setting to crypto header
Bug: 17059314
Change-Id: Ic64c64567f70ea11030cabfd33b57f77fb23dac7
2014-08-20 13:08:01 -07:00
Adam Powell
635c21b061 Fix measurement regression in ActionBarContainer
Make sure that we take into account all child views (including
ActionBarContextViews) when measuring the action bar container to
determine the measurement influence of an additional tab bar.

Bug 16982971

Change-Id: I53ba7e9a4c9e36d97c6385d2007a3ee0a4e2bc77
2014-08-20 18:15:30 -07:00
Adam Powell
75f9918760 Merge "Unify code paths for collapsing action views in action bars" into lmp-dev 2014-08-21 00:16:54 +00:00
Adam Powell
5352a89e8a Unify code paths for collapsing action views in action bars
This reverts a well-intentioned bugfix that made
ActionBarOverlayLayout focusable in touch mode and caused issues with
some activity layouts. Removes the associated key handling code for
the Back key in ActionBarOverlayLayout and handles it at a higher
level in Activity instead. (This same code path was already in use by
ToolbarActionBar.)

Bug 17105724

Change-Id: I57e4cace44a6d11f25a2549644b565446d616a52
2014-08-20 17:33:24 -07:00
Jeff Davidson
05542603dd Less intrusive VPN dialog and other UX tweaks.
-The ability to launch VPNs is now sticky; once approved by the user,
further approvals are not needed UNLESS the connection is revoked in
Quick Settings.

-The old persistent notification has been removed in favor of the new
Quick Settings UI.

-The name of the VPN app is now pulled from the label of the VPN
service rather than the app itself, if one is set.

Bug: 12878887
Bug: 16578022
Change-Id: I102a14c05db26ee3aef030cda971e5165f078a91
2014-08-20 16:55:28 -07:00