104 Commits

Author SHA1 Message Date
Jack Wang
227ba2072d am e8228afb: Merge change I92cdc5ed into eclair
Merge commit 'e8228afb2bd005ae25ce58719f9d678389b26a16' into eclair-mr2

* commit 'e8228afb2bd005ae25ce58719f9d678389b26a16':
  PerformanceCollector: Collect & report perf measurements in key/value form
2009-10-30 17:07:56 -07:00
Jack Wang
075997f12e PerformanceCollector: Collect & report perf measurements in key/value form
- Added new functions to PerformanceCollector and PerformanceResultsWriter
- Modified unit tests to test new functionality and fix flakiness reported in
  2218327 and 2118268
- Added PerformanceCollectorTest to small suite
2009-10-28 14:32:05 -07:00
Daisuke Miyakawa
54616f3435 Make MockCursor class a part of public SDK.
With this class, external developers will be able to reduce their
redundant work related to testing around ContentProvider/ContentResolver.

Internal Issue number: 2181010
2009-10-22 07:25:02 +09:00
Mike Lockwood
03d246779e GPS: Fix problem with SUPL when SUPL APN is already active.
Use ConnectivityManager.CONNECTIVITY_ACTION broadcast in LocationManagerService
to notify GPS when SUPL connection is ready instead of TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED,
which is not sent in all cases.
Expand LocationProvider.updateNetworkState() to include NetworkInfo object.

Fixes bug b/2155661

Change-Id: Iee227ace7d536b36cf7973e3e6a8b7a621ce6565
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-10-08 17:24:21 -04:00
Fred Quintana
5bba632d87 - hide Entity and all its references
- remove updateEntity and insertEntity, since they are not
  used
- add the RawContacts.Entity class, which is used in lieu of the
  android.content.Entity
2009-10-06 11:51:19 -07:00
Fred Quintana
f7ae77cd67 account manager api review changes 2009-10-05 11:19:49 -07:00
Costin Manolache
3348f14b3d Remove GAIA string 2009-09-29 22:52:05 -07:00
Dianne Hackborn
039c68e756 The touch screen is probably a feature.
Also extend the feature APIs a bit.

Change-Id: I99e932d7f4e61edb0e20f75c55e9831e4b59a14d
2009-09-26 16:39:23 -07:00
Dianne Hackborn
efa199f016 Add API to send an ordered sticky broadcast.
Change-Id: Ida7081204e226db0cd07ff618c08e308a909ec0c
2009-09-19 12:05:25 -07:00
Dianne Hackborn
fa82f22f1d Fix issue #2093608: Calendar widget takes a few seconds to launch
Avert your eyes!

The key change here is that RemoteViews can now call a Context API to
start its pending intent, which inside of the activity manager we can
use to determine to cancel the timeout delay for external entities
to disrupt the home screen.

Change-Id: If097cf7478cbed7a3c04a304050bd7fd5703d197
2009-09-17 18:01:35 -07:00
Jack Wang
ff1df69dd4 Performance measurement framework:
+ For bug 1810508
  - Added PerformanceCollector class to collect runtime and memory usage data
    * Moved performance snapshotting from Intrumentation to PerformanceCollector
  - Added PerformanceResultsWriter interface which defines functions for
    reporting performance data

+ Framework integration
  - Added TimedTest annotation to automatically time tests and write results
    to instrumentation output
  - Modified PerformanceTestBase to add collection hooks and wrapper methods
  - Modified WatcherResultPrinter in InstrumentationTestRunner to implement
    PerformanceResultsWriter for instrumentation output of performance data
  - Modified InstrumentationTestRunner and AndroidTestRunner to pass writer
    instance to test
2009-09-11 17:15:15 -07:00
Cynthia Wong
904de61465 Override getAccounts to return an empty AccountSet in MockAccountManager. This used to throw an NPE instead since IAccountManagerService is set to NULL. 2009-09-03 10:06:55 -07:00
Dianne Hackborn
49237345d8 Add platform infrastructure for features.
This introduces a new mechanism to define features associated with
a platform, query the current device for the available features,
and enforce that apps requiring features that aren't available can't
be installed.

Also now allows uses-library to specify that a library is optional,
so the lack of such a library will not prevent the app from being
installed (but if it does exist it will be correctly linked into
the app).

