/WebVox/src/com/marvin/webvox/BookmarkSearch.java

http://eyes-free.googlecode.com/ · Java · 44 lines · 19 code · 5 blank · 20 comment · 3 complexity · e5d458719bb27c62ed02c3f4a99de429 MD5 · raw file

  1. /*
  2. * Copyright (C) 2009 The Android Open Source Project
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package com.marvin.webvox;
  17. import android.app.Activity;
  18. import android.content.Intent;
  19. import android.os.Bundle;
  20. /**
  21. * This activity is never started from the browser. Its purpose is to provide bookmark suggestions
  22. * to global search (through its searchable meta-data), and to handle the intents produced
  23. * by clicking such suggestions.
  24. */
  25. public class BookmarkSearch extends Activity {
  26. @Override
  27. protected void onCreate(Bundle savedInstanceState) {
  28. super.onCreate(savedInstanceState);
  29. Intent intent = getIntent();
  30. if (intent != null) {
  31. String action = intent.getAction();
  32. if (Intent.ACTION_VIEW.equals(action)) {
  33. intent.setClass(this, BrowserActivity.class);
  34. startActivity(intent);
  35. }
  36. }
  37. finish();
  38. }
  39. }