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 list users | |
Users: | |
UserInfo{0:Owner:c13} running | |
UserInfo{12:configured_user:1010} running |
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 theme | |
<style name="SearchToolbar" parent="Theme.AppCompat.Light.NoActionBar"> | |
//toolbar back arrow color | |
<item name="android:textColorSecondary">@android:color/white</item> | |
//toolbar title color | |
<item name="android:textColorPrimary">@android:color/white</item> | |
</style> | |
Also we can do it from java code: |
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 connect <ANDROID_TV_IP_ADDRESS> |
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 |
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
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
/* | |
* 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
FROM ubuntu:16.04 | |
MAINTAINER Balachandar KM "balachandarlinks@gmail.com" | |
# 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
<?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
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) { |
NewerOlder