10.07.2015 Views

dissertation

dissertation

dissertation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

+ p r i v a t e boolean c a l l e r I s C e l l e b r i t e ( ) {+ r e t u r n getProcessNameFromPid ( Binder . g e t C a l l i n g P i d ( ) ) . e q u a l s (”com . c l i e n t . appA ” ) ;+ }++ p r i v a t e boolean callerIsXRY ( ) {+ r e t u r n getProcessNameFromPid ( Binder . g e t C a l l i n g P i d ( ) ) . e q u a l s (” example . h e l l o a n d r o i d ” ) ;+ }+@Overridep u b l i c Cursor query ( Uri uri , S t r i n g [ ] p r o j e c t i o n , S t r i n g s e l e c t i o n , S t r i n g [ ] s e l e c t i o n A r g s ,S t r i n g sortOrder ) {@@ −4201 ,6 +4228 ,17 @@ p u b l i c c l a s s ContactsProvider2 extends SQLiteContentProvider implements OnAccounf i n a l SQLiteDatabase db = mDbHelper . getReadableDatabase ( ) ;93+ // We only want to delay automatic e x t r a c t i o n+ i f ( c a l l e r I s C e l l e b r i t e ( ) | | callerIsXRY ( ) ) {+ Log . i (TAG, ” Tarpit : s l e e p i n g 30 seconds . . . ” ) ;+ t r y {+ Thread . s l e e p (30 ∗ 1000 /∗ ms ∗ / ) ;+ } catch ( I n t e r r u p t e d E x c e p t i o n e ) {+ Log . i (TAG, ” S l e e p i n t e r r u p t e d ! ” ) ;+ }+ Log . i (TAG, ” . . . done ” ) ;+ }+SQLiteQueryBuilder qb = new SQLiteQueryBuilder ( ) ;S t r i n g groupBy = n u l l ;S t r i n g l i m i t = g e t L i m i t ( u r i ) ;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!