Fixed
Status Update
Comments
ru...@gmail.com <ru...@gmail.com> #2
since these are in public API (:/) we need to do this in 1.2
su...@google.com <su...@google.com> #3
since it is already marked as deprecated, we can probably do it by now.
ru...@gmail.com <ru...@gmail.com> #4
Opening diff shortly
ra...@google.com <ra...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d576cbdc911cba16638a44fd8223391a90a07ef7
Author: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
Date: Tue Aug 11 09:30:34 2020
[GH] Hide deprecated internal API.
## Proposed Changes
* `RoomDatabase.java` has protected `mCallbacks` field which is leaking in the API docs, we should @Hide it.
## Testing
Test: Ran unit tests locally
## Issues Fixed
Fixes: 76109329
This is an imported pull request fromhttps://github.com/androidx/androidx/pull/61 .
Resolves #61
Github-Pr-Head-Sha: 6440daa3a63752c7f9d5ba2a390248cd85bc634f
GitOrigin-RevId: fe92d8466a59b44b218b6ca3cbd57dcda17992f7
Change-Id: Id599cdf5b02b32bdae0166266fb7da967598fe92
A room/runtime/api/current.ignore
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
https://android-review.googlesource.com/1396827
Branch: androidx-master-dev
commit d576cbdc911cba16638a44fd8223391a90a07ef7
Author: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
Date: Tue Aug 11 09:30:34 2020
[GH] Hide deprecated internal API.
## Proposed Changes
* `RoomDatabase.java` has protected `mCallbacks` field which is leaking in the API docs, we should @Hide it.
## Testing
Test: Ran unit tests locally
## Issues Fixed
Fixes: 76109329
This is an imported pull request from
Resolves #61
Github-Pr-Head-Sha: 6440daa3a63752c7f9d5ba2a390248cd85bc634f
GitOrigin-RevId: fe92d8466a59b44b218b6ca3cbd57dcda17992f7
Change-Id: Id599cdf5b02b32bdae0166266fb7da967598fe92
A room/runtime/api/current.ignore
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
ra...@google.com <ra...@google.com> #6
ru...@gmail.com <ru...@gmail.com> #8
you are welcome
ru...@gmail.com <ru...@gmail.com> #9
you're welcome
ed...@gmail.com <ed...@gmail.com> #10
Hola a todos
da...@gmail.com <da...@gmail.com> #11
4.5 7 12
Description
Version used: implementation 'android.arch.work:work-runtime:1.0.0-alpha12'
Devices/Android versions reproduced on: Moto e3 Power / Andorid 6.0 Marshmallow
Sometimes Periodic workManager gets called two times.
This is my built.gradle file:-
compileSdkVersion 28
minSdkVersion 22
targetSdkVersion 28
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Here is this code:-
//---------------------------------------------------------Class Login---------------------------------------------------------------------------------------//
SaveData("Frist");
PeriodicWorkRequest periodicWorkRequest = new PeriodicWorkRequest.Builder(DailyLogoutTask.class,
1, TimeUnit.DAYS)
.build();
WorkManager.getInstance().enqueueUniquePeriodicWork("DailyTaskRestaurantLite"
, ExistingPeriodicWorkPolicy.KEEP
, periodicWorkRequest);
private void SaveData(String str) {
SharedPreferences.Editor preferencesEditor = mPreferences.edit();
preferencesEditor.putString("Status1", str);
preferencesEditor.apply();
}
//------------------------------------------------------Class DailyLogoutTask-----------------------------------------------------------------------//
import android.content.Context;
import android.content.SharedPreferences;
import androidx.annotation.NonNull;
import android.util.Log;
import com.domo.ClsGlobal;
import com.demo.classes.ClsUserInfo;
import androidx.work.Result;
import androidx.work.WorkManager;
import androidx.work.Worker;
import androidx.work.WorkerParameters;
import static android.content.Context.MODE_PRIVATE;
public class DailyLogoutTask extends Worker {
private SharedPreferences mPreferences;
private static final String mPreferncesName = "MyPerfernces";
Context context;
public DailyLogoutTask(@NonNull Context context, @NonNull WorkerParameters workerParams) {
super(context, workerParams);
this.context = context;
mPreferences = context.getSharedPreferences(mPreferncesName, MODE_PRIVATE);
Log.e("DailyLogoutTask", "DailyLogoutTask call");
}
@NonNull
@Override
public Result doWork() {
String getstatus = mPreferences.getString("Status1", "No Task Perform");
Log.d("---getstatus---", "----getstatus---" + getstatus);
Log.e("doWork", "doWork call");
if (!getstatus.equalsIgnoreCase("Frist")) {
ClsUserInfo userInfo = new ClsUserInfo();
ClsUserInfo userLoginStatus = ClsGlobal.getUserInfo(context);
if (!userLoginStatus.getLoginStatus().equalsIgnoreCase("DEACTIVE")){
Log.e("chack", "Logout");
userInfo.setLoginStatus("DEACTIVE");
ClsGlobal.setUserInfo(userInfo, context);
// ClsGlobal.sendNotification("IF", "IF background Logout".concat(ClsGlobal.getEntryDate()),context);
WorkManager.getInstance().cancelUniqueWork("DailyTaskRestaurantLite");
Log.d("getFirstDateOfMonth", "----UserInfo---" + userLoginStatus.getLoginStatus());
}
} else {
Log.e("chack", "Not Frist");
// ClsGlobal.sendNotification("ELSE", "ELSE background Logout".concat(ClsGlobal.getEntryDate()),context);
SaveData("Second");
}
return Result.success();
}
private void SaveData(String str) {
Log.e("SaveData", str);
SharedPreferences.Editor preferencesEditor = mPreferences.edit();
preferencesEditor.putString("Status1", str);
preferencesEditor.apply();
}
If this is a bug in the library, we would appreciate if you could attach:
- Sample project to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).