am 3d5ecf13: am 129f1946: Merge "Prevent index out of bounds when using String.substring." into lmp-sprout-dev
* commit '3d5ecf13e01da262b95ff78486297af3a0601d0c': Prevent index out of bounds when using String.substring.
This commit is contained in:
@@ -275,9 +275,10 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
|
||||
} else {
|
||||
mWallpaper.lastDiedTime = SystemClock.uptimeMillis();
|
||||
}
|
||||
final String flattened = name.flattenToString();
|
||||
EventLog.writeEvent(EventLogTags.WP_WALLPAPER_CRASHED,
|
||||
name.flattenToString().substring(0,
|
||||
MAX_WALLPAPER_COMPONENT_LOG_LENGTH));
|
||||
flattened.substring(0, Math.min(flattened.length(),
|
||||
MAX_WALLPAPER_COMPONENT_LOG_LENGTH)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user