Commit Graph

3105 Commits

Author SHA1 Message Date
Andreas Gampe
3aa2d01752 am 3f74f638: am 55966006: am 7a4cb563: Merge "Frameworks/base: Remove unnecessary Pattern instance"
* commit '3f74f6386a15d09f27dbc81edd8dd2c13e298d73':
  Frameworks/base: Remove unnecessary Pattern instance
2015-03-08 00:17:54 +00:00
Andreas Gampe
5596600697 am 7a4cb563: Merge "Frameworks/base: Remove unnecessary Pattern instance"
* commit '7a4cb563a29f05658760739d3bc2e70bd6342174':
  Frameworks/base: Remove unnecessary Pattern instance
2015-03-07 17:13:16 +00:00
Andreas Gampe
055678b5fe Frameworks/base: Remove unnecessary Pattern instance
Using a static Pattern in UriMatcher prevents compile-time
initialization.

It is also not efficient, as String.split has a fast path for simple
splits.

Bug: 19542228

Change-Id: Ie9e5bfe6da04c6d05ec10b1426d0cd136ef46ef2
2015-03-07 00:19:01 +00:00
Tor Norbye
80756e3888 Annotate ARGB integer parameters with @ColorInt
Change-Id: I307f72a382272cf18ddb6b07d9fcb81228568d9a
2015-03-05 16:34:12 -08:00
James Cook
c1bce3de90 Merge "Fix crash in UndoManager after parceling TextView" 2015-03-02 22:43:51 +00:00
James Cook
f143ace3aa Fix crash in UndoManager after parceling TextView
UndoOwner maintains a manual reference count of the number of undo operations
it is associated with, but this count is not restored (and hence becomes zero)
when UndoManager is parceled and unparceled. This can cause the count to
underflow on subsequent text editing.

A test for this will land separately in CTS.

Bug: 19568283
Change-Id: Ic50890828db9679c7cef805388957d66dc75422d
2015-03-02 13:27:51 -08:00
John Spurlock
7b91c55b3f Merge "Remove unused imports in frameworks/base." 2015-03-02 20:43:50 +00:00
Scott Kennedy
9f78f6528f Mark arg and extras @Nullable in ContentProvider#call()
Change-Id: I431b01323fe76c744520c72661d30f6b9cb6b7f1
2015-03-01 15:29:58 -08:00
John Spurlock
08c7116ab9 Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
2015-02-28 14:47:49 -05:00
James Cook
7af589995f Merge "Reland: Add basic support for Ctrl-Z to editable TextViews" 2015-02-27 20:44:45 +00:00
Alan Viverette
228fd600ce Merge "Implement landscape layout for time picker dialog" 2015-02-27 18:13:54 +00:00
James Cook
f59152cf00 Reland: Add basic support for Ctrl-Z to editable TextViews
Reland 9201e79783 which was reverted in
c8f08e07a4.

Original description:
* Add an UndoManager to the Editor for each editable TextView
* Record operations as being owned by that Editor
* Parcel the undo state
* Wire hardware keyboard shortcuts Ctrl-Z for undo and Ctrl-Shift-Z
  for redo into TextView shortcut handling.
* Expose IDs for "undo" and "redo" for symmetry with cut/copy/paste.

Additional fix:
* Ensure each UndoOwner always has a valid mManager, even after the
  UndoManager is parceled and restored.

Bug: 19332904
Bug: 19505388
Change-Id: Iad4476e6e9ca952281e69bf22c07cca915dfa7bd
2015-02-27 10:04:08 -08:00
Fyodor Kupolov
8b8423e0c9 Merge "Extracted a separate class to run dexopt on packages" 2015-02-26 17:51:31 +00:00
Alan Viverette
62c79e9a64 Implement landscape layout for time picker dialog
Adds support overriding default alert dialog panel elements by including
them in the dialog's custom content view, but no public API (yet!) since
the panel IDs have never been public. Some minor cleanup and refactoring
in TimePickerDialog. Removes Holo styles for "clock" and "calendar" style
pickers since they are new in Material. If the new styles are used against
Holo they will match Material but with Holo primary/accent colors.

