Java Code Examples for android.view.Choreographer#getInstance()
The following examples show how to use
android.view.Choreographer#getInstance() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DisplayPowerState.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
public DisplayPowerState(DisplayBlanker blanker, ColorFade colorFade) { mHandler = new Handler(true /*async*/); mChoreographer = Choreographer.getInstance(); mBlanker = blanker; mColorFade = colorFade; mPhotonicModulator = new PhotonicModulator(); mPhotonicModulator.start(); // At boot time, we know that the screen is on and the electron beam // animation is not playing. We don't know the screen's brightness though, // so prepare to set it to a known state when the state is next applied. // Although we set the brightness to full on here, the display power controller // will reset the brightness to a new level immediately before the changes // actually have a chance to be applied. mScreenState = Display.STATE_ON; mScreenBrightness = PowerManager.BRIGHTNESS_ON; scheduleScreenUpdate(); mColorFadePrepared = false; mColorFadeLevel = 1.0f; mColorFadeReady = true; }
Example 2
Source File: ZhuanlanApplication.java From ZhuanLan with Apache License 2.0 | 6 votes |
@Override public void onCreate() { super.onCreate(); mContext = this; Tips.init(this); DataCenter.init(this, "zhuanlan.db"); // StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() // .detectDiskReads() // .detectDiskWrites() // .detectNetwork() // .penaltyLog() // .build()); // // StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() // .detectActivityLeaks() // .detectLeakedSqlLiteObjects() // .penaltyLog() // .penaltyDeath() // .build()); initStetho(); Choreographer choreographer = Choreographer.getInstance(); choreographer.postFrameCallback(FRAME_CALLBACK); }
Example 3
Source File: FpsTaskEntity.java From analyzer-of-android-for-Apache-Weex with Apache License 2.0 | 5 votes |
@Override @TargetApi(Build.VERSION_CODES.JELLY_BEAN) public void onTaskInit() { this.mFpsChecker = new FPSSampler(Choreographer.getInstance()); mFpsChecker.reset(); mFpsChecker.start(); }
Example 4
Source File: AbsView.java From narrate-android with Apache License 2.0 | 5 votes |
protected void redraw() { log("redraw()"); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { // stay in sync with display updates Choreographer choreographer = Choreographer.getInstance(); choreographer.removeFrameCallback(redrawCallback); choreographer.postFrameCallback(redrawCallback); } else { redrawInternal(); } }
Example 5
Source File: VideoFrameReleaseTimeHelper.java From Telegram-FOSS with GNU General Public License v2.0 | 4 votes |
private void createChoreographerInstanceInternal() { choreographer = Choreographer.getInstance(); }
Example 6
Source File: VideoFrameReleaseTimeHelper.java From MediaSDK with Apache License 2.0 | 4 votes |
private void createChoreographerInstanceInternal() { choreographer = Choreographer.getInstance(); }
Example 7
Source File: Metronome.java From Takt with Apache License 2.0 | 4 votes |
public Metronome() { choreographer = Choreographer.getInstance(); }
Example 8
Source File: AndroidSpringLooperFactory.java From Viewer with Apache License 2.0 | 4 votes |
/** * @return an Android spring choreographer using the system {@link Choreographer} */ public static ChoreographerAndroidSpringLooper create() { return new ChoreographerAndroidSpringLooper(Choreographer.getInstance()); }
Example 9
Source File: ChoreographerInjecor.java From AndroidGodEye with Apache License 2.0 | 4 votes |
@Override public Choreographer getChoreographer() { return Choreographer.getInstance(); }
Example 10
Source File: ChoreographerCompat.java From StackCardsView with Apache License 2.0 | 4 votes |
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) private Choreographer getChoreographer() { return Choreographer.getInstance(); }
Example 11
Source File: MouseCursor.java From android-port with GNU General Public License v3.0 | 4 votes |
public MouseCursor(GameActivity activity, Osc osc) { this.osc = osc; Resources r = activity.getResources(); int height = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 30, r.getDisplayMetrics()); int width = (int) Math.round(height / 1.5); cursor = new FixedSizeImageView(activity, width, height); cursor.setImageResource(R.drawable.pointer_arrow); cursor.setLayoutParams(new RelativeLayout.LayoutParams(width, height)); layout = activity.getLayout(); layout.addView(cursor); choreographer = Choreographer.getInstance(); choreographer.postFrameCallback(this); }
Example 12
Source File: AndroidSpringLooperFactory.java From UltimateAndroid with Apache License 2.0 | 4 votes |
/** * @return an Android spring choreographer using the system {@link android.view.Choreographer} */ public static ChoreographerAndroidSpringLooper create() { return new ChoreographerAndroidSpringLooper(Choreographer.getInstance()); }
Example 13
Source File: Workspace.java From Trebuchet with GNU General Public License v3.0 | 4 votes |
public WallpaperOffsetInterpolator() { mChoreographer = Choreographer.getInstance(); mInterpolator = new DecelerateInterpolator(1.5f); }
Example 14
Source File: ChoreographerCompatImpl.java From litho with Apache License 2.0 | 4 votes |
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) private Choreographer getChoreographer() { return Choreographer.getInstance(); }
Example 15
Source File: FpsDataModule.java From DebugOverlay-Android with Apache License 2.0 | 4 votes |
public FpsDataModule(int interval) { this.interval = interval; this.choreographer = Choreographer.getInstance(); }
Example 16
Source File: ChoreographerCompat.java From react-native-GPay with MIT License | 4 votes |
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) private Choreographer getChoreographer() { return Choreographer.getInstance(); }
Example 17
Source File: VideoFrameReleaseTimeHelper.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
private void createChoreographerInstanceInternal() { choreographer = Choreographer.getInstance(); }
Example 18
Source File: Metronome.java From styT with Apache License 2.0 | 4 votes |
public Metronome() { choreographer = Choreographer.getInstance(); }
Example 19
Source File: VideoFrameReleaseTimeHelper.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
private void createChoreographerInstanceInternal() { choreographer = Choreographer.getInstance(); }
Example 20
Source File: RampAnimator.java From android_9.0.0_r45 with Apache License 2.0 | 4 votes |
public RampAnimator(T object, IntProperty<T> property) { mObject = object; mProperty = property; mChoreographer = Choreographer.getInstance(); }