commit | 4bd260ae68afa0bc475dc06e59fb94fb57f43351 | [log] [tgz] |
---|---|---|
author | Zhen Zhang <zzhen@google.com> | Thu Oct 10 16:34:31 2019 -0700 |
committer | Zhen Zhang <zzhen@google.com> | Wed Oct 16 20:42:36 2019 +0000 |
tree | 4f88d906024eb3c3ce49361b2d06cbae8c68c59c | |
parent | b5adbe4dfbcf175eb27139218ad0ebb7146af267 [diff] |
Create a method for top K targets by using min heap algorithm This is a in-place sorting method. After sorting, top K targets will be at the first K indexes. Order for other elements will remain same. The method is meant for getting top K ranked targets for Share-sheet. Bug: 142558305 Test: Passed all unit tests in ResolverActivityTest, ChooserActivityTest and ResolverListControllerTest Change-Id: I1b096bb0d7f7bbc102c2fb588c55ace6a20bfc5d