(String tag, int level)
| 155 | } |
| 156 | |
| 157 | private static boolean isLoggable(String tag, int level) { |
| 158 | if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.N_MR1 && tag.length() > 23) { |
| 159 | // IllegalArgumentException is thrown if the tag.length() > 23 for Nougat (7.1) and prior |
| 160 | // releases (API <= 25), there is no tag limit of concern after this API level. |
| 161 | return Log.isLoggable(tag.substring(0, 23), level); |
| 162 | } |
| 163 | return Log.isLoggable(tag, level); |
| 164 | } |
| 165 | } |