From a4cc38aa94add1371a312c414c095836eef53968 Mon Sep 17 00:00:00 2001 From: rome753 Date: Thu, 19 Sep 2019 11:55:18 +0800 Subject: [PATCH] Replace name. --- .../main/java/cc/rome753/activitytask/ActivityTask.java | 7 ------- .../cc/rome753/activitytask/view/ObserverTextView.java | 3 +++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/activitytaskview/src/main/java/cc/rome753/activitytask/ActivityTask.java b/activitytaskview/src/main/java/cc/rome753/activitytask/ActivityTask.java index 05b5f5a..94d4adf 100644 --- a/activitytaskview/src/main/java/cc/rome753/activitytask/ActivityTask.java +++ b/activitytaskview/src/main/java/cc/rome753/activitytask/ActivityTask.java @@ -99,7 +99,6 @@ public void handleMessage(Message msg) { if(info == null) { return; } - info.lifecycle = trimLifecycle(info.lifecycle); if(info.fragments != null) { FragmentTaskView fragmentTaskView = activityTaskView.findFragmentTaskView(info.activity); if(fragmentTaskView != null) { @@ -123,12 +122,6 @@ public void handleMessage(Message msg) { } } - private String trimLifecycle(String lifecycle) { - lifecycle = lifecycle.replace("onFragment", ""); - lifecycle = lifecycle.replace("onActivity", ""); - lifecycle = lifecycle.replace("SaveInstanceState", "SIS"); - return lifecycle; - } } } diff --git a/activitytaskview/src/main/java/cc/rome753/activitytask/view/ObserverTextView.java b/activitytaskview/src/main/java/cc/rome753/activitytask/view/ObserverTextView.java index 0e98fb7..aca01f0 100644 --- a/activitytaskview/src/main/java/cc/rome753/activitytask/view/ObserverTextView.java +++ b/activitytaskview/src/main/java/cc/rome753/activitytask/view/ObserverTextView.java @@ -43,6 +43,9 @@ public void setInfoText(String s, String lifecycle) { String tag = s.substring(i1); setTag(tag); + lifecycle = lifecycle.replace("onFragment", ""); + lifecycle = lifecycle.replace("onActivity", ""); + lifecycle = lifecycle.replace("SaveInstanceState", "SIS"); s = s.replace("Activity", "A…"); s = s.replace("Fragment", "F…"); s = s.replace(tag, " ") + lifecycle;