| Left: | ||
| Right: |
| 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 /* | |
|
Felix Dahlke
2015/07/20 08:14:22
Instead of commenting this out, we could do someth
René Jeschke
2015/07/20 16:48:36
Done.
| |
| 2456 Removed to revert to previous start pane behaviour, see https://issues.adblock plus.org/ticket/2774 | |
|
Felix Dahlke
2015/07/20 08:14:22
At this point this "start pane" is just ours - and
René Jeschke
2015/07/20 16:48:36
Done.
| |
| 2452 if (mFirstrunPane == null) { | 2457 if (mFirstrunPane == null) { |
| 2453 final ViewStub firstrunPagerStub = (ViewStub) findViewById(R.id.firs trun_pager_stub); | 2458 final ViewStub firstrunPagerStub = (ViewStub) findViewById(R.id.firs trun_pager_stub); |
| 2454 mFirstrunPane = (FirstrunPane) firstrunPagerStub.inflate(); | 2459 mFirstrunPane = (FirstrunPane) firstrunPagerStub.inflate(); |
| 2455 mFirstrunPane.load(getSupportFragmentManager()); | 2460 mFirstrunPane.load(getSupportFragmentManager()); |
| 2456 mFirstrunPane.registerOnFinishListener(new FirstrunPane.OnFinishList ener() { | 2461 mFirstrunPane.registerOnFinishListener(new FirstrunPane.OnFinishList ener() { |
| 2457 @Override | 2462 @Override |
| 2458 public void onFinish() { | 2463 public void onFinish() { |
| 2459 BrowserApp.this.mFirstrunPane = null; | 2464 BrowserApp.this.mFirstrunPane = null; |
| 2460 } | 2465 } |
| 2461 }); | 2466 }); |
| 2462 } | 2467 } |
| 2463 | 2468 |
| 2464 mHomePagerContainer.setVisibility(View.VISIBLE); | 2469 mHomePagerContainer.setVisibility(View.VISIBLE); |
| 2470 */ | |
| 2465 } | 2471 } |
| 2466 | 2472 |
| 2467 private void showHomePager(String panelId) { | 2473 private void showHomePager(String panelId) { |
| 2468 showHomePagerWithAnimator(panelId, null); | 2474 showHomePagerWithAnimator(panelId, null); |
| 2469 } | 2475 } |
| 2470 | 2476 |
| 2471 private void showHomePagerWithAnimator(String panelId, PropertyAnimator anim ator) { | 2477 private void showHomePagerWithAnimator(String panelId, PropertyAnimator anim ator) { |
| 2472 if (isHomePagerVisible()) { | 2478 if (isHomePagerVisible()) { |
| 2473 // Home pager already visible, make sure it shows the correct panel. | 2479 // Home pager already visible, make sure it shows the correct panel. |
| 2474 mHomePager.showPanel(panelId); | 2480 mHomePager.showPanel(panelId); |
| (...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3716 dispatcher, | 3722 dispatcher, |
| 3717 osLocale, | 3723 osLocale, |
| 3718 appLocale, | 3724 appLocale, |
| 3719 previousSession); | 3725 previousSession); |
| 3720 } | 3726 } |
| 3721 | 3727 |
| 3722 public static interface Refreshable { | 3728 public static interface Refreshable { |
| 3723 public void refresh(); | 3729 public void refresh(); |
| 3724 } | 3730 } |
| 3725 } | 3731 } |
| OLD | NEW |