I just ran into this problem today, so the day before I did a screen replacement on a iPhone 7 Plus. Next day customer comes back saying ear piece not working. I opened it up and reorganized the cable and ear piece I made sure it did have the black tape over the gold pins. I made sure the gold pins on the ear piece were touching the gold dots on the cable. So tried to see if that fixed the problem and nothing. So I unlocked the phone and made a call and the ear piece magically started to work. I was so confused I know this isn’t really a solution but it was odd how to started to work once I unlocked the phone. Any thoughts?