Themes: Fix native crash in libandroidfw

If a missing attribute needs to be added in somewhere in the middle
of the bag, a segfault would occur because we change curEntry to a
value that is beyond the set's allocated space.  This patch stores
curEntry in prevEntry before changing it's value and memmove uses
prevEntry to index the set.

Change-Id: Ie70f2ad465097c3acf76caa729999c424fb01ee2
(cherry picked from commit f60ee269f02eb7de853a87d658d1a67eece6a908)
Revert "frameworks: add persistent notification when USB OTG is connected"

This reverts commit 8beb51ce9eb29deb4ff3ddce86ae00d87d44b515.

(cherry picked from commit b17f404c5399551632af926b09173ffc83109ce7)