Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a3e6980 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8494021 from 7171f5e2 to tm-qpr1-release

Change-Id: I74e8517b2f1dc4fbb3202e9a227a2802d734bab5
parents 3b415361 7171f5e2
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -168,11 +168,11 @@ package android.app {
  }
  }


  public static interface ActivityOptions.OnAnimationFinishedListener {
  public static interface ActivityOptions.OnAnimationFinishedListener {
    method public void onAnimationFinished();
    method public void onAnimationFinished(long);
  }
  }


  public static interface ActivityOptions.OnAnimationStartedListener {
  public static interface ActivityOptions.OnAnimationStartedListener {
    method public void onAnimationStarted();
    method public void onAnimationStarted(long);
  }
  }


  public class ActivityTaskManager {
  public class ActivityTaskManager {
+15 −8
Original line number Original line Diff line number Diff line
@@ -46,6 +46,7 @@ import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable;
import android.os.RemoteException;
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.os.ResultReceiver;
import android.os.SystemClock;
import android.os.UserHandle;
import android.os.UserHandle;
import android.transition.TransitionManager;
import android.transition.TransitionManager;
import android.util.Pair;
import android.util.Pair;
@@ -634,9 +635,10 @@ public class ActivityOptions extends ComponentOptions {
            mAnimationStartedListener = new IRemoteCallback.Stub() {
            mAnimationStartedListener = new IRemoteCallback.Stub() {
                @Override
                @Override
                public void sendResult(Bundle data) throws RemoteException {
                public void sendResult(Bundle data) throws RemoteException {
                    final long elapsedRealtime = SystemClock.elapsedRealtime();
                    handler.post(new Runnable() {
                    handler.post(new Runnable() {
                        @Override public void run() {
                        @Override public void run() {
                            listener.onAnimationStarted();
                            listener.onAnimationStarted(elapsedRealtime);
                        }
                        }
                    });
                    });
                }
                }
@@ -645,13 +647,15 @@ public class ActivityOptions extends ComponentOptions {
    }
    }


    /**
    /**
     * Callback for use with {@link ActivityOptions#makeThumbnailScaleUpAnimation}
     * Callback for finding out when the given animation has started running.
     * to find out when the given animation has started running.
     * @hide
     * @hide
     */
     */
    @TestApi
    @TestApi
    public interface OnAnimationStartedListener {
    public interface OnAnimationStartedListener {
        void onAnimationStarted();
        /**
         * @param elapsedRealTime {@link SystemClock#elapsedRealTime} when animation started.
         */
        void onAnimationStarted(long elapsedRealTime);
    }
    }


    private void setOnAnimationFinishedListener(final Handler handler,
    private void setOnAnimationFinishedListener(final Handler handler,
@@ -660,10 +664,11 @@ public class ActivityOptions extends ComponentOptions {
            mAnimationFinishedListener = new IRemoteCallback.Stub() {
            mAnimationFinishedListener = new IRemoteCallback.Stub() {
                @Override
                @Override
                public void sendResult(Bundle data) throws RemoteException {
                public void sendResult(Bundle data) throws RemoteException {
                    final long elapsedRealtime = SystemClock.elapsedRealtime();
                    handler.post(new Runnable() {
                    handler.post(new Runnable() {
                        @Override
                        @Override
                        public void run() {
                        public void run() {
                            listener.onAnimationFinished();
                            listener.onAnimationFinished(elapsedRealtime);
                        }
                        }
                    });
                    });
                }
                }
@@ -672,13 +677,15 @@ public class ActivityOptions extends ComponentOptions {
    }
    }


    /**
    /**
     * Callback for use with {@link ActivityOptions#makeThumbnailAspectScaleDownAnimation}
     * Callback for finding out when the given animation has drawn its last frame.
     * to find out when the given animation has drawn its last frame.
     * @hide
     * @hide
     */
     */
    @TestApi
    @TestApi
    public interface OnAnimationFinishedListener {
    public interface OnAnimationFinishedListener {
        void onAnimationFinished();
        /**
         * @param elapsedRealTime {@link SystemClock#elapsedRealTime} when animation finished.
         */
        void onAnimationFinished(long elapsedRealTime);
    }
    }


    /**
    /**
+5 −1
Original line number Original line Diff line number Diff line
@@ -459,8 +459,12 @@ static jobject NativeGetOverlayableInfo(JNIEnv* env, jclass /*clazz*/, jlong ptr
    return nullptr;
    return nullptr;
  }
  }


  auto overlayable_name_native = std::string(env->GetStringUTFChars(overlayable_name, NULL));
  const char* overlayable_name_native = env->GetStringUTFChars(overlayable_name, nullptr);
  if (overlayable_name_native == nullptr) {
      return nullptr;
  }
  auto actor = overlayable_map.find(overlayable_name_native);
  auto actor = overlayable_map.find(overlayable_name_native);
  env->ReleaseStringUTFChars(overlayable_name, overlayable_name_native);
  if (actor == overlayable_map.end()) {
  if (actor == overlayable_map.end()) {
    return nullptr;
    return nullptr;
  }
  }
+4 −5
Original line number Original line Diff line number Diff line
@@ -48,6 +48,7 @@


#include <jni.h>
#include <jni.h>
#include <nativehelper/JNIHelp.h>
#include <nativehelper/JNIHelp.h>
#include <nativehelper/ScopedUtfChars.h>


using namespace android;
using namespace android;
using namespace img_utils;
using namespace img_utils;
@@ -1264,16 +1265,14 @@ static void DngCreator_init(JNIEnv* env, jobject thiz, jobject characteristicsPt


    sp<NativeContext> nativeContext = new NativeContext(characteristics, results);
    sp<NativeContext> nativeContext = new NativeContext(characteristics, results);


    const char* captureTime = env->GetStringUTFChars(formattedCaptureTime, nullptr);
    ScopedUtfChars captureTime(env, formattedCaptureTime);

    if (captureTime.size() + 1 != NativeContext::DATETIME_COUNT) {
    size_t len = strlen(captureTime) + 1;
    if (len != NativeContext::DATETIME_COUNT) {
        jniThrowException(env, "java/lang/IllegalArgumentException",
        jniThrowException(env, "java/lang/IllegalArgumentException",
                "Formatted capture time string length is not required 20 characters");
                "Formatted capture time string length is not required 20 characters");
        return;
        return;
    }
    }


    nativeContext->setCaptureTime(String8(captureTime));
    nativeContext->setCaptureTime(String8(captureTime.c_str()));


    DngCreator_setNativeContext(env, thiz, nativeContext);
    DngCreator_setNativeContext(env, thiz, nativeContext);
}
}
+3 −0
Original line number Original line Diff line number Diff line
@@ -5781,4 +5781,7 @@
    <string name="safety_protection_display_text"></string>
    <string name="safety_protection_display_text"></string>


    <!-- End safety protection resources to be overlaid -->
    <!-- End safety protection resources to be overlaid -->

    <!-- List of the labels of requestable device state config values -->
    <string-array name="config_deviceStatesAvailableForAppRequests"/>
</resources>
</resources>
Loading