OLD | NEW |
1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*- | 1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*- |
2 * This Source Code Form is subject to the terms of the Mozilla Public | 2 * This Source Code Form is subject to the terms of the Mozilla Public |
3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | 5 |
6 package org.mozilla.gecko; | 6 package org.mozilla.gecko; |
7 | 7 |
8 import org.mozilla.gecko.AppConstants.Versions; | 8 import org.mozilla.gecko.AppConstants.Versions; |
9 import org.mozilla.gecko.DynamicToolbar.PinReason; | 9 import org.mozilla.gecko.DynamicToolbar.PinReason; |
10 import org.mozilla.gecko.DynamicToolbar.VisibilityTransition; | 10 import org.mozilla.gecko.DynamicToolbar.VisibilityTransition; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 import android.graphics.drawable.BitmapDrawable; | 94 import android.graphics.drawable.BitmapDrawable; |
95 import android.graphics.drawable.Drawable; | 95 import android.graphics.drawable.Drawable; |
96 import android.net.Uri; | 96 import android.net.Uri; |
97 import android.nfc.NdefMessage; | 97 import android.nfc.NdefMessage; |
98 import android.nfc.NdefRecord; | 98 import android.nfc.NdefRecord; |
99 import android.nfc.NfcAdapter; | 99 import android.nfc.NfcAdapter; |
100 import android.nfc.NfcEvent; | 100 import android.nfc.NfcEvent; |
101 import android.os.Build; | 101 import android.os.Build; |
102 import android.os.Bundle; | 102 import android.os.Bundle; |
103 import android.os.StrictMode; | 103 import android.os.StrictMode; |
| 104 import android.support.v4.app.DialogFragment; |
104 import android.support.v4.app.Fragment; | 105 import android.support.v4.app.Fragment; |
105 import android.support.v4.app.FragmentManager; | 106 import android.support.v4.app.FragmentManager; |
106 import android.text.TextUtils; | 107 import android.text.TextUtils; |
107 import android.util.AttributeSet; | 108 import android.util.AttributeSet; |
108 import android.util.Base64; | 109 import android.util.Base64; |
109 import android.util.Base64OutputStream; | 110 import android.util.Base64OutputStream; |
110 import android.util.Log; | 111 import android.util.Log; |
111 import android.view.InputDevice; | 112 import android.view.InputDevice; |
112 import android.view.KeyEvent; | 113 import android.view.KeyEvent; |
113 import android.view.LayoutInflater; | 114 import android.view.LayoutInflater; |
(...skipping 2328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2442 onLocaleChanged(Locales.getLanguageTag(locale)); | 2443 onLocaleChanged(Locales.getLanguageTag(locale)); |
2443 } | 2444 } |
2444 }); | 2445 }); |
2445 break; | 2446 break; |
2446 default: | 2447 default: |
2447 super.onActivityResult(requestCode, resultCode, data); | 2448 super.onActivityResult(requestCode, resultCode, data); |
2448 } | 2449 } |
2449 } | 2450 } |
2450 | 2451 |
2451 private void showFirstrunPager() { | 2452 private void showFirstrunPager() { |
| 2453 final DialogFragment dialog = new org.adblockplus.browser.StartPane(); |
| 2454 dialog.show(getSupportFragmentManager(), "start_pane"); |
| 2455 |
| 2456 // Exiting here because we want to show our first run page instead of Mo
zilla's |
| 2457 // see https://issues.adblockplus.org/ticket/2774 |
| 2458 if (true) |
| 2459 { |
| 2460 return; |
| 2461 } |
| 2462 |
2452 if (mFirstrunPane == null) { | 2463 if (mFirstrunPane == null) { |
2453 final ViewStub firstrunPagerStub = (ViewStub) findViewById(R.id.firs
trun_pager_stub); | 2464 final ViewStub firstrunPagerStub = (ViewStub) findViewById(R.id.firs
trun_pager_stub); |
2454 mFirstrunPane = (FirstrunPane) firstrunPagerStub.inflate(); | 2465 mFirstrunPane = (FirstrunPane) firstrunPagerStub.inflate(); |
2455 mFirstrunPane.load(getSupportFragmentManager()); | 2466 mFirstrunPane.load(getSupportFragmentManager()); |
2456 mFirstrunPane.registerOnFinishListener(new FirstrunPane.OnFinishList
ener() { | 2467 mFirstrunPane.registerOnFinishListener(new FirstrunPane.OnFinishList
ener() { |
2457 @Override | 2468 @Override |
2458 public void onFinish() { | 2469 public void onFinish() { |
2459 BrowserApp.this.mFirstrunPane = null; | 2470 BrowserApp.this.mFirstrunPane = null; |
2460 } | 2471 } |
2461 }); | 2472 }); |
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3716 dispatcher, | 3727 dispatcher, |
3717 osLocale, | 3728 osLocale, |
3718 appLocale, | 3729 appLocale, |
3719 previousSession); | 3730 previousSession); |
3720 } | 3731 } |
3721 | 3732 |
3722 public static interface Refreshable { | 3733 public static interface Refreshable { |
3723 public void refresh(); | 3734 public void refresh(); |
3724 } | 3735 } |
3725 } | 3736 } |
OLD | NEW |