question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AIRPLANE_MODE_ON check; logcat is beeing overflooded.

See original GitHub issue

I’m having the same issues as dentext right here: https://github.com/square/picasso/issues/274

The lines: import static android.provider.Settings.System.AIRPLANE_MODE_ON; and/or

static boolean isAirplaneModeOn(Context context) {
  ContentResolver contentResolver = context.getContentResolver();
  return Settings.System.getInt(contentResolver, AIRPLANE_MODE_ON, 0) != 0;
}

in picasso/src/main/java/com/squareup/picasso/Utils.javaW/Settings cause my logcat to say Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.

The only difference I have with dentex is that with me, the logcat gets overflooded with that line. We wrapped Picasso however, like so:

    public static void setupImage(Context context, ImageView view, String avatarId, boolean isCircle, Integer placeHolderId) {
        Picasso.Builder builder = new Picasso.Builder(context);
        Picasso picasso = builder.downloader(new ImageDownloader(context)).build();

        picasso.with(view.getContext());
        if(TextUtils.isEmpty(avatarId)) {
            if(placeHolderId == null) {
                return;
            } else {
                picasso.load(placeHolderId).into(view);
                return;
            }
        }

        picasso.setDebugging(true);

        RequestCreator creator = picasso.load(AvatarUtil.getUrl(avatarId));
        if(placeHolderId != null) {
            creator.placeholder(placeHolderId);
            if(view.getMeasuredWidth() != 0 && view.getMeasuredHeight() != 0) {
                creator.resize(view.getMeasuredWidth(), view.getMeasuredHeight());
            }
        }

        if (isCircle) {
            creator.transform(new CircleTransformation());
        }

        creator.into(view);
    }

Any idea why this happens and how I can solve it?

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
winne2commented, Feb 6, 2014

I would love to see Jake’s answer to this question in the Picasso documentation! This is so basic it should really be placed on http://square.github.io/picasso/ The basic documentation there leads to people using Picasso the wrong way.

0reactions
kramer65commented, Dec 24, 2013

Alright thanks! That makes things totally clear!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Phone's Processes Flooding LogCat Output - android
The problem is that certain phones are "noisier" than others and flood the LogCat buffer to the point of triggering a bug that...
Read more >
Nexus 5, 4.4: logcat spam from qcom_sensors_hal [36984364]
Just caught Google Search looking for my location, while these messages exploded into log cat. Turned off WiFi, no result. Turned on Airplane...
Read more >
GSI LTE Fix | Page 2 - XDA Forums
With or without the ims, it seems with LTE, toggling airplane mode off then on (which seems to count as a SIM reinsert...
Read more >
AOSP 10 GSI SMS issue all variant releases #976 - GitHub
Toggling Airplane mode pulls incoming un-received texts for a few seconds then locks back up. Attempted United States and Automatic for ...
Read more >
No OnePlus phone can connect to the wifi at my University.
Try looking through the phone's logs to see what's happening when you connect. You can do this via and with adb shell logcat...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found