| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.preferences.privacy; | 5 package org.chromium.chrome.browser.preferences.privacy; |
| 6 | 6 |
| 7 import android.app.Activity; | 7 import android.app.Activity; |
| 8 import android.app.ActivityManager; | 8 import android.app.ActivityManager; |
| 9 import android.app.Dialog; | 9 import android.app.Dialog; |
| 10 import android.app.DialogFragment; | 10 import android.app.DialogFragment; |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 // We create our own ListView, as AlertDialog doesn't let us set a messa
ge and a list | 273 // We create our own ListView, as AlertDialog doesn't let us set a messa
ge and a list |
| 274 // adapter at the same time. | 274 // adapter at the same time. |
| 275 View messageAndListView = getActivity().getLayoutInflater().inflate( | 275 View messageAndListView = getActivity().getLayoutInflater().inflate( |
| 276 R.layout.clear_browsing_important_dialog_listview, null); | 276 R.layout.clear_browsing_important_dialog_listview, null); |
| 277 mSitesListView = (ListView) messageAndListView.findViewById(R.id.select_
dialog_listview); | 277 mSitesListView = (ListView) messageAndListView.findViewById(R.id.select_
dialog_listview); |
| 278 mSitesListView.setAdapter(mAdapter); | 278 mSitesListView.setAdapter(mAdapter); |
| 279 mSitesListView.setOnItemClickListener(mAdapter); | 279 mSitesListView.setOnItemClickListener(mAdapter); |
| 280 final AlertDialog.Builder builder = | 280 final AlertDialog.Builder builder = |
| 281 new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme) | 281 new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme) |
| 282 .setTitle(R.string.storage_clear_site_storage_title) | 282 .setTitle(R.string.storage_clear_site_storage_title) |
| 283 .setPositiveButton(R.string.clear_data_delete, listener) | 283 .setPositiveButton(R.string.clear_browsing_data_importan
t_dialog_button, |
| 284 listener) |
| 284 .setNegativeButton(R.string.cancel, listener) | 285 .setNegativeButton(R.string.cancel, listener) |
| 285 .setView(messageAndListView); | 286 .setView(messageAndListView); |
| 286 mDialog = builder.create(); | 287 mDialog = builder.create(); |
| 287 | 288 |
| 288 return mDialog; | 289 return mDialog; |
| 289 } | 290 } |
| 290 } | 291 } |
| OLD | NEW |