Change-Id: I5b369b46cfa0b3d37c9e08fd14ef1098a978e67b
2009-08-27 21:51:00 -07:00
Jack Wang
7aba54b2ed Fix bug 1546445: Correct spelling errors in API
- InstrumentationTestCase.injectInsrumentation
- AndroidTestRunner.setInstrumentaiton
2009-08-25 12:44:56 -07:00
Dianne Hackborn
4a51c20ce6 I am getting tired of the java doc warnings, so fix them.
Change-Id: I2205eebae419eaf4a0992c9f5b7cd807eb843fe1
2009-08-24 17:37:32 -07:00
Jack Wang
a8db0a4ff6 Fix bug 2056252: android.test.AndroidTestRunnerTest:testRunTestWithNullListener is failing
- Verify mInstrumentation is not null before calling getContext()
2009-08-17 14:19:52 -07:00
Dianne Hackborn
766cbfe44b Add new API to compare certs of two UIDs. 2009-08-12 21:40:05 -07:00
Dmitri Plotnikov
44a29dd097 Adding "test context" to AndroidTestCase 2009-08-03 14:27:20 -07:00
Android (Google) Code Review
bfefdcda94 Merge change 8886
* changes:
  Fix broken calendar tests.
2009-07-28 17:42:53 -07:00
Ken Shirriff
04cc0e121f Fix broken calendar tests.
The tests end up in the widget code, which calls getResources().  This needs to
be supported by the mock.

bug=1985641
2009-07-28 16:20:48 -07:00
Dianne Hackborn
02f5228c3c resolved conflicts for merge of f0d83fd9 to master 2009-07-28 15:23:21 -07:00
Dianne Hackborn
7f2054392e Updates from API review.
* AccessibilityService -- document onBind() to not be implemented.
    * GestureLibrary.getLearner() -- needs to be hidden.
    * IntentSender -- remove protected constructors, document that it is retrieved from a PendingIntent.
    * Hide permissions: SHUTDOWN, STOP_APP_SWITCHES.
    * Context -- hide BACKUP_SERVICE.
    * ContextWrapper -- hide getSharedPrefs bla h blah
    * Intent.parseUri() -- fix docs.
    * ApplicationInfo.FLAG_TEST_ONLY?!?
    * Hide MockContext.getSharedPrefs blah blah
2009-07-28 00:13:47 -07:00
Andrew Stadler
54a16f0590 Add getCacheDir() to RenamingDelegatingContext.
This allows providers under ProviderTestCase2 to access getCacheDir().
2009-07-24 10:52:21 -07:00
Android (Google) Code Review
70277a21d9 Merge change 6223
* changes:
  Changes for new sync.
2009-07-09 15:35:41 -07:00
Romain Guy
a2b5dab5b7 am 870e09fc: Fixes #1963229. Introduces Context#isRestricted().
Merge commit '870e09fcd2dfdc12ac318962efd28b0420c562bb'

* commit '870e09fcd2dfdc12ac318962efd28b0420c562bb':
  Fixes #1963229. Introduces Context#isRestricted().
2009-07-06 17:10:41 -07:00
Romain Guy
870e09fcd2 Fixes #1963229. Introduces Context#isRestricted().
A restricted Context is a special type of Context that prevents specific features
from being used. For instance, android:onClick, used by View, can be dangerous when
used from within apps widgets. By using a restricted Context to inflate apps widgets,
widgets providers are prevented from using android:onClick.
2009-07-06 16:45:17 -07:00
Ken Shirriff
3b95f53789 Changes for new sync.
Add ContentValues-based RecurrenceSet processing.
Add test stub needed by SSL caching.
2009-07-06 10:45:38 -07:00
Android (Google) Code Review
f888bc4dfe am 441cb04e: Merge change 5732 into donut
Merge commit '441cb04efc0048585b3a6e6fa3d564e3d1b26f62'

* commit '441cb04efc0048585b3a6e6fa3d564e3d1b26f62':
  Fix assertContentsInOrder (bug 1790350).
