code: private void setTargetDensity(DisplayMetrics metrics) {
          if (mDensity != metrics.density) {
              mDensity = metrics.density;
              invalidateSelf(false);
          }
      }
docs: Set the density at which this drawable will be rendered.
  
  @param metrics The display metrics for this drawable.