280 Commits

Author SHA1 Message Date
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
Simon Schoar
ae5d46fddf Javadoc used startApplication() which doesnt exists, changed to createApplication() 2009-06-10 20:49:56 +02: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
Mike Lockwood
fd6e5f0dda location: Replace ILocationCollector interface with new ILocationProvider method
This change replaces ILocationCollector with a more general mechanism that
passes locations received from a provider to all other providers.
The network location provider now uses this to implement the location collector.
In the future, this could be used to inject network locations to the GPS
as aiding data.

This change also removes the now obsolete permission INSTALL_LOCATION_COLLECTOR.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-05-21 11:28:20 -04:00
Jean-Baptiste Queru
843ef36f7b donut snapshot 2009-05-20 11:28:04 -07:00
Mihai Preda
dd6face5a6 am eae850ce: Allow intent resolution to be constrained by package name.
Merge commit 'eae850cefe7e149f396c9e8ca1f34ec02b20a3f0'

* commit 'eae850cefe7e149f396c9e8ca1f34ec02b20a3f0':
  Allow intent resolution to be constrained by package name.
2009-05-15 07:06:46 -07:00
Mihai Preda
eae850cefe Allow intent resolution to be constrained by package name. 2009-05-15 12:32:07 +02:00
Fred Quintana
6a8d5332f0 content provider entities 2009-05-13 12:49:04 -07:00
Dianne Hackborn
d2b4929ba0 am ade3eca: Implement issue #1783881 (manifest option for adb-install-on
Merge commit 'ade3ecad94d1f4431576f53bae26c35efbf7a2c9'

* commit 'ade3ecad94d1f4431576f53bae26c35efbf7a2c9':
  Implement issue #1783881 (manifest option for adb-install-only apps)
2009-05-12 22:39:08 -07:00
Dianne Hackborn
ade3ecad94 Implement issue #1783881 (manifest option for adb-install-only apps)
You can now use android:testOnly="true" to not allow your .apk to be installed
as a normal app.  The only way to do so is with the pm command and giving the
-t option, which sets a new INSTALL_ALLOW_TEST flag when installing.

I also used this to clean up the install API...  actually, mostly to hide
it, since it is not accessible to apps so shouldn't be in the SDK.  We
will be doing some more work on it, so this will prevent adding yet
another backwards-compatibility-for-no-reason version.
2009-05-12 16:09:43 -07:00
Jacek Surazski
c64322c352 PackageManager keeps track of who installed what.
Stores the package name of the installer app in packages.xml
2009-05-12 23:16:20 +02:00
Jacek Surazski
65e13171e1 PackageManager keeps track of who installed what.
Stores the package name of the installer app in packages.xml
2009-05-12 10:48:27 +02:00
Android (Google) Code Review
158b2129cf am f792fc5: Merge change 1150 into donut
Merge commit 'f792fc59c18aa470eb44cc596d5774115e2d9d02'

* commit 'f792fc59c18aa470eb44cc596d5774115e2d9d02':
  location: Location Manager wakelock cleanup
2009-05-07 08:24:05 -07:00
Mike Lockwood
0528b9b26a location: Location Manager wakelock cleanup
Location Providers are now responsible for their own wakelocks and scheduling.

Also fixed a deadlock in LocationManagerService in the code for releasing
wakelocks after client notifications have been received.
The fix is to use the Receiver object and mWakeLock for synchronization
 instead of the global mLock lock.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-05-07 11:02:22 -04:00
Dianne Hackborn
7a13559501 merged 231cc608d06ffc31c24bf8aa8c8275bdd2636581 2009-05-06 00:28:37 -07:00
Dianne Hackborn
231cc608d0 Rewrite SyncStorageEngine to use flat files and in-memory data structures.
The previous implementation used a database for storing all of its state, which could cause
a significant amount of IO activity as its tables were updated through the stages of a sync.
This new implementation replaces that in-memory data structures, with hand-written code
for writing them to persistent storage.

There are now 4 files associated with this class, holding various pieces of its state that
should be consistent.  These are everything from a main XML file of account information that
must always be retained, to a binary file of per-day statistics that can be thrown away at
any time.  Writes of these files as scheduled at various times based on their importance of
the frequency at which they change.

Because the database no longer exists, there needs to be a new explicit interface for
interacting with the sync manager database.  This is provided by new APIs on IContentService,
with a hidden method on ContentResolver to retrieve the IContentService so that various
system entities can use it.  Other changes in other projects are required to update to the
new API.

