Android: Reset m_usePrimaryClip when clearing the clip data

The variable needs to be set to false when we clear the clip data as
there is no primary clip anymore so we should not try to access it when
setting new data.

Fixes: QTBUG-93831
Pick-to: 6.1 5.15
Change-Id: I309270dc075fcb0457607561ee23e12f7eb6397f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
Andy Shaw 2021-05-19 11:43:23 +02:00
parent 7bc91dbe93
commit 96982bab0c

View File

@ -1026,6 +1026,7 @@ public class QtNative
{
if (Build.VERSION.SDK_INT >= 28 && m_clipboardManager != null)
m_clipboardManager.clearPrimaryClip();
m_usePrimaryClip = false;
}
private static void setClipboardText(String text)
{