Skip to content

New implementation for getCurrentProcessName - #427

Merged
william-ferguson-au merged 2 commits into
ACRA:masterfrom
F43nd1r:processname
Apr 10, 2016
Merged

New implementation for getCurrentProcessName#427
william-ferguson-au merged 2 commits into
ACRA:masterfrom
F43nd1r:processname

Conversation

@F43nd1r

@F43nd1r F43nd1r commented Apr 9, 2016

Copy link
Copy Markdown
Member

perform #424 (comment)
adapted from http://stackoverflow.com/a/21389402/4388512

Also: made DEV_LOGGING non-final. Developers might want to change this wihle testing their app. (It was made final by me in the first place in one of the automated passes.)

Depends upon #426

final String processName = getCurrentProcessName();
if (ACRA.DEV_LOGGING) log.d(LOG_TAG, "ACRA processName='" + processName + "'");
return (processName != null) && processName.equals(ACRA_PRIVATE_PROCESS_NAME);
return (processName != null) && processName.endsWith(ACRA_PRIVATE_PROCESS_NAME);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WHy change this from equals to endsWidth? equals is much more precise.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that when run on an 6.0 device, the process name is prepended with the package name. (I haven't tested on other versions, this might just be normal for the new getCurrentProcessName.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, just add an inline comment to that effect so that we know why when looking at it later.

@F43nd1r

F43nd1r commented Apr 10, 2016

Copy link
Copy Markdown
Member Author

I rebased this onto master to remove duplicated commits.

@william-ferguson-au
william-ferguson-au merged commit 73cf61d into ACRA:master Apr 10, 2016
@F43nd1r
F43nd1r deleted the processname branch May 4, 2018 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants