This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Reveal View. Note: View should be invisible before revealing | |
currentTubeStatusContainer.setVisibility(View.INVISIBLE); | |
// Do the API compatibility check | |
new Timer().schedule(new TimerTask() { | |
@Override | |
public void run() { | |
getActivity().runOnUiThread(new Runnable() { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ImageFlipper{ | |
private static final int START_ANGLE = 90; | |
private static final int END_ANGLE = 270; | |
private int animationDuration = 800; | |
private ObjectAnimator flipObjectAnimator; | |
public ImageFlipper(final View targetView, final int[] drawableResources){ | |
((ImageView)targetView).setImageResource(drawableResources[0]); | |
flipObjectAnimator = ObjectAnimator.ofFloat(targetView, "rotationY", START_ANGLE, END_ANGLE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @param context | |
* @param phoneNumber | |
* @return contactName | |
*/ | |
public static String getContactName(Context context, String phoneNumber) { | |
Uri uri = Uri.withAppendedPath( | |
PhoneLookup.CONTENT_FILTER_URI, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.accessibilityservice.AccessibilityService; | |
import android.accessibilityservice.AccessibilityServiceInfo; | |
import android.util.Log; | |
import android.view.accessibility.AccessibilityEvent; | |
public class RecorderService extends AccessibilityService { | |
static final String TAG = "RecorderService"; | |
private String getEventType(AccessibilityEvent event) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="schwiz.net.weartest" > | |
<application | |
android:allowBackup="true" | |
android:icon="@drawable/ic_launcher" | |
android:label="@string/app_name" | |
android:theme="@style/AppTheme" > | |
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
MAINTAINER Balachandar KM "[email protected]" | |
# Install java7 | |
RUN apt-get update && \ | |
apt-get install -y software-properties-common && \ | |
add-apt-repository -y ppa:webupd8team/java && \ | |
(echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections) && \ | |
apt-get update && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2014 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Application | |
import android.content.Context | |
import android.os.Bundle | |
import android.provider.Settings.Global.* | |
import androidx.test.platform.app.InstrumentationRegistry | |
import androidx.test.runner.AndroidJUnitRunner | |
class TestRunner : AndroidJUnitRunner() { | |
override fun onCreate(arguments: Bundle?) { | |
super.onCreate(arguments) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> adb shell pm grant --user <USER_ID> in.codeseed.tvusage android.permission.PACKAGE_USAGE_STATS | |
> adb shell appops set --user <USER_ID> in.codeseed.tvusage GET_USAGE_STATS allow | |
> adb shell dumpsys deviceidle whitelist +in.codeseed.tvusage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> adb shell pm grant --user <USER_ID> in.codeseed.tvusage android.permission.SYSTEM_ALERT_WINDOW |
OlderNewer