Clover Coverage Report - Subsonic-Android Coverage Report
Coverage timestamp: ven dic 19 2014 17:57:13 EST
../../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
10   56   2   10
2   25   0,2   1
1     2  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  QueryReceiverActivity       Line # 36 10 2 92,3% 0.9230769
 
No Tests
 
1    /*
2    This file is part of Subsonic.
3   
4    Subsonic is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8   
9    Subsonic is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12    GNU General Public License for more details.
13   
14    You should have received a copy of the GNU General Public License
15    along with Subsonic. If not, see <http://www.gnu.org/licenses/>.
16   
17    Copyright 2009 (C) Sindre Mehus
18    */
19   
20    package net.sourceforge.subsonic.androidapp.activity;
21   
22    import android.app.Activity;
23    import android.app.SearchManager;
24    import android.content.Intent;
25    import android.os.Bundle;
26    import android.provider.SearchRecentSuggestions;
27    import net.sourceforge.subsonic.androidapp.util.Constants;
28    import net.sourceforge.subsonic.androidapp.util.Util;
29    import net.sourceforge.subsonic.androidapp.provider.SearchSuggestionProvider;
30   
31    /**
32    * Receives search queries and forwards to the SelectAlbumActivity.
33    *
34    * @author Sindre Mehus
35    */
 
36    public class QueryReceiverActivity extends Activity {
37   
 
38  1 toggle @Override
39    public void onCreate(Bundle savedInstanceState) {
40  1 super.onCreate(savedInstanceState);
41   
42  1 String query = getIntent().getStringExtra(SearchManager.QUERY);
43   
44  1 if (query != null) {
45  1 SearchRecentSuggestions suggestions = new SearchRecentSuggestions(this, SearchSuggestionProvider.AUTHORITY,
46    SearchSuggestionProvider.MODE);
47  1 suggestions.saveRecentQuery(query, null);
48   
49  1 Intent intent = new Intent(QueryReceiverActivity.this, SearchActivity.class);
50  1 intent.putExtra(Constants.INTENT_EXTRA_NAME_QUERY, query);
51  1 Util.startActivityWithoutTransition(QueryReceiverActivity.this, intent);
52    }
53  1 finish();
54  1 Util.disablePendingTransition(this);
55    }
56    }