Also implements themed color state lists to resolve TODOs in both time
and date pickers.

Bug: 19431361
Change-Id: I095fd8d653e02d9e5d20d66611432a08a7a5685e
2015-02-26 09:47:10 -08:00
Jeff Brown
6e53931f49 Add Context.getSystemService(Class<?>).
Added an overload of getSystemService() that takes a class instead of a
service name to eliminate the extra cast and provide more type safety.

Cleaned up docs.

Removed the default constructor of BatteryManager which should not have
existed.

Change-Id: I9da46b20641fc83ecd3342560e5b94cb721f289c
2015-02-25 17:04:13 -08:00
Fyodor Kupolov
eeea67b8c3 Extracted a separate class to run dexopt on packages
performDexOptLibsLI and related methods were extracted to PackageDexOptimizer
class. Minor refactoring of PackageManagerService.

This is a non-functional change. It should simplify further work to allow
storing OAT files inside package dir.

Change-Id: I3494a2da70605362bb6fb4625ffbee1cbe1cd457
2015-02-25 10:00:51 -08:00
James Cook
8ee1d64c0a Merge "Change UndoManager mOwners from HashMap to ArrayMap" 2015-02-24 14:55:51 +00:00
Narayan Kamath
419389c52a am fd335f84: am 948682d1: am 6e208cdd: Merge "Remove wrong javadoc comment"
* commit 'fd335f8467259410c0a55733331e10531141e76e':
  Remove wrong javadoc comment
2015-02-24 10:28:12 +00:00
Narayan Kamath
948682d15f am 6e208cdd: Merge "Remove wrong javadoc comment"
* commit '6e208cddad3315c4e38accdb801908b2b9b5cbbd':
  Remove wrong javadoc comment
2015-02-24 10:11:52 +00:00
Narayan Kamath
6e208cddad Merge "Remove wrong javadoc comment" 2015-02-24 10:04:33 +00:00
James Cook
761a4b3335 Change UndoManager mOwners from HashMap to ArrayMap
The number of undo operation owners is small (and usually one),
so save memory by switching to ArrayMap.

Bug: 19332904
Change-Id: Ic32cd49c292db2eaab1739cea8e8e518e68bd826
2015-02-23 16:20:16 -08:00
Mike Lockwood
b673770f71 Add MIDI Manager API tweaks:
- Change the package name from android.midi to android.media.midi

- Add option for specifying a Handler for DeviceCallback notifications

Change-Id: Ia9e9817a651c06299f4e02ee1da3c9666ff64cb9
2015-02-23 14:32:23 -08:00
Tor Norbye
7b9c912f53 Add @ResourceInt annotations on APIs
Change-Id: I119cc059c2f8bd98fd585fc84ac2b1b7d5892a08
2015-02-18 07:49:03 -08:00
Fyodor Kupolov
bc26d2eafd Merge "RegisteredServicesCache now saves files to a user-specific dir" 2015-02-13 17:05:11 +00:00
Fyodor Kupolov
259e761532 RegisteredServicesCache now saves files to a user-specific dir
Previously, its state was saved in a single xml file inside
/data/system/registered_services.

Services are now stored in separate files stored in a user-specific dir. A
one-off migration step was added, which runs, when the system discovers a
file in the old format.

Bug:19321135
Change-Id: Ie92be01047f4855d01352b6a304820b37344ae2c
2015-02-12 17:34:03 -08:00
Tor Norbye
bf44ce24a9 Update the @ServiceName annotation
It was missing some recently added services (and some unhidden
services). For completeness also include newly added hidden services
as comments such that if they get unhidden in the future it's more
likely that a search and replace update will discover the annotation
reference as well.

Change-Id: I04ff5e1cf7b14b19c3650a49403771ef4f14c862
2015-02-12 11:47:32 -08:00
Alex Klyubin
05ecfd308d am 33d3c53d: resolved conflicts for merge of 517e0274 to lmp-mr1-dev-plus-aosp
* commit '33d3c53da021f0d044028860ace0f4ad817273f5':
  Move hidden ApplicationInfo flags into a separate field.
