Skip to content

Commit 5f477ae

Browse files
author
Devota Aabel
committed
Changed access modifiers and made ImageCreator.getInstance synchronized
1 parent f625092 commit 5f477ae

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/instruction/ExitSignCreator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class ExitSignCreator extends NodeCreator<BannerComponentNode, ExitSignVerifier>
2525
}
2626

2727
@Override
28-
BannerComponentNode setupNode(BannerComponents components, int index, int startIndex, String
29-
modifier) {
28+
BannerComponentNode setupNode(BannerComponents components, int index, int startIndex,
29+
String modifier) {
3030
if (components.type().equals(EXIT)) {
3131
return null;
3232
} else if (components.type().equals(EXIT_NUMBER)) {

libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/instruction/ImageCreator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private void addShieldInfo(BannerComponents bannerComponents, int index) {
6161
*
6262
* @return ImageCoordinator
6363
*/
64-
public static ImageCreator getInstance() {
64+
public static synchronized ImageCreator getInstance() {
6565
if (instance == null) {
6666
instance = new ImageCreator(new ImageVerifier());
6767
}

libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/instruction/InstructionTarget.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ public class InstructionTarget implements Target {
2929
this(textView, instructionSpannable, shields, shield, new TextViewUtils(), instructionLoadedCallback);
3030
}
3131

32-
InstructionTarget(TextView textView, Spannable instructionSpannable, List<BannerShield> shields,
33-
BannerShield shield, TextViewUtils textViewUtils,
34-
InstructionLoadedCallback instructionLoadedCallback) {
32+
private InstructionTarget(TextView textView, Spannable instructionSpannable, List<BannerShield> shields,
33+
BannerShield shield, TextViewUtils textViewUtils,
34+
InstructionLoadedCallback instructionLoadedCallback) {
3535
this.textView = textView;
3636
this.instructionSpannable = instructionSpannable;
3737
this.shields = shields;

libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/instruction/TextCreator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class TextCreator extends NodeCreator<BannerComponentNode, TextVerifier> {
1010
this(new TextVerifier());
1111
}
1212

13-
TextCreator(TextVerifier textVerifier) {
13+
private TextCreator(TextVerifier textVerifier) {
1414
super(textVerifier);
1515
}
1616

libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/instruction/TextViewUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ void setImageSpan(TextView textView, View view, int start, int end) {
3535
setImageSpan(textView, bitmap, start, end);
3636
}
3737

38-
void setImageSpan(TextView textView, Bitmap bitmap, int start, int end) {
38+
private void setImageSpan(TextView textView, Bitmap bitmap, int start, int end) {
3939
Drawable drawable = createDrawable(textView, bitmap);
4040
setImageSpan(textView, drawable, start, end);
4141
}
4242

43-
void setImageSpan(TextView textView, Drawable drawable, int start, int end) {
43+
private void setImageSpan(TextView textView, Drawable drawable, int start, int end) {
4444
Spannable instructionSpannable = new SpannableString(textView.getText());
4545

4646
instructionSpannable.setSpan(new ImageSpan(drawable),

0 commit comments

Comments
 (0)