title: error: cannot find symbol variable CLIP_SAVE_FLAG when targeting Android API 28
body: <p>I recently switched my targeted platform api from 26 to 28 and now I can't compile my project. </p>
  
  <p>I get this error: </p>
  
  <pre><code>error: cannot find symbol variable CLIP_SAVE_FLAG
  </code></pre>
  
  <p>when I use canvas.save() in my onDraw() method: </p>
  
  <pre><code>canvas.save(Canvas.CLIP_SAVE_FLAG | Canvas.MATRIX_SAVE_FLAG);
  </code></pre>
  
  <p>^complains about setting the properties above.  </p>
  
  <p>I have nearly the same issue logged here: <a href="https://github.com/umano/AndroidSlidingUpPanel/issues/921" rel="nofollow noreferrer">https://github.com/umano/AndroidSlidingUpPanel/issues/921</a></p>
  
  <p>How can I resolve this issue so that I can target the latest android apis. </p>
  
  <p>Thanks! </p>
  
  <p>EDIT: I checked the duplicate link here: </p>
  
  <p><a href="https://stackoverflow.com/questions/54148443/can-not-find-canvas-variables-in-api-level-28">Can not find Canvas variables in API Level 28</a></p>
  
  <p>but when using the canvas.saveLayer(), it's not support for APIs under 21. </p>
  
  <p>I get this error: </p>
  
  <pre><code>Call requires API level 21 (current min is 19): android.graphics.Canvas#saveLayer
  </code></pre>
  
  <p>What should I do if I need support for API 19 and above? </p>