summaryrefslogtreecommitdiffstats
path: root/src/com/android/dialer/CallLogSearchActivity.java
diff options
context:
space:
mode:
authorQiang Chen <cqiang@codeaurora.org>2013-12-20 15:09:18 +0800
committerSteve Kondik <shade@chemlab.org>2014-03-03 03:59:41 -0800
commitc3907dd88f15539c0849dc47de6f17da0e2f382a (patch)
treeb763f2020c862fe14fa43dc9421c9cded391043a /src/com/android/dialer/CallLogSearchActivity.java
parentfb6b2868899c3df745ef85d58ae46b44d694b31a (diff)
downloadandroid_packages_apps_Dialer-c3907dd88f15539c0849dc47de6f17da0e2f382a.tar.gz
android_packages_apps_Dialer-c3907dd88f15539c0849dc47de6f17da0e2f382a.tar.bz2
android_packages_apps_Dialer-c3907dd88f15539c0849dc47de6f17da0e2f382a.zip
Dialer: Add call log to google search
User can search the call log information in google search app. Change-Id: I44480d2e1fc8e30f533839defa1c1d8110531f05
Diffstat (limited to 'src/com/android/dialer/CallLogSearchActivity.java')
-rwxr-xr-xsrc/com/android/dialer/CallLogSearchActivity.java54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/com/android/dialer/CallLogSearchActivity.java b/src/com/android/dialer/CallLogSearchActivity.java
new file mode 100755
index 000000000..ae44ed643
--- /dev/null
+++ b/src/com/android/dialer/CallLogSearchActivity.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2013, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.android.dialer;
+
+import android.app.Activity;
+import android.content.Intent;
+
+public class CallLogSearchActivity extends Activity {
+ private static final String ACTION_SEARCH = "android.intent.action.SEARCH";
+
+ @Override
+ public void onStart() {
+ super.onStart();
+ if (ACTION_SEARCH.equals(this.getIntent().getAction())) {
+ Intent intent = new Intent(this, CallDetailActivity.class);
+ String id = "0";
+ if (this.getIntent().getData() != null) {
+ id = this.getIntent().getData().getQueryParameter("id");
+ }
+ intent.putExtra(CallDetailActivity.EXTRA_CALL_LOG_IDS, new long[] {
+ Long.decode(id)
+ });
+ startActivity(intent);
+ finish();
+ }
+ }
+}