Fahad Ansari, who represented Hamas in their proscription case, is taking legal action to stop police searching his phone.