The goal here is to have as little an impact on the code and functionality outside of
SyncStorageEngine, though due to the necessary change in API it is still somewhat extensive.
2009-05-05 15:40:53 -07:00
Mike Lockwood
e90c0da675 am 275555c: location: Add support for location providers outside of the
Merge commit '275555c8eb3fb5df6e7320873b88b77cdde85a9e'

* commit '275555c8eb3fb5df6e7320873b88b77cdde85a9e':
  location: Add support for location providers outside of the system process.
2009-05-01 12:39:03 -07:00
Mike Lockwood
275555c8eb location: Add support for location providers outside of the system process.
Also added new permissions android.permission.INSTALL_LOCATION_PROVIDER
and android.permission.INSTALL_LOCATION_COLLECTOR to the public API.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-05-01 15:06:31 -04:00
Mike Lockwood
ac7a3de471 am 15e3d0f: location: Use ILocationProvider Binder interface for all loc
Merge commit '15e3d0f082d551f8819fbe4b0d502cc108627876'

* commit '15e3d0f082d551f8819fbe4b0d502cc108627876':
  location: Use ILocationProvider Binder interface for all location providers.
2009-05-01 05:26:44 -07:00
Mike Lockwood
15e3d0f082 location: Use ILocationProvider Binder interface for all location providers.
This change eliminates the LocationProviderImpl class which had been used
for location providers running in the system process.
Now the LocationProvider base class is only used to implement the
LocationManager.createProvider() method for retrieving provider information.
Added a new IGpsStatusProvider interface for providers that serve GPS status.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-05-01 08:24:47 -04:00
Fred Quintana
718d8a2d7f decouple SyncAdapter from ContentProvider 2009-04-30 17:28:09 -07:00
Jorg Pleumann
e07cd1a4c3 am 19aa8e0: am b867019: AI 147725: Some fixes for the CTS test runner. O
Merge commit '19aa8e01b8fe4ebd6d518bd48ea9b53ec95a49a7'

* commit '19aa8e01b8fe4ebd6d518bd48ea9b53ec95a49a7':
  AI 147725: Some fixes for the CTS test runner. One is a
2009-04-29 13:35:41 -07:00
Mitsuru Oshima
c2839e0870 am 13735a2: Merge branch \'readonly-p4-donut\' into donut
Merge commit '13735a255dedd2c2e3b0cff66f0be2e17671f553'

* commit '13735a255dedd2c2e3b0cff66f0be2e17671f553':
  AI 147976: Compatibility mode support. Part 2.
2009-04-29 13:35:38 -07:00
Mike Lockwood
05d0243296 am 79762a3: location: Move DummyLocationProvider.java and LocationProvid
Merge commit '79762a3ee34eb8be5549bcb183af844b6f19c266'

* commit '79762a3ee34eb8be5549bcb183af844b6f19c266':
  location: Move DummyLocationProvider.java and LocationProviderImpl.java to the internal package.
2009-04-29 13:35:34 -07:00
Jorg Pleumann
19aa8e01b8 am b867019: AI 147725: Some fixes for the CTS test runner. One is a
Merge commit 'b867019173d20cd4fd7ee79a3ce924096e95a241' into donut

* commit 'b867019173d20cd4fd7ee79a3ce924096e95a241':
  AI 147725: Some fixes for the CTS test runner. One is a
2009-04-28 21:54:10 -07:00
Mitsuru Oshima
13735a255d Merge branch 'readonly-p4-donut' into donut 2009-04-28 18:13:25 -07:00
Mitsuru Oshima
8169daed2f AI 147976: Compatibility mode support. Part 2.
* Introduced ApplicationScale (may not be good name. CompatibilityScale? CanvasScale? Pls let me know if you have better idea)
  * Changes to RootView / SurfaceView
  - Makes the app believe it's running in the supported density/resolution.
  - Makes the window manager believe it's running at the right density/resolution.
  * Added methods to Rect/Event for scaling up/down.
  Known issues:
  * certain kind of images (such as nine patch for buttons) seesm to be loaded not by app, thus does not take the scale into account,
  which, in turn, is causing layout issue.
  * ZoomButton in MapView is rendered in wrong place
  * Transparent region on Surface is not correct
  * Specifying different densities in one process is not working.
  BUG=1770627

Automated import of CL 147976
2009-04-28 18:12:09 -07:00
Mike Lockwood
79762a3ee3 location: Move DummyLocationProvider.java and LocationProviderImpl.java to the internal package.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-28 12:42:08 -04:00