Fix the way theme-compat is written and read back from packages.xml so that these settings are restored correctly on device boot.

Change-Id: Ib426465ec05326ea4a8499e3d7d9754b8dc751e3
Check that the @ppbar is in the OPENED state when the back button is pressed to prevent starting the closing animation repeatedly.

Change-Id: I0ae801ca9371e8c63dd9b1a8ea642cfab9b7f3d5