Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: mobile/android/thirdparty/org/adblockplus/browser/BrowserAppUtils.java

Issue 29341330: Issue 3135 - Show the first run slide about the beta community to users that installed via Play and… (Closed)
Patch Set: Created May 12, 2016, 3:21 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mobile/android/thirdparty/org/adblockplus/browser/BrowserAppUtils.java
===================================================================
--- a/mobile/android/thirdparty/org/adblockplus/browser/BrowserAppUtils.java
+++ b/mobile/android/thirdparty/org/adblockplus/browser/BrowserAppUtils.java
@@ -12,16 +12,17 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
package org.adblockplus.browser;
+import android.content.Context;
import android.util.Log;
import android.view.MenuItem;
import org.mozilla.gecko.Tab;
import org.mozilla.gecko.Tabs;
import org.mozilla.gecko.util.NativeJSObject;
import org.mozilla.gecko.util.ThreadUtils;
@@ -108,13 +109,19 @@ public class BrowserAppUtils
@Override
public void onApiRequestFailed(String errorMessage)
{
Log.e(TAG, "whitelistSite failed: " + errorMessage);
}
}, url, item.isChecked());
}
+ public static boolean wasInstalledFromPlayStore(final Context context)
+ {
+ final String installer = context.getPackageManager().getInstallerPackageName(context.getPackageName());
+ return "com.android.vending".equals(installer);
+ }
+
private BrowserAppUtils()
{
// Shouldn't be instantiated.
}
}

Powered by Google App Engine
This is Rietveld