Commit Graph

3082 Commits

Author SHA1 Message Date
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
Brian Attwell
09341baa8e Merge "Revert "Expose ContentProviderOperation type"" 2015-01-22 20:54:53 +00:00
Brian Attwell
8b89f0b207 Revert "Expose ContentProviderOperation type"
This reverts commit 9986f8e85a.

Change-Id: Icdcedf485a67fff4ab5e6bab9cc3e82aa7cc8760
2015-01-22 20:54:08 +00:00
Brian Attwell
a29ce2d47d Merge "Expose ContentProviderOperation type" 2015-01-22 20:53:53 +00:00
Brian Attwell
9986f8e85a 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: I3265193cda0c9405f6df896cd96a10df7225445a
2015-01-22 12:53:29 -08:00
Dianne Hackborn
4e106cedfe Bring back voice interaction APIs.
Change-Id: I6039d7c0b188ac342441c56f7d19994b9a80ba17
2015-01-21 15:07:20 -08:00
Ricardo Cervera
23a6d889aa am 1e59b338: am 08314642: am 90312d80: am 22878790: am 93f94c2c: resolved conflicts for merge of e8f6bd48 to lmp-dev
* commit '1e59b338e6d1a270947908e53cefd088e2e38fb3':
  docs: Added info on noHistory and onActivityResult(). Bug: 13807256
2015-01-16 20:06:53 +00:00
Ricardo Cervera
1e59b338e6 am 08314642: am 90312d80: am 22878790: am 93f94c2c: resolved conflicts for merge of e8f6bd48 to lmp-dev
* commit '083146428420dd3daa887d6e9c019e747a604cb5':
  docs: Added info on noHistory and onActivityResult(). Bug: 13807256
2015-01-16 18:47:08 +00:00
Ricardo Cervera
90312d808f am 22878790: am 93f94c2c: resolved conflicts for merge of e8f6bd48 to lmp-dev
* commit '2287879039556ad3c8fce58974e2396b4a2dab45':
  docs: Added info on noHistory and onActivityResult(). Bug: 13807256
2015-01-16 18:36:45 +00:00
Ricardo Cervera
2287879039 am 93f94c2c: resolved conflicts for merge of e8f6bd48 to lmp-dev
* commit '93f94c2ca5bf23533fc5a9bd70a4795584d20618':
  docs: Added info on noHistory and onActivityResult(). Bug: 13807256
2015-01-16 18:29:25 +00:00
Ricardo Cervera
93f94c2ca5 resolved conflicts for merge of e8f6bd48 to lmp-dev
Change-Id: Idc370182914d5060a721d34c26cd72598f2c6dff
2015-01-16 09:54:30 -08:00
Ricardo Cervera
e8f6bd4846 am 98f07d90: am 92f6a747: docs: Added info on noHistory and onActivityResult(). Bug: 13807256
* commit '98f07d901492335f51258655fbfa032fa3f2d58e':
  docs: Added info on noHistory and onActivityResult(). Bug: 13807256
2015-01-16 17:21:32 +00:00
Ricardo Cervera
98f07d9014 am 92f6a747: docs: Added info on noHistory and onActivityResult(). Bug: 13807256
* commit '92f6a747085b4b5ed692de4bdb0050c096eae393':
  docs: Added info on noHistory and onActivityResult(). Bug: 13807256
2015-01-16 17:14:44 +00:00
Dianne Hackborn
e6eb0772d6 am fce232b4: am 5a4b4084: am b96a6916: Merge "Fix issue android-app doc, bump battery stats checkin version" into lmp-mr1-dev
* commit 'fce232b4080a12220821568ab670a0cdce4893c5':
  Fix issue android-app doc, bump battery stats checkin version
2015-01-15 04:57:52 +00:00
Dianne Hackborn
fce232b408 am 5a4b4084: am b96a6916: Merge "Fix issue android-app doc, bump battery stats checkin version" into lmp-mr1-dev
* commit '5a4b4084215b1efc5308c0c914185599b4d502bf':
  Fix issue android-app doc, bump battery stats checkin version
2015-01-15 01:52:21 +00:00
Dianne Hackborn
0ee10f6d26 Fix issue android-app doc, bump battery stats checkin version
Issue #18983662: API Reivew: clarify Intent docs for URI_ANDROID_APP_SCHEME
Issue #19019830: Bump up battery stats checkin version

Change-Id: I0bd8f32b9d8d5978bd01d421ea2232d20def340a
2015-01-14 16:16:13 -08:00
Alan Viverette
34b064a140 Merge "Clean up TypedArray docs & formatting, remove coercion warnings" 2015-01-14 18:44:37 +00:00
Olawale Ogunwale
be37df395e am 9d293911: am ebdfb6e8: Merge "[ActivityManager] Distinguish FG or BG receiver finished"
automerge: 0f8ecc8

* commit '0f8ecc84c8b86054bfd3275f942c3a705df01fbb':
  [ActivityManager] Distinguish FG or BG receiver finished
2015-01-13 20:19:57 +00:00
Olawale Ogunwale
0f8ecc84c8 am 9d293911: am ebdfb6e8: Merge "[ActivityManager] Distinguish FG or BG receiver finished"
* commit '9d293911221cac930eb8edfef01362ea083eeaab':
  [ActivityManager] Distinguish FG or BG receiver finished
2015-01-12 16:44:28 +00:00
Alan Viverette
6bbb47b7d5 Clean up TypedArray docs & formatting, remove coercion warnings
Establishes a clear contract regarding when exceptions will be thrown,
when default values will be returned, and when values will be coerced
to a different type.

Since we have both getInt() and getInteger() where one handles coercion
without throwing an exception, it seems reasonable that we should clearly
document the behavior so that developers can make an informed decision.
Once we document the behavior, there is no reason to log warnings on
coercion. If a developer chooses to use a particular API or data type,
that is still correct according to the API.

BUG: 18625719
Change-Id: I385f0b719182d3c0358943e1d6c3d7bedc756eb5
2015-01-06 11:05:33 -08:00
Alan Viverette
304ea5aac7 Merge "Allow use of theme attributes in color state lists" 2015-01-06 18:47:29 +00:00
Alan Viverette
45c4bbbbce Allow use of theme attributes in color state lists
BUG: 17384842
Change-Id: Ibdc413acbd00e37b908432abd55f6521c22b8fc9
2015-01-05 14:59:19 -08:00
Alan Viverette
d6ebb3a75e Remove null entries from constant state cache
We insert null entries on cache miss, which can cause NPE on prune, but
we ought to remove these entries during prune.

BUG: 18842826
Change-Id: I9c0bca04f34575d1403de943abd8d12b18c9c032
2015-01-05 11:09:29 -08:00