forked from organicmaps/organicmaps-tmp
[android] Fixed review notes
This commit is contained in:
parent
594d424d69
commit
b0d7f9c79d
6 changed files with 12 additions and 17 deletions
|
@ -5,13 +5,11 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/sliding_tabs_layout"
|
||||
style="@style/MwmWidget.TabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/tabs_height"/>
|
||||
|
||||
<FrameLayout
|
||||
android:foreground="@drawable/shadow_top"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -22,4 +20,4 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -32,7 +32,6 @@ public abstract class AbstractLogBroadcastReceiver extends BroadcastReceiver
|
|||
+ !backgroundTracker().isForeground();
|
||||
LOGGER.i(getTag(), msg);
|
||||
CrashlyticsUtils.log(Log.INFO, getTag(), msg);
|
||||
assert intent != null;
|
||||
onReceiveInternal(context, intent);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,15 +19,11 @@ public class SystemDownloadCompletedReceiver extends AbstractLogBroadcastReceive
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onReceiveInternal(@NonNull Context context, @Nullable Intent intent)
|
||||
public void onReceiveInternal(@NonNull Context context, @NonNull Intent intent)
|
||||
{
|
||||
DownloadManager manager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
|
||||
if (manager == null || intent == null
|
||||
|| !DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals(intent.getAction()))
|
||||
{
|
||||
if (manager == null)
|
||||
return;
|
||||
}
|
||||
|
||||
intent.setClass(context, SystemDownloadCompletedService.class);
|
||||
context.startService(intent);
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ public class PlaceholderView extends FrameLayout
|
|||
try
|
||||
{
|
||||
attrsArray =
|
||||
context.getTheme().obtainStyledAttributes(attrs, R.styleable.PlaceholderView,0,0);
|
||||
context.getTheme().obtainStyledAttributes(attrs, R.styleable.PlaceholderView, 0, 0);
|
||||
mImgSrcDefault = attrsArray.getResourceId(
|
||||
R.styleable.PlaceholderView_imgSrcDefault,
|
||||
UiUtils.NO_ID);
|
||||
|
|
|
@ -687,12 +687,14 @@ public class PlacePageView extends RelativeLayout
|
|||
public boolean isEditableMapObject()
|
||||
{
|
||||
boolean isBookmark = MapObject.isOfType(MapObject.BOOKMARK, mMapObject);
|
||||
if (!isBookmark)
|
||||
return false;
|
||||
long id = Utils.<Bookmark>castTo(mMapObject).getBookmarkId();
|
||||
return BookmarkManager.INSTANCE.isEditableBookmark(id);
|
||||
|
||||
if (isBookmark)
|
||||
{
|
||||
long id = Utils.<Bookmark>castTo(mMapObject).getBookmarkId();
|
||||
return BookmarkManager.INSTANCE.isEditableBookmark(id);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void initHotelRatingView()
|
||||
{
|
||||
mHotelReview = findViewById(R.id.ll__place_hotel_rating);
|
||||
|
|
|
@ -217,7 +217,7 @@ public class Utils
|
|||
@NonNull
|
||||
public static <T> T castTo(@NonNull Object instance)
|
||||
{
|
||||
//noinspection unchecked
|
||||
// Noinspection unchecked
|
||||
return (T) instance;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue