Merge lp:~karni/ubuntuone-android-music/fix-demo-purchase into lp:ubuntuone-android-music

Proposed by Michał Karnicki
Status: Merged
Approved by: Chad Miller
Approved revision: 563
Merged at revision: 563
Proposed branch: lp:~karni/ubuntuone-android-music/fix-demo-purchase
Merge into: lp:ubuntuone-android-music
Diff against target: 44 lines (+22/-2)
1 file modified
src/net/sourceforge/subsonic/androidapp/activity/StoreActivity.java (+22/-2)
To merge this branch: bzr merge lp:~karni/ubuntuone-android-music/fix-demo-purchase
Reviewer Review Type Date Requested Status
Chad Miller (community) Approve
Review via email: mp+94561@code.launchpad.net

Description of the change

Only display purchase options in Ubuntu One customer mode. Otherwise, display learn-more style pages.

To post a comment you must log in.
Revision history for this message
Chad Miller (cmiller) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/net/sourceforge/subsonic/androidapp/activity/StoreActivity.java'
--- src/net/sourceforge/subsonic/androidapp/activity/StoreActivity.java 2011-11-07 21:48:01 +0000
+++ src/net/sourceforge/subsonic/androidapp/activity/StoreActivity.java 2012-02-24 15:02:00 +0000
@@ -82,9 +82,15 @@
82 private static final String UBUNTUONE_FROM_OAUTH_URL =82 private static final String UBUNTUONE_FROM_OAUTH_URL =
83 UBUNTUONE_URL + "/api/1.0/from_oauth/";83 UBUNTUONE_URL + "/api/1.0/from_oauth/";
84 84
85 private static final String LEARN_MORE_STREAMING_URL =
86 UBUNTUONE_URL + "/services/music/?hide-hdft=1";
87
85 private static final String PURCHASE_STREAMING_URL =88 private static final String PURCHASE_STREAMING_URL =
86 UBUNTUONE_URL + "/services/music-streaming/?hide-hdft=1";89 UBUNTUONE_URL + "/services/music-streaming/?hide-hdft=1";
87 90
91 private static final String LEARN_MORE_STORAGE_URL =
92 UBUNTUONE_URL + "/services/free/?hide-hdft=1";
93
88 private static final String PURCHASE_STORAGE_URL =94 private static final String PURCHASE_STORAGE_URL =
89 UBUNTUONE_URL + "/services/add-storage/?hide-hdft=1";95 UBUNTUONE_URL + "/services/add-storage/?hide-hdft=1";
90 96
@@ -122,8 +128,22 @@
122 return;128 return;
123 }129 }
124 130
125 mLoginTask = new LoginTask();131 int serverId = Util.getActiveServer(this);
126 mLoginTask.execute();132 if (serverId == Util.SERVER_ID_UBUNTUONE_CUSTOMER) {
133 mLoginTask = new LoginTask();
134 mLoginTask.execute();
135 } else {
136 final Intent intent = getIntent();
137 if (intent != null) {
138 if (STORAGE.equals(intent.getStringExtra(KEY_PURCHASE))) {
139 webView.loadUrl(LEARN_MORE_STORAGE_URL);
140 } else {
141 webView.loadUrl(LEARN_MORE_STREAMING_URL);
142 }
143 } else {
144 webView.loadUrl(LEARN_MORE_STREAMING_URL);
145 }
146 }
127 147
128 mTracker = GoogleAnalyticsTracker.getInstance();148 mTracker = GoogleAnalyticsTracker.getInstance();
129 mTracker.start(Analytics.ACCOUNT, this);149 mTracker.start(Analytics.ACCOUNT, this);

Subscribers

People subscribed via source and target branches

to status/vote changes: