merge in klp-release history after reset to klp-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 99602f6..46a5387 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -45,6 +45,10 @@
<!-- allow broadcasting secret code intents that reboot the phone -->
<uses-permission android:name="android.permission.REBOOT" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+ <!-- This tells the activity manager to not delay any of our activity
+ start requests, even if they happen immediately after the user
+ presses home. -->
+ <uses-permission android:name="android.permission.STOP_APP_SWITCHES" />
<application
android:name="DialerApplication"
diff --git a/res/layout/call_log_list_item_extra.xml b/res/layout/call_log_list_item_extra.xml
index d3f86cf..fbf71f6 100644
--- a/res/layout/call_log_list_item_extra.xml
+++ b/res/layout/call_log_list_item_extra.xml
@@ -53,6 +53,7 @@
android:paddingTop="8dip"
android:src="@drawable/ic_close_dk"
android:background="?android:attr/selectableItemBackground"
- android:visibility="gone"/>
+ android:visibility="gone"
+ android:contentDescription="@string/description_dismiss"/>
</LinearLayout>
</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/tile_interactions_teaser_view.xml b/res/layout/tile_interactions_teaser_view.xml
index ee2b974..c329dd3 100644
--- a/res/layout/tile_interactions_teaser_view.xml
+++ b/res/layout/tile_interactions_teaser_view.xml
@@ -1,5 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2013 Google Inc. -->
+<!--
+ ~ Copyright (C) 2013 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
<com.android.dialer.list.TileInteractionTeaserView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
@@ -56,7 +70,8 @@
android:clickable="true"
android:scaleType="center"
android:src="@drawable/ic_cancel_holo_light"
- style="@style/DismissButtonStyle" />
+ style="@style/DismissButtonStyle"
+ android:contentDescription="@string/description_dismiss"/>
</LinearLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 98e5b43..55cdea4 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -632,4 +632,7 @@
[CHAR LIMIT=NONE]
-->
<string name="contact_tooltip">Tap image to see all numbers or press and hold to reorder</string>
+
+ <!-- Content description for dismiss button on badge. [CHAR LIMIT=NONE] -->
+ <string name="description_dismiss">Dismiss</string>
</resources>
diff --git a/src/com/android/dialer/calllog/ClearCallLogDialog.java b/src/com/android/dialer/calllog/ClearCallLogDialog.java
index 1f5b2b3..e6b4ce2 100644
--- a/src/com/android/dialer/calllog/ClearCallLogDialog.java
+++ b/src/com/android/dialer/calllog/ClearCallLogDialog.java
@@ -22,6 +22,7 @@
import android.app.FragmentManager;
import android.app.ProgressDialog;
import android.content.ContentResolver;
+import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.AsyncTask;
@@ -29,11 +30,16 @@
import android.provider.CallLog.Calls;
import com.android.dialer.R;
+import com.android.dialer.service.CachedNumberLookupService;
+import com.android.dialerbind.ObjectFactory;
/**
* Dialog that clears the call log after confirming with the user
*/
public class ClearCallLogDialog extends DialogFragment {
+ private static final CachedNumberLookupService mCachedNumberLookupService =
+ ObjectFactory.newCachedNumberLookupService();
+
/** Preferred way to show this dialog */
public static void show(FragmentManager fragmentManager) {
ClearCallLogDialog dialog = new ClearCallLogDialog();
@@ -43,6 +49,7 @@
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final ContentResolver resolver = getActivity().getContentResolver();
+ final Context context = getActivity().getApplicationContext();
final OnClickListener okListener = new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
@@ -53,6 +60,9 @@
@Override
protected Void doInBackground(Void... params) {
resolver.delete(Calls.CONTENT_URI, null, null);
+ if (mCachedNumberLookupService != null) {
+ mCachedNumberLookupService.clearAllCacheEntries(context);
+ }
return null;
}
@Override
diff --git a/src/com/android/dialer/service/CachedNumberLookupService.java b/src/com/android/dialer/service/CachedNumberLookupService.java
index 62881d2..5745c9d 100644
--- a/src/com/android/dialer/service/CachedNumberLookupService.java
+++ b/src/com/android/dialer/service/CachedNumberLookupService.java
@@ -34,4 +34,12 @@
public boolean isCacheUri(String uri);
public boolean addPhoto(Context context, String number, byte[] photo);
+
+ /**
+ * Remove all cached phone number entries from the cache, regardless of how old they
+ * are.
+ *
+ * @param context Valid context
+ */
+ public void clearAllCacheEntries(Context context);
}