Skip to content

Easily reproducible crash accessing Context constants #235

Closed

Description

@jtoledo1974

The following code crashes the remote shell (as it does on my app, as well)

from jnius import autoclass
PythonActivity = autoclass('org.renpy.android.PythonActivity')
activity = PythonActivity.mActivity
activity.POWER_MANAGER

It should return the string "power", as defined in the the Context class android API

I've checked it crashes as well when accessing WIFI_POWER, for instance. I suspect it's the same for other constants.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Activity

  1. FeralBytes commented on Feb 13, 2015

    @FeralBytes
    Contributor

    When it crashes, what does adb logcat produce? I think it is probably a permission issue. Or after researching you may have the wrong object POWER_MANAGER should be POWER_SERVICE at least according android.app.Activity Even android.content.Context does not define POWER_MANAGER.
    Also WIFI_POWER should be WIFI_SERVICE.

  2. FeralBytes commented on Feb 10, 2017

    @FeralBytes
    Contributor

    This should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions