Commit Graph

12 Commits

Author SHA1 Message Date
Tadashi G. Takaoka
a034fa5407 Refactor DynamicIndexableContentMonitor
Refactor content monitoring code into a few singletons to keep alive
while Settings app is running.

Bug: 32995210
Test: Manually installing/uninstalling AOSP LatinIME.apk while
      Settings app is/isn't running, then search AOSP.
Test: Connecting/Disconnecting Anker bluetooth keyboard while Settings
      app is/isn't running, then search Anker.
Test: Added Robolectric test for DynamicIndexableContentMonitor.
Change-Id: I588e33be169fc9677d41c3daa59ab400f04f6419
2016-12-22 17:53:07 +09:00
TreeHugger Robot
96305a2b34 Merge "Guard against IllegalArgumentException" into nyc-dev 2016-05-25 23:07:01 +00:00
Sudheer Shanka
1fa37f3bb3 Guard against IllegalArgumentException
Bug: 28742227
Change-Id: If436ec3f743ca11ea40dce2033b7b993cb6ad170
2016-05-25 13:17:12 -07:00
Jeff Sharkey
c4eac99223 Skip indexing content while user is locked.
Otherwise we try touching printing services which throw.

Bug: 28912897
Change-Id: I25638794b35fd383fbe67604ac921d16743628ad
2016-05-25 10:52:34 -06:00
Philip P. Moltmann
d9779db8c9 Make Print Settings use the new PrintManager.getPrintServices loader
This makes sure that all data always stays up to date.

printer_dropdown_item.xml:
- Reduce the amount of overriden properties

PrintServiceSettingsFragment:
- Instead receiving most data from PrintSettingsFragment have own loader
  and keep data up to date
- Also the updating of the print service state now has a dedicated
  PrintManager call instead of relying of the Settings-ContentObserver
  to transport this information. No more race-conditions, whohoo!

DynamicIndexableContentMonitor:
- To not rewrite too much code the update logic has to live here but the
  reading of the actual data is in PrintSettingsFragment.

Change-Id: I60715cda8952565d7f68cb24fb7da61a37085887
2016-03-07 09:32:55 -08:00
Jason Monk
7d6aa790fd Null check queryIntentServices am: a4c9492b50 am: e27cada8c4 am: e198f7b84f
am: 7ee05202ab

* commit '7ee05202abcf7be3b3ee9cf1bf894047b407ce2d':
  Null check queryIntentServices
2015-11-09 22:45:02 +00:00
Jason Monk
a4c9492b50 Null check queryIntentServices
Bug: 25575738
Change-Id: I006a0e2f47863ac0f5d8ae28c88614481d13e8d3
2015-11-09 16:56:46 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Fabrice Di Meglio
d73045db7a Add Home / Launcher apps indexing
- add a BaseSearchIndexProvider to HomeSettings
- use a BroadcastReceiver for tracking add or remove of
Home / Launcher apps
- add "launcher" synonym for "home" too

- also code cleaning for DynamicIndexableContentMonitor

See bug: #16484927 Add "launcher" as a synonym for "home" in settings search

Change-Id: I819f4e5f7bd5e9a7882609206b2733ea1912fc69
2014-07-22 15:13:54 -07:00
Svetoslav
149c1361f1 DynamicIndexableContentMonito should respect lacking software features.
We have software features that are optional and developers should check if
these feature are available before use their APIs which are nop if the feature
is not present. DynamicIndexableContentMonito is observing changes in print
services and IMEs but printing and IMEs are optional features. Now we are
checking before tracking these features.

bug:14653371

Change-Id: I3003c645e637aa7d7118c80b4453a54b8ac8bf9a
2014-05-08 14:45:46 -07:00
Fabrice Di Meglio
6d7bb92b38 Fix bug #14228591 NPE in settings app when it is launched by UiAutomator
- test for null references

Change-Id: Iff6efc92cc16ada9f6e8f057ba9c23a241e62000
2014-04-21 15:32:28 -07:00
Fabrice Di Meglio
7a6bfd132c Update DynamicIndexableContentMonitor
- use factory for creating Intents
- add missing case in handlePackageUnavailable() for IMEs
- move DynamicIndexableContentMonitor to the "search" package

Change-Id: I8d74b28fb9183827db50c6de4b4543b4ff21acc0
2014-04-15 13:31:38 -07:00