History log of /packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7f6a94f1ad3e3ec2546fb59310f5c5481032ff0c 12-Aug-2010 Mathew Inwood <mathewi@google.com> Fix the tests.

Most of the failures were caused by proguard being more aggressive by the look
of it. Added some @VisibleForTesting's fixes those.

Also some failured caused by the move to a 2-pane UI breaking assumptions made
in the tests.

Dependand on change: Icb5c0302aa320575085b0258b478933cb10e9c6b

Change-Id: I3e0d53c3fb299d9b9b41f51e1b34b648a8e63d86
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
b1d058c5fb5dca0d5f0df5bf3433feaad65478bb 09-Aug-2010 Mathew Inwood <mathewi@google.com> Delay shortcut DB updates to avoid priority inversion.

When working with a large clicklog, updating the shortcuts in the database
after a refresh can be timeconsuming. The update is done on a low priority
background thread, but blocks DB reads which are done on the UI thread. This
can cause priority inversion. By delaying when the updates are performed, we
can reduce how often this priority inversion occurs, which reduces the user
visible latency in the UI.

Change-Id: I58ea6dbd6d1f75bcb477851b49c621d50cd61eb4
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
93ba3b9bf77395f7a148d384bac9a80ba8ce6ced 29-Jul-2010 Mathew Inwood <mathewi@google.com> Fix for bug 2879253.

The shortcut limiting has been removed from ShortcutRepository, as it is done later
by ShortcutPromoter anyway. Limiting the shortcuts in ShortcutRepository means that
(for example) if have have loads of voice search shortcuts in the log, we only
return these from ShortcutRepository evenm though there may be other shortcuts too.
Then when we filter the shortcuts, all but 2 shortcuts get removed by
ShortcutPromoter, leaving just 2 shortcuts left.

Change-Id: I6413d82f9051bb64487c65817bfbcdea0f0c3097
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
f881fbea9e0fab9b6af20c3690d0416d1ccc30b2 22-Jul-2010 Bjorn Bringert <bringert@android.com> Change shortcut ordering algorithm to preserve click order

This preserves the click order between shortcuts with the same number of clicks.
Before, there was a 30 days / 1000 = 43.2 minute granularity. Clicks in the same bucket
had an undefined ordering.

Bug: 2861317
Change-Id: If90e216c7efba3ea606205bd89e5aac9d89ffac9
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
93bd2e70b8b08da1ec37fd0e990dac05551d2e90 29-Jun-2010 Bjorn Bringert <bringert@android.com> Another big QSB refactoring

- Change GoogleSource to return a suggestion cursor backed directly
by the JSON returned by the server, to avoid unecessary conversions
when showing web suggestions in QSB and improve laziness.

- Add SuggestionCursorBackedCursor to keep the web suggestion
ContentProvider working after the above.

- Extract Suggestion interface from SuggestionCursor, and use it to
replace DataSuggestionCursor use with ListSuggestionCursor.

- Add GoogleClient.isLocationAware(). GoogleSource previously
always returned true.

Change-Id: Ibe5ab2839267546b15488fa0a31e8535c014232a
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
81a0897ff9685f3313c58294bf7973700c468b2b 11-May-2010 Bjorn Bringert <bringert@android.com> Refactoring to prepare for external shortcuts

This change is meant to have no user-visible effects

Change-Id: Idf3a6d892ba84307a887785725aa072bd28c59b6
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
148154b406d3e483018e98f8f0296b59302020a3 26-Mar-2010 Bjorn Bringert <bringert@android.com> Write to click log asynchronously

This moves all write operations (except table creation)
to asynchronous transactions. This inclueds:
- Click logging
- Storing refreshed shortcuts
- Clearing history

Bug http://b/issue?id=2537681

Change-Id: Ia134ada5afc23310f6557ff7a34e5f03348c3935
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
87331ef11a1ac6c907c008354e3aab5eb6f87404 25-Mar-2010 Bjorn Bringert <bringert@android.com> Click logging performance improvements

- Logs clicks asynchronously.

- Gets rid of SourceLog, and adds a corpus field to ClickLog that
is used instead. This should reduce the amount of work done
when logging clicks.

- Uses the 30 day threshold for both source ranking and shortcuts.

Bug http://b/issue?id=2537681

Change-Id: I70cf6031b667fcc41bc23cc8d61351607a1058fd
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
2353e9c002c45c0adc8a979a49ff317cae5838b8 15-Mar-2010 Bjorn Bringert <bringert@android.com> Use resource names in stored shortcut icons URIs

This makes the URIs in shortcuts for suggestions produced
by QSB stable across upgrades (as long as the resource names
don't change).

http://b/issue?id=2513568

Change-Id: I17a8c06fcbc36f439c0751bb4dd0cb8789cb5e6b
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
6d5cbd67f7a5f824babb5c892b0f30bfd9f4ff23 12-Mar-2010 Bjorn Bringert <bringert@android.com> Don't show shortcuts for upgraded apps

This required moving the limit on the number of shortcuts
returned from the SQL query to the ShortcutCursor constructor.

Fixes http://b/issue?id=2493974

Change-Id: Icd2c71c31433429c005926497c1767ccc713beb4
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
72f9b08ce84d0e13daf2d1c112d4e6d1d3ada045 09-Mar-2010 Bjorn Bringert <bringert@android.com> Use a separate thread pool for Web corpus, to avoid deadlock

Fixes http://b/issue?id=2499654

Change-Id: I228d77a3ead794c7922d42fd51ff068f57dab40e
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
47d02f7285794bb39b2a2d828d32b5329dd8ecb0 06-Mar-2010 Bjorn Bringert <bringert@android.com> Always use the same SuggestionsProvider

This fixes a problem where a new SuggestionsProvider was created
for every keystroke when in single-corpus mode. That resulted
in old pending query tasks not being cancelled. This increased
suggestion latency a lot when typing quickly.

Fixes http://b/issue?id=2494162

Change-Id: I75d2a86349cdec8735a26c48c1fb737fac772f78
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
dbce1abe91200e83a41bcd95aaf5ea89496e5e48 02-Mar-2010 Bjorn Bringert <bringert@android.com> Store suggestion log type in shortcut repository

Change-Id: I24436d41e4de8f63c5b9e5a4edab5146ac5678ae
Fixes: http://b/issue?id=2480280
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
965d98377ddfdc52b772c2444d840000b665e000 01-Mar-2010 Bjorn Bringert <bringert@android.com> Support SUGGEST_COLUMN_TEXT_2_URL

Part of the fix for http://b/issue?id=2380681

Change-Id: Ifd03bdc9a466e8159724ffeba6642ee260d58920
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
a48af083ff81555261f334a1e050eae3b02a746c 17-Feb-2010 Bjorn Bringert <bringert@android.com> Use one thread pool per corpus / source

This gets rid of the scary DelayingSourceTaskExecutor,
and adds PerNameExecutor instead.

Fixes http://b/issue?id=2448072

Change-Id: I0e76e393d13d36fbb6762d2cf983e9fbdf9cfac8
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java
04a180b52fb4100a2f3747e795fb5d26e3207a4a 16-Feb-2010 Bjorn Bringert <bringert@android.com> Add unit tests for ShortcutRefresher

I copied the tests from Eclair GlobalSearch, but had to modify
them heavily for the current API. I removed all source impression
testing, since we don't track impressions any more.

This change also includes some refactoring to make the
code testable.

Fixes http://b/issue?id=2444660

Change-Id: I64b43149cf2614d61890550f11eb3eb0c24b3dbd
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ShortcutRepositoryTest.java