コード例 #1
0
 @Override
 protected void onDestroy() {
   log.d("onDestroy");
   super.onDestroy();
   if (src_image != null) src_image.recycle();
   if (mAdView != null) {
     mAdView.destroy();
   }
 }
コード例 #2
0
 // Interpretation of the page configuration parameters
 private void init_page(Intent intent) {
   bLoading = true;
   src_image = null;
   uri = intent.getData();
   if (uri == null) {
     log.d(
         "intent=%s uri=%s type=%s extra=%s",
         intent, intent.getData(), intent.getType(), intent.getExtras());
     Bundle extra = intent.getExtras();
     if (extra != null) {
       for (String key : extra.keySet()) {
         log.d("key=%s", key);
       }
       uri = (Uri) extra.get(Intent.EXTRA_STREAM);
     }
     if (uri == null) {
       finish();
       return;
     }
   }
   log.d("uri=%s", uri);
 }
コード例 #3
0
 @Override
 protected void onResume() {
   log.d("onResume");
   super.onResume();
   tracking_mode = TRACK_NONE;
   if (bLoading) {
     loader_worker = new ImageLoaderWorker();
     loader_worker.start();
   }
   if (mAdView != null) {
     mAdView.resume();
   }
 }
コード例 #4
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   log.d("onCreate");
   super.onCreate(savedInstanceState);
   //        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
   //            Window w = getWindow();
   //            w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION,
   // WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
   //            w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
   // WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
   //        }
   init_resource();
   init_page(getIntent());
   initAdView();
 }
コード例 #5
0
  @Override
  protected void onPause() {
    log.d("onPause");
    super.onPause();
    if (wp_task != null) wp_task.joinLoop(log, "wp_task");
    if (dialog != null) dialog.dismiss();
    if (loader_worker != null) loader_worker.joinLoop(log, "loader_worker");

    if (mAdView != null) {
      mAdView.pause();
    }
    if (isWallpaperSet) {
      isWallpaperSet = false;
    } else {
      overridePendingTransition(R.anim.set_as_slide_in, R.anim.set_as_slide_out);
    }
  }
コード例 #6
0
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   log.d("onConfigurationChanged");
   super.onConfigurationChanged(newConfig);
 }
コード例 #7
0
 @Override
 protected void onNewIntent(Intent intent) {
   log.d("onNewIntent");
   super.onNewIntent(intent);
   init_page(intent);
 }