Skip to content

Commit

Permalink
Remove the unnecessary personalization.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydeetay committed Jun 12, 2016
1 parent 293e9c8 commit c4f307f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 47 deletions.
2 changes: 0 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
<!-- For Google Analytics -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<uses-permission android:name="android.permission.GET_ACCOUNTS"/>

<uses-feature
android:name="android.hardware.location.gps"
android:required="false"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.google.android.stardroid.StardroidApplication;
import com.google.android.stardroid.activities.dialogs.EulaDialogFragment;
import com.google.android.stardroid.activities.dialogs.WhatsNewDialogFragment;
import com.google.android.stardroid.activities.util.NameSeeker;
import com.google.android.stardroid.activities.util.ConstraintsChecker;
import com.google.android.stardroid.inject.HasComponent;
import com.google.android.stardroid.util.Analytics;
import com.google.android.stardroid.util.MiscUtil;
Expand All @@ -49,8 +49,8 @@ public class SplashScreenActivity extends InjectableActivity
@Inject Animation fadeAnimation;
@Inject EulaDialogFragment eulaDialogFragmentWithButtons;
@Inject FragmentManager fragmentManager;
@Inject NameSeeker ns;
@Inject WhatsNewDialogFragment whatsNewDialogFragment;
@Inject ConstraintsChecker cc;
private View graphic;
private SplashScreenComponent daggerComponent;

Expand Down Expand Up @@ -161,7 +161,7 @@ public void dialogClosed() {

private void launchSkyMap() {
Intent intent = new Intent(SplashScreenActivity.this, DynamicStarMapActivity.class);
ns.check();
cc.check();
startActivity(intent);
finish();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

import com.google.android.stardroid.R;
import com.google.android.stardroid.StardroidApplication;
import com.google.android.stardroid.activities.util.NameSeeker;
import com.google.android.stardroid.inject.HasComponent;
import com.google.android.stardroid.util.MiscUtil;

Expand All @@ -25,7 +24,6 @@
public class WhatsNewDialogFragment extends DialogFragment {
private static final String TAG = MiscUtil.getTag(WhatsNewDialogFragment.class);
@Inject Activity parentActivity;
@Inject NameSeeker nameSeeker;
private CloseListener closeListener;

public interface CloseListener {
Expand All @@ -48,8 +46,7 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
LayoutInflater inflater = parentActivity.getLayoutInflater();
View view = inflater.inflate(R.layout.whatsnew_view, null);

String userName = nameSeeker.getFirstNameOrEmpty();
String whatsNewText = String.format(parentActivity.getString(R.string.whats_new_text), userName, getVersionName());
String whatsNewText = String.format(parentActivity.getString(R.string.whats_new_text), getVersionName());
Spanned formattedWhatsNewText = Html.fromHtml(whatsNewText);
TextView whatsNewTextView = (TextView) view.findViewById(R.id.whats_new_box_text);
whatsNewTextView.setText(formattedWhatsNewText, TextView.BufferType.SPANNABLE);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.google.android.stardroid.activities.util;

import javax.inject.Inject;

/**
* Created by johntaylor on 6/11/16.
*/
public class ConstraintsChecker {
@Inject
ConstraintsChecker() {
}

public boolean check() {
return true;
}
}

This file was deleted.

4 changes: 2 additions & 2 deletions app/src/main/res/values/whatsnew.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<resources>
<string name="whats_new_text" translation_description="Description of new features in this version in html">
<![CDATA[
<h1>Welcome %1$s</h1>
<h2>New in version %2$s</h2>
<h1>New in version %s</h1>
\t • Make the calibration dialogs less frequent<br/>
\t • Chinese translation fix<br/>
\t • Added Epsilon Lyrae (by request)<br/>
\t • New: no need to accept EULA with each update from now on<br/>
\t • Removes an unneeded permission<br/>
\t • Minor stability fixes<br/>
]]>
</string>
Expand Down

0 comments on commit c4f307f

Please sign in to comment.