215 Commits

Author SHA1 Message Date
Rodrigo Damazio Bovendorp
3fe3f7328f Fixing initialization cleanup in activity instrumentation test case
Change-Id: I798fed657ccdc27430edc07d1e911b34c45426b5
2011-08-01 17:10:58 -03:00
Brett Chabot
877d428e39 Test runner cleanup: delete unused old classes.
Change-Id: Iaaabd47d4074f936a811fc1b6575088d70842564
2011-06-01 20:03:39 -07:00
Dianne Hackborn
44bc17c6b5 Rework display size access.
Applications now get the display size from the window manager.  No
behavior should be changed yet, this is just prep for some real
changes.

Change-Id: I2958a6660895c1cba2b670509600014e55ee9273
2011-04-21 15:17:52 -07:00
Amith Yamasani
beb182a494 Merge "Package manager changes to store and update user information." 2011-04-11 12:14:17 -07:00
Amith Yamasani
4b2e934928 Package manager changes to store and update user information.
Some API stubs for managing users and storing their details.
List of users is stored in an xml file.
Each user's properties are stored in a separate xml file.

Some unit tests for modifying the XML files.

Change-Id: If2ce2420723111bd426f6762def3c2afc19a0ae5
2011-04-11 12:12:58 -07:00
Joe Onorato
43a17654cf Remove the deprecated things from Config.java. These haven't been working since before 1.0.
Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
2011-04-07 19:23:05 -07:00
Brian Carlstrom
08065b9f09 Tracking merge of dalvik-dev to master
git cherry-pick --no-commit  a80febd83c8bf0b6717da2a7136179bdc906a5b7

git cherry-pick --no-commit  5e642b41cf44c5da7afdd95ab3d5e2bdbf7b31dd

git cherry-pick --no-commit  4886db14c9eee4b6fee69bd54c57c5af04709c4c

git cherry-pick --no-commit  560c685e448769904047507b9484ce8111967d7e

git cherry-pick --no-commit  63dde7a2fcfa53dc531558635b64cea613d3cdb4

git cherry-pick --no-commit  74e5cb91060a379d98dd3a333b5f231bfb4f502e

git cherry-pick --no-commit  1cc8c9708b555e2e338b7798d38887a2fefcfea6

git cherry-pick --no-commit  09625a21f5abe0c0db15757f58585d552d62c3d7

git cherry-pick --no-commit  fcb02dfe0f5a2bb7c07e6d6fc69f756a484b5458

git cherry-pick --no-commit  a68cb7fa3ab42854768b8145ff85231663770292

git cherry-pick --no-commit  716beb1c131dd2c6b805d4f681debaa20075010c

git cherry-pick --no-commit  8c29b1097a7afe3a77e27546a56e396f3620a4ec

git cherry-pick --no-commit  9c6a1a55d1c8086c1cc57464eea43725694ff70c

git cherry-pick --no-commit  b14f5ea5c57acdd009ba5b51f1bbe430f3d353b8

Change-Id: I8cc94175441b009e23549762d6baee1dbace4881
2011-04-01 16:00:23 -07:00
Jean-Baptiste Queru
71431bb5ca am 79b66725: am 25be2c72: am e0537f18: Merge "Fix of tearDown() in SingleLaunchActivityTestCase."
* commit '79b66725b7755e403e10a9d073121789f09b1a9e':
  Fix of tearDown() in SingleLaunchActivityTestCase.
2011-02-28 11:05:55 -08:00
Jean-Baptiste Queru
25be2c725e am e0537f18: Merge "Fix of tearDown() in SingleLaunchActivityTestCase."
* commit 'e0537f1859664ba9c9cf87eb9d6dc3c16986dbb8':
  Fix of tearDown() in SingleLaunchActivityTestCase.
2011-02-28 10:15:46 -08:00
Scott Main
7aee61f5a9 docs: fix links to revised fundamentals documents
Change-Id: Ie2a660cce1d00f924c9fde5c6a00776307e5e1c7
2011-02-08 11:37:44 -08:00
Kenny Root
e8a534d8f0 Remove API that snuck into MockPackageManager
We didn't release the get/setPackageObbPath API, but it snuck into
MockPackageManager. However, it is not usable as a developer anyway.
Removing it so it doesn't stay in the API forever.

Cherry-pick from gingerbread

Change-Id: I2083a8f398d983d53661c33270854442e34f9bc9
2011-01-17 13:13:37 -08:00
Kenny Root
849dc24fa6 am 524133cc: Remove API that snuck into MockPackageManager
* commit '524133cc793b5e372cc97c62653281605f57b5b3':
  Remove API that snuck into MockPackageManager