2015-02-11 20:47:31 +00:00
Alex Klyubin
33d3c53da0 resolved conflicts for merge of 517e0274 to lmp-mr1-dev-plus-aosp
Change-Id: Ic20b6c8851458483dd73a144bd5ae6e8d141e62a
2015-02-11 12:37:12 -08:00
Alex Klyubin
b9f8a5204a Move hidden ApplicationInfo flags into a separate field.
The public API field android.content.pm.ApplicationInfo.flags can
support only 32 flags. This limit has been reached. As a short term
workaround to enable new public flags to be added, this CL moves flags
which are not public API into a separate new field privateFlags and
renames the affected flags constants accordingly (e.g., FLAG_PRIVILEGED
is now PRIVATE_FLAG_PRIVILEGED).

The new privateFlags field is not public API and should not be used
for flags that are public API.

The flags that are moved out of ApplicationInfo.flags are:
* FLAG_HIDDEN,
* FLAG_CANT_SAVE_STATE,
* FLAG_FORWARD_LOCK, and
* FLAG_PRIVILEGED.

NOTE: This changes the format of packages.xml. Prior to this CL flags
were stored in the "flags" attribute. With this CL, the public flags
are stored in a new "publicFlags" attribute and private flags are
stored in a new "privateFlags" attribute. The old "flags" attribute
is interpreted by using the old values of hidden/private flags.

Change-Id: Ie23eb8ddd5129de3c6e008c5261b639e22182ee5
2015-02-11 11:06:40 -08:00
Fyodor Kupolov
9e0d81e843 Added unit test for RegisteredServicesCache
Minor refactoring of RegisteredServicesCache for testability. Added
RegisteredServicesCacheTest which uses a mock version of
RegisteredServicesCache.

Bug:19321135
Change-Id: If18b794b28f03b4bf4bbdfbba9e9a57e808aaebf
2015-02-10 14:05:12 -08:00
Soonil Nagarkar
9e9345c70a Merge "Add @SystemApi annotations to ACTION_QUERY_PACKAGE_RESTART and related." 2015-02-10 19:20:36 +00:00
Soonil Nagarkar
0e8fd09708 Add @SystemApi annotations to ACTION_QUERY_PACKAGE_RESTART and related.
Make Intent.ACTION_QUERY_PACKAGE_RESTART and Intent.EXTRA_PACKAGES
accessible from GmsCore so that location and context components can
properly respond to the broadcast.

BUG: 19298558
Change-Id: I4b5cf4991c69d3aa745d03271187c65794df10b2
2015-02-10 10:37:36 -08:00
Wale Ogunwale
00c5e4e190 Merge "Set TaskStack config orientation based on dimensions" 2015-02-10 18:35:12 +00:00
Wale Ogunwale
a928127a74 Set TaskStack config orientation based on dimensions
The TaskStack override configuration is set based on the
stack dimensions so we can load the most acturate resources
for activities in the stack in a multi-window environment.

Also, disabled fixed screen orientation for resizeable
activities.

Bug: 19305402
Change-Id: I7b182554523b12f2ef77f8bbc7b16891231125bf
2015-02-10 10:16:39 -08:00
Soonil Nagarkar
0059133011 Merge "Revert "Add @SystemApi annotations to ACTION_QUERY_PACKAGE_RESTART and related."" 2015-02-10 00:58:47 +00:00
Soonil Nagarkar
ffcd2400aa Revert "Add @SystemApi annotations to ACTION_QUERY_PACKAGE_RESTART and related."
This reverts commit f02fee70e1.
2015-02-09 16:49:48 -08:00
Soonil Nagarkar
02696d5b0f Merge "Add @SystemApi annotations to ACTION_QUERY_PACKAGE_RESTART and related." 2015-02-10 00:17:26 +00:00
Soonil Nagarkar
f02fee70e1 Add @SystemApi annotations to ACTION_QUERY_PACKAGE_RESTART and related.
Make Intent.ACTION_QUERY_PACKAGE_RESTART and Intent.EXTRA_PACKAGES
accessible from GmsCore so that location and context components can
properly respond to the broadcast.

