// ĠCopyright Ġ( c ) Ġ 2 0 1 9 Ġ. ĠWil ber force ĠU w ad ie gw u . ĠAll ĠRights ĠReserved . Ċ Ċ package Ġcom . j ade byte . j ade player . main . songs Ċ Ċ import Ġandroid . app . Application Ċ import Ġandroid . net . Uri Ċ import Ġandroid . provider . Media Store Ċ import Ġcom . j ade byte . j ade player . main . common . data . Media Store Repository Ċ import Ġcom . j ade byte . j ade player . main . common . view . Base Media Store ViewModel Ċ Ċ /** Ċ Ġ* ĠCreated Ġby ĠWil ber force Ġon Ġ 1 9 / 0 4 / 2 0 1 9 Ġat Ġ 1 5 : 0 6 . Ċ Ġ*/ Ċ open Ġclass ĠS ongs ViewModel ( application : ĠApplication ) Ġ: ĠBase Media Store ViewModel < Song >( application ) Ġ{ ĊĊĠĠĠ Ġoverride Ġvar Ġrepository : ĠMedia Store Repository < Song > Ġ= ĠS ongs Repository ( application ) ĊĊĠĠĠ Ġoverride Ġvar Ġselection : ĠString ? Ġ= Ġbasic S ongs Selection ĊĊĠĠĠ Ġoverride Ġvar Ġselection Args : ĠArray < String >? Ġ= Ġbasic S ongs Selection Args ĊĊĠĠĠ Ġoverride Ġvar Ġsort Order : ĠString ? Ġ= Ġbasic S ongs Order ĊĊĠĠĠ Ġoverride Ġvar Ġuri : ĠUri Ġ= Ġbase Song Uri ĊĊĠĠĠ Ġoverride Ġvar Ġprojection : ĠArray < String >? Ġ= Ġbase S ongs Projection Ċ } Ċ Ċ val Ġbase S ongs Projection Ġ= ĠarrayOf ( ĊĠĠĠ ĠMedia Store . Audio . Media . TITLE , ĊĠĠĠ ĠMedia Store . Audio . Media . AR TI ST , ĊĠĠĠ ĠMedia Store . Audio . Media . AL BU M _ ID , ĊĠĠĠ ĠMedia Store . Audio . Media . AL BU M , ĊĠĠĠ ĠMedia Store . Audio . Media . DURATION , ĊĠĠĠ ĠMedia Store . Audio . Media . DATA , ĊĠĠĠ ĠMedia Store . Audio . Media . AR TI ST , ĊĠĠĠ ĠMedia Store . Audio . Media . TRACK , ĊĠĠĠ ĠMedia Store . Audio . Media . AL BU M _ ID , ĊĠĠĠ ĠMedia Store . Audio . Media . AR TI ST _ ID , ĊĠĠĠ ĠMedia Store . Audio . Media . TITLE _ KEY , ĊĠĠĠ ĠMedia Store . Audio . Media . AL BU M _ KEY , ĊĠĠĠ ĠMedia Store . Audio . Media ._ ID Ċ ) Ċ Ċ // ĠSort Ġwith Ġthe Ġtitle Ġin Ġascending Ġcase - ins ensitive Ġorder Ċ const Ġval Ġbasic S ongs Order Ġ= Ġ"${ Media Store . Audio . Media . TITLE } ĠCOLLATE ĠNO CASE ĠASC " Ċ Ċ const Ġval Ġbasic S ongs Selection Ġ= Ġ"${ Media Store . Audio . Media . IS _ M US IC } Ġ!= Ġ? " Ċ Ċ val Ġbase Song Uri : ĠUri Ġ= ĠMedia Store . Audio . Media . EXTERNAL _ CONTENT _ URI Ċ Ċ val Ġbasic S ongs Selection Args Ġget () Ġ= ĠarrayOf ( basic S ongs Selection Arg ) Ċ Ċ const Ġval Ġbasic S ongs Selection Arg Ġ= Ġ" 0 "