diff options
author | Doris Liu <tianliu@google.com> | 2013-07-02 12:03:32 -0700 |
---|---|---|
committer | Doris Liu <tianliu@google.com> | 2013-07-02 12:10:51 -0700 |
commit | 6a83d528b09c55ade6ad44b82c81d4476ac57441 (patch) | |
tree | 7cd7b44ce70979f98947d6f282b375463e98b71a /src/com/android/camera/PhotoModule.java | |
parent | a9be5b3d573b1b5511300272fca5b320bdc0aae0 (diff) | |
download | android_packages_apps_Snap-6a83d528b09c55ade6ad44b82c81d4476ac57441.tar.gz android_packages_apps_Snap-6a83d528b09c55ade6ad44b82c81d4476ac57441.tar.bz2 android_packages_apps_Snap-6a83d528b09c55ade6ad44b82c81d4476ac57441.zip |
Add in carlsbad: Avoid duplicated location popups
Bug: 9505556
Change-Id: I00859d8d851ea3c75d3bda4fcf5df373f06c2ee0
Diffstat (limited to 'src/com/android/camera/PhotoModule.java')
-rw-r--r-- | src/com/android/camera/PhotoModule.java | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index 7c4487b90..6ca26aa3e 100644 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -18,11 +18,9 @@ package com.android.camera; import android.annotation.TargetApi; import android.app.Activity; -import android.app.AlertDialog; import android.content.ContentProviderClient; import android.content.ContentResolver; import android.content.Context; -import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences.Editor; import android.content.res.Configuration; @@ -462,29 +460,12 @@ public class PhotoModule // If there is no back camera, do not show the prompt. return; } + mUI.showLocationDialog(); + } - new AlertDialog.Builder(mActivity) - .setTitle(R.string.remember_location_title) - .setMessage(R.string.remember_location_prompt) - .setPositiveButton(R.string.remember_location_yes, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int arg1) { - setLocationPreference(RecordLocationPreference.VALUE_ON); - } - }) - .setNegativeButton(R.string.remember_location_no, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int arg1) { - dialog.cancel(); - } - }) - .setOnCancelListener(new DialogInterface.OnCancelListener() { - @Override - public void onCancel(DialogInterface dialog) { - setLocationPreference(RecordLocationPreference.VALUE_OFF); - } - }) - .show(); + public void enableRecordingLocation(boolean enable) { + setLocationPreference(enable ? RecordLocationPreference.VALUE_ON + : RecordLocationPreference.VALUE_OFF); } private void setLocationPreference(String value) { |