| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.chrome.browser; | 5 package org.chromium.chrome.browser; |
| 6 | 6 |
| 7 import android.app.Dialog; | 7 import android.app.Dialog; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.graphics.Typeface; | 9 import android.graphics.Typeface; |
| 10 import android.net.http.SslCertificate; | 10 import android.net.http.SslCertificate; |
| 11 import android.text.format.DateFormat; | 11 import android.text.format.DateFormat; |
| 12 import android.util.Log; | 12 import android.util.Log; |
| 13 import android.view.View; | 13 import android.view.View; |
| 14 import android.view.ViewGroup; |
| 14 import android.view.Window; | 15 import android.view.Window; |
| 15 import android.widget.AdapterView; | 16 import android.widget.AdapterView; |
| 16 import android.widget.AdapterView.OnItemSelectedListener; | 17 import android.widget.AdapterView.OnItemSelectedListener; |
| 17 import android.widget.ArrayAdapter; | 18 import android.widget.ArrayAdapter; |
| 18 import android.widget.LinearLayout; | 19 import android.widget.LinearLayout; |
| 19 import android.widget.ScrollView; | 20 import android.widget.ScrollView; |
| 20 import android.widget.Spinner; | 21 import android.widget.Spinner; |
| 21 import android.widget.TextView; | 22 import android.widget.TextView; |
| 22 | 23 |
| 23 import org.chromium.base.ApiCompatibilityUtils; | 24 import org.chromium.base.ApiCompatibilityUtils; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 TextView title = new TextView(mContext); | 79 TextView title = new TextView(mContext); |
| 79 title.setText(R.string.certtitle); | 80 title.setText(R.string.certtitle); |
| 80 ApiCompatibilityUtils.setTextAppearance(title, android.R.style.TextAppea
rance_Large); | 81 ApiCompatibilityUtils.setTextAppearance(title, android.R.style.TextAppea
rance_Large); |
| 81 title.setTypeface(title.getTypeface(), Typeface.BOLD); | 82 title.setTypeface(title.getTypeface(), Typeface.BOLD); |
| 82 title.setPadding(mPadding, mPadding, mPadding, mPadding / 2); | 83 title.setPadding(mPadding, mPadding, mPadding, mPadding / 2); |
| 83 dialogContainer.addView(title); | 84 dialogContainer.addView(title); |
| 84 | 85 |
| 85 Spinner spinner = new Spinner(mContext); | 86 Spinner spinner = new Spinner(mContext); |
| 86 spinner.setAdapter(arrayAdapter); | 87 spinner.setAdapter(arrayAdapter); |
| 87 spinner.setOnItemSelectedListener(this); | 88 spinner.setOnItemSelectedListener(this); |
| 88 spinner.setPadding(0, 0, mPadding / 2, mPadding); | 89 spinner.setDropDownWidth(ViewGroup.LayoutParams.MATCH_PARENT); |
| 90 spinner.setPadding(0, 0, 0, mPadding); |
| 89 dialogContainer.addView(spinner); | 91 dialogContainer.addView(spinner); |
| 90 | 92 |
| 91 LinearLayout certContainer = new LinearLayout(mContext); | 93 LinearLayout certContainer = new LinearLayout(mContext); |
| 92 certContainer.setOrientation(LinearLayout.VERTICAL); | 94 certContainer.setOrientation(LinearLayout.VERTICAL); |
| 93 for (int i = 0; i < mViews.size(); ++i) { | 95 for (int i = 0; i < mViews.size(); ++i) { |
| 94 LinearLayout certificateView = mViews.get(i); | 96 LinearLayout certificateView = mViews.get(i); |
| 95 if (i != 0) { | 97 if (i != 0) { |
| 96 certificateView.setVisibility(LinearLayout.GONE); | 98 certificateView.setVisibility(LinearLayout.GONE); |
| 97 } | 99 } |
| 98 certContainer.addView(certificateView); | 100 certContainer.addView(certificateView); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 private static native String nativeGetCertInfoSerialNumberText(); | 242 private static native String nativeGetCertInfoSerialNumberText(); |
| 241 private static native String nativeGetCertInfoOrganizationUnitText(); | 243 private static native String nativeGetCertInfoOrganizationUnitText(); |
| 242 private static native String nativeGetCertIssuedByText(); | 244 private static native String nativeGetCertIssuedByText(); |
| 243 private static native String nativeGetCertValidityText(); | 245 private static native String nativeGetCertValidityText(); |
| 244 private static native String nativeGetCertIssuedOnText(); | 246 private static native String nativeGetCertIssuedOnText(); |
| 245 private static native String nativeGetCertExpiresOnText(); | 247 private static native String nativeGetCertExpiresOnText(); |
| 246 private static native String nativeGetCertFingerprintsText(); | 248 private static native String nativeGetCertFingerprintsText(); |
| 247 private static native String nativeGetCertSHA256FingerprintText(); | 249 private static native String nativeGetCertSHA256FingerprintText(); |
| 248 private static native String nativeGetCertSHA1FingerprintText(); | 250 private static native String nativeGetCertSHA1FingerprintText(); |
| 249 } | 251 } |
| OLD | NEW |