Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #710 from matzew/AGPUSH-1611
Browse files Browse the repository at this point in the history
Agpush 1611
  • Loading branch information
matzew committed May 8, 2016
2 parents 77283fa + 0f6060c commit 5b69d79
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion admin-ui/app/dialogs/create-variant.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ <h4 class="modal-title" id="myModalLabel">{{ isNew ? 'Add' : 'Edit' }} Variant</
<label class="col-sm-3 control-label" for="gcmProjectNumber"></label>
<div class="col-sm-7">
Project Number<br>
<input type="text" placeholder="e.g. 42" id="gcmProjectNumber" class="form-control" ng-model="variant.projectNumber" ng-required="variant.type == 'android'">
<input type="text" placeholder="e.g. 42" id="gcmProjectNumber" class="form-control" ng-model="variant.projectNumber">
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion admin-ui/app/snippets/register-device/android.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class PushApplication extends Application {

private final String VARIANT_ID = "{{ variant.variantID }}";
private final String SECRET = "{{ variant.secret }}";
private final String GCM_SENDER_ID = "{{ variant.projectNumber }}";
private final String GCM_SENDER_ID = {{ variant.projectNumber ? '"' + variant.projectNumber + '";': '""; // getString(R.string.gcm_defaultSenderId)'}}
private final String UNIFIED_PUSH_URL = "{{ contextPath }}";

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class AndroidVariant extends Variant {
@Size(min = 1, max = 255, message = "Google Cloud Messaging Key must be max. 255 chars long")
private String googleKey;

@Size(min = 1, max = 255, message = "Project Number must be max. 255 chars long")
@Size(max = 255, message = "Project Number must be max. 255 chars long")
private String projectNumber;

/**
Expand Down Expand Up @@ -64,4 +64,4 @@ public void setGoogleKey(final String googleKey) {
public VariantType getType() {
return VariantType.ANDROID;
}
}
}

0 comments on commit 5b69d79

Please sign in to comment.