2009-07-01 16:01:30 -07:00
Karl Rosaen
97eb32e2ca Fix assertContentsInOrder (bug 1790350).
if we ever get an updated Lists class that includes a
Lists.newArrayList(Iterable<?>
implementation, that would work too.
2009-06-29 18:06:40 -07:00
Andrew Stadler
b09296dbd8 Add missing filename remap to RenamingDelegatingContext
This makes ProviderTestCase2 work better by enabling code under test
to make calls to context.getDatabasePath().  Without this fix the call
throws an exception.

It would be reasonable (and useful) to backport this to donut, but I'm
not even building donut these days.
2009-06-24 22:32:40 -07:00
Fred Quintana
ac9385ef31 - clean up the sync settings names to:
(get|set)SyncAutomatically
   (get|set)MasterSyncAutomatically
- change SYNC_EXTRAS_FORCE to SYNC_EXTRAS_MANUAL to mace clear that
  this overrides the .*SyncAutomatically settings
- make ContentResolver methods that call the sync controls methods
  in IContentService so that SDK users can use them
- rename startSync to requestSync to reinforce the fact that a sync
  is not immediately or always started when this method is called
- add an Account parameter to all the sync settings and control methods
- change the sync control methods to take a String authority rather than a Uri uri
2009-06-23 15:53:16 -07:00
Suchi Amalapurapu
c73e9ad55a am bc806f65: Remove deprecated api. Aptly rename freeStorageWithIntent to freeStorage.
Merge commit 'bc806f65edc33f6eda0f475ac84e5e037a013a90'

* commit 'bc806f65edc33f6eda0f475ac84e5e037a013a90':
  Remove deprecated api. Aptly rename freeStorageWithIntent to freeStorage.
2009-06-19 10:38:45 -07:00
Suchi Amalapurapu
bc806f65ed Remove deprecated api. Aptly rename freeStorageWithIntent to freeStorage. 2009-06-19 10:25:37 -07:00
Android (Google) Code Review
8dbbe3b52f am 63e7155c: Merge change 4696 into donut
Merge commit '63e7155c7d1d0c3f0027400aa09e9a45f648a80d'

* commit '63e7155c7d1d0c3f0027400aa09e9a45f648a80d':
  Fix targetSdkVersion, make resize mode a flag, delayed dexopt, easy ApplicationInfo.
2009-06-18 19:35:32 -07:00
Dianne Hackborn
5c1e00b14d Fix targetSdkVersion, make resize mode a flag, delayed dexopt, easy ApplicationInfo.
- Fix a bug where targetSdkVersion could not be set if minSdkVersion.  Stupid, stupid.
  Also make sure to fail if minSdkVersion is for a code name.  Really stupid.

- Change the API for resize compatibility mode to be a bit in the flags field, instead
  of a separate boolean.

- Implement delayed dexopting, to avoid the looong full dexopt during boot.  This is
  only enabled for "eng" builds.  When in this mode, the activity manager will make
  sure that a dexopt has been done before loading an .apk into a process, and will
  try to avoid displaying ANRs if they are due to the dexopt causing some operation
  to take longer than it normally would (though I make no guarantees about this
  totally working).

- Add API to Context to get the ApplicationInfo for its package, for easy access to
  things like targetSdkVersion.
2009-06-18 17:10:57 -07:00
Dianne Hackborn
abb01dba70 am c14b9ccd: Extend Intent/Uri conversion for use by Browser
Merge commit 'c14b9ccdf13163cae5ce5d21bcf377010b37594b'

* commit 'c14b9ccdf13163cae5ce5d21bcf377010b37594b':
  Extend Intent/Uri conversion for use by Browser
2009-06-17 22:45:54 -07:00
Dianne Hackborn
c14b9ccdf1 Extend Intent/Uri conversion for use by Browser
This introduces a new Uri form of Intent with an "intent:" scheme, and a
corresponding update to the parser to handle these, so that the browser
can use this generic facility for starting activities based on the links
that are clicked and allow for web pages to link to arbitrary intents.

There is also a new "package" field on Intent which allows you to limit
the components it finds to a given package.  This replaces the new method
that was added to PackageManger for doing this when resolving activities,
and implements it for all Intent queries against the package manager.
2009-06-17 21:48:14 -07:00
Suchi Amalapurapu
e1fae30e20 Merge commit '0781df94' into manualmerge
Conflicts:
	Android.mk
	api/current.xml
2009-06-17 18:24:44 -07:00
Suchi Amalapurapu
1ccac75e1f Remove circular dependency in PackageManager. api freeStorage uses PendingIntent from android.app
Create a new public IntentSender class that can be used by PackageManager instead.
This new class uses IIntentSender internally and can only be created by PendingIntent for now.
Provide a new getIntentSender api in PendingIntent to create an instance of this class.
Move IIntentSender and IIntentReceiver from android.app to android.content
Change imports of IIntentSender and IIntentReceiver to reflect the new package name
The PackageManager api has been named as freeStorageWithIntent and will be renamed as freeStorage
once the older api(which has been deprecated) will be removed shortly.
2009-06-17 11:31:26 -07:00
Android (Google) Code Review
bf85d63cb8 am 78f0f8cb: Merge changes 3953,3954 into donut
Merge commit '78f0f8cb2efe9410127c39201e240f6d438eb53c'

* commit '78f0f8cb2efe9410127c39201e240f6d438eb53c':
  Make the file backup helper not crash if a file you requested
  Fix SharedPrefsBackupHelper so it doesn't hard code the paths to the files.
2009-06-12 08:26:05 -07:00
Joe Onorato
23ecae3bbb Fix SharedPrefsBackupHelper so it doesn't hard code the paths to the files.
This took quite a bit of refactoring.
2009-06-11 11:29:57 -07:00
Mitsuru Oshima
342d59d319 am 9189cabb: * Moved supports-density tag under manifest * Refactored Compatibility code * Added CompatibilityInfo class * Removed getApplicationScale from Context * Added Resources#getCompatibilityInfo so that RootView can get the compatibility info w/o going through Context * Expandable support * Added expandable tag under manifest * Old application w/o expandable is given the default screen size ([320, 480] x density). * The non-expandable window is centered.
Merge commit '9189cabb0b6c6c28232fe6f412b7ba7a37352a6a'

* commit '9189cabb0b6c6c28232fe6f412b7ba7a37352a6a':
  * Moved supports-density tag under manifest
2009-06-03 16:34:47 -07:00
Mitsuru Oshima
9189cabb0b * Moved supports-density tag under manifest
* Refactored Compatibility code
  * Added CompatibilityInfo class
  * Removed getApplicationScale from Context
  * Added Resources#getCompatibilityInfo so that RootView can get the compatibility info w/o going through Context
* Expandable support
  * Added expandable tag under manifest
  * Old application w/o expandable is given the default screen size  ([320, 480] x density).
  * The non-expandable window is centered.
2009-06-03 16:28:10 -07:00
Satish Sampath
ae8c5b868f am 8dbe612d: Adding internal method replacePreferredActivity.
Merge commit '8dbe612dc60526d635e57257b58627b33a099678'

* commit '8dbe612dc60526d635e57257b58627b33a099678':
  Adding internal method replacePreferredActivity.
2009-06-03 00:05:36 -07:00
Satish Sampath
8dbe612dc6 Adding internal method replacePreferredActivity.
This was required because we need a way to set the preferred activity for a
particular intent filter based on user selection (in our case the
ACTION_WEB_SEARCH intent filter for selecting the preferred search engine from
the list of available search engines providers). The current
addPreferredActivity call was not sufficient since it leaves the existing
preferred activities in the list and does not remove them, which this call
does.
2009-06-03 07:54:42 +01:00
Fred Quintana
03d9490758 - create a new generic ISyncAdapter implementation, SyncAdapterNew
- change the applyBatch to take an ArrayList rather than an []
 - change Entity to be a final flass that contains ContentValues
 - remove the ability to update/insert Entities by a ContentProviderOperation
2009-06-01 16:17:03 -07:00
Android (Google) Code Review
8c5e96fb68 am ecad93e5: Merge change 2685 into donut
Merge commit 'ecad93e5f3c7345febcfa078b1d2aa00a2e1fd66'

* commit 'ecad93e5f3c7345febcfa078b1d2aa00a2e1fd66':
  Change code coverage to write to app data folder rather than sdcard.
2009-05-29 12:20:52 -07:00
Brett Chabot
51e03642ce Change code coverage to write to app data folder rather than sdcard.
The InstrumentationTestRunner would previously write code coverage data to the sdcard. With the recent SDCARD_WRITE permission addition, generating code coverage would fail if test app did not declare the SDCARD_WRITE permission. This CL changes InstrumentationTestRunner so by default, the coverage data is saved to the app's private data folder. At the test run conclusion it outputs the path to this file so runtest or another test harness find the path to the coverage file.
2009-05-28 18:26:26 -07:00
Fred Quintana
8943737692 add ipc support to batching 2009-05-22 14:17:48 -07:00
Android (Google) Code Review
9b1e1400df am 8c690ea9: Merge change 2182 into donut
Merge commit '8c690ea9976d644db3c96eddbbbd2d50eac56913'

* commit '8c690ea9976d644db3c96eddbbbd2d50eac56913':
  location: Replace ILocationCollector interface with new ILocationProvider method
2009-05-21 09:42:38 -07:00