Merge commit '8280c2b15f6875b2d387c05df23d264864eb9cd5' into eclair-mr2-plus-aosp
* commit '8280c2b15f6875b2d387c05df23d264864eb9cd5':
Implement new MockContentProvider. Also make ContentProvider aware of the class.
Rename the old MockContentProvider to MockIContentProvider since it is
more appropriate name.
Detail:
Current developers inevitably depend on the backend used by ContentProvider,
which is useful but not ideal nor "testable" from the view of them.
Current MockContentResolver only accepts exact "ContentProvider" class, not
IContentProvider interface, since we want to hide "IContentProvider" while
the old MockContentProvider implements IContentProvider and as a result some
methods we want to hide may be exposed to the public SDK now and probably
for the future.
On the other hand, ContentProvider is not interface but an exact class
heavily depends on the internal logic and not suitable for external
developers to use for tests.
The new MockContentProvider introduces the mock implementation
for ContentProvider.
It extends ContentProvider, so "is" ContentProvider, but tries to avoid
depending on any backend System like IPC in Android, etc.
This should be useful from the view of application developers who do not
want to be confused with ContentProvider/ContentResolver backend
implementation "at all" and want to use MockContentResolver without
any other ContentProvider implementations tightly connected to the
external worlds.
- Added includeDetailedStats metadata to TimedTest for collecting additional
metrics like memory usage and binder transactions
- Added PerformanceCollectorTestCase interface for hard-typing test class as
performance test while still able to inherit from instrumenation test classes
- Reverted previous changes to PerformanceTestBase, will deprecate
PerformanceTestBase/Case in a future CL
- Removed 'performance.' prefix from keys written to instrumentation output
- 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
Merge commit '54616f3435e67029006d2f77462c61ed0635a3f6' into eclair-mr2-plus-aosp
* commit '54616f3435e67029006d2f77462c61ed0635a3f6':
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
Merge commit '348b92bd513087369ac682e29620d7829fa1381b' into eclair-plus-aosp
* commit '348b92bd513087369ac682e29620d7829fa1381b':
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>
Merge commit '5bba632d877c2878384ff21566c8eb6a1a22f37b' into eclair-plus-aosp
* commit '5bba632d877c2878384ff21566c8eb6a1a22f37b':
- 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
Merge commit '093f581090d8cf98f5877746d924107f7695dd8b' into eclair-plus-aosp
* commit '093f581090d8cf98f5877746d924107f7695dd8b':
The touch screen is probably a feature.
Merge commit 'a382cb81187437aa389dc131687e181ceaefa8ba' into eclair-plus-aosp
* commit 'a382cb81187437aa389dc131687e181ceaefa8ba':
Add API to send an ordered sticky broadcast.
Merge commit 'fa82f22f1d8c4c828bdf9b670006be4f4fec772e' into eclair-plus-aosp
* commit 'fa82f22f1d8c4c828bdf9b670006be4f4fec772e':
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
+ 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
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
* 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
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.
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.
(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