getAccountsByType gibt in marshmallow @ nichts zurü

Now das ist seltsam ...

Mit

AccountManager.newChooseAccountIntent(null, null, new String[] {"com.google"}, null, null, null, null);

gibt mir eine Liste von Konten. Aber mit

AccountManager.get(context).getAccountsByType("com.google")

returns 0 accounts. Das Problem tritt nur bei Marshmallow auf.

<uses-permission android:name="android.permission.GET_ACCOUNTS" />

existiert immer noch im Manifest.

Irgendwelche Ideen...

UPDATE: Stellt sich heraus, muss die Erlaubnis für GET_ACCOUNTS erfragen, auch wenn die Dokumentation etwas anderes sagt ... (siehe Kommentare)