2011-01-17 13:05:24 -08:00
Kenny Root
a1cbb94dbc Revert "Add the {get,set}PackageObbPaths calls to API"
This reverts commit 5d40fe9c6846ba765072e50ed1254293cb9195e4.

Change-Id: Ie41010c92fb860b19a12bcf63f6fe95ffa68da81
2011-01-17 13:00:47 -08:00
Kenny Root
524133cc79 Remove API that snuck into MockPackageManager
We didn't release the get/setPackageObbPath API, but it snuck into
MockPackageManager. However, it is not usable as a developer anyway.
Removing it so it doesn't stay in the API forever.

Change-Id: Ia569754691dc3a9f2672c1f25e4e08d780db6028
2011-01-17 12:40:57 -08:00
Kenny Root
e26aa3f78a am 34d2b41e: Revert "Add the {get,set}PackageObbPaths calls to API"
* commit '34d2b41e48281d1df2c844e004740f008e699093':
  Revert "Add the {get,set}PackageObbPaths calls to API"
2011-01-17 12:23:43 -08:00
Kenny Root
34d2b41e48 Revert "Add the {get,set}PackageObbPaths calls to API"
This reverts commit 6c4d904851772313930f800ac7c323cf90c709bb.

Going with a different tactic that doesn't dump stuff on
PackageManagerService.

Bug: 3214719
Change-Id: I0bbeccf3c21d264deda4256eb53713d2c98284f4
2011-01-17 11:49:22 -08:00
Dianne Hackborn
805fd7ee0e Add API to get path to OBBs.
Also hide the bitmap thumbnail stuff, we can't support it in its
current form.

And fix some bugs with propagating paths to native code.  Yikes!

Change-Id: I13ab37ddbdba5c073489cba5eab035117d3c1574
2011-01-16 18:43:04 -08:00
Kenny Root
5d40fe9c68 Add the {get,set}PackageObbPaths calls to API
Add getPackageObbPaths() and setPackageObbPaths() to the public API.

Bug: 3214719
Change-Id: I8627b5f674a795d5780eb5c08911419110670a41
2011-01-14 12:18:48 -08:00
Kenny Root
470750793b am e8c04db7: Merge "Add the {get,set}PackageObbPaths calls to API" into gingerbread
* commit 'e8c04db71e347396e9537ead7113ba9f46706e44':
  Add the {get,set}PackageObbPaths calls to API
2011-01-12 15:06:51 -08:00
Mikael Andreen
c6bf4075c9 Fix of tearDown() in SingleLaunchActivityTestCase.
Before a suite of SingleLaunchActivityTestCase tests are run,
an activity is started. The activity is supposed to close
when all the tests in the suite have run. The activity is
however finished one test too early. This causes problems
for the last test.

Change-Id: Ie9fb2df350a70f827495a0dc30952e30fbe491e0
2011-01-11 15:27:23 +01:00
Kenny Root
6c4d904851 Add the {get,set}PackageObbPaths calls to API
Add getPackageObbPaths() and setPackageObbPaths() to the public API.

Bug: 3214719
Change-Id: Icb9f2f92f8c59bb3d31317f609854e81abbd1449
2011-01-09 13:20:28 -08:00
Dmitri Plotnikov
ac77f4629c Prevent ActivityTestCase from erasing constants.
If you test case is declaring a non-primitive constant,
this method would clear out the constant between
individual tests.

Change-Id: I570f2bbbbbb0a170bf63b7473b4aaf84869e93e0
2011-01-07 12:06:47 -08:00
Jesse Wilson
f48e94005b Remove an obsolete import for performance tests.
Change-Id: Ifc76ef821f71ea7469b4044b15071f5d2a7418fd
2010-12-21 12:58:40 -08:00
Jesse Wilson
bd1c5da28d Remove unused performance tests.
Change-Id: I5a252e314831716f99ce5fbb32d983c7473ee787
2010-12-21 10:23:28 -08:00
Dianne Hackborn
c91893511d Fix issue #3272082: Contacts: when going back from edit view,
list UI is not ready yet

This involves some reworking of Loaders.

Loaders, in particular CursorLoader, are now expected to retain
their current data after being stopped.  This allows applications
to keep that data across onStop() -> onStart(), so when the user
returns to the app it doesn't have to wait for the data to reload
and thus cause flicker.

This includes various API changes to better reflect the new
semantics, plus a new LoaderCallbacks method to tell the application
when it is actually time to stop their use of a loader's data.

Note this is somewhat half-done, to help checking in the extensive
application changes that are required without causing build breakage.

Change-Id: Ib4b3bf8185a6da46e7f06ca125521d65e2e380a1
2010-12-16 20:09:13 -08:00
Dianne Hackborn
4f3867e3ce Time to remove some old APIs!
Change-Id: I73ca23b0d5c7971a00dfa05357f9b630d9b6ebc8
2010-12-14 22:19:03 -08:00
Dianne Hackborn
621e17de87 Implement issue #3221502: New APIs to support new back stack / task navigation
What this adds:

- A new Intent activity flag to completely replace an existing task.
- A new Intent activity flag to bring the current home task up behind
  a new task being started/brought to the foreground.
- New versions of startActivity() that take an array of Intents to be
  started, allowing applications to start a task in a specific state.
- A public moveTaskToFront() method on ActivityManager, with a new flag
  that allows the caller to have the task moved to the front with the
  current home task immediately behind it.

Change-Id: Ie8028d09acffb5349d98043c67676daba09f75c8
2010-11-22 18:35:55 -08:00
Jean-Baptiste Queru
be4e1c8f6f am 7b76ed69: am e3bef7c4: Merge "Added noop unregisterReceiver to complement existing noop registerReceiver."
* commit '7b76ed693e42caea0c5f1bcbe7059c580e9cb314':
  Added noop unregisterReceiver to complement existing noop registerReceiver.
2010-11-19 16:56:42 -08:00
Jean-Baptiste Queru
7b76ed693e am e3bef7c4: Merge "Added noop unregisterReceiver to complement existing noop registerReceiver."
* commit 'e3bef7c48d7ec13cb8c7c81dba8d775377e69bed':
  Added noop unregisterReceiver to complement existing noop registerReceiver.
2010-11-19 15:43:28 -08:00
Dianne Hackborn
880119bf43 Implement issue #2367442: Please add API for manipulating installer
package names

Change-Id: I0563e896a47ae1a6e77aebc2d624fb1bde52ffbc
2010-11-19 13:21:08 -08:00
Brian Muramatsu
48983959a3 Fix NPE in InstrumentationTestRunner
This fixes a problem where the test runner would die when a
test case has tests that are not methods of the test class.

Change-Id: I5adc464bb4a0c8d282428895e422a47dcb6bfe1f
2010-11-17 12:28:51 -08:00
Jack Wang
3fc03e619f Added RepetitiveTest annotation and test runner support
Change-Id: I7bf0871ede6dd69512c6b6ea3484693ba5b78e89
2010-10-19 18:23:18 -07:00
Jonas Schwertfeger
d672475753 Added noop unregisterReceiver to complement existing noop registerReceiver.
Without this addition, code that is being tested using an isolated context
can cause an exception if it unregisters a previously registered broadcast
receiver.  This is because the isolated context never actually registered
the receiver in the first place.  The fix is to make sure the isolated
context is consistent in ignoring both recevier registration and
unregistration calls.

Change-Id: Ie0ba6f4bb10f5248704327a0ffc8e37ee8b71ae2
2010-09-30 14:04:09 +02:00
Dianne Hackborn
cca1f0e347 Allow all apps to call ContentResolver.getType().
I can't find the bug number for this, but it is needed for some things
we are doing where the app building an intent may not have access to the
URI in the data field.  This is for HC, but doing in GB to avoid introducing
integration issues.

Change-Id: I0cac971854198b18775d2a73deb80f23431bfbe2
2010-09-27 18:05:44 -07:00
Dianne Hackborn
8313fc7e94 Allow all apps to call ContentResolver.getType().
I can't find the bug number for this, but it is needed for some things
we are doing where the app building an intent may not have access to the
URI in the data field.  This is for HC, but doing in GB to avoid introducing
integration issues.

Change-Id: I0cac971854198b18775d2a73deb80f23431bfbe2
2010-09-26 21:31:47 -07:00
Makoto Onuki
8e34203c41 Add getApplicationContext to the mock implementation.
So that it'll be compatible with Loaders, which uses this method.
(Otherwise MockContext.getApplicationContext(), which just throws
an exception, will be used.)

Change-Id: I529b60466cf086b514fcddbef4583d1c5b750b9c
2010-09-07 14:27:25 -07:00
Dianne Hackborn
2394c164a7 am ec438e14: am 361199b5: Add PackageManager API to get information about a provider component.
Merge commit 'ec438e1448ebc578ee5a4c4beb1e26292cdedd6e'

* commit 'ec438e1448ebc578ee5a4c4beb1e26292cdedd6e':
  Add PackageManager API to get information about a provider component.
2010-08-31 19:06:25 -07:00
Dianne Hackborn
361199b5e7 Add PackageManager API to get information about a provider component.
Kind-of useful when all you have is a ComponentName.

Change-Id: I9a99f12daabb29e97e882e09c43ca0df70c00651
2010-08-31 18:59:04 -07:00
Dianne Hackborn
23fdaf6fb6 Add new ContentProvider for doing conversions to data streams.
This introduces basic infrastructure that should allow content
providers holding complex data to perform on-demand conversion
of their data to streams of various types.  It is achieved through
two new content provider APIs, one to interrogate the possible
stream MIME types the provider can return, and the other to
request a stream of data in a particular MIME type.

