summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathanielWaggoner <nwaggoner@cyngn.com>2016-05-17 11:45:30 -0700
committerNathaniel Waggoner <nwaggoner@cyngn.com>2016-05-23 10:21:23 -0700
commit00ddbb6415b93a0ce84d7a04aa73984099144af4 (patch)
treec9ca30c1c72f8e06f659885e0d686b743db56748 /src
parent397e4de5f14a76c0a2382d6b072a2bc79714b9a6 (diff)
downloadandroid_packages_apps_Dialer-00ddbb6415b93a0ce84d7a04aa73984099144af4.tar.gz
android_packages_apps_Dialer-00ddbb6415b93a0ce84d7a04aa73984099144af4.tar.bz2
android_packages_apps_Dialer-00ddbb6415b93a0ce84d7a04aa73984099144af4.zip
View Note: removes the ability to make multiple notes for the same call.
You could take multiple notes for the same call while the ModButtonPresenter was visible. This resolves that so users will be taken to view the previously existing note, rather than try create a new one again. NOTES-114, NOTES-22 Change-Id: I250ffd4c0092f4ea438dc642ba0bb376df8fbaa6
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/calllog/DeepLinkPresenter.java3
-rw-r--r--src/com/android/dialer/deeplink/DeepLinkIntegrationManager.java15
2 files changed, 16 insertions, 2 deletions
diff --git a/src/com/android/dialer/calllog/DeepLinkPresenter.java b/src/com/android/dialer/calllog/DeepLinkPresenter.java
index 805fd6391..0e335ca04 100644
--- a/src/com/android/dialer/calllog/DeepLinkPresenter.java
+++ b/src/com/android/dialer/calllog/DeepLinkPresenter.java
@@ -77,9 +77,8 @@ public class DeepLinkPresenter {
public void viewNote() {
if (mDeepLink != null) {
- DeepLinkIntegrationManager.getInstance().sendContentSentEvent(mContext, mDeepLink,
+ DeepLinkIntegrationManager.getInstance().viewNote(mContext, mDeepLink,
new ComponentName(mContext, CallLogListItemViewHolder.class));
- mContext.startActivity(mDeepLink.createViewIntent());
}
}
}
diff --git a/src/com/android/dialer/deeplink/DeepLinkIntegrationManager.java b/src/com/android/dialer/deeplink/DeepLinkIntegrationManager.java
index 6af4d3ea2..971308ca3 100644
--- a/src/com/android/dialer/deeplink/DeepLinkIntegrationManager.java
+++ b/src/com/android/dialer/deeplink/DeepLinkIntegrationManager.java
@@ -141,6 +141,21 @@ public class DeepLinkIntegrationManager {
sendEvent(ctx, category, event, parameters);
}
+ /**
+ * View a given note in the application in which it was taken. Also logs metrics events for
+ * viewing the note.
+ *
+ * @param ctx Context to log metrics against and to start the activity against.
+ * @param deepLink The DeepLink for the content to view
+ * @param cn The ComponentName to log as the generator of the metrics event.
+ */
+ public void viewNote(Context ctx, DeepLink deepLink, ComponentName cn) {
+ if (deepLink != null && deepLink.getAlreadyHasContent()) {
+ sendContentSentEvent(ctx, deepLink, cn);
+ ctx.startActivity(deepLink.createViewIntent());
+ }
+ }
+
public void sendContentSentEvent(Context ctx, DeepLink deepLink, ComponentName cn) {
sendEvent(ctx, deepLink, cn, Categories.USER_ACTIONS, Events.CONTENT_SENT);
}