Skip to content

Android15 #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ local.properties
.idea/caches/
.idea/codeStyles/
.idea/deploymentTargetDropDown.xml
.idea/appInsightsSettings.xml
.idea/deploymentTargetSelector.xml
*.iml

# OS-specific files
Expand Down
20 changes: 10 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdk 34
compileSdk 35
defaultConfig {
applicationId "com.samsung.microbit"
minSdkVersion 21
targetSdk 34
targetSdk 35
// When target SDK version is 30+,
// requestLegacyExternalStorage will continue to work for 29 Android 10
}
Expand Down Expand Up @@ -33,16 +33,16 @@ android {
}

dependencies {
implementation 'androidx.lifecycle:lifecycle-process:2.7.0'
testImplementation 'junit:junit:4.12'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.lifecycle:lifecycle-process:2.9.2'
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.7.1'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.19'
implementation 'androidx.recyclerview:recyclerview:1.4.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.29'
implementation 'no.nordicsemi.android:dfu:2.4.1'
implementation project(':pfLibrary')
implementation 'com.google.android.gms:play-services-analytics:18.0.4'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.google.android.gms:play-services-analytics:18.1.1'
implementation 'com.google.code.gson:gson:2.13.1'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
}
8 changes: 3 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<activity
android:name=".ui.activity.NotificationActivity"
android:label="@string/device_details"
android:screenOrientation="portrait"/>
android:configChanges="orientation|screenSize" />
<activity
android:name=".ui.activity.PairingActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
Expand All @@ -146,14 +146,12 @@
android:name=".ui.activity.AudioRecorderActivity"
android:configChanges="orientation|screenSize"
android:label="Audio Recorder"
android:launchMode="singleTask"
android:screenOrientation="portrait"/>
android:launchMode="singleTask"/>
<activity
android:name=".ui.activity.HelpWebView"
android:configChanges="orientation|screenSize"
android:label="Help Webview"
android:launchMode="singleTask"
android:screenOrientation="portrait"/>
android:launchMode="singleTask"/>
<activity
android:name=".ui.activity.MakeCodeWebView"
android:configChanges="orientation|screenSize"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ public void onClick(View v) {

@Override
protected void onCreate(Bundle savedInstanceState) {

// TODO: EdgeToEdge - Remove once activities handle insets.
// Call before the DecorView is accessed in setContentView
getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);

super.onCreate(savedInstanceState);

mLaunchActivity = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ public void run() {
@Override
protected void onCreate(Bundle savedInstanceState) {
logi("onCreate");

// TODO: EdgeToEdge - Remove once activities handle insets.
// Call before the DecorView is accessed in setContentView
getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);

super.onCreate(savedInstanceState);

displayCreate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ protected void onStop() {

@Override
protected void onCreate(Bundle savedInstanceState) {

// TODO: EdgeToEdge - Remove once activities handle insets.
// Call before the DecorView is accessed in setContentView
getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_help_web_view);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,14 @@ protected void onStop() {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
logi("onCreate() :: ");

// TODO: EdgeToEdge - Remove once activities handle insets.
// Call before the DecorView is accessed in setContentView
getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_home);

if(savedInstanceState == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ protected void onStop() {

@Override
protected void onCreate(Bundle savedInstanceState) {

// TODO: EdgeToEdge - Remove once activities handle insets.
// Call before the DecorView is accessed in setContentView
getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);

super.onCreate(savedInstanceState);

activityHandle = this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@

import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;

import com.samsung.microbit.R;

public class NotificationActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {

// TODO: EdgeToEdge - Remove once activities handle insets.
// Call before the DecorView is accessed in setContentView
getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);

super.onCreate(savedInstanceState);

// If this activity is the root activity of the task, the app is not running
Expand All @@ -23,6 +31,11 @@ protected void onCreate(Bundle savedInstanceState) {
finish();
}

@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}

@Override
protected void onStart() {
super.onStart();
Expand All @@ -33,4 +46,4 @@ protected void onStop() {
super.onStop();
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,10 @@ public void onPause() {
protected void onCreate(Bundle savedInstanceState) {
logi("onCreate() ::");

// TODO: EdgeToEdge - Remove once activities handle insets.
// Call before the DecorView is accessed in setContentView
getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);

super.onCreate(savedInstanceState);

MBApp application = MBApp.getApp();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ private void releaseViews() {

@Override
protected void onCreate(Bundle savedInstanceState) {

// TODO: EdgeToEdge - Remove once activities handle insets.
// Call before the DecorView is accessed in setContentView
getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);

super.onCreate(savedInstanceState);

Log.d("PopUpActivity", "onCreate() popuptype = " + getIntent().getIntExtra(INTENT_EXTRA_TYPE, PopUp.TYPE_NONE));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,11 @@ private void releaseViews() {

@Override
protected void onCreate(Bundle savedInstanceState) {

// TODO: EdgeToEdge - Remove once activities handle insets.
// Call before the DecorView is accessed in setContentView
getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);

super.onCreate(savedInstanceState);

MBApp application = MBApp.getApp();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ public class SplashScreenActivity extends Activity implements View.OnClickListen

@Override
protected void onCreate(Bundle savedInstanceState) {

// TODO: EdgeToEdge - Remove once activities handle insets.
// Call before the DecorView is accessed in setContentView
getTheme().applyStyle(R.style.OptOutEdgeToEdgeEnforcement, /* force */ false);

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_splash_screen);
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/values-v35/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- TODO: EdgeToEdge - Remove once activities handle insets. -->
<style name="OptOutEdgeToEdgeEnforcement">
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>
</resources>
7 changes: 7 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -324,4 +324,11 @@
<style name="AlertDialogDarkButtons" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="android:textColor">@color/black_color</item>
</style>

<!-- TODO: EdgeToEdge - Remove once activities handle insets. -->
<style name="OptOutEdgeToEdgeEnforcement">
<!-- android:windowOptOutEdgeToEdgeEnforcement
isn't supported before SDK 35. This empty
style enables programmatically opting-out. -->
</style>
</resources>
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.android.tools.build:gradle:8.6.1'
classpath 'com.google.gms:google-services:4.4.3'
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion pfLibrary
Submodule pfLibrary updated 1 files
+7 −7 build.gradle