From 214c76cd70e69e6787fb5967b35f858574995d6a Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Wed, 5 Sep 2018 16:58:45 -0700 Subject: [PATCH] Framework: Remove a nonsensical substring(0) String.substring(0) will return the same String instance. There is also no reason to make a copy. Found by errorprone. Bug: 114129741 Test: m Change-Id: Ic089f04efc3c73f70aa15a132d62ac665c8b8f4c --- core/java/android/appwidget/AppWidgetProviderInfo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/appwidget/AppWidgetProviderInfo.java b/core/java/android/appwidget/AppWidgetProviderInfo.java index 53315cce82dd6..d148afb32b028 100644 --- a/core/java/android/appwidget/AppWidgetProviderInfo.java +++ b/core/java/android/appwidget/AppWidgetProviderInfo.java @@ -400,7 +400,7 @@ public class AppWidgetProviderInfo implements Parcelable { that.initialLayout = this.initialLayout; that.initialKeyguardLayout = this.initialKeyguardLayout; that.configure = this.configure == null ? null : this.configure.clone(); - that.label = this.label == null ? null : this.label.substring(0); + that.label = this.label; that.icon = this.icon; that.previewImage = this.previewImage; that.autoAdvanceViewId = this.autoAdvanceViewId;