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

Side by Side 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.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 package org.adblockplus.browser; 18 package org.adblockplus.browser;
19 19
20 import android.content.Context;
20 import android.util.Log; 21 import android.util.Log;
21 import android.view.MenuItem; 22 import android.view.MenuItem;
22 23
23 import org.mozilla.gecko.Tab; 24 import org.mozilla.gecko.Tab;
24 import org.mozilla.gecko.Tabs; 25 import org.mozilla.gecko.Tabs;
25 import org.mozilla.gecko.util.NativeJSObject; 26 import org.mozilla.gecko.util.NativeJSObject;
26 import org.mozilla.gecko.util.ThreadUtils; 27 import org.mozilla.gecko.util.ThreadUtils;
27 28
28 public class BrowserAppUtils 29 public class BrowserAppUtils
29 { 30 {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 107 }
107 108
108 @Override 109 @Override
109 public void onApiRequestFailed(String errorMessage) 110 public void onApiRequestFailed(String errorMessage)
110 { 111 {
111 Log.e(TAG, "whitelistSite failed: " + errorMessage); 112 Log.e(TAG, "whitelistSite failed: " + errorMessage);
112 } 113 }
113 }, url, item.isChecked()); 114 }, url, item.isChecked());
114 } 115 }
115 116
117 public static boolean wasInstalledFromPlayStore(final Context context)
118 {
119 final String installer = context.getPackageManager().getInstallerPackageName (context.getPackageName());
120 return "com.android.vending".equals(installer);
121 }
122
116 private BrowserAppUtils() 123 private BrowserAppUtils()
117 { 124 {
118 // Shouldn't be instantiated. 125 // Shouldn't be instantiated.
119 } 126 }
120 } 127 }
OLDNEW

Powered by Google App Engine
This is Rietveld