Android: Algorithm

=D