Because implementations of this will often need to do on-demand
data conversion, there is also a utility intoduced in ContentProvider
for subclasses to easily run a function to write data into a
pipe that is read by the client.

This feature is mostly intended for cut and paste and drag and
drop, as the complex data interchange allowing the source and
destination to negotiate data types and copy (possible large)
data between them.  However because it is fundamental facility
of ContentProvider, it can be used in other places, such as for
more advanced GET_CONTENT data exchanges.

An example implementation of this would be in ContactsProvider,
which can now provider a data stream when a client opens certain
pieces of it data, to return data as flat text, a vcard, or other
format.

Change-Id: I58627ea4ed359aa7cf2c66274adb18306c209cb2
2010-08-08 18:49:31 -07:00
Brian Carlstrom
3c7c351a62 Tracking merge of dalvik-dev to gingerbread
git cherry-pick --no-commit f77cf7f0
git cherry-pick --no-commit c8f503b5285e30c1a881d0ba860ba9021f57d113
git cherry-pick --no-commit 570bb561
git cherry-pick --no-commit e2417541
git cherry-pick --no-commit e4d81f25bd4dc1a5c909b56ab56a56406290da30
git cherry-pick --no-commit 5e8a587d

Change-Id: I101a385d43f3e0f4ce5352217f92ef67a3908c88
2010-08-04 23:47:38 -07:00
Vasu Nori
b6d1437f32 fix build breakage
eclipse doesn't complain but our build does..

Change-Id: If0289b68e91e7eb2ae7a9b7bd90d5cb6b728e944
2010-08-04 18:05:00 -07:00
Vasu Nori
0c9e14aa4a add shutdown() to ContentProvider & call in ProviderTestCase*.tearDown
Change-Id: I3dd69b6907d68b7c1184139f22297ab92337f043
2010-08-04 13:34:34 -07:00
Jeff Hamilton
ebd19e0f48 Add LoaderTestCase that makes it easier to test Loaders.
Change-Id: I4e91d6767cfd5cc61d7893e9cd71e963e42601a4
2010-07-27 14:03:00 -05:00
Joe Malin
d93f4e5b70 Merge "DO NOT MERGE Doc Change: Javadoc for test case classes" into gingerbread 2010-07-13 09:46:38 -07:00
Brett Chabot
bbfe0b2264 am 243f7f85: am f6120cf4: Merge "Improve InstrumentationTestRunner exception handling." into gingerbread
Merge commit '243f7f85ea9e57716590b9cf355e55d1f0236fce'

* commit '243f7f85ea9e57716590b9cf355e55d1f0236fce':
  Improve InstrumentationTestRunner exception handling.
2010-07-08 19:10:29 -07:00
Kenny Root
511d9ec363 am 0a21801f: am a5402dab: Merge "OBB API for PackageManager" into gingerbread
Merge commit '0a21801f5fae22cd5e1b3e9f1c1405c744e24c9b'

* commit '0a21801f5fae22cd5e1b3e9f1c1405c744e24c9b':
  OBB API for PackageManager
2010-07-08 19:09:06 -07:00
Brett Chabot
f6120cf431 Merge "Improve InstrumentationTestRunner exception handling." into gingerbread 2010-07-08 14:09:21 -07:00
Brett Chabot
31e7ce762c Improve InstrumentationTestRunner exception handling.
This commit fixes two somewhat related problems:
  - Attempting to run a method which does not exist caused a runtime
exception which stopped the test run. Change this so the runner reports
an individual test failure instead
  - A runtime exception during the test run would cause it to stop
completely, with no information dumped to the logcat or stdout. Now
exceptions are trapped and reported to stdout.

Also added associated unit tests to test these two conditions.

Related bug 2812262.

Change-Id: I383f9b9bad99f14cb51071800fa9bdbf6a6a1119
2010-07-07 17:33:22 -07:00
Kenny Root
93565c4b32 OBB API for PackageManager
Simple API for tracking .obb files associated with packages. Stores the
path in the PackageSettings. No verification of file content is done
now since the PackageManagerService can't read the SD card where these
files will likely live.

Change-Id: Ibeaf26ba0526b6d60f401137e58f46ee9faff39e
2010-07-07 09:57:51 -07:00
Joe Malin
87e98cda1c DO NOT MERGE Doc Change: Javadoc for test case classes
Change-Id: I21b78a84ee1345a98631dcaab937a10b4fa4344d

Original change was SHA1 7d433aabb731a790fc8d06d260c826751215113f
2010-07-02 17:52:37 -07:00