Android.Play.ExpansionLibrary icon indicating copy to clipboard operation
Android.Play.ExpansionLibrary copied to clipboard

ServerManagedPolicy and ApkExpansionPolicy use the same preferences file

Open BCSharp opened this issue 8 years ago • 0 comments

Originally, ServerManagedPolicy stored its data in a preferences file named "com.android.vending.licensing.ServerManagedPolicy", while ApkExpansionPolicy used a preferences file named "com.android.vending.licensing.APKExpansionPolicy". During refactoring (commit 1dbb36ff4c1e971a03e734dc18fbc066443b2f05), when ApkExpansionPolicy became a subclass of ServerManagedPolicy, things got lost. Now ServerManagedPolicy determines the file name, and while ApkExpansionPolicy still defines its own preferences file name, it is not used anywhere by the code — constants are not virtual.

This pull request fixes the problem and allows any subclass of ServerManagedPolicy to have its own preferences file. It also removes the compiler warning that the derived class constant masks the base class constant.

BCSharp avatar Feb 23 '17 03:02 BCSharp