Skip to content

Commit

Permalink
Editor code adds unnecessary permission on Android
Browse files Browse the repository at this point in the history
Fixes #15

Call for ‘SystemInfo.deviceUniqueIdentifier’ causes Unity to add
READ_PHONE_STATE permission when building for Android, though this code
is never run and not included in the build. Wrapped in preprocessor
directives to prevent unwanted permission.
  • Loading branch information
emmanuellemm committed Oct 22, 2014
1 parent e6ebb99 commit 208b0b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Binary file modified googleanalyticsv3.unitypackage
Binary file not shown.
4 changes: 4 additions & 0 deletions source/Plugins/GoogleAnalyticsV3/GoogleAnalyticsMPV3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ limitations under the License.
other than Android and iOS.
*/
public class GoogleAnalyticsMPV3 {
#if UNITY_ANDROID && !UNITY_EDITOR
#elif UNITY_IPHONE && !UNITY_EDITOR
#else
private string trackingCode;
private string bundleIdentifier;
private string appName;
Expand Down Expand Up @@ -416,4 +419,5 @@ public void SetOptOut(bool optOut) {
this.optOut = optOut;
}

#endif
}

0 comments on commit 208b0b7

Please sign in to comment.