code: private void enableClipPathSupportIfNecessary() {
          if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN_MR1) {
              if (rippleRoundedCorners != 0) {
                  layerType = getLayerType();
                  setLayerType(LAYER_TYPE_SOFTWARE, null);
              } else {
                  setLayerType(layerType, null);
              }
          }
      }
docs: {@link Canvas#clipPath(Path)} is not supported in hardware accelerated layers
  before API 18. Use software layer instead
  <p/>
  https://developer.android.com/guide/topics/graphics/hardware-accel.html#unsupported