Commit Graph

3075 Commits

Author SHA1 Message Date
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
riddle_hsu
1f5ac4d322 [ActivityManager] Distinguish FG or BG receiver finished
Symptom:
Assume a foreground broadcast FG and a background BG.
If a recevier registers both FG and BG. When sending
BG and FG to the receiver, and the receiver BG receiver
completes first, its finishReceiver will trigger next FG
receiver rather than BG, and also deliver wrong result
code/data to the next.

More detail and sample:
https://code.google.com/p/android/issues/detail?id=92917

Root cause:
Due to BroadcastQueue:getMatchingOrderedReceiver will match
by receiver(IBinder), so the caller ActivityManagerService:
broadcastRecordForReceiverLocked will always match the first
queue(fg) if a receiver is both receiving fg and bg.

Solution:
Add a parameter flags to finishReceiver, then server side
could know the finished receiver should belong to which queue.

Another general solution but with bigger scope:
I60dce4a48e20c1002a61a979e4d78b9b0a8b94a0

Change-Id: I913ca6f101ac8ec6c7a8e42754e6781f80247b7f
2015-01-03 15:38:21 +08:00
Michael Wright
3979c0bf42 resolve merge conflicts of 342e903 to master.
Change-Id: Id8404cce5c1c8e7818e5d164f93207a8c17cf7bb
2014-12-30 12:59:10 -08:00
Michael Wright
342e903000 am 95700457: am a33424a5: Merge "Add MEDIA_PROJECTION_SERVICE to the ServiceName list." into lmp-mr1-dev
* commit '95700457139803af54a5e731816cedf1c924f3a6':
  Add MEDIA_PROJECTION_SERVICE to the ServiceName list.
2014-12-30 19:51:20 +00:00
Michael Wright
446e019a06 Add MEDIA_PROJECTION_SERVICE to the ServiceName list.
This prevents our lint tooling from complaining that we're passing
invalid values when trying to get the MediaProjectionManager.

Bug: 18830590
Change-Id: I34633248e895b0ac7f5083e18a7d2385ca6f8adb
2014-12-23 17:01:49 -08:00
Jeff Sharkey
c4ec5b633e Iterate based on index, not key.
Bug: 18785949
Change-Id: I5d92fedac9f71b997f87f7035635fde276756faa
2014-12-17 10:24:13 -08:00
Jay Shrauner
081d7d5091 am 58d66c30: am 12b5e504: Merge "Fix NPE in Transport.applyBatch" into lmp-mr1-dev automerge: 59e96ee
* commit '58d66c30d78a70c7bb5d2a62669ed64d6931b777':
  Fix NPE in Transport.applyBatch
2014-12-16 01:53:20 +00:00
Jay Shrauner
58d66c30d7 am 12b5e504: Merge "Fix NPE in Transport.applyBatch" into lmp-mr1-dev
automerge: 59e96ee

* commit '59e96ee423f4fc810f29451144143a581a8cd99a':
  Fix NPE in Transport.applyBatch
2014-12-16 01:45:09 +00:00