removing warnings on deprecated api when targeting to android-15+
This commit is contained in:
parent
a2430afcac
commit
4e4db94b6b
@ -32,7 +32,7 @@ public abstract class BaseLoaderCallback implements LoaderCallbackInterface {
|
|||||||
RestartMessage.setTitle("App restart is required");
|
RestartMessage.setTitle("App restart is required");
|
||||||
RestartMessage.setMessage("Application will be closed now. Start it when installation will be finished!");
|
RestartMessage.setMessage("Application will be closed now. Start it when installation will be finished!");
|
||||||
RestartMessage.setCancelable(false); // This blocks the 'BACK' button
|
RestartMessage.setCancelable(false); // This blocks the 'BACK' button
|
||||||
RestartMessage.setButton("OK", new OnClickListener() {
|
RestartMessage.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
mAppContext.finish();
|
mAppContext.finish();
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ public abstract class BaseLoaderCallback implements LoaderCallbackInterface {
|
|||||||
MarketErrorMessage.setTitle("OpenCV Manager");
|
MarketErrorMessage.setTitle("OpenCV Manager");
|
||||||
MarketErrorMessage.setMessage("Package installation failed!");
|
MarketErrorMessage.setMessage("Package installation failed!");
|
||||||
MarketErrorMessage.setCancelable(false); // This blocks the 'BACK' button
|
MarketErrorMessage.setCancelable(false); // This blocks the 'BACK' button
|
||||||
MarketErrorMessage.setButton("OK", new OnClickListener() {
|
MarketErrorMessage.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
mAppContext.finish();
|
mAppContext.finish();
|
||||||
}
|
}
|
||||||
@ -69,7 +69,7 @@ public abstract class BaseLoaderCallback implements LoaderCallbackInterface {
|
|||||||
IncomatibilityMessage.setTitle("OpenCV Manager");
|
IncomatibilityMessage.setTitle("OpenCV Manager");
|
||||||
IncomatibilityMessage.setMessage("OpenCV Manager service is incompatible with this app. Update it!");
|
IncomatibilityMessage.setMessage("OpenCV Manager service is incompatible with this app. Update it!");
|
||||||
IncomatibilityMessage.setCancelable(false); // This blocks the 'BACK' button
|
IncomatibilityMessage.setCancelable(false); // This blocks the 'BACK' button
|
||||||
IncomatibilityMessage.setButton("OK", new OnClickListener() {
|
IncomatibilityMessage.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
mAppContext.finish();
|
mAppContext.finish();
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ public abstract class BaseLoaderCallback implements LoaderCallbackInterface {
|
|||||||
InitFailedDialog.setTitle("OpenCV error");
|
InitFailedDialog.setTitle("OpenCV error");
|
||||||
InitFailedDialog.setMessage("OpenCV was not initialised correctly. Application will be shut down");
|
InitFailedDialog.setMessage("OpenCV was not initialised correctly. Application will be shut down");
|
||||||
InitFailedDialog.setCancelable(false); // This blocks the 'BACK' button
|
InitFailedDialog.setCancelable(false); // This blocks the 'BACK' button
|
||||||
InitFailedDialog.setButton("OK", new OnClickListener() {
|
InitFailedDialog.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new OnClickListener() {
|
||||||
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
mAppContext.finish();
|
mAppContext.finish();
|
||||||
@ -102,7 +102,7 @@ public abstract class BaseLoaderCallback implements LoaderCallbackInterface {
|
|||||||
InstallMessage.setTitle("Package not found");
|
InstallMessage.setTitle("Package not found");
|
||||||
InstallMessage.setMessage(callback.getPackageName() + " package was not found! Try to install it?");
|
InstallMessage.setMessage(callback.getPackageName() + " package was not found! Try to install it?");
|
||||||
InstallMessage.setCancelable(false); // This blocks the 'BACK' button
|
InstallMessage.setCancelable(false); // This blocks the 'BACK' button
|
||||||
InstallMessage.setButton("Yes", new OnClickListener()
|
InstallMessage.setButton(AlertDialog.BUTTON_POSITIVE, "Yes", new OnClickListener()
|
||||||
{
|
{
|
||||||
public void onClick(DialogInterface dialog, int which)
|
public void onClick(DialogInterface dialog, int which)
|
||||||
{
|
{
|
||||||
@ -110,7 +110,7 @@ public abstract class BaseLoaderCallback implements LoaderCallbackInterface {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
InstallMessage.setButton2("No", new OnClickListener() {
|
InstallMessage.setButton(AlertDialog.BUTTON_NEGATIVE, "No", new OnClickListener() {
|
||||||
|
|
||||||
public void onClick(DialogInterface dialog, int which)
|
public void onClick(DialogInterface dialog, int which)
|
||||||
{
|
{
|
||||||
|
@ -36,7 +36,7 @@ public class puzzle15Activity extends Activity
|
|||||||
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
@ -74,7 +74,7 @@ public class puzzle15Activity extends Activity
|
|||||||
AlertDialog ad = new AlertDialog.Builder(this).create();
|
AlertDialog ad = new AlertDialog.Builder(this).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
|
@ -31,7 +31,7 @@ public class ColorBlobDetectionActivity extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
@ -69,7 +69,7 @@ public class ColorBlobDetectionActivity extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(this).create();
|
AlertDialog ad = new AlertDialog.Builder(this).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
|
@ -45,7 +45,7 @@ public class FdActivity extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
@ -89,7 +89,7 @@ public class FdActivity extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(this).create();
|
AlertDialog ad = new AlertDialog.Builder(this).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
|
@ -54,7 +54,7 @@ public class ImageManipulationsActivity extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
@ -91,7 +91,7 @@ public class ImageManipulationsActivity extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(this).create();
|
AlertDialog ad = new AlertDialog.Builder(this).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
|
@ -36,7 +36,7 @@ public class Sample0Base extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(this).create();
|
AlertDialog ad = new AlertDialog.Builder(this).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
|
@ -36,7 +36,7 @@ public class Sample1Java extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
@ -73,7 +73,7 @@ public class Sample1Java extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(this).create();
|
AlertDialog ad = new AlertDialog.Builder(this).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
|
@ -43,7 +43,7 @@ public class Sample2NativeCamera extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
@ -80,7 +80,7 @@ public class Sample2NativeCamera extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(this).create();
|
AlertDialog ad = new AlertDialog.Builder(this).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
|
@ -34,7 +34,7 @@ public class Sample3Native extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
@ -71,7 +71,7 @@ public class Sample3Native extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(this).create();
|
AlertDialog ad = new AlertDialog.Builder(this).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
|
@ -42,7 +42,7 @@ public class Sample4Mixed extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
@ -79,7 +79,7 @@ public class Sample4Mixed extends Activity {
|
|||||||
AlertDialog ad = new AlertDialog.Builder(this).create();
|
AlertDialog ad = new AlertDialog.Builder(this).create();
|
||||||
ad.setCancelable(false); // This blocks the 'BACK' button
|
ad.setCancelable(false); // This blocks the 'BACK' button
|
||||||
ad.setMessage("Fatal error: can't open camera!");
|
ad.setMessage("Fatal error: can't open camera!");
|
||||||
ad.setButton("OK", new DialogInterface.OnClickListener() {
|
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
finish();
|
finish();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user