Updater Reminder
diff --git a/res/drawable-hdpi/updater_appicons.png b/res/drawable-hdpi/updater_appicons.png
new file mode 100644
index 0000000..ff09843
--- /dev/null
+++ b/res/drawable-hdpi/updater_appicons.png
Binary files differ
diff --git a/res/drawable-hdpi/updater_googleapps.png b/res/drawable-hdpi/updater_googleapps.png
new file mode 100644
index 0000000..d5b770f
--- /dev/null
+++ b/res/drawable-hdpi/updater_googleapps.png
Binary files differ
diff --git a/res/drawable-hdpi/updater_googleapps_dismiss_button.png b/res/drawable-hdpi/updater_googleapps_dismiss_button.png
new file mode 100644
index 0000000..6a46dcf
--- /dev/null
+++ b/res/drawable-hdpi/updater_googleapps_dismiss_button.png
Binary files differ
diff --git a/res/drawable-hdpi/updater_googleapps_dismiss_button_pressed.png b/res/drawable-hdpi/updater_googleapps_dismiss_button_pressed.png
new file mode 100644
index 0000000..bcca993
--- /dev/null
+++ b/res/drawable-hdpi/updater_googleapps_dismiss_button_pressed.png
Binary files differ
diff --git a/res/drawable-hdpi/updater_googleapps_pressed.png b/res/drawable-hdpi/updater_googleapps_pressed.png
new file mode 100644
index 0000000..9ea6e71
--- /dev/null
+++ b/res/drawable-hdpi/updater_googleapps_pressed.png
Binary files differ
diff --git a/res/drawable/button_apps_installer.xml b/res/drawable/button_apps_installer.xml
new file mode 100644
index 0000000..4c5f1e5
--- /dev/null
+++ b/res/drawable/button_apps_installer.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:drawable="@drawable/updater_googleapps_pressed" android:state_pressed="true"/>
+ <item android:drawable="@drawable/updater_googleapps"/>
+
+</selector>
\ No newline at end of file
diff --git a/res/drawable/button_dismiss_apps_installer.xml b/res/drawable/button_dismiss_apps_installer.xml
new file mode 100644
index 0000000..24fe79e
--- /dev/null
+++ b/res/drawable/button_dismiss_apps_installer.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:drawable="@drawable/updater_googleapps_dismiss_button_pressed" android:state_pressed="true"/>
+ <item android:drawable="@drawable/updater_googleapps_dismiss_button"/>
+
+</selector>
\ No newline at end of file
diff --git a/src/com/fairphone/updater/fragments/MainFragment.java b/src/com/fairphone/updater/fragments/MainFragment.java
index 648328e..8ffaedb 100644
--- a/src/com/fairphone/updater/fragments/MainFragment.java
+++ b/src/com/fairphone/updater/fragments/MainFragment.java
@@ -98,14 +98,19 @@
private boolean getGappsInstalationButtonState()
{
- return mSharedPreferences.getBoolean(SHARED_PREFERENCES_ENABLE_GAPPS, true) && !GappsInstallerHelper.areGappsInstalled();
+ return mSharedPreferences.getBoolean(SHARED_PREFERENCES_ENABLE_GAPPS, true) && !GappsInstallerHelper.areGappsInstalled() && getSelectedStoreFromSharedPreferences() != null;
}
+ protected Store getSelectedStoreFromSharedPreferences()
+ {
+ return UpdaterData.getInstance().getStore(mSharedPreferences.getInt(FairphoneUpdater.PREFERENCE_SELECTED_STORE_NUMBER, 0));
+ }
+
private void setGappsInstalationButtonState(boolean enableGapps)
{
Editor edit = mSharedPreferences.edit();
edit.putBoolean(SHARED_PREFERENCES_ENABLE_GAPPS, enableGapps);
-
+
edit.commit();
}
@@ -144,7 +149,7 @@
startGappsInstall();
}
});
-
+
mGappsDismissButton.setOnClickListener(new OnClickListener()
{
@@ -203,8 +208,14 @@
}
else
{
- mUpdateAvailableGroup.setVisibility(View.GONE);
- mVersionUpToDateGroup.setVisibility(View.VISIBLE);
+ if (mUpdateAvailableGroup != null)
+ {
+ mUpdateAvailableGroup.setVisibility(View.GONE);
+ }
+
+ if( mVersionUpToDateGroup != null){
+ mVersionUpToDateGroup.setVisibility(View.VISIBLE);
+ }
}
updateOtherOSOptionsGroup();