BUG: 19298558
Change-Id: I8377db7c347068cfdd534e8f85834674f77d4cf3
2015-02-09 16:06:08 -08:00
Amith Yamasani
fd8e7306be am 2b865d7e: am a6318cd7: am d09878c1: am 61333d1b: Merge "Limit cache update to packages that have changed" into lmp-mr1-dev
* commit '2b865d7e16e19df76f01982b90e647e873098f51':
  Limit cache update to packages that have changed
2015-02-09 20:48:58 +00:00
Amith Yamasani
2b865d7e16 am a6318cd7: am d09878c1: am 61333d1b: Merge "Limit cache update to packages that have changed" into lmp-mr1-dev
* commit 'a6318cd7f29c87bce2dfe9b74ff4a89c945be591':
  Limit cache update to packages that have changed
2015-02-09 20:41:55 +00:00
Amith Yamasani
460a7b4619 Limit cache update to packages that have changed
When updating the RegisteredServicesCache, don't remove any packages
that are not in the list of modified packages.

Bug: 19228972
Change-Id: Id4f264403b7ceca9005854dfbbc25abfd7b54889
2015-02-09 11:10:31 -08:00
Narayan Kamath
e2d2ed4923 Conditionally include org.apache.http.legacy in app classpaths.
bug: 18027885

Change-Id: Id330ffde9d2a6e516fd60edc33f5529df719c634
2015-02-05 12:10:06 +00:00
Amith Yamasani
7e19f5016f Use ResolveInfo for label and icon for LauncherActivityInfo
Instead of using the ActivityInfo, use the ResolveInfo so that
any label or icon specified on the intent-filter is used.

Also handle the density param in getIcon()

Bug: 18482039
Change-Id: I65cb7adb34b2e472bfc68e7734f3a40fd0a6244c
2015-02-04 18:45:07 +00:00
Wale Ogunwale
4aab1bba69 @hide ActivityInfo.resizeable.
Bug: 19178148
Change-Id: Icc132eef7196cc2b8e50294df10595bde8d73ecd
2015-02-03 10:06:34 -08:00
Wale Ogunwale
9d3de4cfb4 Support for activity to opt-in/out of resizeable/multi-window support.
Bug: 19178148
Change-Id: I5819a71cdc48e0af4add11a6d4a503ec5cbe5d63
2015-02-02 16:06:55 -08:00
Scott Kennedy
2333e3406c Add some @Nullable annotations to SharedPreferences
Change-Id: I26e7a02a18d802902fca6892bed77b4f98ccf3ee
2015-01-30 15:37:45 -08:00
Fyodor Kupolov
0e8f037ded Merge "Added primaryUserOnly attribute for activities" 2015-01-28 22:52:19 +00:00
Fyodor Kupolov
703d1c43a2 Added primaryUserOnly attribute for activities
In addition to receivers, primaryUserOnly is now supported for activities.

In queryIntentActivities method, activities with primaryUserOnly flag set will
be filtered out, when current user is not the owner.

Change-Id: I0b7168b8c96749cd6d23b8c95d5624589f5f2d86
2015-01-27 12:05:07 -08:00
Wale Ogunwale
60454dbc4d Support activities in the same process having different resources.
Activities can be of various sizes in a multi-window environment.
This change allows them to have override configurations that allows
different resources to the loaded if needed.

Bug: 19002213
Change-Id: Ib2c7be0b427f5ce05e7a362bcdd496ddbc9164f0
2015-01-27 07:50:58 -08:00
Brian Attwell
1cf7405f1f Expose ContentProviderOperation type
CHANGE
isInsert, isDelete, isUpdate, isAssertQuery

JUSTIFICATION
The use of getType() in lots of unit tests means that
ContentProviderOperation#getType() can't practically be
removed.

Why not make it public? This allows 3p to use getType() in
unit tests. Plus it allows the unbundled contacts app
to continue using getType() in order to handle TYPE_INSERT
specially, without needing to awkwardly pass isInsert values
around.

Bug: 18777272
Change-Id: I6be5f325bbf6fbeb7817e9b1f7fa1a1ae2002e0b
2015-01-23 13:32:39 -08:00