diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-05-30 05:40:01 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-05-30 05:40:01 +0000 |
commit | f07cf179dce2f07a28dab0ad51065f093f74c884 (patch) | |
tree | ad579bf4640f6c26f8dbac0be882036f2681d93a | |
parent | a993c2bf52eebff2ae1b5fc1e9402c7e387fa485 (diff) | |
parent | 6f871d423b01f2472115fee4d135e8bdd30c6a40 (diff) | |
download | android_packages_apps_Trebuchet-f07cf179dce2f07a28dab0ad51065f093f74c884.tar.gz android_packages_apps_Trebuchet-f07cf179dce2f07a28dab0ad51065f093f74c884.tar.bz2 android_packages_apps_Trebuchet-f07cf179dce2f07a28dab0ad51065f093f74c884.zip |
Merge "More debug tracing for RemoteActionShortcut" into ub-launcher3-qt-dev
-rw-r--r-- | src/com/android/launcher3/popup/RemoteActionShortcut.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/launcher3/popup/RemoteActionShortcut.java b/src/com/android/launcher3/popup/RemoteActionShortcut.java index f8b62427c..41ab4df7b 100644 --- a/src/com/android/launcher3/popup/RemoteActionShortcut.java +++ b/src/com/android/launcher3/popup/RemoteActionShortcut.java @@ -33,6 +33,7 @@ import com.android.launcher3.userevent.nano.LauncherLogProto; public class RemoteActionShortcut extends SystemShortcut<BaseDraggingActivity> { private static final String TAG = "RemoteActionShortcut"; + private static final boolean DEBUG = false; private final RemoteAction mAction; @@ -48,7 +49,10 @@ public class RemoteActionShortcut extends SystemShortcut<BaseDraggingActivity> { return view -> { AbstractFloatingView.closeAllOpenViews(activity); + final String actionIdentity = mAction.getTitle() + ", " + + itemInfo.getTargetComponent().getPackageName(); try { + if (DEBUG) Log.d(TAG, "Sending action: " + actionIdentity); mAction.getActionIntent().send( activity, 0, @@ -56,15 +60,16 @@ public class RemoteActionShortcut extends SystemShortcut<BaseDraggingActivity> { Intent.EXTRA_PACKAGE_NAME, itemInfo.getTargetComponent().getPackageName()), (pendingIntent, intent, resultCode, resultData, resultExtras) -> { + if (DEBUG) Log.d(TAG, "Action is complete: " + actionIdentity); if (resultData != null && !resultData.isEmpty()) { - Log.e(TAG, "Remote action returned result: " + mAction.getTitle() + Log.e(TAG, "Remote action returned result: " + actionIdentity + " : " + resultData); Toast.makeText(activity, resultData, Toast.LENGTH_SHORT).show(); } }, new Handler(Looper.getMainLooper())); } catch (PendingIntent.CanceledException e) { - Log.e(TAG, "Remote action canceled: " + mAction.getTitle(), e); + Log.e(TAG, "Remote action canceled: " + actionIdentity, e); Toast.makeText(activity, activity.getString( R.string.remote_action_failed, mAction.getTitle()), |